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


PHP CI_Input::post方法代码示例

本文整理汇总了PHP中CI_Input::post方法的典型用法代码示例。如果您正苦于以下问题:PHP CI_Input::post方法的具体用法?PHP CI_Input::post怎么用?PHP CI_Input::post使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CI_Input的用法示例。


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

示例1:

 function employee_login(CI_Input $input)
 {
     $ci = get_instance();
     $ci->load->model('Employees');
     $result = $ci->Employees->employee_login($input->post('employeenumber'), $input->post('password'));
     if (isset($result) && count($result) != 0) {
         $ci->session->set_userdata(array('employeenumber' => $result[0]->EmployeeNumber, 'campaignid' => $result[0]->Campaignid, 'department' => $result[0]->Department, 'positionid' => $result[0]->PositionID));
         employee_redirect($result[0]->Department);
     } else {
         return "Employee is either inactive or does not exist.";
     }
 }
开发者ID:hfugen112678,项目名称:webforms,代码行数:12,代码来源:my_login_helper.php

示例2: index

 public function index()
 {
     $items = $this->input->post('items');
     $data = $this->vaola->prepareData($items);
     try {
         $this->vaola->sync($data);
         $message = 'Saved';
     } catch (\Exception $exc) {
         $message = $exc->getMessage();
     }
     $args = ['message' => $message, 'boxes' => count($data)];
     $this->load->view('layout/header.php');
     $this->load->view('page/save', $args);
     $this->load->view('layout/footer.php');
 }
开发者ID:andrejsstepanovs,项目名称:inventur,代码行数:15,代码来源:Save.php

示例3: post

	function post($index = '', $xss_clean = FALSE)
	{
		if($index === '')
			return ($_SERVER['REQUEST_METHOD'] === 'POST');

		return parent::post($index, $xss_clean);
	}
开发者ID:JDougherty,项目名称:Network-Management-System,代码行数:7,代码来源:MY_Input.php

示例4: post

 /**
  * {@inherit}
  */
 public function post($index = NULL, $xss_clean = NULL)
 {
     if ($this->mock_state) {
         return $this->_fetch_from_array($this->mock_POST, $index, $xss_clean);
     }
     return parent::post($index, $xss_clean);
 }
开发者ID:egig,项目名称:CodeIgniter-HMVC-Support,代码行数:10,代码来源:Input.php

示例5: post

 function post($index = '', $xss_clean = FALSE)
 {
     if ($index === '') {
         $return = $_POST ? TRUE : FALSE;
         return $return;
     }
     return parent::post($index, $xss_clean);
 }
开发者ID:RVRKC,项目名称:Hackathon_2015,代码行数:8,代码来源:MY_Input.php

示例6: post

 public function post($index = null, $xss_clean = TRUE)
 {
     if (!$xss_clean) {
         //if asked for raw post data -eg. post('key', false)-, return raw data. Use with caution.
         return $this->_POST_RAW[$index];
     }
     return parent::post($index, $xss_clean);
 }
开发者ID:acutedeveloper,项目名称:openreach-connected-ci,代码行数:8,代码来源:MY_Input.php

示例7: post

 public function post($index = NULL, $xss_clean = NULL, $default_value = NULL)
 {
     $value = parent::post($index, $xss_clean);
     if (empty($value) && $default_value !== NULL) {
         $value = $default_value;
     }
     return $value;
 }
开发者ID:abhinaykrupa,项目名称:1s,代码行数:8,代码来源:MY_Input.php

示例8: post

 /**
  * @param null $index
  * @param bool $xss_clean
  * @param null $default_value
  * @return array|null|string
  */
 function post($index = NULL, $xss_clean = FALSE, $default_value = NULL)
 {
     $ret_val = parent::post($index, $xss_clean);
     if ($ret_val === false && isset($default_value)) {
         $ret_val = $default_value;
     }
     return $ret_val;
 }
开发者ID:janladaking,项目名称:CodeIgniter,代码行数:14,代码来源:MY_Input.php

示例9: register

 public function register()
 {
     $data = $this->input->post(['email', 'password']);
     $response = $this->moneyzaurus->userRegister($data['email'], $data['password']);
     if ($response['code'] == 200) {
         if (!$response['data']['success']) {
             $this->session->set_flashdata('message', $response['data']['message']);
             redirect('');
         }
         $message = sprintf('Hi %s', $response['data']['data']['email']);
         $this->session->set_flashdata('message', $message);
         if ($this->loginCustomer($data['email'], $data['password'])) {
             redirect('/transaction');
         }
     }
     redirect('');
 }
开发者ID:andrejsstepanovs,项目名称:moneyzaurus-ci,代码行数:17,代码来源:Login.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->model('user_model');
     $this->load->helper('url_helper');
     $input = new CI_Input();
     $this->params = array_merge($input->get(), $input->post());
     $this->checkLogin();
 }
开发者ID:ammilly,项目名称:family,代码行数:9,代码来源:Family.php

示例11: post

 function post($index = '', $xss_clean = FALSE)
 {
     // this will be true if post() is called without arguments
     if ($index === '') {
         return $_SERVER['REQUEST_METHOD'] === 'POST';
     }
     // otherwise do as normally
     return parent::post($index, $xss_clean);
 }
开发者ID:priyasyal,项目名称:hwsports,代码行数:9,代码来源:MY_Input.php

示例12: save

 public function save()
 {
     $data = $this->input->post(['id', 'item', 'group', 'price', 'date']);
     if (!empty($data['id'])) {
         $response = $this->moneyzaurus->transactionsUpdate($data['id'], $data['item'], $data['group'], $data['price'], 'EUR', $data['date']);
     } else {
         $response = $this->moneyzaurus->transactionsAdd($data['item'], $data['group'], $data['price'], 'EUR', $data['date']);
     }
     if ($response['code'] == 200) {
         if (!$response['data']['success']) {
             $this->session->set_flashdata('message', $response['data']['message']);
         } else {
             $data = ['success' => $response['data']['data']['id'], 'date' => $data['date']];
         }
         redirect('/transaction?' . http_build_query($data));
     }
     $this->session->set_flashdata('message', 'Error');
     redirect('/transaction?' . http_build_query($data));
 }
开发者ID:andrejsstepanovs,项目名称:moneyzaurus-ci,代码行数:19,代码来源:Transaction.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     //$this->load = load_class('Loader', 'core');
     //$this->load->initialize();
     $this->load->model('user_model');
     //$/this->load->helper('url_helper');
     //$this->user_model = new User_Model();
     //load_class('');
     $input = new CI_Input();
     $this->params = array_merge($input->get(), $input->post());
 }
开发者ID:ammilly,项目名称:family,代码行数:12,代码来源:MyHook.php

示例14: declineConnection

 public function declineConnection()
 {
     $id = $this->input->post('id');
     $response = $this->moneyzaurus->connectionReject($id);
     if ($response['code'] == 200) {
         if (!$response['data']['success']) {
             $this->session->set_flashdata('message', $response['data']['message']);
         } else {
             $this->session->set_flashdata('message', 'Connection rejected');
         }
     }
     redirect('/profile');
 }
开发者ID:andrejsstepanovs,项目名称:moneyzaurus-ci,代码行数:13,代码来源:Profile.php

示例15: setStringDataFromPost

 /**
  * @param $object
  * @param $fieldNames
  */
 protected function setStringDataFromPost(&$object, $fieldNames)
 {
     if (isset($this->ModelName) && !is_null($this->ModelName) && $this->ModelName !== '') {
         if (is_array($fieldNames) && count($fieldNames) > 0) {
             foreach ($fieldNames as $fieldName) {
                 if (class_exists($this->ModelName) && property_exists($this->ModelName, $fieldName)) {
                     $value = addslashes($this->security->xss_clean($this->input->post(strtolower($fieldName))));
                     $object->{'set' . $fieldName}($value);
                 }
             }
         }
     }
 }
开发者ID:hungtruongquoc,项目名称:trip_planner,代码行数:17,代码来源:TP_Controller.php


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