Файл: templates/view_file.html
Строк: 86
<? include ROOT.'/templates/header.html'; ?>
<script type="text/javascript" src="http://<?=$_SERVER['HTTP_HOST']?>/video-js/jwplayer.js"></script>
<div class="title"><h1><?=$title?></h1></div>
<div class="mz">
<?if($_GET['screen']):?>
<?if(file_exists(ROOT.'/'.$result['file'].'_'.out($_GET['screen']).'.jpeg')):?>
<img style="max-width: 100%" src="/<?=$result['file']?>_<?=out($_GET['screen'])?>.jpeg"/><br/>
<?else:?>
<img style="max-width: 100%" src="/screen.php?path=<?=$result['file']?>&frame=<?=out($_GET['screen'])?>"/><br/>
<?endif;?>
</div><a href="/<?=$result['translit']?>.html"><div class="mz">Смотреть онлайн</div></a>
<?else:?>
<div id="myElement">Загрузка плеера...</div>
<script type="text/javascript">
jwplayer("myElement").setup({
file: "http://<?=$_SERVER['HTTP_HOST']?>/<?=$result['file']?>",
image: "http://<?=$_SERVER['HTTP_HOST']?>/files/screens/<?= $result['id'] ?>/<?=$result['screen_default']?>",
width: '100%',
title: "Смотреть"
});
</script>
<br/>
</div>
<?endif;?>
<div class="mz">
<noindex>
<div class="owl-carousel">
<?php foreach ($result[screens] AS $str): ?>
<?= $str ?>
<?php endforeach; ?>
</div>
</noindex>
</div>
<div class="link"><a class="link" style="display:block" href="/download/<?=$result['id']?>">Скачать видео | <?=$result['size']?></a></div>
<div class="mz">
<?if(!empty($result['about'])):?>
<b>Описание</b>: <?=$result['about']?><br />
<?endif;?>
<b>Просмотров</b>: <?=$result['views']?><br />
<b>Добавлено</b>: <?=$result['add_time']?><br />
<b>Длительность</b>: <?=$result['duration']?><br />
<b>Категория</b>: <a href="/<?=$result['cat_translit']?>/"><?=$result['cat_name']?></a><br />
<?if($result['tag']):?>
<b>Теги</b>:
<?
$tag = explode(', ', $result['tag']);
$ctag = count($tag);
$i = 0;
while($i < $ctag){
echo '<a href="/tag/'.$tag[$i].'/">'.$tag[$i].'</a>, ';
$i++;
}
?>
<br/>
<?endif;?>
<b>Скачано</b>: <?=$result['download']?><br />
<?if(check_vote($result['id'], ip_code($_SERVER['REMOTE_ADDR']), $db)):?>
<?
$llike = $result['like']-1;
?>
<span style="float:right;">Вам и <b><?=$llike?></b> людям понравилось</span><br />
<?else:?>
<span style="float:right;"><img src="/style/like.png" width="16px"> <a href="<?=URL?>/like/<?=$result['id']?>">Лайк</a> [<?=$result['like']?>]</span><br />
<?endif;?>
</div>
<h3 class="title">Похожие прно видео ролики</h3>
<table style="width: 100%" cellspacing="0">
<?
while($result1 = $db->fetch($related))
{
?>
<?
$string = ' ' . htmlspecialchars($result1['about']) . ' ';
$string = substr($string, 0, 150);
$string = rtrim($string, "!,.-");
$string = substr($string, 0, strrpos($string, ' '));
if (!empty($result1['screen_default'])) {
$result1['mini_scr'] = 'files/screens/' . $result1['id'] . '/' . $result1['screen_default'];
} else {
$result1['mini_scr'] = 'no.png';
}
?>
<tr>
<td class='mz' style="width: 10%"><a href="/<?=$result1['translit']?>.html" title="<?=$result1['name']?>"><img width="150" height="120" src="/<?=$result1['mini_scr']?>" alt="<?=$result1['name']?>" class="img" /></a></td>
<td class='mz' style="width: 90%"><a href="/<?=$result1['translit']?>.html" title="<?=$result1['name']?>"><b><?=$result1['name']?></b></a><br /><br />
<?=$string?>
</td>
</tr>
<?
}
?>
</table>
<?if($login):?>
<?if(check_right($user['id'], 5, $db)):?><div class="link"><a class="link" style="display:block" href="<?=URL?>/panel/edit_file.php?id=<?=$result['id']?>"><img src="/style/load.png" alt="*"/> Изменить</a></div><?endif;?>
<?if(check_right($user['id'], 6, $db)):?><div class="link"><a class="link" style="display:block" href="<?=URL?>/panel/del_file.php?id=<?=$result['id']?>"><img src="/style/load.png" alt="*"/> Удалить</a></div><?endif;?>
<?if(check_right($user['id'], 6, $db)):?><div class="link"><a class="link" style="display:block" href="<?=URL?>/panel/screen.php?id=<?=$result['id']?>"><img src="/style/load.png" alt="*"/> Управление скиншотами</a></div><?endif;?>
<div class="link"><a class="link" style="display:block" href="/<?=$result['cat_translit']?>/"><img src="/style/load.png" alt="*"/> Назад</a></div>
<?endif;?>
<div class="link"><a class="link" style="display:block" href="/"><img src="/style/load.png" alt="*"/> На главную</a></div>
<? include ROOT.'/templates/footer.html'; ?>