<?php
    define('HOST',"localhost:3306");
    define('USER',"root");
    define('PASS',"mYsqlroo2023p@SS");
    define('DB',"funstar_prod");
    $con = mysqli_connect(HOST,USER,PASS,DB) or die('Unable to Connect');
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Manager Form</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>

    <!-- Font Icon -->
    <link rel="stylesheet" href="fonts/material-icon/css/material-design-iconic-font.min.css">

    <!-- Main css -->
    <link rel="stylesheet" href="css/styles4.css">
</head>
<body style="background-attachment: fixed;background-image: linear-gradient(45deg, rgb(173 47 94), rgb(89 56 151), rgb(255 0 217));">

    <div class="main">
        <div class="container">
            <div class="signup-content">
                <div class="signup-form">
                    <script>
                        $('select').on('change', function() {
                            console.log('country changed');
                            var $option = $(this).find('option:selected');
                            var value = $option.val();//to get content of "value" attrib
                            if (value == 'India') {
                                $('.OnlyIndian').show(); // Shows
                                $('.OnlyNonIndian').hide(); // Shows
                            }
                            else {
                                $('.OnlyIndian').hide(); // Shows
                                $('.OnlyNonIndian').show(); // Shows
                            }
                        });
                    </script>
                    <div id="google_translate_element"></div>
                    <script type="text/javascript">
                        function googleTranslateElementInit() {
                            new google.translate.TranslateElement(
                                {pageLanguage: 'en'},
                                'google_translate_element'
                            );
                        }
                    </script>
                    <script type="text/javascript"src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
                    <form method="POST" class="register-form" id="register-form" action="/submit_form.php" enctype="multipart/form-data">
                        <h2>Manager Form - Fun Star</h2>
                        <label>Manager Requirements</label><br>
                        <div class="form-group">
                            <label>Applicant's  name *</label><br>
                            <input type="text" name="applicantsName" id="applicantsName" required/>
                        </div>
                        <div class="form-group">
                            <label>Email *</label><br>
                            <input type="email" name="email" id="email" required/>
                        </div>
                        <div class="form-group">
                            <label>Phone *</label><br>
                            <input type="text" name="phone" id="phone" required/>
                        </div>
                        <div class="form-group">
                            <label>City *</label><br>
                            <input type="text" name="city" id="city" required/>
                        </div>
                        <div class="form-group">
                            <label>Country *</label><br>
                            <select name="country" id="country">
                            <?php
								$get_countries = mysqli_query($con, "select * from countries");
								if (mysqli_num_rows($get_countries) > 0) {
									while ($country = mysqli_fetch_assoc($get_countries)) {
									    $County_name = $country['CountyName'];
									    echo '<option value="'.$County_name.'">'.$County_name.'</option>';
									}
							    }
							?>
                            </select>
                        </div>
                        <div class="form-group">
                            <label>Resume / CV</label><br>
                            <input type="file" accept="application/pdf" name="resume" id="resume" required/>
                        </div>
                        <div class="form-group">
                            <label>Portfolio</label><br>
                            <input type="file" name="portfolio" id="portfolio" />
                        </div>
                        <div class="form-group">
                            <label>Experience Letter</label><br>
                            <input type="file" name="experienceLetter" id="experienceLetter"/>
                        </div>
                        <div class="form-group">
                            <label>Address Proof *</label><br>
                            <input type="file" name="addressProofImg" id="addressProofImg" required/>
                        </div>
                        <div class="form-group">
                            <label>Id Proof *</label><br>
                            <input type="file" name="idProofImg" id="idProofImg" required/>
                        </div>
                        <div class="form-group">
                            <label>Personal Note *</label><br>
                            <input type="text" name="pnote" id="pnote" />
                        </div>
                        <input type="hidden" name="referrer" id="referrer" value="<?php echo isset($_GET['referrer']) ? $_GET['referrer'] : 0; ?>"/>
                        <div class="form-submit">
                            <input type="reset" value="Reset All" class="submit" name="reset" id="reset" />
                            <input type="submit" value="Submit Form" class="submit" name="submit" id="submit" />
                        </div>
                    </form>
                </div>
            </div>
        </div>

    </div>

    <!-- JS -->
    <script src="Applicant/jquery/jquery.min.js"></script>
    <script src="js/main.js"></script>
</body><!-- This templates was made by Colorlib (https://colorlib.com) -->
</html>