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

Размер файла: 3.4Kb
<?php
  
/*
----
Фото
----
*/
  
IF ($f_list['TYPE'] == 'photos'){
  
  $photos = DB::GET_STRING("SELECT * FROM `PHOTOS` WHERE `ID` = '".$f_list['OBJECT_ID']."' LIMIT 1");
  
  IF (ISSET($photos['ID'])){
    
    ECHO "<a load='none' href='/photo/source/".$photos['ID_DIR']."/".$photos['ID']."/'>";
    ECHO "<img class='img' src='/photo/source/".$photos['ID_DIR']."/".$photos['ID']."/' style='max-width: 200px;'><br />";
    ECHO FILE::ICONS($photos['EXT'], 'small');
    ECHO " ".CROP_TEXT($photos['NAME'], 0, 20)."";
    ECHO "</a><br />";
    
  }ELSE{
    
    ECHO "<font color='red'>".LG('Объект не найден или был удален')."</font><br />";
    
  }
  
}

/*
-----
Видео
-----
*/
  
IF ($f_list['TYPE'] == 'videos'){
  
  $videos = DB::GET_STRING("SELECT * FROM `VIDEOS` WHERE `ID` = '".$f_list['OBJECT_ID']."' LIMIT 1");
  
  ECHO "<a href='/modules/?path=videos&section=show&video_id=".$videos['ID']."'>";
  ECHO "<table style='width: 100%;'><tr>";
  ECHO "<td class='td-file'>";
  ECHO FILE::ICONS($videos['EXT']); 
  ECHO "</td>";
  ECHO "<td class='td-file2'>";
  ECHO "<b><font color='#535D61'>".CROP_TEXT(TEXT_ABSOLUTE($videos['NAME']), 0, 25).".".TEXT_ABSOLUTE($videos['EXT'])."</font></b><br />";
  ECHO "<span class='time'>".FTIME($videos['TIME'])."</span><br />";
  ECHO "<span class='count'>".SIZE_FILE($videos['SIZE'])."</span><br />";
  ECHO "</td>";
  ECHO "</tr></table>";
  ECHO "</a>";
  
}

/*
------
Музыка
------
*/
  
IF ($f_list['TYPE'] == 'music'){
  
  $music = DB::GET_STRING("SELECT * FROM `MUSIC` WHERE `ID` = '".$f_list['OBJECT_ID']."' LIMIT 1");
  
  IF (ISSET($music['ID'])){
    
    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><br />";
  
  }ELSE{
    
    ECHO "<font color='red'>".LG('Объект не найден или был удален')."</font><br />";
    
  }
  
}

/*
----
Файл
----
*/
  
IF ($f_list['TYPE'] == 'files'){
  
  $files = DB::GET_STRING("SELECT * FROM `FILES` WHERE `ID` = '".$f_list['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 />";
    
  }
  
}
  
?>