Changeset 56 for Dev/trunk/mainmenu.php
- Timestamp:
- 07/26/11 17:19:26 (14 years ago)
- 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 2 require 'classes/master.php'; //should be at top of every page 2 3 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 } 4 if (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 } 20 18 } 21 19 … … 43 41 <body> 44 42 <div id="header"> 45 46 47 43 <?php new Logo(); ?> 44 </div> 45 48 46 <div id="wrapper"> 49 47 50 48 <div id="content"> 51 49 <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); 55 55 ?> 56 56 </div>
Note: See TracChangeset
for help on using the changeset viewer.