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,119 @@
<!-- Display the form validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
{/if}
<!-- Display the form to collect the input values -->
<form id="email_template_add" name="email_template_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">
<div align="center">
{translate module=email_template}
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="50%">
{translate module=email_template}
field_name
{/translate}
</td>
<td width="50%">
<input type="text" name="email_template_name" value="{$VAR.email_template_name}" {if $email_template_name == true}class="form_field_error"{/if} size="32">
</td>
</tr>
<tr valign="top">
<td width="50%">
{translate module=email_template}
field_setup_email_id
{/translate}
</td>
<td width="50%">
{ $list->menu("", "email_template_setup_email_id", "setup_email", "name", $VAR.email_template_setup_email_id, "form_menu") }
</td>
</tr>
<tr valign="top">
<td width="50%">
{translate module=email_template}
field_priority
{/translate}
</td>
<td width="50%">
{ $list->bool("email_template_priority", $VAR.email_template_priority, "form_menu") }
</td>
</tr>
<tr valign="top">
<td width="50%">&nbsp; </td>
<td width="50%">&nbsp; </td>
</tr>
<tr valign="top">
<td width="50%">
{translate module=email_template}
field_sql_1
{/translate}
</td>
<td width="50%">
{translate module=email_template}
field_sql_2
{/translate}
</td>
</tr>
<tr valign="top">
<td width="50%">
<textarea name="email_template_sql_1" cols="40" rows="2" {if $email_template_sql_1 == true}class="form_field_error"{/if}>{$VAR.email_template_sql_1}</textarea>
</td>
<td width="50%">
<textarea name="email_template_sql_2" cols="40" rows="2" {if $email_template_sql_2 == true}class="form_field_error"{/if}>{$VAR.email_template_sql_2}</textarea>
</td>
</tr>
<tr valign="top">
<td width="50%">
{translate module=email_template}
field_sql_3
{/translate}
</td>
<td width="50%">
{translate module=email_template}
field_notes
{/translate}
</td>
</tr>
<tr valign="top">
<td width="50%">
<textarea name="email_template_sql_3" cols="40" rows="2" {if $email_template_sql_3 == true}class="form_field_error"{/if}>{$VAR.email_template_sql_3}</textarea>
</td>
<td width="50%">
<textarea name="email_template_notes" cols="40" rows="2" {if $email_template_notes == true}class="form_field_error"{/if}>{$VAR.email_template_notes}</textarea>
</td>
</tr>
<tr valign="top">
<td width="50%">
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
</td>
<td width="50%">
<input type="hidden" name="_page" value="email_template_translate:add">
<input type="hidden" name="_page_current" value="email_template:add">
<input type="hidden" name="do[]" value="email_template:add">
<input type="hidden" name="email_template_status" value="1">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>

View File

@@ -0,0 +1,117 @@
{$method->exe("email_template","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 = 'email_template';
{/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="55" class="table_heading">&nbsp;</td>
<td width="670" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=email_template}field_name{/translate}{literal}','name'));
</script>
{/literal}
</td>
<td width="217" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=email_template}field_priority{/translate}{literal}','priority'));
</script>
{/literal}
</td>
<td width="36" class="table_heading">&nbsp; </td>
<!-- LOOP THROUGH EACH RECORD -->
{foreach from=$email_template item=record}
<tr id="row{$record.id}" onClick="row_sel('{$record.id}',1);" onDblClick="window.location='?_page=email_template: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="55">
<input type="checkbox" name="record{$record.id}" value="{$record.id}" onClick="row_sel('{$record.id}',1,'{$record._C}');">
</td>
<td width="670">&nbsp;
{$record.name}
</td>
<td width="217">&nbsp;
{if $record.priority == "1"}
{translate}
true
{/translate}
{else}
{translate}
false
{/translate}
{/if}
</td>
<td width="36"> &nbsp;
{if $record.status == "1"}
<img src="themes/{$THEME_NAME}/images/icons/go_16.gif" border="0" width="16" height="16">
{else}
<img src="themes/{$THEME_NAME}/images/icons/stop_16.gif" border="0" width="16" height="16">
{/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', 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>

View File

@@ -0,0 +1,210 @@
{ $method->exe("email_template","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 = 'email_template';
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=$email_template item=email_template}
<!-- Display the field validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
{/if}
<!-- Display each record -->
<form name="email_template_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">
<div align="center">
{translate module=email_template}
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 valign="top">
<td width="50%">
{translate module=email_template}
field_name
{/translate}
</td>
<td width="50%">
{$email_template.name}
</td>
</tr>
<tr valign="top">
<td width="50%">
{translate module=email_template}
field_setup_email_id
{/translate}
</td>
<td width="50%">
{ $list->menu("", "email_template_setup_email_id", "setup_email", "name", $email_template.setup_email_id, "form_menu") }
</td>
</tr>
<tr valign="top">
<td width="50%">
{translate module=email_template}
field_status
{/translate}
</td>
<td width="50%">
{ $list->bool("email_template_status", $email_template.status,"form_menu") }
</td>
</tr>
<tr valign="top">
<td width="50%">
{translate module=email_template}
field_priority
{/translate}
</td>
<td width="50%">
{ $list->bool("email_template_priority", $email_template.priority, "form_menu") }
</td>
</tr>
<tr valign="top">
<td width="50%">
{translate module=email_template}
field_sql_1
{/translate}
</td>
<td width="50%">
{translate module=email_template}
field_sql_2
{/translate}
</td>
</tr>
<tr valign="top">
<td width="50%">
<textarea name="email_template_sql_1" cols="40" rows="1" >{$email_template.sql_1}</textarea>
</td>
<td width="50%">
<textarea name="email_template_sql_2" cols="40" rows="1" >{$email_template.sql_2}</textarea>
</td>
</tr>
<tr valign="top">
<td width="50%">
{translate module=email_template}
field_sql_3
{/translate}
</td>
<td width="50%">
{translate module=email_template}
field_notes
{/translate}
</td>
</tr>
<tr valign="top">
<td width="50%">
<textarea name="email_template_sql_3" cols="40" rows="1" >{$email_template.sql_3}</textarea>
</td>
<td width="50%">
<textarea name="email_template_notes" cols="40" rows="1" >{$email_template.notes}</textarea>
</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td width="50%">
<input type="submit" name="Submit2" value="{translate}submit{/translate}" class="form_button">
</td>
<td width="50%">
<div align="right">
<input type="button" name="delete" value="{translate}delete{/translate}" class="form_button" onClick="delete_record('{$email_template.id}','{$VAR.id}');">
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="row1">
<tr>
<td width="50%"> <a href="javascript:showEmailTranslations('{$email_template.id}');">
{translate module=email_template}
view_translations
{/translate}
</a> </td>
<td align="right" width="50%">
<div align="right">
<a href="javascript:addEmailTranslations('{$email_template.id}');">
{translate module=email_template}add_translation{/translate}
</a>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="_page" value="email_template:view">
<input type="hidden" name="email_template_id" value="{$email_template.id}">
<input type="hidden" name="do[]" value="email_template:update">
<input type="hidden" name="id" value="{$VAR.id}">
</form>
<center>
<iframe name="iframeEmail" id="iframeEmail" style="border:0px; width:0px; height:0px;" scrolling="auto" ALLOWTRANSPARENCY="true" frameborder="0" SRC="themes/{$THEME_NAME}/IEFrameWarningBypass.htm"></iframe>
</center>
<script language=javascript>
var email_template = '{$email_template.id}';
</script>
{/foreach}
{/if}
{literal}
<script language="JavaScript">
<!-- START
function showEmailTranslations(id) {
showIFrame('iframeEmail',getPageWidth(650),350,'?_page=core:search&_next_page_one=view&module=email_template_translate&_escape=1&email_template_translate_email_template_id='+id);
}
function addEmailTranslations(id) {
showIFrame('iframeEmail',getPageWidth(650),350,'?_page=email_template_translate:add&email_template_translate_email_template_id='+id);
}
showEmailTranslations(email_template);
// END -->
</script>
{/literal}