Beispiel #1
0
     $itemid or msg();
     $do->itemid = $itemid;
     $item = $do->get_one();
     extract($item);
     $votes = array();
     for ($i = 1; $i < 11; $i++) {
         $s = 's' . $i;
         if (${$s}) {
             $votes[$i] = ${$s};
         }
     }
     $condition = "itemid={$itemid}";
     if ($keyword) {
         $condition .= " AND (ip LIKE '%{$keyword}%' OR username LIKE '%{$keyword}%')";
     }
     $lists = $do->get_list_record($condition);
     include tpl('vote_record', $module);
     break;
 default:
     $sorder = array('结果排序方式', '添加时间降序', '添加时间升序', '投票次数降序', '投票次数升序', '浏览次数降序', '浏览次数升序', '开始时间降序', '开始时间升序', '到期时间降序', '到期时间升序');
     $dorder = array('itemid DESC', 'addtime DESC', 'addtime ASC', 'votes DESC', 'votes 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('vote', 1, 'typeid', '请选择分类', $typeid);
     $order_select = dselect($sorder, 'order', '', $order);
     $condition = '1';
     if ($_areaids) {
         $condition .= " AND areaid IN (" . $_areaids . ")";
     }
     //CITY
     if ($keyword) {