Register page

Results 1 to 12 of 12
  1. #1
    Enthusiast Hanguk is offline
    MemberRank
    Jan 2010 Join Date
    ChangwonLocation
    40Posts

    Register page

    This page does not work.

    PHP Code:
    <?

    if($_SESSION[UserID] <> "")
    {
        
    SetTitle("Message from System", array("Log out first if you want to create another account"));
        
    header("Location: index.php");
        die();
    }

    if(isset(
    $_POST[submit]))
    {
        
    $user           clean($_POST[userid]);
        
    $pass[0]        = clean($_POST[pass1]);
        
    $pass[1]        = clean($_POST[pass2]);
        
    $email          clean($_POST[email]);
        
    $sq             clean($_POST[sq]);
        
    $sa             clean($_POST[sa]);

        if(
    $pass[0] != $pass[1]){
            
    SetTitle("Register", array("The passwords do not match"));
            
    header("Location: index.php?do=register");
            die();
        }
        elseif ( 
    mssql_num_rowsmssql_query_logged("SELECT * FROM Account(nolock) WHERE UserID = '$user'") ) <> ){
            
    SetTitle("Register", array("The UserID $userid is already in use"));
            
    header("Location: index.php?do=register");
            die();
        }
        elseif ( 
    mssql_num_rowsmssql_query_logged("SELECT * FROM Account(nolock) WHERE Email = '$email'") ) <> ){
            
    SetTitle("Register", array("The Email $email is already in use"));
            
    header("Location: index.php?do=register");
            die();
        }
        elseif (
    $user == ""){
            
    SetTitle("Register", array("Please enter an UserID"));
            
    header("Location: index.php?do=register");
            die();
        }
        elseif (
    $pass[0] == "" || $pass[1] == ""){
            
    SetTitle("Register", array("Please enter a password"));
            
    header("Location: index.php?do=register");
            die();
        }
        elseif (
    $email == ""){
            
    SetTitle("Register", array("Please enter an email"));
            
    header("Location: index.php?do=register");
            die();
        }
        elseif (
    $sq == ""){
            
    SetTitle("Register", array("Please enter a secret question"));
            
    header("Location: index.php?do=register");
            die();
        }
        elseif (
    $sa == ""){
            
    SetTitle("Register", array("Please enter a secret answer"));
            
    header("Location: index.php?do=register");
            die();
        }
        elseif (
    strlen($user) < 6){
            
    SetTitle("Register", array("The userid is too short (6 chars min)"));
            
    header("Location: index.php?do=register");
            die();
        }
        elseif (
    strlen($pass[0]) < 6){
            
    SetTitle("Register", array("The password is too short (6 chars min)"));
            
    header("Location: index.php?do=register");
            die();
        }
        else{


            
    $query sprintf("EXECUTE spWebHGCreateAccount '%s', '%s', '%s', '%s', '%s', '%s'"$user$pass[0], $email$sq$sa$loginhash);

            
    mssql_query_logged($query);
            
            
    SetTitle("Register", array("The account $user has been created successfully"));
            
    header("Location: index.php");
            die();
        }

    }else{
        
    SetTitle("Gunz - Register");
    /*    $europe = array('DE','AT','BG','BE','CY','DK','SK','SI','ES','EE','FI','FR','GR','HU','IE','LV','LT','LU','MT','NL','PL','PT','GB','CZ','RO','SE');

        $p = GetCountryCodeByIP($_SERVER[REMOTE_ADDR]);
        if(in_array(strtoupper($p), $europe))
        {
            $country = sprintf("[<font color='#00FF00'>%s</font>] %s", $p, GetCountryNameByIP($_SERVER[REMOTE_ADDR]));
        }else{
            $country = sprintf("[<font color='#FF0000'>%s</font>] %s", $p, GetCountryNameByIP($_SERVER[REMOTE_ADDR]));
        }*/
    }



    ?>
    <body onload="FP_preloadImgs(/*url*/'../images/btn_register_on.png')">

    <table border="0" style="border-collapse: collapse" width="100%">
                        <tr>
                            <td width="183" valign="top">
                            <div align="center">
                                <? include "blocks/block_ranking.php" ?>
                            </div>
                            </td>
                            <td valign="top">
                            <div align="center">
                                <table border="1" style="border-collapse: collapse" width="100%" bordercolor="#000000">
                                    <tr>
                                        <td background="images/content_bar.png" height="24" style="background-image: url('images/content_bar.png'); background-repeat: no-repeat; background-position: center top">
                                        <div align="center">
                                            <font face="Tahoma" size="2"><b>&nbsp;Register an Account at GunZ</b></font></td>
                                    </tr>
                                    <tr>
                                        <td bgcolor="#2C2A2A">
                                        <div align="center">
                                            <form method="POST" action="index.php?do=register" name="register">
                                                <table border="0" style="border-collapse: collapse; float:left" width="408" height="100%">
                                                <tr>
                                                    <td width="401" colspan="5" style="background-image: url('images/mis_eumember.png'); background-repeat: no-repeat; background-position: center top" height="62">
                                                    <div align="center">
                                                        <table border="0" style="border-collapse: collapse" width="404" height="100%">
                                                                                                                <tr>
                                                                <td width="11">&nbsp;</td>
                                                                <td width="378">
                                                                <p align="center">
                                                                <font color="#FF0000">
                                                                NOTE:</font> The Administrator(s) or the Staff of GunZ will "Never" ask for your Password.</font></td>
                                                                <td width="9">&nbsp;</td>
                                                            </tr>
                                                        </table>
                                                    </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">&nbsp;</td>
                                                    <td width="183">&nbsp;</td>
                                                    <td width="183">&nbsp;</td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">
                                                    <img border="0" src="images/mis_arrow.png" width="5" height="9" id="img13"></td>
                                                    <td width="183" align="left">
                                                    <div align="left"><b>UserID</b> :</td>
                                                    <td width="183" align="left">
                                                    <input type="text" name="userid" size="19" class="textLogin"></td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">
                                                    <img border="0" src="images/mis_arrow.png" width="5" height="9"></td>
                                                    <td width="183" align="left">
                                                    <b>Password</b> :</td>
                                                    <td width="183" align="left">
                                                    <input type="password" name="pass1" size="19" class="textLogin"></td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">
                                                    <img border="0" src="images/mis_arrow.png" width="5" height="9"></td>
                                                    <td width="183" align="left">
                                                    <b>Repeat the Password</b> :</td>
                                                    <td width="183" align="left">
                                                    <input type="password" name="pass2" size="19" class="textLogin"></td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">
                                                    <img border="0" src="images/mis_arrow.png" width="5" height="9"></td>
                                                    <td width="183" align="left">
                                                    <b>E-Mail</b> :</td>
                                                    <td width="183" align="left">
                                                    <input type="text" name="email" size="19" class="textLogin"></td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>

                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">&nbsp;</td>
                                                    <td width="183" align="left">&nbsp;</td>
                                                    <td width="183" align="left">&nbsp;</td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td width="402" colspan="5">
                                                    <p align="center">
                                                    <img border="0" src="images/mis_sepline.png" width="391" height="2"></td>
                                                </tr>
                                                <tr>
                                                    <td width="402" colspan="5" background="images/mis_eumember.png" height="62" style="background-image: url('images/mis_eumember.png'); background-repeat: no-repeat; background-position: center top">
                                                    <div align="center">
                                                        <table border="0" style="border-collapse: collapse" width="404" height="100%">
                                                            <tr>
                                                                <td width="11">&nbsp;</td>
                                                                <td width="378">
                                                                <p align="center"><font color="#FF0000">NOTE:</font> The Secret Q / A are used to Recove your Password.</td>
                                                                <td width="9">&nbsp;</td>
                                                            </tr>
                                                        </table>
                                                    </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">&nbsp;</td>
                                                    <td width="183" align="left">&nbsp;</td>
                                                    <td width="183" align="left">&nbsp;</td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">
                                                    <img border="0" src="images/mis_arrow.png" width="5" height="9"></td>
                                                    <td width="183" align="left">
                                                    <b>Secret Question</b> :</td>
                                                    <td width="183" align="left">
                                                    <input type="text" name="sq" size="19" class="textLogin"></td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">
                                                    <img border="0" src="images/mis_arrow.png" width="5" height="9"></td>
                                                    <td width="183" align="left">
                                                    <b>Secret Answer</b> :</td>
                                                    <td width="183" align="left">
                                                    <input type="text" name="sa" size="19" class="textLogin"></td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">&nbsp;</td>
                                                    <td width="183">&nbsp;</td>
                                                    <td width="183">&nbsp;</td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">&nbsp;</td>
                                                    <td width="366" colspan="2">
                                                    <p align="center">
                                                    <input border="0" src="images/btn_register_off.png" name="img123" width="136" height="22" onmouseout="FP_swapImgRestore()" onmouseover="FP_swapImg(1,1,/*id*/'img123',/*url*/'images/btn_register_on.png')" type="image"></td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">&nbsp;</td>
                                                    <td width="183">&nbsp;</td>
                                                    <td width="183">&nbsp;</td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                            </table>
                                                <input type="hidden" name="submit" value="1"></form>
                                        </div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            </td>
                            <td width="171" valign="top">
                            <div align="center">
                                <? include "blocks/block_login.php" ?>
                            </div>
                            </td>
                        </tr>
                    </table>
    Maybe it's because of that.

    PHP Code:
    $query sprintf("EXECUTE spWebHGCreateAccount '%s', '%s', '%s', '%s', '%s', '%s'"$user$pass[0], $email$sq$sa$loginhash); 
    Thank you kindly help me.


  2. #2
    Doggie And Rice. Military is offline
    MemberRank
    Jun 2009 Join Date
    Here and AboutLocation
    3,302Posts

    Re: Register page

    get wizkid's register page

  3. #3
    Enthusiast Hanguk is offline
    MemberRank
    Jan 2010 Join Date
    ChangwonLocation
    40Posts

    Re: Register page

    Quote Originally Posted by Military View Post
    get wizkid's register page
    No i need this page.
    Last edited by Hanguk; 17-03-10 at 10:16 PM.

  4. #4
    人◕ ‿‿ ◕人 Forean is offline
    MemberRank
    Jul 2008 Join Date
    1,183Posts

    Re: Register page

    Had a problem like this, This should work....

    If not, i give up :P


    Spoiler:
    PHP Code:
    <?

    if($_SESSION[UserID] <> "")
    {
        
    SetTitle("Message from System", array("Log out first if you want to create another account"));
        
    header("Location: index.php");
        die();
    }

    if(isset(
    $_POST[submit]))
    {
        
    $user           clean($_POST[userid]);
        
    $pass[0]        = clean($_POST[pass1]);
        
    $pass[1]        = clean($_POST[pass2]);
        
    $email          clean($_POST[email]);

        
        if(
    $pass[0] != $pass[1]){
            
    SetTitle("Register", array("The passwords do not match"));
            
    header("Location: index.php?do=register");
            die();
        }
        elseif ( 
    mssql_num_rowsmssql_query_logged("SELECT * FROM Account(nolock) WHERE UserID = '$user'") ) <> ){
            
    SetTitle("Register", array("The UserID $userid is already in use"));
            
    header("Location: index.php?do=register");
            die();
        }
        elseif ( 
    mssql_num_rowsmssql_query_logged("SELECT * FROM Account(nolock) WHERE Email = '$email'") ) <> ){
            
    SetTitle("Register", array("The Email $email is already in use"));
            
    header("Location: index.php?do=register");
            die();
        }
        elseif (
    $user == ""){
            
    SetTitle("Register", array("Please enter an UserID"));
            
    header("Location: index.php?do=register");
            die();
        }
        elseif (
    $pass[0] == "" || $pass[1] == ""){
            
    SetTitle("Register", array("Please enter a password"));
            
    header("Location: index.php?do=register");
            die();
        }
        elseif (
    $email == ""){
            
    SetTitle("Register", array("Please enter an email"));
            
    header("Location: index.php?do=register");
            die();
        }

        elseif (
    strlen($user) < 6){
            
    SetTitle("Register", array("The userid is too short (6 chars min)"));
            
    header("Location: index.php?do=register");
            die();
        }
        elseif (
    strlen($pass[0]) < 6){
            
    SetTitle("Register", array("The password is too short (6 chars min)"));
            
    header("Location: index.php?do=register");
            die();
        }
        else{


            
    $query sprintf("EXECUTE spWebHGCreateAccount '%s', '%s', '%s', '%s', '%s', '%s'"$user$pass[0], $email$loginhash);

            
    mssql_query_logged($query);
            
            
    SetTitle("Register", array("The account $user has been created successfully"));
            
    header("Location: index.php");
            die();
        }

    }else{
        
    SetTitle("Gunz - Register");
    /*    $europe = array('DE','AT','BG','BE','CY','DK','SK','SI','ES','EE','FI','FR','GR','HU','IE','LV','LT','LU','MT','NL','PL','PT','GB','CZ','RO','SE');

        $p = GetCountryCodeByIP($_SERVER[REMOTE_ADDR]);
        if(in_array(strtoupper($p), $europe))
        {
            $country = sprintf("[<font color='#00FF00'>%s</font>] %s", $p, GetCountryNameByIP($_SERVER[REMOTE_ADDR]));
        }else{
            $country = sprintf("[<font color='#FF0000'>%s</font>] %s", $p, GetCountryNameByIP($_SERVER[REMOTE_ADDR]));
        }*/
    }



    ?>
    <body onload="FP_preloadImgs(/*url*/'../images/btn_register_on.png')">

    <table border="0" style="border-collapse: collapse" width="100%">
                        <tr>
                            <td width="183" valign="top">
                            <div align="center">
                                <? include "blocks/block_ranking.php" ?>
                            </div>
                            </td>
                            <td valign="top">
                            <div align="center">
                                <table border="1" style="border-collapse: collapse" width="100%" bordercolor="#000000">
                                    <tr>
                                        <td background="http://forum.ragezone.com/images/content_bar.png" height="24" style="background-image: url('images/content_bar.png'); background-repeat: no-repeat; background-position: center top">
                                        <div align="center">
                                            <font face="Tahoma" size="2"><b>&nbsp;Register an Account at GunZ</b></font></td>
                                    </tr>
                                    <tr>
                                        <td bgcolor="#2C2A2A">
                                        <div align="center">
                                            <form method="POST" action="index.php?do=register" name="register">
                                                <table border="0" style="border-collapse: collapse; float:left" width="408" height="100%">
                                                <tr>
                                                    <td width="401" colspan="5" style="background-image: url('images/mis_eumember.png'); background-repeat: no-repeat; background-position: center top" height="62">
                                                    <div align="center">
                                                        <table border="0" style="border-collapse: collapse" width="404" height="100%">
                                                                                                                <tr>
                                                                <td width="11">&nbsp;</td>
                                                                <td width="378">
                                                                <p align="center">
                                                                <font color="#FF0000">
                                                                NOTE:</font> The Administrator(s) or the Staff of GunZ will "Never" ask for your Password.</font></td>
                                                                <td width="9">&nbsp;</td>
                                                            </tr>
                                                        </table>
                                                    </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">&nbsp;</td>
                                                    <td width="183">&nbsp;</td>
                                                    <td width="183">&nbsp;</td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">
                                                    <img border="0" src="http://forum.ragezone.com/images/mis_arrow.png" width="5" height="9" id="img13"></td>
                                                    <td width="183" align="left">
                                                    <div align="left"><b>UserID</b> :</td>
                                                    <td width="183" align="left">
                                                    <input type="text" name="userid" size="19" class="textLogin"></td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">
                                                    <img border="0" src="http://forum.ragezone.com/images/mis_arrow.png" width="5" height="9"></td>
                                                    <td width="183" align="left">
                                                    <b>Password</b> :</td>
                                                    <td width="183" align="left">
                                                    <input type="password" name="pass1" size="19" class="textLogin"></td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">
                                                    <img border="0" src="http://forum.ragezone.com/images/mis_arrow.png" width="5" height="9"></td>
                                                    <td width="183" align="left">
                                                    <b>Repeat the Password</b> :</td>
                                                    <td width="183" align="left">
                                                    <input type="password" name="pass2" size="19" class="textLogin"></td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">
                                                    <img border="0" src="http://forum.ragezone.com/images/mis_arrow.png" width="5" height="9"></td>
                                                    <td width="183" align="left">
                                                    <b>E-Mail</b> :</td>
                                                    <td width="183" align="left">
                                                    <input type="text" name="email" size="19" class="textLogin"></td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>

                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">&nbsp;</td>
                                                    <td width="183" align="left">&nbsp;</td>
                                                    <td width="183" align="left">&nbsp;</td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td width="402" colspan="5">
                                                    <p align="center">
                                                    <img border="0" src="http://forum.ragezone.com/images/mis_sepline.png" width="391" height="2"></td>
                                                </tr>
                                                <tr>
                                                    <td width="402" colspan="5" background="http://forum.ragezone.com/images/mis_eumember.png" height="62" style="background-image: url('images/mis_eumember.png'); background-repeat: no-repeat; background-position: center top">
                                                    <div align="center">
                                                        <table border="0" style="border-collapse: collapse" width="404" height="100%">
                                                     </table>
                                                    </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">&nbsp;</td>
                                                    <td width="183" align="left">&nbsp;</td>
                                                    <td width="183" align="left">&nbsp;</td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                                                  <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">&nbsp;</td>
                                                    <td width="366" colspan="2">
                                                    <p align="center">
                                                    <input border="0" src="http://forum.ragezone.com/images/btn_register_off.png" name="img123" width="136" height="22" onmouseout="FP_swapImgRestore()" onmouseover="FP_swapImg(1,1,/*id*/'img123',/*url*/'images/btn_register_on.png')" type="image"></td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td width="11">&nbsp;</td>
                                                    <td width="9">&nbsp;</td>
                                                    <td width="183">&nbsp;</td>
                                                    <td width="183">&nbsp;</td>
                                                    <td width="16">&nbsp;</td>
                                                </tr>
                                            </table>
                                                <input type="hidden" name="submit" value="1"></form>
                                        </div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            </td>
                            <td width="171" valign="top">
                            <div align="center">
                                <? include "blocks/block_login.php" ?>
                            </div>
                            </td>
                        </tr>
                    </table>
    Last edited by Forean; 18-03-10 at 12:07 AM.

  5. #5
    Enthusiast Hanguk is offline
    MemberRank
    Jan 2010 Join Date
    ChangwonLocation
    40Posts

    Re: Register page

    Thank you but it does not work.

  6. #6
    Animu Addicted Number12 is offline
    MemberRank
    Apr 2008 Join Date
    Old Sunny CALocation
    1,264Posts

    Re: Register page

    You need to explain what isnt working. Like when registering or wat?

  7. #7
    Enthusiast Hanguk is offline
    MemberRank
    Jan 2010 Join Date
    ChangwonLocation
    40Posts

    Re: Register page

    Quote Originally Posted by number12 View Post
    You need to explain what isnt working. Like when registering or wat?
    When I register, nothing happens, the page remains on the registration page, no error message.

  8. #8
    人◕ ‿‿ ◕人 Forean is offline
    MemberRank
    Jul 2008 Join Date
    1,183Posts

    Re: Register page

    did you check the database to see if the user has registered

  9. #9
    Enthusiast Hanguk is offline
    MemberRank
    Jan 2010 Join Date
    ChangwonLocation
    40Posts

    Re: Register page

    Quote Originally Posted by forean View Post
    did you check the database to see if the user has registered
    Yeah, there are not account.

  10. #10
    Enthusiast Hanguk is offline
    MemberRank
    Jan 2010 Join Date
    ChangwonLocation
    40Posts

    Re: Register page

    I need help please and sorry for the second post.

  11. #11
      Phoenix is offline
    ModeratorRank
    Mar 2009 Join Date
    6,890Posts

    Re: Register page

    You have to change the queries for it to work on normal databases. I have a working one but i'm not allowed to share it. It's better you use a reg. page from the mpog web instead of euro.
    Posted via Mobile Device

  12. #12
    Enthusiast Hanguk is offline
    MemberRank
    Jan 2010 Join Date
    ChangwonLocation
    40Posts

    Re: Register page

    Quote Originally Posted by phoenix_147 View Post
    You have to change the queries for it to work on normal databases. I have a working one but i'm not allowed to share it. It's better you use a reg. page from the mpog web instead of euro.
    Posted via Mobile Device
    Ok i try ! thank you



Advertisement