当前位置: 首页>>代码示例>>PHP>>正文


PHP force_ssl函数代码示例

本文整理汇总了PHP中force_ssl函数的典型用法代码示例。如果您正苦于以下问题:PHP force_ssl函数的具体用法?PHP force_ssl怎么用?PHP force_ssl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了force_ssl函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 function __construct()
 {
     parent::__construct();
     force_ssl();
     /*make sure the cart isnt empty*/
     if ($this->go_cart->total_items() == 0) {
         redirect('cart/view_cart');
     }
     /*is the user required to be logged in?*/
     if (config_item('require_login')) {
         $this->Customer_model->is_logged_in('checkout');
     }
     if (!config_item('allow_os_purchase') && config_item('inventory_enabled')) {
         /*double check the inventory of each item before proceeding to checkout*/
         $inventory_check = $this->go_cart->check_inventory();
         if ($inventory_check) {
             /*
             OOPS we have an error. someone else has gotten the scoop on our customer and bought products out from under them!
             we need to redirect them to the view cart page and let them know that the inventory is no longer there.
             */
             $this->session->set_flashdata('error', $inventory_check);
             redirect('cart/view_cart');
         }
     }
     /* Set no caching
     	
     		header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
     		header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); 
     		header("Cache-Control: no-store, no-cache, must-revalidate"); 
     		header("Cache-Control: post-check=0, pre-check=0", false);
     		header("Pragma: no-cache");
     	
     		*/
     $this->load->library('form_validation');
 }
开发者ID:FAVHYAN,项目名称:a3workout,代码行数:35,代码来源:checkout.php

示例2: __construct

 function __construct()
 {
     parent::__construct();
     force_ssl();
     $this->load->model(array('location_model'));
     $this->load->helper(array('form', 'url'));
 }
开发者ID:FAVHYAN,项目名称:a3workout,代码行数:7,代码来源:streaming.php

示例3: __construct

 function __construct()
 {
     parent::__construct();
     force_ssl();
     $this->load->library('Auth');
     $this->lang->load('login');
 }
开发者ID:devarj,项目名称:design,代码行数:7,代码来源:login.php

示例4: form

 function form($id = false)
 {
     force_ssl();
     //echo "<pre>"; print_r($_FILES); print_r($_POST); die;
     $this->load->helper('form');
     $this->load->library('form_validation');
     $data['page_title'] = 'Add/Edit Deal City';
     //default values are empty if the deal_type is new
     $data['id'] = '';
     $data['name'] = '';
     if ($id) {
         $this->deal_city_id = $id;
         $deal_city = $this->Deal_cities_model->get_deal_city($id);
         //if the deal_type does not exist, redirect them to the deal_type list with an error
         if (!$deal_city) {
             $this->session->set_flashdata('error', 'The requested city is not found');
             redirect($this->config->item('admin_folder') . '/deal_cities');
         }
         //set values to db values
         $data['id'] = $deal_city->id;
         $data['name'] = $deal_city->name;
     }
     $this->form_validation->set_rules('name', 'Name', 'trim|required');
     if ($this->form_validation->run() == FALSE) {
         $this->load->view($this->config->item('admin_folder') . '/deal_city_form', $data);
     } else {
         $save['id'] = $id;
         $save['name'] = $this->input->post('name');
         $this->Deal_cities_model->save($save);
         $this->session->set_flashdata('message', 'City saved successfully');
         //go back to the deal_city list
         redirect($this->config->item('admin_folder') . '/deal_cities');
     }
 }
开发者ID:dealsign,项目名称:public_html,代码行数:34,代码来源:deal_cities.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->model('Messages_model');
     $this->load->model('Application_model');
     $this->load->model('Users_model');
     $this->load->model('Programs_model');
     $this->load->library('session');
     $this->load->library('fpdf');
     $this->load->library('tank_auth');
     $this->load->helper('form');
     $this->load->model('tank_auth/users');
     $this->load->helper('debugger.inc');
     if (!$this->tank_auth->is_logged_in()) {
         redirect('/auth/login');
     }
     force_ssl();
     // Set values in session to be used across the site
     $user = $this->users->get_user_by_id($this->tank_auth->get_user_id(), true);
     $this->session->set_userdata('uid', $this->Users_model->getUIDByEmail($user->email));
     $this->session->set_userdata('item_id', $this->Users_model->getProgramIDByEmail($user->email));
     $this->session->set_userdata('has_stp', $this->Programs_model->has_stp($this->session->userdata('item_id')));
     $this->session->set_userdata('program_name', $this->Programs_model->get_program_name($this->session->userdata('item_id')));
     // grab session UID and log out if something went wrong
     $this->uid = $this->session->userdata('uid');
     $this->item_id = $this->session->userdata('item_id');
     $this->program_name = $this->session->userdata('program_name');
     if ($this->uid == NULL) {
         $this->tank_auth->logout();
     }
     $mongo_user = $this->Users_model->get_user_by_uid($this->uid);
     if (!isset($mongo_user['type']) || !strstr($mongo_user['type'], "EC")) {
         //$this->Users_model->update_user_from_dw_leads($this->uid);
     }
 }
开发者ID:robeysan,项目名称:studentportal,代码行数:35,代码来源:main.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->model('Messages_model');
     $this->load->helper('date');
     force_ssl();
 }
开发者ID:robeysan,项目名称:studentportal,代码行数:7,代码来源:messages.php

示例7: __construct

 function __construct()
 {
     parent::__construct();
     force_ssl();
     $this->load->model(array('location_model'));
     $this->customer = $this->go_cart->customer();
 }
开发者ID:Joncg,项目名称:eelly_cps_fx,代码行数:7,代码来源:secure.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     if ($this->config->item('ssl')) {
         force_ssl();
     }
 }
开发者ID:e-gob,项目名称:ChileAtiende,代码行数:7,代码来源:autenticacion.php

示例9: __construct

 function __construct()
 {
     parent::__construct();
     force_ssl();
     /* make sure the cart isnt empty */
     if ($this->go_cart->total_items() == 0) {
         redirect('cart/view_cart');
     }
     /* is the user required to be logged in? */
     if (config_item('require_login')) {
         $this->Customer_model->is_logged_in('checkout');
     }
     if (!config_item('allow_os_purchase') && config_item('inventory_enabled')) {
         /* double check the inventory of each item before proceeding to checkout */
         $inventory_check = $this->go_cart->check_inventory();
         if ($inventory_check) {
             /*
              OOPS we have an error. someone else has gotten the scoop on our customer and bought products out from under them!
              we need to redirect them to the view cart page and let them know that the inventory is no longer there.
             */
             $this->session->set_flashdata('error', $inventory_check);
             redirect('cart/view_cart');
         }
     }
     $this->load->library('form_validation');
 }
开发者ID:devarj,项目名称:design,代码行数:26,代码来源:checkout.php

示例10: __construct

 function __construct()
 {
     parent::__construct();
     // Load in the admin helper functions if the current user is an administrator
     if ($this->secure->group_types(array(ADMINISTRATOR))->is_auth()) {
         $this->load->helper('admin_helper');
     }
     $this->cms_parameters = array();
     $this->cms_base_route = '';
     // Check if to force ssl on controller
     if (in_uri($this->config->item('ssl_pages'))) {
         force_ssl();
     } else {
         remove_ssl();
     }
     // Create Dynamic Page Title
     if (!($title = str_replace('-', ' ', $this->uri->segment(1)))) {
         $title = 'Home';
     }
     if ($segment2 = str_replace('-', ' ', $this->uri->segment(2))) {
         $title = $segment2 . " - " . $title;
     }
     $this->template->set_meta_title(ucwords($title) . " | " . $this->settings->site_name);
     // Set Group
     if ($this->session->userdata('user_session')) {
         $this->group_id = $this->session->userdata('user_session')->group_id;
         $this->Group_session = $this->session->userdata('group_session');
     }
 }
开发者ID:mamtasingh87,项目名称:bytecode,代码行数:29,代码来源:MY_Controller.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->model('Messages_model');
     $this->load->model('Application_model');
     $this->load->model('Users_model');
     $this->load->library('session');
     $this->load->library('fpdf');
     $this->load->library('tank_auth');
     $this->load->helper('form');
     $this->load->library('email');
     $this->load->model('tank_auth/users');
     $this->load->helper('debugger.inc');
     if (!$this->tank_auth->is_logged_in()) {
         redirect('/auth/login');
     }
     force_ssl();
     $user = $this->users->get_user_by_id($this->tank_auth->get_user_id(), true);
     $this->session->set_userdata('uid', $this->Users_model->getUIDByEmail($user->email));
     // grab session UID and log out if something went wrong
     $this->uid = $this->session->userdata('uid');
     if ($this->uid == NULL) {
         $this->tank_auth->logout();
     }
 }
开发者ID:robeysan,项目名称:studentportal,代码行数:25,代码来源:finaid.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     date_default_timezone_set('America/New_York');
     $this->load->model('Application_model');
     $this->load->model('Programs_model');
     $this->load->model('Users_model');
     $this->load->model('Messages_model');
     $this->load->model('School_model');
     $this->load->model('Programs_model');
     $this->load->library('session');
     $this->load->library('tank_auth');
     $this->load->library('email');
     $this->load->library(SITE, '', 'school_lib');
     $this->load->helper('date');
     $this->portal_entity_id = $this->Programs_model->get_entity_id_for_current_site();
     if (!$this->tank_auth->is_logged_in()) {
         redirect('/auth/login');
     }
     // Grab session UID and log out if something went wrong
     $this->uid = $this->session->userdata('uid');
     if ($this->uid == NULL) {
         $this->tank_auth->logout();
     }
     // Grab some user data, stick it in session to be used later
     $user = $this->users->get_user_by_id($this->tank_auth->get_user_id(), true);
     $this->session->set_userdata('item_id', $this->Users_model->getProgramIDByEmail($user->email));
     $this->session->set_userdata('has_stp', $this->Programs_model->has_stp($this->session->userdata('item_id')));
     $this->item_id = $this->session->userdata('item_id');
     $this->user_progress = $this->Users_model->getProgress($this->uid);
     force_ssl();
 }
开发者ID:robeysan,项目名称:studentportal,代码行数:32,代码来源:app.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     date_default_timezone_set('America/New_York');
     $this->load->model('Application_model');
     $this->load->model('Users_model');
     $this->load->library('session');
     $this->load->library('fpdf');
     $this->load->library('tank_auth');
     $this->load->library(SITE, '', 'school_lib');
     $this->load->helper('form');
     $this->load->library('email');
     $this->load->model('tank_auth/users');
     if (!$this->tank_auth->is_logged_in()) {
         redirect('/auth/login');
     }
     force_ssl();
     $user = $this->users->get_user_by_id($this->tank_auth->get_user_id(), true);
     $this->session->set_userdata('uid', $this->Users_model->getUIDByEmail($user->email));
     $this->session->set_userdata('client_program_id', $this->Users_model->getProgramIDByEmail($user->email));
     $this->client_program_id = $this->session->userdata('client_program_id');
     // grab session UID and log out if something went wrong
     $this->uid = $this->session->userdata('uid');
     if ($this->uid == NULL) {
         $this->tank_auth->logout();
     }
 }
开发者ID:robeysan,项目名称:studentportal,代码行数:27,代码来源:otr.php

示例14: __construct

 function __construct()
 {
     parent::__construct();
     if ($this->config->item('ssl')) {
         force_ssl();
     }
     $this->load->helper('xml');
 }
开发者ID:e-gob,项目名称:ChileAtiende,代码行数:8,代码来源:desarrolladores.php

示例15: __construct

 function __construct()
 {
     parent::__construct();
     if ($this->config->item('ssl')) {
         force_ssl();
     }
     UsuarioBackendSesion::checkLogin();
 }
开发者ID:e-gob,项目名称:ChileAtiende,代码行数:8,代码来源:portada.php


注:本文中的force_ssl函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。