예제 #1
0
     $itemid or msg('请选择帖子');
     $style = isset($COLOR[$style]) ? '#' . $style : '';
     foreach ($itemid as $tid) {
         $db->query("UPDATE {$table} SET style='{$style}' WHERE itemid={$tid}");
     }
     if (need_notice()) {
         foreach ($itemid as $tid) {
             $T = $db->get_one("SELECT title,linkurl,username FROM {$table} WHERE itemid={$tid}");
             $body = lang($L['manage_msg_content'], array($MOD['linkurl'] . $T['linkurl'], nl2br($reason), $_username));
             send_notice($T['username'], lang($L['manage_msg_title'], array('帖子', dsubstr($T['title'], 20, '...'), $style ? '高亮' : '取消高亮')), lang($L['manage_msg_content'], array($MOD['linkurl'] . $T['linkurl'], nl2br($reason), $_username)));
         }
     }
     dmsg($style ? '高亮设置成功' : '高亮取消成功', $forward);
     break;
 case 'recycle':
     $lists = $do->get_list('status=0' . $condition, $dorder[$order]);
     $menuid = 4;
     include tpl('index', $module);
     break;
 case 'reject':
     if ($itemid && !$psize) {
         $do->reject($itemid);
         dmsg('拒绝成功', $forward);
     } else {
         $lists = $do->get_list('status=1' . $condition, $dorder[$order]);
         $menuid = 3;
         include tpl('index', $module);
     }
     break;
 case 'check':
     if ($itemid && !$psize) {
예제 #2
0
     if ($level) {
         $condition .= " AND level>0";
     }
     if ($style) {
         $condition .= " AND style<>''";
     }
     if ($ontop) {
         $condition .= " AND ontop>0";
     }
     if ($thumb) {
         $condition .= " AND thumb<>''";
     }
     if ($guest) {
         $condition .= " AND username=''";
     }
     $lists = $do->get_list($condition);
     break;
 case 'reply':
     require MD_ROOT . '/reply.class.php';
     $do = new reply();
     $sfields = $L['my_fields_reply'];
     $dfields = array('content', 'username');
     isset($fields) && isset($dfields[$fields]) or $fields = 0;
     $tid = isset($tid) ? intval($tid) : 0;
     $fields_select = dselect($sfields, 'fields', '', $fields);
     $condition = "gid={$gid} AND status=3";
     if ($keyword) {
         $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'";
     }
     if ($tid) {
         $condition .= " AND tid={$tid}";
예제 #3
0
            if ($fromtime) {
                $condition .= " AND edittime>={$fromtime}";
            }
            if ($totime) {
                $condition .= " AND edittime<={$totime}";
            }
            if ($level) {
                $condition .= " AND level={$level}";
            }
            if ($pptsql) {
                $condition .= $pptsql;
            }
            //PPT
            require MD_ROOT . '/club.class.php';
            $do = new club($moduleid);
            $tags = $do->get_list($condition, $MOD['order'], $DT['cache_search'] ? 'CACHE' : '');
            if ($tags && $kw) {
                foreach ($tags as $k => $v) {
                    $tags[$k]['title'] = str_replace($kw, '<span class="highlight">' . $kw . '</span>', $v['title']);
                }
                if ($page == 1) {
                    keyword($kw, $items, $moduleid);
                }
            }
            $showpage = 1;
            $datetype = 5;
        }
    }
}
$action or $action = 'post';
$seo_file = 'search';
예제 #4
0
                    message();
                }
                $do->recycle($itemid);
            }
            dmsg($L['success_delete'], $forward);
            break;
        default:
            $status = isset($status) ? intval($status) : 3;
            in_array($status, array(1, 2, 3)) or $status = 3;
            $condition = "username='******'";
            $condition .= " AND status={$status}";
            if ($keyword) {
                $condition .= " AND keyword LIKE '%{$keyword}%'";
            }
            if ($catid) {
                $condition .= $CAT['child'] ? " AND catid IN (" . $CAT['arrchildid'] . ")" : " AND catid={$catid}";
            }
            $timetype = strpos($MOD['order'], 'edit') === false ? 'add' : '';
            $lists = $do->get_list($condition, $MOD['order']);
            break;
    }
    if ($_userid) {
        $nums = array();
        for ($i = 1; $i < 4; $i++) {
            $r = $db->get_one("SELECT COUNT(*) AS num FROM {$table} WHERE username='******' AND status={$i}");
            $nums[$i] = $r['num'];
        }
    }
    $head_title = $L['my_title'];
}
include template('my_' . $module, 'member');