public static function show($user)
 {
     MasterView::showHeader(null);
     MasterView::showNav();
     SignUpView::showContent($user);
     MasterView::showFooter(null);
 }
 public static function run()
 {
     if ($_SERVER["REQUEST_METHOD"] == "POST") {
         $user = new User($_POST, False);
         if ($user->getErrorCount() == 0) {
             LogController::run("In");
         } else {
             SignUpView::show($user);
         }
     } else {
         SignUpView::show(null);
     }
 }
 public static function run()
 {
     if ($_SERVER["REQUEST_METHOD"] == "POST") {
         $user = new User($_POST);
         if ($user->hasErrors()) {
             SignUpView::show($user);
         } else {
             if (UserDatabase::createUser($user)) {
                 echo "Account Created :)<br/>";
                 header("Location: home");
             } else {
                 $user->setError("database", "CREATE_ACCOUNT_FAILED");
                 SignUpView::show($user);
             }
         }
     } else {
         SignUpView::show(null);
     }
 }
    public static function show($user)
    {
        ###(HTML)
        ?>
		<!DOCTYPE html>
		<html>
			<?php 
        MasterView::insertHead("/sm_project/css/Form.css", "");
        ?>
			<body>
				<?php 
        MasterView::insertNav(null);
        SignUpView::insertContent($user);
        MasterView::insertFooter(null);
        ?>
			</body>
		</html>
		<?php 
        ###(ENDHTML)
    }
<!DOCTYPE html>
<html>
	<head>
		<title>SignUpView Tests</title>
	</head>
	<body>
		<h1>SignUpView Tests</h1>
		<h3>Should call SignUpView::show()</h3>
		<hr/>
		<?php 
include_once "../includer.php";
SignUpView::show(null);
?>
	</body>
</html>
示例#6
0
     ProductsView::show();
     MasterView::showFooter();
     break;
 case "specials":
     MasterView::showHeader();
     SpecialsView::show();
     MasterView::showFooter();
     break;
 case "myaccount":
     MasterView::showHeader();
     AccountView::show();
     MasterView::showFooter();
     break;
 case "signup":
     MasterView::showHeader();
     SignUpView::show();
     MasterView::showFooter();
     break;
 case "placeOrder":
     MasterView::showHeader();
     placeOrderView::show();
     MasterView::showFooter();
     break;
 case "confirmOrder":
     MasterView::showHeader();
     confirmOrderView::show();
     MasterView::showFooter();
     break;
 case "contact":
     MasterView::showHeader();
     ContactView::show();