<?php
define('EmpireCMSAdmin','1');
require("../../../e/class/connect.php");
require("../../../e/class/functions.php");
require("../../../e/data/dbcache/class.php");
require "../../../e/data/".LoadLang("pub/fun.php");
$link=db_connect();
$empire=new mysqlquery();
$editor=1;
$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();
$addgethtmlpath="../";
if($public_r['phpmode'])
{
	include("../../../e/class/ftp.php");
	$incftp=1;
}
require("editorfun.php");
include('eshoweditor.php');
$doetran=1;
if($enews=="TranFile")//上傳文件
{
	$file=$_FILES['file']['tmp_name'];
	$file_name=$_FILES['file']['name'];
	$file_type=$_FILES['file']['type'];
	$file_size=$_FILES['file']['size'];
	$tranurl=$_POST['tranurl'];
	$no=$_POST['no'];
	$classid=$_POST['classid'];
	$type=$_POST['type'];
	TranFile($file,$file_name,$file_type,$file_size,$tranurl,$no,$classid,$type,$_POST,$logininid,$loginin);
}
elseif($enews=="SaveMoreImg")//批量上傳圖片
{
	$file=$_FILES['file']['tmp_name'];
    $file_name=$_FILES['file']['name'];
    $file_type=$_FILES['file']['type'];
    $file_size=$_FILES['file']['size'];
	eTranMorePic($file,$file_name,$file_type,$file_size,$_POST,$logininid,$loginin);
}
else
{
	printerror("ErrorUrl","history.go(-1)");
}
db_close();
$empire=null;
?>