View file 2/3020.ru/users/profile/tape/components/user_video.php

File size: 1.7Kb
<?php
  
$video = DB::GET_STRING("SELECT `ID`,`NAME`,`USER_ID`,`ID_DIR`,`EXT` FROM `VIDEOS` WHERE `ID` = '".$list['OBJECT_ID']."' LIMIT 1");
$account = DB::GET_STRING("SELECT `ID`,`SEX` FROM `USERS` WHERE `ID` = '".$list['OBJECT_ID_LIST']."' LIMIT 1");
$dir = DB::GET_STRING("SELECT `ID`,`NAME` FROM `VIDEOS_DIR` WHERE `ID` = '".$video['ID_DIR']."' LIMIT 1");

USER::LOGIN($account['ID'], 1, 1);

IF (ISSET($dir['ID'])){
  
  $id_dir = $dir['ID'];
  $dir_link = "<a href='/modules/?path=videos&section=users&id=".$video['USER_ID']."&dir=".$dir['ID']."'>".TEXT_ABSOLUTE($dir['NAME'])."</a>";
  
}ELSE{
  
  $id_dir = 0;
  $dir_link = "<a href='/modules/?path=videos&section=users&id=".$video['USER_ID']."'>".LG('Без альбома')."</a>";
  
}

IF ($account['SEX'] == 2){
  
  ECHO " ".LG('добавила видео в свой альбом').": ".$dir_link."";
  
}ELSE{
  
  ECHO " ".LG('добавил видео в свой альбом').": ".$dir_link."";
  
}

ECHO "<br /><span class='time'>".STIME($list['TIME'])."</span></br /></br />";

IF (!ISSET($video['ID'])){
  
  ECHO "<font color='red'>".LG('Объект был удален')."</font>";
  
}ELSE{
  
  ECHO "<center>";
  
  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 poster='".$vv."' style='width: 90%;' src='/files/upload/videos/source/".$video['ID'].".".$video['EXT']."' controls></video>";
  
  ECHO "</center>";
  
  ECHO "<a href='/modules/?path=videos&section=show&video_id=".$video['ID']."'>".TEXT_ABSOLUTE($video['NAME'])."</a>";
  
}
  
?>