

<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableBorder">
  <tr>
    <td class="mainTableTitle">

      <span>&nbsp;&nbsp;&raquo;</span> Reseller Payment List

    </td>
  </tr>


 <tr>
    <td>

 <!-- Reseller Payment List -->

 <table class="gbTable">

   <tr class="header">
     <td width="2%"><div align="left" style="padding-left:5px;">NR</div></td>
     <td width="20%"><div align="left" style="padding-left:5px;">Date</div></td>
     <td width="15%"><div align="left" style="padding-left:5px;">Name</div></td>
     <td width="7%"><div align="left" style="padding-left:5px;">level</div></td>
     <td width="16%"><div align="left" style="padding-left:5px;">Amount</div></td>
     <td width="10%"><div align="left" style="padding-left:5px;">Type</div></td>
     <td width="30%"><div align="left" style="padding-left:5px;">Description</div></td>
   </tr>



<?
$i=1;
$add = 0;
$return = 0;
if(is_array($paymentList))
{
    foreach($paymentList as $row)
    {
        $passid = $i;
?>

      <?
              if($i%2==0)
               {
                   $str = "
                            <TR id = \"$passid\" class=\"row2 \"
                                          onmousedown=\"rowPointer(this, 'down', 'row2', 'rowSel', 'rowMark')\"
                                          onmouseover=\"rowPointer(this, 'over', 'row2', 'rowSel', 'rowMark')\"
                                 onmouseout=\"rowPointer(this, 'out', 'row2', 'rowSel', 'rowMark')\">";
               }
              else
               {
                  $str = "
                           <TR id = \"$passid\" class=\"row1 \"
                                         onmousedown=\"rowPointer(this, 'down', 'row1', 'rowSel', 'rowMark')\"
                                         onmouseover=\"rowPointer(this, 'over', 'row1', 'rowSel', 'rowMark')\"
                             onmouseout=\"rowPointer(this, 'out', 'row1', 'rowSel', 'rowMark')\">";
               }
             echo $str;
      ?>

 <td align=center class="tableBorderAll" style="padding-left:0px;padding-top:2px;padding-bottom:2px;"><input name="checkActive" type="checkbox"  id="checkActive" value="1" /></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;padding-top:2px;padding-bottom:2px;"><?=$row->creationdate?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;padding-top:2px;padding-bottom:2px;">
    <?
        echo $this->generallib->get_reseller_name($row->id_reseller,$row->level)
    ?>
 </td>
 <td align=left class="tableBorderAll" style="padding-left:5px;padding-top:2px;padding-bottom:2px;"><?=$row->level?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;padding-top:2px;padding-bottom:2px;"><?=$row->amount?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;padding-top:2px;padding-bottom:2px;">
    <?
        if($row->type==1)
        {
            $add += $row->amount;
            echo'Add';
        }
        else
        {
            $return += $row->amount;
            echo'Return';
        }
    ?>
 </td>
 <td align=left class="tableBorderAll" style="padding-left:5px;padding-top:2px;padding-bottom:2px;"><?=$row->description?></td>

   </tr>

<?
$i++;
}

}

?>


 </table>

<!-- End reseller payment List -->

    </td>
  </tr>

  <tr>
    <td align="center" style="padding-top:5px;">

    <input type="hidden" name="startdate" id="startdate" value="<?=$startdate?>" />
    <input type="hidden" name="enddate" id="enddate" value="<?=$enddate?>" />
    <input type="hidden" name="reseller1id" id="reseller1id" value="<?=$reseller1id?>" />
    <input type="hidden" name="reseller2id" id="reseller2id" value="<?=$reseller2id?>" />
    <input type="hidden" name="reseller3id" id="reseller3id" value="<?=$reseller3id?>" />
    <input type="hidden" name="reseller4id" id="reseller4id" value="<?=$reseller4id?>" />
    </td>
  </tr>

  <tr>
    <td align="center" style="padding-top:0px;">
    
    <!-- reseller payment summery start -->
        <table width="50%" border="0" cellspacing="0" cellpadding="0" class="tableBorder">
          <tr>
            <td colspan="2" class="mainTableTitle"><span>&nbsp;&nbsp;&raquo;</span> Reseller Payment Summary</td>
          </tr>

         <tr>
            <td class='formLabelRigit' width="50%" style='padding-top:10px;'> Total Add :  </td>
            <td class='formLabelLeft' width="50%" style='padding-top:10px;'><?=$add?></td>
         </tr>

         <tr>
            <td class='formLabelRigit'>  Total Return :  </td>
            <td class='formLabelLeft'><?=$return?></td>
         </tr>
       </table>
    <!-- reseller payment summery end -->
    
    </td>
  </tr>


</table>