File: hetels-list.php this is called via the iframe in index.php | > Uses MySQL Database to generate markers dynamically | > Module written by: Sreeprakash. N | > Date started: 7/15/2005 | | > Module Version Number: 1.0.0 | > DBA Checked: Najeeb Jabbar | > Quality Checked: by Gayatri. S. Prakash +------------------------------------------------------------------------- */ /*-------------------------------------------------------------------------*/ // This include file has MySQL DB Details and functions /*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/ // This include file has MySQL DB Details and functions /*-------------------------------------------------------------------------*/ require("admin/inc/config.inc"); include("phpweather/phpweather.php"); require("phpweather/output/pw_text_en.php"); require("phpweather/output/pw_images.php"); /*-------------------------------------------------------------------------*/ // This file can be called with two parameters via Type and Name /*-------------------------------------------------------------------------*/ if (!isset($_SESSION)) { session_start(); } $thisType=$_GET['Type']; //Restaurant , Real-Estate , default Hotel $thisName=$_GET['Name']; //Abbey if(!isset($thisType))$thisType=$_GET['type']; if(!isset($thisName))$thisName=$_GET['name']; if(!isset($thisType)||$thisType=="")$thisType="Hotel"; $_SESSION[thisType]=$thisType; $xx="-80.224145"; $yy="25.787676"; if($thisType=="Disney"){ //The coordinates are different than our Miami Beach maps. Here are the coordinates to Kissimmee, FL: //map.centerAndZoom(new GPoint(-81.412867, 28.303988), 6) $xx="-81.412867"; $yy="28.303988"; } if(!isset($thisName)||$thisType==""){ echo "Sorry, need the name of the $thisType."; exit; }else{ if($thisType=="Hotel"){ $sql="select * from tblMapDetails where type='Hotel' and name like '%$thisName%'"; $tpl->assign("hotelsimage", 'map-hotels.gif'); $details="Get rates"; $template='popuptemplate_hotel.htm'; }elseif($thisType=="Restaurant"){ $sql="select * from tblMapDetails where type='Restaurant' and name like '%$thisName%'"; //$tpl->assign("hotelsimage", 'restaurants.gif'); $details="Reservations"; $template='popuptemplate_restaurant.htm'; }elseif ($thisType=="Real-Estate"){// Real Estate $sql="select * from tblMapDetails where type='RealEstate' and name like '%$thisName%'"; $tpl->assign("hotelsimage", 'map-real-estate.gif'); $details="Request a showing"; $template='popuptemplate_real_estate.htm'; } elseif ($thisType=="Attractions"){ $sql="select * from tblMapDetails where type='Attractions' and name like '%$thisName%'"; $tpl->assign("hotelsimage", 'map-attractions.gif'); $details="Request a showing"; $template='popuptemplate_attractions.htm'; } elseif ($thisType=="Disney"){ $sql="select * from tblMapDetails where type='Disney' and name like '%$thisName%'"; $tpl->assign("hotelsimage", 'disney-world.gif'); $details="Get rates"; $template='popuptemplate_disney.htm'; } elseif ($thisType=="House-for-sale-by-owner"){ $sql="select * from tblMapDetails where type='House_For_Sale_By_Owner' and name like '%$thisName%'"; $tpl->assign("hotelsimage", 'map-house-for-sale.gif'); $details="Request a showing"; $template='popuptemplate_house_for_sale_by_owner.htm'; } //Schogini: Edited by anish on 20-03-06 elseif ($thisType=="Nightlife"){ $sql="select * from tblMapDetails where type='Nightlife' and name like '%$thisName%'"; $tpl->assign("hotelsimage", 'restaurants-title.gif'); $details="Request a showing"; $template='popuptemplate_nightlife.htm'; } //Schogini: Edited by anish on 19-04-06 elseif ($thisType=="Caribbean_Bahamas"){ $sql="select * from tblMapDetails where type='Caribbean_Bahamas' and name like '%$thisName%'"; $tpl->assign("hotelsimage", 'island.gif'); $details="Request a showing"; $template='popuptemplate_Caribbean_Bahamas.htm'; } //Schogini: Edited by anish on 02-05-06 elseif ($thisType=="Shopping"){ $sql="select * from tblMapDetails where type='Shopping' and name like '%$thisName%'"; $tpl->assign("hotelsimage", 'shops-stores.gif'); $details="Request a showing"; $template='popuptemplate_Shopping.htm'; } //Schogini: Edited by anish on 16-06-06 elseif ($thisType=="Traffic-Camera"){ $sql="select * from tblMapDetails where type='Traffic-Camera' and name like '%$thisName%'"; $tpl->assign("hotelsimage", 'shops-stores.gif'); $details="Request a showing"; $template='popuptemplate_traffic_camera.htm'; } //Schogini: Edited by anish on 16-06-06 elseif ($thisType=="Visitor-Pass"){ $sql="select * from tblMapDetails where type='Visitor-Pass' and name like '%$thisName%'"; $tpl->assign("hotelsimage", 'shops-stores.gif'); $details="Get a Visitor Pass"; $template='popuptemplate_Visitor-Pass.htm'; } //Schogini: Edited by anish on 29-07-06 elseif ($thisType=="Community"){ $sql="select * from tblMapDetails where type='Community' and name like '%$thisName%'"; $tpl->assign("hotelsimage", 'shops-stores.gif'); $details="Request a showing"; $template='popuptemplate_community.htm'; } //Schogini: Edited by anish on 14-08-06 elseif ($thisType=="Recycling"){ $sql="select * from tblMapDetails where type='Recycling' and name like '%$thisName%'"; $tpl->assign("hotelsimage", 'shops-stores.gif'); $details="Request a showing"; $template='popuptemplate_recycling.htm'; } //Schogini: Edited by anish on 02-09-06 elseif ($thisType=="Vacation-Rentals"){ $sql="select * from tblMapDetails where type='Vacation-Rentals' and name like '%$thisName%'"; $tpl->assign("hotelsimage", 'shops-stores.gif'); $details="Request a showing"; $template='popuptemplate_vacation-rentals.htm'; } $resultall=gQuery($sql); $numberall = $resultall->numRows($resultall); if($numberall>1){ $html="Sorry, more than one record found."; }else{ if($db_row=$resultall->fetchRow()){ $name=s($db_row[name]); $street=s($db_row[street]); $city=s($db_row[city]); $image=s($db_row[image]); $url2=$db_row[urldetails2]; $s1s="";$s1e=""; $s2s="";$s2e=""; $s3s="";$s3e=""; if($thisType=="Caribbean_Bahamas"){ $html="$s1s$name$s1e
"; $html.="$s2s{$street}
"; //$html.="$city, {$db_row[state]} {$db_row[zip]}$s2e
"; $html.="
"; }elseif($thisType=="Traffic-Camera"){//edited by anish 22-06-2006 $html="$s1s$name$s1e
";//edited by anish 01-07-2006 to remove link $html.="$s2s{$street}
"; $html.="{$db_row[city]}, {$db_row[state]} $s2e
"; //edited by anish to make camera image live 22-07-2006 $html.="
"; }else{ $html="$s1s$name$s1e
"; $html.="$s2s{$street}
"; $html.="$city, {$db_row[state]} {$db_row[zip]}$s2e
"; $html.="
"; } /*$html="$s1s$name$s1e
"; $html.="$s2s{$street}
"; $html.="$city, {$db_row[state]} {$db_row[zip]}$s2e
"; $html.="
";*/ //Schogini: Edited by anish on 02-02-06 to display business details on rightside $htmlside.="$s1s$name$s1e
"; $htmlside.="$s2s{$street}
"; $htmlside.="$city, {$db_row[state]} {$db_row[zip]}$s2e
"; if(isset($db_row[description])&&trim($db_row[description])!=""){ if($thisType=="Traffic-Camera"){ $new_desc=preg_replace("/\'/","\\'",$db_row[description]); //$new_desc=substr($new_desc,0,20).".."; //$new_desc=split_to_lines($new_desc,35); $html.="$s2s{$new_desc}$s2e
"; }else{ $new_desc=preg_replace("/\'/","\\'",$db_row[description]); //$new_desc=substr($new_desc,0,20).".."; $new_desc=split_to_lines($new_desc,30); $html.="$s2s{$new_desc}$s2e
"; } } /*$new_desc=preg_replace("/\'/","\\'",$db_row[description]); //$new_desc=substr($new_desc,0,20).".."; $new_desc=split_to_lines($new_desc,35);*/ $desc="$new_desc
"."
"; //if(isset($db_row[description])&&trim($db_row[description])!="") //$html.=$desc; //Schogini: Edited by anish on 02-02-06 to display business details on rightside //$htmlside.="{$db_row[description]}
"; if(!empty($db_row[description])&&trim($db_row[description])!="")$htmlside.=$desc; if($thisType=="Visitor-Pass") { $html.="$s3sBusiness Profile$s3e "; $htmlside.="$s3sBusiness Profile$s3e "; }elseif($thisType=="Traffic-Camera") { //$html.="$s3sView Details$s3e "; //$htmlside.="$s3sView Details$s3e "; }else{ $html.="$s3sView Details$s3e "; $htmlside.="$s3sView details$s3e "; } if(isset($db_row[urldetails2])&&trim($db_row[urldetails2])!=""){ //Schogini: Edited by anish on 02-02-06 to display business details on rightside if($thisType!="Traffic-Camera") { $html.="- $s3s$details$s3e
"; $htmlside.=" $s3s$details$s3e
"; } } if(isset($db_row[longitude])&&isset($db_row[lattide])){ if(trim($db_row[longitude])!=""&&trim($db_row[lattide])!=""){ $xx=$db_row[longitude]; $yy=$db_row[lattide]; }else{ $html="Sorry, coordinates not found."; #$xx="-80.224145"; #$yy="25.787676"; } } }else{ $html="Sorry, record not found."; } } } //print "API: ".$api."
"; //Schogini: Edited by anish on 11-08-06 to display weather on rightside $weather = new phpweather(); $data = $weather->decode_metar(); $type = 'pw_text_en'; $text = new $type($weather); $icons = new pw_images($weather); //echo $w['image']['url']."Anish"; $sign="蚓"; $sign2="蚌"; $sign=htmlentities($sign); $sign2=htmlentities($sign2); $tpl->assign("image1", $icons->get_sky_image()); $tpl->assign("image2", $icons->get_winddir_image()); $tpl->assign("image3", $icons->get_temp_image()); $tpl->assign("title1", $weather->get_location()); $tpl->assign("title2", $weather->get_location()); $tpl->assign("title3", $weather->get_location()); $tpl->assign("temp", $data['temperature']['temp_c'].$sign); $tpl->assign("speed", $data['wind']['miles_per_hour']); $tpl->assign("feel", $data['temperature']['temp_f'].$sign2); $tpl->assign("dir", $data['wind']['deg']); $tpl->assign("sky", $data['clouds'][0]['condition']); $tpl->assign("types", $thisType); $tpl->assign("api",$api); $tpl->assign("hotelname",$name); $tpl->assign("infohtml", "
$html
"); //Schogini: Edited by anish on 02-02-06 to display business details on rightside $tpl->assign("inforightside", "$htmlside"); $tpl->assign("long", $xx); $tpl->assign("latt", $yy); $tpl->display($template); ?>