403Webshell
Server IP : 103.48.194.25  /  Your IP : 216.73.217.33
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/galaxynail.com/wadmin/components/lienhe/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/galaxynail.com/wadmin/components/lienhe/controllers/Lienhe.php
<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
class Lienhe extends MX_Controller
{
	public function __construct()
	{
        parent::__construct();
		$this->pre_message = "";
        $this->load->model('lienhe_model','lienhe');
        //$this->load->library('editor_library');
	}
	
	function index($start=0)
	{
		$data['title'] = 'Khách hàng liên hệ';
		//$data['add'] = 'lienhe/add';
		$config['base_url'] 	= base_url().'lienhe/index/'.(int)$start;  
		$data['num'] 			= $this->lienhe->count_list();
		$config['total_rows'] 	= $data['num'];
		$config['per_page'] 	= 20;
		$config['uri_segment'] 	= 4;   
		$this->pagination->initialize($config);   
		$data['pagination'] 	= $this->pagination->create_links();  
		      
		$data['start'] = $start ;    
		$data['list'] =   $this->lienhe->get_list($config['per_page'],(int)$start);
		$data['page'] = 'index';
		$this->load->view('layout/skin',$data);
	}
	
	function view($id=0)
	{            
		$data['rs'] = $this->lienhe->getlienhe($id);
		$data['title'] = 'Xem thông tin liên hệ từ '.$data['rs']->cusmail;
		
		//Cập nhật trang thái
		$this->lienhe->set_view($id);
		 
		$data['page'] = 'view';
		$this->load->view('layout/skin',$data);
	}
	
	function add()
	{
		$data['title'] = 'Gởi mail';
		
		if(isset($_POST['bt_submit']))
		{
			$this->form_validation->set_rules('cusmail','Email','trim|required');
			$this->form_validation->set_rules('subject','Tiêu đề','');
			if($this->form_validation->run()== FALSE)
			{
				$this->pre_message = validation_errors();
			}
			else
			{
				$cusname = $this->input->post('cusname');
				$cusmail = $this->input->post('cusmail');
				$subject = $this->input->post('subject');
				$content = $this->input->post('content');
				
				$this->load->helper('mail') ;
				sendmail($cusname."|".$cusmail, "","Nguyen Trieu Thang|tritigi@gmail.com", kodau($subject), $content) ;
				redirect('lienhe/index');
				exit;
			}
		}
		
		$data['page'] = 'lienhe/add';
		$this->load->view('layout/skin',$data);
	}

	function edit()
	{            
		$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');
				}
		 	}
		}  
		$this->_templates['page'] = 'lienhe/edit';
		$this->site->load($this->_templates['page'],$data);
	}
	
	function reply($id=0)
	{
		$data['rs'] = $this->lienhe->getlienhe($id);
		$data['title'] = 'Trả lời mail: '.$data['rs']->subject;
		
		if(isset($_POST['bt_submit']))
		{
			$this->form_validation->set_rules('subject','Tên chủ đề','trim|required');
			if($this->form_validation->run() == FALSE)
			{
				$this->pre_message = validation_errors();
			}
			else
			{
				$cusmail = $this->input->post('cusmail');
				$subject = $this->input->post('subject');
				$content = $this->input->post('content');
				
				$this->load->helper('mail') ;
				sendmail($data['rs']->cusname."|".$cusmail, "","Nguyen Trieu Thang|tritigi@gmail.com", kodau($subject), $content) ;
				redirect('lienhe/index');
				exit;
		 	}
		}  
		$data['page'] = 'lienhe/reply';
		$this->load->view('layout/skin',$data);
	}
	
	function del($id=0,$start=0)
	{
		$this->lienhe->delete($id);
		$this->lienhe->remove();
		redirect("lienhe/index/".$start);
	}
	
	function dels()
	{
		if(!empty($_POST['ar_id']))
		{
			$page = (int)$this->input->post('page');
			$ar_id = $this->input->post('ar_id');
		
			if(!empty($_POST['btn_submit']))
			{
				for($i = 0; $i < sizeof($ar_id); $i ++) {
					if ($ar_id[$i]){
						if($this->lienhe->delete($ar_id[$i]))
							$this->session->set_flashdata('message','Đã xóa thành công');
						else $this->session->set_flashdata('message','Xóa không thành công');
					}
				}
			}
		}
		redirect('lienhe/index/'.$page);
	}
}

?>

Youez - 2016 - github.com/yon3zu
LinuXploit