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,94 @@
{ $block->display("core:top_clean") }
<!-- Display the form validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
{/if}
<!-- Display the form to collect the input values -->
<form id="module_method_add" name="module_method_form" 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">
<div align="center">
{translate module=module_method}
title_add
{/translate}
</div>
</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=module_method}
field_name
{/translate}
</td>
<td width="65%">
<input type="text" name="module_method_name" value="{$VAR.module_method_name}" {if $module_method_name == true}class="form_field_error"{/if}>
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=module_method}
field_notes
{/translate}
</td>
<td width="65%">
<textarea name="module_method_notes" cols="40" rows="5" {if $module_method_notes == true}class="form_field_error"{/if}>{$VAR.module_method_notes}</textarea>
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=module_method}
field_module_id
{/translate}
</td>
<td width="65%">
{ $list->menu("", "module_method_module_id", "module", "name", $VAR.module_method_module_id, "form_menu") }
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=module_method}
field_menu_display
{/translate}
</td>
<td width="65%">
{ $list->bool("module_method_menu_display", $VAR.module_method_menu_display, "form_menu") }
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=module_method}
field_page
{/translate}
</td>
<td width="65%">
<input type="text" name="module_method_page" value="{$VAR.module_method_page}" {if $module_method_page == 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="module_method:view">
<input type="hidden" name="_page_current" value="module_method:add">
<input type="hidden" name="do[]" value="module_method:add">
<input type="hidden" name="_escape" value="1">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>

View File

@@ -0,0 +1,136 @@
{ $block->display("core:top_clean") }
{$method->exe("module_method","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 = 'module_method';
{/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="29%" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=module_method}field_name{/translate}{literal}','name'));
</script>
{/literal}
</td>
<td width="43%" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=module_method}field_module_id{/translate}{literal}','module_id'));
</script>
{/literal}
</td>
<td width="23%" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=module_method}field_menu_display{/translate}{literal}','menu_display'));
</script>
{/literal}
</td>
</tr>
<!-- LOOP THROUGH EACH RECORD -->
{foreach from=$module_method item=record}
<tr id="row{$record.id}" onClick="row_sel('{$record.id}',1);" onDblClick="window.location='?_page=module_method:view&id={$record.id}&_escape=1';" 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 width="29%">&nbsp;
{$record.name}
</td>
<td width="43%">&nbsp;
{$record.module_id}
</td>
<td width="23%">&nbsp;
{if $record.menu_display == '1'}
{translate}
true
{/translate}
{else}
{translate}
false
{/translate}
{/if}
</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&_escape=1&_escape_next=1', 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}&_escape=1&_escape_next=1', 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,149 @@
{ $block->display("core:top_clean") }
{ $method->exe("module_method","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else} <br>
{literal}
<script src="themes/{/literal}{$THEME_NAME}{literal}/view.js"></script>
<script language="JavaScript">
var module = 'module_method';
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=$module_method item=module_method} <a name="{$module_method.id}"></a>
<!-- Display the field validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
{/if}
<!-- Display each record -->
<form name="update_form" 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">
<div align="center">
{translate module=module_method}
title_view
{/translate}
</div>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr class="row0" valign="top">
<td width="35%">
{translate module=module_method}
field_name
{/translate}
</td>
<td width="65%">
<input type="text" name="module_method_name" value="{$module_method.name}" size="32">
</td>
</tr>
<tr class="row1" valign="top">
<td width="35%">
{translate module=module_method}
field_notes
{/translate}
</td>
<td width="65%">
<textarea name="module_method_notes" cols="45" rows="5" >{$module_method.notes}</textarea>
</td>
</tr>
<tr class="row1" valign="top">
<td width="35%">
{translate module=module_method}
field_module_id
{/translate}
</td>
<td width="65%">
{ $list->menu("", "module_method_module_id", "module", "name", $module_method.module_id, "form_menu") }
</td>
</tr>
<tr class="row3" valign="top">
<td width="35%">
{translate module=module_method}
field_menu_display
{/translate}
</td>
<td width="65%">
{ $list->bool("module_method_menu_display", $module_method.menu_display, "form_menu") }
</td>
</tr>
<tr class="row4" valign="top">
<td width="35%">
{translate module=module_method}
field_page
{/translate}
</td>
<td width="65%">
<input type="text" name="module_method_page" value="{$module_method.page}" size="32">
</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td width="35%"></td>
<td width="65%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
</td>
<td align="right">
<input type="button" name="delete" value="{translate}delete{/translate}" class="form_button" onClick="delete_record('{$module_method.id}','{$VAR.id}');">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="_page" value="module_method:view">
<input type="hidden" name="module_method_id" value="{$module_method.id}">
<input type="hidden" name="do[]" value="module_method:update">
<input type="hidden" name="id" value="{$VAR.id}">
</form>
{/foreach}
{/if}

View File

@@ -0,0 +1,135 @@
{ $block->display("core:top_clean") }
{$method->exe("module_method","view_methods")}
{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 = 'module_method';
{/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="19%" class="table_heading">
{translate module=module_method}
authorized
{/translate}
</td>
<td width="33%" class="table_heading">
{translate module=module_method}
field_name
{/translate}
</td>
<td width="48%" class="table_heading">
{translate module=module_method}
field_notes
{/translate}
</td>
</tr>
<!-- LOOP THROUGH EACH RECORD -->
{foreach from=$module_method item=record}
{if $record.checked == "2"}
<tr id="row{$record.id}" class="{$record._C}">
<td align="center" width="19%">
<input type="checkbox" name="hidden_record{$record.id}" value="{$record.id}" checked disabled="Yes">
</td>
{else}
<tr id="row{$record.id}" onClick="row_sel('{$record.id}',1);" 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="19%">
<input type="checkbox" name="record{$record.id}" value="{$record.id}" onClick="row_sel('{$record.id}',1,'{$record._C}');">
</td>
{/if}
<td width="33%"> &nbsp;
{$record.name}
</td>
<td width="48%">&nbsp;
{$record.notes|truncate:"65"}
</td>
</tr>
{if $record.checked == "1"}
{literal}
<script language="JavaScript">row_sel('{/literal}{$record.id}{literal}', 1, '{/literal}{$record._C}{literal}'); record_arr[i] = '{/literal}{$record.id}{literal}'; i++; </script>
{/literal}
{elseif $record.checked == "3"}
{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}
{/if}
{/foreach}
<!-- END OF RESULT LOOP -->
</table>
</td>
</tr>
</form>
</table>
{if $VAR._print != TRUE}
<div align="center">
{translate module=module_method}
note_inherit
{/translate}<br>
<br>
</div>
<center>
<input type="submit" name="Submit2" value="{translate module=module_method}update_relation{/translate}" onClick="mass_do('update_relations', module+':view_methods&module_method_group_id={$VAR.module_method_group_id}&module_method_module_id={$VAR.module_method_module_id}&_escape=1', limit, module);" class="form_button">
<br>
<br>
<form name="form2" method="post" action="">
<input type="submit" name="Deleteall" value="{translate module=module_method}delete_all{/translate}" class="form_button">
<input type="hidden" name="_page" value="module_method:view_methods">
<input type="hidden" name="do[]" value="module_method:update_relations">
<input type="hidden" name="id" value="0,">
<input type="hidden" name="module_method_module_id" value="{$VAR.module_method_module_id}">
<input type="hidden" name="module_method_group_id" value="{$VAR.module_method_group_id}">
<input type="hidden" name="_escape" value="1">
</form>
<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">
<br>
<br>
</center>
{/if}
{/if}
</div>