]>
git.datanom.net - qtadmin.git/blob - auth.php
2 /* vim: set ts=4 tw=0 sw=4 noet: */
3 require_once 'config.php';
4 require_once $CFG->root
. 'lib/utils.inc.php';
6 $auth_url = $_SERVER['PHP_SELF'] . '?op=login';
7 $login = $_SERVER['PHP_SELF'];
12 <meta charset="UTF-8">
14 <link rel="stylesheet" href="css/auth.css">
17 <div class="container">
21 <form action="$auth_url" method="post">
22 <input type="email" name="user" required value="Email" onBlur="if(this.value=='')this.value='Email'" onFocus="if(this.value=='Email')this.value='' "/>
23 <input type="password" name="password" required value="Password" onBlur="if(this.value=='')this.value='Password'" onFocus="if(this.value=='Password')this.value='' "/>
24 <input type="submit" value="Login"/>
25 <!-- <footer class="clearfix">
26 <p><span class="info">?</span><a href="#">Forgot Password</a></p>
30 </div> <!-- end login-form -->
31 <p class="footer">Powered by <a href="https://qtadmin.datanom.net">
32 QtAdmin</a>. © 2015 by Michael Rasmussen</p>
42 <meta charset="UTF-8">
44 <link rel="stylesheet" href="css/auth.css">
47 <div class="container">
51 <p><span class="error">__ERROR__<span></p>
52 <p><a href="$login">Login</a></p>
54 </div> <!-- end login-form -->
55 <p class="footer">Powered by <a href="https://qtadmin.datanom.net">
56 QtAdmin</a>. © 2015 by Michael Rasmussen</p>
63 if (isset($_GET['op']))
64 $action = $_GET['op'];
68 if ($action == 'logout') {
72 } else if ($action == 'login') {
74 $user = $_POST['user'];
75 $password = $_POST['password'];
76 if ($util->login($user, $password)) {
77 header('Location: index.php');
79 $error = $util->getLoginStatus();
80 $error = str_replace('__ERROR__', $error, $login_error);
This page took 0.118421 seconds and 6 git commands to generate.