You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
information-system/application/controllers/tools.php

41 lines
1.1 KiB
PHP

<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Tools extends CI_Controller
{
function __construct()
{
parent::__construct();
$this->permission->is_admin();
$this->load->model('Area_model');
$this->load->model('InfoStructures_model');
$this->load->model('Information_model');
$this->site_code = $this->config->item('site_code');
}
/**
*
* 公有函数:扫描已有缓存文件并更新。
*
* 必要参数:
* @param String $site_code
*
*/
public function old()
{
$data['yeardiff'] = $this->input->get_post('yeardiff');
$data['nopub'] = $this->input->get_post('nopub');
$data['emptyinfo'] = $this->input->get_post('emptyinfo');
//参数
if (!$data['yeardiff']) $data['yeardiff'] = 3;
//老旧信息
$data['info'] = $this->Information_model->get_oldest_info($data['yeardiff'], $data['nopub'], $data['emptyinfo']);
//视图
$this->load->view('tools/old', $data);
}
}
//end of Cache