/** * Index Page for this controller or Showing Login Box to enter Admin Area * * Primary View is views/admin/blocks/login * */ public function index() { if (user::id()) { AZ::redirect('admin/dashboard'); } AZ::helper('form'); AZ::layout('login', array('block' => 'login')); }
/** * Showing Change Password Modal Pop up * * Primary View is views/front/blocks/account/password-box * */ public function change_password_box() { AZ::layout('block-only', array('block' => 'account/password-box')); }
/** * Add New or Edit Message Label * * @param integer $edit */ public function edit_label($edit = -1, $mode = 'inbox') { $label = $this->message->getLabelById($edit); AZ::layout('block-only', array('block' => 'messages/label-form', 'label' => $label, 'mode' => $mode)); }
/** * Add New or Edit Menu Item * * Primary View is views/admin/blocks/menus/item-form * * @param integer $menu_id * @param integer $item_id */ public function edit_item($menu_id, $item_id = -1) { AZ::helper('content'); $item = $this->menu->getMenuItemById($item_id); AZ::layout('left-content', array('block' => 'menus/item-form', 'item' => $item, 'menu_id' => $menu_id, 'scripts' => array('//cdn.ckeditor.com/4.5.4/full/ckeditor.js'))); }
/** * Add New or Edit Setting * * @param integer $setting_id * @return redirect */ public function edit_setting($setting_id = -1) { $group_A = $this->setting->getGroup_A(); $setting = $this->setting->getSettingById($setting_id); AZ::layout('left-content', array('block' => 'settings/field-form', 'group_A' => $group_A, 'setting' => $setting, 'styles' => 'css/jquery-ui.min.css', 'scripts' => 'scripts/jquery-ui-1.10.4.custom.min.js')); }
/** * Add New or Edit Content Field page for this controller * * Primary View is views/admin/blocks/contents/field-form * @param integer $edit * @param integer $fieldset */ public function edit_field($edit = -1, $fieldset = 1) { $field = $this->content->getFieldById($edit); $fieldset_name = $this->content->getFieldsetNameById($fieldset); AZ::layout('left-content', array('block' => 'contents/field-form', 'field' => $field, 'edit_id' => $edit, 'fieldset' => $fieldset, 'fieldset_name' => $fieldset_name, 'styles' => 'css/jquery-ui.min.css', 'scripts' => 'scripts/jquery-ui-1.10.4.custom.min.js')); }
/** * Show All Private methods for Access Role Permissions * */ public function permissions() { if (user::access_id() != 1) { AZ::redirectError('admin/dashboard', lang('Unauthorized Access')); } $roles = $this->user->getAccesses('id,name', array('id >' => 1)); $rows = $this->user->getPermissions('*', array('access_id' => 1)); $tasks = array(); if ($rows && count($rows)) { foreach ($rows as $row) { $tasks[$row->controller][] = $row->method; } } AZ::layout('left-content', array('block' => 'users/permissions', 'roles' => $roles, 'tasks' => $tasks)); }
/** * Group Category Page By Alias * * Primary View is views/front/blocks/content/page * * @param string $alias */ public function search($keyword, $offset = 0) { $total_contents = $this->content->getContentsByWords($keyword, 0, 0, true); $pagination = AZ::pagination('search?words=' . $keyword, 2, 5, $total_contents, true, true); $contents = $this->content->getContentsByWords($keyword, $offset, 5); $varriables = array('block' => 'content/search', 'contents' => $contents, 'total_contents' => $total_contents, 'pagination' => $pagination); if (isset($group->name)) { $varriables['page_title'] = 'Search Result for ' . $keyword; } AZ::layout('content-right', $varriables); //$this->content->track(); // uncomment for enabled self tracking into Visitors }