diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2009-02-22 13:15:37 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2009-02-22 13:15:37 -0500 |
commit | eee98526c48b9154cd9e9bc8bc3e07769e6a39ea (patch) | |
tree | 9d8d719a2ccea91de86435ccd985241ddb3fa0cb /admin/login.php | |
parent | 653c7b3a488488d4b161a8fae41ada5851bf7685 (diff) | |
download | pillowcase-eee98526c48b9154cd9e9bc8bc3e07769e6a39ea.tar.gz pillowcase-eee98526c48b9154cd9e9bc8bc3e07769e6a39ea.tar.bz2 pillowcase-eee98526c48b9154cd9e9bc8bc3e07769e6a39ea.zip |
Rewrote Pillowcase
NOTE: There is a new database schema now, so the database from the testing server has to be copied over to the production server, otherwise this code will fail.
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 | ?> | ||