buygoods.aspx
上传用户:wenllgg125
上传日期:2020-04-09
资源大小:7277k
文件大小:14k
源码类别:

SCSI/ASPI

开发平台:

Others

  1. <%@ Page language="c#" AutoEventWireup="false" EnableViewState="false" Inherits="Discuz.Mall.Pages.buygoods" %>
  2. <%@ Import namespace="System.Data" %>
  3. <%@ Import namespace="Discuz.Common" %>
  4. <%@ Import namespace="Discuz.Forum" %>
  5. <%@ Import namespace="Discuz.Entity" %>
  6. <script runat="server">
  7. override protected void OnInit(EventArgs e)
  8. {
  9. /* 
  10. This page was created by Discuz!NT Template Engine at 2009-9-22 17:24:48.
  11. 本页面代码由Discuz!NT模板引擎生成于 2009-9-22 17:24:48. 
  12. */
  13. base.OnInit(e);
  14. templateBuilder.Capacity = 220000;
  15. templateBuilder.Append("<!--TheCurrent start-->rn");
  16. if (page_err==0)
  17. {
  18. if (ispost)
  19. {
  20. }
  21. else
  22. {
  23. templateBuilder.Append("<div id="foruminfo">rn");
  24. templateBuilder.Append(" <div id="nav">rn");
  25. templateBuilder.Append(" <a id="A1" href="forumindex.aspx">");
  26. templateBuilder.Append(config.Forumtitle.ToString().Trim());
  27. templateBuilder.Append("</a>  &raquo; ");
  28. templateBuilder.Append(goodscategoryinfo.Pathlist.ToString().Trim());
  29. templateBuilder.Append("  &raquo; <strong>购买商品</strong>rn");
  30. templateBuilder.Append(" </div>rn");
  31. templateBuilder.Append("</div> rn");
  32. templateBuilder.Append("<script language="javascript" src="javascript/template_trade.js"></");
  33. templateBuilder.Append("script>rn");
  34. templateBuilder.Append("<script type="text/javascript">rn");
  35. templateBuilder.Append("zoomstatus = parseInt(1);rn");
  36. templateBuilder.Append("var feevalue = 0;rn");
  37. templateBuilder.Append("var price = ");
  38. templateBuilder.Append(goodsinfo.Price.ToString().Trim());
  39. templateBuilder.Append(";rn");
  40. templateBuilder.Append("</");
  41. templateBuilder.Append("script>rn");
  42. templateBuilder.Append("<form method="post" id="tradepost" name="tradepost" action="buygoods.aspx?goodsid=");
  43. templateBuilder.Append(goodsinfo.Goodsid.ToString().Trim());
  44. templateBuilder.Append("">rn");
  45. templateBuilder.Append("<div class="box tradeinfo">rn");
  46. templateBuilder.Append(" <h1>");
  47. templateBuilder.Append(goodsinfo.Title.ToString().Trim());
  48. templateBuilder.Append("</h1>rn");
  49. templateBuilder.Append(" <div class="imageviewer" style="padding:20px 0;">rn");
  50.  aspxrewriteurl = this.ShowGoodsAspxRewrite(goodsinfo.Goodsid);
  51. templateBuilder.Append(" <a href="");
  52. templateBuilder.Append(aspxrewriteurl.ToString());
  53. templateBuilder.Append("">rn");
  54. if (goodsinfo.Goodspic=="")
  55. {
  56. templateBuilder.Append(" <img id="goodspic" style="width:80px;" src="templates/");
  57. templateBuilder.Append(templatepath.ToString());
  58. templateBuilder.Append("/images/mall/nogoods_small.gif" onerror="this.onerror=null;this.src='");
  59. templateBuilder.Append(goodsinfo.Goodspic.ToString().Trim());
  60. templateBuilder.Append("';"  alt="");
  61. templateBuilder.Append(goodsinfo.Title.ToString().Trim());
  62. templateBuilder.Append("">rn");
  63. }
  64. else
  65. {
  66. templateBuilder.Append(" <img id="goodspic" style="width:80px;" src="upload/");
  67. templateBuilder.Append(goodsinfo.Goodspic.ToString().Trim());
  68. templateBuilder.Append("" onerror="this.onerror=null;this.src='");
  69. templateBuilder.Append(goodsinfo.Goodspic.ToString().Trim());
  70. templateBuilder.Append("';"  alt="");
  71. templateBuilder.Append(goodsinfo.Title.ToString().Trim());
  72. templateBuilder.Append("">rn");
  73. } //end if
  74. templateBuilder.Append(" </a>rn");
  75. templateBuilder.Append(" </div>rn");
  76. templateBuilder.Append(" <div class="itemsummary" style="margin-left:-40px;">rn");
  77. templateBuilder.Append(" <ul id="priceinfo">rn");
  78. templateBuilder.Append(" <li class="currentprice" style="padding-bottom: 5px;"><span style="margin-top: 5px;">现价:</span><em>");
  79. templateBuilder.Append(goodsinfo.Price.ToString().Trim());
  80. templateBuilder.Append("</em>元</li>rn");
  81. templateBuilder.Append(" <li class="location"><span>所在地:</span>");
  82. templateBuilder.Append(goodsinfo.Locus.ToString().Trim());
  83. templateBuilder.Append("</li>rn");
  84. templateBuilder.Append(" <li><span>卖家:</span>rn");
  85.  aspxrewriteurl = this.UserInfoAspxRewrite(goodsinfo.Selleruid);
  86. templateBuilder.Append(" <a href="");
  87. templateBuilder.Append(aspxrewriteurl.ToString());
  88. templateBuilder.Append("" target="_blank">");
  89. templateBuilder.Append(goodsinfo.Seller.ToString().Trim());
  90. templateBuilder.Append("</a> rn");
  91. if (goodsinfo.Tradetype==1)
  92. {
  93. templateBuilder.Append(" <a href="https://www.alipay.com/trade/i_credit.do?email=");
  94. templateBuilder.Append(goodsinfo.Account.ToString().Trim());
  95. templateBuilder.Append("" target="_blank"><img src="templates/");
  96. templateBuilder.Append(templatepath.ToString());
  97. templateBuilder.Append("/images/alipaysmall.gif" border="0" />支付宝账户信用信息</a>rn");
  98. } //end if
  99. templateBuilder.Append(" </li>rn");
  100. templateBuilder.Append(" </ul>rn");
  101. templateBuilder.Append(" </div>rn");
  102. templateBuilder.Append("</div>rn");
  103. templateBuilder.Append("<div class="mainbox">rn");
  104. templateBuilder.Append(" <h3>rn");
  105. if (goodstradelog.Id<=0)
  106. {
  107. templateBuilder.Append("    确认购买信息rn");
  108. }
  109. else
  110. {
  111. templateBuilder.Append("    交易单  rn");
  112. } //end if
  113. templateBuilder.Append("</h3>rn");
  114. templateBuilder.Append(" <table summary="确认购买信息" cellpadding="0" cellspacing="0" border="0">rn");
  115. templateBuilder.Append(" <tr>rn");
  116. templateBuilder.Append(" <th>支付总额</th>rn");
  117. templateBuilder.Append(" <td><strong id="caculate"></strong>&nbsp;元</td>rn");
  118. templateBuilder.Append(" </tr>rn");
  119. templateBuilder.Append(" <tr>rn");
  120. templateBuilder.Append(" <th><label for="number">购买数量</label></th>rn");
  121. templateBuilder.Append(" <td><input type="text" id="number" name="number" onkeyup="calcsum()" value="1" /></td>rn");
  122. templateBuilder.Append(" </tr>rn");
  123. templateBuilder.Append(" <tr>rn");
  124. templateBuilder.Append(" <th>物流方式</th>rn");
  125. templateBuilder.Append(" <td>rn");
  126. templateBuilder.Append("     <input type="hidden" id="transport" name="transport" value="");
  127. templateBuilder.Append(goodsinfo.Transport.ToString().Trim());
  128. templateBuilder.Append("" />rn");
  129. if (goodsinfo.Transport==0)
  130. {
  131. templateBuilder.Append("     虚拟物品或无需邮递 rn");
  132. } //end if
  133. if (goodsinfo.Transport==1)
  134. {
  135. templateBuilder.Append("     卖家承担运费rn");
  136. } //end if
  137. if (goodsinfo.Transport>1)
  138. {
  139. if (goodsinfo.Transport==2)
  140. {
  141. templateBuilder.Append("         买家承担运费rn");
  142. } //end if
  143. if (goodsinfo.Transport==3)
  144. {
  145. templateBuilder.Append("         买家收到货物后直接支付给物流公司rn");
  146. } //end if
  147. if (goodsinfo.Ordinaryfee>0)
  148. {
  149. templateBuilder.Append("          <label><input class="radio" type="radio" id="postage_mail" name="fee" value="");
  150. templateBuilder.Append(goodsinfo.Ordinaryfee.ToString().Trim());
  151. templateBuilder.Append("" checked="checked" rn");
  152. if (goodsinfo.Transport==2)
  153. {
  154. templateBuilder.Append("onclick="$('transport').value = 1;feevalue = ");
  155. templateBuilder.Append(goodsinfo.Ordinaryfee.ToString().Trim());
  156. templateBuilder.Append(";calcsum();"rn");
  157. } //end if
  158. templateBuilder.Append(" /> 平邮 ");
  159. templateBuilder.Append(goodsinfo.Ordinaryfee.ToString().Trim());
  160. templateBuilder.Append(" 元</label>rn");
  161. templateBuilder.Append("          <script type="text/javascript">feevalue = ");
  162. templateBuilder.Append(goodsinfo.Ordinaryfee.ToString().Trim());
  163. templateBuilder.Append("</");
  164. templateBuilder.Append("script>rn");
  165. } //end if
  166. if (goodsinfo.Emsfee>0)
  167. {
  168. templateBuilder.Append("          <label><input class="radio" type="radio" id="postage_ems" name="fee" value="");
  169. templateBuilder.Append(goodsinfo.Emsfee.ToString().Trim());
  170. templateBuilder.Append("" checked="checked" rn");
  171. if (goodsinfo.Transport==2)
  172. {
  173. templateBuilder.Append("onclick="$('transport').value = 2;feevalue = ");
  174. templateBuilder.Append(goodsinfo.Emsfee.ToString().Trim());
  175. templateBuilder.Append(";calcsum();"rn");
  176. } //end if
  177. templateBuilder.Append(" /> EMS ");
  178. templateBuilder.Append(goodsinfo.Emsfee.ToString().Trim());
  179. templateBuilder.Append(" 元</label>rn");
  180. templateBuilder.Append("          <script type="text/javascript">feevalue = ");
  181. templateBuilder.Append(goodsinfo.Emsfee.ToString().Trim());
  182. templateBuilder.Append("</");
  183. templateBuilder.Append("script>rn");
  184. } //end if
  185. if (goodsinfo.Expressfee>0)
  186. {
  187. templateBuilder.Append("          <label><input class="radio" type="radio" id="postage_express" name="fee" value="");
  188. templateBuilder.Append(goodsinfo.Expressfee.ToString().Trim());
  189. templateBuilder.Append("" checked="checked" rn");
  190. if (goodsinfo.Transport==2)
  191. {
  192. templateBuilder.Append("onclick="$('transport').value = 3;feevalue = ");
  193. templateBuilder.Append(goodsinfo.Expressfee.ToString().Trim());
  194. templateBuilder.Append(";calcsum();"rn");
  195. } //end if
  196. templateBuilder.Append(" /> 快递 ");
  197. templateBuilder.Append(goodsinfo.Expressfee.ToString().Trim());
  198. templateBuilder.Append(" 元</label>rn");
  199. templateBuilder.Append("          <script type="text/javascript">feevalue = ");
  200. templateBuilder.Append(goodsinfo.Expressfee.ToString().Trim());
  201. templateBuilder.Append("</");
  202. templateBuilder.Append("script>rn");
  203. } //end if
  204. } //end if
  205. templateBuilder.Append(" </td>rn");
  206. templateBuilder.Append(" </tr>rn");
  207. templateBuilder.Append(" <tr>rn");
  208. templateBuilder.Append(" <th>交易方式</th>rn");
  209. templateBuilder.Append(" <td>rn");
  210. if (goodsinfo.Tradetype==1)
  211. {
  212. templateBuilder.Append(" <label><input type="radio" class="radio" name="offline" value="0" checked="checked" /> 支付宝在线交易</label> <label><input type="radio" class="radio" name="offline" value="1" /> 线下交易</label>rn");
  213. }
  214. else
  215. {
  216. templateBuilder.Append("         <label>线下交易<input type="hidden" class="radio" name="offline" value="1" /></label>rn");
  217. } //end if
  218. templateBuilder.Append("     </td>rn");
  219. templateBuilder.Append(" </tr>rn");
  220. templateBuilder.Append(" <tr>rn");
  221. templateBuilder.Append(" <th><label for="buyername">收货人姓名</label></th>rn");
  222. templateBuilder.Append(" <td><input type="text" id="buyername" name="buyername" maxlength="50" value="");
  223. templateBuilder.Append(goodstradelog.Buyername.ToString().Trim());
  224. templateBuilder.Append("" /></td>rn");
  225. templateBuilder.Append(" </tr>rn");
  226. templateBuilder.Append(" <tr>rn");
  227. templateBuilder.Append(" <th><label for="buyercontact">收货地址</label></th>rn");
  228. templateBuilder.Append(" <td><input type="text" id="buyercontact" name="buyercontact" maxlength="100" size="80" value="");
  229. templateBuilder.Append(goodstradelog.Buyercontact.ToString().Trim());
  230. templateBuilder.Append("" /></td>rn");
  231. templateBuilder.Append(" </tr>rn");
  232. templateBuilder.Append(" <tr>rn");
  233. templateBuilder.Append(" <th><label for="buyerzip">收货人邮编</label></th>rn");
  234. templateBuilder.Append(" <td><input type="text" id="buyerzip" name="buyerzip" maxlength="10" value="");
  235. templateBuilder.Append(goodstradelog.Buyerzip.ToString().Trim());
  236. templateBuilder.Append(""" /></td>rn");
  237. templateBuilder.Append(" </tr>rn");
  238. templateBuilder.Append(" <tr>rn");
  239. templateBuilder.Append(" <th><label for="buyerphone">收货人电话</label></th>rn");
  240. templateBuilder.Append(" <td><input type="text" id="buyerphone" name="buyerphone" maxlength="20" value="");
  241. templateBuilder.Append(goodstradelog.Buyerphone.ToString().Trim());
  242. templateBuilder.Append(""" /></td>rn");
  243. templateBuilder.Append(" </tr>rn");
  244. templateBuilder.Append(" <tr>rn");
  245. templateBuilder.Append(" <th><label for="buyermobile">收货人手机</label></th>rn");
  246. templateBuilder.Append(" <td><input type="text" id="buyermobile" name="buyermobile" maxlength="20" value="");
  247. templateBuilder.Append(goodstradelog.Buyermobile.ToString().Trim());
  248. templateBuilder.Append(""" /></td>rn");
  249. templateBuilder.Append(" </tr>rn");
  250. templateBuilder.Append(" <tr>rn");
  251. templateBuilder.Append(" <th><label for="buyermsg">备注信息</label><div class="tips">200 字以内</div></th>rn");
  252. templateBuilder.Append(" <td>rn");
  253. templateBuilder.Append(" <textarea id="buyermsg" name="buyermsg" style="width: 95%" rows="3">");
  254. templateBuilder.Append(goodstradelog.Buyermsg.ToString().Trim());
  255. templateBuilder.Append("</textarea>rn");
  256. templateBuilder.Append(" </td>rn");
  257. templateBuilder.Append(" </tr>rn");
  258. templateBuilder.Append(" <tr>rn");
  259. templateBuilder.Append(" <th>&nbsp;</th>rn");
  260. templateBuilder.Append(" <td>rn");
  261. templateBuilder.Append(" <button class="mallbutton" type="submit" name="tradesubmit" value="true">确认购买</button>rn");
  262. templateBuilder.Append(" </td>rn");
  263. templateBuilder.Append(" </tr>rn");
  264. templateBuilder.Append(" </table>rn");
  265. templateBuilder.Append(" </div>rn");
  266. templateBuilder.Append("</form>rn");
  267. templateBuilder.Append("<script type="text/javascript">rn");
  268. templateBuilder.Append("function calcsum() {rn");
  269. templateBuilder.Append(" $('caculate').innerHTML = parseFloat(price * $('tradepost').number.value + feevalue).toFixed(2);rn");
  270. templateBuilder.Append("}rn");
  271. templateBuilder.Append("calcsum();rn");
  272. templateBuilder.Append("</");
  273. templateBuilder.Append("script>rn");
  274. templateBuilder.Append("</div>rn");
  275. } //end if
  276. }
  277. else
  278. {
  279. templateBuilder.Append("</div>rn");
  280. } //end if
  281. Response.Write(templateBuilder.ToString());
  282. }
  283. </script>