?? action_add_message.php
字號:
<?php
include("include/god_def.inc");
include("system/articleTools.php");
$file_name = FILE_MESSAGE;
$doc = new GodDocument;
$content = html2text($_POST['content']);
if (strlen($content) > 7000)
{
echo "字數不能大于7000個,<a href='#' onclick='javascript:history.back();'>返回上一頁</a>";
exit();
}
if (!(file_exists($file_name)))
{
$doc->createNewDataFile($file_name);
}
$name = html2text($_POST['name']);
$title = html2text($_POST['title']);
if (rtrim($name) == "")
{
$name = "無名仕";
}
if (rtrim($title) == "")
{
$title = "[無主題]";
}
if (rtrim($content) == "")
{
$content = "[無內容]";
}
$time = date("Y-m-d H:i:s",time());
$id = getMaxID($file_name) + 1;
$doc->load($file_name);
$doc->addArticle($id, $name, $time, $title, $content);
if ($doc->save($file_name))
{
echo ("<script>location.href='index.php?gid=".GOD_MESSAGE."'</script>");
}
echo "...message added error...<br>";
?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -