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

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

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

Revision 1.4 by sysadm, Sun Apr 13 05:06:58 2025 UTC Revision 1.33 by sysadm, Wed May 7 11:27:22 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 15  Line 15 
15                  "#f0F3Fa"                  "#f0F3Fa"
16          );          );
17          $color_index = 0;          $color_index = 0;
 ?>  
 <html>  
 <head>  
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
 <title><? echo htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'); ?></title>  
 <link rel="stylesheet" href="<? echo get_theme_file('css/default'); ?>" type="text/css">  
 <style type="text/css">  
 SPAN.title_normal  
 {  
         color: #909090;  
 }  
 SPAN.title_deleted  
 {  
         color: red;  
         text-decoration: line-through;  
 }  
 TD.content_normal  
 {  
         font-size: 14px;  
 }  
 TD.content_deleted  
 {  
         font-size: 14px;  
         text-decoration: line-through;  
 }  
 </style>  
 <script type="text/javascript" src="/js/nw_open.js"></script>  
 <script type="text/javascript" src="../js/img_adjust.js"></script>  
 <script src="../js/polyfill.min.js"></script>  
 <script src="../js/axios.min.js"></script>  
 <script type="text/javascript">  
 function ch_page(page)  
 {  
         document.change_page.page.value = page;  
         document.change_page.submit();  
         return false;  
 }  
   
 function ch_rpp()  
 {  
         document.change_page.page.value = Math.floor((document.change_page.page.value - 1) * <? echo $result_set["data"]["rpp"]; ?> / document.change_page.rpp.value) + 1;  
         document.change_page.submit();  
         return false;  
 }  
   
 function refresh_err_msg(errorFieldMap)  
 {  
         document.getElementsByName("err_msg").forEach(element => {  
                 element.innerHTML = (errorFieldMap.has(element.id) ? errorFieldMap.get(element.id) : "");  
         });  
 }  
18    
19  function upload_del(id)          $title = htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8');
20  {          $section_scope = ($result_set["data"]["ex"] ? "文摘区" : "讨论区");
21          if (window.confirm('真的要删除吗?') == false)  
22            $css_file = get_theme_file('css/default');
23    
24            $navigator_bar = <<<HTML
25                    <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;<a class="s2" href="list.php?sid={$result_set['data']['sid']}&ex={$result_set['data']['ex']}">{$section_scope}</a>
26                    <a class="s2" href="article_post.php?reply_id={$result_set['data']['id']}&quote=0" title="直接回复该文章">[快速回复]</a>
27            HTML;
28            if ($previous_id > 0)
29          {          {
30                  return false;                  $navigator_bar .= <<<HTML
31                            <a class="s2" href="view_article.php?id={$previous_id}&ex={$result_set['data']['ex']}&trash={$result_set['data']['trash']}">[上一主题]</a>
32                    HTML;
33            }
34            if ($next_id > 0)
35            {
36                    $navigator_bar .= <<<HTML
37                            <a class="s2" href="view_article.php?id={$next_id}&ex={$result_set['data']['ex']}&trash={$result_set['data']['trash']}">[下一主题]</a>
38                    HTML;
39          }          }
40    
41          instance.post('upload_del.php', {          $ex_dir_selector = "";
42                  aid: id,          // Only show set_ex_file at page 1
43          })          if ($result_set["data"]["excerption"] && $result_set["data"]["page"] == 1 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S))
44          .then(function (response) {          {
45                  var ret = response.data;                  $option_non_ex_checked = ($result_set["data"]["fid"] == -1 ? "selected" : "");
46                  var errorFieldMap = new Map();                  $option_root_checked = ($result_set["data"]["fid"] == 0 ? "selected" : "");
47                  switch (ret.return.code)  
48                  {                  $ex_dir_selector .= <<<HTML
49                          case 0: // OK                          <span id="err_msg_ex_dir" name="err_msg" style="color: red;"></span>
50                          case 1: // Already deleted                          <select id="ex_dir" name="ex_dir" size="1">
51                                  document.getElementById("attachment_" + id).style.display = "none";                                  <option value="-1" {$option_non_ex_checked}>[不属于精华区]</option>
52                                  refresh_err_msg(errorFieldMap);                                  <option value="0" {$option_root_checked}>(根目录)</option>
53                                  break;                  HTML;
                         case -1: // Input validation failed  
                                 errorFieldMap.set("err_msg_attachment_" + id, ret.return.message);  
                                 refresh_err_msg(errorFieldMap);  
                                 break;  
                         case -2: // Internal error  
                                 console.log(ret.return.message);  
                                 errorFieldMap.set("err_msg_attachment_" + id, "内部错误<br />");  
                                 refresh_err_msg(errorFieldMap);  
                                 break;  
                         default:  
                                 console.log(ret.return.code);  
                                 break;  
                 }  
         })  
         .catch(function (error) {  
                 console.log(error);  
         });  
54    
55          return false;                  foreach ($result_set["data"]["section_ex_dirs"] as $section_ex_dir)
56  }                  {
57                            $option_checked = ($result_set["data"]["fid"] == $section_ex_dir["fid"] ? "selected" : "");
58    
59  function article_op(op_type, id, set, confirm = false)                          $ex_dir_selector .= <<<HTML
60  {                                  <option value="{$section_ex_dir['fid']}" {$option_checked}>{$section_ex_dir["dir"]}({$section_ex_dir["name"]})</option>
61          var opService = new Map([                          HTML;
62                  ["delete", "delete.php"],                  }
                 ["restore", "restore.php"],  
                 ["excerption", "set_excerption.php"],  
                 ["ontop", "set_ontop.php"],  
                 ["lock", "lock.php"],  
                 ["transship", "set_transship.php"],  
         ]);  
   
         var opNeedRefresh = new Set([  
                 "delete",  
                 "restore",  
         ]);  
63    
64          if (confirm && window.confirm('真的要操作吗?') == false)                  $ex_dir_selector .= <<<HTML
65                            </select>
66                    HTML;
67            }
68            else if ($result_set["data"]["fid"] >= 0)
69          {          {
70                    $ex_dir_selector .= <<<HTML
71                            <a class="s2" href="/gen_ex/{$result_set['data']['sid']}/{$result_set['data']['ex_dir']}" target="_blank" title="精华区目录">
72                                    {$result_set["data"]["ex_dir"]}({$result_set["data"]["ex_name"]})
73                            </a>
74                    HTML;
75            }
76    
77            echo <<<HTML
78            <html>
79            <head>
80            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
81            <title>{$title}</title>
82            <link rel="stylesheet" href="{$css_file}" type="text/css">
83            <style type="text/css">
84            SPAN.title_normal
85            {
86                    color: #909090;
87            }
88            SPAN.title_deleted
89            {
90                    color: red;
91                    text-decoration: line-through;
92            }
93            TD.content_normal
94            {
95                    font-size: 16px;
96            }
97            TD.content_deleted
98            {
99                    font-size: 16px;
100                    text-decoration: line-through;
101            }
102            IMG.auto_adjust
103            {
104                    display: none;
105            }
106            </style>
107            <script src="../js/polyfill.min.js"></script>
108            <script src="../js/axios.min.js"></script>
109            <script src="../js/jquery.min.js"></script>
110            <script type="text/javascript">
111            function ch_page(page)
112            {
113                    document.change_page.page.value = page;
114                    document.change_page.submit();
115                  return false;                  return false;
116          }          }
117    
118          instance.post(opService.get(op_type), {          function ch_rpp()
119                  id: id,          {
120                  set: set,                  document.change_page.page.value = Math.floor((document.change_page.page.value - 1) * {$result_set["data"]["rpp"]} / document.change_page.rpp.value) + 1;
121          })                  document.change_page.submit();
122          .then(function (response) {                  return false;
123                  var ret = response.data;          }
                 var errorFieldMap = new Map();  
                 switch (ret.return.code)  
                 {  
                         case 0: // OK  
                         case 1: // Already set  
                                 if (opNeedRefresh.has(op_type))  
                                 {  
                                         // Refresh with additional parameters  
                                         document.location = "view_article.php?trash=1&rpp=<? echo $result_set["data"]["rpp"]; ?>&ts=" + Date.now() + "&id=" + id + "#" + id;  
                                         break;  
                                 }  
                                 document.getElementById("set_" + op_type + "_" + id).style.display = (set ? "none" : "inline");  
                                 document.getElementById("unset_" + op_type + "_" + id).style.display = (set ? "inline" : "none");  
                                 refresh_err_msg(errorFieldMap);  
                                 break;  
                         case -1: // Input validation failed  
                                 errorFieldMap.set("err_msg_ctrl_" + id, ret.return.message);  
                                 refresh_err_msg(errorFieldMap);  
                                 break;  
                         case -2: // Internal error  
                                 console.log(ret.return.message);  
                                 errorFieldMap.set("err_msg_ctrl_" + id, "内部错误");  
                                 refresh_err_msg(errorFieldMap);  
                                 break;  
                         default:  
                                 console.log(ret.return.code);  
                                 break;  
                 }  
         })  
         .catch(function (error) {  
                 console.log(error);  
         });  
124    
125          return false;          function refresh_err_msg(errorFieldMap)
126  }          {
127                    document.getElementsByName("err_msg").forEach(element => {
128                            element.innerHTML = (errorFieldMap.has(element.id) ? errorFieldMap.get(element.id) : "");
129                    });
130            }
131    
132  function move_article(sid)          function upload_del(id)
133  {          {
134          instance.post('move_article.php', {                  if (window.confirm('真的要删除吗?') == false)
135                  id: <? echo $result_set["data"]["id"]; ?>,                  {
136                  sid: sid,                          return false;
137          })                  }
138          .then(function (response) {  
139                  var ret = response.data;                  instance.post('upload_service_del.php', {
140                  var errorFieldMap = new Map();                          aid: id,
141                  switch (ret.return.code)                  })
142                  {                  .then(function (response) {
143                          case 0: // OK                          var ret = response.data;
144                                  refresh_err_msg(errorFieldMap);                          var errorFieldMap = new Map();
145                                  document.location = "view_article.php?id=<? echo $result_set["data"]["id"]; ?>&trash=<? echo $result_set["data"]["trash"]; ?>&rpp=<? echo $result_set["data"]["rpp"]; ?>&ts=" + Date.now();                          switch (ret.return.code)
146                                  break;                          {
147                          case -1: // Input validation failed                                  case 0: // OK
148                                  errorFieldMap.set("err_msg_move", ret.return.message);                                  case 1: // Already deleted
149                                  refresh_err_msg(errorFieldMap);                                          document.getElementById("attachment_" + id).style.display = "none";
150                                  break;                                          refresh_err_msg(errorFieldMap);
151                          case -2: // Internal error                                          break;
152                                  console.log(ret.return.message);                                  case -1: // Input validation failed
153                                  errorFieldMap.set("err_msg_move", "内部错误");                                          errorFieldMap.set("err_msg_attachment_" + id, ret.return.message);
154                                  refresh_err_msg(errorFieldMap);                                          refresh_err_msg(errorFieldMap);
155                                  break;                                          break;
156                          default:                                  case -2: // Internal error
157                                  console.log(ret.return.code);                                          console.log(ret.return.message);
158                                  break;                                          errorFieldMap.set("err_msg_attachment_" + id, "内部错误<br />");
159                  }                                          refresh_err_msg(errorFieldMap);
160          })                                          break;
161          .catch(function (error) {                                  default:
162                  console.log(error);                                          console.log(ret.return.code);
163          });                                          break;
164                            }
165                    })
166                    .catch(function (error) {
167                            console.log(error);
168                    });
169    
170          return false;                  return false;
171  }          }
172    
173  function set_ex_dir(fid)          function article_op(op_type, id, set, confirm = false)
174  {          {
175          instance.post('set_ex_file_sub.php', {                  var opService = new Map([
176                  id: <? echo $result_set["data"]["id"]; ?>,                          ["delete", "article_service_del.php"],
177                  fid: fid,                          ["restore", "article_service_restore.php"],
178          })                          ["excerption", "article_service_excerption.php"],
179          .then(function (response) {                          ["ontop", "article_service_ontop.php"],
180                  var ret = response.data;                          ["lock", "article_service_lock.php"],
181                  var errorFieldMap = new Map();                          ["transship", "article_service_transship.php"],
182                  switch (ret.return.code)                  ]);
183                  {  
184                          case 0: // OK                  var opNeedRefresh = new Set([
185                                  refresh_err_msg(errorFieldMap);                          "delete",
186                                  document.location = "view_article.php?id=<? echo $result_set["data"]["id"]; ?>&trash=<? echo $result_set["data"]["trash"]; ?>&rpp=<? echo $result_set["data"]["rpp"]; ?>&ts=" + Date.now();                          "restore",
187                                  break;                  ]);
188                          case -1: // Input validation failed  
189                                  errorFieldMap.set("err_msg_ex_dir", ret.return.message);                  if (confirm && window.confirm('真的要操作吗?') == false)
190                                  refresh_err_msg(errorFieldMap);                  {
191                                  break;                          return false;
192                          case -2: // Internal error                  }
193                                  console.log(ret.return.message);  
194                                  errorFieldMap.set("err_msg_ex_dir", "内部错误");                  instance.post(opService.get(op_type), {
195                                  refresh_err_msg(errorFieldMap);                          id: id,
196                                  break;                          set: set,
197                          default:                  })
198                                  console.log(ret.return.code);                  .then(function (response) {
199                                  break;                          var ret = response.data;
200                  }                          var errorFieldMap = new Map();
201          })                          switch (ret.return.code)
202          .catch(function (error) {                          {
203                  console.log(error);                                  case 0: // OK
204          });                                  case 1: // Already set
205                                            if (opNeedRefresh.has(op_type))
206                                            {
207                                                    // Refresh with additional parameters
208                                                    document.location = "view_article.php?trash=1&rpp={$result_set["data"]["rpp"]}&ts=" + Date.now() + "&id=" + id + "#" + id;
209                                                    break;
210                                            }
211                                            document.getElementById("set_" + op_type + "_" + id).style.display = (set ? "none" : "inline");
212                                            document.getElementById("unset_" + op_type + "_" + id).style.display = (set ? "inline" : "none");
213                                            refresh_err_msg(errorFieldMap);
214                                            break;
215                                    case -1: // Input validation failed
216                                            errorFieldMap.set("err_msg_ctrl_" + id, ret.return.message);
217                                            refresh_err_msg(errorFieldMap);
218                                            break;
219                                    case -2: // Internal error
220                                            console.log(ret.return.message);
221                                            errorFieldMap.set("err_msg_ctrl_" + id, "内部错误");
222                                            refresh_err_msg(errorFieldMap);
223                                            break;
224                                    default:
225                                            console.log(ret.return.code);
226                                            break;
227                            }
228                    })
229                    .catch(function (error) {
230                            console.log(error);
231                    });
232    
233          return false;                  return false;
234  }          }
235    
236  const instance = axios.create({          function move_article(sid)
         withCredentials: true,  
         timeout: 3000,  
         baseURL: document.location.protocol + '//' + document.location.hostname + (document.location.port=='' ? '' : (':' + document.location.port)) + '/bbs/',  
 });  
   
 window.addEventListener("load", () => {  
         var s = document.getElementById("ex_dir");  
         if (s)  
237          {          {
238                  s.addEventListener("change", (e) => {                  instance.post('article_service_move.php', {
239                          set_ex_dir(s.value);                          id: {$result_set["data"]["id"]},
240                            sid: sid,
241                    })
242                    .then(function (response) {
243                            var ret = response.data;
244                            var errorFieldMap = new Map();
245                            switch (ret.return.code)
246                            {
247                                    case 0: // OK
248                                            refresh_err_msg(errorFieldMap);
249                                            document.location = "view_article.php?id={$result_set["data"]["id"]}&trash={$result_set["data"]["trash"]}&rpp={$result_set["data"]["rpp"]}&ts=" + Date.now();
250                                            break;
251                                    case -1: // Input validation failed
252                                            errorFieldMap.set("err_msg_move", ret.return.message);
253                                            refresh_err_msg(errorFieldMap);
254                                            break;
255                                    case -2: // Internal error
256                                            console.log(ret.return.message);
257                                            errorFieldMap.set("err_msg_move", "内部错误");
258                                            refresh_err_msg(errorFieldMap);
259                                            break;
260                                    default:
261                                            console.log(ret.return.code);
262                                            break;
263                            }
264                    })
265                    .catch(function (error) {
266                            console.log(error);
267                  });                  });
268    
269                    return false;
270          }          }
271    
272          var f = document.getElementById("move_article");          function set_ex_dir(fid)
         if (f)  
273          {          {
274                  f.addEventListener("submit", (e) => {                  instance.post('article_service_genex.php', {
275                          e.preventDefault();                          id: {$result_set["data"]["id"]},
276                          move_article(f.sid.value);                          fid: fid,
277                    })
278                    .then(function (response) {
279                            var ret = response.data;
280                            var errorFieldMap = new Map();
281                            switch (ret.return.code)
282                            {
283                                    case 0: // OK
284                                            refresh_err_msg(errorFieldMap);
285                                            document.location = "view_article.php?id={$result_set["data"]["id"]}&trash={$result_set["data"]["trash"]}&rpp={$result_set["data"]["rpp"]}&ts=" + Date.now();
286                                            break;
287                                    case -1: // Input validation failed
288                                            errorFieldMap.set("err_msg_ex_dir", ret.return.message);
289                                            refresh_err_msg(errorFieldMap);
290                                            break;
291                                    case -2: // Internal error
292                                            console.log(ret.return.message);
293                                            errorFieldMap.set("err_msg_ex_dir", "内部错误");
294                                            refresh_err_msg(errorFieldMap);
295                                            break;
296                                    default:
297                                            console.log(ret.return.code);
298                                            break;
299                            }
300                    })
301                    .catch(function (error) {
302                            console.log(error);
303                  });                  });
304    
305                    return false;
306          }          }
 });  
307    
308  </script>          const instance = axios.create({
309  </head>                  withCredentials: true,
310  <body>                  timeout: 3000,
311                    baseURL: document.location.protocol + '//' + document.location.hostname + (document.location.port=='' ? '' : (':' + document.location.port)) + '/bbs/',
312            });
313    
314            window.addEventListener("load", () => {
315                    var s = document.getElementById("ex_dir");
316                    if (s)
317                    {
318                            s.addEventListener("change", (e) => {
319                                    set_ex_dir(s.value);
320                            });
321                    }
322    
323                    var f = document.getElementById("move_article");
324                    if (f)
325                    {
326                            f.addEventListener("submit", (e) => {
327                                    e.preventDefault();
328                                    move_article(f.sid.value);
329                            });
330                    }
331            });
332    
333            $(document).ready(function() {
334                    $("img[class=auto_adjust]").on("load", function() {
335                            if ($(this).width() > {$BBS_img_max_width})
336                            {
337                                    $(this).width({$BBS_img_max_width});
338                            }
339                            $(this).show();
340                    })
341                    .on("mousewheel", function(e) {
342                            var zoom = parseFloat($(this).css("zoom"));
343                            zoom *= (1 + e.originalEvent.wheelDelta / 1000);
344                            if (zoom > 0)
345                            {
346                                    $(this).css("zoom", zoom);
347                            }
348                    });
349            });
350            </script>
351            <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3013347141025996" crossorigin="anonymous">
352            </script>
353            </head>
354            <body>
355          <a name="top"></a>          <a name="top"></a>
356          <center>          <center>
357                  <span id="err_msg_prompt" name="err_msg" style="color: red;"></span>                  <span id="err_msg_prompt" name="err_msg" style="color: red;"></span>
358                  <table cols="2" border="0" cellpadding="0" cellspacing="0" width="770">                  <table cols="2" border="0" cellpadding="0" cellspacing="0" width="1050">
359                          <tr>                          <tr>
360                                  <td width="50%">                                  <td width="50%">
361                                          <a class="s2" href="main.php?sid=<? echo $result_set["data"]["sid"]; ?>"><? echo $BBS_name; ?></a>&gt;&gt;<a class="s2" href="list.php?sid=<? echo $result_set["data"]["sid"]; ?>"><? echo $result_set["data"]["section_title"]; ?></a>&gt;&gt;<a class="s2" href="list.php?sid=<? echo $result_set["data"]["sid"]; ?>&ex=<? echo ($result_set["data"]["ex"]); ?>"><? echo ($result_set["data"]["ex"] ? "文摘区" : "讨论区"); ?></a>                                          {$navigator_bar}
                                         <a class="s2" href="post.php?reply_id=<? echo $result_set["data"]["id"]; ?>&quote=0" title="直接回复该文章">[快速回复]</a>  
 <?  
         if ($previous_id > 0)  
         {  
 ?>  
                                         <a class="s2" href="view_article.php?id=<? echo $previous_id; ?>&ex=<? echo $result_set["data"]["ex"]; ?>&trash=<? echo $result_set["data"]["trash"]; ?>">[上一主题]</a>  
 <?  
         }  
         if ($next_id > 0)  
         {  
 ?>  
                                         <a class="s2" href="view_article.php?id=<? echo $next_id; ?>&ex=<? echo $result_set["data"]["ex"]; ?>&trash=<? echo $result_set["data"]["trash"]; ?>">[下一主题]</a>  
 <?  
         }  
 ?>  
362                                  </td>                                  </td>
363                                  <td width="50%" align="right">                                  <td width="50%" align="right">
364  <?                                          {$ex_dir_selector}
         // Only show set_ex_file at page 1  
         if ($result_set["data"]["excerption"] && $result_set["data"]["page"] == 1 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S))  
         {  
 ?>  
                                         <span id="err_msg_ex_dir" name="err_msg" style="color: red;"></span>  
                                         <select id="ex_dir" name="ex_dir" size="1">  
                                                 <option value="-1" <? echo ($result_set["data"]["fid"] == -1 ? "selected" : ""); ?>>[不属于精华区]</option>  
                                                 <option value="0" <? echo ($result_set["data"]["fid"] == 0 ? "selected" : ""); ?>>(根目录)</option>  
 <?  
                 foreach ($result_set["data"]["section_ex_dirs"] as $section_ex_dir)  
                 {  
 ?>  
                                                 <option value="<? echo $section_ex_dir["fid"]; ?>" <? echo ($result_set["data"]["fid"] == $section_ex_dir["fid"] ? "selected" : ""); ?>><? echo $section_ex_dir["dir"]; ?>(<? echo $section_ex_dir["name"]; ?>)</option>  
 <?  
                 }  
 ?>  
                                         </select>  
 <?  
         }  
         else if ($result_set["data"]["fid"] >= 0)  
         {  
 ?>  
                                         <a class="s2" href="/gen_ex/<? echo $result_set["data"]["sid"] . "/" . $result_set["data"]["ex_dir"]; ?>" target=_blank title="精华区目录"><? echo $result_set["data"]["ex_dir"] . "(" . $result_set["data"]["ex_name"] . ")"; ?></a>  
 <?  
         }  
 ?>  
365                                  </td>                                  </td>
366                          </tr>                          </tr>
367                          <tr bgcolor="#d0d3F0" height="20">                          <tr bgcolor="#d0d3F0" height="25">
368                                  <td colspan="2" align="center" class="title">                                  <td colspan="2" align="center" class="title">
369                                          [<? echo $result_set["data"]["id"]; ?>]&nbsp;主题:&nbsp;<? echo htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'); ?>                                          [{$result_set["data"]["id"]}]&nbsp;主题:&nbsp;{$title}
370                                  </td>                                  </td>
371                          </tr>                          </tr>
372                  </table>                  </table>
373  <?          HTML;
374    
375          foreach ($result_set["data"]["articles"] as $article)          foreach ($result_set["data"]["articles"] as $article)
376          {          {
377                  $color_index = ($color_index + 1) % count($color);                  $color_index = ($color_index + 1) % count($color);
378    
379                    $user_viewable = (isset($result_set["data"]["author_list"][$article["uid"]]) ? "true" : "false");
380    
381                  if ($article["tid"] != 0)                  if ($article["tid"] != 0)
382                  {                  {
383  ?>                          echo <<<HTML
384                  <a name="<? echo $article["aid"]; ?>"></a>                                  <a name="{$article['aid']}"></a>
385                  <table bgcolor="<? echo $color[$color_index]; ?>" border="0" cellpadding="0" cellspacing="0" width="770">                                  <table border="0" cellpadding="0" cellspacing="0" width="1050">
386                          <tr height="1" bgcolor="#202020">                                          <tr height="1" bgcolor="#202020">
387                                  <td colspan="3">                                                  <td>
388                                  </td>                                                  </td>
389                          </tr>                                          </tr>
390                  </table>                                  </table>
391  <?                          HTML;
                 }  
 ?>  
                 <table bgcolor="<? echo $color[$color_index]; ?>" border="0" cellpadding="0" cellspacing="10" width="770">  
                         <tr>  
                                 <td width="20%">  
                                 </td>  
                                 <td width="75%">  
 <?  
                 if ($_SESSION["BBS_uid"] > 0 && $_SESSION["BBS_uid"] != $article["uid"])  
                 {  
 ?>  
                                         <img src="images/profile.gif" width="16" height="16"><a class="s4" href="show_profile.php?uid=<? echo $article["uid"]; ?>" target=_blank title="查看作者资料">资料</a>  
 <?  
392                  }                  }
393    
394                    $article_ctrl_bar = "";
395                  if ($_SESSION["BBS_priv"]->checkpriv(0, S_MSG) && $_SESSION["BBS_uid"] != $article["uid"])                  if ($_SESSION["BBS_priv"]->checkpriv(0, S_MSG) && $_SESSION["BBS_uid"] != $article["uid"])
396                  {                  {
397  ?>                          $article_ctrl_bar .= <<<HTML
398                                          <img src="images/mail.gif" width="16" height="16"><a class="s4" href="" onclick="return NW_open('send_msg.php?uid=<? echo $article["uid"]; ?>', 'send_msg', 500, 300);" title="给作者发消息">消息</a>                                  <img src="images/mail.gif" width="16" height="16"><a class="s4" href="msg_read.php?sent=1&uid={$article['uid']}" target="_blank" title="给作者发消息">消息</a>
399  <?                          HTML;
400                  }                  }
401                  if ($article["visible"])                  if ($article["visible"])
402                  {                  {
403                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) && $_SESSION["BBS_uid"] == $article["uid"] && (!$article["excerption"]))                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) && $_SESSION["BBS_uid"] == $article["uid"] && (!$article["excerption"]))
404                          {                          {
405  ?>                                  $article_ctrl_bar .= <<<HTML
406                                          <a class="s4" href="post.php?id=<? echo $article["aid"]; ?>" title="修改该文章">修改</a>                                          <a class="s4" href="article_post.php?id={$article['aid']}" title="修改该文章">修改</a>
407  <?                                  HTML;
408                          }                          }
409                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) &&                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) &&
410                                  ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_MAN_S) || $_SESSION["BBS_uid"] == $article["uid"]) && (!$article["excerption"]))                                  ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_MAN_S) || $_SESSION["BBS_uid"] == $article["uid"]) && (!$article["excerption"]))
411                          {                          {
412  ?>                                  $article_ctrl_bar .= <<<HTML
413                                          <span id="set_delete_<? echo $article["aid"]; ?>"><img src="images/del.gif" width="16" height="16"><a class="s4" href="" onclick="return article_op('delete', <? echo $article["aid"]; ?>, 1, true);" title="删除该文章">删除</a></span>                                          <span id="set_delete_{$article['aid']}"><img src="images/del.gif" width="16" height="16"><a class="s4" href="" onclick="return article_op('delete', {$article['aid']}, 1, true);" title="删除该文章">删除</a></span>
414  <?                                  HTML;
415                          }                          }
416                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST))                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST))
417                          {                          {
418  ?>                                  $article_ctrl_bar .= <<<HTML
419                                          <img src="images/edit.gif" width="16" height="16"><a class="s4" href="post.php?reply_id=<? echo $article["aid"]; ?>" title="引用回复该文章">回复</a>                                          <img src="images/edit.gif" width="16" height="16"><a class="s4" href="article_post.php?reply_id={$article['aid']}" title="引用回复该文章">回复</a>
420  <?                                  HTML;
421                          }                          }
422                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S))                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S))
423                          {                          {
424  ?>                                  $set_ex_display = ($article["excerption"] ? "none" : "inline");
425                                          <a class="s4" id="set_excerption_<? echo $article["aid"]; ?>" style="display: <? echo ($article["excerption"] ? "none" : "inline"); ?>" href="" onclick="return article_op('excerption', <? echo $article["aid"]; ?>, 1);" title="加入文摘区">收录</a>                                  $unset_ex_display = ($article["excerption"] ? "inline" : "none");
426                                          <a class="s4" id="unset_excerption_<? echo $article["aid"]; ?>" style="display: <? echo ($article["excerption"] ? "inline" : "none"); ?>" href="" onclick="return article_op('excerption', <? echo $article["aid"]; ?>, 0, true);" title="移出文摘区">移出</a>  
427  <?                                  $article_ctrl_bar .= <<<HTML
428                                            <a class="s4" id="set_excerption_{$article['aid']}" style="display: {$set_ex_display}" href="" onclick="return article_op('excerption', {$article['aid']}, 1)" title="加入文摘区">收录</a>
429                                            <a class="s4" id="unset_excerption_{$article['aid']}" style="display: {$unset_ex_display}" href="" onclick="return article_op('excerption', {$article['aid']}, 0, true)" title="移出文摘区">移出</a>
430                                    HTML;
431                          }                          }
432                          if ($article["tid"] == 0 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S))                          if ($article["tid"] == 0 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S))
433                          {                          {
434  ?>                                  $set_ontop_display = ($article["ontop"] ? "none" : "inline");
435                                          <a class="s4" id="set_ontop_<? echo $article["aid"]; ?>" style="display: <? echo ($article["ontop"] ? "none" : "inline"); ?>" href="" onclick="return article_op('ontop', <? echo $article["aid"]; ?>, 1, true);" title="置顶">置顶</a>                                  $unset_ontop_display = ($article["ontop"] ? "inline" : "none");
436                                          <a class="s4" id="unset_ontop_<? echo $article["aid"]; ?>" style="display: <? echo ($article["ontop"] ? "inline" : "none"); ?>" href="" onclick="return article_op('ontop', <? echo $article["aid"]; ?>, 0);" title="取消置顶">取消置顶</a>  
437  <?                                  $article_ctrl_bar .= <<<HTML
438                                            <a class="s4" id="set_ontop_{$article['aid']}" style="display: {$set_ontop_display}" href="" onclick="return article_op('ontop', {$article['aid']}, 1, true)" title="置顶">置顶</a>
439                                            <a class="s4" id="unset_ontop_{$article['aid']}" style="display: {$unset_ontop_display}" href="" onclick="return article_op('ontop', {$article['aid']}, 0)" title="取消置顶">取消置顶</a>
440                                    HTML;
441                          }                          }
442                          if ($article["tid"] == 0 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) &&                          if ($article["tid"] == 0 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) &&
443                                  ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_MAN_S) || $_SESSION["BBS_uid"] == $article["uid"]))                                  ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_MAN_S) || $_SESSION["BBS_uid"] == $article["uid"]))
444                          {                          {
445  ?>                                  $set_lock_display = ($article["lock"] ? "none" : "inline");
446                                          <a class="s4" id="set_lock_<? echo $article["aid"]; ?>" style="display: <? echo ($article["lock"] ? "none" : "inline"); ?>" href="" onclick="return article_op('lock', <? echo $article["aid"]; ?>, 1);" title="禁止回复">静默</a>                                  $unset_lock_display = ($article["lock"] ? "inline" : "none");
447                                          <a class="s4" id="unset_lock_<? echo $article["aid"]; ?>" style="display: <? echo ($article["lock"] ? "inline" : "none"); ?>" href="" onclick="return article_op('lock', <? echo $article["aid"]; ?>, 0);" title="取消禁止回复">取消静默</a>  
448  <?                                  $article_ctrl_bar .= <<<HTML
449                                            <a class="s4" id="set_lock_{$article['aid']}" style="display: {$set_lock_display}" href="" onclick="return article_op('lock', {$article['aid']}, 1);" title="禁止回复">静默</a>
450                                            <a class="s4" id="unset_lock_{$article['aid']}" style="display: {$unset_lock_display}" href="" onclick="return article_op('lock', {$article['aid']}, 0);" title="取消禁止回复">取消静默</a>
451                                    HTML;
452                          }                          }
453                          if ($article["tid"] == 0 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S) && (!$article["transship"]) && (!$article["excerption"]))                          if ($article["tid"] == 0 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S) && (!$article["transship"]) && (!$article["excerption"]))
454                          {                          {
455  ?>                                  $set_transship_display = ($article["transship"] ? "none" : "inline");
456                                          <a class="s4" id="set_transship_<? echo $article["aid"]; ?>" style="display: <? echo ($article["transship"] ? "none" : "inline"); ?>" href="" onclick="return article_op('transship', <? echo $article["aid"]; ?>, 1, true);" title="设为转载">设为转载</a>  
457                                          <a class="s4" id="unset_transship_<? echo $article["aid"]; ?>" style="display: none" href=""></a>                                  $article_ctrl_bar .= <<<HTML
458  <?                                          <a class="s4" id="set_transship_{$article['aid']}" style="display: {$set_transship_display}" href="" onclick="return article_op('transship', {$article['aid']}, 1, true);" title="设为转载">设为转载</a>
459                                            <a class="s4" id="unset_transship_{$article['aid']}" style="display: none" href=""></a>
460                                    HTML;
461                          }                          }
462                  }                  }
463                  else                  else
464                  {                  {
465                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S) && $article["m_del"])                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S) && $article["m_del"])
466                          {                          {
467  ?>                                  $article_ctrl_bar .= <<<HTML
468                                          <a class="s4" id="set_restore_<? echo $article["aid"]; ?>" href="" onclick="return article_op('restore', <? echo $article["aid"]; ?>, 1, true);" title="恢复删除">恢复</a>                                          <a class="s4" id="set_restore_{$article['aid']}" href="" onclick="return article_op('restore', {$article['aid']}, 1, true);" title="恢复删除">恢复</a>
469  <?                                  HTML;
470                          }                          }
471                  }                  }
472  ?>  
473                                          <span id="err_msg_ctrl_<? echo $article["aid"]; ?>" name="err_msg" style="color: red;"></span>                  $username = htmlspecialchars($article["username"], ENT_HTML401, 'UTF-8');
474                    $nickname = htmlspecialchars($article["nickname"], ENT_HTML401, 'UTF-8');
475                    $title_f = split_line(htmlspecialchars($article["title"], ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />");
476                    $title_class = ($article["visible"] ? "title_normal" : "title_deleted");
477                    $content_f = LML(htmlspecialchars($article["content"], ENT_HTML401, 'UTF-8'), true, true, 80);
478                    $content_class = ($article["visible"] ? "content_normal" : "content_deleted");
479    
480                    $transship_info = "";
481                    if ($article["transship"])
482                    {
483                            $transship_info = <<<HTML
484                                    <font color="red">[转载]</font>
485                            HTML;
486                    }
487    
488                    $level = user_level($article["exp"]);
489    
490                    $atta_list = "";
491                    foreach ($article["attachments"] as $attachment)
492                    {
493                            $filename = $attachment["filename"];
494    
495                            $atta_list .= <<<HTML
496                                    <span id="attachment_{$attachment['aid']}"><img src="images/closed.gif"><a class="s2" href="dl_file.php?aid={$attachment['aid']}" target="_target">{$filename}</a> ({$attachment["size"]}字节)
497                            HTML;
498    
499                            if (!$attachment["check"])
500                            {
501                                    $atta_list .= <<<HTML
502                                            <font color="red">未审核</font>
503                                    HTML;
504                            }
505    
506                            if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) &&
507                                    ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_MAN_S) || $_SESSION["BBS_uid"] == $article["uid"]) && (!$article["excerption"]))
508                            {
509                                    $atta_list .= <<<HTML
510                                            <a class="s2" href="#" onclick="return upload_del({$attachment['aid']});">删除</a>
511                                            <span id="err_msg_attachment_{$attachment['aid']}" name="err_msg" style="color: red;"></span>
512                                    HTML;
513                            }
514    
515                            if ($attachment["check"])
516                            {
517                                    $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
518                                    switch ($ext)
519                                    {
520                                            case "bmp":
521                                            case "gif":
522                                            case "jpg":
523                                            case "jpeg":
524                                            case "png":
525                                            case "tif":
526                                            case "tiff":
527                                                    $atta_list .= <<<HTML
528                                                            <br />
529                                                            <img class="auto_adjust" src="dl_file.php?aid={$attachment['aid']}">
530                                                    HTML;
531                                                    break;
532                                    }
533                            }
534    
535                            $atta_list .= <<<HTML
536                                    </span><br />
537                            HTML;
538                    }
539    
540                    echo <<<HTML
541                    <table bgcolor="{$color[$color_index]}" border="0" cellpadding="0" cellspacing="10" width="1050">
542                            <tr>
543                                    <td width="20%">
544                                    </td>
545                                    <td width="75%">
546                                            {$article_ctrl_bar}
547                                            <span id="err_msg_ctrl_{$article['aid']}" name="err_msg" style="color: red;"></span>
548                                  </td>                                  </td>
549                                  <td width="5%">                                  <td width="5%">
550                                  </td>                                  </td>
551                          </tr>                          </tr>
552                          <tr>                          <tr>
553                                  <td width="20%" align="center">                                  <td width="20%" align="center">
554                                          作者:&nbsp;<a class="s2" href="show_profile.php?uid=<? echo $article["uid"]; ?>" target=_blank title="查看用户资料"><? echo htmlspecialchars($article["username"], ENT_HTML401, 'UTF-8'); ?></a>                                          作者:&nbsp;<a class="s2" href="view_user.php?uid={$article['uid']}" onclick='return {$user_viewable}' target=_blank title="查看用户资料">{$username}</a>
555                                  </td>                                  </td>
556                                  <td width="75%" class="body">                                  <td width="75%" class="body">
557                                          <span style="color:#606060;">标题:</span>                                          <span style="color: #606060">标题:</span>
558                                          <img src="images/expression/<? echo $article["icon"]; ?>.gif">                                          <img src="images/expression/{$article['icon']}.gif">
559                                          <span id="title_<? echo $article["aid"]; ?>" class="<? echo ($article["visible"] ? "title_normal" : "title_deleted"); ?>">                                          <span id="title_{$article['aid']}" class="{$title_class}">
560                                                  <? echo split_line(htmlspecialchars($article["title"], ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />"); ?>                                                  {$title_f}
561                                          </span>                                          </span>
562                                          <? if ($article["transship"]) { ?><font color="red">[转载]</font><? } ?>                                          {$transship_info}
563                                  </td>                                  </td>
564                                  <td width="5%">                                  <td width="5%">
565                                  </td>                                  </td>
566                          </tr>                          </tr>
567                          <tr>                          <tr>
568                                  <td align="center">                                  <td align="center">
569                                          昵称:&nbsp;<span style="color:#909090;"><? echo htmlspecialchars($article["nickname"], ENT_HTML401, 'UTF-8'); ?></span>                                          昵称:&nbsp;<span style="color: #909090">{$nickname}</span>
570                                  </td>                                  </td>
571                                  <td class="body">                                  <td class="body">
572                                          <span style="color:#606060;">来自:</span>&nbsp;<span style="color:#909090; "><? echo $article["sub_ip"]; ?></span>                                          <span style="color: #606060">来自:</span>&nbsp;<span style="color: #909090">{$article["sub_ip"]}</span>
573                                  </td>                                  </td>
574                                  <td>                                  <td>
575                                  </td>                                  </td>
576                          </tr>                          </tr>
577                          <tr>                          <tr>
578                                  <td align="center">                                  <td align="center">
579                                          经验值:&nbsp;<span style="color:red;"><? echo $article["exp"]; ?></span>                                          经验值:&nbsp;<span style="color:red;">{$article["exp"]}</span>
580                                  </td>                                  </td>
581                                  <td class="body">                                  <td class="body">
582                                          <span style="color:#606060;">发贴时间:</span>&nbsp;<span style="color:#909090; "><? echo $article["sub_dt"]->format("Y年m月d日 H:i:s (\U\T\C P)"); ?></span>                                          <span style="color: #606060">发贴时间:</span>&nbsp;<span style="color: #909090">{$article["sub_dt"]->format("Y年m月d日 H:i:s (\U\T\C P)")}</span>
583                                  </td>                                  </td>
584                                  <td>                                  <td>
585                                  </td>                                  </td>
586                          </tr>                          </tr>
587                          <tr>                          <tr>
588                                  <td align="center">                                  <td align="center">
589                                          等级:&nbsp;<span style="color:#909090;"><? echo user_level($article["exp"]); ?></span>                                          等级:&nbsp;<span style="color: #909090">{$level}</span>
590                                  </td>                                  </td>
591                                  <td class="body">                                  <td class="body">
592                                          <span style="color:#606060;">长度:</span>&nbsp;<span style="color:#909090; "><? echo $article["length"]; ?>字</span>                                          <span style="color: #606060">长度:</span>&nbsp;<span style="color: #909090">{$article["length"]}字</span>
593                                  </td>                                  </td>
594                                  <td>                                  <td>
595                                  </td>                                  </td>
# Line 480  window.addEventListener("load", () => { Line 597  window.addEventListener("load", () => {
597                          <tr height="2">                          <tr height="2">
598                                  <td>                                  <td>
599                                  </td>                                  </td>
600                                  <td style="background-color:#909090;">                                  <td style="background-color: #909090">
601                                  </td>                                  </td>
602                                  <td>                                  <td>
603                                  </td>                                  </td>
604                          </tr>                          </tr>
605                          <tr>                          <tr>
606                                  <td align="center" valign="top">                                  <td align="center" valign="top">
607                                          <img src="<? echo $article["photo_path"]; ?>" border="0">                                          <img src="{$article['photo_path']}" border="0">
608                                  </td>                                  </td>
609                                  <td id="content_<? echo $article["aid"]; ?>" class="<? echo ($article["visible"] ? "content_normal" : "content_deleted"); ?>">                                  <td id="content_{$article['aid']}" class="{$content_class}">
610                                          <? echo LML(htmlspecialchars((isset($article["content"]) ? $article["content"] : ""), ENT_HTML401, 'UTF-8'), true); ?>                                          <pre>{$content_f}</pre>
611                                  </td>                                  </td>
612                                  <td>                                  <td>
613                                  </td>                                  </td>
# Line 498  window.addEventListener("load", () => { Line 615  window.addEventListener("load", () => {
615                          <tr>                          <tr>
616                                  <td>                                  <td>
617                                  </td>                                  </td>
618                                  <td style="color:#000000; ">                                  <td style="color: #000000">
619                                          ========== * * * * * ==========                                          ========== * * * * * ==========
620                                          <br />                                          <br />
621  <?                                          {$atta_list}
                 foreach ($article["attachments"] as $attachment)  
                 {  
                         $filename = $attachment["filename"];  
                         $ext = strtolower(substr($filename, (strrpos($filename, ".") ? strrpos($filename, ".") + 1 : 0)));  
 ?>  
                                         <span id="attachment_<? echo $attachment["aid"]; ?>"><img src="images/closed.gif"><a class="s2" href="dl_file.php?aid=<? echo $attachment["aid"]; ?>" target="_target"><? echo $filename; ?></a> (<? echo $attachment["size"]; ?>字节)  
 <?  
                         if ($attachment["check"] == 0)  
                         {  
 ?><font color="red">未审核</font><?  
                         }  
                         else  
                         {  
                                 switch ($ext)  
                                 {  
                                         case "bmp":  
                                         case "gif":  
                                         case "jpg":  
                                         case "jpeg":  
                                         case "png":  
                                         case "tif":  
                                         case "tiff":  
 ?>  
                                         <img onmousewheel="return bbs_img_zoom(event, this)" src="dl_file.php?aid=<? echo $attachment["aid"]; ?>">  
 <?  
                                                 break;  
                                 }  
                         }  
   
                         if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) &&  
                                 ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_MAN_S) || $_SESSION["BBS_uid"] == $article["uid"]) && (!$article["excerption"]))  
                         {  
 ?>  
                                         <a class="s2" href="#" onclick="return upload_del(<? echo $attachment["aid"]; ?>);">删除</a>  
                                         <span id="err_msg_attachment_<? echo $attachment["aid"]; ?>" name="err_msg" style="color: red;"></span>  
 <?  
                         }  
 ?>  
                                         <br /></span>  
 <?  
                 }  
 ?>  
622                                  </td>                                  </td>
623                                  <td>                                  <td>
624                                  </td>                                  </td>
625                          </tr>                          </tr>
626                  </table>                  </table>
627  <?  
628                    HTML;
629          }          }
630  ?>  
631                  <table cols="3" border="0" cellpadding="5" cellspacing="0" width="770">          $rpp_options = "";
632            foreach ($BBS_view_rpp_options as $v)
633            {
634                    $selected = ($v == $result_set["data"]["rpp"] ? "selected" : "");
635    
636                    $rpp_options .= <<<HTML
637                            <option value="{$v}" {$selected}>{$v}</option>
638                    HTML;
639            }
640    
641            echo <<<HTML
642                    <table cols="3" border="0" cellpadding="5" cellspacing="0" width="1050">
643                          <tr bgcolor="#d0d3F0" height="10">                          <tr bgcolor="#d0d3F0" height="10">
644                                  <td colspan="3">                                  <td colspan="3">
645                                  </td>                                  </td>
646                          </tr>                          </tr>
647                          <tr>                          <tr>
648                                  <td width="40%" style="color:#909090">                                  <td width="40%" style="color: #909090">
649                                  <form action="view_article.php" method="get" id="change_page" name="change_page">                                  <form action="view_article.php" method="get" id="change_page" name="change_page">
650                                          <input type="hidden" id="id" name="id" value="<? echo $result_set["data"]["id"]; ?>">                                          <input type="hidden" id="id" name="id" value="{$result_set['data']['id']}">
651                                          <input type="hidden" id="ex" name="ex" value="<? echo $result_set["data"]["ex"]; ?>">                                          <input type="hidden" id="ex" name="ex" value="{$result_set['data']['ex']}">
652                                          <input type="hidden" id="trash" name="trash" value="<? echo $result_set["data"]["trash"]; ?>">                                          <input type="hidden" id="trash" name="trash" value="{$result_set['data']['trash']}">
653                                          每页<select size="1" id="rpp" name="rpp" onchange="ch_rpp();">                                          每页<select size="1" id="rpp" name="rpp" onchange="ch_rpp()">
654  <?                                          {$rpp_options}
         foreach ($BBS_view_rpp_options as $v)  
         {  
                 echo ("<option value=\"$v\"" . ($v == $result_set["data"]["rpp"] ? " selected" : "") . ">$v</option>");  
         }  
 ?>  
655                                          </select>条                                          </select>条
656  <?          HTML;
657    
658          if ($result_set["data"]["page"] > 1)          if ($result_set["data"]["page"] > 1)
659          {          {
660  ?>                  echo <<<HTML
661                                          <a class="s8" title="首页" href="" onclick="return ch_page(1);"><font face=webdings>9</font></a>                          <a class="s8" title="首页" href="" onclick="return ch_page(1)">|◀</a>
662                                          <a class="s8" title="上一页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page"] - 1); ?>);"><font face=webdings>7</font></a>                          <a class="s8" title="上一页" href="" onclick="return ch_page({$result_set['data']['page']} - 1)">◀</a>
663  <?                  HTML;
664          }          }
665          else          else
666          {          {
667  ?>                  echo <<<HTML
668                                          <font face=webdings>9 7</font>                          |◀ ◀
669  <?                  HTML;
670          }          }
671  ?>  
672                                          第<input id="page" name="page" value="<? echo ($result_set["data"]["page"]) ; ?>" style="width: 30px;">/<? echo $result_set["data"]["page_total"]; ?>页          echo <<<HTML
673  <?                  第<input id="page" name="page" value="{$result_set['data']['page']}" style="width: 30px;">/{$result_set['data']['page_total']}页
674            HTML;
675    
676          if ($result_set["data"]["page"] < $result_set["data"]["page_total"])          if ($result_set["data"]["page"] < $result_set["data"]["page_total"])
677          {          {
678  ?>                  echo <<<HTML
679                                          <a class="s8" title="下一页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page"] + 1); ?>);"><font face=webdings>8</font></a>                          <a class="s8" title="下一页" href="" onclick="return ch_page({$result_set['data']['page']} + 1)">▶</a>
680                                          <a class="s8" title="尾页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page_total"]); ?>);"><font face=webdings>:</font></a>                          <a class="s8" title="尾页" href="" onclick="return ch_page({$result_set['data']['page_total']})">▶|</a>
681  <?                  HTML;
682          }          }
683          else          else
684          {          {
685  ?>                  echo <<<HTML
686                                          <font face=webdings>8 :</font>                          ▶ ▶|
687  <?                  HTML;
688          }          }
689  ?>  
690            echo <<<HTML
691                                  </form>                                  </form>
692                                  </td>                                  </td>
693                                  <td width="35%" align="center">                                  <td width="35%" align="center">
694  <?          HTML;
695    
696          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S) && (!$result_set["data"]["excerption"]))          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S) && (!$result_set["data"]["excerption"]))
697          {          {
698  ?>                  echo <<<HTML
699                                  <form method="post" id="move_article" name="move_article" action="#">                                  <form method="post" id="move_article" name="move_article" action="#">
700                                          <select id="sid" name="sid" size="1">                                          <select id="sid" name="sid" size="1">
701  <?                                                  {$result_set["data"]["section_list_options"]}
                 echo $result_set["data"]["section_list_options"];  
 ?>  
702                                          </select>                                          </select>
703                                          <input type="submit" value="移动">                                          <input type="submit" value="移动">
704                                          <span id="err_msg_move" name="err_msg" style="color: red;"></span>                                          <span id="err_msg_move" name="err_msg" style="color: red;"></span>
705                                  </form>                                  </form>
706  <?                  HTML;
707          }          }
708  ?>                              </td>  
709            echo <<<HTML
710                                    </td>
711                                  <td width="25%" align="right">                                  <td width="25%" align="right">
712                                          <a class="s2" href="#top" title="返回页首"><img src="images/gotop.gif" border="0">Top<img src="images/gotop.gif" border="0"></a>                                          <a class="s2" href="#top" title="返回页首"><img src="images/gotop.gif" border="0">Top<img src="images/gotop.gif" border="0"></a>
713                                  </td>                                  </td>
714                          </tr>                          </tr>
715                  </table>                  </table>
716          </center>          </center>
717  <?          HTML;
718          $display_ad = true;  
719          include "./foot.inc.php";          include "./foot.inc.php";
720  ?>  
721  </body>          echo <<<HTML
722  </html>          </body>
723            </html>
724            HTML;


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

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