| |
| |
 |
|
 |
|
 |
|
|
|
| Advanced Search Made Easy |
$OtherValue)
{
if($OtherValue == 'SpecialOffer')
{
if($FB_SO == 'All')
{
$SpQuery = '';
}elseif($FB_SO == 'Choose')
{
$SpQuery = "and bigeat_cms.special_offer1='$FB_SO_Choose' or bigeat_cms.special_offer2='$FB_SO_Choose' or bigeat_cms.special_offer3='$FB_SO_Choose'";
//echo $SpQuery;
}
}elseif($OtherValue == 'AvgPrice')
{
//echo "avg";
//$AvgQuery = "and bigeat_cms.average_price LIKE %$FB_AP_Choose%";
}elseif($OtherValue == 'Voucher')
{
if($VoucherOption == 'DV')
{
$DVQuery = "and bigeat_cms.member_discount_status='1'";
}elseif($VoucherOption == 'GV')
{
$DVQuery = "and bigeat_gift_vouchers.gv_price='$DiscountRate'";
}
}elseif($OtherValue == 'Booking')
{
$BookingQuery = "and bigeat_restaurant_package.interactive_booking_reservation ='YES'";
}elseif($OtherValue == 'ReviewedPlace')
{
//$ReviewQuery = "and bigeat_review.restaurant_id=bigeat_cms.restaurant_id") or die(mysql_error());
}elseif($OtherValue == 'OnlineOrder')
{
$OnlineQuery = "and bigeat_restaurant_package.online_customers ='YES'";
}
}
/*-------------//Other option-----------------*/
$MainQuery = mysql_query("select distinct * from bigeat_cms,bigeat_restaurant_package,bigeat_gift_vouchers,bigeat_review $Query and bigeat_cms.county='$County' and bigeat_cms.town='$Town' $SpQuery $AvgQuery $DVQuery $BookingQuery $OnlineQuery and bigeat_restaurant_package.restaurant_id=bigeat_cms.restaurant_id and bigeat_gift_vouchers.restaurant_id=bigeat_cms.restaurant_id and bigeat_review.restaurant_id=bigeat_cms.restaurant_id") or die(mysql_error());
while($FetchQuery = mysql_fetch_array($MainQuery))
{
$RestaurantIdArray[] = $FetchQuery["restaurant_id"];
}
}elseif($SelectType == 'Station')
{
//$MainQuery = mysql_query("select * from bigeat_cms $Query") or die(mysql_error());
/*-------------Other option-----------------*/
foreach($_REQUEST[OtherFacility] as $OtheKey=>$OtherValue)
{
if($OtherValue == 'SpecialOffer')
{
if($FB_SO == 'All')
{
$SpQuery = '';
}elseif($FB_SO == 'Choose')
{
$SpQuery = "and bigeat_cms.special_offer1='$FB_SO_Choose' or bigeat_cms.special_offer2='$FB_SO_Choose' or bigeat_cms.special_offer3='$FB_SO_Choose'";
}
}elseif($OtherValue == 'AvgPrice')
{
//$AvgQuery = "and bigeat_cms.average_price LIKE %$FB_AP_Choose%";
}elseif($OtherValue == 'Voucher')
{
if($VoucherOption == 'DV')
{
$DVQuery = "and bigeat_cms.member_discount_status='1'";
}elseif($VoucherOption == 'GV')
{
$DVQuery = "and bigeat_gift_vouchers.gv_price='$DiscountRate'";
}
}elseif($OtherValue == 'Booking')
{
$BookingQuery = "and bigeat_restaurant_package.interactive_booking_reservation ='YES'";
}elseif($OtherValue == 'ReviewedPlace')
{
//$ReviewQuery = "and bigeat_review.restaurant_id=bigeat_cms.restaurant_id") or die(mysql_error());
}elseif($OtherValue == 'OnlineOrder')
{
$OnlineQuery = "and bigeat_restaurant_package.online_customers ='YES'";
}
}
/*-------------//Other option-----------------*/
$MainQuery = mysql_query("select * from bigeat_cms,bigeat_restaurant_package,bigeat_gift_vouchers,bigeat_review $Query $SpQuery $AvgQuery $DVQuery $BookingQuery $OnlineQuery and bigeat_restaurant_package.restaurant_id=bigeat_cms.restaurant_id and bigeat_gift_vouchers.restaurant_id=bigeat_cms.restaurant_id and bigeat_review.restaurant_id=bigeat_cms.restaurant_id") or die(mysql_error());
while($FetchMainQuery = mysql_fetch_object($MainQuery))
{
$PostCodeArray[$FetchMainQuery->restaurant_id] = $FetchMainQuery->post_code;
}
foreach($PostCodeArray as $PostKey=>$PostValue)
{
$Distance = distance_between_postcodes (array('from_postcode' => $Station, 'to_postcode' => $PostValue));
if($Distance < 0)
{
/* one of the postcodes is invalid */
}else
{
if($Dist_Stn >= $Distance)
{
$RestaurantIdArray[] = $PostKey;
$DistanceArray[$PostKey] = $Distance;
}
}
}
}elseif($SelectType == 'PCode')
{
//$MainQuery = mysql_query("select * from bigeat_cms $Query") or die(mysql_error());
//$MainQuery = mysql_query("select * from bigeat_cms $Query") or die(mysql_error());
/*-------------Other option-----------------*/
foreach($_REQUEST[OtherFacility] as $OtheKey=>$OtherValue)
{
if($OtherValue == 'SpecialOffer')
{
if($FB_SO == 'All')
{
$SpQuery = '';
}elseif($FB_SO == 'Choose')
{
$SpQuery = "and bigeat_cms.special_offer1='$FB_SO_Choose' or bigeat_cms.special_offer2='$FB_SO_Choose' or bigeat_cms.special_offer3='$FB_SO_Choose'";
}
}elseif($OtherValue == 'AvgPrice')
{
//$AvgQuery = "and bigeat_cms.average_price LIKE %$FB_AP_Choose%";
}elseif($OtherValue == 'Voucher')
{
if($VoucherOption == 'DV')
{
$DVQuery = "and bigeat_cms.member_discount_status='1'";
}elseif($VoucherOption == 'GV')
{
$DVQuery = "and bigeat_gift_vouchers.gv_price='$DiscountRate'";
}
}elseif($OtherValue == 'Booking')
{
$BookingQuery = "and bigeat_restaurant_package.interactive_booking_reservation ='YES'";
}elseif($OtherValue == 'ReviewedPlace')
{
//$ReviewQuery = "and bigeat_review.restaurant_id=bigeat_cms.restaurant_id") or die(mysql_error());
}elseif($OtherValue == 'OnlineOrder')
{
$OnlineQuery = "and bigeat_restaurant_package.online_customers ='YES'";
}
}
/*-------------//Other option-----------------*/
$MainQuery = mysql_query("select * from bigeat_cms,bigeat_restaurant_package,bigeat_gift_vouchers,bigeat_review $Query $SpQuery $AvgQuery $DVQuery $BookingQuery $OnlineQuery and bigeat_restaurant_package.restaurant_id=bigeat_cms.restaurant_id and bigeat_gift_vouchers.restaurant_id=bigeat_cms.restaurant_id and bigeat_review.restaurant_id=bigeat_cms.restaurant_id") or die(mysql_error());
while($FetchMainQuery = mysql_fetch_object($MainQuery))
{
$PostCodeArray[$FetchMainQuery->restaurant_id] = $FetchMainQuery->post_code;
}
//echo 'kk'.$PostCode;
foreach($PostCodeArray as $PostKey=>$PostValue)
{
$Distance = distance_between_postcodes (array('from_postcode' => $PostCode, 'to_postcode' => $PostValue));
if($Distance < 0)
{
/* one of the postcodes is invalid */
}else
{
if($Dist_PCode >= $Distance)
{
$RestaurantIdArray[] = $PostKey;
$DistanceArray[$PostKey] = $Distance;
}
}
}
}
/*------------------//county,stn,pc----------------------*/
}else
{
///single query
/*------------cuisine checking-------------------*/
if($CuisineType == 'Any')
{
$Query = 'where 1';
}else
{
$Query = "where restaurant_cuisine='$CuisineType'";
}
/*------------//cuisine checking-------------------*/
/*------------------county,stn,pc----------------------*/
if($SelectType == 'County')
{
$MainQuery = mysql_query("select * from bigeat_cms $Query and county='$County' and town='$Town'") or die(mysql_error());
while($FetchQuery = mysql_fetch_array($MainQuery))
{
$RestaurantIdArray[] = $FetchQuery["restaurant_id"];
}
}elseif($SelectType == 'Station')
{
$MainQuery = mysql_query("select * from bigeat_cms $Query") or die(mysql_error());
while($FetchMainQuery = mysql_fetch_object($MainQuery))
{
$PostCodeArray[$FetchMainQuery->restaurant_id] = $FetchMainQuery->post_code;
}
foreach($PostCodeArray as $PostKey=>$PostValue)
{
$Distance = distance_between_postcodes (array('from_postcode' => $Station, 'to_postcode' => $PostValue));
if($Distance < 0)
{
/* one of the postcodes is invalid */
}else
{
if($Dist_Stn >= $Distance)
{
$RestaurantIdArray[] = $PostKey;
$DistanceArray[$PostKey] = $Distance;
}
}
}
}elseif($SelectType == 'PCode')
{
$MainQuery = mysql_query("select * from bigeat_cms $Query") or die(mysql_error());
while($FetchMainQuery = mysql_fetch_object($MainQuery))
{
$PostCodeArray[$FetchMainQuery->restaurant_id] = $FetchMainQuery->post_code;
}
//echo 'kk'.$PostCode;
foreach($PostCodeArray as $PostKey=>$PostValue)
{
$Distance = distance_between_postcodes (array('from_postcode' => $PostCode, 'to_postcode' => $PostValue));
if($Distance < 0)
{
/*Not a valid post code*/
}else
{
if($Dist_PCode >= $Distance)
{
$RestaurantIdArray[] = $PostKey;
$DistanceArray[$PostKey] = $Distance;
}
}
}
//print_r($DistanceArray);
}
/*------------------//county,stn,pc----------------------*/
}
$RestaurantIdArray = array_unique($RestaurantIdArray);
//print_r($RestaurantIdArray);
/**/
/*-----------------display records using restaurant id------------------*/
foreach($RestaurantIdArray as $RIdKey=>$RIdValue)
{
//$QrySelectRestaurant = mysql_query("select * from bigeat_cms where restaurant_id='$RIdValue'");
$PartQuery .= "'".$RIdValue."' or restaurant_id=";
}
$PartQuery = rtrim($PartQuery,' or restaurant_id=');
//echo $PartQuery;
//echo "select * from bigeat_cms where restaurant_id=$PartQuery";
$QrySelectRestaurant = mysql_query("select * from bigeat_cms where restaurant_id=$PartQuery $QryOrderby $sort");
$count = mysql_num_rows($QrySelectRestaurant);
/*---------------//display records using restaurant id------------------*/
}
?>
|
|
|
0)
{
?>
| |
Restaurant Name & Address |
Distance & Others |
restaurant_id'");
$FetchWebsite = mysql_fetch_object($QrySelectWebsite);
/*-------//Site url----------*/
/*---------Profile Image----------*/
$ProImg = $RtDetailsFetch->restaurant_profile_image;
if($ProImg=='')
{
$RtImg=$FetchWebsite->Website.'/images/profile.jpg';
}else
{
$RtImg='http://secure.bigeat.com/restaurant_images/'.$ProImg;
}
/*-------//Profile Image----------*/
/*---------Package details----------*/
$QrySelectPackDetails = mysql_query("select * from bigeat_restaurant_package where restaurant_id='$FetchRestaurant->restaurant_id'");
$FetchPackDetails = mysql_fetch_object($QrySelectPackDetails);
/*-------//Package details----------*/
/*-------Reviews Details----------*/
$QrySelectReviews = mysql_query("select * from bigeat_review where restaurant_id='$FetchRestaurant->restaurant_id'");
$FetchReviewsCount = mysql_num_rows($QrySelectReviews);
/*-----//Reviews Details----------*/
if($FetchRestaurant->special_offer1!='' || $FetchRestaurant->special_offer2!='' || $FetchRestaurant->special_offer3!='')
{
$SPOfferImg = ' ';
}
else
{
$SPOfferImg = ' ';
}
if($FetchRestaurant->average_price!='')
{
$AvgPriceImg = ' ';
}else
{
$AvgPriceImg = ' ';
}
if($FetchRestaurant->voucher_type=='DV')
{
if($FetchRestaurant->member_discount_status !='1')
{
$DiscountStatusImg = ' ';
}
else
{
$DiscountStatusImg = ' ';
}
}elseif($FetchRestaurant->voucher_type=='GV')
{
$QrySelectGvDetails = mysql_query("select * from bigeat_gift_vouchers where restaurant_id='$FetchRestaurant->restaurant_id'");
if(mysql_num_rows($QrySelectGvDetails)>0)
{
$DiscountStatusImg = ' ';
}else
{
$DiscountStatusImg = ' ';
}
}
if($FetchPackDetails->interactive_booking_reservation=='YES')
{
$PackageTypeImg = ' ';
}
else
{
$PackageTypeImg = ' ';
}
if($FetchReviewsCount>0)
{
$ReviewStatusImg = ' ';
}
else
{
$ReviewStatusImg = ' ';
}
if($FetchPackDetails->online_customers=='YES')
{
$OnlineOrderStatusImg = ' ';
}
else
{
$OnlineOrderStatusImg = ' ';
}
$MapPath = 'http://www.viamichelin.com/viamichelin/gbr/dyn/controller/ItiWGPerformPage?strAddress=&strLocation=&strCP=&strCountry=EUR&strStartAddress=&strStartCity=&strStartCP='.$PostCode.'&strStartCityCountry=EUR&strDestAddress=&strDestCity=&strDestCP='.$FetchRestaurant->post_code.'&strDestCityCountry=EUR';
?>
> |
>restaurant_name;?>
restaurant_address1;?>
restaurant_address2;?>
restaurant_address3;?> |
>restaurant_id].' miles';?>
Phone No: '.$FetchRestaurant->restaurant_address_tele01;?>Email Id: '.$FetchRestaurant->restaurant_address_email.'';?>Website: '.$FetchWebsite->Website.'';?>Click Here For Map';?> |
| > |
|
|
|
|
|
|
|
|
 |
|
 |
Home | Restaurateurs | Members | Privacy Policy | Terms & Conditions | Advertise with us | Knowledgebase | Quickguide
Set as Home Page | Add to Favourites | Recipes | Site Map | FAQs | Members' Forum | Portfolio | Contact us |
 |
Copyright © 2004 - 2007 by Bigeat Ltd. All rights reserved. Bigeat is a trademark of Bigeat Ltd. |
|
|
|
|
|
|
|