index.php 1.9 KB

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