OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
Xpress_backup
/
NLEditor
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/19/2025 10:07:19 AM
rwxrwxrwx
📄
24-02-25index.php
42.37 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
28index.php
55.04 KB
05/19/2025 10:07:19 AM
rw-r--r--
📁
NW_images
-
02/24/2025 11:21:37 AM
rwxrwxrwx
📄
aditya_index.php
39.95 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
aditya_load_template.php
2.39 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
aditya_save-template.php
2.44 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
aditya_upload.php
851 bytes
05/19/2025 10:07:19 AM
rw-r--r--
📄
back_index.php
28.33 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
backup_index.php
25.17 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
db_gallery.php
294 bytes
05/19/2025 10:07:19 AM
rw-r--r--
📄
edit_template.php
658 bytes
05/19/2025 10:07:19 AM
rw-r--r--
📄
fetch_data.php
779 bytes
05/19/2025 10:07:19 AM
rw-r--r--
📄
fetch_titles.php
0 bytes
05/19/2025 10:07:19 AM
rw-r--r--
📄
himanshu_test_index.php
51.33 KB
05/19/2025 10:07:19 AM
rw-r--r--
📁
images10
-
02/24/2025 11:21:26 AM
rwxr-xr-x
📁
images11
-
02/24/2025 11:21:26 AM
rwxr-xr-x
📁
images12
-
02/24/2025 11:21:26 AM
rwxr-xr-x
📁
images13
-
02/24/2025 11:21:26 AM
rwxr-xr-x
📁
images14
-
02/24/2025 11:21:27 AM
rwxr-xr-x
📁
images15
-
02/24/2025 11:21:28 AM
rwxr-xr-x
📁
images16
-
02/24/2025 11:21:28 AM
rwxr-xr-x
📁
images17
-
02/24/2025 11:21:28 AM
rwxr-xr-x
📁
images18
-
02/24/2025 11:21:29 AM
rwxr-xr-x
📁
images19
-
02/24/2025 11:21:29 AM
rwxr-xr-x
📁
images2
-
02/24/2025 11:21:30 AM
rwxr-xr-x
📁
images20
-
02/24/2025 11:21:31 AM
rwxr-xr-x
📁
images21
-
02/24/2025 11:21:31 AM
rwxr-xr-x
📁
images3
-
02/24/2025 11:21:31 AM
rwxr-xr-x
📁
images4
-
02/24/2025 11:21:32 AM
rwxr-xr-x
📁
images5
-
02/24/2025 11:21:33 AM
rwxr-xr-x
📁
images6
-
02/24/2025 11:21:33 AM
rwxr-xr-x
📁
images7
-
02/24/2025 11:21:34 AM
rwxr-xr-x
📁
images8
-
02/24/2025 11:21:34 AM
rwxr-xr-x
📁
images9
-
02/24/2025 11:21:35 AM
rwxr-xr-x
📄
index.php
58.95 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
load_template.php
2.2 KB
05/19/2025 10:07:19 AM
rw-r--r--
📁
newsletter
-
03/01/2025 07:50:05 AM
rwxrwxrwx
📄
newsletter.png
194.94 KB
02/24/2025 11:21:26 AM
rw-r--r--
📄
nleditor_navbar.php
22.6 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
save-template.php
2.39 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
script.js
34.02 KB
02/24/2025 11:21:26 AM
rw-r--r--
📄
styles.css
2.43 KB
02/24/2025 11:21:26 AM
rw-r--r--
📄
template1.jpg
0 bytes
02/24/2025 11:21:26 AM
rw-r--r--
📄
test.html
5.84 KB
02/24/2025 11:21:26 AM
rw-r--r--
📄
test.php
1.58 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
test_index.php
46.98 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
texts.txt
1.7 KB
02/24/2025 11:21:26 AM
rw-r--r--
📄
upload.php
858 bytes
05/19/2025 10:07:19 AM
rw-r--r--
📁
uploads
-
03/05/2025 11:35:09 AM
rwxrwxrwx
Editing: aditya_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); // Binding the category parameter $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>'; } } // Send the response back to the frontend echo $response; } else { // Return an error if no templates are found for the given category echo '<p>No templates found for this category.</p>'; } // Close the prepared statement $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();