post_trade.htm 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <input type="hidden" name="trade" value="yes" />
  2. <input type="hidden" name="item_type" value="1" />
  3. <div class="exfm cl">
  4. <div class="sinf sppoll z">
  5. <dl>
  6. <dt><span class="rq">*</span><label for="item_name">{lang post_trade_name}:</label></dt>
  7. <dd><input type="text" name="item_name" id="item_name" class="px oinf" value="$trade[subject]" tabindex="1" /></dd>
  8. <dt><span class="rq">*</span><label for="item_number">{lang post_trade_number}:</label></dt>
  9. <dd>
  10. <div class="spmf">
  11. <em>
  12. <input type="text" name="item_number" id="item_number" class="px" value="$trade[amount]" tabindex="1" />
  13. </em>
  14. <em>
  15. <span class="ftid">
  16. <select id="item_quality" class="ps" width="108" name="item_quality" tabindex="1">
  17. <option value="1" {if $trade['quality'] == 1}selected="selected"{/if}>{lang trade_new}</option>
  18. <option value="2" {if $trade['quality'] == 2}selected="selected"{/if}>{lang trade_old}</option>
  19. </select>
  20. </span>
  21. </em>
  22. </div>
  23. </dd>
  24. <dt><label for="transport">{lang post_trade_transport}:</label></dt>
  25. <dd>
  26. <span class="ftid">
  27. <select name="transport" id="transport" width="108" change="$('logisticssetting').style.display = $('transport').value == 'virtual' ? 'none' : ''" class="ps">
  28. <option value="virtual" {if $trade['transport'] == 3}selected="selected"{/if}>{lang post_trade_transport_virtual}</option>
  29. <option value="seller" {if $trade['transport'] == 1}selected="selected"{/if}>{lang post_trade_transport_seller}</option>
  30. <option value="buyer" {if $trade['transport'] == 2}selected="selected"{/if}>{lang post_trade_transport_buyer}</option>
  31. <option value="logistics" {if $trade['transport'] == 4}selected="selected"{/if}>{lang trade_type_transport_physical}</option>
  32. <option value="offline" {if $trade['transport'] == 0}selected="selected"{/if}>{lang post_trade_transport_offline}</option>
  33. </select>
  34. </span>
  35. </dd>
  36. <dt><span class="rq">*</span>{lang post_trade_price}:</dt>
  37. <dd>
  38. <div class="spmf mbm">
  39. <em>
  40. <input type="text" name="item_price" id="item_price" class="px" value="$trade[price]" tabindex="1" />
  41. <label for="item_price">{lang post_current_price}</label>
  42. </em>
  43. <em>
  44. <input type="text" name="item_costprice" id="item_costprice" class="px" value="$trade[costprice]" tabindex="1" />
  45. <label for="item_costprice">{lang post_original_price}</label>
  46. </em>
  47. </div>
  48. <!--{if $_G['setting']['creditstransextra'][5] != -1}-->
  49. <div class="spmf mbm">
  50. <em>
  51. <input type="text" name="item_credit" id="item_credit" class="px" value="$trade[credit]" tabindex="1" />
  52. <label for="item_credit">{lang post_current_credit}({$_G['setting']['extcredits'][$_G['setting']['creditstransextra'][5]][title]})</label>
  53. </em>
  54. <em>
  55. <input type="text" name="item_costcredit" id="item_costcredit" class="px" value="$trade[costcredit]" tabindex="1" />
  56. <label for="item_costcredit">{lang post_original_credit}({$_G['setting']['extcredits'][$_G['setting']['creditstransextra'][5]][title]})</label>
  57. </em>
  58. </div>
  59. <!--{/if}-->
  60. <div class="spmf3 mbm" id="logisticssetting" style="display:{if !$trade['transport'] || $trade['transport'] == 3}none{/if}">
  61. <em>
  62. <input type="text" name="postage_mail" id="postage_mail" class="px" value="$trade[ordinaryfee]" tabindex="1" />
  63. <label for="postage_mail">{lang post_trade_transport_mail}</label>
  64. </em>
  65. <em>
  66. <input type="text" name="postage_express" id="postage_express" class="px" value="$trade[expressfee]" tabindex="1" />
  67. <label for="postage_express">{lang post_trade_transport_express}</label>
  68. </em>
  69. <em>
  70. <input type="text" name="postage_ems" id="postage_ems" class="px" value="$trade[emsfee]" tabindex="1" />
  71. <label for="postage_ems">EMS</label>
  72. </em>
  73. </div>
  74. </dd>
  75. <dt><label for="paymethod">{lang post_trade_paymethod}:</label></dt>
  76. <dd>
  77. <span class="ftid">
  78. <select name="paymethod" id="paymethod" width="108" change="display('tenpayseller')" class="ps" tabindex="1">
  79. <!--{if $_G[setting][ec_tenpay_opentrans_chnid]}--><option value="0" {if $trade[tenpayaccount]}selected{/if}>{lang post_trade_paymethod_online}</option><!--{/if}-->
  80. <option value="1" {if !$trade[tenpayaccount]}selected{/if}>{lang post_trade_paymethod_offline}</option>
  81. </select>
  82. </span>
  83. </dd>
  84. </dl>
  85. <dl id="tenpayseller" style="{if !$trade[tenpayaccount]}display:none{/if}">
  86. <dt><label for="tenpay_account">{lang post_trade_tenpay_seller}:</label></dt>
  87. <dd><input type="text" name="tenpay_account" id="tenpay_account" class="px" value="$trade[tenpayaccount]" tabindex="2" /></dd>
  88. </dl>
  89. </div>
  90. <div class="sadd z">
  91. <dl class="cl">
  92. <dt><label for="item_locus">{lang post_trade_locus}:</label></dt>
  93. <dd><input type="text" name="item_locus" id="item_locus" class="px" value="$trade[locus]" tabindex="1" /></dd>
  94. <dt><label for="item_expiration">{lang valid_before}:</label></dt>
  95. <dd class="hasd">
  96. <input type="text" name="item_expiration" id="item_expiration" class="px" onclick="showcalendar(event, this, false)" autocomplete="off" value="$trade[expiration]" tabindex="1" />
  97. <a href="javascript:;" class="dpbtn" onclick="showselect(this, 'item_expiration', 1)">^</a>
  98. </dd>
  99. <!--{if $allowpostimg}-->
  100. <dt>{lang post_trade_picture}:</dt>
  101. <dd class="pns">
  102. <button type="button" class="pn" onclick="uploadWindow(function (aid, url){tradeaid_upload(aid, url)})"><span><!--{if $tradeattach[attachment]}-->{lang update}<!--{else}-->{lang upload}<!--{/if}--></span></button>
  103. <input type="hidden" name="tradeaid" id="tradeaid" {if $tradeattach[attachment]}value="$tradeattach[aid]" {/if}/>
  104. <input type="hidden" name="tradeaid_url" id="tradeaid_url" />
  105. <div id="tradeattach_image" class="ptn">
  106. <!--{if $tradeattach[attachment]}-->
  107. <a href="$tradeattach[url]/$tradeattach[attachment]" target="_blank"><img class="spimg" src="$tradeattach[url]/{if $tradeattach['thumb']}{eval echo getimgthumbname($tradeattach['attachment']);}{else}$tradeattach[attachment]{/if}" alt="" /></a>
  108. <!--{/if}-->
  109. </div>
  110. </dd>
  111. <!--{/if}-->
  112. <!--{hook/post_trade_extra}-->
  113. </dl>
  114. </div>
  115. </div>
  116. <script type="text/javascript" reload="1">
  117. simulateSelect('item_quality');
  118. simulateSelect('paymethod');
  119. simulateSelect('transport');
  120. EXTRAFUNC['validator']['special'] = 'validateextra';
  121. function validateextra() {
  122. if($('postform').item_name.value == '') {
  123. showDialog('{lang post_goods_error_message_1}', 'alert', '', function () { $('postform').item_name.focus() });
  124. return false;
  125. }
  126. if($('postform').item_number.value == '') {
  127. showDialog('{lang post_goods_error_message_2}', 'alert', '', function () { $('postform').item_number.focus() });
  128. return false;
  129. }
  130. if($('postform').item_price.value == '' && $('postform').item_credit.value == '') {
  131. showDialog('{lang post_goods_error_message_3}', 'alert', '', function () { $('postform').item_price.focus() });
  132. return false;
  133. }
  134. return true;
  135. }
  136. function tradeaid_upload(aid, url) {
  137. $('tradeaid_url').value = url;
  138. updatetradeattach(aid, url, '{$_G['setting']['attachurl']}forum');
  139. }
  140. </script>