index.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <?php
  2. require("../../class/connect.php");
  3. require("../../class/db_sql.php");
  4. require("../../class/q_functions.php");
  5. require("../../member/class/user.php");
  6. require("../class/ShopSysFun.php");
  7. eCheckCloseMods('shop');//关闭模块
  8. $link=db_connect();
  9. $empire=new mysqlquery();
  10. $editor=1;
  11. //是否登陆
  12. $user=islogin();
  13. $ddid=(int)$_GET['ddid'];
  14. $r=$empire->fetch1("select * from {$dbtbpre}enewsshopdd where ddid='$ddid' and userid='$user[userid]' limit 1");
  15. if(empty($r['ddid']))
  16. {
  17. printerror('此订单不存在','',1,0,1);
  18. }
  19. $addr=$empire->fetch1("select * from {$dbtbpre}enewsshopdd_add where ddid='$ddid' limit 1");
  20. //需要发票
  21. $fp="否";
  22. if($r[fp])
  23. {
  24. $fp="是";
  25. }
  26. //金额
  27. $total=0;
  28. if($r[payby]==1)
  29. {
  30. $pstotal=$r[pstotal]." 点";
  31. $alltotal=$r[alltotalfen]." 点";
  32. $total=$r[pstotal]+$r[alltotalfen];
  33. $mytotal=$total." 点";
  34. }
  35. else
  36. {
  37. $pstotal=$r[pstotal]." 元";
  38. $alltotal=$r[alltotal]." 元";
  39. $total=$r[pstotal]+$r[alltotal]+$r[fptotal]-$r[pretotal];
  40. $mytotal=$total." 元";
  41. }
  42. //支付方式
  43. if($r[payby]==1)
  44. {
  45. $payfsname=$r[payfsname]."(点数购买)";
  46. }
  47. elseif($r[payby]==2)
  48. {
  49. $payfsname=$r[payfsname]."(余额购买)";
  50. }
  51. else
  52. {
  53. $payfsname=$r[payfsname];
  54. }
  55. //状态
  56. if($r['checked']==1)
  57. {
  58. $ch="已确认";
  59. }
  60. elseif($r['checked']==2)
  61. {
  62. $ch="取消";
  63. }
  64. elseif($r['checked']==3)
  65. {
  66. $ch="退货";
  67. }
  68. else
  69. {
  70. $ch="<font color=red>未确认</font>";
  71. }
  72. //发货
  73. if($r['outproduct']==1)
  74. {
  75. $ou="已发货";
  76. }
  77. elseif($r['outproduct']==2)
  78. {
  79. $ou="备货中";
  80. }
  81. else
  82. {
  83. $ou="<font color=red>未发货</font>";
  84. }
  85. $topay='';
  86. if($r['haveprice']==1)
  87. {
  88. $ha="已付款";
  89. }
  90. else
  91. {
  92. //是否网银支付
  93. $payfs_r=$empire->fetch1("select payurl from {$dbtbpre}enewsshoppayfs where payid='$r[payfsid]'");
  94. if($payfs_r['payurl'])
  95. {
  96. $topay="&nbsp;&nbsp;&nbsp;&nbsp;<input type='button' name='button' value='点击支付' onclick=\"window.open('../doaction.php?ddid=$ddid&enews=ShopDdToPay','','width=760,height=600,scrollbars=yes,resizable=yes');\">";
  97. }
  98. $ha="<font color=red>未付款</font>";
  99. }
  100. //导入模板
  101. require(ECMS_PATH.'e/template/ShopSys/ShowDd.php');
  102. db_close();
  103. $empire=null;
  104. ?>