Файл: modules/video1/view1.php
Строк: 92
<?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 `video` WHERE `id` = '".$id."'");
$result=mysqli_fetch_array($result);
//if (mysqli_num_rows($result) == false)go(URL);
}
else go(URL);
$title = $user['name'].' '.$user['surname'].' :: '.lang('Информация','Інформація');
if ($window == false) require_once '../../incfiles/head.php';
echo user_access_page($arr_user);
$link_id=getYoutubeVideoID($result['link']);
?>
<style>
#parent_popup {
background: #fff;
height: 100%;
opacity: 10;
position: fixed;
width: 100%;
z-index: 100;
top: 0;
left: 0;
}
#popup {
background-color: #CCFFFF;
height: 500px;
position: fixed;
top: 100px;
left: 13%;
color: #f00;
width: 900px;
}
</style>
</head>
<?
$findfs = 'http://fs.to/video/';
$posfs = strpos($result['link'], $findfs);
if($posfs === false){
?>
<div id="parent_popup">
<div id="popup">
<div class="title"><div class="for_pc right">
<a href="/video/index::user::<?=$result['user']?>" onclick="document.getElementById('parent_popup').style.display='none';"><img src="<?=URL?>/design/img/del.png"/></a>
</div>
<a class="title_a_hover" href="<?=URL?>/?id=<?=$user_id?>" onclick="Page.Go(this.href); return false"><?=$user['name']?> <?=$user['surname']?></a></div>
<head>
<script type='text/javascript' src='<?=URL?>/modules/video/unitegallery/js/jquery-11.0.min.js'></script>
<script type='text/javascript' src='<?=URL?>/modules/video/unitegallery/js/unitegallery.min.js'></script>
<link rel='stylesheet' href='<?=URL?>/modules/video/unitegallery/css/unite-gallery.css' type='text/css' />
<script type='text/javascript' src='<?=URL?>/modules/video/unitegallery/themes/video/ug-theme-video.js'></script>
<link rel='stylesheet' href='<?=URL?>/modules/video/unitegallery/themes/video/skin-right-thumb.css' type='text/css' />
</head>
<div id="gallery" style="display:none;">
<div data-type="youtube"
data-title="<?=$result['name']?>"
data-description="<?=$result['view']?>"
data-thumb="https://i.ytimg.com/vi/<?=$link_id?>/mqdefault.jpg"
data-image="https://i.ytimg.com/vi/<?=$link_id?>/sddefault.jpg"
data-videoid="<?=$link_id?>" ></div>
<?
$who_id=mysqli_query($dbi, "SELECT * FROM `users` WHERE `id` = '".intval($result['user'])."'");
$who_id=mysqli_fetch_array($who_id);
$query = mysqli_query($dbi, "SELECT * FROM `video` where user = '".$who_id['id']."' ORDER BY `time` DESC");
while ($post = mysqli_fetch_array($query))
{
$v_id=getYoutubeVideoID($post['link']);
$findfs = 'http://fs.to/video/';
$posfs = strpos($post['link'], $findfs);
if($posfs === false){
?>
<div data-type="youtube"
data-title="<?=$post['name']?>"
data-description="<?=$post['view']?>"
data-thumb="https://i.ytimg.com/vi/<?=$v_id?>/mqdefault.jpg"
data-image="https://i.ytimg.com/vi/<?=$v_id?>/sddefault.jpg"
data-videoid="<?=$v_id?>" ></div>
<?
}
}
?>
</div>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#gallery").unitegallery();
});
</script>
</div>
</div>
<?
}else{
?>
<div id="parent_popup">
<div id="popup">
<div class="title"><div class="for_pc right">
<a href="/video/index::user::<?=$result['user']?>" onclick="document.getElementById('parent_popup').style.display='none';"><img src="<?=URL?>/design/img/del.png"/></a>
</div>
<a class="title_a_hover" href="<?=URL?>/?id=<?=$user_id?>" onclick="Page.Go(this.href); return false"><?=$user['name']?> <?=$user['surname']?></a></div>
<?
echo'<iframe width="900" height="500" src="'.$result['link'].'&a=1" frameborder="0" allowfullscreen="true"></iframe>';
}
require_once '../../incfiles/foot.php';
?>