<?php 

//禁止直接访问
!defined('IN_SYSTEM') && exit('Access Denied');

//来路判断
if($AdminLogin->CheckHttpReferer(WEB_URL.'/admin/index.php?action=clearall') == true){

	//连接到MYSQL并打开系统数据库
	$DataBase->open_db();
	//执行删除操作
	if($DataBase->Del('message', "WHERE `check` in (".'2'.")")){
		$AdminShowMessage = AdminShowMessage('留言清空成功！', WEB_URL.'/admin/index.php?location=recycle', 1);
	}
	else{
		$AdminShowMessage = AdminShowMessage('清空失败！请检查原因！', WEB_URL.'/admin/index.php?location=recycle', 0, '#F00');
	}
	//关闭数据库连接
	$DataBase->close_dblink();

}
else{
	$AdminShowMessage = AdminShowMessage('来路不正确！', WEB_URL.'/admin/index.php?location=recycle', 0, '#F00');	//来路不正确
}

?>