<?php

require 'global.php';
require('class/connect.php');
require('class/db_sql.php');
require('class/functions.php');
require LoadLang('f.php');
$phome=$_GET['phome'];
if(empty($phome))
{$phome=$_POST['phome'];}
if($phome=='SetDb'||$phome=='DoRep'||$phome=='DoOpi'||$phome=='DoDrop'||$phome=='DropDb'||$phome=='CreateDb'||$phome=='EmptyTable'||$phome=='DoSave'||$phome=='DoDelSave'||$phome=='DelBakpath'||$phome=='DelZip'||$phome=='DoExecSql'||$phome=='DoTranExecSql'||$phome=='RepPathFiletext'||$phome=='ReplaceTable')
{
include('class/combakfun.php');
}
if($phome=='SetDb'||$phome=='login'||$phome=='exit'||$phome=='ChangeLanguage')
{}
else
{
$link=db_connect();
$empire=new mysqlquery();
}
if($phome=='SetDb')
{
Ebak_SetDb($_POST);
}
elseif($phome=='DoRep')
{
$tablename=$_POST['tablename'];
$mydbname=$_POST['mydbname'];
Ebak_Rep($tablename,$mydbname);
}
elseif($phome=='DoOpi')
{
$tablename=$_POST['tablename'];
$mydbname=$_POST['mydbname'];
Ebak_Opi($tablename,$mydbname);
}
elseif($phome=='DoDrop')
{
$tablename=$_POST['tablename'];
$mydbname=$_POST['mydbname'];
Ebak_Drop($tablename,$mydbname);
}
elseif($phome=='ReplaceTable')
{
$tablename=$_POST['tablename'];
$mydbname=$_POST['mydbname'];
$oldpre=$_POST['oldtablepre'];
$newpre=$_POST['newtablepre'];
Ebak_ReplaceTable($tablename,$oldpre,$newpre,$mydbname);
}
elseif($phome=='DropDb')
{
$mydbname=$_GET['mydbname'];
Ebak_DropDb($mydbname);
}
elseif($phome=='CreateDb')
{
$mydbname=$_POST['mydbname'];
$mydbchar=$_POST['mydbchar'];
Ebak_CreatDb($mydbname,$mydbchar);
}
elseif($phome=='EmptyTable')
{
$tablename=$_POST['tablename'];
$mydbname=$_POST['mydbname'];
Ebak_EmptyTable($tablename,$mydbname);
}
elseif($phome=='exit')
{
LoginOut();
}
elseif($phome=='login')
{
$lusername=$_POST['lusername'];
$lpassword=$_POST['lpassword'];
$key=$_POST['key'];
login($lusername,$lpassword,$key,$lifetime);
}
elseif($phome=='DelBakpath')
{
$path=$_GET['path'];
Ebak_DelBakpath($path);
}
elseif($phome=='DelZip')
{
$f=$_GET['f'];
Ebak_DelZip($f);
}
elseif($phome=='DoZip')
{
$p=$_GET['p'];
Ebak_Dozip($p);
}
elseif($phome=='DoExecSql')
{
Ebak_DoExecSql($_POST);
}
elseif($phome=='DoTranExecSql')
{
$file=$_FILES['file']['tmp_name'];
$file_name=$_FILES['file']['name'];
$file_type=$_FILES['file']['type'];
$file_size=$_FILES['file']['size'];
Ebak_DoTranExecSql($file,$file_name,$file_type,$file_size,$_POST);
}
elseif($phome=='DoSave')
{
Ebak_SaveSeting($_POST);
}
elseif($phome=='DoDelSave')
{
Ebak_DelSeting($_GET);
}
elseif($phome=='SetGotoBak')
{
$savename=$_GET['savename'];
Ebak_SetGotoBak($savename);
}
elseif($phome=='PathGotoRedata')
{
$mypath=$_GET['mypath'];
Ebak_PathGotoRedata($mypath);
}
elseif($phome=='ChangeLanguage')
{
Ebak_ChangeLanguage($_GET);
}
elseif($phome=='RepPathFiletext')
{
Ebak_RepPathFiletext($_POST);
}
else
{
printerror('ErrorUrl','history.go(-1)');
}

?>