require_once('GoogleMapAPI.class.php'); require_once('class-db-mysql.php'); require_once('admin/includes/configure.php'); require_once('google-key.php'); function getImage($id, $name) { if (is_file("photos/$id-$name-small.jpg")) { return "photos/$id-$name-small.jpg"; } elseif (is_file("photos/$id-$name-small.gif")) { return "photos/$id-$name-small.gif"; } elseif (is_file("photos/$id-$name-small.png")) { return "photos/$id-$name-small.png"; } return ''; } $map = new GoogleMapAPI(); if (!isset($GOOGLE_KEYS[$_SERVER['HTTP_HOST']])) { echo 'Register google API key for this site at http://maps.google.com/apis/maps/signup.html and add it to config.php'; exit; } $map->setAPIKey($GOOGLE_KEYS[$_SERVER['HTTP_HOST']]); $map->disableDirections(); $markers = array(); $db = new DB; $title = ''; $description = ''; $keywords = ''; $intro = ''; $db->query("SELECT * FROM settings"); while ($db->next_record()) { $key = $db->f('setting_key'); if ($key == 'NEI_LIST_FILE_NAME') { $directoryUrl = $db->f('setting_value'); } elseif ($key == 'HEADER_FILE_NAME') { $headerFileName = $db->f('setting_value'); } elseif ($key == 'EMAIL_FORM_URL') { $emailFormUrl = $db->f('setting_value'); } elseif ($key == 'MAP_TITLE') { $title = $db->f('setting_value'); } elseif ($key == 'MAP_DESCRIPTION') { $description = $db->f('setting_value'); } elseif ($key == 'MAP_KEYWORDS') { $keywords = $db->f('setting_value'); } elseif ($key == 'MAP_INTRO') { $intro = $db->f('setting_value'); } } if (!isset($directoryUrl) || !$directoryUrl) { $directoryUrl = '/'; } if (!isset($headerFileName) || !$headerFileName) { $headerFileName = '_header.htm'; } if (!isset($emailFormUrl) || !$emailFormUrl) { $emailFormUrl = '/'; } $db->query("SELECT * FROM loft_and_condo_projects ORDER BY lc_name"); while ($db->next_record()) { $id = $db->f('lc_id'); $popup = '
| $map->printMap() ?> | $map->printSidebar() ?> |