Server IP : 192.185.129.71 / Your IP : 3.138.139.225 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 Home extends CI_Controller { function __construct() { parent::__construct(); $this->load->database(); $this->load->library('session'); /*cache control*/ $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() { $this->db->order_by("priority", "asc"); $this->db->limit("10"); $pagedata['slider'] = $this->db->get_where('main_slider_tb')->result_array(); $this->db->order_by("mc_id", "desc"); $this->db->limit("3"); $pagedata['crisis'] = $this->db->get_where('main_crisis_tb')->result_array(); $this->db->order_by("hms_id", "desc"); $this->db->limit("6"); $pagedata['says'] = $this->db->get_where('health_membersays_tb', array('type' =>'main'))->result_array(); $this->db->order_by("e_id", "asc"); $this->db->limit("5"); $pagedata['expand'] = $this->db->get_where('main_expand_tb', array('type' =>'main' ))->result_array(); $this->db->order_by("i_id", "asc"); $this->db->limit("7"); $pagedata['income'] = $this->db->get_where('main_income_tb', array('type' =>'main' ))->result_array(); $this->db->order_by("moi_id", "desc"); $this->db->limit("1"); $pagedata['opinfo'] = $this->db->get_where('main_operation_info_tb', array('type' =>'main' ))->result_array(); $pagedata['color']=array( "#55C3B9", "#138BB9", "#619349", "#F89C6E", "#DF406E", "#936CAD", "#55707A"); $this->db->order_by("mt_id", "asc"); $pagedata['teams'] = $this->db->get_where('main_team_id')->result_array(); $this->db->order_by("type", "asc"); $this->db->limit("8"); $pagedata['causes'] = $this->db->get_where('health_causes_tb', array('type !=' =>'general' ))->result_array(); $this->db->order_by("lhs_id", "desc"); $this->db->limit("6"); $pagedata['happenings'] = $this->db->get_where('health_happenings_tb')->result_array(); $this->db->order_by("r_id", "desc"); $this->db->limit("1"); $pagedata['annual'] = $this->db->get_where('reports_tb', array('type' => 'annual' ))->row(); $this->db->order_by("r_id", "desc"); $this->db->limit("1"); $pagedata['finance'] = $this->db->get_where('reports_tb', array('type' => 'financial' ))->row(); $this->db->order_by("r_id", "desc"); $this->db->limit("1"); $pagedata['fcra'] = $this->db->get_where('reports_tb', array('type' => 'fcra' ))->row(); $this->db->order_by("id", "desc"); $this->db->limit("1"); $pagedata['flash'] = $this->db->get_where('flash_tb', array('type' =>'general' ))->row(); $this->load->helper('url'); $this->load->view('index_v',$pagedata); } public function Virtual_Tour() { $this->load->database(); $this->db->order_by("pano_id", "desc"); $pagedata['pano'] = $this->db->get_where('panorama_tb')->result_array(); $this->load->helper('url'); $this->load->view('tour', $pagedata); } public function subscribers(){ $data['name']=$this->input->post('name'); $data['email']=$this->input->post('mail'); $data['mobile']=$this->input->post('phone'); $data['uploaded_date']=date("Y-m-d"); $isexit = $this->db->get_where('subscribers_tb', array("email"=> $data['email']))->result_array(); if($isexit==0){ if($this->db->insert('subscribers_tb',$data)){ //echo "You have successfully subscribed, Thank you."; $this->load->library('email'); $fromemail="info@svym.org"; $toemail = $data["email"]; $subject = "SVYM Subscription"; $data['data']="Hi, You have successfully subscribed, Thank you."; $mesg = $this->load->view('templates/applied',$data,true); $config=array( 'charset'=>'utf-8', 'wordwrap'=> TRUE, 'mailtype' => 'html' ); $this->email->initialize($config); $this->email->to($toemail); $this->email->from($fromemail, "SVYM"); $this->email->subject($subject); $this->email->message($mesg); $mail = $this->email->send(); }else{ echo "Failed to submitting your details, Please try again."; } }else{ echo "Already registered !"; } } public function Promote_Us() { $this->load->helper('url'); $this->load->view('advocate_v'); } public function academics() { $this->load->helper('url'); $this->load->view('academics_v'); } public function statutoryinfo() { $this->load->helper('url'); $this->load->view('statutoryinfo_v'); } public function janadvani(){ $this->load->view('svymradio'); } } /* End of file welcome.php */ /* Location: ./application/controllers/welcome.php */