<?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/userlogincheck.mobile.inc.php");
require_once ("../includes/mysql_mobile.inc.php");
require_once ("../classes/userside.class.php");
require_once ("../classes/misc.class.php");

$message	= "";
$msg		= "";
$vUrl		= "";
$id			= isset($_REQUEST['id'])	?	stripslashes(trim($_REQUEST['id']))	:	"0";
$page		= isset($_REQUEST['page'])	?	stripslashes(trim($_REQUEST['page']))	:	"1";
$msgForm	= false;
$msgSend	= false;
$paFlag		= false;
$script		= "";
$arrImages	= array();
$array		= array();

if (!$objDB) {
	$message	= "Unable to Locate Database Server.";
} else {

	$objU		= new userside($objDB);
	$objU1		= new userside($objDB);
	$objM		= new misc($objDB);

	if (isset($_REQUEST['RA'])) {
		if ($objU->is_expired($_SESSION['user_id'])) {
			$msg	= "Your profile has been expired, please renew your profile for using this service.";	
		} else {
			if ($id == $_SESSION['user_id']) {
				$msg	= "Error: Invalid operation.<br>";
			} else {
				$msg	= $objM->report_abuse($_SESSION['user_id'], $id);
			}
		}
	}
	
	if (isset($_REQUEST['EI'])) {
		if ($id == $_SESSION['user_id']) {
			$msg	= "Error: Invalid operation.<br>";
		} else {
			$msg	= $objM->add_interest($_SESSION['user_id'], $id);
		}
	}
	
	if (isset($_REQUEST['AF'])) {
		if ($id == $_SESSION['user_id']) {
			$msg	= "Error: Invalid operation.<br>";
		} else {
			$msg	= $objM->add_to_favourites($_SESSION['user_id'], $id);
		}
	}

	if (isset($_REQUEST['AH'])) {
		if ($id == $_SESSION['user_id']) {
			$msg	= "Error: Invalid operation.<br>";
		} else {
			$msg	= $objM->add_to_hotlist($_SESSION['user_id'], $id);
		}
	}

	if (isset($_REQUEST['ATF'])) {
		if ($id == $_SESSION['user_id']) {
			$msg	= "Error: Invalid operation.<br>";
		} else {
			$msg	= $objM->add_to_friendslist($_SESSION['user_id'], $id, "AN");
			$msg	= $objM->add_to_friendslist($id, $_SESSION['user_id']);
		}
	}

	$array		= $objU->getuser(addslashes($id)); 
	if (!empty($array)) {
		$objU->set_values($array);
		$arrImages	= $objU->get_user_images($id);
		$objM->view_alert($_SESSION['user_id'], $id);
		$arrP	= $objU->get_user_partner_preference_once(addslashes($id));
		if (!empty($arrP)) {
			$paFlag	= true; 
			$objU1->set_partner_preference($arrP);
		}
	} else {
		$message	= "Invalid profile.<br>";
	}

	$message	.= $msg;
	$script		= $objM->get_script($message);
	$message	= $objM->remove_script($message);
}
?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>Cybermatch</title>
<link href="images/mobile.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div xmlns="http://www.w3.org/1999/xhtml">
<?php include_once('title.inc.php');?>
<div>&nbsp;</div>
    <div>
        <div><i>+</i> <a href="index.php">Home</a></div>
        <div><i>+</i> <a href="search.php">Search</a></div>
        <div><i>+</i> <a href="dashbox.php" accesskey="2">Account</a> </div>
        <div><i>+</i> <a href="logout.php">Logout</a></div>
        <div><i>+</i> <a href="search_profiles.php?page=<?php echo $page?>">Back to search results</a></div>
    </div>
<div>&nbsp;</div>
<div><a name="search"></a><strong>Profile Listing</strong></div>
<div>&nbsp;</div>
<div class="message"><?php echo $message?></div>
<div>&nbsp;</div>
<?php if (!empty($array)) { ?>
<div><a href="large_image.php?id=<?php echo $id?>&page=<?php echo $page?>"><img src="<?php echo $objU->get_display_image(PROFILE_IMAGE_URL, $id, $objU->vGender)?>" width="100" height="100" border="0"></a>
<?php echo $objU->get_id_verify_image($_SESSION['user_id'], IMG_URL)?>
<?php echo $objU->get_bgcheck_image($_SESSION['user_id'], IMG_URL)?>
<?php echo $objU->get_featured_image($_SESSION['user_id'], IMG_URL)?>
<form name="frmEI" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
<input name="imageField" type="image"src="../images/reportabuse.gif" alt="Report Abuse" width="23" height="22" border="0" title="Report Abuse">  
<input type="hidden" name="id" value="<?php echo $id?>"> <input type="hidden" name="RA" value="RA"> <input type="hidden" name="page" value="<?php echo $page?>"> 
Click <a href="<?php echo $_SERVER['PHP_SELF']?>?id=<?php echo $id?>&RA=RA&page=<?php echo $page?>">here</a> to Report Abuse                              
</form>
<form name="frmEI" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
<input name="imageField" type="image"src="../images/expressintrest.gif" alt="Express Interest" width="23" height="22" border="0" title="Express Interest"> 
<input type="hidden" name="id" value="<?php echo $id?>">  <input type="hidden" name="page" value="<?php echo $page?>"> 
<input type="hidden" name="EI" value="EI">
Click <a href="<?php echo $_SERVER['PHP_SELF']?>?id=<?php echo $id?>&EI=EI&page=<?php echo $page?>">here</a> to Express Interest  
</form><!--
<form name="frmAF" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
<input name="imageField" type="image"src="../images/addasfav.gif" alt="Add to favourite list" width="23" height="22" border="0" title="Add to favourite list">
<input type="hidden" name="id" value="<?php echo $id?>"> <input type="hidden" name="page" value="<?php echo $page?>">
<input type="hidden" name="AF" value="AF">
Click <a href="<?php echo $_SERVER['PHP_SELF']?>?id=<?php echo $id?>&AF=AF&page=<?php echo $page?>">here</a> to Add to favourite list
</form>-->
<form name="frmAH" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
<input name="imageField" type="image" src="../images/hotlist.gif" alt="Add to Hot list" width="23" height="22" border="0" title="Add to Hot list">
<input type="hidden" name="id" value="<?php echo $id?>"> <input type="hidden" name="page" value="<?php echo $page?>">
<input type="hidden" name="AH" value="AH">
Click <a href="<?php echo $_SERVER['PHP_SELF']?>?id=<?php echo $id?>&AH=AH&page=<?php echo $page?>">here</a> to Add to Hot list
</form>
<form name="frmATF" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
<input name="imageField" type="image" src="../images/addim.gif" alt="Add to IM list" width="23" height="22" border="0" title="Add to IM list">
<input type="hidden" name="id" value="<?php echo $id?>"> <input type="hidden" name="page" value="<?php echo $page?>">
<input type="hidden" name="ATF" value="ATF">
Click <a href="<?php echo $_SERVER['PHP_SELF']?>?id=<?php echo $id?>&ATF=ATF&page=<?php echo $page?>">here</a> to Add to IM list
</form>
<form name="frmSM" method="post" action="send_message.php">
<input name="imageField" type="image" src="../images/email.gif" alt="Send an email" width="23" height="22" border="0" title="Send an email">
<input type="hidden" name="id" value="<?php echo $id?>"> <input type="hidden" name="page" value="<?php echo $page?>">
<input type="hidden" name="SM" value="SM">
Click <a href="send_message.php?id=<?php echo $id?>&SM=SM&page=<?php echo $page?>">here</a> to Send an email
</form>

</div> 
<div class="list"><div class="dview">
<span><div><b><?php echo htmlspecialchars($objU->vTitle)?></b></div>
<div><span class="j"><?php echo $objU->vLogin?> - <?php echo $objU->Age?> -year-old <?php echo $objU->vGender?></span></div>
<div><span class="j"><?php echo $objU->vCounty?>, <?php echo $objU->vState?>,  <?php echo $objU->vCountry?></span></div>
<div ><span class="j"><strong>Marital Status</strong>: <?php echo $objU->vRealtion_Status <> "" ? $objU->vRealtion_Status : "--"?>, <strong>Height</strong>: <?php echo $objU->nHeight <> "" ? $objU->vFeet." Ft ".$objU->vInch. "in." : "--"?>,</span></div>
<div class="list"><span  class="j"> <strong>Body Type</strong>: <?php echo $objU->vBody_Type <> "" ? $objU->vBody_Type : "--"?>, <strong>Children</strong>: <?php echo $objU->nChildren <> "" ? $objU->nChildren : "--"?></span></div>
<?php if ($objU->tmy_looks_today <> "") { ?>
<div><b>My Looks today: </b></div>
<div><span class="j"><?php echo nl2br(htmlspecialchars(stripslashes($objU->tmy_looks_today)))?></span></div>
<?php } ?>
<?php if ($objU->tmy_mood_today <> "") { ?>
<div><b>My Mood today: </b></div>
<div><span class="j"><?php echo nl2br(htmlspecialchars(stripslashes($objU->tmy_mood_today)))?></span></div>
<?php } ?>
<?php if ($objU->tmy_poison_place <> "") { ?>
<div><b>My Poison and My Place: </b></div>
<div><span class="j"><?php echo nl2br(htmlspecialchars(stripslashes($objU->tmy_poison_place)))?></span></div>
<?php } ?>
<?php if ($objU->tmy_perfect_mate <> "") { ?>
<div><b>If I could build a guy/girl...: </b></div>
<div><span class="j"><?php echo nl2br(htmlspecialchars(stripslashes($objU->tmy_perfect_mate)))?></span></div>
<?php } ?>
<div class="list"><b>My Background Values</b></div>
<div><span class="j"><strong>Ethnicity</strong>: <?php echo $objU->vEthinicity <> "" ? $objU->vEthinicity : "--"?>
</span></div>
<div><span class="j"><strong>Religion</strong>:  <?php echo $objU->vReligion <> "" ? $objU->vReligion : "--"?>
</span></div>
<div><span class="j"><strong>Education</strong>: <?php echo $objU->vEducation <> "" ? $objU->vEducation : "--"?>
</span></div>
<div><span class="j"><strong>Smoking</strong>: <?php echo $objU->vSmoking <> "" ? $objU->vSmoking : "--"?>
<div><span class="j"><strong>Drinking</strong>: <?php echo $objU->vDrinking <> "" ? $objU->vDrinking : "--"?>
</span></div>


</span></div></div>
<?php }?>		
<div>&nbsp;</div>
<?php if ($pages <> "") { ?>
<div class="listi"><?php echo $pages?></div><div class="l">&nbsp;</div>
<?php } ?>  
<?php include_once('footer.inc.php');?>