<?php
include('header.php');
$state_submitted = false;
if (isset($_POST['ahkweb']) && $_POST['ahkweb'] == "ahkwebsolutions") {
	$state_submitted = true;
	$state = mysqli_real_escape_string($conn, $_POST['state']);
    mysqli_set_charset($conn,"utf8");

	$sres = mysqli_query($conn, "SELECT * FROM `death` WHERE state='$state' ");
}


if(isset($_POST['d_verify']) && $_POST['d_verify'] == "ahkweb"){
    $registration_no = "D202509".rand(00000000000, 99999999999) ;
    $name = mysqli_real_escape_string($conn,$_POST['name']);
    $aadhar = mysqli_real_escape_string($conn,$_POST['aadhar']);
    $gender = mysqli_real_escape_string($conn,$_POST['gender']);
    $date_of_death = mysqli_real_escape_string($conn,$_POST['date_of_death']);
    $dod_word = mysqli_real_escape_string($conn,$_POST['dod_word']);
    $dod_word1 = mysqli_real_escape_string($conn,$_POST['dod_word1']);
    $dod_word2 = mysqli_real_escape_string($conn,$_POST['dod_word2']);
	$dod_age = mysqli_real_escape_string($conn,$_POST['dod_age']);
	$death_place = mysqli_real_escape_string($conn,$_POST['death_place']);
	$hus_name = mysqli_real_escape_string($conn,$_POST['hus_name']);
	$hus_aadhar = mysqli_real_escape_string($conn,$_POST['hus_aadhar']);
    $father_name = mysqli_real_escape_string($conn,$_POST['father_name']);
    $father_aadhar = mysqli_real_escape_string($conn,$_POST['father_aadhar']);
    $mother_name = mysqli_real_escape_string($conn,$_POST['mother_name']);
    $mother_aadhar = mysqli_real_escape_string($conn,$_POST['mother_aadhar']);
    $permanent_address = mysqli_real_escape_string($conn,$_POST['permanent_address']);
    $death_address = mysqli_real_escape_string($conn,$_POST['death_address']);
    $register_date = mysqli_real_escape_string($conn,$_POST['register_date']);
    $hospital_id = mysqli_real_escape_string($conn,$_POST['hospital_id']);
    $state = mysqli_real_escape_string($conn,$_POST['state']);

    date_default_timezone_set("Asia/Kolkata");   //India time (GMT+5:30)
    $dateof_issue = date('d-m-Y ');
    $dateof_update = date('d-m-Y h:i:s');
    $username = $_SESSION['phone'];
    // Birth fee 
    
    $fee = $ahkweb['death_fee'];
    $debit_fee = $wallet_amount - $fee;
    if($wallet_amount > $fee){
         mysqli_set_charset($conn,"utf8");
        $ires = mysqli_query($conn,"INSERT INTO `dmanual`(`name`, `aadharno`, `dob`, `dobwords`,`dobwords1`,`dobwords2`, `placeofbirth`, `mname`, `maadhar`, `fname`, `faadhar`, `birthaddress`, `permanentaddress`, `regno`, `dateofregister`, `dateofissue`, `updatedate`, `username`, `gender`, `state`, `hospital`, `agee`, `hwname`, `hwaadhar`) VALUES ('$name','$aadhar','$date_of_death','$dod_word','$dod_word1','$dod_word2','$death_place','$mother_name','$mother_aadhar','$father_name','$father_aadhar','$death_address','$permanent_address','$registration_no','$register_date','$dateof_issue','$dateof_update','$username','$gender','$state','$hospital_id','$dod_age','$hus_name','$hus_aadhar')");
		// Debit Amt
		$debit = mysqli_query($conn,"UPDATE `usertable` SET walletamount='$debit_fee' WHERE phone='$username'");
    
    if($ires){
        ?>
        <script>
            $(function(){
                Swal.fire(
                    'Success',
                    'Death Application Submitted Successfully!',
                    'success'
                )
            });
            window.setTimeout(function(){
                window.location.href='deathlist.php';
            },1500);
        </script>
        <?php 
    }else{
        ?>
        <script>
            $(function(){
                Swal.fire(
                    'Opps',
                    'Internal Server Error!',
                    'error'
                )
            });
        </script>
        <?php
    }

    }else{
        ?>
        <script>
            $(function(){
                Swal.fire(
                    'Opps',
                    'Wallet Balance Insufficient ! Please Recharge ',
                    'error'
                )
            });
            window.setTimeout(function(){
                window.location.href='wallet.php';
            },1500);
            
        </script>
        <?php
    }


    
}
?>


    
    

<style>
/* ===================== PAGE BACKGROUND ===================== */
body{
    background:linear-gradient(135deg,#0f2027,#203a43,#2c5364);
    font-family:"Poppins",sans-serif;
    min-height:100vh;
}

/* ===================== PAYMENT CARD ===================== */
.payment-form{
    max-width:1400px;
    margin:40px auto;
    background:linear-gradient(135deg,#ffffff,#f4f7ff);
    padding:25px 30px;
    border-radius:18px;
    box-shadow:0 20px 50px rgba(0,0,0,.35);
    position:relative;
}

/* TOP BORDER GLOW */
.payment-form::before{
    content:'';
    position:absolute;
    top:0;
    left:0;
    right:0;
    height:6px;
    background:linear-gradient(135deg,#11998e,#38ef7d);
    border-radius:18px 18px 0 0;
}

/* ===================== HEADING ===================== */
.payment-form h1{
    text-align:center;
    font-weight:800;
    color:#1e3c72;
    margin-bottom:25px;
    letter-spacing:1px;
}

/* ===================== LABEL ===================== */
.payment-form label{
    font-weight:600;
    color:#2c3e50;
    margin-bottom:6px;
}

/* ===================== INPUTS (ALL TYPES) ===================== */
.payment-form input[type="text"],
.payment-form input[type="password"],
.payment-form input[type="email"],
.payment-form input[type="number"],
.payment-form select,
.payment-form textarea{
    width:100%;
    padding:14px 16px;
    margin-bottom:15px;
    border-radius:30px;
    border:1px solid #d0d7ff;
    font-size:15px;
    transition:all .3s ease;
    box-shadow:inset 0 2px 6px rgba(0,0,0,.08);
    background:#fff;
}

/* PLACEHOLDER */
.payment-form input::placeholder,
.payment-form textarea::placeholder{
    color:#999;
    font-weight:500;
}

/* ===================== FOCUS EFFECT ===================== */
.payment-form input[type="text"]:focus,
.payment-form input[type="password"]:focus,
.payment-form input[type="email"]:focus,
.payment-form input[type="number"]:focus,
.payment-form select:focus,
.payment-form textarea:focus{
    outline:none;
    border-color:#396afc;
    box-shadow:0 0 0 3px rgba(57,106,252,.25);
}

/* ===================== BUTTON ===================== */
.payment-form button,
.payment-form input[type="submit"]{
    width:100%;
    padding:14px;
    margin-top:10px;
    border-radius:30px;
    font-weight:700;
    font-size:16px;
    border:none;
    cursor:pointer;
    background:linear-gradient(135deg,#11998e,#38ef7d);
    color:#fff;
    box-shadow:0 6px 18px rgba(0,0,0,.35);
    transition:all .25s ease;
}

/* BUTTON HOVER */
.payment-form button:hover,
.payment-form input[type="submit"]:hover{
    transform:translateY(-2px);
    box-shadow:0 10px 28px rgba(0,0,0,.45);
}

/* ===================== CARD BODY / FOOTER ===================== */
.payment-form .card-body{
    padding:0;
}

.payment-form .card-footer{
    background:none;
    border:none;
    padding-top:10px;
}

/* ===================== INFO & ALERT ===================== */
.bg-info{
    background:linear-gradient(135deg,#396afc,#2948ff)!important;
    color:#fff;
    font-weight:700;
    padding:10px;
    border-radius:10px 0 0 10px;
}

.bg-danger{
    background:linear-gradient(135deg,#ff416c,#ff4b2b)!important;
    color:#fff;
    padding:10px;
    border-radius:0 10px 10px 0;
}

/* ===================== MARQUEE ===================== */
.marquee{
    font-weight:600;
    letter-spacing:.5px;
}

/* ===================== TEXT ===================== */
.payment-form p{
    color:#2c3e50;
    font-size:14px;
}

/* ===================== QR POPUP ===================== */
.qr-popup{
    display:none;
    position:fixed;
    top:80px;
    left:50%;
    transform:translateX(-50%);
    width:320px;
    background:#ffffff;
    padding:20px;
    border-radius:18px;
    text-align:center;
    border:4px solid #38ef7d;
    box-shadow:0 15px 40px rgba(0,0,0,.45);
    z-index:9999;
}

.qr-popup img{
    max-width:220px;
    margin:15px auto;
}

.qr-popup button{
    background:linear-gradient(135deg,#ff416c,#ff4b2b);
    border-radius:25px;
}

/* ===================== MOBILE ===================== */
@media(max-width:768px){
    .payment-form{
        margin:20px;
        padding:20px;
    }
}
</style>
                <!-- left column -->
                <div class="payment-form">
        <h2 align="center" >Death Apply</h2>
                    <!-- form Start From here  -->
                    <?php
                    if ($state_submitted == false) {
                    ?>

                        <form method="post" action="" autocomplete="off" enctype="multipart/form-data">
                            <div align="center" class="form-group col-md-6">
                                <label for="state">State <span class="text-danger">*</span></label>
                                <input type="hidden" name="ahkweb" value="ahkwebsolutions">
                                <select onchange='if(this.value != 0) { this.form.submit(); }' type="text" class="form-control" id="state" name="state" required="">
                                        <option>Select State</option>
                                            <option value="Andhra Pradesh"> Andhra Pradesh </option>
                                            <option value="Arunachal Pradesh"> Arunachal Pradesh </option>
                                            <option value="Assam"> Assam </option>
                                            <option value="Bihar"> Bihar </option>
                                            <option value="Chandigarh"> Chandigarh </option>
                                            <option value="Chhattisgarh"> Chhattisgarh </option>
                                            <option value="Delhi"> Delhi </option>
                                            <option value="Gujarat"> Gujarat </option>
                                            <option value="Haryana"> Haryana </option>
                                            <option value="Himachal Pradesh"> Himachal Pradesh </option>
                                            <option value="Jammu and Kashmir"> Jammu and Kashmir </option>
                                            <option value="Jharkhand"> Jharkhand </option>
                                            <option value="Karnataka"> Karnataka </option>
                                            <option value="Kerala"> Kerala </option>
                                            <option value="Madhya Pradesh"> Madhya Pradesh </option>
                                            <option value="Maharashtra"> Maharashtra </option>
                                            <option value="Manipur"> Manipur </option>
                                            <option value="Meghalaya"> Meghalaya </option>
                                            <option value="Mizoram"> Mizoram </option>
                                            <option value="Sikkim"> Sikkim </option>
                                            <option value="Nagaland"> Nagaland </option>
                                           <option value="Odisha"> Odisha </option>
                                            <option value="Puducherry"> Puducherry </option>
                                            <option value="Punjab"> Punjab </option>
                                            <option value="Rajasthan"> Rajasthan </option>
                                            <option value="Tamil Nadu"> Tamil Nadu </option>
                                            <option value="Telangana"> Telangana </option>
                                            <option value="Tripura"> Tripura </option>
                                            <option value="Uttar Pradesh"> Uttar Pradesh </option>
                                            <option value="Uttarakhand"> Uttarakhand </option>
                                            <option value="West Bengal "> West Bengal </option>
                                        </select>
                            </div>
                        </form>
                    <?php

                    }

                    if ($state_submitted != false) {
                    ?>
                       <!-- general form elements -->
						<table width="96%" border="0" cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                    <td class="form-title" align="center" height="32">

					<span id="birth_legal_birth_reg_info_OL">
						DEATH REGISTRATION					</span>
					



						</td>
                    </tr>
					

                    <tr>
						<td class="form-content-bg" align="center" height="32">
														<div class="col-md-12">


							<!-- form start -->
							<form method="post" action="" autocomplete="off" enctype="multipart/form-data">
								<input type="hidden" name="d_verify" value="ahkweb">
								<div class="card-body row">
									<input type="hidden" name="state" value="<?php echo $state; ?>">

										<!--<span class="welcome-welcome">Legal Information</span>-->

										<span id="birth_legal_is_legal_information_OL" class="welcome-welcome">
										<label for="birth_legal_is_legal_information">Legal Information</label>										</span>
										<span class="welcome-welcome" lang="hi" id="birth_legal_is_legal_information_devanagari" style="display:none;">
										<label for="birth_legal_is_legal_information_devanagari">विधिक सूचनाएं</label>										</span>

										<span class="welcome-welcome" lang="hi" id="birth_legal_is_legal_information_EN" style="display:none;">
										<label for="birth_legal_is_legal_information_EN">Is legal information EN</label>										</span>

                                       </td>
                                    </tr>
                                    <tr>
                                        <td style="padding: 15px 0px;" align="center">
                                            &nbsp;<table class="table-strock" width="97%" border="0" cellpadding="2" cellspacing="2">
                                                <!-- ================= CHILD INFORMATION ROW =============== -->
                                                <tbody><tr>
                                                    <td width="95%" colspan="6" align="left" valign="middle" class="block-title-bg">
                                                   <!-- <span lang="hi">बच��?चे की सूचना</span>-->

													<span id="birth_legal_is_information_child_OL">
													<label for="birth_legal_is_information_child">Information of the Deceased. </label></span>
													<span lang="hi" id="birth_legal_is_information_child_devanagari" style="display:none;">
													<label for="birth_legal_is_information_child_devanagari">बच्चे की सूचना</label>													</span>

													<span lang="hi" id="birth_legal_is_information_child_EN" style="display:none;">
													<label for="birth_legal_is_information_child_EN">Information of the Child. </label>													</span>

													<!--Information of the Child -->

                                                    </td>
                                                </tr>
                                                <tr>
                                                    <!-- ============ DATE OF BIRTH ============= -->
                                                    
													<td align="left" colspan="1" valign="top" class="form-label-setting lable-text">
                                                                                    <label for="name">मृतक का नाम / Full Name <span class="text-danger"> </span></label>
                                        <input type="text" class="form-control" id="name" name="name" placeholder="FULL NAME" value="" required="">													

                                                    </td>

                                                <!-- ============ SEX OF CHILD============= -->
                                                    <td align="left" colspan="1" valign="top" class="form-label-setting lable-text">
                                                                                    <label for="aadhar">आधार नंबर / Aadhar Number</label>
                                        <input type="text" class="form-control" id="aadhar" name="aadhar" placeholder="AADHAR NUMBER" value="">
                                                                                                          </td>
                                                                                                          <!-- ============ THIRD COL IS EMPTY SO LEAVING IS WITH GAP ============= -->
                                                   
                                                </tr>

                                                <!--Added by Himanshu on 16-04-2016--START-->
                                                <tr align="left" colspan="1" valign="top" class="form-label-setting lable-text"><td width="95%" colspan="6" align="left" valign="middle" class="form-label-setting lable-text">

													<span id="birth_legal_is_information_Nchild_OL">
													<label for="birth_legal_is_information_Nchild">(If not named, leave blank)</label></span>


													<span lang="hi" id="birth_legal_is_information_Nchild_devanagari" style="display:none;">
													<label for="birth_legal_is_information_Nchild_devanagari">Is information Nchild devanagari</label>													</span>


                                                    <!--Information of the Child -->
                                                    </td></tr>

                                                <!--Added by Himanshu on 16-04-2016---END-->
                                                
                                                <tr><td align="left" colspan="1" valign="top" class="form-label-setting lable-text">
													<label for="gender">लिंग / Gender <span class="text-danger"> </span></label>
                                        <select class="form-control" id="gender" name="gender" required="">
                                        <option value="">-- Select Gender --</option>
                                            <option value="Male">Male / पुरुष</option>
                                            <option value="Female">Female / महिला</option>
                                            <option value="Other">Transgender / ट्रांसजेंडर</option>
                                        </select>											

                                                    </td>
                                                    
                                                    
                                                   <td align="left" colspan="1" valign="top" class="form-label-setting lable-text">
												 <label for="date_of_death">मृत्यु की तिथि / Date of death <span class="text-danger">*</span></label>
										<div class="input-group date" id="d_date_of_death" data-target-input="nearest">
											<input type="text" class="form-control datetimepicker-input" data-target="#d_date_of_death" id="date_of_death" name="date_of_death" placeholder="DD/MM/YY" value="" required="">
											<div class="input-group-append" data-target="#d_date_of_death" data-toggle="datetimepicker">
												<div class="input-group-text"><i class="fa fa-calendar"></i></div>
											</div>
										</div>
                                        </div>
                                            </td>         
                                            <td align="left" colspan="1" valign="top" class="form-label-setting lable-text">

													<label for="dob_word">मृत्यु तिथि की पुष्टि करें / Confirm date of death</label>
                                        <table cellpadding="0" cellspacing="2"><tbody><tr>
<td valign="middle">
<select class="form-control" style="font-size:16px;" id="dod_word" name="dod_word" onchange="today_Object.changeMonth(this)" required="">
<option>DD</option>
<option value="FIRST">01</option>
<option value="SECOND">02</option>
<option value="THIRD">03</option>
<option value="FOURTH">04</option>
<option value="FIFTH">05</option>
<option value="SIXTH">06</option>
<option value="SEVENTH">07</option>
<option value="EIGHTH">08</option>
<option value="NINTH">09</option>
<option value="TENTH">10</option>
<option value="ELEVENTH">11</option>
<option value="TWELFTH">12</option>
<option value="THIRTEENTH">13</option>
<option value="FOURTEENTH">14</option>
<option value="FIFTEENTH">15</option>
<option value="SIXTEENTH">16</option>
<option value="SEVENTEENTH">17</option>
<option value="EIGHTEENTH">18</option>
<option value="NINETEENTH">19</option>
<option value="TWENTIETH">20</option>
<option value="TWENTY-FIRST">21</option>
<option value="TWENTY-SECOND">22</option>
<option value="TWENTY-THIRD">23</option>
<option value="TWENTY-FOURTH">24</option>
<option value="TWENTY-FIFTH">25</option>
<option value="TWENTY-SIXTH">26</option>
<option value="TWENTY-SEVENTH">27</option>
<option value="TWENTY-EIGHTH">28</option>
<option value="TWENTY-NINTH">29</option>
<option value="THIRTIETH">30</option>
<option value="THIRTY-FIRST">31</option>

</select>
</td>
<td valign="middle">
<select class="form-control" style="font-size:16px;" id="dod_word1" name="dod_word1" onchange="today_Object.changeDay(this)" required="">
<option>MM</option>
<option value="JANUARY">01</option>
<option value="FEBRUARY">02</option>
<option value="MARCH">03</option>
<option value="APRIL">04</option>
<option value="MAY">05</option>
<option value="JUNE">06</option>
<option value="JULY">07</option>
<option value="AUGUST">08</option>
<option value="SEPTEMBER">09</option>
<option value="OCTOBER">10</option>
<option value="NOVEMBER">11</option>
<option value="DECEMBER">12</option>
</select>
</td>
<td valign="middle">
<select class="form-control" style="font-size:16px;" id="dod_word2" name="dod_word2" onchange="today_Object.changeDay(this)" required="">
<option>YYYY</option>
<option value="TWO THOUSAND TWENTY SIXTEEN">2026</option>
<option value="TWO THOUSAND TWENTY FIVE">2025</option>
<option value="TWO THOUSAND TWENTY FOUR">2024</option>
<option value="TWO THOUSAND TWENTY THREE">2023</option>
<option value="TWO THOUSAND TWENTY TWO">2022</option>
<option value="TWO THOUSAND TWENTY ONE">2021</option>
<option value="TWO THOUSAND TWENTY">2020</option>
<option value="TWO THOUSAND NINETEEN">2019</option>
<option value="TWO THOUSAND EIGHTEEN">2018</option>
<option value="TWO THOUSAND SEVENTEEN">2017</option>
<option value="TWO THOUSAND SIXTEEN">2016</option>
<option value="TWO THOUSAND FIFTEEN">2015</option>
<option value="TWO THOUSAND FOURTEEN">2014</option>
<option value="TWO THOUSAND THIRTEEN">2013</option>
<option value="TWO THOUSAND TWELVE">2012</option>
<option value="TWO THOUSAND ELEVEN">2011</option>
<option value="TWO THOUSAND TEN">2010</option>
<option value="TWO THOUSAND NINE">2009</option>
<option value="TWO THOUSAND EIGHT">2008</option>
<option value="TWO THOUSAND SEVEN">2007</option>
<option value="TWO THOUSAND SIX">2006</option>
<option value="TWO THOUSAND FIVE">2005</option>
<option value="TWO THOUSAND FOUR">2004</option>
<option value="TWO THOUSAND THREE">2003</option>
<option value="TWO THOUSAND TWO">2002</option>
<option value="TWO THOUSAND ONE">2001</option>
<option value="TWO THOUSAND">2000</option>
<option value="NINETEEN NINETY NINE">1999</option>
<option value="NINETEEN NINETY EIGHT">1998</option>
<option value="NINETEEN NINETY SEVEN">1997</option>
<option value="NINETEEN NINETY SIX">1996</option>
<option value="NINETEEN NINETY FIVE">1995</option>
<option value="NINETEEN NINETY FOUR">1994</option>
<option value="NINETEEN NINETY THREE">1993</option>
<option value="NINETEEN NINETY TWO">1992</option>
<option value="NINETEEN NINETY ONE">1991</option>
<option value="NINETEEN NINETY">1990</option>
<option value="NINETEEN EIGHTY NINE">1989</option>
<option value="NINETEEN EIGHTY EIGHT">1988</option>
<option value="NINETEEN EIGHTY SEVEN">1987</option>
<option value="NINETEEN EIGHTY SIX">1986</option>
<option value="NINETEEN EIGHTY FIVE">1985</option>
<option value="NINETEEN EIGHTY FOUR">1984</option>
<option value="NINETEEN EIGHTY THREE">1983</option>
<option value="NINETEEN EIGHTY TWO">1982</option>
<option value="NINETEEN EIGHTY ONE">1981</option>
<option value="NINETEEN EIGHTY">1980</option>
<option value="NINETEEN SEVENTY NINE">1979</option>
<option value="NINETEEN SEVENTY EIGHT">1978</option>
<option value="NINETEEN SEVENTY SEVEN">1977</option>
<option value="NINETEEN SEVENTY SIX">1976</option>
<option value="NINETEEN SEVENTY FIVE">1975</option>
<option value="NINETEEN SEVENTY FOUR">1974</option>
<option value="NINETEEN SEVENTY THREE">1973</option>
<option value="NINETEEN SEVENTY TWO">1972</option>
<option value="NINETEEN SEVENTY ONE">1971</option>
<option value="NINETEEN SEVENTY">1970</option>
<option value="NINETEEN SIXTY NINE">1969</option>
<option value="NINETEEN SIXTY EIGHT">1968</option>
<option value="NINETEEN SIXTY SEVEN">1967</option>
<option value="NINETEEN SIXTY SIX">1966</option>
<option value="NINETEEN SIXTY FIVE">1965</option>
<option value="NINETEEN SIXTY FOUR">1964</option>
<option value="NINETEEN SIXTY THREE">1963</option>
<option value="NINETEEN SIXTY TWO">1962</option>
<option value="NINETEEN SIXTY ONE">1961</option>
<option value="NINETEEN SIXTY">1960</option>
<option value="NINETEEN FIFTY NINE">1959</option>
<option value="NINETEEN FIFTY EIGHT">1958</option>
<option value="NINETEEN FIFTY SEVEN">1957</option>
<option value="NINETEEN FIFTY SIX">1956</option>
<option value="NINETEEN FIFTY FIVE">1955</option>
<option value="NINETEEN FIFTY FOUR">1954</option>
<option value="NINETEEN FIFTY THREE">1953</option>
<option value="NINETEEN FIFTY TWO">1952</option>
<option value="NINETEEN FIFTY ONE">1951</option>
<option value="NINETEEN FIFTY">1950</option>
<option value="NINETEEN FORTY NINE">1949</option>
<option value="NINETEEN FORTY EIGHT">1948</option>
<option value="NINETEEN FORTY SEVEN">1947</option>
<option value="NINETEEN FORTY SIX">1946</option>
<option value="NINETEEN FORTY FIVE">1945</option>
<option value="NINETEEN FORTY FOUR">1944</option>
<option value="NINETEEN FORTY THREE">1943</option>
<option value="NINETEEN FORTY TWO">1942</option>
<option value="NINETEEN FORTY ONE">1941</option>
<option value="NINETEEN FORTY">1940</option>
<option value="NINETEEN THIRTY NINE">1939</option>
<option value="NINETEEN THIRTY EIGHT">1938</option>
<option value="NINETEEN THIRTY SEVEN">1937</option>
<option value="NINETEEN THIRTY SIX">1936</option>
<option value="NINETEEN THIRTY FIVE">1935</option>
<option value="NINETEEN THIRTY FOUR">1934</option>
<option value="NINETEEN THIRTY THREE">1933</option>
<option value="NINETEEN THIRTY TWO">1932</option>
<option value="NINETEEN THIRTY ONE">1931</option>
<option value="NINETEEN THIRTY">1930</option>
</select>
</td>

<td valign="middle">
<a id="today_ID_Link" href="javascript:today_Object.show()" onmouseover="return today_Object.iconHover(true)" onmouseout="return today_Object.iconHover(false)"></a>&nbsp;<span id="today_ID" style="position:absolute;visibility:hidden;margin-top: 32px;margin-left:-189px;width:189px;background-color:white;border:1px solid dimgray;" onmouseover="today_Object.handleTimer(true)" onmouseout="today_Object.handleTimer(false)">
<table width="189" cellspacing="0" cellpadding="1">
<tbody><tr style="background-color:buttonface;">
<td id="today_Previous_ID" style="cursor:default" align="center" class="calendarDateInput" onclick="today_Object.previous.go()" onmousedown="VirtualButton(this,true)" onmouseup="VirtualButton(this,false)" onmouseover="return today_Object.previous.hover(this,true)" onmouseout="return today_Object.previous.hover(this,false)" title="February"><img src="/img/prev.gif"></td>
<td id="today_Current_ID" style="cursor:pointer" align="center" class="calendarDateInput" colspan="5" onclick="today_Object.displayed.goCurrent()" onmouseover="self.status='Click to view March 2023';return true;" onmouseout="self.status='';return true;" title="Show Current Month">March 2023</td>
<td id="today_Next_ID" style="cursor:default" align="center" class="calendarDateInput" onclick="today_Object.next.go()" onmousedown="VirtualButton(this,true)" onmouseup="VirtualButton(this,false)" onmouseover="return today_Object.next.hover(this,true)" onmouseout="return today_Object.next.hover(this,false)" title="April"><img src="/img/next.gif"></td></tr>
<tr>
<td width="27" align="center" class="calendarDateInput" style="height:24;width:27;font-weight:bold;border-top:1px solid dimgray;border-bottom:1px solid dimgray;">S</td>
<td width="27" align="center" class="calendarDateInput" style="height:24;width:27;font-weight:bold;border-top:1px solid dimgray;border-bottom:1px solid dimgray;">M</td>
<td width="27" align="center" class="calendarDateInput" style="height:24;width:27;font-weight:bold;border-top:1px solid dimgray;border-bottom:1px solid dimgray;">T</td>
<td width="27" align="center" class="calendarDateInput" style="height:24;width:27;font-weight:bold;border-top:1px solid dimgray;border-bottom:1px solid dimgray;">W</td>
<td width="27" align="center" class="calendarDateInput" style="height:24;width:27;font-weight:bold;border-top:1px solid dimgray;border-bottom:1px solid dimgray;">T</td>
<td width="27" align="center" class="calendarDateInput" style="height:24;width:27;font-weight:bold;border-top:1px solid dimgray;border-bottom:1px solid dimgray;">F</td>
<td width="27" align="center" class="calendarDateInput" style="height:24;width:27;font-weight:bold;border-top:1px solid dimgray;border-bottom:1px solid dimgray;">S</td>
</tr>
</tbody></table>

</span></td>
</tr>
</tbody></table>                                                      

                                                    </td>
                                                    <td align="left" colspan="1" valign="top" class="form-label-setting lable-text">

													<label for="dob_word">मृतक की उम्र / AGE OF DECEASED</label>
                                        <input type="text" class="form-control" name="dod_age" placeholder="EXAMPLE - 46 YEARS">                                                      

                                                    </td>
                                                      <!--Added by Himanshu-->
                                                        </tr><tr align="left" colspan="1" valign="top" class="form-label-setting lable-text"><td width="95%" colspan="6" align="left" valign="middle" class="form-label-setting lable-text">

													<span>
													AADHAAR number should consists of the 12 digits:-
                                                                



													</span>
                                                    <!--Added by Himanshu -->
                                                    </td></tr>

                                                                                                            
												<!--// Added by Naveen 01-04-2016 (end)-->

												<!--Child EID-->
												


												<tr></tr>
                              <!-- FOR GAP BETWEEN SECTION FIELD AND IT'S HEADING -->
                                                <tr><td class="line-gap-padding"></td></tr>
												
												<!-- move place of birth ashish -->
                                                <tr>
                                                    <td width="95%" colspan="6" align="left" valign="middle" class="block-title-bg">
                                                    <span id="birth_legal_is_information_birth_address_OL"><label for="birth_legal_is_information_birth_address">Place of Death </label></span>
													<span lang="hi" id="birth_legal_is_information_birth_address_devanagari" style="display:none;">
													<label for="birth_legal_is_information_birth_address_devanagari">जन्म स्थान</label>													</span>

													<span lang="hi" id="birth_legal_is_information_birth_address_EN" style="display:none;">
													<label for="birth_legal_is_information_birth_address">Place of birth </label>													</span>
													<!--  Place of birth  -->
													
													</td>
                                                </tr>
                                                <tr><td align="left" colspan="1" valign="top" class="form-label-setting lable-text">

                                                           <label for="date_of_death">मृत्यु का स्थान / Place of Death <span class="text-danger"></span></label>
										<input type="text" class="form-control" id="death_place" name="death_place" placeholder="PLACE OF DEATH" value="" required=""> 
                                                             </td></tr><tr align="left" colspan="1" valign="top" class="form-label-setting lable-text"><td width="95%" colspan="6" align="left" valign="middle" class="form-label-setting lable-text" style="
    padding-top: 20px;
">

													<span>
													Place of Death to be filled in capital letters
                                                                



													</span>
                                                    <!--Added by Himanshu -->
                                                    </td></tr>
                                                              
                                                              <!-- move place of birth ashish -->
												
												
												<!-- FOR GAP BETWEEN SECTION FIELD AND IT'S HEADING -->
                                                <tr><td class="line-gap-padding"></td></tr>



                                                <!-- ================= Father's Information ROW =============== -->
                                                <tr>
                                                    <td width="95%" colspan="6" align="left" valign="middle" class="block-title-bg">
													<span id="birth_legal_is_information_father_OL">
													<label for="birth_legal_is_information_father">Husband / Wife Information. </label></span>

													<span lang="hi" id="birth_legal_is_information_father_devanagari" style="display:none;">
													<label for="birth_legal_is_information_father_devanagari">पिता की सूचना</label>													</span>

													<span lang="hi" id="birth_legal_is_information_father_EN" style="display:none;">
													<label for="birth_legal_is_information_father_EN">Is information father EN</label>													</span>

													
													<!--Father's Information-->
													</td>
                                                </tr>
                                                <tr>
                                                    <!-- ============ Father First name ============= -->
                                                    <td align="left" colspan="1" valign="top" class="form-label-setting lable-text">
                                                    	<label>पति / पत्नी का नाम / NAME OF HUSBAND / WIFE</label>
										<input type="text" required="" class="form-control" name="hus_name" aria-describedby="emailHelp" placeholder="FNAME OF HUSBAND / WIFE">
                                                      </td>
                                                      <!-- ============ Father UID No. ============= -->
                                                    <td align="left" colspan="1" valign="top" class="form-label-setting lable-text">
													   	<label for="exampleInputPassword1">पति / पत्नी का आधार संख्या / HUSBAND / WIFE AADHAAR NO</label>
										<input type="text" maxlength="12" class="form-control" name="hus_aadhar" placeholder="HUSBAND / WIFE AADHAAR NO">                                               
                                                                                                           </td></tr><tr align="left" colspan="1" valign="top" class="form-label-setting lable-text"><td width="95%" colspan="6" align="left" valign="middle" class="form-label-setting lable-text" style="
    padding-top: 20px;
">

													<span>
													Leave blank if Husband / Wife does not have Aadhaar number
                                                                



													</span>
                                                    <!--Added by Himanshu -->
                                                    </td></tr>

                                                                                                            
												<!--// Added by Naveen 01-04-2016 (end)-->

												<!--Child EID-->
												
                                                                                                            
                                                                                                            <!-- ============ FATHER'S EMAIL ID ============= -->
                                                    
                                                   <tr>
                                                    <td width="95%" colspan="6" align="left" valign="middle" class="block-title-bg">
													<span id="birth_legal_is_information_mother_OL"><label for="birth_legal_is_information_mother">Fathers Information. </label></span>
													<span lang="hi" id="birth_legal_is_information_mother_devanagari" style="display:none;">
													<label for="birth_legal_is_information_mother_devanagari">माता की सूचना</label>													</span>

													<span lang="hi" id="birth_legal_is_information_mother_EN" style="display:none;">
													<label for="birth_legal_is_information_mother_EN">Mothers Information. </label>													</span>

                                                       <!--Mother's Information-->                                                    </td>
                                                </tr>
                                                <tr>
                                                    <!-- ============ Mother First name ============= -->
                                                    <td align="left" colspan="1" valign="top" class="form-label-setting lable-text">
                                                     <label for="father_name">पिता का नाम / Father Name <span class="text-danger"></span></label>
										<input type="text" class="form-control" id="father_name" name="father_name" placeholder="FATHER NAME" value="" required="">
                                                         </td>
                                                         
                                                         <!-- ============ Mother Middle name ============= -->
                                                    <td align="left" colspan="1" valign="top" class="form-label-setting lable-text">
<label for="father_aadhar">पिता का आधार / Father Aadhar</label>
										<input type="text" class="form-control" id="father_aadhar" name="father_aadhar" placeholder="FATHER AADHAR" value="">
                                                    </td></tr><tr align="left" colspan="1" valign="top" class="form-label-setting lable-text"><td width="95%" colspan="6" align="left" valign="middle" class="form-label-setting lable-text" style="
    padding-top: 20px;
">

													<span>
													Leave blank if Father does not have Aadhaar number
                                                                



													</span>
                                                    <!--Added by Himanshu -->
                                                    </td></tr>

                                                                                                                        
                                                                                                            <tr>
                                                    <td width="95%" colspan="6" align="left" valign="middle" class="block-title-bg">
													<span id="birth_legal_is_information_mother_OL"><label for="birth_legal_is_information_mother">Mothers Information. </label></span>
													<span lang="hi" id="birth_legal_is_information_mother_devanagari" style="display:none;">
													<label for="birth_legal_is_information_mother_devanagari">माता की सूचना</label>													</span>

													<span lang="hi" id="birth_legal_is_information_mother_EN" style="display:none;">
													<label for="birth_legal_is_information_mother_EN">Mothers Information. </label>													</span>

                                                       <!--Mother's Information-->                                                    </td>
                                                </tr>
                                                <tr>
                                                    <!-- ============ Mother First name ============= -->
                                                    <td align="left" colspan="1" valign="top" class="form-label-setting lable-text">
                                                     <label for="mother_name">माता का नाम / Mother Name <span class="text-danger"></span></label>
										<input type="text" class="form-control" id="mother_name" name="mother_name" placeholder="MOTHER NAME" value="" required="">
                                                         </td>
                                                         
                                                         <!-- ============ Mother Middle name ============= -->
                                                    <td align="left" colspan="1" valign="top" class="form-label-setting lable-text">
<label for="mother_aadhar">माता का आधार / Mother Aadhar</label>
										<input type="text" class="form-control" id="mother_aadhar" name="mother_aadhar" placeholder="MOTHER AADHAR" value="">
                                                    </td></tr><tr align="left" colspan="1" valign="top" class="form-label-setting lable-text"><td width="95%" colspan="6" align="left" valign="middle" class="form-label-setting lable-text" style="
    padding-top: 20px;
">

													<span>
													Leave blank if mother does not have Aadhaar number
                                                                



													</span>
                                                    <!--Added by Himanshu -->
                                                    </td></tr>

                                                                                                            
												<!--// Added by Naveen 01-04-2016 (end)-->

												<!--Child EID-->
												
                                                     
                                                            <!-- ============ Mother Last name ============= -->
                                                    
													  <!-- ================= Address of parents at the time of Birth of the Child Start =============== -->
                                                <tr>
                                                    <td width="95%" colspan="6" align="left" valign="middle" class="block-title-bg">
                                                    <span id="birth_legal_is_information_parent_address_OL">
													<label for="birth_legal_is_information_parent_address">Address at the time of death Address of the deceased </label></span>
													<span lang="hi" id="birth_legal_is_information_parent_address_devanagari" style="display:none;">
													<label for="birth_legal_is_information_parent_address_devanagari"></label>													</span>

													<span lang="hi" id="birth_legal_is_information_parent_address_EN" style="display:none;">
													<label for="birth_legal_is_information_parent_address_EN">Permanent address of parents  </label>													</span>
													    <!--Address of parents at the time of Birth of the Child-->
													</td>
                                                </tr>
                                                 <tr>
                                                    
								<!-- ============ Bldg.No & Name ============= -->
                                                    <td align="left" colspan="1" valign="top" class="form-label-setting lable-text">
                                                     <label for="death_address">मृत्यु के समय पता / Address at time of death <span class="text-danger"></span></label>
										<input type="text" class="form-control" id="death_address" name="death_address" placeholder="ADDRESS OF BIRTH" value="" required="">
                                       </td></tr><tr align="left" colspan="1" valign="top" class="form-label-setting lable-text"><td width="95%" colspan="6" align="left" valign="middle" class="form-label-setting lable-text" style="
    padding-top: 20px;
">

													<span>
													Address at the time of Death to be filled in capital letters
                                                                



													</span>
                                                    <!--Added by Himanshu -->
                                                    </td></tr>

                                                                                                            
												<!--// Added by Naveen 01-04-2016 (end)-->

												<!--Child EID-->
												
                                        
                                                                                                                                          
<tr>
                                                    <td width="95%" colspan="6" align="left" valign="middle" class="block-title-bg">

													<span id="birth_legal_is_information_permanent_address_OL">
													<label for="birth_legal_is_information_permanent_address">Permanent Address of the Deceased </label>													</span>

													<span lang="hi" id="birth_legal_is_information_permanent_address_devanagari" style="display:none;">
													<label for="birth_legal_is_information_permanent_address_devanagari">माता-पिता के स्थायी पता</label>													</span>

													<span id="birth_legal_is_information_permanent_address_EN" style="display:none">
													<label for="birth_legal_is_information_permanent_address">Address of parents at the time of Birth of the Child</label>													</span>

													<!--Permanent address of parents-->

													</td>
                                                </tr>
                                                <!-- ============ Bldg.No & Name ============= -->
                                                <tr><td align="left" colspan="1" valign="top" class="form-label-setting lable-text">
	<label for="permanent_address">मृतक का स्थायी पता / Permanent Address <span class="text-danger"></span></label>
										<input type="text" class="form-control" id="permanent_address" name="permanent_address" placeholder="PERMANENT ADDRESS" value="" required="">
</td></tr><tr align="left" colspan="1" valign="top" class="form-label-setting lable-text"><td width="95%" colspan="6" align="left" valign="middle" class="form-label-setting lable-text" style="
    padding-top: 20px;
">

													<span>
											Permanent Address to be filled in capital letters
                                                                



													</span>
                                                    <!--Added by Himanshu -->
                                                    </td></tr>
 					                   
                                        
                                        <tr>
                                                    <td width="95%" colspan="6" align="left" valign="middle" class="block-title-bg">
                                                       <span id="birth_legal_is_information_informants_OL">
													   <label for="birth_legal_is_information_informants">Informants Information </label></span>
													   <span lang="hi" id="birth_legal_is_information_informants_devanagari" style="display:none;">
													   <label for="birth_legal_is_information_informants_devanagari">सूचना दाता</label>													   </span>
													   <span id="birth_legal_is_information_informants_EN" style="display:none">
													   <label for="birth_legal_is_information_informants">Informants Information </label></span>

													   <!-- Informant's Information   -->
													   </td>
                                                </tr>
                                                
                                                <tr><td align="left" colspan="1" valign="top" class="form-label-setting lable-text">
												 <label for="register_date">पंजीकरण की तिथि / Date of Registration <span class="text-danger">*</span></label>
                                        <div class="input-group date" id="d_register_date" data-target-input="nearest">
                                            <input type="text" class="form-control datetimepicker-input" data-target="#d_register_date" id="register_date" name="register_date" placeholder="DD/MM/YYYY" value="" required="">
                                            <div class="input-group-append" data-target="#d_register_date" data-toggle="datetimepicker">
                                                <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                            </div>
                                            
                                        </div>
                                            
                                       
    


                                        
														<div class="form-group col-md-12">
                                        <label for="hospital_id">Hospital <span class="text-danger">*</span></label>
                                        <select type="text" class="form-control" id="hospital_id" name="hospital_id" required="" style="width: 230px;">
                                            <option value="">Select Hospital</option>
											<?php
											if (mysqli_num_rows($sres) > 0) {
												while ($sdata = mysqli_fetch_assoc($sres)) {
											?>
													<option value="<?php echo $sdata['hospital']; ?>"><?php echo $sdata['hospital']; ?> - <?php echo $sdata['hospitalnamelocal'] ?></option>
											<?php

												}
											}
											?>
										</select>
									</div>

								</div>
								<!-- /.card-body -->

								</div><table width="25%" border="0" cellpadding="2" cellspacing="2">
                                                            <tbody>
                                                                <tr>
                                                                    <td>
                                                                        <input name="submit" type="submit" id="submit" value="Save"class="btn" tabindex="61">                                                                    </td>
                                                                 
                                                                </tr>
                            </form>
                        </div>
					<?php
					}

					?>

					<!-- /.card -->
				</div>
			</div>
		</div><!-- /.container-fluid -->
	</section>
	<!-- /.content -->


</div>

</div>
<!-- ./wrapper -->

<!-- jQuery -->
<script src="plugins/jquery/jquery.min.js"></script>
<!-- jQuery UI 1.11.4 -->
<script src="plugins/jquery-ui/jquery-ui.min.js"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script>
	$.widget.bridge('uibutton', $.ui.button)
</script>
<!-- Bootstrap 4 -->
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>

<!-- Select2 -->
<script src="plugins/select2/js/select2.full.min.js"></script>

<!-- SweetAlert -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/8.11.8/sweetalert2.all.min.js"></script>

<!-- DataTables  & Plugins -->
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script src="plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
<script src="plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>

<script src="plugins/datatables-buttons/js/buttons.html5.min.js"></script>
<script src="plugins/datatables-buttons/js/buttons.print.min.js"></script>
<script src="plugins/datatables-buttons/js/buttons.colVis.min.js"></script>

<!-- ChartJS -->
<script src="plugins/chart.js/Chart.min.js"></script>
<!-- Sparkline -->
<script src="plugins/sparklines/sparkline.js"></script>
<!-- JQVMap -->
<script src="plugins/jqvmap/jquery.vmap.min.js"></script>
<script src="plugins/jqvmap/maps/jquery.vmap.usa.js"></script>
<!-- jQuery Knob Chart -->
<script src="plugins/jquery-knob/jquery.knob.min.js"></script>
<!-- daterangepicker -->
<script src="plugins/moment/moment.min.js"></script>
<script src="plugins/daterangepicker/daterangepicker.js"></script>
<!-- Tempusdominus Bootstrap 4 -->
<script src="plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
<!-- Summernote -->
<script src="plugins/summernote/summernote-bs4.min.js"></script>
<!-- overlayScrollbars -->
<script src="plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/adminlte.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="dist/js/demo.js"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="dist/js/pages/dashboard.js"></script>

<script src="https://code.jquery.com/ui/1.13.0/jquery-ui.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.3/jquery.validate.min.js" integrity="sha512-37T7leoNS06R80c8Ulq7cdCDU5MNQBwlYoy1TX/WUsLFC2eYNqtKlV0QjH7r8JpG/S0GUMZwebnVFLPd6SU5yg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-toast-plugin/1.3.2/jquery.toast.min.js" integrity="sha512-zlWWyZq71UMApAjih4WkaRpikgY9Bz1oXIW5G0fED4vk14JjGlQ1UmkGM392jEULP8jbNMiwLWdM8Z87Hu88Fw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<script>
	function alertMessage(type, message) {
		if (type == 'error') {
			type = 'danger';
		}

		return "<div class='alert alert-" + type + " alert-dismissible'> <a href='#' class='close' data-dismiss='alert' aria-label='close'>&times;</a> " + message + " </div>";
	}
</script>

<script>
	//Date picker
	$('#d_date_of_death').datetimepicker({
		format: 'L',
		format: 'DD-MM-YYYY'
	});
	$('#d_register_date').datetimepicker({
		format: 'L',
		format: 'DD-MM-YYYY'
	});


	function getHospitalsByStateId() {
		var state_id = $("#state_id").val();
		$.ajax({
			type: "POST",
			url: "http://crsorgiup.co.in/admin/getHospitalsByStateId",
			data: {
				state_id: state_id,
				"_token": "aJ3saaa9dqVqVIcyVh3fTV2Kn6NB8M1sXOcpjcAS"
			},
			beforeSend: function(data) {
				$(".main-loader").show();
			},
			success: function(response) {
				setTimeout(function() {
					$(".main-loader").hide();
					var obj;
					try {
						obj = JSON.parse(response);

						if (obj.status == 'success') {

							var records = obj.records;

							var row_html = "<option value=''>Select Hospital</option>";

							for (i = 0; i < records.length; i++) {
								var row = records[i];
								row_html += "<option value='" + row.id + "'>" + row.name + "</option>";
							}
							$("#hospital_id").html(row_html);

						} else {

							$.toast({
								heading: '',
								text: obj.message,
								position: 'top-right',
								stack: false,
								icon: 'error',
								loader: false
							});

						}
					} catch (err) {

						$.toast({
							heading: '',
							text: 'Some error occurred, please try again.',
							position: 'top-right',
							stack: false,
							icon: 'error',
							loader: false
						});

					}
				}, 100);
			},
			error: function() {
				$(".main-loader").hide();

				$.toast({
					heading: '',
					text: 'Some error occurred, please try again.',
					position: 'top-right',
					stack: false,
					icon: 'error',
					loader: false
				});

			}

		});
	}
</script>

</body>

</html>