Social Engine Mobile Plugin Registration Page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Social Engine Mobile Plugin Registration Page

    mobile_signup.php
    Code:
    <?php	
    include('mobile_header.php');   
    	 
    ?>   
      
      
      <img src='./images/icons/signup48.gif' border='0' class='icon_big'>   
      
      <div class='page_header'>create an account</div>   
      </div>   
      
      <br />   
      
    <form id="Register" action="mobile_signup_verify.php" method="POST" disablebuttons="all">   
      <table cellpadding="2" cellspacing="0" border="0">   
    	<tr>   
    	  <td width="130">   
    		<vllabel validators="UserID,UserIDExist" errclass="error" for="UserID" cerrclass="controlerror">User ID:</vllabel>   
    	  </td>   
    	  <td width="140">   
    		<input name="UserID" type="text" class="control" id="UserID" size="15">   
    		<vlvalidator name="UserID" type="required" control="UserID" errmsg="User ID required">   
    		<vlvalidator name="UserIDExist" type="custom" control="UserID" errmsg="User ID already exist" function="UserIDCheck">   
    	  </td>   
    	  <td width="300" rowspan="7" valign="top">   
    		<vlsummary class="error" headertext="Error(s) found:" displaymode="bulletlist">   
    	  </td>   
    	</tr>   
    	<tr>   
    	  <td>   
    		<vllabel errclass="error" validators="Password,PassCmp" for="Password" cerrclass="controlerror">Password:</vllabel>   
    	  </td>   
    	  <td>   
    		<input name="Password" type="password" class="control" id="Password" size="15">   
    		<vlvalidator type="required" name="Password" control="Password" errmsg="Password required">   
    		<vlvalidator name="PassCmp" type="compare" control="Password" comparecontrol="Password2"   
    		  operator="e" validtype="string" errmsg="Both Password fields must be equal">   
    	  </td>   
    	</tr>   
    	<tr>   
    	  <td>   
    		<vllabel validators="Password,PassCmp" errclass="error" for="Password2" cerrclass="controlerror">Confirm Password:</vllabel>   
    	  </td>   
    	  <td>   
    		<input name="Password2" type="PASSWORD" class="control" id="Password2" size="15">   
    	  </td>   
    	</tr>   
    	<tr>   
    	  <td>   
    		<vllabel errclass="error" validators="NameReq,NameRegExp" for="Name" cerrclass="controlerror">Name:</vllabel>   
    	  </td>   
    	  <td>   
    		<input name="Name" type="text" class="control" id="Name" size="15">   
    		<vlvalidator type="required" name="NameReq" control="Name" errmsg="Name required">   
    		<vlvalidator type="regexp" name="NameRegExp" control="Name" regexp="/^[A-Za-z'\s]*$/" errmsg="Invalid Name">   
    	  </td>   
    	</tr>   
    	<tr>   
    	  <td>   
    		<vllabel errclass="error" validators="EmailReq,Email" for="Email" cerrclass="controlerror">E-mail:</vllabel>   
    	  </td>   
    	  <td>   
    		<input name="Email" type="TEXT" class="control" id="Email" size="15">   
    		<vlvalidator type="required" name="EmailReq" control="Email" errmsg="E-mail required">   
    		<vlvalidator type="format" format="email" name="Email" control="Email" errmsg="Invalid E-mail">   
    	  </td>   
    	</tr>   
    	<tr>   
    	   
      
    	  <td colspan=2>   
    		<input name="Agreement" type="checkbox" id="Agreement" value="1">   
    		<vllabel errclass="error" validators="Agreement" for="Agreement">I agree with the terms of service</vllabel>   
    		<vlvalidator type="required" name="Agreement" control="Agreement" errmsg="Agreement checkbox must be selected">   
    	  </td>   
    	</tr>   
    	<tr>   
    	  <td colspan="2">   
    		<input type="submit" class="control" value="Register">   
    		<input type="reset" class="control" value="Reset">   
    	  </td>   
    	</tr>   
      </table>   
    </form>
    mobile_signup_verify.php

    Code:
      
    <?php   
    include "mobile_header.php";   
    ?>   
    <?php   
    $sDatabase = ' database ';   
    $sHostname = 'localhost';   
    //$sPort	 = 3306;   
    $sUsername = 'databae user';   
    $sPassword = ' password ';   
    $sTable	= 'se_users';   
      
    $conn = mysql_connect("$sHostname", $sUsername, $sPassword) or die(mysql_error());   
    mysql_select_db($sDatabase);   
      
    ;   
      
    function UserIDCheck($sValue, &$oStatus)   
    {   
    	global $sTable;   
    	$sUserID = addslashes($sValue);   
    	   
    	$oStatus->bValid = false;   
    	$oStatus->sErrMsg = "User ID '$sValue' already exist";   
    	   
    	$sQuery = "SELECT user_email FROM $sTable WHERE user_email = '$sUserEmail'";   
    	if ($rRecordset = mysql_query($sQuery))   
    	{   
    		$oStatus->bValid = mysql_num_rows($rRecordset) == 0;   
    		mysql_free_result($rRecordset);   
    	}   
    }   
      
      
    if(! $conn )   
    {   
      die('Could not connect: ' . mysql_error());   
    }   
      
    if(! get_magic_quotes_gpc() )   
    {   
       $email = addslashes ($_POST['Email']);   
       $pass = addslashes ($_POST['Password']);   
       $disname = addslashes ($_POST['Name']);   
       $name = addslashes ($_POST['UserID']);   
      
    }   
    else   
    {   
       $disname = $_POST['Name'];   
       $name = $_POST['UserID'];   
       $email = $_POST['Email'];   
       $pass = $_POST['Password'];   
    }   
       $sql = "INSERT INTO se_users ". "(user_level_id,user_password_method,user_enabled,user_displayname, user_username, user_email,user_newemail,user_password) ".   
    	   "VALUES "."('1','1','1','$disname', '$name', '$email','$email','".md5($pass)."')";   
    mysql_select_db('se_users');   
    $retval = mysql_query( $sql, $conn );   
    if(! $retval )   
    {   
      die('Could not enter data: ' . mysql_error());   
    }   
    echo "account successfully created.\n";   
    echo "<a href=\"mobile_login.php\">Login Now</a>.\n";   
    mysql_close($conn);   
      
      
      
    ?>
    sigpic

    #2
    Wich social engine?

    Comment


      #3
      Originally posted by qullanici1 View Post
      Wich social engine?
      for 3.12+ versions
      sigpic

      Comment

      Working...
      X