OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
Xpress
/
NLEditor
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
Edit-arvind-index.php
62.34 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
NW_images
-
03/05/2025 10:50:50 AM
rwxrwxrwx
📄
aditya_index.php
45.01 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
arvind-save-template.php
3.7 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
arvinds-index.php
53.27 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
assets
-
03/14/2025 04:27:13 AM
rwxr-xr-x
📄
db_gallery.php
294 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📄
delete_image.php
646 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📄
edit_template.php
658 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📄
fetch_data.php
779 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📄
fetch_titles.php
0 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📁
images10
-
03/05/2025 10:50:22 AM
rwxr-xr-x
📁
images11
-
03/05/2025 10:50:22 AM
rwxr-xr-x
📁
images12
-
03/05/2025 10:50:22 AM
rwxr-xr-x
📁
images13
-
03/05/2025 10:50:23 AM
rwxr-xr-x
📁
images14
-
03/05/2025 10:50:24 AM
rwxr-xr-x
📁
images15
-
03/05/2025 10:50:26 AM
rwxr-xr-x
📁
images16
-
03/05/2025 10:50:26 AM
rwxr-xr-x
📁
images17
-
03/05/2025 10:50:27 AM
rwxr-xr-x
📁
images18
-
03/05/2025 10:50:28 AM
rwxr-xr-x
📁
images19
-
03/05/2025 10:50:29 AM
rwxr-xr-x
📁
images2
-
03/05/2025 10:50:30 AM
rwxr-xr-x
📁
images20
-
03/05/2025 10:50:30 AM
rwxr-xr-x
📁
images21
-
03/05/2025 10:50:31 AM
rwxr-xr-x
📁
images3
-
03/05/2025 10:50:32 AM
rwxr-xr-x
📁
images4
-
03/05/2025 10:50:33 AM
rwxr-xr-x
📁
images5
-
03/05/2025 10:50:34 AM
rwxr-xr-x
📁
images6
-
03/05/2025 10:50:35 AM
rwxr-xr-x
📁
images7
-
03/05/2025 10:50:36 AM
rwxr-xr-x
📁
images8
-
03/05/2025 10:50:37 AM
rwxr-xr-x
📁
images9
-
03/05/2025 10:50:38 AM
rwxr-xr-x
📄
index.php
45.74 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
load_template.php
2.2 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
new_index.php
46.32 KB
05/28/2025 09:01:32 AM
rw-r--r--
📁
newsletter
-
05/06/2025 10:40:42 AM
rwxrwxrwx
📄
nleditor_navbar.php
10.19 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
save-template.php
2.39 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
script.js
34.02 KB
03/05/2025 10:50:05 AM
rw-r--r--
📄
styles.css
2.43 KB
03/05/2025 10:50:05 AM
rw-r--r--
📄
template1.jpg
0 bytes
03/05/2025 10:50:05 AM
rw-r--r--
📄
test.php
1.58 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
test_index.php
47.04 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
texts.txt
1.7 KB
03/05/2025 10:50:05 AM
rw-r--r--
📄
upload.php
858 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📁
uploads
-
06/05/2025 11:47:20 AM
rwxrwxrwx
Editing: load_template.php
Close
<?php // Database connection settings include 'db_gallery.php'; // Ensure that the 'category' parameter is passed if (isset($_GET['category'])) { $category = $_GET['category']; // Prepare SQL query to fetch the template path, image path, and template name based on the category $stmt = $conn->prepare("SELECT template_name, image_path, template_path FROM newsletters WHERE category = ?"); $stmt->bind_param("s", $category); $stmt->execute(); // Get the result $stmt->store_result(); // Check if templates exist for the specified category if ($stmt->num_rows > 0) { // Bind the result to variables $stmt->bind_result($templateName, $imagePath, $templatePath); // Start building the response $response = ''; // Fetch and display all matching templates while ($stmt->fetch()) { // Check if the image path is a valid URL if (filter_var($imagePath, FILTER_VALIDATE_URL)) { // Build the HTML for each template dynamically $response .= ' <div class="template" data-template="' . htmlspecialchars($templateName, ENT_QUOTES, 'UTF-8') . '" data-template-path="' . htmlspecialchars($templatePath, ENT_QUOTES, 'UTF-8') . '" data-category="' . htmlspecialchars($category, ENT_QUOTES, 'UTF-8') . '"> <img src="' . htmlspecialchars($imagePath, ENT_QUOTES, 'UTF-8') . '" alt="' . htmlspecialchars($templateName, ENT_QUOTES, 'UTF-8') . '"> <span>' . htmlspecialchars($templateName, ENT_QUOTES, 'UTF-8') . '</span> </div> '; } else { // Error if the image path is invalid $response .= '<p>Error: Invalid image path for template ' . htmlspecialchars($templateName, ENT_QUOTES, 'UTF-8') . '</p>'; } } echo $response; } else { echo '<p>No templates found for this category.</p>'; } $stmt->close(); } else { // Return an error if the 'category' parameter is not provided echo '<p>Error: No category specified.</p>'; } // Close the database connection $conn->close();