Файл: adultscript-2.0.3-pro/files/admin/templates/default/photo_flags.tpl.php
Строк: 158
<?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_delete = "Are you sure you want to delete this report?";
$(document).ready(function() {
$("a[id^='manage_flag_']").click(function(e) {
e.preventDefault();
var click_id = $(this).attr('id');
var click_arr = click_id.split('_');
var action = click_arr[2];
var flag_id = click_arr[3];
var answer = confirm(lang_question_delete);
if (answer) {
$("input[name='action']").val(action);
$("input[name='flag_id']").val(flag_id);
$("#manage_flags_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->flags): ?>
<form id="manage_flags_form" method="post" action="<?php echo CURRENT_URL; ?>">
<input name="action" type="hidden" value="" />
<input name="flag_id" type="hidden" value="" />
</form>
<form name="actionsForm" id="actionsForm" method="post" action="<?php echo CURRENT_URL; ?>">
<div class="box_menu">
<div class="box_menu_left">
<select name="action" id="actions_top">
<option value="delete">Delete</option>
</select>
<input name="submit_actions" type="submit" class="button butDef" value="Go!" />
</div>
<div class="box_menu_right">
<div class="barNav clearfix"><?php echo p('pagination', $this->pagination, CURRENT_URL); ?></div>
</div>
<div class="clear"></div>
</div>
<table cellpadding="0" cellspacing="0" border="0" id="table" class="uiTable">
<thead>
<tr>
<th class="nosort" style="width: 12px; text-align: center;"><input name="checkbox_all" type="checkbox" id="check_all" /></th>
<th><h3>Reason</h3></th>
<th><h3>Message</h3></th>
<th><h3>Username</h3></th>
<th><h3>Ip</h3></th>
<th><h3>Post Date</h3></th>
<th><h3>Actions</h3></th>
</tr>
</thead>
<tbody>
<?php $count = count($this->flags);
foreach ($this->flags as $flag):
if ($flag['status'] == '1'):
$status_image = 'accept.png';
$status = 'suspend';
$alt = 'Active';
else:
$status_image = 'cancel.png';
$status = 'activate';
$alt = 'Suspended';
endif;
?>
<tr id="row_<?php echo $flag['flag_id']; ?>">
<td><input name="checked[<?php echo $flag['flag_id']; ?>]" type="checkbox" id="checkbox_item_<?php echo $flag['flag_id']; ?>" /></td>
<td><strong><?php echo e($this->reasons[$flag['reason']]); ?></strong></td>
<td><?php echo nl2br(e($flag['message'])); ?></td>
<td><strong><?php if ($flag['username'] == ''): echo 'none'; else: echo '<a href="',ADMIN_URL,'/index.php?q=user/view&id=',$flag['user_id'],'">',e($flag['username']),'</a>'; endif; ?></strong></td>
<td><?php echo long2ip($flag['ip']); ?></td>
<td><?php echo $flag['add_date']; ?></td>
<td>
<a href="#delete_flag" id="manage_flag_delete_<?php echo $flag['flag_id']; ?>" title="" /><img src="<?php echo TPL_REL; ?>/images/report_delete.png" alt="Delete" /></a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<div class="box_menu">
<div class="box_menu_left">
<select name="action" id="actions_bottom">
<option value="delete">Delete</option>
</select>
<input name="submit_actions" type="submit" class="button butDef" value="Go!" />
</div>
<div class="box_menu_right">
<div class="barNav clearfix"><?php echo p('pagination', $this->pagination, CURRENT_URL); ?></div>
</div>
<div class="clear"></div>
</div>
</form>
<div style="width: 100%; padding: 10px 0; text-align: center;">
<?php if ($this->photo['flagged'] == '1'): ?>
<input type="button" class="button butDef" value=" Unflag " onClick="window.location='<?php echo ADMIN_URL,'/index.php?q=photo/photo_flags&id='.$this->photo_id; ?>&a=unflag'" />
<?php endif; ?>
<?php if ($this->photo['status'] == '0'): ?>
<input type="button" class="button butDef" value=" Publish " onClick="window.location='<?php echo ADMIN_URL,'/index.php?q=photo/photo_flags&id='.$this->photo_id; ?>&a=publish'" />
<?php endif; ?>
<?php if ($this->photo['status'] == '1'): ?>
<input type="button" class="button butDef" value=" Suspend " onClick="window.location='<?php echo ADMIN_URL,'/index.php?q=photo/photo_flags&id='.$this->photo_id; ?>&a=suspend'" />
<?php endif; ?>
<input type="button" class="button butDef" value=" Delete" onClick="window.location='<?php echo ADMIN_URL,'/index.php?q=photo/photo_flags&id='.$this->photo_id; ?>&a=delete'" />
</div>
<?php else: ?>
<div class="none">Nobody flagged this photo!</div>
<?php endif; ?>
</div>
<div class="legend">
<img src="<?php echo TPL_REL; ?>/images/report_delete.png" alt="report_delete" /> Delete Report
</div>
</div>
</div>