Файл: archive/www/musimka.ru/index.php
Строк: 219
<?
require ('connect.php');
$title = $title.' | Главная';
$cusers_online = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `online` > '".(time()-$system['online_time'])."'"), 0);
$col_g = mysql_result(mysql_query("SELECT COUNT(*) FROM `guests` WHERE `date_last` > '" . (time() - 100) . "' AND `pereh` > '0'"), 0);
require('thead.php'); echo '<a href = "users.php?act=go&online=1"><div class="msg"><center> <font color="#777777"> Сейчас общаются :</font><span class="count"> '.$cusers_online.' чел.</span></div></a></center>'; echo "</div>";
require('core/ava_min.php');
# новости
$cusers = mysql_result(mysql_query("SELECT COUNT(*) FROM `users`"), 0);
$cnews = mysql_fetch_array(mysql_query("SELECT * FROM `news` ORDER BY `time` DESC"));
if ($cnews) $cnews = '('.vremya($cnews['time']).')';
# газета
$cjurnal = mysql_fetch_array(mysql_query("SELECT * FROM `gazeta` ORDER BY `time` DESC"));
if ($cjurnal) $cjurnal = '('.vremya($cjurnal['time']).')';
# Лента
$lenta = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `lenta`"), 0);
$lenta2 = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `lenta` WHERE `time` > '".(time()-(30*30*12))."'"), 0);
if($lenta2 > 0) $lenta_new = '<font color = "red">+'.$lenta2.'</font>';
# Админка
$admin_jurnal = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `admin_jurnal`"), 0);
$admin_jurnal2 = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `admin_jurnal` WHERE `time` > '".(time()-(30*30*12))."'"), 0);
if($admin_jurnal2 > 0) $admin_jurnal_new = '<font color = "red">+'.$admin_jurnal2.'</font>';
# беседка
$carbour = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `arbour`"), 0);
$carbour2 = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `users` WHERE `online` > '".(time()-$system['online_time'])."' AND `location` = 'arbour'"), 0);
# чат
$cchat = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `users` WHERE `online` > '".(time()-$system['online_time'])."' AND `location` = 'chat'"), 0);
# форум
$cforum = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `forum_themes`"), 0);
$cforum2 = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `forum_messages`"), 0);
$cforum3 = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `forum_messages` WHERE `time` > '".(time()-(60*60*24))."'"), 0);
if($cforum3 > 0) $forum_new = '<font color = "red">+'.$cforum3.'</font>';
# знакомства
$cusers_zh = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `sex` = 'zh'"), 0);
$cusers_m = $cusers-$cusers_zh;
# топ фотографий
$cphotos_top = mysql_result(mysql_query("SELECT COUNT(*) FROM `photos_photo` WHERE `top` = '1'"), 0);
# дуели
$cduels = mysql_result(mysql_query("SELECT COUNT(*) FROM `duels_list` WHERE `time_end` > '".time()."'"), 0);
# гаремы
$cgarem = mysql_result(mysql_query("SELECT COUNT(*) FROM `garems_list` WHERE `users` > '0'"), 0);
# дневники
$cdiary = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `diary_messages`"), 0);
$cdiary2 = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `diary_messages` WHERE `time` > '".(time()-(60*60*24))."'"), 0);
if($cdiary2 > 0) $diary_new = '<font color = "red">+'.$cdiary2.'</font>';
# микроблоги
$cblog = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `microblog_messages`"), 0);
$cblog2 = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `microblog_messages` WHERE `time` > '".(time()-(60*60*24))."'"), 0);
if($cblog2 > 0) $blog_new = '<font color = "red">+'.$cblog2.'</font>';
# пользователи
$cusers = mysql_result(mysql_query("SELECT COUNT(*) FROM `users`"), 0);
$cusers_online = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `online` > '".(time()-$system['online_time'])."'"), 0);
# администрация
$admins = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `admin`"), 0);
if($_GET['pass'])echo '<div class="cred"><b>Если вы забыли пароль - вы всегда сможете восстановить пароль, для этого нужно обратиться с просьбой о восстановлении ника и пароля по адресам</b></br> <b>gold_spaces@spaces.ru</b> </br> <b><a href="http://vk.com/gold_spaces">Денис Плешаков</a></b></div>';
echo '<div class="zona"><img src = "nov/hazrd.gif"><font color="#ff3399"> <b>Ждут знакомства</b></font></br>';
if($u['id']){
$req = mysql_query("SELECT * FROM `popular` WHERE `user` = '".$u['id']."' LIMIT 1");
if(mysql_num_rows($req)==0){
echo '<a href = "popular.php"><img src="i/J.gif"><font color="red"><b>попасть сюда</b></font></a>';
}
}
$cusers_5 = mysql_result(mysql_query("SELECT COUNT(*) FROM `popular`"), 0);
if($cusers_5 > 0){
$result = mysql_query("SELECT * FROM `popular` ORDER BY `time` DESC LIMIT 0, 5");
echo '<table><tr align="center">';
while($user = mysql_fetch_assoc($result)){
echo '
<td>';
ava_k($user['user'],35);
echo '</td>';
}
echo '</tr></table>';
}else{
echo '<br> Пользователей не найдено!';
}
echo '</div>';
if($u['admin'] == 1 || $u['admin'] == 2 || $u['admin'] == 3 || $u['admin'] == 4 || $u['admin'] == 5){
echo '</div>';
}
require('core/bb_code.php'); echo ' <a href = "news.php?"><div class="div"><img src="nov/feed.gif" alt=""/> Новости <font color = "#777777">'.$cnews.'</font></div></a> </font>';$cnews=mysql_query("SELECT * FROM `news`WHERE `id` > '0' ORDER BY `time` DESC LIMIT 1");if(mysql_num_rows($cnews) == 1){$cnews = mysql_fetch_assoc($cnews);echo '<div class="mess"> <b><img src="/i/news1.png"> '.htmlspecialchars($cnews['name']).'</b> ('.vremya($news ['time']).')<br/>'; echo ''.img(smile(links(bb_code($cnews['message'])))).'';}
echo ' </div><a href = "chat.php"><div class="div"><img src="nov/chat.gif" alt=""/> Чат <font color = "#777777">(<font color = "green">'.$cchat.' </font> чел.)</font></div></a>';
echo ' <a href = "forum.php"><div class="div"><img src="nov/forum.gif" alt=""/> Форум <font color = "#777777">('.$cforum.' | '.$cforum2.') '.@$forum_new.'</font> </div></a> '; $result = mysql_query("SELECT * FROM `forum_themes` ORDER BY `time` DESC LIMIT 3"); while ($theme = mysql_fetch_assoc($result)) { echo $i % 2 ? '<div id="in11">' : '<div id="in11">'; $count = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `forum_messages` WHERE `theme` = '".$theme['id']."'"), 0); $name = checkout($theme['name']); $end = mysql_query("SELECT `user`,`time` FROM `forum_themes` WHERE `id` = '".$theme['id']."' ORDER BY `time` DESC"); $end_msg = mysql_fetch_array($end); if($theme['fix'] == 1) { echo '<img src="ico/stick.gif" alt=""/> ';}else{ echo '<img src="ico/tik.png" alt="image" /> ';} echo '<a href = "forum.php?act=theme&id='.$theme['id'].'&cat=1"><font color="#777777">'.$name.' ('.$count.')</font> <small><font color="green">'.vremya($end_msg['time']).'</font></small> </a>'; if($theme['18'] == 1) { echo '/ <font color="red">18+</font>'; } if($theme['close'] == 1) {echo '<img src="ico/lock.gif" alt="image" />'; } echo '</div>';} echo '</div></div>';
echo ' <a href = "lenta.php?"><div class="div"><img src="nov/p.gif" alt=""/> Лента Новостей <font color = "#777777">('.$lenta.') '.@$lenta_new.'</font></div></a> ';
echo ' <a href = "gazeta.php?"><div class="div"><img src="nov/buzz.gif" alt=""/> Газета Musimka.ru<font color = "#777777">'.$cjurnal.'</font></div></a> ';
echo ' <a href = "microblog.php?act=all"><div class="div"><img src="nov/notes.gif" alt=""/> Люди пишут <font color = "#777777">('.$cblog.')</font> '.@$blog_new.'</div></a> ';
echo '</div><a href = "search.php"><div class="div"><img src="nov/heart.gif" alt="lovs"/> Знакомства</a>
<font color = "#777777">(<font color = "#FF3399">'.$cusers_zh.'</font> | <font color = "#0099FF">'.$cusers_m.'</font>)</font></div>';
$down = mysql_result(mysql_query("SELECT COUNT(*) FROM `down`"), 0); echo '<a href = "user/shared_zona"> <font color="#777777"><div class="div"><img src="nov/dir.gif" alt="musimka"/> Зона обмена ('.$down.')</font></a></div>';
echo "<a href='service'><div id='in11'><img src='http://wapvi.ru/style/themes/web/img/trophy.png'> Сервисы сайта !!</a></div>";
echo "<a href='http://musimka.ru/forum.php?act=theme&id=19&cat=1'><div id='in11'><img src='http://wapvi.ru/style/themes/web/img/trophy.png'> Как стать модератором!!!</a></div>";
//echo "<a href='http://musimka.ru/forum.php?act=theme&id=18&cat=1'><div class='div'><img src='http://wapvi.ru/style/themes/web/img/trophy.png'> Лучшее фото недели.!!!</a></div>";
echo "<a href='http://musimka.ru/diary.php?act=message&id=24&link=1'><div id='in11'><img src='http://wapvi.ru/style/themes/web/img/trophy.png'> Всем в подарок 3000 баллов!!!</a></div>";
echo ' <a href = "arbour.php"><div class="div"><img src="nov/guest.gif" alt=""/> Беседка <font color = "#777777">('.$carbour.' | </font><font color = "green">'.@$carbour2.' чел.)</font></div></a> ';
echo ' <a href = "photos_top.php"><div class="div"><img src="nov/foto.gif"> ТОП-Фото <font color = "#777777">('.$cphotos_top.')</font> </div></a> ';
echo ' <a href = "duels.php"><div class="div"><img src="nov/gun.gif"> Фото-Дуэли <font color = "#777777">('.$cduels.')</font></div></a> ';
$soo = mysql_result(mysql_query("SELECT COUNT(*) FROM `soo`"), 0);
echo ' <a href = "/soo/"> <div class="div"><img src="/nov/notes.gif"> Сообщества <font color = "#777777">('.$soo.')</font></div></a> ';
echo '<a href="garems.php"><div class="div"><img src="nov/harem.gif"> Рейтинг гаремов</a> <font color = "#777777">('.$cgarem.')</font></div>';
echo ' <a href = "diary.php"><div class="div"><img src="nov/plugin.gif" alt=""/> Дневники <font color = "#777777">('.$cdiary.') '.@$diary_new.'</font></div></a> ';
echo ' <a href = "igra.php"><div class="div"><img src="nov/games.gif"> Онлайн-Игры <font color = "#777777">(4)</font></div></a> ';
$users = mysql_result(mysql_query("SELECT COUNT(*) FROM `users`"), 0); echo ' <a href = "users.php"><div class="div"><img src="nov/p.gif"> Пользователи <font color = "#777777">(<font color = "#FF3399">'.$users.'</font>)</font></font></div></a> ';
require ('tgfo.php');
?>