| 1 |
sysadm |
1.7 |
<?php
|
| 2 |
sysadm |
1.1 |
// Prevent load standalone
|
| 3 |
|
|
if (!isset($result_set))
|
| 4 |
|
|
{
|
| 5 |
|
|
exit();
|
| 6 |
|
|
}
|
| 7 |
|
|
|
| 8 |
|
|
require_once "../lib/lml.inc.php";
|
| 9 |
|
|
require_once "../lib/str_process.inc.php";
|
| 10 |
|
|
require_once "./user_level.inc.php";
|
| 11 |
|
|
|
| 12 |
|
|
$article = $result_set["data"]["articles"][0];
|
| 13 |
sysadm |
1.9 |
|
| 14 |
|
|
$title = htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8');
|
| 15 |
|
|
|
| 16 |
|
|
$css_file = get_theme_file('css/default');
|
| 17 |
|
|
|
| 18 |
|
|
echo <<<HTML
|
| 19 |
|
|
<html>
|
| 20 |
|
|
<head>
|
| 21 |
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
| 22 |
sysadm |
1.11 |
<base href="/www/" />
|
| 23 |
sysadm |
1.9 |
<title>{$BBS_name} - {$title}</title>
|
| 24 |
|
|
<link rel="stylesheet" href="{$css_file}" type="text/css">
|
| 25 |
|
|
<style type="text/css">
|
| 26 |
|
|
TD.content
|
| 27 |
|
|
{
|
| 28 |
|
|
font-size: 16px;
|
| 29 |
|
|
line-height: 26px;
|
| 30 |
|
|
}
|
| 31 |
|
|
</style>
|
| 32 |
|
|
<script type="text/javascript" src="../js/img_adjust.js"></script>
|
| 33 |
|
|
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3013347141025996" crossorigin="anonymous">
|
| 34 |
|
|
</script>
|
| 35 |
|
|
</head>
|
| 36 |
|
|
<body>
|
| 37 |
|
|
<center>
|
| 38 |
|
|
HTML;
|
| 39 |
|
|
|
| 40 |
sysadm |
1.1 |
include "../www/head.inc.php";
|
| 41 |
sysadm |
1.9 |
|
| 42 |
|
|
$title_f = split_line(htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'), "", 70, 2, "<br />");
|
| 43 |
|
|
$transship_info = ($article["transship"] ? "转载" : "原创");
|
| 44 |
|
|
$author_type = ($article["transship"] ? "转载" : "作者");
|
| 45 |
|
|
$nickname = htmlspecialchars($article["nickname"], ENT_HTML401, 'UTF-8');
|
| 46 |
|
|
$content_f = LML(htmlspecialchars($article["content"], ENT_HTML401, 'UTF-8'), true, true, 110);
|
| 47 |
|
|
|
| 48 |
|
|
$atta_list = "";
|
| 49 |
|
|
foreach ($article["attachments"] as $attachment)
|
| 50 |
|
|
{
|
| 51 |
|
|
if (!$attachment["check"])
|
| 52 |
|
|
{
|
| 53 |
|
|
continue;
|
| 54 |
|
|
}
|
| 55 |
|
|
|
| 56 |
|
|
$filename = $attachment["filename"];
|
| 57 |
|
|
|
| 58 |
|
|
$atta_list .= <<<HTML
|
| 59 |
|
|
<img src="../www/images/dl.gif"><a class="s2" href="../bbs/dl_file.php?aid={$attachment['aid']}" target="_target">{$filename}</a> ({$attachment["size"]}字节)
|
| 60 |
|
|
HTML;
|
| 61 |
|
|
|
| 62 |
sysadm |
1.10 |
$ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
|
| 63 |
sysadm |
1.9 |
switch ($ext)
|
| 64 |
sysadm |
1.1 |
{
|
| 65 |
sysadm |
1.9 |
case "bmp":
|
| 66 |
|
|
case "gif":
|
| 67 |
|
|
case "jpg":
|
| 68 |
|
|
case "jpeg":
|
| 69 |
|
|
case "png":
|
| 70 |
|
|
case "tif":
|
| 71 |
|
|
case "tiff":
|
| 72 |
|
|
$atta_list .= <<<HTML
|
| 73 |
|
|
<br />
|
| 74 |
|
|
<img onmousewheel="return bbs_img_zoom(event, this)" src="../bbs/dl_file.php?aid={$attachment['aid']}">
|
| 75 |
|
|
HTML;
|
| 76 |
|
|
break;
|
| 77 |
|
|
}
|
| 78 |
|
|
|
| 79 |
|
|
$atta_list .= <<<HTML
|
| 80 |
sysadm |
1.1 |
<br />
|
| 81 |
sysadm |
1.9 |
HTML;
|
| 82 |
|
|
}
|
| 83 |
|
|
|
| 84 |
|
|
echo <<<HTML
|
| 85 |
|
|
<table width="1050" border="0" cellpadding="0" cellspacing="0">
|
| 86 |
sysadm |
1.12 |
<tr height=20 bgcolor=#F3F9FC>
|
| 87 |
sysadm |
1.9 |
<td width="20"> </td>
|
| 88 |
|
|
<td>{$BBS_name} >> {$title}</td>
|
| 89 |
|
|
<td width="200" align="right">本文已被浏览<font color=red>{$result_set["data"]["view_count"]}</font>次</td>
|
| 90 |
|
|
<td width="20"> </td>
|
| 91 |
|
|
</tr>
|
| 92 |
|
|
<tr>
|
| 93 |
|
|
<td colspan="4" height="1" bgcolor="gray"></td>
|
| 94 |
|
|
</tr>
|
| 95 |
|
|
<tr height="5">
|
| 96 |
|
|
<td> </td>
|
| 97 |
|
|
</tr>
|
| 98 |
|
|
</table>
|
| 99 |
|
|
<table width="1050" border="0" cellpadding="0" cellspacing="0">
|
| 100 |
|
|
<tr height="25">
|
| 101 |
|
|
<td width="5%"></td>
|
| 102 |
|
|
<td width="90%"></td>
|
| 103 |
|
|
<td width="5%"></td>
|
| 104 |
|
|
</tr>
|
| 105 |
|
|
<tr>
|
| 106 |
|
|
<td></td>
|
| 107 |
|
|
<td>
|
| 108 |
|
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
| 109 |
|
|
<tr height="30">
|
| 110 |
|
|
<td align="center"><font size="4"><b>{$title_f}</b></font> <font color="gray">[{$transship_info}]</font></td>
|
| 111 |
|
|
</tr>
|
| 112 |
|
|
<tr height="25">
|
| 113 |
|
|
<td align="center">({$article["sub_dt"]->format("Y-m-d H:i:s")}) {$author_type}:{$nickname}</td>
|
| 114 |
|
|
</tr>
|
| 115 |
|
|
<tr height="10">
|
| 116 |
|
|
<td></td>
|
| 117 |
|
|
</tr>
|
| 118 |
|
|
<tr height="1">
|
| 119 |
|
|
<td align="center" bgcolor="gray"></td>
|
| 120 |
|
|
</tr>
|
| 121 |
|
|
<tr height="25">
|
| 122 |
|
|
<td></td>
|
| 123 |
|
|
</tr>
|
| 124 |
|
|
<tr>
|
| 125 |
|
|
<td class="content">
|
| 126 |
|
|
<pre>{$content_f}</pre>
|
| 127 |
|
|
</td>
|
| 128 |
|
|
</tr>
|
| 129 |
|
|
<tr>
|
| 130 |
|
|
<td>
|
| 131 |
|
|
<br />
|
| 132 |
|
|
{$atta_list}
|
| 133 |
|
|
</td>
|
| 134 |
|
|
</tr>
|
| 135 |
|
|
<tr height="25">
|
| 136 |
|
|
<td>
|
| 137 |
|
|
</td>
|
| 138 |
|
|
</tr>
|
| 139 |
|
|
<tr height="25">
|
| 140 |
|
|
<td align="right">
|
| 141 |
|
|
已有<font color="red">{$result_set["data"]["reply_count"]}</font>人发表评论
|
| 142 |
|
|
</td>
|
| 143 |
|
|
</tr>
|
| 144 |
|
|
<tr height="10">
|
| 145 |
|
|
<td>
|
| 146 |
|
|
</td>
|
| 147 |
|
|
</tr>
|
| 148 |
|
|
<tr>
|
| 149 |
|
|
<td align="right">
|
| 150 |
|
|
【<a href="../bbs/view_article.php?id={$result_set['data']['id']}">查看回复</a>】
|
| 151 |
|
|
</td>
|
| 152 |
|
|
</tr>
|
| 153 |
|
|
</table>
|
| 154 |
|
|
</td>
|
| 155 |
|
|
<td>
|
| 156 |
|
|
</td>
|
| 157 |
|
|
</tr>
|
| 158 |
|
|
<tr height="25">
|
| 159 |
|
|
<td></td>
|
| 160 |
|
|
</tr>
|
| 161 |
|
|
</table>
|
| 162 |
|
|
HTML;
|
| 163 |
|
|
|
| 164 |
sysadm |
1.1 |
include "../www/foot.inc.php";
|
| 165 |
sysadm |
1.9 |
|
| 166 |
|
|
echo <<<HTML
|
| 167 |
|
|
</center>
|
| 168 |
|
|
</body>
|
| 169 |
|
|
</html>
|
| 170 |
|
|
HTML;
|