SHARE
TWEET

Untitled

a guest Jul 17th, 2017 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. if(Yii::app()->user->checkAccess('admin'))
  4. {
  5.     echo "you should see this if you're an admin";
  6.  
  7.     $this->pageTitle = "Buggyman Portal - Admin Panel";
  8.  
  9.     $this->breadcrumbs = array(
  10.     'Admin Home'=>array('index'),
  11.     'Manage',
  12.     );
  13.  
  14.     $this->menu = array(
  15.     array('label' => 'List Post',   'url' => array('index')),
  16.     array('label' => 'Create Post', 'url' => array('create')),
  17.     array('label' => 'Update Post', 'url' => array('update', 'id'=>$model->id)),
  18.     array('label' => 'Delete Post', 'url' => '#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
  19.     array('label' => 'Manage Post', 'url' => array('admin')),
  20.     );
  21. }
  22. else
  23.     echo "you're not an admin lol\n";
  24.  
  25. ?>
RAW Paste Data
Top