<?php $data = WComment::CommentCourseAll(10, 0, $contentcomment); $where = ""; $total = WComment::getTotalCommentCoursePages($contentcomment); $page = ceil($total / 10); ?> <p><a href="javascript:;" class="btn btn-danger btn-xs" style="visibility: hidden;" id="btndeleteall" onclick="return removeAllData(this);"><?php echo Yii::t('web/home', 'Delete All'); ?> </a><strong style="font-size: 18px;"><?php echo Yii::t('web/home', 'Course'); ?> </strong><span style=" font-size: 10px; font-style: italic; margin-left: 5px; ">(<?php echo Yii::t('web/home', 'Comments'); ?> )</span></span></p> <table class="table table-hover" style="margin-bottom: 0px;"> <thead class="first_thead"> <tr> <th width="1"><input type="checkbox" id="checkAll"></th> <th width="1">#</th> <th><?php echo Yii::t('web/home', 'Content Comment'); ?> </th> <th><center><?php echo Yii::t('web/home', 'Course'); ?> </center></th> <th><center><?php
public function actionCommentCourseLoadpage() { $page = $_REQUEST["page"]; $contentcomment = isset($_REQUEST["contentcomment"]) ? $_REQUEST["contentcomment"] : ""; $view = isset($_REQUEST["view"]) ? $_REQUEST["view"] : "_loadpage"; $results = WComment::CommentCourseAll(10, $page - 1, $contentcomment); $index = ($page - 1) * 10; $data = $this->renderPartial('trainer/' . $view, array('data' => $results, "index" => $index), true); echo json_encode(array("result" => "true", "html" => $data)); }