| Server IP : 103.48.194.25 / Your IP : 216.73.217.33 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64 User : sieuthimay ( 1016) PHP Version : 8.2.20 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/galaxynail.com/site/controllers/ |
Upload File : |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Gallery extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->model('Gallery_model','gallery');
//$this->lang->load('gallary');
}
public function index()
{
$filename = ROOT_SITE.'cache/json_gallerycat.php';
$listcat = read_file($filename);
$data['listcat'] = json_decode($listcat);
$data['cfg'] = $cfg = get_cauhinh();
$data['metatitle'] = $cfg->site_title;
$data['metadesc'] = $cfg->site_desc;
$data['metakey'] = $cfg->site_keyword;
$data['metaimg'] = ''; //$cfg->metatitle;
$data['canonical'] = site.'contact-us.html';
$data['page'] = 'gallery/index';
$this->load->view('skin_home',$data);
}
public function listimg()
{
$start = $this->input->post('page');
$catid = $this->input->post('cat_id');
$list = $this->gallery->get_all_gallery($catid,20,$start);
$str = '';
$arr = array();
foreach ($list as $rs):
$obj = new stdClass();
$obj->id = $rs->gallery_id;
$obj->name = $rs->lb_title;
$obj->image = $rs->lb_url;
$obj->image_alt = $rs->lb_title;
$obj->imageThumb = urlimg.'gallery/large/'.$rs->lb_image;
/*$obj->description = $rs->lb_title;
$obj->pathUpload = $rs->lb_image;
$obj->pathThumb = $rs->lb_image;
$obj->imageOri = $rs->lb_image;*/
array_push($arr,$obj);
endforeach;
$arr = json_encode($arr);
$str = '{"data":'.$arr.',"paging_ajax":""}';
echo $str;
}
}