🌙 File Manager - @r3dc0d3r1337-WORDPRESS
PHP:
8.1.34
Server:
LiteSpeed
OS:
Linux 5.14.0-611.34.1.el9_7.x86_64
User:
fastear1
Navigate
Upload:
Upload
New File
New Folder
Editing: register.php
<?php require_once 'includes/config.php'; // Redirect if already logged in if (isLoggedIn()) { header('Location: user/dashboard.php'); exit; } // Referral Handling (Global for display) $referrer_id = null; $referrer_name = null; if (isset($_GET['ref'])) { $ref_code = trim($_GET['ref']); $stmt = $pdo->prepare("SELECT id, full_name FROM users WHERE referral_code = ?"); $stmt->execute([$ref_code]); $ref_user = $stmt->fetch(); if ($ref_user) { $referrer_id = $ref_user['id']; $referrer_name = $ref_user['full_name']; } } // Handle registration if ($_SERVER['REQUEST_METHOD'] === 'POST') { $full_name = trim($_POST['full_name']); $email = trim($_POST['email']); $phone = trim($_POST['phone']); $account_type = $_POST['account_type']; $bank_name = isset($_POST['bank_name']) ? trim($_POST['bank_name']) : null; $account_number = trim($_POST['account_number']); $account_name = trim($_POST['account_name']); $password = $_POST['password']; // Validation $errors = []; if (empty($full_name)) $errors[] = "Full name is required"; if (empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL)) $errors[] = "Valid email is required"; if (empty($phone)) $errors[] = "Phone number is required"; if (empty($account_number)) $errors[] = "Account number is required"; if (empty($account_name)) $errors[] = "Account name is required"; if ($account_type === 'Bank Account' && empty($bank_name)) $errors[] = "Bank name is required for bank accounts"; if (empty($password) || strlen($password) < 6) $errors[] = "Password must be at least 6 characters"; if (empty($errors)) { $stmt = $pdo->prepare("SELECT id FROM users WHERE email = ?"); $stmt->execute([$email]); if ($stmt->fetch()) $errors[] = "Email already registered"; } if (empty($errors)) { $stmt = $pdo->prepare("SELECT id FROM users WHERE phone = ?"); $stmt->execute([$phone]); if ($stmt->fetch()) $errors[] = "Phone number already registered"; } if (empty($errors)) { try { $hashed_password = password_hash($password, PASSWORD_DEFAULT); $newCode = generateRandomCode(7); $stmt = $pdo->prepare(" INSERT INTO users (referral_code, full_name, email, phone, account_type, bank_name, account_number, account_name, password, referrer_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) "); $stmt->execute([$newCode, $full_name, $email, $phone, $account_type, $bank_name, $account_number, $account_name, $hashed_password, $referrer_id]); $new_user_id = $pdo->lastInsertId(); if ($referrer_id) { $stmt = $pdo->prepare("INSERT INTO referrals (referrer_id, referred_id) VALUES (?, ?)"); $stmt->execute([$referrer_id, $new_user_id]); } setSuccess("Account established successfully. Secure login authorized."); header('Location: login.php'); exit; } catch (PDOException $e) { $errors[] = "Framework error. Registration aborted."; } } if (!empty($errors)) { foreach ($errors as $error) setError($error); } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <title>Open Account | <?php echo getSetting('site_name'); ?></title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;800&display=swap" rel="stylesheet"> <style> :root { --p: #00ffa3; --bg: #060912; --card: #121826; --text: #ffffff; --dim: #94a3b8; --border: rgba(255, 255, 255, 0.08); } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; } body { background-color: var(--bg); color: var(--text); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; position: relative; } .bg-glow { position: fixed; width: 100%; height: 100%; top: 0; left: 0; z-index: -1; background: radial-gradient(circle at 10% 10%, rgba(0, 229, 255, 0.03) 0%, transparent 50%), radial-gradient(circle at 90% 90%, rgba(112, 0, 255, 0.03) 0%, transparent 50%); } .auth-container { width: 100%; max-width: 650px; z-index: 10; } .auth-card { background: rgba(18, 24, 38, 0.8); backdrop-filter: blur(25px); border: 1px solid var(--border); border-radius: 32px; padding: 50px; box-shadow: 0 50px 100px rgba(0, 0, 0, 0.6); } .auth-header { text-align: center; margin-bottom: 40px; } .auth-header .logo-box { font-size: 40px; color: var(--p); margin-bottom: 20px; display: inline-block; filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.2)); } .auth-header h1 { font-family: 'Outfit', sans-serif; font-size: 32px; font-weight: 800; margin-bottom: 10px; } .auth-header p { color: var(--dim); font-size: 16px; } form { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; } .full-width { grid-column: span 2; } .form-group { margin-bottom: 5px; } .form-label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; } .form-control { width: 100%; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; color: white; font-size: 15px; transition: 0.3s; outline: none; } .form-control:focus { border-color: var(--p); background: rgba(255, 255, 255, 0.06); box-shadow: 0 0 0 4px rgba(0, 255, 163, 0.08); } select.form-control { cursor: pointer; color: var(--dim); } select.form-control option { background: #121826; color: white; } .btn-submit { grid-column: span 2; background: var(--p); color: #000; border: none; padding: 18px; border-radius: 14px; font-size: 16px; font-weight: 800; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; gap: 15px; margin-top: 20px; box-shadow: 0 10px 20px rgba(0, 255, 163, 0.1); } .btn-submit:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(0, 255, 163, 0.2); } .invite-badge { grid-column: span 2; background: rgba(0, 255, 163, 0.05); border: 1px solid rgba(0, 255, 163, 0.1); padding: 15px; border-radius: 14px; text-align: center; font-size: 14px; color: var(--p); margin-bottom: 10px; } .auth-footer { grid-column: span 2; text-align: center; margin-top: 35px; color: var(--dim); font-size: 15px; } .auth-footer a { color: var(--p); text-decoration: none; font-weight: 700; } .alert-danger { grid-column: span 2; padding: 18px; background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); border-radius: 14px; font-size: 14px; text-align: center; margin-bottom: 25px; } @media (max-width: 768px) { form { grid-template-columns: 1fr; } .full-width, .btn-submit, .invite-badge, .auth-footer, .alert-danger { grid-column: span 1; } .auth-card { padding: 35px 25px; } } </style> </head> <body> <div class="bg-glow"></div> <div class="auth-container"> <div class="auth-card"> <div class="auth-header"> <div class="logo-box"><i class="fas fa-bolt"></i></div> <h1>Create Account</h1> <p>Join 20K+ users earning with FAST EARN LIMITED</p> </div> <?php $error = getError(); if ($error) echo '<div class="alert alert-danger">' . htmlspecialchars($error) . '</div>'; ?> <form method="POST" action=""> <div class="form-group full-width"> <label class="form-label">Full Name</label> <input type="text" name="full_name" class="form-control" placeholder="Enter full name" required value="<?php echo isset($_POST['full_name']) ? htmlspecialchars($_POST['full_name']) : ''; ?>"> </div> <div class="form-group"> <label class="form-label">Email Address</label> <input type="email" name="email" class="form-control" placeholder="example@mail.com" required value="<?php echo isset($_POST['email']) ? htmlspecialchars($_POST['email']) : ''; ?>"> </div> <div class="form-group"> <label class="form-label">Phone Number</label> <input type="text" name="phone" class="form-control" placeholder="03XXXXXXXXX" required value="<?php echo isset($_POST['phone']) ? htmlspecialchars($_POST['phone']) : ''; ?>"> </div> <div class="form-group"> <label class="form-label">Account Network</label> <select name="account_type" id="account_type" class="form-control" required onchange="toggleBankName()"> <option value="">Select Gateway</option> <option value="JazzCash">JazzCash</option> <option value="Easypaisa">Easypaisa</option> <option value="Bank Account">Bank Account</option> </select> </div> <div class="form-group" id="bank_name_group" style="display:none;"> <label class="form-label">Bank Name</label> <input type="text" name="bank_name" id="bank_name" class="form-control" placeholder="e.g. HBL / UBL"> </div> <div class="form-group"> <label class="form-label">Account Number</label> <input type="text" name="account_number" class="form-control" placeholder="Enter number" required> </div> <div class="form-group"> <label class="form-label">Account Title</label> <input type="text" name="account_name" class="form-control" placeholder="Exact Holder Name" required> </div> <div class="form-group full-width"> <label class="form-label">Secure Password</label> <input type="password" name="password" class="form-control" placeholder="Min 6 characters" required> </div> <?php if (isset($_GET['ref']) && isset($referrer_name)): ?> <div class="invite-badge"> <i class="fas fa-gift"></i> Invited by: <strong><?php echo htmlspecialchars($referrer_name); ?></strong> </div> <?php endif; ?> <button type="submit" class="btn-submit"> Join FAST EARN LIMITED <i class="fas fa-arrow-right"></i> </button> <div class="auth-footer"> Already a member? <a href="login.php">Login here</a> </div> </form> </div> </div> <script> function toggleBankName() { const accountType = document.getElementById('account_type').value; const bankNameGroup = document.getElementById('bank_name_group'); const bankNameInput = document.getElementById('bank_name'); if (accountType === 'Bank Account') { bankNameGroup.style.display = 'block'; bankNameInput.required = true; } else { bankNameGroup.style.display = 'none'; bankNameInput.required = false; bankNameInput.value = ''; } } </script> </body> </html>
Save Changes
Cancel
Create New File
Create New Folder