Hello & Welcome to our community. Is this your first visit? Register
Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Account Upgraded | Title Enabled! Tardilicious's Avatar

    Rank
    True Member
    Join Date
    Jul 2008
    Location
    Behind You
    Posts
    206
    Likes (Received)
    4

    [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. #2
    Account Upgraded | Title Enabled! timmy123's Avatar

    Rank
    True Member
    Join Date
    Apr 2008
    Posts
    352
    Likes (Received)
    0

    Re: [RELEASE]Ban Appeal PHP

    im confused what does this exactly do
    Owner Of SpartaStory
    Long Live Sparta[SIGPIC][/SIGPIC]

  3. #3
    You've got my respect!

    Rank
    True Member
    Join Date
    Apr 2008
    Location
    Portland,Oregon
    Posts
    958
    Likes (Received)
    288

    Re: [RELEASE]Ban Appeal PHP

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

  4. #4
    AmoraMS :3 Amandy's Avatar

    Rank
    True Member
    Join Date
    Feb 2007
    Location
    Crapvile, USA
    Posts
    779
    Likes (Received)
    5

    Re: [RELEASE]Ban Appeal PHP

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

  5. #5
    Account Upgraded | Title Enabled! Tardilicious's Avatar

    Rank
    True Member
    Join Date
    Jul 2008
    Location
    Behind You
    Posts
    206
    Likes (Received)
    4

    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.

  6. #6
    Rad Was Here enisrad's Avatar

    Rank
    True Member
    Join Date
    Aug 2005
    Location
    Canada
    Posts
    323
    Likes (Received)
    0

    Re: [RELEASE]Ban Appeal PHP

    lol yup :P

  7. #7
    Account Upgraded | Title Enabled! Tardilicious's Avatar

    Rank
    True Member
    Join Date
    Jul 2008
    Location
    Behind You
    Posts
    206
    Likes (Received)
    4

    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 =/

  8. #8
    Account Upgraded | Title Enabled! Tardilicious's Avatar

    Rank
    True Member
    Join Date
    Jul 2008
    Location
    Behind You
    Posts
    206
    Likes (Received)
    4

    Re: [RELEASE]Ban Appeal PHP

    Could someone sanitize it or something?

  9. #9
    AmoraMS :3 Amandy's Avatar

    Rank
    True Member
    Join Date
    Feb 2007
    Location
    Crapvile, USA
    Posts
    779
    Likes (Received)
    5

    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.

  10. #10
    Account Upgraded | Title Enabled! Tardilicious's Avatar

    Rank
    True Member
    Join Date
    Jul 2008
    Location
    Behind You
    Posts
    206
    Likes (Received)
    4

    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

  11. #11
    I Don't Own A Server thegamer1907's Avatar

    Rank
    True Member
    Join Date
    May 2008
    Location
    Singapore
    Posts
    464
    Likes (Received)
    0

    Re: [RELEASE]Ban Appeal PHP

    very nice. good job for this release.

  12. #12
    Account Upgraded | Title Enabled! Tardilicious's Avatar

    Rank
    True Member
    Join Date
    Jul 2008
    Location
    Behind You
    Posts
    206
    Likes (Received)
    4

    Re: [RELEASE]Ban Appeal PHP

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

  13. #13
    I Don't Own A Server thegamer1907's Avatar

    Rank
    True Member
    Join Date
    May 2008
    Location
    Singapore
    Posts
    464
    Likes (Received)
    0

    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

  14. #14
    AmoraMS :3 Amandy's Avatar

    Rank
    True Member
    Join Date
    Feb 2007
    Location
    Crapvile, USA
    Posts
    779
    Likes (Received)
    5

    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
    [Only registered and activated users can see links. ]

  15. #15
    Hardcore Member DtN's Avatar

    Rank
    Member
    Join Date
    Apr 2008
    Posts
    119
    Likes (Received)
    5

    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.

 

 
Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

HostKey
Sponsored by HostKey , secured by Incapsula and mods by DBTech.
All times are GMT +1. The time now is 12:51 AM.
Powered by vBulletin® Copyright , Jelsoft Enterprises Ltd.