예제 #1
0
    ?>
</td>
    <td><?php 
    echo $rs["ifdefault"] == 1 ? '<font color=red>√</font>' : '<font color=gray>×</font>';
    ?>
</td>
    <td><?php 
    echo $rs["username"];
    ?>
</td>
    <td><?php 
    echo $rs["maxusr"] == -1 ? '<font color=blue>不限</font>' : $rs["maxusr"];
    ?>
</td>
    <td><font color=green><?php 
    echo Online($id);
    ?>
</font></td>
    <td><?php 
    echo $rs["allowguest"] == 1 ? '<font color=red>是</font>' : '<font color=green>否</font>';
    ?>
</td>
    <td><?php 
    echo $rs["exptime"] = -1 ? '<font color=green>永不过期</font>' : date('Y-m-d H:i:s', $rs["exptime"]);
    ?>
</td>
    <td align="left">
    <?php 
    echo $rs["ifdefault"] == 1 ? '<a href="save.php?action=setchannel&s=0&id=' . $id . '">取消默认</a>' : '<a href="save.php?action=setchannel&s=1&id=' . $id . '">设为默认</a>';
    ?>
 | 
예제 #2
0
파일: group.php 프로젝트: shenhua4286/gxw
<?php

include_once "check.php";
$only = intval(Char_Cv('only', 'get'));
$client = intval(Char_Cv('client', 'get'));
$channelid = intval(Char_Cv('channel', 'get'));
Channel($channelid);
if ($Channel['allowguest'] == 0 && $userid == $guestname) {
    exit('<script>top.location.href="login.php?channel=' . $Channel['id'] . '";</script>');
}
if ($Channel['maxusr'] != -1 && Online($channelid) >= $Channel['maxusr']) {
    API_Logout();
    exit('<script>alert("本群人数已满");
  if(top!==self)top.location.reload();</script>');
}
$today = date('Ymd');
if ($Channel['forumid'] && $Channel['lastday'] != $today) {
    $api = API_Pub($bbsTitle, $bbsContent);
    list($tid, $url) = $api;
    $arr = array('lasttid' => $tid, 'lastday' => $today);
    if (!$db) {
        include_once ONEZ_ROOT . './include/db_mysql.class.php';
        db_local();
        $db = new onez_db();
    }
    $db->reset();
    $db->update("channel", $arr, "id='{$Channel['id']}'");
    if ($Conn) {
        $Conn->reset();
    }
    @unlink('onezdata/cache/channel/' . $Channel['id'] . '.php');