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

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

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

Revision 1.4 by sysadm, Mon Apr 14 11:23:46 2025 UTC Revision 1.9 by sysadm, Fri Apr 25 11:01: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 29  Line 29 
29                                                    
30                  return($file);                  return($file);
31          }          }
32  ?>  
33  <html>          $css_file = get_theme_file('css/default');
34  <head>  
35  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">          echo <<<HTML
36  <title>文章查找结果</title>          <html>
37  <link rel="stylesheet" href="<? echo get_theme_file('css/default'); ?>" type="text/css">          <head>
38  <style type="text/css">          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
39  TD.head,TD.favor,TD.reply,TD.dark,TD.topic          <title>文章查找结果</title>
40  {          <link rel="stylesheet" href="{$css_file}" type="text/css">
41          border-right: #d0d3F0 1px solid;          <style type="text/css">
42          border-left: #d0d3F0 1px solid;          TD.head,TD.favor,TD.reply,TD.dark,TD.topic
43          border-bottom: #d0d3F0 1px solid;          {
44  }                  border-right: #d0d3F0 1px solid;
45  TD.head                  border-left: #d0d3F0 1px solid;
46  {                  border-bottom: #d0d3F0 1px solid;
47          font-family: 楷体;          }
48          color: blue;          TD.head
49  }          {
50  TD.favor,TD.dark                  font-family: 楷体;
51  {                  color: blue;
52          text-align: center;          }
53  }          TD.favor,TD.dark
54  TD.reply,TD.dark          {
55  {                  text-align: center;
56          color: #909090;          }
57          background-color: #eaf0Fa;          TD.reply,TD.dark
58  }          {
59  TD.head,TD.favor                  color: #909090;
60  {                  background-color: #eaf0Fa;
61          background-color: #fafbfc;          }
62  }          TD.head,TD.favor
63  TD.favor          {
64  {                  background-color: #fafbfc;
65          color: #c0c3F0;          }
66          font-weight: bold;          TD.favor
67  }          {
68  TD.topic                  color: #c0c3F0;
69  {                  font-weight: bold;
70          background-color: #fafbfc;          }
71  }          TD.topic
72  TD.topic:hover          {
73  {                  background-color: #fafbfc;
74          background-color: #eaf0Fa;          }
75  }          TD.topic:hover
76  </style>          {
77                    background-color: #eaf0Fa;
78  <script type="text/javascript">          }
79  function ch_page(page)          </style>
80  {  
81          document.search_form.page.value = page;          <script type="text/javascript">
82          document.search_form.submit();          function ch_page(page)
83          return false;          {
84  }                  document.search_form.page.value = page;
85                    document.search_form.submit();
86  function ch_rpp()                  return false;
87  {          }
88          document.search_form.page.value = Math.floor((document.search_form.page.value - 1) * <? echo $result_set["data"]["rpp"]; ?> / document.search_form.rpp.value) + 1;  
89          document.search_form.submit();          function ch_rpp()
90          return false;          {
91  }                  document.search_form.page.value = Math.floor((document.search_form.page.value - 1) * {$result_set["data"]["rpp"]} / document.search_form.rpp.value) + 1;
92  </script>                  document.search_form.submit();
93  </head>                  return false;
94  <body>          }
95  <center>          </script>
96  <table cols="5" border="0" cellpadding="0" cellspacing="0" width="1050" >          </head>
97          <tr bgcolor="#d0d3F0" height="25">          <body>
98                  <td width="4%" class="title">状态</td>          <center>
99                  <td width="39%" class="title">标题(共<? echo $result_set["data"]["toa"]; ?>篇)</td>          <table cols="5" border="0" cellpadding="0" cellspacing="0" width="1050" >
100                  <td width="16%" class="title">作者</td>                  <tr bgcolor="#d0d3F0" height="25">
101                  <td width="10%" class="title">回复/人气</td>                          <td width="4%" class="title">状态</td>
102                  <td width="31%" class="title">最后更新 | 回复人</td>                          <td width="39%" class="title">标题(共{$result_set["data"]["toa"]}篇)</td>
103          </tr>                          <td width="16%" class="title">作者</td>
104  </table>                          <td width="10%" class="title">回复/人气</td>
105  <table cols="5" border="0" cellpadding="0" cellspacing="0" width="1050">                          <td width="31%" class="title">最后更新 | 回复人</td>
106  <?                  </tr>
107            </table>
108            <table cols="5" border="0" cellpadding="0" cellspacing="0" width="1050">
109            HTML;
110    
111          $ex = ($result_set["data"]["ex"] > 0 ? 1 : 0);          $ex = ($result_set["data"]["ex"] > 0 ? 1 : 0);
112    
113          foreach ($result_set["data"]["articles"] as $article)          foreach ($result_set["data"]["articles"] as $article)
# Line 111  function ch_rpp() Line 115  function ch_rpp()
115                  $status = ($article["ontop"] ? "B" : ($article["gen_ex"] ? "G" : ($article["excerption"] ? "M" : ($article["reply_count"] < 10 ? "N" : "H"))));                  $status = ($article["ontop"] ? "B" : ($article["gen_ex"] ? "G" : ($article["excerption"] ? "M" : ($article["reply_count"] < 10 ? "N" : "H"))));
116                  $status = ($article["visited"] ? strtolower($status) : strtoupper($status));                  $status = ($article["visited"] ? strtolower($status) : strtoupper($status));
117    
118                  if ($status == "n" || $status == "h")                  $status_str = "";
119                    if ($status == "H")
120                  {                  {
121                          $ss = "";                          $status_str = <<<HTML
122                                    <font color="#b0b0b0">N</font>
123                            HTML;
124                  }                  }
125                  else if ($status == "H")                  else if ($status != "n" && $status != "h")
                 {  
                         $ss = "N";  
                 }  
                 else  
126                  {                  {
127                          $ss = $status;                          $status_str = <<<HTML
128                                    <font color="#b0b0b0">{$status}</font>
129                            HTML;
130                  }                  }
131    
                 $status_str = "<font color=#b0b0b0>$ss</font>";  
   
132                  if ($article["lock"])                  if ($article["lock"])
133                  {                  {
134                          $status_str .= "<font color=red>x</font>";                          $status_str .= <<<HTML
135                                    <font color="red">x</font>
136                            HTML;
137                  }                  }
138                    
139                  $title = split_line(htmlspecialchars($article["title"], ENT_QUOTES | ENT_HTML401, 'UTF-8'), "", 50, 2, "<br />");                  $status_pic = pic_file($status);
140                  $username = htmlspecialchars($article["username"], ENT_QUOTES | ENT_HTML401, 'UTF-8');                  $title = split_line(htmlspecialchars($article["title"], ENT_HTML401, 'UTF-8'), "", 50, 2, "<br />");
141                  $nickname = htmlspecialchars($article["nickname"], ENT_QUOTES | ENT_HTML401, 'UTF-8');                  $user_viewable = (isset($result_set["data"]["author_list"][$article["uid"]]) ? "true" : "false");
142                  $last_reply_username = htmlspecialchars($article["last_reply_username"], ENT_QUOTES | ENT_HTML401, 'UTF-8');                  $name = htmlspecialchars(($result_set["data"]["use_nick"] ? $article["nickname"] : $article["username"]), ENT_HTML401, 'UTF-8');
143                  $last_reply_nickname = htmlspecialchars($article["last_reply_nickname"], ENT_QUOTES | ENT_HTML401, 'UTF-8');                  $name_alt = htmlspecialchars(($result_set["data"]["use_nick"] ? $article["username"] : $article["nickname"]), ENT_QUOTES, 'UTF-8');
144                  $class_title = htmlspecialchars($article["class_title"], ENT_QUOTES | ENT_HTML401, 'UTF-8');                  $last_reply_user_viewable = (isset($result_set["data"]["author_list"][$article["last_reply_uid"]]) ? "true" : "false");
145                  $section_title = htmlspecialchars($article["section_title"], ENT_QUOTES | ENT_HTML401, 'UTF-8');                  $last_reply_name = htmlspecialchars(($result_set["data"]["use_nick"] ? $article["last_reply_nickname"] : $article["last_reply_username"]), ENT_HTML401, 'UTF-8');
146  ?>                  $last_reply_name_alt = htmlspecialchars(($result_set["data"]["use_nick"] ? $article["last_reply_username"] : $article["last_reply_nickname"]), ENT_QUOTES, 'UTF-8');
147          <tr height="30">                  $class_title = htmlspecialchars($article["class_title"], ENT_HTML401, 'UTF-8');
148                  <td width="4%" class="dark">                  $section_title = htmlspecialchars($article["section_title"], ENT_HTML401, 'UTF-8');
149                          <a class="s0" href="view_article.php?tn=xml&rpp=20&id=<? echo $article["aid"]; ?>&ex=<? echo $ex; ?>#<? echo $article["aid"]; ?>" target=_blank>  
150                                  <img src="images/<? echo pic_file($status); ?>" border="0">                  $transship_info = "";
                         </a>  
                 </td>  
                 <td width="39%" class="topic">  
                 <font color="green"><? echo $class_title; ?>&gt;&gt;</font>  
                 <font color="green"><? echo $section_title; ?>&gt;&gt;</font><br />  
   
                         <a class="s0" href="view_article.php?id=<? echo $article["aid"]; ?>&ex=<? echo $ex; ?>&trash=<? echo ($result_set["data"]["trash"] ? 1 : 0); ?>#<? echo $article["aid"]; ?>" target=_blank title="发表时间:<? echo $article["sub_dt"]->format("Y-m-d H:i:s") . "\n"; ?>文章长度:<? echo $article["length"]; ?>字">  
                                 <img src="images/expression/<? echo $article["icon"]; ?>.gif" border="0">  
 <?  
151                  if ($article["transship"])                  if ($article["transship"])
152                  {                  {
153  ?>                          $transship_info = <<<HTML
154                                  <font color=#b0b0b0>[转]</font>                                  <font color="#b0b0b0">[转]</font>
155  <?                                HTML;
156                  }                  }
157  ?>  
                                 <? echo $title; ?>  
                         </a>  
                         <? echo $status_str; ?>  
                 </td>  
                 <td width="16%" class="dark">  
                         <a class="s2" href="show_profile.php?uid=<? echo $article["uid"]; ?>" title="<? echo $article["username"]; ?>" target=_blank>  
                                 <? echo $article["nickname"]; ?>  
                         </a>  
                 </td>  
                 <td width="10%" class="favor">  
                         <? echo $article["reply_count"]; ?>/<? echo $article["view_count"]; ?>  
                 </td>  
                 <td width="31%" class="reply"><? echo $article["last_reply_dt"]->format("Y-m-d H:i:s"); ?> |  
 <?  
158                  if ($article["reply_count"] > 0)                  if ($article["reply_count"] > 0)
159                  {                  {
160  ?>                          $last_reply_info = <<<HTML
161                          <a class="s2" href="show_profile.php?uid=<? echo $article["last_reply_uid"]; ?>" title="<? echo $article["last_reply_username"]; ?>" target=_blank>                                  <a class="s2" href="view_user.php?uid={$article['last_reply_uid']}" onclick="return {$last_reply_user_viewable}" title="{$last_reply_name_alt}" target="_blank">
162                                  <? echo $article["last_reply_nickname"]; ?>                                          {$last_reply_name}
163                          </a>                                  </a>
164  <?                          HTML;
165                  }                  }
166                  else                  else
167                  {                  {
168  ?>                          $last_reply_info = <<<HTML
169                          ------                                  ------
170  <?                                HTML;
171                  }                  }
172  ?>  
173                  </td>                  echo <<<HTML
174          </tr>                          <tr height="30">
175  <?                                  <td width="4%" class="dark">
176                                            <a class="s0" href="view_article.php?tn=xml&rpp=20&id={$article['aid']}&ex={$ex}&trash={$result_set["data"]["trash"]}#{$article['aid']}" target="_blank">
177                                                    <img src="images/{$status_pic}" border="0">
178                                            </a>
179                                    </td>
180                                    <td width="39%" class="topic">
181                                            <font color="green">{$class_title}&gt;&gt;{$section_title}&gt;&gt;</font><br />
182                                            <a class="s0" href="view_article.php?id={$article['aid']}&ex={$result_set['data']['ex']}&trash={$result_set["data"]["trash"]}#{$article['aid']}" target="_blank" title="发表时间:{$article['sub_dt']->format('Y-m-d H:i:s')}\n文章长度:{$article['length']}字">
183                                                    <img src="images/expression/{$article['icon']}.gif" border="0">
184                                                    {$transship_info}
185                                                    {$title}
186                                            </a>
187                                            {$status_str}
188                                    </td>
189                                    <td width="16%" class="dark">
190                                            <a class="s2" href="view_user.php?uid={$article['uid']}" onclick="return {$user_viewable}" title="{$name_alt}" target="_blank">
191                                                    {$name}
192                                            </a>
193                                    </td>
194                                    <td width="10%" class="favor">
195                                            {$article["reply_count"]}/{$article["view_count"]}
196                                    </td>
197                                    <td width="31%" class="reply">
198                                            {$article["last_reply_dt"]->format("Y-m-d H:i:s")} | {$last_reply_info}
199                                    </td>
200                            </tr>
201    
202                    HTML;
203          }          }
204  ?>  
205  </table>          $rpp_options = "";
 <table cols="3" border="0" cellpadding="0" cellspacing="0" width="1050">  
         <tr bgcolor="#d0d3F0" height="5">  
                 <td colspan="3"></td>  
         </tr>  
         <tr height="10">  
                 <td colspan="3"></td>  
         </tr>  
         <tr valign="top">  
                 <td width="40%" align="left" style="color:#909090">  
                 <form action="search_article.php" method="GET" id="search_form" name="search_form">  
                         <a name="cp"></a>  
                         <input type="hidden" id="uid" name="uid" value="<? echo $result_set["data"]["uid"];?>">  
                         <input type="hidden" id="nickname" name="nickname" value="<? echo $result_set["data"]["nickname"];?>">  
                         <input type="hidden" id="title" name="title" value="<? echo $result_set["data"]["title"];?>">  
                         <input type="hidden" id="content" name="content" value="<? echo $result_set["data"]["content"];?>">  
                         <input type="hidden" id="sid" name="sid" value="<? echo $result_set["data"]["sid"];?>">  
                         <input type="hidden" id="begin_dt" name="begin_dt" value="<? echo $result_set["data"]["begin_dt"]->format("Y-m-d");?>">  
                         <input type="hidden" id="end_dt" name="end_dt" value="<? echo $result_set["data"]["end_dt"]->format("Y-m-d");?>">  
                         <input type="hidden" id="reply" name="reply" value="<? echo $result_set["data"]["reply"]; ?>">  
                         <input type="hidden" id="ex" name="ex" value="<? echo $result_set["data"]["ex"]; ?>">  
                         <input type="hidden" id="original" name="original" value="<? echo $result_set["data"]["original"]; ?>">  
                         <input type="hidden" id="trash" name="trash" value="<? echo $result_set["data"]["trash"]; ?>">  
                         每页<select size="1" id="rpp" name="rpp" onchange="ch_rpp();">  
 <?  
206          foreach ($BBS_list_rpp_options as $v)          foreach ($BBS_list_rpp_options as $v)
207          {          {
208                  echo ("<option value=\"$v\"" . ($v == $result_set["data"]["rpp"] ? " selected" : "") . ">$v</option>");                  $selected = ($v == $result_set["data"]["rpp"] ? "selected" : "");
209    
210                    $rpp_options .= <<<HTML
211                            <option value="{$v}" {$selected}>{$v}</option>
212                    HTML;
213          }          }
214  ?>  
215                          </select>篇          echo <<<HTML
216  <?          </table>
217            <table cols="3" border="0" cellpadding="0" cellspacing="0" width="1050">
218                    <tr bgcolor="#d0d3F0" height="5">
219                            <td colspan="3"></td>
220                    </tr>
221                    <tr height="10">
222                            <td colspan="3"></td>
223                    </tr>
224                    <tr valign="top">
225                            <td width="40%" align="left" style="color: #909090">
226                            <form action="search_article.php" method="GET" id="search_form" name="search_form">
227                                    <a name="cp"></a>
228                                    <input type="hidden" id="uid" name="uid" value="{$result_set['data']['uid']}">
229                                    <input type="hidden" id="nickname" name="nickname" value="{$result_set['data']['nickname']}">
230                                    <input type="hidden" id="title" name="title" value="{$result_set['data']['title']}">
231                                    <input type="hidden" id="content" name="content" value="{$result_set['data']['content']}">
232                                    <input type="hidden" id="sid" name="sid" value="{$result_set['data']['sid']}">
233                                    <input type="hidden" id="begin_dt" name="begin_dt" value="{$result_set['data']['begin_dt']->format('Y-m-d')}">
234                                    <input type="hidden" id="end_dt" name="end_dt" value="{$result_set['data']['end_dt']->format('Y-m-d')}">
235                                    <input type="hidden" id="reply" name="reply" value="{$result_set['data']['reply']}">
236                                    <input type="hidden" id="ex" name="ex" value="{$result_set['data']['ex']}">
237                                    <input type="hidden" id="use_nick" name="use_nick" value="{$result_set['data']['use_nick']}">
238                                    <input type="hidden" id="original" name="original" value="{$result_set['data']['original']}">
239                                    <input type="hidden" id="trash" name="trash" value="{$result_set['data']['trash']}">
240                                    每页<select size="1" id="rpp" name="rpp" onchange="ch_rpp();">
241                                    {$rpp_options}
242                                    </select>篇
243            HTML;
244    
245          if ($result_set["data"]["page"] > 1)          if ($result_set["data"]["page"] > 1)
246          {          {
247  ?>                  echo <<<HTML
248  <a class="s8" title="首页" href="" onclick="return ch_page(1);">|◀</a>                          <a class="s8" title="首页" href="" onclick="return ch_page(1)">|◀</a>
249  <a class="s8" title="上一页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page"] - 1); ?>);">◀</a>                          <a class="s8" title="上一页" href="" onclick='return ch_page({$result_set["data"]["page"]} - 1)'>◀</a>
250  <?                  HTML;
251          }          }
252          else          else
253          {          {
254  ?>                  echo <<<HTML
255  |◀ ◀                          |◀ ◀
256  <?                  HTML;
257          }          }
258  ?>  
259                          第<input id="page" name="page" value="<? echo ($result_set["data"]["page"]) ; ?>" style="width: 30px;">/<? echo $result_set["data"]["page_total"]; ?>页          echo <<<HTML
260  <?                  第<input id="page" name="page" value="{$result_set['data']['page']}" style="width: 30px;">/{$result_set['data']['page_total']}页
261            HTML;
262    
263          if ($result_set["data"]["page"] < $result_set["data"]["page_total"])          if ($result_set["data"]["page"] < $result_set["data"]["page_total"])
264          {          {
265  ?>                  echo <<<HTML
266  <a class="s8" title="下一页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page"] + 1); ?>);">▶</a>                          <a class="s8" title="下一页" href="" onclick="return ch_page({$result_set['data']['page']} + 1)">▶</a>
267  <a class="s8" title="尾页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page_total"]); ?>);">▶|</a>                          <a class="s8" title="尾页" href="" onclick="return ch_page({$result_set['data']['page_total']})">▶|</a>
268  <?                  HTML;
269          }          }
270          else          else
271          {          {
272  ?>                  echo <<<HTML
273  ▶ ▶|                          ▶ ▶|
274  <?                  HTML;
275          }          }
276  ?>  
277            echo <<<HTML
278                          </form>                          </form>
279                  </td>                          </td>
280                  <td width="35%" align="left">                          <td width="35%">
281                  </td>                          </td>
282                  <td width="25%" align="right">                          <td width="25%">
283                  </td>                          </td>
284          </tr>                  </tr>
285  </table>            </table>  
286  </center>          </center>
287  <?          HTML;
288    
289          include "./foot.inc.php";          include "./foot.inc.php";
290    
291            echo <<<HTML
292            </body>
293            </html>
294            HTML;
295  ?>  ?>
 </body>  
 </html>  


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

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