private function index($page) { $folder = "FinalPaperReviewer/"; require dirname(__FILE__) . '/../config/privileges.php'; require dirname(__FILE__) . '/../utils/ViewUtils.php'; $this->load->model('access_model'); if (!file_exists(APPPATH . "views/pages/{$folder}" . $page . '.php')) { show_404(); } if (isset($privilege['Page'][$page]) && !$this->access_model->hasPrivileges($privilege['Page'][$page])) { $this->load->view('pages/unauthorizedAccess'); return; } $this->data['navbarItem'] = pageNavbarItem($page); $this->load->view('templates/header', $this->data); $this->load->view("pages/{$folder}" . $page, $this->data); $this->load->view('templates/footer'); }
public function index($page = 'home') { require dirname(__FILE__) . '/../config/privileges.php'; require dirname(__FILE__) . '/../utils/ViewUtils.php'; $this->load->model('access_model'); if (!file_exists(APPPATH . 'views/pages/' . $page . '.php')) { show_404(); } if (isset($privilege['Page'][$page]) && !$this->access_model->hasPrivileges($privilege['Page'][$page])) { $this->load->view('pages/unauthorizedAccess'); return; } if ($page == "home") { $this->data['loadableComponents'] = $this->access_model->getLoadableDashboardComponents($privilege['Component']); } $this->data['navbarItem'] = pageNavbarItem($page); $this->load->view('templates/header', $this->data); $this->load->view('pages/' . $page, $this->data); $this->load->view('templates/footer'); }
public function index($page = "ReviewerDashboardHome") { require dirname(__FILE__) . '/../config/privileges.php'; require dirname(__FILE__) . '/../utils/ViewUtils.php'; if (!file_exists(APPPATH . 'views/pages/' . $page . '.php')) { show_404(); } if (isset($privilege['Page'][$page]) && !$this->access_model->hasPrivileges($privilege['Page'][$page])) { $this->load->view('pages/unauthorizedAccess'); return; } //$_SESSION[APPID]['user_id'] = 2; $this->data['user_id'] = $_SESSION[APPID]['user_id']; $this->data['papers'] = $this->paper_version_review_model->getReviewerAssignedPapers($this->data['user_id']); $this->data['navbarItem'] = pageNavbarItem($page); $this->load->view('templates/header', $this->data); $this->load->view('templates/sidebar'); $this->load->view('pages/' . $page, $this->data); $this->load->view('templates/footer'); }
private function index($page = "dashboardHome") { require dirname(__FILE__) . '/../config/privileges.php'; require_once dirname(__FILE__) . '/../utils/ViewUtils.php'; $this->load->model('access_model'); if (!file_exists(APPPATH . 'views/pages/dashboard/' . $page . '.php')) { show_404(); } if (isset($privilege['Page'][$page]) && !$this->access_model->hasPrivileges($privilege['Page'][$page])) { $this->load->view('pages/unauthorizedAccess'); return; } loginModalInit($this->data); $this->data['navbarItem'] = pageNavbarItem($page); $this->load->view('templates/header', $this->data); $this->load->view('templates/dashboard/dashboardPanel'); $this->load->view('pages/dashboard/' . $page, $this->data); $this->load->view('templates/dashboard/dashboardEnding'); $this->load->view('templates/footer'); }
public function viewPage($page = "index") { $_SESSION['sudo'] = true; $this->load->model('access_model'); $this->load->model('indiacom_news_model'); require dirname(__FILE__) . '/../config/privileges.php'; require dirname(__FILE__) . '/../utils/ViewUtils.php'; if (!file_exists(APPPATH . 'views/pages/' . $page . '.php')) { show_404(); } if (isset($privilege['Page'][$page]) && !$this->access_model->hasPrivileges($privilege['Page'][$page])) { $this->load->view('pages/unauthorizedAccess'); return; } $data = loginModalInit(); $data['stickyNews'] = $this->indiacom_news_model->getPublishedStickyNews(); $data['nonStickyNews'] = $this->indiacom_news_model->getPublishedNonStickyNews(); $data['navbarItem'] = pageNavbarItem($page); $this->load->view('templates/header', $data); $this->load->view('pages/' . $page, $data); $this->load->view('templates/footer'); }