golden hour
/home/phakp/public_html/bkp_full/old_site_bkp/application/controllers
⬆️ Go Up
Upload
File/Folder
Size
Actions
Welcome.php
7.9 KB
Del
OK
index.html
131 B
Del
OK
Edit: Welcome.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Welcome extends CI_Controller { /** * Index Page for this controller. * * Maps to the following URL * http://example.com/index.php/welcome * - or - * http://example.com/index.php/welcome/index * - or - * Since this controller is set as the default controller in * config/routes.php, it's displayed at http://example.com/ * * So any other public methods not prefixed with an underscore will * map to /index.php/welcome/<method_name> * @see http://codeigniter.com/user_guide/general/urls.html */ public function __construct() { parent::__construct(); error_reporting(0); $this->load->model('Ets_fetch1_model'); $GLOBALS['path'] ="http://phakp.com/admin/"; } public function index() { //error_reporting(E_ALL); $data["displays"]=$this->db->query("select detail AS detee,title,picture from commandant_msg")->row(); $data["main_msg"]=$this->db->query("select * from main_msg")->row(); $data["joint_secretary"]=$this->db->query("select * from joint_secretary")->row(); $data["newsi"]=$this->db->query("select * from web_news")->result(); //print_r($data['child_nav']); $this->load->view('header',$data); //$data["imageee"] = $this->ets_fetch1_model->show_product(); //print($data["imageee"]); //exit; //$data["news"]=$this->ets_fetch1_model->view_news(); //$data["newsi"] = $this->ets_fetch1_model->view_news(); $this->load->view('slider'); $this->load->view('body',$data); $this->load->view('footer'); } public function president_msg(){ $data["displays"]=$this->db->query("select detail AS detee,title,picture from commandant_msg")->row(); $this->load->view('header',$data); $this->load->view('main_msgs/commandant_msg',$data); $this->load->view('footer'); } public function joint_sec(){ $data["displays"]=$this->db->query("select * from joint_secretary")->row(); $this->load->view('header',$data); $this->load->view('main_msgs/joint_secretary',$data); $this->load->view('footer'); } public function introduction(){ $data["main_msg"]=$this->db->query("select * from main_msg")->row(); // $data["newsi"]=$this->db->query("select * from web_news")->result(); $this->load->view('header',$data); $this->load->view('main_msgs/introduction',$data); $this->load->view('footer'); } public function News(){ $data["newsiiii"]=$this->db->query("select * from web_news order by news_id desc")->result(); $this->load->view('header',$data); $this->load->view('news/News',$data); $this->load->view('footer'); } public function specific_news($id){ $data["newsi"]=$this->db->query("select * from web_news where news_id=$id")->row(); $this->load->view('header',$data); $this->load->view('main_msgs/specific_news',$data); $this->load->view('footer'); } public function polio_news(){ $data["newsiiii"]=$this->db->query("select * from polio_news order by news_id desc")->result(); $this->load->view('header',$data); $this->load->view('news/News_polio',$data); $this->load->view('footer'); } ////////////////////////////////////////////////////////////////////////////////////////////////cfcs//////////////// public function who_v_are() { $data["heir"]=$this->db->query("select * from who")->row(); $this->load->view('header',$data); //$this->load->view('template/slider'); $this->load->view('hierarchy',$data); //$this->load->view('template/operations'); $this->load->view('footer'); } public function goal() { $data["operationsss"]=$this->db->query("SELECT * FROM goal")->result(); $this->load->view('header'); $this->load->view('cfcs/goal',$data); $this->load->view('footer'); } public function mission() { $this->load->model('ets_fetch1_model'); $data["duty"]=$this->db->query("select * from mission")->row(); $this->load->view('header',$data); $this->load->view('main_msgs/duty',$data); $this->load->view('footer'); } public function vision() { $this->load->model('ets_fetch1_model'); $data["vision"]=$this->db->query("select * from vision_mission")->row(); //$data["duty"]=$this->db->query("select * from mission")->row(); $this->load->view('header',$data); $this->load->view('main_msgs/deployment',$data); $this->load->view('footer'); } public function priorities() { $data["prio"]=$this->db->query("SELECT * FROM priorities")->row(); $this->load->view('header'); $this->load->view('cfcs/officers',$data); $this->load->view('footer'); } public function activities() { $data["distii"]=$this->db->query("SELECT * FROM `activities` ")->row(); $this->load->view('header'); //$this->load->view('template/slider'); $this->load->view('cfcs/fc_district',$data); //$this->load->view('template/operations'); $this->load->view('footer'); } public function events() { $data["events"]=$this->db->query("SELECT * FROM `events` ")->result(); $this->load->view('header'); $this->load->view('news/Events',$data); $this->load->view('footer'); } public function display_contact() { $this->load->model('ets_fetch1_model'); $this->load->view('header',$data); $this->load->view('contact'); $this->load->view('footer'); } ///////////////////////////////////**********************************************//////////////////////////////////// public function products_gallery() { $this->load->model('ets_fetch1_model'); $this->load->view('header',$data); $this->load->view('products_gallery'); $this->load->view('footer'); } //////////////////////////////////////////////////////////////////////////////////////////////////// public function about() { $this->load->model('ets_fetch1_model'); $this->load->view('header',$data); $data['about'] = $this->ets_fetch1_model->about(); $this->load->view('about',$data); $this->load->view('footer'); } public function services() { $this->load->model('ets_fetch1_model'); $this->load->view('header',$data); $data['services'] = $this->ets_fetch1_model->services(); $this->load->view('services',$data); $this->load->view('footer'); } ////////////////send email/////////////////////// function Send_Email() { //$this->load->model('ets_fetch1_model'); extract($_POST); //$login=$this->input->get('id'); //$data=$this->web_view_mod->get_email_student($login); //print_r($data); //foreach($data as $data1){ //$emailee=$data1->EMAIL; // } //echo $emailee=$data['EMAIL']; //echo $emailee; //exit; // $ins_id=$this->input->get('ins_id'); //$session=$this->input->get('session'); $config = Array( 'protocol' => 'smtp', 'smtp_host' => 'ssl://smtp.gmail.com', 'smtp_port' => 465, 'smtp_user' => 'question.aero2016@gmail.com', // change it to yours 'smtp_pass' => 'zafarzafar', // change it to yours 'mailtype' => 'html', 'charset' => 'iso-8859-1', 'wordwrap' => TRUE ); //$abc="<pre> //Dear //Your admission has been approved for 'discipline name' at 'College Name'. //Please visit the college to complete the admission procedure //Thank you //</pre>"; $this->load->library('email', $config); $this->email->set_newline("\r\n"); $this->email->from($email); // change it to yours $this->email->to('md@aeromobility.com.pk'); // change it to yours $this->email->subject($subject); $this->email->message($message); if($this->email->send()) { //echo 'Email sent.';md@aeromobility.com.pk $this->session->set_flashdata("msg","Your Email Has Been Send"); redirect('welcome/display_contact'); } else { show_error($this->email->print_debugger()); } } } /* End of file welcome.php */ /* Location: ./application/controllers/welcome.php */
Save