<?php
include('../includes/config.php');
    

if (isset($_GET['id']) && $_GET['id'] != NULL) {
    $id = base64_decode($_GET['id']);
    $res = mysqli_query($conn, "SELECT * FROM `customers` WHERE id='$id'");
    $data = mysqli_fetch_assoc($res);
}


if (isset($_POST['ahkweb'])  && $_POST['ahkweb'] == "ahkwebsolutions") {
    $registration_no = "uidai".rand(0000, 9999);
    $name = mysqli_real_escape_string($conn,$_POST['name']);
    $fname = mysqli_real_escape_string($conn,$_POST['fname']);
    $dob = mysqli_real_escape_string($conn,$_POST['dob']);
    $aadharno = mysqli_real_escape_string($conn,$_POST['aadharno']);
    $poi = mysqli_real_escape_string($conn,$_POST['poi']);
    $poa = mysqli_real_escape_string($conn,$_POST['poa']);
    $pob = mysqli_real_escape_string($conn,$_POST['pob']);
    $mobileno = mysqli_real_escape_string($conn,$_POST['mobile_no']);
    $email = mysqli_real_escape_string($conn,$_POST['email']);
    $purpose = mysqli_real_escape_string($conn,$_POST['purpose']);

    $username = $_SESSION['phone'];
    $ires = mysqli_query($conn,"UPDATE `usertable` SET `name`='$name', `emailid`='$email', phone='$phone', `walletamount`='$walletamount',`panwallet`='$panwallet',`state`='$state',`city`='$city',`password`='$password',`status`='$status', `usertype`='$usertype' WHERE userid='$id' ");    

    if($ires){
        ?>
        <script>
            $(function(){
                Swal.fire(
                    'Success',
                    'User Updated Successfully',
                    'success'
                )
            });
        </script>
        <?php
    }else{
        ?>
        <script>
            $(function(){
                Swal.fire(
                    'Opps',
                    'Internal Server Error Please try Agin Later',
                    'error'
                )
            });
        </script>
        <?php
    }
}
?>
   
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta charset="utf-8" />
</head>

<body style="margin: 0;">

<div id="p1" style="overflow: hidden; position: relative; background-color: white; width: 909px; height: 1286px;">

<!-- Begin shared CSS values -->
<style class="shared-css" type="text/css" >
.t {
	transform-origin: bottom left;
	z-index: 2;
	position: absolute;
	white-space: pre;
	overflow: visible;
	line-height: 1.5;
}
.text-container {
	white-space: pre;
}
@supports (-webkit-touch-callout: none) {
	.text-container {
		white-space: normal;
	}
}
</style>
<!-- End shared CSS values -->


<!-- Begin inline CSS -->
<style type="text/css" >

#t1_1{left:53px;bottom:1072px;letter-spacing:0.08px;word-spacing:-0.06px;}
#t2_1{left:502px;bottom:1072px;}
#t3_1{left:598px;bottom:1072px;letter-spacing:0.07px;}
#t4_1{left:53px;bottom:1027px;letter-spacing:0.06px;word-spacing:-0.04px;}
#t5_1{left:502px;bottom:1027px;}
#t6_1{left:598px;bottom:1027px;letter-spacing:0.07px;}
#t7_1{left:53px;bottom:982px;letter-spacing:0.06px;word-spacing:-0.04px;}
#t8_1{left:502px;bottom:982px;}
#t9_1{left:598px;bottom:982px;letter-spacing:0.07px;}
#ta_1{left:53px;bottom:937px;letter-spacing:0.06px;word-spacing:-0.04px;}
#tb_1{left:502px;bottom:937px;}
#tc_1{left:598px;bottom:937px;letter-spacing:0.06px;word-spacing:-0.04px;}
#td_1{left:53px;bottom:892px;letter-spacing:0.07px;word-spacing:-0.04px;}
#te_1{left:502px;bottom:892px;}
#tf_1{left:598px;bottom:892px;letter-spacing:0.06px;word-spacing:-0.04px;}
#tg_1{left:53px;bottom:847px;letter-spacing:0.06px;word-spacing:-0.04px;}
#th_1{left:502px;bottom:847px;}
#ti_1{left:58px;bottom:698px;letter-spacing:-0.16px;}
#tj_1{left:597px;bottom:698px;letter-spacing:-0.16px;}
#tk_1{left:58px;bottom:731px;letter-spacing:-0.14px;}
#tl_1{left:62px;bottom:632px;letter-spacing:0.35px;}
#tm_1{left:702px;bottom:632px;letter-spacing:0.32px;word-spacing:-0.02px;}
#tn_1{left:680px;bottom:616px;letter-spacing:0.32px;}
#to_1{left:598px;bottom:855px;letter-spacing:-0.27px;}
#tp_1{left:112px;bottom:1128px;letter-spacing:0.39px;word-spacing:-0.04px;}
#tq_1{left:334px;bottom:771px;letter-spacing:0.06px;word-spacing:-0.04px;}
#tr_1{left:597px;bottom:731px;letter-spacing:-0.15px;word-spacing:-0.03px;}
#ts_1{left:62px;bottom:598px;letter-spacing:0.3px;word-spacing:-0.02px;}
#tt_1{left:62px;bottom:582px;letter-spacing:0.32px;word-spacing:-0.02px;}
#tu_1{left:275px;bottom:548px;letter-spacing:0.28px;word-spacing:-0.01px;}

.s1{font-size:18px;font-family:DejaVuSans-Bold_l;color:#000;}
.s2{font-size:18px;font-family:DejaVuSans_g;color:#000;}
.s3{font-size:12px;font-family:DejaVuSans-Bold_l;color:#000;}
.s4{font-size:13px;font-family:DejaVuSans_g;color:#000;}
.s5{font-size:13px;font-family:DejaVuSans-Bold_l;color:#000;}
.s6{font-size:22px;font-family:DejaVuSans-Bold_l;color:#FFF;}
</style>
<!-- End inline CSS -->

<!-- Begin embedded font definitions -->
<style id="fonts1" type="text/css" >

@font-face {
	font-family: DejaVuSans-Bold_l;
	src: url("fonts/DejaVuSans-Bold_l.woff") format("woff");
}

@font-face {
	font-family: DejaVuSans_g;
	src: url("fonts/DejaVuSans_g.woff") format("woff");
}

</style>
<!-- End embedded font definitions -->

<!-- Begin page background -->
<div id="pg1Overlay" style="width:100%; height:100%; position:absolute; z-index:1; background-color:rgba(0,0,0,0); -webkit-user-select: none;"></div>
<div id="pg1" style="-webkit-user-select: none;"><object width="909" height="1286" data="1/1.svg" type="image/svg+xml" id="pdf1" style="width:909px; height:1286px; -moz-transform:scale(1); z-index: 0;"></object></div>
<!-- End page background -->


<!-- Begin text definitions (Positioned/styled in CSS) -->
<div class="text-container"><span id="t1_1" class="t s1">AADHAAR Number </span><span id="t2_1" class="t s2">: </span><span id="t3_1" class="t s1"><?php echo $data['aadhaar_no'] ?> </span>
<span id="t4_1" class="t s1">Enrollment Number </span> <span id="t5_1" class="t s2">: </span><span id="t6_1" class="t s3"><?php echo $data['srno'] ?> </span>
<span id="t7_1" class="t s1">Invoice Number </span><span id="t8_1" class="t s2">: </span><span id="t9_1" class="t s1">73701195 </span> 
<span id="ta_1" class="t s1">Amount Paid </span><span id="tb_1" class="t s2">: </span><span id="tc_1" class="t s1">INR 130.00 </span>
<span id="td_1" class="t s1">Date of Payment </span><span id="te_1" class="t s2">: </span><span id="tf_1" class="t s3"><?php echo $data['date'] ?> </span>
<span id="tg_1" class="t s1">Request Type </span><span id="th_1" class="t s2">: </span>
<span id="ti_1" class="t s3">NOT AVAILABLE </span><span id="tj_1" class="t s3"><?php echo $data['mobile_no'] ?> </span>
<span id="tk_1" class="t s3">Existing </span> 
<span id="tl_1" class="t s4">GSTIN/UIN:07AAAGU0182Q1ZS </span>   <span id="tm_1" class="t s4">Invoice No:73701195 </span>
<span id="tn_1" class="t s4">Date:<?php echo $data['date'] ?> </span>
<span id="to_1" class="t s5">MOBILE NO </span>
<span id="tp_1" class="t s6">Acknowledgement Slip - Online Demographics Update </span>
<span id="tq_1" class="t s1">Update Request Details </span>
<span id="tr_1" class="t s3">Corrected/Changed to </span>
<span id="ts_1" class="t s4">Received Rs 130.00 (including GST) towards update of demographics data through online SSUP </span>
<span id="tt_1" class="t s4">Payment Instrument. </span>
<span id="tu_1" class="t s4">Electronically Generated, does not require Signature. </span></div>
<!-- End text definitions -->


</div>
</body>
</html>
