Файл: adultscript-2.0.3-pro/files/admin/templates/default/photo_server.tpl.php
Строк: 167
<?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 server (all server photos will not work)?";
var lang_question_activate = "Are you sure you want to activate this server?";
var lang_question_delete = "Are you sure you want to delete this server (all server photos will be suspended)?";
$(document).ready(function() {
$("a[id^='manage_server_']").click(function(e) {
e.preventDefault();
var click_id = $(this).attr('id');
var click_arr = click_id.split('_');
var action = click_arr[2];
var server_id = click_arr[3];
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);
}
if (answer) {
$("input[name='action']").val(action);
$("input[name='server_id']").val(server_id);
$("#manage_server_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_server_menu'); ?>
<?php if ($this->servers): ?>
<form name="manage_server_form" id="manage_server_form" method="post" action="<?php echo CURRENT_URL; ?>">
<input name="action" type="hidden" value="" />
<input name="server_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="suspend">Suspend</option>
<option value="activate">Activate</option>
<option value="delete">Delete</option>
</select>
<input name="submit_actions" type="submit" class="button butDef" value="Go!" />
</div>
<div class="box_menu_right">
</div>
<div class="clear"></div>
</div>
<table cellpadding="0" cellspacing="0" border="0" id="table" class="uiTable">
<thead>
<tr>
<th><h3>Id</h3></th>
<th><h3>Name</h3></th>
<th><h3>Last Used</h3></th>
<th><h3>Photos</h3></th>
<th><h3>Status</h3></th>
<th><h3>Actions</h3></th>
</tr>
</thead>
<tbody>
<?php $count = count($this->servers);
foreach ($this->servers as $server):
if ($server['status'] == '1'):
$status_image = 'accept.png';
$status = 'suspend';
else:
$status_image = 'cancel.png';
$status = 'activate';
endif; ?>
<tr id="row_<?php echo $server['server_id']; ?>">
<td><?php echo $server['server_id']; ?></td>
<td width="35%"><strong><?php echo e($server['server_name']); ?></strong></td>
<td><strong><?php if ($server['last_used'] == '0'): echo 'never'; else: echo VDate::nice($server['last_used']); endif; ?></strong></td>
<td><strong><?php echo $server['total_photos']; ?></strong></td>
<td><a href="#status" id="manage_server_<?php echo $status; ?>_<?php echo $server['server_id']; ?>" title="Click to <?php if ($server['status'] == '0'): echo 'activate'; else: echo 'suspend'; endif; ?> this server!"><img src="<?php echo TPL_REL; ?>/images/<?php echo $status_image; ?>" /></a></td>
<td>
<a href="<?php echo ADMIN_URL; ?>/index.php?q=photo/server_edit&id=<?php echo $server['server_id']; ?>" title="Click to edit this server information!"><img src="<?php echo TPL_REL; ?>/images/server_edit.png" alt="Edit" /></a>
<a href="<?php echo ADMIN_URL; ?>/index.php?q=photo/server_test&id=<?php echo $server['server_id']; ?>" title="Click to test this server's information!"><img src="<?php echo TPL_REL; ?>/images/server_connect.png" alt="Tes" /></a>
<a href="#delete" id="manage_server_delete_<?php echo $server['server_id']; ?>" title="Click to delete this server!"><img src="<?php echo TPL_REL; ?>/images/server_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="suspend">Suspend</option>
<option value="activate">Activate</option>
<option value="delete">Delete</option>
</select>
<input name="submit_actions" type="submit" class="button butDef" value="Go!" />
</div>
<div class="box_menu_right">
</div>
<div class="clear"></div>
</div>
</form>
<?php else: ?>
<div class="none">No servers found!</div>
<?php endif; ?>
</div>
<div class="legend">
<img src="<?php echo TPL_REL; ?>/images/server_edit.png" alt="server_edit" /> Edit Server
<img src="<?php echo TPL_REL; ?>/images/server_delete.png" alt="server_delete" /> Delete Server
<img src="<?php echo TPL_REL; ?>/images/server_connect.png" alt="server_test" /> Test Server
<img src="<?php echo TPL_REL; ?>/images/accept.png" alt="accept" /> Active - Action Suspend
<img src="<?php echo TPL_REL; ?>/images/cancel.png" alt="cancel" /> Suspended - Action Activate
</div>
</div>
</div>