// Connects to the db
include("./php/config.php");
//$listnum="0"; //100������ �ȵǸ� ��ǰ�� �ȳ��� //admin
$scale=8; //admin save
// Includes related functions
include("./php/util.php");
$connect=my_connect($host,$dbid,$dbpass,$dbname);
include("./php/account.php");
include("./php/update_history.php");
$top_menu = "home";
$grey_box = "Welcome to Foodinfo!";
$green_box = "31,177 people online. 648,101 items for sale.";
?>
Foodinfo
// Includes the top menu
include("./include/top_menu.php");
?>
// Includes the left menu on the left
include("./include/home_left_menu.php");
?>
Keywords:
Food categories
if($cook) {
$query = "select * from e_category where catedep=$cdep and catenum between ($c+1) and ($c+ $range_end) ORDER BY catename" ;
} else {
if(isset($c) && $c) {
// Skips when it's used for the first depth category
$query = "select * from f_category where catedep=$cdep and catenum between ($c+1) and ($c+ $range_end) ORDER BY catename" ;
} else {
$query = "select * from f_category where catedep=$cdep ORDER BY catename";
}
}
$result = mysqli_query($query,$connect);
$total=mysqli_num_rows($result);
if(isset($first_cate) && $first_cate) {
$next_range_end = $range_end;
} else {
$range_len = strlen($range_end);
if($range_len >2) {
$next_range_end = substr($range_end,2);
} else {
$next_range_end = 0;
}
}
$today = date("Ymd");
?>
for($i=0; $row_c=mysqli_fetch_array($result); $i++){
$catenum=$row_c[catenum];
$catename=stripslashes($row_c[catename]);
$sub_catenum = substr($catenum,0,1);
if(!$cook) {
if($sub_catenum == '1') {
$sub_table = "f_resturant";
$query3 = "select anum from $sub_table where end >= curdate() AND withdraw='n' and (catenum between '$catenum' and ('$catenum' + $next_range_end)) ";
} else if($sub_catenum == '2') {
$sub_table = "f_recipe";
$query3 = "select anum from $sub_table where withdraw='n' and (catenum between '$catenum' and ('$catenum' + $next_range_end)) ";
} else if($sub_catenum == '3') {
$sub_table = "f_grocery";
$query3 = "select anum from $sub_table where end >= curdate() AND withdraw='n' and (catenum between '$catenum' and ('$catenum' + $next_range_end)) ";
} else {
if(!$c) {
$query3 = "select anum from e_auct_master LEFT JOIN e_company USING(school_no) where valid >= curdate() AND withdrawn IS NULL and (catenum between '21000000' and ('21000000' + $next_range_end)) ";
} else {
$query3 = "select anum from e_auct_master LEFT JOIN e_company USING(school_no) where valid >= curdate() AND withdrawn IS NULL and (catenum between '$catenum' and ('$catenum' + $next_range_end)) ";
}
}
} else {
if(!$c) {
$query3 = "select anum from e_auct_master LEFT JOIN e_company USING(school_no) where valid >= curdate() AND withdrawn IS NULL and (catenum between '21000000' and ('21000000' + $next_range_end)) ";
} else {
$query3 = "select anum from e_auct_master LEFT JOIN e_company USING(school_no) where valid >= curdate() AND withdrawn IS NULL and (catenum between '$catenum' and ('$catenum' + $next_range_end)) ";
}
}
$result3 = mysqli_query($query3,$connect);
$total_count = @mysqli_num_rows($result3);
if(!fmod($i,2)) {
echo("