Select Git revision
sidebar.css
General.php 10.94 KiB
<?php
defined('BASEPATH') or exit('No direct script access allowed');
require_once dirname(__FILE__) . '/Exhibition_Controller.php';
class general extends Exhibition_Controller
{
public function show_general_home()
{
$this->load->model('company/M_company', 'company');
$this->load->model('tag/M_tag', 'tag');
$this->load->model('team/M_team', 'team');
$data['teams'] = $this->team->get_all()->result();
$data['companies'] = $this->company->get_all()->result();
$data['tags'] = $this->tag->get_all()->result();
$this->output_general('general/v_general_home', $data);
}
public function show_project_2()
{
$this->output_general('general/v_project_2');
}
public function show_project_3()
{
$this->output_general('general/v_project_3');
}
public function show_project_4()
{
$this->output_general('general/v_project_4');
}
public function get_num_project()
{
$year = $_GET['year'];
$this->load->model('general/M_general', 'num_project');
$data['num_project'] = $this->num_project->get_num_project($year)->row();
echo json_encode($data);
}
public function get_trend()
{
$this->load->model('general/M_general', 'trend');
$data['trend'] = $this->trend->get_trend()->result();
echo json_encode($data);
}
public function get_tag()
{
$this->load->model('general/M_general', 'tag');
$data['tag'] = $this->tag->get_tag()->result();
echo json_encode($data);
}
public function get_project_2()
{
$year = $_GET['year'];
$this->load->model('general/M_general', 'project_2');
$data['project_2'] = $this->project_2->get_project_2($year)->result();
echo json_encode($data);
}
public function get_project_year()
{
$this->load->model('general/M_general', 'year');
$data['year'] = $this->year->get_project_year()->result();
echo json_encode($data);