- <head>
- <meta charset="UTF-8">
- <title>Login</title>
- <link rel="stylesheet" href="css/auth.css">
- </head>
- <body>
- <div class="container">
- <div id="login-form">
- <h3>Login</h3>
- <fieldset>
- <form action="$auth_url" method="post">
- <input type="email" name="user" required value="Email" onBlur="if(this.value=='')this.value='Email'" onFocus="if(this.value=='Email')this.value='' "/>
- <input type="password" name="password" required value="Password" onBlur="if(this.value=='')this.value='Password'" onFocus="if(this.value=='Password')this.value='' "/>
- <input type="submit" value="Login"/>
-<!-- <footer class="clearfix">
- <p><span class="info">?</span><a href="#">Forgot Password</a></p>
- </footer>-->
- </form>
- </fieldset>
- </div> <!-- end login-form -->
- <p class="footer">Powered by <a href="https://qtadmin.datanom.net">
- QtAdmin</a>. © 2015 by Michael Rasmussen</p>
- </div>
- </body>
+ <head>
+ <meta charset="UTF-8">
+ <title>Login</title>
+ <link rel="stylesheet" href="css/auth.css">
+ </head>
+ <body>
+ <div class="container">
+ <div id="login-form">
+ <h3>Login</h3>
+ <fieldset>
+ <form action="$auth_url" method="post">
+ <input type="email" name="user" required value="Email" onBlur="if(this.value=='')this.value='Email'" onFocus="if(this.value=='Email')this.value='' "/>
+ <input type="password" name="password" required value="Password" onBlur="if(this.value=='')this.value='Password'" onFocus="if(this.value=='Password')this.value='' "/>
+ <input type="submit" value="Login"/>
+<!-- <footer class="clearfix">
+ <p><span class="info">?</span><a href="#">Forgot Password</a></p>
+ </footer>-->
+ </form>
+ </fieldset>
+ </div> <!-- end login-form -->
+ <p class="footer">Powered by <a href="https://qtadmin.datanom.net">
+ QtAdmin</a>. © 2015 by Michael Rasmussen</p>
+ </div>
+ </body>
- if ($action == 'logout') {
- // logout
- $util->logout();
- echo $login_form;
- } else if ($action == 'login') {
- // login
- $user = $_POST['user'];
- $password = $_POST['password'];
- if ($util->login($user, $password)) {
- header('Location: index.php');
- } else {
- $error = $util->getLoginStatus();
- $error = str_replace('__ERROR__', $error, $login_error);
- echo $error;
- }
- } else {
- echo $login_form;
- }
+ if ($action == 'logout') {
+ // logout
+ $util->logout();
+ echo $login_form;
+ } else if ($action == 'login') {
+ // login
+ $user = $_POST['user'];
+ $password = $_POST['password'];
+ if ($util->login($user, $password)) {
+ header('Location: index.php');
+ } else {
+ $error = $util->getLoginStatus();
+ $error = str_replace('__ERROR__', $error, $login_error);
+ echo $error;
+ }
+ } else {
+ echo $login_form;
+ }