<?php
ob_start();
include("libs.php");
include(dirname(dirname(__FILE__))."/./configs/config.php");
include(dirname(dirname(__FILE__))."/./configs/db_config.php");
include(dirname(dirname(__FILE__))."/./includes/class.inc.php");
include(dirname(dirname(__FILE__))."/./includes/function.php");
header("Content-Type:text/html;charset=utf-8");
session_start();
date_default_timezone_set('PRC');
$phpcolor = new mysql();
$phpcolor->open($core_mysql_host,$core_mysql_user,$core_mysql_pw,$core_mysql_dbname);
if(isset($_COOKIE['core_user_name']) && $_COOKIE['core_user_rank']=="2")
{
  $phpcolor->table=$core_mysql_prefix."user";
  $phpcolor->field="passwd,rank";
  $phpcolor->where="username='".$_COOKIE['core_user_name']."'";
  $userv=$phpcolor->exist(1);
  if($_COOKIE["core_user_passwd"]!=md5($userv['passwd'].$core_scode) || $_COOKIE["core_user_rank"]!=$userv['rank'])
    Header("Location: login.php?action=quit");
  else
    $tpl -> assign("core_user_name", $_COOKIE["core_user_name"]);
}
else
{
  Header("Location: login.php?action=login");
  exit();
}
if (!isset($_GET['id']))
  Header("Location: jump.php?id=error"); 
else
{
  switch ($_GET['id'])
  {
    case 1:
      $clew="操作错误：对不起，用户不存在，或已被设置为该状态";
      break;
    case 2:
      $clew="操作错误：对不起，请将信息填写完整";
      break;
    case 3:
      $clew="操作错误：对不起，该一级分类下仍有子分类，请移走子分类后重试";
      break;
    case 4:
      $clew="操作错误：对不起，记录已存在";
      break;
    case 5:
      $clew="操作错误：对不起，插件不存在后台管理";
      break;
    case 6:
      $clew="操作错误：对不起，不能重复设置吧主";
      break;
    case 7:
      $clew="操作错误：对不起，贴吧不存在";
      break;
    case 8:
      $clew="操作错误：对不起，内容长度不符合要求";
      break;
    case 10:
      $clew="操作错误：对不起，该分类已经存在";
      break;
    case 11:
      $clew="操作错误：主题字数不符合您在核心设置中的规定";
      break;
    case 12:
      $clew="操作错误：内容字数不符合您在核心设置中的规定";
      break;
    case 13:
      $clew="操作错误：请将文件/configs/config.php的属性设为777可写！";
      break;
    case 14:
      $clew="操作错误：只有选择备份到服务器，才能使用分卷备份功能";
      break;
    case 15:
      $clew="操作错误：您选择了分卷备份功能，但未填写分卷文件大小";
      break;
    case 16:
      $clew="操作错误：备份文件存放目录'./backup'不可写，请修改目录属性";
      break;
    case 17:
      $clew="操作错误：备份数据操作失败";
      break;
    case 18:
      $clew="操作错误：请填写备份文件分卷大小";
      break;
    case 20:
      $clew="操作错误：不能重复设置友情贴吧";
      break;
    case 21:
      $clew="操作错误：不能将自身添加为友情贴吧";
      break;
    case 22:
      $clew="操作错误：投票至少需要2个选项";
      break;
	case 23:
      $clew="操作错误：系统不允许删除默认用户组";
      break;
	case 24:
      $clew="操作成功";
      break;
	case 25:
      $clew="操作错误：您没有权限进行本操作";
      break;
    default:
      $clew="操作错误：出现未知错误, 请与官方联系";
  }
$_GET['jump'] = str_replace("=and=","&",$_GET['jump']);
$tpl -> assign("clew", $clew); 
$tpl -> assign("jump", $_GET['jump']); 
$tpl -> display("jump.htm");
header("refresh:3;url=".$_GET['jump']."");
ob_end_flush();
}
?>