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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
<?php include_once("common.php"); if (isset($_SESSION['member']['cid'])) { header("Location: order_history.php"); exit; }
$userName = isset($_POST['username']) ? $_POST['username'] : ""; $isPostBack = isset($_POST['username'], $_POST['password']); if ($isPostBack) { $password = md5($_POST['password']); require_once("../webadmin/configure.php"); $sql_userName = mysql_real_escape_string($userName); $sql_password = mysql_real_escape_string($password); $sql = "SELECT * FROM clients WHERE clogin = '$sql_userName' AND cpw = '$sql_password' AND cstatus = '1'"; if ($result = mysql_query($sql)) { if ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $_SESSION['member'] = $row; header("Location: order_history.php"); 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" /> <title>Glorious Company</title> <link rel=stylesheet type="text/css" href="css/style.css"> </head> <body> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <!-- Header --> <tr> <td height="73"><table width="930" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="220"><a href="../" /><img src="images/logo.png" width="263" height="80" border="0"/></a></td> <td align="right"> </td> </tr> </table></td> </tr> <tr> <td><table width="930" border="0" align="center" cellspacing="0" cellpadding="0"> <tr> <td align="right"><img src="images/menu_login.png" width="200" height="35" border="0" /></td> </tr> </table></td> </tr> <tr> <td height="5" class="headerline"></td> </tr> <!-- End Header --> <tr> <td height="450" align="center" valign="middle"> <?php if ($isPostBack) { ?> <div style="height: 30px; color: red">Login name or password incorrect.</div> <?php } ?> <form action="login.php" method="post"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="80" align="left" class="login">Login Name </td> <td colspan="2" align="left"><input type="text" name="username" value="<?=$userName?>" class="logininput" style="width:300px;" /></td> </tr> <tr> <td height="30" align="left" class="login">Password </td> <td colspan="2" align="left"><input type="password" name="password" class="logininput" style="width:300px;" /></td> </tr> <tr> <td align="left"> </td> <td align="left" class="login"><a href="#" style="display:none">Forgot Password?</a></td> <td align="right"><input type="submit" name="submit" value="" style="background-image: url(images/btn_login.png); background-color: transparent; width: 60px; height: 20px; border: 0px" /></td> </tr> </table> </form> </td> </tr> <!-- Footer --> <tr> <td class="footer">COPYRIGHT © 2012 GLORIOUS COMPANY. ALL RIGHTS RESERVED</td> </tr> </table> </body> </html>
|