Mini Shell
| Direktori : /home/mhcadmin/www/ |
|
|
| Current File : //home/mhcadmin/www/Plot_Application.php |
<!DOCTYPE html>
<html class="wide wow-animation" lang="en">
<?php
include_once('includes/Header.php');
?>
<a class="d-block" href="" target="blank"><img class="d-block w-100" src="images/MHCB1.jpg" height="200"></a>
<?php
require_once 'config/config.php';
//Get Input data from query string
$search_string = filter_input(INPUT_GET, 'search_string');
$filter_col = filter_input(INPUT_GET, 'filter_col');
$order_by = filter_input(INPUT_GET, 'order_by');
$sql = $name = $size = $type = $temp = $query = $name = $fname = $tname = "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$FullName = $_POST["FullName"];
$BusinessAddress = $_POST['BusinessAddress'];
$ResidentialAddress = $_POST['ResidentialAddress'];
$IDType = $_POST["IDType"];
$IDNumber = $_POST["IDNumber"];
$PlaceofBirth = $_POST['PlaceofBirth'];
$Email = $_POST['Email'];
$Phone = $_POST['Phone'];
$Cellphone = $_POST['Cellphone'];
$StayInMw = $_POST["StayInMw"];
$HowToDevelop = $_POST["HowToDevelop"];
$HowToDevelopSpecify = $_POST['HowToDevelopSpecify'];
$PlotType = $_POST['PlotType'];
$Location = $_POST['Location'];
$Region = $_POST["Region"];
$LiveinMHCHouse = $_POST["LiveinMHCHouse"];
$OwnRight = $_POST['OwnRight'];
$HavePlotwithMHC = $_POST['HavePlotwithMHC'];
$PlotDeveloped = $_POST["PlotDeveloped"];
$EmpStatus = $_POST["EmpStatus"];
$EmployerName = $_POST["EmployerName"];
$EmployerAddress = $_POST["EmployerAddress"];
$Salary = $_POST["Salary"];
$OtherIcomeSource = $_POST["OtherIcomeSource"];
$DevelopmentCost = $_POST["DevelopmentCost"];
date_default_timezone_set('Africa/Blantyre');
$ApplicationDate = date("d/m/Y");
$name=$_FILES['file']['name'];
$size=$_FILES['file']['size'];
$type=$_FILES['file']['type'];
$temp=$_FILES['file']['tmp_name'];
// $caption1=$_POST['caption'];
// $link=$_POST['link'];
$fname = date("YmdHis").'_'.$name;
$chk = $conn->query("SELECT * FROM PlotApplication where FName1 = '$name' ")->rowCount();
if($chk){
$i = 1;
$c = 0;
while($c == 0){
$i++;
$reversedParts = explode('.', strrev($name), 2);
$tname = (strrev($reversedParts[1]))."_".($i).'.'.(strrev($reversedParts[0]));
// var_dump($tname);exit;
$chk2 = $conn->query("SELECT * FROM PlotApplication where FName1 = '$tname' ")->rowCount();
if($chk2 == 0){
$c = 1;
$name = $tname;
}
}
}
$move = move_uploaded_file($temp,"Applications/".$fname);
if($move){
$query=$conn->query("insert into PlotApplication(FullName,BusinessAddress,ResidentialAddress,IDType,IDNumber,PlaceofBirth,Email,Phone,Cellphone,StayInMw,HowToDevelop,HowToDevelopSpecify,
PlotType,Location,Region,LiveinMHCHouse,OwnRight,HavePlotwithMHC,PlotDeveloped,EmpStatus,EmployerName,EmployerAddress,Salary,OtherIcomeSource,DevelopmentCost,FName1,FName2,Application_Date,Application_Status)
values('$FullName','$BusinessAddress','$ResidentialAddress','$IDType','$IDNumber','$PlaceofBirth','$Email','$Phone','$Cellphone','$StayInMw','$HowToDevelop','$HowToDevelopSpecify',
'$PlotType','$Location','$Region','$LiveinMHCHouse','$OwnRight','$HavePlotwithMHC','$PlotDeveloped','$EmpStatus','$EmployerName','$EmployerAddress','$Salary','$OtherIcomeSource','$DevelopmentCost','$name','$fname','$ApplicationDate','New')");
}
if($query){
?>
<h5 align = "center" color = "green"> <?php echo "Application Submitted successfully"; ?></h5>
<?php
}else {
?>
<h5 align = "center" color = "green"> <?php echo "Oops! something went wrong. Please Resend the Application"; ?></h5>
<?php
}}
?>
<section class="section section-md bg-gray-100">
<div class="container text-center">
<div class="row row-50 text-start">
<div class="col-lg-12">
<!-- Heading Component-->
<article class="heading-component">
<div class="heading-component-inner">
<h5 class="heading-component-title">plot application form
</h5>
</div>
</article>
<article class="post-classic">
<div class="post-classic-aside"><a class="post-classic-figure" href="Forms/Rent Payment Platforms.pdf"><img src="images/PDF.png" alt="" width="34" height="34"/> Rent Payment Platforms </a></div>
<div class="post-classic-main">
</div>
</article>
<article class="post-classic">
<div class="post-classic-aside"><a class="post-classic-figure" href="Forms/MHC_PLOT_APPLICATION_FORM.pdf"><img src="images/PDF.png" alt="" width="34" height="34"/> House Application Form</a></div>
<div class="post-classic-main">
</div>
</article>
<!-- Post Classic-->
<article class="post-classic">
<div class="post-classic-aside"><a class="post-classic-figure" href="Forms/MHC_PLOT_APPLICATION_FORM.pdf"><img src="images/PDF.png" alt="" width="34" height="34"/> Plot Application Form</a></div>
<div class="post-classic-main">
</div>
</article>
</div>
<div class="col-md-12">
<div class="row row-50">
<div class="col-lg-6">
<!-- Heading Component-->
<article class="heading-component">
<div class="heading-component-inner">
<h5 class="heading-component-title">Personal Details
</h5>
</div>
</article>
<form action="" method="POST" enctype="multipart/form-data">
<div class="form-wrap">
<div class="row row-10 row-narrow">
<div class="col-md-12">
<div class="form-wrap">
<label class="form-label" for="FullName">Full Name *</label>
<input class="form-input" id="FullName" type="text" name="FullName" data-constraints="@Required">
</div>
</div>
<div class="col-md-12">
<div class="form-wrap">
<label class="form-label" for="BusinessAddress">Bussess/Postal Address</label>
<input class="form-input" id="BusinessAddress" type="text" name="BusinessAddress">
</div>
</div>
<div class="col-md-12">
<div class="form-wrap">
<label class="form-label" for="ResidentialAddress">Physical/ Residental Address *</label>
<input class="form-input" id="ResidentialAddress" type="text" name="ResidentialAddress" data-constraints="@Required">
</div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<select name="IDType" class="form-control selectpicker" required >
<option value=""><h6>Select ID Type *</h6></option>
<option value="National ID"><h6>National ID</h6></option>
<option value="Passport"><h6>Passport</h6></option>
</select> </div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<label class="form-label" for="IDNumber">ID Number *</label>
<input class="form-input" id="IDNumber" type="text" name="IDNumber" data-constraints="@Required">
</div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<label class="form-label" for="PlaceofBirth">Place of Birth *</label>
<input class="form-input" id="PlaceofBirth" type="text" name="PlaceofBirth" data-constraints="@Required">
</div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<label class="form-label" for="Email">Email Address</label>
<input class="form-input" id="Email" type="text" name="Email" data-constraints="@Email">
</div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<label class="form-label" for="Phone">TelePhone</label>
<input class="form-input" id="Phone" type="text" name="Phone" data-constraints="@Numeric">
</div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<label class="form-label" for="Cellphone">CellPhone *</label>
<input class="form-input" id="Cellphone" type="text" name="Cellphone" data-constraints="@Required @Numeric">
</div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<label class="form-label" for="StayInMw">Length of Stay in Malawi *</label>
<input class="form-input" id="StayInMw" type="text" name="StayInMw" data-constraints="@Required">
</div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<select name="HowToDevelop" class="form-control selectpicker" required >
<option value=""><h6>How do you intend to develop it *</h6></option>
<option value="Income"><h6>Income</h6></option>
<option value="Savings"><h6>Savings (specify)</h6></option>
<option value="donations"><h6>Donations ( specify)</h6></option>
<option value="Employer Loan"><h6>Employer's loan</h6></option>
<option value="Montgage"><h6>Mortgage</h6></option>
<option value="Other"><h6>Other ( specify)</h6></option>
</select> </div>
</div>
<div class="col-md-12">
<div class="form-wrap">
<label class="form-label" for="HowToDevelopSpecify">Specify here where neccessary</label>
<input class="form-input" id="HowToDevelopSpecify" type="text" name="HowToDevelopSpecify">
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label class="col-md-12" >Upload file (doc/pdf less than 2MB)
<input type="file" name="file" id="file" required />
</label></div>
</div>
<div class="col-md-12">
<div class="form-wrap">
<label> PLEASE, your uploaded file should include the following as one document; <br>
(i) a Passport photo, (ii) a Proof of Fee payment i.e deposit slip,
<br>(iii)a Pre-filled Employer reference Form (if employeed)- <a href="Forms/MHC_PLOT_APPLICATION_FORM.pdf">Download the form</a>
<br>(iv) or a Pre-filled Guarantor form (if unemployed)- <a href="Forms/MHC_PLOT_APPLICATION_FORM.pdf">Download the form</a></label>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-6">
<!-- Heading Component-->
<article class="heading-component">
<div class="heading-component-inner">
<h5 class="heading-component-title">Application Details
</h5>
</div>
</article>
<div class="form-wrap">
<div class="row row-10 row-narrow">
<div class="col-md-6">
<div class="form-wrap">
<select name="PlotType" class="form-control selectpicker" required >
<option value=""><h6>Select Type of Plot *</h6></option>
<option value="Low density Housing Area"><h6>Low density Housing Area</h6></option>
<option value="Medium density Housing"><h6>Medium density Housing</h6></option>
<option value="High density Housing Area"><h6>High density Housing Area</h6></option>
<option value="Commercial"><h6>Commercial</h6></option>
<option value="Institutional"><h6>Institutional</h6></option>
</select> </div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<label class="form-label" for="Location">Location *</label>
<input class="form-input" id="Location" type="text" name="Location" data-constraints="@Required">
</div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<select name="Region" class="form-control selectpicker" required >
<option value=""><h6>Select Region *</h6></option>
<option value="South"><h6>South</h6></option>
<option value="East"><h6>East</h6></option>
<option value="Center"><h6>Center</h6></option>
<option value="North"><h6>North</h6></option>
</select> </div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<label class="form-label" for="LiveinMHCHouse">Do You Reside in MHC House *</label>
<input class="form-input" id="LiveinMHCHouse" type="text" name="LiveinMHCHouse" data-constraints="@Required">
</div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<label class="form-label" for="OwnRight">If yes, did you get it in your own right</label>
<input class="form-input" id="OwnRight" type="text" name="OwnRight">
</div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<select name="HavePlotwithMHC" class="form-control selectpicker" required >
<option value=""><h6>Do You have a plot with MHC *</h6></option>
<option value="Yes"><h6>Yes</h6></option>
<option value="No"><h6>No</h6></option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<label class="form-label" for="PlotDeveloped">If Yes, is the plot developed</label>
<input class="form-input" id="PlotDeveloped" type="text" name="PlotDeveloped" >
</div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<select name="EmpStatus" class="form-control selectpicker" required >
<option value=""><h6>Employement Status *</h6></option>
<option value="Working"><h6>Employed</h6></option>
<option value="Business"><h6>Self Employed</h6></option>
<option value="Student"><h6>Unemployed</h6></option>
</select> </div>
</div>
<div class="col-md-12">
<div class="form-wrap">
<label class="form-label" for="EmployerName">Employer Name</label>
<input class="form-input" id="EmployerName" type="text" name="EmployerName">
</div>
</div>
<div class="col-md-12">
<div class="form-wrap">
<label class="form-label" for="EmployerAddress">Employer Address</label>
<input class="form-input" id="EmployerAddress" type="text" name="EmployerAddress" >
</div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<label class="form-label" for="Salary">Monthly / Annual Salary in MK *</label>
<input class="form-input" id="Salary" type="text" name="Salary" data-constraints="@Required">
</div>
</div>
<div class="col-md-6">
<div class="form-wrap">
<label class="form-label" for="OtherIcomeSource">Other sources of Income</label>
<input class="form-input" id="OtherIcomeSource" type="text" name="OtherIcomeSource">
</div>
</div>
<div class="col-md-12">
<div class="form-wrap">
<label class="form-label" for="DevelopmentCost">State the estimated cost of the development in MK. *</label>
<input class="form-input" id="DevelopmentCost" type="text" name="DevelopmentCost" data-constraints="@Required">
</div>
</div>
<div class="col-md-12">
<div class="form-wrap">
<input name="input-radio" value="radio-1" type="radio" required> DECLARATION: I enclose the application fee of K5,000.00. I also declare that the information given in this form is true and correct to the best of my knowledge. I understand that any false information will render my application void.
</div>
</div>
<div class="col-md-6">
<div class="form-wrap">
</div>
</div>
<div class="col-md-6">
<button class="button button-lg button-primary button-block" type="submit">Send Application</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<!-- Page Footer-->
<?php
include_once('includes/Footer.php');
?>
</body>
</html>