ob_start(); session_start(); include('includes/dbconfig.php'); include('includes/constants.php'); extract($_REQUEST); $limit = '10'; if($_GET['start']!='') { $start = $_GET['start']; } else { $start = 0; } $filePath = "loungesearch.php"; $otherParams ="&nickname=".$_REQUEST['nickname']."&country=".$_REQUEST['country']."&city=".$_REQUEST['city']."&state=".$_REQUEST['state']."&gender=".$_REQUEST['gender1']."&seek1=".$seek1."&age=".$_REQUEST['age']."&age1=".$_REQUEST['age1']."ðinicity=".$_REQUEST['ethinicity']; $_SESSION[lounge_otherParams]=$otherParams; $_SESSION[loungeotherParams]=$otherParams; //echo $_SESSION[lounge_otherParams]; ?> if(isset($_REQUEST['request']) && $_REQUEST['request']=='addbiz') { $selfrnd=mysql_query("select * from pro_hotprofrnds where user_id='$_SESSION[user_id]' and profile_id='$_REQUEST[profile_id]'"); $selcn=mysql_num_rows($selfrnd); if($selcn>0) { $da=mysql_fetch_array($selfrnd); if($da[request_status]==0) { header("location:myhotprofrnds.php?act=fail"); } if($da[request_status]==1) { header("location:myhotprofrnds.php?act=fail1"); } } else { //echo "Insert into pro_hotprofrnds(user_id,link,profile_id,request_status,date_requested,delete_status)values('".$_SESSION['user_id']."','".$_REQUEST['link']."','".$_REQUEST['profile_id']."',0,now(),0)";exit; $addbizclique=mysql_query("Insert into pro_hotprofrnds(user_id,link,profile_id,request_status,date_requested,delete_status)values('".$_SESSION['user_id']."','".$_REQUEST['link']."','".$_REQUEST['profile_id']."',0,now(),0)"); header("location:myhotprofrnds.php?act=success"); } } ?> if((isset($_REQUEST['nickname']))&($_REQUEST['nickname']<>'')) { $condition=" nickname like '%".$_REQUEST['nickname']."%' and "; } if((isset($_REQUEST['country']))&($_REQUEST['country']<>'0')) { $condition.=" country like '%".$_REQUEST['country']."%' and "; } if((isset($_REQUEST['state']))&($_REQUEST['state']<>'0')) { $condition.=" state like '%". $_REQUEST['state']."%' and "; } if((isset($_REQUEST['city']))&($_REQUEST['city']<>'')) { $condition.=" city like '%". $_REQUEST['city']."%' and "; } if((isset($_REQUEST['ethinicity']))&($_REQUEST['ethinicity']<>'0')) { $condition.=" Ethnicity like '%". $_REQUEST['ethinicity']."%' and "; } if((isset($_REQUEST['gender']))&($_REQUEST['gender']<>'')) { $condition1 =" gender like '%".$_REQUEST['gender']."%' and "; } /* if((isset($_REQUEST['gender1']))&($_REQUEST['gender1']<>'')) { $condition1=substr($condition1,0,-3); $condition1.=$_REQUEST['gender1']."%' and"; } */ if($condition1<>'') { $condition.=$condition1; } if((isset($_REQUEST['seek']))&($_REQUEST['seek']<>'')) { $condition.="("; foreach($_REQUEST['seek'] as $seek) { $condition.=" seeking like '%". $seek."%' or "; $seek1.=$seek.","; } $seek1=substr($seek1,0,-1); $condition=substr($condition,0,-3); //$seek1=substr($seek1,0,-3); $condition.=") and "; } if((isset($_REQUEST['seek1']))&($_REQUEST['seek1']<>'')) { $se1=explode(",",$_REQUEST['seek1']); foreach($se1 as $seek) { $condition.=" seeking like '%". $seek."%' or "; $seek1.=$seek.","; } $seek1=substr($seek1,0,-1); $condition=substr($condition,0,-3); $condition.=") and "; } if((isset($_REQUEST['age']))&($_REQUEST['age']<>'')&($_REQUEST['age1']=='')) { $condition.=" seeking like '%". $_REQUEST['seek']."%' and "; } if((isset($_REQUEST['age']))&($_REQUEST['age']<>'')&(isset($_REQUEST['age1']))&($_REQUEST['age1']<>'')) { $condition.=" age between '".$_REQUEST['age']."' and '". $_REQUEST['age1']."' and "; } //echo $condition; $condition=substr($condition,0,-4); if($_REQUEST['nickname']=="" && $_REQUEST['country']=='0' && $_REQUEST['state']=='0' && $_REQUEST['city']=="" && $_REQUEST['ethinicity']=='0' && $_REQUEST['gender']=='' && $_REQUEST['age']=="" && $_REQUEST['age']=="") { //echo "select * from pro_users where hideprofile='0' and (upgrades='hotpro' or product='1')";exit; $Totitems=mysql_query("select * from pro_users where hideprofile='0' and (upgrades='hotpro' or product='1')"); }else { //echo "select * from pro_users where ".$condition." and (upgrades='hotpro' or product='1') and hideprofile='0'";exit; $Totitems=mysql_query("select * from pro_users where ".$condition." and (upgrades='hotpro' or product='1') and hideprofile='0'"); } $total=mysql_num_rows($Totitems); $allpages=$total/$limit; $totalpages=ceil($allpages);//echo $totalpages;exit; if($start>0) { $pagenumber=ceil($total/$start); } if($_REQUEST['nickname']=="" && $_REQUEST['country']=='0' && $_REQUEST['state']=='0' && $_REQUEST['city']=="" && $_REQUEST['ethinicity']=='0' && $_REQUEST['gender']=='' && $_REQUEST['age']=="" && $_REQUEST['age']=="") { //echo "select * from pro_users where hideprofile='0' and (upgrades='hotpro' or product='1') LIMIT $start,$limit";exit; $sql_event="select * from pro_users where hideprofile='0' and (upgrades='hotpro' or product='1') and hideprofile='0' order by boost_upgrades desc,product desc,upgrades desc LIMIT $start,$limit"; }else { $sql_event="select * from pro_users where ".$condition." and (upgrades='hotpro' or product='1') and hideprofile='0' order by boost_upgrades desc,product desc,upgrades desc LIMIT $start,$limit"; } //echo $sql_event;exit; $exec_query=mysql_query($sql_event); ?>