当前位置: 首页>>代码示例>>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;未经允许,请勿转载。