<?php
/**
 *  cache.php
 *
 * @copyright			(C) 2005-2010 NewsTeng Inc.
 * @license				This is NOT a freeware, use is subject to license terms
 * @lastmodify			2010-12-16
   $Id: cache.php 2 2010-12-16 10:59:13Z xuchao $
 */
defined('IN_XTCMS') or exit('No permission resources.');
base::load_app_class('admin', 'admin', 0);

class cache extends admin {

	private $db, $applications_db;
	/**
	 * 析构函数
	 */
	public function __construct() {
		parent::__construct(1);
		$this->db = base::load_model('settings_model');
	}

	/**
	 * 首页
	 */
	public function init() {
		include $this->admin_tpl('cache');
	}

	public function ajax_clear() {
		$settings = getcacheinfo('settings');
		$return['filesize'] = sizecount($settings['filesize']);
		$return['filemtime'] = date('Y-m-d H:i:s', $settings['filemtime']);
		exit(json_encode($return));
	}
}
?>