Changeset 56 for Dev/trunk/mainmenu.php


Ignore:
Timestamp:
07/26/11 17:19:26 (14 years ago)
Author:
fpvanagthoven
Message:

Stubs and some refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/mainmenu.php

    r50 r56  
    1 <?php require 'classes/master.php'; //should be at top of every page   
     1<?php
     2require 'classes/master.php'; //should be at top of every page   
    23
    3 if(isset($_POST['login']))
    4 {
    5         if($_POST['username'] == '')
    6                 die("Please log in!");
    7         else
    8         {
    9                 $userDBI = new UserDatabaseInterface();
    10                 $user_exists = $userDBI->checkUserName($_POST['username']);
    11                 if($user_exists)
    12                 {       
    13                         $correct_password = $userDBI->checkUserPassword($_POST);
    14                         if(!$correct_password)
    15                                 die("The password you entered is not correct!");
    16                 }       
    17                 else
    18                         die("Unknown user name");
    19         }       
     4if (isset($_POST['login'])) {
     5    if ($_POST['username'] == '')
     6        die("Please log in!");
     7    else {
     8        $userDBI = new UserDatabaseInterface();
     9        $user_exists = $userDBI->checkUserName($_POST['username']);
     10        if ($user_exists) {
     11            $correct_password = $userDBI->checkUserPassword($_POST);
     12            if (!$correct_password)
     13                die("The password you entered is not correct!");
     14        }
     15        else
     16            die("Unknown user name");
     17    }
    2018}
    2119
     
    4341    <body>
    4442        <div id="header">
    45                 <?php new Logo(); ?>
    46             </div>
    47        
     43            <?php new Logo(); ?>
     44        </div>
     45
    4846        <div id="wrapper">
    49            
     47
    5048            <div id="content">
    5149                <div id="menu">               
    52                     <?php
    53                     SurveyButton::newSurveyButton();
    54                     SurveyButton::loadSurveyButton($surveys);
     50                    <?php
     51                    Session::createSessionButton();
     52                    Application::createApplicationButton();
     53                    Survey::newSurveyButton();
     54                    Survey::loadSurveyButton($surveys);
    5555                    ?>
    5656                </div>
Note: See TracChangeset for help on using the changeset viewer.