$userID = 0; if (isset($_COOKIE['userID'])) { $userID = $_COOKIE['userID']; } else { header("Location: /tick/login.html"); } $ID = 0; $zoom = "4"; $map_type = "G_NORMAL_MAP"; $center_lat = "39.2"; $center_lon = "-96.1419"; $current_lat = ""; $current_lon = ""; $route = ""; $stageID = 0; if (isset($_COOKIE['stageID'])) { $stageID = $_COOKIE['stageID']; } else { header("Location: /tick/stages.php"); } $query = "SELECT events.name as event_name, stages.* FROM events, stages WHERE events.ID = stages.eventID AND stages.ID = $stageID AND events.userID = $userID"; $result = mysql_query($query, $db); if ($result) { while ($r = mysql_fetch_array($result)) { $event_name = $r['event_name']; $name = $r['name']; } } mysql_free_result($result); $query = "SELECT * FROM maps WHERE stageID = $stageID"; $result = mysql_query($query, $db); if ($result) { while ($r = mysql_fetch_array($result)) { $ID = $r['ID']; $zoom = $r['zoom']; $center_lat = $r['center_lat']; $center_lon = $r['center_lon']; $current_lat = $r['current_lat']; $current_lon = $r['current_lon']; $map_type = $r['map_type']; } } mysql_free_result($result); ?>