equal
deleted
inserted
replaced
99 if ( isset($_POST['do_login']) ) |
99 if ( isset($_POST['do_login']) ) |
100 { |
100 { |
101 if ( !$session->user_logged_in ) |
101 if ( !$session->user_logged_in ) |
102 { |
102 { |
103 $result = $session->login_without_crypto($_POST['username'], $_POST['password'], false, USER_LEVEL_MEMBER); |
103 $result = $session->login_without_crypto($_POST['username'], $_POST['password'], false, USER_LEVEL_MEMBER); |
|
104 echo '<b>Session manager returned error:</b>' . '<pre>' . print_r($result, true) . '</pre>'; |
|
105 exit(); |
104 } |
106 } |
105 $result = $session->login_without_crypto($_POST['username'], $_POST['password'], false, USER_LEVEL_ADMIN); |
107 $result = $session->login_without_crypto($_POST['username'], $_POST['password'], false, USER_LEVEL_ADMIN); |
106 if ( $result['success'] ) |
108 if ( $result['success'] ) |
107 { |
109 { |
108 header('HTTP/1.1 302 Some kind of redirect with implied no content'); |
110 header('HTTP/1.1 302 Some kind of redirect with implied no content'); |
119 |
121 |
120 echo '<form action="upgrade.php" method="post">'; |
122 echo '<form action="upgrade.php" method="post">'; |
121 |
123 |
122 if ( isset($result) ) |
124 if ( isset($result) ) |
123 { |
125 { |
124 echo '<b>Session manager returned error: ' . $result['error'] . '</b>'; |
126 echo '<b>Session manager returned error:</b>' . '<pre>' . print_r($result, true) . '</pre>'; |
125 } |
127 } |
126 |
128 |
127 ?> |
129 ?> |
128 <p>You need an active admin session to continue.</p> |
130 <p>You need <?php if ( !$session->user_logged_in ) echo 'to be logged in and have '; ?>an active admin session to continue.</p> |
129 <p> |
131 <p> |
130 Username: <input type="text" name="username" /><br /> |
132 Username: <input type="text" name="username" /><br /> |
131 Password: <input type="password" name="password" /><br /> |
133 Password: <input type="password" name="password" /><br /> |
132 <input type="submit" name="do_login" value="Log in" /> |
134 <input type="submit" name="do_login" value="Log in" /> |
133 </p> |
135 </p> |