/[LeafOK_CVS]/fenglin/www/load_doc_list.inc.php
ViewVC logotype

Diff of /fenglin/www/load_doc_list.inc.php

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

Revision 1.14 by sysadm, Mon Apr 14 05:09:58 2025 UTC Revision 1.15 by sysadm, Wed Apr 23 05:20:46 2025 UTC
# Line 1  Line 1 
1  <?  <?php
2          require_once "../lib/str_process.inc.php";          require_once "../lib/str_process.inc.php";
3  ?>  ?>
4  <?  <?php
5  function load_doc_list(string $sid, int $num, int $length, int $style, bool $subtitle, mysqli $db_conn) : bool  function load_doc_list(string $sid, int $num, int $length, int $style, bool $subtitle, mysqli $db_conn) : bool
6  {  {
7          $sql = "SELECT SID, title FROM section_config WHERE SID = $sid";          $sql = "SELECT SID, title FROM section_config WHERE SID = $sid";
# Line 28  function load_doc_list(string $sid, int Line 28  function load_doc_list(string $sid, int
28  ?>  ?>
29          <tr class=title_list>          <tr class=title_list>
30                  <td height="25" valign=bottom>                  <td height="25" valign=bottom>
31                          <a href="..//bbs/list.php?sid=<? echo $sid; ?>&ex=1" target=_blank>                          <a href="..//bbs/list.php?sid=<?= $sid; ?>&ex=1" target=_blank>
32                                  <b><? echo $title; ?></b>                                  <b><?= $title; ?></b>
33                          </a>                          </a>
34                  </td>                  </td>
35          </tr>          </tr>
# Line 38  function load_doc_list(string $sid, int Line 38  function load_doc_list(string $sid, int
38          else          else
39          {          {
40  ?>  ?>
41          <tr class=title_bar_<? echo $style; ?>>          <tr class=title_bar_<?= $style; ?>>
42                  <td>                  <td>
43                          <a class="guide" href="../bbs/list.php?sid=<? echo $sid; ?>&ex=1" target=_blank>                          <a class="guide" href="../bbs/list.php?sid=<?= $sid; ?>&ex=1" target=_blank>
44                                  <? echo $title; ?>&gt;&gt;                                  <?= $title; ?>&gt;&gt;
45                          </a>                          </a>
46                  </td>                  </td>
47          </tr>          </tr>
48  <?  <?php
49          }          }
50  ?>  ?>
51          <tr class="title_list">          <tr class="title_list">
52                  <td height="8">                  <td height="8">
53                  </td>                  </td>
54          </tr>          </tr>
55  <?  <?php
56    
57          $sql = "SELECT AID, title FROM bbs WHERE TID = 0 AND SID = $sid AND excerption          $sql = "SELECT AID, title FROM bbs WHERE TID = 0 AND SID = $sid AND excerption
58                          AND visible ORDER BY ontop DESC, AID DESC LIMIT $num";                          AND visible ORDER BY ontop DESC, AID DESC LIMIT $num";
# Line 68  function load_doc_list(string $sid, int Line 68  function load_doc_list(string $sid, int
68  ?>  ?>
69          <tr class="title_list">          <tr class="title_list">
70                  <td height="18">                  <td height="18">
71                          ·<a href="../bbs/view_article.php?tn=portal&id=<? echo $row["AID"]; ?>" target=_blank>                          ·<a href="../bbs/view_article.php?tn=portal&id=<?= $row["AID"]; ?>" target=_blank>
72                                  <? echo htmlspecialchars(split_line($row["title"], "", $length, 1), ENT_HTML401, 'UTF-8'); ?>                                  <?= htmlspecialchars(split_line($row["title"], "", $length, 1), ENT_HTML401, 'UTF-8'); ?>
73                          </a>                          </a>
74                  </td>                  </td>
75          </tr>          </tr>
76  <?  <?php
77          }          }
78          mysqli_free_result($rs);          mysqli_free_result($rs);
79  ?>  ?>
# Line 81  function load_doc_list(string $sid, int Line 81  function load_doc_list(string $sid, int
81                  <td height="8" align="right">                  <td height="8" align="right">
82                  </td>                  </td>
83          </tr>          </tr>
84  <?  <?php
85    
86          return true;          return true;
87  }  }
# Line 105  function load_top(int $num, int $length, Line 105  function load_top(int $num, int $length,
105                  <td height="8">                  <td height="8">
106                  </td>                  </td>
107          </tr>          </tr>
108  <?  <?php
109          while ($row = mysqli_fetch_array($rs))          while ($row = mysqli_fetch_array($rs))
110          {          {
111  ?>  ?>
112          <tr>          <tr>
113                  <td height="18">                  <td height="18">
114                          ·<a href="../bbs/view_article.php?tn=portal&id=<? echo $row["AID"]; ?>" target=_blank>                          ·<a href="../bbs/view_article.php?tn=portal&id=<?= $row["AID"]; ?>" target=_blank>
115                                  <? echo htmlspecialchars(split_line("[" . $row["s_title"] . "] " . $row["title"], "", $length, 1), ENT_HTML401, 'UTF-8'); ?>                                  <?= htmlspecialchars(split_line("[" . $row["s_title"] . "] " . $row["title"], "", $length, 1), ENT_HTML401, 'UTF-8'); ?>
116                          </a>                          </a>
117                  </td>                  </td>
118          </tr>          </tr>
119  <?  <?php
120          }          }
121          mysqli_free_result($rs);          mysqli_free_result($rs);
122    
# Line 125  function load_top(int $num, int $length, Line 125  function load_top(int $num, int $length,
125                  <td height="8">                  <td height="8">
126                  </td>                  </td>
127          </tr>          </tr>
128  <?  <?php
129    
130          return true;          return true;
131  }  }


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

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