File manager - Edit - /home/u608250662/domains/rdsolution.org.in/public_html/jevica/application/controllers/_Welcome.php
Back
<?php defined('BASEPATH') or 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 https://codeigniter.com/userguide3/general/urls.html */ public function __construct() { parent::__construct(); $this->load->library('session'); } public function index() { if (isset($_POST['submit'])) { // echo "clicked";die; $dataf['name'] = $this->input->post('name'); $dataf['email'] = $this->input->post('email'); $dataf['phone'] = $this->input->post('phone'); $dataf['subject'] = $this->input->post('subject'); $dataf['message'] = $this->input->post('message'); $dataf['page'] = $this->input->post('product'); //print_r($dataf);die; $insert = $this->crud->insert('enquiry', $dataf); redirect(current_url()); } $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['SLIDER'] = $this->crud->get_data('wdi_banner'); $data['GALLERY'] = $this->gallerys->selectallbanner(); $data['TESTIMONIALS'] = $this->crud->get_data('wdi_testimonial_f '); $data['INDUSTRY'] = $this->crud->get_data('wdi_gallery'); // $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchRandomProducts('wdi_category'); $data['counter'] = $this->db->get('counter_section')->row(); $data['PAGES'] = $this->db->get('wdi_pages')->result(); // echo "<pre>";print_r($data['PAGES']);die; $this->load->view('index', $data); } public function blogs() { $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['SLIDER'] = $this->crud->get_data('wdi_banner'); $data['GALLERY'] = $this->gallerys->selectallbanner(); $data['FACULTY'] = $this->crud->get_data('wdi_testimonials '); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['BLOGS'] = $this->service->get_all_blogs('wdi_blogss'); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); // echo "<pre>";print_r($data);die; $this->load->view('blog', $data); } public function blogdetail() { $args = func_get_args(); $url = $args[0]; // print_r($args[0]);die; $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['SLIDER'] = $this->crud->get_data('wdi_banner'); $data['GALLERY'] = $this->gallerys->selectallbanner(); $data['FACULTY'] = $this->crud->get_data('wdi_testimonials '); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['BLOGS'] = $this->service->get_blog_details('wdi_blogss',$args[0]); $data['ALLBLOGS'] = $this->crud->get_blog_data('wdi_blogss',$url); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); // print_r($data['BLOGS']);die; $this->load->view('blog-details', $data); } public function about() { $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['FACULTY'] = $this->crud->get_data('wdi_testimonials '); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); // print_r($data['FACULTY']);die; $this->load->view('about', $data); } public function scholarship() { $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['FACULTY'] = $this->crud->get_data('wdi_testimonials '); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); $this->load->view('scholarship', $data); } public function category(){ $args = func_get_args(); // echo '<pre>';print_r($args);die; $url = $args[0]; $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['FACULTY'] = $this->crud->get_data('wdi_testimonials '); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); // $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); $data['PRODUCTS'] = $this->crud->fetchAll_Data('wdi_category',$url); $data['SUB_CATA'] = $this->crud->select_sub_category($url,'blue_sub_category'); // echo "<pre>";print_r($data['PRODUCTS']);die; $this->load->view('sub_categories', $data); } public function all_category(){ $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); // $data['FACULTY'] = $this->crud->get_data('wdi_testimonials '); // $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); // echo "<pre>";print_r($data);die; $this->load->view('categories', $data); } public function all_sub_category(){ $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); // $data['FACULTY'] = $this->crud->get_data('wdi_testimonials '); // $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); // echo "<pre>";print_r($data);die; $this->load->view('sub-categories', $data); } public function classes() { $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['FACULTY'] = $this->crud->get_data('wdi_testimonials '); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); $this->load->view('classes', $data); } public function founder() { $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); $this->load->view('director', $data); } public function quality_assurance() { $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); $this->load->view('quality-assurance', $data); } public function innovation() { $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); $this->load->view('innovation', $data); } public function dealer() { if (isset($_POST['submit'])) { $dataf['name'] = $this->input->post('name'); $dataf['email'] = $this->input->post('email'); $dataf['phone'] = $this->input->post('phone'); $dataf['address'] = $this->input->post('address'); $dataf['city'] = $this->input->post('city'); $dataf['company'] = $this->input->post('company'); $dataf['message'] = $this->input->post('message'); $dataf['page'] = 'Dealer'; $dataf['ip'] = $_SERVER['REMOTE_ADDR']; $dataf['timing'] = date('Y-m-d H:i:s'); $insert = $this->crud->insert('enquiry', $dataf); redirect('dealer'); } $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); if (isset($_POST['submit'])) { // echo "clicked";die; $dataf['name'] = $this->input->post('name'); $dataf['email'] = $this->input->post('email'); $dataf['phone'] = $this->input->post('phone'); $dataf['subject'] = $this->input->post('subject'); $dataf['message'] = $this->input->post('message'); $dataf['page'] = $this->input->post('product'); //print_r($dataf);die; $insert = $this->crud->insert('enquiry', $dataf); redirect(current_url()); } $this->load->view('dealer', $data); } public function categories() { $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchRandomProducts('wdi_category'); $this->load->view('categories', $data); } public function product() { $args = func_get_args(); $url = $args[0]; $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); $data['SUB_CATA_PRODUCTS'] = $this->crud->select_products($url,'wdi_category'); // print_r($data['SUB_CATA_PRODUCTS']);die; $this->load->view('products', $data); } public function product_details() { if (isset($_POST['submit'])) { // echo "clicked";die; $dataf['name'] = $this->input->post('name'); $dataf['email'] = $this->input->post('email'); $dataf['phone'] = $this->input->post('phone'); $dataf['subject'] = $this->input->post('subject'); $dataf['message'] = $this->input->post('message'); $dataf['page'] = $this->input->post('product'); //print_r($dataf);die; $insert = $this->crud->insert('enquiry', $dataf); redirect(current_url()); } $args = func_get_args(); $url = $args[0]; $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); // $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->select_product($url,'wdi_category'); $sub_category = $data['PRODUCTS'][0]->sub_cat_url; $product_url = $data['PRODUCTS'][0]->product_url; $data['RELATED_PRODUCTS'] = $this->crud->select_related_products($sub_category,'wdi_category',$product_url); // echo "<pre>"; // print_r($data['RELATED_PRODUCTS']);die; $this->load->view('product-details', $data); } public function view_pdf($filename) { // echo $filename;die; $filepath = FCPATH . 'media/uploads/category/products/pdf/' . $filename; if (file_exists($filepath)) { // Set headers to force inline display in browser header('Content-Type: application/pdf'); header('Content-Disposition: inline; filename="' . basename($filepath) . '"'); header('Content-Transfer-Encoding: binary'); header('Accept-Ranges: bytes'); // Clear output buffer ob_clean(); flush(); // Read the file readfile($filepath); exit; } else { show_404(); } } public function who_we_are() { $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $this->load->view('who-we-are', $data); } public function result() { $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['RESULT'] = $this->results->selectallbanner(); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $this->load->view('result', $data); } public function gallery() { $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['GALLERY'] = $this->gallerys->selectallbanner(); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $this->load->view('gallery', $data); } public function course($page = 1) { // $this->load->model('Welcomes'); // load your model // $this->load->library('pagination'); // $limit = 10; // records per page // // Pagination config // $config['base_url'] = base_url('test-series'); // $config['total_rows'] = $this->Welcomes->get_count(); // $config['per_page'] = $limit; // $config['uri_segment'] = 2; // the page number will be in the 2nd segment // $config['use_page_numbers'] = TRUE; // // Bootstrap 4 pagination markup // $config['full_tag_open'] = '<ul class="pagination justify-content-center">'; // $config['full_tag_close'] = '</ul>'; // $config['num_tag_open'] = '<li class="page-item">'; // $config['num_tag_close'] = '</li>'; // $config['cur_tag_open'] = '<li class="page-item active"><a class="page-link">'; // $config['cur_tag_close'] = '</a></li>'; // $config['prev_tag_open'] = '<li class="page-item">'; // $config['prev_tag_close'] = '</li>'; // $config['next_tag_open'] = '<li class="page-item">'; // $config['next_tag_close'] = '</li>'; // $config['prev_link'] = '<i class="icofont-caret-left"></i>'; // $config['next_link'] = '<i class="icofont-caret-right"></i>'; // $this->pagination->initialize($config); // // Calculate offset for DB query // $offset = ($page - 1) * $limit; // $data['pagination'] = $this->pagination->create_links(); $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $this->load->view('neet', $data); } public function sub_course(){ $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['FACULTY'] = $this->crud->get_data('wdi_testimonials '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); $this->load->view('single-service', $data); } // public function single_service() // { // $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); // $this->load->view('single-service', $data); // } // public function test_series($offset=0) // { // $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); // $data['TEST_SERIES'] = $this->crud->get_data('wdi_test_series'); // $this->load->model('Welcomes'); // load your model // $this->load->library('pagination'); // $limit = 1; // records per page // // Pagination config // $config['base_url'] = base_url('test_series/index'); // $config['total_rows'] = $this->Welcomes->get_count(); // $config['per_page'] = $limit; // $config['uri_segment'] = 3; // // Bootstrap 4 pagination markup // $config['full_tag_open'] = '<ul class="pagination justify-content-center">'; // $config['full_tag_close'] = '</ul>'; // $config['num_tag_open'] = '<li class="page-item">'; // $config['num_tag_close'] = '</li>'; // $config['cur_tag_open'] = '<li class="page-item active"><a class="page-link">'; // $config['cur_tag_close'] = '</a></li>'; // $config['prev_tag_open'] = '<li class="page-item">'; // $config['prev_tag_close'] = '</li>'; // $config['next_tag_open'] = '<li class="page-item">'; // $config['next_tag_close'] = '</li>'; // $config['prev_link'] = '<i class="icofont-caret-left"></i>'; // $config['next_link'] = '<i class="icofont-caret-right"></i>'; // $this->pagination->initialize($config); // // Fetch records for current page // $data['TEST_SERIES'] = $this->Welcomes->get_records($limit, $offset); // $data['pagination'] = $this->pagination->create_links(); // $this->load->view('test-series', $data); // } public function test_series($page = 1) { $this->load->model('Welcomes'); // load your model $this->load->library('pagination'); $limit = 10; // records per page // Pagination config $config['base_url'] = base_url('test-series'); $config['total_rows'] = $this->Welcomes->get_count(); $config['per_page'] = $limit; $config['uri_segment'] = 2; // the page number will be in the 2nd segment $config['use_page_numbers'] = TRUE; // Bootstrap 4 pagination markup $config['full_tag_open'] = '<ul class="pagination justify-content-center">'; $config['full_tag_close'] = '</ul>'; $config['num_tag_open'] = '<li class="page-item">'; $config['num_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="page-item active"><a class="page-link">'; $config['cur_tag_close'] = '</a></li>'; $config['prev_tag_open'] = '<li class="page-item">'; $config['prev_tag_close'] = '</li>'; $config['next_tag_open'] = '<li class="page-item">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '<i class="icofont-caret-left"></i>'; $config['next_link'] = '<i class="icofont-caret-right"></i>'; $this->pagination->initialize($config); // Calculate offset for DB query $offset = ($page - 1) * $limit; $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); $data['TEST_SERIES'] = $this->Welcomes->get_records($limit, $offset); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['pagination'] = $this->pagination->create_links(); $this->load->view('test-series', $data); } public function contact() { if (isset($_POST['submit'])) { //echo "clicked"; $dataf['name'] = $this->input->post('name'); $dataf['email'] = $this->input->post('email'); $dataf['phone'] = $this->input->post('phone'); $dataf['subject'] = $this->input->post('subject'); $dataf['message'] = $this->input->post('message'); $dataf['page'] = 'Contact'; //print_r($dataf);die; $insert = $this->crud->insert('enquiry', $dataf); if ($insert) { redirect(base_url()); } } //EMAIL // if (isset($_POST['submit'])) { // $to = 'techstream670@gmail.com'; // Replace with the recipient's email address // $subject = 'BOOK AN APPOINTMENT'; // Replace with the email subject // $name = $_POST['name']; // $email = $_POST['email']; // $phone = $_POST['phone']; // $disease = $_POST['disease']; // $messageContent = $_POST['message']; // $message = '<html><body>'; // $message .= '<table rules="all" style="border-color: #666;" cellpadding="10">'; // $message .= "<tr style='background: #eee;'><td colspan='2'><strong>MAKE AN APPOINTMENT</strong> </td></tr>"; // $message .= "<tr><td><strong>Name:</strong> </td><td>" . $name . "</td></tr>"; // $message .= "<tr><td><strong>Email:</strong> </td><td>" . $email . "</td></tr>"; // $message .= "<tr><td><strong>Phone:</strong> </td><td>" . $phone . "</td></tr>"; // $message .= "<tr><td><strong>Disease:</strong> </td><td>" . $disease . "</td></tr>"; // $message .= "<tr><td><strong>Message:</strong> </td><td>" . $messageContent . "</td></tr>"; // $message .= "</table>"; // $message .= "</body></html>"; // $headers = 'MIME-Version: 1.0' . "\r\n"; // $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; // $headers .= 'From: ' . $email . "\r\n"; // $headers .= 'Reply-To: ' . $to . "\r\n"; // if (mail($to, $subject, $message, $headers)) { // echo 'Email sent successfully!'; // } else { // echo 'Email sending failed.'; // } // } if (isset($_POST['submit'])) { $message = '<html><body>'; $message .= '<table rules="all" style="border-color: #666;" cellpadding="10">'; $message .= "<tr style='background: #eee;'><td colspan='2'><strong>Contact us Form Enquiry</strong> </td></tr>"; $message .= "<tr><td><strong>Name:</strong> </td><td>" . strip_tags($this->input->post('name')) . "</td></tr>"; $message .= "<tr><td><strong>Email:</strong> </td><td>" . strip_tags($this->input->post('email')) . "</td></tr>"; $message .= "<tr><td><strong>Phone:</strong> </td><td>" . strip_tags($this->input->post('phone')) . "</td></tr>"; $message .= "<tr><td><strong>Subject:</strong> </td><td>" . strip_tags($this->input->post('subject')) . "</td></tr>"; $message .= "<tr><td><strong>Message:</strong> </td><td>" . strip_tags($this->input->post('message')) . "</td></tr>"; $message .= "</table>"; $message .= "</body></html>"; //echo $message; $to = 'jatinsingh6547@gmail.com'; $this->load->library('email'); $this->email->set_newline("\r\n"); $this->email->set_mailtype("html"); $this->email->from($_POST['name']); $this->email->to($to); $this->email->subject($this->input->post('subject')); $this->email->message($message); $this->email->send(); } // $data['PRODATA'] = $this->crud->get_data('wire_products'); // $data['CAT'] = $this->crud->get_data('wire_product_category'); // $data['PROIMGDATA'] = $this->crud->get_data('wire_product_image'); $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); $this->load->view('contact', $data); } public function faculty() { $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['FACULTY'] = $this->crud->get_data('wdi_testimonials '); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); $this->load->view('teams', $data); } public function images() { $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); // $data['FACULTY'] = $this->crud->get_data('wdi_testimonials '); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['FEEDBACK'] = $this->feedbacks->selectallimages('wdi_feedback '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['GALLERY'] = $this->gallerys->selectallbanner(); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); $this->load->view('images', $data); } public function video() { $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); // $data['FACULTY'] = $this->crud->get_data('wdi_testimonials '); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $data['FEEDBACK'] = $this->feedbacks->selectallvideos('wdi_feedback '); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); $data['GALLERY'] = $this->gallerys->selectallbanner(); $this->load->view('videos', $data); } public function faq() { if (isset($_POST['submit'])) { //echo "clicked"; $dataf['name'] = $this->input->post('first_name')." ".$this->input->post('last_name'); $dataf['email'] = $this->input->post('email'); $dataf['phone'] = $this->input->post('phone'); $dataf['subject'] = $this->input->post('subject'); $dataf['message'] = $this->input->post('message'); $dataf['course'] = $this->input->post('course'); $dataf['ip'] = $this->input->post('ip'); $dataf['page'] = 'FAQ'; //print_r($dataf);die; $insert = $this->crud->insert('enquiry', $dataf); if ($insert) { redirect(base_url()); } } //EMAIL // if (isset($_POST['submit'])) { // $to = 'techstream670@gmail.com'; // Replace with the recipient's email address // $subject = 'BOOK AN APPOINTMENT'; // Replace with the email subject // $name = $_POST['name']; // $email = $_POST['email']; // $phone = $_POST['phone']; // $disease = $_POST['disease']; // $messageContent = $_POST['message']; // $message = '<html><body>'; // $message .= '<table rules="all" style="border-color: #666;" cellpadding="10">'; // $message .= "<tr style='background: #eee;'><td colspan='2'><strong>MAKE AN APPOINTMENT</strong> </td></tr>"; // $message .= "<tr><td><strong>Name:</strong> </td><td>" . $name . "</td></tr>"; // $message .= "<tr><td><strong>Email:</strong> </td><td>" . $email . "</td></tr>"; // $message .= "<tr><td><strong>Phone:</strong> </td><td>" . $phone . "</td></tr>"; // $message .= "<tr><td><strong>Disease:</strong> </td><td>" . $disease . "</td></tr>"; // $message .= "<tr><td><strong>Message:</strong> </td><td>" . $messageContent . "</td></tr>"; // $message .= "</table>"; // $message .= "</body></html>"; // $headers = 'MIME-Version: 1.0' . "\r\n"; // $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; // $headers .= 'From: ' . $email . "\r\n"; // $headers .= 'Reply-To: ' . $to . "\r\n"; // if (mail($to, $subject, $message, $headers)) { // echo 'Email sent successfully!'; // } else { // echo 'Email sending failed.'; // } // } if (isset($_POST['submit'])) { $message = '<html><body>'; $message .= '<table rules="all" style="border-color: #666;" cellpadding="10">'; $message .= "<tr style='background: #eee;'><td colspan='2'><strong>Contact us Form Enquiry</strong> </td></tr>"; $message .= "<tr><td><strong>Name:</strong> </td><td>" . strip_tags($this->input->post('name')) . "</td></tr>"; $message .= "<tr><td><strong>Email:</strong> </td><td>" . strip_tags($this->input->post('email')) . "</td></tr>"; $message .= "<tr><td><strong>Phone:</strong> </td><td>" . strip_tags($this->input->post('phone')) . "</td></tr>"; $message .= "<tr><td><strong>Subject:</strong> </td><td>" . strip_tags($this->input->post('subject')) . "</td></tr>"; $message .= "<tr><td><strong>Message:</strong> </td><td>" . strip_tags($this->input->post('message')) . "</td></tr>"; $message .= "</table>"; $message .= "</body></html>"; //echo $message; $to = 'jatinsingh6547@gmail.com'; $this->load->library('email'); $this->email->set_newline("\r\n"); $this->email->set_mailtype("html"); $this->email->from($_POST['name']); $this->email->to($to); $this->email->subject($this->input->post('subject')); $this->email->message($message); $this->email->send(); } // $data['PRODATA'] = $this->crud->get_data('wire_products'); // $data['CAT'] = $this->crud->get_data('wire_product_category'); // $data['PROIMGDATA'] = $this->crud->get_data('wire_product_image'); $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); // $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); // $data['FACULTY'] = $this->crud->get_data('wdi_testimonials '); // $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $this->load->view('faq', $data); } public function pagenotfound() { $data['COURSE'] = $this->service->get_all_courses('wdi__course '); $this->load->view("404"); } // Dynamic pages public function page() { $args = func_get_args(); $data['SITE_SETTING'] = $this->crud->get_data('wdi_site-setting'); $data['CATDATA'] = $this->crud->fetchAllData('blue_category'); $data['SUBCATDATA'] = $this->crud->fetchAllData('blue_sub_category'); $data['PRODUCTS'] = $this->crud->fetchAllData('wdi_category'); $this->db->where("url", $this->uri->segment(2)); $newPage = $this->db->get('wdi_pages')->result(); $data['COURSE'] = $this->service->get_all_courses('wdi__course '); if ($newPage) { $data['SEODATA'] = $this->service->selectseobyurl($args[0]); $data['MEDIA'] = $this->service->selectmediabyurl($args[0]); $data['Args'] = $this->uri->segment(2); $data['PAGEDATA'] = $newPage; // echo "<pre>";print_r($data);die; $this->load->view('page', $data); } } public function view_pdf_wp($filename) { // echo $filename;die; $filepath = FCPATH . 'media/uploads/test_series/' . $filename; if (file_exists($filepath)) { // Set headers to force inline display in browser header('Content-Type: application/pdf'); header('Content-Disposition: inline; filename="' . basename($filepath) . '"'); header('Content-Transfer-Encoding: binary'); header('Accept-Ranges: bytes'); // Clear output buffer ob_clean(); flush(); // Read the file readfile($filepath); exit; } else { show_404(); } } public function pagination_welcome($offset = 0) { $this->load->model('Welcomes'); // load your model $this->load->library('pagination'); $limit = 10; // records per page // Pagination config $config['base_url'] = site_url('test_series/index'); $config['total_rows'] = $this->Welcomes->get_count(); $config['per_page'] = $limit; $config['uri_segment'] = 3; // Bootstrap 4 pagination markup $config['full_tag_open'] = '<ul class="pagination justify-content-center">'; $config['full_tag_close'] = '</ul>'; $config['num_tag_open'] = '<li class="page-item">'; $config['num_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="page-item active"><a class="page-link">'; $config['cur_tag_close'] = '</a></li>'; $config['prev_tag_open'] = '<li class="page-item">'; $config['prev_tag_close'] = '</li>'; $config['next_tag_open'] = '<li class="page-item">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '<i class="icofont-caret-left"></i>'; $config['next_link'] = '<i class="icofont-caret-right"></i>'; $this->pagination->initialize($config); // Fetch records for current page $data['TEST_SERIES'] = $this->Welcomes->get_records($limit, $offset); $data['pagination'] = $this->pagination->create_links(); $this->load->view('test_series_list', $data); } }
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings