<?php
require("../../class/connect.php");
include("../../class/config.php");
include("../../class/db_sql.php");
include("../../class/functions.php");
include "../".LoadLang("pub/fun.php");
include("class/functions.php");
$link=db_connect();
$empire=new mysqlquery();
$phome=$_GET['phome'];
if(empty($phome))
{$phome=$_POST['phome'];}
//验证用户
$logininid=getcvar('loginuserid');
$loginin=getcvar('loginusername');
$loginrnd=getcvar('loginrnd');
$loginlevel=getcvar('loginlevel');
is_login($logininid,$loginin,$loginrnd);
//参数设置
if($phome=="SetDb")
{
}
//修复表
elseif($phome=="DoRep")
{
	$tablename=$_POST['tablename'];
	$mydbname=$_POST['mydbname'];
	Ebak_Rep($tablename,$mydbname,$logininid,$loginin);
}
//忧化表
elseif($phome=="DoOpi")
{
	$tablename=$_POST['tablename'];
	$mydbname=$_POST['mydbname'];
	Ebak_Opi($tablename,$mydbname,$logininid,$loginin);
}
//删除表
elseif($phome=="DoDrop")
{
	$tablename=$_POST['tablename'];
	$mydbname=$_POST['mydbname'];
	Ebak_Drop($tablename,$mydbname,$logininid,$loginin);
}
//删除数据库
elseif($phome=="DropDb")
{
	$mydbname=$_GET['mydbname'];
	Ebak_DropDb($mydbname,$logininid,$loginin);
}
//建立数据库
elseif($phome=="CreateDb")
{
	$mydbname=$_POST['mydbname'];
	Ebak_CreatDb($mydbname,$logininid,$loginin);
}
//清空表
elseif($phome=="EmptyTable")
{
	$tablename=$_POST['tablename'];
	$mydbname=$_POST['mydbname'];
	Ebak_EmptyTable($tablename,$mydbname,$logininid,$loginin);
}
//初使化备份表
elseif($phome=="DoEbak")
{
	$tablename=$_POST['tablename'];
	$mydbname=$_POST['mydbname'];
	$bakstru=$_POST['bakstru'];
	$readme=$_POST['readme'];
	$filesize=$_POST['filesize'];
	$mypath=$_POST['mypath'];
	$autofield=$_POST['autofield'];
	$bakstrufour=$_POST['bakstrufour'];
	Ebak_DoEbak($tablename,$mydbname,$bakstru,$readme,$filesize,$mypath,$autofield,$bakstrufour,$logininid,$loginin);
}
//备份表
elseif($phome=="BakExe")
{
	$t=$_GET['t'];
	$s=$_GET['s'];
	$p=$_GET['p'];
	$mypath=$_GET['mypath'];
	$alltotal=$_GET['alltotal'];
	$thenof=$_GET['thenof'];
	$fnum=$_GET['fnum'];
	Ebak_BakExe($t,$s,$p,$mypath,$alltotal,$thenof,$fnum,$logininid,$loginin);
}
//恢复数据
elseif($phome=="ReData")
{
	$add=$_POST['add'];
	$mypath=$_POST['mypath'];
	Ebak_ReData($add,$mypath,$logininid,$loginin);
}
//删除备份目录
elseif($phome=="DelBakpath")
{
	$path=$_GET['path'];
	Ebak_DelBakpath($path,$logininid,$loginin);
}
//删除压缩包
elseif($phome=="DelZip")
{
	$f=$_GET['f'];
	Ebak_DelZip($f,$logininid,$loginin);
}
//压缩目录
elseif($phome=="DoZip")
{
	$p=$_GET['p'];
	Ebak_Dozip($p,$logininid,$loginin);
}
else
{
	printerror("ErrorUrl","history.go(-1)");
}
?>
