<?php /*
##################################################################
#                       PHP 4&5 MySQL 4&5                        #
##################################################################
#           Copyright (c) 2004-2008 Armia Systems Inc            #
##################################################################
#               This file is part of Cybermatch site             #
##################################################################
#               Developed By:                                    #
##################################################################
#               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 ("classes/userside.class.php");
require_once ("classes/misc.class.php");
require_once ("classes/settings.class.php");
require_once ("iphonepush.php");
/*
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter("must-revalidate");
*/
header("Cache-control: max-age=600");
$message	= "";
$msg		= "";
$vUrl		= "";
$id		= isset($_REQUEST['id'])	?	stripslashes(trim($_REQUEST['id']))	:	"0";
$msgForm	= false;
$msgSend	= false;
$paFlag		= false;
$script		= "";
$arrImages	= array();
if (!$objDB) {
    $message	= "Unable to Locate Database Server.";
} else {
    $objU		= new userside($objDB);
    $objM		= new misc($objDB);
    if (isset($_POST['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($msg=="<font color='green'>You have successfully send the express interest.</font><br>"){
                 /*     * **************** Iphone PUsh notication ************** */
    $objSeT = new settings($objDB);
    $sSettings = $objSeT->select();
    if ($sSettings['enable_pushbk_notification'] == "Y") {
        $Todetails = $objU->select($id);
        $fromDetails = $objU->select($_SESSION['user_id']);
        $userDevices = $objM->getuserDevices($id);
        if($userDevices){
            foreach($userDevices as $key=>$value)
            {   
                $deviceToken = $value['device_id'];
                $deviceType =  $value['device'];
                if ($deviceType == "ios" && $deviceToken) {
                    // Put your private key's passphrase here:
                    $passphrase = $sSettings['iPhone_parse_phrase'];
                    // Put your alert message here:
                    $from = $fromDetails['vFirstName'];
                    if ($fromDetails['vMiddleName'])
                        $from .= " " . $fromDetails['vMiddleName'];
                    if ($fromDetails['vLastName'])
                        $from .= " " . $fromDetails['vLastName'];
                    $message1 = "$from Expressed an interest on your profile!";
                    send_push_nofication($message1, $from, $passphrase, $deviceToken,'express_interest',false);
                }
            }
        }
    }
    /*     * ***************** Iphone PUsh notication end **************** */
            
            }     
            
            
        }
    }
    if (isset($_REQUEST['AF'])) {
        if ($id == $_SESSION['user_id']) {
            $msg	= "Error: Invalid operation.<br>";
        } else {
            $msg	= $objM->add_to_favourites($_SESSION['user_id'], $id);
        }
    }
    //----------------Shortlist user--------------------
//    if (isset($_REQUEST['SHORTLISTUSER'])) {
//        if ($id == $_SESSION['user_id']) {
//            $msg	= "Error: Invalid operation.<br>";
//        }
//        else {
//            $msg	= $objM->add_to_shortlist($_SESSION['user_id'], $id);
//        }
//    }
    //----------------End of Shortlist user--------------------

    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']);
        }
    }
    if (isset($_REQUEST['SM'])) {
        if ($id == $_SESSION['user_id']) {
            $msg	= "Error: Invalid operation.<br>";
        } else {
            $msgForm	= true;
            $objM->checkPremiumPermission();
        }
    }
    if (isset($_POST['SendM'])) {
         $objM->checkPremiumPermission();
        if ($objU->is_expired($_SESSION['user_id'])) {
            $msg	= "Your profile has been expired, please renew your profile for using this service.";
            $msgForm	= true;
            $msgSend	= false;
        } else {
            $msg	= $objM->send_message($_SESSION['user_id'], $_POST);
            if ($msg == "") {
               // print_r($_POST);
                /****************** Iphone PUsh notication ***************/
            $objSeT	= new settings($objDB);
            $sSettings=$objSeT->select();
            
          
            if($sSettings['enable_pushbk_notification']=="Y")
            {   $fromDetails = $objU->select($_SESSION['user_id']);              
                $userDetails = $objU->select($_POST['id']);
                $userDevices = $objM->getuserDevices($_POST['id']);
               // print_r($userDevices);
         if($userDevices){
            foreach($userDevices as $key=>$value)
            {   
                $deviceToken = $value['device_id'];
                $deviceType =  $value['device'];
                if ($deviceType == "ios" && $deviceToken) {
                    // Put your private key's passphrase here:
                    $passphrase = $sSettings['iPhone_parse_phrase'];
                    // Put your alert message here:
                    $from = $fromDetails['vFirstName'];
                    if ($fromDetails['vMiddleName'])
                        $from .= " " . $fromDetails['vMiddleName'];
                    if ($fromDetails['vLastName'])
                        $from .= " " . $fromDetails['vLastName'];
                    $message1 = "You have one message from $from";
                    send_push_nofication($message1, $from, $passphrase, $deviceToken,'send_message',false);
                }
            }
        }
            }
             /******************* Iphone PUsh notication end *****************/

                
                
                $msg		= "<font color='green'>Your message has been successfully sent.</font><br>";
                $msgForm	= false;
                $msgSend	= true;
            } else {
                $msgForm	= true;
            }
        }
    }
    $array		= $objU->getuser(addslashes($id)); 
    //print_r($array);
    if (!empty($array)) {
        $objU->set_values($array);
        $arrImages	= $objU->get_user_images($id);
        $objM->view_alert($_SESSION['user_id'], $id);
    } else {
        $message	= "Invalid profile.<br>";
    }
    $message	.= $msg;
    $script		= $objM->get_script($message);
    $message	= $objM->remove_script($message);
}

//storing value for checking array
$Appearance_check=array($objU->tmy_looks_today,$objU->tmy_likes_onanyday,$objU->tmy_dislikes_onanyday,$objU->tmy_personality,$objU->tmy_mood_today);

//removing nul value
foreach($Appearance_check as $val) {
    if(!empty($val)) {
        $Appearance[].=$val;
    }//end if
}//end else
$Interest_check=array($objU->tmy_music,$objU->tmy_movies,$objU->tmy_tv,$objU->tmy_sports_watch,$objU->tmy_sports_play,$objU->tmy_travel_going,$objU->tmy_travel_been,$objU->tmy_arts_culture_events,$objU->tmy_poison_place,$objU->tmy_politics,$objU->tmy_major_world_issue,$objU->tmy_perfect_mate);
//removing nul value
foreach($Interest_check as $val) {
    if(!empty($val)) {
        $Interest[].=$val;
    }//end if
}//end else
$Lifestyle_check=array($objU->taday_in_my_life,$objU->vmy_night_life_out,$objU->vmy_night_life_in,$objU->tmy_food,$objU->tmy_money,$objU->tmy_last_restaurant,$objU->tmy_charity);
//removing nul value
foreach($Lifestyle_check as $val) {
    if(!empty($val)) {
        $Lifestyle[].=$val;
    }//end if
}//end else


$arrDob=explode("/",date('Y/m/d',strtotime($objU->dDob)));
//print_r($arrDob);
list($year,$month,$date)=$arrDob;
if($year<0)
{
    $year='0000';
}

$objU->dDob=$month."/".$date."/".$year;

include_once ("title.inc.php");
include_once ("tophtml.inc.php");

if(!in_array($array['vStatus'],array('ENNN','ANNN')))
{
    echo "<font color='red'>Invalid Profile</red>";
    exit;
}

?>

<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.min.js"></script>

<!--
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<link rel="stylesheet" href="styles/lightbox.css" type="text/css" media="screen" />
-->

<script type="text/javascript" src="scripts/jquery-1.6.min.js"></script>
<!--<script type="text/javascript" src="scripts/jquery.lightbox-0.5.min.js"></script>-->


<script type="text/javascript" src="scripts/jquery.reveal.js"></script>
<link rel="stylesheet" href="styles/reveal.css" type="text/css" media="screen" />
<!--<link rel="stylesheet" type="text/css" href="styles/jquery.lightbox-0.5.css" media="screen" />-->
<link href="js/facebox.css" media="screen" rel="stylesheet" type="text/css"/>
<script src="js/facebox.js" type="text/javascript"></script>
<script language="JavaScript">



    var img_loc = '<?php echo PROFILE_IMAGE_URL."/"?>';



    function movepic(img_thumb_src, img_src,cnt) {


        document["profileimage"].src=img_loc+img_thumb_src;



        document.getElementById('profileimagea').href = img_loc+img_src;
        $('.jcls').css('color','grey');
        $('#ci_'+cnt).css('color','black');



    }
    jQuery(document).ready(function($) {
        $('a[rel*=facebox]').facebox()
    })


    //    $(function() {
    //        $=jQuery.noConflict();
    //        //$('.lightbox a').lightBox();
    //        //$('a[@rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel
    //
    //        //$('#gallery a').lightBox();
    //         $('a[rel*=facebox]').facebox()
    //    });



</script>




		<div class="row"> 
		<div class="eight columns"> 
					<!--shwo msg -->
                                    <?php
                                    if(isset($message) && $message!='') {
                                        ?>
										<div align="center" class="row warning"><?php echo $message?></div><?php
                                    }//end if
                                    ?>
                                    <!--show msg end -->

                                    <div class="search-rslts">
									
									<div class="inenr-hd row">
										<div class="nine columns"><h2>Profile For <?php echo ucfirst($objU->vLogin)?> </h2></div>
										<div class="three columns">

										<?php if(isset($_SESSION['user_id']) && $_SESSION['user_id']!='') {
											?>
											<?php if ($objU->vProfileType == "I") {?>
											<div class="row">
											<form name="frmEI" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
												<div class="two  columns">
													<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"> 
												</div>
											</form>
											<form name="frmEI" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
												<div class="two  columns">
													<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="EI" value="EI">
												</div>
											</form>
											<form name="frmAF" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
												<div class="two  columns">
													<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="AF" value="AF"></div>
											</form>
												<div class="two columns"><?php echo $objU->get_bgcheck_image($id)?></div>
												<div class="two columns"><?php echo $objU->get_featured_image($id)?></div>
											</div>
                                                 
                                                <?php } else { ?>
												
											<div class="six columns">
												<div class="row">
												<form name="frmEI" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
													<div class="three columns">
														<input name="imageField2" type="image"src="images/reportabuse.gif" alt="Report Abuse" width="23" height="22" border="0" title="Report Abuse">
														<input type="hidden" name="id2" value="<?php echo $id?>">
														<input type="hidden" name="RA2" value="RA">
													</div>
												</form>
                                            	<form name="frmEI" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
													<div class="three columns">
														<input name="imageField2" type="image"src="images/expressintrest.gif" alt="Express Interest" width="23" height="22" border="0" title="Express Interest">
														<input type="hidden" name="id2" value="<?php echo $id?>">
														<input type="hidden" name="EI2" value="EI">
													</div>
												</form>
														<!--<form name="frmAF" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
														<td width="25%"><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="AF" value="AF"></td>
														</form>-->
													<div class="three columns"><?php echo $objU->get_featured_image($id)?></div>
													<div class="three columns"><?php echo $objU->get_bgcheck_image($id)?></div>
												</div>
											</div>
                                        
                                            <?php } ?>	<?php }//end if?>
											
										</div>
									</div>

									<div class="seven columns">
											<h2 class="headings2">Basic Details</h2>
											<div class="row maintext1">
												<?php if ($objU->vProfileType == "I") { ?>
												<div class="row">
													<div class="five columns">Profile Title</div>
													<div class="seven columns"><?php echo $objU->vTitle <> "" ? nl2br(htmlspecialchars(stripslashes($objU->vTitle))) : "--"?></div>
												</div>
												<?php }//end if?>
												<div class="row">
													<div class="five columns">Marital Status</div>
													<div class="seven columns"><?php echo $objU->vRealtion_Status <> "" ? $objU->vRealtion_Status : "--"?></div>
												</div>
												<?php if ($objU->vRealtion_Status <> "Single") { ?>
												<div class="row">
													<div class="five columns">Children</div>
													<div class="seven columns"><?php echo $objU->nChildren > 0 ? $objU->nChildren : "--"?></div>
												</div>
													<?php } ?>
												<div class="row">
													<div class="five columns">Height</div>
													<div class="seven columns"><?php echo $objU->vFeet <> "" ? $objU->vFeet." Ft ".$objU->vInch." in." : "--"?></div>
												</div>
												<div class="row">
													<div class="five columns">Smoking</div>
													<div class="seven columns"><?php echo $objU->vSmoking <> "" ? $objU->vSmoking : "--"?></div>
												</div>
												<div class="row">
													<div class="five columns">Drinking</div>
													<div class="seven columns"><?php echo $objU->vDrinking <> "" ? $objU->vDrinking : "--"?></div>
												</div>
												<div class="row">
													<div class="five columns">Education</div>
													<div class="seven columns"><?php echo $objU->vEducation <> "" ? $objU->vEducation : "--"?></div>
												</div>
												<div class="row">
													<div class="five columns">Body Type</div>
													<div class="seven columns"><?php echo $objU->vBody_Type <> "" ? $objU->vBody_Type : "--"?></div>
												</div>
												<div class="row">
													<div class="five columns">Ethnicity</div>
													<div class="seven columns"><?php echo $objU->vEthinicity <> "" ? $objU->vEthinicity : "--"?></div>
												</div>
												<div class="row">
													<div class="five columns">Religion</div>
													<div class="seven columns"><?php echo $objU->vReligion <> "" ? $objU->vReligion : "--"?></div>
												</div>
											</div>
												
												<?php if(isset($_SESSION['user_id']) && $_SESSION['user_id']!='') {
                                        ?>



                                        <?php if ($objU->vProfileType == "I" OR $objU->tmy_profile == "") { ?>
										
											<div class="row">
											 <!----------Shortlist user---------------------->
													<!--<td>
														<form name="frmShortlistUser" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
															<input name="imageField" type="submit" class="button_stylenew marginr" value="Shortlist User">
															<input type="hidden" name="id" value="<?php echo $id?>">
															<input type="hidden" name="SHORTLISTUSER" value="SHORTLISTUSER">
														</form>
													</td>-->
												<!----------End Shortlist user---------------------->
												<div class="four columns icon_txt">
													<form name="frmAH" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
														<input name="imageField" type="submit" class="hotlist-btn marginr" value="Add To Hot List">
														<input type="hidden" name="id" value="<?php echo $id?>">
														<input type="hidden" name="AH" value="AH">
													</form>
												</div>
												<div class="four columns icon_txt">
													<form name="frmATF" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
														<input name="imageField" type="submit" class="im-btn marginr" value="Add To IM List">
														<input type="hidden" name="id" value="<?php echo $id?>">
														<input type="hidden" name="ATF" value="ATF">
													</form>
												</div>
												<div class="four columns icon_txt">
													<form name="frmSM" method="post" action="<?php echo $_SERVER['PHP_SELF']?>#sendMail">
														<input name="imageField" type="submit" class="send-mail-btn marginr" value="Send An Email">
														<input type="hidden" name="id" value="<?php echo $id?>">
														<input type="hidden" name="SM" value="SM">
													</form>
												</div>
											</div>

                                            <?php } else { ?>
											
											<div class="row">
												<div class="four columns">
													<form name="frmAH" method="post" action="<?php echo $_SERVER['PHP_SELF']?>"><input name="imageField2" type="submit" class="signupbutton" value="Add To Hot List">
														<input type="hidden" name="id2" value="<?php echo $id?>">
														<input type="hidden" name="AH2" value="AH">
													</form>
												</div>
												<div class="four columns">
													<form name="frmATF" method="post" action="<?php echo $_SERVER['PHP_SELF']?>"><input name="imageField2" type="submit" class="signupbutton" value="Add To IM List">
														<input type="hidden" name="id2" value="<?php echo $id?>">
														<input type="hidden" name="ATF2" value="ATF">
													</form>
												</div>
												<div class="four columns">
													<form name="frmSM" method="post" action="<?php echo $_SERVER['PHP_SELF']?>#sendMail"><input name="imageField2" type="submit" class="loginbutton" value="Send An Email">
														<input type="hidden" name="id2" value="<?php echo $id?>">
														<input type="hidden" name="SM2" value="SM">
													</form>
												</div>
											</div>

                                            <?php } ?>

                                        <?php }else { ?>

                                    <div class="row">
										<div class="clear"></div>
										<a href="#" class="big-link" data-reveal-id="myModal" style="float:left; width:auto; text-decoration: none; cursor: pointer;">
											<input name="imageField2" type="button" class="contact-btn" value="Contact" style="cursor: pointer;">
										</a>
										<div class="clear"></div>
										<div id="myModal" class="reveal-modal" style="display:block ">
											<!--<h1>Hello Guest</h1>-->
											<p>Only registered users can contact other members.</p>
											<p>
												<a class="close popup-btn" href="register.php"><b class="">Click here to register</b></a>
											</p>
											<a class="close-reveal-modal">&#215;</a>
										</div>
									</div>

                                        <?php } ?>
								</div>
								<div class="five columns">
                                        <!--<div class="row"><img src="images/login_bkgd_top.gif" width="384" height="12"></div>-->
                                            <div class="profile-display">
											<div id="gallery">
												<ul>
													<li>
														<a href="<?php echo $objU->get_full_image(PROFILE_IMAGE_URL, $id, $objU->vGender)?>" name="profileimagea" id="profileimagea" rel="facebox">
															<img src="<?php echo $objU->get_display_image(PROFILE_IMAGE_URL, $id, $objU->vGender)?>" width="300" height="300" border="0" name="profileimage" id="profileimage"/>
														</a>
													</li>
												</ul>
											</div>
											<!--
											<a href="<?php //echo $objU->get_full_image(PROFILE_IMAGE_URL, $id, $objU->vGender)?>" rel="lightbox" name="profileimagea" id="profileimagea">
											-->
											<!--
											<img src="<?php //echo $objU->get_display_image(PROFILE_IMAGE_URL, $id, $objU->vGender)?>" width="365" height="329" border="0" name="profileimage" id="profileimage">
											-->
											<!--
											<img src="<?php //echo $objU->get_display_image(PROFILE_IMAGE_URL, $id, $objU->vGender)?>" width="300" height="300" border="0" name="profileimage" id="profileimage">
											</a>
											-->
											</div>
                                        <!--<div class="row"><img src="images/login_bkgd_bottom.gif" width="384" height="43"></div>-->
                                        <?php if (!empty($arrImages) AND count($arrImages) > 1) { ?>
											<div class="row">
											<?php foreach ($arrImages as $k => $v) { ?>
												<span>
													<a href="#" class="jcls" id="ci_<?php echo $k+1?>" onClick="movepic('pthumb_<?php echo $v['vUrl']?>', '<?php echo $v['vUrl']?>','<?php echo $k+1?>')"><?php echo $k+1?></a>
												</span>
                                            <?php }//end foreach ?>
                                            </div>         
                                        <?php } ?>
                                        <?php //$_SESSION['graph_user']=trim($_GET['id']); ?>
                                        <!--
                                        <tr class="maintext">
                                            <td align="left" colspan="2"><a style="color:#3399FF;text-decoration:none;" href="personality_graph.php?id=<?php //echo trim($_GET['id']) ?>" class="lightbox" rel="lightbox">

                                                    <img src="personality_graph_thumb.php" border="0" >

                                                    <br>Click here to enlarge the Profile Graph</a></td>

                                        </tr>
                                        -->
                                        <?php if ($objU->vProfileType == "I") {
                                            /** The following Information visible only for PROFILE TYPE=STANDARD **/
                                            ?>
                                        <!--tr class="maintext">
                                            <td align="left" width="60%">Ethnicity : <?php echo $objU->vEthinicity <> "" ? $objU->vEthinicity : "--"?></td>
                                            <td align="left" width="40%">Religion : <?php echo $objU->vReligion <> "" ? $objU->vReligion : "--"?></td>
                                        </tr-->
                                            <?php } elseif ($objU->vProfileType == "U" && $objU->tmy_profile != "") { ?>
                                        <div class="row"><?php echo stripslashes($objU->tmy_profile)?></div>
                                            <?php }?>

									</div> 
								

                        <?php if ($objU->vProfileType == "I") {

                            /** The following Information visible only for PROFILE TYPE=STANDARD **/

                            ?>
							<div class="clear"></div>
							<div class="row maintext1">
								<div class="row"><h2 class="headings2 border-bottom">Primary Information</h2></div>
								<div class="row maintext1">
									<div class="twelve columns">
										<div class="five columns">Gender</div>
										<div class="seven columns"><?php echo $objU->vGender <> "" ? $objU->vGender : "--"?></div>
									</div>
									<div class="twelve columns">
										<div class="five columns">Date of Birth</div>
										<div class="seven columns"><?php echo $objU->dDob <> "" ? date('m/d/Y',  strtotime($objU->dDob)) : "--"?></div>
									</div>
									<div class="twelve columns">
										<div class="five columns">Country</div>
										<div class="seven columns"><?php echo $objU->vCountry <> "" ? $objU->vCountry : "--"?></div>
									</div>
									<div class="twelve columns">
										<div class="five columns">State</div>
										<div class="seven columns"><?php echo $objU->vState <> "" ? $objU->vState : "--"?></div>
									</div>															
								</div>
							</div>
							
                            <?php } /*END PROFILE TYPE=STANDARD */?>

                        <?php
						
			//if any value exist
                        if(is_array($Appearance) && !empty($Appearance) && $objU->vProfileType == "I") {

                            ?>
							
							<div class="row">
								<h2 class="headings2 border-bottom">About <?php echo ucfirst($objU->vLogin)?>'s Appearance</h2>
							</div>
							<div class="row maintext1">
								<?php if ($objU->tmy_looks_today <> "") { ?>
								<div class="twelve columns">
									<strong>My Looks Today</strong><br>
									<?php echo $objU->tmy_looks_today <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_looks_today))) : "--"?>
								</div>
								<?php }//end if?>
									<?php if ($objU->tmy_likes_onanyday <> "") { ?>
								<div class="twelve columns">
									<strong>My Likes On Any Day</strong><br>
									<?php echo $objU->tmy_likes_onanyday <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_likes_onanyday))) : "--"?>
								</div>
								 <?php }//end if?>
									<?php if ($objU->tmy_dislikes_onanyday <> "") { ?>
								<div class="twelve columns">
									<strong>My Dislikes On Any Day</strong><br>
									<?php echo $objU->tmy_dislikes_onanyday <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_dislikes_onanyday))) : "--"?>
								</div>
								<?php }//end if?>
									<?php if ($objU->tmy_personality <> "") { ?>
								<div class="twelve columns">
									<strong>My Personality</strong><br>
									<?php echo $objU->tmy_personality <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_personality))) : "--"?>
								</div>
								<?php }//end if?>
									<?php if ($objU->tmy_mood_today <> "") { ?>
								<div class="twelve columns">
									<strong>My Mood Today</strong><br>
									<?php echo $objU->tmy_mood_today <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_mood_today))) : "--"?>
								</div>
								<?php }//end if?>
							</div>
                            <?php }//end array check;?>
                        <?php if(is_array($Interest) && !empty($Interest) && $objU->vProfileType == "I") {?>
                        	<div class="row">
								<div class="row">
									<h2 class="headings2 border-bottom"><?php echo ucfirst($objU->vLogin)?>'s Interests</h2>
								</div>
								<div class="row maintext1">
									<?php if ($objU->tmy_music <> "") { ?>
									<div class="twelve columns">
										<strong>Music</strong><br>
                                        <?php echo $objU->tmy_music <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_music))) : "--"?>
									</div>
									<?php }//end if?>
									
									<?php if ($objU->tmy_movies <> "") { ?>
									<div class="twelve columns">
										<strong>Movies</strong><br>
                                        <?php echo $objU->tmy_movies <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_movies))) : "--"?>
									</div>
									<?php }//end if?>
									
									<?php if ($objU->tmy_tv <> "") { ?>
									<div class="twelve columns">
										<strong>TV Show</strong><br>
                                        <?php echo $objU->tmy_tv <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_tv))) : "--"?>
									</div>
									<?php }//end if?>
									
									<?php if ($objU->tmy_sports_play <> "") { ?>
									<div class="twelve columns">
										<strong>The Sports I Play</strong><br>
										<?php echo $objU->tmy_sports_play <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_sports_play))) : "--"?>
									</div>
									<?php }//end if?>
									
									<?php if ($objU->tmy_sports_watch <> "") { ?>
									<div class="twelve columns">
										<strong>The Sports I Watch</strong><br>
                                        <?php echo $objU->tmy_sports_watch <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_sports_watch))) : "--"?>
									</div>
									<?php }//end if?>
									
									<?php if ($objU->tmy_travel_been <> "") { ?>
									<div class="twelve columns">
										<strong>The Places I Have Been</strong><br>
                                        <?php echo $objU->tmy_travel_been <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_travel_been))) : "--"?>
									</div>
									<?php }//end if?>
									
									<?php if ($objU->tmy_travel_going <> "") { ?>
									<div class="twelve columns">
										<strong>The Places I Am Going</strong><br>
                                        <?php echo $objU->tmy_travel_going <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_travel_going))) : "--"?>
									</div>
									<?php }//end if?>
									
									<?php if ($objU->tmy_arts_culture_events <> "") { ?>
									<div class="twelve columns">
										<strong>Arts And Cultural Events</strong><br>
                                        <?php echo $objU->tmy_arts_culture_events <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_arts_culture_events))) : "--"?>
									</div>
									<?php }//end if?>
									
									<?php if ($objU->tmy_poison_place <> "") { ?>
									<div class="twelve columns">
										<strong>Name Your Poison And Your place</strong><br>
                                        <?php echo $objU->tmy_poison_place <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_poison_place))) : "--"?>
									</div>
									<?php }//end if?>
                                    
									<?php if ($objU->tmy_politics <> "") { ?>
									<div class="twelve columns">
										<strong>Did Someone Say &quot;Politics?&quot;</strong><br>
                                        <?php echo $objU->tmy_politics <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_politics))) : "--"?>
									</div>
									<?php }//end if?>
                                    
									<?php if ($objU->tmy_major_world_issue <> "") { ?>
									<div class="twelve columns">
											<strong>Of the major issues in the world, which ones are you the most passionate about?</strong><br>
                                            <?php echo $objU->tmy_major_world_issue <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_major_world_issue))) : "--"?>
									</div>
									<div class="twelve columns">
										<strong>What are you doing about it?</strong><br>
                                        <?php echo $objU->tmy_doings_on_major_world_issue <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_doings_on_major_world_issue))) : "--"?>
									</div>
									<?php }//end if?>
                                    
									<?php if ($objU->tmy_perfect_mate <> "") { ?>
									<div class="twelve columns">
										<strong>If I could build a guy/girl?</strong><br>
                                        <?php echo $objU->tmy_perfect_mate <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_perfect_mate))) : "--"?>
									</div>
									<?php }//end if?>									
								</div>
                        	</div>
                            <?php }//end if array checking?>
                        <?php

//checking value exist
                        if(is_array($Lifestyle) && !empty($Lifestyle) && $objU->vProfileType == "I") {
                            ?>
                    
                                    <div class="row">
										<h2 class="headings2 border-bottom"><?php echo ucfirst($objU->vLogin)?>'s Lifestyle</h2>
									</div>
									<div class="row maintext1">
										<?php if ($objU->taday_in_my_life <> "") { ?>
										<div class="twelve columns">
											<strong>A Day In My Life</strong><br>
                                            <div align="justify"><?php echo $objU->taday_in_my_life <> "" ? nl2br(htmlspecialchars(stripslashes($objU->taday_in_my_life))) : "--"?></div>
										</div>
										<?php }//end if?>
				                        <?php if ($objU->vmy_night_life_out <> "" OR $objU->vmy_night_life_in <> "") { ?>
										<div class="row"><strong>Night Life</strong></div>
										<div class="twelve columns">
											<strong>Out</strong><br>
											<div align="justify"><?php echo $objU->vmy_night_life_out <> "" ? nl2br(htmlspecialchars(stripslashes($objU->vmy_night_life_out))) : "--"?></div>
										</div>
										<div class="twelve columns">
											<strong>In</strong><br>
											<div align="justify"><?php echo $objU->vmy_night_life_in <> "" ? nl2br(htmlspecialchars(stripslashes($objU->vmy_night_life_in))) : "--"?></div>
										</div>
										<?php }//end if?>
			                            <?php if ($objU->tmy_food <> "") { ?>
										<div class="twelve columns">
											<strong>Food</strong><br>
											<?php echo $objU->tmy_food <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_food))) : "--"?>
										</div>
										<?php }//end if?>
                                        <?php if ($objU->tmy_money <> "") { ?>
										<div class="twelve columns">
											<strong>Money</strong><br>
                                            <div align="justify"><?php echo $objU->tmy_money <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_money))) : "--"?></div>
										</div>
											<?php }//end if?>
											<?php if ($objU->tmy_last_restaurant <> "") { ?>
										<div class="twelve columns">
											<strong>Name The Last Restaurant You Visited</strong><br>
                                            <?php echo $objU->tmy_last_restaurant <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_last_restaurant))) : "--"?>
										</div>
										<div class="twelve columns">
											<strong>Review It</strong><br>
											<?php echo $objU->tmy_last_restaurant_review <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_last_restaurant_review))) : "--"?>
										</div>
										<?php }//end if?>
										<?php if ($objU->tmy_charity <> "") { ?>
										<div class="twelve columns">
											<strong>What Have You Done For Charity's Sake?</strong><br>
                                            <?php echo $objU->tmy_charity <> "" ? nl2br(htmlspecialchars(stripslashes($objU->tmy_charity))) : "--"?>
										</div>
										<?php }//end if?>
									</div>
                                    
                            <?php }//end if array checking?>

                        <?php
                        if ($msgForm AND !$msgSend) {
                            ?>
                        <a name="sendMail"></a>
                       
									<div class="row"><h2 class="headings2">Send A Message</h2></div>
									
									<div class="row maintext1">
										<form name="frmMsg" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
										<div class="row">
											<div class="twelve columns">
												<div class="three columns">Subject</div>
												<div class="five columns margin_R_200"><input name="vTitle" type="text" class="textbox txt-bx01" size="40" maxlength="200"></div>
											</div>
											<div class="twelve columns">
												<div class="three columns">Body</div>
												<div class="five columns margin_R_200">
													<textarea name="tContent" cols="70" rows="6" class="textbox_textarea"></textarea>
												</div>
											</div>
											<div class="twelve columns">
												<div class="three columns">&nbsp;</div>
												<div class="five columns margin_R_200"><input name="SendM" type="submit" class="loginbutton" value="Send"><input type="hidden" name="id" value="<?php echo $id?>"></div>
											</div>
											
											</div>
										</form>
									</div>
                                    
                            <?php }//end if?>
						<div class="clear"></div>
						<div class="row" style="padding-bottom:20px; ">
						  <input type=button value=" Back " class="back-btn" onClick="parent.history.back(); return false;">
						</div>
				</div>
			</div>

		<div class="four columns search_result_R"><?php include_once ("left.inc.php");?></div>
	<div class="clear"></div>

	

</div>

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