示例#1
0
    exit;
}
//获得最新10条已处理的诉求信息
$complainQuery = $_SGLOBAL['db']->query("select * from " . tname("complain_op") . " order by dateline DESC LIMIT 10");
while ($complain = $_SGLOBAL['db']->fetch_array($complainQuery)) {
    $complain['dateline'] = date("Y-m-d H:i", $complain['dateline']);
    if (!$complain['uid']) {
        realname_set($complain['uid'], $complain['username']);
    } elseif (empty($_SN[$complain['uid']])) {
        $_SN[$complain['uid']] = getUsername($complain['uid'], $_SGLOBAL['db']);
    }
    $Complains[] = $complain;
}
$isLeader = FALSE;
$dept_uids = '0';
$dept_uids .= getBaseDepartmentID($_SGLOBAL[supe_uid]);
$query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('complain_uid') . " WHERE uid={$_SGLOBAL['supe_uid']}");
if ($value = $_SGLOBAL['db']->fetch_array($query) || $dept_uids != '0') {
    $isLeader = TRUE;
}
//获得个性模板
$templates = $default_template = array();
$tpl_dir = sreaddir(S_ROOT . './template');
foreach ($tpl_dir as $dir) {
    if (file_exists(S_ROOT . './template/' . $dir . '/style.css')) {
        $tplicon = file_exists(S_ROOT . './template/' . $dir . '/image/template.gif') ? 'template/' . $dir . '/image/template.gif' : 'image/tlpicon.gif';
        $tplvalue = array('name' => $dir, 'icon' => $tplicon);
        if ($dir == $_SCONFIG['template']) {
            $default_template = $tplvalue;
        } else {
            $templates[$dir] = $tplvalue;
示例#2
0
<?php

if (!defined('iBUAA')) {
    exit('Access Denied');
}
if ($ac != 'list') {
    showmessage('对不起,没有这个功能!', 'plugin.php?pluginid=complain');
}
$curr_uid = $_SGLOBAL['supe_uid'];
$dept_uids = '0';
$dept_uids .= getBaseDepartmentID($uid);
$query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('complain_uid') . " WHERE uid='{$curr_uid}'");
while ($value = $_SGLOBAL['db']->fetch_array($query)) {
    $dept_uids .= getBaseDepartmentID($value['foruid']);
}
if ($dept_uids == '0') {
    showmessage('对不起,您没有该权限!', 'space.php?do=home');
}
$type = $_GET['type'];
if ($type == 'complains') {
    $tab = 1;
    $Complains = array();
    //存放complain记录
    $perpage = 20;
    $page = empty($_GET['page']) ? 1 : intval($_GET['page']);
    if ($page < 1) {
        $page = 1;
    }
    $start = ($page - 1) * $perpage;
    //检查开始数
    ckstart($start, $perpage);