';
$map['p'][] = $map['row']['map_x'].'x'.$map['row']['map_y'];
if($map['show'] == $map['row']['map_id']) {
$map['loc'] = $map['row'];
}
}
mysql_free_result($map['result']);
}
$map['template'] = @file_get_contents(PHPWCMS_TEMPLATE.'inc_cntpart/map/'.$map['template']);
$map['tmpl_var'] = get_tmpl_section('VAR', $map['template']);
$map['tmpl_content'] = get_tmpl_section('CONTENT', $map['template']);
$map['tmpl_location'] = get_tmpl_section('LOCATION', $map['template']);
$map['map_img'] = '';
if(file_exists(PHPWCMS_TEMPLATE.'inc_cntpart/map/map_img/'.$map['image'])) {
$map['map_img'] .= '';
if($map['map']) $map['map_img'] .= '';
}
if(!$map['tmpl_content']) {
$CNT_TMP .= '
'.$map['map_img'].'
';
if(!empty($map['text'])) $CNT_TMP .= nl2br(div_class($map['text'], $template_default["article"]["text_class"]));
if($map['loc']) {
$CNT_TMP .= ''.html_specialchars($map['loc']['map_title']).'
';
$map["location"] = '';
$map['loc']['map_zip'] = trim($map['loc']['map_zip'].' '.$map['loc']['map_city']);
if($map['loc']['map_zip']) {
$map["location"] .= ''.html_specialchars($map['loc']['map_zip'])."\n";
}
if($map['loc']['map_entry']) {
$map["location"] .= $map['loc']['map_entry']; //html_specialchars($map['loc']['map_entry'])
}
$map["location"] = trim($map["location"]);
if($map["location"]) {
$CNT_TMP .= nl2br(div_class($map["location"], $template_default["article"]["text_class"]));
}
}
} else {
if($map['loc']) {
// build location entry
$map['tmpl_location'] = render_cnt_template($map['tmpl_location'], 'TITLE', html_specialchars($map['loc']['map_title']));
$map['tmpl_location'] = render_cnt_template($map['tmpl_location'], 'ZIP', html_specialchars($map['loc']['map_zip']));
$map['tmpl_location'] = render_cnt_template($map['tmpl_location'], 'CITY', html_specialchars($map['loc']['map_city']));
$map['tmpl_location'] = render_cnt_template($map['tmpl_location'], 'ENTRY', $map['loc']['map_entry']);
} else {
$map['tmpl_location'] = '';
}
$map['tmpl_content'] = render_cnt_template($map['tmpl_content'], 'MAP', $map['map_img']);
$map['tmpl_content'] = render_cnt_template($map['tmpl_content'], 'TEXT', nl2br(html_specialchars($map['text'])));
$map['tmpl_content'] = render_cnt_template($map['tmpl_content'], 'LOCATION', $map['tmpl_location']);
$CNT_TMP .= $map['tmpl_content'];
}
// delete map array
unset($map);
?>