Skip to main content

EMS Application

<div id="success-msg" style="display:none; background-color: #2ecc71; color: white; padding: 15px; border-radius: 5px; margin-bottom: 20px; text-align: center; font-weight: bold; box-shadow: 0 4px 6px rgba(0,0,0,0.2);">
    ✅ Application submitted successfully! Please check your Discord DMs for updates.
</div>

<div id="login-gate" style="text-align: center; padding: 50px; background: #1a1a1a; border-radius: 8px; border: 1px solid #333; margin-bottom: 30px;">
    <h3 style="color: white; margin-bottom: 15px; font-weight: bold;">Authentication Required</h3>
    <p style="color: #aaa; margin-bottom: 30px; font-size: 1.1em;">To prevent spam and verify your identity, you must sign in with Discord and be a member of Rebel City RP.</p>
    <a href="https://rebelgamingnetwork.net/discord-auth.php" 
       style="background-color: #5865F2; color: white; padding: 15px 30px; text-decoration: none; border-radius: 5px; font-weight: bold; font-size: 1.1em; transition: background 0.2s;">
       <span style="margin-right:8px;">🚀</span> Login with Discord
    </a>
</div>

<div id="app-form-container" style="display: none;">

    <div style="background: rgba(231, 76, 60, 0.1); border: 1px solid #e74c3c; padding: 15px; border-radius: 5px; margin-bottom: 25px; color: white; display: flex; align-items: center; gap: 15px;">
        <img id="user-avatar" src="" style="width: 45px; height: 45px; border-radius: 50%; border: 2px solid #e74c3c;">
        <div>
            <div style="font-weight: bold; font-size: 1.1em; color: #e74c3c;">Logged in as <span id="user-name" style="color:#fff;"></span></div>
            <div style="font-size: 0.85em; opacity: 0.8;">ID: <span id="user-id"></span></div>
        </div>
    </div>

    <div style="background: #222; border-left: 4px solid #e74c3c; padding: 20px; margin-bottom: 25px; border-radius: 4px;">
        <h4 style="margin-top:0; color: #e74c3c;">Rebel City EMS Requirements</h4>
        <ul style="margin-bottom: 10px; padding-left: 20px; color: #ddd;">
            <li>Be at least 18 years of age (IRL).</li>
            <li>Have a clean criminal record.</li>
            <li>Have the ability to read and write in English.</li>
            <li>Have a working microphone.</li>
        </ul>
        <p style="font-size: 0.9em; color: #ffaaa5; margin: 0;"><strong>DISCLAIMER:</strong> The utilization of AI to fill out any section of this form is considered plagiarism and will result in immediate denial.</p>
    </div>

    <form action="https://rebelgamingnetwork.net/submit-app.php" method="POST" style="max-width: 800px;">
        
        <input type="hidden" name="app_type" value="EMS Application">

        <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px;">
            <div>
                <label style="font-weight: bold; display: block; margin-bottom: 8px; color: #ddd;">In City Name *</label>
                <input type="text" name="In_City_Name" required style="width: 100%; padding: 12px; border-radius: 4px; border: 1px solid #444; background: #1a1a1a; color: #fff;">
            </div>
            <div>
                <label style="font-weight: bold; display: block; margin-bottom: 8px; color: #ddd;">Age (IRL) *</label>
                <input type="number" name="Age" required style="width: 100%; padding: 12px; border-radius: 4px; border: 1px solid #444; background: #1a1a1a; color: #fff;">
            </div>
        </div>

        <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px;">
            <div>
                <label style="font-weight: bold; display: block; margin-bottom: 8px; color: #ddd;">Total Hours in City *</label>
                <input type="text" name="Total_Hours" placeholder="Rough Estimate" required style="width: 100%; padding: 12px; border-radius: 4px; border: 1px solid #444; background: #1a1a1a; color: #fff;">
            </div>
            <div>
                <label style="font-weight: bold; display: block; margin-bottom: 8px; color: #ddd;">Region *</label>
                <input type="text" name="Region" required style="width: 100%; padding: 12px; border-radius: 4px; border: 1px solid #444; background: #1a1a1a; color: #fff;">
            </div>
        </div>

        <hr style="border-color: #333; margin: 30px 0;">

        <div style="margin-bottom: 25px;">
            <label style="font-weight: bold; display: block; margin-bottom: 10px; color: #e74c3c;">Are you affiliated with or part of any gangs or families? *</label>
            <div style="display: flex; gap: 20px;">
                <label style="cursor: pointer;"><input type="radio" name="Gang_Affiliation" value="Yes" required> <span style="margin-left:5px;">Yes</span></label>
                <label style="cursor: pointer;"><input type="radio" name="Gang_Affiliation" value="No"> <span style="margin-left:5px;">No</span></label>
            </div>
        </div>

        <div style="margin-bottom: 25px;">
            <label style="font-weight: bold; display: block; margin-bottom: 10px; color: #e74c3c;">Do you have a criminal record? *</label>
            <div style="display: flex; gap: 20px;">
                <label style="cursor: pointer;"><input type="radio" name="Criminal_Record" value="Yes" required> <span style="margin-left:5px;">Yes</span></label>
                <label style="cursor: pointer;"><input type="radio" name="Criminal_Record" value="No"> <span style="margin-left:5px;">No</span></label>
            </div>
        </div>

        <hr style="border-color: #333; margin: 30px 0;">

        <div style="margin-bottom: 25px;">
            <label style="font-weight: bold; display: block; margin-bottom: 10px; color: #ddd;">Do you have any medical experience? *</label>
            <div style="display: flex; gap: 20px; margin-bottom: 10px;">
                <label style="cursor: pointer;"><input type="radio" name="Medical_Experience" value="Yes" required> <span style="margin-left:5px;">Yes</span></label>
                <label style="cursor: pointer;"><input type="radio" name="Medical_Experience" value="No"> <span style="margin-left:5px;">No</span></label>
            </div>
            <input type="text" name="Medical_Exp_Details" placeholder="If Yes, please briefly explain..." style="width: 100%; padding: 12px; border-radius: 4px; border: 1px solid #444; background: #1a1a1a; color: #fff;">
        </div>

        <div style="margin-bottom: 25px;">
            <label style="font-weight: bold; display: block; margin-bottom: 10px; color: #ddd;">Do you have any previous EMS roleplay experience? *</label>
            <div style="display: flex; gap: 20px; margin-bottom: 10px;">
                <label style="cursor: pointer;"><input type="radio" name="EMS_RP_Experience" value="Yes" required> <span style="margin-left:5px;">Yes</span></label>
                <label style="cursor: pointer;"><input type="radio" name="EMS_RP_Experience" value="No"> <span style="margin-left:5px;">No</span></label>
            </div>
            <input type="text" name="EMS_Exp_Details" placeholder="If Yes, please briefly explain..." style="width: 100%; padding: 12px; border-radius: 4px; border: 1px solid #444; background: #1a1a1a; color: #fff;">
        </div>

        <div style="margin-bottom: 25px;">
            <label style="font-weight: bold; display: block; margin-bottom: 8px; color: #ddd;">What motivates you to join Rebel City EMS? (100 word min) *</label>
            <textarea name="Motivation" rows="6" minlength="500" required style="width: 100%; padding: 12px; border-radius: 4px; border: 1px solid #444; background: #1a1a1a; color: #fff; line-height: 1.5;"></textarea>
            <small style="color: #666;">Please provide detailed answers.</small>
        </div>

        <div style="margin-bottom: 30px;">
            <label style="font-weight: bold; display: block; margin-bottom: 8px; color: #ddd;">What skills/traits make you a strong candidate? (50 word min) *</label>
            <textarea name="Skills_And_Traits" rows="5" minlength="250" required style="width: 100%; padding: 12px; border-radius: 4px; border: 1px solid #444; background: #1a1a1a; color: #fff; line-height: 1.5;"></textarea>
        </div>

        <div style="margin-bottom: 25px;">
            <div class="g-recaptcha" data-sitekey="6LdNuEQsAAAAADWrx9BXW8YoSNdX5TXZFVE22ijh" data-theme="dark"></div>
        </div>

        <button type="submit" style="background-color: #e74c3c; color: white; padding: 15px 30px; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; font-weight: bold; width: 100%; transition: background 0.2s;">
            Submit Application
        </button>
    </form>
</div>

<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<script>
    // Check if user just submitted successfully
    if (window.location.search.includes('status=success')) {
        document.getElementById('success-msg').style.display = 'block';
        document.getElementById('success-msg').scrollIntoView({ behavior: 'smooth' });
    }

    // Check Authentication Status
    fetch('https://rebelgamingnetwork.net/check-auth.php')
    .then(response => response.json())
    .then(user => {
        if (user) {
            // User is logged in -> Hide Gate, Show Form
            document.getElementById('login-gate').style.display = 'none';
            document.getElementById('app-form-container').style.display = 'block';
            
            // Fill Banner Info
            document.getElementById('user-name').textContent = user.username;
            document.getElementById('user-id').textContent = user.id;
            
            if (user.avatar) {
                document.getElementById('user-avatar').src = `https://cdn.discordapp.com/avatars/${user.id}/${user.avatar}.png`;
            } else {
                document.getElementById('user-avatar').src = "https://cdn.discordapp.com/embed/avatars/0.png";
            }
        }
    })
    .catch(err => {
        console.error("Auth Check Failed:", err);
    });
</script>