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,228 @@
<!-- Display the form validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
{/if}
<!-- Display the form to collect the input values -->
<form id="account_billing_add" name="account_billing_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=account_billing}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=account_billing}
field_account_id
{/translate}
</td>
<td width="65%">
{html_select_account name="account_billing_accout_id" default=$VAR.account_billing_account_id}
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=account_billing}
field_card_type
{/translate}
</td>
<td width="65%">
<select name="account_billing_card_type" >
<option value="" {if $VAR.account_billing_card_type == ""}selected{/if}></option>
<option value="visa" {if $VAR.account_billing_card_type == "visa"}selected{/if}>
{translate module=checkout}
card_type_visa
{/translate}
</option>
<option value="mc" {if $VAR.account_billing_card_type == "mc"}selected{/if}>
{translate module=checkout}
card_type_mc
{/translate}
</option>
<option value="amex" {if $VAR.account_billing_card_type == "amex"}selected{/if}>
{translate module=checkout}
card_type_amex
{/translate}
</option>
<option value="discover" {if $VAR.account_billing_card_type == "discover"}selected{/if}>
{translate module=checkout}
card_type_discover
{/translate}
</option>
<option value="delta" {if $VAR.account_billing_card_type == "delta"}selected{/if}>
{translate module=checkout}
card_type_delta
{/translate}
</option>
<option value="solo" {if $VAR.account_billing_card_type == "solo"}selected{/if}>
{translate module=checkout}
card_type_solo
{/translate}
</option>
<option value="switch" {if $VAR.account_billing_card_type == "switch"}selected{/if}>
{translate module=checkout}
card_type_switch
{/translate}
</option>
<option value="jcb" {if $VAR.account_billing_card_type == "jcb"}selected{/if}>
{translate module=checkout}
card_type_jcb
{/translate}
</option>
<option value="diners" {if $VAR.account_billing_card_type == "diners"}selected{/if}>
{translate module=checkout}
card_type_diners
{/translate}
</option>
<option value="carteblanche" {if $VAR.account_billing_card_type == "carteblanche"}selected{/if}>
{translate module=checkout}
card_type_carteblanche
{/translate}
</option>
<option value="enroute" {if $VAR.account_billing_card_type == "enroute"}selected{/if}>
{translate module=checkout}
card_type_enroute
{/translate}
</option>
</select>
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=account_billing}
field_card_num
{/translate}
</td>
<td width="65%">
<input type="text" name="account_billing_card_num" value="{$VAR.account_billing_card_num}" {if $account_billing_card_num == true}class="form_field_error"{/if} maxlength="16" size="24">
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=account_billing}
field_card_exp_month
{/translate}
</td>
<td width="65%">
{translate module=account_billing}
field_card_exp_year
{/translate}
</td>
</tr>
<tr valign="top">
<td width="35%">
<select name="account_billing_card_exp_month" >
<option value="01" {if $VAR.account_billing_card_exp_month == "1"}selected{/if}>1
(Jan)</option>
<option value="02" {if $VAR.account_billing_card_exp_month == "2"}selected{/if}>2
(Feb)</option>
<option value="03" {if $VAR.account_billing_card_exp_month == "3"}selected{/if}>3
(Mar)</option>
<option value="04" {if $VAR.account_billing_card_exp_month == "4"}selected{/if}>4
(Apr)</option>
<option value="05" {if $VAR.account_billing_card_exp_month == "5"}selected{/if}>5
(May)</option>
<option value="06" {if $VAR.account_billing_card_exp_month == "6"}selected{/if}>6
(Jun)</option>
<option value="07" {if $VAR.account_billing_card_exp_month == "7"}selected{/if}>7
(Jul)</option>
<option value="08" {if $VAR.account_billing_card_exp_month == "8"}selected{/if}>8
(Aug)</option>
<option value="09" {if $VAR.account_billing_card_exp_month == "9"}selected{/if}>9
(Sep)</option>
<option value="10" {if $VAR.account_billing_card_exp_month == "10"}selected{/if}>10
(Oct)</option>
<option value="11" {if $VAR.account_billing_card_exp_month == "11"}selected{/if}>11
(Nov)</option>
<option value="12" {if $VAR.account_billing_card_exp_month == "12"}selected{/if}>12
(Dec)</option>
</select>
</td>
<td width="65%"> 20
<input type="text" name="account_billing_card_exp_year" value="{$VAR.account_billing_card_exp_year}" size="2" maxlength="2">
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=account_billing}
field_card_start_month
{/translate}
</td>
<td width="65%">
{translate module=account_billing}
field_card_start_year
{/translate}
</td>
</tr>
<tr valign="top">
<td width="35%">
<select name="account_billing_card_start_month" >
<option value="01" {if $VAR.account_billing_card_start_month == "1"}selected{/if}>1
(Jan)</option>
<option value="02" {if $VAR.account_billing_card_start_month == "2"}selected{/if}>2
(Feb)</option>
<option value="03" {if $VAR.account_billing_card_start_month == "3"}selected{/if}>3
(Mar)</option>
<option value="04" {if $VAR.account_billing_card_start_month == "4"}selected{/if}>4
(Apr)</option>
<option value="05" {if $VAR.account_billing_card_start_month == "5"}selected{/if}>5
(May)</option>
<option value="06" {if $VAR.account_billing_card_start_month == "6"}selected{/if}>6
(Jun)</option>
<option value="07" {if $VAR.account_billing_card_start_month == "7"}selected{/if}>7
(Jul)</option>
<option value="08" {if $VAR.account_billing_card_start_month == "8"}selected{/if}>8
(Aug)</option>
<option value="09" {if $VAR.account_billing_card_start_month == "9"}selected{/if}>9
(Sep)</option>
<option value="10" {if $VAR.account_billing_card_start_month == "10"}selected{/if}>10
(Oct)</option>
<option value="11" {if $VAR.account_billing_card_start_month == "11"}selected{/if}>11
(Nov)</option>
<option value="12" {if $VAR.account_billing_card_start_month == "12"}selected{/if}>12
(Dec)</option>
</select>
</td>
<td width="65%"> 20
<input type="text" name="account_billing_card_start_year" value="{$VAR.account_billing_card_start_year}" size="2" maxlength="2">
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=account_billing}
field_checkout_plugin_id
{/translate}
</td>
<td width="65%">
{ $list->menu("", "account_billing_checkout_plugin_id", "checkout", "name", $VAR.account_billing_checkout_plugin_id, "form_field") }
</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="account_billing:view">
<input type="hidden" name="_page_current" value="account_billing:add">
<input type="hidden" name="do[]" value="account_billing:add">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>

View File

@@ -0,0 +1,89 @@
{ $method->exe("account_billing","search_form") }
{ if ($method->result == FALSE) }
{ $block->display("core:method_error") }
{else}
<form name="account_billing_search" method="post" action="">
<table width="500" 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=account_billing}title_search{/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=account_billing}
field_accout_id
{/translate}</td>
<td width="65%">
<input type="text" name="account_billing_accout_id" value="{$VAR.account_billing_accout_id}" {if $account_billing_accout_id == true}class="form_field_error"{/if}> &nbsp;&nbsp;{translate}search_partial{/translate}
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=account_billing}
field_checkout_plugin_id
{/translate}</td>
<td width="65%">
<input type="text" name="account_billing_checkout_plugin_id" value="{$VAR.account_billing_checkout_plugin_id}" {if $account_billing_checkout_plugin_id == true}class="form_field_error"{/if}> &nbsp;&nbsp;{translate}search_partial{/translate}
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=account_billing}
field_card_type
{/translate}</td>
<td width="65%">
<input type="text" name="account_billing_card_type" value="{$VAR.account_billing_card_type}" {if $account_billing_card_type == true}class="form_field_error"{/if}> &nbsp;&nbsp;{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="{$account_billing_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=$account_billing 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="account_billing">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
{ $block->display("core:saved_searches") }
{ $block->display("core:recent_searches") }
{/if}

View File

@@ -0,0 +1,112 @@
{$method->exe("account_billing","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 = 'account_billing';
{/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="68" class="table_heading">&nbsp;</td>
<td width="334" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=account_billing}field_account_id{/translate}{literal}','account_id'));
</script>
{/literal}
</td>
<td width="277" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=account_billing}field_card_type{/translate}{literal}','card_type'));
</script>
{/literal}
</td>
<td width="461" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=account_billing}field_card_num4{/translate}{literal}','card_num4'));
</script>
{/literal}
</td>
<!-- LOOP THROUGH EACH RECORD -->
{foreach from=$account_billing item=record}
<tr id="row{$record.id}" onClick="row_sel('{$record.id}',1);" onDblClick="window.location='{$SSL}?_page=account_billing: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="68">
<input type="checkbox" name="record{$record.id}" value="{$record.id}" onClick="row_sel('{$record.id}',1,'{$record._C}');">
</td>
<td width="334">&nbsp;
{$record.account_id}
</td>
<td width="277">&nbsp;
{translate module=checkout}
card_type_{$record.card_type}
{/translate}
</td>
<td width="461"> &nbsp; ....
{$record.card_num4}
</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,83 @@
{$method->exe("account_billing","user_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 = 'account_billing';
{/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="34" class="table_heading">&nbsp;</td>
<td width="184" class="table_heading">
{translate module=account_billing}field_card_type{/translate}
</td>
<td width="551" class="table_heading">
{translate module=account_billing}field_card_num4 {/translate}
</td>
<!-- LOOP THROUGH EACH RECORD -->
{foreach from=$account_billing item=record}
<tr id="row{$record.id}" onClick="row_sel('{$record.id}',1); window.location='{$SSL_URL}?_page=account_billing:user_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="34">
<input type="checkbox" name="record{$record.id}" value="{$record.id}" onClick="row_sel('{$record.id}',1,'{$record._C}');">
</td>
<td width="184">&nbsp;
{translate module=checkout}
card_type_{$record.card_type}
{/translate}
</td>
<td width="551">&nbsp;.... .... ....
{$record.card_num4}
</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}
</div>

View File

@@ -0,0 +1,299 @@
{ $method->exe("account_billing","user_view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
{literal}
<!-- Define the update delete function -->
<script language="JavaScript">
<!-- START
var module = 'account_billing';
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;
}
function user_delete(id)
{
var page = 'user_view';
temp = window.confirm("{/literal}{translate}alert_delete{/translate}{literal}");
if(temp == false) return;
var url = '?_page='+ module +':'+ page +'&do[]=' + module + ':user_delete&id=' + id + COOKIE_URL;
window.location = url;
}
// END -->
</script>
{/literal}
<!-- Loop through each record -->
{foreach from=$account_billing item=account_billing}
<!-- Display the field validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
{/if}
<!-- Display each record -->
<form name="account_billing_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=account_billing}
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">
<!-- start credit card form -->
{if $account_billing.card_type != 'eft'}
{if $account_billing.card_type != ""}
<tr valign="top">
<td width="35%"> {translate module=account_billing} field_card_type
{/translate} </td>
<td width="65%"> {if $account_billing.checkout_plugin_id !=
"" && $account_billing.card_type != ""} { $list->card_type_menu($account_billing.card_type,
$account_billing.checkout_plugin_id,'account_billing_card_type','')
} {elseif $account_billing.checkout_plugin_id == "" && $VAR.account_billing_card_type
!= "" } { $list->card_type_menu($VAR.account_billing_card_type,
$account_billing.checkout_plugin_id,'account_billing_card_type','')
} {else}
<select name="account_billing_card_type" >
<option value="visa" {if $account_billing.card_type == "visa"}selected{/if}>
{translate module=checkout} card_type_visa {/translate}
</option>
<option value="mc" {if $account_billing.card_type == "mc"}selected{/if}>
{translate module=checkout} card_type_mc {/translate} </option>
<option value="amex" {if $account_billing.card_type == "amex"}selected{/if}>
{translate module=checkout} card_type_amex {/translate}
</option>
</select>
{/if} </td>
</tr>
{/if}
<tr valign="top">
<td width="35%"> {translate module=account_billing} field_card_num4
{/translate} </td>
<td width="65%"> ....{$account_billing.card_num4} </td>
</tr>
<tr valign="top">
<td width="35%"> {translate module=account_billing} card_num_new
{/translate} </td>
<td width="65%"><b>
<input type="text" name="account_billing_card_num" value="" size="24" maxlength="16">
</b></td>
</tr>
<tr valign="top">
<td width="35%"> {translate module=account_billing} field_card_exp_month
{/translate} </td>
<td width="65%">&nbsp; </td>
</tr>
<tr valign="top">
<td width="35%"> <select name="account_billing_card_exp_month" >
<option value="01" {if $account_billing.card_exp_month == "1"}selected{/if}>1
(Jan)</option>
<option value="02" {if $account_billing.card_exp_month == "2"}selected{/if}>2
(Feb)</option>
<option value="03" {if $account_billing.card_exp_month == "3"}selected{/if}>3
(Mar)</option>
<option value="04" {if $account_billing.card_exp_month == "4"}selected{/if}>4
(Apr)</option>
<option value="05" {if $account_billing.card_exp_month == "5"}selected{/if}>5
(May)</option>
<option value="06" {if $account_billing.card_exp_month == "6"}selected{/if}>6
(Jun)</option>
<option value="07" {if $account_billing.card_exp_month == "7"}selected{/if}>7
(Jul)</option>
<option value="08" {if $account_billing.card_exp_month == "8"}selected{/if}>8
(Aug)</option>
<option value="09" {if $account_billing.card_exp_month == "9"}selected{/if}>9
(Sep)</option>
<option value="10" {if $account_billing.card_exp_month == "10"}selected{/if}>10
(Oct)</option>
<option value="11" {if $account_billing.card_exp_month == "11"}selected{/if}>11
(Nov)</option>
<option value="12" {if $account_billing.card_exp_month == "12"}selected{/if}>12
(Dec)</option>
</select>
{translate module=account_billing} field_card_exp_year {/translate}
</td>
<td width="65%">20
<input type="text" name="account_billing_card_exp_year" value="{$account_billing.card_exp_year}" size="2" maxlength="2">
(ex: 08) </td>
</tr>
{if $account_billing.card_type == "amex"}
<tr class="row1" valign="middle" align="left">
<td width="35%"> {translate module=account_billing} field_card_start_month
{/translate} </td>
<td width="65%"> {translate module=account_billing} field_card_start_year
{/translate} </td>
</tr>
<tr class="row1" valign="middle" align="left">
<td width="35%"> <select name="account_billing_card_start_month" >
<option value="01" {if $account_billing.card_start_month == "1"}selected{/if}>1
(Jan)</option>
<option value="02" {if $account_billing.card_start_month == "2"}selected{/if}>2
(Feb)</option>
<option value="03" {if $account_billing.card_start_month == "3"}selected{/if}>3
(Mar)</option>
<option value="04" {if $account_billing.card_start_month == "4"}selected{/if}>4
(Apr)</option>
<option value="05" {if $account_billing.card_start_month == "5"}selected{/if}>5
(May)</option>
<option value="06" {if $account_billing.card_start_month == "6"}selected{/if}>6
(Jun)</option>
<option value="07" {if $account_billing.card_start_month == "7"}selected{/if}>7
(Jul)</option>
<option value="08" {if $account_billing.card_start_month == "8"}selected{/if}>8
(Aug)</option>
<option value="09" {if $account_billing.card_start_month == "9"}selected{/if}>9
(Sep)</option>
<option value="10" {if $account_billing.card_start_month == "10"}selected{/if}>10
(Oct)</option>
<option value="11" {if $account_billing.card_start_month == "11"}selected{/if}>11
(Nov)</option>
<option value="12" {if $account_billing.card_start_month == "12"}selected{/if}>12
(Dec)</option>
</select> </td>
<td width="65%">20
<input type="text" name="account_billing_card_start_year" value="{$account_billing.card_start_year}" size="2" maxlength="2">
(example: 08) </td>
</tr>
{/if}
{/if}
<!-- end credit card form -->
<!-- start eft form -->
{if $account_billing.card_type == "eft"}
<tr class="row1" valign="middle" align="left">
<td width="35%">{translate module=account_billing} field_eft_trn {/translate}</td>
<td width="65%"><b>
<input type="text" name="account_billing_eft_trn" value="{$VAR.account_billing_eft_trn}">
</b></td>
</tr>
<tr valign="top">
<td width="35%"> {translate module=account_billing} field_card_num4
{/translate} </td>
<td width="65%"> ....{$account_billing.card_num4} </td>
</tr>
<tr class="row1" valign="middle" align="left">
<td width="35%">{translate module=account_billing} field_eft_check_acct {/translate}</td>
<td width="65%">
<input type="text" name="account_billing_eft_check_acct" value="{$VAR.account_billing_eft_check_acct}">
</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td width="35%">{translate module=checkout} eft_check_acct_type {/translate}</td>
<td width="65%"><b>
<select name="account_billing_eft_check_acct_type" >
<option value="p" {if $account_billing.eft_check_acct_type == "p"}selected{/if}>{translate module=checkout}eft_type_p{/translate}</option>
<option value="b" {if $account_billing.eft_check_acct_type == "b"}selected{/if}>{translate module=checkout}eft_type_b{/translate}</option>
</select>
</b></td>
</tr>
{/if}
<!-- end eft form -->
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_first_name{/translate} </td>
<td><b>
<input type="text" name="account_billing_first_name" value="{$account_billing.first_name}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_last_name{/translate} </td>
<td><b>
<input type="text" name="account_billing_last_name" value="{$account_billing.last_name}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_address1{/translate} </td>
<td><b>
<input type="text" name="account_billing_address1" value="{$account_billing.address1}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_address2{/translate} </td>
<td><b>
<input type="text" name="account_billing_address2" value="{$account_billing.address2}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_city{/translate} </td>
<td><b>
<input type="text" name="account_billing_city" value="{$account_billing.city}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_state{/translate} </td>
<td><b>
<input type="text" name="account_billing_state" value="{$account_billing.state}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_zip{/translate} </td>
<td><b>
<input type="text" name="account_billing_zip" value="{$account_billing.zip}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_country_id{/translate} </td>
<td>{ $list->menu("no", "account_billing_country_id", "country", "name", $account_billing.country_id, "") }</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_email{/translate} </td>
<td><b>
<input type="text" name="account_billing_email" value="{$account_billing.email}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=checkout} phone{/translate} </td>
<td><b>
<input type="text" name="account_billing_phone" value="{$account_billing.phone}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td><input type="button" name="Delete" value="{translate}delete{/translate}" class="form_button" onClick="user_delete({$account_billing.id})"></td>
<td align="right"> &nbsp;&nbsp;<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button"> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="_page" value="account_billing:user_view">
<input type="hidden" name="_next_page" value="account_billing:user_view">
<input type="hidden" name="account_billing_id" value="{$account_billing.id}">
<input type="hidden" name="do[]" value="account_billing:user_update">
<input type="hidden" name="id" value="{$VAR.id}">
</form>
{/foreach}
{/if}

View File

@@ -0,0 +1,265 @@
{ $method->exe("account_billing","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 = 'account_billing';
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));
}
// 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=$account_billing item=account_billing}
<!-- Display the field validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
{/if}
<!-- Display each record -->
<form name="account_billing_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=account_billing}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">
{if $account_billing.card_type != ""}
<tr valign="top">
<td width="35%">
{translate module=account_billing}
field_account_id
{/translate}
</td>
<td width="65%">
{html_select_account name="account_billing_accout_id" default=$account_billing.account_id}
</td>
</tr>
{/if} {if $account_billing.card_type == "amex"} {/if}
<tr class="row1" valign="middle" align="left">
<td width="35%">
{translate module=account_billing}
field_checkout_plugin_id
{/translate}
</td>
<td width="65%">
{ $list->menu("", "account_billing_checkout_plugin_id", "checkout", "name", $account_billing.checkout_plugin_id, "form_field") }
</td>
</tr>
<!-- start credit card form -->
{if $account_billing.card_type != 'eft'} {if $account_billing.card_type != ""}
<tr valign="top">
<td width="35%"> {translate module=account_billing} field_card_type {/translate} </td>
<td width="65%"> {if $account_billing.checkout_plugin_id != "" && $account_billing.card_type != ""} { $list->card_type_menu($account_billing.card_type, $account_billing.checkout_plugin_id,'account_billing_card_type','') } {elseif $account_billing.checkout_plugin_id == "" && $VAR.account_billing_card_type != "" } { $list->card_type_menu($VAR.account_billing_card_type, $account_billing.checkout_plugin_id,'account_billing_card_type','') } {else}
<select name="account_billing_card_type" >
<option value="visa" {if $account_billing.card_type == "visa"}selected{/if}> {translate module=checkout} card_type_visa {/translate} </option>
<option value="mc" {if $account_billing.card_type == "mc"}selected{/if}> {translate module=checkout} card_type_mc {/translate} </option>
<option value="amex" {if $account_billing.card_type == "amex"}selected{/if}> {translate module=checkout} card_type_amex {/translate} </option>
</select>
{/if} </td>
</tr>
{/if} <tr valign="top">
<td width="35%"> {translate module=account_billing} card_num_new {/translate} </td>
<td width="65%"><b>
<input type="text" name="account_billing_card_num" value="{ $list->decrypt($account_billing.card_num) }" size="24" maxlength="16">
</b></td>
</tr>
<tr valign="top">
<td width="35%"> {translate module=account_billing} field_card_exp_month {/translate} </td>
<td width="65%">&nbsp;</td>
</tr>
<tr valign="top">
<td width="35%"><select name="account_billing_card_exp_month" >
<option value="01" {if $account_billing.card_exp_month == "1"}selected{/if}>1 (Jan)</option>
<option value="02" {if $account_billing.card_exp_month == "2"}selected{/if}>2 (Feb)</option>
<option value="03" {if $account_billing.card_exp_month == "3"}selected{/if}>3 (Mar)</option>
<option value="04" {if $account_billing.card_exp_month == "4"}selected{/if}>4 (Apr)</option>
<option value="05" {if $account_billing.card_exp_month == "5"}selected{/if}>5 (May)</option>
<option value="06" {if $account_billing.card_exp_month == "6"}selected{/if}>6 (Jun)</option>
<option value="07" {if $account_billing.card_exp_month == "7"}selected{/if}>7 (Jul)</option>
<option value="08" {if $account_billing.card_exp_month == "8"}selected{/if}>8 (Aug)</option>
<option value="09" {if $account_billing.card_exp_month == "9"}selected{/if}>9 (Sep)</option>
<option value="10" {if $account_billing.card_exp_month == "10"}selected{/if}>10 (Oct)</option>
<option value="11" {if $account_billing.card_exp_month == "11"}selected{/if}>11 (Nov)</option>
<option value="12" {if $account_billing.card_exp_month == "12"}selected{/if}>12 (Dec)</option>
</select>
{translate module=account_billing} field_card_exp_year {/translate} </td>
<td width="65%">20
<input type="text" name="account_billing_card_exp_year" value="{$account_billing.card_exp_year}" size="2" maxlength="2">
(ex: 08) </td>
</tr>
{if $account_billing.card_type == "amex"}
<tr class="row1" valign="middle" align="left">
<td width="35%"> {translate module=account_billing} field_card_start_month {/translate} </td>
<td width="65%"> {translate module=account_billing} field_card_start_year {/translate} </td>
</tr>
<tr class="row1" valign="middle" align="left">
<td width="35%"><select name="account_billing_card_start_month" >
<option value="01" {if $account_billing.card_start_month == "1"}selected{/if}>1 (Jan)</option>
<option value="02" {if $account_billing.card_start_month == "2"}selected{/if}>2 (Feb)</option>
<option value="03" {if $account_billing.card_start_month == "3"}selected{/if}>3 (Mar)</option>
<option value="04" {if $account_billing.card_start_month == "4"}selected{/if}>4 (Apr)</option>
<option value="05" {if $account_billing.card_start_month == "5"}selected{/if}>5 (May)</option>
<option value="06" {if $account_billing.card_start_month == "6"}selected{/if}>6 (Jun)</option>
<option value="07" {if $account_billing.card_start_month == "7"}selected{/if}>7 (Jul)</option>
<option value="08" {if $account_billing.card_start_month == "8"}selected{/if}>8 (Aug)</option>
<option value="09" {if $account_billing.card_start_month == "9"}selected{/if}>9 (Sep)</option>
<option value="10" {if $account_billing.card_start_month == "10"}selected{/if}>10 (Oct)</option>
<option value="11" {if $account_billing.card_start_month == "11"}selected{/if}>11 (Nov)</option>
<option value="12" {if $account_billing.card_start_month == "12"}selected{/if}>12 (Dec)</option>
</select>
</td>
<td width="65%">20
<input type="text" name="account_billing_card_start_year" value="{$account_billing.card_start_year}" size="2" maxlength="2">
(example: 08) </td>
</tr>
{/if} {/if}
<!-- end credit card form -->
<!-- start eft form -->
{if $account_billing.card_type == "eft"}
<tr class="row1" valign="middle" align="left">
<td width="35%">{translate module=account_billing} field_eft_trn {/translate}</td>
<td width="65%"><b>
<input type="text" name="account_billing_eft_trn" value="{ $list->decrypt($account_billing.eft_trn) }">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td width="35%">{translate module=account_billing} field_eft_check_acct {/translate}</td>
<td width="65%"><input type="text" name="account_billing_eft_check_acct" value="{ $list->decrypt($account_billing.eft_check_acct) }">
</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td width="35%">{translate module=checkout} eft_check_acct_type {/translate}</td>
<td width="65%"><b>
<select name="account_billing_eft_check_acct_type" >
<option value="p" {if $account_billing.eft_check_acct_type == "p"}selected{/if}>{translate module=checkout}eft_type_p{/translate}</option>
<option value="b" {if $account_billing.eft_check_acct_type == "b"}selected{/if}>{translate module=checkout}eft_type_b{/translate}</option>
</select>
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td width="35%"><b></b></td>
<td width="65%"><b> </b></td>
</tr>
{/if}
<!-- end eft form -->
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_first_name{/translate} </td>
<td><b>
<input type="text" name="account_billing_first_name" value="{$account_billing.first_name}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_last_name{/translate} </td>
<td><b>
<input type="text" name="account_billing_last_name" value="{$account_billing.last_name}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_address1{/translate} </td>
<td><b>
<input type="text" name="account_billing_address1" value="{$account_billing.address1}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_address2{/translate} </td>
<td><b>
<input type="text" name="account_billing_address2" value="{$account_billing.address2}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_city{/translate} </td>
<td><b>
<input type="text" name="account_billing_city" value="{$account_billing.city}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_state{/translate} </td>
<td><b>
<input type="text" name="account_billing_state" value="{$account_billing.state}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_zip{/translate} </td>
<td><b>
<input type="text" name="account_billing_zip" value="{$account_billing.zip}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_country_id{/translate} </td>
<td>
{ $list->menu("no", "account_billing_country_id", "country", "name", $account_billing.country_id, "") }
</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=account} field_email{/translate} </td>
<td><b>
<input type="text" name="account_billing_email" value="{$account_billing.email}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=checkout} phone{/translate} </td>
<td><b>
<input type="text" name="account_billing_phone" value="{$account_billing.phone}">
</b></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td><input type="button" name="Delete" value="{translate}delete{/translate}" class="form_button" onClick="user_delete({$account_billing.id})"></td>
<td align="right">&nbsp;&nbsp;
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="_page" value="account_billing:view">
<input type="hidden" name="account_billing_id" value="{$account_billing.id}">
<input type="hidden" name="do[]" value="account_billing:update">
<input type="hidden" name="id" value="{$VAR.id}">
</form>
{/foreach}
{/if}