<?php

IF ($list2['TYPE'] == "videos"){
  
  $video = DB::GET_STRING("SELECT `ID`,`ID_DIR` FROM `VIDEOS` WHERE `ID` = '".$list2['OBJECT_ID']."' LIMIT 1");
  
  IF (IS_FILE(ROOT.'/files/upload/videos/screen/'.$video['ID'].'.jpg') && CONFIG('VIDEO_SCREEN') == 1){
    
    $vv = "/files/upload/videos/screen/".$video['ID'].".jpg";
  
  }ELSE{
    
    $vv = "/files/upload/videos/screen/no_video.jpg";
  
  }
  
  ECHO "<video class='img' poster='".$vv."' style='width: 97%; height: 240px;' src='/video/".$video['ID_DIR']."/".$video['ID']."/show/' controls></video>";

}

IF ($list2['TYPE'] == "photos"){
  
  $photo = DB::GET_STRING("SELECT `ID`,`ID_DIR` FROM `PHOTOS` WHERE `ID` = '".$list2['OBJECT_ID']."' LIMIT 1");
  
  ECHO "<img class='img' src='/photo/260x600/".$photo['ID_DIR']."/".$photo['ID']."/' style='max-width: 97%;'>";

}

IF ($list2['TYPE'] == "music"){
  
  $music = DB::GET_STRING("SELECT `ID`,`NAME`,`ARTIST`,`USER_ID`,`ID_DIR` FROM `MUSIC` WHERE `ID` = '".$list2['OBJECT_ID']."' LIMIT 1");
  
  ECHO "<table style='width: 100%;'><tr>";
  ECHO "<td class='td-file'>";
  
  ?>      
  <button action="/system/AJAX/AlphaPlayer/session.php?path=<?=$music['USER_ID']?>&type=users&dir=<?=$music['ID_DIR']?>&id_music=<?=$music['ID']?>" id="play-status<?=$music['ID']?>" onclick="MusicPlay(<?=$music['ID']?>)" class="play-status-off play-button-style"><i class="fa fa-play fa-fw"></i></button>
  <?
    
  ECHO FILE::ICONS('mp3'); 
  
  ECHO "</td>";
  
  ECHO "<td class='td-file2'>";
  
  ECHO "<b>".CROP_TEXT(TEXT_ABSOLUTE($music['NAME']), 0, 38)."</b><br />";
  
  ECHO "<font color='#686C6F'><small>".CROP_TEXT(TEXT_ABSOLUTE($music['ARTIST']), 0, 38)."</small></font><br />";
  
  ECHO "</td>";
  
  ECHO "</tr></table>";

}

?>