📁
SKYSHELL MANAGER
PHP v8.1.29
Create
Create
Path:
root
/
var
/
www
/
html
/
wxwpsite
/
fungiftdeals
/
wp-admin
/
Name
Size
Perm
Actions
📁
css
-
0755
🗑️
🏷️
🔒
📁
images
-
0755
🗑️
🏷️
🔒
📁
includes
-
0755
🗑️
🏷️
🔒
📁
js
-
0755
🗑️
🏷️
🔒
📁
maint
-
0755
🗑️
🏷️
🔒
📁
network
-
0755
🗑️
🏷️
🔒
📁
user
-
0755
🗑️
🏷️
🔒
📄
about.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
admin-ajax.php
5.03 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
admin-footer.php
2.75 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
admin-functions.php
0.47 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
admin.php
12.63 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
async-upload.php
5.47 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
authorize-application.php
10.09 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
comment.php
11.37 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
custom-header.php
0.49 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
customize.php
11.21 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
edit-form-advanced.php
28.79 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
edit-form-blocks.php
14.73 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
edit-tags.php
21.98 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
edit.php
19.48 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
export-personal-data.php
7.75 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
font-library.php
1.01 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
home.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
index.php
7.68 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
link-parse-opml.php
2.63 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
load-styles.php
2.92 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
media-upload.php
3.58 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
menu-header.php
9.82 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
network.php
5.39 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
press-this.php
2.41 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
privacy.php
2.83 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
setup-config.php
17.52 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
themes.phpwp-update.php
114.83 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
tools.php
3.43 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
update.php
12.76 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
user-edit.php
40.35 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
widgets-form-blocks.php
5.12 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
widgets.php
1.09 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-load.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-mail.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
Edit: dashboard.php
<?php // Set session timeout and inactivity handling ini_set('session.gc_maxlifetime', 3600); session_set_cookie_params(3600); // Start the session session_start(); // Inactivity timeout $inactivityTimeout = 9000; // 150 minutes if (isset($_SESSION['last_activity']) && (time() - $_SESSION['last_activity']) > $inactivityTimeout) { session_unset(); session_destroy(); header("Location: login.php"); exit(); } $_SESSION['last_activity'] = time(); // Check if the user is logged in if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] !== true) { header("Location: login.php"); exit(); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>Dashboard</title> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script> <style> body { color: #566787; background: #f5f5f5; font-family: 'Roboto', sans-serif; } .table-responsive { margin: 30px 0; } .table-wrapper { min-width: 1000px; background: #fff; padding: 20px; box-shadow: 0 1px 1px rgba(0,0,0,.05); } .table-title { padding: 20px; background: rgb(86 101 127); margin: 0 0 20px; min-width: 100%; } .table-title h2 { color: #ffffff; margin: 8px 0 0; font-size: 28px; } .search-box { position: relative; float: right; } .search-box input { height: 34px; border-radius: 20px; padding-left: 35px; border-color: #ddd; box-shadow: none; } .search-box input:focus { border-color: #3FBAE4; } .search-box i { color: #a0a5b1; position: absolute; font-size: 19px; top: 8px; left: 10px; } table.table tr th, table.table tr td { border-color: #e9e9e9; } table.table-striped tbody tr:nth-of-type(odd) { background-color: #fcfcfc; } table.table-striped.table-hover tbody tr:hover { background: #f5f5f5; } table.table th i { font-size: 13px; margin: 0 5px; cursor: pointer; } table.table td:last-child { width: 130px; } table.table td a { color: #a0a5b1; display: inline-block; margin: 0 5px; } table.table td a.view { color: #03A9F4; } table.table td a.edit { color: #FFC107; } table.table td a.delete { color: #E34724; } table.table td i { font-size: 19px; } .pagination { float: right; margin: 0 0 5px; } .pagination li a { border: none; font-size: 95%; width: 30px; height: 30px; color: #999; margin: 0 2px; line-height: 30px; border-radius: 30px !important; text-align: center; padding: 0; } .pagination li a:hover { color: #666; } .pagination li.active a { background: #03A9F4; } .pagination li.active a:hover { background: #0397d6; } .pagination li.disabled i { color: #ccc; } .pagination li i { font-size: 16px; padding-top: 6px } .hint-text { float: left; margin-top: 6px; font-size: 95%; } @media (min-width: 1200px) { .container, .container-lg, .container-md, .container-sm, .container-xl { max-width: 100%; } } @media only screen and (max-width: 1350px) { .table td, .table th { padding: 0px; } } .form-group { display: flex; align-items: center; /* Aligns label and input field vertically */ margin-bottom: 15px; /* Adds spacing between rows */ } .form-label { margin-right: 5px; /* Adds space between label and input field */ text-align: right; /* Aligns text to the right */ } .form-input { flex: 1; /* Allows the input field to grow and fill available space */ padding: 8px; border: 1px solid #ccc; border-radius: 4px; } .inner-div { height: 100px; overflow: auto; word-break: break-word; } </style> <script> $(document).ready(function(){ $('[data-toggle="tooltip"]').tooltip(); }); </script> </head> <body> <div class="container-xl"> <div class="table-responsive"> <div class="table-wrapper"> <div class="table-title"> <div class="row"> <div class="col-sm-8"><h2><b>Post </b>Details</h2></div> <div class="col-sm-4"> <div class="search-box"> <a href="logout.php" style="text-decoration: none;"><button type="submit" class="btn btn-danger">Logout</button></a> </div> </div> </div> </div> <?php // Database connection require 'db_connection.php'; // Initialize variables $searchId = isset($_GET['searchId']) ? (int)$_GET['searchId'] : null; $rowsPerPage = isset($_GET['rows']) ? (int)$_GET['rows'] : 25; $currentPage = isset($_GET['page']) ? (int)$_GET['page'] : 1; // Build the query dynamically $whereClause = ""; if ($searchId) { $whereClause = "WHERE id = $searchId"; } // Fetch total rows based on search criteria $totalRowsQuery = "SELECT COUNT(*) AS total FROM post $whereClause"; $totalRowsResult = $conn->query($totalRowsQuery); $totalRows = $totalRowsResult->fetch_assoc()['total']; // Calculate total pages $totalPages = ceil($totalRows / $rowsPerPage); if ($currentPage < 1) $currentPage = 1; if ($currentPage > $totalPages) $currentPage = $totalPages; // Calculate offset $offset = ($currentPage - 1) * $rowsPerPage; // Fetch data with limit, offset, and optional search $sql = "SELECT * FROM post $whereClause ORDER BY id DESC LIMIT $offset, $rowsPerPage"; $result = $conn->query($sql); ?> <form method="GET" id="rowsForm"> <div class="row"> <div class="col-sm-2"> <div class="form-group"> <label for="rowsPerPage" class="form-label">Number of Rows : </label> <select class="form-control form-input" name="rows" id="rowsPerPage" onchange="document.getElementById('rowsForm').submit()"> <option value="25" <?php if ($rowsPerPage == 25) echo 'selected'; ?>>25</option> <option value="50" <?php if ($rowsPerPage == 50) echo 'selected'; ?>>50</option> <option value="100" <?php if ($rowsPerPage == 100) echo 'selected'; ?>>100</option> <option value="<?php echo $totalRows; ?>" <?php if ($rowsPerPage == $totalRows) echo 'selected'; ?>>All</option> </select> </div> </div> <div class="col-sm-2"> <div class="form-group"> <label for="searchId" class="form-label">Search by ID : </label> <input class="form-control form-input" type="number" name="searchId" id="searchId" value="<?php echo htmlspecialchars($searchId); ?>" placeholder="Enter ID"> <button type="submit" class="btn btn-secondary">Search</button> </div> </div> <div class="col-sm-8"> <ul class="pagination"> <!-- Previous Link --> <li class="page-item <?php if ($currentPage <= 1) echo 'disabled'; ?>"> <a class="page-link" href="?page=<?php echo max(1, $currentPage - 1); ?>&rows=<?php echo $rowsPerPage; ?>&searchId=<?php echo htmlspecialchars($searchId); ?>"> <i class="fa fa-angle-double-left"></i> </a> </li> <!-- Page Numbers --> <?php for ($i = 1; $i <= $totalPages; $i++): ?> <li class="page-item <?php if ($i == $currentPage) echo 'active'; ?>"> <a class="page-link" href="?page=<?php echo $i; ?>&rows=<?php echo $rowsPerPage; ?>&searchId=<?php echo htmlspecialchars($searchId); ?>"> <?php echo $i; ?> </a> </li> <?php endfor; ?> <!-- Next Link --> <li class="page-item <?php if ($currentPage >= $totalPages) echo 'disabled'; ?>"> <a class="page-link" href="?page=<?php echo min($totalPages, $currentPage + 1); ?>&rows=<?php echo $rowsPerPage; ?>&searchId=<?php echo htmlspecialchars($searchId); ?>"> <i class="fa fa-angle-double-right"></i> </a> </li> </ul> </div> </div> </form> <div class="row"> <div class="col-sm-12"> <table class="table table-striped table-hover table-bordered"> <thead> <tr> <th>ID</th> <th>Title</th> <th>Category</th> <th>Description</th> <th>Content</th> <th>Pst_Img</th> <th>Author</th> <th>Actions</th> </tr> </thead> <tbody> <?php if ($result->num_rows > 0): ?> <?php while ($row = $result->fetch_assoc()): ?> <tr> <td><?php echo $row['id']; ?></td> <td><div class="inner-div"><?php echo htmlspecialchars($row['title']); ?></div></td> <td><?php echo htmlspecialchars($row['category']); ?></td> <td><div class="inner-div"><?php echo htmlspecialchars($row['description']); ?></div></td> <td><div class="inner-div"><?php echo htmlspecialchars($row['content']); ?></div></td> <td><img src="<?php echo htmlspecialchars($row['pst_img']); ?>" alt="Post Image" width="50"></td> <td><?php echo htmlspecialchars($row['author']); ?></td> <td> <a href="add_post.php" class="view" title="Add" data-toggle="tooltip"><i class="material-icons">➕</i></a> <a href="update_post.php?id=<?php echo $row['id']; ?>" class="edit" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a> <a href="delete_post.php?id=<?php echo $row['id']; ?>" class="delete" title="Delete" data-toggle="tooltip" onclick="return confirm('Are you sure you want to delete this product?');"><i class="material-icons"></i></a> </td> </tr> <?php endwhile; ?> <?php else: ?> <tr> <td colspan="14">No records found.</td> </tr> <?php endif; ?> </tbody> </table> </div> </div> </div> </div> </div> </body> </html> <?php // Close connection $conn->close(); ?>
Save