Example #1
0
<?php

header("content-type:text/html;charset=utf-8");
include_once 'nologin.php';
include_once '../dbio/Reviews.php';
$articleId = $_GET["articleId"];
$id = $_GET["id"];
//删除一个评论
if ($id != NULL) {
    $result = Reviews::delReviewById($id);
    header("location:success.php?act=delReviews&rst={$result}&articleId={$articleId}");
}
$reviews = Reviews::getReviews($articleId);
?>
<html>
  <head>
    <title>查看评论</title>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <link href="../css/admin.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="../jquery/jquery-1.4.js"></script>
    <script type="text/javascript">
      function delReviews(id)
      {
          if(confirm("是否删除该评论?"))
          {
              window.location = "delreviews.php?articleId=<?php 
echo $articleId;
?>
&id="+id;
          }
      }