Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/indem/iiita/
Upload File :
Current File : /var/www/html/mmishra/indem/iiita/map_online.php

<?php
//checkadmin($role);
$tbl = 'maps';

$id = $_REQUEST["id"];
$submit = $_POST["submit"];
if ($submit == 'SUBMIT') {
	$scheme_name = $_POST["scheme_name"];
	$scheme_code = $_POST["scheme_code"];
	$property_category = $_POST["property_category"];
	$property_code = $_POST["property_code"];
	$applicant_name = $_POST["applicant_name"];
	$present_address = $_POST["present_address"];
	$phone_no = $_POST["phone_no"];
	$email = $_POST["email"];
	$property_size = $_POST["property_size"];

        if (mysql_num_rows(mysql_query("select * from $tbl where id=$id"))) {
                mysql_query("update $tbl set scheme_name='$scheme_name',scheme_code='$scheme_code',
		property_category='$property_category',property_code='$property_code',applicant_name='$applicant_name',
		present_address='$present_address',phone_no='$phone_no',email='$email',property_size='$property_size'
		where id=$id");
        } else {
                mysql_query("insert into $tbl(scheme_name,scheme_code,property_category,property_code,applicant_name,
		present_address,phone_no,email,property_size,dated)
		values('$scheme_name','$scheme_code','$property_category','$property_code','$applicant_name',
		'$present_address','$phone_no','$email','$property_size',now())");
		
		$refno = "ADA-Map-".mysql_insert_id();
		
		echo "Thanks for submission...<p>
		Your map reference number is <b>$refno</b><br>
		Please use your reference number in further communication with Development Authority.";

	}
	$text = "Reference No.: $refno\nName: $applicant_name\nScheme: $scheme_name\nProperty: $property_code\nArea: $property_size square meter";
        $droot = $_SERVER["DOCUMENT_ROOT"];
	create_img("$droot/maps/drawing1.jpg","$droot/maps/$refno.jpg",$text,'red','arial',14,0,0,-50,'yellow');
        echo "<p>[ <a href='maps/$refno.jpg'>Click here to download below map</a> ]
	<hr><img src='maps/$refno.jpg' border='5' width='100%'>";
} else {
	echo "<marquee><b>under development</b></marquee>";
	include "map_form.inc";
}
?>