Changeset 235 for Dev/branches/jos-branch/index.php
- Timestamp:
- 01/13/12 18:11:16 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/jos-branch/index.php
r233 r235 6 6 * 7 7 */ 8 9 10 if (isset($_SESSION['userUid'])) {11 redirect("logout.php");12 }13 8 14 9 $errorMessage[] = ""; … … 20 15 if (strlen($_POST['password']) > 6) { 21 16 $user = new User(null, $_POST['username'], $_POST['password']); 22 17 $user->save(); 23 18 $_SESSION['userUid'] = $user->uid; 24 19 } else { … … 37 32 if (isset($user_results[0])) { 38 33 if ($user_results[0]->password == $_POST['password']) { 34 39 35 $_SESSION['userUid'] = $user_results[0]->uid; 36 var_dump($user_results[0]); 40 37 } else { 41 38 $errorMessage[] = "Incorrect password!"; … … 47 44 48 45 if (isset($_SESSION['userUid'])) { // User just registered a new account 49 redirect(' selectSession.php');46 redirect('mainmenu.php'); 50 47 } 51 48 ?> … … 56 53 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 57 54 <title>Facilitator</title> 58 <?php new StyleSheet(" awesome"); ?>55 <?php new StyleSheet("visualeditors"); ?> 59 56 <script type="text/javascript" src="js/menu.js"></script> 60 57 <script type="text/javascript"> … … 72 69 73 70 <div id="content"> 74 <div class="menu"> 75 <form action="index.php" method="POST"> 76 <h3>Username</h3> 77 <input type="text" name="username"><br /> 78 <h3>Password</h3> 79 <input type="password" name="password"><br/><br /> 80 <div id="errorDisplay"> 81 <?php 82 foreach ($errorMessage as $message) { 83 echo "<h3 style='color: #FF0000;'>$message</h3>"; 84 } 85 ?> 86 </div> 87 <br/> 88 <input type="submit" name="login" class="surveyButton bigSurveyButton" value="Log in"> 89 </form> 90 <form action="register.php" method="POST"> 91 <input type="submit" name="register" class="surveyButton bigSurveyButton" value="Register"> 92 </form> 71 <div class="largeFrame"> 72 <div class="largeTitle">Log in</div> 73 <div class="content"> 74 <form action="index.php" method="POST"> 75 <h3>Username</h3> 76 <input type="text" name="username"><br /> 77 <h3>Password</h3> 78 <input type="password" name="password"><br/><br /> 79 <div id="errorDisplay"> 80 <?php 81 foreach ($errorMessage as $message) { 82 echo "<h3 style='color: #FF0000;'>$message</h3>"; 83 } 84 ?> 85 </div> 86 <br/> 87 <input type="submit" name="login" class="bigButton vertical" value="Log in"> 88 </form> 89 <form action="register.php" method="POST"> 90 <input type="submit" name="register" class="bigButton vertical" value="Register" style="margin-bottom: 0.25em;"> 91 </form> 92 </div> 93 93 94 </div> 94 95 </div>
Note: See TracChangeset
for help on using the changeset viewer.