

    <?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> Inernal Error List Total : <?=$total?> Showing <?=$start?> to <?=$end?>

    </td>
  </tr>


 <tr>
    <td>

 <!-- Failed Call List -->

 <table class="gbTable">

      <tr class="header">
     <td width="2%"><div align="left" style="padding-left:5px;">NR</div></td>
     <td width="8%"><div align="left" style="padding-left:5px;">Client</div></td>
     <td width="15%"><div align="left" style="padding-left:5px;">Number</div></td>
     <td width="25%"><div align="left" style="padding-left:5px;">Call Start</div></td>
     <td width="50%"><div align="left" style="padding-left:5px;">Reason</div></td>
   </tr>



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

      <?

              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->login?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;padding-top:2px;padding-bottom:2px;"><?=$row->called_number?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;padding-top:2px;padding-bottom:2px;"><?=$row->call_start?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;padding-top:2px;padding-bottom:2px;"><?=$row->description?></td>
</tr>

<?
$i++;
}

}

?>


 </table>

<!-- End failed call List -->

    </td>
  </tr>

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

    <input type="hidden" name="call_start" id="call_start" value="<?=$call_start?>" />
    <input type="hidden" name="call_end" id="call_end" value="<?=$call_end?>" />
    <input type="hidden" name="login" id="login" value="<?=$login?>" />
    <input type="hidden" name="called_number" id="called_number" value="<?=$called_number?>" />
    <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>
