Файл: adultscript-2.0.3-pro/files/admin/templates/default/photo_view.tpl.php
Строк: 196
<?php defined('_VALID') or die('Restricted Access!'); ?>
<?php echo $this->fetch('errors'); ?>
<?php echo $this->fetch('messages'); ?>
<?php echo $this->fetch('warnings'); ?>
<script type="text/javascript">
var lang_question_suspend = "Are you sure you want to suspend this photo?";
var lang_question_activate = "Are you sure you want to activate this photo?";
var lang_question_delete = "Are you sure you want to delete this photo?";
$(document).ready(function() {
$("input[id^='manage_photo_']").click(function(e) {
var action = $(this).attr('id').match(/manage_photo_(.*)/)[1];
if (action == 'suspend') {
var answer = confirm(lang_question_suspend);
} else if (action == 'activate') {
var answer = confirm(lang_question_activate);
} else if (action == 'delete') {
var answer = confirm(lang_question_delete);
} else if (action == 'unassign') {
var answer = confirm(lang_question_unassign);
}
if (answer) {
$("input[name='action']").val(action);
$("#photo-view-form").submit();
}
});
});
</script>
<div id="container" class="clearfix">
<div id="page">
<?php echo $this->fetch('photo_menu'); ?>
<div class="content clearfix">
<?php echo $this->fetch('photo_view_menu'); ?>
<?php if ($this->photo): ?>
<form id="photo-view-form" method="post" action="">
<input name="action" type="hidden" value="" />
<input name="photo_id" type="hidden" value="<?php echo $this->photo['photo_id']; ?>" />
<div class="view_left">
<fieldset>
<legend>Photo Information</legend>
<span class="info">ID</span>
<span class="data"><?php echo $this->photo['photo_id']; ?></span>
<span class="info clear">Album</span>
<span class="data"><a href="<?php echo ADMIN_URL,'/index.php?q=photo/view&id=',$this->photo['album_id']; ?>"><?php echo ($this->photo['title']); ?></a></span>
<span class="info clear">Caption</span>
<span class="data"><?php echo e($this->photo['caption']); ?></span>
</fieldset>
<fieldset>
<legend>Photo Properties</legend>
<span class="info clear">Rating</span>
<span class="data"><?php echo $this->photo['rating']; ?></span>
<span class="info clear">Rated By</span>
<span class="data"><?php echo $this->photo['rated_by']; ?></span>
<span class="info clear">Total Views</span>
<span class="data"><a href="<?php echo ADMIN_URL,'/index.php?q=photo/photo_views&id=',$this->photo['photo_id']; ?>"><?php echo $this->photo['total_views']; ?></a></span>
<span class="info clear">Total Favorites</span>
<span class="data"><a href="<?php echo ADMIN_URL,'/index.php?q=photo/photo_favorites&id=',$this->photo['photo_id']; ?>"><?php echo $this->photo['total_favorites']; ?></a></span>
<span class="info clear">Total Comments</span>
<span class="data"><a href="<?php echo ADMIN_URL,'/index.php?q=photo/photo_comments&id=',$this->photo['photo_id']; ?>"><?php echo $this->photo['total_comments']; ?></a></span>
</fieldset>
<fieldset>
<legend>Media Information</legend>
<span class="info clear">Ext</span>
<span class="data"><?php echo $this->photo['ext']; ?></span>
<span class="info clear">Size</span>
<span class="data"><?php echo $this->photo['size']; ?></span>
</fieldset>
<fieldset>
<legend>Date Information</legend>
<span class="info clear">Add Date</span>
<span class="data"><?php echo $this->photo['add_date']; ?></span>
</fieldset>
</div>
<div class="view_right">
<fieldset>
<legend>Photo Status</legend>
<span class="status"><?php if ($this->photo['status'] == '1'): echo 'Active'; else: echo 'Suspended'; endif; ?></span>
</fieldset>
<fieldset>
<legend>Photo Thumb</legend>
<div style="width: 100%; text-align: center; padding: 10px 0;">
<img src="<?php echo RELATIVE_URL,'/media/photos/thumbs/',$this->photo['photo_id'],'.jpg'; ?>" alt="" />
</div>
</fieldset>
<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=photo/photo_edit&id=',$this->photo['photo_id']; ?>'" />
<?php if ($this->photo['status'] == '0' OR $this->photo['status'] == '2'): ?>
<input type="button" class="button butDef" value=" Publish " id="manage_photo_activate" />
<?php endif; ?>
<?php if ($this->photo['status'] == '1'): ?>
<input type="button" class="button butDef" value=" Suspend " id="manage_photo_suspend" />
<?php endif; ?>
<input type="button" class="button butDef" value=" Delete" id="manage_photo_delete" />
</div>
</div>
<div class="clear"></div>
<fieldset>
<legend>Photo</legend>
<div style="width: 100%; text-align: center; padding: 5px 0;">
<img src="<?php echo RELATIVE_URL,'/media/photos/',$this->photo['photo_id'],'.',$this->photo['ext']; ?>" alt="<?php echo e($this->photo['caption']); ?>" />
</div>
</fieldset>
</form>
<?php else: ?>
<div class="none">Invalid photo id! Are you sure this photo exists!?</div>
<?php endif; ?>
</div>
</div>
</div>