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

	if (isset($_POST['CON1'])) {
		$objU->set_values($_POST);
		$message	= $objU->register_step_four($_SESSION['user_id']);
		if ($message == "")
			$message	.= "Your interest(s) 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';
	}
}
</script>

<div class="row">
	<div class="eight columns">
		<div class="row"><div class="inenr-hd"><h2>My Interests </h2></div></div>
		<div class="row">
			<div class="search-rslts maintext1 my_interests">
				<form name="frmStep4" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
					<div class="row newdesignforinput">
						<?php if(isset($message) && trim($message)!='')
							  {
						?>
                      <div class="row maintext1 success"><?php echo $message;?></div>
						<?php }//end if?>
						<?php
						if(is_array($allowFieldArray))
						{
						if(in_array('6',$allowFieldArray))
						{
						?>
					</div>
					
					<div class="full_row">
						<div class="twelve"><b>Music</b></div>
						<div class="twelve">
							Concerts / live music fan? Last band you saw live. Top five musical artists. etc.)
						</div>
						<div class="twelve">
							<textarea name="tmy_music" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_music?></textarea>
						</div>
					</div>
					<?php
						}//end if
						if(in_array('7',$allowFieldArray))
						{
					?>
					
					<div class="full_row">
						<div class="twelve"><b>Movies</b></div>
						<div class="twelve">
							(Favorite five. Best Scene. Couldn't pay me to watch.)
						</div>
						<div class="twelve">
							<textarea name="tmy_movies" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_movies?></textarea>
						</div>
					</div>
					<?php
						}//end if
						if(in_array('8',$allowFieldArray))
						{
					?>
					
					
					<div class="full_row">
						<div class="twelve"><b>TV</b></div>
						<div class="twelve">
							(On my TIVO. Shows I wish they'd cancel. Shows I wish they'd bring back.)
						</div>
						<div class="twelve">
							<textarea name="tmy_tv" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_tv?></textarea>
						</div>
					</div>
					<?php
						}//end if
						if(in_array('9',$allowFieldArray))
						{
					?>
					
					<div class="full_row">
						<div class="twelve"><b>Sports</b></div>
						<div class="twelve">
							(The ones you play.)
						</div>
						<div class="twelve">
							<textarea name="tmy_sports_play" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_sports_play?></textarea>
						</div>
						<div class="twelve">
							(The ones you watch.)
						</div>
						<div class="twelve">
							<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="twelve"><b>Travel</b></div>
						<div class="twelve">
							(Places you've been.)
						</div>
						<div class="twelve">
							<textarea name="tmy_travel_been" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_travel_been?></textarea>
						</div>
						<div class="twelve">
							(Places you're going.)
						</div>
						<div class="twelve">
							<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="twelve"><b>Arts and Cultural Events</b></div>
						<div class="twelve">
							(Special exhibits, guest speakers at local universities, independent films &ndash; What's going on in the city? Talk about it!)
						</div>
						<div class="twelve">
							<textarea name="tmy_arts_culture_events" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_arts_culture_events?></textarea>
						</div>
					</div>
					<?php
						}//end if
						if(in_array('12',$allowFieldArray))
						{
					?>
					
					<div class="full_row">
						<div class="twelve"><b>Name your poison and your place</b></div>
						<div class="twelve">
							(Capitol City Brewing Company, Capitol Lounge Martini Bar, Urban Restaurant and Wine Bar)
						</div>
						<div class="twelve">
							<textarea name="tmy_poison_place" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_poison_place?></textarea>
						</div>
					</div>
					<?php
						}//end if
						if(in_array('13',$allowFieldArray))
						{
					?>
					
					<div class="full_row">
						<div class="twelve"><b>Did someone say &quot;Politics?&quot;</b></div>
						<div class="twelve">
							( Where do you stand? )
						</div>
						<div class="twelve">
							<textarea name="tmy_politics" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_politics?></textarea>
						</div>
					</div>
					<?php
						}//end if
						if(in_array('14',$allowFieldArray))
						{
					?>
					
					<div class="full_row">
						<div class="twelve"><b>Of the major issues in the world, which are you the most passionate about?</b></div>
						<div class="twelve">
							<textarea name="tmy_major_world_issue" cols="60" rows="5" class="textbox_textarea" onKeyDown="changeCSS(this, '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="twelve"><b>What are you doing about it?</b></div>
						<div class="twelve">
							<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>
					<?php
						}//end if
						if(in_array('16',$allowFieldArray))
						{
					?>
					
					<div class="full_row">
						<div class="twelve"><b>If I could build a guy/girl&hellip;</b></div>
						<div class="twelve">
							(Build your perfect mate. Keep it PG)
						</div>
						<div class="twelve">
							<textarea name="tmy_perfect_mate" cols="60" rows="5" class="textbox_textarea"><?php echo $objU->tmy_perfect_mate?></textarea>
						</div>
					</div>
					<?php
						}//end if
					}//end if
					?>
					
					<div class="full_row">
						<div class="twelve" align="right">
							<input name="CON1" type="submit" class="loginbutton" value="Save"><input type="hidden" name="step" value="5">
						</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');?>
