Initial Commit of AgileBill Open Source
This commit is contained in:
63
themes/default/blocks/affiliate_commission/add.tpl
Normal file
63
themes/default/blocks/affiliate_commission/add.tpl
Normal file
@@ -0,0 +1,63 @@
|
||||
|
||||
|
||||
<!-- Display the form validation -->
|
||||
{if $form_validation}
|
||||
{ $block->display("core:alert_fields") }
|
||||
{/if}
|
||||
|
||||
<!-- Display the form to collect the input values -->
|
||||
<form id="affiliate_commission_add" name="affiliate_commission_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=affiliate_commission}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=affiliate_commission}
|
||||
field_date_begin
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
{ $list->calender_add("affiliate_commission_start_date", $VAR.affiliate_commission_start_date, "form_field") }
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=affiliate_commission}
|
||||
field_date_end
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
{ $list->calender_add("affiliate_commission_end_date", $VAR.affiliate_commission_end_date, "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="core:blank">
|
||||
<input type="hidden" name="_page_current" value="affiliate_commission:add">
|
||||
<input type="hidden" name="do[]" value="affiliate_commission:add">
|
||||
<input type="hidden" name="GenID" value="{$smarty.now}">
|
||||
<input type="hidden" name="page" value="1">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
108
themes/default/blocks/affiliate_commission/search_form.tpl
Normal file
108
themes/default/blocks/affiliate_commission/search_form.tpl
Normal file
@@ -0,0 +1,108 @@
|
||||
|
||||
{ $method->exe("affiliate_commission","search_form") }
|
||||
{ if ($method->result == FALSE) }
|
||||
{ $block->display("core:method_error") }
|
||||
{else}
|
||||
|
||||
<form name="affiliate_commission_search" 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=affiliate_commission}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=affiliate_commission}
|
||||
field_date_orig
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
{ $list->calender_search("affiliate_commission_date_orig", $VAR.affiliate_commission_date_orig, "form_field", "") }
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=affiliate_commission}
|
||||
field_notes_admin
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="affiliate_commission_notes_admin" value="{$VAR.affiliate_commission_notes_admin}" {if $affiliate_commission_notes_admin == true}class="form_field_error"{/if}>
|
||||
|
||||
{translate}
|
||||
search_partial
|
||||
{/translate}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=affiliate_commission}
|
||||
field_notes_affiliate
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="affiliate_commission_notes_affiliate" value="{$VAR.affiliate_commission_notes_affiliate}" {if $affiliate_commission_notes_affiliate == true}class="form_field_error"{/if}>
|
||||
|
||||
{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="{$affiliate_commission_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=$affiliate_commission 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="affiliate_commission">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{ $block->display("core:saved_searches") }
|
||||
{ $block->display("core:recent_searches") }
|
||||
{/if}
|
125
themes/default/blocks/affiliate_commission/search_show.tpl
Normal file
125
themes/default/blocks/affiliate_commission/search_show.tpl
Normal file
@@ -0,0 +1,125 @@
|
||||
|
||||
|
||||
{$method->exe("affiliate_commission","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 = 'affiliate_commission';
|
||||
{/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="65" class="table_heading"> </td>
|
||||
<td width="285" class="table_heading">
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
document.write(search_heading('{/literal}{translate module=affiliate_commission}field_date_orig{/translate}{literal}','date_orig'));
|
||||
</script>
|
||||
{/literal}
|
||||
</td>
|
||||
<td width="204" class="table_heading">
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
document.write(search_heading('{/literal}{translate module=affiliate_commission}field_date_begin{/translate}{literal}','date_begin'));
|
||||
</script>
|
||||
{/literal}
|
||||
</td>
|
||||
<td width="201" class="table_heading">
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
document.write(search_heading('{/literal}{translate module=affiliate_commission}field_date_end{/translate}{literal}','date_end'));
|
||||
</script>
|
||||
{/literal}
|
||||
</td>
|
||||
<td width="183" class="table_heading">
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
document.write(search_heading('{/literal}{translate module=affiliate_commission}field_commissions{/translate}{literal}','commissions'));
|
||||
</script>
|
||||
{/literal}
|
||||
</td>
|
||||
<!-- LOOP THROUGH EACH RECORD -->
|
||||
{foreach from=$affiliate_commission item=record}
|
||||
<tr id="row{$record.id}" onClick="row_sel('{$record.id}',1);" onDblClick="window.location='?_page=affiliate_commission: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="65">
|
||||
<input type="checkbox" name="record{$record.id}" value="{$record.id}" onClick="row_sel('{$record.id}',1,'{$record._C}');">
|
||||
</td>
|
||||
<td width="285">
|
||||
{$list->date_time($record.date_orig)}
|
||||
</td>
|
||||
<td width="204">
|
||||
{if $record.date_begin > 0}
|
||||
{$list->date($record.date_begin)}
|
||||
{else}
|
||||
---
|
||||
{/if}
|
||||
</td>
|
||||
<td width="201">
|
||||
{$list->date($record.date_end)}
|
||||
</td>
|
||||
<td width="183">
|
||||
{$list->format_currency($record.commissions, '')}
|
||||
</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>
|
225
themes/default/blocks/affiliate_commission/view.tpl
Normal file
225
themes/default/blocks/affiliate_commission/view.tpl
Normal file
@@ -0,0 +1,225 @@
|
||||
|
||||
{ $method->exe("affiliate_commission","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 = 'affiliate_commission';
|
||||
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=$affiliate_commission item=affiliate_commission} <a name="{$affiliate_commission.id}"></a>
|
||||
|
||||
<!-- Display the field validation -->
|
||||
{if $form_validation}
|
||||
{ $block->display("core:alert_fields") }
|
||||
{/if}
|
||||
|
||||
<!-- Display each record -->
|
||||
<form name="affiliate_commission_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=affiliate_commission}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=affiliate_commission}
|
||||
field_date_orig
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
{$list->date_time($affiliate_commission.date_orig)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=affiliate_commission}
|
||||
field_date_begin
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
{if $affiliate_commission.date_begin > 0}
|
||||
{$list->date($affiliate_commission.date_begin)}
|
||||
{else}
|
||||
---
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=affiliate_commission}
|
||||
field_date_end
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
{$list->date($affiliate_commission.date_end)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=affiliate_commission}
|
||||
field_commissions
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%"> {if $affiliate_commission.commissions > 0}
|
||||
{$list->format_currency($affiliate_commission.commissions, '')}
|
||||
{else}0{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=affiliate_commission}
|
||||
field_status
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
{ $list->bool("affiliate_commission_status", $affiliate_commission.status, "form_menu") }
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=affiliate_commission}
|
||||
field_notes_admin
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<textarea name="affiliate_commission_notes_admin" cols="40" rows="5" >{$affiliate_commission.notes_admin}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=affiliate_commission}
|
||||
field_notes_affiliate
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<textarea name="affiliate_commission_notes_affiliate" cols="40" rows="5" >{$affiliate_commission.notes_affiliate}</textarea>
|
||||
</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%">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right">
|
||||
<input type="button" name="delete" value="{translate}delete{/translate}" class="form_button" onClick="delete_record('{$affiliate_commission.id}','{$VAR.id}');">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="_page" value="affiliate_commission:view">
|
||||
<input type="hidden" name="affiliate_commission_id" value="{$affiliate_commission.id}">
|
||||
<input type="hidden" name="do[]" value="affiliate_commission:update">
|
||||
<input type="hidden" name="id" value="{$VAR.id}">
|
||||
<br>
|
||||
<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=affiliate_commission}
|
||||
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">
|
||||
<!-- Loop through each affiliate plugin -->
|
||||
{foreach from=$plugindata item=plugin}
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{$plugin.name}
|
||||
</td>
|
||||
<td width="23%">
|
||||
{$plugin.count}
|
||||
{translate module=affiliate_commission}
|
||||
commissions
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="42%">
|
||||
{if $plugin.count > 0}
|
||||
<a href="?_page=core:blank&_escape=1&do%5B%5D=affiliate_commission:export&id={$affiliate_commission.id}&plugin={$plugin.plugin}" target="_blank">
|
||||
<b>
|
||||
{translate module=affiliate_commission}
|
||||
export
|
||||
{/translate}
|
||||
</b>
|
||||
{else}
|
||||
</a>
|
||||
{translate module=affiliate_commission}
|
||||
do_nothing
|
||||
{/translate}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{/foreach}
|
||||
{/if}
|
Reference in New Issue
Block a user