403Webshell
Server IP : 68.178.202.69  /  Your IP : 216.73.216.122
Web Server : Apache
System : Linux 69.202.178.68.host.secureserver.net 3.10.0-1160.139.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Nov 3 13:30:41 UTC 2025 x86_64
User : ikioworld ( 1005)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/ikioworld/www/application/controllers/photometric/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/ikioworld/www/application/controllers/photometric/Photometric.php
<?php
defined('BASEPATH') or exit('No direct script access allowed');
require_once(APPPATH."third_party/PHPMailer/PHPMailerAutoload.php");
ini_set('display_errors', 0);
class Photometric extends CI_Controller
{
/*public function index(){
        $this->load->helper(array('form', 'url', 'common'));
        $this->load->library(array('session','pagination','email')); 

        $this->load->model('photometricmodel', '', true);

        $this->load->model('homemodel', '', true);
        
        $this->load->model('Mailmodel', '', true);

        $sql=$this->db->query("SELECT * from page where page_name='Photometric Requests'");
        $result = $sql->result();
        
        $title = $result[0]->page_title;
        $meta_title = $result[0]->meta_title;
        $meta_d =$result[0]->meta_description;
        $image = $result[0]->page_image;
        
        
        $data['title'] = $title ." || IKIO LED LIGHTING";
        $data['meta_title'] = $meta_title ."  || IKIO LED LIGHTING";
        $data['meta_description'] = $meta_d ."  || IKIO LED LIGHTING";
        $data['image'] = $image;
        
        
        $data['category'] = $this->homemodel->getCategory();
        $data['subcategorys'] =$this->homemodel->getSubCategory();

          if(!empty($this->input->post())){
          
            $req = $_POST['requirement']; 
            $requirement = implode(',',$req);
            $requirements = strval($requirement);         

            $itm = $_POST['itemforjob']; 
            $item = implode(',',$itm);
            $items = strval($item);
         
            
            $insert_id = $this->photometricmodel->addPhotometric($this->input->post()); 
            
            $product_image_array=isset($_FILES['document']) && !empty($_FILES['document'])?$_FILES['document']:[];

            $fileNameArray=isset($product_image_array['name'])?$product_image_array['name']:[];
            
            $fileNameArraySpace =str_replace(" ", "_", $product_image_array['name']);
            $filesnameSpace = str_replace("'","_", $fileNameArraySpace);
         
            if(!empty($fileNameArray)){
             
              for($i=0;$i<count($fileNameArray);$i++){
                         
               $filename = str_replace(" ", "_", $product_image_array['name'][$i]);
               
               $file_tmp_name = str_replace(" ", "_", $product_image_array['tmp_name'][$i]);
                   
               move_uploaded_file($file_tmp_name,FCPATH."uploads/photometric/".$filename);
              }
              $fileitem = implode(',',$filesnameSpace);
           
              $fileitems = strval($fileitem);
            
              $sql=$this->db->query("UPDATE photometric set requirement='$requirements',itemforjob='$items',document= '$fileitems' where id='$insert_id'");
          
           }
          
          
           $email = $this->input->post('email');
           $name = $this->input->post('fullname');
		   
		     if($email!=''){
		    
          $sender_mail ='noreply@ikioledlighting.com';

          $data['fullname'] = $this->input->post('fullname');
        
          $message = "<html>
        
        <head>
            <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
    
        </head>
        
        <body style='background-color:#f6f6f6;  box-sizing: border-box; font-family: 'Poppins', sans-serif;'>
        
        <div style='margin:0px auto;background: #f3f3f3;padding: 10px;'>
        
        <div style='border: 1px solid #ccc;background-color:#fff;clear:both;color:#666;line-height:32px;max-width:500px;margin:50px auto;border-radius:5px 5px 5px 5px'>
        
        <div style='color:#fff;text-align:center;padding:0px 0px 10px 0px;background-repeat:no-repeat;background-position:center;background-size:183px;background-color:#000000;width:100%;height:auto;border-radius:5px 5px 0px 0px'>
        
        <img src='".base_url()."/assets/img/logo.png' style=' display: block; margin: 0 auto;width: 140px; padding-top: 15px;'>
         
           
        </div>
        
        <div style='margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:0;padding-bottom:0px;padding-left:0;font-size:15px'>
        <img src='".base_url()."/assets/img/message.png' style=' display: block; margin: 0 auto;width: 100px; padding-top: 15px;'>
        <table cellpadding='0' cellspacing='0' style='width: 100%;margin: 8px 1px;font-size: 12px;font-size:12px'>
        <tbody>
        
        <tr>
        <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;'>

            <p style='font-weight:bold;text-align: center;font-size: 14px;margin-bottom: 0;color: #fff;text-transform: capitalize; display:block; width:100% '></p>
            <p style='font-weight:400;text-align: center;font-size: 14px;margin-bottom: 0; display:block; width:100%'><b>Thank You".$data['fullname']." for Photometric Request !
We at IKIO, value your consideration and interest. If required, someone from our team will get in touch with you within 2 to 3 working days. In the meantime, please continue exploring our website.</b>
       
        </td>
         </tr>
      
        
       
        </tbody>
        </table>
        <p style='padding: 10px 30px;font-weight: bold;text-align: center;font-size: 14px;margin-bottom: 0;background-repeat:no-repeat;background-position:center;background-color:#000000;background: #000000;color: #fff;'> © 2022  IKIO LED LIGHTING. All Rights Reserved.</p>
        </div>
        </div>
        </div>
        </div>
        </body>
        </html>";
            
            $this->Mailmodel->sendMail( "IKIO Photometric Form", $email, $data['fullname'], $message );
    }
            $data['requirement'] = $requirements;
            $data['email'] = $this->input->post('email');
            $data['fullname'] =$this->input->post('fullname');	
            $data['content'] = $this->input->post('message');
            $data['phone_number'] = $this->input->post('phonenumber');
            $data['address'] =$this->input->post('address');
            $data['preferred_contact'] = $this->input->post('preferred_contact');
            $data['user_role'] =$this->input->post('user_role');
            $data['project_name'] = $this->input->post('project_name');
            $data['project_state'] =$this->input->post('project_state');
            $data['project_city'] =$this->input->post('project_city');
            $data['project_country'] =$this->input->post('project_country');
            $data['zip_code'] = $this->input->post('zip_code');
            $data['project_type'] =$this->input->post('project_type');
            $data['area_dimension'] = $this->input->post('area_dimension');
            $data['ceiling_height'] =$this->input->post('ceiling_height');
            $data['foot_candles'] =$this->input->post('foot_candles');
            $data['ikio_representative'] = $this->input->post('ikio_representative');
            $data['types_activity'] =$this->input->post('types_activity');
            $data['items'] =$items;
            $data['content'] =$this->input->post('message');
            $data['product_image_array']=$product_image_array;
            $data['fileNameArray'] = $fileNameArray;
            
          
            
                     
          $sender_mail ='noreply@ikioledlighting.com';
      
          
            
            $message = "
            <html>
                <head>
                <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
                </head>
                
                    <body style='background-color:#f6f6f6;  box-sizing: border-box; font-family: 'Poppins', sans-serif;'>
                
                <div style='margin:0px auto;background: #f3f3f3;padding: 10px;'>
                
                <div style='border: 1px solid #ccc;background-color:#fff;clear:both;color:#666;line-height:32px;max-width:500px;margin:50px auto;border-radius:5px 5px 5px 5px'>
                
                <div style='color:#fff;text-align:center;padding:0px 0px 10px 0px;background-repeat:no-repeat;background-position:center;background-size:183px;background-color:#1DACAC;width:100%;height:auto;border-radius:5px 5px 0px 0px'>
                
                <img src='".base_url()."assets/img/logo.png' style=' display: block; margin: 0 auto;width: 140px; padding-top: 15px;'>
                 
                   <p style='font-weight:bold;text-align: center;font-size: 14px;margin-bottom: 0;color: #fff;text-transform: capitalize; isplay:block; width:100% '><b>Thank You ".$data['fullname']."for writing in to us!</b></p>
                  <p style='font-weight:400;text-align: center;font-size: 14px;margin-bottom: 0; display:block; width:100%'>We at IKIO, value your consideration and interest.If necessary,someone from our team will get in touch with you within 2 to 3 working days.</p>
                   <p style='font-weight:400;text-align: center;font-size: 14px;margin-bottom: 0;color: #fff;width:90% margin:0 auto;'>In the meantime, please continue exploring our website.</p>
                
                </div>
                    
                <div style='margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:0;padding-bottom:0px;padding-left:0;font-size:15px'>
                <img src='".base_url()."/assets/img/message.png' style=' display: block; margin: 0 auto;width: 100px; padding-top: 15px;'>
                <table cellpadding='0' cellspacing='0' style='width: 100%;margin: 8px 1px;font-size: 12px;font-size:12px'>
                <tbody>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Requirements</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left; '> ".$data['requirement']."  </td>       
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Name</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['fullname']."</td>
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Email</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['email']."</td>
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Phone</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['phone_number']."</td>
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Preferred Contact</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['preferred_contact']."</td>
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>User Role</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['user_role']."</td>
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Project Name</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['project_name']."</td>
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Address</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['address']."</td>
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Project Country</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['project_country']."</td>
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Project State</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['project_state']."</td>
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Project City</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['project_city']."</td>
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Zip Code</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['zip_code']."</td>
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Project Type</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['project_type']."</td>
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Area Dimension</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['area_dimension']."</td>
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Ceiling Height</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['ceiling_height']."</td>
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Foot Candles</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['foot_candles']."</td>
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Ikio Representative</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['ikio_representative']."</td>
                </tr>
                
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Types Activity</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['types_activity']."</td>
                </tr>
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Job Items</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['items']."</td>
                </tr>
                
                
                
                
                
                <tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Message</td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['content']."</td>
                </tr>";
                
                
                $product_image_array=isset($_FILES['document']) && !empty($_FILES['document'])?$_FILES['document']:[];
                $fileNameArray=isset($product_image_array['name'])?$product_image_array['name']:[];
                
                for($i=0;$i<=count($fileNameArray)-1;$i++){
                    $filename = str_replace(' ', '_', $product_image_array['name'][$i]);
                    
                if($filename!=''){  

                
                $message.="<tr>
                <td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Document <?php echo $i + 1;?></td>
                <td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'> <a download='".$filename."' href='".base_url()."uploads/photometric/".$filename."'> Download Files </a> </td>
                                                                                                                        
                </tr>";
                }
                else{
                
                $message.="<tr>
                                                                                                                        
                </tr>";
                
                }
                } 
                
                $message.="</tbody>
                </table>
                <p style='padding: 10px 30px;font-weight:bold;text-align: center;font-size: 14px;margin-bottom: 0;background-repeat:no-repeat;background-position:center;background-color:#1DACAC;background: #1DACAC;color: #fff;text-transform: capitalize;'> © 2022 IKIO || All right reserved</p>
                </div>
                </div>
                </div>
                </div>
                </body>
                </html>";
            
            
            $this->Mailmodel->sendMultipleMail( "IKIO Photometric Form", "photometrics@ikioledlighting.com", "Ikio Led Lighting", "jayk@ikioledlighting.com", "Ikio Led Lighting", $message );
            
            $this->session->set_flashdata('message',"<h1 class='career_message'>Thank You for submitting your request. We will contact you within 24 working hours.</h1> <span class='crossbars_wrong'></span>");
    

          }
       
        $this->load->view('inc/header',$data);   
        $this->load->view('photometric/index', $data);
        $this->load->view('inc/footer',$data);
    }*/
    
    
    public function lightingLayoutRequest(){
        $this->load->helper(array('form', 'url', 'common'));
        $this->load->library(array('session','pagination','email')); 

        $this->load->model('photometricmodel', '', true);

        $this->load->model('homemodel', '', true);
        
        $this->load->model('Mailmodel', '', true);

        $sql=$this->db->query("SELECT * from page where page_name='Photometric Requests'");
        $result = $sql->result();
        
        $title = $result[0]->page_title;
        $meta_title = $result[0]->meta_title;
        $meta_d =$result[0]->meta_description;
        $image = $result[0]->page_image;
        
        
        $data['title'] = $title ." || IKIO LED LIGHTING";
        $data['meta_title'] = $meta_title ."  || IKIO LED LIGHTING";
        $data['meta_description'] = $meta_d ."  || IKIO LED LIGHTING";
        $data['image'] = $image;
        
        
        $data['category'] = $this->homemodel->getCategory();
        $data['subcategorys'] =$this->homemodel->getSubCategory();

          if(!empty($this->input->post())){
          
            $data_photometric['first_name'] = $this->input->post('first_name');
            $data_photometric['last_name'] = $this->input->post('last_name');
            $data_photometric['company_name'] = $this->input->post('company_name');
            $data_photometric['email'] = $this->input->post('photometric_email');
            $data_photometric['phonenumber'] = $this->input->post('phonenumber');
            $data_photometric['preferred_contact'] = $this->input->post('preferred_contact');
            $data_photometric['user_role'] = $this->input->post('user_role');
            $data_photometric['other_user_role'] = $this->input->post('other_user_role');
            $data_photometric['ikio_representative'] = $this->input->post('ikio_representative');
            $data_photometric['ikio_representative_email'] = $this->input->post('ikio_representative_email');
            
            $data_photometric['project_name'] = $this->input->post('project_name');
            $data_photometric['project_id'] = $this->input->post('project_id');
            $data_photometric['p_id'] = $this->input->post('p_id');
            $data_photometric['address'] = $this->input->post('address');
            $data_photometric['project_country'] = $this->input->post('project_country');
            $data_photometric['project_state'] = $this->input->post('project_state');
            $data_photometric['project_city'] = $this->input->post('project_city');
            $data_photometric['zip_code'] = $this->input->post('zip_code');
            $data_photometric['new_site'] = $this->input->post('new_site');
            $data_photometric['indoor_space'] = $this->input->post('indoor_space');
            
            $data_photometric['exist_site'] = $this->input->post('exist_site');
            $data_photometric['space_type'] = $this->input->post('space_type');
            $data_photometric['fixtures'] = $this->input->post('fixtures');
            $data_photometric['ceiling_type'] = $this->input->post('ceiling_type');
            $data_photometric['fixtures_height'] = $this->input->post('fixtures_height');
            $data_photometric['indoor_comment'] = $this->input->post('indoor_comment');
            $data_photometric['outdoor_space'] = $this->input->post('outdoor_space');
            $data_photometric['outdoor_poles'] = $this->input->post('outdoor_poles');
            $data_photometric['outdoor_pole_height'] = $this->input->post('outdoor_pole_height');
            $data_photometric['outdoor_fixtures_per_poles'] = $this->input->post('outdoor_fixtures_per_poles');
            $data_photometric['outdoor_comment'] = $this->input->post('outdoor_comment');
            $data_photometric['indoor_footcandle'] = $this->input->post('indoor_footcandle');
            $data_photometric['outdoor_footcandle'] = $this->input->post('outdoor_footcandle');
            $data_photometric['message'] = $this->input->post('message');
            $data_photometric['indoor_space_other'] = $this->input->post('indoor_space_other');
            
            $data_photometric['fixtures_other'] = $this->input->post('fixtures_other');
            
            
            $data_photometric['sloped_type_length'] = $this->input->post('sloped_type_length');
            $data_photometric['sloped_type_width'] = $this->input->post('sloped_type_width');
            $data_photometric['sloped_type_peak_height'] = $this->input->post('sloped_type_peak_height');
            $data_photometric['plain_type_length'] = $this->input->post('plain_type_length');
            $data_photometric['plain_type_width'] = $this->input->post('plain_type_width');
            $data_photometric['plain_type_ceiling_height'] = $this->input->post('plain_type_ceiling_height');
            
            $data_photometric['outdoor_space_other'] = $this->input->post('outdoor_space_other');
            $data_photometric['outdoor_cross_per_poles'] = $this->input->post('outdoor_cross_per_poles');
            
            $data_photometric['document_type'] = $this->input->post('document_type');
            
            $data_photometric['fixture_series'] = $this->input->post('fixture_series');
            
            $insert_id = $this->photometricmodel->addPhotometric($data_photometric); 
            
            
			

			 //   print_r($fileitem);
			 //   $sql=$this->db->query("UPDATE photometric set document= '$file_1' where id='$insert_id'");

        
		   
            
            $data_photometric['first_name'] = $this->input->post('first_name');
            $data_photometric['last_name'] = $this->input->post('last_name');
            $data_photometric['company_name'] = $this->input->post('company_name');
            $data_photometric['email'] = $this->input->post('photometric_email');
            $data_photometric['phonenumber'] = $this->input->post('phonenumber');
            $data_photometric['preferred_contact'] = $this->input->post('preferred_contact');
            $data_photometric['user_role'] = $this->input->post('user_role');
            $data_photometric['other_user_role'] = $this->input->post('other_user_role');
            $data_photometric['ikio_representative'] = $this->input->post('ikio_representative');
            $data_photometric['ikio_representative_email'] = $this->input->post('ikio_representative_email');
            
            $data_photometric['project_name'] = $this->input->post('project_name');
            $data_photometric['project_id'] = $this->input->post('project_id');
            $data_photometric['address'] = $this->input->post('address');
            $data_photometric['project_country'] = $this->input->post('project_country');
            $data_photometric['project_state'] = $this->input->post('project_state');
            $data_photometric['project_city'] = $this->input->post('project_city');
            $data_photometric['zip_code'] = $this->input->post('zip_code');
            $data_photometric['fixture_series'] = $this->input->post('fixture_series');
            $data_photometric['new_site'] = $this->input->post('new_site');
            $data_photometric['indoor_space'] = $this->input->post('indoor_space');
            
            $data_photometric['exist_site'] = $this->input->post('exist_site');
            $data_photometric['space_type'] = $this->input->post('space_type');
            $data_photometric['fixtures'] = $this->input->post('fixtures');
            $data_photometric['ceiling_type'] = $this->input->post('ceiling_type');
            $data_photometric['fixtures_height'] = $this->input->post('fixtures_height');
            $data_photometric['indoor_comment'] = $this->input->post('indoor_comment');
            $data_photometric['outdoor_space'] = $this->input->post('outdoor_space');
            $data_photometric['outdoor_poles'] = $this->input->post('outdoor_poles');
            $data_photometric['outdoor_pole_height'] = $this->input->post('outdoor_pole_height');
            $data_photometric['outdoor_fixtures_per_poles'] = $this->input->post('outdoor_fixtures_per_poles');
            $data_photometric['outdoor_cross_per_poles'] = $this->input->post('outdoor_cross_per_poles');
            $data_photometric['outdoor_comment'] = $this->input->post('outdoor_comment');
            $data_photometric['indoor_footcandle'] = $this->input->post('indoor_footcandle');
            $data_photometric['outdoor_footcandle'] = $this->input->post('outdoor_footcandle');
            $data_photometric['message'] = $this->input->post('message');
            $data_photometric['indoor_space_other'] = $this->input->post('indoor_space_other');
            
            $data_photometric['fixtures_other'] = $this->input->post('fixtures_other');
            
            
            $data_photometric['sloped_type_length'] = $this->input->post('sloped_type_length');
            $data_photometric['sloped_type_width'] = $this->input->post('sloped_type_width');
            $data_photometric['sloped_type_peak_height'] = $this->input->post('sloped_type_peak_height');
            $data_photometric['plain_type_length'] = $this->input->post('plain_type_length');
            $data_photometric['plain_type_width'] = $this->input->post('plain_type_width');
            $data_photometric['plain_type_ceiling_height'] = $this->input->post('plain_type_ceiling_height');
            
            $data_photometric['outdoor_space_other'] = $this->input->post('outdoor_space_other');
        
            
            $data_photometric['document_type'] = str_replace(",", " / ", $this->input->post('document_type'));
            
            
            
            $message = "
                <html><head><link href='https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300|Roboto' rel='stylesheet'>
                <style>
                .emailer_holder{width:100%;max-width:750px;margin:auto;padding:0;background:#ffff;font-family:'Roboto',sans-serif;box-sizing:border-box;border-top:1px solid #eee;border-left:1px solid #eee;border-right:1px solid #eee}.emailer_holder>h1{font-size:35px;margin:0;padding:25px 0;color:#333;text-align:left}.emailer_holder h1 span{font-weight:700;color:#00a1d8}.emailer_holder .header{background:#000;width:100%;margin:0;padding:0 0 0 15px;text-align:center;box-sizing:border-box;border-bottom:3px solid #d74d4d}.emailer_holder .header a>img{width:250px}.emailer_holder .header h2{font-size:35px;color:#fff;margin:0;padding:5px 0;text-align:center}.emailer_holder .header p{border-top:3px solid #00a1d8;font-size:13px;margin:0}.Document thead{background:#eee;font-weight:700}.Document thead th{font-size:11px;padding:5px 0}.Document tbody td{font-size:11px;border:hidden;padding-right:10px;}.Document{width:100%;margin:0;padding:0 25px;float:left;box-sizing:border-box}.Document ul{margin:0;padding:15px 0 15px 25px;list-style:none}.Document ul li{margin:0;padding:0;display:block}.Document>ul>li>a{margin:0;padding:5px 0;display:inline-block;font-size:15px;color:#0a21c8;text-decoration:none;font-weight:700}.Document ul li img{max-width:20px;padding-right:5px}.Document h3{font-size:13px;margin:0;padding-top:20px;float:left}.sign{padding:0 25px;margin:0}.sign a>img{width:200px}.sign>p{font-size:13px;margin:0;padding:0;display:inline-block}.clearfix{clear:both}.Document p{margin:0;padding:5px 0;display:inline-block;font-size:13px}.Document p>a{text-decoration:none;color:#666}.Document p>strong>a{text-decoration:none;color:#0a21c8}.Document h6{font-size:16px;color:#333;margin:0;padding:8px 0 0}.Document h1{float:left;margin:0;padding:0;color:#e66c00}.Document h1 span{font-size:12px;color:#e66c00}.Document em{font-size:12px}.footer-top{width:100%;margin:0;padding:0 25px;box-sizing:border-box}.footer-top p{font-size:12px;text-align:center;border-bottom:2px solid #000;padding:10px 0}.footer-bottom{width:100%;margin:0;padding:0 25px;box-sizing:border-box;background:#000;}.footer-bottom p{font-size:9px;padding:15px 0 25px;text-align:center;color:#fff;line-height:1.8}.bold{font-weight:600;font-size:11px!important}@media only screen and (max-width: 480px) {.bold{font-size:10px !important;}}
                </style></head>
                <body > 
                <div style='background:#e7e7e7;width: 750px;'>
                <div class='emailer_holder'>
                <div class='header'>
                <a href='".base_url()."'><img src='".base_url()."/assets/img/logo.png'></a>
                </div>
                <p>&nbsp;</p>
                
                <p style='font-weight:bold;text-align: center;font-size: 14px;margin-bottom: 0;color: #22b573;text-transform: capitalize; display:block; width:100%;'>Thank You ".$data_photometric['first_name']." ".$data_photometric['last_name']." for Lighting Layout Request !</p>
                <br>
            <p style='font-weight:400;text-align: center;font-size: 14px;margin-bottom: 0; display:block; width:100%;'><strong>Your Lighting Layout Request No : ".$data_photometric['project_id']."</strong>.</p>
<p style='font-weight:400;text-align: center;font-size: 14px;margin-bottom: 0; display:block; width:100%;'>We at IKIO, value your consideration and interest. If required, someone from our team will get <br>in touch with you within 2 to 3 working days. In the meantime, please continue exploring our website.</p>
                <p>&nbsp;</p>
                <div class='Document'>

                <table cellpadding='0' cellspacing='0' width='100%'>
                <tbody>    
                <tr style='border:1px solid #eee !important;'>
                    <td colspan='3' style='text-align:center;height:50px;font-size:25px !important;color:#22b573 !important;'>Contact Information</td>            
                </tr>
                <tr>
                    <td class='bold'>First Name</td>
                    <td class='bold'>Last Name</td>
                    <td class='bold'>Company/Organization Name</td>
                </tr>
                <tr>
                    <td>".$data_photometric['first_name']."</td>
                    <td>".$data_photometric['last_name']."</td>
                    <td>".$data_photometric['company_name']."</td>
                </tr>
                <tr>
                    <td colspan='3'>&nbsp;</td>            
                </tr>
                <tr>
                    <td class='bold'>Email Address</td>
                    <td class='bold'>Contact Number</td>
                    <td class='bold'>Preferred Contact Mode</td>
                </tr>
                <tr>
                    <td>".$data_photometric['email']."</td>
                    <td>".$data_photometric['phonenumber']."</td>
                    <td>".$data_photometric['preferred_contact']."</td>
                </tr>
                <tr>
                    <td colspan='3'>&nbsp;</td>            
                </tr>
                <tr>
                    <td class='bold'>Role</td>";
                if($data_photometric['user_role']=="Other"){    
        $message.= "<td class='bold'>".$data_photometric['other_user_role']."</td>";
                }else{
        $message.= "<td class='bold'>&nbsp;</td>";            
                }
        $message.= "<td class='bold'>Your IKIO Representative Name.</td>
                </tr>
                <tr>
                    <td>".$data_photometric['user_role']."</td>";
                if($data_photometric['user_role']=="Other"){    
        $message.= "<td class='bold'>Other role</td>";
                }else{
        $message.= "<td class='bold'>&nbsp;</td>";            
                }
        $message.= "<td>".$data_photometric['ikio_representative']."</td>
                </tr>
                <tr>
                    <td colspan='3'>&nbsp;</td>            
                </tr>
                <tr>
                    <td class='bold' colspan='3'>Your IKIO Representative Email ID</td>            
                </tr>
                <tr>
                    <td colspan='3'>".$data_photometric['ikio_representative_email']."</td>            
                </tr>
        

                <tr style='border:1px solid #eee !important;'>
                    <td colspan='3' style='text-align:center;height:50px;font-size:25px !important;color:#22b573 !important;'>Project Information</td>            
                </tr>
                <tr>
                    <td class='bold'>Project Name</td>
                    <td class='bold'>Project ID</td>
                    <td class='bold'>Project Address</td>
                </tr>
                <tr>
                    <td>".$data_photometric['project_name']."</td>
                    <td>".$data_photometric['project_id']."</td>
                    <td>".$data_photometric['address']."</td>
                </tr>
                <tr>
                    <td colspan='3'>&nbsp;</td>            
                </tr>
                <tr>
                    <td class='bold'>Project Country</td>
                    <td class='bold'>Project State</td>
                    <td class='bold'>Project City</td>
                </tr>
                <tr>
                    <td>".$data_photometric['project_country']."</td>
                    <td>".$data_photometric['project_state']."</td>
                    <td>".$data_photometric['project_city']."</td>
                </tr>
                <tr>
                    <td colspan='3'>&nbsp;</td>            
                </tr>
                <tr>
                    <td class='bold'>Project ZIP Code</td>
                    <td class='bold'>Desired IKIO fixture series details</td>
                    <td class='bold'>&nbsp;</td>
                </tr>
                <tr>
                    <td>".$data_photometric['zip_code']."</td>
                    <td>".$data_photometric['fixture_series']."</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td colspan='3'>&nbsp;</td>            
                </tr>
                <tr>
                    <td class='bold'>Is This a New Site or Existing Site?</td>";
                if($data_photometric['new_site']=="Existing Site"){    
        $message.= "<td class='bold'>Is Existing Site?</td><td class='bold'>Is it an Indoor or an Outdoor space?</td>";
                }else{
        $message.= "<td class='bold' colspan='2'>Is it an Indoor or an Outdoor space?</td>";            
                }
        $message.= "
                </tr>
                <tr>
                    <td>".$data_photometric['new_site']."</td>";
                if($data_photometric['new_site']=="Existing Site"){    
        $message.= "<td>".$data_photometric['exist_site']."</td><td>".$data_photometric['indoor_space']."</td>";
                }else{
        $message.= "<td colspan='2'>".$data_photometric['indoor_space']."</td>";            
                }
        $message.= "
                </tr>";
                
        if($data_photometric['indoor_space']=="Indoor Space" || $data_photometric['indoor_space']=="Both" ){        
        $message.= "<tr style='border:1px solid #eee !important;'>
                    <td colspan='3' style='text-align:center;height:50px;font-size:25px !important;color:#22b573 !important;'>Indoor Space</td>            
                </tr>
                <tr>
                    <td class='bold'>What Type of Indoor Space</td>";
                if($data_photometric['space_type']=="Others"){    
        $message.= "<td class='bold'>Others</td><td class='bold'>How Fixtures Will be Mounted</td>";
                }else{
        $message.= "<td class='bold' colspan='2'>How Fixtures Will be Mounted</td>";            
                }
        $message.= "
                </tr>
                <tr>
                    <td>".$data_photometric['space_type']."</td>";
                if($data_photometric['space_type']=="Others"){   
        $message.= "<td>".$data_photometric['indoor_space_other']."</td><td>".$data_photometric['fixtures']."</td>";
                }else{
        $message.= "<td colspan='2'>".$data_photometric['fixtures']."</td>";            
                }
        $message.= "
                </tr>
                <tr>
                    <td colspan='3'>&nbsp;</td>            
                </tr>
                
                <tr>";
                if($data_photometric['fixtures']=="Others"){    
        $message.= "<td class='bold'>Others</td><td class='bold'>Ceiling Type</td>";
                }else{
        $message.= "<td class='bold'>Ceiling Type</td>";            
                }
        $message.= "";
        if($data_photometric['ceiling_type']=="Sloped"){
        $message.= "<td class='bold'>Length (ft)</td><td class='bold'>Width (ft)</td>";
        }else{
        $message.= "<td class='bold'>Length (ft)</td><td class='bold'>Width (ft)</td>";    
        }
        $message.= "</tr>
                <tr>";
                if($data_photometric['fixtures']=="Others"){    
        $message.= "<td>". $data_photometric['fixtures_other']."</td><td>".$data_photometric['ceiling_type']."</td>";
                }else{
        $message.= "<td>".$data_photometric['ceiling_type']."</td>";            
                }
        $message.= "";
        if($data_photometric['ceiling_type']=="Sloped"){
        $message.= "<td>".$data_photometric['sloped_type_length']."</td><td>".$data_photometric['sloped_type_width']."</td>";
        }else{
        $message.= "<td>".$data_photometric['plain_type_length']."</td><td>".$data_photometric['plain_type_width']."</td>";    
        }
        $message.= "</tr><tr>";
        
        if($data_photometric['ceiling_type']=="Sloped"){
        $message.= "<td class='bold' colspan='3'>Peak Height & Base Height (ft)</td>";
        }else{
        $message.= "<td class='bold' colspan='3'>Ceiling Height (ft)</td>";    
        }
        $message.= "</tr><tr>";
        
        if($data_photometric['ceiling_type']=="Sloped"){
        $message.= "<td colspan='3'>".$data_photometric['sloped_type_peak_height']."</td>";
        }else{
        $message.= "<td colspan='3'>".$data_photometric['plain_type_ceiling_height']."</td>";    
        }
        $message.= "</tr>";
        
        
        $message.= "
        
                
                
                <tr>
                    <td colspan='3'>&nbsp;</td>            
                </tr>
                <tr>
                    <td class='bold'>Fixture Mounting Height (ft)</td>
                    <td class='bold'>Desired Footcandle Levels</td>
                    <td class='bold'>&nbsp;</td>
                </tr>
                <tr>
                    <td>".$data_photometric['fixtures_height']."</td>
                    <td>".$data_photometric['indoor_footcandle']."</td>
                    <td>&nbsp;</td>
                </tr>";
        }        
        if($data_photometric['indoor_space']=="Outdoor Space" || $data_photometric['indoor_space']=="Both" ){               
        $message.= "<tr style='border:1px solid #eee !important;'>
                    <td colspan='3' style='text-align:center;height:50px;font-size:25px !important;color:#22b573 !important;'>Outdoor Space</td>              
                </tr>
                <tr>
                    <td class='bold'>What Type of Outdoor Space</td>";
                if($data_photometric['outdoor_space']=="Others"){  
                $message.= "<td class='bold' colspan='2'>Others</td>";
                }else{
                $message.= "<td class='bold' colspan='2'>&nbsp;</td>";    
                }
                $message.= "
                </tr>
                <tr>
                    <td>".$data_photometric['outdoor_space']."</td>";
                if($data_photometric['outdoor_space']=="Others"){  
                $message.= "<td colspan='2'>".$data_photometric['outdoor_space_other']."</td>";
                }else{
                $message.= "<td colspan='2'>&nbsp;</td>";    
                }
                $message.= "
                </tr>
                
                <tr>
                    <td colspan='3'>&nbsp;</td>            
                </tr>
                <tr>
                    <td class='bold'>No. Of Poles</td>
                    <td class='bold'>Pole Height (ft)</td>
                    <td class='bold'>Fixtures Per Pole/Arms</td>
                </tr>
                <tr>
                    <td>".$data_photometric['outdoor_poles']."</td>
                    <td>".$data_photometric['outdoor_pole_height']."</td>
                    <td>".$data_photometric['outdoor_fixtures_per_poles']."</td>
                </tr>
                
                <tr>
                    <td colspan='3'>&nbsp;</td>            
                </tr>
                <tr>
                    <td class='bold'>Cross Arms Per Pole</td>
                    <td class='bold'>Desired Footcandle Levels</td>
                    
                    <td class='bold'>&nbsp;</td>
                </tr>
                <tr>
                    <td>".$data_photometric['outdoor_cross_per_poles']."</td>
                    <td>".$data_photometric['outdoor_footcandle']."</td>
                    
                    <td>&nbsp;</td>
                </tr>";
                
        }        
        $message.= "<tr>
                    <td colspan='3'>&nbsp;</td>            
                </tr>
                <tr>
                    <td colspan='3' class='bold'>Project Description: (Use of space, desired IKIO product, or any other important information & comments.)</td>
                </tr>
                <tr>
                    <td colspan='3'>".$data_photometric['message']."</td>
                </tr>
                <tr>
                    <td colspan='3'>&nbsp;</td>            
                </tr>
                <tr style='border:1px solid #eee !important;'>
                    <td colspan='3'  style='text-align:center;height:50px;font-size:25px !important;color:#22b573 !important;'>Documents Provided</td>             
                </tr>
                <tr>
                    <td colspan='3'>".$data_photometric['document_type']."</td>
                </tr>";
                
                $image_date = date("dmYHis");
                if ($_FILES ['file_1'] ['tmp_name'] != '') {
                    $message.="<tr>
                    <td colspan='3'>&nbsp;</td>            
                </tr>";
    				foreach($_FILES ['file_1'] ['tmp_name'] as $key=>$tmp_name) {				
    					$file_name = $_FILES ['file_1'] ['name'][$key];
    					$temp_name = $_FILES ['file_1'] ['tmp_name'][$key];
    					$file_parts = pathinfo ( $file_name );
    					$new_filename = trim ( $file_parts ['filename'] ) ."-".$image_date. "." . $file_parts ['extension'];
    					$file_new_name = str_replace(" ", "_", $new_filename);
    					move_uploaded_file ( $temp_name, FCPATH."uploads/photometric/".$file_new_name );
    									
    					$filename = str_replace(" ", "_", $file_new_name);
                        $fileitem[] = $filename;
                        
                        $file_1 = implode(",",$fileitem);
                        $sql=$this->db->query("UPDATE photometric set document= '$file_1' where id='$insert_id'");
                        $url = base_url("uploads/photometric/").$filename;
                $message.="
                            <tr>
                                <td>Document:</td>
                                <td colspan='2'>".$url."</td>
                            </tr>
                            ";        
                        
    				}
    			}
                
                $message.="
                </tbody>
                </table>
                </div>
                <p>&nbsp;</p>
                <p>&nbsp;</p>
                <p>&nbsp;</p>
                <div class='footer-bottom'>
                <p>
                Copyrigth © 2023. IKIO LED LIGHTING. All Rights Reserved</p>   
                </div>
                </div>
                </div>
                </body>
                </html>";
            
            $subject = "IKIO Lighting Layout Request No: ".$data_photometric['project_id'];
            // $this->Mailmodel->sendMultipleMail( $subject, "photometrics@ikioledlighting.com", "Ikio Led Lighting", "jayk@ikioledlighting.com", "Ikio Led Lighting", $message );
            // $this->Mailmodel->sendMail( $subject, $data_photometric['ikio_representative_email'], $data_photometric['ikio_representative'], $message );
            // $this->Mailmodel->sendMail( $subject, $data_photometric['email'], $data_photometric['first_name'], $message );
            

          }
          
        $sql = $this->db->query("SELECT * from photometric order by id desc limit 0,1");
        $result = $sql->row();  
        $data['project_id'] = $result->p_id+1; //
        
        $this->load->view('inc/header',$data);   
        $this->load->view('photometric/lighting-layout-request', $data);
        $this->load->view('inc/footer',$data);
    }


}

Youez - 2016 - github.com/yon3zu
LinuXploit