Viewing file: user_list_pagi.php (7.45 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?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> »</span> <?=TITLE071?> 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="9%"><div align="left" style="padding-left:5px;">Login</div></td> <td width="15%"><div align="left" style="padding-left:5px;">Full Name</div></td> <td width="12%"><div align="left" style="padding-left:5px;">Dept</div></td> <td width="5%"><div align="center" style="padding-left:5px;">Res</div></td> <td width="5%"><div align="center" style="padding-left:5px;">SIP</div></td> <td width="5%"><div align="center" style="padding-left:5px;">IVR</div></td> <td width="5%"><div align="center" style="padding-left:5px;">GW</div></td> <td width="5%"><div align="center" style="padding-left:5px;">Lots</div></td> <td width="5%"><div align="center" style="padding-left:5px;">Route</div></td> <td width="5%"><div align="center" style="padding-left:5px;">Tariff</div></td> <td width="5%"><div align="center" style="padding-left:5px;">DID</div></td> <td width="5%"><div align="center" style="padding-left:5px;">User</div></td> <td width="5%"><div align="center" style="padding-left:5px;">Report</div></td> <td width="5%"><div align="center" style="padding-left:5px;">Status</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; //$userList = 0; if(is_array($userList)) { foreach($userList as $row) { $passid =$row->id;
if($row->reseller_section == 2) $resellerCURD = "checked='checked'"; else $resellerCURD = "";
if($row->wholesale_section == 2) $wholeSaleCURD = "checked='checked'"; else $wholeSaleCURD = "";
if($row->sip_section == 2) $sipCURD = "checked='checked'"; else $sipCURD = "";
if($row->ani_section == 2) $aniCURD = "checked='checked'"; else $aniCURD = "";
if($row->did_section == 2) $didCURD = "checked='checked'"; else $didCURD = "";
if($row->lots_section == 2) $lotsCURD = "checked='checked'"; else $lotsCURD = "";
if($row->rate_section == 2) $rateCURD = "checked='checked'"; else $rateCURD = "";
if($row->dialplan_section == 2) $dialPlanCURD = "checked='checked'"; else $dialPlanCURD = "";
if($row->user_section == 2) $userCURD = "checked='checked'"; else $userCURD = "";
if($row->report_section == 2) $reportCURD = "checked='checked'"; else $reportCURD = "";
if($row->status == 1) $status = "checked='checked'"; else $status = "";
?>
<?
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('user/editForm/'.$row->id)?>" title="Edit Info" ><?=$row->login?></a></td> <td align=left class="tableBorderAll" style="padding-left:5px;"><?=$row->full_name?></td> <td align=left class="tableBorderAll" style="padding-left:5px;"><?=$row->dept?></td> <td align=center class="tableBorderAll" style="padding-left:0px;"><input name="checkActive" type="checkbox" disabled="disabled" id="checkActive" value="0" <?=$resellerCURD?> /></td> <td align=center class="tableBorderAll" style="padding-left:0px;"><input name="checkActive" type="checkbox" disabled="disabled" id="checkActive" value="0" <?=$sipCURD?> /></td> <td align=center class="tableBorderAll" style="padding-left:0px;"><input name="checkActive" type="checkbox" disabled="disabled" id="checkActive" value="0" <?=$aniCURD?> /></td> <td align=center class="tableBorderAll" style="padding-left:0px;"><input name="checkActive" type="checkbox" disabled="disabled" id="checkActive" value="0" <?=$wholeSaleCURD?> /></td> <td align=center class="tableBorderAll" style="padding-left:0px;"><input name="checkActive" type="checkbox" disabled="disabled" id="checkActive" value="0" <?=$lotsCURD?> /></td> <td align=center class="tableBorderAll" style="padding-left:0px;"><input name="checkActive" type="checkbox" disabled="disabled" id="checkActive" value="0" <?=$dialPlanCURD?> /></td> <td align=center class="tableBorderAll" style="padding-left:0px;"><input name="checkActive" type="checkbox" disabled="disabled" id="checkActive" value="0" <?=$rateCURD?> /></td> <td align=center class="tableBorderAll" style="padding-left:0px;"><input name="checkActive" type="checkbox" disabled="disabled" id="checkActive" value="0" <?=$didCURD?> /></td> <td align=center class="tableBorderAll" style="padding-left:0px;"><input name="checkActive" type="checkbox" disabled="disabled" id="checkActive" value="0" <?=$userCURD?> /></td> <td align=center class="tableBorderAll" style="padding-left:0px;"><input name="checkActive" type="checkbox" disabled="disabled" id="checkActive" value="0" <?=$reportCURD?> /></td> <td align=center class="tableBorderAll" style="padding-left:0px;"><input name="checkActive" type="checkbox" disabled="disabled" id="checkActive" value="0" <?=$status?> /></td>
<td align=center class="tableBorderAll" style="padding-left:0px;"> <a href="<?=site_url('user/editForm/'.$row->id)?>" title="Edit User" > <img src="<?=base_url()?>images/contact_blue_edit.png" border="0" height="16"> </a> </td>
<td align=center style="padding-left:0px;"> <a href="<?=site_url('user/deleteUser/'.$row->id)?>" onclick="return confirm('Do you really want to remove this Administrator')" 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="login" id="login" value="<?=$login?>" /> <input type="hidden" name="fullName" id="fullName" value="<?=$fullName?>" /> <input type="hidden" name="dept" id="dept" value="<?=$dept?>" /> <input type="hidden" name="phone" id="phone" value="<?=$phone?>" /> <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>
|