| 1 |
<? |
<?php |
| 2 |
// Prevent load standalone |
// Prevent load standalone |
| 3 |
if (!isset($result_set)) |
if (!isset($result_set)) |
| 4 |
{ |
{ |
| 9 |
<head> |
<head> |
| 10 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 11 |
<title>发表文章</title> |
<title>发表文章</title> |
| 12 |
<link rel="stylesheet" href="<? echo get_theme_view_file("css"); ?>" type="text/css"> |
<link rel="stylesheet" href="<?= get_theme_file('css/default'); ?>" type="text/css"> |
| 13 |
<script type="text/javascript" src="../js/nw_open.js"></script> |
<script type="text/javascript" src="<?= get_theme_file('js/lml_assistant'); ?>"></script> |
|
<script type="text/javascript" src="../js/lml_assistant.js"></script> |
|
| 14 |
<script src="../js/polyfill.min.js"></script> |
<script src="../js/polyfill.min.js"></script> |
| 15 |
<script src="../js/axios.min.js"></script> |
<script src="../js/axios.min.js"></script> |
| 16 |
<script type="text/javascript"> |
<script type="text/javascript"> |
| 34 |
function post_article(f) |
function post_article(f) |
| 35 |
{ |
{ |
| 36 |
instance.post('post_service.php', { |
instance.post('post_service.php', { |
| 37 |
id: <? echo $result_set["data"]["id"]; ?>, |
id: <?= $result_set["data"]["id"]; ?>, |
| 38 |
reply_id: <? echo $result_set["data"]["reply_id"]; ?>, |
reply_id: <?= $result_set["data"]["reply_id"]; ?>, |
| 39 |
sid: <? echo $result_set["data"]["sid"]; ?>, |
sid: <?= $result_set["data"]["sid"]; ?>, |
| 40 |
title: f.textarea_title.value, |
title: f.textarea_title.value, |
| 41 |
transship: (f.transship != null && f.transship.checked ? "1" : "0"), |
transship: (f.transship != null && f.transship.checked ? "1" : "0"), |
| 42 |
content: f.textarea_content.value, |
content: f.textarea_content.value, |
| 144 |
</head> |
</head> |
| 145 |
<body> |
<body> |
| 146 |
<center> |
<center> |
| 147 |
<table border="0" cellpadding="1" cellspacing="0" width="770"> |
<table border="0" cellpadding="1" cellspacing="0" width="1050"> |
| 148 |
<tr> |
<tr> |
| 149 |
<td> |
<td> |
| 150 |
<a class="s2" href="main.php?sid=<? echo $result_set["data"]["sid"]; ?>"><? echo $BBS_name; ?></a>>><a class="s2" href="bbs.php?sid=<? echo $result_set["data"]["sid"]; ?>"><? echo $result_set["data"]["section_title"]; ?></a>>><? |
<a class="s2" href="main.php?sid=<?= $result_set["data"]["sid"]; ?>"><?= $BBS_name; ?></a>>><a class="s2" href="list.php?sid=<?= $result_set["data"]["sid"]; ?>"><?= $result_set["data"]["section_title"]; ?></a>>><?php |
| 151 |
if ($result_set["data"]["id"] == 0) |
if ($result_set["data"]["id"] == 0) |
| 152 |
{ |
{ |
| 153 |
if ($result_set["data"]["reply_id"] > 0) |
if ($result_set["data"]["reply_id"] > 0) |
| 154 |
{ |
{ |
| 155 |
?><a class="s2" href="view_article.php?id=<? echo $result_set["data"]["reply_id"] . "#" . $result_set["data"]["reply_id"]; ?>"><? echo split_line(htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />"); ?></a>>><a class="s2" href="#" onclick="return false;">回复文章</a><? |
?><a class="s2" href="view_article.php?id=<?= $result_set["data"]["reply_id"] . "#" . $result_set["data"]["reply_id"]; ?>"><?= split_line(htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />"); ?></a>>><a class="s2" href="#" onclick="return false;">回复文章</a><?php |
| 156 |
} |
} |
| 157 |
else |
else |
| 158 |
{ |
{ |
| 159 |
?><a class="s2" href="#" onclick="return false;">发表新文章</a><? |
?><a class="s2" href="#" onclick="return false;">发表新文章</a><?php |
| 160 |
} |
} |
| 161 |
} |
} |
| 162 |
else |
else |
| 163 |
{ |
{ |
| 164 |
?><a class="s2" href="view_article.php?id=<? echo $result_set["data"]["id"] . "#" . $result_set["data"]["id"]; ?>"><? echo split_line(htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />"); ?></a>>><a class="s2" href="#" onclick="return false;">修改文章</a><? |
?><a class="s2" href="view_article.php?id=<?= $result_set["data"]["id"] . "#" . $result_set["data"]["id"]; ?>"><?= split_line(htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />"); ?></a>>><a class="s2" href="#" onclick="return false;">修改文章</a><?php |
| 165 |
} |
} |
| 166 |
?> |
?> |
| 167 |
</td> |
</td> |
| 168 |
</tr> |
</tr> |
| 169 |
</table> |
</table> |
| 170 |
<form method="POST" ENCTYPE="multipart/form-data" id="post_form" name="post_form" action="#"> |
<form method="POST" ENCTYPE="multipart/form-data" id="post_form" name="post_form" action="#"> |
| 171 |
<table border="0" cellpadding="5" cellspacing="0" width="770"> |
<table border="0" cellpadding="5" cellspacing="0" width="1050"> |
| 172 |
<tr> |
<tr> |
| 173 |
<td colspan="2" align="center" style="color:red;">别忙着发贴,请先看一下<a class="s0" href="doc/management.xml" target=_blank>《论坛管理章程》</a>吧!<br> |
<td colspan="2" align="center" style="color:red;">别忙着发贴,请先看一下<a class="s0" href="doc/management.xml" target=_blank>《论坛管理章程》</a>吧!<br> |
| 174 |
(请对您的言论负责,遵守有关法律、法规,尊重网络道德)</td> |
(请对您的言论负责,遵守有关法律、法规,尊重网络道德)</td> |
| 177 |
<td colspan="2" align="center"><span id="err_msg_prompt" name="err_msg" style="color: red;"></span></td> |
<td colspan="2" align="center"><span id="err_msg_prompt" name="err_msg" style="color: red;"></span></td> |
| 178 |
</tr> |
</tr> |
| 179 |
<tr> |
<tr> |
| 180 |
<td width="10%" align="right">标题<span id="err_msg_title" name="err_msg" style="color: red;"></span></td> |
<td width="20%" align="right">标题<span id="err_msg_title" name="err_msg" style="color: red;"></span></td> |
| 181 |
<td width="90%"> |
<td width="80%"> |
| 182 |
<input type="text" name="textarea" id="textarea_title" size="80" <? echo ($result_set["data"]["id"] != 0 ? "readonly" : ""); ?> value="<? echo ($result_set["data"]["reply_id"] > 0 ? split_line(htmlspecialchars($result_set["data"]["title"], ENT_QUOTES | ENT_HTML401, 'UTF-8'), "Re: ", 80, 1) : htmlspecialchars($result_set["data"]["title"], ENT_QUOTES | ENT_HTML401, 'UTF-8')); ?>"> |
<input type="text" name="textarea" id="textarea_title" size="90" <?= ($result_set["data"]["id"] != 0 ? "readonly" : ""); ?> value="<?= ($result_set["data"]["reply_id"] > 0 ? split_line(htmlspecialchars($result_set["data"]["title"], ENT_QUOTES | ENT_HTML401, 'UTF-8'), "Re: ", 80, 1) : htmlspecialchars($result_set["data"]["title"], ENT_QUOTES | ENT_HTML401, 'UTF-8')); ?>"> |
| 183 |
<? |
<?php |
| 184 |
if ($result_set["data"]["id"] == 0 && $result_set["data"]["reply_id"] == 0) |
if ($result_set["data"]["id"] == 0 && $result_set["data"]["reply_id"] == 0) |
| 185 |
{ |
{ |
| 186 |
?> |
?> |
| 187 |
<input type="checkbox" name="transship">转载 |
<input type="checkbox" name="transship">转载 |
| 188 |
<? |
<?php |
| 189 |
} |
} |
| 190 |
?></td> |
?></td> |
| 191 |
</tr> |
</tr> |
| 192 |
<tr> |
<tr> |
| 193 |
<td align="right">正文<span id="err_msg_content" name="err_msg" style="color: red;"></span></td> |
<td align="right">正文<span id="err_msg_content" name="err_msg" style="color: red;"></span></td> |
| 194 |
<td> |
<td> |
| 195 |
<textarea name="textarea" id="textarea_content" cols="80" rows="25"><? |
<textarea name="textarea" id="textarea_content" cols="90" rows="25"><?php |
| 196 |
if ($result_set["data"]["reply_id"] == 0) |
if ($result_set["data"]["reply_id"] == 0) |
| 197 |
{ |
{ |
| 198 |
echo htmlspecialchars($result_set["data"]["content"], ENT_HTML401, 'UTF-8'); |
echo htmlspecialchars($result_set["data"]["content"], ENT_HTML401, 'UTF-8'); |
| 203 |
|
|
| 204 |
|
|
| 205 |
|
|
| 206 |
【 在 <? echo htmlspecialchars($result_set["data"]["r_username"], ENT_HTML401, 'UTF-8'); ?> (<? echo htmlspecialchars($result_set["data"]["r_nickname"], ENT_HTML401, 'UTF-8'); ?>) 的大作中提到: 】 |
【 在 <?= htmlspecialchars($result_set["data"]["r_username"], ENT_HTML401, 'UTF-8'); ?> (<?= htmlspecialchars($result_set["data"]["r_nickname"], ENT_HTML401, 'UTF-8'); ?>) 的大作中提到: 】 |
| 207 |
<? |
<?php |
| 208 |
echo htmlspecialchars(LMLtagFilter(LML(split_line($result_set["data"]["content"], ": ", 76, 20), false, false, 1024)), ENT_HTML401, 'UTF-8'); |
echo htmlspecialchars(LMLtagFilter(LML(split_line($result_set["data"]["content"], ": ", 76, 20), false, false, 1024)), ENT_HTML401, 'UTF-8'); |
| 209 |
} |
} |
| 210 |
?></textarea> |
?></textarea> |
| 211 |
</td> |
</td> |
| 212 |
</tr> |
</tr> |
| 213 |
<tr> |
<tr> |
| 214 |
<td align="right"><a class="s0" href="doc/lml.htm" target=_blank>LML</a>助手</td> |
<td align="right"><a class="s0" href="lml.htm" target=_blank>LML</a>助手</td> |
| 215 |
<td> |
<td> |
| 216 |
<INPUT type="button" value="B" onclick="b_bold(content)" style="font-weight:bold; width:25px;"> |
<INPUT type="button" value="B" onclick="b_bold(textarea_content)" style="font-weight:bold; width:25px;"> |
| 217 |
<INPUT type="button" value="I" onclick="b_italic(content)" style="font-style:italic; width:25px;"> |
<INPUT type="button" value="I" onclick="b_italic(textarea_content)" style="font-style:italic; width:25px;"> |
| 218 |
<INPUT type="button" value="U" onclick="b_underline(content)" style="text-decoration:underline; width:25px;"> |
<INPUT type="button" value="U" onclick="b_underline(textarea_content)" style="text-decoration:underline; width:25px;"> |
| 219 |
<INPUT type="button" value="[" onclick="b_left(content)" style="width:20px;"> |
<INPUT type="button" value="[" onclick="b_left(textarea_content)" style="width:20px;"> |
| 220 |
<INPUT type="button" value="]" onclick="b_right(content)" style="width:20px;"> |
<INPUT type="button" value="]" onclick="b_right(textarea_content)" style="width:20px;"> |
| 221 |
<INPUT type="button" value="Aa" onclick="b_size(content)" style="width:30px;"> |
<INPUT type="button" value="Aa" onclick="b_size(textarea_content)" style="width:30px;"> |
| 222 |
<INPUT type="button" value="A" onclick="b_color(content)" style="font-weight:bold; color:red; width:25px;"> |
<INPUT type="button" value="A" onclick="b_color(textarea_content)" style="font-weight:bold; color:red; width:25px;"> |
| 223 |
<INPUT type="button" value="@" onclick="b_email(content)" style="width:25px;"> |
<INPUT type="button" value="@" onclick="b_email(textarea_content)" style="width:25px;"> |
| 224 |
<INPUT type="button" value="Link" onclick="b_link(content)" style="text-decoration:underline; color:blue; width:40px;"> |
<INPUT type="button" value="Link" onclick="b_link(textarea_content)" style="text-decoration:underline; color:blue; width:40px;"> |
| 225 |
<INPUT type="button" value="主题" onclick="b_article(content)" style="text-decoration:underline; color:green; width:40px;"> |
<INPUT type="button" value="主题" onclick="b_article(textarea_content)" style="text-decoration:underline; color:green; width:40px;"> |
| 226 |
<INPUT type="button" value="图片" onclick="b_image(content)" style="width:40px;"> |
<INPUT type="button" value="图片" onclick="b_image(textarea_content)" style="width:40px;"> |
| 227 |
<INPUT type="button" value="字幕" onclick="b_marquee(content)" style="width:40px;"> |
<INPUT type="button" value="字幕" onclick="b_marquee(textarea_content)" style="width:40px;"> |
| 228 |
</td> |
</td> |
| 229 |
</tr> |
</tr> |
| 230 |
<tr> |
<tr> |
| 231 |
<td align="right">上传附件<span id="err_msg_attachment" name="err_msg" style="color: red;"></span></td> |
<td align="right">上传附件<span id="err_msg_attachment" name="err_msg" style="color: red;"></span></td> |
| 232 |
<td> |
<td> |
| 233 |
单个文件大小不能超过<? echo $BBS_upload_size_limit; ?>M, |
单个文件大小不能超过<?= $BBS_upload_size_limit; ?>M, |
| 234 |
单次上传不超过<? echo $BBS_upload_count_limit; ?>个文件<br /> |
单次上传不超过<?= $BBS_upload_count_limit; ?>个文件<br /> |
| 235 |
文件类型限于BMP,GIF,JPEG,PNG,TIFF,TXT,ZIP,RAR<br /> |
文件类型限于BMP,GIF,JPEG,PNG,TIFF,TXT,ZIP,RAR<br /> |
| 236 |
<INPUT TYPE=FILE SIZE=40 name="attachment[]" id="attachment" multiple> |
<INPUT TYPE="file" size="40" name="attachment[]" id="attachment" multiple> |
| 237 |
<? |
<?php |
| 238 |
if ($result_set["data"]["id"] != 0) // Modify article |
if ($result_set["data"]["id"] != 0) // Modify article |
| 239 |
{ |
{ |
| 240 |
if (count($result_set["data"]["attachments"]) > 0) |
if (count($result_set["data"]["attachments"]) > 0) |
| 241 |
{ |
{ |
| 242 |
?> |
?> |
| 243 |
<hr width="80%" align="left" />已上传附件<br /> |
<hr width="80%" align="left" />已上传附件<br /> |
| 244 |
<? |
<?php |
| 245 |
} |
} |
| 246 |
|
|
| 247 |
foreach ($result_set["data"]["attachments"] as $aid => $attachment) |
foreach ($result_set["data"]["attachments"] as $aid => $attachment) |
| 249 |
$filename = $attachment["filename"]; |
$filename = $attachment["filename"]; |
| 250 |
$ext = strtolower(substr($filename, (strrpos($filename, ".") ? strrpos($filename, ".") + 1 : 0))); |
$ext = strtolower(substr($filename, (strrpos($filename, ".") ? strrpos($filename, ".") + 1 : 0))); |
| 251 |
?> |
?> |
| 252 |
<span id="attachment_<? echo $aid; ?>"><img src="images/closed.gif"><a class="s2" href="dl_file.php?aid=<? echo $aid; ?>" target="_target"><? echo $filename; ?></a> (<? echo $attachment["size"]; ?>字节) |
<span id="attachment_<?= $aid; ?>"><img src="images/closed.gif"><a class="s2" href="dl_file.php?aid=<?= $aid; ?>" target="_target"><?= $filename; ?></a> (<?= $attachment["size"]; ?>字节) |
| 253 |
<? |
<?php |
| 254 |
if ($attachment["check"] == 0) |
if ($attachment["check"] == 0) |
| 255 |
{ |
{ |
| 256 |
?><font color="red">未审核</font><? |
?><font color="red">未审核</font><?php |
| 257 |
} |
} |
| 258 |
?> |
?> |
| 259 |
<a class="s2" href="#" onclick="return upload_del(<? echo $aid; ?>);">删除</a> |
<a class="s2" href="#" onclick="return upload_del(<?= $aid; ?>);">删除</a> |
| 260 |
<br /></span> |
<br /></span> |
| 261 |
<? |
<?php |
| 262 |
} |
} |
| 263 |
} |
} |
| 264 |
?> |
?> |
| 266 |
</tr> |
</tr> |
| 267 |
<tr> |
<tr> |
| 268 |
<td align="right">表情<span id="err_msg_emoji" name="err_msg" style="color: red;"></span></td> |
<td align="right">表情<span id="err_msg_emoji" name="err_msg" style="color: red;"></span></td> |
| 269 |
<td><? |
<td><?php |
| 270 |
for ($i = 1; $i <= $BBS_emoji_count; $i++) |
for ($i = 1; $i <= $BBS_emoji_count; $i++) |
| 271 |
{ |
{ |
| 272 |
?><input type="radio" name="emoji" value="<? echo $i; ?>" <? echo ($i == $result_set["data"]["emoji"] ? "checked" : ""); ?>><img src="images/expression/<? echo $i; ?>.gif" width="15" height="15" alt="<? echo $i; ?>.gif"><? |
?><input type="radio" name="emoji" value="<?= $i; ?>" <?= ($i == $result_set["data"]["emoji"] ? "checked" : ""); ?>><img src="images/expression/<?= $i; ?>.gif" width="15" height="15" alt="<?= $i; ?>.gif"><?php |
| 273 |
if (($i % 12)==0) |
if (($i % 12)==0) |
| 274 |
{ |
{ |
| 275 |
?><br><? |
?><br><?php |
| 276 |
} |
} |
| 277 |
} |
} |
| 278 |
?></td> |
?></td> |
| 279 |
</tr> |
</tr> |
| 280 |
<? |
<?php |
| 281 |
if ($result_set["data"]["id"] == 0) |
if ($result_set["data"]["id"] == 0) |
| 282 |
{ |
{ |
| 283 |
?> |
?> |
| 291 |
<a class="s0" href="preference.php" target=_blank>设置个人签名</a> |
<a class="s0" href="preference.php" target=_blank>设置个人签名</a> |
| 292 |
</td> |
</td> |
| 293 |
</tr> |
</tr> |
| 294 |
<? |
<?php |
| 295 |
} |
} |
| 296 |
else |
else |
| 297 |
{ |
{ |
| 298 |
?> |
?> |
| 299 |
<input type="hidden" id="sign_id_0" name="sign_id" value="0"> |
<input type="hidden" id="sign_id_0" name="sign_id" value="0"> |
| 300 |
<? |
<?php |
| 301 |
} |
} |
| 302 |
?> |
?> |
| 303 |
<tr> |
<tr> |
| 304 |
<td align="right"></td> |
<td align="right"></td> |
| 305 |
<td><input type="checkbox" name="reply_note" id="reply_note" <? echo ($result_set["data"]["reply_note"] ? "checked":""); ?>>有人回复该主题时通知我</td> |
<td><input type="checkbox" name="reply_note" id="reply_note" <?= ($result_set["data"]["reply_note"] ? "checked":""); ?>>有人回复该主题时通知我</td> |
| 306 |
</tr> |
</tr> |
| 307 |
</table> |
</table> |
| 308 |
<p><input type="submit" value="提交" name="submit"> <input type="reset" value="重填" name="reset"></p> |
<p><input type="submit" value="提交" name="submit"> <input type="reset" value="重填" name="reset"></p> |
| 309 |
</center> |
</center> |
| 310 |
</form> |
</form> |
| 311 |
<? |
<?php |
| 312 |
include "./foot.inc.php"; |
include "./foot.inc.php"; |
| 313 |
?> |
?> |
| 314 |
</body> |
</body> |