Просмотр файла index.php

Размер файла: 766B
<?php
    include 'engine/includes/start.php';
	
	if (isset($_GET['set_theme']) && ($_GET['set_theme'] == 'Wap' || $_GET['set_theme'] == 'Web'))
	{
		$tmp_theme = $_GET['set_theme'] == 'Wap' ? 'default' : 'web';
		setcookie('set_theme',$tmp_theme , 0, '/');
		$_COOKIE['set_theme'] = $tmp_theme;
	}
	
	include 'engine/includes/head.php';
	
	Core::get('cache.class');
	$cache = new cache(tmpDir . 'index_page.swc');
	if (!$cache->life(3600))
	{
		ob_start();
		$res = mysqli_query($sql->db, 'select `file` from `module_services` where `use_in` ="index_page"');
		while($file = $sql->result($res))
		{
			include_once H . $file;
		}
		$cache->write();
		unset($res, $file);
	}
	echo $cache->read();

	unset($cache);
	$sql->free();

	include 'engine/includes/foot.php';