<?php
  
IF (ISSET($_SESSION['search'])){
  
  $search = STRIPSLASHES(HTMLSPECIALCHARS($_SESSION['search']));
  
}ELSE{
  
  $search = NULL;
  
}
  
$music = DB::GET_STRING_ALL("SELECT `MUSIC`.`ID` FROM `MUSIC` LEFT JOIN `MUSIC_DIR` ON (`MUSIC_DIR`.`ID` = `MUSIC`.`ID_DIR` OR `MUSIC_DIR`.`ID_DIR` = `MUSIC`.`ID_DIR`) WHERE `PRIVATE` = '0' AND (`MUSIC`.`NAME` LIKE '%".$search."%' OR `MUSIC`.`FACT_NAME` LIKE '%".$search."%' OR `MUSIC`.`ARTIST` LIKE '%".$search."%' OR `MUSIC`.`GENRE` LIKE '%".$search."%') GROUP BY `MUSIC`.`ID`");

$column = 0;

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

IF ($column >= 1){
  
  ECHO "<a href='/modules/?path=search&type=music'><div class='list-menu hover'>";
  ECHO "".ICONS('music', 15, 'fa-fw')." ".LG('Музыка')." <span class='count'>".$column."</span>";
  ECHO "</div></a>";
  
}
  
?>