Вход Регистрация
Файл: inc_files/image.php
Строк: 43
<?php

/**
 * @author [FaNiska]
 * @copyright 2009
 * Загруз центр
 * Предложения, идеи, вопросы и об ошибках писать в icq 65-64-538 или на mobi-m-ru@ya.ru
 */
if (!empty($file_info['about']))
{
    echo 
"<div> Описание:<br />$file_info[about]</div>";
} else
{ 
/// Если нет описания, проверяем его в текстовых файлах.
    
$path = eregi_replace($f_ras.'$', '', $file_info['s_name']);
    if (
is_file($path . 'txt'))
    {
        
$file_info['about'] = txt_out_dc(file_get_contents($path . 'txt'));
    } elseif (
is_file($path . 'TXT'))
    {
        
$file_info['about'] = txt_out_dc(file_get_contents($path . 'TXT'));
    } elseif (
is_file($path . 'opis'))
    {
        
$file_info['about'] = txt_out_dc(file_get_contents($path . 'opis'));
    } elseif (
is_file($path . 'OPIS'))
    {
        
$file_info['about'] = txt_out_dc(file_get_contents($path . 'OPIS'));
    } elseif (
is_file('about/' . $path . 'opis'))
    {
        
$file_info['about'] = txt_out_dc(file_get_contents('about/' . $path . 'opis'));
    } elseif (
is_file('about/' . $path . 'txt'))
    {
        
$file_info['about'] = txt_out_dc(file_get_contents('about/' . $path . 'txt'));
    }

    if (!empty(
$file_info['about']))
    {
        echo 
"<div> Описание:<br />$file_info[about]</div>";
        
mysql_query("UPDATE `$table` SET `about`=" . quote_smart($file_info['about']) . " WHERE `id`='" . $file_info['id'] .
        
"' LIMIT 1");
    }
    

}
//  удаляем временный файл, если он есть
@unlink('temp/' . $_SERVER['SERVER_NAME'] . '_' . $table . '_' . $id . '.' . $f_ras);
echo 
'<div>';
$arr = array('130x130', '120x160', '132x176', '176x220', '240x320');
$x = '(Оригинал)';
if (
function_exists('getimagesize'))
{
    
$img_size = getimagesize($file_info['s_name']);
    
$x = "($img_size[0]X$img_size[1])";
}
echo 
'<div> Скриншот:<br />
        <img src="image.php?c=' 
. $table . '&amp;id=' . $id . '&amp;W=' . $prev_w . '&amp;H=' . $prev_h . '" alt="скачать ' .
    
$file_name . '"/><br />
        <img src='
ext/' . $f_ras . '.gif' alt='+' width='16' height='16'/> Скачать изображение ' . $f_ras . ' ' . $x .
    
':<br />';
if (
function_exists('getimagesize'))
{
    
$img_size = getimagesize($file_info['s_name']);
    echo 
'<a href="load_img.php?c=' . $table . '&amp;id=' . $id . '">' . $name . ' ' . $f_ras . ' ' . $x . '</a>';

} else
{
    echo 
'<a href="load_img.php?c=' . $table . '&amp;id=' . $id . '">' . $name . ' ' . $f_ras . '</a>';
}

echo 
'</div><br />';
if (
$f_ras == 'gif')
{
    echo (
'<span style="font-size: x-small;">(При изменении размера картинка GIF перестанет быть анимированной)</span><br />');
}

if (isset(
$d_w) && isset($d_h))
{
    echo 
'<div><a href="image.php?c=' . $table . '&amp;id=' . $id . '&amp;act=d&amp;W=' . $d_w . '&amp;H=' . $d_h . '">Скачать ' . $d_w .
        
'x' . $d_h . '</a></div><br />';
} else
{
    echo 
'<div><b>Размер:</b><br/>';
    foreach (
$arr as $v)
    {
        list(
$W, $H) = explode('x', $v);
        echo 
'<a href="image.php?c=' . $table . '&amp;id=' . $id . '&amp;act=d&amp;W=' . $W . '&amp;H=' . $H . '">' .
            
$v . '</a> / ';
    }
    echo 
'</div><br />';
}
echo 
'</div>';

?>
Онлайн: 1
Реклама