| 1 |
<? |
<?php |
| 2 |
require_once "../lib/str_process.inc.php"; |
require_once "../lib/str_process.inc.php"; |
| 3 |
?> |
|
|
<? |
|
| 4 |
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 |
| 5 |
{ |
{ |
| 6 |
$sql = "SELECT SID, title FROM section_config WHERE SID = $sid"; |
$sql = "SELECT SID, title FROM section_config WHERE SID = $sid"; |
| 24 |
|
|
| 25 |
if ($subtitle) |
if ($subtitle) |
| 26 |
{ |
{ |
| 27 |
?> |
echo <<<HTML |
| 28 |
<tr class=title_list> |
<tr class="title_list"> |
| 29 |
<td height=20 valign=bottom> |
<td height="25" valign=bottom> |
| 30 |
<a href="..//bbs/list.php?sid=<? echo $sid; ?>&ex=1" target=_blank> |
<a href="..//bbs/list.php?sid={$sid}&ex=1" target=_blank> |
| 31 |
<b><? echo $title; ?></b> |
<b>{$title}</b> |
| 32 |
</a> |
</a> |
| 33 |
</td> |
</td> |
| 34 |
</tr> |
</tr> |
| 35 |
<? |
HTML; |
| 36 |
} |
} |
| 37 |
else |
else |
| 38 |
{ |
{ |
| 39 |
?> |
echo <<<HTML |
| 40 |
<tr class=title_bar_<? echo $style; ?>> |
<tr class="title_bar_{$style}"> |
| 41 |
<td> |
<td> |
| 42 |
<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> |
| 43 |
<? echo $title; ?>>> |
{$title}>> |
| 44 |
</a> |
</a> |
| 45 |
</td> |
</td> |
| 46 |
</tr> |
</tr> |
| 47 |
<? |
HTML; |
| 48 |
} |
} |
| 49 |
?> |
|
| 50 |
|
echo <<<HTML |
| 51 |
<tr class="title_list"> |
<tr class="title_list"> |
| 52 |
<td height="8"> |
<td height="8"> |
| 53 |
</td> |
</td> |
| 54 |
</tr> |
</tr> |
| 55 |
<? |
HTML; |
| 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"; |
| 65 |
|
|
| 66 |
while($row = mysqli_fetch_array($rs)) |
while($row = mysqli_fetch_array($rs)) |
| 67 |
{ |
{ |
| 68 |
?> |
$title_f = htmlspecialchars(split_line($row["title"], "", $length, 1), ENT_HTML401, 'UTF-8'); |
| 69 |
<tr class="title_list"> |
|
| 70 |
<td height="18"> |
echo <<<HTML |
| 71 |
·<a href="../bbs/view_article.php?tn=portal&id=<? echo $row["AID"]; ?>" target=_blank> |
<tr class="title_list"> |
| 72 |
<? echo htmlspecialchars(split_line($row["title"], "", $length, 1), ENT_HTML401, 'UTF-8'); ?> |
<td height="18"> |
| 73 |
</a> |
·<a href="../bbs/view_article.php?tn=portal&id={$row["AID"]}" target=_blank> |
| 74 |
</td> |
{$title_f} |
| 75 |
</tr> |
</a> |
| 76 |
<? |
</td> |
| 77 |
|
</tr> |
| 78 |
|
HTML; |
| 79 |
} |
} |
| 80 |
mysqli_free_result($rs); |
mysqli_free_result($rs); |
| 81 |
?> |
|
| 82 |
|
echo <<<HTML |
| 83 |
<tr class="title_list"> |
<tr class="title_list"> |
| 84 |
<td height="8" align="right"> |
<td height="8" align="right"> |
| 85 |
</td> |
</td> |
| 86 |
</tr> |
</tr> |
| 87 |
<? |
HTML; |
| 88 |
|
|
| 89 |
return true; |
return true; |
| 90 |
} |
} |
| 103 |
{ |
{ |
| 104 |
return false; |
return false; |
| 105 |
} |
} |
| 106 |
?> |
|
| 107 |
|
echo <<<HTML |
| 108 |
<tr> |
<tr> |
| 109 |
<td height="8"> |
<td height="8"> |
| 110 |
</td> |
</td> |
| 111 |
</tr> |
</tr> |
| 112 |
<? |
HTML; |
| 113 |
|
|
| 114 |
while ($row = mysqli_fetch_array($rs)) |
while ($row = mysqli_fetch_array($rs)) |
| 115 |
{ |
{ |
| 116 |
?> |
$title_f = htmlspecialchars(split_line("[" . $row["s_title"] . "] " . $row["title"], "", $length, 1), ENT_HTML401, 'UTF-8'); |
| 117 |
<tr> |
|
| 118 |
<td height="18"> |
echo <<<HTML |
| 119 |
·<a href="../bbs/view_article.php?tn=portal&id=<? echo $row["AID"]; ?>" target=_blank> |
<tr> |
| 120 |
<? echo htmlspecialchars(split_line("[" . $row["s_title"] . "] " . $row["title"], "", $length, 1), ENT_HTML401, 'UTF-8'); ?> |
<td height="18"> |
| 121 |
</a> |
·<a href="../bbs/view_article.php?tn=portal&id={$row["AID"]}" target=_blank> |
| 122 |
</td> |
{$title_f} |
| 123 |
</tr> |
</a> |
| 124 |
<? |
</td> |
| 125 |
|
</tr> |
| 126 |
|
HTML; |
| 127 |
} |
} |
| 128 |
mysqli_free_result($rs); |
mysqli_free_result($rs); |
| 129 |
|
|
| 130 |
?> |
echo <<<HTML |
| 131 |
<tr> |
<tr> |
| 132 |
<td height="8"> |
<td height="8"> |
| 133 |
</td> |
</td> |
| 134 |
</tr> |
</tr> |
| 135 |
<? |
HTML; |
| 136 |
|
|
| 137 |
return true; |
return true; |
| 138 |
} |
} |
|
|
|
| 139 |
?> |
?> |