151 lines
5.2 KiB
Smarty
151 lines
5.2 KiB
Smarty
{assign var=meth value=':'|explode:$VAR._page}
|
|
<!-- {$meth.0}:{$meth.1} -->
|
|
|
|
<!-- Display the field validation -->
|
|
{if $form_validation}
|
|
{$block->display('core:alert_fields')}
|
|
{/if}
|
|
|
|
<!-- Display the form to collect the input values -->
|
|
<form id="affiliate_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>{t}Thank you for your interest in our affiliate program. Please read our commission rates and Payout options below before proceeding.{/t}</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td> </td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
|
|
<tr valign="top">
|
|
<td style="width: 35%;">{osb f=tf field=max_tiers}</td>
|
|
<td style="width: 65%;">{$affiliate_template.max_tiers}</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td style="width: 35%;">{osb f=tf field=commission_minimum}</td>
|
|
<td style="width: 65%;">{$list->format_currency($affiliate_template.commission_minimum,'')}</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td style="width: 35%;">{osb f=tf field=new_commission_type}</td>
|
|
<td style="width: 65%;">{$list->menu_staticlist('commissiontype','','',$affiliate_template.new_commission_type,'')}</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td style="width: 35%;">{osb f=tf field=recurr_commission_type}</td>
|
|
<td style="width: 65%;">{$list->menu_staticlist('commissiontype','','',$affiliate_template.recurr_commission_type,'')}</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td style="width: 35%;">{osb f=tf field=affiliate_plugin}</td>
|
|
<td style="width: 65%;">{$list->menu_files('','affiliate_affiliate_plugin',$VAR.affiliate_affiliate_plugin,'affiliate_plugin','','.php','form_menu')}</td>
|
|
</tr>
|
|
{foreach from=$static_var item=record}
|
|
<tr valign="top">
|
|
<td style="width: 35%;">{$record.name}</td>
|
|
<td style="width: 65%;">{$record.html}</td>
|
|
</tr>
|
|
{/foreach}
|
|
<tr valign="top">
|
|
<td style="width: 35%;"></td>
|
|
<td style="width: 65%;"><input type="submit" name="Submit" value="{t}Submit{/t}" class="form_button"/></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div><br/></div>
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td style="width: 50%;" align="left"><iframe name="iframeNewTier" id="iframeNewTier" style="border:0px; width:0px; height:0px;" scrolling="auto" allowtransparency="true" frameborder="0" src="themes/{$THEME_NAME}/IEFrameWarningBypass.htm"></iframe></td>
|
|
<td style="width: 50%;" align="right"><iframe name="iframeRecTier" id="iframeRecTier" style="border:0px; width:0px; height:0px;" scrolling="auto" allowtransparency="true" frameborder="0" src="themes/{$THEME_NAME}/IEFrameWarningBypass.htm"></iframe></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<script type="text/javascript">
|
|
<!--
|
|
var new_array = new Array(99);
|
|
var rec_array = new Array(99);
|
|
|
|
{literal}
|
|
// create the hidden fields for the tier rates
|
|
for(i=0; i<99; i++) {
|
|
new_array[i] = '';
|
|
rec_array[i] = '';
|
|
}
|
|
{/literal}
|
|
|
|
{$list->unserial($affiliate_template.new_commission_rate,'new_commission_rate')}
|
|
{foreach key=key item=item from=$new_commission_rate}
|
|
{if $item}
|
|
new_array[{$key}] = '{$item}';
|
|
{/if}
|
|
{/foreach}
|
|
|
|
{$list->unserial($affiliate_template.recurr_commission_rate,'recurr_commission_rate')}
|
|
{foreach key=key item=item from=$recurr_commission_rate}
|
|
{if $item}
|
|
rec_array[{$key}] = '{$item}';
|
|
{/if}
|
|
{/foreach}
|
|
|
|
{literal}
|
|
function UpdateTierValueNew(id,value) {
|
|
new_array[id] = value;
|
|
document.getElementById('new_'+id).value = value;
|
|
}
|
|
|
|
function UpdateTierValueRecur(id,value) {
|
|
rec_array[id] = value;
|
|
document.getElementById('rec_'+id).value = value;
|
|
}
|
|
|
|
function GetTierValueNew(id) {
|
|
return new_array[id];
|
|
}
|
|
|
|
function GetTierValueRecur(id) {
|
|
return rec_array[id];
|
|
}
|
|
|
|
function TierUpdate() {
|
|
{/literal}
|
|
var tiers = "{$affiliate_template.max_tiers}";
|
|
var newc = "{$affiliate_template.new_commission_type}";
|
|
var recc = "{$affiliate_template.recurr_commission_type}";
|
|
{literal}
|
|
|
|
if(tiers > 99) {
|
|
tiers = 99;
|
|
document.getElementById('affiliate_max_tiers').value = 99;
|
|
}
|
|
|
|
if(newc != "0")
|
|
showIFrame('iframeNewTier',350,400,'?_page=affiliate:user_new_tier_iframe&_escape=1&tiers='+tiers);
|
|
if(recc != "0")
|
|
showIFrame('iframeRecTier',350,400,'?_page=affiliate:user_recurr_tier_iframe&_escape=1&tiers='+tiers);
|
|
}
|
|
{/literal}
|
|
|
|
TierUpdate();
|
|
//-->
|
|
</script>
|
|
|
|
<div>
|
|
<input type="hidden" name="_page" value="affiliate:affiliate"/>
|
|
<input type="hidden" name="_page_current" value="affiliate:affiliate"/>
|
|
<input type="hidden" name="do[]" value="affiliate:user_add"/>
|
|
</div>
|
|
</form>
|