Файл: adultscript-2.0.3-pro/files/templates/defboot/video_view.tpl.php
Строк: 477
<?php defined('_VALID') or die('Restricted Access!'); ?>
<link href="<?php echo TPL_REL; ?>/css/style_video.css" rel="stylesheet">
<script src="<?php echo TPL_REL; ?>/js/video.js"></script>
<?php if (isset($this->playlist)): ?>
<link href="<?php echo REL_URL; ?>/misc/lightSlider/css/lightSlider.css" rel="stylesheet">
<script src="<?php echo REL_URL; ?>/misc/lightSlider/js/jquery.lightSlider.min.js"></script>
<?php endif; ?>
<div id="video" class="row">
<?php if (isset($this->playlist)): ?>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title pull-left"><a href="<?php echo REL_URL,'/playlist/',$this->playlist['playlist_id'],'/',$this->playlist['slug'],'/">',e($this->playlist['name']),'</a> <small>(',$this->playlist['total_videos'],' ',__('videos'); ?>)</small></h2>
<div class="btn-group pull-right">
<?php if ($this->videos['0']['video_id'] !== $this->video['video_id']): $prev = true; ?><button id="playlist-prev" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="<?php echo __('playlist-prev'); ?>"><i class="fa fa-step-backward"></i></button><?php endif; ?>
<?php $index = count($this->videos)-1; if ($this->videos[$index]['video_id'] != $this->video['video_id']): $next = true; ?><button id="playlist-next" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="<?php echo __('playlist-next'); ?>"><i class="fa fa-step-forward"></i></button><?php endif; ?>
<button id="playlist-shuffle" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="<?php echo __('playlist-shuffle'); ?>"><i class="fa fa-random"></i></button>
<a href="<?php echo REL_URL,'/playlist/',$this->playlist['playlist_id'],'/',$this->playlist['slug'],'/" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="',__('playlist-view'); ?>"><i class="fa fa-list"></i></a>
</div>
<div class="clearfix"></div>
</div>
<div class="panel-body panel-padding">
<ul id="lightSlider" class="cS-hidden">
<?php foreach ($this->videos as $index => $video): if ($video['video_id'] == $this->video['video_id']): $item = $index+1; endif;
if (!isset($item)): $this->url_prev = '/'.$video['video_id'].'/'.$video['slug'].'/?playlist='.$this->playlist['playlist_id']; endif;
if (isset($item) && $index == $item): $this->url_next = '/'.$video['video_id'].'/'.$video['slug'].'/?playlist='.$this->playlist['playlist_id']; endif;
?>
<li class="playlist-video<?php if ($video['video_id'] == $this->video['video_id']): $item = $index+1; echo ' playlist-active'; endif; ?>">
<a href="<?php echo REL_URL,'/',$video['video_id'],'/',$video['slug'],'/?playlist=',$this->playlist['playlist_id']; ?>">
<img src="<?php echo THUMB_URL,'/',path($video['video_id']),'/',$video['thumb'],'.jpg" alt="',e($video['title']); ?>" width="150" />
<p class="slider-title"><?php echo e(VText::truncate_chars($video['title'], 20)); ?></p>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
var slider = $("#lightSlider").lightSlider({
autoWidth: true,
onSliderLoad: function() {
$('#lightSlider').removeClass('cS-hidden');
}
});
slider.goToSlide(<?php echo $item-1; ?>);
<?php if (isset($prev)): ?>
$("button[id='playlist-prev']").click(function() {
window.location = base_url + '<?php echo $this->url_prev; ?>';
});
<?php endif; if (isset($next)): ?>
$("button[id='playlist-next']").click(function() {
window.location = base_url + '<?php echo $this->url_next; ?>';
});
<?php endif; ?>
$("button[id='playlist-shuffle']").click(function() {
var random = Math.floor((Math.random()* $('ul#lightSlider li').length )+1);
window.location = $("ul#lightSlider li:nth-child(" + random + ")").find('a').attr('href');
});
});
</script>
<?php endif; ?>
<h1><?php echo e($this->video['title']); ?></h1>
<div class="right hidden-xs hidden-sm">
<div class="content">
<?php echo p('adv_right', 'video-view-right', $this->video['categories']); echo p('adv', 'video-view-right-1'); echo p('adv', 'video-view-right-2'); echo p('adv', 'video-view-right-3'); ?>
</div>
</div>
<div class="left content content-video">
<input name="video_id" type="hidden" value="<?php echo $this->video['video_id']; ?>">
<input name="user_id" type="hidden" value="<?php echo $this->user_id; ?>">
<?php if ($this->video['status'] == '1'): ?>
<?php if ($this->friends): ?>
<?php if ($this->video['embed_code'] == ''): ?>
<?php echo $this->fetch('video_view_'.VCfg::get('video.player')); ?>
<?php echo p('adv_player', $this->video['adv'], $this->video['channel_id'], $this->video['user_id'], $this->video['categories']); ?>
<?php else: ?>
<?php echo $this->fetch('video_view_embedded'); ?>
<?php endif; ?>
<?php else: ?>
<div id="player-container"><div id="player"><span><?php echo __('video-private', array('<a href="'.RELATIVE_URL.'/users/'.$this->video['username'].'/">'.$this->video['username'].'</a>')); ?></span></div></div>
<?php endif; ?>
<?php else: echo $this->fetch('video_view_deleted'); endif; ?>
<?php if ($this->video['channel_id'] != '0'): ?>
<div class="content-container no-border-top">
<div class="row">
<?php $logo = $this->video['logo']; $class = 'col-xs-12 col-sm-12'; if ($logo): $class = 'col-xs-8 col-sm-9 col-md-10'; ?>
<div class="col-xs-4 col-sm-3 col-md-2">
<a href="<?php echo $this->video['churl']; ?>" target="_blank">
<img src="<?php echo MEDIA_REL,'/channels/',$this->video['channel_id'],'.logo.',$this->video['logo'],'" alt="',e($this->video['chname']); ?>" class="img-responsive" />
</a>
</div>
<?php endif; ?>
<div class="<?php echo $class; ?>">
<div class="channel-title"><?php echo e($this->video['chname']); ?></div>
<p><?php echo $this->video['chdesc']; ?></p>
<?php echo __('visit'),': <a href="',$this->video['churl'],'" target="_blank">',e($this->video['chname']); ?></a>
</div>
</div>
</div>
<?php endif; ?>
<div class="content-container">
<div id="response-container" class="alert alert-dismissible" role="alert" style="display: none;"></div>
<div class="row actions-container">
<div class="btn-group btn-group-mb actions-left" role="group">
<button id="like" type="button" class="btn btn-default btn-d" data-toggle="tooltip" data-placement="top" title="<?php echo __('like-help'); ?>!"><i id="like-icon" class="fa fa-thumbs-up"></i> <span class="no-text">Like</span></button>
<button id="rating" type="button" class="btn btn-default btn-d" disabled="disabled">
<?php $percent = ($this->video['likes'] > 0 && $this->video['rated_by']) ? round($this->video['likes']*100/$this->video['rated_by']) : 100; ?>
<?php echo $percent,'% (',$this->video['likes'],'/',$this->video['rated_by']; ?>)
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $percent; ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $percent; ?>%;">
<span class="sr-only"><?php echo $percent; ?>% Complete</span>
</div>
</div>
</button>
<button id="dislike" type="button" class="btn btn-default btn-d" data-toggle="tooltip" data-placement="top" title="<?php echo __('dislike-help'); ?>!"><i id="dislike-icon" class="fa fa-thumbs-down"></i></button>
</div>
<div class="btn-toolbar actions-right">
<?php if ($this->video['embed_code'] == '' && $this->video['allow_download'] == '1' && $this->download): ?>
<div class="btn-group btn-group-mb">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false" data-toggle="tooltip" data-placement="top" title="<?= __('download-help'); ?>">
<i class="fa fa-download"></i> <span class="no-text"><?php echo __('download'); ?></span> <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<?php if ($this->video['mobile']): ?><li><a href="<?= REL_URL,'/download/',$this->video['video_id']; ?>/mobile/" target="_blank" rel="nofollow">MP4 Mobile (320p)</a></li><?php endif; ?>
<li><a href="<?= REL_URL,'/download/',$this->video['video_id'],'/',$this->video['ext']; ?>/" target="_blank" rel="nofollow"><?php if ($this->video['ext'] == 'flv'): echo 'FLV'; else: echo 'MP4'; endif; ?> (480p)</a></li>
<?php if ($this->video['hd']): ?><li><a href="<?= REL_URL,'/download/',$this->video['video_id']; ?>/hd/" target="_blank" rel="nofollow">MP4 HD (720p)</a></li><?php endif; ?>
</ul>
</div>
<?php endif; ?>
<div class="btn-group">
<button id="favorite" class="btn btn-default btn-mb" data-toggle="tooltip" data-placement="top" title="<?= __('favorite-help'); ?>"><i id="favorite-icon" class="fa fa-heart"></i> (<?php echo $this->video['total_favorites']; ?>)</button>
</div>
<div class="btn-group">
<button id="share" class="btn btn-default btn-mb" data-toggle="tooltip" data-placement="top" title="<?= __('share-help'); ?>"><i class="fa fa-share"></i> <span class="hidden-sm no-text"><?php echo __('share'); ?></span></button>
</div>
<?php if ($this->video['embed_code'] == '' && VCfg::get('video.playlists')): ?>
<div class="btn-group">
<button id="playlist" class="btn btn-default btn-mb" data-toggle="tooltip" data-placement="top" title="<?= __('playlist-help'); ?>"><i class="fa fa-plus"></i></button>
</div>
<?php endif; ?>
<div class="btn-group">
<button id="report" class="btn btn-default btn-mb" data-toggle="tooltip" data-placement="top" title="<?= __('report-help'); ?>"><i class="fa fa-flag"></i></button>
</div>
</div>
</div>
</div>
<div id="share-container" class="content-container" style="display: none;">
<button type="button" class="close close-parent"><span aria-hidden="true">×</span><span class="sr-only"><?php echo __('close'); ?></span></button>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-6">
<br>
<div class="content-title">Share:</div>
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a class="addthis_button_email"></a>
<a class="addthis_button_favorites"></a>
<a class="addthis_button_facebook"></a>
<a class="addthis_button_twitter"></a>
<a class="addthis_button_reddit"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_addressbar":false};</script>
<script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4f9d8c433d6f0bfa"></script>
<!-- AddThis Button END -->
</div>
<div class="col-xs-12 col-sm-12 col-md-6">
<div class="content-title">Link to this video:</div>
<input name="link" type="text" class="form-control" value="<?php echo e(CUR_URL); ?>" />
</div>
</div>
<?php if ($this->video['allow_embed']): ?>
<div class="content-title">Embed:</div>
<textarea name="embed-code" id="embed-code" class="form-control"><?php echo $this->fetch('video_view_iframe'); ?></textarea>
<?php endif; ?>
</div>
<div id="playlist-container" class="content-container" style="display: none;"></div>
<div id="report-container" style="display:none;"></div>
<div class="content-container">
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-6">
<?php echo __('from'),': <a href="',REL_URL,'/users/',$this->video['username'],'"><strong>',$this->video['username']; ?></strong></a><br>
<?php echo __('tags'),': '; $tags = explode(',', $this->video['tags']); $count = count($tags)-1;
foreach ($tags as $index => $tag): echo '<a href="',REL_URL,'/tag/',prepare_string($tag, true),'/" class="btn btn-default btn-xs btn-margin"><i class="fa fa-tag"></i> ',e($tag),'</a> '; endforeach; ?>
</div>
<div class="col-xs-12 col-sm-6 col-md-6">
<?php echo __('Views'),': <strong>',$this->video['total_views']; ?></strong><br>
<?php echo __('categories'),':'; $categories = explode(',', $this->video['name']);
$slugs = explode(',', $this->video['slugs']);
$count = count($categories)-1;
foreach ($categories as $index => $name): echo ' <a href="',REL_URL,'/',$slugs[$index],'/" class="btn btn-default btn-xs btn-margin">',e($name),'</a>'; endforeach; ?>
<?php if (isset($this->pornstars) && $this->pornstars): echo '<br>',__('pornstars'),':'; foreach ($this->pornstars as $model):
echo '<a href="',REL_URL,'/pornstar/',$model['slug'],'/" class="btn btn-default btn-xs btn-margin">',e($model['name']),'</a>'; endforeach; endif; ?>
</div>
</div>
</div>
<?php if (VCfg::get('video.view_desc') && $this->video['description']): ?>
<div class="content-container"><p class="description"><?php echo e($this->video['description']); ?></p></div>
<?php endif; ?>
</div>
<div class="clearfix"></div>
<div role="tabpanel" class="thumbnail">
<ul class="nav nav-tabs" role="tablist">
<?php if (isset($this->related)): ?><li role="presentation" class="active"><a href="#related" aria-controls="related" role="tab" data-toggle="tab"><strong><?php echo __('related-videos'); ?></strong></a></li><?php endif; ?>
<?php if (isset($this->comments)): ?><li role="presentation"><a href="#comments" aria-controls="comments" role="tab" data-toggle="tab"><strong><?php echo __('comments'),' (',$this->total_comments; ?>)</strong></a></li><?php endif; ?>
<li role="presentation"><a href="#thumbs" aria-controls="thumbs" role="tab" data-toggle="tab"><strong><?php echo __('thumbs'); ?></strong></a></li>
</ul>
<div class="tab-content">
<?php if (isset($this->related)): ?>
<div role="tabpanel" class="tab-pane active" id="related">
<?php if ($this->related): $this->videos = $this->related; ?>
<input name="related-page" type="hidden" value="2">
<?php echo $this->fetch('_video_list'); ?>
<?php if ($this->related_total > (int) VCfg::get('video.related_per_page')): ?>
<div class="text-center">
<button id="related-more" class="btn btn-primary btn-lg"><i class="fa fa-circle-o-notch fa-spin"></i> <?php echo __('more-related'); ?></button>
</div>
<?php endif; else: ?>
<div class="none"><?php echo __('no-related-videos'); ?></div>
<?php endif; ?>
</div>
<?php endif; if (isset($this->comments)): ?>
<div role="tabpanel" class="tab-pane" id="comments">
<?php $allow_comment = VCfg::get('video.allow_comment'); if ($this->video['allow_comment'] && (($allow_comment == '1' && $this->user_id) or $allow_comment == '2')): ?>
<div class="post-comment">
<div id="response-comment" class="alert alert-dismissible" style="display: none;"></div>
<div class="row">
<div class="col-xs-3 col-sm-1 col-md-2 col-lg-1 comment-picture">
<?php if ($this->user_id): ?>
<img src="<?php echo USER_URL,'/'; if ($_SESSION['avatar'] != ''): echo $_SESSION['user_id'].'.'.$_SESSION['avatar']; else: echo 'nopic-'.$_SESSION['gender'].'.gif'; endif; ?>" alt="Profile Picture" class="img-rounded" />
<?php else: ?>
<img src="<?php echo USER_URL; ?>/nopic-hidden.gif" alt="">
<?php endif; ?>
</div>
<div class="col-xs-9 col-sm-11 col-md-10 col-lg-11">
<?php if (!$this->user_id): ?>
<input name="nickname" id="nickname" class="form-control margin-bottom-5" placeholder="<?php echo __('nickname'); ?>">
<?php endif; ?>
<textarea name="comment" id="comment" class="form-control" rows="4" cols="60" placeholder="<?php echo __('comment'); ?>"></textarea>
<div class="row" style="margin-top: 5px;">
<div class="col-xs-6 col-sm-8 col-md-5">
<small><span id="remaining">500</span> <?php echo __('characters-left'); ?></small>
</div>
<div class="col-xs-6 col-sm-4 col-md-7 text-right">
<button id="post-comment" type="button" class="btn btn-primary"><?php echo __('post-comment'); ?></button>
</div>
</div>
</div>
</div>
</div>
<?php endif; $this->type = 'video'; $this->parent_id = $this->video['video_id']; $this->comments_per_page = VCfg::get('video.comments_per_page'); echo $this->fetch('_comments_list'); ?>
</div>
<?php endif; ?>
<div role="tabpanel" class="tab-pane" id="thumbs">
<ul class="thumbs">
<?php for ($i=1; $i<=$this->video['thumbs'];$i++): ?>
<li><img src="<?php echo THUMB_URL,'/',path($this->video['video_id']),'/',$i; ?>.jpg" alt="" /></li>
<?php endfor; ?>
</ul>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>