/var/www/hkosl.com/ifapc/html_20210817/IFAPC2021/application/controllers/Award.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
require_once APPPATH 'core/MY_Controller_2.php';

class 
Award extends MY_Controller_2
{
    public function 
__construct(){
        
parent::__construct();
        if (!
is_osl()) {
            exit();
        }
    }

    public function 
index($category_code)
    {
        if (!
count($certain Category_model::get_data_by_field_with_value(['code' => $category_code])[0])) {
            
redirect(front_url(''));
        }
        
$this->load->vars('certain'$certain);
        
$this->load->vars('category_code'$category_code);
        
$this->load->vars('categoies'Category_model::get_data());
        
$this->load->view('main/award');
    }
}