<?php
require("../class/connect.php");
require("../class/db_sql.php");
require("../class/functions.php");
require("../class/dpfun.php");
require LoadLang("pub/fun.php");
require("../class/delpath.php");
require("../class/t_functions.php");
require("../class/volume.php");
require("../data/dbcache/class.php");
require("../data/dbcache/MemberLevel.php");
require("../member/class/user.php");
require("../class/hbookdatafun.php");
require("../class/qinfofun.php");
require("../class/rebookdata.php");
require("../class/rebookname.php");
$link=db_connect();
$empire=new mysqlquery();
$enews=$_POST['enews'];
if(empty($enews))
{$enews=$_GET['enews'];}
//验证IP
eCheckAccessDoIp('postinfo');
$muserid=(int)getcvar('mluserid');
$musername=RepPostVar(getcvar('mlusername'));
$mrnd=RepPostVar(getcvar('mlrnd'));
$loginin='[Member]'.$musername;
$doetran=1;
//增加投稿 书籍
if($enews=="MAddInfo")
{
	DodoInfo($_POST,0);
}
//修改投稿 书籍
elseif($enews=="MEditInfo")
{
	DodoInfo($_POST,1);
}
//删除投稿 书籍
elseif($enews=="MDelInfo")
{
	DodoInfo($_GET,2);
}
//投稿 新增分卷 书籍 
elseif($enews=="AddV")
{
	QAddV($_POST,$muserid,$musername);
}
//投稿 修改分卷 书籍 
elseif($enews=="EV")
{
	QEV($_POST,$muserid,$musername);
}
elseif($enews=="DelVolume")//删除分卷 ok
{
	$bookid=$_GET['bookid'];
	$vid=$_GET['vid'];
	QDelVolume($vid,$bookid,$muserid,$musername);
}
elseif($enews=="EditVOrder")//修改分卷顺序 ok
{
	$bookid=$_POST['bookid'];
	$vid=$_POST['vid'];
	$myorder=$_POST['myorder'];
	QEditVOrder($vid,$myorder,$bookid,$muserid,$musername);
}
//编辑器上传图片 书籍
elseif($enews=="MEditorTranFile")
{
	$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,$muserid,$musername,$mrnd,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,$muserid,$musername,$mrnd,0);
}
//增加投稿 章节
if($enews=="AddBd")
{
	AddBd($_POST,0);
}
//修改投稿 章节
if($enews=="EditBd")
{
	AddBd($_POST,1);
}
//修改投稿 章节
if($enews=="DelBd")
{
	AddBd($_GET,2);
}
else
{printerror("ErrorUrl","",1);}
db_close();
$empire=null;
?>