OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
3-31-025chanakya
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/09/2025 11:18:49 AM
rwxr-xr-x
📄
.htaccess
860 bytes
03/26/2025 03:47:46 AM
rw-r--r--
📁
.vscode
-
03/26/2025 03:47:57 AM
rwxr-xr-x
📁
CreateLeadPage
-
03/26/2025 04:16:47 AM
rwxr-xr-x
📄
ImageMagick-7.1.1-45-Q16-HDRI-x64-dll.exe
22.2 MB
03/26/2025 03:47:54 AM
rw-r--r--
📁
Xpress
-
03/26/2025 04:21:24 AM
rwxr-xr-x
📄
XpressPage.php
47.13 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
about.html
3.26 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
account.php
47.77 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
activate.php
2.19 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
add_channel.php
9.7 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
add_to_channel.php
980 bytes
03/26/2025 03:47:46 AM
rw-r--r--
📁
admin
-
03/26/2025 04:16:40 AM
rwxr-xr-x
📄
analytics.php
37.71 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
assets
-
03/26/2025 04:16:41 AM
rwxr-xr-x
📁
audio
-
03/26/2025 03:48:03 AM
rwxr-xr-x
📄
businessLp.php
46.33 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
bussLp.php
57.87 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
card-news.php
6.2 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
channel.php
36.21 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
chattest.php
8.66 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
clients
-
03/26/2025 03:48:03 AM
rwxr-xr-x
📄
collections.php
94.62 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
comments.php
1.67 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
composer.json
65 bytes
03/26/2025 03:47:46 AM
rw-r--r--
📄
composer.lock
4.03 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
contact.html
3.01 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
cookie.php
750 bytes
03/26/2025 03:47:46 AM
rw-r--r--
📄
copytest.html
4.04 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
creamAdmin
-
03/26/2025 04:07:42 AM
rwxr-xr-x
📄
cream_dashboard.php
25.87 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
creamapi
-
03/26/2025 03:48:04 AM
rwxr-xr-x
📄
create.php
42.93 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
created_magazine.html
11.96 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
dashboard.php
55.52 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
data
-
03/26/2025 04:16:48 AM
rwxr-xr-x
📄
down.html
829 bytes
03/26/2025 03:47:46 AM
rw-r--r--
📁
education-podcasts
-
03/31/2025 06:36:42 AM
rwxr-xr-x
📁
featured_channels
-
03/26/2025 03:48:04 AM
rwxr-xr-x
📄
featured_channels.php
32.48 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
featured_topics.php
26.59 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
fetch_articles.php
1.83 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
fetch_liked_users.php
1.55 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
filter.php
4.91 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
follow_action.php
1.75 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
follow_dash.php
33.76 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
form-builder
-
03/26/2025 03:48:04 AM
rwxr-xr-x
📄
function.php
20.61 KB
03/26/2025 03:47:47 AM
rw-r--r--
📁
genai
-
03/26/2025 04:20:06 AM
rwxr-xr-x
📄
generated_article.php
11.86 KB
03/26/2025 03:47:47 AM
rw-r--r--
📄
get_recent_items.php
1.37 KB
03/26/2025 03:47:47 AM
rw-r--r--
📄
handle_channel.php
856 bytes
03/26/2025 03:47:47 AM
rw-r--r--
📁
hindiConverter
-
03/26/2025 04:15:50 AM
rwxr-xr-x
📄
homePin.php
68.38 KB
03/26/2025 03:47:47 AM
rw-r--r--
📁
hps
-
03/26/2025 03:48:05 AM
rwxr-xr-x
📄
impmy_collection.php
124.17 KB
03/26/2025 03:47:47 AM
rw-r--r--
📁
inc
-
03/26/2025 04:15:50 AM
rwxr-xr-x
📄
index.php
30.55 KB
03/26/2025 03:47:48 AM
rw-r--r--
📄
index1.php
61.34 KB
03/26/2025 03:47:50 AM
rw-r--r--
📄
influencer.php
11.72 KB
03/26/2025 03:47:54 AM
rw-r--r--
📁
interface
-
03/26/2025 03:48:05 AM
rwxr-xr-x
📁
kannada
-
03/26/2025 04:20:06 AM
rwxr-xr-x
📄
knobly_logo.png
9.45 KB
03/26/2025 03:47:54 AM
rw-r--r--
📄
landing_page.php
17.27 KB
03/26/2025 03:47:54 AM
rw-r--r--
📄
landing_signin.php
5.11 KB
03/26/2025 03:47:54 AM
rw-r--r--
📁
leadpage
-
03/26/2025 04:15:53 AM
rwxr-xr-x
📄
link.php
5.63 KB
03/26/2025 03:47:54 AM
rw-r--r--
📄
logInCheck.php
4.41 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
loggedInCheck.php
1.15 KB
03/26/2025 03:47:54 AM
rw-r--r--
📄
logo (1).svg
814 bytes
03/26/2025 03:47:55 AM
rw-r--r--
📄
logout.php
503 bytes
03/26/2025 03:47:55 AM
rw-r--r--
📄
magazine.html
4.46 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
magazine.php
23.57 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
more.php
9.21 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
my_collection.php
153.03 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
my_settings.php
17.44 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
navbar.php
3.36 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
new-page.php
10.46 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
newEditor.php
17.04 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
newsletter.php
24.31 KB
03/26/2025 03:47:55 AM
rw-r--r--
📁
pageLanding
-
03/26/2025 04:20:07 AM
rwxr-xr-x
📁
pages
-
03/26/2025 04:15:53 AM
rwxr-xr-x
📄
payment.php
29.86 KB
03/26/2025 03:47:55 AM
rw-r--r--
📁
pdf
-
03/26/2025 03:48:06 AM
rwxr-xr-x
📄
pdftk_server-2.02-win-setup.exe
2.91 MB
03/26/2025 03:47:56 AM
rw-r--r--
📄
post-details.php
37.75 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
premium.php
21.79 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
privacy.html
12.1 KB
03/26/2025 03:47:56 AM
rw-r--r--
📁
process
-
03/26/2025 03:48:11 AM
rwxr-xr-x
📄
process-plan.php
1.44 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
process.php
1.52 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
process_data.php
5.02 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
profile.php
37.8 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
profile_pic_upload.php
4.83 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
profile_test.php
19.78 KB
03/26/2025 03:47:56 AM
rw-r--r--
📁
reels
-
03/26/2025 04:20:08 AM
rwxr-xr-x
📄
refund.html
9.04 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
replyPost.php
3.93 KB
03/26/2025 03:47:56 AM
rw-r--r--
📁
report
-
03/26/2025 03:48:11 AM
rwxr-xr-x
📄
request_article.php
22.76 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
reset.html
4.7 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
save_profile.php
2.78 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
saved.php
34.28 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
saved_posts.php
49.25 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
search_bar.php
16.95 KB
03/26/2025 03:47:56 AM
rw-r--r--
📁
sendy
-
03/26/2025 04:21:20 AM
rwxr-xr-x
📄
settings.php
81.93 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
sharemarket.php
3.88 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
showcase.php
10.34 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
signInProcess.php
13.83 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
signInProcess_backup.php
11.18 KB
03/26/2025 03:47:56 AM
rw-r--r--
📁
social_media
-
03/26/2025 04:16:12 AM
rwxr-xr-x
📄
start.html
3.99 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
store_articles.php
1.04 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
stream.php
62.31 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
streamPush.php
29.82 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
streamb.php
40.75 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
streambb.php
47.34 KB
03/26/2025 03:47:57 AM
rw-r--r--
📁
texttovoice
-
03/26/2025 03:48:13 AM
rwxr-xr-x
📁
thumbsUp
-
03/26/2025 03:48:13 AM
rwxr-xr-x
📄
toggle_channel.php
2.28 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
udupi_sign_up.php
34.5 KB
03/26/2025 03:47:57 AM
rw-r--r--
📁
uploads
-
03/26/2025 04:06:46 AM
rwxr-xr-x
📄
usage.html
37.76 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
userActivity.php
9.79 KB
03/26/2025 03:47:57 AM
rw-r--r--
📁
vendor
-
03/26/2025 04:20:23 AM
rwxr-xr-x
📄
verify.php
744 bytes
03/26/2025 03:47:57 AM
rw-r--r--
📄
view.php
13.36 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
view_newsletter.php
1.58 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
xpress_landing_page.php
78.63 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
xpress_landingpage.html
11.15 KB
03/26/2025 03:47:57 AM
rw-r--r--
Editing: my_settings.php
Close
<?php // Include the necessary files and DB connection include './inc/db_connect.php'; include './inc/config.php'; include './inc/validate.logged.php'; // Function to fetch the profile picture function viewProfilePic($db, $userId) { $sql = "SELECT profile_pic FROM user WHERE id = ?"; $link = ""; $path = "data/profilePic/"; if ($stmt = $db->prepare($sql)) { $stmt->bind_param("i", $userId); $stmt->execute(); $stmt->bind_result($link); if ($stmt->fetch()) { if ($link == null) { return $path . "default.png"; } return $path . $link; } else { return null; } $stmt->close(); } else { return "Error preparing statement: " . $db->error; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Profile Card</title> <link rel="stylesheet" href="assets/css/styles.css"> <!-- Bootstrap CSS --> <link href="assets/css/bootstrap.min.css" rel="stylesheet"> <!-- Include Cropper.js CSS --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/cropperjs/dist/cropper.min.css"> <!-- jQuery --> <script src="assets/js/jquery-3.6.0.min.js"></script> <!-- Include Cropper.js JS --> <script src="https://cdn.jsdelivr.net/npm/cropperjs/dist/cropper.min.js"></script> <style> body { color: #fff; font-family: Arial, sans-serif; } .profile-card { max-width: 400px; margin: 50px auto; border-radius: 10px; padding: 20px; text-align: center; } .profile-pic { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; } .button-container { display: flex; /* Makes the buttons appear side by side */ gap: 10px; /* Adjusts the space between buttons */ } .btn-custom { background-color: #db5919; /* Example custom color */ color: #fff; /* White text color */ border: 1px solid #6c757d; padding: 10px 20px; /* Adjusts button size */ border-radius: 5px; /* Smooth corners */ cursor: pointer; transition: background-color 0.3s ease; } .btn-custom:hover { background-color: #db5919; /* Darker shade for hover effect */ padding: 10px 20px; border-radius: 5px; color: white; } .btn-primary { padding: 10px 20px; border-radius: 5px; } #imageContainer { width: 100% !important; } #uploadForm { color: #fff; } .modal-title { color: #fff; } body.dark-mode #uploadForm { color: #fff; } body.light-mode #uploadForm { color: #000; } body.dark-mode .modal-title { color: #fff; } body.light-mode .modal-title { color: #000; } body.dark-mode .modal-content { background-color: #444; } body.light-mode .modal-content { background-color: #dfe3ee !important; } body.light-mode .form-control { background-color: #fff !important; color:#000 !important ; } body.light-mode.btn-close{ color: #000 !important; } /* Set fixed size for the cropper container */ .cropper-container { margin: 0 auto; /* Center the container if necessary */ position: relative; /* Ensure proper positioning of the image */ } /* Optional: Style the cropper's background (use for debugging if needed) */ .cropper-bg { background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */ } </style> </head> <body style="height: 100vh;"> <?php include 'assets/php/navbar.php'; ?> <!-- Profile Card --> <div class="profile-card"> <img id="profilePic" src="<?= viewProfilePic($db, $gUserId) ?>" alt="Profile Picture" class="profile-pic"> <h3 class="profile-name"><?= $gUserName ?></h3> <!-- Buttons --> <div class="d-flex gap-2"> <button class="btn btn-custom flex-fill" data-bs-toggle="modal" data-bs-target="#editProfileModal">Edit Profile Image</button> <button class="btn btn-primary flex-fill" onclick="window.location.href='account.php';">Edit Profile</button> </div> </div> <!-- Edit Profile Modal --> <div class="modal fade" id="editProfileModal" tabindex="-1" aria-labelledby="editProfileModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content bg-dark text-white"> <div class="modal-header"> <h5 class="modal-title" id="editProfileModalLabel">Edit Profile</h5> <button type="button" class="btn-close btn-close-black" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <form id="uploadForm" enctype="multipart/form-data"> <div class="mb-3"> <label for="username" class="form-label">Username</label> <input type="text" class="form-control bg-dark text-white" id="username" value="<?= $gUserName ?>"> </div> <!-- Profile Picture Upload --> <div class="mb-3"> <label for="fileInput" class="form-label">Upload Profile Picture</label> <input type="file" name="profile_pic" accept="image/*" id="fileInput" class="form-control" required /> </div> <!-- Image Preview and Cropper --> <div id="imageContainer" style="display:none;"> <img id="imagePreview" src="" alt="Image Preview" style="max-width: 100%;" /> </div> <!-- Crop Button --> <button type="button" id="cropBtn" class="btn btn-primary" style="display:none;">Crop and Save</button> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button> <button type="button" class="btn btn-primary" id="saveProfileBtn">Save Changes</button> </div> </div> </div> </div> <? include 'assets/php/bottom_navbar.php' ?> <? include 'assets/php/footer.php' ?> <!-- Bootstrap Bundle with Popper.js --> <script src="assets/js/bootstrap.bundle.min.js"></script> <!-- <script> // jQuery function to handle saving profile information function saveProfile() { const username = $('#username').val(); const bio = $('#bio').val(); // Update profile card with new values $('.profile-name').text(username); $('.profile-info').html(bio.replace(/\n/g, '<br>')); // Close the modal $('#editProfileModal').modal('hide'); } $(document).ready(function() { let cropper; // Handle image file selection and preview $('#fileInput').on('change', function(event) { const file = event.target.files[0]; if (file) { const reader = new FileReader(); reader.onload = function(e) { $('#imagePreview').attr('src', e.target.result); $('#imageContainer').show(); // Show the preview image // Initialize Cropper.js with specific container size if (cropper) { cropper.destroy(); // Destroy the previous cropper if it exists } // Create new Cropper.js instance with custom settings cropper = new Cropper($('#imagePreview')[0], { aspectRatio: 1, // Maintain square aspect ratio viewMode: 2, // Restrict the crop box to the canvas area autoCropArea: 0.8, // Set initial crop box size (80% of the container) scalable: true, // Allow zoom zoomable: true, // Allow zoom minCanvasWidth: 100, // Minimum width for the canvas minCanvasHeight: 100, // Minimum height for the canvas dragMode: 'move', // Allow dragging the image to reposition }); // Show the crop button $('#cropBtn').show(); }; reader.readAsDataURL(file); // Load the image file } }); // Handle crop button click $('#cropBtn').on('click', function() { if (cropper) { // Get the cropped image as a canvas const canvas = cropper.getCroppedCanvas(); // Convert the canvas to a blob and upload it canvas.toBlob(function(blob) { const formData = new FormData(); formData.append('profile_pic', blob, 'profile.jpg'); // Append the cropped image as form data // Send the image to the server using AJAX $.ajax({ url: '', // Submit to the same page (this PHP file) type: 'POST', data: formData, processData: false, contentType: false, success: function(response) { const data = JSON.parse(response); if (data.status === 'success') { alert('Profile picture updated successfully.'); // Update the profile picture displayed on the page $('#profilePic').attr('src', data.path); } else { alert('Error uploading image: ' + data.message); } }, error: function(xhr, status, error) { alert('Error uploading cropped image.'); } }); }); } }); }); </script> --> <script> $(document).ready(function() { let cropper; // Handle file input change $("#fileInput").on("change", function(event) { const file = event.target.files[0]; if (file) { // Show image container and crop button (we no longer need the crop button) $("#imageContainer").show(); const reader = new FileReader(); reader.onload = function(e) { // Set the image source for preview $("#imagePreview").attr("src", e.target.result); // Use jQuery to get the image element const $image = $("#imagePreview")[0]; // jQuery selector with [0] to get the DOM element // Set the width and height for the image dynamically const desiredWidth = 600; // Set your desired width here const desiredHeight = 400; // Set your desired height here // Set the image's width and height $image.width = desiredWidth; $image.height = desiredHeight; // Initialize the Cropper instance once the image is loaded if (cropper) { cropper.destroy(); // Destroy the previous instance if any } // Initialize the Cropper with the desired settings (allow zooming out) cropper = new Cropper($image, { aspectRatio: 1, // Aspect ratio (1:1 for square crop) viewMode: 2, // Ensures image is contained within the canvas (image scaling to fit) autoCropArea: 0.8, // Area to crop initially movable: true, // Allow image move zoomable: true, // Allow zooming (both in and out) rotatable: true, // Allow rotation scalable: true, // Allow scaling cropBoxResizable: true, // Allow resizing the crop box (this will resize the image area) minContainerWidth: 300, // Minimum width of the container minContainerHeight: 300, // Minimum height of the container minZoom: 0.5, // Allow zooming out (min zoom set to 0.5, allowing zoom-out) maxZoom: 3, // Optional: Limit zoom-in to 3x the image size (default is 1) ready: function() { // Set initial size of crop box, but the crop box will resize const cropBoxData = cropper.getCropBoxData(); cropper.setCropBoxData({ left: cropBoxData.left, top: cropBoxData.top, width: 300, // Set max crop box size height: 300 // Set max crop box size }); }, // Allow the crop box resizing to a max of 300x300px cropBoxMinWidth: 50, // Min size of the crop box cropBoxMinHeight: 50, // Min size of the crop box cropBoxMaxWidth: 300, // Max size of the crop box cropBoxMaxHeight: 300, // Max size of the crop box crop: function(event) { // This function will no longer be used for cropping, but it can be left empty. } }); }; reader.readAsDataURL(file); } }); // Handle saving profile changes directly when the "Save Profile" button is clicked $("#saveProfileBtn").on("click", function() { if (cropper) { // Get the current state of the image (zoomed, moved, resized) const canvas = cropper.getCroppedCanvas(); // This is the current image state // Convert the canvas to base64 const imageData = canvas.toDataURL("image/png"); // Add the base64 image data to the form as a hidden input field $("#uploadForm").append(`<input type="hidden" name="image_state" value="${imageData}" />`); // Now submit the form to save the profile const formData = new FormData($("#uploadForm")[0]); // Send the data to PHP (via AJAX) $.ajax({ url: "save_profile.php", // PHP script to handle the save type: "POST", data: formData, processData: false, contentType: false, success: function(response) { if (response.status === 'success') { alert(response.message); // Optionally, update the image preview with the new image path $("#profileImagePreview").attr("src", response.image_path); // Close the modal $('#editProfileModal').modal('hide'); window.location.reload(); } else { alert(response.message); // Display error message } }, error: function() { alert("An error occurred while saving your profile."); } }); } }); }); </script> </body> </html>