File manager - Edit - /home/u608250662/domains/rdsolution.org.in/public_html/jevica/application/controllers/Siteediting.php
Back
<?php defined('BASEPATH') or exit('No direct script access allowed'); class Siteediting extends CI_Controller { public function __construct() { parent::__construct(); $this->load->library('session'); } public function setting() { $args = func_get_args(); if (isset($_POST['submit'])) { $id = $this->input->post('id'); // Logo Upload if (!empty($_FILES['logo']['name'])) { $bimage = $_FILES['logo']['name']; move_uploaded_file($_FILES['logo']['tmp_name'], 'media/' . $bimage); } else { $bimage = $this->input->post('old-logo'); } // About Image Upload if (!empty($_FILES['about_us_image']['name'])) { $about_us_image = $_FILES['about_us_image']['name']; move_uploaded_file($_FILES['about_us_image']['tmp_name'], 'media/' . $about_us_image); } else { $about_us_image = $this->input->post('old-about_us_image'); } // Director Image 1 Upload if (!empty($_FILES['director_image_1']['name'])) { $director_image_1 = $_FILES['director_image_1']['name']; move_uploaded_file($_FILES['director_image_1']['tmp_name'], 'media/' . $director_image_1); } else { $director_image_1 = $this->input->post('old-director_image_1'); } // Director Image 2 Upload if (!empty($_FILES['director_image_2']['name'])) { $director_image_2 = $_FILES['director_image_2']['name']; move_uploaded_file($_FILES['director_image_2']['tmp_name'], 'media/' . $director_image_2); } else { $director_image_2 = $this->input->post('old-director_image_2'); } $data['logo'] = $bimage; $data['about_us_image'] = $about_us_image; // Basic Settings $data['phone'] = $this->input->post('phone'); $data['email'] = $this->input->post('email'); $data['address'] = $this->input->post('address'); $data['pcolor'] = $this->input->post('pcolor'); $data['scolor'] = $this->input->post('scolor'); $data['facebook'] = $this->input->post('facebook'); $data['twitter'] = $this->input->post('twitter'); $data['youtube'] = $this->input->post('youtube'); $data['instagram'] = $this->input->post('instagram'); $data['whatsapp'] = $this->input->post('whatsapp'); $data['telegram'] = $this->input->post('telegram'); $data['linkdin'] = $this->input->post('linkdin'); // Content $data['vision'] = $this->input->post('vision'); $data['mission'] = $this->input->post('mission'); $data['value'] = $this->input->post('value'); $data['about'] = $this->input->post('about'); // Testimonials $data['testimonial_title'] = $this->input->post('testimonial_title'); $data['testimonial_paragraph'] = $this->input->post('testimonial_paragraph'); $data['why_choose_us'] = $this->input->post('why_choose_us'); /* |-------------------------------------------------------------------------- | Director 1 Details |-------------------------------------------------------------------------- */ $data['director_name_1'] = $this->input->post('director_name_1'); $data['position_1'] = $this->input->post('position_1'); $data['director_desc_1'] = $this->input->post('director_desc_1'); $data['director_image_1'] = $director_image_1; $data['director_linkedin_1'] = $this->input->post('director_linkedin_1'); $data['director_twitter_1'] = $this->input->post('director_twitter_1'); $data['director_email_1'] = $this->input->post('director_email_1'); /* |-------------------------------------------------------------------------- | Director 2 Details |-------------------------------------------------------------------------- */ $data['director_name_2'] = $this->input->post('director_name_2'); $data['position_2'] = $this->input->post('position_2'); $data['director_desc_2'] = $this->input->post('director_desc_2'); $data['director_image_2'] = $director_image_2; $data['director_linkedin_2'] = $this->input->post('director_linkedin_2'); $data['director_twitter_2'] = $this->input->post('director_twitter_2'); $data['director_email_2'] = $this->input->post('director_email_2'); // Update Database $result = $this->siteeditingss->update( $id, $data, 'wdi_site-setting' ); $this->session->set_flashdata( 'message', '<div class="alert alert-success">Record Successfully Updated</div>' ); redirect('siteediting/setting'); } $data['EDITINVOICE'] = $this->siteeditingss->selectallsitedetail(); $this->load->view('admin/site-editing/setting', $data); } public function _setting() { $args = func_get_args(); if (isset($_POST['submit'])) { $id = $this->input->post('id'); // Logo Upload if (!empty($_FILES['logo']['name'])) { $bimage = $_FILES['logo']['name']; move_uploaded_file($_FILES['logo']['tmp_name'], 'media/' . $bimage); } else { $bimage = $this->input->post('old-logo'); } // About Image Upload if (!empty($_FILES['about_us_image']['name'])) { $about_us_image = $_FILES['about_us_image']['name']; move_uploaded_file($_FILES['about_us_image']['tmp_name'], 'media/' . $about_us_image); } else { $about_us_image = $this->input->post('old-about_us_image'); } $data['logo'] = $bimage; //$_FILES['image']['name']; $data['about_us_image'] = $about_us_image; //$_FILES['image']['name']; $data['phone'] = $this->input->post('phone'); $data['email'] = $this->input->post('email'); $data['address'] = $this->input->post('address'); $data['pcolor'] = $this->input->post('office_timing'); $data['facebook'] = $this->input->post('facebook'); $data['twitter'] = $this->input->post('twitter'); $data['youtube'] = $this->input->post('youtube'); $data['instagram'] = $this->input->post('instagram'); $data['whatsapp'] = $this->input->post('whatsapp'); $data['telegram'] = $this->input->post('telegram'); $data['linkdin'] = $this->input->post('linkdin'); $data['pcolor'] = $this->input->post('pcolor'); $data['scolor'] = $this->input->post('scolor'); $data['vision'] = $this->input->post('vision'); $data['mission'] = $this->input->post('mission'); $data['value'] = $this->input->post('value'); $data['about'] = $this->input->post('about'); $data['testimonial_title'] = $this->input->post('testimonial_title'); $data['testimonial_paragraph'] = $this->input->post('testimonial_paragraph'); $data['why_choose_us'] = $this->input->post('why_choose_us'); $result = $this->siteeditingss->update($id, $data, 'wdi_site-setting'); $this->session->set_flashdata('message', '<div class="alert alert-success">Record Successfully Updated</div>'); redirect('siteediting/setting'); } $data['EDITINVOICE'] = $this->siteeditingss->selectallsitedetail(); $this->load->view('admin/site-editing/setting', $data); } // public function contact() // { // if (isset ($_POST['submit'])){ // $len = count($this->input->post('addresshead')); // for($i=0; $i<$len; $i++){ // $data['addresshead']=$this->input->post('addresshead')[$i]; // $data['address']=$this->input->post('address')[$i]; // $data['map']=$this->input->post('map')[$i]; // $this->crud->insert('contact_details',$data); // } // redirect('siteediting/contact'); // } // $this->load->view('admin/site-editing/contact-detail'); // } public function email() { $args = func_get_args(); if (isset($_POST['submit'])) { $id = $this->input->post('id'); $data['email'] = $this->input->post('email'); $data['admin_emal'] = $this->input->post('admin_email'); $data['email_password'] = $this->input->post('email_password'); $data['smtp_login_link'] = $this->input->post('smtp_login_link'); $result = $this->siteeditingss->update($id, $data, 'wdi_email_temp'); $this->session->set_flashdata('message', '<div class="alert alert-success">Record Successfully Updated</div>'); redirect('email'); } $data['EDITINVOICE'] = $this->siteeditingss->selectallemaildetail(); $this->load->view('admin/site-editing/email', $data); } public function alldetails() { $data['RESULT'] = $this->contactdata->selectallsitedetail(); $this->load->view('admin/site-editing/detail-list', $data); } public function enquiry() { $this->db->distinct(); $this->db->order_by('id','DESC'); $data['RESULT'] = $this->db->get('enquiry')->result(); $this->load->view('admin/site-editing/list', $data); } public function counter(){ if (isset($_POST['submit'])) { $data = [ 'counter1_title' => $this->input->post('counter1_title'), 'counter1_number' => $this->input->post('counter1_number'), 'counter2_title' => $this->input->post('counter2_title'), 'counter2_number' => $this->input->post('counter2_number'), 'counter3_title' => $this->input->post('counter3_title'), 'counter3_number' => $this->input->post('counter3_number'), 'counter4_title' => $this->input->post('counter4_title'), 'counter4_number' => $this->input->post('counter4_number'), 'updated_at' => date('Y-m-d H:i:s') ]; // check if row exists $query = $this->db->get('counter_section'); if ($query->num_rows() > 0) { // UPDATE existing row $this->db->where('id', 1); $this->db->update('counter_section', $data); } else { // INSERT first time only $data['created_at'] = date('Y-m-d H:i:s'); $this->db->insert('counter_section', $data); } $this->session->set_flashdata('message', '<div class="alert alert-success">Record Successfully Updated</div>'); redirect('siteediting/counter'); } $data['counter'] = $this->db->get('counter_section')->result(); $this->load->view('admin/site-editing/counter', $data); } }
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings