OverLord Shell

Path : G:/PleskVhosts/jaincensus.com/macciaweb.ultraliant.com/businessforum/
File Upload :
Current File : G:/PleskVhosts/jaincensus.com/macciaweb.ultraliant.com/businessforum/user.php

<?php session_start();
if(!isset($_SESSION['company_id']) || !isset($_SESSION['company_name'])){session_destroy();header("location:login.php");}
if(!in_array(1,$_SESSION['role'])){header("location:404.php");}
require_once("../db/conn.php");
$pagename=substr(basename($_SERVER['PHP_SELF']),0,-4);
$webpagetitle="Users";
include("header.php");
?>
          
            <a href="<?php echo $pagename?>add.php" class="btn btn-primary pull-right">Add New<i class="fa fa-plus mlm"></i></a>
          
            <div class="clearfix"></div>
        </div>
        <!--BEGIN CONTENT-->
        <div class="page-content">
            <div class="row">
                <div class="col-md-12">
                    <div class="panel">
                        <div class="panel-body">
							<?php if(!empty($_GET['msg']) && strpos($_GET['msg'],'success')!=FALSE){?>
                            <div class="note note-success note-dismissable">
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                                <?php if($_GET['msg']=='add_success'){?>Added Successfully!!!<?php }?>
                                <?php if($_GET['msg']=='update_success'){?>Updated Successfully!!!<?php }?>
                                <?php if($_GET['msg']=='reset_success'){?>Password Reset Successfully!!!<?php }?>
                            </div>
                            <?php }?>
                            <div class="table-responsive">
                                <table class="table table-striped table-hover" id="dataTables-listing">
                                    <thead>
                                        <tr>
                                            <th>Name</th>
                                            <th>Email</th>
            								
                                            <th class="text-center">Edit</th>
                                            <th class="text-center">Enable / Disable</th>
                                            <th class="text-center">Reset Password</th>
                                          
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php
                                        $listq="SELECT * FROM busdir_mst_users WHERE usersrno!=1 AND usersrno!=".$_SESSION['company_id'];//current logged in user won't be showed
                                        $listr=$connection->query($listq);
                                        while($listrow=$listr->fetch_assoc()){
                                        ?>
                                        <tr>
                                            <td><?php echo $listrow['name']?></td>
                                            <td><?php echo $listrow['email']?></td>
            							
                                            <td class="text-center"><form><button type="submit" name="id" value="<?php echo $listrow['usersrno']?>" formaction="<?php echo $pagename?>edit.php" class="btn btn-primary btn-sm">Edit<i class="fa fa-pencil mlm"></i></button></form></td>
                                            <td class="text-center"><button type="button" value="<?php echo $listrow['usersrno']?>" class="btn btn-sm btn-<?php if($listrow['active']!='n')echo "danger";else echo "success"?> delbtn"><?php if($listrow['active']=='n')echo 'Enable<i class="fa fa-check mlm"></i>';else echo 'Disable<i class="fa fa-close mlm"></i>'?></button></td>
                                            <td class="text-center"><form><button type="submit" name="id" value="<?php echo $listrow['usersrno']?>" formaction="resetpass.php" class="btn btn-warning btn-sm">Reset<i class="fa fa-refresh mlm"></i></button></form></td>
                                            
                                        </tr>
                                        <?php
                                        }$listr->free();
                                        ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--END CONTENT-->
<link type="text/css" rel="stylesheet" href="css/dataTables/dataTables.bootstrap.min.css">
<script src="js/dataTables/jquery.dataTables.min.js"></script>
<script src="js/dataTables/dataTables.bootstrap.min.js"></script>
<script src="js/validate.js"></script>
<script>
$('#dataTables-listing').dataTable();
if($('#msg').html()!==''){
	setTimeout(function(){$('#msg').hide();},5000);
	if(location.search.substring(1).length){if(history!==undefined && history.replaceState!==undefined){history.replaceState({}, document.title, location.pathname+'<?php if(isset($_GET['id']))echo "?id=".$_GET['id']?>');}}
}
</script>
<?php $connection->close();include("footer.php")?>

xRyukZ - Copyright 2k19