<?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 ervices such #
# as webdesign etc.                                              #
##################################################################
*/

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

if (isset($_SESSION['userlogged']) AND $_SESSION['userlogged'] == "YES") {
	header("Location: myprofile.php");
	exit();
}
$step		= isset($_REQUEST['step'])	?	trim($_REQUEST['step'])	:	"1";
$message	= "";
$script		= "";
$objC		= new check();

if (!$objDB) {
	$message	= "Unable to Locate Database Server.";
} else { 
	$objU		= new userside($objDB);
	$objSR		= new settings($objDB);
        $objM			= new misc($objDB);
	$objSpam	= new checkspam(SPAM_PATH, SPAM_URL);
	$objSpam->init_session();
	$arrProvider	= $objU->get_providers();
        
//        $array	= $objS->select();
//        $objS->set_values($array);
        $settingDetail	= $objSR->select();
        $recaptcha_public_key   =($settingDetail['recaptcha_public_key']!="")?$settingDetail['recaptcha_public_key']:$objU->publickey;
        $recaptcha_private_key  =($settingDetail['recaptcha_private_key']!="")?$settingDetail['recaptcha_private_key']:$objU->privatekey;
     

	//fetching step 3,4,5 admin allowed fields
	$sql_fld=$objSR->select_rows(TABLEPREFIX.'SignUpField','*',"Where vActive='1'");
        $allowFieldArray=array();
	if(mysql_num_rows($sql_fld)>0)
	{
		
		while($arr=mysql_fetch_array($sql_fld))
		{
			$allowFieldArray[]=$arr['nSId'];
		}//end while
	}//end if

// handling post back date
		
	if (isset($_POST['SK1'])) {
		if ($step == "6") {
			
		} else {	
			if ($_SESSION['steps'] < $step)
				$_SESSION['steps'] = $step;
		}
	}

	if (isset($_POST['CON1'])) {
		$objU->set_values($_POST);
		if ($step == "2") {

                      
//                        $dates   =   explode('/',$_POST['dDob']);
//                        if(!checkdate($dates[0], $dates[1],$dates[2]))
//                        {
//                            $message	.= "Invalid date format.<br>";
//                            $scriptErr   =   '<script language="javascript">document.frmStep1.dDob.className = "textbox commononetextbox";</script>';
//                        }
//                      
//                       $birthdate = strtotime($_POST['dDob']);
//
//                     $min = strtotime('+18 years', $birthdate);
//
//                     if(time() < $min)
//             {
//	           $message	.= "You don't have the minimum age required to register.</br>";
//             }

 
       
   if($settingDetail['enable_captcha']=='Yes'){
       $response = recaptcha_check_answer($recaptcha_private_key,$_SERVER["REMOTE_ADDR"],$_POST["recaptcha_challenge_field"],$_POST["recaptcha_response_field"]);
       if($message==''){
            $_SESSION['USERNAME']=$_POST['vLogin'];
            $_SESSION['PASSWORD']=$_POST['vPass'];

        if ($response->is_valid )
        {

               $message=$objU->register_step_one();
        } else 
                # set the error code so that we can display it
       {
            $message.= "Invalid Security Code.<br>".'<script language="javascript">document.frmStep1.secretcode.className = "textbox commononetextbox";</script>'.$scriptErr;
        }
       }
   }
   else{
       if($message==''){
            $_SESSION['USERNAME']=$_POST['vLogin'];
            $_SESSION['PASSWORD']=$_POST['vPass'];
            $message=$objU->register_step_one();
       }
   }

        

            		//if ($objSpam->verify(trim($_POST['secretcode'])))
				//$message	= $objU->register_step_one();
			//else
				/*$message	.= "Invalid Security Code.<br>".'<script language="javascript">document.frmStep1.secretcode.className = "errorinput";</script>'.$scriptErr;*/
			if ($message <> "")
				$step	= $step-1;
			else {
				if ($_SESSION['steps'] < $step)
					$_SESSION['steps'] = $step;
			}
			$arrCountry	= $objU->get_country_list();	
			$arrState	= $objU->get_state_list($objU->vCountry);
			$arrCounty	= $objU->get_county_list($objU->vState);
							
		} else {
			if (isset($_SESSION['register_id']) AND $_SESSION['register_id'] <> "") {
				if ($step == "3") {
                                    
                                    $dates   =   explode('/',$_POST['dDob']);
                                    if (!checkdate($dates[0], $dates[1], $dates[2])) {
                                        $message .= "Invalid date format.<br>";
                                        $scriptErr = '<script language="javascript">document.frmStep1.dDob.className = "textbox commononetextbox";</script>';
                                    }

                                    $birthdate = strtotime($_POST['dDob']);

                                    $min = strtotime('+18 years', $birthdate);

                                    if (time() < $min) {
                                        $message .= "You don't have the minimum age required to register.</br>";
                                    }
                                    if($message==''){
					$message	= $objU->register_step_two($_SESSION['register_id']);
					if ($message <> "")
						$step	= $step-1;
					else {
						if ($_SESSION['steps'] < $step)
							$_SESSION['steps'] = $step;
					}
                                    }else{
                                        $step	= $step-1;
                                    }
						
				} else if ($step == "4") {
					$message	= $objU->register_step_three($_SESSION['register_id']);
					if ($message <> "")
						$step	= $step-1;
						else {
							if ($_SESSION['steps'] < $step)
								$_SESSION['steps'] = $step;
						}				
						
				} else if ($step == "5") {
					$message	= $objU->register_step_four($_SESSION['register_id']);
					if ($message <> "")
						$step	= $step-1;
						else {
							if ($_SESSION['steps'] < $step)
								$_SESSION['steps'] = $step;
						}				
						
				} else if ($step == "6") {
                                        if($_SESSION['steps']==2){
                                            $dates   =   explode('/',$_POST['dDob']);
                                            if (!checkdate($dates[0], $dates[1], $dates[2])) {
                                                $message .= "Invalid date format.<br>";
                                                $scriptErr = '<script language="javascript">document.frmStep1.dDob.className = "textbox commononetextbox";</script>';
                                            }

                                            $birthdate = strtotime($_POST['dDob']);

                                            $min = strtotime('+18 years', $birthdate);

                                            if (time() < $min) {
                                                $message .= "You don't have the minimum age required to register.</br>";
                                            }
                                            if ($message <> "")
                                                $step	= 2;
                                            else $message	= $objU->register_step_two($_SESSION['register_id']);
                                            
                                        }
                                       else  if($_SESSION['steps']==3){
                                            $message	= $objU->register_step_three($_SESSION['register_id']);
                                            if ($message <> "")
                                                $step	= 3;	
                                            }
                                        else if($_SESSION['steps']==4){
                                            $message	= $objU->register_step_four($_SESSION['register_id']);
                                            if ($message <> "")
                                                $step	= 4;	
                                            }
                                        else if($_SESSION['steps']==5){
					$message	= $objU->register_step_five($_SESSION['register_id']);
					if ($message <> "")
                                                $step	= 5;	
                                            }					
					
                                        if($step==6){
						if ($_SESSION['steps'] < $step)
							$_SESSION['steps'] = $step;
						header("Location: payment_selection.php");
						exit();
					}				
						
				} 
			} else {
				$step	= "1";
				$objU->set_values($_POST);
				$arrCountry	= $objU->get_country_list();	
				$country	= "";
				if (!empty($arrCountry))
					foreach ($arrCountry as $key=>$value)
						$country	= $value;
                                $objU->vCountry	= $country;
				$arrState	= $objU->get_state_list($country);
				$state		= "";
				if (!empty($arrState))
					foreach ($arrState as $key=>$value)
						$state	= $value;
				$arrCounty	= $objU->get_county_list($state);
				
				
			}
		}
	} else {
		if (isset($_SESSION['register_id'])) { 
			$array	= $objU->select($_SESSION['register_id']);
			$objU->set_values($array);
			$arrCountry	= $objU->get_country_list();	
			if (!empty($arrCountry))
				foreach ($arrCountry as $key=>$value)
					$country	= $value;
			$country=$arrCountry[1];
			$arrState	= $objU->get_state_list($country);
			$arrCounty	= $objU->get_county_list($objU->vState);
		} else {
			$objU->set_values($_POST);
			$arrCountry	= $objU->get_country_list();	
			$country	= "";
			if (!empty($arrCountry))
				foreach ($arrCountry as $key=>$value)
					$country	= $value;
			$country=$arrCountry[1];
			$arrState	= $objU->get_state_list($country);
			$state		= "";
			if (!empty($arrState))
				foreach ($arrState as $key=>$value)
					$state	= $value;
			$arrCounty	= $objU->get_county_list($state);
			$objU->vCountry	= $country;
		}
	}
	if ($step == "1")
		$objSpam->exec_checkspam(0);
	$script		= $objU->get_script($message);
	$message	= $objU->remove_script($message);
}

//***
$flag_step3 = false;
$flag_step4 = false;
$flag_step5 = false;
$step_total = 2;
//checking any one of field is active in step3
        $sql_fld=$objSR->select_rows(TABLEPREFIX.'SignUpField','*',"Where vActive='1' and nSId IN('1','2','3','4','5')");
        if(mysql_num_rows($sql_fld)>0)
        {
            $step_total = $step_total+1;
            $flag_step3 = true;
        }
//checking any one of field is active in step4
	$sql_fld=$objSR->select_rows(TABLEPREFIX.'SignUpField','*',"Where vActive='1' and nSId IN('6','7','8','9','10','11',
					'12','13','14','15','16')");
	if(mysql_num_rows($sql_fld)>0)
	{
            $step_total = $step_total+1;
            $flag_step4 = true;
        }
//checking any one of field is active in step5
        if(in_array('17',$allowFieldArray) OR in_array('18',$allowFieldArray) OR in_array('19',$allowFieldArray) OR in_array('20',$allowFieldArray) OR in_array('21',$allowFieldArray) OR in_array('22',$allowFieldArray) OR in_array('23',$allowFieldArray))
        {
            $step_total = $step_total+1;
            $flag_step5 = true;
        }
//***
include_once ("title.inc.php");
include_once ("tophtml.inc.php");
?>
<script type="text/javascript" src="js/jquery.js"></script>
<script language="javascript">
$(document).ready(function()
{
	$("#vLogin").blur(function()
	{
            if ($.trim($("#vLogin").val())!=''){
		//remove all the class add the messagebox classes and start fading
		$("#msgbox").removeClass().addClass('warningok').text('....Checking...').fadeIn("slow");
		//check the username exists or not from ajax
		$.post("check_username_availability.php",{ user_name:$(this).val() } ,function(data)
                { 
		  if(data=='no') //if username not avaiable
		  {
		  	$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
			{ 
			  //add message and change the class of the box and start fading
			  $(this).html('This username already exists').removeClass().addClass('warning').fadeTo(900,1);
			});		
                   }
                   else if(data=='invalid') //if username not avaiable
		  {
		  	$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
			{ 
			  //add message and change the class of the box and start fading
			  $(this).html('Invalid username. Please remove spaces.').removeClass().addClass('warning').fadeTo(900,1);
			});		
                   }
		  else
		  {
		  	$("#msgbox").fadeTo(200,0.1,function()  //start fading the messagebox
			{ 
			  //add message and change the class of the box and start fading
			  $(this).html('Username available to register').addClass('warningok').fadeTo(900,1);	
			});
		  }
				
                });
            }
 
	});
});
</script>
<script type="text/javascript" src="scripts/calendar.js"></script>
<script type="text/javascript" src="scripts/calendar-setup.js"></script>
<script type="text/javascript" src="scripts/calendar-en.js"></script>
<link href="scripts/calendar.css" rel="stylesheet" type="text/css">
<script type="text/javascript"  src="js/googlefix.js"></script>

<script language="javascript">
function changeCSS(obj, type)
{
	if (type == 'text') {
		obj.className = 'textbox commononetextbox';
	} else if (type == 'textarea') {
		obj.className = 'textbox_textarea commononetextbox';
	} else if (type == 'select') {
		obj.className = 'textbox commononetextbox';
	} else {
		obj.className = 'textbox commononetextbox';
	}
}
function validate1()
{
	var frm	= document.frmStep1;
	
	if ($.trim($("#vLogin").val())==''){
		alert("Please enter loginname.");
		frm.vLogin.focus();
		frm.vLogin.className ='textbox commononetextbox';
		return false;
	}
        if ($.trim($("#vPass").val())==''){
	
		alert("Please enter password.");
		frm.vPass.focus();
		frm.vPass.className ='textbox commononetextbox';
		return false;
	}
        //Password length check
        if ($('#vPass').val().length<6 ) {
            	alert("Password should be atleast 6 characters long.");
		frm.vPass.focus();
		frm.vPass.className ='textbox commononetextbox';
		return false;
	}
        if ($.trim($("#vEmail").val())==''){
                alert("Please enter email address.");
		frm.vEmail.focus();
		frm.vEmail.className ='textbox commononetextbox';
		return false;
	}

	return true;
}

function validate2()
{
	var frm	= document.frmStep2;
	
	if (frm.vTitle.value == "") {
		alert("Please enter title of your profile.");
		frm.vTitle.focus();
		frm.vTitle.className ='textbox commononetextbox';
		return false;
	}
	if (frm.vFirstName.value == "") {
		alert("Please enter your firstname.");
		frm.vFirstName.focus();
		frm.vFirstName.className ='textbox commononetextbox';
		return false;
	}
	if (frm.vLastName.value == "") {
		alert("Please enter your last name.");
		frm.vLastName.focus();
		frm.vLastName.className ='textbox commononetextbox';
		return false;
	}
        if ($.trim($("#dDob").val())==''){
		alert("Please enter date of birth.");
		frm.dDob.focus();
		frm.dDob.className ='textbox commononetextbox';
		return false;
	}
	return true;
}
</script>

<script language="javascript">
function check_option_dosent_matter(obj)
{
	var check_flag = 0;
	var i = 0;
	for(i=0;i<document.frmStep6.elements[obj.name].length;i++){
		if(check_flag == 1){
			document.frmStep6.elements[obj.name][i].checked =false;
		}
		if (document.frmStep6.elements[obj.name][i].value=="null" || document.frmStep6.elements[obj.name][i].value=="")
		{
			if (document.frmStep6.elements[obj.name][i].checked==true)
				check_flag = 1;
		}
	}
}


function check_option(obj){
	for(i=0;i<document.frmStep6.elements[obj.name].length;i++){
		if (document.frmStep6.elements[obj.name][i].value=="null" || document.frmStep6.elements[obj.name][i].value==""){
			if (document.frmStep6.elements[obj.name][i].checked==true)
				document.frmStep6.elements[obj.name][i].checked =false;
			}
	}
}

function validate()
{
	var frm	= document.frmStep6;
	
	return true;

}
</script>
<script type="text/javascript"  src="js/ajax.js"></script>
<script type="text/javascript">
var ajax = new Array();
var sajax = new Array();

function getStateList(sel)
{         $('#girish_state_cont').html('<select name="vState" class="textbox" id="girish_state"></select>');
	var stateCode = sel.options[sel.selectedIndex].value;
	document.getElementById('girish_state').options.length = 0;	// Empty city select box
	if(stateCode.length>0){
		var index = ajax.length;
		ajax[index] = new sack();
		
		ajax[index].requestFile = 'get_state_list.php?id='+stateCode;	// Specifying which file to get
		ajax[index].onCompletion = function(){ createStateList(index) };	// Specify function that will be executed after file has been found
		ajax[index].runAJAX();		// Execute AJAX function
	}
}
function createStateList(index)
{     
	var obj = document.getElementById('girish_state');
	eval(ajax[index].response);	// Executing the response from Ajax as Javascript code	
}


function showstatetext() 
{
    
    
            
            $('#girish_state_cont').html("<input type='text' name='vState' class='textbox' value='' size='40' maxlength='100'>")
        
}
function getCountyList(sel)
{
	var countryCode = sel.options[sel.selectedIndex].value;
	document.getElementById('girish_county').options.length = 0;	// Empty city select box
	if(countryCode.length>0){
		var index = ajax.length;
		ajax[index] = new sack();
		
		ajax[index].requestFile = 'get_county_list.php?id='+countryCode;	// Specifying which file to get
		ajax[index].onCompletion = function(){ createCountyList(index) };	// Specify function that will be executed after file has been found
		ajax[index].runAJAX();		// Execute AJAX function
	}
}
function getCountyList_First(sel)
{
	var countryCode = sel;
	document.getElementById('girish_county').options.length = 0;	// Empty city select box
	if(countryCode.length>0){
		var index = ajax.length;
		ajax[index] = new sack();
		
		ajax[index].requestFile = 'get_county_list.php?id='+countryCode;	// Specifying which file to get
		ajax[index].onCompletion = function(){ createCountyList(index) };	// Specify function that will be executed after file has been found
		ajax[index].runAJAX();		// Execute AJAX function
	}
}

function createCountyList(index)
{
	var obj = document.getElementById('girish_county');
	eval(ajax[index].response);	// Executing the response from Ajax as Javascript code	
}

</script>

	<!--td valign="top" class="white"-->
		<div class="row">
			<div class="inenr-hd"><h2>Join Us</h2></div>
		</div>
				
<?php if(isset($message) && trim($message)!='')
{
?>

		<div class="row">
			<div class="warning"><?php echo $message;?></div>
		</div>
		<?php
		}//end if
		//start first step
		if ($step == "1") 
		{
		
		?>
        
		<div class="row maintext1 reg_form">
			<div class="full_row">
				<div class="eight columns"><h2 class="headings2">General Information</h2></div>
				<div class="four columns"><b>Step 1 of <?php echo $step_total;?> </b></div>
			</div>
			<div class="clear"></div>
			<div class="row tblestyle_admin2">
			<form name="frmStep1" method="post" action="<?php echo $_SERVER['PHP_SELF']?>" onSubmit="return validate1();">
				<!--tr align="left">
					<td colspan="2" class="maintext1"><em> <b>Step 1 of <?php echo $step_total;?> </b> </em></td>
				</tr-->
				<div class="full_row">
					<div class="four columns">Username <span class="warning">*</span></div>
					<div class="five columns margin_R_280">
						<input name="vLogin" id="vLogin" type="text" class="textbox" onKeyDown="changeCSS(this, 'text');" value="<?php echo htmlspecialchars($objU->vLogin)?>" size="40" maxlength="100" onChange="javascript:this.value=this.value.toLowerCase();">
						<span id="msgbox" style="display:none"></span>
					</div>
				</div>
				<div class="full_row">
					<div class="four columns">Password <span class="warning">*</span></div>
					<div class="five columns margin_R_280">
						<input name="vPass" id="vPass" type="password" class="textbox commononetextbox" onKeyDown="changeCSS(this, 'text');" size="40" maxlength="100">
					</div>
				</div>
				<div class="full_row">
					<div class="four columns">Email <span class="warning">*</span></div>
					<div class="five columns margin_R_280">
						<input name="vEmail" id="vEmail" type="text" class="textbox" onKeyDown="changeCSS(this, 'text');" value="<?php echo $objU->vEmail?>" size="30" maxlength="200">
						<p><em>This is only for site information and will not be displayed in public</em></p></div>
				</div>
				<div class="full_row">
					<div class="four columns">I am a</div>
					<div class="five columns margin_R_280">
						<select name="vGender" class="textbox">
							<?php foreach ($arrGender as $key => $value) { ?>
							<option value="<?php echo $value?>" <?php echo $_SESSION['gender_search'] != $value ? "selected" : ""?>>
							<?php echo $value?>
							</option>
							<?php } ?>
						</select>
					</div>
				</div>
				<div class="full_row">
					<div class="four columns">Country</div>
					<div class="five columns margin_R_280" >
						<select name="vCountry" class="textbox" id="girish_country" onchange="getStateList(this)";>
							<?php foreach ($arrCountry as $key => $value) { ?>
							<option value="<?php echo stripslashes($value)?>" <?php echo stripslashes($objU->vCountry) == stripslashes($value) ? "selected" : ""?>>
							<?php echo stripslashes($value)?>
							</option>
							<?php } ?>
						</select>
					</div>
				</div>
				<div class="full_row">
					<div class="four columns">State</div>
					<div class="five columns margin_R_280" id="girish_state_cont">
						<select name="vState" class="textbox" id="girish_state">
							<?php foreach ($arrState as $key => $value) { ?>
							<option value="<?php echo stripslashes($value)?>" <?php echo stripslashes($objU->vState) == stripslashes($value) ? "selected" : ""?>>
							<?php echo stripslashes($value)?>
							</option>
							<?php } ?>
						</select>
					</div>
				</div>
				<div class="full_row">
					<div class="four columns">How did you hear about us</div>
					<div class="five columns margin_R_280">
						<select name="vHearing_Source" class="textbox">
							<?php foreach ($arrHearAboutUs as $key => $value) { ?>
							<option value="<?php echo $value?>" <?php echo $objU->vHearing_Source == $value ? "selected" : ""?>>
							<?php echo $value?>
							</option>
							<?php } ?>
						</select>
					</div>
				</div>
					<!-- <div class="full_row">
					<div class="tewlve maintext1">Please enter the code in the yellow box into the box below.<span class="warning">*</span></div>
					</div>-->
				<?php
						if($settingDetail['enable_captcha']=='Yes'){?><div class="full_row">
					
						
						
					<div class="four columns maintext1">Security code</div>
					<div class="five columns margin_R_280 register_captcha">
						<?php
							echo recaptcha_get_html($recaptcha_public_key, $error);
						?>
					</div>
					 
				</div><?php
						}?>
				 <!--<tr>
							<td class="maintext1">&nbsp;</td>
						  <td class="maintext1"><?php echo $objSpam->print_input()?><input type="hidden" name="CON1" value="CON1">
										<?php echo $objSpam->print_imagetext()?>
							  <img src="images/getnewcode.gif" width="60" height="60" onClick="javascript:document.frmStep1.step.value='1';javascript:frmStep1.submit();">
										<!--<img src="images/getnewcode.gif" width="60" height="60" onClick="javascript:document.frmStep1.step.value='1';javascript:frmStep1.submit();">-->
										<!--<img src="images/getnewcode.gif" width="60" height="60" onClick="location.href='register.php';">
						  </td>
						</tr>-->
				<div class="full_row">
					<div class="four columns">&nbsp;</div>
					<div class="five columns margin_R_280"><input name="CON1" type="submit" class="signupbutton" value=" Continue "><input type="hidden" name="step" value="2"></div>
				</div>
				
			
			</form>
			</div>
		</div>  
		
		
		<!--   TESTTING START  -->
		

		
		
			
		<!-- TESTING END  -->
		
<?php 
}//end first if
else if ($step == "2") 
{ 
   
    ?>		<div>
        <link rel="stylesheet" type="text/css" media="all" href="styles/dhtmlgoodies_calendar.css?random=20051112" />
        <script type="text/javascript" src="js/dhtmlgoodies_calendar.js?random=20060118"></script>

		<div class="row maintext1 reg_form">			
			<div class="full_row">
				<div class="eight columns"><h2 class="headings2">Basic Information</h2></div>
				<div class="four columns"><b>Step 2 of <?php echo $step_total;?></b></div>
			</div>
			<div class="clear"></div>
			<div class="row tblestyle_admin2">
			<form name="frmStep2" method="post" action="<?php echo $_SERVER['PHP_SELF']?>" onSubmit="return validate2();">	
				 <!--<tr align="right">
                      <td colspan="2" class="maintext1"><em> <b>Step 2 of <?php echo $step_total;?> </b> </em></td>
                      </tr>-->
				<div class="full_row">
					<div class="four columns">Profile title <span class="warning">*</span></div>
					<div class="five columns margin_R_280">
						<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="four columns">First name <span class="warning">*</span></div>
					<div class="five columns margin_R_280">
						<input name="vFirstName" type="text" class="textbox" onKeyDown="changeCSS(this, 'text');" value="<?php echo htmlspecialchars($objU->vFirstName)?>" size="30" maxlength="200">
					</div>
				</div>
				<div class="full_row">
					<div class="four columns">Middle name</div>
					<div class="five columns margin_R_280">
						<input name="vMiddleName" type="text" class="textbox" value="<?php echo htmlspecialchars($objU->vMiddleName)?>" size="30" maxlength="200">
					</div>
				</div>
				<div class="full_row">
					<div class="four columns">Last name <span class="warning">*</span></div>
					<div class="five columns margin_R_280">
						<input name="vLastName" type="text" class="textbox"  onKeyDown="changeCSS(this, 'text');" value="<?php echo htmlspecialchars($objU->vLastName)?>" size="30" maxlength="200">
					</div>
				</div>
				<div class="full_row">
					<div class="four columns">Date of birth (mm/dd/yyyy)<span class="warning">*</span></div>
					<div class="five columns margin_R_280">
						<input id='dDob' onClick="javascript:void(0);" name="dDob" value="<?php echo ($objU->dDob)?date('m/d/Y',strtotime($objU->dDob)):'';?>" class="textbox commononetextbox" size="25" readonly>
						<img src="images/cal.gif" value="Cal" onclick="displayCalendar(document.forms[0].dDob,'mm/dd/yyyy',this)"/>
					</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_280">
					<select name="vDate_Preference" class="textbox" >
							<option>Male</option>
                                                        <option>Female</option>
						</select>	
                                        </div>
				</div>
                            <?php  } ?>
				<div class="full_row">
					<div class="four columns">Mobile</div>
					<div class="five columns margin_R_280">
						<input name="vMobile" type="text" class="textbox" onKeyDown="changeCSS(this, 'text');" value="<?php echo htmlspecialchars($objU->vMobile)?>" size="30" maxlength="100">
                      	<p><em>This is only for site information and will not be displayed in public</em></p>
					</div>
				</div>
				<div class="full_row">
					<div class="four columns">Mobile service provider</div>
					<div class="five columns margin_R_280">
						<select name="vProvider" class="textbox" 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>
						<br><span>*<strong>Note:</strong> <em>If the mobile number entered above does not match the "Mobile Service Provider" selected here you will not be able to receive Mobile alerts. </em></span></br>
					</div>
				</div>
				<div class="full_row">
					<div class="four columns">Relationship status</div>
					<div class="five columns margin_R_280">
						<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="four columns">Height</div>
					<div class="five columns margin_R_280">
						<select name="vFeet" class="textbox2 commonTextbox">
							<?php foreach ($arrFeet as $key => $value) { ?>
							<option value="<?php echo $value?>" <?php echo $objU->vFeet == $value ? "selected" : ""?>>
							<?php echo $value?>
							</option>
							<?php } ?>
						  </select>
						  ft 
						  <select name="vInch" class="textbox2 commonTextbox">
							<?php foreach ($arrInch as $key => $value) { ?>
							<option value="<?php echo $value?>" <?php echo $objU->vInch == $value ? "selected" : ""?>>
							<?php echo $value?>
							</option>
							<?php } ?>
						</select> 
						  in
					</div>
				</div>
				<div class="full_row">
					<div class="four columns">Body type</div>
					<div class="five columns margin_R_280">
						<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="four columns">Smoking</div>
					<div class="five columns margin_R_280">
						<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="four columns">Drinking</div>
					<div class="five columns margin_R_280">
						<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="four columns">Children</div>
					<div class="five columns margin_R_280">
						<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="four columns">Ethnicity</div>
					<div class="five columns margin_R_280">
						<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="four columns">Religion</div>
					<div class="five columns margin_R_280">
						<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 } ?>
						</select>
					</div>
				</div>
				<div class="full_row">
					<div class="four columns">Highest level of education</div>
					<div class="five columns margin_R_280">
						<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="four columns">&nbsp;</div>
					<div class="five columns margin_R_280"><input name="CON1" type="submit" class="signupbutton" value=" Continue "><input type="hidden" name="step" value="3"></div>
				</div>
			</form>
			</div>
		</div>


<?php 
}//end 2nd if
elseif ($step == "3") 
{
	if($flag_step3)
	{
?>


		<div class="row maintext1 reg_form">
			<div class="full_row">
				<div class="eight columns"><h2 class="headings2">Appearance</h2></div>
				<div class="four columns"><b>Step 3 of <?php echo $step_total;?></b></div>
			</div>
			
			<div class="clear"></div>
			<div class="row tblestyle_admin2">
				<form name="frmStep3" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
					<!--tr align="right">
					<td colspan="2" class="maintext1"><em> <b>Step 3 of <?php echo $step_total;?> </b> </em></td>
					</tr-->
					<?php
					if(is_array($allowFieldArray))
					{
					if(in_array('1',$allowFieldArray))
					{
					?>
					
					<div class="full_row">
						<div class="row"><b>My looks today</b></div>
						<div class="row">(Describe your looks now. If you change your hair color, get glasses or have a great week at the gym, change your profile.)</div>

						<div class="six columns">
							<textarea name="tmy_looks_today" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_looks_today?></textarea>
						</div>
						<div class="six columns">
							<span class="reg_margin_L">
								<b>Example</b><br>
								I&rsquo;m tall and average weight, which means I&rsquo;m not at my ideal supermodel size yet. My hair is red, a new color for me this month. Everyone tells me I have beautiful skin and piercing blue eyes.
							</span>
						</div>
					</div>
					<?php
						}//end if
						if(in_array('2',$allowFieldArray))
						{
					?>
					
					<div class="full_row">
						<div class="row"><b>My Likes On Any Given Day</b></div>
						<div class="row">(What do you like to do in life? What are the things that make you happy?)</div>

						<div class="six columns">
							<textarea name="tmy_likes_onanyday" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_likes_onanyday?></textarea>
						</div>
						<div class="six columns">
							<span class="reg_margin_L">
								<b>Example</b><br>
								I like sunny days and listening to music.
							</span>
						</div>
					</div>
					<?php
						}//end if
						if(in_array('3',$allowFieldArray))
						{
					?>
					
					<div class="full_row">
						<div class="row"><b>My Dislikes On Any Given Day</b></div>
						<div class="row">(What could you do without? What could go away and life would only get better?)</div>

						<div class="six columns">
							<textarea name="tmy_dislikes_onanyday" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_dislikes_onanyday?></textarea>
						</div>
						<div class="six columns">
							 
						</div>
					</div>
					<?php
						}//end if
						if(in_array('4',$allowFieldArray))
						{
					?>
					
					<div class="full_row">
						<div class="row"><b>My Personality</b></div>
						<div class="row">(You know who you are.)</div>

						<div class="six columns">
							<textarea name="tmy_personality" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_personality?></textarea>
						</div>
						<div class="six columns">
							<span class="reg_margin_L">
								<b>Example</b><br>
								I&rsquo;m shy at first but then you can&rsquo;t shut me up. Most people seem to like me, maybe because I&rsquo;m straightforward and honest. What you see is really what you get. I&rsquo;m not high maintenance or low maintenance &ndash; which I guess makes me middle maintenance. I am always the first one in line for anything and I don&rsquo;t go home until I get what I went out for.
							</samp>
						</div>
					</div>
					<?php
						}//end if
						if(in_array('5',$allowFieldArray))
						{
					?>
					
					<div class="full_row">
						<div class="row"><b>My Mood Today</b></div>
						<div class="row">(What is your mood today or most days? Change this entry whenever you &quot;feel&quot; like it.)</div>

						<div class="six columns">
							<textarea name="tmy_mood_today" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_mood_today?></textarea>
						</div>
						<div class="six columns">
							<span class="reg_margin_L">
								<b>Example</b><br>
								Just had my double latte &ndash; I&rsquo;m HAPPY
							</span>
						</div>
					</div>
					<?php
						}//end if
					}//end if
					?>
					
					<div class="full_row">
						<div class="row"><b>&nbsp;</b></div>
						<div class="row">&nbsp;</div>

						<div class="six columns">
							&nbsp;
						</div>
						<div class="six columns">
							<input name="SK1" type="submit" class="signupbutton" id="SK1" value=" Skip this step ">&nbsp;&nbsp;<input name="CON1" type="submit" class="signupbutton" value=" Continue "><input type="hidden" name="step" value="4">
						</div>
					</div>
					
					
				</form>
			</div>

	</div>

<?php 
	}//end 3rd step array if check
	else
	{
		echo '<html><body>
				<form method="post" action="" name="frmSkip">
					<input type="hidden" name="step" value="4">
				</form>
				<script language="javascript">
						document.frmSkip.submit();
				</script>
			 </body></html>';
	}//end else
}//end third if
else if ($step == "4") 
{ 
	if($flag_step4)
	{
           $step_display = ($flag_step3)?"4":"3";
?>


<div class="row maintext1 reg_form">
			<div class="full_row">
				<div class="eight columns"><h2 class="headings2">Interests</h2></div>
				<div class="four columns"><b>Step <?php echo $step_display;?> of <?php echo $step_total;?> </b></div>
			</div>
			<div class="clear"></div>
			<div class="row tblestyle_admin2">
			<form name="frmStep4" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
			<!--tr align="right">
				  <td colspan="2" class="maintext1"><em> <b>Step <?php echo $step_display;?> of <?php echo $step_total;?> </b> </em></td>
				  </tr-->
				<?php
				if(is_array($allowFieldArray))
				{
					if(in_array('6',$allowFieldArray))
					{
				?>
				<div class="full_row">
					<div class="row"><b>Music</b></div>
					<div class="row">(Concerts / live music fan? Last band you saw live. Top five musical artists. etc.)</div>
					<div class="six columns">
						<textarea name="tmy_music" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_music?></textarea>
					</div>
					<div class="six columns">
						<b>&nbsp;</b><br>
						&nbsp;
					</div>
				</div>
				<?php
					}//end if
					if(in_array('7',$allowFieldArray))
					{
				?>
					
				<div class="full_row">
					<div class="row"><b>Movies</b></div>
					<div class="row">(Favorite five. Best Scene. Couldn't pay me to watch.)</div>
					<div class="six columns">
						<textarea name="tmy_movies" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_movies?></textarea>
					</div>
					<div class="six columns">
						<b>&nbsp;</b><br>
						&nbsp;
					</div>
				</div>
				<?php
					}//end if
					if(in_array('8',$allowFieldArray))
					{
				?>
					
				<div class="full_row">
					<div class="row"><b>TV</b></div>
					<div class="row">(On my TIVO. Shows I wish they'd cancel. Shows I wish they'd bring back.)</div>
					<div class="six columns">
						<textarea name="tmy_tv" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_tv?></textarea>
					</div>
					<div class="six columns">
						<b>&nbsp;</b><br>
						&nbsp;
					</div>
				</div>
				<?php
					}//end if
					if(in_array('9',$allowFieldArray))
					{
				?>
					
				<div class="full_row">
					<div class="row"><b>Sports</b></div>
					<div class="row">(The ones you play.)</div>
					<div class="six columns">
						<textarea name="tmy_sports_play" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_sports_play?></textarea>
					</div>
					<div class="six columns">
						<b>&nbsp;</b><br>
						&nbsp;
					</div>
					
					<div class="clear"></div>
					<div class="row">(The ones you watch.)</div>
					<div class="six columns">
						<textarea name="tmy_sports_watch" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_sports_watch?></textarea>
					</div>
				</div>
				<?php
					}//end if
					if(in_array('10',$allowFieldArray))
					{
				?>
					
				<div class="full_row">
					<div class="row"><b>Travel</b></div>
					<div class="row">(Places you've been.)</div>
					<div class="six columns">
						<textarea name="tmy_travel_been" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_travel_been?></textarea>
					</div>
					<div class="clear"></div>
					<div class="row">(Places you're going.)</div>
					<div class="six columns">
						<textarea name="tmy_travel_going" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_travel_going?></textarea>
					</div>
					
				</div>
				<?php
					}//end if
					if(in_array('11',$allowFieldArray))
					{
				?>
					
				<div class="full_row">
					<div class="row"><b>Arts and Cultural Events</b></div>
					<div class="row">(Special exhibits, guest speakers at local universities, independent films &ndash; What's going on in the city? Talk about it!)</div>
					<div class="six columns">
						<textarea name="tmy_arts_culture_events" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_arts_culture_events?></textarea>
					</div>
					<div class="six columns">
						<b>&nbsp;</b><br>
						&nbsp;
					</div>
				</div>
				<?php
					}//end if
					if(in_array('12',$allowFieldArray))
					{
				?>
					
				<div class="full_row">
					<div class="row"><b>Name your poison and your place</b></div>
					<div class="row">(Capitol City Brewing Company, Capitol Lounge Martini Bar, Urban Restaurant and Wine Bar)</div>
					<div class="six columns">
						<textarea name="tmy_poison_place" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_poison_place?></textarea>
					</div>
					<div class="six columns">
						<b>&nbsp;</b><br>
						&nbsp;
					</div>
				</div>
				<?php
					}//end if
					if(in_array('13',$allowFieldArray))
					{
				?>
				
				<div class="full_row">
					<div class="row"><b>Did someone say &quot;Politics?&quot;</b></div>
					<div class="row">(Where do you stand?)</div>
					<div class="six columns">
						<textarea name="tmy_politics" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_politics?></textarea>
					</div>
					<div class="six columns">
						<b>&nbsp;</b><br>
						&nbsp;
					</div>
				</div>
				<?php
					}//end if
					if(in_array('14',$allowFieldArray))
					{
				?>
					
				<div class="full_row">
					<div class="row"><b>Of the major issues in the world, which are you the most passionate about?</b></div>
					<!--div class="row">( )</div>-->
					<div class="six columns">
						<textarea name="tmy_major_world_issue" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_major_world_issue?></textarea>
					</div>
				</div>
				<?php
					}//end if
					if(in_array('15',$allowFieldArray))
					{
				?>
					
				<div class="full_row">
					<div class="row"><b>What are you doing about it?</b></div>
					<div class="six columns">
						<textarea name="tmy_doings_on_major_world_issue" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_doings_on_major_world_issue?></textarea>
					</div>
					<div class="six columns">
						<b>&nbsp;</b><br>
						&nbsp;
					</div>
				</div>
				<?php
					}//end if
					if(in_array('16',$allowFieldArray))
					{
				?>
					
				<div class="full_row">
					<div class="row"><b>If I could build a guy/girl&hellip;</b></div>
					<div class="row">(Build your perfect mate. Keep it PG)</div>
					<div class="six columns">
						<textarea name="tmy_perfect_mate" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_perfect_mate?></textarea>
					</div>
					<div class="six columns">
						<b>&nbsp;</b><br>
						&nbsp;
					</div>
				</div>
					
				<div class="full_row">
					<div class="row"><b>Example</b></div>
					<div class="row">(I&rsquo;d like a guy taller than me but not tall. He should like movies, action is ok but documentaries are not. He has to have been taught manners and know when to use them. Hopefully he watches football but not baseball and likes to host parties as well as attend them.)</div>
				</div>
				<?php
					}//end if
				}//end if
				?>
				
				<div class="full_row">
					<div class="six columns">
						&nbsp;
					</div>
					<div class="six columns">
						<input name="SK1" type="submit" class="signupbutton" id="SK1" value=" Skip this step ">&nbsp;&nbsp;<input name="CON1" type="submit" class="signupbutton" value=" Continue "><input type="hidden" name="step" value="5">
					</div>
				</div>
				
				</form>
			</div>
		</div>
		

<?php 
	}//end 4th step array if check
	else
	{
		echo '<html><body>
				<form method="post" action="" name="frmSkip">
					<input type="hidden" name="step" value="5">
				</form>
				<script language="javascript">
						document.frmSkip.submit();
				</script>
			 </body></html>';
	}//end else
}//end 4th if
else if ($step == "5") 
{ 
    if($flag_step5)
    {
        if($flag_step3 && $flag_step4){
            $step_display="5";
        } else if(!$flag_step3 && !$flag_step4){
            $step_display="3";
        }else{
            $step_display="4";
        }
    ?>
	
	<div class="row maintext1 reg_form">
		<div class="full_row">
			<div class="eight columns">
				<h2 class="headings2">
					 <?php                          
						//if(in_array('17',$allowFieldArray) OR in_array('18',$allowFieldArray) OR in_array('19',$allowFieldArray) OR in_array('20',$allowFieldArray) OR in_array('21',$allowFieldArray) OR in_array('22',$allowFieldArray) OR in_array('23',$allowFieldArray))
						//?>Lifestyle<?php // ?>
				</h2>
			</div>
			<div class="four columns"><b>Step <?php echo $step_display;?> of <?php echo $step_total;?> </b></div>
		</div>
		<div class="clear"></div>
		<div class="row maintext1 tblestyle_admin2">
		<form name="frmStep5" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
			<!--tr align="right">
				  <td colspan="2" class="maintext1"><em> <b>Step <?php echo $step_display;?> of <?php echo $step_total;?> </b> </em></td>
				  </tr-->
				<?php
				if(is_array($allowFieldArray))
				{
					if(in_array('17',$allowFieldArray))
					{
				?>
			<div class="full_row">
				<div class="row"><b>A day in my life</b></div>
				<div class="row">(Describe a typical day in your life from the moment you rise to the moment you lie down.)</div>
				<div class="six columns">
					<textarea name="taday_in_my_life" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->taday_in_my_life?></textarea>
				</div>
				<div class="clear"></div>
				<div class="row">
					<b>Example</b><br>
					Alarm goes off at 7:30. I go for a quick mile run &ndash; that&rsquo;s right just a mile. After that, I shower and get ready for work and take the train to my office. I never take a lunch but can be seen at Starbucks many times a day. I usually leave work and go straight to happy hour (Thursdays and Fridays), otherwise I go to an exercise class. I dine alone or with friends and then voila! it&rsquo;s time to go to bed and start all over again.
				</div>
			</div>
			<?php
				}//end if
				if(in_array('18',$allowFieldArray))
				{
			?>
			
			
			<div class="full_row">
				<div class="row"><b>Nightlife</b></div>
				<div class="six columns">
					<div class="five columns">
						<div class="row"><b>In</b></div>
						<div class="row">
							<select name="vmy_night_life_in2" class="textbox">
								<?php foreach ($arrNightLifeIn as $key => $value) { ?>
								<option value="<?php echo $value?>" <?php echo $objU->vmy_night_life_in == $value ? "selected" : ""?>>
								<?php echo $value?>
								</option>
								<?php } ?>
							</select>
						</div>
					</div>
					<div class="five columns">
						<div class="row"><b>Out</b></div>
						<div class="row">
							<select name="vmy_night_life_out" class="textbox">
								<?php foreach ($arrNightLiftOut as $key => $value) { ?>
								<option value="<?php echo $value?>" <?php echo $objU->vmy_night_life_out == $value ? "selected" : ""?>>
								<?php echo $value?>
								</option>
								<?php } ?>
							</select>
						</div>
					</div>
				</div>
				<div class="six columns">
					<b>&nbsp;</b><br>
					&nbsp;
				</div>
			</div>
			<?php
				}//end if
				if(in_array('19',$allowFieldArray))
				{
			?>
			
			<div class="full_row">
				<div class="row"><b>Food</b></div>
				<div class="row">(What, where, when, and how I like to eat.)</div>
				<div class="six columns">
					<textarea name="tmy_food" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_food?></textarea>
				</div>
			</div>
			<?php
				}//end if
				if(in_array('20',$allowFieldArray))
				{
			?>
			
			<div class="full_row">
				<div class="row"><b>Money</b></div>
				<div class="row">(What do you spend your money on?)</div>
				<div class="six columns">
					<textarea name="tmy_money" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_money?></textarea>
				</div>
			</div>
			<?php
				}//end if
				if(in_array('21',$allowFieldArray))
				{
			?>
			
			<div class="full_row">
				<div class="row"><b>Name the last restaurant you visited</b></div>
				<div class="six columns">
					<textarea name="tmy_last_restaurant" cols="60" rows="2" class="textbox_textarea" onKeyDown="changeCSS(this, 'textarea');" ><?php echo $objU->tmy_last_restaurant?></textarea>
				</div>
			</div>
			<?php
				}//end if
				if(in_array('22',$allowFieldArray))
				{
			?>
			
			<div class="full_row">
				<div class="row"><b>Review it</b></div>
				<div class="six columns">
					<textarea name="tmy_last_restaurant_review" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_last_restaurant_review?></textarea>
				</div>
			</div>
			<?php
				}//end if
				if(in_array('23',$allowFieldArray))
				{
			?>
			
			<div class="full_row">
				<div class="row"><b>What have you done for charity's sake?</b></div>
				<div class="six columns">
					<textarea name="tmy_charity" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_charity?></textarea>
				</div>
			</div>
			
			<?php
				}//end if
			}//end if
			?>
			
			<div class="full_row">
				<div class="six columns">
					
				</div>
				<div class="six columns">
					<input name="CON1" type="submit" class="signupbutton" value=" Continue "><input type="hidden" name="step" value="6">
				</div>
			</div>
			
		</form>
		</div>
	</div>


            <?php } else {?>

                <form name="frmStep5" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
                <input name="CON1" type="hidden" ><input type="hidden" name="step" value="6">
                </form>
                <script>document.frmStep5.submit();</script>
            <?php
            }
}//end 5th if ?>
<div id="hide"><?php echo $script?></div>

            

        <!--<td width="28%" valign="top"><?php //include_once("registermenu.inc.php");?></td>-->
      
<?php include_once('bottomhtml.inc.php');?>
