<?php
require_once('../config/config.php');
require_once('../foo/functions.php');
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="../img/favicon.png">
    <title><?php echo WEB_TITLE ?></title>

    <!-- Bootstrap CSS -->    
    <link href="../css/bootstrap.min.css" rel="stylesheet">
    <!-- bootstrap theme -->
    <link href="../css/bootstrap-theme.css" rel="stylesheet">
    <!--external css-->
    <!-- font icon -->
    <link href="../css/elegant-icons-style.css" rel="stylesheet" />
    <link href="../assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
	<!-- date picker -->
    <link rel="stylesheet" type="text/css" href="../assets/bootstrap-datepicker/css/datepicker.css" />
    <!-- Custom styles -->
    <link href="../css/style.css" rel="stylesheet">
    <link href="../css/style-responsive.css" rel="stylesheet" />
	<link rel="stylesheet" href="../css/intlTelInput.css">
	<link rel="stylesheet" href="../css/countrySelect.css">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 -->
    <!--[if lt IE 9]>
    <script src="../js/html5shiv.js"></script>
    <script src="../js/respond.min.js"></script>
    <![endif]-->
</head>

  <body class="login-body">

    <div class="container">
	
	<!--header start-->
      <header class="header white-bg">

            <!--logo start-->
			<a href="<?php echo HOME_URL ?>">
			<img src="../img/logo.png" alt="<?php echo WEB_NAME ?>" />
			</a>
            <!--logo end-->

            
      </header>      
      <!--header end-->

      <form class="form-validate app-form" id="app-form" action="registered.php" method="post" enctype="multipart/form-data">
      
        <div class="login-wrap">
            <h2 class="app-form-heading">Account Application Form</h2>
			
			<!-- Error Message -->
			<?php if (!empty($_GET['error'])): ?>
			<div class="alert fade in alert-danger">
				<button data-dismiss="alert" class="close close-sm" type="button">
				<i class="icon-remove"></i>
				</button>
				<?php echo $_GET['error']?>
			</div>
			<?php endif ?>
			
			<!-- Success Message -->
			<?php if (!empty($_GET['msg'])): ?>
			<div class="alert fade in alert-success">
				<button data-dismiss="alert" class="close close-sm" type="button">
				<i class="icon-remove"></i>
				</button>
				<?php echo $_GET['msg']?>
			</div>
			<?php endif ?>

			<p>Please complete the form below to setup your account</p>
			<hr>
			<h2>Personal Information</h2>
            <div class="input-group col-sm-6">
              <input type="text" id="surname" name="surname" class="form-control" placeholder="Surname" autofocus required>
            </div>
            <div class="input-group col-sm-6">
                <input type="text" id="firstname" name="firstname" class="form-control" placeholder="Firstname" required>
            </div>
			<div class="input-group col-sm-6">
				<select id="gender" name="gender" class="form-control" required>
					<option value="">Gender</option>
					<option value="Male">Male</option>
					<option value="Female">Female</option>
				</select>
            </div>
			<div class="input-group col-sm-6">
                <input type="text" id="dpYears" name="dob" class="form-control" data-date-format="yyyy-mm-dd" data-date-viewmode="years" placeholder="Date of birth" required>
            </div>
			<div class="input-group col-sm-12">
              <input type="text" id="email" name="email" class="form-control" placeholder="Email Address" required>
            </div>
			<div class="input-group col-sm-12">
              <input type="tel" id="phone" name="phone" class="form-control" placeholder="Mobile Number" required>
            </div>
			<div class="input-group col-sm-12">
              <input type="text" id="address" name="address" class="form-control" placeholder="Address" required>
            </div>
			<div class="input-group col-sm-12">
              <input type="text" id="city" name="city" class="form-control" placeholder="City" required>
            </div>
			<div class="input-group col-sm-6">
              <input type="text" id="state" name="state" class="form-control" placeholder="State" required>
            </div>
			<div class="input-group col-sm-6">
              <input type="text" id="zip" name="zip" class="form-control" placeholder="Zip / Post Code" required>
            </div>
			<div class="input-group col-sm-12">
				<input type="tel" id="country" name="country" class="form-control" placeholder="Country" required>
            </div>
			<hr>
			<h2>Personal Identification</h2>
			<div class="input-group col-sm-12">
				<select id="identification" name="identification" class="form-control" required>
					<option value="">Identification Type</option>
					<option value="Passport">International Passport</option>
					<option value="Driver's Licence">Driver's Licence</option>
					<option value="Social Security Number">Social Security Number</option>
				</select>
            </div>
			<div class="input-group col-sm-12">
              <input type="text" id="idno" name="idno" class="form-control" placeholder="Identification Number" required>
            </div>
			<div class="input-group col-sm-12">
				<input type="text" id="dp1" name="expiry" class="form-control" data-date-format="yyyy-mm-dd" data-date-viewmode="years" placeholder="Expiry Date" required>
            </div>
			<hr>
			<h2>Passport Photo</h2>
			<div class="input-group col-sm-12">
              <input type="file" id="photo" name="photo" class="form-control" accept="image/*" placeholder="Passport Photo">
            </div>
			<div class="input-group col-sm-12">
              <img src="captcha.php" id="captcha" /><br><a href="#" onclick="
    document.getElementById('captcha').src='captcha.php?'+Math.random();
    document.getElementById('captcha-form').focus();"
    id="change-image">Change Text</a>
            </div>	
			<div class="input-group col-sm-6">
              <input type="text" id="captcha" name="captcha" class="form-control" placeholder="Word Verification" autocomplete="off" required>
            </div>			
			<div class="input-group col-sm-12">
              <button class="btn btn-primary btn-lg" name="submit" id="submit" type="submit">Submit Application</button>
            </div>
        </div>
      </form>

    </div>
	
	<!-- javascripts -->
    <script src="../js/jquery.js"></script>
    <script src="../js/bootstrap.min.js"></script>
    <!-- nice scroll -->
    <script src="../js/jquery.scrollTo.min.js"></script>
    <script src="../js/jquery.nicescroll.js" type="text/javascript"></script>
    <!-- jquery validate js -->
    <script type="text/javascript" src="../js/jquery.validate.min.js"></script>
	
	<!-- jquery ui -->
    <script src="../js/jquery-ui-1.9.2.custom.min.js"></script>
	
	<!--custom checkbox & radio-->
    <script type="text/javascript" src="../js/ga.js"></script>
    <!--custom switch-->
    <script src="../js/bootstrap-switch.js"></script>
    <!--custom tagsinput-->
    <script src="../js/jquery.tagsinput.js"></script>
    
    <!-- colorpicker -->
    <script type="text/javascript" src="../assets/bootstrap-colorpicker/js/bootstrap-colorpicker.js"></script>
	
	<!-- bootstrap-datepicker -->
    <script type="text/javascript" src="../assets/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
    <script type="text/javascript" src="../assets/bootstrap-daterangepicker/date.js"></script>
    <script type="text/javascript" src="../assets/bootstrap-daterangepicker/daterangepicker.js"></script>
	<script src="../js/intlTelInput.js"></script>
	<script>
      $("#phone").intlTelInput({
        utilsScript: "../js/utils.js"
      });
    </script>
	<script src="../js/countrySelect.js"></script>
	<script>
		$("#country").countrySelect({
			//defaultCountry: "jp",
			//onlyCountries: ['us', 'gb', 'ch', 'ca', 'do'],
			//preferredCountries: ['ca', 'gb', 'us']
		});
	</script>

    <!-- custom form validation script for this page-->
    <script src="../js/form-validation-script.js"></script>
	<!-- custom form component script for this page-->
    <script src="../js/form-component.js"></script>
    <!--custom script for all page-->
    <script src="../js/scripts.js"></script>


  </body>
</html>
