Hi there guys , i was bored so i created a simple ban system :p
How it works? When user uses bugs or break rules you can simple ban him by pressing one little button that says Ban! [ If you have administration by Jessi :p ]
And if time goes then you just click on Unban!
So what to do? Go to your request.php and search case $ACT_LOGIN
Then find this:
Then below it type this
Then go to your phpmyadmin select your database and click on sql
Delete everything thats inside and type in this
And if you dont have administration by jessi then if you want to ban a player go to your database then go to user_data search the nickname of player search for banned and type in 1 to unban type 0
if you have administration by jessi go into ban.php and delete everything inside and type in this
Then create a file named unban.php and type in
And in user.php search this ( it is translated to my language)
And replace it with this
Hope you enjoy this!
How it works? When user uses bugs or break rules you can simple ban him by pressing one little button that says Ban! [ If you have administration by Jessi :p ]
And if time goes then you just click on Unban!
So what to do? Go to your request.php and search case $ACT_LOGIN
Then find this:
PHP Code:
// compare passwords, if wrong, throw wrong password exception & break
$db_pass = $db_data ['password'];
if ($pass != $db_pass) {
$ret = array (
$ERR_LOGIN_FAILED // $ERR_WRONG_PASSWORD
);
break;
}
PHP Code:
if ($db_data ['banned'] == 1) {
$ret = array (
$ERR_LOGIN_FAILED // Shows him at login screen that he have ban
);
break;
}
Delete everything thats inside and type in this
Code:
ALTER TABLE user_data ADD banned VARCHAR (60)
if you have administration by jessi go into ban.php and delete everything inside and type in this
PHP Code:
<?php
// Simple AdminUI
// Author: Jessi 4 psfgame.de
// You are allowed to modify and/or redistribute any part of this
require_once("backend/main.php");
loggedinorreturn();
stdhead("ban");
dbconn();
if(isset($_POST["doit"]) && isset($_POST["sec"]) && isset($_POST["id"]))
{
if($_POST["sec"] == "yes")
{
$pid = $_POST["id"];
$sql = "UPDATE user_data SET banned = 1,ssid = 0 WHERE user_id = $pid";
$qry = mysql_query($sql);
echo "account banned..";
?>
<meta http-equiv="refresh" content="5; URL=index.php">
<?php
}
else
{
echo "wrong answer...";
?>
<meta http-equiv="refresh" content="6; URL=user.php?id=<?=$_POST["id"]?>">
<?php
}
}
else
{
?>
<form action="<?=$_SERVER["PHP_SELF"] ?>" method="post" enctype="multipart/form-data" target="_self">
<table cellpadding="4" cellspacing="1" border="0" style="width:100%" class="tableinborder">
<tr class="tabletitle" width="100%">
<td colspan="10" width="100%"><span class="normalfont"><center><b>Authentication</b></center></span></td>
</tr><tr><td width="100%" class="tablea"><center>
<table border="0" cellspacing="1" cellpadding="4" class="tableinborder">
<tr><td class=tableb align=left>Type in "yes":</td><td class=tablea align=left><input type="text" size="40" name="sec" /></td></tr>
<tr><td class=tablea colspan="2" align="center"><input type="submit" value="Ban!" class=btn></td></tr>
</table>
<input type="hidden" name="doit" value="yes" />
<input type="hidden" name="id" value="<?=$_GET["id"]?>" />
</form>
</center>
</td></tr></table>
<?php
}
stdfoot();
?>
PHP Code:
<?php
// Simple AdminUI
// Author: Jessi 4 psfgame.de
// You are allowed to modify and/or redistribute any part of this
require_once("backend/main.php");
loggedinorreturn();
stdhead("UnBan");
dbconn();
if(isset($_POST["doit"]) && isset($_POST["sec"]) && isset($_POST["id"]))
{
if($_POST["sec"] == "yes")
{
$pid = $_POST["id"];
$sql = "UPDATE user_data SET banned = 0 WHERE user_id = $pid";
$qry = mysql_query($sql);
echo "account unbanned...";
?>
<meta http-equiv="refresh" content="5; URL=index.php">
<?php
}
else
{
echo "wrong answer...";
?>
<meta http-equiv="refresh" content="6; URL=user.php?id=<?=$_POST["id"]?>">
<?php
}
}
else
{
?>
<form action="<?=$_SERVER["PHP_SELF"] ?>" method="post" enctype="multipart/form-data" target="_self">
<table cellpadding="4" cellspacing="1" border="0" style="width:100%" class="tableinborder">
<tr class="tabletitle" width="100%">
<td colspan="10" width="100%"><span class="normalfont"><center><b>Authentication</b></center></span></td>
</tr><tr><td width="100%" class="tablea"><center>
<table border="0" cellspacing="1" cellpadding="4" class="tableinborder">
<tr><td class=tableb align=left>Type in "yes":</td><td class=tablea align=left><input type="text" size="40" name="sec" /></td></tr>
<tr><td class=tablea colspan="2" align="center"><input type="submit" value="UnBan!" class=btn></td></tr>
</table>
<input type="hidden" name="doit" value="yes" />
<input type="hidden" name="id" value="<?=$_GET["id"]?>" />
</form>
</center>
</td></tr></table>
<?php
}
stdfoot();
?>
PHP Code:
<a href="pmspy.php?id=<?=$u["user_id"]?>">Zprávy od ostatních</a><br>
<a href="pmsend.php?to=<?=$u["user_id"]?>">Poslat zprávu - Momentalne nefunkcne</a><br>
PHP Code:
<a href="pmspy.php?id=<?=$u["user_id"]?>">Zprávy od ostatních</a><br>
<a href="pmsend.php?to=<?=$u["user_id"]?>">Poslat zprávu - Momentalne nefunkcne</a><br>
<a href="ban.php?id=<?=$u["user_id"]?>">Ban </a><br>
<a href="unban.php?id=<?=$u["user_id"]?>">Unban </a><br></td>