Вход Регистрация
Файл: region_clean/fo/index.php
Строк: 256
<?
#######################################
## Mod By KoT (borispol) [76-75-072] ##
#######################################

require_once "../start.php";
require_once 
"../sid.php";

header('Cache-Control: no-store, no-cache, must-revalidate');
if (
$ver == "wml"header ("Content-type:text/vnd.wap.wml; charset=utf-8");
else 
header("Content-Type:text/html; charset=UTF-8");

require_once 
"../inc.php";
$link connect_db();
list(
$row$id$ps$fsize1$fsize2) = check_login($link);
require_once 
"../version.php";

$us $row['user'];

if (
$ver == "wml") {
echo 
$xml;
echo 
$dtd;
echo 
"<wml>n
      <head><meta http-equiv="
Cache-Control" content="no-cache" forua="true"/></head>n
      <card id="
change" title="Wap обменник">n
      <p>n"
;
} else {
echo 
"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
<html xmlns="http://www.w3.org/1999/xhtml">
      <
head><link rel="stylesheet" type="text/css" href="../css/$css.css"/>
      <
title>Wap обменник</title>
      <
meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
      <
div align="left">n";
}

function get_size(
$size)
{
    if(
$size < 1024) $size = $size.' б.';
    if(
$size > 1024 and $size < 1048576) $size = round($size / 1024, 1).' кб.';
    if(
$size >= 1048576) $size = round(($size / 1024) / 1024, 1).' мб.';

    return 
$size;
}

$tm = time() - 100;
$f_count = mysql_query("SELECT id,user FROM users WHERE onl'".$tm ."' AND room='forum' group by user order by onl desc;");
$asnumspr = mysql_affected_rows();
@
$kolf = $kolf + $asnumspr;

echo 
$fsize1;
echo '<div class="
c4">Wap обменник</div><br/>';
if (
$module == "") {

$times = getmicrotime();
mysql_query("
Update users set onl='".$times."'room='fo' where id ='$id'");

echo "
<div class = 'd1'>Привет: <b>" .$us. "</b></div>n";
$r = mysql_query ("select count(readd) as num from zapiski WHERE (idtowhom '".$id."') and (readd '0') and (ininc '1')");
$a = mysql_fetch_array($r);
$inb = $a["num"];
$r2 = mysql_query ("select count(klu4) as num from zapiski WHERE (idtowhom '".$id."') and (ininc '1')");
$a2 = mysql_fetch_array($r2);
$inball = $a2["num"];
echo "
<img src="images/co.gif" alt="&#187;"/> <a href="../chatmail.php?$ses$takep2">Мои письма</a> (".$inb."/".$inball.")<br/>";

//////////////////////////////////
$tm = time() - 100;
$r = mysql_query ("Select who from room23 WHERE id '".$tm."' group by who order by id desc;");
$asnum3 = mysql_affected_rows();

$res = mysql_query ("Select from room23 WHERE id '".$tm."' and who !='Пиздатый бот' and who !='Система' and who !='Умница' and who !='Афоризм-Бот' and who !='4at-Bot' and who !='Мафиози' and who !='Шутник' and who !='Системный бот' group by usid order by id desc");
$kolm = mysql_affected_rows();
for (
$k = 0; $k < $kolm$k++) {
$lines = mysql_fetch_array ($res);
$user = $lines['who'];
$user_id = $lines['usid'];
$r = mysql_query("select from ingame23 WHERE gamer_id '".$user_id."'");
$a = mysql_fetch_array($r);
$id_in_game = $a['id_in_game'];

if (mysql_affected_rows() != 0) 
$ingame = $ingame . "$user($id_in_game), "; 
else 
$outgame = $outgame . "$user";
}
unset(
$lines);
$roommaf = mysql_fetch_array(mysql_query("Select name from rooms where rm='23' LIMIT 1;"));
echo "
<img src="images/co.gif" alt="&#187;"/> <a href="../chat.php?$ses&amp;rm=23&amp;ref=$ref">".$roommaf[0]."</a> (".($kolm).")<br/>n";

//////////////////////////////////
$kols = $kol + $kolp + $kolpr + $kolc  + $kolf + $asnum3;

$f_count = mysql_query("SELECT id,user FROM users WHERE onl'".$tm ."' AND room='forum' group by user order by onl desc;");
$asnumspr = mysql_affected_rows();
@
$kolf = $kolf + $asnumspr;

$tttimedf = time();
$fpsdf = $tttimedf - 100;
$rdf = mysql_query("SELECT count(`id`) FROM `usersWHERE lastdate>='" . intval($fpsdf) . "';");
$cdf = mysql_fetch_row($rdf);
$count = $cdf[0];

if (((
$count%10 == 2) or ($count%10 == 3) or ($count%10 == 4)) and ($count/10) != 1);

echo "
<img src="images/co.gif" alt="&#187;"/> <a href="../forum/index.php?$ses&amp;ref=$ref">Форум</a> (" .$count. ")<br/>";

$itimedf = time();
$gor_o = $itimedf - 100;
$noc = mysql_query("SELECT count(`id`) FROM `usersWHERE `lastdateg`>='" . intval($gor_o) . "';");
$cit = mysql_fetch_row($noc);
$count_g = $cit[0];

echo '<img src="
images/co.gif" alt="&#187;"/> <a href="../city/index.php?'.$ses.'&amp;ref='.$ref.'">Онлайн-сити</a> (' . $count_g . ')<br/>';
//////////////////////////////////

echo "<dl><dt></dt></dl><br/>n
      <b><img src="
images/k.gif" alt=""/> <a href="sogl.php?$ses">Соглашение</a></b><br/>n";

echo 
'<img src="images/top.gif" alt="&#187;"/> TOP-10: <a href="top.php?'.$ses.'&amp;top=files">файлов</a> / <a href="top.php?'.$ses.'&amp;top=users">юзеров</a><br/>
      <img src="images/top.gif" alt="&#187;"/> Новые: <a href="new.php?'
.$ses.'&amp;new=24">За сегодня</a> / <a href="new.php?'.$ses.'&amp;new=48">За вчера</a><br/>';

echo 
"<img src='images/search.png' alt='&#187;'/> <a href='index.php?$ses&amp;module=search'>Поиск файлов</a><br/>n
      <dl><dt></dt></dl>n"
;


echo 
"<b><img src="images/001.gif" alt=""/> <a href="upload.php?$ses">Загрузить файл</a></b><br/>n
      <dl><dt></dt></dl>n"
;
$pictures mysql_result(mysql_query("SELECT COUNT(*) FROM `fo_files` WHERE `type` = 'pictures' AND `xxx` = '0';"), 0);
$new_pictures mysql_result(mysql_query("SELECT COUNT(*) FROM `fo_files` WHERE `type` = 'pictures' AND `xxx` = '0' AND `time` > '".(time() - 86400)."';"), 0);

$music mysql_result(mysql_query("SELECT COUNT(*) FROM `fo_files` WHERE `type` = 'music';"), 0);
$new_music mysql_result(mysql_query("SELECT COUNT(*) FROM `fo_files` WHERE `type` = 'music' AND `time` > '".(time() - 86400)."';"), 0);

$video mysql_result(mysql_query("SELECT COUNT(*) FROM `fo_files` WHERE `type` = 'video' AND `xxx` = '0';"), 0);
$new_video mysql_result(mysql_query("SELECT COUNT(*) FROM `fo_files` WHERE `type` = 'video' AND `xxx` = '0' AND `time` > '".(time() - 86400)."';"), 0);

$themes mysql_result(mysql_query("SELECT COUNT(*) FROM `fo_files` WHERE `type` = 'themes';"), 0);
$new_themes mysql_result(mysql_query("SELECT COUNT(*) FROM `fo_files` WHERE `type` = 'themes' AND `time` > '".(time() - 86400)."';"), 0);

$other mysql_result(mysql_query("SELECT COUNT(*) FROM `fo_files` WHERE `type` = 'other';"), 0);
$new_other mysql_result(mysql_query("SELECT COUNT(*) FROM `fo_files` WHERE `type` = 'other' AND `time` > '".(time() - 86400)."';"), 0);

$xxx_pictures mysql_result(mysql_query("SELECT COUNT(*) FROM `fo_files` WHERE `type` = 'xxx-pictures' AND `xxx` = '1';"), 0);
$new_xxx_pictures mysql_result(mysql_query("SELECT COUNT(*) FROM `fo_files` WHERE `type` = 'xxx-pictures' AND `xxx` = '1' AND `time` > '".(time() - 86400)."';"), 0);

$xxx_video mysql_result(mysql_query("SELECT COUNT(*) FROM `fo_files` WHERE `type` = 'xxx-video' AND `xxx` = '1';"), 0);
$new_xxx_video mysql_result(mysql_query("SELECT COUNT(*) FROM `fo_files` WHERE `type` = 'xxx-video' AND `xxx` = '1' AND `time` > '".(time() - 86400)."';"), 0);

echo 
"<br/>n";
echo 
"<img src='images/pictures.png' alt='&#187;'/> <a href='down.php?$ses&amp;type=pictures'>Картинки, анимации</a> ($pictures) n";
if (
$new_pictures 0) echo '<span class="warning"><small><font color = "#0000ff">+'.$new_pictures.'</font></small></span>';
echo 
"<br/>&nbsp;<small>GIF, JPG, JPEG, BMP, PNG, WBMP, PIC, ANI, PCO</small><br/>
<dl><dt></dt></dl>n"
;
echo 
"<img src='images/music.png' alt='&#187;'/> <a href='down.php?$ses&amp;type=music'>Музыка, звуки</a> ($music) n";
if (
$new_music 0) echo '<span class="warning"><small><font color = "#0000ff">+'.$new_music.'</font></small></span>';
echo 
"<br/>&nbsp;<small>MMF, MID, AMR, MP3, WAV, AAC, SEQ, VOX, DXM, IMY, EMY, PMD, RNG</small><br/>
 <dl><dt></dt></dl>n"
;
echo 
"<img src='images/video.png' alt='&#187;'/> <a href='down.php?$ses&amp;type=video'>Видео, ролики</a> ($video) n";
if (
$new_video 0) echo '<span class="warning"><small><font color = "#0000ff">+'.$new_video.'</font></small></span>';
echo 
"<br/>&nbsp;<small>3GP, MP4, AVI, MPEG, RM</small><br/>
<dl><dt></dt></dl>n"
;

echo 
"<img src='images/themes.png' alt='&#187;'/> <a href='down.php?$ses&amp;type=themes'>Темы, скины</a> ($themes) n";
if (
$new_themes 0) echo '<span class="warning"><small><font color = "#0000ff">+'.$new_themes.'</font></small></span>';
echo 
"<br/>&nbsp;<small>SIS, SISX, THM, SDT, NTH, MTF, COL, SCS, UTZ</small><br/>
<dl><dt></dt></dl>n"
;
echo 
"<img src='images/other.png' alt='&#187;'/> <a href='down.php?$ses&amp;type=other'>Игры, софт, скрипты</a> ($other) n";
if (
$new_other 0) echo '<span class="warning"><small><font color = "#0000ff">+'.$new_other.'</font></small></span>';
echo 
"<br/>&nbsp;<small>ZIP, RAR, CAB, SIS, SISX, JAR, JAD</small><br/>
<dl><dt></dt></dl>n"
;
echo 
"<img src='images/pictures.png' alt='&#187;'/> <a href='xxx.php?$ses&amp;type=xxx-pictures'>XXX картинки</a> ($xxx_pictures) n";
if (
$new_xxx_pictures 0) echo '<span class="warning"><small><font color = "#0000ff">+'.$new_xxx_pictures.'</font></small></span>';
echo 
" <br/>&nbsp;<small>GIF, JPG, JPEG, BMP, PNG, WBMP, PIC, ANI, PCO</small><br/>
<dl><dt></dt></dl>n"
;
echo 
"<img src='images/video.png' alt='&#187;'/> <a href='xxx.php?$ses&amp;type=xxx-video'>XXX видео</a> ($xxx_video) n";
if (
$new_xxx_video 0) echo '<span class="warning"><small><font color = "#0000ff">+'.$new_xxx_video.'</font></small></span>';
echo 
"<br/>&nbsp;<small>3GP, MP4, AVI, MPEG, RM</small><br/>
<br/>n"
;

echo 
'<dl><dt></dt></dl>';

echo 
"<b><img src="images/001.gif" alt=""/> <a href="upload.php?$ses">Загрузить файл</a></b><br/>n";

echo 
'<dl><dt></dt></dl><br/>';
} else if (
$module == "search") {
if (!isset(
$_POST['q']))
{

echo 
"<form method='post' action='index.php?$ses&amp;module=search'>
      Запрос?<br/>
      <input name='q' maxlength='100'/><br/>
      Где искать?<br/>
      <select name='type'>
      <option value='1'>в названиях</option>
      <option value='2'>в описаниях</option>
      </select><br/>
      <input type='submit' class='ibutton' value='Искать'/>
      </form>
      <br/>n"
;

}
else
{
    
$q mysql_real_escape_string(check($_POST['q']));
    
$type intval($_POST['type']);
    if (
$type == 1$type 'title'; else $type 'info';

    if (empty(
$q))
    {

echo 
'Введи запрос:<br/><br/>';

    }
    else
    {

        
$query mysql_query("SELECT * FROM `fo_files` WHERE `$type` LIKE '%$q%';");
        
$i 0;
        while(
$array mysql_fetch_assoc($query))
        {
            
$title check($array['title']);
            
$info2 check($array['info']);
            
$type check($array['type']);

            echo 
"<a href='down.php?$ses&amp;module=view&amp;page=info&amp;type=$type&amp;fid=".$array['id']."'>$title</a><br/>$info2<br/>n";


            
$i++;
        }

        if (
$i == 0) echo 'Файлов не найдено!<br/>';
    echo 
"<a href='index.php?$ses&amp;module=search'>Поиск</a><br/>n";
    }
}
}

echo 
$fsize2;
echo 
$fsize1;
echo 
"<div class = 'd1'><a href="index.php?$ses">Обменник</a><br/>n
      <a href="
../enter.php?$ses">Прихожая</a></div>n";
include_once 
"../foot.php";
exit;
?>
Онлайн: 3
Реклама