/[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.1 by sysadm, Sat Apr 12 06:31:56 2025 UTC Revision 1.4 by sysadm, Mon Apr 14 11:23:46 2025 UTC
# Line 6  Line 6 
6          }          }
7    
8          require_once "../lib/str_process.inc.php";          require_once "../lib/str_process.inc.php";
9    
10            function pic_file(string $status) : string
11            {
12                    switch(strtoupper($status))
13                    {
14                            case "H":
15                                    $file = "hotclosed.gif";
16                                    break;
17                            case "M":
18                                    $file = "hotfolder.gif";
19                                    break;
20                            case "G":
21                                    $file = "star.gif";
22                                    break;
23                            case "B":
24                                    $file = "settop.gif";
25                                    break;
26                            default:
27                                    $file = "closed.gif";
28                    }
29                            
30                    return($file);
31            }
32  ?>  ?>
33  <html>  <html>
34  <head>  <head>
# Line 52  TD.topic:hover Line 75  TD.topic:hover
75  }  }
76  </style>  </style>
77    
 <script type="text/javascript" src="../js/bbs_article.js"></script>  
78  <script type="text/javascript">  <script type="text/javascript">
79  function ch_page(page)  function ch_page(page)
80  {  {
# Line 71  function ch_rpp() Line 93  function ch_rpp()
93  </head>  </head>
94  <body>  <body>
95  <center>  <center>
96  <table cols="5" border="0" cellpadding="0" cellspacing="0" width="770">  <table cols="5" border="0" cellpadding="0" cellspacing="0" width="1050" >
97          <tr bgcolor="#d0d3F0" height="20">          <tr bgcolor="#d0d3F0" height="25">
98                  <td width="4%" class="title">状态</td>                  <td width="4%" class="title">状态</td>
99                  <td width="39%" class="title">标题(共<? echo $result_set["data"]["toa"]; ?>篇)</td>                  <td width="39%" class="title">标题(共<? echo $result_set["data"]["toa"]; ?>篇)</td>
100                  <td width="16%" class="title">作者</td>                  <td width="16%" class="title">作者</td>
# Line 80  function ch_rpp() Line 102  function ch_rpp()
102                  <td width="31%" class="title">最后更新 | 回复人</td>                  <td width="31%" class="title">最后更新 | 回复人</td>
103          </tr>          </tr>
104  </table>  </table>
105    <table cols="5" border="0" cellpadding="0" cellspacing="0" width="1050">
106  <?  <?
107          echo ("<script language=\"JavaScript\">\n");          $ex = ($result_set["data"]["ex"] > 0 ? 1 : 0);
108    
109          foreach ($result_set["data"]["articles"] as $article)          foreach ($result_set["data"]["articles"] as $article)
110          {          {
111                  $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"))));
112                  $status = ($article["visited"] ? strtolower($status) : strtoupper($status));                  $status = ($article["visited"] ? strtolower($status) : strtoupper($status));
113    
114                  echo ("show_article(" .                  if ($status == "n" || $status == "h")
115                          $article["tid"] . ", " . //tid                  {
116                          $article["aid"] . ", " . //aid                          $ss = "";
117                          "'" . split_line(htmlspecialchars($article["title"], ENT_QUOTES | ENT_HTML401, 'UTF-8'), "", 42, 2, "<br />") . "', " . //title                  }
118                          ($result_set["data"]["ex"] > 0 ? 1 : 0) . ", " . //ex                  else if ($status == "H")
119                          "'$status', " . //status                  {
120                          "'" . $article["sub_dt"]->format("Y-m-d H:i") . "', " . //sub_dt                          $ss = "N";
121                          "'" . $article["length"] . "', " . //length                  }
122                          $article["icon"] . " ," . //icon                  else
123                          $article["uid"] . ", " . //uid                  {
124                          "'" . htmlspecialchars($article["username"], ENT_QUOTES | ENT_HTML401, 'UTF-8') . "', " . //username                          $ss = $status;
125                          "'" . htmlspecialchars($article["nickname"], ENT_QUOTES | ENT_HTML401, 'UTF-8') . "', " . //nickname                  }
126                          $article["reply_count"] . ", " . //reply_count  
127                          $article["view_count"] . ", " . //view_count                  $status_str = "<font color=#b0b0b0>$ss</font>";
128                          $article["transship"] . ", " . //transship  
129                          $article["lock"] . ", " . //lock                  if ($article["lock"])
130                          "'" . $article["last_reply_dt"]->format("Y-m-d H:i") . "', " . //last_reply_dt                  {
131                          $article["last_reply_uid"] . ", " . //last_reply_uid                          $status_str .= "<font color=red>x</font>";
132                          "'" . htmlspecialchars($article["last_reply_username"], ENT_QUOTES | ENT_HTML401, 'UTF-8') . "', " . //last_reply_username                  }
133                          "'" . htmlspecialchars($article["last_reply_nickname"], ENT_QUOTES | ENT_HTML401, 'UTF-8') . "', " . //last_reply_nickname                  
134                          ($result_set["data"]["trash"] ? 1 : 0) . ", " . //visible_mode                  $title = split_line(htmlspecialchars($article["title"], ENT_QUOTES | ENT_HTML401, 'UTF-8'), "", 50, 2, "<br />");
135                          "1, " . //use_nick                  $username = htmlspecialchars($article["username"], ENT_QUOTES | ENT_HTML401, 'UTF-8');
136                          "'" . htmlspecialchars($article["class_name"], ENT_QUOTES | ENT_HTML401, 'UTF-8') . "'," . //cname                  $nickname = htmlspecialchars($article["nickname"], ENT_QUOTES | ENT_HTML401, 'UTF-8');
137                          "'" . htmlspecialchars($article["class_title"], ENT_QUOTES | ENT_HTML401, 'UTF-8') . "'," . //c_title                  $last_reply_username = htmlspecialchars($article["last_reply_username"], ENT_QUOTES | ENT_HTML401, 'UTF-8');
138                          "'" . htmlspecialchars($article["section_name"], ENT_QUOTES | ENT_HTML401, 'UTF-8') . "'," . //sname                  $last_reply_nickname = htmlspecialchars($article["last_reply_nickname"], ENT_QUOTES | ENT_HTML401, 'UTF-8');
139                          "'" . htmlspecialchars($article["section_title"], ENT_QUOTES | ENT_HTML401, 'UTF-8') . "'," . //s_title                  $class_title = htmlspecialchars($article["class_title"], ENT_QUOTES | ENT_HTML401, 'UTF-8');
140                          ");\n");                  $section_title = htmlspecialchars($article["section_title"], ENT_QUOTES | ENT_HTML401, 'UTF-8');
141    ?>
142            <tr height="30">
143                    <td width="4%" class="dark">
144                            <a class="s0" href="view_article.php?tn=xml&rpp=20&id=<? echo $article["aid"]; ?>&ex=<? echo $ex; ?>#<? echo $article["aid"]; ?>" target=_blank>
145                                    <img src="images/<? echo pic_file($status); ?>" border="0">
146                            </a>
147                    </td>
148                    <td width="39%" class="topic">
149                    <font color="green"><? echo $class_title; ?>&gt;&gt;</font>
150                    <font color="green"><? echo $section_title; ?>&gt;&gt;</font><br />
151    
152                            <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"]; ?>字">
153                                    <img src="images/expression/<? echo $article["icon"]; ?>.gif" border="0">
154    <?
155                    if ($article["transship"])
156                    {
157    ?>
158                                    <font color=#b0b0b0>[转]</font>
159    <?      
160                    }
161    ?>
162                                    <? echo $title; ?>
163                            </a>
164                            <? echo $status_str; ?>
165                    </td>
166                    <td width="16%" class="dark">
167                            <a class="s2" href="show_profile.php?uid=<? echo $article["uid"]; ?>" title="<? echo $article["username"]; ?>" target=_blank>
168                                    <? echo $article["nickname"]; ?>
169                            </a>
170                    </td>
171                    <td width="10%" class="favor">
172                            <? echo $article["reply_count"]; ?>/<? echo $article["view_count"]; ?>
173                    </td>
174                    <td width="31%" class="reply"><? echo $article["last_reply_dt"]->format("Y-m-d H:i:s"); ?> |
175    <?
176                    if ($article["reply_count"] > 0)
177                    {
178    ?>
179                            <a class="s2" href="show_profile.php?uid=<? echo $article["last_reply_uid"]; ?>" title="<? echo $article["last_reply_username"]; ?>" target=_blank>
180                                    <? echo $article["last_reply_nickname"]; ?>
181                            </a>
182    <?
183                    }
184                    else
185                    {
186    ?>
187                            ------
188    <?      
189                    }
190    ?>
191                    </td>
192            </tr>
193    <?
194          }          }
   
         echo ("</script>\n");  
195  ?>  ?>
196  <table cols="3" border="0" cellpadding="0" cellspacing="0" width="770">  </table>
197    <table cols="3" border="0" cellpadding="0" cellspacing="0" width="1050">
198          <tr bgcolor="#d0d3F0" height="5">          <tr bgcolor="#d0d3F0" height="5">
199                  <td colspan="3"></td>                  <td colspan="3"></td>
200          </tr>          </tr>
# Line 153  function ch_rpp() Line 228  function ch_rpp()
228          if ($result_set["data"]["page"] > 1)          if ($result_set["data"]["page"] > 1)
229          {          {
230  ?>  ?>
231  <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>
232  <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(<? echo ($result_set["data"]["page"] - 1); ?>);">◀</a>
233  <?  <?
234          }          }
235          else          else
236          {          {
237  ?>  ?>
238  <font face=webdings>9 7</font>  |◀ ◀
239  <?  <?
240          }          }
241  ?>  ?>
# Line 169  function ch_rpp() Line 244  function ch_rpp()
244          if ($result_set["data"]["page"] < $result_set["data"]["page_total"])          if ($result_set["data"]["page"] < $result_set["data"]["page_total"])
245          {          {
246  ?>  ?>
247  <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(<? echo ($result_set["data"]["page"] + 1); ?>);">▶</a>
248  <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(<? echo ($result_set["data"]["page_total"]); ?>);">▶|</a>
249  <?  <?
250          }          }
251          else          else
252          {          {
253  ?>  ?>
254  <font face=webdings>8 :</font>  ▶ ▶|
255  <?  <?
256          }          }
257  ?>  ?>


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

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