Example #1
0
 public function index()
 {
     if (in_array(Auth::getCapability(), array(CAPABILITY_ADMINISTRATOR))) {
         Model::autoloadModel('country');
         $model = new CountryModel($this->db);
         $this->para = new stdClass();
         if (isset($_POST['type'])) {
             $this->para->type = $_POST['type'];
         }
         if (isset($_POST['orderby'])) {
             $this->para->orderby = $_POST['orderby'];
         }
         if (isset($_POST['order'])) {
             $this->para->order = $_POST['order'];
         }
         if (isset($_POST['page'])) {
             $this->para->page = $_POST['page'];
         }
         if (isset($_POST['s'])) {
             $this->para->s = $_POST['s'];
         }
         if (isset($_POST['paged'])) {
             $this->para->paged = $_POST['paged'];
         }
         if (isset($_POST['countries'])) {
             $this->para->countries = $_POST['countries'];
         }
         if (isset($_POST['action'])) {
             $this->para->action = $_POST['action'];
         }
         if (isset($_POST['action2'])) {
             $this->para->action2 = $_POST['action2'];
         }
         if (isset($_POST['description_show'])) {
             $this->para->description_show = $_POST['description_show'];
         }
         if (isset($_POST['slug_show'])) {
             $this->para->slug_show = $_POST['slug_show'];
         }
         if (isset($_POST['tours_show'])) {
             $this->para->tours_show = $_POST['tours_show'];
         }
         if (isset($_POST['countries_per_page'])) {
             $this->para->countries_per_page = $_POST['countries_per_page'];
         }
         if (isset($_POST['adv_setting'])) {
             $this->para->adv_setting = $_POST['adv_setting'];
         }
         if (isset($this->para->adv_setting) && $this->para->adv_setting == "adv_setting") {
             $model->changeAdvSetting($this->para);
         }
         if (isset($this->para->type) && in_array($this->para->type, array("action", "action2")) && isset($this->para->countries)) {
             $model->executeAction($this->para);
         }
         $model->search($this->view, $this->para);
         if (count((array) $this->para) > 0) {
             $this->view->ajax = TRUE;
             $this->view->renderAdmin(RENDER_VIEW_COUNTRY_INDEX, TRUE);
         } else {
             $this->view->renderAdmin(RENDER_VIEW_COUNTRY_INDEX);
         }
     } else {
         $this->login();
     }
 }
Example #2
0
 public function index()
 {
     if (in_array(Auth::getCapability(), array(CAPABILITY_ADMINISTRATOR))) {
         Model::autoloadModel('internalflight');
         $model = new InternalflightModel($this->db);
         $this->para = new stdClass();
         if (isset($_POST['type'])) {
             $this->para->type = $_POST['type'];
         }
         if (isset($_POST['orderby'])) {
             $this->para->orderby = $_POST['orderby'];
         }
         if (isset($_POST['order'])) {
             $this->para->order = $_POST['order'];
         }
         if (isset($_POST['page'])) {
             $this->para->page = $_POST['page'];
         }
         if (isset($_POST['s'])) {
             $this->para->s = $_POST['s'];
         }
         if (isset($_POST['paged'])) {
             $this->para->paged = $_POST['paged'];
         }
         if (isset($_POST['internalflights'])) {
             $this->para->internalflights = $_POST['internalflights'];
         }
         if (isset($_POST['action'])) {
             $this->para->action = $_POST['action'];
         }
         if (isset($_POST['action2'])) {
             $this->para->action2 = $_POST['action2'];
         }
         if (isset($_POST['city_show'])) {
             $this->para->city_show = $_POST['city_show'];
         }
         if (isset($_POST['current_rating'])) {
             $this->para->current_rating = $_POST['current_rating'];
         }
         if (isset($_POST['vote_times'])) {
             $this->para->vote_times = $_POST['vote_times'];
         }
         if (isset($_POST['internalflights_per_page'])) {
             $this->para->internalflights_per_page = $_POST['internalflights_per_page'];
         }
         if (isset($_POST['adv_setting'])) {
             $this->para->adv_setting = $_POST['adv_setting'];
         }
         if (isset($this->para->adv_setting) && $this->para->adv_setting == "adv_setting") {
             $model->changeAdvSetting($this->para);
         }
         if (isset($this->para->type) && in_array($this->para->type, array("action", "action2")) && isset($this->para->internalflights)) {
             $model->executeAction($this->para);
         }
         $model->search($this->view, $this->para);
         if (count((array) $this->para) > 0) {
             $this->view->ajax = TRUE;
             $this->view->renderAdmin(RENDER_VIEW_INTERNALFLIGHT_INDEX, TRUE);
         } else {
             $this->view->renderAdmin(RENDER_VIEW_INTERNALFLIGHT_INDEX);
         }
     } else {
         $this->login();
     }
 }
Example #3
0
                                <div class="wp-menu-image dashicons-before dashicons-admin-users">
                                    <br>
                                </div>
                                <div class="wp-menu-name"><?php 
        echo DASHBOARD_USERS_YOUR_PROFILE_TITLE;
        ?>
</div>
                            </a>
                        </li>
                        <?php 
    }
}
?>

                    <?php 
if (in_array(Auth::getCapability(), array(CAPABILITY_ADMINISTRATOR))) {
    ?>
     
                        <li id="menu-settings" class="wp-has-submenu <?php 
    if ($this->checkForActiveController($_GET['url'], 'options')) {
        echo "wp-has-current-submenu wp-menu-open";
    } else {
        echo "wp-not-current-submenu";
    }
    ?>
 menu-top menu-icon-settings menu-top-last">
                            <a aria-haspopup="true" class="wp-has-submenu <?php 
    if ($this->checkForActiveController($_GET['url'], 'options')) {
        echo "wp-has-current-submenu wp-menu-open";
    } else {
        echo "wp-not-current-submenu";
Example #4
0
 public function index()
 {
     if (in_array(Auth::getCapability(), array(CAPABILITY_ADMINISTRATOR))) {
         Model::autoloadModel('User');
         $model = new UserModel($this->db);
         $this->para = new stdClass();
         if (isset($_POST['type'])) {
             $this->para->type = $_POST['type'];
         }
         if (isset($_POST['role'])) {
             $this->para->role = $_POST['role'];
         }
         if (isset($_POST['orderby'])) {
             $this->para->orderby = $_POST['orderby'];
         }
         if (isset($_POST['order'])) {
             $this->para->order = $_POST['order'];
         }
         if (isset($_POST['page'])) {
             $this->para->page = $_POST['page'];
         }
         if (isset($_POST['s'])) {
             $this->para->s = $_POST['s'];
         }
         if (isset($_POST['paged'])) {
             $this->para->paged = $_POST['paged'];
         }
         if (isset($_POST['users'])) {
             $this->para->users = $_POST['users'];
         }
         if (isset($_POST['new_role'])) {
             $this->para->new_role = $_POST['new_role'];
         }
         if (isset($_POST['new_role2'])) {
             $this->para->new_role2 = $_POST['new_role2'];
         }
         if (isset($_POST['action'])) {
             $this->para->action = $_POST['action'];
         }
         if (isset($_POST['action2'])) {
             $this->para->action2 = $_POST['action2'];
         }
         if (isset($_POST['email_show'])) {
             $this->para->email_show = $_POST['email_show'];
         }
         if (isset($_POST['role_show'])) {
             $this->para->role_show = $_POST['role_show'];
         }
         if (isset($_POST['tours_show'])) {
             $this->para->tours_show = $_POST['tours_show'];
         }
         if (isset($_POST['users_per_page'])) {
             $this->para->users_per_page = $_POST['users_per_page'];
         }
         if (isset($_POST['adv_setting'])) {
             $this->para->adv_setting = $_POST['adv_setting'];
         }
         if (isset($this->para->adv_setting) && $this->para->adv_setting == "adv_setting") {
             $model->changeAdvSetting($this->para);
         }
         if (isset($this->para->type) && in_array($this->para->type, array("action", "action2", "new_role", "new_role2")) && isset($this->para->users)) {
             if (in_array($this->para->type, array("action", "action2"))) {
                 $model->executeAction($this->para);
             } else {
                 $model->changeRole($this->para);
             }
         }
         $model->search($this->view, $this->para);
         if (count((array) $this->para) > 0) {
             $this->view->ajax = TRUE;
             $this->view->renderAdmin(RENDER_VIEW_USER_INDEX, TRUE);
         } else {
             $this->view->renderAdmin(RENDER_VIEW_USER_INDEX);
         }
     } else {
         $this->login();
     }
 }