Файл: vkollektive2014/user/shared_zona/info.php
Строк: 76
<?
/*
# by gold_spaces
*/
include '../../connect.php';
include '../../head.php';
include 'func.php';
include '../../bb_code.php';
$id = abs(intval($_GET['id']));
$info = mysql_fetch_assoc(mysql_query("SELECT * FROM `down` WHERE `id` = '$id' LIMIT 1"));
echo '<div class="title">Файл: '.$info['name'].'</div>';
if(!$info){
header('location:/');
}
$ext = strtolower(end(explode('.', $info['file'])));
$opis = (!empty($info['opis'])) ? $info['opis'] : 'Без описания';
$size = size($info['size']);
echo '<div class="main">';
include '../../bb_code.php'; echo 'Название: '.$info['name'].'<br/>'; echo 'Описание: '.$opis.'<br/>';
$usr = mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = '$info[id_us]' limit 1"));
echo 'Добавлен: '.vremya($info['time']).'<br/>Выгрузил: <a href="/page.php?id='.$usr['id'].'">'.$usr['login'].'</a><br/>';
if($ext == 'jpg' || $ext == 'png' || $ext == 'jpeg' || $ext == 'gif'){
echo '<img src="'.$info['file'].'" alt="*" width="108"/><br/>';
}
if (($ext == 'avi' || $ext == 'flv' || $ext == 'swf' || $ext == 'mp4') && (
!$h_ua ||
strpos($h_ua, 'windows') !== false ||
strpos($h_ua, 'linux') !== false ||
strpos($h_ua, 'bsd') !== false ||
strpos($h_ua, 'x11') !== false ||
strpos($h_ua, 'unix') !== false ||
strpos($h_ua, 'macintosh') !== false ||
strpos($h_ua, 'macos') !== false)){
echo '<br/>object type="application/x-shockwave-flash" data="audio_player.swf" id="audioplayer1" height="24" width="288"›
‹param name="movie" value="audio_player.swf"›‹/param›
‹param name="FlashVars" value="playerID=1&autostart=no&bg=0xffffff&loader=0xefcda5&border=0xff8b00&text=0x945100&leftbg=0xff8b00&lefticon=0xffffff&righticon=0xffffff&slider=0xff8b00&rightbg=0xff8b00&soundFile=Greb.mp3"›‹/param›
‹param name="quality" value="high"›‹/param›
‹param name="menu" value="false"›‹/param›
‹param name="wmode" value="transparent"›‹/param›
‹/object› <br/>';
}
if ($ext == '3gp' || $ext == 'mp4' && extension_loaded('ffmpeg')){
echo '<br/><img src="ffmpeg.php?fid='.$info['file'].'" alt="preview"/><br/>';
}
if ($ext == 'mp3') {
include 'classAudioFile.php';
$AF = new AudioFile;
$AF->loadFile($info['file']);
$AF->printSampleInfo();
}
if(isset($_GET['del']) and $u['admin']==1){
mysql_query("DELETE FROM `down` where `id` = '$id' limit 1");
unlink($info['file']);
header('location:list.php?id='.$info['id_pr']);
}
if(isset($_GET['down'])){
mysql_query("UPDATE `down` SET `clicks` = `clicks` + '1' WHERE `id` = '$info[id]' LIMIT 1");
header('Location: '.$info['file']);
}
$size = filesize($info['file']);
echo 'Скачан: '.$info['clicks'].' рaз<br/>';
echo '<a href="info.php?id='.$id.'&down">Скачать('.size($size).')</a><br/>
<input type="text" value="http://'.check($_SERVER['HTTP_HOST']).'/down/'.$info['file'].'"/>';
echo '</div>';
if($u['admin']==1){echo'<div class="div"><a href="?id='.$id.'&del">Удалить</a></div>';}
echo '</div>';
include '../../foot.php';
?>