<?php
require_once('/Library/WebServer/db.incl.php');
$cuisine_arr = $rest_cuisine_arr = array();
$query = 'select id, type from rest_cuisine order by type';
$res = mysql_query($query);
while ($row = mysql_fetch_assoc($res))
{
	extract($row);
	$cuisine_arr[$id] = $type;
}
$query = 'select distinct cuisine from rest_restaurants order by 1';
$res = mysql_query($query);
while ($row = mysql_fetch_assoc($res))
{
	extract($row);
	$rest_cuisine_arr[] = $cuisine;
}
$term = 'all';
if ($_POST['term'])
{
	$term = $_POST['term'];
}
elseif ($_GET['c'])
{
	$term = $_GET['c'];
}
if ($term and $term <> 'all')
{
	$where = " and cuisine = '$term'";
	$countwhere = " where cuisine = '$term'";
	$url_add = '&c=' . $term;
}
else
{
	$where = $countwhere = $url_add = '';
}
$query = 'select count(*) from rest_restaurants' . $countwhere;

$res = mysql_query($query);
list ($number_of_restaurants) = mysql_fetch_row($res);

$name = $_POST['name'];
$menu_thumb = $_POST['menu_thumb'];

?>
