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


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

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