當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UserModel::is_authorize方法代碼示例

本文整理匯總了PHP中UserModel::is_authorize方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserModel::is_authorize方法的具體用法?PHP UserModel::is_authorize怎麽用?PHP UserModel::is_authorize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在UserModel的用法示例。


在下文中一共展示了UserModel::is_authorize方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     if (!UserModel::is_authorize(UserModel::$TYPE_EMPLOYEE) && !UserModel::is_authorize(UserModel::$TYPE_COMPANY)) {
         redirect(base_url());
     }
 }
開發者ID:anggadarkprince,項目名稱:jagamana-web,代碼行數:7,代碼來源:notification.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     if (!UserModel::is_authorize(UserModel::$TYPE_COMPANY)) {
         redirect(base_url());
     }
     $this->load->model("ApplicationModel", "application_model");
 }
開發者ID:anggadarkprince,項目名稱:jagamana-web,代碼行數:8,代碼來源:applicant.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     if (!UserModel::is_authorize(UserModel::$TYPE_EMPLOYEE)) {
         redirect(base_url());
     }
     $this->load->library("form_validation");
 }
開發者ID:anggadarkprince,項目名稱:jagamana-web,代碼行數:8,代碼來源:skill.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     if (!UserModel::is_authorize(UserModel::$TYPE_ADMINISTRATOR)) {
         redirect(base_url());
     }
     $this->load->model("CompanySizeModel", "size_model");
     $this->load->library('form_validation');
 }
開發者ID:anggadarkprince,項目名稱:jagamana-web,代碼行數:9,代碼來源:size.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     if (!UserModel::is_authorize(UserModel::$TYPE_COMPANY)) {
         redirect(base_url());
     }
     $this->load->model("AchievementModel", "achievement_model");
     $this->load->library('form_validation');
 }
開發者ID:anggadarkprince,項目名稱:jagamana-web,代碼行數:9,代碼來源:achievement.php

示例6: index

 public function index()
 {
     if (UserModel::is_authorize(UserModel::$TYPE_ADMINISTRATOR)) {
         redirect("dashboard");
     } else {
         $data = array();
         $data["page"] = "Authentication";
         $this->load->view("administrator/pages/login", $data);
     }
 }
開發者ID:anggadarkprince,項目名稱:jagamana-web,代碼行數:10,代碼來源:administrator.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     if (!UserModel::is_authorize(UserModel::$TYPE_COMPANY)) {
         redirect(base_url());
     }
     $this->load->model("CompanyTaskModel", "task_model");
     $this->load->model("UploaderModel", "uploader_model");
     $this->load->library('form_validation');
 }
開發者ID:anggadarkprince,項目名稱:jagamana-web,代碼行數:10,代碼來源:task.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     if (!UserModel::is_authorize(UserModel::$TYPE_COMPANY)) {
         redirect(base_url());
     }
     $this->load->model("PeopleModel", "people_model");
     $this->load->model("PeoplePhotoModel", "people_photo_model");
     $this->load->model("PeopleSectionModel", "section_model");
     $this->load->model("UploaderModel", "uploader_model");
     $this->load->library('form_validation');
 }
開發者ID:anggadarkprince,項目名稱:jagamana-web,代碼行數:12,代碼來源:people.php

示例9: delete

 public function delete($id)
 {
     if (UserModel::is_authorize(UserModel::$TYPE_ADMINISTRATOR)) {
         $result = $this->employee_model->delete($id);
         if ($result) {
             $this->alert->warning_alert("Employee has been deleted successfully");
         } else {
             $this->alert->danger_alert("Something is getting wrong");
         }
         redirect("employee");
     } else {
         redirect("show404");
     }
 }
開發者ID:anggadarkprince,項目名稱:jagamana-web,代碼行數:14,代碼來源:employee.php

示例10: index

 public function index()
 {
     if (UserModel::is_authorize(UserModel::$TYPE_EMPLOYEE)) {
         $this->load->model("EmployeeActivityModel", "activity_model");
         $this->load->model("ApplicationModel", "application_model");
         $this->load->model("BookmarkModel", "bookmark_model");
         $this->load->model("FollowerModel", "follower_model");
         $employee = $this->session->userdata(UserModel::$SESSION_ID);
         $data = array();
         $data["page"] = "Employee Dashboard";
         $data["menu"] = "dashboard";
         $data["content"] = "website/pages/employee/dashboard";
         $data["chart"] = $this->application_model->get_statistic_range_applied($employee);
         $data["statistic_applied"] = $this->application_model->get_statistic_applied($employee);
         $data["statistic_saved"] = $this->bookmark_model->get_statistic_saved($employee);
         $data["statistic_following"] = $this->follower_model->get_statistic_following($employee);
         $data["activities"] = $this->activity_model->read_by_activity($employee);
         $this->load->view("website/template", $data);
     } else {
         if (UserModel::is_authorize(UserModel::$TYPE_COMPANY)) {
             $this->load->model("CompanyActivityModel", "activity_model");
             $this->load->model("ApplicationModel", "application_model");
             $this->load->model("JobModel", "job_model");
             $this->load->model("FollowerModel", "follower_model");
             $company = $this->session->userdata(UserModel::$SESSION_ID);
             $data = array();
             $data["page"] = "Company Dashboard";
             $data["menu"] = "dashboard";
             $data["content"] = "website/pages/company/dashboard";
             $data["chart"] = $this->application_model->get_statistic_range_applicant($company);
             $data["statistic_applicant"] = $this->application_model->get_statistic_applicant($company);
             $data["statistic_job"] = $this->job_model->get_statistic_list($company);
             $data["statistic_follower"] = $this->follower_model->get_statistic_follower($company);
             $data["activities"] = $this->activity_model->read_by_activity($company);
             $this->load->view("website/template", $data);
         } else {
             if (UserModel::is_authorize(UserModel::$TYPE_ADMINISTRATOR)) {
                 $this->load->model("VisitorModel", "visitor_model");
                 $data = array();
                 $data["page"] = "Dashboard";
                 $data["menu"] = "dashboard";
                 $data["content"] = "administrator/pages/dashboard";
                 $data["visitor"] = $this->visitor_model->read_chart_statistic();
                 $this->load->view("administrator/template", $data);
             } else {
                 redirect(base_url());
             }
         }
     }
 }
開發者ID:anggadarkprince,項目名稱:jagamana-web,代碼行數:50,代碼來源:dashboard.php

示例11: delete

 public function delete($id)
 {
     if (UserModel::is_authorize(UserModel::$TYPE_ADMINISTRATOR)) {
         $result = $this->comment_model->delete($id);
         if ($result) {
             $this->alert->success_alert("Comment has been removed successfully");
         } else {
             $this->alert->danger_aler("Something is getting wrong");
         }
         redirect("threads/comments");
     } else {
         redirect("error404");
     }
 }
開發者ID:anggadarkprince,項目名稱:jagamana-web,代碼行數:14,代碼來源:comment.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     if (!UserModel::is_authorize(UserModel::$TYPE_COMPANY)) {
         redirect(base_url());
     }
     $this->load->model("CompanyModel", "company_model");
     $this->load->model("CompanyFieldModel", "company_field_model");
     $this->load->model("CompanySizeModel", "company_size_model");
     $this->load->model("CountryModel", "country_model");
     $this->load->model("StateModel", "state_model");
     $this->load->model("CityModel", "city_model");
     $this->load->model("UploaderModel", "uploader_model");
     $this->load->model("CompanySectionModel", "section_model");
     $this->load->model("CompanyTaskModel", "task_model");
     $this->load->model("AchievementModel", "achievement_model");
     $this->load->library('form_validation');
 }
開發者ID:anggadarkprince,項目名稱:jagamana-web,代碼行數:18,代碼來源:profile.php

示例13: archive

 public function archive($destination, $id)
 {
     if (UserModel::is_authorize(UserModel::$TYPE_ADMINISTRATOR)) {
         $state = "IMPORTANT";
         if ($destination == "important") {
             $state = "GENERAL";
         }
         $data = array("fdb_type" => $state);
         $result = $this->feedback_model->update($data, $id);
         if ($result) {
             $this->alert->success_alert("Feedback has been moved as important record");
         } else {
             $this->alert->error_alert("Something is getting wrong");
         }
         redirect("feedback/{$destination}");
     } else {
         redirect("error404");
     }
 }
開發者ID:anggadarkprince,項目名稱:jagamana-web,代碼行數:19,代碼來源:feedback.php

示例14: delete_all

 public function delete_all()
 {
     if (UserModel::is_authorize(UserModel::$TYPE_ADMINISTRATOR)) {
         $collectid = $this->input->post("checkid");
         $result = true;
         foreach ($collectid as $id) {
             $delete = $this->job_model->delete($id);
             if (!$delete) {
                 $result = false;
             }
         }
         if ($result) {
             $this->alert->success_alert("Selected Jobs has been removed successfully");
         } else {
             $this->alert->danger_alert("Something is getting wrong");
         }
         redirect("jobs");
     } else {
         redirect("administrator");
     }
 }
開發者ID:anggadarkprince,項目名稱:jagamana-web,代碼行數:21,代碼來源:jobs.php

示例15: delete

 public function delete()
 {
     if ($_SERVER["REQUEST_METHOD"] == "POST") {
         if (UserModel::is_authorize(UserModel::$TYPE_EMPLOYEE)) {
             $employee_id = $this->session->userdata(UserModel::$SESSION_ID);
             $job_id = $this->input->post("job_id");
             $result = $this->bookmark_model->delete($job_id, $employee_id);
             if ($result) {
                 echo "success";
                 return;
             }
             echo "failed";
             return;
         } else {
             echo "restrict";
             return;
         }
     } else {
         redirect("error404");
     }
 }
開發者ID:anggadarkprince,項目名稱:jagamana-web,代碼行數:21,代碼來源:bookmark.php


注:本文中的UserModel::is_authorize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。