예제 #1
0
 case 'availableCalendars':
     G::LoadClass('calendar');
     $calendar = new Calendar();
     $calendarObj = $calendar->getCalendarList(true, true);
     $oData[] = array('CALENDAR_UID' => '', 'CALENDAR_NAME' => '- None -');
     foreach ($calendarObj['array'] as $rowid => $row) {
         if ($rowid > 0) {
             $oData[] = array('CALENDAR_UID' => $row['CALENDAR_UID'], 'CALENDAR_NAME' => $row['CALENDAR_NAME']);
         }
     }
     print G::json_encode($oData);
     break;
 case 'rolesList':
     require_once PATH_RBAC . "model/Roles.php";
     $roles = new Roles();
     $rolesData = $roles->getAllRoles();
     foreach ($rolesData as $rowid => $row) {
         $oData[] = array('ROL_UID' => $row['ROL_CODE'], 'ROL_CODE' => $row['ROL_NAME']);
     }
     print G::json_encode($oData);
     break;
 case 'saveUser':
     try {
         $form = $_POST;
         if (isset($_POST['USR_UID'])) {
             $form['USR_UID'] = $_POST['USR_UID'];
         } else {
             $form['USR_UID'] = '';
         }
         if (!isset($form['USR_NEW_PASS'])) {
             $form['USR_NEW_PASS'] = '';
예제 #2
0
 /** List all roles held on system
  */
 public function systemrolesAction()
 {
     $roles = new Roles();
     $this->view->roles = $roles->getAllRoles();
 }