| 1 |
sysadm |
1.6 |
<?php
|
| 2 |
sysadm |
1.1 |
// Prevent load standalone
|
| 3 |
|
|
if (!isset($result_set))
|
| 4 |
|
|
{
|
| 5 |
|
|
exit();
|
| 6 |
|
|
}
|
| 7 |
|
|
|
| 8 |
|
|
require_once "../lib/common.inc.php";
|
| 9 |
|
|
require_once "../lib/lml.inc.php";
|
| 10 |
|
|
require_once "../lib/str_process.inc.php";
|
| 11 |
|
|
|
| 12 |
|
|
// Pre-defined color setting of article display
|
| 13 |
|
|
$color = array(
|
| 14 |
|
|
"#FAFBFC",
|
| 15 |
|
|
"#f0F3Fa"
|
| 16 |
|
|
);
|
| 17 |
|
|
$color_index = 0;
|
| 18 |
sysadm |
1.9 |
|
| 19 |
|
|
$section_path = ($result_set["data"]["ex_dir"] != null ? str_repeat("../", substr_count($result_set["data"]["ex_dir"], "/")) : "");
|
| 20 |
|
|
|
| 21 |
|
|
$title = htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8');
|
| 22 |
|
|
|
| 23 |
|
|
$ex_dir_link = "";
|
| 24 |
|
|
if ($result_set["data"]["ex_dir"] != null)
|
| 25 |
|
|
{
|
| 26 |
|
|
$ex_dir_link = <<<HTML
|
| 27 |
|
|
>><a href="index.html">{$result_set["data"]["ex_name"]}</a>
|
| 28 |
|
|
HTML;
|
| 29 |
|
|
}
|
| 30 |
|
|
|
| 31 |
|
|
echo <<<HTML
|
| 32 |
|
|
<html>
|
| 33 |
sysadm |
1.1 |
<head>
|
| 34 |
sysadm |
1.9 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
| 35 |
|
|
<base href="/gen_ex/{$result_set['data']['sid']}/{$result_set['data']['ex_dir']}{$result_set['data']['id']}.html" />
|
| 36 |
|
|
<title>{$title}</title>
|
| 37 |
|
|
<link rel="stylesheet" href="{$section_path}../article.css" type="text/css">
|
| 38 |
|
|
<style type="text/css">
|
| 39 |
|
|
SPAN.title_normal
|
| 40 |
|
|
{
|
| 41 |
|
|
color: #909090;
|
| 42 |
|
|
}
|
| 43 |
|
|
TD.content_normal
|
| 44 |
|
|
{
|
| 45 |
|
|
font-size: 16px;
|
| 46 |
|
|
}
|
| 47 |
|
|
</style>
|
| 48 |
sysadm |
1.12 |
<script src="{$section_path}../../js/img_adjust.js"></script>
|
| 49 |
sysadm |
1.1 |
</head>
|
| 50 |
|
|
<body>
|
| 51 |
|
|
<a name="top"></a>
|
| 52 |
|
|
<center>
|
| 53 |
sysadm |
1.2 |
<table border="0" cellpadding="0" cellspacing="0" width="1050">
|
| 54 |
sysadm |
1.1 |
<tr>
|
| 55 |
|
|
<td>
|
| 56 |
sysadm |
1.9 |
<a href="{$section_path}../index.html"><?= $BBS_name; ?>精华区</a>>><a href="{$section_path}index.html">{$result_set["data"]["section_title"]}</a>{$ex_dir_link}
|
| 57 |
sysadm |
1.1 |
</td>
|
| 58 |
|
|
</tr>
|
| 59 |
sysadm |
1.2 |
<tr bgcolor="#d0d3F0" height="25">
|
| 60 |
sysadm |
1.1 |
<td align="center" class="title">
|
| 61 |
sysadm |
1.9 |
[{$result_set["data"]["id"]}] 主题: {$title}
|
| 62 |
sysadm |
1.1 |
</td>
|
| 63 |
|
|
</tr>
|
| 64 |
|
|
</table>
|
| 65 |
sysadm |
1.9 |
HTML;
|
| 66 |
|
|
|
| 67 |
sysadm |
1.1 |
foreach ($result_set["data"]["articles"] as $article)
|
| 68 |
|
|
{
|
| 69 |
|
|
$color_index = ($color_index + 1) % count($color);
|
| 70 |
|
|
|
| 71 |
sysadm |
1.9 |
$username = htmlspecialchars($article["username"], ENT_HTML401, 'UTF-8');
|
| 72 |
|
|
$nickname = htmlspecialchars($article["nickname"], ENT_HTML401, 'UTF-8');
|
| 73 |
|
|
$title_f = split_line(htmlspecialchars($article["title"], ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />");
|
| 74 |
|
|
$content_f = LML(htmlspecialchars($article["content"], ENT_HTML401, 'UTF-8'), true, true, 80);
|
| 75 |
|
|
|
| 76 |
|
|
$transship_info = "";
|
| 77 |
|
|
if ($article["transship"])
|
| 78 |
|
|
{
|
| 79 |
|
|
$transship_info = <<<HTML
|
| 80 |
|
|
<font color="red">[转载]</font>
|
| 81 |
|
|
HTML;
|
| 82 |
|
|
}
|
| 83 |
|
|
|
| 84 |
sysadm |
1.1 |
if ($article["tid"] != 0)
|
| 85 |
|
|
{
|
| 86 |
sysadm |
1.9 |
echo <<<HTML
|
| 87 |
|
|
<a name="{$article['aid']}"></a>
|
| 88 |
|
|
<table border="0" cellpadding="0" cellspacing="0" width="1050">
|
| 89 |
|
|
<tr height="1" bgcolor="#202020">
|
| 90 |
|
|
<td>
|
| 91 |
|
|
</td>
|
| 92 |
|
|
</tr>
|
| 93 |
|
|
</table>
|
| 94 |
|
|
HTML;
|
| 95 |
sysadm |
1.1 |
}
|
| 96 |
sysadm |
1.9 |
|
| 97 |
|
|
$atta_list = "";
|
| 98 |
sysadm |
1.1 |
foreach ($article["attachments"] as $attachment)
|
| 99 |
|
|
{
|
| 100 |
sysadm |
1.9 |
if (!$attachment["check"])
|
| 101 |
|
|
{
|
| 102 |
|
|
continue;
|
| 103 |
|
|
}
|
| 104 |
|
|
|
| 105 |
sysadm |
1.1 |
$filename = $attachment["filename"];
|
| 106 |
sysadm |
1.8 |
$ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
|
| 107 |
sysadm |
1.1 |
|
| 108 |
|
|
if (!copy("../bbs/upload/" . $attachment["aid"], "../gen_ex/attachment/" . $attachment["aid"] . ".$ext"))
|
| 109 |
|
|
{
|
| 110 |
sysadm |
1.9 |
continue;
|
| 111 |
sysadm |
1.1 |
}
|
| 112 |
sysadm |
1.9 |
|
| 113 |
|
|
$atta_list .= <<<HTML
|
| 114 |
|
|
<a class="s2" href="{$section_path}../attachment/{$attachment['aid']}.$ext" target="_blank">{$filename}</a> ({$attachment["size"]}字节)
|
| 115 |
|
|
HTML;
|
| 116 |
|
|
|
| 117 |
sysadm |
1.1 |
switch ($ext)
|
| 118 |
|
|
{
|
| 119 |
|
|
case "bmp":
|
| 120 |
|
|
case "gif":
|
| 121 |
|
|
case "jpg":
|
| 122 |
|
|
case "jpeg":
|
| 123 |
|
|
case "png":
|
| 124 |
|
|
case "tif":
|
| 125 |
|
|
case "tiff":
|
| 126 |
sysadm |
1.9 |
$atta_list .= <<<HTML
|
| 127 |
|
|
<br />
|
| 128 |
sysadm |
1.12 |
<img onload="return img_adjust(this, {$BBS_img_max_width})" onmousewheel="return bbs_img_zoom(event, this)" src="{$section_path}../attachment/{$attachment['aid']}.$ext">
|
| 129 |
sysadm |
1.9 |
HTML;
|
| 130 |
sysadm |
1.1 |
break;
|
| 131 |
|
|
}
|
| 132 |
sysadm |
1.9 |
|
| 133 |
|
|
$atta_list .= <<<HTML
|
| 134 |
|
|
<br />
|
| 135 |
|
|
HTML;
|
| 136 |
sysadm |
1.1 |
}
|
| 137 |
sysadm |
1.9 |
|
| 138 |
|
|
echo <<<HTML
|
| 139 |
|
|
<table bgcolor="{$color[$color_index]}" border="0" cellpadding="0" cellspacing="10" width="1050">
|
| 140 |
|
|
<tr>
|
| 141 |
|
|
<td width="5%">
|
| 142 |
|
|
</td>
|
| 143 |
|
|
<td width="90%" class="body">
|
| 144 |
|
|
<span style="color: #606060">作者:</span> <span style="color: #909090">{$username} ({$nickname})</span>
|
| 145 |
|
|
</td>
|
| 146 |
|
|
<td width="5%">
|
| 147 |
|
|
</td>
|
| 148 |
|
|
</tr>
|
| 149 |
|
|
<tr>
|
| 150 |
|
|
<td>
|
| 151 |
|
|
</td>
|
| 152 |
|
|
<td class="body">
|
| 153 |
|
|
<span style="color: #606060">标题:</span>
|
| 154 |
|
|
<img src="{$section_path}../../bbs/images/expression/{$article['icon']}.gif">
|
| 155 |
|
|
<span class="title_normal">
|
| 156 |
|
|
{$title_f}
|
| 157 |
|
|
</span>
|
| 158 |
|
|
{$transship_info}
|
| 159 |
|
|
</td>
|
| 160 |
|
|
<td>
|
| 161 |
|
|
</td>
|
| 162 |
|
|
</tr>
|
| 163 |
|
|
<tr>
|
| 164 |
|
|
<td>
|
| 165 |
|
|
</td>
|
| 166 |
|
|
<td class="body">
|
| 167 |
|
|
<span style="color: #606060">来自:</span> <span style="color: #909090">{$article["sub_ip"]}</span>
|
| 168 |
|
|
</td>
|
| 169 |
|
|
<td>
|
| 170 |
|
|
</td>
|
| 171 |
|
|
</tr>
|
| 172 |
|
|
<tr>
|
| 173 |
|
|
<td>
|
| 174 |
|
|
</td>
|
| 175 |
|
|
<td class="body">
|
| 176 |
|
|
<span style="color: #606060">发贴时间:</span> <span style="color: #909090">{$article["sub_dt"]->format("Y年m月d日 H:i:s (\U\T\C P)")}</span>
|
| 177 |
|
|
</td>
|
| 178 |
|
|
<td>
|
| 179 |
|
|
</td>
|
| 180 |
|
|
</tr>
|
| 181 |
|
|
<tr>
|
| 182 |
|
|
<td>
|
| 183 |
|
|
</td>
|
| 184 |
|
|
<td class="body">
|
| 185 |
|
|
<span style="color: #606060">长度:</span> <span style="color: #909090">{$article["length"]}字</span>
|
| 186 |
|
|
</td>
|
| 187 |
|
|
<td>
|
| 188 |
|
|
</td>
|
| 189 |
|
|
</tr>
|
| 190 |
|
|
<tr height="2">
|
| 191 |
|
|
<td>
|
| 192 |
|
|
</td>
|
| 193 |
|
|
<td style="background-color: #909090">
|
| 194 |
|
|
</td>
|
| 195 |
|
|
<td>
|
| 196 |
|
|
</td>
|
| 197 |
|
|
</tr>
|
| 198 |
|
|
<tr>
|
| 199 |
|
|
<td>
|
| 200 |
|
|
</td>
|
| 201 |
|
|
<td class="content_normal">
|
| 202 |
|
|
<pre>{$content_f}</pre>
|
| 203 |
|
|
</td>
|
| 204 |
|
|
<td>
|
| 205 |
|
|
</td>
|
| 206 |
|
|
</tr>
|
| 207 |
|
|
<tr>
|
| 208 |
|
|
<td>
|
| 209 |
|
|
</td>
|
| 210 |
|
|
<td style="color: #000000">
|
| 211 |
|
|
========== * * * * * ==========
|
| 212 |
|
|
<br>
|
| 213 |
|
|
{$atta_list}
|
| 214 |
|
|
</td>
|
| 215 |
|
|
<td>
|
| 216 |
|
|
</td>
|
| 217 |
|
|
</tr>
|
| 218 |
|
|
</table>
|
| 219 |
|
|
HTML;
|
| 220 |
|
|
}
|
| 221 |
|
|
|
| 222 |
|
|
echo <<<HTML
|
| 223 |
sysadm |
1.2 |
<table border="0" cellpadding="5" cellspacing="0" width="1050">
|
| 224 |
sysadm |
1.1 |
<tr bgcolor="#d0d3F0" height="10">
|
| 225 |
|
|
<td>
|
| 226 |
|
|
</td>
|
| 227 |
|
|
</tr>
|
| 228 |
|
|
<tr>
|
| 229 |
|
|
<td>
|
| 230 |
|
|
<a href="index.html">上级目录</a>
|
| 231 |
|
|
</td>
|
| 232 |
|
|
</tr>
|
| 233 |
|
|
<tr height="10">
|
| 234 |
|
|
<td>
|
| 235 |
|
|
</td>
|
| 236 |
|
|
</tr>
|
| 237 |
|
|
<tr>
|
| 238 |
|
|
<td align="center">
|
| 239 |
sysadm |
1.9 |
Copyright © {$BBS_copyright_duration} {$BBS_name}({$BBS_host_name})<br />
|
| 240 |
sysadm |
1.1 |
All Rights Reserved
|
| 241 |
|
|
</td>
|
| 242 |
|
|
</tr>
|
| 243 |
|
|
</table>
|
| 244 |
|
|
</center>
|
| 245 |
|
|
</body>
|
| 246 |
sysadm |
1.9 |
</html>
|
| 247 |
|
|
HTML;
|