3_3_forum_post.tpl.php 112 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278
  1. <?php if(!defined('IN_DISCUZ')) exit('Access Denied'); hookscriptoutput('post');
  2. 0
  3. || checktplrefresh('./template/default/forum/post.htm', './template/default/forum/post_editor_extra.htm', 1524717412, '3', './data/template/3_3_forum_post.tpl.php', './template/wfdsoft_jiaohu', 'forum/post')
  4. || checktplrefresh('./template/default/forum/post.htm', './template/default/forum/post_editor_body.htm', 1524717412, '3', './data/template/3_3_forum_post.tpl.php', './template/wfdsoft_jiaohu', 'forum/post')
  5. || checktplrefresh('./template/default/forum/post.htm', './template/default/forum/post_editor_attribute.htm', 1524717412, '3', './data/template/3_3_forum_post.tpl.php', './template/wfdsoft_jiaohu', 'forum/post')
  6. || checktplrefresh('./template/default/forum/post.htm', './template/default/forum/seccheck_post.htm', 1524717412, '3', './data/template/3_3_forum_post.tpl.php', './template/wfdsoft_jiaohu', 'forum/post')
  7. || checktplrefresh('./template/default/forum/post.htm', './template/default/common/editor_menu.htm', 1524717412, '3', './data/template/3_3_forum_post.tpl.php', './template/wfdsoft_jiaohu', 'forum/post')
  8. || checktplrefresh('./template/default/forum/post.htm', './template/default/forum/editor_menu_forum.htm', 1524717412, '3', './data/template/3_3_forum_post.tpl.php', './template/wfdsoft_jiaohu', 'forum/post')
  9. || checktplrefresh('./template/default/forum/post.htm', './template/default/common/upload.htm', 1524717412, '3', './data/template/3_3_forum_post.tpl.php', './template/wfdsoft_jiaohu', 'forum/post')
  10. || checktplrefresh('./template/default/forum/post.htm', './template/default/common/editor.htm', 1524717412, '3', './data/template/3_3_forum_post.tpl.php', './template/wfdsoft_jiaohu', 'forum/post')
  11. || checktplrefresh('./template/default/forum/post.htm', './template/default/common/seccheck.htm', 1524717412, '3', './data/template/3_3_forum_post.tpl.php', './template/wfdsoft_jiaohu', 'forum/post')
  12. || checktplrefresh('./template/default/forum/post.htm', './template/default/forum/post_attachlimit.htm', 1524717412, '3', './data/template/3_3_forum_post.tpl.php', './template/wfdsoft_jiaohu', 'forum/post')
  13. || checktplrefresh('./template/default/forum/post.htm', './template/default/forum/post_attachlimit.htm', 1524717412, '3', './data/template/3_3_forum_post.tpl.php', './template/wfdsoft_jiaohu', 'forum/post')
  14. || checktplrefresh('./template/default/forum/post.htm', './template/default/forum/post_attachlimit.htm', 1524717412, '3', './data/template/3_3_forum_post.tpl.php', './template/wfdsoft_jiaohu', 'forum/post')
  15. || checktplrefresh('./template/default/forum/post.htm', './template/default/forum/post_attachlimit.htm', 1524717412, '3', './data/template/3_3_forum_post.tpl.php', './template/wfdsoft_jiaohu', 'forum/post')
  16. ;?><?php include template('common/header'); ?><script type="text/javascript">
  17. var allowpostattach = parseInt('<?php echo $_G['group']['allowpostattach'];?>');
  18. var allowpostimg = parseInt('<?php echo $allowpostimg;?>');
  19. var pid = parseInt('<?php echo $pid;?>');
  20. var tid = parseInt('<?php echo $_G['tid'];?>');
  21. var extensions = '<?php echo $_G['group']['attachextensions'];?>';
  22. var imgexts = '<?php echo $imgexts;?>';
  23. var postminchars = parseInt('<?php echo $_G['setting']['minpostsize'];?>');
  24. var postmaxchars = parseInt('<?php echo $_G['setting']['maxpostsize'];?>');
  25. var disablepostctrl = parseInt('<?php echo $_G['group']['disablepostctrl'];?>');
  26. var seccodecheck = parseInt('<?php if($seccodecheck) { ?>1<?php } else { ?>0<?php } ?>');
  27. var secqaacheck = parseInt('<?php if($secqaacheck) { ?>1<?php } else { ?>0<?php } ?>');
  28. var typerequired = parseInt('<?php echo $_G['forum']['threadtypes']['required'];?>');
  29. var sortrequired = parseInt('<?php echo $_G['forum']['threadsorts']['required'];?>');
  30. var special = parseInt('<?php echo $special;?>');
  31. var isfirstpost = <?php if($isfirstpost) { ?>1<?php } else { ?>0<?php } ?>;
  32. var allowposttrade = parseInt('<?php echo $_G['group']['allowposttrade'];?>');
  33. var allowpostreward = parseInt('<?php echo $_G['group']['allowpostreward'];?>');
  34. var allowpostactivity = parseInt('<?php echo $_G['group']['allowpostactivity'];?>');
  35. var sortid = parseInt('<?php echo $sortid;?>');
  36. var special = parseInt('<?php echo $special;?>');
  37. var fid = <?php echo $_G['fid'];?>;
  38. var postaction = '<?php echo $_GET['action'];?>';
  39. var ispicstyleforum = <?php if($_G['forum']['picstyle']) { ?>1<?php } else { ?>0<?php } ?>;
  40. </script>
  41. <?php if($_GET['action'] == 'edit') { $editor[value] = $postinfo[message];?><?php } else { $editor[value] = $message;?><?php } ?>
  42. <script src="<?php echo $_G['setting']['jspath'];?>forum_post.js?<?php echo VERHASH;?>" type="text/javascript"></script>
  43. <?php if($isfirstpost && $sortid) { ?>
  44. <script type="text/javascript">
  45. var forum_optionlist = <?php if($forum_optionlist) { ?>'<?php echo $forum_optionlist;?>'<?php } else { ?>''<?php } ?>;
  46. </script>
  47. <script src="<?php echo $_G['setting']['jspath'];?>threadsort.js?<?php echo VERHASH;?>" type="text/javascript"></script>
  48. <?php } ?><?php
  49. $actiontitle = <<<EOF
  50. EOF;
  51. if($_GET['action'] == 'newthread') { if($special == 0) {
  52. $actiontitle .= <<<EOF
  53. 发表帖子
  54. EOF;
  55. } elseif($special == 1) {
  56. $actiontitle .= <<<EOF
  57. 发起投票
  58. EOF;
  59. } elseif($special == 2) {
  60. $actiontitle .= <<<EOF
  61. 出售商品
  62. EOF;
  63. } elseif($special == 3) {
  64. $actiontitle .= <<<EOF
  65. 发布悬赏
  66. EOF;
  67. } elseif($special == 4) {
  68. $actiontitle .= <<<EOF
  69. 发起活动
  70. EOF;
  71. } elseif($special == 5) {
  72. $actiontitle .= <<<EOF
  73. 发起辩论
  74. EOF;
  75. } elseif($specialextra) {
  76. $actiontitle .= <<<EOF
  77. {$_G['setting']['threadplugins'][$specialextra]['name']}
  78. EOF;
  79. } } elseif($_GET['action'] == 'reply' && !empty($_GET['addtrade'])) {
  80. $actiontitle .= <<<EOF
  81. 添加商品
  82. EOF;
  83. } elseif($_GET['action'] == 'reply') {
  84. $actiontitle .= <<<EOF
  85. 参与/回复主题
  86. EOF;
  87. } elseif($_GET['action'] == 'edit') { if($special == 2) {
  88. $actiontitle .= <<<EOF
  89. 编辑商品
  90. EOF;
  91. } else {
  92. $actiontitle .= <<<EOF
  93. 编辑帖子
  94. EOF;
  95. } }
  96. $actiontitle .= <<<EOF
  97. EOF;
  98. ?><?php
  99. $icon = <<<EOF
  100. EOF;
  101. if($special == 1) {
  102. $icon .= <<<EOF
  103. poll
  104. EOF;
  105. } elseif($special == 2) {
  106. $icon .= <<<EOF
  107. trade
  108. EOF;
  109. } elseif($special == 3) {
  110. $icon .= <<<EOF
  111. reward
  112. EOF;
  113. } elseif($special == 4) {
  114. $icon .= <<<EOF
  115. activity
  116. EOF;
  117. } elseif($special == 5) {
  118. $icon .= <<<EOF
  119. debate
  120. EOF;
  121. } elseif($isfirstpost && $sortid) {
  122. $icon .= <<<EOF
  123. sort
  124. EOF;
  125. }
  126. $icon .= <<<EOF
  127. EOF;
  128. ?>
  129. <?php if($_GET['action'] != 'newthread') { $subjectcut = cutstr($thread[subject], 30);?><?php } ?><?php
  130. $actionsubject = <<<EOF
  131. EOF;
  132. if($_GET['action'] == 'reply') {
  133. $actionsubject .= <<<EOF
  134. <em>&rsaquo;</em><a href="forum.php?mod=viewthread&amp;tid={$thread['tid']}">{$subjectcut}</a>
  135. EOF;
  136. } elseif($_GET['action'] == 'edit') {
  137. $actionsubject .= <<<EOF
  138. <em>&rsaquo;</em><a href="forum.php?mod=redirect&amp;goto=findpost&amp;ptid={$thread['tid']}&amp;pid={$pid}">{$subjectcut}</a>
  139. EOF;
  140. }
  141. $actionsubject .= <<<EOF
  142. EOF;
  143. ?>
  144. <div id="pt" class="bm cl">
  145. <div class="z"><a href="./" class="nvhm" title="首页"><?php echo $_G['setting']['bbname'];?></a> <?php echo $navigation;?><?php echo $actionsubject;?> <em>&rsaquo;</em> <?php echo $actiontitle;?></div>
  146. </div><?php $adveditor = $isfirstpost && $special || $special == 2 && ($_GET['action'] == 'newthread' || $_GET['action'] == 'reply' && !empty($_GET['addtrade']) || $_GET['action'] == 'edit' && $thread['special'] == 2);?><?php $advmore = !$showthreadsorts && !$special || $_GET['action'] == 'reply' && empty($_GET['addtrade']) || $_GET['action'] == 'edit' && !$isfirstpost && ($thread['special'] == 2 && !$special || $thread['special'] != 2);?><form method="post" autocomplete="off" id="postform"
  147. <?php if($_GET['action'] == 'newthread') { ?>action="forum.php?mod=post&amp;action=<?php if($special != 2) { ?>newthread<?php } else { ?>newtrade<?php } ?>&amp;fid=<?php echo $_G['fid'];?>&amp;extra=<?php echo $extra;?>&amp;topicsubmit=yes"
  148. <?php } elseif($_GET['action'] == 'reply') { ?>action="forum.php?mod=post&amp;action=reply&amp;fid=<?php echo $_G['fid'];?>&amp;tid=<?php echo $_G['tid'];?>&amp;extra=<?php echo $extra;?>&amp;replysubmit=yes"
  149. <?php } elseif($_GET['action'] == 'edit') { ?>action="forum.php?mod=post&amp;action=edit&amp;extra=<?php echo $extra;?>&amp;editsubmit=yes" <?php echo $enctype;?>
  150. <?php } ?>
  151. onsubmit="return validate(this)">
  152. <div id="ct" class="ct2_a ct2_a_r wp cl">
  153. <input type="hidden" name="formhash" id="formhash" value="<?php echo FORMHASH;?>" />
  154. <input type="hidden" name="posttime" id="posttime" value="<?php echo TIMESTAMP;?>" />
  155. <?php if($_GET['action'] == 'edit') { ?>
  156. <input type="hidden" name="delattachop" id="delattachop" value="0" />
  157. <?php } if(!empty($_GET['modthreadkey'])) { ?><input type="hidden" name="modthreadkey" id="modthreadkey" value="<?php echo $_GET['modthreadkey'];?>" /><?php } ?>
  158. <input type="hidden" name="wysiwyg" id="<?php echo $editorid;?>_mode" value="<?php echo $editormode;?>" />
  159. <?php if($_GET['action'] == 'reply') { ?>
  160. <input type="hidden" name="noticeauthor" value="<?php echo $noticeauthor;?>" />
  161. <input type="hidden" name="noticetrimstr" value="<?php echo $noticetrimstr;?>" />
  162. <input type="hidden" name="noticeauthormsg" value="<?php echo $noticeauthormsg;?>" />
  163. <?php if($reppid) { ?>
  164. <input type="hidden" name="reppid" value="<?php echo $reppid;?>" />
  165. <?php } if($_GET['reppost']) { ?>
  166. <input type="hidden" name="reppost" value="<?php echo $_GET['reppost'];?>" />
  167. <?php } elseif($_GET['repquote']) { ?>
  168. <input type="hidden" name="reppost" value="<?php echo $_GET['repquote'];?>" />
  169. <?php } } if($_GET['action'] == 'edit') { ?>
  170. <input type="hidden" name="fid" id="fid" value="<?php echo $_G['fid'];?>" />
  171. <input type="hidden" name="tid" value="<?php echo $_G['tid'];?>" />
  172. <input type="hidden" name="pid" value="<?php echo $pid;?>" />
  173. <input type="hidden" name="page" value="<?php echo $_GET['page'];?>" />
  174. <?php } if($special) { ?>
  175. <input type="hidden" name="special" value="<?php echo $special;?>" />
  176. <?php } if($specialextra) { ?>
  177. <input type="hidden" name="specialextra" value="<?php echo $specialextra;?>" />
  178. <?php } ?>
  179. <div class="bm bw0 cl"<?php if(!$showthreadsorts && !$adveditor) { ?> id="editorbox"<?php } ?>>
  180. <?php if($_GET['action'] == 'newthread') { ?>
  181. <ul class="tb cl mbw">
  182. <?php if($savecount) { ?>
  183. <li class="y"><a id="draftlist" href="javascript:;" class="xi2" onmouseover="showMenu({'ctrlid':'draftlist','ctrlclass':'a','duration':2,'pos':'34'})">草稿箱(<strong><?php echo $savecount;?></strong>)</a></li>
  184. <?php } if(!$_G['forum']['threadsorts']['required'] && !$_G['forum']['allowspecialonly']) { ?><li<?php echo $postspecialcheck['0'];?>><a href="javascript:;" onclick="switchpost('forum.php?mod=post&action=newthread')">发表帖子</a></li><?php } if(is_array($_G['forum']['threadsorts']['types'])) foreach($_G['forum']['threadsorts']['types'] as $tsortid => $name) { ?><li<?php if($sortid == $tsortid) { ?> class="a"<?php } ?>><a href="javascript:;" onclick="switchpost('forum.php?mod=post&action=newthread&sortid=<?php echo $tsortid;?>')"><?php echo strip_tags($name);; ?></a></li>
  185. <?php } if($_G['group']['allowpostpoll']) { ?><li<?php echo $postspecialcheck['1'];?>><a href="javascript:;" onclick="switchpost('forum.php?mod=post&action=newthread&special=1')">发起投票</a></li><?php } if($_G['group']['allowpostreward']) { ?><li<?php echo $postspecialcheck['3'];?>><a href="javascript:;" onclick="switchpost('forum.php?mod=post&action=newthread&special=3')">发布悬赏</a></li><?php } if($_G['group']['allowpostdebate']) { ?><li<?php echo $postspecialcheck['5'];?>><a href="javascript:;" onclick="switchpost('forum.php?mod=post&action=newthread&special=5')">发起辩论</a></li><?php } if($_G['group']['allowpostactivity']) { ?><li<?php echo $postspecialcheck['4'];?>><a href="javascript:;" onclick="switchpost('forum.php?mod=post&action=newthread&special=4')">发起活动</a></li><?php } if($_G['group']['allowposttrade']) { ?><li<?php echo $postspecialcheck['2'];?>><a href="javascript:;" onclick="switchpost('forum.php?mod=post&action=newthread&special=2')">出售商品</a></li><?php } if($_G['setting']['threadplugins']) { if(is_array($_G['forum']['threadplugin'])) foreach($_G['forum']['threadplugin'] as $tpid) { if(array_key_exists($tpid, $_G['setting']['threadplugins']) && @in_array($tpid, $_G['group']['allowthreadplugin'])) { ?>
  186. <li<?php if($specialextra==$tpid) { ?> class="a"<?php } ?>><a href="javascript:;" onclick="switchpost('forum.php?mod=post&action=newthread&specialextra=<?php echo $tpid;?>')"><?php echo $_G['setting']['threadplugins'][$tpid]['name'];?></a></li>
  187. <?php } } } ?>
  188. </ul>
  189. <div id="draftlist_menu" style="display:none">
  190. <ul class="xl xl1">
  191. <?php if($savethreads) { if(is_array($savethreads)) foreach($savethreads as $savethread) { ?><li>
  192. <label>[<a href="javascript:;" title="引用" onclick="insertsave(<?php echo $savethread['pid'];?>)">引用</a>]</label>
  193. <a href="forum.php?mod=post&amp;action=edit&amp;fid=<?php echo $savethread['fid'];?>&amp;tid=<?php echo $savethread['tid'];?>&amp;pid=<?php echo $savethread['pid'];?>" class="xi2" target="_blank"><?php echo $savethread['subject'];?></a>
  194. <span class="xg1"><?php echo $savethread['dateline'];?></span>
  195. </li>
  196. <?php } } if($savethreadothers) { if(is_array($savethreadothers)) foreach($savethreadothers as $savethread) { ?><li>
  197. <label>[<a href="javascript:;" title="引用" onclick="insertsave(<?php echo $savethread['pid'];?>)">引用</a>]</label>
  198. <a href="forum.php?mod=post&amp;action=edit&amp;fid=<?php echo $savethread['fid'];?>&amp;tid=<?php echo $savethread['tid'];?>&amp;pid=<?php echo $savethread['pid'];?>" class="xi2" target="_blank"><?php echo $savethread['subject'];?></a>
  199. <span class="xg1"><?php echo $savethread['dateline'];?></span>
  200. </li>
  201. <?php } } ?>
  202. <li class="xi2"><a href="forum.php?mod=guide&amp;view=my&amp;type=thread&amp;filter=save&amp;fid=0" target="_blank">查看所有草稿</a></li>
  203. </ul>
  204. </div>
  205. <?php } elseif($_GET['action'] == 'edit' && $isfirstpost && !$thread['sortid']) { ?>
  206. <ul class="tb cl mbw">
  207. <li<?php if(!$sortid) { ?> class="a"<?php } ?>><a href="javascript:;" onclick="switchpost('forum.php?mod=post&action=edit&tid=<?php echo $_G['tid'];?>&pid=<?php echo $pid;?>')"><?php echo $actiontitle;?></a></li>
  208. <?php if($_GET['action'] == 'edit' && $isfirstpost && !$thread['sortid']) { if(is_array($_G['forum']['threadsorts']['types'])) foreach($_G['forum']['threadsorts']['types'] as $tsortid => $name) { ?><li<?php if($sortid == $tsortid) { ?> class="a"<?php } ?>><a href="javascript:;" onclick="switchpost('forum.php?mod=post&action=edit&tid=<?php echo $_G['tid'];?>&pid=<?php echo $pid;?>&sortid=<?php echo $tsortid;?>')"><?php echo strip_tags($name);; ?></a></li>
  209. <?php } } ?>
  210. </ul>
  211. <?php } ?>
  212. <div id="postbox">
  213. <?php if($_GET['action'] == 'newthread' && $_G['setting']['sitemessage']['newthread'] || $_GET['action'] == 'reply' && $_G['setting']['sitemessage']['reply']) { ?>
  214. <span id="custominfo" class="y cur1<?php if($_GET['action'] != 'reply') { ?> mtn<?php } ?>">&nbsp;<img src="<?php echo IMGDIR;?>/info_small.gif" alt="帮助" /></span>
  215. <?php } ?>
  216. <?php if(!empty($_G['setting']['pluginhooks']['post_top'])) echo $_G['setting']['pluginhooks']['post_top'];?><div class="pbt cl">
  217. <?php if($sortid) { ?>
  218. <input type="hidden" name="sortid" value="<?php echo $sortid;?>" />
  219. <?php } if($isfirstpost && !empty($_G['forum']['threadtypes']['types'])) { ?>
  220. <div class="ftid">
  221. <?php if($_G['forum']['ismoderator'] || empty($_G['forum']['threadtypes']['moderators'][$thread['typeid']])) { ?>
  222. <select name="typeid" id="typeid" width="80">
  223. <option value="0">选择主题分类</option><?php if(is_array($_G['forum']['threadtypes']['types'])) foreach($_G['forum']['threadtypes']['types'] as $typeid => $name) { if(empty($_G['forum']['threadtypes']['moderators'][$typeid]) || $_G['forum']['ismoderator']) { ?>
  224. <option value="<?php echo $typeid;?>"<?php if($thread['typeid'] == $typeid || $_GET['typeid'] == $typeid) { ?> selected="selected"<?php } ?>><?php echo strip_tags($name);; ?></option>
  225. <?php } } ?>
  226. </select>
  227. <?php } else { ?>
  228. [<?php echo strip_tags($_G['forum']['threadtypes']['types'][$thread['typeid']]);; ?>]
  229. <?php } ?>
  230. </div>
  231. <?php } ?>
  232. <div class="z">
  233. <?php if($_GET['action'] == 'reply' && !empty($_GET['addtrade']) || $_GET['action'] == 'edit' && $thread['special'] == 2 && !$postinfo['first']) { ?>
  234. <input name="subject" type="hidden" value="" />
  235. <?php } else { if($_GET['action'] != 'reply') { ?>
  236. <span><input type="text" name="subject" id="subject" class="px" value="<?php echo $postinfo['subject'];?>" <?php if($_GET['action'] == 'newthread') { ?>onblur="if($('tags')){relatekw('-1','-1'<?php if($_G['group']['allowposttag']) { ?>,function(){extraCheck(4)}<?php } ?>);doane();}"<?php } ?> onkeyup="strLenCalc(this, 'checklen', 80);" style="width: 25em" tabindex="1" /></span>
  237. <?php } else { ?>
  238. <span id="subjecthide" class="z">RE: <?php echo $thread['subject'];?> [<a href="javascript:;" onclick="display('subjecthide');display('subjectbox');$('subject').value='RE: <?php echo dhtmlspecialchars(str_replace('\'', '\\\'', $thread['subject'])); ?>';display('subjectchk');strLenCalc($('subject'), 'checklen', 80);return false;">修改</a>]</span>
  239. <span id="subjectbox" style="display:none"><input type="text" name="subject" id="subject" class="px" value="" onkeyup="strLenCalc(this, 'checklen', 80);" style="width: 25em" /></span>
  240. <?php } ?>
  241. <span id="subjectchk"<?php if($_GET['action'] == 'reply') { ?> style="display:none"<?php } ?>>还可输入 <strong id="checklen">80</strong> 个字符</span>
  242. <script type="text/javascript">strLenCalc($('subject'), 'checklen', 80)</script>
  243. <?php } if($_GET['action'] == 'newthread' && $modnewthreads) { ?> <span class="xg1 xw0">(需审核)</span><?php } if($_GET['action'] == 'reply' && $modnewreplies) { ?> <span class="xg1 xw0">(需审核)</span><?php } if($_GET['action'] == 'edit' && $isfirstpost && $thread['displayorder'] == -4) { ?> <span class="xg1 xw0">(草稿)</span><?php } ?>
  244. </div>
  245. </div>
  246. <?php if(!$isfirstpost && $thread['special'] == 5 && empty($firststand) && $_GET['action'] != 'edit') { ?>
  247. <div class="pbt cl">
  248. <div class="ftid">
  249. <select name="stand" id="stand">
  250. <option value="">选择观点</option>
  251. <option value="0">中立</option>
  252. <option value="1"<?php if($stand == 1) { ?> selected="selected"<?php } ?>>正方</option>
  253. <option value="2"<?php if($stand == 2) { ?> selected="selected"<?php } ?>>反方</option>
  254. </select>
  255. </div>
  256. </div>
  257. <?php } ?>
  258. <div id="attachnotice_attach" class="tbms mbm xl" style="display:none">
  259. 您有 <span id="unusednum_attach"></span> 个未使用的附件 &nbsp; <a href="javascript:;" class="xi2" onclick="attachoption('attach', 2);" />查看</a><span class="pipe">|</span><a href="javascript:;" class="xi2" onclick="attachoption('attach', 1)">使用</a><span class="pipe">|</span><a href="javascript:;" class="xi2" onclick="attachoption('attach', 0)">删除</a>
  260. <div id="unusedlist_attach" style="display:none"></div>
  261. </div>
  262. <div id="attachnotice_img" class="tbms mbm xl" style="display:none">
  263. 您有 <span id="unusednum_img"></span> 个未使用的图片 &nbsp; <a href="javascript:;" class="xi2" onclick="attachoption('img', 2);" />查看</a><span class="pipe">|</span><a href="javascript:;" class="xi2" onclick="attachoption('img', 1)">使用</a><span class="pipe">|</span><a href="javascript:;" class="xi2" onclick="attachoption('img', 0)">删除</a>
  264. <div id="unusedlist_img" style="display:none"></div>
  265. </div>
  266. <?php if($showthreadsorts) { ?>
  267. <div class="exfm cl"><?php include template('forum/post_sortoption'); ?></div>
  268. <?php } elseif($adveditor) { if($special == 1) { include template('forum/post_poll'); } elseif($special == 2 && ($_GET['action'] != 'edit' || ($_GET['action'] == 'edit' && ($thread['authorid'] == $_G['uid'] && $_G['group']['allowposttrade'] || $_G['group']['allowedittrade'])))) { ?><p class="xg1">添加商品信息,完成后可在本帖中继续添加多个商品</p><?php include template('forum/post_trade'); } elseif($special == 3) { include template('forum/post_reward'); } elseif($special == 4) { include template('forum/post_activity'); } elseif($special == 5) { include template('forum/post_debate'); } elseif($specialextra) { ?><div class="specialpost s_clear"><?php echo $threadplughtml;?></div>
  269. <?php } } if($_GET['action'] == 'reply' && $quotemessage) { ?>
  270. <div class="pbt cl"><?php echo $quotemessage;?></div>
  271. <?php } ?><div id="<?php echo $editorid;?>_body_loading"><img src="<?php echo IMGDIR;?>/loading.gif" width="16" height="16" class="vm" /> 请稍后 ...</div>
  272. <div class="edt" id="<?php echo $editorid;?>_body" style="display: none">
  273. <div id="<?php echo $editorid;?>_controls" class="bar">
  274. <div class="y">
  275. <div class="b2r nbl nbr" id="<?php echo $editorid;?>_adv_5">
  276. <p>
  277. <a id="<?php echo $editorid;?>_undo" title="撤销">Undo</a>
  278. </p>
  279. <p>
  280. <a id="<?php echo $editorid;?>_redo" title="重做">Redo</a>
  281. </p>
  282. </div>
  283. <div class="z">
  284. <span class="mbn"><a id="<?php echo $editorid;?>_fullswitcher"></a><a id="<?php echo $editorid;?>_simple"></a></span>
  285. <label id="<?php echo $editorid;?>_switcher" class="bar_swch ptn"><input id="<?php echo $editorid;?>_switchercheck" type="checkbox" class="pc" name="checkbox" value="0" <?php if(!$editor['editormode']) { ?>checked="checked"<?php } ?> onclick="switchEditor(this.checked?0:1)" />纯文本</label>
  286. </div>
  287. </div>
  288. <?php if(!empty($_G['setting']['pluginhooks']['post_editorctrl_right'])) { ?>
  289. <div class="y"><?php if(!empty($_G['setting']['pluginhooks']['post_editorctrl_right'])) echo $_G['setting']['pluginhooks']['post_editorctrl_right'];?></div>
  290. <?php } ?>
  291. <div id="<?php echo $editorid;?>_button" class="btn cl">
  292. <div class="b2r nbr nbl" id="<?php echo $editorid;?>_adv_s2">
  293. <a id="<?php echo $editorid;?>_fontname" class="dp" title="设置字体" menupos="43!"><span id="<?php echo $editorid;?>_font">字体</span></a>
  294. <a id="<?php echo $editorid;?>_fontsize" class="dp" title="设置文字大小" menupos="43!" menuwidth="25"><span id="<?php echo $editorid;?>_size">大小</span></a>
  295. <span id="<?php echo $editorid;?>_adv_1">
  296. <a id="<?php echo $editorid;?>_inserthorizontalrule" title="分隔线">Hr</a>
  297. <br />
  298. </span>
  299. <a id="<?php echo $editorid;?>_bold" title="文字加粗">B</a>
  300. <a id="<?php echo $editorid;?>_italic" title="文字斜体">I</a>
  301. <a id="<?php echo $editorid;?>_underline" title="文字加下划线">U</a>
  302. <a id="<?php echo $editorid;?>_forecolor" title="设置文字颜色">Color</a>
  303. <a id="<?php echo $editorid;?>_backcolor" title="设置文字背景色">BgColor</a>
  304. <a id="<?php echo $editorid;?>_url" title="添加链接">Url</a>
  305. <span id="<?php echo $editorid;?>_adv_8">
  306. <a id="<?php echo $editorid;?>_unlink" title="移除链接">Unlink</a>
  307. </span>
  308. </div>
  309. <div class="b2r nbl" id="<?php echo $editorid;?>_adv_2">
  310. <p id="<?php echo $editorid;?>_adv_3">
  311. <a id="<?php echo $editorid;?>_tbl" title="添加表格">Table</a>
  312. </p>
  313. <p>
  314. <a id="<?php echo $editorid;?>_removeformat" title="清除文本格式">Removeformat</a>
  315. </p>
  316. </div>
  317. <div class="b2r">
  318. <p>
  319. <a id="<?php echo $editorid;?>_autotypeset" title="自动排版">Autotypeset</a>
  320. <a id="<?php echo $editorid;?>_justifyleft" title="居左">Left</a>
  321. <a id="<?php echo $editorid;?>_justifycenter" title="居中">Center</a>
  322. <a id="<?php echo $editorid;?>_justifyright" title="居右">Right</a>
  323. </p>
  324. <p id="<?php echo $editorid;?>_adv_4">
  325. <a id="<?php echo $editorid;?>_floatleft" title="左浮动">FloatLeft</a>
  326. <a id="<?php echo $editorid;?>_floatright" title="右浮动">FloatRight</a>
  327. <a id="<?php echo $editorid;?>_insertorderedlist" title="排序的列表">Orderedlist</a>
  328. <a id="<?php echo $editorid;?>_insertunorderedlist" title="未排序列表">Unorderedlist</a>
  329. </p>
  330. </div>
  331. <div class="b1r" id="<?php echo $editorid;?>_adv_s1">
  332. <a id="<?php echo $editorid;?>_sml" title="添加表情">表情</a>
  333. <div id="<?php echo $editorid;?>_imagen" style="display:none">!</div>
  334. <a id="<?php echo $editorid;?>_image" title="添加图片" menupos="00" menuwidth="600">图片</a>
  335. <?php if($_G['group']['allowpostattach']) { ?>
  336. <div id="<?php echo $editorid;?>_attachn" style="display:none">!</div>
  337. <a id="<?php echo $editorid;?>_attach" title="添加附件" menupos="00" menuwidth="600">附件</a>
  338. <?php } if($_G['forum']['allowmediacode'] && $_G['group']['allowmediacode']) { ?>
  339. <a id="<?php echo $editorid;?>_aud" title="添加音乐">音乐</a>
  340. <a id="<?php echo $editorid;?>_vid" title="添加视频">视频</a>
  341. <a id="<?php echo $editorid;?>_fls" title="添加 Flash">Flash</a>
  342. <?php } if(($_GET['action'] == 'newthread' || $_GET['action'] == 'reply' || $_GET['action'] == 'edit') && $_G['group']['allowat']) { ?>
  343. <a id="<?php echo $editorid;?>_at" title="@好友和关注的人" menupos="43" menuwidth="600">@朋友</a>
  344. <?php } ?>
  345. <?php if(!empty($_G['setting']['pluginhooks']['post_editorctrl_left'])) echo $_G['setting']['pluginhooks']['post_editorctrl_left'];?>
  346. </div>
  347. <div class="b2r esb" id="<?php echo $editorid;?>_adv_s3">
  348. <?php if(!empty($_G['setting']['pluginhooks']['post_editorctrl_top'])) echo $_G['setting']['pluginhooks']['post_editorctrl_top'];?>
  349. <a id="<?php echo $editorid;?>_quote" title="添加引用文字">引用</a>
  350. <a id="<?php echo $editorid;?>_code" title="添加代码文字">代码</a>
  351. <?php if($isfirstpost) { ?>
  352. <a id="<?php echo $editorid;?>_free" adv="1" title="添加免费信息">Free</a>
  353. <?php if($_G['group']['allowhidecode']) { ?><a id="<?php echo $editorid;?>_hide" adv="1" title="添加隐藏内容">Hide</a><?php } } ?>
  354. <a id="<?php echo $editorid;?>_pasteword" adv="1" title="从 Word 粘贴内容">Word 粘贴</a>
  355. <?php if($_G['group']['allowdownremoteimg']) { if(!($_G['setting']['magicstatus'] && !empty($_G['setting']['magics']['doodle']))) { } ?><a id="<?php echo $editorid;?>_downremoteimg" adv="1" title="下载远程图片">下载图片</a><?php } if($isfirstpost) { ?>
  356. <a id="<?php echo $editorid;?>_page" adv="1" title="分页">Page</a>
  357. <a id="<?php echo $editorid;?>_index" adv="1" title="目录">Index</a>
  358. <?php } if($_G['setting']['magicstatus'] && !empty($_G['setting']['magics']['doodle'])) { ?>
  359. <a id="a_magic_doodle" adv="1" href="home.php?mod=magic&amp;mid=doodle&amp;showid=comment_doodle&amp;target=<?php echo $editorid;?>_textarea&amp;from=forumeditor" class="cst" onclick="showWindow(this.id, this.href, 'get', 0)"><img src="<?php echo STATICURL;?>image/magic/doodle.small.gif" alt="doodle" title="<?php echo $_G['setting']['magics']['doodle'];?>" style="margin-top:2px" /></a>
  360. <?php } ?>
  361. <a id="<?php echo $editorid;?>_password" adv="1" title="帖子密码">Password</a>
  362. <a id="<?php echo $editorid;?>_postbg" adv="1" title="帖子背景">Background</a>
  363. <?php if($_G['group']['allowbegincode'] && $isfirstpost) { ?>
  364. <a id="<?php echo $editorid;?>_beginning" adv="1" title="添加起始动画" menupos="43" menuwidth="600">动画</a>
  365. <?php } if(is_array($_G['cache']['bbcodes_display'][$_G['groupid']])) foreach($_G['cache']['bbcodes_display'][$_G['groupid']] as $tag => $bbcode) { ?><a id="<?php echo $editorid;?>_cst<?php echo $bbcode['params'];?>_<?php echo $tag;?>" class="cst" title="<?php echo $bbcode['explanation'];?>"><img src="<?php echo STATICURL;?>image/common/<?php echo $bbcode['icon'];?>" title="<?php echo $bbcode['explanation'];?>" alt="<?php echo $tag;?>" /></a>
  366. <?php } ?>
  367. <?php if(!empty($_G['setting']['pluginhooks']['post_editorctrl_bottom'])) echo $_G['setting']['pluginhooks']['post_editorctrl_bottom'];?>
  368. </div>
  369. </div>
  370. </div>
  371. <div id="rstnotice" class="ntc_l bbs" style="display:none">
  372. <a href="javascript:;" title="清除内容" class="d y" onclick="userdataoption(0)">close</a>您有上次未提交成功的数据 <a class="xi2" href="javascript:;" onclick="userdataoption(1)"><strong>恢复数据</strong></a>
  373. </div>
  374. <div class="area">
  375. <textarea name="<?php echo $editor['textarea'];?>" id="<?php echo $editorid;?>_textarea" class="pt" rows="15" tabindex="2"><?php echo $editor['value'];?></textarea>
  376. </div><link rel="stylesheet" type="text/css" href='<?php echo $_G['setting']['csspath'];?><?php echo STYLEID;?>_editor.css?<?php echo VERHASH;?>' />
  377. <script src="<?php echo $_G['setting']['jspath'];?>editor.js?<?php echo VERHASH;?>" type="text/javascript"></script>
  378. <script src="<?php echo $_G['setting']['jspath'];?>bbcode.js?<?php echo VERHASH;?>" type="text/javascript"></script>
  379. <script type="text/javascript">
  380. var editorid = '<?php echo $editorid;?>';
  381. var textobj = $(editorid + '_textarea');
  382. var wysiwyg = (BROWSER.ie || BROWSER.firefox || (BROWSER.opera >= 9)) && parseInt('<?php echo $editor['editormode'];?>') == 1 ? 1 : 0;
  383. var allowswitcheditor = parseInt('<?php echo $editor['allowswitcheditor'];?>');
  384. var allowhtml = parseInt('<?php echo $editor['allowhtml'];?>');
  385. var allowsmilies = parseInt('<?php echo $editor['allowsmilies'];?>');
  386. var allowbbcode = parseInt('<?php echo $editor['allowbbcode'];?>');
  387. var allowimgcode = parseInt('<?php echo $editor['allowimgcode'];?>');
  388. var simplodemode = parseInt('<?php if($editor['simplemode'] > 0) { ?>1<?php } else { ?>0<?php } ?>');
  389. var fontoptions = new Array("宋体", "新宋体", "黑体", "微软雅黑", "Arial", "Verdana", "simsun", "Helvetica", "Trebuchet MS", "Tahoma", "Impact", "Times New Roman", "仿宋,仿宋_GB2312", "楷体,楷体_GB2312");
  390. var smcols = <?php echo $_G['setting']['smcols'];?>;
  391. var custombbcodes = new Array();
  392. <?php if($_G['cache']['bbcodes_display'][$_G['groupid']]) { if(is_array($_G['cache']['bbcodes_display'][$_G['groupid']])) foreach($_G['cache']['bbcodes_display'][$_G['groupid']] as $tag => $bbcode) { ?>custombbcodes["<?php echo $tag;?>"] = {'prompt' : '<?php echo $bbcode['prompt'];?>'};
  393. <?php } } ?>
  394. </script>
  395. <div id="<?php echo $editorid;?>_bbar" class="bbar">
  396. <em id="<?php echo $editorid;?>_tip"></em>
  397. <span id="<?php echo $editorid;?>_svdsecond"></span>
  398. <a href="javascript:;" onclick="discuzcode('svd');return false;" id="<?php echo $editorid;?>_svd">保存数据</a> |
  399. <a href="javascript:;" onclick="discuzcode('rst');return false;" id="<?php echo $editorid;?>_rst">恢复数据</a> &nbsp;&nbsp;
  400. <?php if($editor['allowchecklength']) { ?>
  401. <a href="javascript:;" onclick="discuzcode('chck');return false;" id="<?php echo $editorid;?>_chck">字数检查</a> |
  402. <?php } if($editor['allowtopicreset']) { ?>
  403. <a href="javascript:;" onclick="discuzcode('tpr');return false;" id="<?php echo $editorid;?>_tpr">清除内容</a> &nbsp;&nbsp;
  404. <?php } if($editor['allowresize']) { ?>
  405. <span id="<?php echo $editorid;?>_resize"><a href="javascript:;" onclick="editorsize('+');return false;">加大编辑框</a> | <a href="javascript:;" onclick="editorsize('-');return false;">缩小编辑框</a><img src="<?php echo STATICURL;?>image/editor/resize.gif" onmousedown="editorresize(event)" /></span>
  406. <?php } ?>
  407. </div></div>
  408. <?php if(!empty($_G['setting']['pluginhooks']['post_middle'])) echo $_G['setting']['pluginhooks']['post_middle'];?><div id="post_extra" class="ptm cl">
  409. <div id="post_extra_tb" class="cl" onselectstart="return false">
  410. <label id="extra_additional_b" onclick="showExtra('extra_additional')"><span id="extra_additional_chk">附加选项</span></label>
  411. <?php if($_GET['action'] == 'newthread' || $_GET['action'] == 'edit' && $isfirstpost) { if($_G['group']['allowsetreadperm']) { ?>
  412. <label id="extra_readperm_b" onclick="showExtra('extra_readperm')"><span id="extra_readperm_chk">阅读权限</span></label>
  413. <?php } if($_G['group']['allowreplycredit'] && !in_array($special, array(2, 3))) { if($_GET['action'] == 'newthread') { $extcreditstype = $_G['setting']['creditstransextra'][10];?><?php } else { $extcreditstype = $replycredit_rule['extcreditstype'] ? $replycredit_rule['extcreditstype'] : $_G['setting']['creditstransextra'][10];?><?php } $userextcredit = getuserprofile('extcredits'.$extcreditstype);?><?php if(($_GET['action'] == 'newthread' && $userextcredit > 0) || ($_GET['action'] == 'edit' && $isorigauthor && isfirstpost)) { ?>
  414. <label id="extra_replycredit_b" onclick="showExtra('extra_replycredit')"><span id="extra_replycredit_chk">回帖奖励</span></label>
  415. <?php } } if(($_GET['action'] == 'newthread' && $_G['group']['allowpostrushreply'] && $special != 2) || ($_GET['action'] == 'edit' && getstatus($thread['status'], 3))) { ?>
  416. <label id="extra_rushreplyset_b" onclick="showExtra('extra_rushreplyset')"><span id="extra_rushreplyset_chk">抢楼主题</span></label>
  417. <?php } if($_G['group']['maxprice'] && !$special) { ?>
  418. <label id="extra_price_b" onclick="showExtra('extra_price')"><span id="extra_price_chk">主题售价</span></label>
  419. <?php } if($_G['group']['allowposttag']) { ?>
  420. <label id="extra_tag_b" onclick="showExtra('extra_tag')"><span id="extra_tag_chk">主题标签</span></label>
  421. <?php } if($_G['group']['allowsetpublishdate'] && ($_GET['action'] == 'newthread' || ($_GET['action'] == 'edit' && $isfirstpost && $thread['displayorder'] == -4))) { ?>
  422. <label id="extra_pubdate_b" onclick="showExtra('extra_pubdate')"><span id="extra_pubdate_chk">定时发布</span></label>
  423. <?php } } ?>
  424. <?php if(!empty($_G['setting']['pluginhooks']['post_attribute_extra'])) echo $_G['setting']['pluginhooks']['post_attribute_extra'];?>
  425. </div>
  426. <div id="post_extra_c">
  427. <?php if($_GET['action'] == 'newthread' || $_GET['action'] == 'edit' && $isfirstpost) { if(!empty($userextcredit)) { ?>
  428. <div id="extra_replycredit_c" class="exfm cl" style="display: none;">
  429. <div><label>每次回帖奖励: <input type="text" name="replycredit_extcredits" id="replycredit_extcredits" class="px pxs vm" value="<?php if($replycredit_rule['extcredits'] && $thread['replycredit'] > 0) { ?><?php echo $replycredit_rule['extcredits'];?><?php } else { ?>0<?php } ?>" onkeyup="javascript:getreplycredit();" onblur="extraCheck(0)" /> <?php echo $_G['setting']['extcredits'][$extcreditstype]['unit'];?><?php echo $_G['setting']['extcredits'][$extcreditstype]['title'];?></label><span class="xg1">(留空或填 0 为不奖励)</span> , <label>奖励 <input type="text" name="replycredit_times" id="replycredit_times" class="px pxs vm" value="<?php if($replycredit_rule['lasttimes']) { ?><?php echo $replycredit_rule['lasttimes'];?><?php } else { ?>1<?php } ?>" onkeyup="javascript:getreplycredit();" onblur="extraCheck(0)" /> 次</label>, <label>每人最多可获得 <select id="replycredit_membertimes" name="replycredit_membertimes" class="ps vm"><?php for($i=1;$i<11;$i++) {;?><option value="<?php echo $i;?>"<?php if($replycredit_rule['membertimes'] == $i) { ?> selected="selected"<?php } ?>><?php echo $i;?></option><?php };?></select> 次</label>, <label>中奖率 <select id="replycredit_random" name="replycredit_random" class="ps vm">
  430. <?php for($i=100;$i>9;$i=$i-10) {;?><option value="<?php echo $i;?>"<?php if($replycredit_rule['random'] == $i) { ?> selected="selected"<?php } ?>><?php echo $i;?></option><?php };?></select> %</label></div>
  431. <div class="xg1">回帖奖励总额: <span id="replycredit_sum"><?php if($thread['replycredit']) { ?><?php echo $thread['replycredit'];?><?php } else { ?>0<?php } ?></span> <?php echo $_G['setting']['extcredits'][$extcreditstype]['unit'];?><?php echo $_G['setting']['extcredits'][$extcreditstype]['title'];?><?php if($thread['replycredit']) { ?><span class="xg1">(本帖尚有 <?php echo $thread['replycredit'];?> <?php echo $_G['setting']['extcredits'][$extcreditstype]['unit'];?><?php echo $_G['setting']['extcredits'][$extcreditstype]['title'];?>)</span><?php } ?>, <span id="replycredit">税后支付 <?php echo $_G['setting']['extcredits'][$extcreditstype]['title'];?> 0</span> <?php echo $_G['setting']['extcredits'][$extcreditstype]['unit'];?>, 您有 <?php echo $_G['setting']['extcredits'][$extcreditstype]['title'];?> <?php echo $userextcredit;?> <?php echo $_G['setting']['extcredits'][$extcreditstype]['unit'];?></div>
  432. </div>
  433. <?php } if($_G['group']['allowsetreadperm']) { ?>
  434. <div id="extra_readperm_c" class="exfm cl" style="display:none">
  435. <table cellspacing="0" cellpadding="0">
  436. <tr>
  437. <td class="xw1">阅读权限</td>
  438. <td>
  439. <select name="readperm" id="readperm" class="ps" style="width:90px" onchange="extraCheck(1)">
  440. <option value="">不限</option><?php if(is_array($_G['cache']['groupreadaccess'])) foreach($_G['cache']['groupreadaccess'] as $val) { ?><option value="<?php echo $val['readaccess'];?>" title="阅读权限: <?php echo $val['readaccess'];?>"<?php if($thread['readperm'] == $val['readaccess']) { ?> selected="selected"<?php } ?>><?php echo $val['grouptitle'];?></option>
  441. <?php } ?>
  442. <option value="255"<?php if($thread['readperm'] == 255) { ?> selected="selected"<?php } ?>>最高权限</option>
  443. </select>
  444. <span class="xg1">阅读权限按由高到低排列,高于或等于选中组的用户才可以阅读</span>
  445. </td>
  446. </tr>
  447. </table>
  448. </div>
  449. <?php } if($_G['group']['maxprice'] && !$special) { ?>
  450. <div id="extra_price_c" class="exfm cl" style="display:none">
  451. 售价:
  452. <input type="text" id="price" name="price" class="px pxs" value="<?php echo $thread['pricedisplay'];?>" onblur="extraCheck(2)" /> <?php echo $_G['setting']['extcredits'][$_G['setting']['creditstransextra']['1']]['unit'];?><?php echo $_G['setting']['extcredits'][$_G['setting']['creditstransextra']['1']]['title'];?>
  453. <span class="xg1">(最高 <?php echo $_G['group']['maxprice'];?> <?php echo $_G['setting']['extcredits'][$_G['setting']['creditstransextra']['1']]['unit'];?>)</span>
  454. <?php if($_G['group']['maxprice'] && ($_GET['action'] == 'newthread' || $_GET['action'] == 'edit' && $isfirstpost)) { if($_G['setting']['maxincperthread']) { ?><p class="xg1">主题出售最高收入上限为 <?php echo $_G['setting']['maxincperthread'];?> <?php echo $_G['setting']['extcredits'][$_G['setting']['creditstransextra']['1']]['unit'];?>&nbsp;&nbsp;&nbsp;&nbsp;</p><?php } if($_G['setting']['maxchargespan']) { ?><p class="xg1">主题最多能销售 <?php echo $_G['setting']['maxchargespan'];?> 个小时<?php if($_GET['action'] == 'edit' && $freechargehours) { ?>,本主题还能销售 <?php echo $freechargehours;?> 个小时<?php } ?></p><?php } } ?>
  455. </div>
  456. <?php } if($_G['group']['allowposttag']) { ?>
  457. <div id="extra_tag_c" class="exfm cl" style="display: none;">
  458. <table cellspacing="0" cellpadding="0">
  459. <tr>
  460. <td class="xw1">标签</td>
  461. <td>
  462. <input type="text" class="px vm" size="60" id="tags" name="tags" value="<?php echo $postinfo['tag'];?>" onblur="extraCheck(4)" />
  463. <a href="javascript:;" id="clickbutton[]" class="xi2" onclick="relatekw('-1','-1');doane();">自动获取</a><span class="pipe">|</span><a href="javascript:;" id="choosetag" class="xi2" onclick="showWindow(this.id, 'forum.php?mod=tag', 'get', 0)">选择标签</a>
  464. </td>
  465. </tr>
  466. <tr>
  467. <td></td>
  468. <td>
  469. <p class="xg1">用逗号或空格隔开多个标签,最多可填写 5 个</p><?php $recent_use_tag = recent_use_tag();?><?php if($recent_use_tag) { ?>
  470. <p class="mtn">最近使用标签:&nbsp;<?php $tagi = 0;?><?php if(is_array($recent_use_tag)) foreach($recent_use_tag as $var) { if($tagi) { ?>, <?php } ?><a href="javascript:;" class="xi2" onclick="$('tags').value == '' ? $('tags').value += '<?php echo $var;?>' : $('tags').value += ',<?php echo $var;?>';extraCheck(4);doane();"><?php echo $var;?></a><?php $tagi++;?><?php } ?>
  471. </p>
  472. <?php } ?>
  473. </td>
  474. </tr>
  475. </table>
  476. </div>
  477. <?php } if(($_GET['action'] == 'newthread' && $_G['group']['allowpostrushreply'] && $special != 2) || ($_GET['action'] == 'edit' && getstatus($thread['status'], 3))) { ?>
  478. <div class="exfm cl" id="extra_rushreplyset_c" style="display: none;">
  479. <div class="sinf sppoll z">
  480. <dl>
  481. <dt><span style="width: 4em">&nbsp;</span></dt>
  482. <dd><label for="rushreply"><input type="checkbox" name="rushreply" id="rushreply" class="pc vm" value="1" <?php if($_GET['action'] == 'edit' && getstatus($thread['status'], 3)) { ?>disabled="disabled" checked="checked"<?php } ?> onclick="extraCheck(3)" /> 设为抢楼主题</label></dd>
  483. <dt><label>抢楼时间:</label></dt>
  484. <dd>
  485. <div>
  486. <input type="text" name="rushreplyfrom" id="rushreplyfrom" class="px" onclick="showcalendar(event, this, true)" autocomplete="off" value="<?php echo $postinfo['rush']['starttimefrom'];?>" onkeyup="$('rushreply').checked = true;" /><span> ~ </span><input type="text" onclick="showcalendar(event, this, true)" autocomplete="off" id="rushreplyto" name="rushreplyto" class="px" value="<?php echo $postinfo['rush']['starttimeto'];?>" onkeyup="$('rushreply').checked = true;" />
  487. </div>
  488. </dd>
  489. <dt><label>奖励楼层:</label></dt>
  490. <dd>
  491. <input type="text" name="rewardfloor" id="rewardfloor" class="px oinf" value="<?php echo $postinfo['rush']['rewardfloor'];?>" onkeyup="$('rushreply').checked = true;" />
  492. <p class="xg1">多楼层用英文逗号隔开,*号可匹配任意数或空值,如:8,88,*88</p>
  493. </dd>
  494. </dl>
  495. </div>
  496. <div class="sadd z">
  497. <dl>
  498. <dt>&nbsp;</dt>
  499. <dd>&nbsp;</dd>
  500. <dt><label for="stopfloor">回帖限制: </label></dt>
  501. <dd>
  502. <input type="text" name="replylimit" id="replylimit" class="px" autocomplete="off" value="<?php echo $postinfo['rush']['replylimit'];?>" onkeyup="$('rushreply').checked = true;" /> <span class="xg1">每个用户回帖次数上限</span>
  503. </dd>
  504. <dt><label for="stopfloor">截止楼层:</label></dt>
  505. <dd>
  506. <input type="text" name="stopfloor" id="stopfloor" class="px" autocomplete="off" value="<?php echo $postinfo['rush']['stopfloor'];?>" onkeyup="$('rushreply').checked = true;" />
  507. </dd>
  508. <dt><label for="creditlimit"><?php if($_G['setting']['creditstransextra']['11']) { ?><?php echo $_G['setting']['extcredits'][$_G['setting']['creditstransextra']['11']]['title'];?><?php } else { ?>积分<?php } ?>下限:</label></dt>
  509. <dd>
  510. <input type="text" name="creditlimit" id="creditlimit" class="px" autocomplete="off" value="<?php echo $postinfo['rush']['creditlimit'];?>" onkeyup="$('rushreply').checked = true;" />
  511. <p class="xg1"><?php if($_G['setting']['creditstransextra']['11']) { ?>(<?php echo $_G['setting']['extcredits'][$_G['setting']['creditstransextra']['11']]['title'];?>)<?php } else { ?>总积分<?php } ?>大于此设置才能参与抢楼,可不填</p>
  512. </dd>
  513. </dl>
  514. </div>
  515. </div>
  516. <?php } if($_G['group']['allowsetpublishdate'] && ($_GET['action'] == 'newthread' || ($_GET['action'] == 'edit' && $isfirstpost && $thread['displayorder'] == -4))) { ?>
  517. <div class="exfm cl" id="extra_pubdate_c" style="display: none;">
  518. <label><input type="checkbox" name="cronpublish" onclick="if(this.checked) {$('cronpublishdate').click();doane(event,false);};extraCheck(5);hidenFollowBtn(this.checked);" id="cronpublish" value="true" class="pc"<?php if($cronpublish) { ?> checked="checked"<?php } ?> />定时发布</label>
  519. <input type="text" name="cronpublishdate" id="cronpublishdate" class="px" onclick="showcalendar(event, this, true, false, false, true);" autocomplete="off" value="<?php echo $cronpublishdate;?>" onchange="if(this.value) $('cronpublish').checked = true;">
  520. </div>
  521. <?php } } ?>
  522. <div class="exfm cl" id="extra_additional_c" style="display: none;">
  523. <table cellspacing="0" cellpadding="0">
  524. <tr>
  525. <td class="xw1" valign="top">基本属性</td>
  526. <td>
  527. <?php if($_GET['action'] != 'edit') { if($_G['group']['allowanonymous']) { ?><label for="isanonymous"><input type="checkbox" name="isanonymous" id="isanonymous" class="pc" value="1" />使用匿名发帖</label><?php } } else { if($_G['group']['allowanonymous'] || (!$_G['group']['allowanonymous'] && $orig['anonymous'])) { ?><label for="isanonymous"><input type="checkbox" name="isanonymous" id="isanonymous" class="pc" value="1" <?php if($orig['anonymous']) { ?>checked="checked"<?php } ?> />使用匿名发帖</label><?php } } if($_GET['action'] == 'newthread' || $_GET['action'] == 'edit' && $isfirstpost) { ?>
  528. <label for="hiddenreplies"><input type="checkbox" name="hiddenreplies" id="hiddenreplies" class="pc"<?php if($thread['hiddenreplies']) { ?> checked="checked"<?php } ?> value="1">回帖仅作者可见</label>
  529. <?php } if($_G['uid'] && ($_GET['action'] == 'newthread' || $_GET['action'] == 'edit' && $isfirstpost) && $special != 3) { ?>
  530. <label for="ordertype"><input type="checkbox" name="ordertype" id="ordertype" class="pc" value="1" <?php echo $ordertypecheck;?> />回帖倒序排列</label>
  531. <?php } if(($_GET['action'] == 'newthread' || $_GET['action'] == 'edit' && $isfirstpost)) { ?>
  532. <label for="allownoticeauthor"><input type="checkbox" name="allownoticeauthor" id="allownoticeauthor" class="pc" value="1"<?php if($allownoticeauthor) { ?> checked="checked"<?php } ?> />接收回复通知</label>
  533. <?php } if($_GET['action'] != 'edit' && helper_access::check_module('feed') && $_G['forum']['allowfeed']) { ?>
  534. <label for="addfeed"><input type="checkbox" name="addfeed" id="addfeed" class="pc" value="1" <?php echo $addfeedcheck;?>>发送动态</label>
  535. <?php } ?>
  536. <label for="usesig"><input type="checkbox" name="usesig" id="usesig" class="pc" value="1" <?php if(!$_G['group']['maxsigsize']) { ?>disabled <?php } else { ?><?php echo $usesigcheck;?> <?php } ?>/>使用个人签名</label>
  537. </td>
  538. </tr>
  539. <tr>
  540. <td class="xw1" valign="top">文本特性</td>
  541. <td>
  542. <?php if(($_G['forum']['allowhtml'] || ($_GET['action'] == 'edit' && ($orig['htmlon'] & 1))) && $_G['group']['allowhtml']) { ?>
  543. <label for="htmlon"><input type="checkbox" name="htmlon" id="htmlon" class="pc" value="1" <?php echo $htmloncheck;?> />HTML 代码</label>
  544. <?php } else { ?>
  545. <label for="htmlon"><input type="checkbox" name="htmlon" id="htmlon" class="pc" value="0" <?php echo $htmloncheck;?> disabled="disabled" />HTML 代码</label>
  546. <?php } ?>
  547. <label for="allowimgcode"><input type="checkbox" id="allowimgcode" class="pc" disabled="disabled"<?php if($_G['forum']['allowimgcode']) { ?> checked="checked"<?php } ?> />[img] 代码</label>
  548. <?php if($_G['forum']['allowimgcode']) { ?>
  549. <label for="allowimgurl"><input type="checkbox" id="allowimgurl" class="pc" checked="checked" />解析图片链接</label>
  550. <?php } ?>
  551. <label for="parseurloff"><input type="checkbox" name="parseurloff" id="parseurloff" class="pc" value="1" <?php echo $urloffcheck;?> />禁用链接识别</label>
  552. <label for="smileyoff"><input type="checkbox" name="smileyoff" id="smileyoff" class="pc" value="1" <?php echo $smileyoffcheck;?> />禁用表情</label>
  553. <label for="bbcodeoff"><input type="checkbox" name="bbcodeoff" id="bbcodeoff" class="pc" value="1" <?php echo $codeoffcheck;?> />禁用编辑器代码</label>
  554. <?php if($_G['group']['allowimgcontent']) { ?>
  555. <label for="imgcontent"><input type="checkbox" name="imgcontent" id="imgcontent" class="pc" value="1" <?php echo $imgcontentcheck;?> onclick="switchEditor(this.checked?0:1);$('e_switchercheck').checked=this.checked;" />内容生成图片</label>
  556. <?php } else { ?>
  557. <label for="imgcontent"><input type="checkbox" name="imgcontent" id="imgcontent" class="pc" value="0" <?php echo $imgcontentcheck;?> disabled="disabled"/>内容生成图片</label>
  558. <?php } ?>
  559. </td>
  560. </tr>
  561. <?php if($_GET['action'] == 'newthread' && $_G['forum']['ismoderator'] && ($_G['group']['allowdirectpost'] || !$_G['forum']['modnewposts'])) { if($_GET['action'] == 'newthread' && $_G['forum']['ismoderator'] && ($_G['group']['allowdirectpost'] || !$_G['forum']['modnewposts']) && ($_G['group']['allowstickthread'] || $_G['group']['allowdigestthread'])) { ?>
  562. <tr>
  563. <td class="xw1" valign="top">管理操作</td>
  564. <td>
  565. <?php if($_G['group']['allowstickthread']) { ?>
  566. <label for="sticktopic"><input type="checkbox" name="sticktopic" id="sticktopic" class="pc" value="1" <?php echo $stickcheck;?> />主题置顶</label>
  567. <?php } if($_G['group']['allowdigestthread']) { ?>
  568. <label for="addtodigest"><input type="checkbox" name="addtodigest" id="addtodigest" class="pc" value="1" <?php echo $digestcheck;?> />精华帖子</label>
  569. <?php } ?>
  570. </td>
  571. </tr>
  572. <?php } } elseif($_GET['action'] == 'edit' && $_G['forum_auditstatuson']) { ?>
  573. <tr>
  574. <td class="xw1" valign="top">管理操作</td>
  575. <td>
  576. <label for="audit"><input type="checkbox" name="audit" id="audit" class="pc" value="1">通过审核</label>
  577. </td>
  578. </tr>
  579. <?php } if($_GET['action'] == 'edit' && $isorigauthor && ($isfirstpost && $thread['replies'] < 1 || !$isfirstpost) && !$rushreply && $_G['setting']['editperdel']) { ?>
  580. <tr>
  581. <td class="xw1" valign="top">删除本帖</td>
  582. <td>
  583. <button type="button" class="pn xi1" onclick="deleteThread();"><span>删除本帖</span></button>
  584. <input type="hidden" name="delete" id="delete" value="0" />
  585. 删除后无法撤销<?php if($thread['special'] == 3) { ?>, ,返还悬赏费用,不退还手续费<?php } ?>
  586. </td>
  587. </tr>
  588. <?php } ?>
  589. </table>
  590. </div>
  591. <?php if(!empty($_G['setting']['pluginhooks']['post_attribute_extra_body'])) echo $_G['setting']['pluginhooks']['post_attribute_extra_body'];?>
  592. </div>
  593. </div>
  594. <?php if($_GET['action'] != 'edit') { ?>
  595. <div id="seccheck">
  596. <?php if($secqaacheck || $seccodecheck) { ?><?php
  597. $sectpl = <<<EOF
  598. <sec> <span id="sec<hash>" onclick="showMenu(
  599. EOF;
  600. if(!empty($_G['gp_infloat'])) {
  601. $sectpl .= <<<EOF
  602. {'ctrlid':this.id,'win':'{$_GET['handlekey']}'}
  603. EOF;
  604. } else {
  605. $sectpl .= <<<EOF
  606. this.id
  607. EOF;
  608. }
  609. $sectpl .= <<<EOF
  610. )"><sec></span><div id="sec<hash>_menu" class="p_pop p_opt" style="display:none"><sec></div>
  611. EOF;
  612. ?>
  613. <div class="mtm"><?php $sechash = !isset($sechash) ? 'S'.($_G['inajax'] ? 'A' : '').$_G['sid'] : $sechash.random(3);
  614. $sectpl = str_replace("'", "\'", $sectpl);?><?php if($secqaacheck) { ?>
  615. <span id="secqaa_q<?php echo $sechash;?>"></span>
  616. <script type="text/javascript" reload="1">updatesecqaa('q<?php echo $sechash;?>', '<?php echo $sectpl;?>', '<?php echo $_G['basescript'];?>::<?php echo CURMODULE;?>');</script>
  617. <?php } if($seccodecheck) { ?>
  618. <span id="seccode_c<?php echo $sechash;?>"></span>
  619. <script type="text/javascript" reload="1">updateseccode('c<?php echo $sechash;?>', '<?php echo $sectpl;?>', '<?php echo $_G['basescript'];?>::<?php echo CURMODULE;?>');</script>
  620. <?php } ?></div><?php } ?>
  621. </div>
  622. <?php } ?>
  623. <div class="mtm mbm pnpost">
  624. <a href="home.php?mod=spacecp&amp;ac=credit&amp;op=rule&amp;fid=<?php echo $_G['fid'];?>" class="y" target="_blank">本版积分规则</a>
  625. <button type="submit" id="postsubmit" class="pn pnc" value="true" name="<?php if($_GET['action'] == 'newthread') { ?>topicsubmit<?php } elseif($_GET['action'] == 'reply') { ?>replysubmit<?php } elseif($_GET['action'] == 'edit') { ?>editsubmit<?php } ?>">
  626. <?php if($_GET['action'] == 'newthread') { if($special == 0) { ?><span>发表帖子</span>
  627. <?php } elseif($special == 1) { ?><span>发起投票</span>
  628. <?php } elseif($special == 2) { ?><span>出售商品</span>
  629. <?php } elseif($special == 3) { ?><span>发布悬赏</span>
  630. <?php } elseif($special == 4) { ?><span>发起活动</span>
  631. <?php } elseif($special == 5) { ?><span>发起辩论</span>
  632. <?php } elseif($special == 127) { ?>
  633. <span><?php if($buttontext) { ?><?php echo $buttontext;?><?php } else { ?>发表帖子<?php } ?></span>
  634. <?php } } elseif($_GET['action'] == 'reply' && !empty($_GET['addtrade'])) { ?><span>添加商品</span>
  635. <?php } elseif($_GET['action'] == 'reply') { ?><span>参与/回复主题</span>
  636. <?php } elseif($_GET['action'] == 'edit' && $isfirstpost && $thread['displayorder'] == -4) { ?>
  637. <span>发表帖子</span>
  638. <?php } elseif($_GET['action'] == 'edit') { ?><span>保存</span>
  639. <?php } ?>
  640. </button>
  641. <?php if($_G['uid']) { ?>
  642. <input type="hidden" id="postsave" name="save" value="" />
  643. <?php if($_GET['action'] == 'newthread' && !$modnewthreads || $_GET['action'] == 'edit' && $isfirstpost && !$modnewreplies && $thread['displayorder'] == -4) { ?>
  644. <button type="button" id="postsubmit" class="pn" value="true" onclick="$('postsave').value = 1;$('postsubmit').click();"><em>保存草稿</em></button>
  645. <?php } } ?>
  646. <?php if(!empty($_G['setting']['pluginhooks']['post_btn_extra'])) echo $_G['setting']['pluginhooks']['post_btn_extra'];?>
  647. <?php if(helper_access::check_module('follow') && $_GET['action'] != 'edit') { ?>
  648. <span id="adddynamicspan"><label><input type="checkbox" name="adddynamic" id="adddynamic" value="true" class="pc" <?php if($_G['forum']['allowfeed'] && !$_G['tid'] && empty($_G['forum']['viewperm'])) { ?>checked="checked"<?php } ?> />转播给听众</label></span>
  649. <?php } if(!empty($_G['setting']['pluginhooks']['post_sync_method'])) { ?>
  650. <span>
  651. 将此主题同步到:
  652. <?php if(!empty($_G['setting']['pluginhooks']['post_sync_method'])) echo $_G['setting']['pluginhooks']['post_sync_method'];?>
  653. </span>
  654. <?php } if($special == 2) { ?>
  655. <label><input type="checkbox" name="continueadd" value="yes" class="pc" />继续添加商品</label>
  656. <?php } if(helper_access::check_module('group') && $mygroups && $_G['forum']['status'] != 3) { ?>
  657. <span id="adddynamicspan"><label>&nbsp;&nbsp;来自群组:<select name="mygroupid"><option value="">选择我的群组</option><?php if(is_array($mygroups)) foreach($mygroups as $mygroupid => $mygroupname) { ?><option value="<?php echo $mygroupid;?>__<?php echo $mygroupname;?>" <?php if($selectgroupid == $mygroupid) { ?> selected<?php } ?>><?php echo $mygroupname;?></option><?php } ?></select></label></span>
  658. <?php } ?>
  659. </div>
  660. <?php if(!empty($_G['setting']['pluginhooks']['post_bottom'])) echo $_G['setting']['pluginhooks']['post_bottom'];?>
  661. </div>
  662. </div>
  663. </div>
  664. </form>
  665. <iframe name="ajaxpostframe" id="ajaxpostframe" style="display: none;"></iframe>
  666. <div id="<?php echo $editorid;?>_menus" class="editorrow" style="overflow: hidden; margin-top: -5px; height: 0; border: none; background: transparent;"><div id="<?php echo $editorid;?>_editortoolbar" class="editortoolbar"><?php $fontoptions = array("宋体", "新宋体", "黑体", "微软雅黑", "Arial", "Verdana", "simsun", "Helvetica", "Trebuchet MS", "Tahoma", "Impact", "Times New Roman", "仿宋,仿宋_GB2312", "楷体,楷体_GB2312")?><div class="p_pop fnm" id="<?php echo $editorid;?>_fontname_menu" style="display: none">
  667. <ul unselectable="on"><?php if(is_array($fontoptions)) foreach($fontoptions as $fontname) { ?><li onclick="discuzcode('fontname', '<?php echo $fontname;?>')" style="font-family: <?php echo $fontname;?>" unselectable="on"><a href="javascript:;" title="<?php echo $fontname;?>"><?php echo $fontname;?></a></li>
  668. <?php } ?>
  669. </ul>
  670. </div><?php $sizeoptions = array(1, 2, 3, 4, 5, 6, 7)?><div class="p_pop fszm" id="<?php echo $editorid;?>_fontsize_menu" style="display: none">
  671. <ul unselectable="on"><?php if(is_array($sizeoptions)) foreach($sizeoptions as $size) { ?><li onclick="discuzcode('fontsize', <?php echo $size;?>)" unselectable="on"><a href="javascript:;" title="<?php echo $size;?>"><font size="<?php echo $size;?>" unselectable="on"><?php echo $size;?></font></a></li>
  672. <?php } ?>
  673. </ul>
  674. </div>
  675. </div>
  676. <script type="text/javascript">smilies_show('smiliesdiv', <?php echo $_G['setting']['smcols'];?>, editorid + '_');showHrBox(editorid+'_inserthorizontalrule');showHrBox(editorid+'_postbg', 'postbg');</script><?php
  677. $creditstring = <<<EOF
  678. EOF;
  679. if(is_array($postattachcredits)) foreach($postattachcredits as $id => $credit) { if($credit != '') {
  680. $creditstring .= <<<EOF
  681. {$_G['setting']['extcredits'][$id]['title']}
  682. EOF;
  683. if($credit >= 0) {
  684. $creditstring .= <<<EOF
  685. +{$credit}
  686. EOF;
  687. } else {
  688. $creditstring .= <<<EOF
  689. {$credit}
  690. EOF;
  691. }
  692. $creditstring .= <<<EOF
  693. {$_G['setting']['extcredits'][$id]['unit']} &nbsp;
  694. EOF;
  695. } }
  696. $creditstring .= <<<EOF
  697. EOF;
  698. ?>
  699. <script type="text/javascript">
  700. function switchImagebutton(btn) {
  701. switchButton(btn, 'image');
  702. $(editorid + '_image_menu').style.height = '';
  703. doane();
  704. }
  705. function switchAttachbutton(btn) {
  706. switchButton(btn, 'attach');
  707. doane();
  708. }
  709. </script>
  710. <div class="p_pof" id="<?php echo $editorid;?>_image_menu" style="display: none" unselectable="on">
  711. <table width="100%" cellpadding="0" cellspacing="0" class="fwin"><tr><td class="t_l"></td><td class="t_c"></td><td class="t_r"></td></tr><tr><td class="m_l">&nbsp;&nbsp;</td><td class="m_c"><div class="mtm">
  712. <ul class="tb tb_s cl" id="<?php echo $editorid;?>_image_ctrl" style="margin-top:0;margin-bottom:0;">
  713. <li class="y"><span class="flbc" onclick="hideAttachMenu('image')">关闭</span></li>
  714. <?php if($allowpostimg) { ?>
  715. <li class="current" id="<?php echo $editorid;?>_btn_imgattachlist"><a href="javascript:;" hidefocus="true" onclick="switchImagebutton('imgattachlist');">上传图片</a></li>
  716. <?php if($allowuploadtoday) { ?>
  717. <li id="<?php echo $editorid;?>_btn_local" style="display:none;" did="<?php echo $editorid;?>_btn_imgattachlist|local"><a href="javascript:;" hidefocus="true" onclick="switchImagebutton('local');">普通上传</a></li>
  718. <?php } } if(helper_access::check_module('album')) { ?><li <?php if(!$allowpostimg) { ?>class="current"<?php } ?> id="<?php echo $editorid;?>_btn_albumlist"><a href="javascript:;" hidefocus="true" onclick="switchImagebutton('albumlist');">相册图片</a></li><?php } ?>
  719. <li <?php if(!$allowpostimg && !helper_access::check_module('album')) { ?>class="current"<?php } ?> id="<?php echo $editorid;?>_btn_www"><a href="javascript:;" hidefocus="true" onclick="switchImagebutton('www');">网络图片</a></li>
  720. <?php if(!empty($_G['setting']['pluginhooks']['post_image_btn_extra'])) echo $_G['setting']['pluginhooks']['post_image_btn_extra'];?>
  721. </ul>
  722. <div unselectable="on" id="<?php echo $editorid;?>_www" <?php if($allowpostimg || helper_access::check_module('album')) { ?>style="display: none;"<?php } ?>>
  723. <div class="p_opt popupfix">
  724. <table cellpadding="0" cellspacing="0" width="100%">
  725. <tr class="xg1">
  726. <th width="74%" class="pbn">请输入图片地址</th>
  727. <th width="13%" class="pbn">宽(可选)</th>
  728. <th width="13%" class="pbn">高(可选)</th>
  729. </tr>
  730. <tr>
  731. <td><input type="text" id="<?php echo $editorid;?>_image_param_1" onchange="loadimgsize(this.value)" style="width: 95%;" value="" class="px" autocomplete="off" /></td>
  732. <td><input id="<?php echo $editorid;?>_image_param_2" size="3" value="" class="px p_fre" autocomplete="off" /></td>
  733. <td><input id="<?php echo $editorid;?>_image_param_3" size="3" value="" class="px p_fre" autocomplete="off" /></td>
  734. </tr>
  735. </table>
  736. </div>
  737. <div class="o">
  738. <button type="button" class="pn pnc" id="<?php echo $editorid;?>_image_submit"><strong>提交</strong></button>
  739. </div>
  740. </div>
  741. <?php if($allowpostimg) { ?>
  742. <div unselectable="on" id="<?php echo $editorid;?>_local" style="display: none;">
  743. <div class="p_opt">
  744. <table cellpadding="0" cellspacing="0" border="0" width="100%">
  745. <tbody id="imgattachbodyhidden" style="display:none"><tr>
  746. <td class="atnu"><span id="imglocalno[]"><img src="<?php echo STATICURL;?>image/filetype/common_new.gif" /></span></td>
  747. <td class="atna">
  748. <span id="imgdeschidden[]" style="display:none">
  749. <span id="imglocalfile[]"></span>
  750. </span>
  751. <input type="hidden" name="imglocalid[]" />
  752. </td>
  753. <td class="attc"><span id="imgcpdel[]"></span></td>
  754. </tr></tbody>
  755. </table>
  756. <div class="p_tbl"><table cellpadding="0" cellspacing="0" summary="post_attachbody" border="0" width="100%"><tbody id="imgattachbody"></tbody></table></div>
  757. <div class="upbk pbm bbda">
  758. <div id="imgattachbtnhidden" style="display:none"><span><form name="imgattachform" id="imgattachform" method="post" autocomplete="off" action="misc.php?mod=swfupload&amp;operation=upload&amp;simple=1&amp;type=image" target="attachframe" <?php echo $enctype;?>><input type="hidden" name="uid" value="<?php echo $_G['uid'];?>"><input type="hidden" name="hash" value="<?php echo md5(substr(md5($_G['config']['security']['authkey']), 8).$_G['uid']); ?>"><input type="file" name="Filedata" size="45" class="filedata" /></form></span></div>
  759. <div id="imgattachbtn" class="ptm pbn"></div>
  760. <p id="imguploadbtn">
  761. <button class="pn pnc vm" type="button" onclick="uploadAttach(0, 0, 'img')"><span>上传</span></button>
  762. <span class="xg1">&larr;选择完文件后请点击“上传”按钮</span>
  763. </p>
  764. <p id="imguploading" style="display: none;"><img src="<?php echo IMGDIR;?>/uploading.gif" style="vertical-align: middle;" /> 上传中,请稍候,您可以<a href="javascript:;" onclick="hideMenu()">暂时关闭这个小窗口</a>,上传完成后您会收到通知</p>
  765. </div>
  766. <div class="notice upnf">
  767. 文件尺寸: <span class="xi1"><?php if($_G['group']['maxattachsize']) { ?>小于 <?php echo $maxattachsize_mb;?> <?php } else { ?>大小不限制<?php } ?></span>
  768. <?php if($imgexts) { ?>
  769. , 可用扩展名: <span class="xi1"><?php echo $imgexts;?></span>&nbsp;
  770. <?php } if($creditstring) { ?>
  771. <br /><a href="forum.php?mod=faq&amp;action=credits&amp;fid=<?php echo $_G['fid'];?>" target="_blank" title="积分说明">每上传一个附件您的&nbsp;<?php echo $creditstring;?></a>
  772. <?php } if($_G['group']['maxattachnum'] || $_G['group']['maxsizeperday']) { ?><br /><?php if($allowuploadtoday) { ?>
  773. 您今日还能上传 <?php if($_G['group']['maxattachnum']) { ?><strong><?php echo $allowuploadnum;?></strong> 个文件<?php } if($_G['group']['maxsizeperday']) { if($_G['group']['maxattachnum']) { ?> 或者 <?php } ?>总大小 <strong><?php echo $allowuploadsize;?></strong> 以内的文件<?php } } else { ?>
  774. <span class="xi1 xw1">今日您已无法上传更多的附件</span>
  775. <?php } } ?>
  776. </div>
  777. </div>
  778. <div class="o">
  779. <button onclick="hideAttachMenu('image')" class="pn pnc">
  780. <strong>确定</strong>
  781. </button>
  782. </div>
  783. </div>
  784. <div unselectable="on" id="<?php echo $editorid;?>_imgattachlist">
  785. <div class="p_opt">
  786. <?php if($allowuploadtoday) { ?>
  787. <div class="pbm bbda cl">
  788. <div id="imgattach_notice" class="y" <?php if(empty($imgattachs['used'])) { ?> style="display: none"<?php } ?>>
  789. <?php if(helper_access::check_module('album') && $_G['group']['allowupload']) { ?>
  790. <div id="uploadPanel">
  791. <label style="margin-right:10px;"><input type="checkbox" name="selectallimg" class="pc" value="1" onchange="selectAllSaveImg(this.checked);" onpropertychange="selectAllSaveImg(this.checked);" />全选</label>
  792. 将选中的图片保存到相册:
  793. <select name="uploadalbum" id="uploadalbum" class="ps vm" onchange="if(this.value == '-1') {selectCreateTab(0);}">
  794. <?php if($albumlist) { if(is_array($albumlist)) foreach($albumlist as $album) { ?><option value="<?php echo $album['albumid'];?>"><?php echo $album['albumname'];?></option>
  795. <?php } } else { ?>
  796. <option value="-2">-------</option>
  797. <?php } ?>
  798. <option value="-1" style="color:red;">+创建新相册</option>
  799. </select>
  800. </div>
  801. <div id="createalbum" style="display:none">
  802. <?php if($_G['setting']['albumcategorystat'] && !empty($_G['cache']['albumcategory'])) { echo category_showselect('album', 'albumcatid', !$_G['setting']['albumcategoryrequired'] ? true : false, $_GET['catid']);?>&nbsp;
  803. <?php } ?>
  804. <input type="text" name="newalbum" id="newalbum" class="px vm" size="15" value="请输入相册名称" onfocus="if(this.value == '请输入相册名称') {this.value = '';}" onblur="if(this.value == '') {this.value = '请输入相册名称';}" />&nbsp;<button type="button" class="pn pnc" onclick="createNewAlbum();"><span>创建新相册</span></button><button type="button" class="pn" onclick="selectCreateTab(1);"><span>取消</span></button>
  805. </div>
  806. <?php } ?>
  807. </div>
  808. <span id="imgSpanButtonPlaceholder"></span>
  809. </div>
  810. <?php } ?>
  811. <div class="upfilelist upfl bbda">
  812. <?php if(!empty($imgattachs['used'])) { $imagelist = $imgattachs['used'];?><?php include template('forum/ajax_imagelist'); } ?>
  813. <div id="imgattachlist"></div>
  814. <div id="unusedimgattachlist"></div>
  815. <?php if($allowuploadtoday) { ?>
  816. <div class="fieldset flash" id="imgUploadProgress"></div>
  817. <script type="text/javascript">
  818. function createNewAlbum() {
  819. var inputObj = $('newalbum');
  820. if(inputObj.value == '' || inputObj.value == '请输入相册名称') {
  821. inputObj.value = '请输入相册名称';
  822. } else {
  823. var x = new Ajax();
  824. x.get('home.php?mod=misc&ac=ajax&op=createalbum&inajax=1&name=' + inputObj.value, function(s){
  825. var aid = parseInt(s);
  826. var albumList = $('uploadalbum');
  827. var haveoption = false;
  828. for(var i = 0; i < albumList.options.length; i++) {
  829. if(albumList.options[i].value == aid) {
  830. albumList.selectedIndex = i;
  831. haveoption = true;
  832. break;
  833. }
  834. }
  835. if(!haveoption) {
  836. var oOption = document.createElement("OPTION");
  837. oOption.text = trim(inputObj.value);
  838. oOption.value = aid;
  839. albumList.options.add(oOption);
  840. albumList.selectedIndex = albumList.options.length-1;
  841. }
  842. inputObj.value = ''
  843. });
  844. selectCreateTab(1)
  845. }
  846. }
  847. function selectCreateTab(flag) {
  848. var vwObj = $('uploadPanel');
  849. var opObj = $('createalbum');
  850. var selObj = $('uploadalbum');
  851. if(flag) {
  852. vwObj.style.display = '';
  853. opObj.style.display = 'none';
  854. selObj.value = selObj.options[0].value;
  855. } else {
  856. vwObj.style.display = 'none';
  857. opObj.style.display = '';
  858. }
  859. }
  860. </script>
  861. <?php } ?>
  862. </div>
  863. <div class="notice upnf">
  864. 点击图片添加到帖子内容中
  865. <br />文件尺寸: <span class="xi1"><?php if($_G['group']['maxattachsize']) { ?>小于 <?php echo $maxattachsize_mb;?> <?php } else { ?>大小不限制<?php } ?></span>
  866. <?php if($imgexts) { ?>
  867. , 可用扩展名: <span class="xi1"><?php echo $imgexts;?></span>&nbsp;
  868. <?php } if($creditstring) { ?>
  869. <br /><a href="forum.php?mod=faq&amp;action=credits&amp;fid=<?php echo $_G['fid'];?>" target="_blank" title="积分说明">每上传一个附件您的&nbsp;<?php echo $creditstring;?></a>
  870. <?php } if($_G['group']['maxattachnum'] || $_G['group']['maxsizeperday']) { ?><br /><?php if($allowuploadtoday) { ?>
  871. 您今日还能上传 <?php if($_G['group']['maxattachnum']) { ?><strong><?php echo $allowuploadnum;?></strong> 个文件<?php } if($_G['group']['maxsizeperday']) { if($_G['group']['maxattachnum']) { ?> 或者 <?php } ?>总大小 <strong><?php echo $allowuploadsize;?></strong> 以内的文件<?php } } else { ?>
  872. <span class="xi1 xw1">今日您已无法上传更多的附件</span>
  873. <?php } } ?>
  874. </div>
  875. </div>
  876. <div class="o">
  877. <button onclick="hideAttachMenu('image')" class="pn pnc">
  878. <strong>确定</strong>
  879. </button>
  880. </div>
  881. </div>
  882. <?php } if(helper_access::check_module('album')) { ?>
  883. <div unselectable="on" id="<?php echo $editorid;?>_albumlist" <?php if($allowpostimg) { ?>style="display: none;"<?php } ?>>
  884. <div class="p_opt">
  885. <div class="upfilelist pbm bbda">
  886. 从我的相册中选择图片:
  887. <select onchange="if(this.value) {ajaxget('forum.php?mod=post&action=albumphoto&aid='+this.value, 'albumphoto');}">
  888. <option value="">选择相册</option><?php if(is_array($albumlist)) foreach($albumlist as $album) { ?><option value="<?php echo $album['albumid'];?>"><?php echo $album['albumname'];?></option>
  889. <?php } ?>
  890. </select>
  891. <div id="albumphoto"></div>
  892. </div>
  893. <p class="notice">点击图片添加到帖子内容中</p>
  894. </div>
  895. <div class="o">
  896. <button onclick="hideAttachMenu('image')" class="pn pnc">
  897. <strong>确定</strong>
  898. </button>
  899. </div>
  900. </div>
  901. <?php } ?>
  902. <?php if(!empty($_G['setting']['pluginhooks']['post_image_tab_extra'])) echo $_G['setting']['pluginhooks']['post_image_tab_extra'];?>
  903. </div></td><td class="m_r"></td></tr><tr><td class="b_l"></td><td class="b_c"></td><td class="b_r"></td></tr></table>
  904. </div>
  905. <?php if($_G['group']['allowpostattach']) { ?>
  906. <div class="p_pof upf" id="<?php echo $editorid;?>_attach_menu" style="display: none" unselectable="on">
  907. <table width="100%" cellpadding="0" cellspacing="0" class="fwin"><tr><td class="t_l"></td><td class="t_c"></td><td class="t_r"></td></tr><tr><td class="m_l">&nbsp;&nbsp;</td><td class="m_c"><div class="mtm">
  908. <ul class="tb tb_s cl" id="<?php echo $editorid;?>_attach_ctrl" style="margin-top:0;margin-bottom:0;">
  909. <li class="y"><span class="flbc" onclick="hideAttachMenu('attach')">关闭</span></li>
  910. <li class="current" id="<?php echo $editorid;?>_btn_attachlist"><a href="javascript:;" hidefocus="true" onclick="switchAttachbutton('attachlist');">上传附件</a></li>
  911. <?php if($allowuploadtoday) { ?>
  912. <li id="<?php echo $editorid;?>_btn_upload" style="display: none;" did="<?php echo $editorid;?>_btn_attachlist|upload"><a href="javascript:;" hidefocus="true" onclick="switchAttachbutton('upload');">普通上传</a></li>
  913. <?php } ?>
  914. <?php if(!empty($_G['setting']['pluginhooks']['post_attach_btn_extra'])) echo $_G['setting']['pluginhooks']['post_attach_btn_extra'];?>
  915. </ul>
  916. <div class="p_opt" unselectable="on" id="<?php echo $editorid;?>_upload" style="display: none;">
  917. <table cellpadding="0" cellspacing="0" border="0" width="100%">
  918. <tbody id="attachbodyhidden" style="display:none"><tr>
  919. <td class="atnu"><span id="localno[]"><img src="<?php echo STATICURL;?>image/filetype/common_new.gif" /></span></td>
  920. <td class="atna">
  921. <span id="deschidden[]" style="display:none">
  922. <span id="localfile[]"></span>
  923. </span>
  924. <input type="hidden" name="localid[]" />
  925. </td>
  926. <td class="attc"><span id="cpdel[]"></span></td>
  927. </tr></tbody>
  928. </table>
  929. <div class="p_tbl"><table cellpadding="0" cellspacing="0" summary="post_attachbody" border="0" width="100%"><tbody id="attachbody"></tbody></table></div>
  930. <div class="upbk pbm bbda">
  931. <div id="attachbtnhidden" style="display:none"><span><form name="attachform" id="attachform" method="post" autocomplete="off" action="misc.php?mod=swfupload&amp;operation=upload&amp;simple=1" target="attachframe" <?php echo $enctype;?>><input type="hidden" name="uid" value="<?php echo $_G['uid'];?>"><input type="hidden" name="hash" value="<?php echo md5(substr(md5($_G['config']['security']['authkey']), 8).$_G['uid']); ?>"><input type="file" name="Filedata" size="45" class="fldt" /></form></span></div>
  932. <div id="attachbtn" class="ptm pbn"></div>
  933. <p id="uploadbtn">
  934. <button type="button" class="pn pnc vm" onclick="uploadAttach(0, 0)"><span>上传</span></button>
  935. <span class="xg1">&larr;选择完文件后请点击“上传”按钮</span>
  936. </p>
  937. <p id="uploading" style="display: none;"><img src="<?php echo IMGDIR;?>/uploading.gif" style="vertical-align: middle;" /> 上传中,请稍候,您可以<a href="javascript:;" onclick="hideMenu()">暂时关闭这个小窗口</a>,上传完成后您会收到通知</p>
  938. </div>
  939. <div class="notice upnf">
  940. 文件尺寸: <span class="xi1"><?php if($_G['group']['maxattachsize']) { ?>小于 <?php echo $maxattachsize_mb;?> <?php } else { ?>大小不限制<?php } ?></span>
  941. <?php if($_G['group']['attachextensions']) { ?>
  942. , 可用扩展名: <span class="xi1"><?php echo $_G['group']['attachextensions'];?></span>&nbsp;
  943. <?php } if($creditstring) { ?>
  944. <br /><a href="forum.php?mod=faq&amp;action=credits&amp;fid=<?php echo $_G['fid'];?>" target="_blank" title="积分说明">每上传一个附件您的&nbsp;<?php echo $creditstring;?></a>
  945. <?php } if($_G['group']['maxattachnum'] || $_G['group']['maxsizeperday']) { ?><br /><?php if($allowuploadtoday) { ?>
  946. 您今日还能上传 <?php if($_G['group']['maxattachnum']) { ?><strong><?php echo $allowuploadnum;?></strong> 个文件<?php } if($_G['group']['maxsizeperday']) { if($_G['group']['maxattachnum']) { ?> 或者 <?php } ?>总大小 <strong><?php echo $allowuploadsize;?></strong> 以内的文件<?php } } else { ?>
  947. <span class="xi1 xw1">今日您已无法上传更多的附件</span>
  948. <?php } } ?>
  949. </div>
  950. </div>
  951. <div class="p_opt post_tablelist" unselectable="on" id="<?php echo $editorid;?>_attachlist">
  952. <?php if($allowuploadtoday) { ?>
  953. <div class="pbm bbda">
  954. <span id="spanButtonPlaceholder"></span>
  955. </div>
  956. <?php } ?>
  957. <table cellpadding="0" cellspacing="0" border="0" width="100%" id="attach_tblheader" class="mtn bbs"<?php if(empty($attachs['used'])) { ?> style="display: none"<?php } ?>>
  958. <tr>
  959. <td class="atnu"></td>
  960. <td class="atna pbn">文件名 ( <a onclick="insertAllAttachTag();return false;" href="javascript:;" class="xi2">插入全部附件</a> )</td>
  961. <td class="atds pbn">描述</td>
  962. <?php if($_G['group']['allowsetattachperm']) { ?>
  963. <td class="attv pbn">
  964. 阅读权限
  965. <img src="<?php echo IMGDIR;?>/faq.gif" alt="Tip" class="vm" style="margin: 0;" onmouseover="showTip(this)" tip="阅读权限按由高到低排列,高于或等于选中组的用户才可以阅读" />
  966. </td>
  967. <?php } if($_G['group']['maxprice']) { ?><td class="attp pbn"><?php echo $_G['setting']['extcredits'][$_G['setting']['creditstransextra']['1']]['title'];?></td><?php } ?>
  968. <td class="attc"></td>
  969. </tr>
  970. </table>
  971. <div class="upfl">
  972. <?php if(!empty($attachs['used'])) { $attachlist = $attachs['used'];?><?php include template('forum/ajax_attachlist'); } ?>
  973. <div id="attachlist"></div>
  974. <div id="unusedattachlist"></div>
  975. <?php if($allowuploadtoday) { ?>
  976. <div class="fieldset flash" id="fsUploadProgress"></div>
  977. <?php } ?>
  978. </div>
  979. <div class="notice upnf">
  980. <p id="attach_notice"<?php if(empty($attachs['used']) && empty($attachs['unused'])) { ?> style="display: none"<?php } ?>>点击附件文件名添加到帖子内容中<?php if($_G['setting']['allowattachurl']) { ?>,"attach://" 开头的附件地址支持任何人下载请谨慎添加<?php } ?></p>
  981. 文件尺寸: <span class="xi1"><?php if($_G['group']['maxattachsize']) { ?>小于 <?php echo $maxattachsize_mb;?> <?php } else { ?>大小不限制<?php } ?></span>
  982. <?php if($_G['group']['attachextensions']) { ?>
  983. , 可用扩展名: <span class="xi1"><?php echo $_G['group']['attachextensions'];?></span>&nbsp;
  984. <?php } if($creditstring) { ?>
  985. <br /><a href="forum.php?mod=faq&amp;action=credits&amp;fid=<?php echo $_G['fid'];?>" target="_blank" title="积分说明">每上传一个附件您的&nbsp;<?php echo $creditstring;?></a>
  986. <?php } if($_G['group']['maxattachnum'] || $_G['group']['maxsizeperday']) { ?><br /><?php if($allowuploadtoday) { ?>
  987. 您今日还能上传 <?php if($_G['group']['maxattachnum']) { ?><strong><?php echo $allowuploadnum;?></strong> 个文件<?php } if($_G['group']['maxsizeperday']) { if($_G['group']['maxattachnum']) { ?> 或者 <?php } ?>总大小 <strong><?php echo $allowuploadsize;?></strong> 以内的文件<?php } } else { ?>
  988. <span class="xi1 xw1">今日您已无法上传更多的附件</span>
  989. <?php } } if($_G['group']['maxprice'] && $_G['setting']['maxincperthread']) { ?><br />附件出售最高收入上限为 <?php echo $_G['setting']['maxincperthread'];?> <?php echo $_G['setting']['extcredits'][$_G['setting']['creditstransextra']['1']]['unit'];?>&nbsp;&nbsp;&nbsp;&nbsp;<?php } ?>
  990. </div>
  991. </div>
  992. <?php if(!empty($_G['setting']['pluginhooks']['post_attach_tab_extra'])) echo $_G['setting']['pluginhooks']['post_attach_tab_extra'];?>
  993. </div>
  994. <div class="o">
  995. <button onclick="hideAttachMenu('attach')" class="pn pnc" id="attach_confirms">
  996. <strong>确定</strong>
  997. </button>
  998. </div>
  999. </td><td class="m_r"></td></tr><tr><td class="b_l"></td><td class="b_c"></td><td class="b_r"></td></tr></table>
  1000. </div>
  1001. <?php } ?>
  1002. <iframe name="attachframe" id="attachframe" style="display: none;" onload="uploadNextAttach();"></iframe>
  1003. <script type="text/javascript">
  1004. if(wysiwyg) {
  1005. newEditor(1, bbcode2html(textobj.value));
  1006. } else {
  1007. newEditor(0, textobj.value);
  1008. }
  1009. <?php if($editor['simplemode'] > 0) { ?>
  1010. editorsimple();
  1011. <?php } ?>
  1012. var ATTACHNUM = {'imageused':0,'imageunused':0,'attachused':0,'attachunused':0}, ATTACHUNUSEDAID = new Array(), IMGUNUSEDAID = new Array();
  1013. <?php if($allowpostimg) { ?>
  1014. ATTACHNUM['imageused'] = <?php echo @count($imgattachs['used']); ?>;
  1015. <?php if(!empty($imgattachs['used']) || !empty($imgattachs['unused'])) { ?>
  1016. switchImagebutton('imgattachlist');
  1017. $(editorid + '_image').evt = false;
  1018. updateattachnum('image');
  1019. <?php } else { ?>
  1020. switchImagebutton('multi');
  1021. <?php } } if($_G['group']['allowpostattach'] || $_G['group']['allowpostimage']) { ?>
  1022. ATTACHNUM['attachused'] = <?php echo @count($attachs['used']); ?>;
  1023. <?php if(!empty($attachs['used']) || !empty($attachs['unused'])) { ?>
  1024. $(editorid + '_attach').evt = false;
  1025. updateattachnum('attach');
  1026. <?php } else { ?>
  1027. switchAttachbutton('swfupload');
  1028. <?php } } if(!empty($attachs['unused'])) { ?>
  1029. display('attachnotice_attach');
  1030. var msg = '';<?php if(is_array($attachs['unused'])) foreach($attachs['unused'] as $attach) { if(!empty($attach['aid'])) { ?>
  1031. msg += '<p><label><input id="unused<?php echo $attach['aid'];?>" name="unused[]" value="<?php echo $attach['aid'];?>" checked type="checkbox" class="pc" /><span title="<?php echo $attach['filenametitle'];?> <?php echo $attach['dateline'];?>"><?php echo $attach['filename'];?></span></label></p>'
  1032. ATTACHUNUSEDAID[<?php echo $attach['aid'];?>] = '<?php echo $attach['aid'];?>';
  1033. <?php } } ?>
  1034. $('unusedlist_attach').innerHTML = '<div class="cl">' + msg + '</div>';
  1035. $('unusednum_attach').innerHTML = parseInt(<?php echo @count($attachs['unused']); ?>);
  1036. <?php } if(!empty($imgattachs['unused'])) { ?>
  1037. display('attachnotice_img');
  1038. var msg = '';<?php if(is_array($imgattachs['unused'])) foreach($imgattachs['unused'] as $attach) { if(!empty($attach['aid'])) { ?>
  1039. msg += '<p style="float:left;width:220px;"><label><input id="unused<?php echo $attach['aid'];?>" name="unused[]" value="<?php echo $attach['aid'];?>" checked type="checkbox" class="pc" /><span title="<?php echo $attach['filenametitle'];?> <?php echo $attach['dateline'];?>"><?php echo $attach['filename'];?></span></label></p>'
  1040. IMGUNUSEDAID[<?php echo $attach['aid'];?>] = '<?php echo $attach['aid'];?>';
  1041. <?php } } ?>
  1042. $('unusedlist_img').innerHTML = '<div class="cl">' + msg + '</div>';
  1043. $('unusednum_img').innerHTML = parseInt(<?php echo @count($imgattachs['unused']); ?>);
  1044. <?php } ?>
  1045. setCaretAtEnd();
  1046. if(BROWSER.ie >= 5 || BROWSER.firefox >= '2') {
  1047. _attachEvent(window, 'beforeunload', unloadAutoSave);
  1048. }
  1049. <?php if(!empty($_GET['cedit']) && $_GET['cedit'] == 'yes') { ?>
  1050. loadData(1);
  1051. $(editorid + '_switchercheck').checked = !wysiwyg;
  1052. <?php } ?>
  1053. </script>
  1054. </div>
  1055. <?php if($special || ($_G['group']['allowsetpublishdate'] && ($_GET['action'] == 'newthread' || ($_GET['action'] == 'edit' && $isfirstpost && $thread['displayorder'] == -4))) || ($_GET['action'] == 'newthread' && $_G['group']['allowpostrushreply'] && $special != 2) || ($_GET['action'] == 'edit' && getstatus($thread['status'], 3))) { ?>
  1056. <script src="<?php echo $_G['setting']['jspath'];?>calendar.js?<?php echo VERHASH;?>" type="text/javascript"></script>
  1057. <?php } if($allowuploadtoday || $special == 1) { if(empty($_G['setting']['pluginhooks']['post_upload_extend'])) { if(empty($_G['uploadjs'])) { ?>
  1058. <script src="<?php echo $_G['setting']['jspath'];?>upload.js?<?php echo VERHASH;?>" type="text/javascript"></script><?php $_G['uploadjs'] = 1;?><?php } ?><script type="text/javascript">
  1059. <?php if($allowpostimg) { ?>
  1060. var imgUpload = new SWFUpload({
  1061. upload_url: "<?php echo $_G['siteurl'];?>misc.php?mod=swfupload&action=swfupload&operation=upload&fid=<?php echo $_G['fid'];?>",
  1062. post_params: {"uid" : "<?php echo $_G['uid'];?>", "hash":"<?php echo $swfconfig['hash'];?>", "type":"image"},
  1063. file_size_limit : "<?php echo $swfconfig['max'];?>",
  1064. file_types : "<?php echo $swfconfig['imageexts']['ext'];?>",
  1065. file_types_description : "<?php echo $swfconfig['imageexts']['depict'];?>",
  1066. file_upload_limit : <?php echo $swfconfig['limit'];?>,
  1067. file_queue_limit : 0,
  1068. swfupload_preload_handler : preLoad,
  1069. swfupload_load_failed_handler : loadFailed,
  1070. file_dialog_start_handler : fileDialogStart,
  1071. file_queued_handler : fileQueued,
  1072. file_queue_error_handler : fileQueueError,
  1073. file_dialog_complete_handler : fileDialogComplete,
  1074. upload_start_handler : uploadStart,
  1075. upload_progress_handler : uploadProgress,
  1076. upload_error_handler : uploadError,
  1077. upload_success_handler : uploadSuccess,
  1078. upload_complete_handler : uploadComplete,
  1079. button_image_url : "<?php echo IMGDIR;?>/uploadbutton.png",
  1080. button_placeholder_id : "imgSpanButtonPlaceholder",
  1081. button_width: 100,
  1082. button_height: 25,
  1083. button_cursor:SWFUpload.CURSOR.HAND,
  1084. button_window_mode: "transparent",
  1085. custom_settings : {
  1086. progressTarget : "imgUploadProgress",
  1087. uploadSource: 'forum',
  1088. uploadType: 'image',
  1089. imgBoxObj: $('imgattachlist'),
  1090. <?php if($swfconfig['maxsizeperday']) { ?>
  1091. maxSizePerDay: <?php echo $swfconfig['maxsizeperday'];?>,
  1092. <?php } if($swfconfig['maxattachnum']) { ?>
  1093. maxAttachNum: <?php echo $swfconfig['maxattachnum'];?>,
  1094. <?php } if($swfconfig['filtertype']) { ?>
  1095. filterType: <?php echo $swfconfig['filtertype'];?>,
  1096. <?php } ?>
  1097. singleUpload: $('<?php echo $editorid;?>_btn_local')
  1098. },
  1099. debug: false
  1100. });
  1101. <?php } if($_G['group']['allowpostattach']) { ?>
  1102. var upload = new SWFUpload({
  1103. upload_url: "<?php echo $_G['siteurl'];?>misc.php?mod=swfupload&action=swfupload&operation=upload&fid=<?php echo $_G['fid'];?>",
  1104. post_params: {"uid":"<?php echo $_G['uid'];?>", "hash":"<?php echo $swfconfig['hash'];?>"},
  1105. file_size_limit : "<?php echo $swfconfig['max'];?>",
  1106. file_types : "<?php echo $swfconfig['attachexts']['ext'];?>",
  1107. file_types_description : "<?php echo $swfconfig['attachexts']['depict'];?>",
  1108. file_upload_limit : <?php echo $swfconfig['limit'];?>,
  1109. file_queue_limit : 0,
  1110. swfupload_preload_handler : preLoad,
  1111. swfupload_load_failed_handler : loadFailed,
  1112. file_dialog_start_handler : fileDialogStart,
  1113. file_queued_handler : fileQueued,
  1114. file_queue_error_handler : fileQueueError,
  1115. file_dialog_complete_handler : fileDialogComplete,
  1116. upload_start_handler : uploadStart,
  1117. upload_progress_handler : uploadProgress,
  1118. upload_error_handler : uploadError,
  1119. upload_success_handler : uploadSuccess,
  1120. upload_complete_handler : uploadComplete,
  1121. button_image_url : "<?php echo IMGDIR;?>/uploadbutton.png",
  1122. button_placeholder_id : "spanButtonPlaceholder",
  1123. button_width: 100,
  1124. button_height: 25,
  1125. button_cursor:SWFUpload.CURSOR.HAND,
  1126. button_window_mode: "transparent",
  1127. custom_settings : {
  1128. progressTarget : "fsUploadProgress",
  1129. uploadSource: 'forum',
  1130. uploadType: 'attach',
  1131. <?php if($swfconfig['maxsizeperday']) { ?>
  1132. maxSizePerDay: <?php echo $swfconfig['maxsizeperday'];?>,
  1133. <?php } if($swfconfig['maxattachnum']) { ?>
  1134. maxAttachNum: <?php echo $swfconfig['maxattachnum'];?>,
  1135. <?php } if($swfconfig['filtertype']) { ?>
  1136. filterType: <?php echo $swfconfig['filtertype'];?>,
  1137. <?php } ?>
  1138. singleUpload: $('<?php echo $editorid;?>_btn_upload')
  1139. },
  1140. debug: false
  1141. });
  1142. <?php } ?>
  1143. </script>
  1144. <?php } else { ?>
  1145. <?php if(!empty($_G['setting']['pluginhooks']['post_upload_extend'])) echo $_G['setting']['pluginhooks']['post_upload_extend'];?>
  1146. <?php } } ?>
  1147. <script type="text/javascript">
  1148. var editorsubmit = $('postsubmit');
  1149. var editorform = $('postform');
  1150. <?php if($isfirstpost && !empty($_G['forum']['threadtypes']['types'])) { ?>
  1151. simulateSelect('typeid');
  1152. <?php } if(!$isfirstpost && $thread['special'] == 5 && empty($firststand) && $_GET['action'] != 'edit') { ?>
  1153. simulateSelect('stand');
  1154. <?php } ?>
  1155. function switchpost(href) {
  1156. editchange = false;
  1157. saveData(1);
  1158. location.href = href + '&fid=<?php echo $_G['fid'];?>&cedit=yes<?php if(!empty($_G['tid'])) { ?>&tid=<?php echo $_G['tid'];?><?php } if(!empty($modelid)) { ?>&modelid=<?php echo $modelid;?><?php } ?>&extra=<?php echo $extra;?>';
  1159. doane();
  1160. }
  1161. <?php if($_GET['action'] == 'newthread' && $_G['setting']['sitemessage']['newthread'] || $_GET['action'] == 'reply' && $_G['setting']['sitemessage']['reply']) { ?>
  1162. showPrompt('custominfo', 'mouseover', '<?php if($_GET['action'] == 'newthread') { echo trim($_G['setting']['sitemessage']['newthread'][array_rand($_G['setting']['sitemessage']['newthread'])]); } elseif($_GET['action'] == 'reply') { echo trim($_G['setting']['sitemessage']['reply'][array_rand($_G['setting']['sitemessage']['reply'])]); } ?>', <?php echo $_G['setting']['sitemessage']['time'];?>);
  1163. <?php } if($_G['group']['allowpostattach']) { ?>addAttach();<?php } if($allowpostimg) { ?>addAttach('img');<?php } ?>
  1164. (function () {
  1165. var oSubjectbox = $('subjectbox'),
  1166. oSubject = $('subject'),
  1167. oTextarea = $('e_textarea'),
  1168. sLen = 0;
  1169. if(oSubjectbox) {
  1170. if(oTextarea && oTextarea.style.display == '') {
  1171. oTextarea.focus();
  1172. }
  1173. } else if(oSubject) {
  1174. if(BROWSER.chrome) {
  1175. sLen = oSubject.value.length;
  1176. oSubject.setSelectionRange(sLen, sLen);
  1177. }
  1178. oSubject.focus();
  1179. }
  1180. })();
  1181. <?php if(empty($_GET['cedit'])) { ?>
  1182. if(loadUserdata('forum_'+discuz_uid)) {
  1183. $('rstnotice').style.display = '';
  1184. }
  1185. <?php } if(!empty($userextcredit)) { ?>
  1186. var have_replycredit = 0;
  1187. var creditstax = <?php echo $_G['setting']['creditstax'];?>;
  1188. var replycredit_result_lang = "税后支付<?php echo $_G['setting']['extcredits'][$extcreditstype]['title'];?> ";
  1189. var userextcredit = <?php echo $userextcredit;?>;
  1190. <?php if($thread['replycredit'] > 0) { ?>
  1191. have_replycredit = <?php echo $thread['replycredit'];?>;
  1192. <?php } } if($_GET['action'] == 'edit') { ?>
  1193. extraCheckall();
  1194. <?php } ?>
  1195. </script>
  1196. <?php if(($_GET['action'] == 'newthread' || $_GET['action'] == 'reply' || $_GET['action'] == 'edit') && $_G['group']['allowat']) { ?>
  1197. <script src="<?php echo $_G['setting']['jspath'];?>at.js?<?php echo VERHASH;?>" type="text/javascript"></script>
  1198. <?php } include template('common/footer'); ?>