<!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.lblAffiliate} : {$language.lblAffiliatePayments}</title>
{include file='CommonStyles.tpl'} 
{include file='CommonJavaScript.tpl'}
{include file='CommonCustomStyles.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/grid_listing.css" />
<link href="{$view_styles}/jquery-ui-1.8.19.custom.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/ui.daterangepicker.css" />
<link href="{$view_styles}/right-menu.css" rel="stylesheet" type="text/css" />
</head><body>
<div class="outer_container"> 
{include file='CommonTop.tpl'} 
  <!--End:Header Container--> 
  <!--***********************************************************************END HEADER CONTAINER******************************************************-->
  <div class="content_container2 clearfix">
    <div class="right-sidebar">
      <div class="side_wrapper">
	  {if $affaddprivilage}
	  {html->anchor href="affiliate/new/" caption="<strong><span class='add'></span>{$language.lblAddNewAffiliate}</strong>" class="custom-btnt"  }
	  {/if}
        {include file='AffiliateRightLinks.tpl'} </div>
    </div>
    <!--End: Right Block-->
    <div class="left_wrapper">
      <div class="content_wrapper">
        <div class="search_tab fixing_right margin-b-10">
          <ul>
            <li>{html->anchor href="/affiliate/paymentnotpaid/$link" class="search_tab_a" caption=$language.lblNotPaid}</li>
            <li>{html->anchor href="/affiliate/paymentpaid/$link"  class="search_tab_a active"  caption=$language.lblPaid}</li>
          </ul>
        </div>
        <h2 class="btm-spc">{$language.lblAffiliatePayments}</h2>
        {form->start name="formOrderSearch" action="" method="post" enctype="multipart/form-data"}
        <div class="search_container">
          <div class="inner single-box">
           <ul class="clearfix">
            	<li class="column">
                	<p class="label-field01">{$language.lblDate}</p>
                    <span class="form-field01"><div class="text-box-div-date"> {assign var="fromDate" value=$fromDate|customDate|default:''}
                      {form->textbox id="payDate" name="payDate" readonly="readonly" class="date-field" value=$payDate} </div></span>
                </li>
                <li class="column">
                	<p class="label-field01">{$language.lblAffiliateName}</p>
                    <span class="form-field01">{form->select name="affiliateUserID" class="select-box" caption="->"|cat:$language.lblSelect options=$listAffiliateOptions} </span>
                </li>
                <li class="column">
                    {form->submit name="submitPaidSearch" class="button01"  value="{$language.lblSearch}"}
                  {html->anchor href="/affiliate/payment/" class="action-link" content="{$language.lblListAll}"}
                </li></ul>
          </div>
        </div>
         {if $resAffiliatePaid}  {form->submit name="PaidExport" form="formOrderSearch" class="button-link01 fixing_right" value=$language.lblExport}<div class="clear"></div> {/if} 
        {form->close}

        {if $resAffiliatePaid}{form->start name="formPaidOrder" action="" method="post" enctype="multipart/form-data"}
        <div class="grid_table00" >
          <table  border="0" cellspacing="0" cellpadding="0"  width="100%"  >
            <tr>
              <th  align="left" valign="middle" >{$language.lblAffiliateName}</th>
              <th align="left" valign="middle" >{$language.lblContactEmail} </th>
              <th align="left" valign="middle"  >{$language.lblPhone}</th>
              <th align="left" valign="middle"  >{$language.lblPaidAmount}</th>
            </tr>
            {foreach from=$resAffiliatePaid item="paidPay" key="key1"} {assign
            var="affiliateUserID" value=$paidPay.affiliateUserID}
            <tr>
              <td align="left" valign="middle"> {html->anchor caption=$paidPay.affiliateName  class="normal_link" 
                history="yes" href="affiliate/affiliateOrderPaymentPaid/id/$affiliateUserID/$link"} </td>
              <td align="left" valign="middle">{$paidPay.affiliateEmail}</td>
              <td align="left" valign="middle">{$paidPay.affiliatePhone}</td>
              <td align="left" valign="middle">{($paidPay.commissionAmount)|price}</td>
            </tr>
            {/foreach}
          </table>
        </div>
        {form->close}
        {else}
        <div class="message_info">{$language.msgNoRecords}</div>
        {/if} </div>
    </div>
    <!--End: left Block--> 
  </div>
  <!--End:Content Container--> 
  {include file='CommonBottom.tpl'} </div>
<!--End:Outer Container--> 
{form->rootpath_script} 
{form->basepath_script} 
{include file='CommonJavaScriptBottom.tpl'} 
<script type="text/javascript" src="{$view_javascript}/tab.plugin.js"></script> 
<script type="text/javascript" src="{$common_js}/date.js"></script> 
<script type="text/javascript" src="{$view_javascript}/daterangepicker.jQuery.js"></script> 
<script type="text/javascript">
{literal}
$(function(){
	 $('#payDate').daterangepicker({arrows: false});
	 });
{/literal}
$('.side_wrapper ul li a[rel=affiliate-payments]').addClass('selected');
	 setSideMenu(); 

</script> 
<script type="text/javascript" src="{$view_javascript}/affiliateOrderPayments.page.js"></script> 
{html->messages_script id="common_message"}
</body>
</html>