ql= "Update Article Set by_count = (by_count + 1) Where id = " . $str;
$conn->Execute($usql);
if(!$rs->Eof){
@$body = $rs->Fields->value;
$body = str_replace("[url=file://%22,%22%22,$body/]\\","",$body[/url]);
echo "<table border=\"0\" width=\"60%\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"#cccccc\">\r\n"
. " <tr bgcolor=\"#F3F3F3\" align=\"center\">\r\n"
. " <td style=\"font-size:14px;font-weight:bold\">" . $rs->Fields->value . "</td>\r\n"
. " </tr>\r\n"
. " <tr bgcolor=\"#F3F3F3\" align=\"center\">\r\n"
. " <td>文章作者:" . $rs->Fields->value . " | 发表时间:" . date("Y-m-d H:i:s",$rs->Fields->value) . " | 浏览次数:" . $rs->Fields->value . "</td>\r\n"
. " </tr>\r\n"
. " <tr bgcolor=\"#FFFFFF\">\r\n"
. " <td>" . $body . "</td>\r\n"
. " </tr>\r\n"
. " <tr bgcolor=\"#F3F3F3\">\r\n"
. " <td align=\"right\">【 <a href=\"javascript:history.back();\">返 回</a> 】 【 <a href=\"javascript:print();\">打 印</a> 】 【 <a href=\"javascript:close();\">关 闭</a> 】</td>\r\n"
. " </tr>\r\n"
. " </table>\r\n"
. " <script language=\"JavaScript\">document.title += \"--" . $rs->Fields->value . "\";</script>\r\n";
}
else {
echo "<br />该文章不存在或已被管理员删除!";
}
$rs->Close();
}
//==================================
//后台:分类管理
//==================================
function admin_class(){
global $conn;
@$sql = "Select * From List";
@$rs = $conn->Execute($sql);
echo "<form action=\"\" method=\"post\" name=\"frm\">\r\n";
while(!$rs->Eof){
echo "类别:<input type=\"text\" value=\"" . $rs->Fields->value . "\" name=\"class_" . $rs->Fields[0]->value . "\" /> 编号:<input type=\"text\" value=\"" . $rs->Fields->value . "\" name=\"class_cid_" . $rs->Fields[0]->value . "\" /> <input type=\"button\" value=\"修改\" onclick=\"frm.action=''?admin=class&class=edit&id=" . $rs->Fields[0]->value . "'';submit();\" /> <input type=\"button\" value=\"删除\" onclick=\"frm.action=''?admin=class&class=del&id=" . $rs->Fields[0]->value . "'';submit();\" /><br />\r\n";
$rs->MoveNext();
}
echo "类别:<input type=\"text\" name=\"class_name\" /> 编号:<input type=\"text\" name=\"class_cid\" /> <input type=\"button\" value=\"增加\" onclick=\"frm.action=''?admin=class&class=add'';submit();\" /> <input type=\"button\" value=\"闲置\" disabled />\r\n"
. "</form>\r\n";
//增加一个类别
if(@
PHP+ACCESS 文章管理程序代码_网学
浏览:
GET["class"] == "add"){
if(@
PHP+ACCESS 文章管理程序代码_网学
浏览:
POST["class_name"] == "" || @
PHP+ACCESS 文章管理程序代码_网学
浏览:
POST["class_cid"] == ""){
echo "<br />填写不完整!";
echo "<script language=\"JavaScript\">setTimeout(\"history.back();\", 2000);</script>";
exit();
}
else {
@$sql = "Insert into List(by_list,by_cid) Values(''" .
PHP+ACCESS 文章管理程序代码_网学
浏览:
POST["class_name"] . "'' , ''" .
PHP+ACCESS 文章管理程序代码_网学
浏览:
POST["class_cid"] . "'')";
$conn->Execute($sql);
echo "<br />