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/indolok.id/application/controllers/ |
Upload File : |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Rfs extends Public_Controller { function __construct() { parent::__construct(); //LOAD LANGUAGE FILES FOR BLOG $this->load->helper('language'); if($this->session->userdata('site_lang') == 'english') { $this->lang->load('blog', 'english'); } else { $this->lang->load('blog', 'indonesian'); } } public function index() { if (isset($_POST['submit'])) { if($this->input->post('submit') == 'request1'){ $subject = "Permintaan Service Perbaikan"; $nama = $this->input->post('nama1'); $email = $this->input->post('email1'); $hp = $this->input->post('hp1'); $perusahaan = $this->input->post('perusahaan1'); $telp = $this->input->post('telp1'); $alamat = $this->input->post('alamat1'); $produk = $this->input->post('produk1'); $merk = $this->input->post('merk1'); $serial = $this->input->post('serial1'); $tipe = $this->input->post('tipe1'); $tanggal = $this->input->post('tanggal1'); $deskripsi = $this->input->post('deskripsi1'); } elseif($this->input->post('submit') == 'request2'){ $subject = "Permintaan Refilling Extinguisher"; $nama = $this->input->post('nama2'); $email = $this->input->post('email2'); $hp = $this->input->post('hp2'); $perusahaan = $this->input->post('perusahaan2'); $telp = $this->input->post('telp2'); $alamat = $this->input->post('alamat2'); $merk_tabung = $this->input->post('merk2'); $ukuran = $this->input->post('ukuran2'); $media = $this->input->post('media2'); $merk = $this->input->post('merk2'); $tanggal_refilling = $this->input->post('tanggal2'); $jumlah = $this->input->post('jumlah2'); $permintaan = $this->input->post('permintaan2'); } elseif($this->input->post('submit') == 'request3'){ $subject = "Konsultasi Design Fire Protection System"; $nama = $this->input->post('nama3'); $email = $this->input->post('email3'); $hp = $this->input->post('hp3'); $perusahaan = $this->input->post('perusahaan3'); $telp = $this->input->post('telp3'); $alamat = $this->input->post('alamat3'); $lokasi = $this->input->post('lokasi3'); $option = $this->input->post('option3'); $produk_dibutuhkan = $this->input->post('produk3'); $detail = $this->input->post('detail3'); $deskripsi_proyek = $this->input->post('deskripsi3'); $permintaan = $this->input->post('permintaan3'); } elseif($this->input->post('submit') == 'request4'){ $subject = "Konsultasi Design Electronic Security System"; $nama = $this->input->post('nama4'); $email = $this->input->post('email4'); $hp = $this->input->post('hp4'); $perusahaan = $this->input->post('perusahaan4'); $telp = $this->input->post('telp4'); $alamat = $this->input->post('alamat4'); $lokasi = $this->input->post('lokasi4'); $option = $this->input->post('option4'); $produk_dibutuhkan = $this->input->post('produk4'); $deskripsi_proyek = $this->input->post('deskripsi4'); $permintaan = $this->input->post('permintaan4'); } elseif($this->input->post('submit') == 'request5'){ $subject = ucwords($this->input->post('permintaan5')); $nama = $this->input->post('nama5'); $email = $this->input->post('email5'); $hp = $this->input->post('hp5'); $perusahaan = $this->input->post('perusahaan5'); $telp = $this->input->post('telp5'); $alamat = $this->input->post('alamat5'); $deskripsi_penjelasan = $this->input->post('deskripsi5'); $permintaan = $this->input->post('permintaan5'); } else{ redirect('index'); }; if ($produk!='') { $produk = "<p><strong>Produk yang akan diperbaiki :</strong><br>".$produk."<br></p>"; } if ($merk!='') { $merk = "<p><strong>Merk :</strong><br>".$merk."<br></p>"; } if ($tipe!='') { $tipe = "<p><strong>Type :</strong><br>".$tipe."</p>"; } if ($serial!='') { $serial = "<p><strong>Serial :</strong><br>".$serial."</p>"; } if ($tanggal!='') { $tanggal = "<p><strong>Tanggal Pembelian :</strong><br>".date('d F Y', strtotime($tanggal))."</p>"; } if ($deskripsi!='') { $deskripsi = "<p><strong>Deskripsi Kerusakan :</strong><br>".$deskripsi."</p><br>"; } if ($merk_tabung!='') {; $merk_tabung = "<p><strong>Merk Tabung :</strong><br>".$merk_tabung."<br></p>"; } if ($ukuran!='') { $ukuran = "<p><strong>Ukuran Tabung :</strong><br>".$ukuran."</p>"; } if ($media!='') { $media = "<p><strong>Media Tabung :</strong><br>".$media."</p>"; } if ($tanggal_refilling!='') { $tanggal_refilling = "<p><strong>Media Tabung :</strong><br>".date('d F Y', strtotime($tanggal_refilling))."</p>"; } if ($jumlah!='') { $jumlah = "<p><strong>Jumlah tabung yang akan direfill :</strong><br>".$jumlah."</p>"; } if ($permintaan!='') { $permintaan = "<p><strong>Permintaan khusus/keterangan lain :</strong><br>".$permintaan."</p>"; } if ($lokasi!='') { $lokasi = "<p><strong>Lokasi proyek :</strong><br>".$lokasi."</p>"; } if ($option!='') { $option = "<p><strong>Option :</strong><br>".$option."</p>"; } if ($produk_dibutuhkan!='') { $produk_dibutuhkan = "<p><strong>Produk yang dibutuhkan :</strong><br>".$produk_dibutuhkan."</p>"; } if ($detail!='') { $detail = "<p><strong>Produk detail :</strong><br>".$detail."</p>"; } if ($deskripsi_proyek!='') { $deskripsi_proyek = "<p><strong>Deskripsi proyek :</strong><br>".$deskripsi_proyek."</p>"; } if ($deskripsi_penjelasan!='') { $deskripsi_penjelasan = "<p><strong>Deskripsi/penjelasan :</strong><br>".$deskripsi_penjelasan."</p>"; } $data = " <p><strong>Nama :</strong><br>".$nama."<br></p> <p><strong>Email :</strong><br>".$email."<br></p> <p><strong>Handphone :</strong><br>".$hp."</p> <p><strong>Nama Perusahaan :</strong><br>".$perusahaan."</p> <p><strong>Nomor Telp Perusahaan :</strong><br>".$telp."</p> <p><strong>Alamat Perusahaan :</strong><br>".$alamat."</p><br> ".$poduk.$tipe.$serial.$merk.$tanggal.$deskripsi.$merk_tabung.$ukuran.$media.$tanggal_refilling.$jumlah.$permintaan.$lokasi.$option.$produk_dibutuhkan.$detail.$deskripsi_proyek.$deskripsi_penjelasan." "; $this->db->select('*')->from('configuration')->where('id_configuration',1); $website_data = $this->db->get()->row(); //load library $this->load->library('email'); //get email setting $config['protocol'] = 'smtp'; $config['smtp_crypto'] = 'tls'; $config['smtp_host'] = $website_data->email_smtp_host; $config['smtp_port'] = $website_data->email_smtp_port; $config['smtp_user'] = $website_data->email_smtp; $config['smtp_pass'] = $website_data->email_smtp_password; //$config['smtp_timeout'] = 70; $config['mailtype'] = 'html'; $config['charset'] = 'utf-8'; $config['wordwrap'] = TRUE; $config['newline'] = "\r\n"; //use double quotes to comply with RFC 822 standard $this->email->set_crlf( "\r\n" ); //must add this for hotmail $this->email->initialize($config); $this->email->from('ecommerce@gunnebo.com', ucwords($nama)); $this->email->to('ecommerce@indolok.id'); //$this->email->cc($data['emails']->from_email); $this->email->subject($subject); $this->email->message($data); $this->email->send(); //----end send email $this->data['sent'] = 'true'; } //get page $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) . ' - RFS'; $this->data_header['meta_description'] = ucwords($website_name->website_name) . ' - RFS'; $this->load->view("themes/$this->theme_no/header", $this->data_header); $this->load->view("themes/$this->theme_no/rfs", $this->data); $this->load->view("themes/$this->theme_no/footer", $this->data_footer); } }