ajax_login.php
1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* access control login form
* @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)
* @link www.phpletter.com
* @since 22/April/2007
*
*/
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
if(isset($_POST['username']))
{
if($auth->login())
{
header('Location: ' . appendQueryString(CONFIG_URL_HOME, makeQueryString()));
exit;
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="theme/<?php echo CONFIG_THEME_NAME; ?>/css/login.css" rel="stylesheet" />
<title><?php echo LOGIN_PAGE_TITLE; ?></title>
</head>
<body>
<div id="container">
<div id="content">
<form name="frmLogin" method="post" action="">
<table class="adminLoginTable" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th colspan="2"><?php echo LOGIN_FORM_TITLE; ?></th>
</tr>
</thead>
<tbody>
<tr>
<th class="padTop"><label><?php echo LOGIN_USERNAME; ?> </label></th>
<td class="padTop"><input type="text" value="" class="input" name="username" id="username" /></td>
</tr>
<tr>
<th><label><?php echo LOGIN_PASSWORD; ?> </label></th>
<td><input type="password" value="" class="input" name="password" id="password" /></td>
</tr>
</tbody>
<tfoot>
<tr>
<td> </td>
<td><input type="submit" class="button" value="Login" /></td>
</tr>
</tfoot>
</table>
</form>
</div>
</div>
</body>
</html>