//删除留言 $id = $_GET['id']; $guestbook = new Guestbook(); //判断执行结果 if ($guestbook->deleteMessage($id)) { //成功:加载留言管理页面 admin_redirect('留言删除成功', 'guestbook.php'); } else { //失败 admin_redirect('留言删除失败', 'guestbook.php'); } } elseif ($act == 'replay') { //回覆留言,加載回覆留言板 $id = $_GET['id']; $guestbook = new Guestbook(); $list = $guestbook->getMessageById($id); include_once ADMIN_TEMP . 'guestbook-modify.html'; } elseif ($act == 'update') { $g_text_replay = $_GET['replyContent']; //留言回复 $id = $_GET['id']; $guestbook = new Guestbook(); //判斷 if ($guestbook->updateReplay($id, $g_text_replay)) { //回复成功 admin_redirect('guestbook.php', '回复留言成功'); } else { //回复失败 admin_redirect('guestbook.php', '回复留言失败'); } }