<?php
$pgMod="inactive_staff";
$pgAct="view";
if(isset($_GET['action']) && trim($_GET['action'])!='')
		$pgAct=strtolower($_GET['action']);


if($pgAct=="active" && isset($_GET['id']) && trim($_GET['id'])!='')
{	// $idate=date("Y-m-d");
	$flgUp=$db->updateAry("staff",array("status"=>1),"where idno='".$_GET['id']."' and session='".$_SESSION["admin"]["session"]."'");
    redirect(URL_ADMIN_HOME.getQueryString(array("src"=>"Faculty", "page_id"=>$pgMod)));
}
	?>
	<div class="row-fluid"><div class="span12"><div class="top-bar">
    <h3><i class="icon-eye-open"></i> <?php echo ucwords($pgAct." ".$pgMod); ?></h3>
    <!--<button style="float:right; margin-top:5px" onclick="window.location='./?src=Student&page_id=<?php echo $pgMod; ?>&action=add'" class="btn" type="button">Add <?php echo $pgMod; ?></button>-->
    </div>
    <div class="well no-padding">
	<?php
	$aryPgAct=array("src"=>"Student","page_id"=>$pgMod,"action"=>"add");
	$aryList=$db->getRows("SELECT * FROM staff where status=3 and session='".$_SESSION["admin"]["session"]."' "); $i=0;
	if(is_array($aryList) && count($aryList)>0)
	{
		?>
        <table class="table" id="example"> 
            <thead>
                <tr>
                    <th>S.No.</th>
                    <th>Name</th>
                    <th>Father Name</th>
                    <th>Department</th>
                    <th>Designation</th>
                    <th>Mobile</th>
                    <th>Reason</th>
                    <th>Action</th>
                </tr>
            </thead>
            <tbody>
            <?php foreach($aryList as $clist){ $i++; 
            $aryPgAct["id"]=$clist['id'];
            ?>
                <tr class="grade<?php if($i%2==0)echo "C";else "U";?>">
                    <td><?php echo $i; ?></td>
                    <td><?php echo $clist["name"] ?></td>
                    <td><?php echo $clist["fname"] ?></td>
                    <td><?php echo $clist["department"] ?></td>
                    <td><?php echo $clist["experience"] ?></td>
                    <td><?php echo $clist["mobile"] ?></td>
                    <td><?php if($clist["remarks"]!="null"){ echo $clist["remarks"];} ?></td>
                    <td>
                        <button type="button" onclick="window.location='?src=Faculty&page_id=inactive_staff&action=active&id=<?php echo $clist["idno"] ?>';" class="btn btn-info" > Active</button>
                    </td>

                    <!--<td>-->
                    <!--<?php //$aryPgAct['action']="edit";$aryPgAct['page_id']=$pgMod; ?>-->
                    <!--     <a style="float:left" href="<?php echo URL_ADMIN_HOME.getQueryString($aryPgAct); ?>"><button type="button" class="btn btn-info">Edit</button></a>-->
                    <!--<?php //$aryPgAct['action']="delete"; ?>-->
                    <!--     <a href="javascript:;" onclick="del('<?php echo URL_ADMIN_HOME.getQueryString($aryPgAct); ?>')" class="confirmation"><button type="button" class="btn btn-danger">Delete</button></a>  -->
                    <!--</td>-->
                </tr>
            <?php } ?>
            </tbody>
            <tfoot>
                <tr>
                	<th></th>
                    <th colspan="3"></th>
                </tr>
            </tfoot>
        </table>
		<?php
	}
	else{
		?>
        <div class="alert alert-info">
          <a class="close" data-dismiss="alert">×</a>
          <i class="icon icon-warning-sign"></i> <b>Notice</b> Record not found </i>
        </div>
        <?php
	}
	?>
	</div></div></div>

<!-- / Forms -->