Файл: shared_zone/see.php
Строк: 88
<?
include('../core/core.php');
include(MAINDIR.'style/head.php');
$id = abs(intval($_GET['id']));
switch ($mode):
case 'index':
$file = DB::run() -> queryFetch("SELECT * FROM `files` WHERE `id`=? LIMIT 1",array($id));
if($file['id'] == !NULL){
$type = $file['type'];
echo '<div class="title">'.$file['name'].'</div>';
title($file['name']);
echo'<div class="menu">';
$rat = $file['plus'] - $file['minus'];
if($type == 'jpg' || $type == 'jpeg' || $type == 'gif' || $type == 'png') {
$files = '../obmen/files/'.$file['name'].'';
$imgsize = getimagesize($files);
if($imgsize[0] >= 150){$x = 150; } else { $x = $imgsize[0]; }
if($imgsize[1] >= 100){$y = 100; } else { $y = $imgsize[1]; }
echo'<img src="'.$files.'" width="'.$x.'" height="'.$y.'"><br />';
}
$new_scrin = '../obmen/files_img/'.$file['name'].'.png';
if (file_exists($new_scrin)) {
$imgsize = getimagesize($new_scrin);
if($imgsize[0] >= 150){$xe = 150; } else { $xe = $imgsize[0]; }
if($imgsize[1] >= 100){$ye = 100; } else { $ye = $imgsize[1]; }
echo'<img src="'.$new_scrin.'" width="'.$xe.'" height="'.$ye.'"><br />';
}
if($type == 'mp4' || $type == 'avi' || $type == '3gp' || $type == 'rmvb' || $type == 'wmv' || $type == 'mkv' || $type == 'mpg' || $type == 'mov' || $type == 'vob' || $type == 'flv'){
echo'<img src="/shared_zone/get_video.php?id='.$file['id'].'" width="150" height="100"><br />';
}
echo'
Вес: '.$file['kb'].' кб<br />
Загружен: '.$file['data'].'<br />
Загрузил: <a href="/profile/'.$file['login'].'/">'.$file['login'].'</a><br />
Описание:<br />
'.$file['opi'].'<hr>
<img src="/images/comment_4811.png"> <a href="/shared_zone/com.php?mode=index&id='.$file['id'].'">Комментарии</a> ['.count_all('files_com','file',$file['name']).']<br />
Рейтинг <strong>'.$rat.' </strong> (+'.$file['plus'].' / -'.$file['minus'].') [<a href="/shared_zone/?mode=rat&cm=p&id='.$id.'">Плюс</a> / <a href="/shared_zone/?mode=rat&cm=m&id='.$id.'">Минус</a>]<br />
Скачиваний: <strong>'.$file['count'].'</strong>';
echo'</div>';
if($type == 'mp3' || $type == 'wma' || $type == 'flac' || $type == 'aac' || $type == 'mmf' || $type == 'amr' || $type == 'm4a' || $type == 'm4r' || $type == 'ogg' || $type == 'mp2' || $type == 'wav' || $type == 'mpeg'){
echo'<div class="menu">';
echo'<object type="application/x-shockwave-flash" data="http://'.SITE.'/images/ump3player_500x70.swf" height="43" width="292"><param name="wmode" value="transparent" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="movie" value="http://'.SITE.'/images/ump3player_500x70.swf" /><param name="FlashVars" value="way=/obmen/files/'.$file['name'].'&swf=http://'.SITE.'/images/ump3player_500x70.swf&w=292&h=43&time_seconds=0&autoplay=0&q=&skin=black&volume=100&comment=" /></object><br />';
if($file['kb'] >= 0){
$path = '../obmen/files/'.$file['name'].'';
$movie = new ffmpeg_movie($path);
if($movie->getAudioChannels() == 1){$a = 'Mоно'; } else { $a = 'Cтерео'; }
$bit = round($movie->getBitRate() / 1000);
$hit = round($movie->getAudioSampleRate() / 1000);
echo'<span style="font-size: 9px;"><div align="right">Битрейт: '.$bit.' kbps<br />
Частота: '.$hit.' KHz<br />
Время: '.formattime($movie->getDuration()).'<br />
Канал: '.$a.'</div></span>';
echo'</div>';
}
}
echo'<div class="menu">';
if($download == 'user'){
if(is_user()){
echo'<img src="/images/dwn.png"> <a href="/load/'.$id.'">Cкачать</a>';
} else { echo'Cкачивать файлы могут только пользователи!'; }
} else {
if(is_user()){
echo'<img src="/images/dwn.png"> <a href="/load/'.$id.'">Cкачать</a>';
} else {
echo'<form action="/load/'.$id.'" method="post">
<img src="/sys/capatcha.php"/><br>
Bвeдитe Koд:<br>
<input type="text" name="code" size="7" maxlength="6">
<input type="submit" value="Скачать">
</form>';
}
}
echo'</div>';
echo'<div class="menu">';
echo'<img src="/images/for.png"> <a href="/shared_zone/spam.php?mode=index&id='.$file['id'].'">Пожаловаться на файл</a>';
echo'</div>';
} else {echo'<div class="menu">Файл не найден!</a></div>';}
break;
default:
header ('location: ?mode=index');
endswitch;
include(MAINDIR.'style/foot.php');
?>