}
if (!empty($test_cat_id)) {
    $where .= " AND t.test_cat_id=" . $test_cat_id;
}
if (!empty($nametestparent)) {
    $where .= " AND t.test_name LIKE '%" . $nametestparent . "%'";
}
if ($kind_of_test != "") {
    $where .= " AND t.kind_of_test=" . $kind_of_test;
}
if (!empty(Yii::app()->user->id) and Yii::app()->session["group_id"] == 1) {
    $where .= " AND t.created_by=" . Yii::app()->user->id;
} elseif (!empty(Yii::app()->user->id) and Yii::app()->session["group_id"] == 2) {
    $where .= " AND t.created_by=NULL";
}
$total = WTestParent::getTotalPages($where);
$page = ceil($total / 10);
?>
<div id="content_data">
<?php 
if (isset($data) && !empty($data)) {
    foreach ($data as $key => $item) {
        ?>
    <div class="dataList_item_test_trainer">
        <a href="<?php 
        echo Yii::app()->createUrl('wTest/EditTestParent', array('id' => $item['id']));
        ?>
" class="item_direct">
            <?php 
        if (!empty($item['avatar'])) {
            ?>