https://t.me/RX1948
Server : Apache/2.4.18 (Ubuntu)
System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64
User : oppastar ( 1041)
PHP Version : 7.0.33-0ubuntu0.16.04.15
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Directory :  /var/www/rabbithabit.com/public_html/application/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/rabbithabit.com/public_html/application/controllers/Contact.php
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Contact extends Public_Controller  {

	function __construct() {
		parent::__construct();
		$this->load->library('form_validation');
		$this->load->library('recaptcha');
	}

	public function index() { 

		//get website name
		$website_name = $this->db->select('website_name')->from('configuration')->where('id_configuration', 1)->get()->row()->website_name;

		//get SEO
		$this->data_header['browser_title'] = 'Hubungi Kami - ' . $website_name;  
		$this->data_header['meta_description'] = 'Hubungi Kami - ' . $website_name;

		$this->data['recaptcha_html'] = $this->recaptcha->render();

		$this->load->view("themes/$this->theme_no/header", $this->data_header);
		$this->load->view("themes/$this->theme_no/contact", $this->data);
		$this->load->view("themes/$this->theme_no/footer", $this->data_footer); 
	} 

	public function business_enquiry_confirmation() { 
		if (!isset($_POST['business_enquiry_confirmation'])) {
			redirect('contact');
		} 

		$inp_name = $this->input->post('inp_name');
		$inp_email = $this->input->post('inp_email');
		$inp_phone = $this->input->post('inp_phone');
		$inp_companyname = $this->input->post('inp_companyname');
		$inp_subject = $this->input->post('inp_subject');
		$inp_project = $this->input->post('inp_project');

		//validation in action
		$config = array( 
			array(
				'field'   => 'inp_name',
				'label'   => 'Name',
				'rules'   => 'trim|required'
         	),
         	array(
         		'field'   => 'inp_email',
         		'label'   => 'Email Address',
         		'rules'   => 'trim|required'
         	),
         	array(
         		'field'   => 'inp_phone',
         		'label'   => 'Phone Number',
         		'rules'   => 'trim|required'
         	),
         	array(
         		'field'   => 'inp_companyname',
         		'label'   => 'Company Name',
         		'rules'   => 'trim|required'
         	),
         	array(
         		'field'   => 'inp_subject',
         		'label'   => 'Subject',
         		'rules'   => 'trim|required'
         	),
         	array(
         		'field'   => 'inp_project',
         		'label'   => 'Message',
         		'rules'   => 'trim|required'
					 ), 
					 array(
						'field'   => 'g-recaptcha-response',
						'label'   => 'Captcha',
						'rules'   => 'required'
					), 
        );

		$this->form_validation->set_rules($config); 
		$this->form_validation->set_error_delimiters('<div class="error">', '</div>');

		if($this->form_validation->run($this) == FALSE) {  

			$data_header['page_title'] = 'Contact Us';
 
			$this->db->select('website_name')->from('configuration')->where('id_configuration', 1); 
			$website_name = $this->db->get()->row(); 
			$this->data_header['browser_title'] =  ucwords($website_name->website_name) . ' - My Account'; 
			$this->data_header['meta_description'] = ucwords($website_name->website_name) . ' - My Account';   

			//LOAD LANGUAGE FILES 
			// if($this->session->userdata('site_lang') == 'english') {
			// 	$this->lang->load('contact', 'english');
			// } else {
			// 	$this->lang->load('contact', 'indonesian');
			// } 

			$this->data['recaptcha_html'] = $this->recaptcha->render();

			$this->load->view("themes/$this->theme_no/header", $this->data_header); 
			$this->load->view("themes/$this->theme_no/contact", $this->data); 
			$this->load->view("themes/$this->theme_no/footer", $this->data_footer);
		
		}else {   

			//get website data
			$this->db->select('logo, from_email, website_name, email_smtp_host, email_smtp_port, email_smtp_password, email_smtp')->from('configuration')->where('id_configuration', 1);
			$website_data = $this->db->get()->row();

			$data['logo'] = $website_data->logo;
			$data['website_name'] = $website_data->website_name;

			$this->load->model('configuration_m');

			$data['emails'] = $this->configuration_m->get_emails();  
			$data['bank'] = $this->configuration_m->get_bank();   
			$data['title'] = 'Contact Us'; 
  

			$myMessage = '<html><body>';
			$myMessage .= '<table style="border-color: #666;" cellpadding="10">';
			$myMessage .= "<tr><td><strong>Name:</strong> </td><td>" . $inp_name  . "</td></tr>";
			$myMessage .= "<tr><td><strong>Email Address:</strong> </td><td>" .  $inp_email . "</td></tr>";
			$myMessage .= "<tr><td><strong>Phone Number:</strong> </td><td>" . $inp_phone
			  . "</td></tr>";
			$myMessage .= "<tr><td><strong>Company Name:</strong> </td><td>" .  $inp_companyname . "</td></tr>";
			$myMessage .= "<tr><td><strong>Subject:</strong> </td><td>" . ucwords($inp_subject)  . "</td></tr>";
			$myMessage .= "<tr><td><strong>Message:</strong> </td><td>" . $inp_project  . "</td></tr>"; 
			$myMessage .= "</table>";
			$myMessage .= "<p>Thanks.</p>";
			$myMessage .= "</body></html>"; 

			// send email 
			
			$email_data['email'] = $data['emails']->from_email; 
			// $email_data['email'] = 'bakrisea@gmail.com'; 
			$email_data['subject'] = ucwords($inp_subject);  
			$this->send_email($myMessage, $email_data, true);
			// var_dump($this->email->print_debugger()); exit();
			// end email
             	
			$this->session->set_flashdata('success', '<p style="background:green; color:white; padding:10px; padding:5px; font-weight:bold;">Email
				 Successfully Sent. We will check your Email.</p>');
				
			redirect('contact');	
		}

	}

}

https://t.me/RX1948 - 2025