LittleDemon WebShell


Linux premium274.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Path : /home/whagcoha/ledger.mwagalwaservices.com/
File Upload :
Command :
Current File : /home/whagcoha/ledger.mwagalwaservices.com/userview.php

<?php
if ((!isset($_SESSION['gen256']))  ) {
  echo "<script>
        window.open('login.php','_self');
    </script>";  
}

?>
<?php 
if ($_SESSION['gen256']['role']=='0') {

    $output='';

    $output .= " <div class='alert alert-warning' role='alert'>
  Oopps!!<b>You are not allowed to access this page contact the System Admin</b> <a href='index.php?p=activity&page=1'>Click to view Activities</a>
</div>";
    // code...
    echo $output;
}else{

?>



<style>
.pagination {
  display: inline-block;
}

.pagination a {
  color: black;
  float: left;
  padding: 8px 16px;
  text-decoration: none;
  transition: background-color .3s;
  border: 1px solid #ddd;
  margin: 0 4px;
}

.pagination a.active {
  background-color: #4CAF50;
  color: white;
  border: 1px solid #4CAF50;
}

.pagination a:hover:not(.active) {background-color: #ddd;}
</style>


<div class="row">
    <!-- <div class="panel panel-default"> -->
    <div class="panel-heading">
                <b>Sites</b> :
                <b style="text-align: right;">Page: <?echo $_GET['page'];?></b>
            </div>
       <table class='table table-striped table-hover'>
            <thead>
               <tr>
                      <!--   <th>Students ID</th> -->

                   
                        <th><a href = "#">Name <i class=""></i></a></th>
                        <th>Tel</th>
                        <th><a href = "#">Email <i class=""></i></a></th>
                         <th><a href = "#">Gender <i class=""></i> </a></th>
                        

                       <!--   <th>Start Date</th>
                         <th>Status</th> -->


                         <!-- <th>Class</th>
                         <th>Term</th>
                         <th>Year</th> -->
                        <!-- <th>Course</th> -->
                         </tr>
                </thead>
                <?php


                //define total number of results you want per page  
    $results_per_page = 10;  
    // $campids=$_SESSION['refu256']['campid'];
  
    //find the total number of results stored in the database  
    $query = "SELECT *,CONCAT(fname, '  ', oname) AS name FROM users ORDER BY id DESC";  
    // ,refugees.id AS did
    $result = mysqli_query($conn, $query);  
    $number_of_result = mysqli_num_rows($result);  
  
    //determine the total number of pages available  
    $number_of_page = ceil ($number_of_result / $results_per_page);  

      //determine which page number visitor is currently on  
    if (!isset ($_GET['page']) ) {  
        $page = 1;  
    } else {  
        $page = $_GET['page']; 
        $pagex = $_GET['page']; 

    }  
  
    //determine the sql LIMIT starting number for the results on the displaying page  
    $page_first_result = ($page-1) * $results_per_page;  
               


                $query="SELECT *,CONCAT(fname, '  ', oname) AS name FROM users ORDER BY id DESC LIMIT " . $page_first_result . ',' . $results_per_page; 
                $result = mysqli_query($conn,$query);
                $count = 1;
                while($row = mysqli_fetch_assoc($result) ){
                    
                    $name = $row['name'];
                    // $house = $row['name'];
                    $tel = $row['tel'];
                    $email = $row['email'];
                    $gender = $row['gender'];
                    
                    $userid= $row['id'];
                 
                    ?>
                
                        <td><?php echo $name; ?></td>
                        <td><?php echo $tel; ?></td>
                        <td><?php echo $email; ?></td>
                        <td><?php echo $gender; ?></td>
                        
                        
                      <!--   <td><a href="index.php?p=editsite&bid=<?php //echo $did; ?>"> Edit</a></td> -->
                      
                      
                         </tr>
                     <?php
                    $count ++;
                }



            ?>  

            


            </table>

            <ul class="pagination">
                &nbsp; <li class="page-item">
      <a class="page-link" href="index.php?p=userview&page=<?php if($page <= 1){ echo '1#'; }else { echo ($page-1);}?>" aria-label="Previous">
        <span aria-hidden="true">&laquo;</span>
        <span class="sr-only">Previous</span>
      </a>
    </li>
                <li class="page-item">

            <?php
               //display the link of the pages in URL  
    for($page = 1; $page<= $number_of_page; $page++) {  
        echo '<a href = "index.php?p=userview&page=' . $page . '">' . $page . ' </a>';



          
    }

?> 


</li> &nbsp;</li> 

 <li class="page-item">
      <a class="page-link" href="index.php?p=userview&page=<?php if($pagex >= $number_of_page){ echo $number_of_page;}else { echo ($pagex+1);}?>" aria-label="Next">
        <span aria-hidden="true">&raquo;</span>
        <span class="sr-only">Next</span>
      </a>
    </li> </ul><br> <form method="post" action="excel.php"><br>
    <!-- <button name='export_excel' class="btn btn-success">Print List</button> -->
    </form>
        </div>
      






<?php 
}?>

LittleDemon - FACEBOOK
[ KELUAR ]