Файл: users/attachments/plugins/inc_files.php
Строк: 23
<?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");
IF (ISSET($videos['ID'])){
IF (IS_FILE(ROOT.'/files/upload/videos/screen/'.$videos['ID'].'.jpg') && CONFIG('VIDEO_SCREEN') == 1){
$vv = "/files/upload/videos/screen/".$videos['ID'].".jpg";
}ELSE{
$vv = "/files/upload/videos/screen/no_video.jpg";
}
ECHO "<video poster='".$vv."' style='width: 80%;' src='/video/".$videos['ID_DIR']."/".$videos['ID']."/show/' controls></video><br />";
ECHO "<a href='/modules/?path=videos§ion=show&video_id=".$videos['ID']."'>";
ECHO FILE::ICONS($videos['EXT'], 'small');
ECHO " ".CROP_TEXT($videos['NAME'], 0, 20)."";
ECHO "</a><br />";
}ELSE{
ECHO "<font color='red'>".LG('Объект не найден или был удален')."</font><br />";
}
}
/*
------
Музыка
------
*/
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 />";
}
}
?>