Ignore:
Timestamp:
01/13/12 18:11:16 (13 years ago)
Author:
fpvanagthoven
Message:

getObject.php is de nieuwe pagina die gewoon PHP objecten in JSON zet en echoet. Nu werkt alleen de questionEditor er op, uiteindelijk zou dit ook de infopanel en de sequencer moeten gaan serven.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/jos-branch/index.php

    r233 r235  
    66 *   
    77 */
    8 
    9 
    10 if (isset($_SESSION['userUid'])) {
    11     redirect("logout.php");
    12 }
    138
    149$errorMessage[] = "";
     
    2015            if (strlen($_POST['password']) > 6) {
    2116                $user = new User(null, $_POST['username'], $_POST['password']);
    22                                 $user->save();
     17                $user->save();
    2318                $_SESSION['userUid'] = $user->uid;
    2419            } else {
     
    3732    if (isset($user_results[0])) {
    3833        if ($user_results[0]->password == $_POST['password']) {
     34           
    3935            $_SESSION['userUid'] = $user_results[0]->uid;
     36            var_dump($user_results[0]);
    4037        } else {
    4138            $errorMessage[] = "Incorrect password!";
     
    4744
    4845if (isset($_SESSION['userUid'])) {  // User just registered a new account
    49     redirect('selectSession.php');
     46    redirect('mainmenu.php');
    5047}
    5148?>
     
    5653        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    5754        <title>Facilitator</title>
    58         <?php new StyleSheet("awesome"); ?>
     55        <?php new StyleSheet("visualeditors"); ?>
    5956        <script type="text/javascript" src="js/menu.js"></script>
    6057        <script type="text/javascript">
     
    7269
    7370            <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
    9394                </div>
    9495            </div>
Note: See TracChangeset for help on using the changeset viewer.