| 27 |
if (!($_SESSION["BBS_priv"]->checkpriv($sid,S_POST) && |
if (!($_SESSION["BBS_priv"]->checkpriv($sid,S_POST) && |
| 28 |
($_SESSION["BBS_priv"]->checkpriv($sid,S_MAN_S)))) |
($_SESSION["BBS_priv"]->checkpriv($sid,S_MAN_S)))) |
| 29 |
{ |
{ |
| 30 |
error_msg("Ȩָ£",true); |
error_msg("您无权恢复此文章!",true); |
| 31 |
exit(); |
exit(); |
| 32 |
} |
} |
| 33 |
|
|
| 34 |
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") |
| 35 |
or die("Delete article error!"); |
or die("Delete article error!"); |
| 36 |
|
|
| 37 |
//Add log |
//Add log |
| 41 |
//Set last reply date |
//Set last reply date |
| 42 |
if ($tid!=0) |
if ($tid!=0) |
| 43 |
{ |
{ |
| 44 |
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") |
| 45 |
or die("Update article error!"); |
or die("Update article error!"); |
| 46 |
} |
} |
| 47 |
|
|
| 49 |
|
|
| 50 |
if ($tid==0) |
if ($tid==0) |
| 51 |
{ |
{ |
| 52 |
header ("Location: detail.php?id=$id"); |
header ("Location: view_article.php?id=$id"); |
| 53 |
} |
} |
| 54 |
else |
else |
| 55 |
{ |
{ |
| 56 |
header ("Location: detail.php?id=$tid#$id"); |
header ("Location: view_article?id=$tid#$id"); |
| 57 |
} |
} |
| 58 |
?> |
?> |