Initial Commit of AgileBill Open Source
This commit is contained in:
229
themes/default/blocks/voip_rate/add.tpl
Normal file
229
themes/default/blocks/voip_rate/add.tpl
Normal file
@@ -0,0 +1,229 @@
|
||||
<!-- Display the form validation -->
|
||||
{if $form_validation}
|
||||
{ $block->display("core:alert_fields") }
|
||||
{/if}
|
||||
|
||||
<!-- Display the form to collect the input values -->
|
||||
<form id="task_add" name="task_add" method="post" action="">
|
||||
|
||||
<table width=100% border="0" cellspacing="0" cellpadding="0" class="table_background">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr valign="top">
|
||||
<td width="65%" class="table_heading">
|
||||
<center>
|
||||
{translate module=voip_rate}title_add{/translate}
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="65%" class="row1">
|
||||
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_name
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="voip_rate_name" value="{$VAR.voip_rate_name}" {if $voip_rate_name == true}class="form_field_error"{/if}>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_pattern
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<textarea id="voip_rate_pattern" name="voip_rate_pattern" {if $voip_rate_pattern == true}class="form_field_error"{/if} cols="55" rows="5">{$VAR.voip_rate_pattern}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_connect_fee
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="voip_rate_connect_fee" value="{$VAR.voip_rate_connect_fee}" {if $voip_rate_connect_fee == true}class="form_field_error"{/if}> (eg: 0.025 for a 2.5 cents connect charge.)
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_increment_seconds
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="voip_rate_increment_seconds" value="{$VAR.voip_rate_increment_seconds}" {if $voip_rate_increment_seconds == true}class="form_field_error"{/if}>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_seconds_included
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="voip_rate_seconds_included" value="{$VAR.voip_rate_seconds_included}" {if $voip_rate_seconds_included == true}class="form_field_error"{/if}>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_amount
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="voip_rate_amount" value="{$VAR.voip_rate_amount}" {if $voip_rate_amount == true}class="form_field_error"{/if}> (eg: 0.025 for 2.5 cents per min.)
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_min
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="voip_rate_min" value="{if $VAR.voip_rate_min}{$VAR.voip_rate_min}{else}0{/if}" {if $voip_rate_min == true}class="form_field_error"{/if}> (0 for no minimum) {translate module=voip}field_postpaid_only{/translate}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_max
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="voip_rate_max" value="{if $VAR.voip_rate_max}{$VAR.voip_rate_max}{else}-1{/if}" {if $voip_rate_max == true}class="form_field_error"{/if}> (-1 for no maximum) {translate module=voip}field_postpaid_only{/translate}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_type
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<select name="voip_rate_type" >
|
||||
<option value="0" {if $VAR.voip_rate_type == "0"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
type_innetwork
|
||||
{/translate}
|
||||
</option>
|
||||
<option value="1" {if $VAR.voip_rate_type == "1"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
type_local
|
||||
{/translate}
|
||||
</option>
|
||||
<option value="2" {if $VAR.voip_rate_type == "2"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
type_regular
|
||||
{/translate}
|
||||
</option>
|
||||
<option value="3" {if $VAR.voip_rate_type == "3"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
type_default
|
||||
{/translate}
|
||||
</option>
|
||||
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_direction
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<select name="voip_rate_direction" >
|
||||
<option value="0" {if $VAR.voip_rate_direction == "0"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
direction_inbound
|
||||
{/translate}
|
||||
</option>
|
||||
<option value="1" {if $VAR.voip_rate_direction == "1"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
direction_outbound
|
||||
{/translate}
|
||||
</option>
|
||||
<option value="2" {if $VAR.voip_rate_direction == "2"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
direction_both
|
||||
{/translate}
|
||||
</option>
|
||||
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_combine
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<select name="voip_rate_combine" >
|
||||
<option value="0" {if $VAR.voip_rate_combine == "0"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
type_no
|
||||
{/translate}
|
||||
</option>
|
||||
<option value="1" {if $VAR.voip_rate_combine == "1"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
type_yes
|
||||
{/translate}
|
||||
</option>
|
||||
</select> {translate module=voip}field_postpaid_only{/translate}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_percall
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<select name="voip_rate_perCall" >
|
||||
<option value="0" {if $VAR.voip_rate_perCall == "0"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
type_no
|
||||
{/translate}
|
||||
</option>
|
||||
<option value="1" {if $VAR.voip_rate_perCall == "1"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
type_yes
|
||||
{/translate}
|
||||
</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td width="35%"></td>
|
||||
<td width="65%">
|
||||
<input type="hidden" name="voip_rate_date_added" value="NOW()">
|
||||
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
|
||||
<input type="hidden" name="_page" value="voip_rate:view">
|
||||
<input type="hidden" name="_page_current" value="voip_rate:add">
|
||||
<input type="hidden" name="do[]" value="voip_rate:add">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
64
themes/default/blocks/voip_rate/products.tpl
Normal file
64
themes/default/blocks/voip_rate/products.tpl
Normal file
@@ -0,0 +1,64 @@
|
||||
<h2>Define Product Rate Tables</h2>
|
||||
|
||||
<form>
|
||||
<p>
|
||||
Select a Product:
|
||||
{html_menu field=product assoc_table=product assoc_field=sku conditions="(prod_plugin_file='VOIP' OR prod_plugin_file='PREPAID')" default=$VAR.product}
|
||||
<input type="submit" value="Update Rate Tables">
|
||||
<input name="_page" type="hidden" value="voip_rate:products">
|
||||
</p>
|
||||
</form>
|
||||
|
||||
{if $VAR.product}
|
||||
{$method->exe_noauth('voip_rate','product_rates')}
|
||||
<hr>
|
||||
<form>
|
||||
<table width="100%" border="0" cellpadding="5" cellspacing="2" class="body">
|
||||
<tr>
|
||||
<td width="34%"><strong>Available Rates </strong></td>
|
||||
<td width="66%"><strong>Applied Rates </strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Select rates above to associate with this product. </td>
|
||||
|
||||
<td>
|
||||
Select rates above to remove from this product. </td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>
|
||||
{if $avail}
|
||||
<select name="avail[]" size="30" multiple id="avail">
|
||||
{foreach from=$avail item=rate}
|
||||
<option value="{$rate.id}">{$rate.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{else}
|
||||
No rates available that have not already been applied to this product.
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $assigned}
|
||||
<select name="assigned[]" size="30" multiple id="assigned">
|
||||
{foreach from=$assigned item=rate}
|
||||
<option value="{$rate.id}">{$rate.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{else}
|
||||
No rates have been applied to this product.
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="submit" name="Submit" value="Update Changes">
|
||||
<input name="product" type="hidden" value="{$VAR.product}">
|
||||
<input name="do[]" type="hidden" value="voip_rate:products">
|
||||
<input name="_page" type="hidden" value="voip_rate:products"></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>HINT: Hold downt the 'Ctrl' key to select or deselect multiple rates. </p>
|
||||
<p>{/if}
|
||||
</p>
|
||||
</form>
|
164
themes/default/blocks/voip_rate/search_form.tpl
Normal file
164
themes/default/blocks/voip_rate/search_form.tpl
Normal file
@@ -0,0 +1,164 @@
|
||||
|
||||
<table width=100% border="0" cellspacing="0" cellpadding="0" class="table_background">
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% border="0" cellspacing="1" cellpadding="0" align="center">
|
||||
<tr>
|
||||
<td class="table_heading">
|
||||
<center>
|
||||
{translate module=task}
|
||||
menu
|
||||
{/translate}
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1">
|
||||
<table width="100%" border="0" cellpadding="5" class="row1">
|
||||
<tr>
|
||||
<td>{translate module=task}help_file{/translate}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{translate module=voip_rate}
|
||||
field_date_start
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
{ $list->calender_search("voip_rate_date_start", $VAR.voip_rate_date_start, "form_field", "") }
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_date_expire
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
{ $list->calender_search("voip_rate_date_expire", $VAR.task_date_expire, "form_field", "") }
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=task}
|
||||
field_date_last
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
{ $list->calender_search("task_date_last", $VAR.task_date_last, "form_field", "") }
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=task}
|
||||
field_name
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="task_name" value="{$VAR.task_name}" {if $task_name == true}class="form_field_error"{/if}> {translate}search_partial{/translate}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=task}
|
||||
field_description
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="task_description" value="{$VAR.task_description}" {if $task_description == true}class="form_field_error"{/if}> {translate}search_partial{/translate}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=task}
|
||||
field_log
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
{ $list->bool("task_log", "all", "form_menu") }
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=task}
|
||||
field_type
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
{ $list->bool("task_type", "all", "form_menu") }
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=task}
|
||||
field_command
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="task_command" value="{$VAR.task_command}" {if $task_command == true}class="form_field_error"{/if}> {translate}search_partial{/translate}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=task}
|
||||
field_int_hour
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="task_int_hour" value="{$VAR.task_int_hour}" {if $task_int_hour == true}class="form_field_error"{/if}> {translate}search_partial{/translate}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=task}
|
||||
field_int_month_day
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="task_int_month_day" value="{$VAR.task_int_month_day}" {if $task_int_month_day == true}class="form_field_error"{/if}> {translate}search_partial{/translate}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=task}
|
||||
field_int_week_day
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="task_int_week_day" value="{$VAR.task_int_week_day}" {if $task_int_week_day == true}class="form_field_error"{/if}> {translate}search_partial{/translate}
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Define the results per page -->
|
||||
<tr class="row1" valign="top">
|
||||
<td width="35%">{translate}search_results_per{/translate}</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="limit" size="5" value="{$task_limit}">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Define the order by field per page -->
|
||||
<tr class="row1" valign="top">
|
||||
<td width="35%">{translate}search_order_by{/translate}</td>
|
||||
<td width="65%">
|
||||
<select name="order_by">
|
||||
{foreach from=$task item=record}
|
||||
<option value="{$record.field}">{$record.translate}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="row1" valign="top">
|
||||
<td width="35%"></td>
|
||||
<td width="65%">
|
||||
<input type="submit" name="Submit" value="{translate}search{/translate}" class="form_button">
|
||||
<input type="hidden" name="_page" value="core:search">
|
||||
<input type="hidden" name="_escape" value="Y">
|
||||
<input type="hidden" name="module" value="voip_rate">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{ $block->display("core:saved_searches") }
|
||||
{ $block->display("core:recent_searches") }
|
||||
{/if}
|
119
themes/default/blocks/voip_rate/search_show.tpl
Normal file
119
themes/default/blocks/voip_rate/search_show.tpl
Normal file
@@ -0,0 +1,119 @@
|
||||
|
||||
|
||||
{$method->exe("voip_rate","search_show")}
|
||||
{if ($method->result == FALSE)}
|
||||
{$block->display("core:method_error")}
|
||||
{else}
|
||||
{if $results == 1}
|
||||
{translate results=$results}search_result_count{/translate}
|
||||
{else}
|
||||
{translate results=$results}search_results_count{/translate}
|
||||
{/if}
|
||||
<BR>
|
||||
|
||||
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
<!-- START
|
||||
var module = 'voip_rate';
|
||||
{/literal}
|
||||
{if $VAR._print == TRUE}
|
||||
var p = '&_escape=y&_print=y';
|
||||
{else}
|
||||
var p = '';
|
||||
{/if}{literal}
|
||||
var IMAGE = '{/literal}{$NONSSL_IMAGE}{literal}';
|
||||
var order = '{/literal}{$order}{literal}';
|
||||
var sort1 = '{/literal}{$sort}{literal}';
|
||||
var search_id = '{/literal}{$search_id}{literal}';
|
||||
var page = {/literal}{$page}{literal};
|
||||
var pages = '{/literal}{$pages}{literal}';
|
||||
var results = '{/literal}{$results}{literal}';
|
||||
var limit = '{/literal}{$limit}{literal}';
|
||||
record_arr = new Array ({/literal}{$limit}{literal});
|
||||
var i = 0;
|
||||
// END -->
|
||||
</script>
|
||||
<SCRIPT SRC="themes/{/literal}{$THEME_NAME}{literal}/search.js"></SCRIPT>
|
||||
{/literal}
|
||||
|
||||
<!-- SHOW THE SEARCH NAVIGATION MENU -->
|
||||
<center><script language="JavaScript">document.write(search_nav_top());</script></center>
|
||||
|
||||
<!-- BEGIN THE RESULTS CONTENT AREA -->
|
||||
<div id="search_results" onKeyPress="key_handler(event);">
|
||||
<table id="main1" width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
|
||||
<form id="form1" name="form1" method="post" action="">
|
||||
<tr>
|
||||
<td>
|
||||
<table id="main2" width="100%" border="0" cellspacing="1" cellpadding="2">
|
||||
|
||||
|
||||
<!-- DISPLAY THE SEARCH HEADING -->
|
||||
<tr valign="middle" align="center" class="table_heading">
|
||||
<td width="50" class="table_heading"> </td>
|
||||
<td width="412" class="table_heading">
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
document.write(search_heading('{/literal}{translate module=voip_rate}field_name{/translate}{literal}','name'));
|
||||
</script>
|
||||
{/literal}
|
||||
</td>
|
||||
<td width="620" class="table_heading">
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
document.write(search_heading('{/literal}{translate module=voip_rate}field_pattern{/translate}{literal}','pattern'));
|
||||
</script>
|
||||
{/literal}
|
||||
</td>
|
||||
<td width="195" class="table_heading">
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
document.write(search_heading('{/literal}{translate module=voip_rate}field_amount{/translate}{literal}','amount'));
|
||||
</script>
|
||||
{/literal}
|
||||
</td>
|
||||
<!-- LOOP THROUGH EACH RECORD -->
|
||||
{foreach from=$voip_rate item=record}
|
||||
<tr id="row{$record.id}" onClick="row_sel('{$record.id}',1);" onDblClick="window.location='?_page=voip_rate:view&id={$record.id},';" onMouseOver="row_mouseover('{$record.id}', 'row_mouse_over_select', 'row_mouse_over');" onMouseOut="row_mouseout('{$record.id}', '{$record._C}', 'row_select');" class="{$record._C}">
|
||||
|
||||
<td align="center" width="50">
|
||||
<input type="checkbox" name="record{$record.id}" value="{$record.id}" onClick="row_sel('{$record.id}',1,'{$record._C}');">
|
||||
</td>
|
||||
|
||||
<td width="412">
|
||||
{$record.name}
|
||||
</td>
|
||||
<td width="620">
|
||||
{$record.pattern}
|
||||
</td>
|
||||
|
||||
<td width="195">
|
||||
{$record.amount}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
{literal}
|
||||
<script language="JavaScript">row_sel('{/literal}{$record.id}{literal}', 0, '{/literal}{$record._C}{literal}'); record_arr[i] = '{/literal}{$record.id}{literal}'; i++; </script>
|
||||
{/literal}
|
||||
{/foreach}
|
||||
<!-- END OF RESULT LOOP -->
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
{if $VAR._print != TRUE}<br>
|
||||
<center>
|
||||
<input type="submit" name="Submit" value="{translate}view_edit{/translate}" onClick="mass_do('', module+':view', limit, module);" class="form_button">
|
||||
<input type="submit" name="Submit" value="{translate}delete{/translate}" onClick="mass_do('delete', module+':search_show&search_id={$search_id}&page={$page}&order_by={$order}&{$sort}', limit, module);" class="form_button">
|
||||
<input type="submit" name="Submit" value="{translate}select_all{/translate}" onClick="all_select(record_arr);" class="form_button">
|
||||
<input type="submit" name="Submit" value="{translate}deselect_all{/translate}" onClick="all_deselect(record_arr);" class="form_button">
|
||||
<input type="submit" name="Submit" value="{translate}range_select{/translate}" onClick="all_range_select(record_arr,limit);" class="form_button">
|
||||
<br>
|
||||
</center>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
275
themes/default/blocks/voip_rate/view.tpl
Normal file
275
themes/default/blocks/voip_rate/view.tpl
Normal file
@@ -0,0 +1,275 @@
|
||||
{ $method->exe("voip_rate","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
|
||||
|
||||
{literal}
|
||||
<script src="themes/{/literal}{$THEME_NAME}{literal}/view.js"></script>
|
||||
<script language="JavaScript">
|
||||
var module = 'voip_rate';
|
||||
var locations = '{/literal}{$VAR.module_id}{literal}';
|
||||
var id = '{/literal}{$VAR.id}{literal}';
|
||||
var ids = '{/literal}{$VAR.ids}{literal}';
|
||||
var array_id = id.split(",");
|
||||
var array_ids = ids.split(",");
|
||||
var num=0;
|
||||
if(array_id.length > 2) {
|
||||
document.location = '?_page='+module+':view&id='+array_id[0]+'&ids='+id;
|
||||
}else if (array_ids.length > 2) {
|
||||
document.write(view_nav_top(array_ids,id,ids));
|
||||
}
|
||||
|
||||
function delete_record(id,ids)
|
||||
{
|
||||
temp = window.confirm("{/literal}{translate}alert_delete{/translate}{literal}");
|
||||
if(temp == false) return;
|
||||
|
||||
var replace_id = id + ",";
|
||||
ids = ids.replace(replace_id, '');
|
||||
if(ids == '') {
|
||||
var url = '?_page=core:search&module=' + module + '&do[]=' + module + ':delete&delete_id=' + id + COOKIE_URL;
|
||||
window.location = url;
|
||||
return;
|
||||
} else {
|
||||
var page = 'view&id=' +ids;
|
||||
}
|
||||
|
||||
var doit = 'delete';
|
||||
var url = '?_page='+ module +':'+ page +'&do[]=' + module + ':' + doit + '&delete_id=' + id + COOKIE_URL;
|
||||
window.location = url;
|
||||
}
|
||||
// END -->
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
<!-- Loop through each record -->
|
||||
{foreach from=$voip_rate item=voip_rate} <a name="{$voip_rate.id}"></a>
|
||||
|
||||
<!-- Display the field validation -->
|
||||
{if $form_validation}
|
||||
{ $block->display("core:alert_fields") }
|
||||
{/if}
|
||||
|
||||
<!-- Display each record -->
|
||||
<form name="voip_rate_view" method="post" action="">
|
||||
|
||||
<table width=100% border="0" cellspacing="0" cellpadding="0" class="table_background">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr valign="top">
|
||||
<td width="65%" class="table_heading">
|
||||
<center>
|
||||
{translate module=voip_rate}
|
||||
title_view
|
||||
{/translate}
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="65%" class="row1">
|
||||
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_name
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="voip_rate_name" value="{$voip_rate.name}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_pattern
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<textarea name="voip_rate_pattern" cols="55" rows="5">{$voip_rate.pattern}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_connect_fee
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="voip_rate_connect_fee" value="{$voip_rate.connect_fee}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_increment_seconds
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="voip_rate_increment_seconds" value="{$voip_rate.increment_seconds}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_seconds_included
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="voip_rate_seconds_included" value="{$voip_rate.seconds_included}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_amount
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="voip_rate_amount" value="{$voip_rate.amount}"> (eg: 0.025 for a 2.5 cents connect charge.)
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_min
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="voip_rate_min" value="{$voip_rate.min}"> (0 for no minimum) {translate module=voip}field_postpaid_only{/translate}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_max
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="voip_rate_max" value="{$voip_rate.max}"> (-1 for no maximum) {translate module=voip}field_postpaid_only{/translate}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_type
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<select name="voip_rate_type" >
|
||||
<option value="0" {if $voip_rate.type == "0"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
type_innetwork
|
||||
{/translate}
|
||||
</option>
|
||||
<option value="1" {if $voip_rate.type == "1"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
type_local
|
||||
{/translate}
|
||||
</option>
|
||||
<option value="2" {if $voip_rate.type == "2"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
type_regular
|
||||
{/translate}
|
||||
</option>
|
||||
<option value="3" {if $voip_rate.type == "3"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
type_default
|
||||
{/translate}
|
||||
</option>
|
||||
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_direction
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<select name="voip_rate_direction" >
|
||||
<option value="0" {if $voip_rate.direction == "0"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
direction_inbound
|
||||
{/translate}
|
||||
</option>
|
||||
<option value="1" {if $voip_rate.direction == "1"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
direction_outbound
|
||||
{/translate}
|
||||
</option>
|
||||
<option value="2" {if $voip_rate.direction == "2"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
direction_both
|
||||
{/translate}
|
||||
</option>
|
||||
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_combine
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<select name="voip_rate_combine" >
|
||||
<option value="0" {if $voip_rate.combine == "0"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
type_no
|
||||
{/translate}
|
||||
</option>
|
||||
<option value="1" {if $voip_rate.combine == "1"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
type_yes
|
||||
{/translate}
|
||||
</option>
|
||||
</select> {translate module=voip}field_postpaid_only{/translate}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=voip_rate}
|
||||
field_percall
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<select name="voip_rate_perCall" >
|
||||
<option value="0" {if $voip_rate.perCall == "0"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
type_no
|
||||
{/translate}
|
||||
</option>
|
||||
<option value="1" {if $voip_rate.perCall == "1"}selected{/if}>
|
||||
{translate module=voip_rate}
|
||||
type_yes
|
||||
{/translate}
|
||||
</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="row1" valign="middle" align="left">
|
||||
<td width="35%"><input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button"></td>
|
||||
<td width="65%">
|
||||
<div align="right">
|
||||
<input type="button" name="delete" value="{translate}delete{/translate}" class="form_button" onClick="delete_record('{$voip_rate.id}','{$VAR.id}');">
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="_page" value="voip_rate:view">
|
||||
<input type="hidden" name="voip_rate_id" value="{$voip_rate.id}">
|
||||
<input type="hidden" name="do[]" value="voip_rate:update">
|
||||
<input type="hidden" name="id" value="{$VAR.id}">
|
||||
</form>
|
||||
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
|
Reference in New Issue
Block a user