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/blue-sky.co.id/public_html/application/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/blue-sky.co.id/public_html/application/controllers/Page.php
<?php defined('BASEPATH') or exit('No direct script access allowed');

class Page extends Public_Controller
{

    public function __construct()
    {
        parent::__construct();
        $this->load->library('recaptcha');
    }

    public function get($alias = NULL)
    {

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

        if ($this->session->userdata('site_lang') == 'english') {
            $this->lang->load('homepage', 'english');
        } else {
            $this->lang->load('homepage', 'indonesian');
        }

        if ($this->session->userdata('site_lang') == 'english') {

            //website session in english
            //check if page exist 
            $this->db->select('id_pages')->from('pages')->where('alias_en', $alias)->where('status', 1);
            $count = $this->db->get()->num_rows();

            if ($count > 0) {
                //page exist in english
                //get page parameters 
                $this->db->select('page_title_en as page_title, alias_en as alias, body_text_en as body_text, id_pages, meta_description')->from('pages')->where('alias_en', $alias);
                $data['page'] = $this->db->get()->row();
            } else {
                //page not exist in english, check for indonesian
                $this->db->select('id_pages')->from('pages')->where('alias', $alias)->where('status', 1);
                $count = $this->db->get()->num_rows();

                if ($count > 0) {
                    //page exist in indonesian
                    //get page parameters 
                    $this->db->select('page_title, alias, body_text, id_pages, meta_description')->from('pages')->where('alias', $alias);
                    $data['page'] = $this->db->get()->row();
                } else {
                    show_404();
                }
            }
        } else {

            //website session in indonesian
            //check if page exist 
            $this->db->select('id_pages')->from('pages')->where('alias', $alias)->where('status', 1);
            $count = $this->db->get()->num_rows();

            if ($count > 0) {
                //page exist in indonesian
                //get page parameters 
                $this->db->select('page_title, alias, body_text, id_pages, meta_description')->from('pages')->where('alias', $alias);
                $data['page'] = $this->db->get()->row();
            } else {
                //page not exist in indonesian, check for english
                $this->db->select('id_pages')->from('pages')->where('alias_en', $alias)->where('status', 1);
                $count = $this->db->get()->num_rows();

                if ($count > 0) {
                    //page exist in english
                    //get page parameters 
                    $this->db->select('page_title_en as page_title, alias_en as alias, body_text_en as body_text, id_pages, meta_description')->from('pages')->where('alias_en', $alias);
                    $data['page'] = $this->db->get()->row();
                } else {
                    show_404();
                }
            }
        }

        switch ($data['page']->id_pages) {
                // case '24':
                // 	$quer_pages_gallery = $this->db->get_where("pages_gallery",array(
                // 		"id_pages"=>$data['page']->id_pages,
                // 	)); 
                // 	$data['quer_pages_gallery'] = $quer_pages_gallery; 
                // 	break;
            case '21':
                $query_body_rooms = $this->db->select('*')
                    ->from('body_rooms')->where("type", "restaurants")->order_by('id', 'ASC')->get()->result();

                $data['body_rooms'] = $query_body_rooms;
                break;
            case '29':
                $query_body_rooms = $this->db->select('*')
                    ->from('body_rooms')->where("type", "loyalty")->order_by('id', 'ASC')->get()->result();

                $data['body_rooms'] = $query_body_rooms;
                break;
            case '30':
                if ($this->session->userdata('site_lang') == 'english') {
                    $this->lang->load('homepage', 'english');
                    $this->lang->load('contact', 'english');
                } else {
                    $this->lang->load('homepage', 'indonesian');
                    $this->lang->load('contact', 'indonesian');
                }
                break;
            case '15':
                $query_products = $this->db->select('p.*, p.img_thumb as pi_image')
                    ->from('products p')
                    ->join('product_images pi', "pi.product_id=p.id_products", "left")
                    ->where('p.product_status', '1')
                    ->order_by('p.id_products', 'ASC')
                    ->group_by('p.id_products')
                    ->get();

                $this->load->library('pagination');

                $jumlah_data_products = $query_products->num_rows();

                $config_pagi['base_url'] = base_url() . 'page/' . $alias . '/';
                $config_pagi['total_rows'] = $jumlah_data_products;
                $config_pagi['per_page'] = 20;
                $config_pagi["uri_segment"] = 3;
                $config_pagi['num_links'] = 2;

                $config_pagi['use_page_numbers'] = true;

                $config_pagi['full_tag_open'] = '<div class="pagi_pagination">';
                $config_pagi['full_tag_close'] = '</div>';

                $config_pagi['first_link'] = '&laquo;';
                $config_pagi['first_tag_open'] = '<span class="pagi_firstlink">';
                $config_pagi['first_tag_close'] = '</span>';

                $config_pagi['last_link'] = '&raquo;';
                $config_pagi['last_tag_open'] = '<span class="pagi_lastlink">';
                $config_pagi['last_tag_close'] = '</span>';

                $config_pagi['next_link'] = '›';
                $config_pagi['next_tag_open'] = '<span class="pagi_nextlink">';
                $config_pagi['next_tag_close'] = '</span>';

                $config_pagi['prev_link'] = '‹';
                $config_pagi['prev_tag_open'] = '<span class="pagi_prevlink">';
                $config_pagi['prev_tag_close'] = '</span>';

                $config_pagi['cur_tag_open'] = '<span class="pagi_curlink">';
                $config_pagi['cur_tag_close'] = '</span>';

                $config_pagi['num_tag_open'] = '<span class="pagi_numlink">';
                $config_pagi['num_tag_close'] = '</span>';

                $from_page_product = ((int)$this->uri->segment(3) - 1) * $config_pagi['per_page'];
                if ($from_page_product < 0) {
                    $from_page_product = 0;
                }
                $this->pagination->initialize($config_pagi);

                // $data['products'] = $this->db->select('p.*, pi.image as pi_image')
                $data['products'] = $this->db->select('p.*, p.img_thumb as pi_image')
                    ->from('products p')
                    ->join('product_images pi', "pi.product_id=p.id_products", "left")
                    ->where('p.product_status', '1')
                    ->order_by('p.id_products', 'ASC')
                    ->group_by('p.id_products')
                    ->limit($config_pagi['per_page'], $from_page_product)
                    ->get()->result();

                $this->data['per_page'] = $config_pagi['per_page'];
                $this->data['cur_page'] = (int)$this->uri->segment(3);
                break;

            case '36':
                $query_body_rooms = $this->db->select('*')
                    ->from('body_rooms')->where("type", "promo")->where("promo", "hotel")->order_by('id', 'ASC')->get()->result();

                $data['hotel'] = $query_body_rooms;

                $query_lounge = $this->db->select('*')
                    ->from('body_rooms')->where("type", "promo")->where("promo", "lounge")->order_by('id', 'ASC')->get()->result();

                $data['lounge'] = $query_lounge;

                $query_cafe = $this->db->select('*')
                    ->from('body_rooms')->where("type", "promo")->where("promo", "cafe")->order_by('id', 'ASC')->get()->result();

                $data['cafe'] = $query_cafe;

                $query_residence = $this->db->select('*')
                    ->from('body_rooms')->where("type", "promo")->where("promo", "residence")->order_by('id', 'ASC')->get()->result();

                $data['residence'] = $query_residence;
                break;
            default:
                # code...
                break;
        }
        $quer_pages = $this->db->get_where("pages", array(
            "id_pages" => $data['page']->id_pages,
        ))->row();
        $data['quer_pages'] = $quer_pages;

        $quer_pages_gallery = $this->db->get_where("pages_gallery", array(
            "id_pages" => $quer_pages->id_pages,
        ));

        $data['quer_pages_gallery'] = $quer_pages_gallery;

        $data["active_content"] = $quer_pages->active_content;
        $data["active_contact"] = $quer_pages->active_contact;
        if ($data["active_contact"] == 'yes') {
            if ($this->session->userdata('site_lang') == 'english') {
                $this->lang->load('homepage', 'english');
                $this->lang->load('contact', 'english');
            } else {
                $this->lang->load('homepage', 'indonesian');
                $this->lang->load('contact', 'indonesian');
            }
            $this->load->library('recaptcha');
            $data['recaptcha_html'] = $this->recaptcha->render();
        }
        $data["active_map"] = $quer_pages->active_map;
        $data["active_gallery"] = $quer_pages->active_gallery;
        $data["active_all_product"] = $quer_pages->active_all_product;
        $data["active_banner_slider"] = $quer_pages->active_banner_slider;
        $data["active_center_img"] = $quer_pages->active_center_img;
        $data["active_section_hotel"] = $quer_pages->active_section_hotel;
        $data["active_section_lounge"] = $quer_pages->active_section_lounge;
        $data["active_section_cafe"] = $quer_pages->active_section_cafe;
        $data["active_section_residence"] = $quer_pages->active_section_residence;

        $this->data_header['c_url_alias_en'] = $this->db
            ->select('alias_en')
            ->from('pages')->where('id_pages', $data['page']->id_pages)
            ->order_by('priority', 'ASC')->get()->row()->alias_en;

        $this->data_header['c_url_alias_ind'] = $this->db
            ->select('alias')
            ->from('pages')->where('id_pages', $data['page']->id_pages)
            ->order_by('priority', 'ASC')->get()->row()->alias;

        //get SEO
        $this->data_header['browser_title'] = 'Page - ' . ucwords($data['page']->page_title);
        $this->data_header['meta_description'] = $data['page']->meta_description;

        $data['recaptcha_html'] = $this->recaptcha->render();

        // echo "<script>console.log('".json_encode($data)."')</script>"; exit(); 

        $this->load->view("themes/$this->theme_no/header", $this->data_header);
        $this->load->view("themes/$this->theme_no/page", $data);
        $this->load->view("themes/$this->theme_no/footer", $this->data_footer);
    }

    public function career_confirmation()
    {
        if (!isset($_POST['career_confirmation'])) {
            redirect('contact');
        }

        $inp_name = $this->input->post('inp_name');
        $inp_email = $this->input->post('inp_email');
        $inp_phone = $this->input->post('inp_phone');
        $inp_subject = $this->input->post('subject');
        $inp_message = $this->input->post('message');

        //validation in action
        $config = array(
            array(
                'field'   => 'inp_name',
                'label'   => 'Name',
                'rules'   => 'trim|required'
            ),
            array(
                'field'   => 'inp_email',
                'label'   => 'Email Address',
                'rules'   => 'trim|required'
            ),
            array(
                'field'   => 'inp_phone',
                'label'   => 'Phone Number',
                'rules'   => 'trim|required'
            ),
            array(
                'field'   => 'message',
                'label'   => 'Message Details',
                'rules'   => 'trim|required'
            ),
            array(
                'field'   => 'subject',
                'label'   => 'Subject',
                'rules'   => 'trim|required'
            ),
        );

        $this->form_validation->set_rules($config);
        $this->form_validation->set_error_delimiters('<div class="error">', '</div>');

        if ($this->form_validation->run($this) == FALSE) {

            $data_header['page_title'] = 'Contact Us';

            $this->db->select('website_name')->from('configuration')->where('id_configuration', 1);
            $website_name = $this->db->get()->row();
            $this->data_header['browser_title'] =  ucwords($website_name->website_name) . ' - My Account';
            $this->data_header['meta_description'] = ucwords($website_name->website_name) . ' - My Account';

            //LOAD LANGUAGE FILES 
            // if($this->session->userdata('site_lang') == 'english') {
            // 	$this->lang->load('contact', 'english');
            // } else {
            // 	$this->lang->load('contact', 'indonesian');
            // } 

            $this->load->view("themes/$this->theme_no/header", $this->data_header);
            $this->load->view("themes/$this->theme_no/contact");
            $this->load->view("themes/$this->theme_no/footer", $this->data_footer);
        } else {

            //get website data
            $this->db->select('logo, from_email, website_name, email_smtp_host, email_smtp_port, email_smtp_password, email_smtp')->from('configuration')->where('id_configuration', 1);
            $website_data = $this->db->get()->row();

            $data['logo'] = $website_data->logo;
            $data['website_name'] = $website_data->website_name;

            $this->load->model('configuration_m');

            $data['emails'] = $this->configuration_m->get_emails();
            $data['bank'] = $this->configuration_m->get_bank();
            $data['title'] = 'Contact Us';


            $myMessage = '<html><body>';
            $myMessage .= '<table style="border-color: #666;" cellpadding="10">';
            $myMessage .= "<tr><td><strong>Name:</strong> </td><td>" . $inp_name  . "</td></tr>";
            $myMessage .= "<tr><td><strong>Email Address:</strong> </td><td>" .  $inp_email . "</td></tr>";
            $myMessage .= "<tr><td><strong>Phone Number:</strong> </td><td>" . $inp_phone
                . "</td></tr>";
            $myMessage .= "<tr><td><strong>Project Details:</strong> </td><td>" . $inp_message  . "</td></tr>";
            $myMessage .= "</table>";
            $myMessage .= "<p>Thanks.</p>";
            $myMessage .= "</body></html>";

            // send email 

            $email_data['email'] = $data['emails']->from_email;
            // $email_data['email'] = 'bakrisea@gmail.com'; 
            $email_data['subject'] = $inp_subject;
            $this->send_email($myMessage, $email_data, true);
            // var_dump($this->email->print_debugger()); exit();
            // end email

            $this->session->set_flashdata('success', '<br><p style="background:green; color:white; padding:10px; padding:5px; font-weight:bold;">Business Enquiry
				 Successfully Sent. We will check your Business Enquiry.</p>');

            redirect('contact');
        }
    }
}

https://t.me/RX1948 - 2025