Файл: modules/video/artist.php
Строк: 48
<?php
require_once '../incfiles/core.php';
require_once '../incfiles/func.php';
require_once '../incfiles/auth.php';
require_once '../incfiles/user.php';
$id = check($_GET['artist']);
$artist=mysql_fetch_array(mysql_query("SELECT * FROM `audio` WHERE `id` = '$id' LIMIT 1"));
$artist=$artist['artist'];
$title = $artist;
require_once '../incfiles/head.php';
echo '<div class="title">
<a href="'.URL.'/?id='.$user['id'].'" onclick="Page.Go(this.href); return false">'.$user['name'].' '.$user['surname'].'</a>
</a><a class="title_a_hover" href="'.URL.'/audio/?id='.$user['id'].'" onclick="Page.Go(this.href); return false">'.lang('Моя музыка','Моя музика').'</a>
</div>';
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `audio` WHERE `artist` LIKE '%$artist%'"),0)!=0)
{
$cp = ceil($all/30);
$p = (isset($_GET['p']) and is_numeric($_GET['p']) and $_GET['p']>1 and $_GET['p']<=$cp) ? $_GET['p'] : 1;
$start = $p*10-10;
$res = mysql_query("SELECT * FROM `audio` WHERE `artist` LIKE '%$artist%' ORDER by `time` DESC LIMIT $start,30");
while ($arr = mysql_fetch_array($res)){
if($arr['dir']!=$user['id'])$add=true;else$add=false;
if($add==true)$add_me='<a href="'.URL.'/audio/refresh_playlist.php?id=track_'.$arr['id'].'" onclick="Page.Go(this.href); return false"><div class="right"><i class="fa fa-plus"></i></div></a>';
else$add_me=false;
echo '<div class="block">
<a class="track" id="track_'.$arr['id'].'" title="'.$arr['artist'].' - '.$arr['name'].'" href="'.URL.'/files/audio/'.$arr['dir'].'/'.$arr['file'].'" onclick="Track.Play(this.id,this.href,this.title); return false">
<img class="track" id="track_'.$arr['id'].'" src="'.URL.'/design/img/play.png"/></a> '.(!empty($target)?'<a href="'.URL.'/audio/select.php?fid='.$arr['id'].'&target='.check($_GET['target']).'&from='.abs(intval($_GET['from'])).'" onclick="Page.Go(this.href); return false">
<a href="'.URL.'/audio/artist.php?artist='.$arr['id'].'" onclick="Page.Go(this.href); return false"><b>'.$arr['artist'].'</b></a> - '.$arr['name'].'</a>':'<a href="'.URL.'/audio/artist.php?artist='.$arr['id'].'" onclick="Page.Go(this.href); return false"><b>'.$arr['artist'].'</b></a> - '.$arr['name']).' '.(!empty($arr['duration'])?'<font class="time"><small>(<a href="'.URL.'/?id='.$arr['dir'].'" onclick="Page.Go(this.href); return false">'.user_name3($arr['dir'],1,1).')'.$add_me.'</small></font>':'').'</div></div>';
}
navi($p,$cp,'/audio/artist.php?id='.$arr_user['id'].'&');
}
require_once '../incfiles/foot.php';
?>