📄 words.php
字号:
<?php
require_once("config.inc.php");
require_once("include/DataSet.inc.php");
require_once("include/DB.inc.php");
require_once("include/Vant.inc.php");
require_once("include/OutputHtml.inc.php");
require_once("include/Language.inc.php");
$sys_lang = new Language("include/language/");
$sys_lang->setLanguage();
require_once($sys_lang->getLangfile());
$db = & new DB(HOST,USERNAME,PASSWORD,DATABASE,'');
$db->connect();
require_once("function.php");
$tpl = & new Vant("templates/");
$tpl->set("sitename",$nav["sitename"]);
$tpl->set("column",$nav["news"]);
$tpl->set("loginname",$_COOKIE["loginname"]);
$tpl->set("msg",$msg);
/*
判断是否管理员登录
*/
if(isAdmin($_COOKIE["loginname"]))$admin=1;
else $admin=0;
$tpl->set("admin",$admin);
$op = $_GET['op'] != '' ? $_GET['op']:$_POST['op'];
if($op=='')phpexit();
call_user_func($op);
phpexit();
function phpexit()
{
global $db;
$db->close();
exit;
}
function View()
{
global $db,$tpl;
$id = $_GET['id'];
$str = "select * from friends_words where id=$id";
$res = $db->query($str);
$arr = $db->fetch_array($res);
$tpl->set("title",$arr["title"]);
$tpl->set("writer",$arr["writer"]);
$tpl->set("from",$arr["from"]);
$tpl->set("date",$arr["date"]);
$tpl->set("words",nl2br($arr["words"]));
$tpl->set("main_middle","words.html");
$tpl->parse("main.html");
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -