| 1 |
<?
|
| 2 |
// Prevent load standalone
|
| 3 |
if (!isset($result_set))
|
| 4 |
{
|
| 5 |
exit();
|
| 6 |
}
|
| 7 |
|
| 8 |
require_once "../lib/str_process.inc.php";
|
| 9 |
?>
|
| 10 |
<html>
|
| 11 |
<head>
|
| 12 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
| 13 |
<title>文章查找结果</title>
|
| 14 |
<link rel="stylesheet" href="<? echo get_theme_file('css/default'); ?>" type="text/css">
|
| 15 |
<style type="text/css">
|
| 16 |
TD.head,TD.favor,TD.reply,TD.dark,TD.topic
|
| 17 |
{
|
| 18 |
border-right: #d0d3F0 1px solid;
|
| 19 |
border-left: #d0d3F0 1px solid;
|
| 20 |
border-bottom: #d0d3F0 1px solid;
|
| 21 |
}
|
| 22 |
TD.head
|
| 23 |
{
|
| 24 |
font-family: 楷体;
|
| 25 |
color: blue;
|
| 26 |
}
|
| 27 |
TD.favor,TD.dark
|
| 28 |
{
|
| 29 |
text-align: center;
|
| 30 |
}
|
| 31 |
TD.reply,TD.dark
|
| 32 |
{
|
| 33 |
color: #909090;
|
| 34 |
background-color: #eaf0Fa;
|
| 35 |
}
|
| 36 |
TD.head,TD.favor
|
| 37 |
{
|
| 38 |
background-color: #fafbfc;
|
| 39 |
}
|
| 40 |
TD.favor
|
| 41 |
{
|
| 42 |
color: #c0c3F0;
|
| 43 |
font-weight: bold;
|
| 44 |
}
|
| 45 |
TD.topic
|
| 46 |
{
|
| 47 |
background-color: #fafbfc;
|
| 48 |
}
|
| 49 |
TD.topic:hover
|
| 50 |
{
|
| 51 |
background-color: #eaf0Fa;
|
| 52 |
}
|
| 53 |
</style>
|
| 54 |
|
| 55 |
<script type="text/javascript" src="../js/bbs_article.js"></script>
|
| 56 |
<script type="text/javascript">
|
| 57 |
function ch_page(page)
|
| 58 |
{
|
| 59 |
document.search_form.page.value = page;
|
| 60 |
document.search_form.submit();
|
| 61 |
return false;
|
| 62 |
}
|
| 63 |
|
| 64 |
function ch_rpp()
|
| 65 |
{
|
| 66 |
document.search_form.page.value = Math.floor((document.search_form.page.value - 1) * <? echo $result_set["data"]["rpp"]; ?> / document.search_form.rpp.value) + 1;
|
| 67 |
document.search_form.submit();
|
| 68 |
return false;
|
| 69 |
}
|
| 70 |
</script>
|
| 71 |
</head>
|
| 72 |
<body>
|
| 73 |
<center>
|
| 74 |
<table cols="5" border="0" cellpadding="0" cellspacing="0" width="770">
|
| 75 |
<tr bgcolor="#d0d3F0" height="20">
|
| 76 |
<td width="4%" class="title">状态</td>
|
| 77 |
<td width="39%" class="title">标题(共<? echo $result_set["data"]["toa"]; ?>篇)</td>
|
| 78 |
<td width="16%" class="title">作者</td>
|
| 79 |
<td width="10%" class="title">回复/人气</td>
|
| 80 |
<td width="31%" class="title">最后更新 | 回复人</td>
|
| 81 |
</tr>
|
| 82 |
</table>
|
| 83 |
<?
|
| 84 |
echo ("<script language=\"JavaScript\">\n");
|
| 85 |
|
| 86 |
foreach ($result_set["data"]["articles"] as $article)
|
| 87 |
{
|
| 88 |
$status = ($article["ontop"] ? "B" : ($article["gen_ex"] ? "G" : ($article["excerption"] ? "M" : ($article["reply_count"] < 10 ? "N" : "H"))));
|
| 89 |
$status = ($article["visited"] ? strtolower($status) : strtoupper($status));
|
| 90 |
|
| 91 |
echo ("show_article(" .
|
| 92 |
$article["tid"] . ", " . //tid
|
| 93 |
$article["aid"] . ", " . //aid
|
| 94 |
"'" . split_line(htmlspecialchars($article["title"], ENT_QUOTES | ENT_HTML401, 'UTF-8'), "", 42, 2, "<br />") . "', " . //title
|
| 95 |
($result_set["data"]["ex"] > 0 ? 1 : 0) . ", " . //ex
|
| 96 |
"'$status', " . //status
|
| 97 |
"'" . $article["sub_dt"]->format("Y-m-d H:i") . "', " . //sub_dt
|
| 98 |
"'" . $article["length"] . "', " . //length
|
| 99 |
$article["icon"] . " ," . //icon
|
| 100 |
$article["uid"] . ", " . //uid
|
| 101 |
"'" . htmlspecialchars($article["username"], ENT_QUOTES | ENT_HTML401, 'UTF-8') . "', " . //username
|
| 102 |
"'" . htmlspecialchars($article["nickname"], ENT_QUOTES | ENT_HTML401, 'UTF-8') . "', " . //nickname
|
| 103 |
$article["reply_count"] . ", " . //reply_count
|
| 104 |
$article["view_count"] . ", " . //view_count
|
| 105 |
$article["transship"] . ", " . //transship
|
| 106 |
$article["lock"] . ", " . //lock
|
| 107 |
"'" . $article["last_reply_dt"]->format("Y-m-d H:i") . "', " . //last_reply_dt
|
| 108 |
$article["last_reply_uid"] . ", " . //last_reply_uid
|
| 109 |
"'" . htmlspecialchars($article["last_reply_username"], ENT_QUOTES | ENT_HTML401, 'UTF-8') . "', " . //last_reply_username
|
| 110 |
"'" . htmlspecialchars($article["last_reply_nickname"], ENT_QUOTES | ENT_HTML401, 'UTF-8') . "', " . //last_reply_nickname
|
| 111 |
($result_set["data"]["trash"] ? 1 : 0) . ", " . //visible_mode
|
| 112 |
"1, " . //use_nick
|
| 113 |
"'" . htmlspecialchars($article["class_name"], ENT_QUOTES | ENT_HTML401, 'UTF-8') . "'," . //cname
|
| 114 |
"'" . htmlspecialchars($article["class_title"], ENT_QUOTES | ENT_HTML401, 'UTF-8') . "'," . //c_title
|
| 115 |
"'" . htmlspecialchars($article["section_name"], ENT_QUOTES | ENT_HTML401, 'UTF-8') . "'," . //sname
|
| 116 |
"'" . htmlspecialchars($article["section_title"], ENT_QUOTES | ENT_HTML401, 'UTF-8') . "'," . //s_title
|
| 117 |
");\n");
|
| 118 |
}
|
| 119 |
|
| 120 |
echo ("</script>\n");
|
| 121 |
?>
|
| 122 |
<table cols="3" border="0" cellpadding="0" cellspacing="0" width="770">
|
| 123 |
<tr bgcolor="#d0d3F0" height="5">
|
| 124 |
<td colspan="3"></td>
|
| 125 |
</tr>
|
| 126 |
<tr height="10">
|
| 127 |
<td colspan="3"></td>
|
| 128 |
</tr>
|
| 129 |
<tr valign="top">
|
| 130 |
<td width="40%" align="left" style="color:#909090">
|
| 131 |
<form action="search_article.php" method="GET" id="search_form" name="search_form">
|
| 132 |
<a name="cp"></a>
|
| 133 |
<input type="hidden" id="uid" name="uid" value="<? echo $result_set["data"]["uid"];?>">
|
| 134 |
<input type="hidden" id="nickname" name="nickname" value="<? echo $result_set["data"]["nickname"];?>">
|
| 135 |
<input type="hidden" id="title" name="title" value="<? echo $result_set["data"]["title"];?>">
|
| 136 |
<input type="hidden" id="content" name="content" value="<? echo $result_set["data"]["content"];?>">
|
| 137 |
<input type="hidden" id="sid" name="sid" value="<? echo $result_set["data"]["sid"];?>">
|
| 138 |
<input type="hidden" id="begin_dt" name="begin_dt" value="<? echo $result_set["data"]["begin_dt"]->format("Y-m-d");?>">
|
| 139 |
<input type="hidden" id="end_dt" name="end_dt" value="<? echo $result_set["data"]["end_dt"]->format("Y-m-d");?>">
|
| 140 |
<input type="hidden" id="reply" name="reply" value="<? echo $result_set["data"]["reply"]; ?>">
|
| 141 |
<input type="hidden" id="ex" name="ex" value="<? echo $result_set["data"]["ex"]; ?>">
|
| 142 |
<input type="hidden" id="original" name="original" value="<? echo $result_set["data"]["original"]; ?>">
|
| 143 |
<input type="hidden" id="trash" name="trash" value="<? echo $result_set["data"]["trash"]; ?>">
|
| 144 |
每页<select size="1" id="rpp" name="rpp" onchange="ch_rpp();">
|
| 145 |
<?
|
| 146 |
foreach ($BBS_list_rpp_options as $v)
|
| 147 |
{
|
| 148 |
echo ("<option value=\"$v\"" . ($v == $result_set["data"]["rpp"] ? " selected" : "") . ">$v</option>");
|
| 149 |
}
|
| 150 |
?>
|
| 151 |
</select>篇
|
| 152 |
<?
|
| 153 |
if ($result_set["data"]["page"] > 1)
|
| 154 |
{
|
| 155 |
?>
|
| 156 |
<a class="s8" title="首页" href="" onclick="return ch_page(1);"><font face=webdings>9</font></a>
|
| 157 |
<a class="s8" title="上一页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page"] - 1); ?>);"><font face=webdings>7</font></a>
|
| 158 |
<?
|
| 159 |
}
|
| 160 |
else
|
| 161 |
{
|
| 162 |
?>
|
| 163 |
<font face=webdings>9 7</font>
|
| 164 |
<?
|
| 165 |
}
|
| 166 |
?>
|
| 167 |
第<input id="page" name="page" value="<? echo ($result_set["data"]["page"]) ; ?>" style="width: 30px;">/<? echo $result_set["data"]["page_total"]; ?>页
|
| 168 |
<?
|
| 169 |
if ($result_set["data"]["page"] < $result_set["data"]["page_total"])
|
| 170 |
{
|
| 171 |
?>
|
| 172 |
<a class="s8" title="下一页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page"] + 1); ?>);"><font face=webdings>8</font></a>
|
| 173 |
<a class="s8" title="尾页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page_total"]); ?>);"><font face=webdings>:</font></a>
|
| 174 |
<?
|
| 175 |
}
|
| 176 |
else
|
| 177 |
{
|
| 178 |
?>
|
| 179 |
<font face=webdings>8 :</font>
|
| 180 |
<?
|
| 181 |
}
|
| 182 |
?>
|
| 183 |
</form>
|
| 184 |
</td>
|
| 185 |
<td width="35%" align="left">
|
| 186 |
</td>
|
| 187 |
<td width="25%" align="right">
|
| 188 |
</td>
|
| 189 |
</tr>
|
| 190 |
</table>
|
| 191 |
</center>
|
| 192 |
<?
|
| 193 |
include "./foot.inc.php";
|
| 194 |
?>
|
| 195 |
</body>
|
| 196 |
</html>
|