diff options
Diffstat (limited to 'admin/login.php')
-rw-r--r-- | admin/login.php | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/admin/login.php b/admin/login.php deleted file mode 100644 index f938664..0000000 --- a/admin/login.php +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | if (!isset($_GET['submit'])) | ||
4 | { | ||
5 | |||
6 | ?> | ||
7 | <FORM ACTION="/admin/login.php?submit=" METHOD="POST"> | ||
8 | Username: <INPUT TYPE="text" NAME="user"><BR> | ||
9 | Password: <INPUT TYPE="password" NAME="pass"><BR> | ||
10 | <INPUT TYPE="submit"></FORM> | ||
11 | <?php | ||
12 | |||
13 | } else { | ||
14 | $getconfig = "SELECT * FROM config WHERE name = \"username\" OR name = \"password\" ORDER BY name DESC"; | ||
15 | $getconfig2 = mysql_query($getconfig) or die($getconfig); | ||
16 | $username = mysql_fetch_array($getconfig2); | ||
17 | $password = mysql_fetch_array($getconfig2); | ||
18 | |||
19 | if (($username['value'] == $_POST['user']) && ($password['value'] == md5($_POST['pass']))) | ||
20 | { | ||
21 | $_SESSION['username'] = $_POST['user']; | ||
22 | |||
23 | header('Location: /admin/'); | ||
24 | exit; | ||
25 | } else { | ||
26 | ?><H2>Incorrect login</H2><?php | ||
27 | } | ||
28 | } | ||
29 | |||
30 | ?> | ||