403Webshell
Server IP : 103.48.194.25  /  Your IP : 216.73.216.231
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 : 8.2.20
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/hocthongminh.net-bk/public_html/webadmin/components/lienhe/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/hocthongminh.net-bk/public_html/webadmin/components/lienhe/controllers/lienhe.php
<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
class Lienhe extends CI_Controller
{
	public function __construct()
	{
        parent::__construct();	
		$this->pre_message = "";
		
		$this->permit_library->check_permit();
		$this->session->set_userdata(array('Url'=>uri_string())); 
		
        $this->load->model('lienhe_model','lienhe');
        $this->load->library('editor_library');
	}
	
	function index()
	{
		$data['title'] = 'Khách hàng liên hệ';
		//$data['add'] = 'lienhe/addnew';
		$config['base_url'] = base_url().'lienhe/index/'.(int)$this->uri->segment(3);  
		$data['num'] = $this->lienhe->count_list();
		$config['total_rows']   =  $data['num'];
		$config['per_page']  =   '20' ;
		$config['uri_segment'] = 4 ;   
		$this->pagination->initialize($config);   
		$data['list'] =   $this->lienhe->get_list($config['per_page'],(int)$this->uri->segment('4'));
		$data['pagination']    = $this->pagination->create_links();            
		$data['page'] = 'lienhe/index';
		$this->load->view("layout/skin",$data);
	}
	
	function view()
	{            
		$id = (int)$this->uri->segment(3);                              
		$data['rs'] = $this->lienhe->getlienhe($id);
		$data['title'] = 'Xem thông tin liên hệ từ '.$data['rs']->lb_cusmail;
		
		//Cập nhật trang thái
		$id = (int)$this->uri->segment(3);    
		$this->lienhe->set_view($id);
		 
		$data['page'] = 'lienhe/view';
		$this->load->view("layout/skin",$data);
	}
	
	function addnew()
	{
	  $data['title'] = 'Thêm lienhe mới';
	
	  $this->form_validation->set_rules('subject_vn','Tiêu đề','trim|required');
	  $this->form_validation->set_rules('ks_image','','');
	  $this->form_validation->set_rules('subcontent_vn','','');
	  $this->form_validation->set_rules('content_vn','','');
	  if($this->form_validation->run()== FALSE){
		  $this->pre_message = validation_errors();
	  }else{
		  if($this->lienhe->save()){
			 if($this->input->post('ks_image')!=''){
				 if(file_exists('../uploads/images/'.$this->input->post('ks_image'))){
					 unlink('../uploads/images/'.$this->input->post('ks_image'));
				 }
				//fn_resize_ks_image('../uploads/images/'.$this->input->post('ks_image'),'../uploads/lienhe/'.$this->input->post('ks_image'),160,120); 
			  }                      
			  $this->session->set_flashdata('message','Lưu thành công');
			  redirect('lienhe/index');
		  }
	  }
	
	  $data['message'] = $this->pre_message;
	  $data['page'] = 'lienhe/add';
	  $this->load->view("layout/skin",$data);
	}

	function update()
	{            
		$id = (int)$this->uri->segment(3);                              
		$data['rs'] = $this->lienhe->getlienhe($id);
		$data['title'] = 'Cập nhật: '.$data['rs']->subject_vn;
		
		if(!empty($_POST['bt_submit']))
		{
			$this->form_validation->set_rules('subject_vn','Tên chủ đề','trim|required');
		
			if($this->form_validation->run() == FALSE)
			{
				$this->pre_message = validation_errors();
			}else{
				if($this->lienhe->save())
				{
					$this->session->set_flashdata('message','Cập nhật chuyên mục thành công');
					redirect('lienhe');
				}
		 	}
		}  
		$data['page'] = 'lienhe/update';
		$this->load->view("layout/skin",$data);
	}
	
	function del()
	{
		$id = (int)$this->uri->segment(3); 
		$this->lienhe->delete($id);
		redirect("lienhe");
	}
}

/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */

Youez - 2016 - github.com/yon3zu
LinuXploit