Файл: modules/video1/user.php
Строк: 65
<?php
require_once '../../incfiles/core.php';
require_once '../../incfiles/func.php';
require_once '../../incfiles/auth.php';
require_once '../../incfiles/user.php';
if (!empty($_GET['id']) && is_numeric($_GET['id']))
{
    $id = abs(intval($_GET['id']));
    
    $result=mysqli_query($dbi, "SELECT * FROM `users` WHERE `id` = '".$id."'");
    $result=mysqli_fetch_array($result);
    //if (mysqli_num_rows($result) == false)go(URL);
}
else go(URL);
  $autor=mysqli_query($dbi, "SELECT * FROM `video` WHERE `user` = '".intval($id)."'");
  $autor=mysqli_fetch_array($autor);
    $title = ''.lang('Каталог','Каталог');
    require_once '../../incfiles/head.php';
    
    
    
    echo '<div class="title">
    <a class="title_a_hover" href="'.URL.'/video/index::user::'.$id.'" onclick="Page.Go(this.href); return false">'.user_name3($autor['user']).'</a>
    <a class="title_a_hover" href="'.URL.'/video/index::add" onclick="Page.Go(this.href); return false">'.lang('Добавить видео','Додати відео').'</a>
        <a class="title_a_hover" href="'.URL.'/video/index::catalog" onclick="Page.Go(this.href); return false">'.lang('Каталог','Каталог').'</a></div>
    </div>';
    echo'<div class="block">';
?>
    <style>
    .sign {
    float: left; /* Выравнивание по правому краю */
    border: 1px solid #333; /* Параметры рамки */
    padding: 7px; /* Поля внутри блока */
    margin: 10px 0 5px 5px; /* Отступы вокруг */
    background: #FFF; /* Цвет фона */ 
          }
   .sign figcaption {
    margin: 0 auto 5px; /* Отступы вокруг абзаца */
    width:170px;
                    }
  </style>
  
    
</head>
<?
    $query = mysqli_query($dbi, "SELECT * FROM `video` where user = ".$id." ORDER BY `time` DESC");
    if (!mysqli_num_rows($query)) {
            echo lang('Нету видео','Немає відео');
            echo "</br>";
    } else {
        $cp = ceil($all/30);
        $p = (isset($_GET['p']) and is_numeric($_GET['p']) and $_GET['p']>1 and $_GET['p']<=$cp) ? $_GET['p'] : 1;
        $start = $p*10-10;
         
            while ($video = mysqli_fetch_array($query))
            {
                   $v_id=getYoutubeVideoID($video['link']);
                   $findfs   = 'http://fs.to/video/';
                   $posfs = strpos($video['link'], $findfs);
                   // echo "".text_view($video['link'])."";
                  echo'
                    <a href="'.URL.'/video/index::view::'.$video['id'].'" onclick="Page.Go(this.href); return false">';
                   if($posfs === false){ 
                   echo'<figure class="sign">
   <p><img src="http://img.youtube.com/vi/'.$v_id.'/1.jpg" width="173" height="100" alt="'.$video['name'].'"></p>
   <figcaption>'.$video['name'].'</figcaption>
  </figure></a>';
                }else{    
                echo'<figure class="sign">
   <p><img src="http://touchit.com.ua/static/images/post/10-2013/17/fsua.png" width="173" height="100" alt="'.$video['name'].'"></p>
   <figcaption>'.$video['name'].'</figcaption>
  </figure></a>';
                }
                
            }
        
        navi($p,$cp,'/video/index::user::'.$id.'/?');
           }
            ?>       
    
<?  
echo'</div>';   
require_once '../../incfiles/foot.php';
?>