Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 05:49

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[request]Register page (more complex)

Discussion on [request]Register page (more complex) within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
Rulzan's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 220
Received Thanks: 29
[request]Register page (more complex)

I request a register page more complex,like requesting email,and stuff,so if you lose you're password,you can handle yourself
(tq binary 5095)
Rulzan is offline  
Old 10/13/2009, 04:03   #2
 
elite*gold: 0
Join Date: Oct 2006
Posts: 164
Received Thanks: 17
Quote:
Originally Posted by Rulzan View Post
I request a register page more complex,like requesting email,and stuff,so if you lose you're password,you can handle yourself
(tq binary 5095)
Here you go everyone

Changing Password with Required Info.
Code:
<?php
  require_once ('config.php');
?>
  <center><b class="h2"> <?php	echo '<font color="#000000">Welcome to '.$servername.' Password change'; ?> </b><br />
<br /></center>
  <br />
  <center><form method='post' action=''><table class=body width="440" height="229">
      <tr>
        <td align="left" height="32"><b>Account Id:</b></td>
        <td class="it3" height="32"><input class="it" name="login" id="id" /></td>
      </tr> <tr>
        <td align="left" height="37">New Password:</td>
        <td class="it3" height="37"><input class="it" id="ipassword" type="password" maxLength=12 name="pass" /></td>
      </tr> <tr>
        <td align="left" height="32">Retype New Password:</td>
        <td class=it3 height="32"><input class="it1" id="ipassword" type="password" maxlength=12 name="retpass" /></td>
      </tr> <tr>
        <td colspan="2">&nbsp;</td>
      </tr> <tr>
        <td colspan="2"><b></b></td>
      </tr> <tr>
        <td align="left" height="32"><b>Account Question:</b></td>
        <td class=it3 height="32"><input type="text" maxlength=16 name="ownerID" /></td>
      </tr> <?php   if ($chPass) { ?> <tr>
        <td align="left" height="32"><b>Question Anwser</b></td>
        <td class=it3 height="32"><input type="text" maxlength=16 name="ownerReply" /></td>
      </tr> <?php   } ?> <tr>
        <td colspan="2">&nbsp;</td>
      </tr> <tr>
        <td align="left" height="32">E-mail:</td>
        <td class=it3 height="32"><input type="text" name="email" /></td>
      </tr> <?php   if ($requireCAPTCHA) { ?> <tr>
          <td align="left" height="32"><b>Type Check Code</b>:</td>
          <td class=it3 height="32"><input name='CheckCode' size='20' maxlength='6'class=it style="FONT-SIZE: 9pt"></td>
      </tr> <tr>
          <td height="25" align="left">Check Code:</td>
          <td height="25"><span style="font-size: 9pt">
            <img src='./inc/img.php' width='200' height='60' alt='CAPTCHA' /></td>
      </tr> <?php     }     ?> <tr> 
          <td></td>
          <td style="FONT-SIZE: 14px; VERTICAL-ALIGN: middle">
				<span style="font-size: 9pt"><input type="hidden" name="hash">
    <input class=Butt type=submit onClick="hash.value = login(pass.value)" value='Change it' name=B1 /></span></td>
  </tr></table>
  </form>
			
<?php
	if(isset($_POST['retpass']) && isset($_POST['login']) && isset($_POST['pass']) && isset($_POST['ownerID']))  {  
    if(!Empty($_POST['retpass']) && !Empty($_POST['login']) && !Empty($_POST['pass']) && !Empty($_POST['ownerID']))  {
		  $ok=false;
      if ($requireCAPTCHA)  { if (PhpCaptcha::Validate($_POST['CheckCode'])) $ok=true; }
		  else $ok=true;
		  
			if($ok)	{
				mysql_select_db($accdb);
				$userid = trim($_POST['login']);
				$password=trim($_POST['pass']);
				$passretype=trim($_POST['retpass']);
				$hash=$_POST['hash'];
				
				$ownerReply=(isset($_POST['ownerReply']) ? substr(trim($_POST['ownerReply']), 0,16) : '');
				$mail=(isset($_POST['email']) ? trim($_POST['email']) : '');
				$ownerID=substr(trim($_POST['ownerID']), 0,16);
				
        if (!Empty($mail)) if (!ereg("^[0-9a-zA-Z]{4,128}$", (strtr($mail, Array('@'=>'','.'=>'')))))	{
					$mail='';
          echo 'mail > Only letters a to z and special chars @ . are allowed';
					}
        if(!eregi("^[0-9a-z]{4,12}$",$userid))	{
					echo 'login > Only letters from "a" to "z" and numbers, lenght of 4 to 12 characters';
					}
				else {
					if($password == $passretype) {
					 if(!ereg("^[0-9a-zA-Z]{4,22}$",$password))	{
							echo 'password > Only letters or numbers, lenght of 4 to 22 characters';
							}
						else	{
							$res = mysql_query('SELECT * FROM account WHERE name="'.$userid.'" AND idnumber="'.$ownerID
                .($chPass ? '" AND phone="'.$ownerReply : '').'" ORDER BY id DESC');
							if(mysql_num_rows($res) == 1)	{
								mysql_query('UPDATE account SET password="'.($passhash ? $hash : $password)
                  .(!Empty($mail) ? '", email="'.$mail : '')
                  .'", netbar_ip="'.$_SERVER['REMOTE_ADDR'].'", ip_mask="'.'255.255.255.0" '
                  .'WHERE name="'.$userid.'" AND idnumber="'.$ownerID.'";');
								echo 'Success > Account info updated successfully.';
								}
							else echo 'Error > Wrong login and/or owner... info.';
							}
						}
					else  echo 'Error > New passwords did not match.';
					}
				}
			else  echo 'Error > Check Code is Wrong.';
			}
		else echo 'Error > umm why there is empty <b>required</b> areas in register form????';
		}
?>
And this is Main Page For Register Below
Code:
<?php
  require_once ('config.php');
?>
</center>
  <br />
  <center><form method='post' action=''><table class=body width="440" height="229">
      <tr>
        <td align="left" height="32"><b>UserID</b>: </td>
        <td class="it3" height="32"><input class="it" name="id" id="id" /></td>
      </tr> <tr>
        <td align="left" height="37"><b>Password</b>:</td>
        <td class="it3" height="37"><input class="it" id="ipassword" type="password" maxLength=12 name="pass" /></td>
      </tr> <tr>
        <td align="left" height="32"><b>Retype Password</b>:</td>
        <td class=it3 height="32"><input class="it1" id="ipassword" type="password" maxlength=12 name="retpass" /></td>
      </tr> <tr>
        <td colspan="2">&nbsp;</td>
      </tr> <tr>
        <td colspan="2"><b></b></td>
      </tr> <tr>
        <td align="left" height="32"><b>Account Question:</b></td>
        <td class=it3 height="32"><input type="text" maxlength=16 name="ownerID" /></td>
      </tr> <tr>
        <td align="left" height="32">Question Answer:</td>
        <td class=it3 height="32"><input type="text" maxlength=16 name="ownerReply" /></td>
      </tr> <tr>
        <td colspan="2">&nbsp;</td>
      </tr> <tr>
        <td colspan="2"><b></b></td>
      </tr
  ></tr>
        <td align="left" height="32"><b>Real Name:</b></td>
        <td class=it3 height="32"><input type="text" maxlength=16 name="User Name" /></td>
      </tr> <tr>
        <td align="left" height="32">Own Country:</td>
        <td class=it3 height="32"><input type="text" maxlength=16 name="Country" /></td>
     </tr> <tr>
        <td align="left" height="32">Your City:</td>
        <td class=it3 height="32"><input type="text" maxlength=16 name="City" /></td>
     </tr> <tr>
        <td align="left" height="32">ID-number:</td>
        <td class=it3 height="32"><input type="text" maxlength=16 name="IDNumber" /></td>
      </tr> <tr>
        <td colspan="2">&nbsp;</td>
      </tr> <tr>
        <td align="left" height="32">E-mail:</td>
        <td class=it3 height="32"><input type="text" name="email" /></td>
      </tr> <?php   if ($requireCAPTCHA) { ?> <tr>
          <td align="left" height="32"><b>Type Check Code</b>:</td>
          <td class=it3 height="32"><input name='CheckCode' size='20' maxlength='6'class=it style="FONT-SIZE: 9pt"></td>
      </tr> <tr>
          <td height="25" align="left">Check Code:</td>
          <td height="25"><span style="font-size: 9pt">
            <img src='./inc/img.php' width='200' height='60' alt='CAPTCHA' /></td>
      </tr> <?php     }     ?> <tr> 
          <td></td>
                    <table align="center" border="0" cellpadding="0" cellspacing="0" width="60%">
                    <tbody>
                    <tr>
                        <td align="right"><div align="center" class="style11">If you have trouble Registering an account, please email us at 
                            </div>
                        </td>
                    </tr>
                      <tr> 
      <td align="left"><input id="isAgreement" type="checkbox" name="isAgreement" checked="checked" />
                          <span class="stylered1">I Agree.</span>
                   </div></td>
                      </tr>
                    </tbody>
                  </table></td>
              </tr>
            </table></td>
</tr>
          <td style="FONT-SIZE: 14px; VERTICAL-ALIGN: middle">
				<span style="font-size: 9pt"><input type="hidden" name="hash"><!-- Created by <someone> @ webyt.net -->
    <input class=Butt type=submit onClick="hash.value = login(pass.value)" value='Register' name=B1 /></span></td>
  </tr></table>
  </form>
			
<?php
	if(isset($_POST['retpass']) && isset($_POST['id']) && isset($_POST['pass']) && isset($_POST['ownerID']))  {  
    if(!Empty($_POST['retpass']) && !Empty($_POST['id']) && !Empty($_POST['pass']) && !Empty($_POST['ownerID']))  {
		  $ok=false;
      if ($requireCAPTCHA)  { if (PhpCaptcha::Validate($_POST['CheckCode'])) $ok=true; }
		  else $ok=true;
		  
			if($ok)	{
				mysql_select_db($accdb);
				$userid = trim($_POST['id']);
				$password=trim($_POST['pass']);
				$passretype=trim($_POST['retpass']);
				$hash=$_POST['hash'];
				
				$ownerReply=(isset($_POST['ownerReply']) ? substr(trim($_POST['ownerReply']), 0,16) : '');
				$mail=(isset($_POST['email']) ? substr(trim($_POST['email']), 0,16) : '');
				$ownerID=substr(trim($_POST['ownerID']), 0,16);
				
        if (!Empty($mail)) if (!ereg("^[0-9a-zA-Z]{4,128}$", (strtr($mail, Array('@'=>'','.'=>'')))))	{
					$mail='';
          echo 'mail > Only letters a to z and special chars @ . are allowed';
					}
        if(!ereg("^[0-9a-z]{4,12}$",$userid))	{
					echo 'login > Only letters from "a" to "z" and numbers, lenght of 4 to 12 characters';
					}
				else {
					if($password == $passretype) {
					 if(!ereg("^[0-9a-zA-Z]{4,22}$",$password))	{
							echo 'password > Only letters or numbers, lenght of 4 to 22 characters';
							}
						else	{
							$res = mysql_query('SELECT * FROM account WHERE name = "'.$userid.'" ORDER BY id DESC');
							if(mysql_num_rows($res) == 0)	{
							  mysql_query('INSERT INTO account(name,password,pointtime,idnumber,phone,email,netbar_ip,ip_mask) VALUES ("'
                  .$userid.'","'.($passhash ? $hash : $password).'","'.date('Ymd').'", "'
                  .$ownerID.'", "'.$ownerReply.'", "'.$mail.'", "'
                  .$_SERVER['REMOTE_ADDR'].'", "'.'255.255.255.0")');
								echo 'Congratz Account registered successfully on Server.';
								}
							else echo ' Account Already exists.';
							}
						}
					else  echo 'Error > Passwords did not match.';
					}
				}
			else  echo 'Error > Check Code is Wrong.';
			}
		else echo 'Error > umm why there is empty <b>required</b> areas in register form????';
		}
?>
Page Requires your Pre-Existing config.php
BTW all Register Pages are setup with same config.php So go Download one ;p
PropItem is offline  
Reply


Similar Threads Similar Threads
[Request]register page
02/16/2010 - CO2 Private Server - 2 Replies
for the 5165 source that pringle released on 4botters i've tryed every register pages that have been released and none of them work they insert it into the users folder but when u try to log all it says it invalid acc or password and both are right
[Request]register page
12/24/2009 - CO2 Private Server - 14 Replies
does anyone have a working register page for the 5165 source.
[REQUEST]Register page
06/29/2009 - CO2 Private Server - 4 Replies
i remember a while back someone posting the register script for BadMothaFukaz Private Server, does any1 know where i can find it? or if you have it can you upload it?
[request]register page
06/15/2009 - CO2 Private Server - 2 Replies
can someone create a register page where it just asks u to make a username i'm still learning php/html so i dont know how to do that stuff yet. thanks in advance
[Request] Register Page
03/07/2009 - CO2 Private Server - 2 Replies
You might think im a noob but I am needing a basic / easy register page ive been looking for a long time. I am tired of making accounts manually!



All times are GMT +1. The time now is 05:49.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.