/[LeafOK_CVS]/fenglin/bbs/themes/default/post.view.php
ViewVC logotype

Diff of /fenglin/bbs/themes/default/post.view.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 by sysadm, Mon Apr 7 14:25:44 2025 UTC Revision 1.16 by sysadm, Sun Oct 5 07:36:34 2025 UTC
# Line 1  Line 1 
1  <?  <?php
2          // Prevent load standalone          // Prevent load standalone
3          if (!isset($result_set))          if (!isset($result_set))
4          {          {
# Line 9  Line 9 
9  <head>  <head>
10  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
11  <title>发表文章</title>  <title>发表文章</title>
12  <link rel="stylesheet" href="<? echo get_theme_view_file("css"); ?>" type="text/css">  <link rel="stylesheet" href="<?= get_theme_file('css/default'); ?>" type="text/css">
13  <script type="text/javascript" src="../js/nw_open.js"></script>  <script type="text/javascript" src="<?= get_theme_file('js/lml_assistant'); ?>"></script>
 <script type="text/javascript" src="../js/lml_assistant.js"></script>  
14  <script src="../js/polyfill.min.js"></script>  <script src="../js/polyfill.min.js"></script>
15  <script src="../js/axios.min.js"></script>  <script src="../js/axios.min.js"></script>
16  <script type="text/javascript">  <script type="text/javascript">
# Line 34  function refresh_textarea(updateFieldMap Line 33  function refresh_textarea(updateFieldMap
33    
34  function post_article(f)  function post_article(f)
35  {  {
36          instance.post('post_service.php', {          instance.post('article_service_post.php', {
37          id: <? echo $result_set["data"]["id"]; ?>,          id: <?= $result_set["data"]["id"]; ?>,
38          reply_id: <? echo $result_set["data"]["reply_id"]; ?>,          reply_id: <?= $result_set["data"]["reply_id"]; ?>,
39          sid: <? echo $result_set["data"]["sid"]; ?>,          sid: <?= $result_set["data"]["sid"]; ?>,
40          title: f.textarea_title.value,          title: f.textarea_title.value,
41                  transship: (f.transship != null && f.transship.checked ? "1" : "0"),                  transship: (f.transship != null && f.transship.checked ? "1" : "0"),
42                  content: f.textarea_content.value,                  content: f.textarea_content.value,
# Line 93  function upload_del(id) Line 92  function upload_del(id)
92                  return false;                  return false;
93          }          }
94    
95          instance.post('upload_del.php', {          instance.post('upload_service_del.php', {
96          aid: id          aid: id
97      })      })
98      .then(function (response) {      .then(function (response) {
# Line 145  window.addEventListener("load", () => { Line 144  window.addEventListener("load", () => {
144  </head>  </head>
145  <body>  <body>
146  <center>  <center>
147  <table border="0" cellpadding="1" cellspacing="0" width="770">  <table border="0" cellpadding="1" cellspacing="0" width="1050">
148          <tr>          <tr>
149                  <td>                  <td>
150                          <a class="s2" href="main.php?sid=<? echo $result_set["data"]["sid"]; ?>"><? echo $BBS_name; ?></a>&gt;&gt;<a class="s2" href="bbs.php?sid=<? echo $result_set["data"]["sid"]; ?>"><? echo $result_set["data"]["section_title"]; ?></a>&gt;&gt;<?                          <a class="s2" href="main.php?sid=<?= $result_set["data"]["sid"]; ?>"><?= $BBS_name; ?></a>&gt;&gt;<a class="s2" href="list.php?sid=<?= $result_set["data"]["sid"]; ?>"><?= $result_set["data"]["section_title"]; ?></a>&gt;&gt;<?php
151          if ($result_set["data"]["id"] == 0)          if ($result_set["data"]["id"] == 0)
152          {          {
153                  if ($result_set["data"]["reply_id"] > 0)                  if ($result_set["data"]["reply_id"] > 0)
154                  {                  {
155  ?><a class="s2" href="view_article.php?id=<? echo $result_set["data"]["reply_id"] . "#" . $result_set["data"]["reply_id"]; ?>"><? echo split_line(htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />"); ?></a>&gt;&gt;<a class="s2" href="#" onclick="return false;">回复文章</a><?  ?><a class="s2" href="view_article.php?id=<?= $result_set["data"]["reply_id"] . "#" . $result_set["data"]["reply_id"]; ?>"><?= split_line(htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />"); ?></a>&gt;&gt;<a class="s2" href="#" onclick="return false;">回复文章</a><?php
156                  }                  }
157                  else                  else
158                  {                  {
159  ?><a class="s2" href="#" onclick="return false;">发表新文章</a><?  ?><a class="s2" href="#" onclick="return false;">发表新文章</a><?php
160                  }                  }
161          }          }
162          else          else
163          {          {
164  ?><a class="s2" href="view_article.php?id=<? echo $result_set["data"]["id"] . "#" . $result_set["data"]["id"]; ?>"><? echo split_line(htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />"); ?></a>&gt;&gt;<a class="s2" href="#" onclick="return false;">修改文章</a><?  ?><a class="s2" href="view_article.php?id=<?= $result_set["data"]["id"] . "#" . $result_set["data"]["id"]; ?>"><?= split_line(htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />"); ?></a>&gt;&gt;<a class="s2" href="#" onclick="return false;">修改文章</a><?php
165          }          }
166  ?>  ?>
167                  </td>                  </td>
168          </tr>          </tr>
169  </table>  </table>
170  <form method="POST" ENCTYPE="multipart/form-data" id="post_form" name="post_form" action="#">  <form method="POST" ENCTYPE="multipart/form-data" id="post_form" name="post_form" action="#">
171  <table border="0" cellpadding="5" cellspacing="0" width="770">  <table border="0" cellpadding="5" cellspacing="0" width="1050">
172          <tr>          <tr>
173                  <td colspan="2" align="center" style="color:red;">别忙着发贴,请先看一下<a class="s0" href="doc/management.xml" target=_blank>《论坛管理章程》</a>吧!<br>                  <td colspan="2" align="center" style="color:red;">别忙着发贴,请先看一下<a class="s0" href="doc/management.xml" target=_blank>《论坛管理章程》</a>吧!<br>
174                  (请对您的言论负责,遵守有关法律、法规,尊重网络道德)</td>                  (请对您的言论负责,遵守有关法律、法规,尊重网络道德)</td>
# Line 178  window.addEventListener("load", () => { Line 177  window.addEventListener("load", () => {
177                  <td colspan="2" align="center"><span id="err_msg_prompt" name="err_msg" style="color: red;"></span></td>                  <td colspan="2" align="center"><span id="err_msg_prompt" name="err_msg" style="color: red;"></span></td>
178          </tr>          </tr>
179          <tr>          <tr>
180                  <td width="10%" align="right">标题<span id="err_msg_title" name="err_msg" style="color: red;"></span></td>                  <td width="20%" align="right">标题<span id="err_msg_title" name="err_msg" style="color: red;"></span></td>
181                  <td width="90%">                  <td width="80%">
182                          <input type="text" name="textarea" id="textarea_title" size="80" <? echo ($result_set["data"]["id"] != 0 ? "readonly" : ""); ?> value="<? echo ($result_set["data"]["reply_id"] > 0 ? split_line(htmlspecialchars($result_set["data"]["title"], ENT_QUOTES | ENT_HTML401, 'UTF-8'), "Re: ", 80, 1) : htmlspecialchars($result_set["data"]["title"], ENT_QUOTES | ENT_HTML401, 'UTF-8')); ?>">                          <input type="text" name="textarea" id="textarea_title" size="90" <?= ($result_set["data"]["id"] != 0 ? "readonly" : ""); ?> value="<?= ($result_set["data"]["reply_id"] > 0 ? split_line(htmlspecialchars($result_set["data"]["title"], ENT_QUOTES | ENT_HTML401, 'UTF-8'), "Re: ", 80, 1) : htmlspecialchars($result_set["data"]["title"], ENT_QUOTES | ENT_HTML401, 'UTF-8')); ?>">
183  <?  <?php
184          if ($result_set["data"]["id"] == 0 && $result_set["data"]["reply_id"] == 0)          if ($result_set["data"]["id"] == 0 && $result_set["data"]["reply_id"] == 0)
185          {          {
186  ?>  ?>
187                          <input type="checkbox" name="transship">转载                          <input type="checkbox" name="transship">转载
188  <?  <?php
189          }          }
190  ?></td>  ?></td>
191          </tr>          </tr>
192          <tr>          <tr>
193                  <td align="right">正文<span id="err_msg_content" name="err_msg" style="color: red;"></span></td>                  <td align="right">正文<span id="err_msg_content" name="err_msg" style="color: red;"></span></td>
194                  <td>                  <td>
195                          <textarea name="textarea" id="textarea_content" cols="80" rows="25"><?                          <textarea name="textarea" id="textarea_content" cols="90" rows="25"><?php
196  if ($result_set["data"]["reply_id"] == 0)  if ($result_set["data"]["reply_id"] == 0)
197  {  {
198          echo htmlspecialchars($result_set["data"]["content"], ENT_HTML401, 'UTF-8');          echo htmlspecialchars($result_set["data"]["content"], ENT_HTML401, 'UTF-8');
# Line 204  else if ($quote) Line 203  else if ($quote)
203    
204    
205    
206  【 在 <? echo htmlspecialchars($result_set["data"]["r_username"], ENT_HTML401, 'UTF-8'); ?> (<? echo htmlspecialchars($result_set["data"]["r_nickname"], ENT_HTML401, 'UTF-8'); ?>) 的大作中提到: 】  【 在 <?= htmlspecialchars($result_set["data"]["r_username"], ENT_HTML401, 'UTF-8'); ?> (<?= htmlspecialchars($result_set["data"]["r_nickname"], ENT_HTML401, 'UTF-8'); ?>) 的大作中提到: 】
207  <?  <?php
208          echo htmlspecialchars(LMLtagFilter(LML(split_line($result_set["data"]["content"], ": ", 76, 20), false, false, 1024)), ENT_HTML401, 'UTF-8');          echo htmlspecialchars(LML(split_line($result_set["data"]["content"], ": ", 76, 20), false, false, 1024, true), ENT_HTML401, 'UTF-8');
209  }  }
210  ?></textarea>  ?></textarea>
211                  </td>                  </td>
212          </tr>          </tr>
213          <tr>          <tr>
214                  <td align="right"><a class="s0" href="doc/lml.htm" target=_blank>LML</a>助手</td>                  <td align="right"><a class="s0" href="view_article.php?id=472081" target=_blank>LML</a>助手</td>
215                  <td>                  <td>
216                          <INPUT type="button" value="B" onclick="b_bold(content)" style="font-weight:bold; width:25px;">                          <INPUT type="button" value="B" onclick="b_bold(textarea_content)" style="font-weight:bold; width:25px;">
217                          <INPUT type="button" value="I" onclick="b_italic(content)" style="font-style:italic; width:25px;">                          <INPUT type="button" value="I" onclick="b_italic(textarea_content)" style="font-style:italic; width:25px;">
218                          <INPUT type="button" value="U" onclick="b_underline(content)" style="text-decoration:underline; width:25px;">                          <INPUT type="button" value="U" onclick="b_underline(textarea_content)" style="text-decoration:underline; width:25px;">
219                          <INPUT type="button" value="[" onclick="b_left(content)" style="width:20px;">                          <INPUT type="button" value="[" onclick="b_left(textarea_content)" style="width:20px;">
220                          <INPUT type="button" value="]" onclick="b_right(content)" style="width:20px;">                          <INPUT type="button" value="]" onclick="b_right(textarea_content)" style="width:20px;">
221                          <INPUT type="button" value="Aa" onclick="b_size(content)" style="width:30px;">                          <INPUT type="button" value="Aa" onclick="b_size(textarea_content)" style="width:30px;">
222                          <INPUT type="button" value="A" onclick="b_color(content)" style="font-weight:bold; color:red; width:25px;">                          <INPUT type="button" value="A" onclick="b_color(textarea_content)" style="font-weight:bold; color:red; width:25px;">
223                          <INPUT type="button" value="@" onclick="b_email(content)" style="width:25px;">                          <INPUT type="button" value="@" onclick="b_email(textarea_content)" style="width:25px;">
224                          <INPUT type="button" value="Link" onclick="b_link(content)" style="text-decoration:underline; color:blue; width:40px;">                          <INPUT type="button" value="Link" onclick="b_link(textarea_content)" style="text-decoration:underline; color:blue; width:40px;">
225                          <INPUT type="button" value="主题" onclick="b_article(content)" style="text-decoration:underline; color:green; width:40px;">                          <INPUT type="button" value="主题" onclick="b_article(textarea_content)" style="text-decoration:underline; color:green; width:40px;">
226                          <INPUT type="button" value="图片" onclick="b_image(content)" style="width:40px;">                          <INPUT type="button" value="图片" onclick="b_image(textarea_content)" style="width:40px;">
227                          <INPUT type="button" value="字幕" onclick="b_marquee(content)" style="width:40px;">                          <INPUT type="button" value="字幕" onclick="b_marquee(textarea_content)" style="width:40px;">
228                  </td>                  </td>
229          </tr>          </tr>
230          <tr>          <tr>
231                  <td align="right">上传附件<span id="err_msg_attachment" name="err_msg" style="color: red;"></span></td>                  <td align="right">上传附件<span id="err_msg_attachment" name="err_msg" style="color: red;"></span></td>
232                  <td>                  <td>
233                          单个文件大小不能超过<? echo $BBS_upload_size_limit; ?>M,                          单个文件大小不能超过<?= $BBS_upload_size_limit; ?>M,
234                          单次上传不超过<? echo $BBS_upload_count_limit; ?>个文件<br />                          单次上传不超过<?= $BBS_upload_count_limit; ?>个文件<br />
235                          文件类型限于BMP,GIF,JPEG,PNG,TIFF,TXT,ZIP,RAR<br />                          文件类型限于BMP,GIF,JPEG,PNG,TIFF,TXT,ZIP,RAR<br />
236                          <INPUT TYPE=FILE SIZE=40 name="attachment[]" id="attachment" multiple>                          <INPUT TYPE="file" size="40" name="attachment[]" id="attachment" multiple>
237  <?  <?php
238          if ($result_set["data"]["id"] != 0) // Modify article          if ($result_set["data"]["id"] != 0) // Modify article
239          {          {
240                  if (count($result_set["data"]["attachments"]) > 0)                  if (count($result_set["data"]["attachments"]) > 0)
241                  {                  {
242  ?>  ?>
243                          <hr width="80%" align="left" />已上传附件<br />                          <hr width="80%" align="left" />已上传附件<br />
244  <?  <?php
245                  }                  }
246    
247                  foreach ($result_set["data"]["attachments"] as $aid => $attachment)                  foreach ($result_set["data"]["attachments"] as $aid => $attachment)
248                  {                  {
249                          $filename = $attachment["filename"];                          $filename = $attachment["filename"];
                         $ext = strtolower(substr($filename, (strrpos($filename, ".") ? strrpos($filename, ".") + 1 : 0)));  
250  ?>  ?>
251                          <span id="attachment_<? echo $aid; ?>"><img src="images/closed.gif"><a class="s2" href="dl_file.php?aid=<? echo $aid; ?>" target="_target"><? echo $filename; ?></a> (<? echo $attachment["size"]; ?>字节)                          <span id="attachment_<?= $aid; ?>"><img src="images/closed.gif"><a class="s2" href="dl_file.php?aid=<?= $aid; ?>" target="_target"><?= $filename; ?></a> (<?= $attachment["size"]; ?>字节)
252  <?  <?php
253                          if ($attachment["check"] == 0)                          if ($attachment["check"] == 0)
254                          {                          {
255  ?><font color="red">未审核</font><?  ?><font color="red">未审核</font><?php
256                          }                          }
257  ?>  ?>
258                          <a class="s2" href="#" onclick="return upload_del(<? echo $aid; ?>);">删除</a>                          <a class="s2" href="#" onclick="return upload_del(<?= $aid; ?>);">删除</a>
259                          <br /></span>                          <br /></span>
260  <?  <?php
261                  }                  }
262          }          }
263  ?>  ?>
# Line 267  else if ($quote) Line 265  else if ($quote)
265          </tr>          </tr>
266          <tr>          <tr>
267                  <td align="right">表情<span id="err_msg_emoji" name="err_msg" style="color: red;"></span></td>                  <td align="right">表情<span id="err_msg_emoji" name="err_msg" style="color: red;"></span></td>
268                  <td><?                  <td><?php
269          for ($i = 1; $i <= $BBS_emoji_count; $i++)          for ($i = 1; $i <= $BBS_emoji_count; $i++)
270          {          {
271  ?><input type="radio" name="emoji" value="<? echo $i; ?>" <? echo ($i == $result_set["data"]["emoji"] ? "checked" : ""); ?>><img src="images/expression/<? echo $i; ?>.gif" width="15" height="15" alt="<? echo $i; ?>.gif"><?  ?><input type="radio" name="emoji" value="<?= $i; ?>" <?= ($i == $result_set["data"]["emoji"] ? "checked" : ""); ?>><img src="images/expression/<?= $i; ?>.gif" width="15" height="15" alt="<?= $i; ?>.gif"><?php
272                  if (($i % 12)==0)                  if (($i % 12)==0)
273                  {                  {
274  ?><br><?  ?><br><?php
275                  }                  }
276          }          }
277  ?></td>  ?></td>
278          </tr>          </tr>
279  <?  <?php
280          if ($result_set["data"]["id"] == 0)          if ($result_set["data"]["id"] == 0)
281          {          {
282  ?>  ?>
# Line 289  else if ($quote) Line 287  else if ($quote)
287                          <input type="radio" id="sign_id_1" name="sign_id" value="1">1&nbsp;                          <input type="radio" id="sign_id_1" name="sign_id" value="1">1&nbsp;
288                          <input type="radio" id="sign_id_2" name="sign_id" value="2">2&nbsp;                          <input type="radio" id="sign_id_2" name="sign_id" value="2">2&nbsp;
289                          <input type="radio" id="sign_id_3" name="sign_id" value="3">3&nbsp;                          <input type="radio" id="sign_id_3" name="sign_id" value="3">3&nbsp;
290                          <a class="s0" href="preference.php" target=_blank>设置个人签名</a>                          <a class="s0" href="update_pref.php" target=_blank>设置个人签名</a>
291                  </td>                  </td>
292          </tr>          </tr>
293  <?  <?php
294          }          }
295          else          else
296          {          {
297  ?>  ?>
298          <input type="hidden" id="sign_id_0" name="sign_id" value="0">          <input type="hidden" id="sign_id_0" name="sign_id" value="0">
299  <?  <?php
300          }          }
301  ?>  ?>
302          <tr>          <tr>
303                  <td align="right"></td>                  <td align="right"></td>
304                  <td><input type="checkbox" name="reply_note" id="reply_note" <? echo ($result_set["data"]["reply_note"] ? "checked":""); ?>>有人回复该主题时通知我</td>                  <td><input type="checkbox" name="reply_note" id="reply_note" <?= ($result_set["data"]["reply_note"] ? "checked":""); ?>>有人回复该主题时通知我</td>
305          </tr>          </tr>
306  </table>  </table>
307  <p><input type="submit" value="提交" name="submit">&nbsp;&nbsp;&nbsp;<input type="reset" value="重填" name="reset"></p>  <p><input type="submit" value="提交" name="submit">&nbsp;&nbsp;&nbsp;<input type="reset" value="重填" name="reset"></p>
308  </center>  </center>
309  </form>  </form>
310  <?  <?php
311          include "./foot.inc.php";          include "./foot.inc.php";
312  ?>  ?>
313  </body>  </body>


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1