Просмотр файла 2/3020.ru/users/attachments/plugins/inc_news_list.php

Размер файла: 2.66Kb
<?php
  
IF ($list2['TYPE'] == "files"){
  
  $files = DB::GET_STRING("SELECT * FROM `FILES` WHERE `ID` = '".$list2['OBJECT_ID']."' LIMIT 1");
  
  IF (ISSET($files['ID'])){
    
    ECHO "<a href='/modules/?path=files&section=show&id=".$files['ID']."'>";
    ECHO "<table style='width: 100%;'><tr>";
    ECHO "<td class='td-file'>";
    ECHO FILE::ICONS($files['EXT']); 
    ECHO "</td>";
    ECHO "<td class='td-file2'>";
    ECHO "<b><font color='#535D61'>".CROP_TEXT(TEXT_ABSOLUTE($files['NAME']), 0, 25).".".TEXT_ABSOLUTE($files['EXT'])."</font></b><br />";
    ECHO "<span class='time'>".FTIME($files['TIME'])."</span><br />";
    ECHO "<span class='count'>".SIZE_FILE($files['SIZE'])."</span><br />";
    ECHO "</td>";
    ECHO "</tr></table>";
    ECHO "</a>";
  
  }ELSE{
    
    ECHO "<font color='red'>".LG('Объект не найден или был удален')."</font><br />";
    
  }

}

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 "<a href='/modules/?path=photos&section=show&photo_id=".$photo['ID']."'><img class='img' src='/photo/260x600/".$photo['ID_DIR']."/".$photo['ID']."/' style='max-width: 97%;'></a>";

}

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>";

}

?>