<?php
require("../class/connect.php");
include("../class/db_sql.php");
include("../class/config.php");
include("../class/class.php");
include("../class/user.php");
include("../class/q_functions.php");
include("../class/MemberLevel.php");
include LoadLang("pub/fun.php");
$link=db_connect();
$empire=new mysqlquery();
$enews=$_POST['enews'];
if(empty($enews))
{$enews=$_GET['enews'];}
//增加评论
if($enews=="AddPl")
{
	$username=$_POST['username'];
	$password=$_POST['password'];
	$saytext=$_POST['saytext'];
	$id=$_POST['id'];
	$classid=$_POST['classid'];
	$repid=$_POST['repid'];
	$nomember=$_POST['nomember'];
	$key=$_POST['key'];
	AddPl($username,$password,$nomember,$key,$saytext,$id,$classid,$repid);
	}
//登陆
elseif($enews=="login")
{
	$username=$_POST['username'];
	$password=$_POST['password'];
	$lifetime=$_POST['lifetime'];
	$key=$_POST['key'];
	login1($username,$password,$lifetime,$key,$location);
	}
//注册
elseif($enews=="register")
{
	$username=$_POST['username'];
	$password=$_POST['password'];
	$repassword=$_POST['repassword'];
	$email=$_POST['email'];
	register($username,$password,$repassword,$email);
	}
//修改信息
elseif($enews=="EditInfo")
{
	$password=$_POST['password'];
    $oldpassword=$_POST['oldpassword'];
	$repassword=$_POST['repassword'];
	$email=$_POST['email'];
	EditInfo($password,$repassword,$oldpassword,$email);
	}
//退出登陆
elseif($enews=="exit")
{
	loginout1($myuserid,$myusername,$myrnd);
	}
//增加投票
elseif($enews=="AddVote")
{
	$voteid=$_POST['voteid'];
	$vote=$_POST[vote];
	AddVote($voteid,$vote);
	}
//增加收藏
elseif($enews=="AddFava")
{
	$cid=$_POST['cid'];
	$id=$_POST['id'];
	$classid=$_POST['classid'];
	$from=$_POST['from'];
	AddFava($id,$classid,$cid,$from);
}
//删除收藏
elseif($enews=="DelFava_All")
{
	$favaid=$_POST['favaid'];
	DelFava_All($favaid);
}
//删除收藏
elseif($enews=="DelFava")
{
	$favaid=$_GET['favaid'];
	DelFava($favaid);
}
//点卡冲值
elseif($enews=="CardGetFen")
{
	$username=$_POST['username'];
	$reusername=$_POST['reusername'];
	$card_no=$_POST['card_no'];
	$password=$_POST['password'];
	CardGetFen($username,$reusername,$card_no,$password);
}
//下载软件
elseif($enews=="DownSoft")
{
	$classid=$_GET['classid'];
	$id=$_GET['id'];
	$pathid=$_GET['pathid'];
	$p=$_GET['p'];
	$pass=$_GET['pass'];
	DownSoft($classid,$id,$pathid,$p,$pass);
}
//取得软件地址
elseif($enews=="GetSofturl")
{
	$classid=$_GET['classid'];
	$id=$_GET[id];
	$pathid=$_GET[pathid];
	$p=$_GET[p];
	$pass=$_GET['pass'];
	$onlinetime=$_GET['onlinetime'];
	$onlinepass=$_GET['onlinepass'];
	$movtime=20;
	GetSofturl($classid,$id,$pathid,$p,$pass,$onlinetime,$onlinepass);
}
//清空购物车
elseif($enews=="ClearBuycar")
{
	ClearBuycar();
}
//加入购物车
elseif($enews=="AddBuycar")
{
	$classid=$_GET['classid'];
	$id=$_GET['id'];
	AddBuycar($classid,$id);
}
//修改购物车
elseif($enews=="EditBuycar")
{
	EditBuycar($_POST);
}
//增加定单
elseif($enews=="AddDd")
{
	$user_usermoney=$user_money;
	AddDd($_POST);
}
//增加收藏夹分类
elseif($enews=="AddFavaClass")
{
	AddFavaClass($_POST);
}
//修改收藏夹分类
elseif($enews=="EditFavaClass")
{
	EditFavaClass($_POST);
}
//删除收藏夹分类
elseif($enews=="DelFavaClass")
{
	$cid=$_GET['cid'];
	$doing=$_GET['doing'];
	DelFavaClass($cid,$doing);
}
//移动收藏夹
elseif($enews=="MoveFava_All")
{
	$favaid=$_POST['favaid'];
	$cid=$_POST['cid'];
	MoveFava_All($favaid,$cid);
}
//增加留言
elseif($enews=="AddGbook")
{
	AddGbook($_POST);
}
//增加反馈
elseif($enews=="AddFeedback")
{
	$doetran=1;
	AddFeedback($_POST);
}
//增加错误报告
elseif($enews=="AddError")
{
	AddError($_POST);
}
//发送短信息
elseif($enews=="AddMsg")
{
	AddMsg($_POST);
}
//保存发件箱
elseif($enews=="AddOutMsg")
{
	AddOutMsg($_POST);
}
//删除短信息
elseif($enews=="DelMsg")
{
	DelMsg($_GET['mid'],$_GET['out']);
}
//批量删除短信息
elseif($enews=="DelMsg_all")
{
	DelMsg_all($_POST['mid'],$_POST['out']);
}
//添加好友
elseif($enews=="AddFriend")
{
	AddFriend($_POST);
}
//修改好友
elseif($enews=="EditFriend")
{
	EditFriend($_POST);
}
//删除好友
elseif($enews=="DelFriend")
{
	DelFriend($_GET);
}
else
	{printerror("ErrorUrl","history.go(-1)",1);}
db_close();
$empire=null;
?>
