<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Download extends CI_Controller {
	
	public function __construct()
    {
        parent::__construct();
    }

	public function index()
	{
		$d['judul'] = "Download ".$this->config->item('nama_aplikasi_full');
        $d['bawah'] = $this->config->item('footer');
        $d['judul_lengkap'] = $d['judul'];
        $d['kunci'] = "Download ".$this->config->item('kunci');
        
        
        $config['total_rows'] = $this->profil->download_hal($this->config->item('kode'));
		$config['per_page'] = 10;
		$config['uri_segment'] = 3;
		$config['full_tag_open'] = '<ul class="pagination margin-top-none">';
		$config['full_tag_close'] = '</ul>';
		$config['prev_link'] = '&lt;';
		$config['prev_tag_open'] = '<li>';
		$config['prev_tag_close'] = '</li>';
		$config['next_link'] = '&gt;';
		$config['next_tag_open'] = '<li>';
		$config['next_tag_close'] = '</li>';
		$config['cur_tag_open'] = '<li class="active"><a href="#">';
		$config['cur_tag_close'] = '</a></li>';
		$config['num_tag_open'] = '<li>';
		$config['num_tag_close'] = '</li>';
		 
		$config['first_tag_open'] = '<li>';
		$config['first_tag_close'] = '</li>';
		$config['last_tag_open'] = '<li>';
		$config['last_tag_close'] = '</li>';
		 
		$config['first_link'] = '&lt;&lt;';
		$config['last_link'] = '&gt;&gt;';
		$config['base_url'] = base_url()."index.php/download/index/";
		$this->pagination->initialize($config);
		
		
		
		$hal = $this->uri->segment(3);
		 if($hal==""){
			 $hal=0;
		}
           
        
		$d['page'] = $this->pagination->create_links();
		$d['no'] = $hal;
        
        $d['blog'] = $this->profil->download_semua("", $this->config->item('kode'), "limit $hal, $config[per_page]");
        
        
		$this->load->view('theme/at_atas.php',$d);
        $this->load->view('download/at_tampil.php',$d);
        $this->load->view('theme/at_bawah.php',$d);
	}
	
	
	
}
