Hello guys! This is my first release so respect
I made a php based page which allows you to change the ban status of an account. If you use it please keep the "made by Heliodoros" text
Ok here's the code:
Code:
<html>
<head>
<title>Baner/Unbaner</title>
<style type="text/css">
body {
background : #000000 url;
margin-left : auto;
margin-right : auto;
}
.container {
margin-left : auto;
margin-right : auto;
padding-top : 200px;
width : 20%;
text-align : center;
}
.login {
color : #FFF;
background : #000000;
border : 1px solid #FFF;
float : left;
width : 230px;
height : 100px;
padding : 50px;
}
tr, td {
color : #FFF;
}
</style>
</head>
<body>
<div class="container">
<div class="login">
<?php
if(isset($_POST['submit']))
{
$account = $_POST['account'];
$bannedOld = $_POST['bannedOld'];
$bannedNew = $_POST['bannedNew'];
$bannedNew1 = $_POST['bannedNew1'];
$aHost = "localhost";
$aDatabase = "ascent";
$aPort = "3306";
$aUsername = "root";
$aPass = "root";
$con = mysql_connect($aHost.":".$aPort, $aUsername, $aPass) or die(mysql_error());
mysql_select_db($aDatabase) or die(mysql_error());
$account = mysql_real_escape_string($account);
$bannedOld = mysql_real_escape_string($bannedOld);
$bannedNew = mysql_real_escape_string($bannedNew);
$bannedNew1 = mysql_real_escape_string($bannedNew1);
$query = "SELECT acct FROM accounts WHERE login = '".$account."' AND banned = '".$bannedOld."'";
$result = mysql_query($query) or die(mysql_error());
$numrows = mysql_num_rows($result);
echo "<tr><td align=center>";
if($bannedNew != $bannedNew1)
{
die("You must put the same banned string in each field");
}
if($numrows == 0)
{
die("Invalid Info!");
}
$query = "UPDATE accounts SET banned = '".$bannedNew."' WHERE login = '".$account."'";
$result = mysql_query($query) or die(mysql_error());
echo "Baned status for account '".$account."' successfully changed!";
echo "</td></tr>";
//close mysql connection
mysql_close();
}
else
{
echo "<form name=myform method=post action='./doBan.php'>";
//echo "<tr><td colspan=2><hr></td></tr>";
echo "<tr><td colspan=2 align=center><font size=4>Change Account Ban Status<br><br></td></tr>";
//echo "<tr><td colspan=2><hr></td></tr>";
echo "<tr><td width=125><br>Account Name: </td><td><input type=text name=account value=''></td></tr>";
echo "<tr><td width=125><br>Banned status: </td><td><input type=text name=bannedOld value=''></td></tr>";
echo "<tr><td width=125><br>New Banned Status: </td><td><input type=text name=bannedNew value=''></td></tr>";
echo "<tr><td width=125><br>Re-Enter: </td><td><input type=text name=bannedNew1 value=''></td></tr>";
echo "<tr><td colspan=2 align=center><br><input type=submit name=submit value=Submit></td></tr>";
echo "</form>";
}
echo "</table>";
echo "<br />";
echo "Script made by Heliodoros <3 :)";
echo "<br><br><br>Select 1 for banned and 0 for able to play";
echo "<br />";
?>
</body>
</html>For newbies: copy this text and save it in a file named ban.php and then
open it with your http server (i use Apache)
EDIT: Here is a screenshot hxxp://i212.photobucket.com/albums/cc239/Heliodoros/baner.jpg
also lil fy i didn't make this >.< just posting here cause it's nice