Junior Spellweaver
- Joined
- Jul 2, 2008
- Messages
- 109
- Reaction score
- 1
Hi this is a ban appeal PHP i made.
Credits goes to me and a person that made the GM applications. (changed everything to make a ban appeal)
Tested and working on KakaCMSv3 (not sure about other CMS)
First edit your navigation.php and add in this under the last page.
Then start copying the code below and paste it to a notepad and save it to the right folder.
C:\wamp\www\banappeal.php
C:\wamp\www\banappeal_do.php
C:\wamp\www\page\banappeal.php
C:\wamp\www\page\banappeal_do.php
Thanks to Antv912
Make a new script and Execute this into your schema
Have fun ^^ unbanning people!
Credits goes to me and a person that made the GM applications. (changed everything to make a ban appeal)
Tested and working on KakaCMSv3 (not sure about other CMS)
First edit your navigation.php and add in this under the last page.
Code:
<li><a href="banappeal.php" >Ban Appeal</a><li>
Then start copying the code below and paste it to a notepad and save it to the right folder.
C:\wamp\www\banappeal.php
PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php require ("./inc/info.inc.php"); ?>
<title>TardMS</title>
<link rel=stylesheet href="style.css" type="text/css">
<body class="thrColFixHdr">
<br />
<br />
<br />
<div id="container">
<?php include ("header.php"); ?>
<?php include ("navigation.php"); ?>
<?php include ("status.php"); ?>
<center>
<table cellspacing=1 cellpadding=5>
<tr><td class=listtitle colspan=2><center><b>Ban Appeal</b></center></td></tr>
<form action="banappeal_do.php" method="POST">
<tr><td class=list align=right>Character Name:</td><td class=list><input type=text name=charactername maxlength="30"></td></tr>
<tr><td class=list align=right>Reason:</td><td class=list><input type=text name=reason maxlength="200"></td></tr>
<tr><td class=list align=right>Account Name:</td><td class=list><input type=text name=accountname maxlength="30"></td></tr>
<tr><td class=list align=right>Email</td><td class=list><input type=text name=email maxlength="50"></td></tr>
<tr><td class=list align=right>AutoBan or Ban by Who</td><td class=list><input type=text name=autobanorbanbywho maxlength="50"></td></tr>
<tr><td class=listtitle align=right colspan=2><center><input type=submit name=submit value='Register Appeal'</td></tr></center>
</form>
</table>
<br>
<!-- do not remove-->
<br class="clearfloat" />
<?php include ("footer.php"); ?>
</div>
<!-- end #container -->
<Br />
<br />
<Br />
</body>
</html>
C:\wamp\www\banappeal_do.php
PHP:
<?php
/* Store user details */
$charactername = $_POST['charactername'];
$reason = $_POST['reason'];
$accountname = $_POST['accountname'];
$email = $_POST['email'];
$autobanorbanbywho = $_POST['autobanorbanbywho'];
include('./config2.php');
$sel = 'SELECT * FROM accounts WHERE name="'.$_POST['name'].'"';
if($charactername == ""){
echo 'No name filled in.';
exit();
}elseif($reason == ""){
echo '<link rel=stylesheet href="style.css" type="text/css"><center>No reason filled in.</center>';
exit();
}else{
$d = 'INSERT INTO banapp (charactername, reason, accountname, email, autobanorbanbywho) VALUES ("'.$charactername.'", "'.$reason.'", "'.$accountname.'", "'.$email.'", "'.$autobanorbanbywho.'")';
mysql_query($d) OR die (mysql_error());
echo '<link rel=stylesheet href="style.css" type="text/css"><center>Your ban appeal has been created, wait for a reply!</center>';
}
?>
C:\wamp\www\page\banappeal.php
PHP:
<html>
<head>
<title>Make a Ban Appeal</title>
</head>
<center>
<table cellspacing=1 cellpadding=5>
<tr><td class=listtitle colspan=2><center><span class='title2'><?=$config['server_name'];?> application</span></center></td></tr>
<form action="banappeal_do.php" method="POST">
<tr><td class=list align=right>Character Name:</td><td class=list><input type=text name=charactername maxlength="30"></td></tr>
<tr><td class=list align=right>Reason:</td><td class=list><input type=text name=reason maxlength="200"></td></tr>
<tr><td class=list align=right>Account Name:</td><td class=list><input type=text name=accountname maxlength="30"></td></tr>
<tr><td class=list align=right>Email:</td><td class=list><input type=text name=email maxlength="30"></td></tr>
<tr><td class=list align=right>AutoBan or Ban by Who:</td><td class=list><input type=text name=autobanorbanbywho maxlength="30"></td></tr>
<tr><td class=listtitle align=right colspan=2><center><input type=submit name=submit value='Register Appeal'</td></tr></center>
</form>
</table>
<br>
C:\wamp\www\page\banappeal_do.php
PHP:
<?php
/* Store user details */
$charactername = mysql_real_escape_string()$_POST['charactername'];
$reason = mysql_real_escape_string()$_POST['reason'];
$accountname = mysql_real_escape_string()$_POST['accountname'];
$email = mysql_real_escape_string()$_POST['email'];
$autobanorbanbywho = mysql_real_escape_string()$_POST['autobanorbanbywho'];
include('./config2.php');
$sel = 'SELECT * FROM accounts WHERE name="'.$_POST['name'].'"';
if($charactername == ""){
echo 'No name filled in.';
exit();
}elseif($reason == ""){
echo '<style>*{
FONT-SIZE: 10pt;
FONT-FAMILY: arial;
COLOR: #ffffff;}</style><center>No reason filled in.</center>';
exit();
}else{
Make a new script and Execute this into your schema
Code:
DROP TABLE IF EXISTS `banapp`;
CREATE TABLE `banapp` (
`charactername` varchar(100) NOT NULL default '0',
`reason` varchar(100) NOT NULL default '0',
`accountname` varchar(100) NOT NULL default '0',
`email` varchar(100) NOT NULL default '0',
`autobanorbanbywho` tinytext NOT NULL
)
Have fun ^^ unbanning people!
Last edited: