<?php
include_once('includes.php');
if(isset($_POST['code']))
{
if(true)
{
$_SESSION['code'] = $_POST['code'];
?>
location.href='index.php';
<?php
}
else
{
?>
alert('Invalid Code');
$('#submitBtn').val('Go');
$('#submitBtn').removeAttr('disabled');
<?php
}
exit;
}
session_destroy();
include_once('header.php');
?>
<script>
function validateForm()
{
$('#submitBtn').val('Please wait...');
$('#submitBtn').attr('disabled','disabled');
$.ajax({data: $('#form').serializeArray(),
type: 'POST',
dataType: 'script'
});
return false;
}
</script>
<center>
<p style="font-size:1.8em;line-height:1.2em;text-align:center">
<font style="color:yellow;font-weight:bold;font-size:1.3em">How Can I Best Serve?</font>
<br>
Registration Page
</p>
<br>
<p style="font-size:1.2em;line-height:1.2em">
Please enter your ministry code to begin.
</p>
<br>
<div class="row">
<form id="form" method="POST" onSubmit="return validateForm()"
<div class="centered six columns">
<div class="row">
<div class="eight columns">
<div class="field"><input class="input" type="text" style="font-size:1.8em;line-height:1.5em;font-weight:bold;text-align:center;padding:10px 0px;height:60px" name="code" placeholder="Code" /></div>
</div>
<div class="four columns">
<div class="large pretty rounded warning btn"><input type="submit" id="submitBtn" value="Go" style="padding:0px 30px;font-family:Abel;font-weight:bold" /></div>
</div>
</div>
</div>
</div>
</center>
<?php
include_once('footer.php');
?>