<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$language.lblAdmin} : {$language.lblUsersAndOrders} : {$language.lblManageAffiliates}</title>
{include file='CommonStyles.tpl'} 
{include file='CommonJavaScript.tpl'} 
<link rel="stylesheet" type="text/css" href="{$view_styles}/product-add.css" />
{include file='CommonCustomStyles.tpl'}
</head><body>
<div class="outer_container">
  {include file='CommonTop.tpl'}
  <!--End:Header Container-->
  <div class="content_container">
    <div class="content_wrapper add-new-formlisting">
      <h2 >{if $affiliateUserID|default:''}{$language.lblEditAffiliate}{else}{$language.lblAddNewAffiliate}{/if}</h2>
      <!-- Inner Content Container starts-->
      {form->start name="frmAffiliate" action="" method="post" enctype="multipart/form-data" autocomplete="off"}
      {form->hidden name="affiliateUserID" id="affiliateUserID" value=$affiliateUserID|default:''} 
      {form->hidden name="affiliateReqID" value=$affiliateReqID|default:''} 
      {form->hidden name="statehidValue" id='statehidValue'}
      {form->hidden name="affiliateCommisionhidden" value=$affiliateCommissionPercent|default:''}
      {form->hidden name="affiliateGlobalCommisionhidden" value=$globalCommisionPercentage|default:''}
      <div class="inner_content_wrapper">
        <div class="form_listing " >        	
            <!--section wrap :: Starts-->
            <div class="section_wrap clearfix">
            	<h3><span>{$language.lblAffiliateInfo}</span></h3>
                <div class="left-pane">
                    <div class="form_listing">
                        <ul>
                            <li class="clearfix">
                                <div class="leftside01 mandatory">{$language.lblWebsiteURL}</div>
                                <div class="rightside01">
                                   {form->textbox name="affiliateWebsiteURL" tabindex="1" maxlength="450"  class="textbox"  validate="required~*isUrl" error=$language.errWebsiteURL|cat:'~*'|cat:$language.errValidUrl}
                                </div>
                            </li>                            
                        </ul>
                    </div>
                </div> 
                <div class="right-pane">
                	<div class="form_listing">
                        <ul>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblWebsiteType}</div>
                                <div class="rightside01">
                                   {form->textbox name="affiliateTypeofWebsite" tabindex="1" maxlength="150"  class="textbox" validate="required" error=$language.errWebsiteType}
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>  
            </div><!--section wrap :: Ends--> 
           
			<div class="section_wrap clearfix">
				<h3><span>{$language.lblContactInformation}</span></h3>
                <!--start: left pane -->
                <div class="left-pane clearfix">
                    <div class="form_listing">
                        <ul>
                            <li class="clearfix">
                                <div class="leftside01 mandatory">{$language.lblFirstName}</div>
                                <div class="rightside01">
                                    {form->textbox name="affiliateFirstName" tabindex="1" maxlength="100" validate="required" error=$language.errFirstName class="textbox"}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblLastName}</div>
                                <div class="rightside01">
                                     {form->textbox name="affiliateLastName" tabindex="1" maxlength="100" validate="required" error=$language.errLastName class="textbox"}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblCompanyName}</div>
                                <div class="rightside01">
                                    {form->textbox name="affiliateCompanyName" tabindex="1" maxlength="100" validate="required" error=$language.errCompanyName class="textbox"}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblContactPerson}</div>
                                <div class="rightside01">
                                   {form->textbox name="affiliateContactPerson" tabindex="1" maxlength="100" validate="required" error=$language.errContactPerson class="textbox"} 
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblAddress1}</div>
                                <div class="rightside01">
                                    {form->textbox name="affiliateAddress1" tabindex="1" maxlength="100" validate="required" error=$language.errAddress1 class="textbox"} 
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01">{$language.lblAddress2}</div>
                                <div class="rightside01">
                                   {form->textbox name="affiliateAddress2" tabindex="1" maxlength="100" class="textbox"}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory"> {$language.lblEmailID}</div>
                                <div class="rightside01">
                                    {form->textbox name="affiliateEmail" tabindex="1" validate="required~*email" error=$language.errEnterValidEmail maxlength="100" class="textbox"}
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
                <!--end: left pane -->
                <!--start: right pane -->
                <div  class="right-pane clearfix">
                    <div class="form_listing">
                    	<ul>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblCountry}</div>
                                <div class="rightside01">
                                	{form->select name="affiliateCountryID" tabindex="1" caption="->{$language.lblSelectProductType}" onchange="listStates(this.value,'');" options=$resCountry validate="required" class="class01" error=$language.errCountry custom='true' customfield='class'}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblStateProvince}</div>
                                <div class="rightside01">
                                	<span id="stateInput"> {form->select tabindex="1" name="stateID" caption="->{$language.lblSelectProductType}" class="class01" onchange="getStateHiddenValue(this.value);" validate="stateSelectedType->isequal->stateID~*required" error=$language.errState} </span> <span id="stateProvinceInput" style="display:none;"> {form->textbox tabindex="1" name="province" value=$affiliateStateProvince|default:'' maxlength="100" class="textbox" validate="stateSelectedType->isequal->province~*required"  error=$language.errProvince} </span> <span id="loadProcessImage"></span> {form->hidden id="stateSelectedType"  name="stateSelectedType" value=""}
                  {form->hidden id="stateSelectedID"  name="stateSelectedID"}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblCity}</div>
                                <div class="rightside01">
                                   {form->textbox id="affiliateCity" name="affiliateCity" maxlength="100" tabindex="1" class="textbox" validate="required"  error=$language.errCity}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblPhone}</div>
                                <div class="rightside01">
                                     {form->textbox name="affiliatePhone" tabindex="1" maxlength="25" validate="required" error=$language.errPhone class="textbox"}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 ">{$language.lblFax}</div>
                                <div class="rightside01">
                                	{form->textbox name="affiliateFax" tabindex="1" maxlength="25" class="textbox"}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblZipPostalCode}</div>
                                <div class="rightside01">
                                	{form->textbox name="affiliateZipcode" tabindex="1" maxlength="10" validate="required" error=$language.errZIP class="textbox"} 
                                </div>
                            </li>
                             <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblPreferredLanguage}</div>
                                <div class="rightside01">
                                	{form->select  name="preferredLanguage" tabindex="1" validate="required" error=$language.errPreferredLanguage  options=$view_common_languages caption="->{$language.lblSelectProductType}"} 
                                </div>
                            </li>
                    	</ul>
                    </div>
                </div>
                <!--end: right pane -->
            </div><!--section wrap :: Ends--> 
            <div class="section_wrap price-quantity clearfix ">				
                <!--start: left pane -->
                <div class="left-pane clearfix">
                    <h3><span>{$language.lblCommissionSettings}</span></h3>
                    <div class="form_listing">
                        <ul>
                            <li class="clearfix">
                                <div class="leftside01">{$language.lblUseGlobal}</div>
                                <div class="rightside01">
                                    {form->checkbox name="globalCommission" tabindex="1" value="Yes" onclick="show_global_settings()" checked="{if isset($globalCh) && $globalCh==1}True{/if}"} <span id="loadImage"></span>
                                </div>
                            </li>
                            <div id="ajaxCommission" > {assign var="resCommissionSettings" value=$resCommissionSettings|default:''}
                            <li class="selection clearfix">
                                <div class="leftside01">{$language.lblEnableSalesCommission}<span class="sub-text " >{$language.lblEnableSalesSubText}</span></div>
                                <div class="rightside01">
                                      {form->checkbox name="enableSalesCommission" tabindex="1" value=Yes checked="{if isset($resCommissionSettings.enableSalesCommission) && $resCommissionSettings.enableSalesCommission=='Yes'}True{/if}" onChange='disableField()'}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblFiirstCommissionPaymentType}</div>
                                <div class="rightside01">
                                    {form->select name="firstCommissionPaymentType" tabindex="1"  options="Percentage->Percentage~*Value->Value" caption="->Select" validate="enableSalesCommission->isequal->Yes~*required" error=$language.errCommissionValueType value=$resCommissionSettings.firstPurchaseCommissionType|default:''}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblFirstPurchaseCommissionValue}</div>
                                <div class="rightside01">
								{if $resCommissionSettings.firstPurchaseCommissionType|default:'' eq "Percentage"}
									{assign var="firstPurchaseCommissionValueVar" value=$resCommissionSettings.firstPurchaseCommissionValue|number_format:2:".":""|default:''}
								{else}
									{assign var="firstPurchaseCommissionValueVar" value=$resCommissionSettings.firstPurchaseCommissionValue|default:''}
								{/if}
								{form->textbox name="firstPurchaseCommissionValue" tabindex="1"  class="textbox salesComClass" value=$firstPurchaseCommissionValueVar validate="enableSalesCommission->isequal->Yes~*required" error=$language.errCommissionValue postTrigger="$('#validatefirstPurchaseCommissionValue').trigger('change');$('#validatefirstPurchaseCommissionPercentage').trigger('change');"}
                  {form->validate  name="validatefirstPurchaseCommissionValue" validate="firstCommissionPaymentType->isequal->Value~*firstPurchaseCommissionValue->isPrice" error=$language.errValidCommissionValue}
                  {form->validate  name="validatefirstPurchaseCommissionPercentage" validate="firstCommissionPaymentType->isequal->Percentage~*firstPurchaseCommissionValue->isPercentage" error=$language.errValidCommissionValue}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblRecurringPurchaseCommissionType}</div>
                                <div class="rightside01">
                                    {form->select name="recurringPurchaseCommissionType" tabindex="1" maxlength="100" options="Percentage->Percentage~*Value->Value" caption="->Select" validate="enableSalesCommission->isequal->Yes~*required" error="~*"|cat:$language.errCommissionValueType value=$resCommissionSettings.recurringPurchaseCommissionType|default:''}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblRecurringPurchaseCommissionValue}</div>
                                <div class="rightside01">
									{if $resCommissionSettings.recurringPurchaseCommissionType|default:'' eq "Percentage"}
										{assign var="recurringPurchaseCommissionValueVar" value=$resCommissionSettings.recurringPurchaseCommissionValue|number_format:2:".":""|default:''}
									{else}
										{assign var="recurringPurchaseCommissionValueVar" value=$resCommissionSettings.recurringPurchaseCommissionValue|default:''}
									{/if}
									{form->textbox name="recurringPurchaseCommissionValue" tabindex="1"  class="textbox salesComClass" value=$recurringPurchaseCommissionValueVar validate="enableSalesCommission->isequal->Yes~*required" error=$language.errCommissionValue postTrigger="$('#validateRecurringPurchaseCommissionValue').trigger('change');$('#validateRecurringPurchaseCommissionPercentage').trigger('change');"}
                  {form->validate  name="validateRecurringPurchaseCommissionValue" validate="recurringPurchaseCommissionType->isequal->Value~*recurringPurchaseCommissionValue->isPrice" error=$language.errValidCommissionValue}
                  {form->validate  name="validateRecurringPurchaseCommissionPercentage" validate="recurringPurchaseCommissionType->isequal->Percentage~*recurringPurchaseCommissionValue->isPercentage" error=$language.errValidCommissionValue}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01">{$language.lblEnableTierCommission}<span class="sub-text " >{$language.lblEnableTierSubText}</span></div>
                                <div class="rightside01">
                                    {form->checkbox name="enableTierCommission" tabindex="1"  value="Yes" checked="{if isset($resCommissionSettings.enableTierCommission) &&  $resCommissionSettings.enableTierCommission=='Yes'}True{/if}" onChange='disableField()'}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblTierCommissionLevel}</div>
                                <div class="rightside01">
                                   {form->textbox name="tierCommissionLevel" tabindex="1"  class="textbox tierComClass" validate="enableTierCommission->isequal->Yes~*required~*isWholeNumber" error="~*"|cat:$language.errTierCommissionLevel|cat:"~*"|cat:$language.errValidTierCommissionLevel  value={$resCommissionSettings.tierCommissionLevel|default:''}}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblTierCommissionType}</div>
                                <div class="rightside01">
                                   {form->select name="tierCommissionType" tabindex="1" options="Percentage->Percentage~*Value->Value" caption="->{$language.lblSelectProductType}" validate="enableTierCommission->isequal->Yes~*required" error="~*"|cat:$language.errCommissionValueType value={$resCommissionSettings.tierCommissionType|default:''}}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblTierCommissionValue}</div>
                                <div class="rightside01">
									{if $resCommissionSettings.tierCommissionType|default:'' eq "Percentage"}
										{assign var="tierCommissionValueVar" value=$resCommissionSettings.tierCommissionValue|number_format:2:".":""|default:''}
									{else}
										{assign var="tierCommissionValueVar" value=$resCommissionSettings.tierCommissionValue|default:''}
									{/if}
									{form->textbox name="tierCommissionValue" tabindex="1" class="textbox tierComClass"  value={$tierCommissionValueVar} validate="enableTierCommission->isequal->Yes~*required" error=$language.errCommissionValue postTrigger="$('#validateTierCommissionValue').trigger('change');$('#validateTierCommissionPercentage').trigger('change');"}
                  {form->validate  name="validateTierCommissionValue" validate="tierCommissionType->isequal->Value~*tierCommissionValue->isPrice" error=$language.errValidCommissionValue}
                  {form->validate  name="validateTierCommissionPercentage" validate="tierCommissionType->isequal->Percentage~*tierCommissionValue->isPercentage" error=$language.errValidCommissionValue} 
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01">{$language.lblSubscriptionCommission}<span class="sub-text " >{$language.lblEnableSubscriptionSubText}</span></div>
                                <div class="rightside01">
                                	 {form->checkbox name="subscriptionCommission" tabindex="1"  value="Yes" checked="{if isset($resCommissionSettings.subscriptionCommission) && $resCommissionSettings.subscriptionCommission=='Yes'}True{/if}" onChange='disableField()'}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblSubscriptionCommissionAmount}</div>
                                <div class="rightside01">
                                	<span id="stateInput"> {form->textbox name="subscriptionCommissionAmount" tabindex="1"  class="textbox" validate="subscriptionCommission->isequal->Yes~*required~*isPrice" error="~*"|cat:$language.errSubsciptionCommission|cat:"~*"|cat:$language.errValidSubscriptionCommission|cat:"~*"|cat:$language.errValidSubscriptionCommission value=$resCommissionSettings.subscriptionCommissionAmount|default:''} 
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01">{$language.lblRegistrationCommission}<span class="sub-text " >{$language.lblEnableRegistrationSubText}</span></div>
                                <div class="rightside01">
                                   {form->checkbox name="registrationCommission" tabindex="1" value="Yes" checked="{if  isset($resCommissionSettings.registrationCommission) && $resCommissionSettings.registrationCommission=='Yes'}True{/if}" onChange='disableField()'}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblRegistrationCommissionAmount}</div>
                                <div class="rightside01">
                                     {form->textbox name="registrationCommissionAmount" tabindex="1"  class="textbox" validate="registrationCommission->isequal->Yes~*required~*isPrice" error="~*"|cat:$language.errRegistrationCommissionAmount|cat:"~*"|cat:$language.errValidCommissionValue  value=$resCommissionSettings.registrationCommissionAmount|default:''}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 ">{$language.lblBulkSubscriberImport}<span class="sub-text " >{$language.lblEnableBulkSubscribeSubText}</span></div>
                                <div class="rightside01">
                                	{form->checkbox name="bulkSubscriberImport" tabindex="1"  value="Yes" checked="{if  isset($resCommissionSettings.bulkSubscriberImport) &&  $resCommissionSettings.bulkSubscriberImport=='Yes'}True{/if}" onChange='disableField()'}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblBulkSubscriberImportCommission}</div>
                                <div class="rightside01">
                                	{form->textbox name="bulkSubscriberImportCommission" tabindex="1" class="textbox" validate="bulkSubscriberImport->isequal->Yes~*required~*isPrice" error="~*"|cat:$language.errCommissionValue|cat:"~*"|cat:$language.errValidCommissionValue  value=$resCommissionSettings.bulkSubscriberImportCommission|default:''}
                                </div>
                            </li><li class="selection clearfix">
                                <div class="leftside01">{$language.lblBulkUserImport}<span class="sub-text " >{$language.lblEnableBulkUserSubText}</span></div>
                                <div class="rightside01">
                                	{form->checkbox name="bulkUserImport" tabindex="1"  value="Yes" checked="{if  isset($resCommissionSettings.bulkUserImport) && $resCommissionSettings.bulkUserImport=='Yes'}True{/if}" onChange='disableField()'}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblBulkUserImportCommission}</div>
                                <div class="rightside01">
                                	{form->textbox name="bulkUserImportCommission" tabindex="1" class="textbox" validate="bulkUserImport->isequal->Yes~*required~*isPrice" error="~*"|cat:$language.errCommissionValue|cat:"~*"|cat:$language.errValidCommissionValue  value=$resCommissionSettings.bulkUserImportCommission|default:''}
                                </div>
                            </li>
                            </div>
                        </ul>
                    </div>
                </div>
                <!--end: left pane -->
                <!--start: right pane -->
               <div class="right-pane clearfix">
                     <h3><span>{$language.lblPayableAccountInformation}</span></h3>
                    <div class="form_listing">
                        <ul>
                            <li class="selection clearfix">
                                <div class="leftside01">{$language.lblAccountType}</div>
                                <div class="rightside01">
                                    {form->textbox name="affiliateAccountType" tabindex="1" maxlength="100" class="textbox"} 
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01">{$language.lblNameonAccount}</div>
                                <div class="rightside01">
                                    {form->textbox name="affiliateAccountName" tabindex="1" maxlength="100"  class="textbox"} 
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01">{$language.lblAccountDetails}</div>
                                <div class="rightside01">
                                     {form->textarea onkeyup="return ismaxlength(this)" tabindex="1" onchange="return ismaxlength(this)" maxlength="200" name="affiliateAccountDetails" class="length0_50pers" rows="4" cols="3"}
                                </div>
                            </li>                            
                        </ul>
                    </div>
                	<h3><span>{$language.lblLogin}</span></h3>
                    <div class="form_listing">
                        <ul>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblLogin}</div>
                                <div class="rightside01">
                                   {form->hidden name="affiliateLoginName" value=$affiliateUserName|default:''}
								   {assign var="affiliateUserID" value=$affiliateUserID|default:''}
                                   {if $affiliateUserID>0} {$affiliateUserName} {else} 
                                   {form->textbox autocomplete="off" name="affiliateUserName" tabindex="1" maxlength="50" validate="isLoginName~*affiliateUserName->database->affiliates,affiliateUserName,affiliateUserID!='$affiliateUserID' AND affiliateStatus!='Deleted'" error=$language.errValidLogin|cat: "~*"|cat:$language.errLoginExists class="textbox"} {/if}
                                   {if $affiliateUserID>0}{else} <span class="sub-text">{$language.msgEmailValid} </span>{/if}
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblPassword}</div>
                                <div class="rightside01">
                                    {if $affiliateUserID>0} 
                                    {form->password validate="isSecurePassword" error=$language.errValidPassword  name="affiliatePassword" value="" tabindex="1" maxlength="15" class="textbox" autocomplete="off" postTrigger="$('#affiliatePasswordnew').blur();"} 
                    {else}          {form->password name="affiliatePassword" tabindex="1" maxlength="15" validate="required~*isSecurePassword" error=$language.errPaaaword|cat:"~*"|cat: $language.errValidPassword class="textbox" postTrigger="$('#affiliatePasswordnew').blur();" autocomplete="off"} {/if}
                                 <span class="sub-text" id="passwordNotify">{$language.msgUserPassword}</span></span>
                                </div>
                            </li>
                            <li class="selection clearfix">
                                <div class="leftside01 mandatory">{$language.lblConfirmPassword} </div>
                                <div class="rightside01">    
           {form->password validate="affiliatePassword->compare->value" error=$language.errPasswordMismatch  name="affiliatePasswordnew" tabindex="1" maxlength="15" class="textbox" autocomplete="off"}          
          </div>		   
                            </li>
                            <li class="selection clearfix">    
                                <div class="leftside01 mandatory status">{$language.lblStatus}</div>
                                <div class="rightside01" style="width:58%;padding-left: 9px;">
                                	<div id="perioddiv">
									{assign var="affiliateStatus" value=$affiliateStatus|default:''}
                                    {if $affiliateStatus=='New' || $affiliateStatus=='Declined'}
                                    {assign var="affiliateStatus" value="Active"}
                                    {/if}
                                    {form->radio tabindex="1" name="affiliateStatus" class="customradio" options="Active->"|cat:$language.lblActive|cat:"~*Inactive->"|cat:$language.lblInactive value="Active"}
                                     
                                    </div>
                                </div>                               
                            </li>
                        </ul>
                    </div>                    
                </div>
                <!--end: right pane -->
            </div>                    
            <div class="submit-block clearfix textto_center"> 
              <span class="line"></span>
            {if $affiliateUserID>0}
                  {if $showPrivilege}
					{assign var="link" value="/affiliate/show/id/$affiliateUserID/"}
				  {else}	
					{assign var="link" value="/affiliate/index/"}
				  {/if}	
                  {assign var="buttonText" value=$language.lblUpdate} 
			{elseif $affiliateReqID|default:''>0}
				 {if $showPrivilege && $fromSection|default:'' neq "list"}
					{assign var="link" value="/affiliaterequest/show/id/$affiliateReqID/"}
				 {else}	
					{assign var="link" value="affiliaterequest/index/"}
				 {/if}	
                 {assign var="buttonText" value=$language.lblSave} 
			{else} 
			 		{assign var="link" value="/affiliate/index/"}
                  	{assign var="buttonText" value=$language.lblSave} 
			{/if}                   
                 
                  {form->submit name="submitAffiliate" tabindex="1" id="submit" class="curve-3" form="frmAffiliate" value=$buttonText} 
                   {$language.lblOr}
                  {html->anchor href=$link id="cancel" class="cancelBusinessAdd" tabindex="1" caption="{$language.lblCancel}"}            
                </div>
         </div>    
               
				
				
		
		  </div>
		  <!--End:Border 3-->
		</div>
		<!--End:Border 2-->
	  </div>
	  <!--End: left Block-->
	  <div class="clear"></div>
	  {form->close} 
      </div>
      <!-- Inner Content Container ends-->
      <div class="clear"></div>
    </div>
  </div> 
    <!--End:Content Container-->
   {include file='CommonBottom.tpl'}   
</div>
{html->messages_script id="common_message"} 
{form->rootpath_script} 
{form->basepath_script} 
{form->validate_script form="frmAffiliate"} 
{include file='CommonJavaScriptBottom.tpl'} 
<script type="text/javascript" src="{$view_javascript}/affiliate.page.js"></script> 
<script type="text/javascript" src="{$common_js}/validate.plugin.js"></script> 
<script  type="text/javascript">
 var msgSelectSearchCriteria="{$language.msgSelectSearchCriteria}";
 var msgConfirmsub="{$language.lblmsgConfirmsub}";
var lblMaxCharaLength="{$language.lblMaxCharaLength}";
var msgSelectItem="{$language.msgSelectItem}";
var lblSelectAction="{$language.lblSelectAction}";
var lblSelect	=	"{$language.lblSelectProductType}";
var currentLanguageID	=	"{$currentLanguageID}";
 $(function(){
	 $("#perioddiv input").customInput('');
	});
</script>


<script type="text/javascript" src="{$view_javascript}/custom-radiobutton.js"></script>
</body>
</html>