<?php
  
$sql = "SELECT `MUSIC`.`ID`,`MUSIC`.`ID_DIR` FROM `MUSIC` LEFT JOIN `MUSIC_DIR` ON (`MUSIC_DIR`.`ID` = `MUSIC`.`ID_DIR` OR `MUSIC_DIR`.`ID_DIR` = `MUSIC`.`ID_DIR`) AND `MUSIC`.`USER_ID` = '".$user['ID']."' WHERE `PRIVATE` = '0' GROUP BY `MUSIC`.`ID`";
  
$count = DB::GET_STRING_ALL($sql);

$music = 0;

WHILE ($count->FETCH()){ $music++; }

IF ($music > 5000){
  
  $music_count = "5000+";
  
}ELSE{
  
  $music_count = $music;

}

ECHO "<a href='/modules/?path=music&section=users&id=".$user['ID']."'><div class='list-menu hover'>"; 

S_ICONS('music', 'small', '#FF665B', '#D14A41');

ECHO " <span class='menu-icons-optimize'>".LG('Музыка')." <span class='count'>".$music."</span></span>";

ECHO "</div></a>";
  
?>