require("../../system/include/common.ini"); $i_list = ''; $sflg = ''; $sflg_sql = ''; $page = 'list.php'; $sql = ''; if(GET('yoyaku')){ $sql = " AND shop_flg = '4'"; $page = 'list.php?yoyaku=1'; }elseif(GET('key')){ $sql = " AND (name LIKE '%".GET('key')."%' OR name2 LIKE '%".GET('key')."%')"; $page = 'list.php?key='.urlencode(GET('key')); } $stop = 20; if(POST('num') == "") $num = 0; else $num = (POST('num') - 1) * $stop; $l_plus = $num; $sql = "SELECT * FROM item WHERE shop_flg != '3' ".$sql." AND s_ymd <= '".date("Ymd")."' AND e_ymd >= '".date("Ymd")."' ORDER BY id,ct "; $max = $mysqli->query($sql)->rowCount(); $iresult = $mysqli->query($sql." LIMIT ".$num.", ".$stop); while($icustomer = $iresult->fetch()){ $l_plus++; $i_no = $icustomer['no']; $dresult = $mysqli->query("SELECT * FROM topics_data WHERE page = 'item' AND cate = 'file' AND no = '".$i_no."' ORDER BY CAST(num AS SIGNED) LIMIT 0,1"); $dcustomer = $dresult->fetch(); $i_pic = $dcustomer['det1']; if(!$i_pic) $i_pic = 'img/noimages.png'; else $i_pic = _HREF_MAS.$i_pic; $i_id = $icustomer['id']; $i_name = $icustomer['name']; $i_name2 = $icustomer['name2']; $u_price = $icustomer['u_price']; $shop_flg = $icustomer['shop_flg']; //if($i_name2) $i_name .= ' '.$i_name2; //$z_price = floor(math_auto($u_price,_SHOUHI_ZEI,'*')); //$u_price = number(math_auto($u_price,$z_price,'+')); $u_price = number($u_price); switch($shop_flg){ case '2': $shop_flg = '【残りわずか】'; break; case '4': $shop_flg = '【予約受付中】'; break; case '5': $shop_flg = '【販売終了】'; break; default: $shop_flg = ''; } $i_list .= '
'.$u_price.'円 (税込・送料込)