--- fenglin/bbs/restore.php 2025/03/01 08:43:29 1.2 +++ fenglin/bbs/restore.php 2025/03/28 05:55:16 1.5 @@ -1,4 +1,5 @@ @@ -8,8 +9,6 @@ if (isset($_GET["id"])) else $id=0; -$db_conn=include "./db_open.inc.php"; - $rs=mysql_query("select TID,SID from bbs where". " AID=$id and visible=0"); if($row=mysql_fetch_array($rs)) @@ -31,17 +30,17 @@ if (!($_SESSION["BBS_priv"]->checkpriv($ exit(); } -mysql_query("update bbs set visible=1,m_del=0,cached=0 where AID=$id") +mysql_query("update bbs set visible=1,m_del=0 where AID=$id") or die("Delete article error!"); //Add log -article_op_log($id,$_SESSION["BBS_uid"],'S',Client_Address(),$db_conn) +article_op_log($id,$_SESSION["BBS_uid"],'S',client_addr(),$db_conn) or die("Add log error!"); //Set last reply date if ($tid!=0) { - mysql_query("update bbs set cached=0,reply_count=reply_count+1 where aid=$tid") + mysql_query("update bbs set reply_count=reply_count+1 where aid=$tid") or die("Update article error!"); } @@ -49,10 +48,10 @@ mysql_close($db_conn); if ($tid==0) { - header ("Location: detail.php?id=$id"); + header ("Location: view_article.php?id=$id"); } else { - header ("Location: detail.php?id=$tid#$id"); + header ("Location: view_article?id=$tid#$id"); } ?>