📄 post_editpost.htm
字号:
{template header}
<div class="subtable nav" style="width: {TABLEWIDTH}">
<div class="right"> <a href="#bottom"><img src="{IMGDIR}/arrow_dw.gif" border="0" alt="" /></a></div>
<a href="discuz.php">$bbname</a> $navigation » {lang post_editpost}
</div><br>
<!--{if isset($trade) && $allowposttrade || isset($activity) && $allowpostactivity}-->
<script type="text/javascript" src="include/calendar.js"></script>
<!--{/if}-->
<script type="text/javascript">
var postminchars = $minpostsize;
var postmaxchars = $maxpostsize;
var disablepostctrl = $disablepostctrl;
var attachments = new Array();
var bbinsert = parseInt('$bbinsert');
function checklength(theform) {
if (bbinsert && findobj("{$editorid}_mode").value == '1') { theform.message.value = Editor['$editorid'].getEditorContents(); }
if (postmaxchars != 0) { message = "{lang board_allowed}: "+postminchars+" {lang to} "+postmaxchars+" {lang bytes}"; }
else { message = ""; }
alert("\n{lang post_curlength}: "+theform.message.value.length+" {lang bytes}\n\n"+message);
}
function validate(theform, previewpost, switcheditormode) {
if (bbinsert && findobj("{$editorid}_mode").value == '1') { theform.message.value = Editor['$editorid'].getEditorContents(); }
if (!switcheditormode) {
if (theform.message.value == "" && theform.subject.value == "") {
alert("{lang post_subject_and_message_isnull}");
return false;
} else if (theform.subject.value.length > 80) {
alert("{lang post_subject_toolong}");
return false;
}<!--{if isset($trade) && $allowposttrade}--> else if (theform.seller.value == "") {
alert("{lang post_trade_alipay_null}");
theform.seller.focus();
return false;
} else if (theform.item_name.value == "") {
alert("{lang post_trade_goodsname_null}");
theform.item_name.focus();
return false;
} else if (theform.item_price.value == "") {
alert("{lang post_trade_price_null}");
theform.item_price.focus();
return false;
} else if (theform.item_locus.value == "") {
alert("{lang post_trade_addr_null}");
theform.item_locus.focus();
return false;
}<!--{elseif isset($activity) && $allowpostactivity}--> else if (theform.activityclass.value == "") {
alert("{lang post_activity_sort_null}");
theform.activityclass.focus();
return false;
} else if (findobj("starttimefrom_0").value == "" && findobj("starttimefrom_1").value == "") {
alert("{lang post_activity_fromtime_null}");
return false;
} else if (theform.activityplace.value == "") {
alert("{lang post_activity_addr_null}");
theform.activityplace.focus();
return false;
}<!--{elseif isset($reward) && $allowpostreward}--> else if (theform.rewardprice.value == "") {
alert("{lang reward_credits_null}");
theform.rewardprice.focus();
return false;
}
<!--{/if}-->
}
if (!disablepostctrl && ((postminchars != 0 && theform.message.value.length < postminchars) || (postmaxchars != 0 && theform.message.value.length > postmaxchars))) {
alert("{lang post_message_length_invalid}\n\n{lang post_curlength}: "+theform.message.value.length+" {lang bytes}\n{lang board_allowed}: "+postminchars+" {lang to} "+postmaxchars+" {lang bytes}");
return false;
}
if (!switcheditormode && !previewpost) {
theform.editsubmit.disabled = true;
}
return true;
}
function restore(aid) {
obj = findobj('attach'+aid);
obj.innerHTML = attachments[aid];
}
function attachupdate(aid) {
obj = findobj('attach'+aid);
attachments[aid] = obj.innerHTML;
obj.innerHTML = '<input type="file" name="attachupdate[paid' + aid + ']" size="15"> <input type="button" value="{lang cancel}" onclick="restore(\'' + aid + '\')">';
}
function insertAttachTag(aid) {
if (bbinsert && findobj("{$editorid}_mode").value == '1') {
Editor['$editorid'].insertText('[attach]' + aid + '[/attach]', false);
} else {
AddText('[attach]' + aid + '[/attach]');
}
}
</script>
{template post_preview}
<form method="post" name="input" action="post.php?action=edit&extra=$extra&editsubmit=yes&mod=$mod" $enctype onSubmit="return validate(this)">
<input type="hidden" name="formhash" id="formhash" value="{FORMHASH}">
<input type="hidden" name="page" value="$page">
<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
<tr>
<td colspan="2" class="header">{lang post_editpost}</td>
</tr>
<!--{if $discuz_uid}-->
<tr><td class="altbg1">{lang username}:</td>
<td class="altbg2">$discuz_userss <span class="smalltxt">[<a href="$link_logout">{lang member_logout}</a>]</span></td>
</tr>
<!--{/if}-->
<!--{if $allowsetreadperm && $isfirstpost}-->
<tr>
<td class="altbg1">{lang readperm_thread}:</td>
<td class="altbg2"><input type="text" name="readperm" size="6" value="$thread[readperm]"> <span class="smalltxt">({lang post_zero_is_nopermission})</span></td>
</tr>
<!--{/if}-->
<!--{if $maxprice && $isfirstpost && !$thread['special']}-->
<tr>
<td class="altbg1">{lang price}({$extcredits[$creditstrans][title]}):</td>
<td class="altbg2">
<!--{if $thread['price'] == -1 || $thread['freecharge']}-->
<input type="text" name="price" size="6" value="$thread[pricedisplay]" disabled> <span class="smalltxt">{$extcredits[$creditstrans][unit]}
<!--{if $thread['price'] == -1}-->({lang post_price_refunded})<!--{else}-->({lang post_price_free})<!--{/if}-->
</span>
<!--{else}-->
<input type="text" name="price" size="6" value="$thread[pricedisplay]"> <span class="smalltxt">{$extcredits[$creditstrans][unit]} ({lang post_price_comment}<!--{if $maxincperthread}-->{lang post_price_income_comment}<!--{/if}--><!--{if $maxchargespan}-->{lang post_price_charge_comment}<!--{/if}-->)</span>
{lang post_price_free_comment}
<!--{/if}-->
</td></tr>
<!--{/if}-->
<!--{if $thread['special'] == 3 && $isfirstpost}-->
<tr>
<td class="altbg1">{lang reward_price}<!--{if !empty($extcredits[$creditstrans][title])}-->({$extcredits[$creditstrans][title]})<!--{/if}-->:</td>
<td class="altbg2">
<!--{if $thread['price'] > 0}-->
<input onkeyup="getrealprice(this.value)" type="text" name="rewardprice" size="6" value="$rewardprice">
{lang reward_tax_after}: <span id="realprice">0</span> {$extcredits[$creditstrans][unit]} ({lang reward_low} $minrewardprice {$extcredits[$creditstrans][unit]}<!--{if $maxrewardprice > 0}--> - $maxrewardprice {$extcredits[$creditstrans][unit]}<!--{/if}--></span>)
<!--{elseif $thread['price'] < 0 && $forum['ismoderator']}-->
<input type="text" name="rewardprice" size="6" value="$rewardprice">
<!--{else}-->
<input onkeyup="getrealprice(this.value)" type="hidden" name="rewardprice" size="6" value="$rewardprice">$rewardprice {$extcredits[$creditstrans][unit]}
<!--{/if}-->
</td>
</tr>
<!--{if $thread['price'] > 0}-->
<script type="text/javascript">
document.getElementById('realprice').innerHTML = 0;
function getrealprice(price){
if(!price.search(/^\d+$/) ) {
n = Math.ceil((price - $thread['price']) * ( 1 + $creditstax));
if(price < $rewardprice) {
document.getElementById('realprice').innerHTML = '<b>{lang reward_cant_fall}</b>';
}else if (price < $minrewardprice || ($maxrewardprice > 0 && price > $maxrewardprice)) {
document.getElementById('realprice').innerHTML = '<b>{lang reward_price_bound}</b>';
} else {
document.getElementById('realprice').innerHTML = n;
}
}else{
document.getElementById('realprice').innerHTML = '<b>{lang input_invalid}</b>';
}
}
</script>
<!--{/if}-->
<!--{/if}-->
<tr>
<td class="altbg1" width="20%"><!--{if isset($activity) && $allowpostactivity}-->{lang activity_name}:<!--{else}-->{lang subject}:<!--{/if}--></td>
<td class="altbg2">
<!--{if $isfirstpost}-->$typeselect<!--{/if}-->
<!--{if $thread['special'] == 3 && !$forum['ismoderator'] && $isfirstpost && $thread['replies'] > 0}-->
<input type="hidden" name="subject" id="subject" size="45" value="$postinfo[subject]" tabindex="3">$postinfo[subject]
<!--{else}-->
<input type="text" name="subject" id="subject" size="45" value="$postinfo[subject]" tabindex="3">
<!--{/if}-->
<input type="hidden" name="origsubject" value="$postinfo[subject]">
</td></tr>
<!--{if $thread['special'] == 1 && $isfirstpost && ($alloweditpoll || $thread['authorid'] == $discuz_uid)}-->
<input type="hidden" name="polls" value="yes">
<tr><td class="altbg1">{lang poll_days_valid}:</td><td class="altbg2"><input type="text" name="expiration" value="<!--{if !$poll[expiration]}-->0<!--{elseif $poll[expiration] < 0}-->{lang poll_close}<!--{elseif $poll[expiration] < $timestamp}-->{lang poll_finish}<!--{else}{eval print_r(round(($poll[expiration] - $timestamp) / 86400))} {/if}-->" size="6" tabindex="4"> <span class="smalltxt">({lang post_zero_is_nopermission})</span></td></tr>
<tr>
<td class="altbg1" valign="top">{lang post_poll_options}:<br>
{lang post_poll_comment} $maxpolloptions<br><br>
<input type="checkbox" name="visibilitypoll" value="1" <!--{if !$poll[visible]}-->checked<!--{/if}-->> {lang poll_submit_after}<br>
<input type="checkbox" name="multiplepoll" value="1" <!--{if $poll[multiple]}-->checked<!--{/if}--> onclick="this.checked?findobj('maxchoicescontrol').style.display='':findobj('maxchoicescontrol').style.display='none';"> {lang post_poll_allowmultiple}<br>
<!--{if !$poll[expiration] || $poll[expiration] > $timestamp}--><input type="checkbox" name="close" value="1"> {lang poll_close}<br><!--{/if}-->
<span id="maxchoicescontrol"<!--{if !$poll[multiple]}-->style="display: none"<!--{/if}-->>{lang poll_max_options}: <input type="text" name="maxchoices" value="$poll[maxchoices]" size="5"><br>
</span></td><td class="altbg2">
{lang poll_show_order} <a id="addpolloptlink" href="###" onclick="addpollopt()">[{lang poll_option_add}]</a><br>
<!--{loop $poll['polloption'] $key $option}-->
<input type="hidden" name="polloptionid[{$poll[polloptionid][$key]}]" value="$poll[polloptionid][$key]">
<input type="text" name="displayorder[{$poll[polloptionid][$key]}]" value="$poll[displayorder][$key]" size="5" style="text-align:right"> <input type="text" name="polloption[{$poll[polloptionid][$key]}]" value="$option" size="55"<!--{if !$alloweditpoll}--> readonly<!--{/if}-->><br>
<!--{/loop}-->
<span id="addpolloptindex"></span>
</td></tr>
<script type="text/javascript">
var max = $key + 1;
var polloptionid = $poll[polloptionid][$key] + 1;
function addpollopt() {
if(max < $maxpolloptions) {
max++;
var optrow='<input type="hidden" name="polloptionid['+ polloptionid +']" value='+ polloptionid +'><input type="text" name="displayorder['+ polloptionid +']" value="" size="5" style="text-align:right"> <input type="text" name="polloption['+ polloptionid +']" value="" size="55"><br>';
findobj("addpolloptindex").innerHTML = findobj("addpolloptindex").innerHTML + optrow;
polloptionid++;
if(max == $maxpolloptions) {
findobj("addpolloptlink").disabled=true;
}
}
}
</script>
<!--{/if}-->
<!--{if $thread['special'] == 2 && $allowposttrade && $isfirstpost}-->
<input type="hidden" name="trade" value="yes">
<tr>
<td class="altbg1">{lang post_trade_seller}:</td>
<td class="altbg2"><input type="text" name="seller" size="30" value="$trade[account]"></td>
</tr>
<tr>
<td class="altbg1">{lang post_trade_name}:</td>
<td class="altbg2"><input type="text" name="item_name" size="30" value="$trade[subject]"></td>
</tr>
<tr>
<td class="altbg1">{lang post_trade_price}:</td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -