[RELEASE]Ban Appeal PHP

Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Account Inactive Tardilicious is offline
    InactiveRank
    Jul 2008 Join Date
    Behind YouLocation
    206Posts

    [RELEASE]Ban Appeal PHP

    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.

    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 Code:
    <!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 Code:
    <?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 Code:
    <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 Code:
    <?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{
    Thanks to Antv912

    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 by Tardilicious; 12-08-08 at 01:18 AM.


  2.  
  3. #2
    Account Inactive timmy123 is offline
    InactiveRank
    Apr 2008 Join Date
    352Posts

    Re: [RELEASE]Ban Appeal PHP

    im confused what does this exactly do

  4. #3
    You've got my respect! Traitor is offline
    True MemberRank
    Apr 2008 Join Date
    Portland,OregonLocation
    959Posts

    Re: [RELEASE]Ban Appeal PHP

    You didn't sanitize your inputs. This could be used for SQL injection.

  5. #4
    Account Inactive Amandy is offline
    InactiveRank
    Feb 2007 Join Date
    Crapvile, USALocation
    779Posts

    Re: [RELEASE]Ban Appeal PHP

    You should add mysql_real_escape_string's If you want it more secure.

  6. #5
    Account Inactive Tardilicious is offline
    InactiveRank
    Jul 2008 Join Date
    Behind YouLocation
    206Posts

    Re: [RELEASE]Ban Appeal PHP

    Quote Originally Posted by timmy123 View Post
    im confused what does this exactly do
    Its an aplication for ban appeals. Like if someone got banned from your server and they didnt do anything bad, they should fill this out and from your SQL browser you will check it out if the person should be unbanned or not.

  7. #6
    Account Inactive enisrad is offline
    InactiveRank
    Aug 2005 Join Date
    CanadaLocation
    323Posts

    Re: [RELEASE]Ban Appeal PHP

    lol yup :P

  8. #7
    Account Inactive Tardilicious is offline
    InactiveRank
    Jul 2008 Join Date
    Behind YouLocation
    206Posts

    Re: [RELEASE]Ban Appeal PHP

    Quote Originally Posted by Antv912 View Post
    You should add mysql_real_escape_string's If you want it more secure.
    not good with scripting >.> as i wrote before i changed evrything inside the GM applications thing

    just wanted to have a ban appeal page =/

  9. #8
    Account Inactive Tardilicious is offline
    InactiveRank
    Jul 2008 Join Date
    Behind YouLocation
    206Posts

    Re: [RELEASE]Ban Appeal PHP

    Could someone sanitize it or something?

  10. #9
    Account Inactive Amandy is offline
    InactiveRank
    Feb 2007 Join Date
    Crapvile, USALocation
    779Posts

    Re: [RELEASE]Ban Appeal PHP

    Quote Originally Posted by Tardilicious View Post
    Could someone sanitize it or something?
    PHP Code:
    <?php
    /* Store user details */
    $name mysql_real_escape_string($_POST['name']);
    $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="'.$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{
    ?>
    That should be correct any one feel free to Correct me.

  11. #10
    Account Inactive Tardilicious is offline
    InactiveRank
    Jul 2008 Join Date
    Behind YouLocation
    206Posts

    Re: [RELEASE]Ban Appeal PHP

    Quote Originally Posted by Antv912 View Post
    PHP Code:
    <?php
    /* Store user details */
    $name mysql_real_escape_string($_POST['name']);
    $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="'.$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{
    ?>
    That should be correct any one feel free to Correct me.
    Thanks antv it still works. I edit the C:\wamp\www\page\register_do.php to yours

  12. #11
    Account Inactive thegamer1907 is offline
    InactiveRank
    May 2008 Join Date
    SingaporeLocation
    464Posts

    Re: [RELEASE]Ban Appeal PHP

    very nice. good job for this release.

  13. #12
    Account Inactive Tardilicious is offline
    InactiveRank
    Jul 2008 Join Date
    Behind YouLocation
    206Posts

    Re: [RELEASE]Ban Appeal PHP

    Quote Originally Posted by thegamer1907 View Post
    very nice. good job for this release.
    Thanks ^^

  14. #13
    Account Inactive thegamer1907 is offline
    InactiveRank
    May 2008 Join Date
    SingaporeLocation
    464Posts

    Re: [RELEASE]Ban Appeal PHP

    however, you can improve on some stuff like..

    makign it check if email matches email of accout and also make it use java popup instead of a dull echo page

  15. #14
    Account Inactive Amandy is offline
    InactiveRank
    Feb 2007 Join Date
    Crapvile, USALocation
    779Posts

    Re: [RELEASE]Ban Appeal PHP

    Quote Originally Posted by thegamer1907 View Post
    however, you can improve on some stuff like..

    makign it check if email matches email of accout and also make it use java popup instead of a dull echo page
    You can view examples of the JavaScript pop up with my Image Register script
    http://forum.ragezone.com/showthread.php?t=384299

  16. #15
    Hardcore Member DtN is offline
    MemberRank
    Apr 2008 Join Date
    123Posts

    Re: [RELEASE]Ban Appeal PHP

    PHP Code:
    <?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 $_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{
    You forgot ( and )'s to open and close mysql_real_escape_string's.


  17.  

    Latest Gaming Releases

Page 1 of 2 12 LastLast

Advertisement