:s Register !

Results 1 to 6 of 6
  1. #1
    Account Upgraded | Title Enabled! ::.kakashi.:: is offline
    MemberRank
    May 2009 Join Date
    MarsLocation
    321Posts

    :s Register !

    hey,

    i use register page by WizKid and i have this probleme after register:

    "Something Happened. Please Report This Bug At Forums!"

    what probleme? (after i restor my backup of my vps ) ;s

    T H A N K S for H E L P


  2. #2
    Veni, Vidi, Vici Arcelor is offline
    MemberRank
    Jan 2010 Join Date
    Delhi, IndiaLocation
    1,763Posts

    Re: :s Register !

    Post the script here.

  3. #3
    Account Upgraded | Title Enabled! ::.kakashi.:: is offline
    MemberRank
    May 2009 Join Date
    MarsLocation
    321Posts

    Re: :s Register !

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title><?=$servername?> Register Page : </title>
    <link rel="icon" href="favicon.ico">
    <style type="text/css">
    </style>
    <style type="text/css">
    img { behavior: url("pngfix.htc"); }
    </style>
    </head>
    <?php
    /*
    This Register Page Was Written By WizKid
    This Anti Sql Injection Was Written By gWX0
    This Anti Right Click Was Written By Kyuma
    All Rights Reserved. Any Support Can Be Requested Via RageZone.

    You'Re Allowed To Edit This Script And Modify The Template.
    HowEver, You Are NOT Allowed To Remove And/Or Edit Our [ Wizkid , Kyuma And gWX0 ] CopyRight.

    Removing This CopyRight Will Be Your Death.
    */

    //Edit To Fit YOUR Requirements.
    $servername = "KillerGunz";
    $accounttable = "Account";
    $logintable = "Login";

    //Edit These Variables. If Not, No Register Page For You. (Or You'Re Fux Pro With The Same Login As Me.)
    $host = "CT....\SQLEXPRESS";
    $user = "sa";
    $pass = "mypass";
    $dbname = "GunzDB";

    $connect = odbc_connect("Driver={SQL Server};Server={$host}; Database={$dbname}", $user, $pass) or die("Can't connect the MSSQL server.");

    function antisql ( $sql ) {
    return ( str_replace( "'", "''", $sql ) );
    }

    //My Favorite Function. Get The Fuck Off. (Nothing Personally :].)
    function gtfo($wut) {
    echo "<center><table width='500' cellpadding='5' cellspacing='0' border='0' style='border: 1px ;'>
    <tr>
    <td align=center width='100%' style='border-bottom: 1px solid black;'><b><?=$servername?> Register Page : </b></td>
    </tr>
    <tr>
    <td width='100%'><center>$wut</center></td>
    </tr>
    </table>";
    die();
    }

    //Check E-Mail Function. This To Prevent Fake E-Mails. (Remember The Time YOU Doing That?)
    function checkemail($address) {
    list($local, $host) = explode("@", $address);
    $pattern_local = "^([0-9a-z]*([-|_]?[0-9a-z]+)*)(([-|_]?)\.([-|_]?)[0-9a-z]*([-|_]?[0-9a-z]+)+)*([-|_]?)$";
    $pattern_host = "^([0-9a-z]+([-]?[0-9a-z]+)*)(([-]?)\.([-]?)[0-9a-z]*([-]?[0-9a-z]+)+)*\.[a-z]{2,4}$";
    $match_local = eregi($pattern_local, $local);
    $match_host = eregi($pattern_host, $host);
    if($match_local && $match_host) {
    return 1;
    }
    else {
    return 0;
    }
    }

    //The Num_rows() Function For ODBC Since The Default One Always Returns -1.
    Function num_rows(&$rid) {

    //We Can Try It At Least, Right?
    $num= odbc_num_rows($rid);
    if ($num >= 0) {
    return $num;
    }

    if (!odbc_fetch_row($rid, 1)) {
    odbc_fetch_row($rid, 0);
    return 0;
    }

    if (!odbc_fetch_row($rid, 2)) {
    odbc_fetch_row($rid, 0);
    return 1;
    }

    $lo= 2;
    $hi= 8192000;

    while ($lo < ($hi - 1)) {
    $mid= (int)(($hi + $lo) / 2);
    if (odbc_fetch_row($rid, $mid)) {
    $lo= $mid;
    } else {
    $hi= $mid;
    }
    }
    $num= $lo;
    odbc_fetch_row($rid, 0);
    return $num;
    }
    ?>
    <html>
    <head>
    <title><?=$servername?> Register Page : </title>
    </head>
    <body>
    <center>
    <?php
    //Oh Well. Let's Create The Variable $ip To Start With.
    $ip = antisql($_SERVER['REMOTE_ADDR']);

    /*
    An Extra Feature. This Is NOT Enabled Before You Remove This + The Comment Thingy's.

    To Ban 1 IP It Will Be:
    if ($ip == "xxxxxx")
    {
    gtfo("Your IP Is BANNED!.");
    }

    For Multiple IP's, Use This Way:
    if ($ip == "xxxxxx" OR $ip == "xxxxxx")
    {
    gtfo("Your IP Is BANNED!.");
    }
    */

    //Get The AID Out Of The Login Table (Defined At The Top Of This File) Where LastIP Is The Visitors IP.
    $query1 = odbc_exec($connect,"SELECT AID FROM $logintable WHERE LastIP = '$ip'");

    //UnderStable For The Real People. Editing This Without Knowledge Will Be The Death Of Your Register Page.
    $i=1;
    while (odbc_fetch_row($query1, $i)){
    $aid = odbc_result($query1, 'AID');

    $query2 = odbc_exec($connect,"SELECT UGradeID FROM $accounttable WHERE AID = '$aid'");
    odbc_fetch_row($query2);
    $ugradeid = odbc_result($query2, 1);

    if ($ugradeid == "253")
    {
    //Get The Fuck Off.
    gtfo("You Have One Or More Accounts Banned Here. You'Re Not Welcome Anymore.");
    }

    $i++;
    }

    //The Doreg Part.
    if (isset($_GET['act']) AND $_GET['act'] == "doreg")
    {

    //Check For Any Shit.
    if (!is_numeric($_POST['age']) OR !checkemail($_POST['email']) OR empty($_POST['username']) OR empty($_POST['password']) OR empty($_POST['email']) OR empty($_POST['name']) OR empty($_POST['age']))
    {
    gtfo("You'Re Not Funny.");
    }

    //Check If The User ID Exists Already.
    $query1 = odbc_exec($connect, "SELECT AID FROM $accounttable WHERE UserID = '" . antisql($_POST['username']) . "'");
    $count1 = num_rows($query1);

    if ($count1 >= 1)
    {
    gtfo("User ID In Use.");
    }

    //Check If The E-Mail Is In Use.
    $query2 = odbc_exec($connect, "SELECT AID FROM $accounttable WHERE Email = '" . antisql($_POST['email']) . "'");
    $count2 = num_rows($query2);

    if ($count2 >= 1)
    {
    gtfo("E-Mail Address In Use.");
    }

    //Regdate
    $regdate = date("Y-m-d H:i:s");

    //Time For The Real Work. Editing This Will Be The End Of Your Register Page.
    $query3 = odbc_exec($connect, "INSERT INTO $accounttable (UserID, UGradeID, PGradeID, RegDate, Email, Age, Name) VALUES ('".antisql($_POST['username'])."', '0', '0', '$regdate', '".antisql($_POST['email'])."', '".antisql($_POST['age'])."', '".antisql($_POST['name'])."')");

    $query4 = odbc_exec($connect, "SELECT AID FROM $accounttable WHERE UserID = '" . antisql($_POST['username']) . "'");
    odbc_fetch_row($query4);
    $aid = odbc_result($query4, 1);

    //If No Results Comes Back. (Registration Failed.)
    if (!$aid)
    {
    gtfo("Something Happened. Please Report This Bug At <?=$servername?> Forums!");
    }

    odbc_exec($connect, "INSERT INTO $logintable (UserID, AID, Password) VALUES ('".antisql($_POST['username'])."', '$aid', '".antisql($_POST['password'])."')");

    //When Everything Is Done, show The User ID And The Password To The Visitor.
    //IF YOU WANT U CAN EDIT THE $_POST[password] AND PUT **************** FOR HIDE THE PASSWORD!.
    gtfo("Your <?=$servername?> Account Has Been Created. ! <br><br>
    Your User ID : $_POST[username]<br>
    Your Password : $_POST[password]<br><br>
    Have Fun At $servername ! ");
    }

    //Here The Party Begins. Feel Free To Edit This.
    echo "<table width='350'>
    <form action='" . $_SERVER['PHP_SELF'] . "?act=doreg' method='POST'>
    <b><?=$servername?> Register Page : </b><br><br>
    <tr>
    <td width='50%'><b>Your User ID : </b></td>
    <td width='50%'><input type='text' name='username'></td>
    </tr>
    <tr>
    <td width='50%'><b>Your Password : </b></td>
    <td width='50%'><input type='password' name='password'></td>
    </tr>
    <tr>
    <td width='50%'><b>Your E-Mail : </b></td>
    <td width='50%'><input type='text' name='email'></td>
    </tr>
    <tr>
    <td width='50%'><b>Your Name : </b></td>
    <td width='50%'><input type='text' name='name'></td>
    </tr>
    <tr>
    <td width='50%'><b>Your Age : </b></td>
    <td width='50%'><input type='text' name='age'></td>
    </tr>
    <tr>
    <td width='50%'><b></b></td>
    <td width='50%'><input type='submit' value='Register An <?=$servername?> Account'></td>
    </tr>
    </table>";
    ?>
    <br>
    <!-- No You Cant Remove It. -->
    <font size="3">Copyright 2009~2010 WizKid , Kyuma And gWX0 - <?=$servername?> </font>
    <!-- See? -->
    </center>
    </body>
    </html></div>
    </select>
    </form>
    </table>
    </div>
    </body>
    </html>
    <head>

    <script language="JavaScript"> <!--
    // No RightClick Script v.0.5
    // (C) 2009~2010 Kyuma
    // Kyuma09@hotmail.com Or kyuma@legendarygamerz.com
    // Don't Delete This Header!

    var message="Get The Fuck Off"; // Message For The Alert Box

    // Don't Edit Below!

    function click(e) {
    if (document.all) {
    if (event.button == 2) {
    alert(message);
    return false;
    }
    }
    if (document.layers) {
    if (e.which == 3) {
    alert(message);
    return false;
    }
    }
    }
    if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);
    }
    document.onmousedown=click;
    // --> </script>
    this?

  4. #4
    Veni, Vidi, Vici Arcelor is offline
    MemberRank
    Jan 2010 Join Date
    Delhi, IndiaLocation
    1,763Posts

    Re: :s Register !

    Code:
    $query4 = odbc_exec($connect, "SELECT AID FROM $accounttable WHERE UserID = '" . antisql($_POST['username']) . "'");
    odbc_fetch_row($query4);
    $aid = odbc_result($query4, 1);
    
    //If No Results Comes Back. (Registration Failed.)
    if (!$aid)
    {
    gtfo("Something Happened. Please Report This Bug At <?=$servername?> Forums!");
    }
    You didn't put your shit right.

  5. #5
    Account Upgraded | Title Enabled! ::.kakashi.:: is offline
    MemberRank
    May 2009 Join Date
    MarsLocation
    321Posts

    Re: :s Register !

    Quote Originally Posted by Arcelor View Post
    Code:
    $query4 = odbc_exec($connect, "SELECT AID FROM $accounttable WHERE UserID = '" . antisql($_POST['username']) . "'");
    odbc_fetch_row($query4);
    $aid = odbc_result($query4, 1);
    
    //If No Results Comes Back. (Registration Failed.)
    if (!$aid)
    {
    gtfo("Something Happened. Please Report This Bug At <?=$servername?> Forums!");
    }
    You didn't put your shit right.
    euh?? help me?

  6. #6
    Account Upgraded | Title Enabled! 00niels00 is offline
    MemberRank
    Sep 2008 Join Date
    The NetherlandsLocation
    1,041Posts

    Re: :s Register !

    Quote Originally Posted by ::.kakashi.:: View Post
    euh?? help me?
    Have you fixed your dbo.Account?
    Because that regdate must be varchar(50) instead of date.



Advertisement