コード例 #1
0
 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");
     }
 }
コード例 #2
0
    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)
    }