<?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`) 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 "<li class='main-wrapper'><a href='/modules/?path=music' class='main2'>";

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

ECHO "<span class='menu-list-text-main'>".LG('Музыка')."</span>";

ECHO "<span class='menu-list-count-main'>".$music_count."</span>";

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