| 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"; |
| 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> |
| 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; ?>>> |
<?= $title; ?>>> |
| 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"; |
| 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 |
?> |
?> |
| 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 |
} |
} |
| 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 |
|
|
| 125 |
<td height="8"> |
<td height="8"> |
| 126 |
</td> |
</td> |
| 127 |
</tr> |
</tr> |
| 128 |
<? |
<?php |
| 129 |
|
|
| 130 |
return true; |
return true; |
| 131 |
} |
} |