Файл: adultscript-2.0.3-pro/files/mobile/templates/default/video_view.tpl.php
Строк: 287
<?php defined('_VALID') or die('Restricted Access!'); ?>
<script type="text/javascript" src="<?php echo TPL_REL; ?>/js/jquery.video-1.0.js"></script>
<div id="view" data-role="content" class="ui-content">
<input name="video_id" type="hidden" value="<?php echo $this->video['video_id']; ?>">
<ul data-role="listview">
<li data-role="list-divider"><h1><?php echo e($this->video['title']); ?></h1></li>
</ul>
<br />
<?php if ($this->access): if (VCfg::get('mobile.player')): echo $this->fetch('video_view_player'); else: echo $this->fetch('video_view_file'); endif; ?>
<?php elseif ($this->user_id): ?>
<center>Please <a href="<?php echo MOBILE_REL; ?>/upgrade/">Upgrade your account</a> to watch premium videos!</a></center>
<?php else: ?>
<center>Please <a href="<?php echo MOBILE_REL; ?>/register/">Register</a> to watch premium videos!</a></center>
<?php endif; ?>
<center><button id="response" disabled="" style="display:none;" data-icon="alert" class="success"></button></center>
<center>
<?php echo __('length'); ?>: <strong><?php echo VDate::duration($this->video['duration']); ?></strong>
<?php echo __('rating'); ?>: <span id="rating-result"><strong><?php echo ($this->video['rating'] == 0 or $this->video['rating'] == 5) ? 100 : round(($this->video['rating']*100)/5); ?>%</strong></span>
<?php echo __('views'); ?>: <strong><?php echo $this->video['total_views']; ?></strong>
<?php echo __('favorites'); ?>: <span id="favorite-result"><strong><?php echo $this->video['total_favorites']; ?></strong></span>
</center>
<center>
<?php if ($this->allow_rating): ?>
<button id="rate-up" data-inline="true" data-role="button" data-icon="arrow-u"><?php echo __('like'); ?></button>
<button id="rate-down" data-inline="true" data-role="button" data-icon="arrow-d"><?php echo __('dislike'); ?></button>
<?php endif; ?>
<button id="favorite" data-inline="true" data-role="button" data-icon="heart"><?php echo __('favorite'); ?></button>
<button id="playlist" data-inline="true" data-role="button" data-icon="plus"><?php echo __('playlist'); ?></button>
</center>
<?php if ($this->share): $video_url = BASE_URL.'/'.$this->video['video_id'].'/'.$this->video['slug'].'/'; ?>
<br />
<center>
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" style="width: 280px;margin: 0 auto;">
<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":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4f9d8c433d6f0bfa"></script>
<!-- AddThis Button END -->
</center>
<?php endif; ?>
<br />
<div id="playlist-container" style="display: none;">
<ul data-role="listview">
<li data-role="list-divider"><?php echo __('playlist-add'); ?></li>
</ul>
<br />
<?php if ($this->user_id): ?>
<?php if ($this->playlists): ?>
<label for="playlist_id"><?php echo __('playlist'); ?>:</label>
<select name="playlist_id" id="playlist_id" data-native-menu="false">
<?php foreach ($this->playlists as $playlist): ?>
<option value="<?php echo $playlist['playlist_id'],'">',e($playlist['name']); ?></option>
<?php endforeach; ?>
</select>
<button id="playlist-select" type="button" role="button"><?php echo __('playlist-select'); ?></button>
<?php else: ?>
<div class="none"><?php echo __('playlist-none'); ?></div>
<?php endif; ?>
<label for="name"><?php echo __('name'); ?>:</label>
<input name="name" type="text" id="name" value="">
<fieldset data-role="controlgroup" data-type="horizontal" data-mini="true">
<legend><?php echo __('type'); ?>:</legend>
<input type="radio" name="type" id="type_public" value="public" checked="checked">
<label for="type_public"><?php echo __('public'); ?></label>
<input type="radio" name="type" id="type_private" value="private">
<label for="type_private"><?php echo __('private'); ?></label>
</fieldset>
<button id="playlist-create" type="button" role="button"><?php echo __('playlist-create'); ?></button>
<?php else: ?>
<center>
<button id="response" disabled="" data-icon="alert" class="error"><?php echo __('playlist-login'); ?></button>
</center>
<?php endif; ?>
</div>
<br />
<div data-role="tabs" id="tabs">
<div data-role="navbar">
<ul>
<?php if (isset($this->videos)): ?><li><a href="#playlist" data-ajax="false"><?php echo __('playlist'); ?></a></li><?php endif; ?>
<?php if (isset($this->related)): ?><li><a href="#related" data-ajax="false"><?php echo __('related-videos'); ?></a></li><?php endif; ?>
<?php if (isset($this->comments)): ?><li><a href="#comments" data-ajax="false"><?php echo __('comments'); ?></a></li><?php endif; ?>
<li><a href="#thumbs" data-ajax="false"><?php echo __('thumbs'); ?></a></li>
</ul>
</div>
<?php if (isset($this->videos)): ?>
<div id="playlist" class="ui-body-d ui-content">
<ul data-role="listview" class="has-video-thumb">
<?php foreach ($this->videos as $video): $percent = ($video['likes'] == 0) ? 100 : round(($video['likes']*100)/$video['rated_by']); ?>
<li>
<a href="<?php echo MOBILE_REL,'/',$video['video_id'],'/',$video['slug'],'/'; ?>" rel="external">
<div class="thumbContainer"><img src="<?php echo THUMB_URL,'/',path($video['video_id']),'/',$video['thumb'],'.jpg'; ?>" /></div>
<h5><?php echo e($video['title']); ?></h5>
<p><?php echo __('rating'); ?>: <strong><?php echo $percent; ?>%</strong></p>
<p><?php echo __('views'); ?>: <strong><?php echo $video['total_views']; ?></strong></p>
<p><?php echo __('length'); ?>: <strong><?php echo VDate::seconds_to_time($video['duration'], FALSE); ?></strong></p>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; if (isset($this->related)): ?>
<div id="related" class="ui-body-d ui-content">
<?php if ($this->related): ?>
<ul data-role="listview" class="has-video-thumb">
<?php foreach ($this->related as $video): $percent = ($video['rating'] == 0) ? 100 : round(($video['rating']*100)/5); ?>
<li>
<a href="<?php echo MOBILE_REL,'/',$video['video_id'],'/',$video['slug'],'/'; ?>" rel="external">
<div class="thumbContainer"><img src="<?php echo THUMB_URL,'/',path($video['video_id']),'/',$video['thumb'],'.jpg'; ?>" /></div>
<h5><?php echo e($video['title']); ?></h5>
<p><?php echo __('rating'); ?>: <strong><?php echo $percent; ?>%</strong></p>
<p><?php echo __('views'); ?>: <strong><?php echo $video['total_views']; ?></strong></p>
<p><?php echo __('length'); ?>: <strong><?php echo VDate::seconds_to_time($video['duration'], FALSE); ?></strong></p>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php else: ?>
<div class="none"><?php echo __('no-related'); ?></div>
<?php endif; ?>
</div>
<?php endif; if (isset($this->comments)): ?>
<div id="comments" class="ui-body-d ui-content">
<?php if ($this->allow_comment): ?>
<center><button id="response-comment" disabled="" style="display:none;" data-icon="alert"></button></center>
<textarea cols="40" rows="8" name="comment" id="comment"></textarea>
<button id="post-comment" data-inline="true" data-role="button" data-icon="comment"><?php echo __('post-comment'); ?></button>
<br />
<?php endif; ?>
<?php if ($this->comments): ?>
<input name="page" type="hidden" value="1">
<div id="comments-container">
<ul id="comments" data-role="listview" data-inset="true">
<li id="comments-post-container" style="display: none;"></li>
<?php foreach ($this->comments as $comment): ?>
<li id="comment-<?php echo $comment['comment_id']; ?>">
<?php if (!empty($comment['user_id'])): ?>
<img src="<?php echo USER_URL,'/'; if ($comment['avatar'] !=''): echo $comment['user_id'],'.',$comment['avatar']; else: echo 'nopic-',$comment['gender'],'.gif'; endif; ?>" alt="<?php echo e($comment['username']); ?> Avatar" />
<?php else: ?>
<img src="<?php echo MEDIA_URL; ?>/users/nopic-hidden.gif" alt="" />
<?php endif; ?>
<p class="comment"><?php echo nl2br($comment['comment']); ?></p>
<p class="cfooter">By <strong><?php if (!empty($comment['user_id'])): echo e($comment['username']); else: echo e($comment['nickname']); endif; ?></strong> <?php echo VDate::nice($comment['add_date']); ?></p>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php if ($this->comments_total > $this->comments_per_page): ?><center><button id="more-comments" data-role="button" data-inline="true" data-icon="refresh"><?php echo __('more-comments'); ?></button></center><?php endif; ?>
<?php else: ?>
<div class="none"><?php echo __('no-comments'); ?></div>
<?php endif; ?>
</div>
<?php endif; ?>
<div id="thumbs" class="ui-body-d ui-content">
<?php for ($i=1; $i<=$this->video['thumbs']; $i++): ?>
<img src="<?php echo THUMB_URL,'/',path($this->video['video_id']),'/',$i,'.jpg'; ?>" alt="Thumb <?php echo $i; ?>" />
<?php endfor; ?>
</div>
</div>
</div>