File: /home/durgeshpandey215/public_html/zeeroprice.skilladders.com/admin/Exec.php
<?php
require('../application_top.php');
require('protect-admin.php');
$pagename= "manageexecutives";
require "header.php";
?>
<a href="<?=HTTP_SERVER;?>admin/ExecCreate.php" class="w3-btn w3-light-blue">
+ Create New Executive</a>
<?
if($_SESSION['admintype']!=1){ //if not superadmin
$db->where('byadminid',$_SESSION['adminid']);
}
$db->where('istatus',0,'>=');
$db->where('admintype',3);
$db->orderBy('adminid','desc');
//---------------Paginate BOF---------------------------------------
$paginatetable = 'adminlogin'; //table name
$extra ="key="; //use '&' in between if more than 1 parameter
$adjacents = 2;
$limit = 20; //how many items to show per page
$db->pageLimit = $limit;
$targetpage = $_SERVER['PHP_SELF']; //your file name (the name of this file)
require "../paginate.php";
//------------------------------------------------------------------
if($total_rows){
?>
<h1>Executives (<?=$total_rows;?>)</h1>
<div class="w3-row ">
<?
foreach($rows as $row){
?>
<div class="w3-col m6 w3-padding">
<table class="w3-table w3-card">
<tr>
<td width="80">
<img src="<?=HTTP_SERVER;?>images/users/<?=($row['pic1'])? $row['pic1']:"default.jpg";?>" class="dp"/>
</td>
<td align="center">
<?=$row['username'];?> <?=$row['emailid'];?><br/>
<?=$row['commission'];?>%
<div style="text-align:right;display:block;">
<a href="<?=HTTP_SERVER;?>admin/handle.php?action=execSt&id=<?=encode($row['adminid']);?>&newstatus=<?=($row['istatus'])? 0 : 1;?>" title="Click to <?=($row['istatus'])? "Deactivte" : "Activate";?> "><img src="<?=HTTP_SERVER;?>/images/icons/<?=($row['istatus'])? "istatus-on" : "istatus-off";?>.png" class="icons" border="0"/></a>
<a href="<?=HTTP_SERVER;?>admin/ExecEdit.php?id=<?=encode($row['adminid']);?>" class="ico edit"><img src="<?=HTTP_SERVER;?>images/icons/edit.png" border="0" class="icons"/></a>
<a href="<?=HTTP_SERVER;?>admin/handle.php?action=delExec&id=<?=encode($row['adminid']);?>&" title="Click to Delete" onclick="return confirm('Are you sure you want to delete')" class="ico del"><img src="<?=HTTP_SERVER;?>images/icons/delete.png" class="icons" border="0"/></a>
</div>
</td>
</tr>
</table>
</div>
<?}?>
</div>
<center><?=$pagination;?></center>
<?}else{ ?>
<div class="w3-card w3-padding" style="vertical-align:middle;height:400px;">
You have not created any Users yet
<br/>
<br/>
</div>
<?}?>
<br/><br/>
<? require "../footer.php";?>