golden hour
/home/phakp/public_html/bkp_full/old_site_bkp/admin/application/controllers
⬆️ Go Up
Upload
File/Folder
Size
Actions
Welcome.php
29.19 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(E_ALL); $this->load->model('ets_fetch1_model'); } public function index() { $this->load->model('ets_fetch1_model'); if ($this->session->userdata('username')){ $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); //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('body',$data); $this->load->view('footer'); }else{ $this->load->view('login'); } } public function logout() { $this->session->sess_destroy(); redirect(base_url()); } public function login() { extract($_POST); $PASSWORD=md5($password); $data=$this->db->query("select * from usr_user where USER_NAME='$username' and U_PASSWORD='$PASSWORD'")->row(); /////exit; if($data){ $this->session->set_userdata('username', $data->USER_NAME); redirect(base_url()); }else{ redirect(base_url()); } } ///////////////////////////////////////////////////////////*************Display Main Msg of commandant*********////////////// public function president_msg() { $this->load->model('ets_fetch1_model'); $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["display"]=$this->db->query("select * from commandant_msg")->row(); $this->load->view('header',$data); $this->load->view('main_msg_cmd',$data); $this->load->view('footer'); } ///////////////////////////////who v are//////////////// public function who_v_are(){ $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["display"]=$this->db->query("select * from who")->row(); $this->load->view('header',$data); $this->load->view('who',$data); $this->load->view('footer'); } public function edit_who() { extract($_POST); $done=$this->db->query("update who set who_detail='$msg' where who_id=$IDDD"); if($done){ redirect(base_url('Welcome/who_v_are')); } } /////////////////////////////////////////vision/////////////////////// public function vision(){ $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["display"]=$this->db->query("select * from vision_mission")->row(); $this->load->view('header',$data); $this->load->view('vision',$data); $this->load->view('footer'); } public function edit_vision() { extract($_POST); $done=$this->db->query("update vision_mission set vision='$vision',mission='$mission' where vision_mission_id=$IDDD"); if($done){ redirect(base_url('Welcome/vision')); } } /////////////////////////////////////////////////////////////////////////////////////goal/////////////////// public function goal(){ $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["display"]=$this->db->query("select * from goal")->row(); $this->load->view('header',$data); $this->load->view('goal',$data); $this->load->view('footer'); } public function edit_goal() { extract($_POST); $done=$this->db->query("update goal set goal_detail='$msg' where goal_id=$IDDD"); if($done){ redirect(base_url('Welcome/goal')); } } /////////////////////////////////////////////////////////////////////priorities public function priorities(){ $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["display"]=$this->db->query("select * from priorities")->row(); $this->load->view('header',$data); $this->load->view('priorities',$data); $this->load->view('footer'); } public function edit_priorities() { extract($_POST); $done=$this->db->query("update priorities set p_detail='$msg' where p_id=$IDDD"); if($done){ redirect(base_url('Welcome/priorities')); } } ////////////////////////////////////////////////////////////////////////////////////////// public function activities(){ $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["display"]=$this->db->query("select * from activities")->row(); $this->load->view('header',$data); $this->load->view('activities',$data); $this->load->view('footer'); } public function edit_activities() { extract($_POST); $done=$this->db->query("update activities set activities_detail='$msg' where activities_id=$IDDD"); if($done){ redirect(base_url('Welcome/activities')); } } /////////////////////////////////////////////////////////// public function joint_sec() { $this->load->model('ets_fetch1_model'); $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["display"]=$this->db->query("select * from joint_secretary")->row(); $this->load->view('header',$data); $this->load->view('joint_secretary',$data); $this->load->view('footer'); } public function edit_joint() { extract($_POST); $this->load->helper('inflector'); $config['upload_path'] = './img/'; $config['allowed_types'] = 'gif|jpg|png|jpeg'; $config['max_size'] = '2048'; //$config['encrypt_name'] = FALSE; $config['file_name'] = underscore($_FILES["file_picture"]['name']); $file_picture= $config['upload_path'].$config['file_name']; $this->load->library('upload', $config); if (!$this->upload->do_upload('file_picture')) { $done=$this->db->query("update joint_secretary set detail='$msg' where joint_id=$IDDD"); }else { $upload_data = $this->upload->data(); $config['image_library'] = 'gd2'; $config['source_image'] = $upload_data['full_path']; $config['maintain_ratio'] = TRUE; $config['width'] = 200; $config['height'] = 200; $this->load->library('image_lib', $config); $this->image_lib->resize(); $imagee=$upload_data['full_path']; $done=$this->db->query("update joint_secretary set detail='$msg',picture='$file_picture' where joint_id=$IDDD"); } if($done){ redirect(base_url('Welcome/joint_sec')); } } ////////////////////////////////////////////////////////////////////////////////////////// public function duty() { $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["dutyy"]=$this->db->query("select * from duty")->row(); $this->load->view('header',$data); $this->load->view('duty',$data); $this->load->view('footer'); } public function edit_duty(){ extract($_POST); $this->db->query("update duty set duty_title='$duty_title',detail='$duty_detail' where duty_id=$IDDD"); $done=$this->db->query("update duty_detail set duty_detail_title='$function_title',duty_detail='$function_detail' where duty_id=$IDDD"); if($done){ redirect(base_url('Welcome/duty')); } } public function Deployment() { $this->load->model('ets_fetch1_model'); $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["deployment"]=$this->db->query("select * from deployment")->row(); $this->load->view('header',$data); $this->load->view('deployment',$data); $this->load->view('footer'); } public function edit_deployment() { extract($_POST); $this->load->helper('inflector'); $config['upload_path'] = './img/'; $config['allowed_types'] = 'gif|jpg|png|jpeg'; $config['max_size'] = '2048'; //$config['encrypt_name'] = FALSE; $config['file_name'] = underscore($_FILES["file_picture"]['name']); $file_picture= $config['upload_path'].$config['file_name']; $this->load->library('upload', $config); $upload_data = $this->upload->data(); $config['image_library'] = 'gd2'; $config['source_image'] = $upload_data['full_path']; $config['maintain_ratio'] = TRUE; $config['width'] = 200; $config['height'] = 200; $this->load->library('image_lib', $config); $this->image_lib->resize(); $imagee=$upload_data['full_path']; $done=$this->db->query("update deployment set deployment_picture='$file_picture' where id=$IDDD"); if($done){ redirect(base_url('Welcome/Deployment')); } } /////////////////////////////////////////////News and Tenderssssss/////////////// public function News(){ $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $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 add_news(){ $this->load->view('header'); $this->load->view('news/add_news'); $this->load->view('footer'); } public function insert_news(){ extract($_POST); $news_date1 = str_replace("-","/",$news_date); $news_date2 = date("Y-m-d", strtotime($news_date1)); $news_expire1 = str_replace("-","/",$news_expire); $news_expire2 = date("Y-m-d", strtotime($news_expire1)); $news= array( 'news_title' => $news_title, 'news_detail' => $news_detail, 'news_date' => $news_date2, 'expire_date' => $news_expire2 ); $done=$this->ets_fetch1_model->insert_news($news); if($done){ redirect(base_url('Welcome/News')); } } //////////////////////polio news/////////////////////////// public function polio_news(){ $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["newsiiii"]=$this->db->query("select * from polio_news order by news_id desc")->result(); $this->load->view('header',$data); $this->load->view('news/polio_news',$data); $this->load->view('footer'); } public function add_polio_news(){ $this->load->view('header'); $this->load->view('news/add_polio_news'); $this->load->view('footer'); } public function insert_polio_news(){ extract($_POST); ///////////////////////////////////////////////////////////////////////////////////// $this->load->helper('inflector'); $config['upload_path'] = 'img/news_img/'; $config['allowed_types'] = '*'; $config['max_size'] = '2048'; //$config['encrypt_name'] = FALSE; $config['file_name'] = underscore($_FILES["file_picture"]['name']); $file_picture= $config['upload_path'].$config['file_name']; $this->load->library('upload', $config); $news_date1 = str_replace("-","/",$news_date); $news_date2 = date("Y-m-d", strtotime($news_date1)); $news_expire1 = str_replace("-","/",$news_expire); $news_expire2 = date("Y-m-d", strtotime($news_expire1)); if (!$this->upload->do_upload('file_picture')) { $news= array( 'news_title' => $news_title, 'news_detail' => $news_detail, 'news_date' => $news_date2, 'expire_date' => $news_expire2 ); }else { $upload_data = $this->upload->data(); $config['image_library'] = 'gd2'; $config['source_image'] = $upload_data['full_path']; $config['maintain_ratio'] = TRUE; $config['width'] = 200; $config['height'] = 200; $this->load->library('image_lib', $config); $this->image_lib->resize(); $imagee=$upload_data['full_path']; $news= array( 'news_title' => $news_title, 'news_detail' => $news_detail, 'news_date' => $news_date2, 'expire_date' => $news_expire2, 'file_upload'=> $file_picture ); } $done=$this->ets_fetch1_model->insert_news_polio($news); if($done){ redirect(base_url('Welcome/polio_news')); } } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////polio Events/////////////////////////// public function events(){ $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["newsiiii"]=$this->db->query("select * from events order by events_id desc")->result(); $this->load->view('header',$data); $this->load->view('news/events',$data); $this->load->view('footer'); } public function add_events(){ $this->load->view('header'); $this->load->view('news/add_events'); $this->load->view('footer'); } public function insert_events(){ extract($_POST); $news_date1 = str_replace("-","/",$news_date); $news_date2 = date("Y-m-d", strtotime($news_date1)); $news_expire1 = str_replace("-","/",$news_expire); $news_expire2 = date("Y-m-d", strtotime($news_expire1)); $done=$this->db->query("insert into events set events_title='$news_title',events_detail='$news_detail',events_date='$news_date2',events_expire_date='$news_expire2'"); if($done){ redirect(base_url('Welcome/events')); } } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////tenders///////////////////////////////////////////////////////// public function tenders(){ $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["newsiiii"]=$this->db->query("select * from web_tender order by tender_id desc")->result(); $this->load->view('header',$data); $this->load->view('news/tenders',$data); $this->load->view('footer'); } public function add_tender(){ $this->load->view('header'); $this->load->view('add_tender'); $this->load->view('footer'); } public function insert_tender(){ extract($_POST); $this->load->helper('inflector'); $config['upload_path'] = './tender/'; $config['allowed_types'] = '*'; $config['max_size'] = '2048'; //$config['encrypt_name'] = FALSE; $config['file_name'] = underscore($_FILES["file_picture"]['name']); $file_picture= $config['upload_path'].$config['file_name']; $this->load->library('upload', $config); if ($this->upload->do_upload('file_picture')) { $upload_data = $this->upload->data(); $config['image_library'] = 'gd2'; $config['source_image'] = $upload_data['full_path']; $config['maintain_ratio'] = TRUE; $config['width'] = 200; $config['height'] = 200; $this->load->library('image_lib', $config); $this->image_lib->resize(); $imagee=$upload_data['full_path']; $tender_open_date1 = str_replace("-","/",$tender_open_date); $tender_open_date2 = date("Y-m-d", strtotime($tender_open_date1)); $tender_closing_date1 = str_replace("-","/",$tender_closing_date); $tender_closing_date2 = date("Y-m-d", strtotime($tender_closing_date1)); $done=$this->db->query("insert into web_tender set tender_title='$tender_title',tender_detail='$detail', tender_open_date='$tender_open_date2', tender_closing_date='$tender_closing_date2', tender_document='$file_picture'"); } if($done){ redirect(base_url('Welcome/tenders')); } } ///////////////////////////////////////////////fc//////////////////////////////// public function operations() { $data["operationsss"]=$this->db->query("SELECT * FROM operations")->result(); $this->load->view('header'); $this->load->view('operations',$data); $this->load->view('footer'); } public function add_operation(){ $this->load->view('header'); $this->load->view('add_operations'); $this->load->view('footer'); } public function insert_operation(){ extract($_POST); $done=$this->db->query("insert into operations set operation_name='$operation_title',operation_detail='$operation_detail'"); if($done){ redirect(base_url('Welcome/operations')); } } public function districts() { $data["distii"]=$this->db->query("SELECT * FROM district")->result(); $this->load->view('header'); $this->load->view('districts',$data); $this->load->view('footer'); } ///////////////////////////////////////////////////////////////////////////////////////// public function view_news() { $this->load->model('ets_fetch1_model'); $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["display"]=$this->db->query("select * from web_news")->result(); $this->load->view('header',$data); $this->load->view('display_news',$data); $this->load->view('footer'); } public function fc_gallary() { $this->load->model('ets_fetch1_model'); $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["display"]=$this->db->query("select * from fc_gallary")->result(); $this->load->view('header',$data); $this->load->view('fc_gallary',$data); $this->load->view('footer'); } /////////////////////////////////////////*********************************************////////////////////// public function edit_cmd() { extract($_POST); $this->load->helper('inflector'); $config['upload_path'] = './img/'; $config['allowed_types'] = 'gif|jpg|png|jpeg'; $config['max_size'] = '2048'; //$config['encrypt_name'] = FALSE; $config['file_name'] = underscore($_FILES["file_picture"]['name']); $file_picture= $config['upload_path'].$config['file_name']; $this->load->library('upload', $config); if (!$this->upload->do_upload('file_picture')) { $done=$this->db->query("update commandant_msg set detail='$msg' where id=$IDDD"); }else { $upload_data = $this->upload->data(); $config['image_library'] = 'gd2'; $config['source_image'] = $upload_data['full_path']; $config['maintain_ratio'] = TRUE; $config['width'] = 200; $config['height'] = 200; $this->load->library('image_lib', $config); $this->image_lib->resize(); $imagee=$upload_data['full_path']; $done=$this->db->query("update commandant_msg set detail='$msg',picture='$file_picture' where id=$IDDD"); } if($done){ redirect(base_url('Welcome/president_msg')); } } //////////////////////////////////////////////////////////////////***********introduction*****************////////////// public function introduction() { $this->load->model('ets_fetch1_model'); $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["display"]=$this->db->query("select * from main_msg")->row(); $this->load->view('header',$data); $this->load->view('main_msg',$data); $this->load->view('footer'); } public function edit_introduction() { extract($_POST); $this->load->helper('inflector'); $config['upload_path'] = './img/'; $config['allowed_types'] = 'gif|jpg|png|jpeg'; $config['max_size'] = '2048'; //$config['encrypt_name'] = FALSE; $config['file_name'] = underscore($_FILES["file_picture"]['name']); $file_picture= $config['upload_path'].$config['file_name']; $this->load->library('upload', $config); if (!$this->upload->do_upload('file_picture')) { $done=$this->db->query("update main_msg set detail='$msg' where main_msg_id=$IDDD"); }else { $upload_data = $this->upload->data(); $config['image_library'] = 'gd2'; $config['source_image'] = $upload_data['full_path']; $config['maintain_ratio'] = TRUE; $config['width'] = 200; $config['height'] = 200; $this->load->library('image_lib', $config); $this->image_lib->resize(); $imagee=$upload_data['full_path']; $done=$this->db->query("update main_msg set detail='$msg',picture='$file_picture' where main_msg_id=$IDDD"); } if($done){ redirect(base_url('Welcome/introduction')); } } ///////////////////////////////////////////////////////////////////Officers////////////////////////////////////////// public function officers() { $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["display"]=$this->db->query("SELECT * FROM `officers` AS o,`office` AS f,`designation` AS d WHERE o.`office_id`=f.`office_id` AND o.`designation_id`=d.`designation_id` ORDER BY o.`officer_id` DESC")->result(); $this->load->view('header',$data); $this->load->view('officers',$data); $this->load->view('footer'); } public function menu_display(){ $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["display"]=$this->db->query("SELECT * FROM usr_menu_web")->result(); $this->load->view('header',$data); $this->load->view('display_menu',$data); $this->load->view('footer'); } public function add_menu(){ //$data=$this->db->query("insert into menu usr_menu_web")->result(); $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $this->load->view('header',$data); $this->load->view('add_menu',$data); $this->load->view('footer'); } public function insert_menu(){ extract($_POST); $q=$this->db->query("SELECT IFNULL(MAX(MENU_ID),0) AS maxiiiss FROM usr_menu_web"); $data = $q->row(); $menuID=$data->maxiiiss+1; $q1=$this->db->query("SELECT IFNULL(MAX(SORT_ORDER),0) AS sortiii FROM usr_menu_web where PARENT_ID=$parent_menu"); $data1 = $q1->row(); $sorteee=$data1->sortiii+1; ///exit; $data=$this->db->query("insert into usr_menu_web set MENU_ID=$menuID,MENU_TEXT='$menu_title', MENU_URL='$menu_url',PARENT_ID=$parent_menu,IS_WEB=$is_web,SORT_ORDER=$sorteee"); if($data){ redirect(base_url('Welcome/menu_display')); } } //////////////////////////////////////////////////////////////////***********heirarchy*****************////////////// public function hierarchy() { $this->load->model('ets_fetch1_model'); $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $data["display"]=$this->db->query("select * from hierarchy")->row(); $this->load->view('header',$data); $this->load->view('hierarchy',$data); $this->load->view('footer'); } public function edit_hierarchy() { extract($_POST); $this->load->helper('inflector'); $config['upload_path'] = './img/'; $config['allowed_types'] = 'gif|jpg|png|jpeg'; $config['max_size'] = '2048'; //$config['encrypt_name'] = FALSE; $config['file_name'] = underscore($_FILES["file_picture"]['name']); $file_picture= $config['upload_path'].$config['file_name']; $this->load->library('upload', $config); if (!$this->upload->do_upload('file_picture')) { $done=$this->db->query("update main_msg set detail='$msg' where main_msg_id=$IDDD"); }else { $upload_data = $this->upload->data(); $config['image_library'] = 'gd2'; $config['source_image'] = $upload_data['full_path']; $config['maintain_ratio'] = TRUE; $config['width'] = 200; $config['height'] = 200; $this->load->library('image_lib', $config); $this->image_lib->resize(); $imagee=$upload_data['full_path']; $done=$this->db->query("update main_msg set detail='$msg',picture='$file_picture' where main_msg_id=$IDDD"); } if($done){ redirect(base_url('Welcome/introduction')); } } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public function display_contact() { $this->load->model('ets_fetch1_model'); $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $this->load->view('header',$data); $this->load->view('contact'); $this->load->view('footer'); } ///////////////////////////////////**********************************************//////////////////////////////////// public function products_gallery() { $this->load->model('ets_fetch1_model'); $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $this->load->view('header',$data); $this->load->view('products_gallery'); $this->load->view('footer'); } //////////////////////////////////////////////////////////////////////////////////////////////////// public function about() { $this->load->model('ets_fetch1_model'); $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $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'); $data['parent_nav'] = $this->ets_fetch1_model->fetch_parent_navi(); $data['child_nav'] = $this->ets_fetch1_model->fetch_child_navi(); $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