Файл: adultscript-2.0.3-pro/files/admin/templates/default/video_view.tpl.php
Строк: 382
<?php defined('_VALID') or die('Restricted Access!'); ?>
<script type="text/javascript">
$(document).ready(function() {
$("input[id='preview']").click(function() {
$.ajax({
url: base_url + '/ajax.php?s=preview_video&d=backend',
cache: false,
type: "POST",
dataType: "json",
data: { video_id: <?php echo $this->video_id; ?> },
success: function(response){
var preview = window.open("","wildebeast","width=690,height=510,scrollbars=1,resizable=1")
preview.document.open()
preview.document.write(response.code)
preview.document.close()
}
});
});
$("input[id='log']").click(function() {
$.ajax({
url: base_url + '/ajax.php?s=video_log&d=backend',
cache: false,
type: "POST",
dataType: "json",
data: { video_id: <?php echo $this->video_id; ?> },
success: function(response){
var preview = window.open("","wildebeast","width=800,height=600,scrollbars=1,resizable=1")
preview.document.open()
preview.document.write(response.code)
preview.document.close()
}
});
});
});
</script>
<?php echo $this->fetch('errors'); ?>
<?php echo $this->fetch('messages'); ?>
<?php echo $this->fetch('warnings'); ?>
<div id="container" class="clearfix">
<div id="page">
<?php echo $this->fetch('video_menu'); ?>
<div class="content clearfix">
<?php echo $this->fetch('video_view_menu'); ?>
<?php if (isset($this->video)): ?>
<form name="video-view-form" method="post" action="">
<div class="view_left">
<fieldset>
<legend>Video Information</legend>
<span class="info">ID</span>
<span class="data"><?php echo $this->video['video_id']; ?></span>
<span class="info clear">Username</span>
<span class="data"><a href="<?php echo ADMIN_URL; ?>/index.php?q=user/view&id=<?php echo $this->video['user_id']; ?>"><?php echo ($this->video['username']); ?></a></span>
<span class="info clear">Title</span>
<span class="data"><?php echo e($this->video['title']); ?></span>
<span class="info clear">Description</span>
<span class="data"><?php echo e($this->video['description']); ?></span>
<?php $categories = explode(',', $this->video['name']);
$ids = explode(',', $this->video['cats']);
$count = count($categories)-1; ?>
<span class="info clear">Categories</span>
<span class="data">
<?php foreach ($categories as $index => $name): ?>
<a href="<?php echo ADMIN_URL; ?>/index.php?q=video/manage&c=<?php echo $ids[$index]; ?>"><?php echo e($name); ?></a><?php if ($index !== $count): echo ', '; endif; ?>
<?php endforeach; ?>
</span>
<span class="info clear">Tags</span>
<?php $tags = explode(',', $this->video['tags']);
$count = count($tags)-1; ?>
<span class="data">
<?php foreach ($tags as $index => $tag): ?>
<?php echo e($tag); if ($index !== $count): echo ', '; endif; ?>
<?php endforeach; ?>
</span>
<span class="info clear">Type</span>
<span class="data"><?php echo ucfirst($this->video['type']); ?></span>
</fieldset>
<fieldset>
<legend>Video Options</legend>
<span class="info clear">Allow Rating</span>
<span class="data"><?php if ($this->video['allow_rating'] == '1'): echo 'yes'; else: echo 'no'; endif; ?></span>
<span class="info clear">Allow Comment</span>
<span class="data"><?php if ($this->video['allow_comment'] == '1'): echo 'yes'; else: echo 'no'; endif; ?></span>
<span class="info clear">Allow Download</span>
<span class="data"><?php if ($this->video['allow_download'] == '1'): echo 'yes'; else: echo 'no'; endif; ?></span>
<span class="info clear">Allow Embed</span>
<span class="data"><?php if ($this->video['allow_embed'] == '1'): echo 'yes'; else: echo 'no'; endif; ?></span>
</fieldset>
<fieldset>
<legend>Video Properties</legend>
<span class="info clear">Rating</span>
<span class="data"><a href="<?php echo ADMIN_URL; ?>/index.php?q=video/ratings&id=<?php echo $this->video['video_id']; ?>"><?php echo $this->video['rating']; ?></a></span>
<span class="info clear">Rated By</span>
<span class="data"><?php echo $this->video['rated_by']; ?></span>
<span class="info clear">Total Views</span>
<span class="data"><a href="<?php echo ADMIN_URL; ?>/index.php?q=video/views&id=<?php echo $this->video['video_id']; ?>"><?php echo $this->video['total_views']; ?></a></span>
<span class="info clear">Total Comments</span>
<span class="data"><a href="<?php echo ADMIN_URL; ?>/index.php?q=video/comments&id=<?php echo $this->video['video_id']; ?>"><?php echo $this->video['total_comments']; ?></a></span>
<span class="info clear">Total Downloads</span>
<span class="data"><a href="<?php echo ADMIN_URL; ?>/index.php?q=video/downloads&id=<?php echo $this->video['video_id']; ?>"><?php echo $this->video['total_downloads']; ?></a></span>
</fieldset>
<fieldset>
<legend>Media Information</legend>
<span class="info clear">Format</span>
<span class="data"><?php if ($this->video['embed_code'] == ''): echo $this->video['ext']; else: echo 'embed'; endif; ?></span>
<span class="info clear">Duration</span>
<span class="data"><?php echo date('i:s', (int) $this->video['duration']); ?></span>
<?php if ($this->video['embed_code'] == ''): ?>
<span class="info clear">Size</span>
<span class="data"><?php echo VText::bytes($this->video['size']); ?></span>
<?php endif; ?>
<?php if (VModule::enabled('mobile')): ?>
<span class="info clear">Mobile</span>
<span class="data"><?php if ($this->video['mobile'] == '1'): echo 'yes'; else: echo 'no'; endif; ?></span>
<?php endif; ?>
</fieldset>
<?php if (isset($this->video['filename'])): ?>
<fieldset>
<legend>Original Media</legend>
<span class="info clear">Add Method</span>
<span class="data"><?php echo e($this->video['method']); ?></span>
<?php if ($this->video['filename'] != '' && $this->video['ext'] != ''): ?>
<span class="info clear">Filename</span>
<span class="data"><?php echo e($this->video['filename']); ?></span>
<span class="info clear">Ext</span>
<span class="data"><?php echo e($this->video['oext']); ?></span>
<?php if ($this->video['osize'] != '0'): ?>
<span class="info clear">Size</span>
<span class="data"><?php echo VText::bytes($this->video['osize']); ?></span>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->video['ourl'] != ''): ?>
<span class="info clear">URL</span>
<span class="data"><?php echo e($this->video['ourl']); ?></span>
<?php endif; ?>
<span class="info clear">Add IP</span>
<span class="data"><?php echo long2ip($this->video['oip']); ?></span>
<span class="info clear">Add Date</span>
<span class="data"><?php echo VDate::format($this->video['oadd_time'], 'Y-m-d H:i:s'); ?></span>
</fieldset>
<?php endif; ?>
<fieldset>
<legend>Date Information</legend>
<span class="info clear">Add Date</span>
<span class="data"><?php echo $this->video['add_date']; ?></span>
<span class="info clear">Last View Date</span>
<span class="data"><?php echo $this->video['view_date']; ?></span>
</fieldset>
</div>
<div class="view_right">
<fieldset>
<legend>Video Status</legend>
<span class="status"><?php echo $this->statuses[$this->video['status']]; ?></span>
<?php if ($this->video['flagged'] == '1'): ?>
<span class="status"><a href="<?php echo ADMIN_URL; ?>/index.php?q=video/flags&id=<?php echo $this->video_id; ?>">Flagged</a></span>
<?php endif; ?>
<?php if ($this->video['locked'] == '1'): ?>
<span class="status">Locked</span>
<?php endif; ?>
</fieldset>
<fieldset>
<legend>Video Thumbs</legend>
<?php for ($i=1; $i<$this->video['thumbs']; ++$i): ?>
<img src="<?php echo THUMB_URL,'/',path($this->video['video_id']),'/',$i; ?>.jpg" width="72" height="55" alt=""<?php if ($i == $this->video['thumb']): echo ' class="active"'; endif; ?> />
<?php endfor; ?>
</fieldset>
</div>
</form>
<div class="clear"></div>
<div style="width: 100%; text-align: center; padding: 10px 0;">
<input type="button" class="button butDef" value=" Edit " onClick="window.location='<?php echo ADMIN_URL; ?>/index.php?q=video/edit&id=<?php echo $this->video['video_id']; ?>'" />
<?php if (in_array($this->video['status'], array(0, 1, 2))): ?>
<input type="button" class="button butDef" id="preview" value=" Preview " />
<?php if ($this->video['embed_code'] == ''): ?>
<input type="button" class="button butDef" value=" Regenerate Thumbs " onClick="window.location='<?php echo ADMIN_URL,'/index.php?q=video/view&id='.$this->video_id; ?>&a=regenerate'" />
<input type="button" class="button butDef" value=" Regenerate Duration " onClick="window.location='<?php echo ADMIN_URL,'/index.php?q=video/view&id='.$this->video_id; ?>&a=duration'" />
<?php endif; ?>
<?php endif; ?>
<?php if ($this->video['status'] == '6' && $this->video['server'] == '0'): ?>
<input type="button" class="button butDef" value=" Convert " onClick="window.location='<?php echo ADMIN_URL,'/index.php?q=video/view&id='.$this->video_id; ?>&a=convert'" />
<?php endif; if ($this->video['embed_code'] == '' && $this->video['mobile'] == '0' && $this->video['server'] == '0'): ?>
<input type="button" class="button butDef" value=" Convert Mobile " onClick="window.location='<?php echo ADMIN_URL,'/index.php?q=video/view&id='.$this->video_id; ?>&a=mobile'" />
<?php endif; if ($this->video['status'] == '0' OR $this->video['status'] == '2'): ?>
<input type="button" class="button butDef" value=" Publish " onClick="window.location='<?php echo ADMIN_URL,'/index.php?q=video/view&id='.$this->video_id; ?>&a=publish'" />
<?php endif; ?>
<?php if ($this->video['status'] == '1'): ?>
<input type="button" class="button butDef" value=" Suspend " onClick="window.location='<?php echo ADMIN_URL,'/index.php?q=video/view&id='.$this->video_id; ?>&a=suspend'" />
<?php endif; ?>
<?php if ($this->video['status'] == '7'): ?>
<input type="button" class="button butDef" id="log" value=" View Log " />
<?php endif; ?>
<input type="button" class="button butDef" value=" Delete" onClick="window.location='<?php echo ADMIN_URL,'/index.php?q=video/view&id='.$this->video_id; ?>&a=delete'" />
</div>
<?php else: ?>
<div class="none">Invalid video id! Are you sure this video exists!?</div>
<?php endif; ?>
</div>
</div>
</div>