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

Размер файла: 3.07Kb
<?php
include('core/core.php');
include(INC.'func.php');
include(INC.'session.php');
include(INC.'session_user.php');
$mode = htmlspecialchars($_GET['mode']);
include(INC.'head.php');
switch ($mode):
case 'index':
site_cron();
show_title('Главная страница');
if(htmlspecialchars($_GET['out']) == 'exit'){$my_login = $_COOKIE['login']; mysql_query("DELETE FROM `session_user` WHERE user = '$my_login';"); setcookie("login"); setcookie("pass"); header("Location: /index.php");}
echo '<div class="razdel"><center><a href="/users/user.php">Онлайн: '; echo online_user(); echo'</a><small>(+'; echo online_ghost(); echo')</small></center></div>';
echo'<div class="menu"><img src="'.IMG.'about.gif" alt=""> <a href="/pages/info.php">Первый раз на '.SITE.'?</a></div>';
echo'<div class="menu"><img src="'.IMG.'SharedZone.gif" alt=""> <a href="/shared_zone/">Зона обмена</a> ('.index('files').')<br />
<small>фото, видео, игры, софт...</small></div>';
hero_day(1);
$news = mysql_query('SELECT * FROM news ORDER BY `id` DESC LIMIT 1');
$news = mysql_fetch_assoc($news);
if($news['time'] >= time()) {
echo'<div class="menu">
<img src="'.IMG.'news_2045.png" alt=""> <a href="/news/">Новости</a> ('.last_news().')<hr>';
echo '<strong>'.$news['title'].'</strong><br />';
echo $news['news'];
echo'</div><div class="menu">';
} else {echo'<div class="menu">
<img src="'.IMG.'news_2045.png" alt=""> <a href="/news/">Новости</a> ('.last_news().')<br />';}
echo'<img src="'.IMG.'dating.gif" alt=""> <a href="/dating/">Знакомства</a> ('.index_to('dating','status','on').')<br />
<img src="'.IMG.'People.gif" alt=""> <a href="/users/user.php?mode=all">Обитатели</a> ('.index('users').')<br />
<img src="'.IMG.'soo.gif" alt=""> <a href="/grop/">Сообщества</a> ('.index('grop').')<br />
<img src="'.IMG.'diary.gif" alt=""> <a href="/diary/">Дневники</a><br />
<img src="'.IMG.'rab.png" alt=""> <a href="/games/vic.php">Викторина</a> ['.index('session_vic').']<br />
';
if($forum_themes > 0){
echo'</div><div class="menu"><img src="'.IMG.'Forum.gif" alt=""> <a href="/forum/">Форум</a> ('.index('forum_themes').'/'.index('forum_topic').')<hr />';
forum_index($forum_themes);
echo'</div><div class="menu">';
} else {echo'<img src="'.IMG.'Forum.gif" alt=""> <a href="/forum/">Форум</a> ('.index('forum_themes').'/'.index('forum_topic').')<br />';}
echo'<img src="'.IMG.'chat.gif" alt=""> <a href="/chat/">Чат</a> ('.index('session_chat').' чел.)<br />
<img src="'.IMG.'guest.png" alt=""> <a href="/pages/gb.php">Гостевая книга</a> ('.index('book').')<br />
<img src="'.IMG.'ads_icon.gif" alt=""> <a href="/cab/">Объявления</a><br />
<img src="'.IMG.'stata.png" alt=""> <a href="/pages/stat.php">Статистика сайта</a><br />
<img src="'.IMG.'stat.gif" alt=""> <a href="users/votes.php">Голосования</a> ('.index('vote').'/'.index('vote_golos').')
</div>';
break;
default: 
header ('location: ?mode=index'); 
endswitch;
include(INC.'foot.php');
?>