Вход Регистрация
Файл: region_clean/fo/new.php
Строк: 115
<?
#######################################
## 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";

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";
}


$fid = intval($fid);
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/>';

$new = check($new);
if (
$new == 24) {
echo 'Новые файлы за сегодня:<br/><br/>';
$pg = intval($_GET['pg']);
if (empty(
$pg)) $pg = 1;


$all = mysql_result(mysql_query("SELECT COUNT(*) FROM `fo_filesWHERE `time` > '".(time() - 86400)."';"), 0);
$max = $row['max'];
if (empty(
$max)) $max = 10;
$total = intval(($all + $max - 1) / $max);
if (
$pg > $total$pg = $total;
$start = $pg * $max - $max;

$start = intval($start);
$max = intval($max);

$query = mysql_query("SELECT FROM `fo_filesWHERE `time` > '".(time() - 86400)."' ORDER BY 'id' DESC LIMIT $start$max;");
$i = 0;
while(
$array = mysql_fetch_assoc($query))
{
$fid = $array['id'];
$title = check($array['title']);
$info = check($array['info']);
$clicks = check($array['clicks']);
$time = date('d/m/Y в H:i', $array['time']);
$img = $array['url'];
if (
$array['type'] == 'pictures' OR $array['type'] == 'xxx-pictures') echo '<img src="./files/'.$array['type'].'/'.$img.'" width="20" height="20"/>';

echo "
<a href='down.php?$ses&amp;module=view&amp;page=info&amp;type=$type&amp;ext=$ext&amp;fid=$fid'>$title</a><br/><small>[$info]</small><br/>Скачан".$clicks."<br/>n";

$i++;

}
if (
$i == 0) echo 'Файлов нет!<br/>';

if (
$total > 1)
{
echo "
<br/>Страница ".$pg." из ".$total."n";
echo "
<br/><form method='post' action='new.php?$ses&amp;new=$new'>стр.<input name='pg' maxlength='3' size='3'/> <input type='submit' value='&#187;'/>
</
form>n";
}
if (
$pg != 1 AND $pg > 0) echo '<a href="new.php?$ses&amp;new='.$new.'&amp;pg='.($pg - 1).'">Пред. стр.</a><br/>';
if (
$pg != $total) echo '<a href="new.php?$ses&amp;new='.$new.'&amp;pg='.($pg + 1).'">След. стр.</a><br/>';
}
if (
$new == 48) {
echo 'Новые файлы за вчера:<br/><br/>';
$pg = intval($_REQUEST['pg']);
if (empty(
$pg)) $pg = 1;
$all = mysql_result(mysql_query("SELECT COUNT(*) FROM `fo_filesWHERE `time` > '".(time() - 172800)."';"), 0);
$max = $row['max'];
if (empty(
$max)) $max = 10;
$total = intval(($all + $max - 1) / $max);
if (
$pg > $total$pg = $total;
$start = $pg * $max - $max;
$start = intval($start);
$max = intval($max);
$query = mysql_query("SELECT FROM `fo_filesWHERE `time` > '".(time() - 172800)."' ORDER BY 'id' DESC LIMIT $start$max;");
$i = 0;
while(
$array = mysql_fetch_assoc($query))
{
$fid = $array['id'];
$title = check($array['title']);
$info = check($array['info']);
$clicks = check($array['clicks']);
$time = date('d/m/Y в H:i', $array['time']);
$img = $array['url'];
if(
$array['type'] == 'pictures' OR $array['type'] == 'xxx-pictures') echo '<img src="./files/'.$array['type'].'/'.$img.'" width="20" height="20"/>';

echo "
<a href='down.php?$ses&amp;module=view&amp;page=info&amp;type=$type&amp;ext=$ext&amp;fid=$fid'>".$title."</a><br/><small>[$info]</small><br/>Скачан".$clicks."<br/>n";

$i++;

}
if (
$i == 0) echo 'Файлов нет!<br/>';

if (
$total > 1)
{

echo "
<br/>Страница ".$pg." из ".$total."n";
echo "
<br/><form method='post' action='new.php?$ses&amp;new=$new'>стр.<input name='pg' maxlength='3' size='3'/> <input type='submit' value='&#187;'/>
</
form>n";

}

if (
$pg != 1 AND $pg > 0) echo '<a href="new.php?$ses&amp;new='.$new.'&amp;pg='.($pg - 1).'">Пред. стр.</a><br/>';
if (
$pg != $total) echo '<a href="new.php?$ses&amp;new='.$new.'&amp;pg='.($pg + 1).'">След. стр.</a><br/>';

}

echo 
$fsize2;
echo 
$fsize1;
echo "
<br/><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
Реклама