Merge branch 'deploy' of git.gotenzing.com:tenzing/banners-with-skip into deploy
Showing
3 changed files
with
51 additions
and
14 deletions
| 1 | <?php | 1 | <?php |
| 2 | session_start(); | ||
| 2 | 3 | ||
| 4 | $userinfo = array( | ||
| 5 | 'admin'=>'tenzing01pass' | ||
| 3 | 6 | ||
| 7 | ); | ||
| 4 | 8 | ||
| 5 | if (!isset($_SESSION['token'])){ | 9 | if(isset($_GET['logout'])) { |
| 10 | $_SESSION['username'] = ''; | ||
| 11 | header('Location: ' . $_SERVER['PHP_SELF']); | ||
| 12 | } | ||
| 6 | 13 | ||
| 7 | echo '<form> | 14 | if(isset($_POST['username'])) { |
| 8 | <dl class="TzMenu"><a style="font-size: 25px; color: #fff !important;" href="./login.php" target="_parent">Login</a></dl></form>'; | 15 | if($userinfo[$_POST['username']] == $_POST['password']) { |
| 9 | }else{ | 16 | $_SESSION['username'] = $_POST['username']; |
| 10 | include('loggedin.php'); | 17 | include('loggedin.php'); |
| 11 | return; | 18 | return; |
| 19 | }else { | ||
| 20 | //Invalid Login | ||
| 21 | } | ||
| 12 | 22 | ||
| 13 | 23 | ||
| 14 | }; | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 24 | |||
| 25 | } | ||
| 26 | ?> | ||
| 27 | |||
| 28 | <form method="post"> | ||
| 29 | <dl class="TzMenu"> | ||
| 30 | <dt><label for="username">Username:</label></dt> | ||
| 31 | <dd><input type="text" name="username" id="username" /></dd> | ||
| 32 | </dl> | ||
| 33 | |||
| 34 | <dl class="TzMenu"> | ||
| 35 | <dt><label for="password">Password:</label></dt> | ||
| 36 | <dd><input type="password" name="password" id="password" /></dd> | ||
| 37 | </dl> | ||
| 38 | |||
| 39 | <dl class="TzMenu"> | ||
| 40 | <dt><input type="submit" value=" Log In " /></dt> | ||
| 41 | </dl> | ||
| 42 | </form> | ||
| 43 | |||
| 44 | <script type="text/javascript"> | ||
| 45 | addEvent(window, 'load', function() { | ||
| 46 | document.getElementById('username').select(); | ||
| 47 | }); | ||
| 48 | </script> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -55,13 +55,13 @@ | ... | @@ -55,13 +55,13 @@ |
| 55 | 55 | ||
| 56 | <?php | 56 | <?php |
| 57 | 57 | ||
| 58 | include('includes/loggedin.php'); | ||
| 59 | 58 | ||
| 60 | //if (isset($_SESSION['username'])) { | 59 | |
| 61 | // include('includes/loggedin.php'); | 60 | if (isset($_SESSION['username'])) { |
| 62 | //} else { | 61 | include('includes/loggedin.php'); |
| 63 | // include('includes/auth.php'); | 62 | } else { |
| 64 | //} | 63 | include('includes/auth.php'); |
| 64 | } | ||
| 65 | ?> | 65 | ?> |
| 66 | 66 | ||
| 67 | <div id="TzLogo"> | 67 | <div id="TzLogo"> | ... | ... |
-
Please register or sign in to post a comment