$current_page"; $mode = $_REQUEST['mode']; //echo "

$mode

"; if(substr($mode, 0, 1) == '0') { $letter = substr($mode, 0, 3); } else { $letter = substr($mode, 0, 1); } $mode = substr($mode, strpos($mode, "/")+1, strlen($mode)); //$encoded_link_post = substr($mode, 2); $encoded_link_post = $mode; //echo "

$encoded_link_post

"; if($encoded_link_post) { $back_one_dir = "../"; } $decoded_link_post = urldecode(base64_decode($encoded_link_post)); parse_str($decoded_link_post); if($message) { $user_notification = "
$message
"; } include('../includes/db_config.php'); ?> Browse by Letter <? echo $letter; ?> | <? echo $site_title; ?>

Browse Alphabetically

"; if($letter <> "0-9") { $alphabetic_query = "/*" . MYSQLND_QC_ENABLE_SWITCH . "*/" . "SELECT * from restaurants where CITY IN ($site_cities) and STATE = '$site_state' and OPEN='Y' AND (replace(upper(NAME), 'THE ', '') LIKE '$letter%' OR UPPER(NAME) LIKE '$letter%') order by NAME asc"; } else { $alphabetic_query = "/*" . MYSQLND_QC_ENABLE_SWITCH . "*/" . "select * from restaurants where CITY IN ($site_cities) and STATE = '$site_state' and name regexp '^[0-9]+' and OPEN='Y'"; } $alphabetic_result = $connect->query($alphabetic_query); while ($r = mysqli_fetch_array($alphabetic_result)) { $yelp_id = $r["YELP_ID"]; echo "
"; $count++; $id=$r["ID"]; $name=trim($r["NAME"]); $name_search=$connect->real_escape_string($name); $restaurant_count = "/*" . MYSQLND_QC_ENABLE_SWITCH . "*/" . "SELECT COUNT(ID) AS COUNT FROM restaurants WHERE NAME='$name_search' and CITY IN ($site_cities) and STATE = '$site_state'"; $results_count = $connect->query($restaurant_count); while ($c = mysqli_fetch_array($results_count)) { $count=$c["COUNT"]; if($count > 1) { $double = "/".$id; } else { $double = ""; } } $link_name=get_clean_name($name).$double; $address=trim($r["ADDRESS"]); $city=trim($r["CITY"]); $state=trim($r["STATE"]); $phone=trim($r["PHONE"]); $type1=trim($r["TYPE"]); $type2=trim($r["TYPE2"]); $type3=trim($r["TYPE3"]); $delivery=trim($r["DELIVERY"]); $url=trim($r["URL"]); $desc=trim($r["DESC"]); $pick_up=trim($r["PICK_UP"]); $menu=trim($r["MENU"]); $college=trim($r["COLLEGE"]); $special=trim($r["SPECIAL"]); $price=trim($r["PRICE"]); $wine=trim($r["WINE"]); $open=trim($r["OPEN"]); //$rating = get_rating($id); //$num_reviews = get_num_reviews($id); $rating_image = get_rating_image($rating); $thumbnail = get_thumbnail($id, $name); //$categories = get_categories($type1, $type2, $type3, '|'); echo "
$thumbnail

$name

$rating_image

$address

$city, $state

$phone

"; /* echo "
$thumbnail

$name

$rating_image

$num_reviews reviews

$address

$city, $state

$phone

"; */ $catagories = ""; echo "
"; } echo "
"; echo ""; echo ''; //echo "

Time: " . number_format(( microtime(true) - $startTime), 4) . " Seconds

"; ?>