Esempio n. 1
0
 public function listAction()
 {
     $users_rs = Admin_UsersModel::getAll(array());
     foreach ($users_rs as &$user_row) {
         $user_row['role'] = Admin_RolesModel::get(array('id' => $user_row['role_id']));
         $user_row['last_active'] = Cms_Time::label($user_row['last_active']);
     }
     $this->getView()->all_roles = Admin_RolesModel::getAll(array());
     $this->getView()->all = $users_rs;
     $body = $this->getView()->fetch();
     $this->getResponse()->setBody($body)->toJson();
 }
Esempio n. 2
0
 /**
  *
  */
 public static function initTranslate()
 {
     self::$days = array(1 => __('time: day 1'), 2 => __('time: day 2'), 3 => __('time: day 3'), 4 => __('time: day 4'), 5 => __('time: day 5'), 6 => __('time: day 6'), 7 => __('time: day 7'));
     self::$months = array(1 => __('time: month 1'), 2 => __('time: month 2'), 3 => __('time: month 3'), 4 => __('time: month 4'), 5 => __('time: month 5'), 6 => __('time: month 6'), 7 => __('time: month 7'), 8 => __('time: month 8'), 9 => __('time: month 9'), 10 => __('time: month 10'), 11 => __('time: month 11'), 12 => __('time: month 12'));
 }