$public_r['filesize']*1024)
{
printerror("TranFilesizeFail","history.go(-1)");
}
//文件名
$r['insertfile']=ReturnDoTranFilename($file_name,$classid);
$r['filename']=$r['insertfile'].$r['filetype'];
$r['name']=ECMS_PATH.$path.'/'.$r['filename'];
$r['tran']=1;
//上传文件
$cp=@move_uploaded_file($file,$r['name']);
if(empty($cp))
{
$r['tran']=0;
printerror('TranFail','');
}
DoChmodFile($r['name']);
//操作日志
insert_dolog("path=$path
filename=".$r['filename']);
echo'';
db_close();
$empire=null;
}
//删除固定目录文件
function DelTruePathFile($level,$path,$filename,$userid,$username){
global $empire,$dbtbpre,$public_r;
$count=count($filename);
if(empty($count))
{
printerror("NotFileid","history.go(-1)");
}
//基目录
$basepath=ECMS_PATH.$path;
for($i=0;$i<$count;$i++)
{
if(!$filename[$i]||!eReturnCkCFile($filename[$i]))
{
continue;
}
DelFiletext($basepath."/".$filename[$i]);
}
//操作日志
insert_dolog("path=$path");
printerror("DelFileSuccess",EcmsGetReturnUrl());
}
?>