X7ROOT File Manager
Current Path:
/home/u126090504/domains/svmbaripada.org.in/public_html/admin
home
/
u126090504
/
domains
/
svmbaripada.org.in
/
public_html
/
admin
/
📁
..
📄
achievers.php
(21.44 KB)
📄
achv_cat_manage.php
(7.99 KB)
📄
achv_edit.php
(9.58 KB)
📄
achv_list.php
(8.08 KB)
📄
achv_upload.php
(13.39 KB)
📄
admin-academic-calendar.php
(20.41 KB)
📄
admin-public-disclosure.php
(18.36 KB)
📄
admissions.php
(28.76 KB)
📄
admissions_error.log
(56 KB)
📁
assets
📄
banners.php
(9.78 KB)
📄
branding_settings.php
(5.93 KB)
📄
change_password.php
(3.01 KB)
📄
class_master.php
(4.32 KB)
📄
contacts.php
(3.79 KB)
📄
dashboard.php
(27.78 KB)
📄
downloads.php
(4.91 KB)
📄
edit_faculty.php
(6.85 KB)
📄
export_franchise.php
(930 B)
📄
faculty.php
(8.36 KB)
📄
fees_list.php
(8.48 KB)
📄
fees_upload.php
(6.19 KB)
📄
forgot_password.php
(6.39 KB)
📄
franchise.php
(7.28 KB)
📄
gallery.php
(3.08 KB)
📄
grievance-update.php
(1003 B)
📄
grievance-view.php
(8.51 KB)
📄
grievances.php
(9.55 KB)
📄
homework_add.php
(5.98 KB)
📄
homework_delete.php
(543 B)
📄
homework_edit.php
(9.39 KB)
📄
homework_list.php
(2.24 KB)
📁
img
📁
includes
📄
index.php
(82 B)
📄
login.php
(13.47 KB)
📄
logout.php
(102 B)
📄
manage_albums.php
(10.82 KB)
📄
manage_media.php
(11.77 KB)
📄
manage_photos.php
(6.35 KB)
📄
manage_videos.php
(18.38 KB)
📄
managing-committee.php
(13.64 KB)
📄
master_menu.php
(5.75 KB)
📄
master_menu_debug.php
(3.73 KB)
📄
new_password.php
(3.9 KB)
📄
non_academic_achievers.php
(21.2 KB)
📄
notice.php
(15.52 KB)
📄
notice_error.log
(38.45 KB)
📄
notices.php
(8.24 KB)
📄
payments.php
(14.96 KB)
📁
phpmailer
📄
popup.php
(14.07 KB)
📄
reset_password.php
(2.27 KB)
📄
section_master.php
(6.59 KB)
📄
sections_by_class.php
(346 B)
📄
secure_session.php
(1000 B)
📄
settings.php
(8.35 KB)
📄
student_photo_update.php
(1.8 KB)
📄
subject_master.php
(6.16 KB)
📄
submit-grievance.php
(4.97 KB)
📄
testimonials.php
(15.15 KB)
📄
update_status.php
(1.66 KB)
📄
upi_settings.php
(1.52 KB)
Editing: forgot_password.php
<?php include 'secure_session.php'; include 'includes/auth.php'; require_once '../config.php'; include 'includes/header.php'; /******************************************************* * Forgot Password (Standalone) * - Shows all PHP errors while debugging * - Detects PHPMailer path (PHPMailer/ or phpmailer/) * - Uses Hostinger SMTP *******************************************************/ error_reporting(E_ALL); ini_set('display_errors', 1); ini_set('display_startup_errors', 1); // Fatal errors ko bhi screen par lao register_shutdown_function(function () { $e = error_get_last(); if ($e && in_array($e['type'], [E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR])) { http_response_code(500); echo "<pre style='padding:16px;background:#111;color:#0f0'>"; echo "FATAL ERROR: {$e['message']}\nFile: {$e['file']}\nLine: {$e['line']}"; echo "</pre>"; } }); // MySQLi errors as exceptions (easy debug) if (function_exists('mysqli_report')) { mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); } // NOTE: Forgot page should be public; don't force login here. // include 'secure_session.php'; require_once __DIR__ . '/../config.php'; // must define $conn (mysqli) // ---- SMTP CONFIG (preferably keep in config.php) ---- $SMTP_HOST = 'smtp.hostinger.com'; $SMTP_USER = 'no-reply@kipsbls.org'; // <- YOUR mailbox $SMTP_PASS = '9861845796Aa@#'; // <- YOUR mailbox password $SMTP_PORT = 587; $FROM_EMAIL = 'no-reply@kipsbls.org'; $FROM_NAME = 'kips'; $REPLY_TO = 'support@kipsbls.org'; $APP_BASE_URL = 'https://kipsbls.org'; // ---- PHPMailer includes (supports PHPMailer/ or phpmailer/) ---- $pm_base_options = [ __DIR__ . '/PHPMailer/src', __DIR__ . '/phpmailer/src', ]; $pm_src = null; foreach ($pm_base_options as $opt) { if (is_dir($opt) && file_exists($opt . '/PHPMailer.php')) { $pm_src = $opt; break; } } if (!$pm_src) { // As a last resort, try composer autoload if present if (file_exists(__DIR__ . '/../vendor/autoload.php')) { require_once __DIR__ . '/../vendor/autoload.php'; } else { die("<pre>PHPMailer not found. Upload library to /admin/PHPMailer/src/ (or /admin/phpmailer/src/) or install via Composer.</pre>"); } } else { require_once $pm_src . '/PHPMailer.php'; require_once $pm_src . '/SMTP.php'; require_once $pm_src . '/Exception.php'; } use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; $flash = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $email = trim($_POST['email'] ?? ''); if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $flash = "<div class='alert alert-danger mb-3'>❌ Invalid email address.</div>"; } else { // find admin user $stmt = $conn->prepare("SELECT id, username FROM register WHERE email=? AND usertype='admin' LIMIT 1"); $stmt->bind_param("s", $email); $stmt->execute(); $stmt->bind_result($uid, $username); $found = $stmt->fetch(); $stmt->close(); if (!$found) { $flash = "<div class='alert alert-danger mb-3'>❌ This email is not registered as admin.</div>"; } else { // token + expiry $token = bin2hex(random_bytes(32)); $expires = date("Y-m-d H:i:s", time() + 3600); // 1 hour $stmt = $conn->prepare("UPDATE register SET reset_token=?, reset_expires=? WHERE id=?"); $stmt->bind_param("ssi", $token, $expires, $uid); $stmt->execute(); $stmt->close(); $reset_link = $APP_BASE_URL . "/admin/reset_password.php?token=" . urlencode($token); // send email $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = $SMTP_HOST; $mail->SMTPAuth = true; $mail->Username = $SMTP_USER; $mail->Password = $SMTP_PASS; $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; $mail->Port = $SMTP_PORT; $mail->setFrom($FROM_EMAIL, $FROM_NAME); $mail->addAddress($email, $username ?: 'Admin'); if (!empty($REPLY_TO)) { $mail->addReplyTo($REPLY_TO, 'Support'); } $mail->isHTML(true); $mail->Subject = 'Password Reset Request'; $mail->Body = " <p>Hello <b>" . htmlspecialchars($username ?: 'Admin') . "</b>,</p> <p>Click the link below to reset your password (valid for <b>1 hour</b>):</p> <p><a href='{$reset_link}' target='_blank'>{$reset_link}</a></p> <p>If you didn’t request this, you can safely ignore this email.</p> <br><p>Regards,<br>Ajineeta Foundation Admin</p> "; $mail->AltBody = "Reset your password (valid 1 hour): {$reset_link}"; // SMTP debug if needed: // $mail->SMTPDebug = 2; $mail->Debugoutput = 'error_log'; $mail->send(); $flash = "<div class='alert alert-success mb-3'>✅ Reset link sent. Please check your email (Inbox/Spam).</div>"; } catch (Exception $e) { error_log('Mail error: ' . $mail->ErrorInfo); $flash = "<div class='alert alert-danger mb-3'>❌ Email send failed. Please try again later.</div>"; } } } } ?> <style> body{background:#f8f9fa} .card{border-radius:12px} </style> </head> <body class="bg-light"> <div class="container py-5"> <div class="col-md-5 mx-auto"> <div class="card shadow"> <div class="card-body"> <h3 class="text-center mb-3">Forgot Password</h3> <?= $flash ?> <form method="POST" autocomplete="off" novalidate> <div class="form-group"> <label>Enter your registered admin email</label> <input type="email" name="email" class="form-control" required> </div> <button type="submit" class="btn btn-primary btn-block">Send Reset Link</button> </form> <p class="mt-3 text-center"><a href="login.php">Back to Login</a></p> </div> </div> </div> </div> <?php include 'includes/footer.php';
Upload File
Create Folder