$condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } $lists = $do->get_list_order($condition); include tpl('gift_order', $module); } break; default: $sorder = array('结果排序方式', '添加时间降序', '添加时间升序', '礼品次数降序', '礼品次数升序', '浏览次数降序', '浏览次数升序', '开始时间降序', '开始时间升序', '到期时间降序', '到期时间升序'); $dorder = array('itemid DESC', 'addtime DESC', 'addtime ASC', 'gifts DESC', 'gifts ASC', 'hits DESC', 'hits ASC', 'fromtime DESC', 'fromtime ASC', 'totime DESC', 'totime ASC'); isset($order) && isset($dorder[$order]) or $order = 0; isset($typeid) or $typeid = 0; $type_select = type_select('gift', 1, 'typeid', '请选择分类', $typeid); $order_select = dselect($sorder, 'order', '', $order); $condition = '1'; if ($_areaids) { $condition .= " AND areaid IN (" . $_areaids . ")"; } //CITY if ($keyword) { $condition .= " AND title LIKE '%{$keyword}%'"; } if ($typeid) { $condition .= " AND typeid={$typeid}"; } if ($areaid) { $condition .= $ARE['child'] ? " AND areaid IN (" . $ARE['arrchildid'] . ")" : " AND areaid={$areaid}"; } $lists = $do->get_list($condition, $dorder[$order]); include tpl('gift', $module); break; }
$middle = str_replace('.thumb.', '.middle.', $thumb); $gname = ''; if ($groupid) { $GROUP = cache_read('group.php'); foreach (explode(',', $groupid) as $gid) { if (isset($GROUP[$gid])) { $gname .= $GROUP[$gid]['groupname'] . ' '; } } } $db->query("UPDATE {$DT_PRE}gift SET hits=hits+1 WHERE itemid={$itemid}"); $head_title = $title . $DT['seo_delimiter'] . $L['gift_title']; } else { $pagesize = 8; $offset = ($page - 1) * $pagesize; $condition = "1"; if ($keyword) { $condition .= " AND title LIKE '%{$keyword}%'"; } if ($typeid) { $condition .= " AND typeid={$typeid}"; } if ($cityid) { $condition .= $AREA[$cityid]['child'] ? " AND areaid IN (" . $AREA[$cityid]['arrchildid'] . ")" : " AND areaid={$cityid}"; } $lists = $do->get_list($condition, 'addtime DESC'); $head_title = $L['gift_title']; } break; } include template('gift', $module);