member_email; $mail_disable = 'readonly'; $reg_user_mail = $userEmail; $cat_url = $_GET['cat']; $cat_url_parents = $cat_url; $cat_id = $_GET['cat_id']; $at = $_GET['at']; $city = $_GET['city']; $wn = $_REQUEST['page']; if(is_numeric($cat_id)){}else{ $cat_id = '0'; } $jqString = "?at=$at&cat_id=$cat_id&city=$city&cat=$cat_url"; //echo "test $cat_url / $cat_url_parents / $cat_id / $at / $city /$wn / "; if($city != ''){ $canonical = "https://zumvu.com/marketplace/$city/$cat_url/s".$cat_id."a".$at."p".$wn."/"; }else{ $canonical = "https://zumvu.com/marketplace/$cat_url/s".$cat_id."a".$at."p".$wn."/"; } $cat_id_parents = $cat_id; $cat_row = $sanformation->category_details($cat_id); $cat_name = $cat_row['category_name']; $country_id = $cat_row['country_id']; //=================================================================================== $qryCountryInc = "SELECT * FROM `yp_countries` WHERE `id` = '$country_id'"; $resCountryInc = mysqli_query($condb,$qryCountryInc) or die('Error, query failed1 ' . mysqli_error($condb)); $rCountryInc = mysqli_fetch_array($resCountryInc); $countrySessionId = $rCountryInc['id']; $currency = $rCountryInc['currency']; $countrySession = $rCountryInc['alpha_2']; $lang = $rCountryInc['lang']; $expire = (time()+60*60*24*90); setcookie("cntry", $countrySession, $expire, "/", "zumvu.com"); //=================================================================================== $own_url = "/$cat_url/s$cat_id"."a".$at."p1/"; $city_url = $_GET['city']; if($city_url != ''){ $cts = $sanformation->city_ip_check($city_url); if($cts != '0'){ $city_url_new = $sanformation->city_ip_name($city_url); if($city_url_new != $city_url){ $city_url = $city_url_new; $ne_url = "https://zumvu.com/marketplace/$city_url".$own_url; header("Location: $ne_url"); } }else{ $city_url = ''; $ne_url = "https://zumvu.com$own_url"; header("Location: $ne_url"); } }else{ $city_url = ''; } if($city_url != ''){ $city_id = $sanformation->city_id_by_url($city_url); $ct = "`city_id` = '$city_id' AND "; $crl = "$city_url/"; $city_name = $sanformation->city_name($city_url); $cth = ''.$city_name.' >'; $meta_city = "in $city_name"; $meta_city_r = "$city_name"; }else{ $city_id = $sanformation->city_id_by_url($countrySession); //$countryCity = $sanformation->city_details_All_country($countrySessionId); //$countryCity_id = $countryCity['city_id']; $ct = "`city_id` = '$city_id' AND "; $crl = ''; $cth = ''; $meta_city = "in India"; $meta_city_r = "india"; } //============================================ duration calculator ================================ $dt = $date->format( 'd M Y H:i' ); $time_now = strtotime("$dt"); function Duration($s, $e){ $timestamp = $e - $s; $years=floor($timestamp/(60*60*24*365)); $timestamp%=60*60*24*365; $weeks=floor($timestamp/(60*60*24*7)); $timestamp%=60*60*24*7; $days=floor($timestamp/(60*60*24)); $timestamp%=60*60*24; $hrs=floor($timestamp/(60*60)); $timestamp%=60*60; $mins=floor($timestamp/60); $secs=$timestamp%60; if ($years >= 1) { $str.= $years.' years '; } else if ($weeks >= 1) { $str.= $weeks.' weeks '; } else if ($days >= 1) { $str.=$days.' days '; } else if ($hrs >= 1) { $str.=$hrs.' hours '; } else if ($mins >= 1) { $str.=$mins.' minutes '; } else{ $str = '2'; } //--------------------------------------------------- /* if($days < 1){ if ($hrs >= 1) { $str.=$hrs.' hours '; } if ($mins >= 1) { $str.=$mins.' minutes '; } }else{ $str = '2'; }*/ return $str; } //============================================================================= AD TYPE ================================================= $quary1 = "SELECT * FROM `yp_asso_field_value` WHERE `asso_with` = '1'"; $result1 = mysqli_query($condb,$quary1) or die('Error, query failed ' . mysqli_error($condb)); while($row = mysqli_fetch_array($result1)){ $val = $row['radio_set_1']; $vals = $row['radio_set_2']; $value_one .= "',$val,', "; $value_two .= "',$vals,', "; } $value_one .= substr($value_one, 0, -2); $value_two .= substr($value_two, 0, -2); if($at == '1'){ $adt = "AND `ad_type` IN ($value_one)"; $typ_txt = " - Offering Ads "; }elseif($at == '2'){ $adt = "AND `ad_type` IN ($value_two)"; $typ_txt = " - Wanted Ads "; }elseif($at == '3'){ $adt = "AND `sales_price` > '0'"; $typ_txt = " - Deals "; }else{ $adt = ""; $typ_txt = " - All Ads "; } //===================================================================== page navigation end ==================================== $srt = "$ct `category_parents` = '$cat_id' AND `status` = '1' $adt"; $page_ulr = "https://zumvu.com/marketplace/$crl"."$cat_url-s$cat_id"."a".$at."p"; $sql_count = "SELECT * FROM `yp_ad_details` WHERE $srt AND `country_id` = '$countrySessionId'"; $result_count = mysqli_query($condb,$sql_count) or die('Error, query failed category ' . mysqli_error($condb)); $count = mysqli_num_rows($result_count); //======================================================================================================================================= $ord = $_GET['order']; if($ord == '1'){ $ord_str = ""; $ord_page_url = ""; }elseif($ord == '2'){ $ord_str = "`activated_on` DESC, "; $ord_page_url = "?order=2"; $ord_txt = " - order by newly added ads "; }elseif($ord == '3'){ $ord_str = "`activated_on` ASC, "; $ord_page_url = "?order=3"; $ord_txt = " - order by earlier added ads "; }elseif($ord == '4'){ $ord_str = "`price` ASC, "; $ord_page_url = "?order=4"; $ord_txt = " - order by lowest price "; }elseif($ord == '5'){ $ord_str = "`price` DESC, "; $ord_page_url = "?order=5"; $ord_txt = " - order by highest price "; }elseif($ord == '6'){ $ord_str = "`views` DESC, "; $ord_page_url = "?order=6"; $ord_txt = " - order by highest visits "; } $page_ulr_order = "https://zumvu.com/marketplace/$crl"."$cat_url/s$cat_id"."a".$at."p$wn/?order="; $srt_all = "$ct `category_parents` = '$cat_id' AND `status` = '1'"; $srt_offered = "$ct `category_parents` = '$cat_id' AND `status` = '1' AND `ad_type` IN ($value_one)"; $srt_wanted = "$ct `category_parents` = '$cat_id' AND `status` = '1' AND `ad_type` IN ($value_two)"; $srt_deals = "$ct `category_parents` = '$cat_id' AND `status` = '1' AND `sales_price` > '0'"; $sql_all = "SELECT * FROM `yp_ad_details` WHERE $srt_all AND `country_id` = '$countrySessionId'"; $result_all = mysqli_query($condb,$sql_all) or die('Error, query failed category ' . mysqli_error($condb)); $count_all = mysqli_num_rows($result_all); $all_url = "https://zumvu.com/marketplace/$crl"."$cat_url/s$cat_id"."a0p1/$ord_page_url"; $sql_offered = "SELECT * FROM `yp_ad_details` WHERE $srt_offered "; $result_offered = mysqli_query($condb,$sql_offered) or die('Error, query failed category ' . mysqli_error($condb)); $count_offered = mysqli_num_rows($result_offered); $offered_url = "https://zumvu.com/marketplace/$crl"."$cat_url/s$cat_id"."a1p1/$ord_page_url"; $sql_wanted = "SELECT * FROM `yp_ad_details` WHERE $srt_wanted "; $result_wanted = mysqli_query($condb,$sql_wanted) or die('Error, query failed category ' . mysqli_error($condb)); $count_wanted = mysqli_num_rows($result_wanted); $wanted_url = "https://zumvu.com/marketplace/$crl"."$cat_url/s$cat_id"."a2p1/$ord_page_url"; $sql_deals = "SELECT * FROM `yp_ad_details` WHERE $srt_deals "; $result_deals = mysqli_query($condb,$sql_deals) or die('Error, query failed category ' . mysqli_error($condb)); $count_deals = mysqli_num_rows($result_deals); $deals_url = "https://zumvu.com/marketplace/$crl"."$cat_url/s$cat_id"."a3p1/$ord_page_url"; ?>
';
}elseif($rows['photo'] != ''){
if($count_array == '0'){
$img = $rows['photo'];
}else{
$img = $image_array[0];
}
$img_cd = '
';
}
$duration = Duration($listing_approve_date, $time_now);
if($duration != '2'){ $duro = $duration.' ago'; }else{ $duro = $listing_approve_date_disp; }
$locations = $rows['locations'];
$locations_array = explode(",",$locations);
if($locations != ''){ $loc = ''.$locations_array[0].''; }else{ $loc = ''; }
$you_are = $rows['you_are'];
$yr = substr($you_are, 1, 50);
$yr = substr($yr, 0, -2);
if($yr != ''){ $you = ''.$yr.''; }else{ $you = ''; }
//$price = $rows['price'];
//if($price > '0'){ $pric = ''.$currency.' '.number_format($price).''; }else{ $pric = ''; }
$price = $rows['price'];
$sales_price = $rows['sales_price'];
if($sales_price > '0'){ $persent = round((($price-$sales_price)*100)/$price); }else{ $persent = ''; }
if($price > '0'){ $pric = ''.$currency.' '.number_format($price).''; }else{ $pric = ''; }
if($sales_price > '0'){ $pric = ''.$currency.' '.number_format($sales_price).'