"Africa", "AN" => "Antarctica", "AS" => "Asia", "EU" => "Europe", "OC" => "Australia (Oceania)", "NA" => "North America", "SA" => "South America" ); if (filter_var($ip, FILTER_VALIDATE_IP) && in_array($purpose, $support)) { $ipdat = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=".$ip)); if (@strlen(trim($ipdat->geoplugin_countryCode)) == 2) { switch ($purpose) { case "location": $output = array( "city" => @$ipdat->geoplugin_city, "state" => @$ipdat->geoplugin_regionName, "country" => @$ipdat->geoplugin_countryName, "country_code" => @$ipdat->geoplugin_countryCode, "continent" => @$continents[strtoupper($ipdat->geoplugin_continentCode)], "continent_code" => @$ipdat->geoplugin_continentCode, "currency_symbol" => @$ipdat->geoplugin_currencySymbol ); break; case "address": $address = array($ipdat->geoplugin_countryName); if (@strlen($ipdat->geoplugin_regionName) >= 1) $address[] = $ipdat->geoplugin_regionName; if (@strlen($ipdat->geoplugin_city) >= 1) $address[] = $ipdat->geoplugin_city; $output = implode(", ", array_reverse($address)); break; case "city": $output = @$ipdat->geoplugin_city; break; case "state": $output = @$ipdat->geoplugin_regionName; break; case "region": $output = @$ipdat->geoplugin_regionName; break; case "country": $output = @$ipdat->geoplugin_countryName; break; case "countrycode": $output = @$ipdat->geoplugin_countryCode; break; case "currencysymbol": $output = @$ipdat->geoplugin_currencySymbol; break; case "currencycode": $output = @$ipdat->geoplugin_currencyCode; break; } } } return $output; } $geocountry = ip_info("Visitor", "Country"); $geoccode = ip_info("Visitor", "Country Code"); $geocrcode = ip_info("Visitor", "Currency Code"); $geosymbol = ip_info("Visitor", "Currency Symbol"); $sqlcntry = "SELECT C_Code,Amount,Unicode FROM `tbl_PriceConverter` where `C_Code` = '$geocrcode' "; $resultcn = mysql_query($sqlcntry); $resultcno = mysql_num_rows($resultcn); if($resultcno=='1'){ $rowcntry = mysql_fetch_row($resultcn); $amt = $rowcntry[1]; $ccode = $rowcntry[0]; $unicode = $rowcntry[2]; $csym = $geosymbol; }else{ $sqlcntryd = "SELECT C_Code,Amount,Unicode FROM `tbl_PriceConverter` where `C_Code` = 'USD' "; $resultcnd = mysql_query($sqlcntryd); $rowcntryd = mysql_fetch_row($resultcnd); $amt = $rowcntryd[1]; $ccode = $rowcntryd[0]; $unicode = $rowcntryd[2]; $csym ='US$'; } while($result = mysql_fetch_assoc($sqlre)){ $arraytg=array(); $sqltag=mysql_query("SELECT ts.Tag_Id,tt.Tag_Name,tt.Tag_Type,te.Exp_Id,te.Exp_Name,te.NoofPeople,te.PriceP FROM `tbl_Search` ts inner join `tbl_Pages` tp on ts.Page_Id=tp.Page_Id inner join `tbl_Experience` te on tp.Type_Id=te.Exp_Id inner join `tbl_TagConfi` tt on ts.Tag_Id=tt.Tag_Id where te.Exp_Id='".$result["Exp_Id"]."' and tp.Type='Experience' and te.status='Active'"); while($rowt = mysql_fetch_array($sqltag)) { $arraytg[$rowt['Tag_Id']]=$rowt['Tag_Name']; } ksort($arraytg); $city = $result['City']; $name = $result["Exp_Name"]; $seq= unserialize($result['Sequence']); $img = unserialize($result['Image']); $fseq = array_flip($seq); $countf = count($fseq); ksort($fseq); $flipseq = array_flip($seq); $keyseq = array_keys($flipseq); $flipkey = array_flip($keyseq); ksort($flipkey); $fimg = $img[$flipkey[1]]; $server =$_SERVER['SERVER_NAME']; $path ="../gallery/Thumb/Experience/".$city."/".$name."/"; $data .="
"; $data .="

".$result["Exp_Name"]."

".$result['City'].", ".$result['State']."
"; $data .="

".$result['Brief']."

"; if(!empty($arrayex)) { $data .="
"; foreach($arrayex as $key=>$value){ if(array_key_exists($value,$arraytg)) { $data .="
".$arraytg[$value]."
"; } } $data .="
"; } $data .="
"; $nop='';$pricep=''; if(!empty($result['NoofPeople'])){$nop =$result['NoofPeople']; } if(!empty($result['PriceP'])){$pricep =$result['PriceP']; } if(!empty($nop) && !empty($pricep)){$disp = 1;}else{$disp = '0';} if($disp=='1'){ $data .="

Pricing: ".$csym." ".number_format($pricep/$amt)." per person for minimum ".$nop." participants.

"; } $data .="
"; } if($data!=''){array_push($arrpg,$data);} $sqlitn=mysql_query("Select Itinerary_Id,Itinerary_City from tbl_Itinerary where `Status`='Active' "); $arrayitn=array(); while($rowitn = mysql_fetch_array($sqlitn)) { $itid=''; $cities = unserialize($rowitn['Itinerary_City']); $itid = $rowitn['Itinerary_Id']; foreach($cities as $acity){$scity = substr($acity,1); if($scity==$cid){array_push($arrayitn,$itid);}} //array_push($arrayitn, unserialize($rowitn['Itinerary_City'])); } $regionid = $row[6]; $sqlcity = mysql_query("Select tc.City_Id,tc.Region_Id from tbl_City tc where tc.`Status`='Active' and tc.Region_Id = '$regionid' "); $arraycty=array(); while($rowcty = mysql_fetch_array($sqlcity)) { $ctyid = $rowcty['City_Id']; if($ctyid==$cid){continue;} array_push($arraycty,$ctyid); } /*session_start(); $_SESSION['pageid'][]="c".$cid; $arrayre = array_unique($_SESSION['pageid']);*/ ?> <?php echo $title; ?> "; } echo $datam;?>
'.$text1[$fseq[$j]].'
'.$text2[$fseq[$j]].'
'.$stext[$fseq[$j]].'
'; } echo $divt; ?>

Location

Related Itineraries

"; for($k=$i;$k<($i+2);$k++) { if(!empty($arrayitn[$k])){ $sqlitny = "Select Itinerary_Id,Itinerary_Name,Image,Sequence,Itinerary_Url from tbl_Itinerary where `Status`='Active' and `Itinerary_Id` = '".$arrayitn[$k]."' "; $resultny = mysql_query($sqlitny); $rowitny = mysql_fetch_row($resultny); $image = unserialize($rowitny[2]); $seq = unserialize($rowitny[3]); $server = $_SERVER['HTTP_HOST']; $flipseq = array_flip($seq); $keyseq = array_keys($flipseq); $flipkey = array_flip($keyseq); ksort($flipkey); $fimg = $image[$flipkey[1]]; $name1 = preg_replace('/\s+/', '%20', $rowitny[1]); $name2 = htmlspecialchars($name1); $datat .="
"; $datat .=" ".$rowitny[1].""; $datat .="

".$rowitny[1]."

"; $datat .="
"; } } $datat .="
"; $j++;} echo $datat;?>

Nearby Cities

"; for($n=$m;$n<($m+2);$n++) { if(!empty($arraycty[$n])){ $sqlitnyc = "Select tc.City_Id,tc.City_Url,tcc.City_Name as City,tc.Image,tc.Sequence from tbl_City tc inner join tbl_CityConfi tcc on tc.City_Name=tcc.CityC_Id where tc.`Status`='Active' and tc.`City_Id` = '".$arraycty[$n]."'"; $resultnyc = mysql_query($sqlitnyc); $rowitnyc = mysql_fetch_row($resultnyc); $imagec = unserialize($rowitnyc[3]); $seqc = unserialize($rowitnyc[4]); $serverc = $_SERVER['HTTP_HOST']; $flipseqc = array_flip($seqc); $keyseqc = array_keys($flipseqc); $flipkeyc = array_flip($keyseqc); ksort($flipkeyc); $fimgc = $imagec[$flipkeyc[1]]; $name1 = preg_replace('/\s+/', '%20', $rowitnyc[2]); $name2 = htmlspecialchars($name1); $datatc .="
"; $datatc .=" ".$rowitnyc[2].""; $datatc .="

".$rowitnyc[2]."

"; $datatc .="
"; } } $datatc .="
"; $p++;} echo $datatc;?>