<?php

$data = WComment::CommentLectureAll(10, 0, $contentcomment);
$where = "";
$total = WComment::getTotalCommentLecturePages($contentcomment);
$page = ceil($total / 10);
?>
<p><a href="javascript:;" class="btn btn-danger btn-xs" style="visibility: hidden;" id="btndeletealllecture" onclick="return removeAllDataLecture(this);"><?php 
echo Yii::t('web/home', 'Delete All');
?>
</a><strong style="font-size: 18px;"><?php 
echo Yii::t('web/home', 'Lecture');
?>
</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="checkAllLecture" ></th>
        <th width="1">#</th>
        <th><?php 
echo Yii::t('web/home', 'Content Comment');
?>
</th>
        <th><center><?php 
echo Yii::t('web/home', 'Lecture');
?>
</center></th>
        <th><center><?php 
<?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 
Пример #3
0
">
                    <span class="glyphicon glyphicon-floppy-saved"  aria-hidden="true"></span> <?php 
        echo Yii::t('web/home', 'Save');
        ?>
                </button>
                <button class="btn btn-default btn-xs" onclick="return buttonCancelComment(this);" data-idcomment="<?php 
        echo $item["id"];
        ?>
">
                    <span class="glyphicon glyphicon-off"   aria-hidden="true"></span> <?php 
        echo Yii::t('web/home', 'Cancel');
        ?>
                </button>
            </p>
            <?php 
        $dataCourseLecture = WComment::getInfoCourseLectureComment($item["id"], $item["data_id"], $item["data_type"]);
        ?>
            <?php 
        if (!empty($dataCourseLecture)) {
            ?>
            <div>- <a target="_blank" href="<?php 
            echo $dataCourseLecture[$item["id"]]["url"];
            ?>
" style="width: 100%;font-size: 11px;"><?php 
            echo $dataCourseLecture[$item["id"]]["name"];
            ?>
</a></div>
            <?php 
        }
        ?>
        </td>
Пример #4
0
 public static function DeleteHistorycomment($id_comment)
 {
     $model = WComment::model()->find("id=" . $id_comment);
     if ($model->delete()) {
         return TRUE;
     }
     return FALSE;
 }
 public function actionDeleteComment()
 {
     $idcomment = $_REQUEST["idcomment"];
     $model = WComment::model()->findByPk($idcomment);
     $status = 'false';
     if ($model->delete()) {
         $status = 'true';
     }
     echo json_encode(array("result" => $status));
 }