public function actionQuestionLib()
 {
     if (empty(Yii::app()->user->id)) {
         $this->redirect(Yii::app()->createUrl(""));
     }
     $data = WQuestionLib::getQuestionLibAll(10, 0);
     $total = WQuestionLib::getTotalQuestionLib();
     $page = ceil($total / 10);
     $this->render('lib/index', array('data' => $data, 'page' => $page));
 }
<?php

$data = WQuestionLib::getQuestionLibAll(10, 0, $questionType, $namequestion, $question_cat_id);
$where = "";
if (!empty($questionType)) {
    $where .= " AND t.question_type=" . $questionType;
}
if (!empty($namequestion)) {
    $where .= " AND t.question_text LIKE '%" . $namequestion . "%'";
}
if (!empty($question_cat_id)) {
    $where .= " AND t.question_cat_id=" . $question_cat_id;
}
$total = WQuestionLib::getTotalQuestionLib($where);
$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></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', 'Question');
?>
</th>
        <th class="col-lg-2"><?php 
echo Yii::t('web/home', 'Action');