<?php
define('EmpireCMSAdmin','1');
require("../../e/class/connect.php");
require("../../e/class/functions.php");
require("../../e/class/delpath.php");
require("../../e/class/copypath.php");
require "../../e/data/".LoadLang("pub/fun.php");
require("../../e/class/t_functions.php");
require("../../e/data/dbcache/class.php");
require("../../e/data/dbcache/MemberLevel.php");
$link=db_connect();
$empire=new mysqlquery();
$enews=$_POST['enews'];
if(empty($enews))
{$enews=$_GET['enews'];}
//驗證用戶
$lur=is_login();
$logininid=(int)$lur['userid'];
$loginin=$lur['username'];
$loginrnd=$lur['rnd'];
$loginlevel=(int)$lur['groupid'];
$loginadminstyleid=(int)$lur['adminstyleid'];
hCheckEcmsRHash();

@set_time_limit(0);

$incftp=0;
if($public_r['phpmode'])
{
	include("../../e/class/ftp.php");
	$incftp=1;
}
//防採集
if($public_r['opennotcj'])
{
	@include("../../e/data/dbcache/notcj.php");
}
//設置訪問端
$moreportpid=0;
if($enews=='ChangeEnewsData')
{
	$moreportpid=Moreport_hDoSetSelfPath(0);
}
//用戶
if($enews=="exit"||$enews=='MustDoLoginout')
{
	include('../../e/class/adminfun.php');
}

if($enews=="ReListHtml")//刷新信息列表
{
	$classid=$_GET['classid'];
	ReListHtml($classid,0);
}
elseif($enews=="AddPostUrlData")//初使化遠程發佈
{
	$postdata=$_POST['postdata'];
	AddPostUrlData($postdata,$logininid,$loginin);
}
elseif($enews=="PostUrlData")//遠程發佈
{
	$start=$_GET['start'];
	$rnd=$_GET['rnd'];
	PostUrlData($start,$rnd,$logininid,$loginin);
}
elseif($enews=="ChangeEnewsData")//更新緩存
{
	ChangeEnewsData($logininid,$loginin);
}
elseif($enews=="exit")//退出系統
{
	loginout($logininid,$loginin,$loginrnd);
}
elseif($enews=="MustDoLoginout")//強制退出用戶
{
	$userid=(int)$_GET['userid'];
	MustDoLoginout($userid,$logininid,$loginin);
}
elseif($enews=="ChangeMoreportAdmin")//切換訪問端
{
	$changemoreportid=(int)$_POST['moreportid'];
	Moreport_eChangeMoreportAdmin($changemoreportid,0,$logininid,$loginin);
}
else
{
	printerror("ErrorUrl","history.go(-1)");
}
db_close();
$empire=null;
?>