Server IP : 192.185.129.71 / Your IP : 3.135.188.55 Web Server : Apache System : Linux bh-ht-3.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : svymadmin ( 4072) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home4/svymadmin/public_html/site/controllers/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class DonateIND extends CI_Controller { function __construct() { parent::__construct(); $this->load->library('session'); $this->load->database(); $this->output->set_header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); $this->output->set_header('Pragma: no-cache'); } public function index($param="") { $pagedata['status']=$param; $this->load->helper('url'); $this->load->view('d1',$pagedata); } public function through_check(){ $data["name"] = $this->input->post("dname"); $data["address"] = $this->input->post("daddress"); $data["landmark"] = $this->input->post("land"); $data["phone"] = $this->input->post("dphone"); $data["email"] = $this->input->post("dmail"); $data["added_date"] = date("Y-m-d h:i:sa"); if($this->db->insert('donte_check', $data)){ $this->load->library('email'); $fromemail="info@svym.org"; $toemail =$data["email"]; $subject = "Donation"; $data['data']="Thanks for your information, We will contact you soon."; $mesg = $this->load->view('templates/checks',$data,true); $config=array( 'charset'=>'utf-8', 'wordwrap'=> TRUE, 'mailtype' => 'html' ); $this->email->initialize($config); $this->email->to($toemail); $this->email->from($fromemail, "Donation"); $this->email->subject($subject); $this->email->message($mesg); $mail = $this->email->send(); redirect(base_url() . 'donateIND/index/success', 'refresh'); } redirect(base_url() . 'donateIND', 'refresh'); } } /* End of file welcome.php */ /* Location: ./application/controllers/welcome.php */