index.php
1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
require("../../class/connect.php");
require("../../class/q_functions.php");
require("../../class/db_sql.php");
require("../../data/dbcache/class.php");
require("../../member/class/user.php");
require('../class/ShopSysFun.php');
eCheckCloseMods('shop');//關閉模塊
$link=db_connect();
$empire=new mysqlquery();
$editor=1;
$shoppr=ShopSys_ReturnSet();
//驗證權限
ShopCheckAddDdGroup($shoppr);
$r=$_POST;
if(!getcvar('mybuycar'))
{
printerror('你的購物車沒有商品','',1,0,1);
}
//變量處理
$r['truename']=ehtmlspecialchars($r['truename']);
$r['mycall']=ehtmlspecialchars($r['mycall']);
$r['phone']=ehtmlspecialchars($r['phone']);
$r['email']=ehtmlspecialchars($r['email']);
$r['oicq']=ehtmlspecialchars($r['oicq']);
$r['msn']=ehtmlspecialchars($r['msn']);
$r['address']=ehtmlspecialchars($r['address']);
$r['zip']=ehtmlspecialchars($r['zip']);
$r['signbuild']=ehtmlspecialchars($r['signbuild']);
$r['besttime']=ehtmlspecialchars($r['besttime']);
$r['bz']=ehtmlspecialchars($r['bz']);
$r['fptt']=ehtmlspecialchars($r['fptt']);
$r['fpname']=ehtmlspecialchars($r['fpname']);
$r['fp']=(int)$r['fp'];
$r['psid']=(int)$r['psid'];
$r['payfsid']=(int)$r['payfsid'];
$r['precode']=RepPostVar($r['precode']);
$total=array();
//必填項
ShopSys_CheckDdMust($r,$shoppr);
$ddno=ShopSys_ReturnDdNo();//訂單ID
$classids='';
$price=0;
//取得用戶信息
$user=array();
$userid=(int)getcvar('mluserid');
$username=RepPostVar(getcvar('mlusername'));
if($userid)
{
$rnd=RepPostVar(getcvar('mlrnd'));
$user=$empire->fetch1("select ".eReturnSelectMemberF('userid,money,userfen,groupid')." from ".eReturnMemberTable()." where ".egetmf('userid')."='$userid' and ".egetmf('rnd')."='$rnd' limit 1");
if(!$user['userid'])
{
printerror("MustSingleUser","history.go(-1)",1);
}
}
//導入模板
require(ECMS_PATH.'e/template/ShopSys/SubmitOrder.php');
db_close();
$empire=null;
?>