} else { foreach ($__LIST__ as $key => $vo) { $mod = $i % 2; ++$i; ?> <tr><td><input type="checkbox" name="key" value="<?php echo $vo["id"]; ?> "></td><td><?php echo $vo["id"]; ?> </td><td><?php echo $vo["account"]; ?> </td><td><?php echo getrole($vo["role_id"]); ?> </td><td><?php echo $vo["last_login_ip"]; ?> </td><td><?php echo todate($vo["last_login_time"], 'Y-m-d H:i:s'); ?> </td><?php if ($vo['role_id'] == 0) { ?> <td><?php echo showstatus($vo["status"], $vo['id']); ?> <a href="<?php echo U('User/edit', array('id' => $vo['id']));
<td>用户组</td> <td><input type="radio" name="role" value="user" required> 用户 <input type="radio" name="role" value="admin" required> 管理员</td> </tr> </tbody> </table> </div> <input type="submit" class="btn btn-primary" value="提交更改"> </form> <?php } else { $userc = $m->fetch_row($m->query("SELECT COUNT(*) FROM `" . DB_NAME . "`.`" . DB_PREFIX . "users`")); $users = ''; $s = $m->query('SELECT * FROM `' . DB_NAME . '`.`' . DB_PREFIX . 'users` ORDER BY `id`'); while ($x = $m->fetch_array($s)) { $users .= '<tr><td>' . $x['id'] . '<br/><input type="checkbox" name="user[]" value="' . $x['id'] . '"></td><td>' . $x['name'] . '<br/>用户组:' . getrole($x['role']) . '</td><td>' . $x['email'] . '<br/>数据表:' . $x['t'] . '</td></tr>'; } ?> <div class="alert alert-info">目前共有 <?php echo $userc[0]; ?> 名用户。点击 UID 下面的复选框表示对该用户进行操作<br/><a href="index.php?mod=admin:users&add">点击此处可以添加一名用户</a></div> <form action="setting.php?mod=admin:users" method="post" onsubmit="return confirm('此操作不可逆,你确定要执行吗?');"> <div class="table-responsive"> <table class="table table-hover"> <thead> <tr> <th>UID</th> <th>用户名/用户组</th> <th>电子邮箱/数据表</th> </tr>
$class = ''; if ($rallguest['attending'] == 'Yes') { $variable = "Accepted"; $class = 'g'; } elseif ($rallguest['attending'] == 'May be') { $variable = "Waiting"; $class = 'y'; } elseif ($rallguest['attending'] == 'No') { $variable = "Declined"; $class = 'p'; } elseif ($rallguest['attending'] == 'Reject') { $variable = "Rejected"; $class = 'p'; } if ($rallguest['addedin_rsvp'] == 0) { $addedby = getrole($rallguest['added_by']); } else { $addedby = 'RSVP Form'; } ?> <tr> <td><?php printf('%02d', $k); ?> </td> <td><span href="#" gid="<?php echo $rallguest['id']; ?> " tp="<?php echo $type; ?>
</div> <ul class="list-group"> <?php if (!empty($i['opt']['ann'])) { echo '<li class="list-group-item"><span class="glyphicon glyphicon-bullhorn"></span> <b>公告:</b>'; echo $i['opt']['ann'] . '</li>'; } ?> <li class="list-group-item"> <span class="glyphicon glyphicon-user"></span> <b>用户组:</b> <?php if (ISVIP) { echo '您是尊贵的 ' . getrole(ROLE) . ',享有无限绑定数和贴吧数等特权。'; } else { echo getrole(ROLE); } ?> </li> <li class="list-group-item"> <?php if (empty($i['user']['bduss'])) { ?> <span class="glyphicon glyphicon-info-sign"></span> 您还没有绑定任何百度账号,无法使用云签到功能,<a href="index.php?mod=baiduid">前往绑定</a> <?php } else { ?> <span class="glyphicon glyphicon-link"></span> <b>百度账号数:</b> <?php echo '<span id="baiduid_used">' . count($i['user']['bduss']) . '</span> 个 / ';
$article_id = intval(trim($_GET['article_id'])); if (empty($article_id)) { $Base->ErrorMsg('参数错误,正在跳转至上一页……'); exit; } if ($Db->RowsAll("SELECT * FROM `" . $db_prefix . "collect` WHERE `id` = '" . $article_id . "'") == 0) { $Base->ErrorMsg('此任务不存在或已经删除,正在返回上一页……'); exit; } $cname = htmlspecialchars(trim($_POST['cname'])); $channel_id = intval(trim($_POST['article_channel'])); $sort = intval(trim($_POST['article_root_id'])); $purl = trim($_POST['purl']); $cosj = intval(trim($_POST['cosj'])); $cloects = ovovgetfile($purl); $charset_ruler = getrole("charset=||\"", 'gb2312'); //字符编码 preg_match("/" . $charset_ruler . "/iU", $cloects, $tt); $cccharset = $tt[1]; if (empty($cname)) { $Base->ErrorMsg('填写信息不完整,正在返回上一页……'); exit; } $Db->ThisQuery("UPDATE `" . $db_prefix . "collect` SET `cname`='" . $cname . "',`charset`='" . $cccharset . "',`ccid`=" . $channel_id . ",`csid`=" . $sort . ",`purl`='" . $purl . "',`cosj`=" . $cosj . " WHERE `id` = " . $article_id . ""); $Base->AlertMsg('修改配置成功,正在转入第二步配置采集参数……', 'collect.php?action=setadd&claid=2&ccid=' . $article_id); exit; break; case 'del': $article_id = $_GET['article_id']; if (empty($article_id)) { $Base->ErrorMsg('参数错误,正在跳转至上一页……');
<br/><br/> 此程序作者为 <a href="http://zhizhe8.net" target="_blank">无名智者</a> @ <a href="http://www.stus8.com/forum.php" target="_blank">StusGame GROUP</a> & <a href="http://www.longtings.com/" target="_blank">mokeyjay</a> <br/><br/>本站 [ <?php echo SYSTEM_NAME; ?> ] 保留所有权利 <?php doAction('index_p_1'); ?> </div> <?php doAction('index_3'); $today = date('Y-m-d'); echo '<br/><br/><div id="stat" onclick="view_status(this);"><button type="button" class="btn btn-info">点击查看签到状态统计信息</button></div>'; echo '<br/><br/><b>权限:</b>' . getrole(ROLE); if (ROLE == 'admin') { echo '<br/><br/><b>计划任务上次执行日期:</b>' . option::get('cron_last_do_time'); if (time() - strtotime(option::get('cron_last_do_time')) > 86400) { echo '<br/><br/><font color="red"><span class="glyphicon glyphicon-warning-sign"></span> <b>警告:</b></font>计划任务今天尚未运行,是否已设置 <b>do.php</b> 到您的主机的计划任务?'; } echo '<br/><br/><b>关注贴吧配额限制:</b>无限制(管理员)'; } elseif (option::get('tb_max') == 0) { echo '<br/><br/><b>关注贴吧配额限制:</b>无限制'; } else { echo '<br/><br/><b>关注贴吧配额限制:</b>' . option::get('tb_max') . ' 个'; } echo '<br/><br/><b>您的签到数据表:</b>' . DB_PREFIX . TABLE; if (ROLE == 'admin') { echo '<br/><br/>'; echo '<div class="well"><p class="info">请填写您的邮件地址,订阅 StusGame 云签到官方订阅,以便于及时接收关于云签到程序的更新与重要通知:</p><div class="mailInput"><form action="https://list.qq.com/cgi-bin/qf_compose_send" target="_blank" method="post"><input type="hidden" name="t" value="qf_booked_feedback"><input type="hidden" name="id" value="f752182ed774de32ef9ee39fbb5e44e38261368b16e7ea44"><div class="input-group">
<td>用户组</td> <td><input type="radio" name="role" value="user" required> 用户 <input type="radio" name="role" value="admin" required> 管理员</td> </tr> </tbody> </table> </div> <input type="submit" class="btn btn-primary" value="提交更改"> </form> <?php } else { $userc = $m->fetch_row($m->query("SELECT COUNT(*) FROM `" . DB_NAME . "`.`" . DB_PREFIX . "users`")); $users = ''; $s = $m->query('SELECT * FROM `' . DB_NAME . '`.`' . DB_PREFIX . 'users` ORDER BY `id`'); while ($x = $m->fetch_array($s)) { $users .= '<tr><td>' . $x['id'] . '<br/><input type="checkbox" name="user[]" id="user_' . $x['id'] . '" value="' . $x['id'] . '"></td><td onclick="$(\'#user_\' + \'' . $x['id'] . '\').click()">' . $x['name'] . '<br/>用户组:' . getrole($x['role']) . '</td><td onclick="$(\'#user_\' + \'' . $x['id'] . '\').click()">' . $x['email'] . '<br/>数据表:' . $x['t'] . '</td></tr>'; } ?> <div class="alert alert-info">目前共有 <?php echo $userc[0]; ?> 名用户。点击 UID 下面的复选框表示对该用户进行操作<br/><a href="index.php?mod=admin:users&add">点击此处可以添加一名用户</a> | <a href="javascript:go('submit_button');">前往底部</a></div> <form action="setting.php?mod=admin:users" method="post" onsubmit="return userAdminSubmit();"> <div class="table-responsive"> <table class="table table-hover"> <thead> <tr> <th>UID</th> <th>用户名/用户组</th> <th>电子邮箱/数据表</th> </tr>
function room($roomid, $user) { global $roles, $rolename, $tasks; $link = mysql_connect(DB_HOST, DB_USER, DB_PASS); if (!$link) { die('database fail ' . mysql_error()); } $db_selected = mysql_select_db(DB_NAME, $link); if (!$db_selected) { die('database fail ' . mysql_error()); } $test_room = mysql_query("SELECT totalnumber, currentnumber FROM room WHERE roomid=" . $roomid, $link); if (!mysql_num_rows($test_room)) { mysql_close($link); return '该房间不存在。'; } $roominfo = mysql_fetch_assoc($test_room); $number = $roominfo['totalnumber']; $current = $roominfo['currentnumber']; if ($number == $current) { mysql_close($link); return '该房间已满。'; } $test_id_exist = mysql_query("SELECT room,role FROM player WHERE id='" . $user . "'", $link); if (mysql_num_rows($test_id_exist)) { $userinfo = mysql_fetch_assoc($test_id_exist); $fetch_room = mysql_query("SELECT totalnumber,currentnumber FROM room WHERE roomid=" . $userinfo['room'], $link); $roominfo = mysql_fetch_assoc($fetch_room); mysql_close($link); return "你已在" . $roominfo['totalnumber'] . "人房间(抵抗者" . $roles[$roominfo['totalnumber']][0] . "人,间谍" . $roles[$roominfo['totalnumber']][1] . "人),房间号" . $userinfo['room'] . "。当前已有" . $roominfo['currentnumber'] . "人。\n你的身份是" . $rolename[$userinfo['role']] . "。"; } $current += 1; $test_roleflag = mysql_query("SELECT roleflag FROM room WHERE roomid=" . $roomid, $link); $roleflag = mysql_fetch_assoc($test_roleflag)['roleflag']; if (getrole($roleflag, $current)) { mysql_query("INSERT INTO player (id, room, role, voted) VALUES ('" . $user . "'," . $roomid . ",TRUE,FALSE)", $link); } else { mysql_query("INSERT INTO player (id, room, role, voted) VALUES ('" . $user . "'," . $roomid . ",FALSE,FALSE)", $link); } mysql_query("UPDATE room SET currentnumber=" . $current . " WHERE roomid=" . $roomid, $link); $result = "你已加入" . $number . "人房间(抵抗者" . $roles[$number][0] . "人,间谍" . $roles[$number][1] . "人),房间号" . $roomid . "。当前已有" . $current . "人。\n你的身份是" . $rolename[getrole($roleflag, $current)] . "。"; if ($current == $number) { mysql_query("UPDATE room SET status=1 WHERE roomid=" . $roomid, $link); $result = $result . "\n房间已满,请大家闭眼,间谍互相确认身份。然后请领袖选出" . $tasks[$number][0] . "人组队。"; } mysql_close($link); return $result; }
function ovcolect_content_all($ruler, $charset, $bodys) { $uu = explode("[OVOVSPR]", $ruler); $rulnums = count($uu); if ($rulnums == 1) { $ruler = getrole($ruler, $charset); //字符编码 preg_match_all("/" . $ruler . "/iU", $bodys, $bdtt); $bodys = $bdtt[1]; } else { for ($i = 0; $i < $rulnums; $i++) { $ruler = getrole($uu[$i], $article['charset']); //字符编码 $ruler ? preg_match_all("/" . $ruler . "/iU", $bodys, $bdtt) : ""; $newbodys = getbaseurl($bdtt[1]); $bodys = ""; foreach ($newbodys as $temp) { $bodys .= $temp . "{oovv}"; } } $bodys = explode("{oovv}", rtrim($bodys, "{oovv}")); } return $bodys; }