| Server IP : 103.48.194.25 / Your IP : 216.73.216.182 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64 User : sieuthimay ( 1016) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/nguyenlieumyphamgiasi.vn/public_html/site/components/lienhe/controllers/ |
Upload File : |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Lienhe extends MX_Controller
{
function __construct()
{
parent::__construct();
$this->load->model('lienhe_model','lienhe');
}
function index()
{
if(!empty($_POST['btnlienhe']))
{
$this->form_validation->set_rules('cusname','Họ tên','trim|required'); $this->form_validation->set_rules('cusphone','Điện thoại','trim|required');
if($this->form_validation->run() == FALSE)
{
$this->pre_message = validation_errors();
}
else
{
if($this->lienhe->addContacts())
{
$this->session->set_flashdata('message','Lưu thành công');
redirect('lien-he-thanh-cong');
}
else
{
$this->pre_message = 'Lưu không thành công';
}
}
}
$data['title'] = "Liên hệ" ;
$data['page'] = 'index';
$this->load->view("html/skin", $data);
}
/*private function build_data($flag=0)
{
$req["cusname"] = $this->input->post("cusname");
$req["cusmail"] = $this->input->post("cusmail");
$req["cusphone"] = $this->input->post("cusphone");
$req["message"] = $this->input->post("message");
$req["_wpnonce"] = $this->input->post("_wpnonce");
return $req;
}*/
function thanhcong()
{
$data['title'] = "Liên hệ thành công" ;
$data['cont'] = "Gởi thông tin thành công" ;
$data['page'] = 'lienhe/thanhcong';
$this->load->view("html/skin_news", $data);
}
}
?>