|
|
|
Ȩ
>
>
if($sk_code && $sk_name) { ?>
>
} ?>
|
|
|
|
|
|
$que = "select kind_code, kind_name from shop_catagory_kind where upper_code='$su_code' and middle_code='$sm_code'";
$result = mysql_query($que, $conn);
while($row = mysql_fetch_array($result))
{
$kind_code = $row["kind_code"];
$kind_name = $row["kind_name"];
?>
|
}
?>
|
|
if(!$sk_code) {
$que = "select * from shop_list where goods_regist=1 and middle_code='$sm_code' order by goods_best desc, goods_date desc limit 2";
} else {
$que = "select * from shop_list where goods_regist=1 and kind_code='$sk_code' order by goods_best desc, goods_date desc limit 2";
}
$result = mysql_query($que, $conn);
$hitCount = mysql_num_rows($result);
?>
0) {?>
$i = 0;
while($row = mysql_fetch_array($result))
{
$code = $row["code"];
$upper_code = $row["upper_code"];
$middle_code = $row["middle_code"];
$kind_code = $row["kind_code"];
$goods_price = $row["goods_price"];
$goods_name = $row["goods_name"];
$goods_make = $row["goods_make"];
$goods_color = $row["goods_color"];
$goods_size = $row["goods_size"];
$goods_content = $row["goods_content"];
$goods_counter = $row["goods_counter"];
$regist_date = $row["regist_date"];
$goods_date = $row["goods_date"];
$goods_regist = intval($row["goods_regist"]);
$goods_main_hit = $row["goods_main_hit"];
$goods_main_today = $row["goods_main_today"];
$goods_best = $row["goods_best"];
$goods_sub_best = $row["goods_sub_best"];
$goods_new = $row["goods_new"];
$goods_event = $row["goods_event"];
$imgurl1 = $row["imgurl1"];
$imgurl2 = $row["imgurl2"];
$imgurl3 = $row["imgurl3"];
$imgurl4 = $row["imgurl4"];
$imgurl5 = $row["imgurl5"];
$imgurl6 = $row["imgurl6"];
$imgurl7 = $row["imgurl7"];
$imgurl8 = $row["imgurl8"];
$imgurl9 = $row["imgurl9"];
$imgurl10 = $row["imgurl10"];
++$i;
if($i == 1)
{
?>
|
|
if($goods_regist) {
?>
0 ¿ø
} else {
echo "Ç°Àý";
}
?> |
if($goods_regist) {
?>
} else {
echo "";
}
?> |
|
}
if($i > 1)
{
?>
|
|
if($goods_regist) {
?>
0 ¿ø
} else {
echo "Ç°Àý";
}
?> |
if($goods_regist) {
?>
} else {
echo "";
}
?> |
}
if($i == 1)
{
?>
}
}
?>
|
} // µî·Ï»óÇ°ÀÌ ÀÖÀ» °æ¿ì
else echo "ÇöÀç µî·ÏµÈ È÷Æ®»óÇ°ÀÌ ¾ø½À´Ï´Ù. ";
?>
|
ÃÑ
°³ |
if($search_opt == "low_name") $s_name = "high_name";
else if($search_opt == "high_name") $s_name = "low_name";
else $s_name = "low_name";
?>
|
|
|
|
|
|
|
|
|
$listnumber = 9;
if(!$sk_code) $total = mysql_result(mysql_query("select count(*) as total from shop_list where goods_regist=1 and middle_code='$sm_code'",$conn),0,"total");
else $total = mysql_result(mysql_query("select count(*) as total from shop_list where goods_regist=1 and kind_code='$sk_code'",$conn),0,"total");
echo "";
if(!$page) $page = 1;
$offset = ($page - 1) * $listnumber;
$totalpage = intval($total/$listnumber);
if ($totalpage*$listnumber != $total) $totalpage = $totalpage + 1;
$que = "select * from shop_list ";
if(!$sk_code) {
$que .= "where goods_regist=1 and middle_code='$sm_code' ";
} else {
$que .= "where goods_regist=1 and kind_code='$sk_code' ";
}
if($search_opt == "new") $que .= "order by goods_new desc, regist_date desc limit $offset,$listnumber";
else if($search_opt == "low_price") $que .= "order by goods_price asc limit $offset,$listnumber";
else if($search_opt == "high_price") $que .= "order by goods_price desc limit $offset,$listnumber";
else if($search_opt == "low_name") $que .= "order by goods_name asc limit $offset,$listnumber";
else if($search_opt == "high_name") $que .= "order by goods_name desc limit $offset,$listnumber";
else if($search_opt == "favor") $que .= "order by goods_counter desc limit $offset,$listnumber";
else $que .= "order by num desc limit $offset,$listnumber";
$result = mysql_query($que, $conn);
$j=0;
while($row = mysql_fetch_array($result))
{
$code = $row["code"];
$upper_code = $row["upper_code"];
$middle_code = $row["middle_code"];
$kind_code = $row["kind_code"];
$goods_price = $row["goods_price"];
$goods_name = $row["goods_name"];
$goods_make = $row["goods_make"];
$goods_color = $row["goods_color"];
$goods_size = $row["goods_size"];
$goods_content = $row["goods_content"];
$goods_counter = $row["goods_counter"];
$regist_date = $row["regist_date"];
$goods_date = $row["goods_date"];
$goods_regist = intval($row["goods_regist"]);
$goods_main_hit = $row["goods_main_hit"];
$goods_main_today = $row["goods_main_today"];
$goods_best = $row["goods_best"];
$goods_sub_best = $row["goods_sub_best"];
$goods_new = $row["goods_new"];
$goods_event = $row["goods_event"];
$imgurl1 = $row["imgurl1"];
$imgurl2 = $row["imgurl2"];
$imgurl3 = $row["imgurl3"];
$imgurl4 = $row["imgurl4"];
$imgurl5 = $row["imgurl5"];
$imgurl6 = $row["imgurl6"];
$imgurl7 = $row["imgurl7"];
$imgurl8 = $row["imgurl8"];
$imgurl9 = $row["imgurl9"];
$imgurl10 = $row["imgurl10"];
if($j % 3 == 0)
{
?>
}
?>
|
|
|
if($goods_regist) {
?>
0 ¿ø
} else {
echo "Ç°Àý";
}
?> |
|
if($goods_regist) {
?>
} else {
echo "";
}
?> |
|
if($j%3 == 2)
{
?>
}
$j++;
}
if($j%3 == 1) {
echo " | | ";
} else if($j%3 == 2) {
echo " | ";
}
?>
$startpage = (intval(($page - 1) / $pagenumber)) * $pagenumber +1 ;
$endpage = (intval(($startpage - 1 + $pagenumber) / $pagenumber)) * $pagenumber ;
if ($totalpage <= $endpage) $endpage = $totalpage;
?>
if ( $page > $pagenumber)
{
$curpage = $startpage - 1;
echo " ";
}
?>
|
$curpage = $startpage;
while ($curpage <= $endpage):
if ($curpage == $page)
{
echo "[$page] ";
} else
{
echo "[$curpage] ";
}
$curpage++;
endwhile ;
?>
|
if ( $totalpage > $endpage)
{
$curpage = $endpage + 1;
echo "";
}
?>
|
|