124 lines
5.2 KiB
Smarty
124 lines
5.2 KiB
Smarty
{include file='admin_header.tpl'}
|
|
{literal}
|
|
<script type="text/javascript">
|
|
<!--
|
|
var item_id = 0;
|
|
|
|
function confirmDelete(id) {
|
|
item_id = id;
|
|
TB_show('{/literal}{$admin_ats_tracking_prices.delete_tariff}{literal}', '#TB_inline?height=100&width=300&inlineId=confirmdelete', '', '../images/trans.gif');
|
|
document.getElementById('deletebutton').focus();
|
|
}
|
|
|
|
function deleteItem() {
|
|
window.location = '{/literal}{$page}{literal}.php?task=delete&item_id='+item_id;
|
|
}
|
|
|
|
function createItem() {
|
|
$('createbutton').value = '{/literal}{$admin_ats_tracking_prices.add_tariff}{literal}';
|
|
$('error').innerHTML = '';
|
|
$('task').value = 'create';
|
|
$('item_id').value = '0';
|
|
$('col_days').defaultValue = '';
|
|
$('col_days').value = '';
|
|
|
|
$('price').defaultValue = '';
|
|
$('price').value = '';
|
|
TB_show('{/literal}{$admin_ats_tracking_prices.add_tariff}{literal}', '#TB_inline?height=200&width=350&inlineId=createitem', '', '../images/trans.gif');
|
|
}
|
|
|
|
function editItem(id,col_days, price) {
|
|
$('createbutton').value = '{/literal}{$admin_ats_tracking_prices.edit_tariff}{literal}';
|
|
$('error').innerHTML = '';
|
|
$('task').value = 'edit';
|
|
$('item_id').value = id;
|
|
$('col_days').defaultValue = col_days;
|
|
$('col_days').value = col_days;
|
|
$('price').defaultValue = price;
|
|
$('price').value = price;
|
|
TB_show('{/literal}{$admin_ats_tracking_prices.edit_tariff}{literal}', '#TB_inline?height=200&width=350&inlineId=createitem', '', '../images/trans.gif');
|
|
}
|
|
function createResult(is_error, error_message)
|
|
{
|
|
if(is_error != 0) {
|
|
$("TB_window").getElements('div[id=error]').each(function(el) { el.innerHTML = error_message });
|
|
} else {
|
|
parent.window.location = '{/literal}{$page}{literal}.php';
|
|
}
|
|
}
|
|
//-->
|
|
</script>
|
|
{/literal}
|
|
<table class='tabs' cellpadding='0' cellspacing='0'>
|
|
<tr>
|
|
<td class='tab'> </td>
|
|
<td class='tab1' NOWRAP><a href='admin_ts_tracking_prices.php'>{$header_ats_tracking.edit_tariffs}</a></td>
|
|
<td class='tab0'> </td>
|
|
<td class='tab2' NOWRAP><a href='admin_ats_tracking_settings.php'>{$header_ats_tracking.settings}</a></td>
|
|
<td class='tab3'> </td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div style="float:left;">
|
|
<h2>{$admin_ats_tracking_prices.title}{* Title *}</h2>
|
|
{$admin_ats_tracking_prices.description} {* Description *}
|
|
<br><br>
|
|
|
|
{* HIDDEN DIV TO DISPLAY CONFIRMATION MESSAGE *}
|
|
<div style='display: none;' id='confirmdelete'>
|
|
<div style='margin-top: 10px;text-align:center;margin-left:35px; ' >
|
|
<strong>{$header_ats_tracking.delete_tariff_confirm}</strong>
|
|
<br/>
|
|
<br/>
|
|
<input type='button' class='submit_gift' value='{$admin_ats_tracking_prices.delete_tariff}' id='deletebutton' onClick='parent.TB_remove();parent.deleteItem();'> <input type='button' class='submit_gift' value='{lang_print id=39}' onClick='parent.TB_remove();'>
|
|
</div></div>
|
|
{* HIDDEN DIV TO DISPLAY CREATE/EDIT *}
|
|
<div style='display: none;' id='createitem'>
|
|
<div id='error' ></div>
|
|
<form action='{$page}.php' method='post' target='ajaxframe' style="width:255px;margin:0 auto;padding-left:30px;padding-top:10px;">
|
|
<div style='margin-top: 10px;'>{* description *}</div>
|
|
<br>
|
|
<table cellpadding='0' cellspacing='0'>
|
|
<tr>
|
|
<td align='right'><strong>{$admin_ats_tracking_prices.count_days}: </strong></td>
|
|
<td>
|
|
<input type="text" class="text" id="col_days" name="col_days" value="1" maxlength="5" size="5" />
|
|
</tr>
|
|
<tr>
|
|
<td align='right'><strong>{$admin_ats_tracking_prices.price}: </strong></td>
|
|
<td>
|
|
<input type='text' id="price" class='text' name='price' id='price' maxlength="5" size="5" value='0.00' style="margin-top:5px"> {$sCurrency}</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
<input type='submit' class='submit_gift' id='createbutton' value='{lang_print id=262}'> <input type='button' class='submit_gift' value='{lang_print id=39}' onClick='parent.TB_remove();'>
|
|
<input type='hidden' name='task' value='create' id='task'>
|
|
<input type='hidden' name='item_id' id='item_id' value='0'>
|
|
</form>
|
|
</div>
|
|
|
|
|
|
<table cellpadding='0' cellspacing='0' style='width:350px;' class='list'>
|
|
<tr>
|
|
<td class='header' style='text-align:center;' width='10'>N</td>
|
|
<td class='header' style="text-align:center">{$admin_ats_tracking_prices.count_days}</td>
|
|
<td class='header' style="text-align:center">{$admin_ats_tracking_prices.price} ({$sCurrency})</td>
|
|
<td class='header' style="text-align:center">{lang_print id=153}</td>
|
|
</tr>
|
|
<!-- LOOP THROUGH ADMINS -->
|
|
{section name=item_loop loop=$items}
|
|
<tr class='{cycle values="background1,background2"}'>
|
|
<td class='item' align='center'>{$smarty.section.item_loop.iteration}</td>
|
|
<td class='item' align='center'>{$items[item_loop].col_days}</td>
|
|
<td class='item' align='center'>{if $items[item_loop].price == 0}{$header_ats_tracking.free}{else}{$items[item_loop].price}{/if}</td>
|
|
<td class='item' align='center'><a href="javascript:editItem({$items[item_loop].id}, {$items[item_loop].col_days}, {$items[item_loop].price});">{lang_print id=187}</a> | <a href="javascript:confirmDelete('{$items[item_loop].id}');">{lang_print id=155}</a></td>
|
|
</tr>
|
|
{/section}
|
|
</table>
|
|
<br />
|
|
<input type='button' class='button' value='{$admin_ats_tracking_prices.add_tariff}' onclick='createItem();'>
|
|
</div>
|
|
{* PAYMENTS *}
|
|
|
|
{include file='admin_footer.tpl'} |