HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/baretube.com/signup_xprofiles.php
<?
session_start();
include('admin/db.php'); 


//XPROFILES CONFIG
$API_TOUR_URL = "http://affiliates.xprofiles.com/in/UxS4/kYYFe/?track=default";
//Enter your revshare url above. You can find it on http://affiliates.xprofiles.com/promotools/joinapi/?tour=52 after logging in
include($basepath.'/xprofiles.functions.php'); 


if($_POST[signup_username] && $_POST[signup_password] && $_POST[signup_email]) {
	$_POST = mysql_real_escape_array($_POST);
	$errors = array();
	$thisusername = strip_tags($_POST[signup_username]);
	$thispassword = md5(strip_tags($_POST[signup_password]));
	$thisemail = strip_tags($_POST[signup_email]);
	if(!empty($_POST[gender])) {
		$thisgender = '0';
	}
	else {
		$thisgender = $_POST[gender];
	}
	$result = mysql_query("SELECT * FROM users WHERE username LIKE '%$thisusername%'");
	if(mysql_num_rows($result) > 0) {
		$errors[] = "This username already exists in our system.";
	}
	if(!ctype_alnum($thisusername)) {
		$errors[] = "Username contains invalid characters. Please use only A-Z and 0-9, no spaces are special characters"; 
	}
	$result = mysql_query("SELECT * FROM users WHERE email = '$thisemail'");
	if(mysql_num_rows($result) > 0) {
		$errors[] = "This email address already exists in our system.";
	}
	if((!eregi('@',$thisemail) || !eregi('.',$thisemail)) && !ctype_alnum($thisemail)) {
		$errors[] = "Invalid Email Address";
	}
	if($enable_signup_captcha) {
		if(strtolower($_POST[captchaaa]) != strtolower($_SESSION[captcha])) {
			$errors[] = "Incorrect CAPTCHA Response";
		}
	}
	if(!$errors) {
		if($require_account_confirmation) {
			$validationCode = uniqid().uniqid().uniqid();
		}
		mysql_query("INSERT INTO users (username,password,email,last_ip,validate) VALUES ('$thisusername','$thispassword','$thisemail','$_SERVER[REMOTE_ADDR]','$validationCode')");
		
		
		//BOF XPROFILES CODE
			
		$res = rest_helper($API_TOUR_URL,
        array(
        'track' => 'default',
        'username' => $thisusername,
        'password' => $thispassword,
        'gender' => $thisgender,
        'ip' => $_SERVER[REMOTE_ADDR],
        'email' => $thisemail
    ), 'POST');
		//EOF XPROFILES CODE
		
		header("Location: signup_thankyou.php");
        exit();
		
		
		if($require_account_confirmation) {
			$subject = "$sitename Account Verification";
			$body = "
You must verify your account at $sitename before you can login!
Please click the link below, or paste it into your browsers address bar.
			
$basehttp/validateAccount.php?id=$validationCode
			";
			$to = $thisemail;
			$from = "From: $sitename <$admin_email>";
			mail($to,$subject,$body,$from);
		}
		exit();
	}
}

$title = 'Signup'; 
$headertitle = 'Signup for your FREE account!';
include($basepath.'/templates/template.overall_header.php'); ?>
Signup for a personal account so you can save videos, leave comments, and utilize other advanced features! <br /><br />
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr>
    <td valign="top" scope="row">
        <? if($errors) { ?>
	    <div align='left'> <strong>The following errors have occured:</strong><br />
        <? 
		foreach($errors as $i) {
			echo "<span style='color: #FF0000;'>&bull; $i</span><br>";
		} 
		?>
      <br />
      </div>
      <? } ?>
      <form id="form1" name="form1" method="post" action="">
        <table border="0" align="left">
          <tr>
            <td width="139">Username</td>
            <td width="979"><input class='f02' name="signup_username" type="text" id="signup_username" size="35" maxlength="255" value='<? echo $thisusername; ?>' /></td>
          </tr>
          <tr>
            <td>Password</td>
            <td><input class='f02'  name="signup_password" type="text" id="signup_password" size="35" maxlength="35" value='<? echo $thispassword; ?>' /></td>
          </tr>
          <tr>
            <td>Email Address</td>
            <td><input class='f02'  name="signup_email" type="text" id="signup_email" size="35" maxlength="35" value='<? echo $thisemail; ?>' /></td>
          </tr>
          <tr>
          	<td>Gender</td>
            <td><input type='radio' name='gender' value='0' checked>Male<input type='radio' name='gender' value='1'>Female<input type='radio' name='gender' value='2'>Transsexual<input type='radio' name='gender' value='3'>Couple
			</td>
          </tr>
          <? if($enable_signup_captcha) { ?>
          <tr>
            <td>Human?</td>
            <td><img src='/captcha.php' /><br />
            <input class='f02'  name="captchaaa" type="text" id="signup_email" size="10" maxlength="35" value='' /></td>
          </tr>          
          <? } ?>
          <tr>
            <td colspan="2" align="center"><br />
            <input  type="submit" name="button" id="button" value="Signup" />
            <br />
            <br />
            Note: All fields are mandatory.</td>
          </tr>
        </table>
      </form>
      <br class="clearfloat" />
      </td>
  </tr>
</table>
<br />
<? include($basepath.'/templates/template.overall_footer.php'); ?>