Server IP : 103.53.40.154 / Your IP : 3.135.184.195 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/ppcad7no/dalitsoconsulting.com/../cablecubby.in/../digitala2z.com/down-hrms/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include("hr-header.php");?> <div class="container-fluid" style="margin-top:30px;"> <div class="row"> <div class="col-sm-12"> <div class="col-sm-3" style="padding-left:0;"> <?php include("hr-left-menu.php");?> </div> <?php if($_REQUEST['action']=='delete'){ $delid=$_REQUEST['deleteID']; $delCandidate = "delete from tbl_admin where admin_id='$delid'"; db_query($delCandidate); header("location:manage-user.php"); exit; } if($_REQUEST['action']=='changeStatus'){ $stid=$_REQUEST['statusID']; $crSt=$_REQUEST['CurrStatus']; $chngSts = "update tbl_admin set admin_status='$crSt' where admin_id='$stid'"; db_query($chngSts); header("location:manage-user.php"); exit; } ?> <?php $limit = 10; if (isset($_GET['page'])) { $page = $_GET['page']; } else { $page=1; } $start_from = ($page-1) * $limit; /************FOR SEARCH RESULT START*************/ if(isset($_POST['search'])){ $candidateinfo=trim($_POST['candidate']); $con = " AND (admin_name LIKE '%$candidateinfo%' OR admin_mobile LIKE '%$candidateinfo%' OR admin_userid='$candidateinfo')"; $srch=1; } /************FOR SEARCH RESULT END*************/ $sql = "SELECT * FROM tbl_admin WHERE 1 AND admin_user_type!='Admin' $con ORDER BY admin_status ASC LIMIT $start_from,$limit"; $rs_result = mysqli_query($GLOBALS['dbcon'], $sql); ?> <div class="col-sm-9" id="ctID"> <h3 class="page-header text-primary" style="margin-top:0;">Manage User</h3> <?php if($srch==1){ ?> <small class="pull-right"><a href="manage-user.php"><strong>View All</strong></a></small> <? } ?> <form name="search1" action="" method="POST" onsubmit="return searchValid();"> <div class="row" id="faq-result"> <div class="col-xs-12 col-sm-8 col-sm-offset-2"> <div class="input-group"> <input type="text" value="<?php print $_POST['candidate']?>" name="candidate" class="form-control"> <div class="input-group-btn"> <button type="submit" name="search" class="btn btn-default"><span class="glyphicon glyphicon-search"></span> Search</button> </div> </div> </div> </div> </form> <div class="row" style="margin-top:35px;"> <div class="col-sm-12 col-md-12"> <div class="col-sm-12 col-md-12 col-xs-12"> <table class="table table-bordered table-striped"> <thead> <tr class="masthead"> <th>User Id</th> <th>Password</th> <th>Name</th> <th>Mobile</th> <th>Action</th> </tr> </thead> <tbody> <?php if(mysqli_num_rows($rs_result)>0){ while ($rows = mysqli_fetch_assoc($rs_result)) { ?> <tr <?php if($rows['admin_status']=='Inactive'){ ?>class="alert-danger"<? } ?>> <td><?=$rows['admin_userid']?></td> <td><?=$rows['admin_password']?></td> <td><?=$rows['admin_name']?></td> <td><?=$rows['admin_mobile']?></td> <td><a href="add-user.php?userID=<?=$rows['admin_id']?>"><span class="glyphicon glyphicon-edit text-info" title="View/Edit User Information"></span></a> <a href="manage-user.php?action=delete&deleteID=<?=$rows['admin_id']?>" onClick="javascript:return confirm('Do you really want to delete this record?');"><span class="glyphicon glyphicon-trash text-danger" style="margin-left:7px;" title="Delete User"></span></a> <?php if($rows['admin_status']=='Inactive'){ ?> <a href="manage-user.php?action=changeStatus&statusID=<?=$rows['admin_id']?>&CurrStatus=Active" onClick="javascript:return confirm('Change status from Inactive to Active?');"><span class="glyphicon glyphicon-thumbs-down text-danger" style="margin-left:7px;" title="Change User Status"></span></a> <? }else{ ?> <a href="manage-user.php?action=changeStatus&statusID=<?=$rows['admin_id']?>&CurrStatus=Inactive" onClick="javascript:return confirm('Change status from Active to Inactive?');"><span class="glyphicon glyphicon-thumbs-up text-success" style="margin-left:7px;" title="Change User Status"></span></a> <? } ?></td> </tr> <? }} ?> </tbody> </table> </div> </div> </div> <div class="row"> <div class="col-sm-12 col-md-12"> <?php $sqlPage = "SELECT * FROM tbl_admin WHERE 1 AND admin_user_type!='Admin' $con ORDER BY admin_id DESC"; $page_result = mysqli_query($GLOBALS['dbcon'], $sqlPage); $total_records = mysqli_num_rows($page_result); $total_pages = ceil($total_records / $limit); if($total_pages>1){ $pagLink = "<ul class='pagination'>"; for ($i=1; $i<=$total_pages; $i++) { if($_REQUEST['page']==$i){ $class = 'active'; }else{ $class = ''; } $pagLink .= "<li class='$class'><a href='manage-user.php?page=".$i."'>".$i."</a></li>"; }; echo $pagLink . "</ul>"; } ?> </div> </div> </div> </div> </div> </div> <script> function searchValid(){ if(document.search1.candidate.value==''){ alert('Enter User Name/User-Id/Mobile No To Search !'); document.search1.candidate.focus(); return false; } return true; } </script> <?php include("hr-footer.php");?>