Changes to AgileBill

This commit is contained in:
Deon George
2009-08-03 14:10:16 +10:00
parent 0a22cfe22c
commit 27aee719b0
1051 changed files with 219109 additions and 117219 deletions

View File

@@ -1,92 +1,51 @@
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
<!-- Display the form validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
{$block->display('core:alert_fields')}
{/if}
<!-- Display the form to collect the input values -->
<form id="country_add" name="country_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=country}
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=country}
field_name
{/translate}
</td>
<td width="65%">
<input type="text" name="country_name" value="{$VAR.country_name}" {if $country_name == true}class="form_field_error"{/if}>
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=country}
field_two_code
{/translate}
</td>
<td width="65%">
<input type="text" name="country_two_code" value="{$VAR.country_two_code}" {if $country_two_code == true}class="form_field_error"{/if}>
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=country}
field_three_code
{/translate}
</td>
<td width="65%">
<input type="text" name="country_three_code" value="{$VAR.country_three_code}" {if $country_three_code == true}class="form_field_error"{/if}>
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=country}
field_description
{/translate}
</td>
<td width="65%">
<textarea name="country_description" cols="40" rows="5" {if $country_description == true}class="form_field_error"{/if}>{$VAR.country_description}</textarea>
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=country}
field_notes
{/translate}
</td>
<td width="65%">
<textarea name="country_notes" cols="40" rows="5" {if $country_notes == true}class="form_field_error"{/if}>{$VAR.country_notes}</textarea>
</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="country:view">
<input type="hidden" name="_page_current" value="country:add">
<input type="hidden" name="do[]" value="country:add">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<form id="add" method="post" action="" enctype="multipart/form-data">
<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 class="table_heading">{osb f=tt}</td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top">
<td style="width: 35%;">{osb f=tf field=name}</td>
<td style="width: 65%;"><input type="text" name="country_name" value="{$VAR.country_name}" {if $country_name == true}class="form_field_error"{/if}/></td>
</tr>
<tr valign="top">
<td style="width: 35%;">{osb f=tf field=two_code}</td>
<td style="width: 65%;"><input type="text" name="country_two_code" value="{$VAR.country_two_code}" {if $country_two_code == true}class="form_field_error"{/if}/></td>
</tr>
<tr valign="top">
<td style="width: 35%;">{osb f=tf field=three_code}</td>
<td style="width: 65%;"><input type="text" name="country_three_code" value="{$VAR.country_three_code}" {if $country_three_code == true}class="form_field_error"{/if}/></td>
</tr>
<tr valign="top">
<td style="width: 35%;">{osb f=tf field=description}</td>
<td style="width: 65%;"><textarea name="country_description" cols="40" rows="5" {if $country_description == true}class="form_field_error"{/if}>{$VAR.country_description}</textarea></td>
</tr>
<tr valign="top">
<td style="width: 35%;">{osb f=tf field=notes}</td>
<td style="width: 65%;"><textarea name="country_notes" cols="40" rows="5" {if $country_notes == true}class="form_field_error"{/if}>{$VAR.country_notes}</textarea></td>
</tr>
{include file='file:../core/add_tr_submit.tpl'}
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>

View File

@@ -1,26 +0,0 @@
<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=country}
menu
{/translate}
</center>
</td>
</tr>
<tr>
<td class="row1">
<table width="100%" border="0" cellpadding="5" class="row1">
<tr>
<td>{translate module=country}help_file{/translate}</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>

View File

@@ -1,125 +1,12 @@
{$method->exe("country","search_show")}
{if ($method->result == FALSE)}
{$block->display("core:method_error")}
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
{$method->exe($meth.0,$meth.1)}
{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 = 'country';
{/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="4%" class="table_heading">&nbsp;</td>
<td width="41%" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=country}field_name{/translate}{literal}','name'));
</script>
{/literal}
</td>
<td width="28%" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=country}field_two_code{/translate}{literal}','two_code'));
</script>
{/literal}
</td>
<td width="27%" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=country}field_three_code{/translate}{literal}','three_code'));
</script>
{/literal}
</td>
</tr>
<!-- LOOP THROUGH EACH RECORD -->
{foreach from=$country item=record}
<tr id="row{$record.id}" onClick="row_sel('{$record.id}',1);" onDblClick="window.location='?_page=country: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="4%">
<input type="checkbox" name="record{$record.id}" value="{$record.id}" onClick="row_sel('{$record.id}',1,'{$record._C}');">
</td>
<td width="41%"> &nbsp;
{$record.name}
</td>
<td width="28%"> &nbsp;
{$record.two_code}
</td>
<td width="27%"> &nbsp;
{$record.three_code}
</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">
</center>
{include file='file:../core/search_show_pre.tpl'}
{$method->exe_noauth($meth.0,'tpl_search_show',$search_show)}
{include file='file:../core/search_show_post-1.tpl'}
{include file='file:../core/search_show_post-2.tpl'}
{/if}
{/if}
</div>

View File

@@ -1,147 +1,59 @@
{ $method->exe("country","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
{literal}
<script src="themes/{/literal}{$THEME_NAME}{literal}/view.js"></script>
<script language="JavaScript">
var module = 'country';
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}
{$method->exe($meth.0,$meth.1)}
{if ($method->result == false)}
{$block->display('core:method_error')}
{else}
{include file='file:../core/view_pre.tpl'}
<!-- Loop through each record -->
{foreach from=$country item=country} <a name="{$country.id}"></a>
<!-- Display the field validation -->
{if $form_validation}
{$block->display('core:alert_fields')}
{/if}
<!-- 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=country}
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=country}
field_name
{/translate}
</td>
<td width="65%">
<input type="text" name="country_name" value="{$country.name}" size="32">
</td>
</tr>
<tr class="row1" valign="top">
<td width="35%">
{translate module=country}
field_two_code
{/translate}
</td>
<td width="65%">
<input type="text" name="country_two_code" value="{$country.two_code}" size="32">
</td>
</tr>
<tr class="row3" valign="top">
<td width="35%">
{translate module=country}
field_three_code
{/translate}
</td>
<td width="65%">
<input type="text" name="country_three_code" value="{$country.three_code}" size="32">
</td>
</tr>
<tr class="row1" valign="top">
<td width="35%">
{translate module=country}
field_description
{/translate}
</td>
<td width="65%">
<textarea name="country_description" cols="45" rows="5" >{$country.description}</textarea>
</td>
</tr>
<tr class="row4" valign="top">
<td width="35%">
{translate module=country}
field_notes
{/translate}
</td>
<td width="65%">
<textarea name="country_notes" cols="45" rows="5" >{$country.notes}</textarea>
</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('{$country.id}','{$VAR.id}');">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="_page" value="country:view">
<input type="hidden" name="country_id" value="{$country.id}">
<input type="hidden" name="do[]" value="country:update">
<input type="hidden" name="id" value="{$VAR.id}">
</form>
{/foreach}
<!-- Display each record -->
<form id="view" method="post" action="" enctype="multipart/form-data">
<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 class="table_heading">{osb f=tt}</td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr class="row0" valign="top">
<td style="width: 35%;">{osb f=tf field=name}</td>
<td style="width: 65%;"><input type="text" name="country_name" value="{$record.name}" size="32"/></td>
</tr>
<tr class="row1" valign="top">
<td style="width: 35%;">{osb f=tf field=two_code}</td>
<td style="width: 65%;"><input type="text" name="country_two_code" value="{$record.two_code}" size="32"/></td>
</tr>
<tr class="row3" valign="top">
<td style="width: 35%;">{osb f=tf field=three_code}</td>
<td style="width: 65%;"><input type="text" name="country_three_code" value="{$record.three_code}" size="32"/></td>
</tr>
<tr class="row1" valign="top">
<td style="width: 35%;">{osb f=tf field=description}</td>
<td style="width: 65%;"><textarea name="country_description" cols="45" rows="5" >{$record.description}</textarea></td>
</tr>
<tr class="row4" valign="top">
<td style="width: 35%;">{osb f=tf field=notes}</td>
<td style="width: 65%;"><textarea name="country_notes" cols="45" rows="5" >{$record.notes}</textarea></td>
</tr>
</table>
</td>
</tr>
{include file='file:../core/view_tr_submit_delete.tpl'}
</table>
</td>
</tr>
</table>
{include file='file:../core/view_post.tpl'}
</form>
{/if}