Beispiel #1
0
 public function access()
 {
     if (!User::info()) {
         return false;
     }
     $this->_access = User::caccess();
     if (in_array(Route::controller(), array('ajax', 'form')) or in_array(Route::action(), array('printTicket', 'print', 'createOrder')) or Route::controller() == 'orders' && Route::action() == 'delete') {
         return true;
     }
     if ($this->_access == 'no') {
         $this->no_access();
     }
     if ($this->_access == 'view' && Route::action() != 'index' && Route::action() != 'edit') {
         $this->no_access();
     }
 }
Beispiel #2
0
                                            <?php 
        if ($obj->status == 1) {
            ?>
                                                <i class="fa-check green"></i>
                                            <?php 
        } else {
            ?>
                                                <i class="fa-dot-circle-o red"></i>
                                            <?php 
        }
        ?>
                                        <?php 
    }
    ?>
                                        <?php 
    if (\Core\User::caccess() == 'edit') {
        ?>
                                            <a
                                                data-pub="<b>Отметить как непрочитанное</b><br>Прочитано"
                                                data-unpub="<b>Отметить как прочитано</b><br>Не прочитано"
                                                title="<?php 
        echo $obj->status == 1 ? '<b>Отметить как непрочитанное</b><br>Прочитано' : '<b>Отметить как прочитано</b><br>Не прочитано';
        ?>
"
                                                data-status="<?php 
        echo $obj->status;
        ?>
"
                                                data-id="<?php 
        echo $obj->id;
        ?>