function ACP_MessageBox($message, $links = array())
{
    //SetNoUseCache();
    global $cfg, $color;
    $urls = array();
    if (count($links) == 0) {
        $urls[0] = array('返回', 'JavaScript:history.back(-1)');
    } else {
        foreach ($links as $lnk) {
            $u = "index.php?mode={$lnk['1']}";
            $flag = false;
            foreach ($lnk as $k => $v) {
                if (!is_string($k)) {
                    continue;
                }
                if ($flag) {
                    $u .= "&{$k}={$v}";
                } else {
                    $u .= "?{$k}={$v}";
                    $flag = true;
                }
            }
            $urls[] = array($lnk[0], $u);
        }
    }
    $fixurl = '';
    foreach ($urls as $url) {
        $fixurl .= "[<a href=\"{$url['1']}\">{$url['0']}</a>]<br />";
    }
    //$helplink = "[<a href=\"index.php\" >帮助</a>]";
    $helplink = '';
    ACP_ShowHeader('提示信息', $urls[0][1]);
    eval('echo "' . LoadTemplate('msgbox') . '";');
    ACP_ShowFooter();
}
Esempio n. 2
0
<?php

if (!defined('RBB_ADMINCP')) {
    die('Fatal error.');
}
SetNoUseCache();
if (!isset($action)) {
    $action = 'list';
}
if (!in_array($action, array('list', 'rebuild_cache', 'optimize', 'pm_batch_del'))) {
    ACP_MessageBox($str['act_err']);
}
switch ($action) {
    case 'list':
        ACP_ShowHeader('实用工具');
        eval('echo "' . LoadTemplate('tools') . '";');
        ACP_ShowFooter();
        break;
    case 'rebuild_cache':
        require_once '../include/cache_func.php';
        Rebuild_Global_Cache(true);
        ACP_WriteLog('刷新系统缓存');
        ACP_MessageBox('系统缓存刷新完毕');
        break;
    case 'optimize':
        $sql = "OPTIMIZE TABLE {$cfg['tb_members']},{$cfg['tb_pms']},{$cfg['tb_newgames']},{$cfg['tb_games']},{$cfg['tb_onlines']},{$cfg['tb_banips']},{$cfg['tb_settings']},{$cfg['tb_chats']},{$cfg['tb_competitions']},{$cfg['tb_groups']},{$cfg['tb_players']}";
        RenDB_Query($sql, true);
        ACP_WriteLog('整理数据库');
        ACP_MessageBox("数据库整理完毕");
        break;
    case 'pm_batch_del':
Esempio n. 3
0
        while ($set = RenDB_Fetch_Array($result)) {
            //$slist.='<form action="index.php" method="post">';
            $slist .= '<form action="index.php?mode=all_set&action=update&set_id=' . $set['set_id'] . '" method="post">';
            $crsfix = 3 - $crsfix;
            $cr = $color["cell{$crsfix}"];
            $slist .= "<tr bgcolor=\"{$cr}\">";
            $slist .= "<td><a name=\"set_{$set['set_id']}\">{$set['set_note']}</a></td>";
            $slist .= "<td><input type=\"text\" size=\"50\" maxlength=\"1024\" name=\"set_value\" value=\"{$set['set_value']}\"></td>";
            $slist .= "<td><input type=\"submit\" value=\"更改\"></td>";
            $slist .= '</tr>';
            //$slist.='<input type="hidden" name="mode" value="all_set">';
            //$slist.='<input type="hidden" name="action" value="update">';
            //$slist.='<input type="hidden" name="set_id" value="'.$set['set_id'].'">';
            $slist .= "</form>\n";
        }
        ACP_ShowHeader('参数设置');
        eval('echo "' . LoadTemplate('all_set') . '";');
        ACP_ShowFooter();
        break;
    case 'update':
        if (!isset($set_id, $set_value)) {
            ACP_MessageBox($str['act_err']);
        }
        $set_value = trim($set_value);
        $sql = "UPDATE {$cfg['tb_settings']} SET set_value='{$set_value}' WHERE set_id='{$set_id}' LIMIT 1";
        RenDB_Query($sql, true);
        ACP_WriteLog("更改设置 ID:{$set_id} 值:{$set_value}");
        Header("Location: index.php?mode=all_set&/#set_{$set_id}");
        exit;
        break;
}
Esempio n. 4
0
}
switch ($action) {
    case 'show':
        $ban_ips = '';
        $sql = "SELECT * FROM `{$cfg['tb_banips']}` ORDER BY ban_time DESC";
        $result = RenDB_Query($sql);
        while ($row = RenDB_Fetch_Array($result)) {
            $row['ban_time'] = TimeToDate($row['ban_time'], true);
            $ban_ips .= "<option value=\"{$row['ban_ip']}\">{$row['ban_time']} | {$row['ban_ip']} | {$row['ban_reason']}</option>";
        }
        if ($ban_ips != '') {
            $ban_ips = "<select style=\"width: 90%\" name=\"ban_ip\">{$ban_ips}</select> <input type=\"submit\" value=\"解禁\" >";
        } else {
            $ban_ips = '目前没有IP被屏蔽';
        }
        ACP_ShowHeader('屏蔽IP');
        eval('echo "' . LoadTemplate('ip_man') . '";');
        ACP_ShowFooter();
        break;
    case 'ban':
        if (!isset($ban_ip, $ban_reason)) {
            ACP_MessageBox($str['act_err']);
        }
        $ban_ip = trim($ban_ip);
        if (!eregi('^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.(\\*|[0-9]{1,3})$', $ban_ip)) {
            ACP_MessageBox('IP格式不正确');
        }
        $mycell = explode('.', $userip);
        //检查是不是自己的IP
        $cell = explode('.', $ban_ip);
        if ($cell[3] == '*') {
Esempio n. 5
0
     */
 /*case 'add':
 	$sql="INSERT INTO `$cfg[tb_competitions]` SET cp_name='(新的比赛)' ";
 	$result = RenDB_Query($sql);
 	if( RenDB_Insert_id())
 	{
 		ACP_WriteLog("添加比赛 ID:".RenDB_Insert_id());
 		Header("Location: index.php?mode=cp_man");
 		exit();
 	}
 	ACP_MessageBox('添加失败');
 	break;
 */
 case 'new1':
     $str_nowtime = date('H:i:s m/d/Y', $nowtime);
     ACP_ShowHeader('新建比赛');
     eval('echo "' . LoadTemplate('cp_form') . '";');
     ACP_ShowFooter();
     break;
 case 'new2':
     if (!isset($cp_name, $description, $group_player, $timestep, $timeadd, $startdate, $rules)) {
         ACP_MessageBox($str['act_err']);
     }
     $rules = intval($rules);
     if ($rules < 0 || $rules > 2) {
         ACP_MessageBox('规则不正确');
     }
     if ($timestep < 0) {
         $timestep = 0;
     }
     if (($timestep > 21600 || $timestep < 1440) && $timestep != 0) {
Esempio n. 6
0
if (!isset($action)) {
    $action = 'list';
}
if (!in_array($action, array('list', 'view'))) {
    ACP_MessageBox($str['act_err']);
}
$logfile = array(1 => 'errors.php', 2 => 'wrongpass.php', 3 => 'syslog.php', 5 => 'adminlog.php');
$logname = array(1 => '程序错误记录', 2 => '密码错误记录', 3 => '系统运行记录', 5 => '后台管理记录');
switch ($action) {
    case 'list':
        ACP_ShowHeader('记录管理');
        eval('echo "' . LoadTemplate('log_man') . '";');
        ACP_ShowFooter();
        break;
    case 'view':
        if (!isset($logid) || $logid < 1 || $logid > 5) {
            ACP_MessageBox($str['act_err']);
        }
        $logid = intval($logid);
        if (($line = file('../log/' . $logfile[$logid])) !== FALSE) {
            unset($line[0]);
            $linecount = count($line);
            $line = implode('', $line);
            ACP_ShowHeader('查看记录');
            eval('echo "' . LoadTemplate('log_view') . '";');
            ACP_ShowFooter();
        } else {
            ACP_MessageBox('无法打开文件');
        }
        break;
}
Esempio n. 7
0
<?php

if (!defined('RBB_ADMINCP')) {
    die('Fatal error.');
}
SetNoUseCache();
$phpversion = phpversion();
$mysqlversion = mysql_get_server_info();
ACP_ShowHeader('面版首页');
eval('echo "' . LoadTemplate('main') . '";');
ACP_ShowFooter();
Esempio n. 8
0
     $row = RenDB_Fetch_Row($result);
     $confirm_text = $row[0] ? "您确定要删除{$dateline}天没登陆且对局少于{$gameline}的会员吗?(符合条件的账号数:{$row['0']}) [<a href=\"index.php?mode=m_man&action=batch_del2&dateline={$dateline}&gameline={$gameline}\">确定</a>] [<a href=\"JavaScript:history.back(-1)\">取消</a>]<br />" : "没有符合条件的账号 [<a href=\"JavaScript:history.back(-1)\">返回</a>]";
     $warning_text = '';
     if ($row[0]) {
         if ($dateline < 30) {
             $warning_text .= '建议日期改到30天以上.&nbsp;';
         }
         if ($gameline > 50) {
             $warning_text .= '建议对局数改小一些.&nbsp;';
         }
         //if($postline>50) $warning_text.='建议对发贴数改小一些.&nbsp;';
         if ($warning_text != '') {
             $warning_text = HLtxt($warning_text);
         }
     }
     ACP_ShowHeader('确认批量删除会员');
     eval('echo "' . LoadTemplate('m_batch_del1') . '";');
     ACP_ShowFooter();
     break;
 case 'batch_del2':
     if (!isset($dateline, $gameline)) {
         ACP_MessageBox($str['act_err']);
     }
     $dateline = intval($dateline);
     $gameline = intval($gameline);
     //$postline=intval($postline);
     if ($dateline <= 0 || $gameline < 0) {
         ACP_MessageBox('输入超出范围');
     }
     $dateline2 = time() - $dateline * 86400;
     //滤掉掉管理员