<?php 
/*
##################################################################
#                       PHP 4&5 MySQL 4&5                        #
##################################################################
#           Copyright (c) 2004-2008 Armia Systems Inc            #
##################################################################
#               This file is part of Cybermatch site             #
##################################################################
#    Developed By: simi (simi@armia.com)                         #

##################################################################
#               Developed On:   03-04-2008                       #
##################################################################
#               Modified By:                                     #
##################################################################
#               Modified On:                                     #
##################################################################
# This script may not be distributed, sold, given away for free  #
# to third party, or used as a part of any internet services 	 #
# such as webdesign etc.                                         #
##################################################################
*/

require_once ("config.inc.php");
require_once ("includes/userlogincheck.inc.php");
require_once ("includes/mysql.inc.php");
require_once ("includes/arrays.inc.php");
require_once ("classes/settings.class.php");
require_once ("classes/userside.class.php");
require_once ("classes/misc.class.php");

$message	= "";
$script		= "";

$objC		= new check();
if (!$objDB) {
	$message	= "Unable to Locate Database Server.";
} else {
	$objU			= new userside($objDB);
	$objS			= new settings($objDB);
	$objM			= new misc($objDB);
	$objS->set_variables();
	$arrProvider	= $objU->get_providers();	
	if (isset($_POST['CON1'])) {
		$objU->set_values($_POST);
		$message	= $objU->register_step_two($_SESSION['user_id']);
		if ($message == "")
			$message	.= "Your basic information saved.<br>";
	} else {
		$array	= $objU->select($_SESSION['user_id']); 
		$objU->set_values($array);
	}
	
	$script		= $objM->get_script($message);
	$message	= $objM->remove_script($message);
}
include_once ("title.inc.php");
include_once ("tophtml.inc.php");
?>
<script type="text/javascript"  src="js/googlefix.js"></script>
<script language="javascript" type="text/javascript">
function changeCSS(obj, type)
{
	if (type == 'text') {
		obj.className = 'textbox';
	} else if (type == 'textarea') {
		obj.className = 'textbox_textarea';
	} else if (type == 'select') {
		obj.className = 'textbox';
	} else {
		obj.className = 'textbox';
	}
}
function validate2()
{
	var frm	= document.frmStep2;
	
	if (frm.vTitle.value == "") {
		alert("Please enter title of your profile.");
		frm.vTitle.focus();
		frm.vTitle.className ='errorinput';
		return false;
	}
	if (frm.vFirstName.value == "") {
		alert("Please enter your firstname.");
		frm.vFirstName.focus();
		frm.vFirstName.className ='errorinput';
		return false;
	}
	if (frm.vLastName.value == "") {
		alert("Please enter your last name.");
		frm.vLastName.focus();
		frm.vLastName.className ='errorinput';
		return false;
	}
	return true;
}
</script>

<div class="row">
	<div class="eight columns">
		<div class="row"><div class="inenr-hd"><h2>Basics</h2></div></div>
		<div class="search-rslts">
			<div class="row">
				<h2 class="headings2">Personal info ( Will not be displayed in your profile)</h2>
			</div>
			<div class="row">
			<form name="frmStep2" method="post" action="<?php echo $_SERVER['PHP_SELF']?>" onSubmit="return validate2();">
			<div class="newdesignforinput maintext1">
				<?php if(isset($message) && trim($message)!='')
				{
				?>
				
				<div class="full_row">
					<div class="maintext1 success"><?php echo $message;?></div>
				</div>
				<?php }//end if?>
				<div class="full_row">
					<div class="three columns">First Name <span class="warning">*</span></div>
					<div class="five columns margin_R_200">
						<input name="vFirstName" type="text" value="<?php echo htmlspecialchars($objU->vFirstName)?>" class="textbox" size="30" maxlength="200" onKeyDown="changeCSS(this, 'text');">
					</div>
				</div>
				
				<div class="full_row">
					<div class="three columns">Middle Name</div>
					<div class="five columns margin_R_200">
						<input name="vMiddleName" type="text" value="<?php echo htmlspecialchars($objU->vMiddleName)?>" class="textbox" size="30" maxlength="200">
					</div>
				</div>
				
				<div class="full_row">
					<div class="three columns">Last Name <span class="warning">*</span></div>
					<div class="five columns margin_R_200">
						<input name="vLastName" type="text" value="<?php echo htmlspecialchars($objU->vLastName)?>" class="textbox" size="30" maxlength="200"  onKeyDown="changeCSS(this, 'text');">
					</div>
				</div>
				<?php if($enable_same_sex_search=='Y'){ ?>
                            <div class="full_row">
					<div class="four columns">Dating Gender Preference</div>
					<div class="five columns margin_R_200">
					<select name="vDate_Preference" class="textbox" >
							<option <?php if($objU->vDate_Preference=='Male'){echo "selected";}?> >Male</option>
                                                        <option <?php if($objU->vDate_Preference=='Female'){echo "selected";}?>>Female</option>
						</select>	
                                        </div>
				</div>
                            <?php  } ?>
				<div class="full_row">
					<div class="three columns">Mobile</div>
					<div class="five columns margin_R_200">
						<input name="vMobile" type="text" class="textbox" value="<?php echo htmlspecialchars($objU->vMobile)?>" size="30" maxlength="200"  onKeyDown="changeCSS(this, 'text');">
					</div>
				</div>
				 
				<div class="full_row">
					<div class="three columns">Mobile Service Provider</div>
					<div class="five columns margin_R_200">
						<select name="vProvider" class="textbox3" onKeyDown="changeCSS(this, 'select');">
							<?php foreach ($arrProvider as $key => $value) { ?>
							<option value="<?php echo $value['vSMSgateway']?>" <?php echo $objU->vProvider == $value['vSMSgateway'] ? "selected" : ""?>>
							<?php echo $value['provider']?>
							</option>
							<?php } ?>
						</select>
					</div>
				</div>
				
				<div class="full_row">
					Note: <em>You will not be able to receive mobile alerts, if you do not enter a valid mobile number with country and area code<br> ( i.e. 18885554657) along with the correct  mobile service provider for that mobile number.</em>
				</div>
				
				<div class="full_row">
					<h2 class="headings2">My Basic Info (will be displayed in your profile)</h2>
				</div>
				<div class="clear"></div>
				
				<div class="full_row">
					<div class="three columns">Profile Title <span class="warning">*</span></div>
					<div class="five columns margin_R_200">
						<input name="vTitle" type="text" class="textbox" onKeyDown="changeCSS(this, 'text');" value="<?php echo $objU->vTitle?>" size="35" maxlength="250">
					</div>
				</div>
				
				<div class="full_row">
					<div class="three columns">Current Relationship Status</div>
					<div class="five columns margin_R_200">
						<select name="vRealtion_Status" class="textbox">
							<?php foreach ($arrRelationShipStatus as $key => $value) { ?>
							<option value="<?php echo $value?>" <?php echo $objU->vRealtion_Status == $value ? "selected" : ""?>>
							<?php echo $value?>
							</option>
							<?php } ?>
						</select>
					</div>
				</div>
				
				<div class="full_row">
					<div class="three columns">Height</div>
					<div class="five columns margin_R_200">
						<div class="four columns">
							<select name="vFeet" >
								<?php foreach ($arrFeet as $key => $value) { ?>
								<option value="<?php echo $value?>" <?php echo $objU->vFeet == $value ? "selected" : ""?>>
								<?php echo $value?>
								</option>
								<?php } ?>
							</select>
						</div>
						<div class="two columns" align="center">
							<b>ft </b>
						</div>
						<div class="four columns">
						<select name="vInch" class="">
							<?php foreach ($arrInch as $key => $value) { ?>
							<option value="<?php echo $value?>" <?php echo $objU->vInch == $value ? "selected" : ""?>>
							<?php echo $value?>
							</option>
							<?php } ?>
						</select> 
						</div>
						<div class="two columns" align="center"><b>in</b></div>
					</div>
				</div>
				
				<div class="full_row">
					<div class="three columns">Body Type</div>
					<div class="five columns margin_R_200">
						<select name="vBody_Type" class="textbox">
							<?php foreach ($arrBodyType as $key => $value) { ?>
							<option value="<?php echo $value?>" <?php echo $objU->vBody_Type == $value ? "selected" : ""?>>
							<?php echo $value?>
							</option>
							<?php } ?>
						</select>
					</div>
				</div>
				
				<div class="full_row">
					<div class="three columns">Smoking</div>
					<div class="five columns margin_R_200">
						<select name="vSmoking" class="textbox">
							<?php foreach ($arrSmoking as $key => $value) { ?>
							<option value="<?php echo $value?>" <?php echo $objU->vSmoking == $value ? "selected" : ""?>>
							<?php echo $value?>
							</option>
							<?php } ?>
						</select>
					</div>
				</div>
				
				<div class="full_row">
					<div class="three columns">Drinking</div>
					<div class="five columns margin_R_200">
						<select name="vDrinking" class="textbox">
							<?php foreach ($arrDrinking as $key => $value) { ?>
							<option value="<?php echo $value?>" <?php echo $objU->vDrinking == $value ? "selected" : ""?>>
							<?php echo $value?>
							</option>
							<?php } ?>
						</select>
					</div>
				</div>
				
				<div class="full_row">
					<div class="three columns">Children</div>
					<div class="five columns margin_R_200">
						<select name="nChildren" class="textbox">
							<?php foreach ($arrChildren as $key => $value) { ?>
							<option value="<?php echo $value?>" <?php echo $objU->nChildren == $value ? "selected" : ""?>>
							<?php echo $value?>
							</option>
							<?php } ?>
						</select>
					</div>
				</div>
				
				<div class="full_row">
					<div class="three columns">Ethnicity</div>
					<div class="five columns margin_R_200">
						<select name="vEthinicity" class="textbox">
							<?php foreach ($arrEthnicity as $key => $value) { ?>
							<option value="<?php echo $value?>" <?php echo $objU->vEthinicity == $value ? "selected" : ""?>>
							<?php echo $value?>
							</option>
							<?php } ?>
						</select>
					</div>
				</div>
				
				<div class="full_row">
					<div class="three columns">Religion</div>
					<div class="five columns margin_R_200">
						<select name="vReligion" class="textbox">
							<?php foreach ($arrReligion as $key => $value) { ?>
							<option value="<?php echo $value?>" <?php echo $objU->vReligion == $value ? "selected" : ""?>>
							<?php echo $value?>
							</option>
							<?php } ?>
							<option value="Other">Other</option>
							<option value="None">None</option>
						</select>
					</div>
				</div>
				
				<div class="full_row">
					<div class="three columns">Highest Education</div>
					<div class="five columns margin_R_200">
						<select name="vEducation" class="textbox">
							<?php foreach ($arrEducation as $key => $value) { ?>
							<option value="<?php echo $value?>" <?php echo $objU->vEducation == $value ? "selected" : ""?>>
							<?php echo $value?>
							</option>
							<?php } ?>
						</select>
					</div>
				</div>
				
				<div class="full_row">
					<div class="three columns">&nbsp;</div>
					<div class="five columns margin_R_200">
						<input name="CON1" type="submit" class="signupbutton" value="Update Info">
						<input type="hidden" name="step" value="3">
						<input type="hidden" name="dDob" value="<?php echo date("m/d/Y",strtotime($objU->dDob));?>">
					</div>
				</div>
				
			</div>
			</form>
			<div id="hide"><?php echo $script?></div>
		</div>
		</div>
	</div>
	<div class="four columns right search_result_R">
		<?php include_once ("left.inc.php");?>
	</div>
</div>



<?php include_once('bottomhtml.inc.php');?>
