<?php
require("../class/connect.php");
include("../class/db_sql.php");
include("../class/config.php");
include("../class/class.php");
include("../class/functions.php");
include LoadLang("pub/fun.php");
include("../class/t_functions.php");
include("../class/MemberLevel.php");
include("../class/user.php");
include("../class/qinfofun.php");
$link=db_connect();
$empire=new mysqlquery();
$enews=$_POST['enews'];
if(empty($enews))
{$enews=$_GET['enews'];}
$muserid=(int)getcvar('mluserid');
$musername=getcvar('mlusername');
$mrnd=getcvar('mlrnd');
$doetran=1;
//增加投稿
if($enews=="MAddInfo")
{
	DodoInfo($_POST,0);
}
//修改投稿
elseif($enews=="MEditInfo")
{
	DodoInfo($_POST,1);
}
//删除投稿
elseif($enews=="MDelInfo")
{
	DodoInfo($_GET,2);
}
//编辑器上传图片
elseif($enews=="MHtmlareaTranPic")
{
	$file=$_FILES['file']['tmp_name'];
    $file_name=$_FILES['file']['name'];
    $file_type=$_FILES['file']['type'];
    $file_size=$_FILES['file']['size'];
	DoQTranFile($_POST,$file,$file_name,$file_type,$file_size,$_POST['userid'],$_POST['username'],$_POST['rnd'],1);
}
//上传附件
elseif($enews=="MTranFile")
{
	$file=$_FILES['file']['tmp_name'];
    $file_name=$_FILES['file']['name'];
    $file_type=$_FILES['file']['type'];
    $file_size=$_FILES['file']['size'];
	DoQTranFile($_POST,$file,$file_name,$file_type,$file_size,$_POST['userid'],$_POST['username'],$_POST['rnd'],0);
}
else
{printerror("ErrorUrl","",1);}
db_close();
$empire=null;
?>