Файл: foto/img.php
Строк: 45
<?
include_once '../sys/inc/start.php';
//include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/downloadfile.php';
//include_once '../sys/inc/user.php';
//header("Last-Modified: ".gmdate("D, d M Y H:i:s", filemtime($time))." GMT");
//header("Expires: ".gmdate("D, d M Y H:i:s", time() + 3600)." GMT");
if (!isset($_GET['id']) || !isset($_GET['size']))exit;
$size=intval($_GET['size']);
$if_foto=intval($_GET['id']);
$foto=mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery_foto` WHERE `id` = '$if_foto' LIMIT 1"));
if ($size=='48')
{
if (is_file(H.'sys/gallery/48/'.$if_foto.'.'.$foto['ras'].''))
{
DownloadFile(H.'sys/gallery/48/'.$if_foto.'.'.$foto['ras'].'', 'Фото.'.$foto['ras'].'', ras_to_mime(''.$foto['ras'].''));
exit;
}
if (is_file(H.'sys/gallery/48/'.$if_foto.'.'.$foto['ras'].''))
{
DownloadFile(H.'sys/gallery/48/'.$if_foto.'.'.$foto['ras'].'', 'Фото.'.$foto['ras'].'', ras_to_mime(''.$foto['ras'].''));
exit;
}
if (is_file(H.'sys/gallery/48/'.$if_foto.'.'.$foto['ras'].''))
{
DownloadFile(H.'sys/gallery/48/'.$if_foto.'.'.$foto['ras'].'', 'Фото.'.$foto['ras'].'', ras_to_mime(''.$foto['ras'].''));
exit;
}
}
if ($size=='128')
{
if (is_file(H.'sys/gallery/128/'.$if_foto.'.'.$foto['ras'].''))
{
DownloadFile(H.'sys/gallery/128/'.$if_foto.'.'.$foto['ras'].'', 'Фото.'.$foto['ras'].'', ras_to_mime(''.$foto['ras'].''));
exit;
}
}
if ($size=='50')
{
if (is_file(H.'sys/gallery/50/'.$if_foto.'.'.$foto['ras'].''))
{
DownloadFile(H.'sys/gallery/50/'.$if_foto.'.'.$foto['ras'].'', 'Фото.'.$foto['ras'].'', ras_to_mime(''.$foto['ras'].''));
exit;
}
}
if ($size=='640')
{
if (is_file(H.'sys/gallery/640/'.$if_foto.'.'.$foto['ras'].''))
{
DownloadFile(H.'sys/gallery/640/'.$if_foto.'.'.$foto['ras'].'', 'Фото.'.$foto['ras'].'', ras_to_mime(''.$foto['ras'].''));
exit;
}
}
if ($size=='0')
{
if (is_file(H.'sys/gallery/foto/'.$if_foto.'.'.$foto['ras'].''))
{
DownloadFile(H.'sys/gallery/foto/'.$if_foto.'.'.$foto['ras'].'', 'foto_'.$if_foto.'.'.$foto['ras'].'', ras_to_mime(''.$foto['ras'].''));
exit;
}
}
?>