couponlist.php
来自「城市分类信息,门户网站,我做为地方信息网」· PHP 代码 · 共 49 行
PHP
49 行
<?phprequire_once '../include/common.php';$cid = intval($cid);$cptype = intval($cptype);if($cptype) { $where = "WHERE cptype='$cptype'"; $link = 'couponlist.php?cptype='.$cptype;} else if($cid) { $where = "WHERE cid='$cid'"; $link = 'couponlist.php?cid='.$cid; } else { $where = "WHERE 1 "; $link = 'couponlist.php?do=all';}include_once '../include/biz_coupon.php';$page = intval($page);$page = $page ? $page : 1;$start = ($page==1)? 0 : ($page-1) * $webcouponlist;$query = $DB->query("SELECT cpid FROM {$tablepre}bizcoupon $where");$num = $DB->num_rows($query);$page = commonPage($page, $num, $link, $webcouponlist);$query = $DB->query("SELECT b.*, bf.biz_name FROM {$tablepre}bizcoupon as b LEFT JOIN {$tablepre}bizinfo as bf USING(bizid) $where ORDER BY cpid DESC LIMIT $start, $webcouponlist");while($rs = $DB->fetch_array($query)) { $rs['stime'] = date('Y-m-d', $rs['stime']); $rs['etime'] = date('Y-m-d', $rs['etime']); $rs['cpimg'] = $rs['cpimg'] ? "<img src=../webdata/biz_coupon/$rs[cpimg] height=110 width=180 class=indexpic >" : ''; $bizcoupon_list[] = $rs; }$query = $DB->query("SELECT cpid, subject,cid FROM {$tablepre}bizcoupon ORDER BY replies DESC LIMIT 0, 12");while($rs = $DB->fetch_array($query)) { $hotcoupon_list[] = $rs; }include showpage('couponlist');?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?