Файл: archive/www/musimka.ru/user/shared_zona/info.php
Строк: 94
<?
/*
# 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="/'.$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="flvplayer.swf" height="137" width="245">
<param name="bgcolor" value="#b4c8e9"/>
<param name="allowFullScreen" value="true"/>
<param name="allowScriptAccess" value="always"/>
<param name="movie" value="flvplayer.swf"/>
<param name="FlashVars" value="way='.$info['file'].'&swf=flvplayer.swf&w=300&h=400&pic=ffmpeg.php?file='.$info['file'].'&autoplay=0&tools=1&skin=black&volume=70&q=&comment=" />
</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') {
echo '<script type="text/javascript" src="audio-player.js"></script>
<script type="text/javascript">
AudioPlayer.setup
(
"player.swf",
{
width:"320",
animation:"yes",
encode:"no",
initialvolume:"70",
remaining:"yes",
noinfo:"no",
buffer:"5",
checkpolicy:"no",
rtl:"no",
bg:"064a91",
text:"000000",
leftbg:"064a91",
lefticon:"fee300",
volslider:"fee300",
voltrack:"ffffff",
rightbg:"064a91",
rightbghover:"064a91",
righticon:"fee300",
righticonhover:"fee300",
track:"FFFFFF",
loader:"fee300",
border:"D2F0FF",
tracker:"fee300",
skip:"ff284b",
pagebg:"064a91",
transparentpagebg:"yes"
}
);
</script><p id="audioplayer_1">Ошибка! Требуется установить Adode Flash player.</p>
<script type="text/javascript">
AudioPlayer.embed
(
"audioplayer_1",
{
soundFile: "'.$info['file'] . '" | titles: "" | artists: "" | autostart: "no"
}
);
</script><br/>';
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="cred"><a href="?id='.$id.'&del">Удалить</a></div>';}
echo '</div>';
include '../../foot.php';
?>