コード例 #1
0
ファイル: view.php プロジェクト: AvenZrk/nhlakes_unhm
    public function loginView($errors = null)
    {
        $loginBox = <<<EOT
            <link rel="stylesheet" type="text/css" href="../css/mainLayout.css" />

            <form action="index.php" method="post">
            <p>User Name: <input type="text" name="email" size="20" maxlength="60" /> </p>
            <p>Password: <input type="password" name="password" size="20" maxlength="20" /></p>
            <p><input type="submit" name="submit" value="Login" /></p>
            </form>
EOT;
        $welcome = new pageTemplate();
        $welcome->header("Welcome");
        $welcome->siteBody("Login");
        if (isset($errors) && !empty($errors)) {
            $err = '<h1>Error!</h1>
                <p class="error">The following error(s) occurred:<br />';
            echo $err;
            foreach ($errors as $msg) {
                echo " - {$msg}<br />\n";
            }
            echo '</p>Please try again.</p>';
        }
        echo $loginBox;
        $welcome->footer();
    }
コード例 #2
0
 public function showHomePage()
 {
     $newLayout = new pageTemplate();
     $newLayout->header("Boater Survey");
     $newLayout->siteBody("Boater Survey");
     $loadHome = new surveyView();
     $loadHome->newSurvey();
     $newLayout->footer();
 }