3_3_forum_post_trade.tpl.php 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <?php if(!defined('IN_DISCUZ')) exit('Access Denied'); ?>
  2. <input type="hidden" name="trade" value="yes" />
  3. <input type="hidden" name="item_type" value="1" />
  4. <div class="exfm cl">
  5. <div class="sinf sppoll z">
  6. <dl>
  7. <dt><span class="rq">*</span><label for="item_name">商品名称:</label></dt>
  8. <dd><input type="text" name="item_name" id="item_name" class="px oinf" value="<?php echo $trade['subject'];?>" tabindex="1" /></dd>
  9. <dt><span class="rq">*</span><label for="item_number">商品数量:</label></dt>
  10. <dd>
  11. <div class="spmf">
  12. <em>
  13. <input type="text" name="item_number" id="item_number" class="px" value="<?php echo $trade['amount'];?>" tabindex="1" />
  14. </em>
  15. <em>
  16. <span class="ftid">
  17. <select id="item_quality" class="ps" width="108" name="item_quality" tabindex="1">
  18. <option value="1" <?php if($trade['quality'] == 1) { ?>selected="selected"<?php } ?>>全新</option>
  19. <option value="2" <?php if($trade['quality'] == 2) { ?>selected="selected"<?php } ?>>二手</option>
  20. </select>
  21. </span>
  22. </em>
  23. </div>
  24. </dd>
  25. <dt><label for="transport">物流方式:</label></dt>
  26. <dd>
  27. <span class="ftid">
  28. <select name="transport" id="transport" width="108" change="$('logisticssetting').style.display = $('transport').value == 'virtual' ? 'none' : ''" class="ps">
  29. <option value="virtual" <?php if($trade['transport'] == 3) { ?>selected="selected"<?php } ?>>虚拟物品</option>
  30. <option value="seller" <?php if($trade['transport'] == 1) { ?>selected="selected"<?php } ?>>卖家承担运费</option>
  31. <option value="buyer" <?php if($trade['transport'] == 2) { ?>selected="selected"<?php } ?>>买家承担运费</option>
  32. <option value="logistics" <?php if($trade['transport'] == 4) { ?>selected="selected"<?php } ?>>支付给物流公司</option>
  33. <option value="offline" <?php if($trade['transport'] == 0) { ?>selected="selected"<?php } ?>>线下交易</option>
  34. </select>
  35. </span>
  36. </dd>
  37. <dt><span class="rq">*</span>商品价格:</dt>
  38. <dd>
  39. <div class="spmf mbm">
  40. <em>
  41. <input type="text" name="item_price" id="item_price" class="px" value="<?php echo $trade['price'];?>" tabindex="1" />
  42. <label for="item_price">现价(人民币)</label>
  43. </em>
  44. <em>
  45. <input type="text" name="item_costprice" id="item_costprice" class="px" value="<?php echo $trade['costprice'];?>" tabindex="1" />
  46. <label for="item_costprice">原价(人民币)</label>
  47. </em>
  48. </div>
  49. <?php if($_G['setting']['creditstransextra']['5'] != -1) { ?>
  50. <div class="spmf mbm">
  51. <em>
  52. <input type="text" name="item_credit" id="item_credit" class="px" value="<?php echo $trade['credit'];?>" tabindex="1" />
  53. <label for="item_credit">现价积分(<?php echo $_G['setting']['extcredits'][$_G['setting']['creditstransextra']['5']]['title'];?>)</label>
  54. </em>
  55. <em>
  56. <input type="text" name="item_costcredit" id="item_costcredit" class="px" value="<?php echo $trade['costcredit'];?>" tabindex="1" />
  57. <label for="item_costcredit">原价积分(<?php echo $_G['setting']['extcredits'][$_G['setting']['creditstransextra']['5']]['title'];?>)</label>
  58. </em>
  59. </div>
  60. <?php } ?>
  61. <div class="spmf3 mbm" id="logisticssetting" style="display:<?php if(!$trade['transport'] || $trade['transport'] == 3) { ?>none<?php } ?>">
  62. <em>
  63. <input type="text" name="postage_mail" id="postage_mail" class="px" value="<?php echo $trade['ordinaryfee'];?>" tabindex="1" />
  64. <label for="postage_mail">平邮</label>
  65. </em>
  66. <em>
  67. <input type="text" name="postage_express" id="postage_express" class="px" value="<?php echo $trade['expressfee'];?>" tabindex="1" />
  68. <label for="postage_express">快递</label>
  69. </em>
  70. <em>
  71. <input type="text" name="postage_ems" id="postage_ems" class="px" value="<?php echo $trade['emsfee'];?>" tabindex="1" />
  72. <label for="postage_ems">EMS</label>
  73. </em>
  74. </div>
  75. </dd>
  76. <dt><label for="paymethod">交易方式:</label></dt>
  77. <dd>
  78. <span class="ftid">
  79. <select name="paymethod" id="paymethod" width="108" change="display('tenpayseller')" class="ps" tabindex="1">
  80. <?php if($_G['setting']['ec_tenpay_opentrans_chnid']) { ?><option value="0" <?php if($trade['tenpayaccount']) { ?>selected<?php } ?>>在线交易</option><?php } ?>
  81. <option value="1" <?php if(!$trade['tenpayaccount']) { ?>selected<?php } ?>>担保交易</option>
  82. </select>
  83. </span>
  84. </dd>
  85. </dl>
  86. <dl id="tenpayseller" style="<?php if(!$trade['tenpayaccount']) { ?>display:none<?php } ?>">
  87. <dt><label for="tenpay_account">财付通账户:</label></dt>
  88. <dd><input type="text" name="tenpay_account" id="tenpay_account" class="px" value="<?php echo $trade['tenpayaccount'];?>" tabindex="2" /></dd>
  89. </dl>
  90. </div>
  91. <div class="sadd z">
  92. <dl class="cl">
  93. <dt><label for="item_locus">所在地点:</label></dt>
  94. <dd><input type="text" name="item_locus" id="item_locus" class="px" value="<?php echo $trade['locus'];?>" tabindex="1" /></dd>
  95. <dt><label for="item_expiration">有效期至:</label></dt>
  96. <dd class="hasd">
  97. <input type="text" name="item_expiration" id="item_expiration" class="px" onclick="showcalendar(event, this, false)" autocomplete="off" value="<?php echo $trade['expiration'];?>" tabindex="1" />
  98. <a href="javascript:;" class="dpbtn" onclick="showselect(this, 'item_expiration', 1)">^</a>
  99. </dd>
  100. <?php if($allowpostimg) { ?>
  101. <dt>商品图片:</dt>
  102. <dd class="pns">
  103. <button type="button" class="pn" onclick="uploadWindow(function (aid, url){tradeaid_upload(aid, url)})"><span><?php if($tradeattach['attachment']) { ?>更新<?php } else { ?>上传<?php } ?></span></button>
  104. <input type="hidden" name="tradeaid" id="tradeaid" <?php if($tradeattach['attachment']) { ?>value="<?php echo $tradeattach['aid'];?>" <?php } ?>/>
  105. <input type="hidden" name="tradeaid_url" id="tradeaid_url" />
  106. <div id="tradeattach_image" class="ptn">
  107. <?php if($tradeattach['attachment']) { ?>
  108. <a href="<?php echo $tradeattach['url'];?>/<?php echo $tradeattach['attachment'];?>" target="_blank"><img class="spimg" src="<?php echo $tradeattach['url'];?>/<?php if($tradeattach['thumb']) { echo getimgthumbname($tradeattach['attachment']);?><?php } else { ?><?php echo $tradeattach['attachment'];?><?php } ?>" alt="" /></a>
  109. <?php } ?>
  110. </div>
  111. </dd>
  112. <?php } ?>
  113. <?php if(!empty($_G['setting']['pluginhooks']['post_trade_extra'])) echo $_G['setting']['pluginhooks']['post_trade_extra'];?>
  114. </dl>
  115. </div>
  116. </div>
  117. <script type="text/javascript" reload="1">
  118. simulateSelect('item_quality');
  119. simulateSelect('paymethod');
  120. simulateSelect('transport');
  121. EXTRAFUNC['validator']['special'] = 'validateextra';
  122. function validateextra() {
  123. if($('postform').item_name.value == '') {
  124. showDialog('抱歉,请输入商品名称', 'alert', '', function () { $('postform').item_name.focus() });
  125. return false;
  126. }
  127. if($('postform').item_number.value == '') {
  128. showDialog('抱歉,请输入商品数量', 'alert', '', function () { $('postform').item_number.focus() });
  129. return false;
  130. }
  131. if($('postform').item_price.value == '' && $('postform').item_credit.value == '') {
  132. showDialog('抱歉,请输入商品价格', 'alert', '', function () { $('postform').item_price.focus() });
  133. return false;
  134. }
  135. return true;
  136. }
  137. function tradeaid_upload(aid, url) {
  138. $('tradeaid_url').value = url;
  139. updatetradeattach(aid, url, '<?php echo $_G['setting']['attachurl'];?>forum');
  140. }
  141. </script>