crs = $conn->Execute($sql);
while(!$crs->Eof){
echo "<option value=\"" . $crs->Fields->value . "\">" . $crs->Fields->value . "</option>\r\n";
$crs->MoveNext();
}
$crs->close();
@$body = $rs->Fields->value;
$body = str_replace("<br />","\r\n",$body);
echo "</select><br />\r\n"
. "<script language=\"JavaScript\">\r\n"
. "document.getElementById(\"class\").selectedIndex = " . $rs->fields->value . " - 1;\r\n"
. "</script>\r\n"
. "文章正文:<textarea cols=\"70\" rows=\"14\" name=\"body\">" . $body . "</textarea><br />\r\n"
. "<center><input type=\"submit\" value=\"提交\" /> <input type=\"reset\" value=\"重置\" /></center>\r\n"
. "</form>\r\n"
. "</div>\r\n";
}
}
//删除文章
if(@
PHP+ACCESS 文章管理程序代码_网学
浏览:
GET["list"] == "del"){
@$sql = "Delete From Article Where id = " .
PHP+ACCESS 文章管理程序代码_网学
浏览:
GET["id"];
$conn->Execute($sql);
echo "<br />删除成功!";
echo "<script language=\"JavaScript\">setTimeout(\"window.location.href=''?admin=list'';\", 100);</script>";
}
}
//==================================
//权限验证
//==================================
function admin_session(){
if(@
PHP+ACCESS 文章管理程序代码_网学
浏览:
SESSION["ARTICLEADMIN"] != "BY_PHP_ARTICLE"){
echo "<br />请先登陆!";
echo "<script language=\"JavaScript\">setTimeout(\"window.location.href=''?admin=login'';\", 2000);</script>";
exit();
}
}
//==================================
//后台登陆
//==================================
function admin_login(){
if(@
PHP+ACCESS 文章管理程序代码_网学
浏览:
SESSION["ARTICLEADMIN"] == "BY_PHP_ARTICLE"){
echo "<script language=\"JavaScript\">window.location.href=''?admin=admin'';</script>";
}
else{
echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"#cccccc\">\r\n"
. " <tr bgcolor=\"#F3F3F3\" align=\"center\">\r\n"
. " <td><strong>管理员登陆</strong></td>\r\n"
. " </tr>\r\n"
. " <tr bgcolor=\"#FFFFFF\">\r\n"
. " <form method=\"post\" action=\"?admin=check\">\r\n"
. " <td><input type=\"password\" name=\"adminPass\" /><input type=\"submit\" value=\"确定\" /></td>\r\n"
. " </form>\r\n"
. " </tr>\r\n"
. "</table>\r\n";
}
}
//==================================
//登陆验证
//==================================
function admin_check(){
if(trim(
PHP+ACCESS 文章管理程序代码_网学
浏览:
POST["adminPass"]) != "admin"){
echo "<br />错误的密码!";
echo "<script language=\"JavaScript\">setTimeout(\"history.back();\", 2000);</script>";
}
else {
echo "<br />登陆成功!";
@
PHP+ACCESS 文章管理程序代码_网学
浏览:
SESSION["ARTICLEADMIN"] = "BY_PHP_ARTICLE";
echo "<script language=\"JavaScript\">setTimeout(\"window.location.href=''?admin=admin'';\", 2000);</script>";
}
}
//==================================
//URL参数列表
//==================================
function page_load(){
@$classid =
PHP+ACCESS 文章管理程序代码_网学
浏览:
GET["classid"];
if($classid != ""){
if(!is_numeric($classid)){
echo "<br />错误的参数!";
return false;
}
else {
article_list($classid);
}
}
@$artid =
PHP+ACCESS 文章管理程序代码_网学
浏览:
GET["