| 26 |
default: |
default: |
| 27 |
$file = "closed.gif"; |
$file = "closed.gif"; |
| 28 |
} |
} |
| 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="<?= 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) * <?= $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">标题(共<?= $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 |
<?php |
</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) |
| 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") |
|
$ss = ""; |
|
|
} |
|
|
else if ($status == "H") |
|
| 120 |
{ |
{ |
| 121 |
$ss = "N"; |
$status_str = <<<HTML |
| 122 |
|
<font color="#b0b0b0">N</font> |
| 123 |
|
HTML; |
| 124 |
} |
} |
| 125 |
else |
else if ($status != "n" && $status != "h") |
| 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 |
$user_viewable = (isset($result_set["data"]["author_list"][$article["uid"]])); |
$name = htmlspecialchars(($result_set["data"]["use_nick"] ? $article["nickname"] : $article["username"]), ENT_HTML401, 'UTF-8'); |
| 143 |
$last_reply_username = htmlspecialchars($article["last_reply_username"], ENT_QUOTES | ENT_HTML401, 'UTF-8'); |
$name_alt = htmlspecialchars(($result_set["data"]["use_nick"] ? $article["username"] : $article["nickname"]), ENT_QUOTES, 'UTF-8'); |
| 144 |
$last_reply_nickname = htmlspecialchars($article["last_reply_nickname"], ENT_QUOTES | ENT_HTML401, 'UTF-8'); |
$last_reply_user_viewable = (isset($result_set["data"]["author_list"][$article["last_reply_uid"]]) ? "true" : "false"); |
| 145 |
$last_reply_user_viewable = (isset($result_set["data"]["author_list"][$article["last_reply_uid"]])); |
$last_reply_name = htmlspecialchars(($result_set["data"]["use_nick"] ? $article["last_reply_nickname"] : $article["last_reply_username"]), ENT_HTML401, 'UTF-8'); |
| 146 |
$class_title = htmlspecialchars($article["class_title"], ENT_QUOTES | ENT_HTML401, 'UTF-8'); |
$last_reply_name_alt = htmlspecialchars(($result_set["data"]["use_nick"] ? $article["last_reply_username"] : $article["last_reply_nickname"]), ENT_QUOTES, 'UTF-8'); |
| 147 |
$section_title = htmlspecialchars($article["section_title"], ENT_QUOTES | ENT_HTML401, 'UTF-8'); |
$class_title = htmlspecialchars($article["class_title"], ENT_HTML401, 'UTF-8'); |
| 148 |
?> |
$section_title = htmlspecialchars($article["section_title"], ENT_HTML401, 'UTF-8'); |
| 149 |
<tr height="30"> |
|
| 150 |
<td width="4%" class="dark"> |
$transship_info = ""; |
|
<a class="s0" href="view_article.php?tn=xml&rpp=20&id=<?= $article["aid"]; ?>&ex=<?= $ex; ?>#<?= $article["aid"]; ?>" target=_blank> |
|
|
<img src="images/<?= pic_file($status); ?>" border="0"> |
|
|
</a> |
|
|
</td> |
|
|
<td width="39%" class="topic"> |
|
|
<font color="green"><?= $class_title; ?>>></font> |
|
|
<font color="green"><?= $section_title; ?>>></font><br /> |
|
|
|
|
|
<a class="s0" href="view_article.php?id=<?= $article["aid"]; ?>&ex=<?= $ex; ?>&trash=<?= ($result_set["data"]["trash"] ? 1 : 0); ?>#<?= $article["aid"]; ?>" target=_blank title="发表时间:<?= $article["sub_dt"]->format("Y-m-d H:i:s") . "\n"; ?>文章长度:<?= $article["length"]; ?>字"> |
|
|
<img src="images/expression/<?= $article["icon"]; ?>.gif" border="0"> |
|
|
<?php |
|
| 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 |
?> |
|
|
<?= $title; ?> |
|
|
</a> |
|
|
<?= $status_str; ?> |
|
|
</td> |
|
|
<td width="16%" class="dark"> |
|
|
<a class="s2" href="show_profile.php?uid=<?= $article["uid"]; ?>" onclick='return <?= ($user_viewable ? "true" : "false"); ?>' title="<?= $article["username"]; ?>" target=_blank> |
|
|
<?= $article["nickname"]; ?> |
|
|
</a> |
|
|
</td> |
|
|
<td width="10%" class="favor"> |
|
|
<?= $article["reply_count"]; ?>/<?= $article["view_count"]; ?> |
|
|
</td> |
|
|
<td width="31%" class="reply"><?= $article["last_reply_dt"]->format("Y-m-d H:i:s"); ?> | |
|
|
<?php |
|
| 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=<?= $article["last_reply_uid"]; ?>" onclick='return <?= ($last_reply_user_viewable ? "true" : "false"); ?>' title="<?= $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 |
<?= $article["last_reply_nickname"]; ?> |
{$last_reply_name} |
| 163 |
</a> |
</a> |
| 164 |
<?php |
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 |
<?php |
<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 |
</table> |
</a> |
| 179 |
<table cols="3" border="0" cellpadding="0" cellspacing="0" width="1050"> |
</td> |
| 180 |
<tr bgcolor="#d0d3F0" height="5"> |
<td width="39%" class="topic"> |
| 181 |
<td colspan="3"></td> |
<font color="green">{$class_title}>>{$section_title}>></font><br /> |
| 182 |
</tr> |
<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 |
<tr height="10"> |
<img src="images/expression/{$article['icon']}.gif" border="0"> |
| 184 |
<td colspan="3"></td> |
{$transship_info} |
| 185 |
</tr> |
{$title} |
| 186 |
<tr valign="top"> |
</a> |
| 187 |
<td width="40%" align="left" style="color: #909090"> |
{$status_str} |
| 188 |
<form action="search_article.php" method="GET" id="search_form" name="search_form"> |
</td> |
| 189 |
<a name="cp"></a> |
<td width="16%" class="dark"> |
| 190 |
<input type="hidden" id="uid" name="uid" value="<?= $result_set["data"]["uid"];?>"> |
<a class="s2" href="view_user.php?uid={$article['uid']}" onclick="return {$user_viewable}" title="{$name_alt}" target="_blank"> |
| 191 |
<input type="hidden" id="nickname" name="nickname" value="<?= $result_set["data"]["nickname"];?>"> |
{$name} |
| 192 |
<input type="hidden" id="title" name="title" value="<?= $result_set["data"]["title"];?>"> |
</a> |
| 193 |
<input type="hidden" id="content" name="content" value="<?= $result_set["data"]["content"];?>"> |
</td> |
| 194 |
<input type="hidden" id="sid" name="sid" value="<?= $result_set["data"]["sid"];?>"> |
<td width="10%" class="favor"> |
| 195 |
<input type="hidden" id="begin_dt" name="begin_dt" value="<?= $result_set["data"]["begin_dt"]->format("Y-m-d");?>"> |
{$article["reply_count"]}/{$article["view_count"]} |
| 196 |
<input type="hidden" id="end_dt" name="end_dt" value="<?= $result_set["data"]["end_dt"]->format("Y-m-d");?>"> |
</td> |
| 197 |
<input type="hidden" id="reply" name="reply" value="<?= $result_set["data"]["reply"]; ?>"> |
<td width="31%" class="reply"> |
| 198 |
<input type="hidden" id="ex" name="ex" value="<?= $result_set["data"]["ex"]; ?>"> |
{$article["last_reply_dt"]->format("Y-m-d H:i:s")} | {$last_reply_info} |
| 199 |
<input type="hidden" id="original" name="original" value="<?= $result_set["data"]["original"]; ?>"> |
</td> |
| 200 |
<input type="hidden" id="trash" name="trash" value="<?= $result_set["data"]["trash"]; ?>"> |
</tr> |
| 201 |
每页<select size="1" id="rpp" name="rpp" onchange="ch_rpp();"> |
|
| 202 |
<?php |
HTML; |
| 203 |
|
} |
| 204 |
|
|
| 205 |
|
$rpp_options = ""; |
| 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 |
<?php |
</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(<?= ($result_set["data"]["page"] - 1); ?>);">◀</a> |
<a class="s8" title="上一页" href="" onclick='return ch_page({$result_set["data"]["page"]} - 1)'>◀</a> |
| 250 |
<?php |
HTML; |
| 251 |
} |
} |
| 252 |
else |
else |
| 253 |
{ |
{ |
| 254 |
?> |
echo <<<HTML |
| 255 |
|◀ ◀ |
|◀ ◀ |
| 256 |
<?php |
HTML; |
| 257 |
} |
} |
| 258 |
?> |
|
| 259 |
第<input id="page" name="page" value="<?= ($result_set["data"]["page"]) ; ?>" style="width: 30px;">/<?= $result_set["data"]["page_total"]; ?>页 |
echo <<<HTML |
| 260 |
<?php |
第<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(<?= ($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(<?= ($result_set["data"]["page_total"]); ?>);">▶|</a> |
<a class="s8" title="尾页" href="" onclick="return ch_page({$result_set['data']['page_total']})">▶|</a> |
| 268 |
<?php |
HTML; |
| 269 |
} |
} |
| 270 |
else |
else |
| 271 |
{ |
{ |
| 272 |
?> |
echo <<<HTML |
| 273 |
▶ ▶| |
▶ ▶| |
| 274 |
<?php |
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 |
<?php |
HTML; |
| 288 |
|
|
| 289 |
include "./foot.inc.php"; |
include "./foot.inc.php"; |
| 290 |
?> |
|
| 291 |
</body> |
echo <<<HTML |
| 292 |
</html> |
</body> |
| 293 |
|
</html> |
| 294 |
|
HTML; |