Файл: adultscript-2.0.3-pro/files/admin/templates/default/language_manage.tpl.php
Строк: 164
<?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_enable = 'Are you sure you want to enable this language?';
var lang_question_disable = 'Are you sure you want to disable this language?';
var lang_question_delete = 'Are you sure you want to delete this language?';
$(document).ready(function() {
$("a[id^='manage_language_']").click(function(e) {
e.preventDefault();
var arr = $(this).attr('id').split('_');
var action = arr[2];
var code = arr[3];
if (action == 'enable') {
var answer = confirm(lang_question_enable);
} else if (action == 'disable') {
var answer = confirm(lang_question_disable);
} else if (action == 'delete') {
var answer = confirm(lang_question_delete);
}
if (answer) {
$("input[name='action']").val(action);
$("input[name='code']").val(code);
$("#language_manage_form").submit();
}
});
$("input[name='set-default']").click(function() {
var checked = $("input[name='default']:checked").val();
if (checked == 'undefined') {
alert('Please check one language before submitting!');
return;
}
$("#language-default-form").submit();
});
});
</script>
<div id="container" class="clearfix">
<div id="page">
<?php echo $this->fetch('main_menu'); ?>
<div class="content clearfix">
<?php echo $this->fetch('language_menu'); ?>
<?php if ($this->languages): ?>
<form id="language_manage_form" method="post" action="<?php echo CURRENT_URL; ?>" />
<input name="action" type="hidden" value="" />
<input name="code" type="hidden" value="" />
</form>
<form id="language-default-form" method="post" action="<?php echo ADMIN_URL; ?>/index.php?q=language/manage">
<div class="submit">
<input name="set-default" type="button" id="set-default-top" class="button butDef" value="Set Default" />
</div>
<table cellpadding="0" cellspacing="0" border="0" id="table" class="uiTable">
<thead>
<tr>
<th class="nosort" style="width: 20px; text-align: center;">#</th>
<th><h3>Code</h3></th>
<th><h3>Name</h3></th>
<th><h3>Flag</h3></th>
<th><h3>Status</h3></th>
<th><h3>Actions</h3></th>
</tr>
</thead>
<tbody>
<?php foreach ($this->languages as $language):
if ($language['status'] == '1'):
$status_image = 'accept.png';
$status = 'disable';
else:
$status_image = 'cancel.png';
$status = 'enable';
endif; ?>
<tr id="row_<?php echo $language['code']; ?>">
<td><input name="default" type="radio" class="radio" value="<?php echo $language['code']; ?>"<?php if ($this->cfg['language'] == $language['code']): echo ' checked="checked"'; endif; ?> /></td>
<td><strong><?php echo e($language['code']); ?></strong></td>
<td><?php echo e($language['name']); ?></td>
<td><img src="<?php echo MEDIA_URL,'/flags/',$language['flag'],'.png'; ?>" alt="<?php echo $language['flag']; ?>" /></td>
<td><a href="#status" id="manage_language_<?php echo $status; ?>_<?php echo $language['code']; ?>" title="Click to <?php echo $status; ?> this language!"><img src="<?php echo TPL_REL; ?>/images/<?php echo $status_image; ?>" /></a></td>
<td>
<a href="<?php echo ADMIN_URL; ?>/index.php?q=language/files&code=<?php echo $language['code']; ?>" title="Click to manage files for this language!"><img src="<?php echo TPL_REL; ?>/images/folder.png" alt="package" /></a>
<a href="<?php echo ADMIN_URL; ?>/index.php?q=language/edit&code=<?php echo $language['code']; ?>" title="Click to edit language information!"><img src="<?php echo TPL_REL; ?>/images/folder_edit.png" alt="package" /></a>
<a href="<?php echo ADMIN_URL; ?>/index.php?q=language/export&code=<?php echo $language['code']; ?>" title="Click to export this language to xml!"><img src="<?php echo TPL_REL; ?>/images/folder_go.png" alt="package" /></a>
<a href="#delete-language" id="manage_language_delete_<?php echo $language['code']; ?>" title="Click to uninstall this language package!"><img src="<?php echo TPL_REL; ?>/images/folder_delete.png" alt="package" /></a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<div class="submit">
<input name="set-default" type="button" id="set-default-bottom" class="button butDef" value="Set Default" />
</div>
</form>
<?php else: ?>
<div class="none">No languages found!</div>
<?php endif; ?>
</div>
<div class="legend">
</div>
</div>
</div>