这是我的代码:
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Buy extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->library('cart');
$this->load->model(array('product_model', 'availability_master_model', 'customer_model'));
// $this->load->model('common_model', 'obj_common', TRUE);
}
function index() {
$this->load->helper(array('text', 'form'));
$this->load->library('form_validation');
$this->form_validation->set_rules('email', 'Email', 'required|xss_clean|valid_email');
$this->form_validation->set_rules('name', 'Name', 'required|xss_clean');
$this->form_validation->set_rules('city', 'City', 'required|xss_clean');
$this->form_validation->set_rules('phone', 'Mobile', 'required|xss_clean|numeric|min_length[10]|max_length[10]|matches[confirm]');
$this->form_validation->set_rules('confirm', 'Confirm Mobile', 'required|xss_clean|numeric|min_length[10]|max_length[10]');
$this->form_validation->set_rules('land', 'Land Phone', 'xss_clean|numeric');
$this->form_validation->set_rules('pincode', 'Pincode', 'required|xss_clean|numeric|min_length[6]|max_length[6]');
$this->form_validation->set_rules('no_devices', 'Device Count', 'required|xss_clean');
$this->form_validation->set_rules('address', 'Address', 'required|xss_clean');
if ($this->form_validation->run() == FALSE) {
$data['product'] = $this->availability_master_model->get_availability('2');
$this->load->view('web/shop-online', $data);
} else {
$data = array(
'first_name' => $this->input->post('name'),
'address' => $this->input->post('address'),
'email' => $this->input->post('email'),
'city' => $this->input->post('city'),
'landline' => $this->input->post('land'),
'postal_code' => $this->input->post('pincode'),
'phone' => $this->input->post('phone'),
);
$this->db->insert('user_registration', $data);
$user_id = $this->db->insert_id();
redirect('buy/view_details/' . $user_id.'/'.$this->input->post('no_devices'));
}
}
}
我希望有一个功能齐全的加密代码。我使用的所有在线编码器都是在加密代码中添加一些额外的字段。这只是一些安全问题。所以请帮我解决。
由于