Example #1
0
        $itemids = is_array($itemid) ? $itemid : array($itemid);
        foreach ($itemids as $itemid) {
            $do->itemid = $itemid;
            $item = $do->get_one();
            if (!$item || $item['username'] != $_username) {
                message();
            }
            $do->recycle($itemid);
        }
        dmsg($L['op_del_success'], $forward);
        break;
    default:
        $status = isset($status) ? intval($status) : 3;
        in_array($status, array(1, 2, 3, 4)) or $status = 3;
        if ($status == 3) {
            $do->expire("AND username='******'");
        }
        $condition = "username='******'";
        $condition .= " AND status={$status}";
        if ($keyword) {
            $condition .= " AND title LIKE '%{$keyword}%'";
        }
        $lists = $do->get_list($condition);
        $head_title = $L['honor_title'];
        break;
}
$nums = array();
$limit_used = 0;
for ($i = 1; $i < 5; $i++) {
    $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}honor WHERE username='******' AND status={$i}");
    $nums[$i] = $r['num'];
Example #2
0
         dmsg('拒绝成功', $forward);
     } else {
         $lists = $do->get_list('status=1' . $condition, $dorder[$order]);
         $menuid = 4;
         include tpl('honor', $module);
     }
     break;
 case 'expire':
     if (isset($refresh)) {
         if (isset($delete)) {
             $days = isset($days) ? intval($days) : 0;
             $days or msg('请填写天数');
             $do->clear("status=4 AND totime>0 AND totime<{$DT_TIME}-{$days}*86400");
             dmsg('删除成功', $forward);
         } else {
             $do->expire();
             dmsg('刷新成功', $forward);
         }
     } else {
         $lists = $do->get_list('status=4' . $condition);
         $menuid = 3;
         include tpl('honor', $module);
     }
     break;
 case 'check':
     if ($itemid && !$psize) {
         $do->check($itemid);
         dmsg('审核成功', $forward);
     } else {
         $lists = $do->get_list('status=2' . $condition, $dorder[$order]);
         $menuid = 2;