https://t.me/RX1948
Server : Apache/2.4.18 (Ubuntu)
System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64
User : oppastar ( 1041)
PHP Version : 7.0.33-0ubuntu0.16.04.15
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Directory :  /var/www/serbaantik.com/public_html/application/controllers/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/serbaantik.com/public_html/application/controllers/admin/Landingpage.php
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Landingpage extends Admin_Controller 
{		
    protected $gorden_data;
    protected $sofa_data;

	function __construct() 
  {
		  parent::__construct();
	} 
		
	public function index() 
    {
        $this->data['subview'] = 'admin/landingpage/index';
        $this->load->view('admin/templates/header', $this->data_header); 
        $this->load->view('admin/_layout_main', $this->data);
        $this->load->view('admin/templates/footer');	
    }
	
	public function gorden_edit_content() 
    {
        $this->data['gorden'] = $this->db->select('*')->from('gorden_landingpage_content')->where('id', 1)->get()->row_array();
        
        //validation check in action
        $config = array( 
            array(
                'field'   => 'tagline',
                'label'   => 'Tagline',
                'rules'   => 'trim'
            ),     
        );

        $this->load->library('form_validation');
        $this->form_validation->set_error_delimiters('<div class="error">', '</div>'); //above is to add class to form validation error, to be styled	
        $this->form_validation->set_rules($config); 

        if($this->form_validation->run() == true) 
        {	
            $data = array(
                'tagline' => $this->security->xss_clean($this->input->post('tagline')),
                'subtagline' => $this->security->xss_clean($this->input->post('subtagline')),
                'subtagline' => $this->security->xss_clean($this->input->post('subtagline')),

                'movingtext1' => $this->security->xss_clean($this->input->post('movingtext1')),
                'movingtext2' => $this->security->xss_clean($this->input->post('movingtext2')),
                'movingtext3' => $this->security->xss_clean($this->input->post('movingtext3')),
                'movingtext4' => $this->security->xss_clean($this->input->post('movingtext4')),
                'movingtext5' => $this->security->xss_clean($this->input->post('movingtext5')),
                'movingtext6' => $this->security->xss_clean($this->input->post('movingtext6')),
                'movingtext7' => $this->security->xss_clean($this->input->post('movingtext7')),
                'movingtext8' => $this->security->xss_clean($this->input->post('movingtext8')),
                'movingtext9' => $this->security->xss_clean($this->input->post('movingtext9')),
                'movingtext10' => $this->security->xss_clean($this->input->post('movingtext10')),

                'why_title' => $this->security->xss_clean($this->input->post('why_title')),
                'why_desc' => $this->security->xss_clean($this->input->post('why_desc')),
                'why_desc' => $this->security->xss_clean($this->input->post('why_desc')),
                'why1_title' => $this->security->xss_clean($this->input->post('why1_title')),
                'why2_title' => $this->security->xss_clean($this->input->post('why2_title')),
                'why3_title' => $this->security->xss_clean($this->input->post('why3_title')),
                'why4_title' => $this->security->xss_clean($this->input->post('why4_title')),
                'why5_title' => $this->security->xss_clean($this->input->post('why5_title')),
                'why6_title' => $this->security->xss_clean($this->input->post('why6_title')),
                'why1_desc' => $this->security->xss_clean($this->input->post('why1_desc')),
                'why2_desc' => $this->security->xss_clean($this->input->post('why2_desc')),
                'why3_desc' => $this->security->xss_clean($this->input->post('why3_desc')),
                'why4_desc' => $this->security->xss_clean($this->input->post('why4_desc')),
                'why5_desc' => $this->security->xss_clean($this->input->post('why5_desc')),
                'why6_desc' => $this->security->xss_clean($this->input->post('why6_desc')),

                'cta_title' => $this->security->xss_clean($this->input->post('cta_title')),

                'ordering1_desc' => $this->security->xss_clean($this->input->post('ordering1_desc')),
                'ordering2_desc' => $this->security->xss_clean($this->input->post('ordering2_desc')),
                'ordering3_desc' => $this->security->xss_clean($this->input->post('ordering3_desc')),
                'ordering4_desc' => $this->security->xss_clean($this->input->post('ordering4_desc')),
                'ordering5_desc' => $this->security->xss_clean($this->input->post('ordering5_desc')),

                'product_title' => $this->security->xss_clean($this->input->post('product_title')),
                'product_desc' => $this->security->xss_clean($this->input->post('product_desc')),
                'produc1_txt' => $this->security->xss_clean($this->input->post('produc1_txt')),
                'produc2_txt' => $this->security->xss_clean($this->input->post('produc2_txt')),
                'produc3_txt' => $this->security->xss_clean($this->input->post('produc3_txt')),
                'produc4_txt' => $this->security->xss_clean($this->input->post('produc4_txt')),
                'produc5_txt' => $this->security->xss_clean($this->input->post('produc5_txt')),
                'produc6_txt' => $this->security->xss_clean($this->input->post('produc6_txt')),
                'produc7_txt' => $this->security->xss_clean($this->input->post('produc7_txt')),
                'produc8_txt' => $this->security->xss_clean($this->input->post('produc8_txt')),
                'produc9_txt' => $this->security->xss_clean($this->input->post('produc9_txt')),
                'produc10_txt' => $this->security->xss_clean($this->input->post('produc10_txt')),

                'collection_title' => $this->security->xss_clean($this->input->post('collection_title')),
                'collection_desc' => $this->security->xss_clean($this->input->post('collection_desc')),
                'collection_url' => $this->security->xss_clean($this->input->post('collection_url')),

                'testimony_title' => $this->security->xss_clean($this->input->post('testimony_title')),

                'client_title' => $this->security->xss_clean($this->input->post('client_title')),

                'whyserbaantik_title' => $this->security->xss_clean($this->input->post('whyserbaantik_title')),
                'whyserbaantik1' => $this->security->xss_clean($this->input->post('whyserbaantik1')),
                'whyserbaantik2' => $this->security->xss_clean($this->input->post('whyserbaantik2')),
                'whyserbaantik3' => $this->security->xss_clean($this->input->post('whyserbaantik3')),
                'whyserbaantik4' => $this->security->xss_clean($this->input->post('whyserbaantik4')),
                'whyserbaantik5' => $this->security->xss_clean($this->input->post('whyserbaantik5')),
                'whyserbaantik6' => $this->security->xss_clean($this->input->post('whyserbaantik6')),
                'whyserbaantik7' => $this->security->xss_clean($this->input->post('whyserbaantik7')),
                'whyserbaantik8' => $this->security->xss_clean($this->input->post('whyserbaantik8')),
                'whyserbaantik9' => $this->security->xss_clean($this->input->post('whyserbaantik9')),
                'whyserbaantik10' => $this->security->xss_clean($this->input->post('whyserbaantik10')),

                'pricing_title' => $this->security->xss_clean($this->input->post('pricing_title')),
                'pricing_table' => $this->security->xss_clean($this->input->post('pricing_table')),
                'showroom_url' => $this->security->xss_clean($this->input->post('showroom_url')),

                'question1' => $this->security->xss_clean($this->input->post('question1')),
                'question2' => $this->security->xss_clean($this->input->post('question2')),
                'question3' => $this->security->xss_clean($this->input->post('question3')),
                'question4' => $this->security->xss_clean($this->input->post('question4')),
                'question5' => $this->security->xss_clean($this->input->post('question5')),
                'question6' => $this->security->xss_clean($this->input->post('question6')),
                'question7' => $this->security->xss_clean($this->input->post('question7')),
                'question8' => $this->security->xss_clean($this->input->post('question8')),
                'question9' => $this->security->xss_clean($this->input->post('question9')),
                'question10' => $this->security->xss_clean($this->input->post('question10')),

                'answer1' => $this->security->xss_clean($this->input->post('answer1')),
                'answer2' => $this->security->xss_clean($this->input->post('answer2')),
                'answer3' => $this->security->xss_clean($this->input->post('answer3')),
                'answer4' => $this->security->xss_clean($this->input->post('answer4')),
                'answer5' => $this->security->xss_clean($this->input->post('answer5')),
                'answer6' => $this->security->xss_clean($this->input->post('answer6')),
                'answer7' => $this->security->xss_clean($this->input->post('answer7')),
                'answer8' => $this->security->xss_clean($this->input->post('answer8')),
                'answer9' => $this->security->xss_clean($this->input->post('answer9')),
                'answer10' => $this->security->xss_clean($this->input->post('answer10')),
            );

            $this->gorden_data = $data;

            $this->upload_image($_FILES['top_bg_img'], 'top_bg_img', 'gorden'); 

            $this->upload_image($_FILES['top_bg_img_mobile'], 'top_bg_img_mobile', 'gorden'); 

            $this->upload_image($_FILES['why1_icon'], 'why1_icon', 'gorden'); 
            $this->upload_image($_FILES['why2_icon'], 'why2_icon', 'gorden'); 
            $this->upload_image($_FILES['why3_icon'], 'why3_icon', 'gorden'); 
            $this->upload_image($_FILES['why4_icon'], 'why4_icon', 'gorden'); 
            $this->upload_image($_FILES['why5_icon'], 'why5_icon', 'gorden'); 
            $this->upload_image($_FILES['why6_icon'], 'why6_icon', 'gorden'); 

            $this->upload_image($_FILES['cta_bg_img'], 'cta_bg_img', 'gorden'); 

            $this->upload_image($_FILES['ordering1_img'], 'ordering1_img', 'gorden');
            $this->upload_image($_FILES['ordering2_img'], 'ordering2_img', 'gorden');
            $this->upload_image($_FILES['ordering3_img'], 'ordering3_img', 'gorden');
            $this->upload_image($_FILES['ordering4_img'], 'ordering4_img', 'gorden');
            $this->upload_image($_FILES['ordering5_img'], 'ordering5_img', 'gorden');

            $this->upload_image($_FILES['produc1_img'], 'produc1_img', 'gorden');
            $this->upload_image($_FILES['produc2_img'], 'produc2_img', 'gorden');
            $this->upload_image($_FILES['produc3_img'], 'produc3_img', 'gorden');
            $this->upload_image($_FILES['produc4_img'], 'produc4_img', 'gorden');
            $this->upload_image($_FILES['produc5_img'], 'produc5_img', 'gorden');
            $this->upload_image($_FILES['produc6_img'], 'produc6_img', 'gorden');
            $this->upload_image($_FILES['produc7_img'], 'produc7_img', 'gorden');
            $this->upload_image($_FILES['produc8_img'], 'produc8_img', 'gorden');
            $this->upload_image($_FILES['produc9_img'], 'produc9_img', 'gorden');
            $this->upload_image($_FILES['produc10_img'], 'produc10_img', 'gorden');

            $this->upload_image($_FILES['collection1_img'], 'collection1_img', 'gorden');
            $this->upload_image($_FILES['collection2_img'], 'collection2_img', 'gorden');
            $this->upload_image($_FILES['collection3_img'], 'collection3_img', 'gorden');

            $this->upload_image($_FILES['testimony_bg_img'], 'testimony_bg_img', 'gorden');

            $this->upload_image($_FILES['testimony1_img'], 'testimony1_img', 'gorden');
            $this->upload_image($_FILES['testimony2_img'], 'testimony2_img', 'gorden');
            $this->upload_image($_FILES['testimony3_img'], 'testimony3_img', 'gorden');
            $this->upload_image($_FILES['testimony4_img'], 'testimony4_img', 'gorden');
            $this->upload_image($_FILES['testimony5_img'], 'testimony5_img', 'gorden');
            $this->upload_image($_FILES['testimony6_img'], 'testimony6_img', 'gorden');
            $this->upload_image($_FILES['testimony7_img'], 'testimony7_img', 'gorden');
            $this->upload_image($_FILES['testimony8_img'], 'testimony8_img', 'gorden');
            $this->upload_image($_FILES['testimony9_img'], 'testimony9_img', 'gorden');
            $this->upload_image($_FILES['testimony10_img'], 'testimony10_img', 'gorden');

            $this->upload_image($_FILES['client1_img'], 'client1_img', 'gorden');
            $this->upload_image($_FILES['client2_img'], 'client2_img', 'gorden');
            $this->upload_image($_FILES['client3_img'], 'client3_img', 'gorden');
            $this->upload_image($_FILES['client4_img'], 'client4_img', 'gorden');
            $this->upload_image($_FILES['client5_img'], 'client5_img', 'gorden');
            $this->upload_image($_FILES['client6_img'], 'client6_img', 'gorden');
            $this->upload_image($_FILES['client7_img'], 'client7_img', 'gorden');
            $this->upload_image($_FILES['client8_img'], 'client8_img', 'gorden');
            $this->upload_image($_FILES['client9_img'], 'client9_img', 'gorden');
            $this->upload_image($_FILES['client10_img'], 'client10_img', 'gorden');

            $this->upload_image($_FILES['whyserbaantik_img'], 'whyserbaantik_img', 'gorden');

            $this->upload_image($_FILES['faq_img'], 'faq_img', 'gorden');

           $this->db->where('id', 1);
           $this->db->update('gorden_landingpage_content', $this->gorden_data); 

          $this->session->set_flashdata('success', '<br><p style="background:green; color:white; padding:5px; font-weight:bold;">Gorden Content Edit Successful</p>');
          
          redirect('admin/landingpage/gorden_edit_content');		
      } 
      
      $this->data['subview'] = 'admin/landingpage/gorden_edit_content';
      $this->load->view('admin/templates/header', $this->data_header); 
      $this->load->view('admin/_layout_main', $this->data);
      $this->load->view('admin/templates/footer');	
	}

    public function sofa_edit_content() 
    {
        $this->data['sofa'] = $this->db->select('*')->from('sofa_landingpage_content')->where('id', 1)->get()->row_array();
        
        //validation check in action
        $config = array( 
            array(
                'field'   => 'tagline',
                'label'   => 'Tagline',
                'rules'   => 'trim'
            ),     
        );

        $this->load->library('form_validation');
        $this->form_validation->set_error_delimiters('<div class="error">', '</div>'); //above is to add class to form validation error, to be styled	
        $this->form_validation->set_rules($config); 

        if($this->form_validation->run() == true) 
        {	
            $data = array(
                'tagline' => $this->security->xss_clean($this->input->post('tagline')),
                'subtagline' => $this->security->xss_clean($this->input->post('subtagline')),
                'subtagline' => $this->security->xss_clean($this->input->post('subtagline')),

                'movingtext1' => $this->security->xss_clean($this->input->post('movingtext1')),
                'movingtext2' => $this->security->xss_clean($this->input->post('movingtext2')),
                'movingtext3' => $this->security->xss_clean($this->input->post('movingtext3')),
                'movingtext4' => $this->security->xss_clean($this->input->post('movingtext4')),
                'movingtext5' => $this->security->xss_clean($this->input->post('movingtext5')),
                'movingtext6' => $this->security->xss_clean($this->input->post('movingtext6')),
                'movingtext7' => $this->security->xss_clean($this->input->post('movingtext7')),
                'movingtext8' => $this->security->xss_clean($this->input->post('movingtext8')),
                'movingtext9' => $this->security->xss_clean($this->input->post('movingtext9')),
                'movingtext10' => $this->security->xss_clean($this->input->post('movingtext10')),

                'why_title' => $this->security->xss_clean($this->input->post('why_title')),
                'why_desc' => $this->security->xss_clean($this->input->post('why_desc')),
                'why_desc' => $this->security->xss_clean($this->input->post('why_desc')),
                'why1_title' => $this->security->xss_clean($this->input->post('why1_title')),
                'why2_title' => $this->security->xss_clean($this->input->post('why2_title')),
                'why3_title' => $this->security->xss_clean($this->input->post('why3_title')),
                'why4_title' => $this->security->xss_clean($this->input->post('why4_title')),
                'why5_title' => $this->security->xss_clean($this->input->post('why5_title')),
                'why6_title' => $this->security->xss_clean($this->input->post('why6_title')),
                'why1_desc' => $this->security->xss_clean($this->input->post('why1_desc')),
                'why2_desc' => $this->security->xss_clean($this->input->post('why2_desc')),
                'why3_desc' => $this->security->xss_clean($this->input->post('why3_desc')),
                'why4_desc' => $this->security->xss_clean($this->input->post('why4_desc')),
                'why5_desc' => $this->security->xss_clean($this->input->post('why5_desc')),
                'why6_desc' => $this->security->xss_clean($this->input->post('why6_desc')),

                'cta_title' => $this->security->xss_clean($this->input->post('cta_title')),

                'ordering1_desc' => $this->security->xss_clean($this->input->post('ordering1_desc')),
                'ordering2_desc' => $this->security->xss_clean($this->input->post('ordering2_desc')),
                'ordering3_desc' => $this->security->xss_clean($this->input->post('ordering3_desc')),
                'ordering4_desc' => $this->security->xss_clean($this->input->post('ordering4_desc')),
                'ordering5_desc' => $this->security->xss_clean($this->input->post('ordering5_desc')),

                'product_title' => $this->security->xss_clean($this->input->post('product_title')),
                'product_desc' => $this->security->xss_clean($this->input->post('product_desc')),
                'produc1_txt' => $this->security->xss_clean($this->input->post('produc1_txt')),
                'produc2_txt' => $this->security->xss_clean($this->input->post('produc2_txt')),
                'produc3_txt' => $this->security->xss_clean($this->input->post('produc3_txt')),
                'produc4_txt' => $this->security->xss_clean($this->input->post('produc4_txt')),
                'produc5_txt' => $this->security->xss_clean($this->input->post('produc5_txt')),
                'produc6_txt' => $this->security->xss_clean($this->input->post('produc6_txt')),
                'produc7_txt' => $this->security->xss_clean($this->input->post('produc7_txt')),
                'produc8_txt' => $this->security->xss_clean($this->input->post('produc8_txt')),
                'produc9_txt' => $this->security->xss_clean($this->input->post('produc9_txt')),
                'produc10_txt' => $this->security->xss_clean($this->input->post('produc10_txt')),
                'produc11_txt' => $this->security->xss_clean($this->input->post('produc11_txt')),
                'produc12_txt' => $this->security->xss_clean($this->input->post('produc12_txt')),
                'produc13_txt' => $this->security->xss_clean($this->input->post('produc13_txt')),
                'produc14_txt' => $this->security->xss_clean($this->input->post('produc14_txt')),
                'produc15_txt' => $this->security->xss_clean($this->input->post('produc15_txt')),

                'collection_title' => $this->security->xss_clean($this->input->post('collection_title')),
                'collection_desc' => $this->security->xss_clean($this->input->post('collection_desc')),
                'collection_url' => $this->security->xss_clean($this->input->post('collection_url')),

                'testimony_title' => $this->security->xss_clean($this->input->post('testimony_title')),

                'client_title' => $this->security->xss_clean($this->input->post('client_title')),

                'whyserbaantik_title' => $this->security->xss_clean($this->input->post('whyserbaantik_title')),
                'whyserbaantik1' => $this->security->xss_clean($this->input->post('whyserbaantik1')),
                'whyserbaantik2' => $this->security->xss_clean($this->input->post('whyserbaantik2')),
                'whyserbaantik3' => $this->security->xss_clean($this->input->post('whyserbaantik3')),
                'whyserbaantik4' => $this->security->xss_clean($this->input->post('whyserbaantik4')),
                'whyserbaantik5' => $this->security->xss_clean($this->input->post('whyserbaantik5')),
                'whyserbaantik6' => $this->security->xss_clean($this->input->post('whyserbaantik6')),
                'whyserbaantik7' => $this->security->xss_clean($this->input->post('whyserbaantik7')),
                'whyserbaantik8' => $this->security->xss_clean($this->input->post('whyserbaantik8')),
                'whyserbaantik9' => $this->security->xss_clean($this->input->post('whyserbaantik9')),
                'whyserbaantik10' => $this->security->xss_clean($this->input->post('whyserbaantik10')),

                'pricing_title' => $this->security->xss_clean($this->input->post('pricing_title')),
                'pricing_table' => $this->security->xss_clean($this->input->post('pricing_table')),
                'showroom_url' => $this->security->xss_clean($this->input->post('showroom_url')),

                'question1' => $this->security->xss_clean($this->input->post('question1')),
                'question2' => $this->security->xss_clean($this->input->post('question2')),
                'question3' => $this->security->xss_clean($this->input->post('question3')),
                'question4' => $this->security->xss_clean($this->input->post('question4')),
                'question5' => $this->security->xss_clean($this->input->post('question5')),
                'question6' => $this->security->xss_clean($this->input->post('question6')),
                'question7' => $this->security->xss_clean($this->input->post('question7')),
                'question8' => $this->security->xss_clean($this->input->post('question8')),
                'question9' => $this->security->xss_clean($this->input->post('question9')),
                'question10' => $this->security->xss_clean($this->input->post('question10')),

                'answer1' => $this->security->xss_clean($this->input->post('answer1')),
                'answer2' => $this->security->xss_clean($this->input->post('answer2')),
                'answer3' => $this->security->xss_clean($this->input->post('answer3')),
                'answer4' => $this->security->xss_clean($this->input->post('answer4')),
                'answer5' => $this->security->xss_clean($this->input->post('answer5')),
                'answer6' => $this->security->xss_clean($this->input->post('answer6')),
                'answer7' => $this->security->xss_clean($this->input->post('answer7')),
                'answer8' => $this->security->xss_clean($this->input->post('answer8')),
                'answer9' => $this->security->xss_clean($this->input->post('answer9')),
                'answer10' => $this->security->xss_clean($this->input->post('answer10')),
            );

            $this->sofa_data = $data;

            $this->upload_image($_FILES['top_bg_img'], 'top_bg_img', 'sofa'); 

            $this->upload_image($_FILES['top_bg_img_mobile'], 'top_bg_img_mobile', 'sofa'); 

            $this->upload_image($_FILES['why1_icon'], 'why1_icon', 'sofa'); 
            $this->upload_image($_FILES['why2_icon'], 'why2_icon', 'sofa'); 
            $this->upload_image($_FILES['why3_icon'], 'why3_icon', 'sofa'); 
            $this->upload_image($_FILES['why4_icon'], 'why4_icon', 'sofa'); 
            $this->upload_image($_FILES['why5_icon'], 'why5_icon', 'sofa'); 
            $this->upload_image($_FILES['why6_icon'], 'why6_icon', 'sofa'); 

            $this->upload_image($_FILES['cta_bg_img'], 'cta_bg_img', 'sofa'); 

            $this->upload_image($_FILES['ordering1_img'], 'ordering1_img', 'sofa');
            $this->upload_image($_FILES['ordering2_img'], 'ordering2_img', 'sofa');
            $this->upload_image($_FILES['ordering3_img'], 'ordering3_img', 'sofa');
            $this->upload_image($_FILES['ordering4_img'], 'ordering4_img', 'sofa');
            $this->upload_image($_FILES['ordering5_img'], 'ordering5_img', 'sofa');

            $this->upload_image($_FILES['produc1_img'], 'produc1_img', 'sofa');
            $this->upload_image($_FILES['produc2_img'], 'produc2_img', 'sofa');
            $this->upload_image($_FILES['produc3_img'], 'produc3_img', 'sofa');
            $this->upload_image($_FILES['produc4_img'], 'produc4_img', 'sofa');
            $this->upload_image($_FILES['produc5_img'], 'produc5_img', 'sofa');
            $this->upload_image($_FILES['produc6_img'], 'produc6_img', 'sofa');
            $this->upload_image($_FILES['produc7_img'], 'produc7_img', 'sofa');
            $this->upload_image($_FILES['produc8_img'], 'produc8_img', 'sofa');
            $this->upload_image($_FILES['produc9_img'], 'produc9_img', 'sofa');
            $this->upload_image($_FILES['produc10_img'], 'produc10_img', 'sofa');
            $this->upload_image($_FILES['produc11_img'], 'produc11_img', 'sofa');
            $this->upload_image($_FILES['produc12_img'], 'produc12_img', 'sofa');
            $this->upload_image($_FILES['produc13_img'], 'produc13_img', 'sofa');
            $this->upload_image($_FILES['produc14_img'], 'produc14_img', 'sofa');
            $this->upload_image($_FILES['produc15_img'], 'produc15_img', 'sofa');

            $this->upload_image($_FILES['collection1_img'], 'collection1_img', 'sofa');
            $this->upload_image($_FILES['collection2_img'], 'collection2_img', 'sofa');
            $this->upload_image($_FILES['collection3_img'], 'collection3_img', 'sofa');

            $this->upload_image($_FILES['testimony_bg_img'], 'testimony_bg_img', 'sofa');

            $this->upload_image($_FILES['testimony1_img'], 'testimony1_img', 'sofa');
            $this->upload_image($_FILES['testimony2_img'], 'testimony2_img', 'sofa');
            $this->upload_image($_FILES['testimony3_img'], 'testimony3_img', 'sofa');
            $this->upload_image($_FILES['testimony4_img'], 'testimony4_img', 'sofa');
            $this->upload_image($_FILES['testimony5_img'], 'testimony5_img', 'sofa');
            $this->upload_image($_FILES['testimony6_img'], 'testimony6_img', 'sofa');
            $this->upload_image($_FILES['testimony7_img'], 'testimony7_img', 'sofa');
            $this->upload_image($_FILES['testimony8_img'], 'testimony8_img', 'sofa');
            $this->upload_image($_FILES['testimony9_img'], 'testimony9_img', 'sofa');
            $this->upload_image($_FILES['testimony10_img'], 'testimony10_img', 'sofa');
            $this->upload_image($_FILES['testimony11_img'], 'testimony11_img', 'sofa');
            $this->upload_image($_FILES['testimony12_img'], 'testimony12_img', 'sofa');
            $this->upload_image($_FILES['testimony13_img'], 'testimony13_img', 'sofa');
            $this->upload_image($_FILES['testimony14_img'], 'testimony14_img', 'sofa');
            $this->upload_image($_FILES['testimony15_img'], 'testimony15_img', 'sofa');
            $this->upload_image($_FILES['testimony16_img'], 'testimony16_img', 'sofa');
            $this->upload_image($_FILES['testimony17_img'], 'testimony17_img', 'sofa');
            $this->upload_image($_FILES['testimony18_img'], 'testimony18_img', 'sofa');
            $this->upload_image($_FILES['testimony19_img'], 'testimony19_img', 'sofa');
            $this->upload_image($_FILES['testimony20_img'], 'testimony20_img', 'sofa');
            $this->upload_image($_FILES['testimony21_img'], 'testimony21_img', 'sofa');
            $this->upload_image($_FILES['testimony22_img'], 'testimony22_img', 'sofa');
            $this->upload_image($_FILES['testimony23_img'], 'testimony23_img', 'sofa');
            $this->upload_image($_FILES['testimony24_img'], 'testimony24_img', 'sofa');
            $this->upload_image($_FILES['testimony25_img'], 'testimony25_img', 'sofa');
            $this->upload_image($_FILES['testimony26_img'], 'testimony26_img', 'sofa');
            $this->upload_image($_FILES['testimony27_img'], 'testimony27_img', 'sofa');
            $this->upload_image($_FILES['testimony28_img'], 'testimony28_img', 'sofa');
            $this->upload_image($_FILES['testimony29_img'], 'testimony29_img', 'sofa');
            $this->upload_image($_FILES['testimony30_img'], 'testimony30_img', 'sofa');

            $this->upload_image($_FILES['client1_img'], 'client1_img', 'sofa');
            $this->upload_image($_FILES['client2_img'], 'client2_img', 'sofa');
            $this->upload_image($_FILES['client3_img'], 'client3_img', 'sofa');
            $this->upload_image($_FILES['client4_img'], 'client4_img', 'sofa');
            $this->upload_image($_FILES['client5_img'], 'client5_img', 'sofa');
            $this->upload_image($_FILES['client6_img'], 'client6_img', 'sofa');
            $this->upload_image($_FILES['client7_img'], 'client7_img', 'sofa');
            $this->upload_image($_FILES['client8_img'], 'client8_img', 'sofa');
            $this->upload_image($_FILES['client9_img'], 'client9_img', 'sofa');
            $this->upload_image($_FILES['client10_img'], 'client10_img', 'sofa');

            $this->upload_image($_FILES['whyserbaantik_img'], 'whyserbaantik_img', 'sofa');

            $this->upload_image($_FILES['faq_img'], 'faq_img', 'sofa');

           $this->db->where('id', 1);
           $this->db->update('sofa_landingpage_content', $this->sofa_data); 

          $this->session->set_flashdata('success', '<br><p style="background:green; color:white; padding:5px; font-weight:bold;">sofa Content Edit Successful</p>');
          
          redirect('admin/landingpage/sofa_edit_content');		
      } 
      
      $this->data['subview'] = 'admin/landingpage/sofa_edit_content';
      $this->load->view('admin/templates/header', $this->data_header); 
      $this->load->view('admin/_layout_main', $this->data);
      $this->load->view('admin/templates/footer');	
	}

    //image upload processing
    private function upload_image($image_file, $field_name, $type)  
    {
        if ($image_file['size'] !== 0) 
        {  
            $config = array();
            $config['upload_path'] = './uploads/page/';
            $config['allowed_types'] = 'jpg|png|jpeg|gif|webp';  
            $config['max_size']	= '800';

            $this->load->library('upload', $config); 
            $this->upload->initialize($config); 

            if (!$this->upload->do_upload($field_name)) 
            {
                $this->session->set_flashdata('error', '<br>
                <p style="background:red; color:white; padding:5px; font-weight:bold;">Image Upload Error. Wrong format or size.</p>');
                echo $this->upload->display_errors(); exit();
            } 
            else 
            {
                $image = $this->upload->data();
                $image_filename = $image['file_name']; 

                if($type == 'gorden')
                {
                    $this->gorden_data[$field_name] = $image_filename;
                }
                elseif($type =='sofa')
                {
                    $this->sofa_data[$field_name] = $image_filename;
                }  
            }
        } 
    }
	 
	public function delete_image_gorden($image_name = NULL) 
    {

		if($image_name == NULL) { show_404(); }

		$data = array(
            $image_name => ''
        );
        $this->db->where('id', 1);
        $this->db->update('gorden_landingpage_content', $data);

		$this->session->set_flashdata('success', '<br><p style="background:green; color:white; padding:5px; font-weight:bold;">Delete Successful</p>');
		
		redirect('admin/landingpage/gorden_edit_content'); 
	}

    public function delete_image_sofa($image_name = NULL) 
    {

		if($image_name == NULL) { show_404(); }

		$data = array(
            $image_name => ''
        );
        $this->db->where('id', 1);
        $this->db->update('sofa_landingpage_content', $data);

		$this->session->set_flashdata('success', '<br><p style="background:green; color:white; padding:5px; font-weight:bold;">Delete Successful</p>');
		
		redirect('admin/landingpage/sofa_edit_content'); 
	}
}

https://t.me/RX1948 - 2025