
	<?php
	$start = $startoffset * $limit + 1;
	$end = ($startoffset +1 )* $limit ;

	if($total<$start)
	$start = $total;

	if($total<=$end)
	$end = $total;
	?>


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

      <span>&nbsp;&nbsp;&raquo;</span> All Tariff Name List Total : <?=$total?> Showing <?=$start?> to <?=$end?>

    </td>
  </tr>


 <tr>
    <td>

 <!-- Clinets List -->

 <table class="gbTable">

   <tr class="header">
     <td width="2%"><div align="left" style="padding-left:5px;">NR</div></td>
     <td width="32%"><div align="left" style="padding-left:5px;">Description</div></td>
     <td width="8%"><div align="left" style="padding-left:5px;">NumRate</div></td>
     <td width="8%"><div align="left" style="padding-left:5px;">Level</div></td>
     <td width="10%"><div align="left" style="padding-left:5px;">Create Date</div></td>
     <td width="10%"><div align="left" style="padding-left:5px;">Create By</div></td>
     <td width="8%"><div align="left" style="padding-left:5px;">Rate Chart</div></td>
     <td width="6%"><div align="center" style="padding-left:5px;">Export</div></td>
 	 <td width="3%"><div align="center" style="padding-left:0px;">Edit</div></td>
 	 <td width="3%"><div align="center" style="padding-left:0px;">Del</div></td>

   </tr>



<?
$i=1;
if(is_array($rateList))
{
foreach($rateList as $row)
{
$passid =$row->id_rate;



if($row->id_reseller == -1)
$createBy = "Admin";
else
$createBy = $this->generallib->getResellerName($row->id_reseller,$row->level);


$numberRateChart = $this->generallib->getNumRateChartList($row->id_rate);

?>

      <?

	  		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;"><input name="checkActive" type="checkbox"  id="checkActive" value="1" /></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;"><a href="<?=site_url('rate/rateChartList/'.$row->id_rate)?>" title="Rate Chart" ><?=$row->description?></a></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;"><?=$numberRateChart?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;"><?=$row->level?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;"><?=$row->creationdate?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;"><?=$createBy?></td>

 <td align=center class="tableBorderAll" style="padding-left:5px;">
   <a href="<?=site_url('rate/rateChartList/'.$row->id_rate)?>" title="Rate Chart" >
   <img src="<?=base_url()?>images/rate_chart.gif" border="0" height="18">
   </a>
 </td>

  <td align=center class="tableBorderAll" style="padding-left:3px;">
    <a href="<?=site_url('rate/exportRate/'.$row->id_rate)?>" title="Export" >
    <img src="<?=base_url()?>images/exprot.gif" border="0" height="18">
    </a>
 </td>

 <td align=center class="tableBorderAll" style="padding-left:5px;">
   <a href="<?=site_url('rate/editForm/'.$row->id_rate)?>" title="Edit Reseller" >
   <img src="<?=base_url()?>images/contact_blue_edit.png" border="0" height="16">
   </a>
 </td>

 <td align=center  style="padding-left:5px;">
  <a href="<?=site_url('rate/deleteRate/'.$row->id_rate)?>" onclick="return confirm('Do you really want to remove this Rate Chart')" title="Delete" >
  <img src="<?=base_url()?>images/remove.png" border="0" height="16">
  </a>
 </td>

   </tr>

<?
$i++;
}

}

?>


 </table>

<!-- End Clients List -->

    </td>
  </tr>

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

    <input type="hidden" name="description" id="description" value="<?=$description?>" />
	<input type="hidden" name="level" id="level" value="<?=$level?>" />
	<input type="hidden" name="limit" id="limit" value="<?=$limit?>" />
	<input type="hidden" name="startoffset" id="startoffset" value="<?=$startoffset?>" />



<?


      $p = new paginationClass;
      $p->Items($total);

      if($startoffset==0)
      $startoffset = 1;

      $p->limit($limit);
      $p->target("paginator.php");
      $p->currentPage($startoffset);
      $p->adjacents(3);
      $p->show();



?>


    </td>
  </tr>

</table>