Файл: adultscript-2.0.3-pro/files/admin/templates/default/video_duplicate.tpl.php
Строк: 71
<?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">
function mass_tools(ids, action) {
var form = '<form id="mass-tools" method="post" action="' + action + '">';
jQuery.each(ids, function(key, obj) {
var id = $(obj).val();
form = form + '<input name="videos[]" type="hidden" value="' + id + '" />';
});
var form = form + '</form>';
jQuery('body').prepend(form);
$("#mass-tools").submit();
}
$(document).ready(function() {
$("input[name='submit-edit']").click(function(e) {
var ids = $("input[id^='checkbox_item_']:checked");
mass_tools(ids, base_url + "/admin/index.php?q=video/mass_edit");
});
});
</script>
<div id="container" class="clearfix">
<div id="page">
<?php echo $this->fetch('video_menu'); ?>
<div class="content clearfix">
<?php if ($this->duplicates): ?>
<form id="duplicates" method="post" action="<?php echo ADMIN_URL; ?>/index.php?q=video/duplicate">
<fieldset>
<legend>Duplicate Videos</legend>
<table cellpadding="0" cellspacing="0" border="0" id="table" class="uiTable">
<thead>
<tr>
<th class="nosort" style="text-align: center;"><input name="checkbox_all" type="checkbox" id="check_all" /></th>
<th><h3>Title</h3></th>
</tr>
</thead>
<tbody>
<?php foreach ($this->duplicates as $video): ?>
<tr>
<td>
<?php $ids = explode(',', $video['ids']); foreach ($ids as $video_id): ?>
<input name="ids[]" value="<?php echo $video_id; ?>" type="checkbox" id="checkbox_item_<?php echo $video_id; ?>" /><?php echo $video_id; ?>
<?php endforeach; ?>
</td>
<td><?php echo e($video['title']); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</fieldset>
<div class="submit">
<input name="submit-edit" type="button" id="submit-edit" class="button butDef" value="Edit" />
<input name="submit-delete" type="submit" id="submit-delete" class="button butDef" value="Delete" />
</div>
</form>
<?php else: ?>
<form id="duplicates" method="post" action="<?php echo ADMIN_URL; ?>/index.php?q=video/duplicate">
<div class="none">This tool will help you find duplicate videos (based on the video title).<br />It is database intensive and your site might stop running for a few seconds!</div>
<div class="submit">
<input name="submit-duplicates" type="submit" id="submit-duplicates" class="button butDef" value="Run" />
</div>
</form>
<?php endif; ?>
</div>
</div>
</div>