public function run($results = '') { // parse the query string to find search keywords // and also the choice of search engine(s) if (isset($_GET['address'])) { $this->parameters = $_GET['address']; } if (!empty($this->parameters)) { $results = $this->doSearch(); } $v = new MapView(); $v->setMessages($this->messages); $v->run($results); }
public static function show($locations) { MasterView::showHeader("Map"); MasterView::showNav(); MapView::showContent($locations); MasterView::showFooter(null); }
public static function run() { if ($_SERVER["REQUEST_METHOD"] == "POST") { $map = new Map($_POST); MapView::show($map->getLocations()); } else { MapView::show(null); } }
public static function run() { $map = MapDatabase::getMapByName("europe"); if ($_SERVER["REQUEST_METHOD"] == "POST") { if (!isset($_POST["location"])) { MapView::show($map); } else { $location = $_POST["location"]; if (!($newMap = MapDatabase::getMapByName($location))) { MapView::show($map); } else { MapView::show($newMap); } } } else { MapView::show($map); } }
public static function show($map) { $links = array("My Trips" => "my-trips", "View my Profile" => "view-profile", "Log Out" => "log-out"); ###(HTML) ?> <!DOCTYPE html> <html> <?php MasterView::insertHead("", "/sm_lab5/js/Map.js"); ?> <body> <?php MasterView::insertNav($links); MapView::insertContent($map); MasterView::insertFooter(null); ?> </body> </html> <?php ###(ENDHTML) }
public static function run($map) { if (CookieController::cookieExists("session")) { if (($user = CookieController::readSessionCookie()) !== false) { $map; if ($_SERVER["REQUEST_METHOD"] == "POST") { $mapID = ""; $mapName = ""; $latLng = ""; if (isset($_POST["map-id"])) { $mapID = $_POST["map-id"]; } if (isset($_POST["map-name"])) { $mapName = $_POST["map-name"]; } if (isset($_POST["lat-lng"])) { $latLng = $_POST["lat-lng"]; } $map = new Map($mapID, $mapName, $latLng); if (empty($mapID)) { MapDatabase::addMap($map, $user->getID()); } else { MapDatabase::updateMap($map); } MapView::show($map); } else { if (isset($_GET["selection"])) { $mapID = $_GET["selection"]; $map = MapDatabase::getMap($mapID); } MapView::show($map); } } else { header("Location: home"); } } else { header("Location: home"); } }
public static function show($map) { $links = array("Home" => "home", "View my Profile" => "profile", "Log Out" => "log-out"); ###(HTML) ?> <!DOCTYPE html> <html> <?php MasterView::insertHead(null); ?> <body style="height:100%"> <?php MasterView::insertNav($links); MapView::insertMap($map); MapView::insertContent(); MasterView::insertFooter(null); ?> </body> </html> <?php ###(ENDHTML) }
<!DOCTYPE html> <html> <head> <title>MapView Tests</title> </head> <body> <h1>MapView Tests</h1> <h3>Should call MapView::show()</h3> <hr/> <?php include_once "../includer.php"; $map = new Map(null); $map->addLocation("Rome"); MapView::show($map->getLocations()); ?> </body> </html>
function goMap($type, $id, $size = 200) { global $mc, $config; //TODO integrate the existing common/includes/class.mapview.php include_once 'kbconfig.php'; require_once 'common/includes/globals.php'; $config = new Config(); $view = new MapView($type, $size); $view->setSystemID($id); switch ($type) { case "map": $view->setTitle("Region"); $view->showLines(config::get('map_map_showlines')); $view->paintSecurity(config::get('map_map_security')); checkColors('map', $view); break; case "region": $view->setTitle("Constellation"); $view->showLines(config::get('map_reg_showlines')); $view->paintSecurity(config::get('map_reg_security')); $view->setOffset(25); checkColors('reg', $view); break; case "cons": $view->showLines(config::get('map_con_showlines')); $view->showSysNames(config::get('map_con_shownames')); $view->paintSecurity(config::get('map_con_security')); $view->setOffset(25); checkColors('con', $view); break; } $view->generate(); die; }
$img_size = 250; } switch ($_GET['mode']) { case "ship": case "faction": case "activity": case "sys": $view = new MapView($_GET['mode'], $img_size); $view->setSystemID(intval($_GET['sys_id'])); $view->showLines(config::get('map_act_showlines')); $view->showSysNames(config::get('map_act_shownames')); $view->setOffset(25); $view->generate(); break; case "na": $view = new MapView($_GET['mode'], $img_size); $view->generateNA(); break; default: exit; } //------------------------------------------------------------------------- // Antialising functions // FROM: http://personal.3d-box.com/php/filledellipseaa.php //------------------------------------------------------------------------- // Parses a color value to an array. function color2rgb($color) { $rgb = array(); $rgb[] = 0xff & $color >> 16; $rgb[] = 0xff & $color >> 8;