User:WikiSysop
From DD-WRT Wiki
Revision as of 22:37, 19 October 2008 (edit) Maxhex (Talk | contribs) (test) ← Previous diff |
Revision as of 22:38, 19 October 2008 (edit) (undo) Maxhex (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
- | + | <? | |
- | < | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | require("../include.php"); | |
- | + | connect_db(); | |
- | + | ||
- | + | if ($action == "update") { | |
- | + | ||
- | + | $sql = "DELETE FROM banned WHERE BANID='1'"; | |
- | + | $query = mysql_db_query($database, $sql); | |
- | + | $sql = "INSERT INTO banned (IP, email) VALUES ('$IP','$email')"; | |
- | + | $query = mysql_db_query($database, $sql); | |
- | + | ||
- | + | echo "Ban List Updated!"; | |
- | + | ||
- | + | } else { | |
- | + | ||
- | + | $sql = "SELECT status FROM members WHERE username='$username'"; | |
- | + | $member_query = mysql_db_query($database, $sql) or die(geterrdesc($sql)); | |
- | + | $memberinfo = mysql_fetch_array($member_query); | |
- | + | $status = $memberinfo[status]; | |
- | + | ||
- | + | if ($username == "") { | |
- | + | ?> | |
- | + | <form name="form" action="../login.php" METHOD=POST> | |
- | + | <font face="$face" size="$medium">Username: | |
- | + | <input type="text" name="UserName" size="15"><BR> | |
- | + | Password: | |
- | + | <input type="password" name="Password" size="15"><BR> | |
- | + | <input type="hidden" name="admin"> | |
- | + | <input type="submit" name="Submit" value="Submit"> | |
- | + | </font><BR> | |
- | + | </form> | |
- | + | <? | |
- | + | } | |
- | + | else if($status == "Administrator") { | |
- | + | ||
- | + | ||
- | + | $sql = "SELECT * FROM banned"; | |
- | + | $query = mysql_db_query($database, $sql); | |
- | + | $ban = mysql_fetch_array($query); | |
- | + | ||
- | + | $email = $ban[email]; | |
- | + | $IP = $ban[IP]; | |
- | + | ||
- | + | $newline = template("ban_form.html"); | |
- | + | eval("echo stripslashes(\"$newline\");"); | |
- | + | ||
- | + | } | |
- | + | } | |
- | + | exit; | |
- | + | ||
- | + | ?> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + |
Revision as of 22:38, 19 October 2008
<?
require("../include.php"); connect_db();
if ($action == "update") {
$sql = "DELETE FROM banned WHERE BANID='1'"; $query = mysql_db_query($database, $sql); $sql = "INSERT INTO banned (IP, email) VALUES ('$IP','$email')"; $query = mysql_db_query($database, $sql);
echo "Ban List Updated!";
} else {
$sql = "SELECT status FROM members WHERE username='$username'"; $member_query = mysql_db_query($database, $sql) or die(geterrdesc($sql)); $memberinfo = mysql_fetch_array($member_query); $status = $memberinfo[status];
if ($username == "") {
?>
<form name="form" action="../login.php" METHOD=POST>
Username:
<input type="text" name="UserName" size="15">
Password:
<input type="password" name="Password" size="15">
<input type="hidden" name="admin">
<input type="submit" name="Submit" value="Submit">
</form>
<?
}
else if($status == "Administrator") {
$sql = "SELECT * FROM banned";
$query = mysql_db_query($database, $sql);
$ban = mysql_fetch_array($query);
$email = $ban[email]; $IP = $ban[IP];
$newline = template("ban_form.html"); eval("echo stripslashes(\"$newline\");");
} } exit;
?>