| 6 |
require_once "./check_sub.inc.php"; |
require_once "./check_sub.inc.php"; |
| 7 |
require_once "../lib/lml.inc.php"; |
require_once "../lib/lml.inc.php"; |
| 8 |
require_once "../lib/str_process.inc.php"; |
require_once "../lib/str_process.inc.php"; |
| 9 |
|
require_once "./theme.inc.php"; |
| 10 |
?> |
?> |
| 11 |
<? |
<? |
| 12 |
force_login(); |
force_login(); |
| 13 |
|
|
| 14 |
|
$result_set = array( |
| 15 |
|
"return" => array( |
| 16 |
|
"code" => 0, |
| 17 |
|
"message" => "", |
| 18 |
|
"errorFields" => array(), |
| 19 |
|
) |
| 20 |
|
); |
| 21 |
|
|
| 22 |
$id = (isset($_GET["id"]) ? intval($_GET["id"]) : 0); |
$id = (isset($_GET["id"]) ? intval($_GET["id"]) : 0); |
| 23 |
$reply_id = (isset($_GET["reply_id"]) ? intval($_GET["reply_id"]) : 0); |
$reply_id = (isset($_GET["reply_id"]) ? intval($_GET["reply_id"]) : 0); |
| 24 |
$sid = (isset($_GET["sid"]) ? intval($_GET["sid"]) : $BBS_default_sid); |
$sid = (isset($_GET["sid"]) ? intval($_GET["sid"]) : $BBS_default_sid); |
| 25 |
$quote = (isset($_GET["quote"]) && $_GET["quote"] == "0" ? false : true); |
$quote = (isset($_GET["quote"]) && $_GET["quote"] == "0" ? false : true); |
| 26 |
|
|
| 27 |
|
$uid = 0; |
| 28 |
|
$tid = 0; |
| 29 |
$title = ""; |
$title = ""; |
| 30 |
|
$r_username = ""; |
| 31 |
|
$r_nickname = ""; |
| 32 |
$content = ""; |
$content = ""; |
| 33 |
$emoji = 1; |
$emoji = 1; |
| 34 |
$reply_note = ($reply_id == 0 ? 1 : 0); |
$reply_note = ($reply_id == 0 ? 1 : 0); |
| 35 |
|
$excerption = 0; |
| 36 |
|
$attachments = array(); |
| 37 |
|
|
| 38 |
if($id == 0) // Post article |
if($id == 0) // Post article |
| 39 |
{ |
{ |
| 44 |
$rs = mysqli_query($db_conn, $sql); |
$rs = mysqli_query($db_conn, $sql); |
| 45 |
if ($rs == false) |
if ($rs == false) |
| 46 |
{ |
{ |
| 47 |
echo("Query section error: " . mysqli_error($db_conn)); |
$result_set["return"]["code"] = -2; |
| 48 |
exit(); |
$result_set["return"]["message"] = "Query section error: " . mysqli_error($db_conn); |
| 49 |
|
|
| 50 |
|
mysqli_close($db_conn); |
| 51 |
|
exit(json_encode($result_set)); |
| 52 |
} |
} |
| 53 |
|
|
| 54 |
if ($row = mysqli_fetch_array($rs)) |
if ($row = mysqli_fetch_array($rs)) |
| 57 |
} |
} |
| 58 |
else |
else |
| 59 |
{ |
{ |
| 60 |
error_msg("版块不存在!",true); |
$result_set["return"]["code"] = -1; |
| 61 |
exit(); |
$result_set["return"]["message"] = "版块不存在!"; |
| 62 |
|
|
| 63 |
|
mysqli_close($db_conn); |
| 64 |
|
exit(json_encode($result_set)); |
| 65 |
} |
} |
| 66 |
mysqli_free_result($rs); |
mysqli_free_result($rs); |
| 67 |
|
|
| 68 |
if (!$_SESSION["BBS_priv"]->checkpriv($sid, S_POST)) |
if (!$_SESSION["BBS_priv"]->checkpriv($sid, S_POST)) |
| 69 |
{ |
{ |
| 70 |
error_msg("您无权发表文章!", true); |
$result_set["return"]["code"] = -1; |
| 71 |
exit(); |
$result_set["return"]["message"] = "您无权发表文章!"; |
| 72 |
|
|
| 73 |
|
mysqli_close($db_conn); |
| 74 |
|
exit(json_encode($result_set)); |
| 75 |
} |
} |
| 76 |
} |
} |
| 77 |
else // Reply article |
else // Reply article |
| 85 |
$rs = mysqli_query($db_conn, $sql); |
$rs = mysqli_query($db_conn, $sql); |
| 86 |
if ($rs == false) |
if ($rs == false) |
| 87 |
{ |
{ |
| 88 |
echo("Query article error: " . mysqli_error($db_conn)); |
$result_set["return"]["code"] = -2; |
| 89 |
exit(); |
$result_set["return"]["message"] = "Query article error: " . mysqli_error($db_conn); |
| 90 |
|
|
| 91 |
|
mysqli_close($db_conn); |
| 92 |
|
exit(json_encode($result_set)); |
| 93 |
} |
} |
| 94 |
|
|
| 95 |
if ($row = mysqli_fetch_array($rs)) |
if ($row = mysqli_fetch_array($rs)) |
| 105 |
} |
} |
| 106 |
else |
else |
| 107 |
{ |
{ |
| 108 |
error_msg("回复的文章不存在!", true); |
$result_set["return"]["code"] = -1; |
| 109 |
exit(); |
$result_set["return"]["message"] = "回复的文章不存在!"; |
| 110 |
|
|
| 111 |
|
mysqli_close($db_conn); |
| 112 |
|
exit(json_encode($result_set)); |
| 113 |
} |
} |
| 114 |
mysqli_free_result($rs); |
mysqli_free_result($rs); |
| 115 |
|
|
| 120 |
$rs = mysqli_query($db_conn, $sql); |
$rs = mysqli_query($db_conn, $sql); |
| 121 |
if ($rs == false) |
if ($rs == false) |
| 122 |
{ |
{ |
| 123 |
echo("Query article error: " . mysqli_error($db_conn)); |
$result_set["return"]["code"] = -2; |
| 124 |
exit(); |
$result_set["return"]["message"] = "Query article error: " . mysqli_error($db_conn); |
| 125 |
|
|
| 126 |
|
mysqli_close($db_conn); |
| 127 |
|
exit(json_encode($result_set)); |
| 128 |
} |
} |
| 129 |
|
|
| 130 |
if ($row = mysqli_fetch_array($rs)) |
if ($row = mysqli_fetch_array($rs)) |
| 134 |
} |
} |
| 135 |
else |
else |
| 136 |
{ |
{ |
| 137 |
error_msg("回复的主题不存在!", true); |
$result_set["return"]["code"] = -1; |
| 138 |
exit(); |
$result_set["return"]["message"] = "回复的主题不存在!"; |
| 139 |
|
|
| 140 |
|
mysqli_close($db_conn); |
| 141 |
|
exit(json_encode($result_set)); |
| 142 |
} |
} |
| 143 |
mysqli_free_result($rs); |
mysqli_free_result($rs); |
| 144 |
} |
} |
| 145 |
|
|
| 146 |
if (!$_SESSION["BBS_priv"]->checkpriv($sid, S_POST)) |
if (!$_SESSION["BBS_priv"]->checkpriv($sid, S_POST)) |
| 147 |
{ |
{ |
| 148 |
error_msg("您无权发表文章!", true); |
$result_set["return"]["code"] = -1; |
| 149 |
exit(); |
$result_set["return"]["message"] = "您无权发表文章!"; |
| 150 |
|
|
| 151 |
|
mysqli_close($db_conn); |
| 152 |
|
exit(json_encode($result_set)); |
| 153 |
} |
} |
| 154 |
|
|
| 155 |
if ($lock) |
if ($lock) |
| 156 |
{ |
{ |
| 157 |
error_msg("该主题谢绝回复!", true); |
$result_set["return"]["code"] = -1; |
| 158 |
exit(); |
$result_set["return"]["message"] = "该主题谢绝回复!"; |
| 159 |
|
|
| 160 |
|
mysqli_close($db_conn); |
| 161 |
|
exit(json_encode($result_set)); |
| 162 |
} |
} |
| 163 |
} |
} |
| 164 |
} |
} |
| 173 |
$rs = mysqli_query($db_conn, $sql); |
$rs = mysqli_query($db_conn, $sql); |
| 174 |
if ($rs == false) |
if ($rs == false) |
| 175 |
{ |
{ |
| 176 |
echo("Query article error: " . mysqli_error($db_conn)); |
$result_set["return"]["code"] = -2; |
| 177 |
exit(); |
$result_set["return"]["message"] = "Query article error: " . mysqli_error($db_conn); |
| 178 |
|
|
| 179 |
|
mysqli_close($db_conn); |
| 180 |
|
exit(json_encode($result_set)); |
| 181 |
} |
} |
| 182 |
|
|
| 183 |
if ($row = mysqli_fetch_array($rs)) |
if ($row = mysqli_fetch_array($rs)) |
| 194 |
} |
} |
| 195 |
else |
else |
| 196 |
{ |
{ |
| 197 |
error_msg("修改的文章不存在!", true); |
$result_set["return"]["code"] = -1; |
| 198 |
exit(); |
$result_set["return"]["message"] = "修改的文章不存在!"; |
| 199 |
|
|
| 200 |
|
mysqli_close($db_conn); |
| 201 |
|
exit(json_encode($result_set)); |
| 202 |
} |
} |
| 203 |
mysqli_free_result($rs); |
mysqli_free_result($rs); |
| 204 |
|
|
| 205 |
if (!($_SESSION["BBS_priv"]->checkpriv($sid, S_POST) && $_SESSION["BBS_uid"] == $uid && (!$excerption))) |
if (!($_SESSION["BBS_priv"]->checkpriv($sid, S_POST) && $_SESSION["BBS_uid"] == $uid && (!$excerption))) |
| 206 |
{ |
{ |
| 207 |
error_msg("您无权修改此文章!",true); |
$result_set["return"]["code"] = -1; |
| 208 |
exit(); |
$result_set["return"]["message"] = "您无权修改此文章!"; |
| 209 |
} |
|
| 210 |
} |
mysqli_close($db_conn); |
| 211 |
?> |
exit(json_encode($result_set)); |
|
<html> |
|
|
<head> |
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|
|
<title>发表文章</title> |
|
|
<link rel="stylesheet" href="css/default.css" type="text/css"> |
|
|
<script language="JavaScript" src="/js/nw_open.js"></script> |
|
|
<script language="JavaScript" src="/js/lml_assistant.js"></script> |
|
|
<script src="../js/polyfill.min.js"></script> |
|
|
<script src="../js/axios.min.js"></script> |
|
|
<script type="text/javascript"> |
|
|
function refresh_err_msg(errorFieldMap) |
|
|
{ |
|
|
document.getElementsByName("err_msg").forEach(element => { |
|
|
if (errorFieldMap.has(element.id)) |
|
|
{ |
|
|
element.innerHTML = errorFieldMap.get(element.id); |
|
|
} |
|
|
else |
|
|
{ |
|
|
element.innerHTML = ""; |
|
|
} |
|
|
}); |
|
|
} |
|
|
|
|
|
function post_article(f) |
|
|
{ |
|
|
instance.post('post_service.php', { |
|
|
id: <? echo $id; ?>, |
|
|
reply_id: <? echo $reply_id; ?>, |
|
|
sid: <? echo $sid; ?>, |
|
|
title: f.title.value, |
|
|
transship: (f.transship != null && f.transship.checked ? "1" : "0"), |
|
|
content: f.content.value, |
|
|
emoji: f.emoji.value, |
|
|
sign_id: (f.use_sign != null && f.use_sign.checked ? f.sign_id.value : "0"), |
|
|
reply_note: (f.reply_note.checked ? "1" : "0"), |
|
|
attachment: f.attachment.files, |
|
|
}, { |
|
|
headers: { |
|
|
'Content-Type': 'multipart/form-data', |
|
| 212 |
} |
} |
|
}) |
|
|
.then(function (response) { |
|
|
var ret = response.data; |
|
|
var errorFieldMap = new Map(); |
|
|
switch (ret.return.code) |
|
|
{ |
|
|
case 0: // OK |
|
|
var returnPath = "view_article.php?id=" + ret.return.tid + "#" + ret.return.aid; |
|
|
document.location = returnPath; |
|
|
refresh_err_msg(errorFieldMap); |
|
|
break; |
|
|
case -1: // Input validation failed |
|
|
ret.return.errorFields.forEach(field => { |
|
|
errorFieldMap.set("err_msg_" + field.id, "<br />" + field.errMsg); |
|
|
}); |
|
|
refresh_err_msg(errorFieldMap); |
|
|
break; |
|
|
case -2: // Internal error |
|
|
console.log(ret.return.message); |
|
|
errorFieldMap.set("err_msg_prompt", "内部错误"); |
|
|
refresh_err_msg(errorFieldMap); |
|
|
break; |
|
|
default: |
|
|
console.log(ret.return.code); |
|
|
break; |
|
|
} |
|
|
}) |
|
|
.catch(function (error) { |
|
|
console.log(error); |
|
|
}); |
|
|
|
|
|
return false; |
|
|
} |
|
|
|
|
|
function upload_del(id) |
|
|
{ |
|
|
if (window.confirm('真的要删除吗?') == false) |
|
|
{ |
|
|
return false; |
|
|
} |
|
| 213 |
|
|
|
instance.post('upload_del.php', { |
|
|
aid: id |
|
|
}) |
|
|
.then(function (response) { |
|
|
var ret = response.data; |
|
|
var errorFieldMap = new Map(); |
|
|
switch (ret.return.code) |
|
|
{ |
|
|
case 0: // OK |
|
|
document.getElementById("attachment_" + id).style.display = "none"; |
|
|
refresh_err_msg(errorFieldMap); |
|
|
break; |
|
|
case -1: // Input validation failed |
|
|
ret.return.errorFields.forEach(field => { |
|
|
errorFieldMap.set("err_msg_" + field.id, "<br />" + field.errMsg); |
|
|
}); |
|
|
refresh_err_msg(errorFieldMap); |
|
|
break; |
|
|
case -2: // Internal error |
|
|
console.log(ret.return.message); |
|
|
errorFieldMap.set("err_msg_prompt", "内部错误"); |
|
|
refresh_err_msg(errorFieldMap); |
|
|
break; |
|
|
default: |
|
|
console.log(ret.return.code); |
|
|
break; |
|
|
} |
|
|
}) |
|
|
.catch(function (error) { |
|
|
console.log(error); |
|
|
}); |
|
|
|
|
|
return false; |
|
|
} |
|
|
|
|
|
const instance = axios.create({ |
|
|
withCredentials: true, |
|
|
timeout: 3000, |
|
|
baseURL: document.location.protocol + '//' + document.location.hostname + (document.location.port=='' ? '' : (':' + document.location.port)) + '/bbs/', |
|
|
}); |
|
|
|
|
|
window.addEventListener("load", () => { |
|
|
var f = document.getElementById("post_form"); |
|
|
f.addEventListener("submit", (e) => { |
|
|
e.preventDefault(); |
|
|
post_article(f); |
|
|
}); |
|
|
}); |
|
|
|
|
|
</script> |
|
|
</head> |
|
|
<body> |
|
|
<center> |
|
|
<table border="0" cellpadding="1" cellspacing="0" width="770"> |
|
|
<tr> |
|
|
<td> |
|
|
<a class="s2" href="main.php?sid=<? echo $sid; ?>"><? echo $BBS_name; ?></a>>><a class="s2" href="bbs.php?sid=<? echo $sid; ?>"><? echo $section_title; ?></a>>><? |
|
|
if ($id == 0) |
|
|
{ |
|
|
if ($reply_id > 0) |
|
|
{ |
|
|
?><a class="s2" href="view_article.php?id=<? echo ($tid ? $tid : $reply_id) . "#$reply_id"; ?>"><? echo split_line(htmlspecialchars($title, ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />"); ?></a>>><a class="s2" href="#">回复文章</a><? |
|
|
} |
|
|
else |
|
|
{ |
|
|
?><a class="s2" href="#">发表新文章</a><? |
|
|
} |
|
|
} |
|
|
else |
|
|
{ |
|
|
?><a class="s2" href="view_article.php?id=<? echo ($tid ? $tid : $id) . "#$id"; ?>"><? echo split_line(htmlspecialchars($title, ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />"); ?></a>>><a class="s2" href="#">修改文章</a><? |
|
|
} |
|
|
?> |
|
|
</td> |
|
|
</tr> |
|
|
</table> |
|
|
<form method="POST" ENCTYPE="multipart/form-data" id="post_form" name="post_form" action="#"> |
|
|
<table border="0" cellpadding="5" cellspacing="0" width="770"> |
|
|
<tr> |
|
|
<td colspan="2" align="center" style="color:red;">别忙着发贴,请先看一下<a class="s0" href="doc/management.xml" target=_blank>《论坛管理章程》</a>吧!<br> |
|
|
(请对您的言论负责,遵守有关法律、法规,尊重网络道德)</td> |
|
|
</tr> |
|
|
<tr height="10"> |
|
|
<td colspan="2" align="center"><span id="err_msg_prompt" name="err_msg" style="color: red;"></span></td> |
|
|
</tr> |
|
|
<tr> |
|
|
<td width="10%" align="right">标题<span id="err_msg_title" name="err_msg" style="color: red;"></span></td> |
|
|
<td width="90%"> |
|
|
<input type="text" name="title" id="title" size="80" <? echo ($id != 0 ? "readonly" : ""); ?> value="<? echo ($reply_id > 0 ? split_line(htmlspecialchars($title, ENT_QUOTES | ENT_HTML401, 'UTF-8'), "Re: ", 80, 1) : htmlspecialchars($title, ENT_QUOTES | ENT_HTML401, 'UTF-8')); ?>"> |
|
|
<? |
|
|
if ($id == 0 && $reply_id == 0) |
|
|
{ |
|
|
?> |
|
|
<input type="checkbox" name="transship">转载 |
|
|
<? |
|
|
} |
|
|
?></td> |
|
|
</tr> |
|
|
<tr> |
|
|
<td align="right">正文<span id="err_msg_content" name="err_msg" style="color: red;"></span></td> |
|
|
<td> |
|
|
<textarea name="content" id="content" cols="80" rows="25"><? |
|
|
if ($reply_id == 0) |
|
|
{ |
|
|
echo htmlspecialchars($content, ENT_HTML401, 'UTF-8'); |
|
|
} |
|
|
else if ($quote) |
|
|
{ |
|
|
?> |
|
|
|
|
|
|
|
|
|
|
|
【 在 <? echo htmlspecialchars($r_username, ENT_HTML401, 'UTF-8'); ?> (<? echo htmlspecialchars($r_nickname, ENT_HTML401, 'UTF-8'); ?>) 的大作中提到: 】 |
|
|
<? |
|
|
echo htmlspecialchars(LMLtagFilter(LML(split_line($content, ": ", 76, 20), false, false, 1024)), ENT_HTML401, 'UTF-8'); |
|
|
} |
|
|
?></textarea> |
|
|
</td> |
|
|
</tr> |
|
|
<tr> |
|
|
<td align="right"><a class="s0" href="doc/lml.htm" target=_blank>LML</a>助手</td> |
|
|
<td> |
|
|
<INPUT type="button" value="B" onclick="b_bold(content)" style="font-weight:bold; width:25px;"> |
|
|
<INPUT type="button" value="I" onclick="b_italic(content)" style="font-style:italic; width:25px;"> |
|
|
<INPUT type="button" value="U" onclick="b_underline(content)" style="text-decoration:underline; width:25px;"> |
|
|
<INPUT type="button" value="[" onclick="b_left(content)" style="width:20px;"> |
|
|
<INPUT type="button" value="]" onclick="b_right(content)" style="width:20px;"> |
|
|
<INPUT type="button" value="Aa" onclick="b_size(content)" style="width:30px;"> |
|
|
<INPUT type="button" value="A" onclick="b_color(content)" style="font-weight:bold; color:red; width:25px;"> |
|
|
<INPUT type="button" value="@" onclick="b_email(content)" style="width:25px;"> |
|
|
<INPUT type="button" value="Link" onclick="b_link(content)" style="text-decoration:underline; color:blue; width:40px;"> |
|
|
<INPUT type="button" value="主题" onclick="b_article(content)" style="text-decoration:underline; color:green; width:40px;"> |
|
|
<INPUT type="button" value="图片" onclick="b_image(content)" style="width:40px;"> |
|
|
<INPUT type="button" value="字幕" onclick="b_marquee(content)" style="width:40px;"> |
|
|
</td> |
|
|
</tr> |
|
|
<tr> |
|
|
<td align="right">上传附件<span id="err_msg_attachment" name="err_msg" style="color: red;"></span></td> |
|
|
<td> |
|
|
单个文件大小不能超过<? echo $BBS_upload_size_limit; ?>M, |
|
|
单次上传不超过<? echo $BBS_upload_count_limit; ?>个文件<br /> |
|
|
文件类型限于BMP,GIF,JPEG,PNG,TIFF,TXT,ZIP,RAR<br /> |
|
|
<INPUT TYPE=FILE SIZE=40 name="attachment[]" id="attachment" multiple> |
|
|
<? |
|
|
if ($id != 0) // Modify article |
|
|
{ |
|
| 214 |
$sql = "SELECT * FROM upload_file WHERE ref_AID = $id |
$sql = "SELECT * FROM upload_file WHERE ref_AID = $id |
| 215 |
AND deleted = 0 AND deny = 0 |
AND deleted = 0 AND deny = 0 |
| 216 |
ORDER BY AID"; |
ORDER BY AID"; |
| 218 |
$rs = mysqli_query($db_conn, $sql); |
$rs = mysqli_query($db_conn, $sql); |
| 219 |
if ($rs == false) |
if ($rs == false) |
| 220 |
{ |
{ |
| 221 |
echo ("Read attachment error: " . mysqli_error($db_conn)); |
$result_set["return"]["code"] = -2; |
| 222 |
exit(); |
$result_set["return"]["message"] = "Read attachment error: " . mysqli_error($db_conn); |
| 223 |
|
|
| 224 |
|
mysqli_close($db_conn); |
| 225 |
|
exit(json_encode($result_set)); |
| 226 |
} |
} |
| 227 |
|
|
|
if (mysqli_num_rows($rs) > 0) |
|
|
{ |
|
|
?> |
|
|
<hr width="80%" align="left" />已上传附件<br /> |
|
|
<? |
|
|
} |
|
|
|
|
| 228 |
while ($row = mysqli_fetch_array($rs)) |
while ($row = mysqli_fetch_array($rs)) |
| 229 |
{ |
{ |
| 230 |
$filename = $row["filename"]; |
$attachments[$row["AID"]] = array( |
| 231 |
$ext = strtolower(substr($filename, (strrpos($filename, ".") ? strrpos($filename, ".") + 1 : 0))); |
"filename" => $row["filename"], |
| 232 |
?> |
"size" => $row["size"], |
| 233 |
<span id="attachment_<? echo $row["AID"]; ?>"><img src="images/closed.gif"><a class="s2" href="dl_file.php?aid=<? echo $row["AID"]; ?>" target="_target"><? echo $filename; ?></a> (<? echo $row["size"]; ?>字节) |
"check" => $row["check"], |
| 234 |
<? |
); |
|
if ($row["check"] == 0) |
|
|
{ |
|
|
?><font color="red">未审核</font><? |
|
|
} |
|
|
?> |
|
|
<a class="s2" href="#" onclick="return upload_del(<? echo $row["AID"]; ?>);">删除</a> |
|
|
<br /></span> |
|
|
<? |
|
| 235 |
} |
} |
|
|
|
| 236 |
mysqli_free_result($rs); |
mysqli_free_result($rs); |
| 237 |
} |
} |
| 238 |
?> |
|
|
</td> |
|
|
</tr> |
|
|
<tr> |
|
|
<td align="right">表情<span id="err_msg_emoji" name="err_msg" style="color: red;"></td> |
|
|
<td><? |
|
|
for ($i = 1; $i <= $BBS_emoji_count; $i++) |
|
|
{ |
|
|
?><input type="radio" name="emoji" value="<? echo $i; ?>" <? echo ($i == $emoji ? "checked" : ""); ?>><img src="images/expression/<? echo $i; ?>.gif" width="15" height="15" alt="<? echo $i; ?>.gif"><? |
|
|
if (($i % 12)==0) |
|
|
{ |
|
|
?><br><? |
|
|
} |
|
|
} |
|
|
?></td> |
|
|
</tr> |
|
|
<? |
|
|
if ($id == 0) |
|
|
{ |
|
|
?> |
|
|
<tr> |
|
|
<td align="right"><span id="err_msg_sign" name="err_msg" style="color: red;"></td> |
|
|
<td> |
|
|
<input type="checkbox" name="use_sign">使用我的个人签名 |
|
|
<input type="radio" id="sign_id_1" name="sign_id" value="1" checked>1 |
|
|
<input type="radio" id="sign_id_2" name="sign_id" value="2">2 |
|
|
<input type="radio" id="sign_id_3" name="sign_id" value="3">3 |
|
|
<a class="s0" href="" onclick="return NW_open('preference.php', 'member_service', 500, 550);">设置个人签名</a> |
|
|
</td> |
|
|
</tr> |
|
|
<? |
|
|
} |
|
|
?> |
|
|
<tr> |
|
|
<td align="right"></td> |
|
|
<td><input type="checkbox" name="reply_note" id="reply_note" <? echo ($reply_note ? "checked":""); ?>>有人回复该主题时通知我</td> |
|
|
</tr> |
|
|
</table> |
|
|
<p><input type="submit" value="提交" name="submit"> <input type="reset" value="重填" name="reset"></p> |
|
|
</center> |
|
|
</form> |
|
|
<? |
|
| 239 |
mysqli_close($db_conn); |
mysqli_close($db_conn); |
| 240 |
|
|
| 241 |
|
// Fill up result data |
| 242 |
|
$result_set["data"] = array( |
| 243 |
|
"id" => $id, |
| 244 |
|
"reply_id" => $reply_id, |
| 245 |
|
"uid" => $uid, |
| 246 |
|
"sid" => $sid, |
| 247 |
|
"tid" => $tid, |
| 248 |
|
"title" => $title, |
| 249 |
|
"r_username" => $r_username, |
| 250 |
|
"r_nickname" => $r_nickname, |
| 251 |
|
"content" => $content, |
| 252 |
|
"quote" => $quote, |
| 253 |
|
"emoji" => $emoji, |
| 254 |
|
"reply_note" => $reply_note, |
| 255 |
|
"excerption" => $excerption, |
| 256 |
|
"section_title" => $section_title, |
| 257 |
|
"attachments" => $attachments, |
| 258 |
|
); |
| 259 |
|
|
| 260 |
|
// Cleanup |
| 261 |
|
unset($id); |
| 262 |
|
unset($reply_id); |
| 263 |
|
unset($uid); |
| 264 |
|
unset($sid); |
| 265 |
|
unset($tid); |
| 266 |
|
unset($title); |
| 267 |
|
unset($r_username); |
| 268 |
|
unset($r_nickname); |
| 269 |
|
unset($content); |
| 270 |
|
unset($emoji); |
| 271 |
|
unset($reply_note); |
| 272 |
|
unset($excerption); |
| 273 |
|
unset($section_title); |
| 274 |
|
unset($attachments); |
| 275 |
|
|
| 276 |
include "./foot.inc.php"; |
// Output with theme view |
| 277 |
|
$theme_view_file = get_theme_file("view/post", $_SESSION["BBS_theme_name"]); |
| 278 |
|
if ($theme_view_file == null) |
| 279 |
|
{ |
| 280 |
|
exit(json_encode($result_set)); // Output data in Json |
| 281 |
|
} |
| 282 |
|
include $theme_view_file; |
| 283 |
?> |
?> |
|
</body> |
|
|
</html> |
|