public static function run() { if (CookieController::cookieExists("session")) { if (($user = CookieController::readSessionCookie()) === false) { header("Location: home"); } else { $maps = MapDatabase::getAllUserMaps($user->getID()); MyTripsView::show($maps); } } else { header("Location: home"); } }
public static function show($maps) { $links = array("New Trip" => "new-trip", "View my Profile" => "view-profile", "Log Out" => "log-out"); ###(HTML) ?> <!DOCTYPE html> <html> <?php MasterView::insertHead("/sm_lab5/css/Dashboard.css", ""); ?> <body> <?php MasterView::insertNav($links); MyTripsView::insertContent($maps); MasterView::insertFooter(null); ?> </body> </html> <?php ###(ENDHTML) }