<?php
define('EmpireCMSAdmin','1');
require("../../e/class/connect.php");
require("../../e/class/functions.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'];
//spurl
if($enews=='ReAllNewsJs')
{
	hSetSpFromUrl();
}
hCheckEcmsRHash();

//level
if($enews=='ReListHtml_all'||$enews=='ReNewsHtml'||$enews=='ReAllNewsJs'||$enews=='ReDtPage'||$enews=='ReTtListHtml_all'||$enews=='ReZtListHtml_all'||$enews=='ReSpAll'||$enews=='ReClassPath'||$enews=='UpdgxClassInfosAll'||$enews=='ReUserpageAll'||$enews=='ReUserlistAll'||$enews=='ReUserjsAll'||$enews=='GoReListHtmlMore'||$enews=='GoReListHtmlMoreA'||$enews=='ReListHtmlMore'||$enews=='ReListZtHtmlMore'||$enews=='ReListTtHtmlMore'||$enews=='ReDtUserpageAll')
{
	CheckLevel($logininid,$loginin,0,"changedata");
}

@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=='ReIndex'||$enews=='ReListHtml_all'||$enews=='ReNewsHtml'||$enews=='ReAllNewsJs'||$enews=='ReDtPage'||$enews=='ReTtListHtml_all'||$enews=='ReZtListHtml_all'||$enews=='ReSpAll'||$enews=='ReClassPath'||$enews=='ReUserpageAll'||$enews=='ReUserlistAll'||$enews=='ReUserjsAll'||$enews=='GoReListHtmlMore'||$enews=='GoReListHtmlMoreA'||$enews=='ReListHtmlMore'||$enews=='ReListZtHtmlMore'||$enews=='ReListTtHtmlMore')
{
	$moreportpid=Moreport_hDoSetSelfPath(1);
	if(!$moreportpid&&($enews=='GoReListHtmlMore'||$enews=='GoReListHtmlMoreA'||$enews=='ReListHtmlMore'||$enews=='ReListZtHtmlMore'||$enews=='ReListTtHtmlMore'))
	{
	}
	else
	{
		define('ECMSDOALL',TRUE);
	}
}
include("../../e/class/chtmlfun.php");
if($enews=="ReNewsHtml")//刷新內容頁面
{
	$start=$_GET['start'];
	$classid=$_GET['classid'];
	$from=$_GET['from'];
	$retype=$_GET['retype'];
	$startday=$_GET['startday'];
	$endday=$_GET['endday'];
	$startid=$_GET['startid'];
	$endid=$_GET['endid'];
	$tbname=$_GET['tbname'];
	$havehtml=$_GET['havehtml'];
	$havernext=(int)$_GET['havernext'];
	ReNewsHtml($start,$classid,$from,$retype,$startday,$endday,$startid,$endid,$tbname,$havehtml);
}
elseif($enews=="ReListHtml_all")//刷新所有列表
{
	$start=$_GET['start'];
	$do=$_GET['do'];
	$from=$_GET['from'];
	ReListHtml_all($start,$do,$from);
}
elseif($enews=="ReZtListHtml_all")//刷新所有專題頁面
{
	$start=$_GET['start'];
	$do=$_GET['do'];
	$from=$_GET['from'];
	ReZtListHtml_all($start,$do,$from);
}
elseif($enews=="ReTtListHtml_all")//刷新所有標題分類頁面
{
	$start=$_GET['start'];
	$do=$_GET['do'];
	$from=$_GET['from'];
	ReTtListHtml_all($start,$do,$from);
}
elseif($enews=="ReAllNewsJs")//刷新所有信息js
{
	$start=$_GET['start'];
	$do=$_GET['do'];
	$from=$_GET['from'];
	ReAllNewsJs($start,$do,$from);
}
elseif($enews=="ReIndex")//刷新首頁
{
	ReIndex();
}
elseif($enews=="ReUserpageAll")//批量刷新自定義頁面
{
	ReUserpageAll($_GET['start'],$_GET['from'],$logininid,$loginin);
}
elseif($enews=="ReUserlistAll")//批量刷新自定義信息列表
{
	$start=$_GET['start'];
	$from=$_GET['from'];
	ReUserlistAll($start,$from,$logininid,$loginin);
}
elseif($enews=="ReUserjsAll")//批量刷新自定義JS
{
	$start=$_GET['start'];
	$from=$_GET['from'];
	ReUserjsAll($start,$from,$logininid,$loginin);
}
elseif($enews=="ReHot_NewNews")//刷新最新信息與熱門信息JS
{
	ReHot_NewNews();
}
elseif($enews=="ReSpAll")//批量刷新碎片文件
{
	ReSpAll($_GET['start'],$_GET['from'],$logininid,$loginin);
}
elseif($enews=='ReSingleInfo')//刷新單信息頁面
{
	ReSingleInfo($logininid,$loginin);
}
elseif($enews=="ReZtHtml")//刷新專題
{
	$ztid=$_GET['ztid'];
	$ecms=$_GET['ecms'];
	ReZtHtml($ztid,$ecms);
}
elseif($enews=="ReTtHtml")//刷新標題分類
{
	$typeid=$_GET['typeid'];
	ReTtHtml($typeid);
}
elseif($enews=="ReSingleJs")//刷新單個欄目JS
{
	$classid=$_GET['classid'];
	$doing=$_GET['doing'];
	ReSingleJs($classid,$doing);
}
elseif($enews=="ReDtPage")//批量更新動態頁面
{
	ReDtPage($logininid,$loginin);
}
elseif($enews=="GoReListHtmlMore")//初使化刷新多欄目
{
	$classid=$_POST['classid'];
	$gore=$_POST['gore'];
	$from=$_POST['from'];
	$ecms=$_POST['ecms'];
	GoReListHtmlMore($classid,$gore,$from,$ecms);
}
elseif($enews=="GoReListHtmlMoreA")//初使化刷新多欄目(管理欄目)
{
	$classid=$_POST['reclassid'];
	$gore=$_POST['gore'];
	$from=$_POST['from'];
	$ecms=$_POST['ecms'];
	GoReListHtmlMore($classid,$gore,$from,$ecms);
}
elseif($enews=="ReListHtmlMore")//刷新多欄目
{
	$start=$_GET['start'];
	$classid=$_GET['classid'];
	$from=$_GET['from'];
	ReListHtmlMore($start,$classid,$from);
}
elseif($enews=="ReListZtHtmlMore")//刷新多專題
{
	$start=$_GET['start'];
	$classid=$_GET['classid'];
	$from=$_GET['from'];
	$ecms=$_GET['ecms'];
	ReListZtHtmlMore($start,$classid,$from,$ecms);
}
elseif($enews=="ReListTtHtmlMore")//刷新多標題分類
{
	$start=$_GET['start'];
	$classid=$_GET['classid'];
	$from=$_GET['from'];
	ReListTtHtmlMore($start,$classid,$from);
}
elseif($enews=="ReClassPath")//恢復欄目目錄
{
	$start=$_GET['start'];
	ReClassPath($start);
}
elseif($enews=='UpdgxClassInfosAll')//更新欄目信息數
{
	UpdateClassInfosAll($_GET);
}
elseif($enews=="ReDtUserpageAll")//批量刷新自定義動態頁面
{
	ReDtUserpageAll($_GET['start'],$_GET['from'],$logininid,$loginin);
}
else
{
	printerror("ErrorUrl","history.go(-1)");
}
db_close();
$empire=null;
?>