예제 #1
0
 /**
  * @return CActiveRecord
  */
 public static function getAllRole()
 {
     return Quyenquantri::model()->findAll();
 }
예제 #2
0
파일: update.php 프로젝트: BanNT/xechieuve
    <div class="col-md-6">
        <?php 
echo $form->labelEx($model, 'trang_thai');
?>
        <?php 
echo $form->dropDownList($model, 'trang_thai', Quantrivien::getTypeAdminStatus(), array('class' => 'form-control'));
?>
        <?php 
echo $form->error($model, 'trang_thai');
?>
    </div>
    <div class="clearfix"></div>
    <div class="col-md-6">
        <strong>Phân quyền quản trị:</strong><br/><br/>
        <?php 
$roles = Quyenquantri::getAllRole();
foreach ($roles as $role) {
    $find = false;
    foreach ($phanQuyen as $quyen) {
        if ($role->ma_quyen == $quyen->ma_quyen) {
            $find = true;
            break;
        }
    }
    ?>
            <div>
                <input <?php 
    echo $find ? "checked" : "";
    ?>
 name="role[]" value="<?php 
    echo CHtml::encode($role->ma_quyen);