Файл: user/music/albom.php
Строк: 69
<?php
define('H', $_SERVER['DOCUMENT_ROOT'].'/');
require H.'sys/inc/start.php'; $num = 0 ;
require H.'sys/inc/compress.php';
require H.'sys/inc/sess.php';
require H.'sys/inc/settings.php';
require H.'sys/inc/db_connect.php';
require H.'sys/inc/ipua.php';
require H.'sys/inc/fnc.php';
require H.'sys/inc/user.php';
$id = intval($_GET['id']);
$file_id = mysql_fetch_assoc(mysql_query("SELECT * FROM `user_music` WHERE `id` = '$id' LIMIT 1"));
$albom = mysql_fetch_assoc(mysql_query("SELECT * FROM `user_music_album` WHERE `id` = '$id' LIMIT 1"));
$ank['id'] = $albom['id_user'];
$ank = get_user($ank['id']);
if(!$ank OR !$albom)
header('Location: /');
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `user_music` WHERE `id_user` = '$ank[id]' && `id_dir` = '$id'"),0);
$set['title'] = "Аудиозаписи $ank[nick] | $k_post аудиозаписей";
require H.'sys/inc/thead.php';
title().aut();
require H.'user/music/includes.php';
echo "<div class='foot'><img src='/style/icons/str2.gif' alt='*'> <a href='/id$ank[id]'>$ank[nick]</a> | <a href='/user/music/?id=$ank[id]'>Музыка</a> | <b>".htmlspecialchars($albom['name'])."</b></div>n";
if (!$k_post)
echo "<div class='mess'>Нет треков в плейлисте</div>n";
else require H.'user/music/includes.php';
$k_page = k_page($k_post,$set['p_str']);
$page = page($k_page); $track = 0;
$start = $set['p_str']*$page-$set['p_str'];
$q = mysql_query("SELECT * FROM `user_music` WHERE `id_user` = '$ank[id]' && `id_dir` = '$id' ORDER BY `id` DESC LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_assoc($q))
{
$mp3 = mysql_fetch_assoc(mysql_query("SELECT * FROM `obmennik_files` WHERE `id` = '$post[id_file]' LIMIT 1"));
$dir = mysql_fetch_assoc(mysql_query("SELECT * FROM `obmennik_dir` WHERE `id` = '$mp3[id_dir]' LIMIT 1"));
$ras = $mp3['ras'];
if ($ank['id']==$user['id'])
$user_at = " <span style='float: right;'>
<a href='/user/music/?id=$ank[id]&aid=$post[id_file]&delete'><img src='/user/music/icons/del.png'></a>
<a href='/user/music/?id=$ank[id]&edit=$post[id_file]'><img src='/user/music/icons/red.png'></a></span>";
else $user_at = null;
?><div class='nav<?=($num++%2?'1':'2')?>'><?
if ($webbrowser=='web'){
?>
<div class="track">
<div class="button">
<div class="play" id="<?=$track?>" file="/obmen<?=$dir['dir']?>/<?=$mp3['id']?>.<?=$ras?>"></div>
<div class="pause"></div>
</div>
<div class="nameTrack"><a href="/obmen<?=$dir['dir'] . $mp3['id']?>.<?=$ras?>">
<img src="/style/icons/d.gif" alt="*"></a> <?=htmlspecialchars(mb_substr($mp3['name'],0,40,'utf-8'))?> (<?=size_file($mp3['size'])?>) <?=$user_at?></div>
<div class="clear"></div>
</div>
<?
}else{
?>
<a href="/obmen<?=$dir['dir'] . $mp3['id']?>.<?=$ras?>">
<img src="/style/icons/d.gif" alt="*"></a> <?=htmlspecialchars(mb_substr($mp3['name'],0,40,'utf-8'))?> (<?=size_file($mp3['size'])?>) <?=$user_at?>
<?
}
?></div><? $track++;
}
?></div><?
if ($k_page>1)str('?id='.$id.'&',$k_page,$page);
echo "<div class='foot'><img src='/style/icons/str2.gif' alt='*'> <a href='/id$ank[id]'>$ank[nick]</a> | <a href='/user/music/?id=$ank[id]'>Музыка</a> | <b>".htmlspecialchars($albom['name'])."</b></div>n";
require H.'sys/inc/tfoot.php';