Initial Commit of AgileBill Open Source

This commit is contained in:
unknown
2008-11-26 14:50:40 -08:00
parent ae5a0fc25e
commit 02306ccc47
2954 changed files with 410976 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
<!-- Display the form validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
{/if}
<!-- Display the form to collect the input values -->
<form id="voip_did_plugin_add" name="voip_did_plugin_add" method="post" action="">
{$COOKIE_FORM}
<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_did_plugin}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_did_plugin}
field_name
{/translate}</td>
<td width="65%">
<input type="text" name="voip_did_plugin_name" value="{$VAR.voip_did_plugin_name}" {if $voip_did_plugin_name == true}class="form_field_error"{/if}>
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=voip_did_plugin}
field_plugin
{/translate}</td>
<td width="65%">{html_menu_files path=voip_did field=voip_did_plugin_plugin} </td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=voip_did_plugin}
field_avail_countries
{/translate}</td>
<td width="65%">
{html_menu_multi name=voip_did_plugin_avail_countries assoc_table="voip_iso_country_code" assoc_field="name" size=15}
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=voip_did_plugin}
field_release_minutes
{/translate}</td>
<td width="65%">
<input type="text" name="voip_did_plugin_release_minutes" value="{$VAR.voip_did_plugin_release_minutes}" {if $voip_did_plugin_release_minutes == true}class="form_field_error"{/if}>
</td>
</tr>
<tr valign="top">
<td width="35%"></td>
<td width="65%">
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
<input type="hidden" name="_page" value="voip_did_plugin:view">
<input type="hidden" name="_page_current" value="voip_did_plugin:add">
<input type="hidden" name="do[]" value="voip_did_plugin:add">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>

View File

@@ -0,0 +1,10 @@
<!-- nothing to show for this plugin, but use the following to configure other plugins that require login, etc
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top">
<td width="35%">Some Data</td>
<td width="65%">
<input type="text" name="voip_did_plugin_plugin_data[field]" value="{$plugin.field}" class="form_field">
</td>
</tr>
</table>
-->

View File

@@ -0,0 +1,35 @@
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top">
<td width="35%">DIDX Username</td>
<td width="65%">
<input type="text" name="voip_did_plugin_plugin_data[user]" value="{$plugin.user}" class="form_field">
</td>
</tr>
<tr valign="top">
<td>DIDX Pass </td>
<td><input type="text" name="voip_did_plugin_plugin_data[pass]" value="{$plugin.pass}" class="form_field"></td>
</tr>
<tr valign="top">
<td>Destination Host (for Provisioning) </td>
<td><input type="text" name="voip_did_plugin_plugin_data[host]" value="{$plugin.host}" class="form_field"></td>
</tr>
<tr valign="top">
<td>Channel Type</td>
<td><input type="text" name="voip_did_plugin_plugin_data[type]" value="{$plugin.type}" class="form_field"></td>
</tr>
<tr valign="top">
<td colspan="2"><p><br>
Please select the countries and area codes to retrieve lists of available. If you do not select both the country and the area code, DIDX will not return any available DIDS.<br>
<br>
Formatting example (place each country on a new line): <br>
1:888,800,864,567<br>
44:20,121,871,800,1223</p>
<p> For USA you can enter '*' to return all area codes, for all other countries you must enter each area code.</p>
<p align="center">
<textarea name="voip_did_plugin_plugin_data[country_area]" cols="60" rows="6" class="form_field">{$plugin.country_area}</textarea>
</p></td>
</tr>
</table>
<br>
<br>

View File

@@ -0,0 +1,38 @@
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top">
<td width="35%">Magrathea-Telecom.co.uk Username</td>
<td width="65%">
<input type="text" name="voip_did_plugin_plugin_data[user]" value="{$plugin.user}" class="form_field">
</td>
</tr>
<tr valign="top">
<td>Magrathea-Telecom.co.uk Pass </td>
<td><input type="text" name="voip_did_plugin_plugin_data[pass]" value="{$plugin.pass}" class="form_field"></td>
</tr>
<tr valign="top">
<td>Magrathea-Telecom.co.uk Server Hostname </td>
<td><input type="text" name="voip_did_plugin_plugin_data[server]" value="{$plugin.server}" class="form_field"></td>
</tr>
<tr valign="top">
<td>Number of DIDs to request </td>
<td><input type="text" name="voip_did_plugin_plugin_data[poolcount]" value="{$plugin.poolcount}" class="form_field"></td>
</tr>
<tr valign="top">
<td>Destination Host (for Provisioning) </td>
<td><input type="text" name="voip_did_plugin_plugin_data[host]" value="{$plugin.host}" class="form_field"></td>
</tr>
<tr valign="top">
<td colspan="2"><p><br>
Please select the countries and area codes to retrieve lists of available.<br>
<br>
Formatting example (place each country on a new line): <br>
44:20,121,871,800,1223</p>
<p>For USA you can enter '*' to return all area codes, for all other countries you must enter each area code.</p>
<p align="center">
<textarea name="voip_did_plugin_plugin_data[country_area]" cols="60" rows="6" class="form_field">{$plugin.country_area}</textarea>
</p></td>
</tr>
</table>
<br>
<br>

View File

@@ -0,0 +1,103 @@
{$method->exe("voip_did_plugin","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_did_plugin';
{/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="5%" class="table_heading">&nbsp;</td>
<td width="47.5%" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=voip_did_plugin}field_name{/translate}{literal}','name'));
</script>
{/literal}
</td>
<td width="47.5%" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=voip_did_plugin}field_plugin{/translate}{literal}','plugin'));
</script>
{/literal}
</td>
<!-- LOOP THROUGH EACH RECORD -->
{foreach from=$voip_did_plugin item=record}
<tr id="row{$record.id}" onClick="row_sel('{$record.id}',1);" onDblClick="window.location='?_page=voip_did_plugin:view&id={$record.id},{$COOKIE_URL}';" 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="5%">
<input type="checkbox" name="record{$record.id}" value="{$record.id}" onClick="row_sel('{$record.id}',1,'{$record._C}');">
</td>
<td>&nbsp;{$record.name}</td>
<td>&nbsp;{$record.plugin}</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}{$COOKIE_URL}', 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>

View File

@@ -0,0 +1,123 @@
{ $method->exe("voip_did_plugin","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
{literal}
<!-- Define the update delete function -->
<script language="JavaScript">
<!-- START
var module = 'voip_did_plugin';
var locations = '{/literal}{$VAR.module_id}{literal}';
if (locations != "")
{
refresh(0,'#'+locations)
}
// Mass update, view, and delete controller
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_did_plugin item=voip_did_plugin} <a name="{$voip_did_plugin.id}"></a>
<!-- Display the field validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
{/if}
<!-- Display each record -->
<form name="voip_did_plugin_view" method="post" action="">
{$COOKIE_FORM}
<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_did_plugin}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_did_plugin}
field_name
{/translate}</td>
<td width="65%">
<input type="text" name="voip_did_plugin_name" value="{$voip_did_plugin.name}" size="32">
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=voip_did_plugin}
field_plugin
{/translate}</td>
<td width="65%">
{html_menu_files path=voip_did field=voip_did_plugin_plugin default=$voip_did_plugin.plugin}
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=voip_did_plugin}
field_avail_countries
{/translate}</td>
<td width="65%">
{html_menu_multi name=voip_did_plugin_avail_countries assoc_table="voip_iso_country_code" assoc_field="name" size=15 default=$voip_did_plugin.avail_countries}
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=voip_did_plugin}
field_release_minutes
{/translate}</td>
<td width="65%">
<input type="text" name="voip_did_plugin_release_minutes" value="{$voip_did_plugin.release_minutes}" size="32">
</td>
</tr>
<tr valign="top">
<td colspan="2">{plugin type=voip_did name=$voip_did_plugin.plugin data=$voip_did_plugin.plugin_data}
</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_did_plugin.id}','{$VAR.id}');">
</div></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="_page" value="voip_did_plugin:view">
<input type="hidden" name="voip_did_plugin_id" value="{$voip_did_plugin.id}">
<input type="hidden" name="do[]" value="voip_did_plugin:update">
<input type="hidden" name="id" value="{$VAR.id}">
</form>
{/foreach}
{/if}