<?php require_once "config.php"; require_once ykfile("source/comment_service.php"); session_start(); header("Content-Type:text/html;charset=UTF-8"); $next_id = intval($_GET['next_id']); $count = intval($_GET['count']); $act_id = intval($_GET['act_id']); $commSer = new CommentService(); $comments = $commSer->get_comments($act_id, $next_id, $count); $page_title = "演讲评论"; include ykfile("pages/commentList.php");
<?php require_once '../config.php'; require_once ykfile('source/comment_service.php'); header("application/json;charset=utf-8"); $act_id = intval($_GET['act_id']); if ($act_id < 0) { $act_id = 0; } $next_id = intval($_GET['next_id']); if ($next_id < 0) { $next_id = 0; } $count = intval($_GET['count']); if ($count <= 0 || $count > 300) { $count = 10; } $comsrv = new CommentService(); $total = $comsrv->get_count_by_act($act_id); $comments = $comsrv->get_comments($act_id, $next_id, $count); echo json_encode(array("total" => $total, "comments" => $comments));
<?php require_once "../config.php"; require_once ykfile("source/talk_service.php"); require_once ykfile("source/comment_service.php"); /** * 演讲详情页 */ $talk_id = intval($_GET['id']); $talkService = new TalkService(); $talk = $talkService->get_by_id($talk_id); $page_title = "演讲详情"; $comsrv = new CommentService(); $comments = $comsrv->get_comments($talk_id, 0, 3); require_once ykfile("pages/talk/detail.php");