

	<?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 DID 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="17%"><div align="left" style="padding-left:5px;">Provider Name</div></td>
     <td width="13%"><div align="left" style="padding-left:5px;">DID Number</div></td>
     <td width="13%"><div align="left" style="padding-left:5px;">Location</div></td>
     <td width="13%"><div align="left" style="padding-left:5px;">Type</div></td>
     <td width="13%"><div align="left" style="padding-left:5px;">First Used</div></td>
     <td width="13%"><div align="left" style="padding-left:5px;">Last Used</div></td>
     <td width="6%"><div align="left" style="padding-left:5px;">NumUsed</div></td>
 	 <td width="4%"><div align="center" style="padding-left:0px;">Active?</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($didNumberList))
{
foreach($didNumberList as $row)
{
$passid =$i;


if($row->status == 1)
$checkActive = "checked='checked'";
else
$checkActive = "";


$didType = $this->generallib->getDIDNumberType($row->didtype);





?>

      <?

	  		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;"><?=$row->full_name?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;"><?=$row->didnumber?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;"><?=$row->location?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;"><?=$didType?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;"><?=$row->firstuse?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;"><?=$row->lastuse?></td>
 <td align=center class="tableBorderAll" style="padding-left:5px;"><?=$row->numuse?></td>


 <td align=center class="tableBorderAll" style="padding-left:0px;"><input name="checkActive" type="checkbox"  disabled="disabled" id="checkActive" value="1"  <?=$checkActive?> /></td>

 <td align=center class="tableBorderAll" style="padding-left:5px;">
   <a href="<?=site_url('client/editFormDIDNumber/'.$row->id_did)?>" title="Edit DID Number" >
   <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('client/deleteDIDNumber/'.$row->id_did)?>"  onclick="return confirm('Do you really want to remove this DID Number')" 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="didNumber" id="didNumber" value="<?=$didNumber?>" />
	<input type="hidden" name="IDprovider" id="IDprovider" value="<?=$IDprovider?>" />
	<input type="hidden" name="didType" id="didType" value="<?=$didType?>" />
	<input type="hidden" name="location" id="location" value="<?=$location?>" />
	<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>