<? $title = "Warn"; include("header.php");
if ($stat[rank] == Member) {
print"You are not a mod/admin";
exit;
}
print"
<center>
<b>Ban/Warn users dont put users warn % above 100% unless needed, If set to 100% use reason.</b><br>
<form method=post action=?action=warn>
User ID:<input type=text name=id>
Warn %:<input type=text name=ban>
Reason:<input type=text name=reas>
<input type=submit value=Submit></center>
</form>";
if ($action == warn) {
$hi = mysql_fetch_array(mysql_query("select * from users where id='$id'"));
$checke = mysql_num_rows(mysql_query("select * from users where id='$hi[id]'"));
if ($checke <= 0) {
print "No such player.";
include("footer.php");
exit;
}
if ($ban > 100) {
print"You cannot go over 100%";
exit;
include("footer.php");
}
if ($hi[rank] == Admin) {
print"You cannot ban a admin";
exit;
}
if ($stat[rank] == Moderator) {
if ($hi[rank] == Moderator) {
print"You cannot ban a moderator";
exit;
}
}
mysql_query("insert into mail (sender, senderid, owner, subject, body) values('DK','0','$hi[id]','Warning','You have been warned your warning level is now $ban%')") or die("Could submit.");
mysql_query("update users set ban='$ban' where id='$hi[id]'");
print"You've set $hi[name] warning % at $ban%";
exit;
}
For some reason thats not working, can someone find me error code there , i would appreciate it . Thanks
if ($stat[rank] == Member) {
print"You are not a mod/admin";
exit;
}
print"
<center>
<b>Ban/Warn users dont put users warn % above 100% unless needed, If set to 100% use reason.</b><br>
<form method=post action=?action=warn>
User ID:<input type=text name=id>
Warn %:<input type=text name=ban>
Reason:<input type=text name=reas>
<input type=submit value=Submit></center>
</form>";
if ($action == warn) {
$hi = mysql_fetch_array(mysql_query("select * from users where id='$id'"));
$checke = mysql_num_rows(mysql_query("select * from users where id='$hi[id]'"));
if ($checke <= 0) {
print "No such player.";
include("footer.php");
exit;
}
if ($ban > 100) {
print"You cannot go over 100%";
exit;
include("footer.php");
}
if ($hi[rank] == Admin) {
print"You cannot ban a admin";
exit;
}
if ($stat[rank] == Moderator) {
if ($hi[rank] == Moderator) {
print"You cannot ban a moderator";
exit;
}
}
mysql_query("insert into mail (sender, senderid, owner, subject, body) values('DK','0','$hi[id]','Warning','You have been warned your warning level is now $ban%')") or die("Could submit.");
mysql_query("update users set ban='$ban' where id='$hi[id]'");
print"You've set $hi[name] warning % at $ban%";
exit;
}
For some reason thats not working, can someone find me error code there , i would appreciate it . Thanks