Файл: adultscript-2.0.3-pro/files/admin/templates/default/link_manage.tpl.php
Строк: 261
<?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 link?";
var lang_question_activate = "Are you sure you want to activate this link?";
var lang_question_delete = "Are you sure you want to delete this link?";
$(document).ready(function() {
$("a[id^='manage_link_']").click(function(e) {
e.preventDefault();
var click_id = $(this).attr('id');
var click_arr = click_id.split('_');
var action = click_arr[2];
var link_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='link_id']").val(link_id);
$("#manage_link_form").submit();
}
});
});
</script>
<div id="container" class="clearfix">
<div id="page">
<?php echo $this->fetch('link_menu'); ?>
<div class="content clearfix">
<?php echo $this->fetch('link_manage_menu'); ?>
<?php if ($this->links): ?>
<form name="manage_link_form" id="manage_link_form" method="post" action="<?php echo CURRENT_URL; ?>">
<input name="action" type="hidden" value="" />
<input name="link_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 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>Title</h3></th>
<th><h3>Linkback</h3></th>
<th><h3>Type</h3></th>
<th><h3>Widget</h3></th>
<th><h3>Clicks</h3></th>
<th><h3>Status</h3></th>
<th><h3>Actions</h3></th>
</tr>
</thead>
<tbody>
<?php $count = count($this->links);
foreach ($this->links as $link):
if ($link['status'] == '1'):
$status_image = 'accept.png';
$status = 'suspend';
else:
$status_image = 'cancel.png';
$status = 'activate';
endif; ?>
<tr id="row_<?php echo $link['link_id']; ?>">
<td><input name="checkbox_link_<?php echo $link['link_id']; ?>" type="checkbox" id="checkbox_item_<?php echo $link['link_id']; ?>" /></td>
<td width="35%"><strong><a href="<?php echo e($link['url']); ?>"><?php echo e($link['title']); ?></a></strong></td>
<td><a href="<?php echo e($link['linkback']); ?>" target="blank"><?php echo e($link['linkback']); ?></a></td>
<td><strong><?php if ($link['type'] == 'sponsor'): echo 'Sponsored'; else: echo 'Link Exchange'; endif; ?></strong></td>
<td><strong><?php echo ucfirst(e($link['widget'])); ?></strong></td>
<td><strong><?php echo $link['clicks']; ?></strong></td>
<td><a href="#status" id="manage_link_<?php echo $status; ?>_<?php echo $link['link_id']; ?>" title="Click to <?php if ($link['status'] == '0'): echo 'activate'; else: echo 'suspend'; endif; ?> this link!"><img src="<?php echo TPL_REL; ?>/images/<?php echo $status_image; ?>" /></a></td>
<td>
<a href="<?php echo ADMIN_URL; ?>/index.php?q=link/view&id=<?php echo $link['link_id']; ?>" title="Click to view link details"><img src="<?php echo TPL_REL; ?>/images/link.png" alt="Alt" /></a>
<a href="<?php echo $link['url']; ?>" target="_blank" title="Click to visit link!"><img src="<?php echo TPL_REL; ?>/images/link_go.png" alt="" /></a>
<a href="<?php echo ADMIN_URL; ?>/index.php?q=link/edit&id=<?php echo $link['link_id']; ?>" id="edit_user_<?php echo $link['link_id']; ?>"><img src="<?php echo TPL_REL; ?>/images/link_edit.png" alt="Edit" /></a>
<a href="#delete" id="manage_link_delete_<?php echo $link['link_id']; ?>" title="Click to delete this link!"><img src="<?php echo TPL_REL; ?>/images/link_delete.png" alt="Delete" /></a>
<?php if ($link['email'] != ''): ?>
<a href="<?php echo ADMIN_URL; ?>/index.php?q=email/send&email=<?php echo e($link['email']); ?>" title="Click to email this link's webmasters!"><img src="<?php echo TPL_REL; ?>/images/email.png" alt="" /></a>
<?php endif; ?>
</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 class="barNav clearfix"><?php echo p('pagination', $this->pagination, CURRENT_URL); ?></div>
</div>
<div class="clear"></div>
</div>
</form>
<?php else: ?>
<div class="none">No links found!</div>
<?php endif; ?>
</div>
<div class="legend">
<img src="<?php echo TPL_REL; ?>/images/link.png" alt="link_view" /> View Link
<img src="<?php echo TPL_REL; ?>/images/link_go.png" alt="user_edit" /> Visit Link
<img src="<?php echo TPL_REL; ?>/images/link_edit.png" alt="user_edit" /> Edit Link
<img src="<?php echo TPL_REL; ?>/images/link_delete.png" alt="user_delete" /> Delete Link
<img src="<?php echo TPL_REL; ?>/images/email.png" alt="email_webmaster" /> Email Webmaster
<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>