Example #1
0
 public function testGetReviews()
 {
     $params = $this->getParams();
     $_SERVER['HTTP_USER_AGENT'] = "google";
     $obj = new Reviews($params);
     $res = $obj->getReviews();
     $this->assertNotEmpty($res);
 }
Example #2
0
        echo "\talert('发表评论成功!');";
        echo "\twindow.location='news.php?articleId={$articleId}';";
        echo "</script>";
    } else {
        echo "<script type='text/javascript'>";
        echo "\talert('发表评论失败!');";
        echo "\twindow.location='news.php?articleId={$articleId}';";
        echo "</script>";
    }
}
//获得当前页面显示的新闻
$result3 = NewsArticles::getNewsById($articleId);
//所有分类
$newsTypes = NewsTypes::getNewsTypes();
//获得该新闻的所有评论
$reviews = Reviews::getReviews($articleId);
?>
<html>
  <head>
    <title>天天新闻网</title>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <link href="css/news.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="kindeditor/kindeditor.js"></script>
	<script type="text/javascript">
	  var editor;//编辑器对象
	  KindEditor.ready(function(e){
		  editor = e.create("[name=content]",{
			  "width":"560px",
			  "height":"200px",
			  "items":["source","|","undo","redo","|","bold","italic","underline"]
		  });