<?php
session_start();
if(!isset($_SESSION["logged_in"]) && $_SESSION["logged_in"]!=true){
    header("Location: login.php");
    exit;
}
require('db_connect.php');

$pinno=$_POST['pin'];
$pinserial=$_POST['serial'];
$msg="";
$error=0;
if(isset($_POST["submit"]) && $_POST["submit"]=="SUBMIT")
{   
    $cand_photo= $_FILES["cand_photo"]["name"];
    //$cand_intimation= $_FILES["cand_intimation"]["name"];
    //$cand_marksheet= $_FILES["cand_marksheet"]["name"];
    $cand_clc= $_FILES["cand_clc"]["name"];
    //$cand_certificate= $_FILES["cand_certificate"]["name"];
    $pserial= mysqli_real_escape_string($conn,$_POST["pserial"]);
    $picUploadURL="";
    if(!empty($cand_photo))
    {
        if($_FILES["cand_photo"]["name"] > 20000000)
        {
            $msg .='<div class="alert alert-warning" role="alert">Photo file must be less than 500KB.</div>';
            $error=1;
        }
        $basename_file = basename($_FILES["cand_photo"]["name"]);
        $imageFileType = strtolower(pathinfo($basename_file,PATHINFO_EXTENSION));
        if($imageFileType=="jpg" || $imageFileType=="JPG" || $imageFileType=="png" || $imageFileType=="PNG" || $imageFileType=="JPEG" || $imageFileType=="jpeg"){
            $picfilename= $pserial.mysqli_real_escape_string($conn,$basename_file);
            if(move_uploaded_file($_FILES["cand_photo"]["tmp_name"], "upphoto/".$picfilename)){
              $picUploadURL= "upphoto/".$picfilename;
              $error=0;
            } else {
              $error=1;
            }
        } else {
            $msg .='<div class="alert alert-warning" role="alert">Photo file extension must be (.jpg, .jpeg, .png).</div>';
            $error=1;
        }
    }
    
    $intUploadURL="NA";
    /*
    if(!empty($cand_intimation))
    {
        if($_FILES["cand_intimation"]["name"] > 20000000)
        {
            $msg .='<div class="alert alert-warning" role="alert">Intimation file must be less than 20MB.</div>';
            $error=1;
        }
        $basename_file = basename($_FILES["cand_intimation"]["name"]);
        $imageFileType = strtolower(pathinfo($basename_file,PATHINFO_EXTENSION));
        if($imageFileType=="jpg" || $imageFileType=="JPG" || $imageFileType=="png" || $imageFileType=="PNG" || $imageFileType=="JPEG" || $imageFileType=="jpeg"){
            $signfilename= "inti_".uniqid().time().$_SESSION["user_id"].$_SESSION["user_name"].mysqli_real_escape_string($conn,$basename_file);
            if(move_uploaded_file($_FILES["cand_intimation"]["tmp_name"], "uploads/".$signfilename)){
              $intUploadURL= "uploads/".$signfilename;
              $error=0;
            } else {
              $error=1;
            }
        } else {
            $msg .='<div class="alert alert-warning" role="alert">Intimation file extension must be (.jpg, .jpeg, .png).</div>';
            $error=1;
        }
    }
    */
    
    $marksheetUploadURL="NA";
    /*
    if(!empty($cand_marksheet))
    {
        if($_FILES["cand_marksheet"]["name"] > 20000000)
        {
            $msg .='<div class="alert alert-warning" role="alert">Marksheet file must be less than 20MB.</div>';
            $error=1;
        }
        $basename_file = basename($_FILES["cand_marksheet"]["name"]);
        $imageFileType = strtolower(pathinfo($basename_file,PATHINFO_EXTENSION));
        if($imageFileType=="jpg" || $imageFileType=="JPG" || $imageFileType=="png" || $imageFileType=="PNG" || $imageFileType=="JPEG" || $imageFileType=="jpeg"){
            $marksheetfilename= "marksheet_".uniqid().time().$_SESSION["user_name"].mysqli_real_escape_string($conn,$basename_file);
            if(move_uploaded_file($_FILES["cand_marksheet"]["tmp_name"], "uploads/".$marksheetfilename)){
              $marksheetUploadURL= "uploads/".$marksheetfilename;
              $error=0;
            } else {
              $error=1;
            }
        } else {
            $msg .='<div class="alert alert-warning" role="alert">Marksheet file extension must be (.jpg, .jpeg, .png).</div>';
            $error=1;
        }
    }
    */
       $clcUploadURL="";
    if(!empty($cand_clc))
    {
        if($_FILES["cand_clc"]["name"] > 20000000)
        {
            $msg .='<div class="alert alert-warning" role="alert">Signature File must be less than 20KB.</div>';
            $error=1;
        }
        $basename_file = basename($_FILES["cand_clc"]["name"]);
        $imageFileType = strtolower(pathinfo($basename_file,PATHINFO_EXTENSION));
        if($imageFileType=="jpg" || $imageFileType=="JPG" || $imageFileType=="png" || $imageFileType=="PNG" || $imageFileType=="JPEG" || $imageFileType=="jpeg"){
            $clcfilename= $pserial.mysqli_real_escape_string($conn,$basename_file);
            if(move_uploaded_file($_FILES["cand_clc"]["tmp_name"], "upsignloads/".$clcfilename)){
              $clcUploadURL= "upsignloads/".$clcfilename;
              $error=0;
            } else {
              $error=1;
            }
        } else {
            $msg .='<div class="alert alert-warning" role="alert">Signature file extension must be (.jpg, .jpeg, .png).</div>';
            $error=1;
        }
    }


    $castUploadURL="NA";
    /*
    if(!empty($cand_certificate))
    {
        if($_FILES["cand_certificate"]["name"] > 20000000)
        {
            $msg .='<div class="alert alert-warning" role="alert">Cast file must be less than 20MB.</div>';
            $error=1;
        }
        $basename_file = basename($_FILES["cand_certificate"]["name"]);
        $imageFileType = strtolower(pathinfo($basename_file,PATHINFO_EXTENSION));
        if($imageFileType=="jpg" || $imageFileType=="JPG" || $imageFileType=="png" || $imageFileType=="PNG" || $imageFileType=="JPEG" || $imageFileType=="jpeg"){
            $castfilename= "cast_".uniqid().time().$_SESSION["user_id"].$_SESSION["user_name"].mysqli_real_escape_string($conn,$basename_file);
            if(move_uploaded_file($_FILES["cand_certificate"]["tmp_name"], "uploads/".$castfilename)){
              $castUploadURL= "uploads/".$castfilename;
              $error=0;
            } else {
              $error=1;
            }
        } else {
            $msg .='<div class="alert alert-warning" role="alert">Cast file extension must be (.jpg, .jpeg, .png).</div>';
            $error=1;
        }
    }
    */
    
    $course= mysqli_real_escape_string($conn,$_POST["crs_enrolment"]);
    $sess_from= mysqli_real_escape_string($conn,$_POST["sess_from"]);
    $sess_to= mysqli_real_escape_string($conn,$_POST["sess_2"]);
    $sp_cota= mysqli_real_escape_string($conn,$_POST["sp_cota"]);
    if($course=="IA"){
       $comp_sub1= mysqli_real_escape_string($conn,$_POST["ia_comp_sub1"]);
       $comp_sub2= mysqli_real_escape_string($conn,$_POST["ia_comp_sub2"]);
       $comp_sub3= mysqli_real_escape_string($conn,$_POST["ia_comp_sub3"]);
       
       $opt_sub1= mysqli_real_escape_string($conn,$_POST["IA_OPT_SUB1"]);
       $opt_sub2= mysqli_real_escape_string($conn,$_POST["IA_OPT_SUB2"]);
       $opt_sub3= mysqli_real_escape_string($conn,$_POST["IA_OPT_SUB3"]); 
       $add_sub1= mysqli_real_escape_string($conn,$_POST["ia_add_sub"]);
       $chkTable="ia_unique_reg";
    } elseif($course=="ICOM"){
       $comp_sub1= mysqli_real_escape_string($conn,$_POST["icom_comp_sub1"]);
       $comp_sub2= mysqli_real_escape_string($conn,$_POST["icom_comp_sub2"]);
       $comp_sub3= mysqli_real_escape_string($conn,$_POST["icom_comp_sub3"]);
       
       $opt_sub1= mysqli_real_escape_string($conn,$_POST["ICOM_OPT_SUB7"]);
       $opt_sub2= mysqli_real_escape_string($conn,$_POST["ICOM_OPT_SUB8"]);
       $opt_sub3= mysqli_real_escape_string($conn,$_POST["ICOM_OPT_SUB9"]); 
       $add_sub1= mysqli_real_escape_string($conn,$_POST["ICOM_ADD_SUB"]);
       $chkTable="icm_unique_reg";
    } elseif($course=="ISC"){
       $comp_sub1= mysqli_real_escape_string($conn,$_POST["isc_comp_sub1"]);
       $comp_sub2= mysqli_real_escape_string($conn,$_POST["isc_comp_sub2"]);
       $comp_sub3= mysqli_real_escape_string($conn,$_POST["isc_comp_sub3"]);
       
       $opt_sub1= mysqli_real_escape_string($conn,$_POST["ISC_OPT_SUB4"]);
       $opt_sub2= mysqli_real_escape_string($conn,$_POST["ISC_OPT_SUB5"]);
       $opt_sub3= mysqli_real_escape_string($conn,$_POST["ISC_OPT_SUB6"]); 
       $add_sub1= mysqli_real_escape_string($conn,$_POST["isc_add_sub"]);
       $chkTable="isc_unique_reg";
    }
    
    $queryCHK= mysqli_query($conn,"SELECT COUNT(*) as countuniue FROM ".$chkTable."");
    if(mysqli_num_rows($queryCHK) > 0){
        $fetchCHK= mysqli_fetch_assoc($queryCHK);
        if($fetchCHK["countuniue"] >= MAX_ADMISSION){
            $error=1;
            $msg .='<h4 style="color:#fff;">Admission Closed for '.$course.'</h4>';
            echo '<script>alert("Admission closed for '.$course.'");</script>';
        } 
    } else {
        $error=1;
    }
    
    $cand_name= mysqli_real_escape_string($conn,$_POST["cand_name"]);
    $DOB_day= mysqli_real_escape_string($conn,$_POST["DOB_day"]);
    $DOB_mon= mysqli_real_escape_string($conn,$_POST["DOB_mon"]);
    $DOB_yr= mysqli_real_escape_string($conn,$_POST["DOB_yr"]);
    $dobfull= $DOB_day."-".$DOB_mon."-".$DOB_yr;
    $f_name= mysqli_real_escape_string($conn,$_POST["f_name"]);
    $f_occ= mysqli_real_escape_string($conn,$_POST["f_occ"]);
    $m_name= mysqli_real_escape_string($conn,$_POST["m_name"]);
    $adhar_no= mysqli_real_escape_string($conn,$_POST["adhar_no"]);
    $religion= mysqli_real_escape_string($conn,$_POST["religion"]);
    $nationality= mysqli_real_escape_string($conn,$_POST["nationality"]);
    $caste= mysqli_real_escape_string($conn,$_POST["caste"]);
    $category= mysqli_real_escape_string($conn,$_POST["category"]);
    $mar_Stat= mysqli_real_escape_string($conn,$_POST["mar_Stat"]);
    $gend= mysqli_real_escape_string($conn,$_POST["gend"]);
  
    $vill_moh_perm= mysqli_real_escape_string($conn,$_POST["vill_moh_perm"]);
    $po_perm= mysqli_real_escape_string($conn,$_POST["po_perm"]);
    $ps_perm= mysqli_real_escape_string($conn,$_POST["ps_perm"]);
    $dist_perm= mysqli_real_escape_string($conn,$_POST["dist_perm"]);
    $pin_cd= mysqli_real_escape_string($conn,$_POST["pin_cd"]);
    $state_perm= mysqli_real_escape_string($conn,$_POST["state_perm"]);
    
    $vill_moh_cor= mysqli_real_escape_string($conn,$_POST["vill_moh_cor"]);
    $po_cor= mysqli_real_escape_string($conn,$_POST["po_cor"]);
    $ps_cor= mysqli_real_escape_string($conn,$_POST["ps_cor"]);
    $dist_cor= mysqli_real_escape_string($conn,$_POST["dist_cor"]);
    $pin_cd_cor= mysqli_real_escape_string($conn,$_POST["pin_cd_cor"]);
    $state_cor= mysqli_real_escape_string($conn,$_POST["state_cor"]);
    $cont_no= mysqli_real_escape_string($conn,$_POST["cont_no"]);
    $email_li= mysqli_real_escape_string($conn,$_POST["email_li"]);
    
    $board_unv= mysqli_real_escape_string($conn,$_POST["board_unv"]);
    $exam_name= mysqli_real_escape_string($conn,$_POST["exam_name"]);
    $passing_yr= mysqli_real_escape_string($conn,$_POST["passing_yr"]);
    $t_marks= mysqli_real_escape_string($conn,$_POST["t_marks"]);
    //$out_of= mysqli_real_escape_string($conn,$_POST["out_of"]);
    //$perc= mysqli_real_escape_string($conn,$_POST["perc"]);
    $out_of= 0; //mysqli_real_escape_string($conn,$_POST["out_of"]);
    $perc= 0; //mysqli_real_escape_string($conn,$_POST["perc"]);
    
    $div_grd= mysqli_real_escape_string($conn,$_POST["div_grd"]);
    
    $pserial= mysqli_real_escape_string($conn,$_POST["pserial"]);
    $pcode= mysqli_real_escape_string($conn,$_POST["pcode"]);
    $cut_mark1= mysqli_real_escape_string($conn,$_POST["cut1"]);
    $cut_mark2= mysqli_real_escape_string($conn,$_POST["cut2"]);
    $bnk_accno= mysqli_real_escape_string($conn,$_POST["bnk_accno"]);
    $bnk_acc_name= mysqli_real_escape_string($conn,$_POST["bnk_acc_name"]);
	$bnk_ifsc_code= mysqli_real_escape_string($conn,$_POST["bnk_ifsc_code"]);
    $bnk_branch= mysqli_real_escape_string($conn,$_POST["bnk_branch"]);
    $payment_redirectid= uniqid().time().md5($_SESSION['user_name'].$_SESSION['user_id']);
    if($error==0){
         if($board_unv=="B.S.E.B."){
           $withMigration= 0.00;
        } else {
           $withMigration= 150.00;
        }

         $querygetFee= mysqli_query($conn,"SELECT * FROM tbl_feestructure_reg WHERE subject='$course' AND year=1");
         $fetchFee= mysqli_fetch_assoc($querygetFee);
         $totalFee= $fetchFee["student_fund"]+$fetchFee["nss"]+$fetchFee["college_dev_fee"]+$fetchFee["ugc_fee"]+$fetchFee["lab_fee"]+$fetchFee["cycle_stand_fee"]+$fetchFee["test_fee"]+$fetchFee["admission_fee"]+$fetchFee["tution_fee"]+$fetchFee["atheletic_fee"]+$fetchFee["mig_fee"]+$fetchFee["flag"]+$fetchFee["eklavaya_fee"]+$fetchFee["other_fee"]+$fetchFee["late_fee"]+$fetchFee["science_caution_fee"]+$fetchFee["garden_fee"]+$fetchFee["cost_of_rem"]+$fetchFee["exam_fee"]+$fetchFee["local_levey"]+$fetchFee["marks_fee"]+$fetchFee["prov_fee"]+$fetchFee["online_fee"]+$fetchFee["exam_form"]+$withMigration;
       
       $sql= "INSERT INTO `tbl_userregistration_reg` (`userid`,`course`, `session_from`, `session_to`, `specific_quota`, `comp_sub1`, `comp_sub2`, `comp_sub3`, `opt_sub1`, `opt_sub2`, `opt_sub3`, `add_sub`, `name`, `dob`, `fathersname`, `fatheroccupation`, `mothersname`, `adharno`, `religion`, `nationality`, `caste`, `category`, `maritalstatus`, `gender`, `photograph_file`, `clc_file`, `marksheet_file`,`intimation_file`,`cast_file`, `cor_village`, `cor_postoffice`, `cor_policestation`, `cor_district`, `cor_postcode`, `cor_state`, `per_village`, `per_postoffice`, `per_policestation`, `per_district`, `per_postcode`, `per_state`, `contactno`, `email`, `prev_board`, `prev_examname`, `prev_passingyear`, `prev_obtainmarks`, `prev_outof`, `prev_percent`, `prev_grade`, `coupan_serialno`, `coupan_code`,`payable_amount`,`payment_redirectid`,`cut_mark1`,`cut_mark2`,`bnk_name`,`bnk_acc_no`,`bnk_branch`,`bnk_ifsc_code`) VALUES ('".$_SESSION["user_id"]."','$course', '$sess_from', '$sess_to', '$sp_cota', '$comp_sub1', '$comp_sub2', '$comp_sub3', '$opt_sub1', '$opt_sub2', '$opt_sub3', '$add_sub1', '".$_SESSION['user_name']."', '$dobfull', '$f_name', '$f_occ', '$m_name', '$adhar_no', '$religion', '$nationality', '$caste', '$category', '$mar_Stat', '$gend', '$picUploadURL', '$clcUploadURL', '$marksheetUploadURL','$intUploadURL','$castUploadURL', '$vill_moh_cor', '$po_cor', '$ps_cor', '$dist_cor', '$pin_cd_cor', '$state_cor', '$vill_moh_perm', '$po_perm', '$ps_perm', '$dist_perm', '$pin_cd', '$state_perm', '$cont_no', '$email_li', '$board_unv', '$exam_name', '$passing_yr', '$t_marks', '$out_of', '$perc', '$div_grd', '$pserial', '$pcode', '$totalFee','$payment_redirectid','$cut_mark1','$cut_mark1','$bnk_acc_name','$bnk_accno','$bnk_branch','$bnk_ifsc_code')";
       $result=mysqli_query($conn,$sql) or die(mysqli_error($conn));
       $regID= mysqli_insert_id($conn);
       $result2=mysqli_query($conn,"INSERT INTO `tbl_admission_reg` (`userid`, `nss`, `student_fund`, `college_dev_fee`, `ugc_fee`, `lab_fee`, `cycle_stand_fee`, `test_fee`, `admission_fee`, `tution_fee`, `atheletic_fee`, `mig_fee`, `flag`, `eklavaya_fee`, `other_fee`, `late_fee`, `science_caution_fee`, `garden_fee`, `cost_of_rem`, `exam_fee`, `local_levey`, `marks_fee`, `prov_fee`, `online_fee`, `exam_form`, `regid`, `status`) VALUES ('".$_SESSION["user_id"]."', '".$fetchFee["nss"]."', '".$fetchFee["student_fund"]."', '".$fetchFee["college_dev_fee"]."', '".$fetchFee["ugc_fee"]."', '".$fetchFee["lab_fee"]."', '".$fetchFee["cycle_stand_fee"]."', '".$fetchFee["test_fee"]."', '".$fetchFee["admission_fee"]."', '".$fetchFee["tution_fee"]."', '".$fetchFee["atheletic_fee"]."', '".$withMigration."', '".$fetchFee["flag"]."', '".$fetchFee["eklavaya_fee"]."', '".$fetchFee["other_fee"]."', '".$fetchFee["late_fee"]."', '".$fetchFee["science_caution_fee"]."', '".$fetchFee["garden_fee"]."', '".$fetchFee["cost_of_rem"]."', '".$fetchFee["exam_fee"]."', '".$fetchFee["local_levey"]."', '".$fetchFee["marks_fee"]."', '".$fetchFee["prov_fee"]."', '".$fetchFee["online_fee"]."', '".$fetchFee["exam_form"]."', '$regID', '0')") or die(mysqli_error($conn));
       if($result && $result2){
           header('Location: paymentrequest.php?id='.$payment_redirectid);
       } else {
           $msg .='<div class="alert alert-warning" role="alert">Sorry data not saved.</div>';
       }
    }
    
    
}
?>

<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><style type="text/css">
<!--
.style2 {
	font-size: 11px;
	font-family: cambria;
}
.style3 {font-family: cambria}
.style8 {	font-family: CAMbria;
	font-weight: bold;
	font-size: 24px;
	color: #000000;
}
.style4 {	font-family: mangal;
	font-size: 24px;
	font-weight: bold;
	color: #000000;
}
.style7 {font-weight: bold; font-family: CAMbria;}
.style9 {	font-family: CAMbria;
	font-size: 12px;
	font-weight: bold;
}
-->
</style>

<style type="text/css">
<!--
body {
	margin-top: 0px;
}
.style12 {	font-size: 13px;
	font-weight: bold;
	color: #003333;
	font-family: CAMbria;
}
.style20 {font-family: CAMbria; font-size: 13px; }
.style30 {font-family: CAMbria; font-size: 13px; }
.style30 {font-family: CAMbria; font-size: 13px; }
.style32 {font-family: CAMbria; font-size: 13px; }
.style32 {font-family: CAMbria; font-size: 13px; }
.style33 {font-size: 13px;
	font-weight: bold;
	color: #003333;
	font-family: CAMbria;
}
.style33 {	font-size: 13px;
	font-weight: bold;
	color: #003333;
	font-family: CAMbria;
}
.style34 {font-family: CAMbria; font-size: 13px; }
.style34 {font-family: CAMbria; font-size: 13px; }
.style35 {font-size: 12px;
	font-weight: bold;
	color: #003333;
	font-family: CAMbria;
}
.style35 {font-size: 12px;
	font-weight: bold;
	color: #003333;
	font-family: CAMbria;
}
.style36 {font-family: CAMbria; font-size: 12px; }
.style36 {font-family: CAMbria; font-size: 12px; }
.style37 {font-family: CAMbria; font-size: 12px; }
.style37 {font-family: CAMbria; font-size: 12px; }
.style38 {font-family: mangal}
.style38 {font-family: mangal}
.style39 {font-size: 12px;
	font-weight: bold;
	color: #003333;
	font-family: CAMbria;
}
.style39 {font-size: 12px;
	font-weight: bold;
	color: #003333;
	font-family: CAMbria;
}
.style40 {font-family: CAMbria; font-size: 13px; }
.style40 {font-family: CAMbria; font-size: 13px; }
.style41 {font-family: mangal}
.style41 {font-family: mangal}
.style43 {font-family: CAMbria; font-size: 13px; }
.style43 {font-family: CAMbria; font-size: 13px; }
.style44 {
	font-size: 14px;
	font-weight: bold;
	font-family: cambria;
	color: #FFFFFF;
}
.style45 {
	font-family: cambria;
	font-size: 12px;
}
-->
</style>
    <style type="text/css">
    <!--
        #success_message { border: 1px solid #000; width: 550px; text-align: left; padding: 10px 7px; background: #33ff33; color: #000; font-weight; bold; font-size: 1.2em; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; }
        fieldset { width: 90%; }
        legend { font-size: 24px; }
        .note { font-size: 18px; }
    -->
    </style>
    <style type="text/css">
        input[type=text], textarea,select
        {
            border: 1px solid #ccc;
        }
        input[type=text]:focus, textarea:focus , select:focus
        {
            background-color: #95FF95;
            border: 1px solid #ccc;
        }
    </style>

<script src="online_adm_frm.php_files/jquery-1.js"></script>


<script>
function showCustomer(str)
{
var x=document.forms["frm_admission"]["crs_enrolment"].value;
//document.write(x);
	if(x=="IA")
			{
			document.getElementById('ia_students').style.display = "";
			document.getElementById('isc_students').style.display = "none";
			//document.frm_admission.isc_comp_sub1.disabled=false;
			document.getElementById('icom_students').style.display = "none";
			}
			
			
			if(x=="ISC")
			{
			document.getElementById('ia_students').style.display = "none";
			//document.getElementById('ia_students').style.disabled = false;
			document.getElementById('isc_students').style.display = "";
			document.getElementById('icom_students').style.display = "none";
			}
		
			if(x=="ICOM")
			{
			document.getElementById('ia_students').style.display = "none";
			document.getElementById('isc_students').style.display = "none";
			document.getElementById('icom_students').style.display = "";
			}
}
</script>
<script>
function display(str)
{
var x=document.forms["frm_admission"]["IA_OPT_SUB1"].value;
//document.write(x);
</script>

<script>(function(d, s, id) {
	  var js, fjs = d.getElementsByTagName(s)[0];
	  if (d.getElementById(id)) return;
	  js = d.createElement(s); js.id = id;
	  js.src = "//connect.facebook.net/L_LANG/all.js#xfbml=1&appId=674148172599839";
	  fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));
	</script>




<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Maharaja College, Ara :: ONLINE APPLY ADMISSION FORM - INTERMEDIATE</title>
<style type="text/css">
<!--
body {
	margin-top: 0px;
	background-color: #FFF8E8;
}
.style3 {
	font-family: CAMbria;
	font-weight: bold;
	font-size: 24px;
	color: #000000;
}
.style7 {font-weight: bold; font-family: CAMbria;}
.style9 {
	font-family: CAMbria;
	font-size: 12px;
	font-weight: bold;
}
.style12 {
	font-size: 13px;
	font-weight: bold;
	color: #003333;
	font-family: CAMbria;
}
.style20 {font-family: CAMbria; font-size: 13px; }
.style24 {
	font-family: CAMbria;
	font-size: 14px;
	font-weight: bold;
	color: #FF0000;
}
.style25 {font-family: CAMbria}
.style27 {font-size: 13px}
.style29 {	font-family: mangal;
	font-size: 24px;
	font-weight: bold;
	color: #000000;
}
.style46 {
	color: #EE0000;
	font-weight: bold;
}
p.MsoNoSpacing
	{mso-style-parent:"";
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	margin-left:0in; margin-right:0in; margin-top:0in}
-->
</style>
 <script language="javascript">
function Fillcorrespondance_Address(c,f) {
  if(c.checked == true) {
    f.vill_moh_cor.value = f.vill_moh_perm.value;
	//f.vill_moh_cor.disabled=true;
	
	f.po_cor.value = f.po_perm.value;
	//f.po_cor.disabled=true;
	
	f.ps_cor.value = f.ps_perm.value;
	//f.ps_cor.disabled=true;
	
	f.dist_cor.value = f.dist_perm.value;
	//f.dist_cor.disabled=true;
	
	f.pin_cd_cor.value = f.pin_cd.value;
	//f.pin_cd_cor.disabled=true;
	
	f.state_cor.value = f.state_perm.value;
	//f.state_cor.disabled=true;
  }
  else
  {
	f.vill_moh_cor.disabled=false;
	f.vill_moh_cor.value = "";
	f.po_cor.disabled=false;
	f.po_cor.value = "";
	f.ps_cor.disabled=false;
	f.ps_cor.value = "";
	
	f.dist_cor.disabled=false;
	f.dist_cor.value = "";
	f.pin_cd_cor.disabled=false;
	f.pin_cd_cor.value = "";
	f.state_cor.disabled=false;
	f.state_cor.value = "";
  }
  
}
</script> 

   
<link href="online_adm_frm.php_files/calendar.css" rel="stylesheet" type="text/css">
<link href="online_adm_frm.php_files/kvkcss.css" rel="stylesheet" type="text/css">
<script language='javascript' type='text/javascript'>
        function changer()
        {
            //document.getElementById('Isc_OPT_SUB5').value="Physics"; //document.getElementById('sel_box').options[document.getElementById('sel_box').selectedIndex].value;//Value;
            //document.getElementById('Isc_OPT_SUB6').value="Chemistry";
            document.forms["frm_admission"]["ISC_OPT_SUB5"].value="Physics";
            document.forms["frm_admission"]["ISC_OPT_SUB6"].value="Chemistry";
        }
         function changer1()
        {
            //document.getElementById('Isc_OPT_SUB5').value="Physics"; //document.getElementById('sel_box').options[document.getElementById('sel_box').selectedIndex].value;//Value;
            //document.getElementById('Isc_OPT_SUB6').value="Chemistry";
            document.forms["frm_admission"]["ICOM_OPT_SUB8"].value="Business Studies";
            document.forms["frm_admission"]["ICOM_OPT_SUB9"].value="Enterpreneurship";
        }

    </script>

<script language="javascript">
function validateForm()
{
	
var x=document.forms["frm_admission"]["crs_enrolment"].value;
if (x==null || x=="")
  {
  alert("Course for Enrolment must be I.A. / I.Sc. / I.Com.");
  document.forms["frm_admission"]["crs_enrolment"].focus();
  return false;
  }
var x2=document.forms["frm_admission"]["sess_from"].value;
if (x2==null || x2=="")
  {
 alert("Select Session From.");
  document.forms["frm_admission"]["sess_from"].focus();
  return false;
  }  
  
var x3=document.forms["frm_admission"]["sess_2"].value;
	if (x3==null || x3=="")
		{
		alert("Select Session To");
		document.frm_admission.sess_2.focus();
		return false;
		} 
var x4=document.forms["frm_admission"]["sp_cota"].value;
	if (x4==null || x4=="")
		{
		alert("Select Specific Quota");
		document.frm_admission.sp_cota.focus();
		//document.frm_admission.sp_cota.style.backgroundColor = "#40ffff";
		//document.frm_book_stock_index.btype.select();
		return false;
		} 

	if(x=="IA")
	{
	//document.write(x);
	document.getElementById('ia_students').style.display = "";
	var iacm1_sub1=document.forms["frm_admission"]["ia_comp_sub1"].value;
	if(iacm1_sub1==null||iacm1_sub1=="")
	{
	alert("Select Subject from Compulsory Subject box.(Subject of 100 Marks)");
	document.frm_admission.ia_comp_sub1.focus();
	return false;
	}	
	
			
	var iacm2_sub2=document.forms["frm_admission"]["ia_comp_sub2"].value;
	if(iacm2_sub2==null||iacm2_sub2=="")
			{
				alert("Select Subject from Compulsory Subject box. (Subject of 50 Marks)");
				document.frm_admission.ia_comp_sub2.focus();
				return false;
				}

			var iacm3_sub3=document.forms["frm_admission"]["ia_comp_sub3"].value;
		if(iacm3_sub3==null||iacm3_sub3=="")
	
				{
				alert("Select Subject from Compulsory Subject box. (Subject of 50 Marks)");
				document.frm_admission.ia_comp_sub3.focus();
				return false;
				}
	
				var OPT_sub1=document.forms["frm_admission"]["IA_OPT_SUB1"].value;
		if(OPT_sub1==null||OPT_sub1=="")
			{
				alert("Please select Subject-1: from Optional Subject box.");
				document.frm_admission.IA_OPT_SUB1.focus();
				return false;
				}			
			var OPT_sub2=document.forms["frm_admission"]["IA_OPT_SUB2"].value;
		if(OPT_sub2==null||OPT_sub2=="")
				{
				alert("Please select Subject-2: from Optional Subject box.");
				document.frm_admission.IA_OPT_SUB2.focus();
				return false;
				}			
			var OPT_sub3=document.forms["frm_admission"]["IA_OPT_SUB3"].value;
		if(OPT_sub3==null||OPT_sub3=="")
			{
				alert("Please select Subject-3: from Optional Subject box.");
				document.frm_admission.IA_OPT_SUB3.focus();
				return false;
				}			
	
	if((OPT_sub1==OPT_sub2)||(OPT_sub2==OPT_sub3)||(OPT_sub1==OPT_sub3))
	{
	alert("Choose Different Subject From optional Subject : Same subject should not be entered");
	return false;
	}						
}

// vALIDATION FOR ISC
if(x=="ISC")
	{
	//document.write(x);
	document.getElementById('isc_students').style.display = "";
	var isccm1_sub1=document.forms["frm_admission"]["isc_comp_sub1"].value;
	if(isccm1_sub1==null||isccm1_sub1=="")
	{
	alert("Select Subject from Compulsory Subject box.(Subject of 50 Marks)");
	document.frm_admission.isc_comp_sub1.focus();
	return false;
	}	
	
			
	var isccm2_sub2=document.forms["frm_admission"]["isc_comp_sub2"].value;
	if(isccm2_sub2==null||isccm2_sub2=="")
			{
				alert("Select Subject from Compulsory Subject box. (Subject of 50 Marks)");
				document.frm_admission.isc_comp_sub2.focus();
				return false;
				}

			var isccm3_sub3=document.forms["frm_admission"]["isc_comp_sub3"].value;
		if(isccm3_sub3==null||isccm3_sub3=="")
	
				{
				alert("Select Subject from Compulsory Subject box. (Subject of 100 Marks)");
				document.frm_admission.isc_comp_sub3.focus();
				return false;
				}
	
				var OPT_sub1sc=document.forms["frm_admission"]["ISC_OPT_SUB4"].value;
		if(OPT_sub1sc==null||OPT_sub1sc=="")
			{
				alert("Please select Subject-1: from Optional Subject box.");
				document.frm_admission.ISC_OPT_SUB4.focus();
				return false;
				}			
			var OPT_sub2sc=document.forms["frm_admission"]["ISC_OPT_SUB5"].value;
		if(OPT_sub2sc==null||OPT_sub2sc=="")
				{
				alert("Please select Subject-2: from Optional Subject box.");
				document.frm_admission.ISC_OPT_SUB5.focus();
				return false;
				}			
			var OPT_sub3sc=document.forms["frm_admission"]["ISC_OPT_SUB6"].value;
		if(OPT_sub3sc==null||OPT_sub3sc=="")
			{
				alert("Please select Subject-3: from Optional Subject box.");
				document.frm_admission.ISC_OPT_SUB6.focus();
				return false;
				}			
	
	if((OPT_sub1sc==OPT_sub2sc)||(OPT_sub2sc==OPT_sub3sc)||(OPT_sub1sc==OPT_sub3sc))
	{
	alert("Please Select Different optional Subject From option !! Same subject should not be entered");
	return false;
	}						
}


// vALIDATION FOR Icom
if(x=="ICOM")
	{
	//document.write(x);
	document.getElementById('icom_students').style.display = "";
	var icomcm1_sub1=document.forms["frm_admission"]["icom_comp_sub1"].value;
	if(icomcm1_sub1==null||icomcm1_sub1=="")
	{
	alert("Select Subject from Compulsory Subject box.(Subject of 50 Marks)");
	document.frm_admission.icom_comp_sub1.focus();
	return false;
	}	
	
			
	var icomcm2_sub2=document.forms["frm_admission"]["icom_comp_sub2"].value;
	if(icomcm2_sub2==null||icomcm2_sub2=="")
			{
				alert("Select Subject from Compulsory Subject box. (Subject of 50 Marks)");
				document.frm_admission.icom_comp_sub2.focus();
				return false;
				}

			var icomcm3_sub3=document.forms["frm_admission"]["icom_comp_sub3"].value;
		if(icomcm3_sub3==null||icomcm3_sub3=="")
	
				{
				alert("Select Subject from Compulsory Subject box. (Subject of 100 Marks)");
				document.frm_admission.icom_comp_sub3.focus();
				return false;
				}
	
				var OPT_sub1com=document.forms["frm_admission"]["ICOM_OPT_SUB7"].value;
		if(OPT_sub1com==null||OPT_sub1com=="")
			{
				alert("Please select Subject-1: from Optional Subject box.");
				document.frm_admission.ICOM_OPT_SUB7.focus();
				return false;
				}			
			var OPT_sub2com=document.forms["frm_admission"]["ICOM_OPT_SUB8"].value;
		if(OPT_sub2com==null||OPT_sub2com=="")
				{
				alert("Please select Subject-2: from Optional Subject box.");
				document.frm_admission.ICOM_OPT_SUB8.focus();
				return false;
				}			
			var OPT_sub3com=document.forms["frm_admission"]["ICOM_OPT_SUB9"].value;
		if(OPT_sub3com==null||OPT_sub3com=="")
			{
				alert("Please select Subject-3: from Optional Subject box.");
				document.frm_admission.ICOM_OPT_SUB9.focus();
				return false;
				}			
	
	if((OPT_sub1com==OPT_sub2com)||(OPT_sub2com==OPT_sub3com)||(OPT_sub1com==OPT_sub3com))
	{
	alert("Please Select Different optional Subject From option !! Same subject should not be entered");
	return false;
	}						
}






var v4=document.forms["frm_admission"]["cand_name"].value;
		if(v4==null || v4=="")
		{
		alert("Enter your Name");
		document.frm_admission.cand_name.focus();
		return false;
		}	
		
var v51=document.frm_admission.DOB_day.value;
		if(v51=="")
		{
		alert("Select Date");
		document.frm_admission.DOB_day.focus();
		//document.frm_book_stock_index.btype.select();
		return false;
		}	
			
	var v61=document.frm_admission.DOB_mon.value;
		if(v61=="")
		{
		alert("Select Month");
		document.frm_admission.DOB_mon.focus();
		//document.frm_book_stock_index.btype.select();
		return false;
		}		
	
	var v71=document.frm_admission.DOB_yr.value;
		if(v71=="")
		{
		alert("Select Year");
		document.frm_admission.DOB_yr.focus();
		//document.frm_book_stock_index.btype.select();
		return false;
		}

		
	var v6=document.forms["frm_admission"]["f_name"].value;
		if(v6==null || v6=="")
		{
		alert("Enter Father's Name");
		document.frm_admission.f_name.focus();
		return false;
		}	

	var v7=document.forms["frm_admission"]["f_occ"].value;
		if(v7==null || v7=="")
		{
		alert("Select Father's Occupation");
		document.frm_admission.f_occ.focus();
		return false;
		}


	var v8=document.forms["frm_admission"]["m_name"].value;
		if(v8==null || v8=="")
		{
		alert("Enter Mother's Name");
		document.frm_admission.m_name.focus();
		return false;
		}	

	//var v9=document.forms["frm_admission"]["m_occ"].value;
	//	if(v9==null || v9=="")
	//	{
	//	alert("Select Mother's Occupation");
	//	document.frm_admission.m_occ.focus();
	//	return false;
	//	}
	//var v10=document.forms["frm_admission"]["g_name"].value;
	//	if(v10==null || v10=="")
	//	{
	//	alert("Enter Guardian's Name");
	//	document.frm_admission.g_name.focus();
	//	return false;
	//	}	
	//var v11=document.forms["frm_admission"]["g_occ"].value;
	//	if(v11==null || v11=="")
	//	{
	//	alert("Select Guardian's Occupation");
	//	document.frm_admission.g_occ.focus();
	//	return false;
	//	}				
		
	//var v12=document.forms["frm_admission"]["RWG"].value;
	//	if(v12==null || v12=="")
	//	{
	//	alert("Enter Relation with Guardian (Like- Uncle, Brother, Sister Etc.");
	//	document.frm_admission.RWG.focus();
	//	return false;
	//	}	
		
		
	//var v13=document.forms["frm_admission"]["can_area_of_interest"].value;
	//	if(v13==null || v13=="")
	//	{
	//	alert("Select area of Interest");
	//	document.frm_admission.can_area_of_interest.focus();
	//	return false;
	//	}	
		
	var v14=document.forms["frm_admission"]["religion"].value;
		if(v14==null || v14=="")
		{
		alert("Select Religion");
		document.frm_admission.religion.focus();
		return false;
		}

	var v15=document.forms["frm_admission"]["nationality"].value;
		if(v15==null || v15=="")
		{
		alert("Select Nationality");
		document.frm_admission.nationality.focus();
		return false;
		}	

	var v16=document.forms["frm_admission"]["caste"].value;
		if(v16==null || v16=="")
		{
		alert("Enter Your Caste");
		document.frm_admission.caste.focus();
		return false;
		}	
			
	
	var v17=document.forms["frm_admission"]["category"].value;
		if(v17==null || v17=="")
		{
		alert("Select Category");
		document.frm_admission.category.focus();
		return false;
		}
		
		
	var v18=document.forms["frm_admission"]["mar_Stat"].value;
		if(v18==null || v18=="")
		{
		alert("Select Marital Status");
		document.frm_admission.mar_Stat.focus();
		return false;
		}

	var v19=document.forms["frm_admission"]["gend"].value;
		if(v19==null || v19=="")
		{
		alert("Select Gender");
		document.frm_admission.gend.focus();
		return false;
		}
	
	var v20=document.forms["frm_admission"]["cand_photo"].value;
		if(v20==null || v20=="")
		{
		alert("Click on Browse Botton to upload photo");
		document.frm_admission.cand_photo.focus();
		return false;
		}

	var v21=document.forms["frm_admission"]["cand_intimation"].value;
		if(v21==null || v21=="")
		{		
		alert("Click on Browse Botton to upload Intimation");
		document.frm_admission.cand_intimation.focus();
		return false;
		}
	
	var v1002=document.forms["frm_admission"]["cand_marksheet"].value;
		if(v1002==null || v1002=="")
		{		
		alert("Click on Browse Botton to upload Marksheet");
		document.frm_admission.cand_marksheet.focus();
		return false;
		}
	
	var v22=document.forms["frm_admission"]["vill_moh_perm"].value;
		if(v22==null || v22=="")
		{		
		alert("Enter your Village/Mohalla of Permanent Address");
		document.frm_admission.vill_moh_perm.focus();
		return false;
		}
	
	var v23=document.forms["frm_admission"]["po_perm"].value;
		if(v23==null || v23=="")
		{		
		alert("Enter your Post of Permanent Address");
		document.frm_admission.po_perm.focus();
		return false;
		}
	
	var v24=document.forms["frm_admission"]["ps_perm"].value;
		if(v24==null || v24=="")
		{		
		alert("Enter Police Station of Permanent Address");
		document.frm_admission.ps_perm.focus();
		return false;
		}
	
	var v25=document.forms["frm_admission"]["dist_perm"].value;
		if(v25==null || v25=="")
		{		
		alert("Enter District of Permanent Address");
		document.frm_admission.dist_perm.focus();
		return false;
		}
	
	var v26=document.forms["frm_admission"]["pin_cd"].value;
		if(v26==null || v26=="" || v26.charAt(0)==""||isNaN(v26))
		{		
		alert("Enter Pin Code (only numbers/digits) of Permanent Address");
		document.frm_admission.pin_cd.focus();
		return false;
		}

	
	var v27=document.forms["frm_admission"]["state_perm"].value;
		if(v27==null || v27=="")
		{		
		alert("Enter State of Permanent Address");
		document.frm_admission.state_perm.focus();
		return false;
		}
	var v28=document.forms["frm_admission"]["vill_moh_cor"].value;
		if(v28==null || v28=="")
		{		
		alert("Enter Village/Mohalla of Correspondence Address");
		document.frm_admission.vill_moh_cor.focus();
		return false;
		}
	var v29=document.forms["frm_admission"]["po_cor"].value;
		if(v29==null || v29=="")
		{		
		alert("Enter Post Office of Correspondence Address");
		document.frm_admission.po_cor.focus();
		return false;
		}
	
	var v30=document.forms["frm_admission"]["ps_cor"].value;
		if(v30==null || v30=="")
		{		
		alert("Enter Police Station of Correspondence Address");
		document.frm_admission.ps_cor.focus();
		return false;
		}

	var v31=document.forms["frm_admission"]["dist_cor"].value;
		if(v31==null || v31=="")
		{		
		alert("Enter District of Correspondence Address");
		document.frm_admission.dist_cor.focus();
		return false;
		}					

	var v32=document.forms["frm_admission"]["pin_cd_cor"].value;
		if(v32==null || v32==""||v32.charAt(0)==""||isNaN(v32))
		{		
		alert("Enter Pin Code (only numbers/digits) of Correspondence Address");
		document.frm_admission.pin_cd_cor.focus();
		return false;
		}

	var v33=document.forms["frm_admission"]["state_cor"].value;
		if(v33==null || v33=="")
		{		
		alert("Enter State of Correspondence Address");
		document.frm_admission.state_cor.focus();
		return false;
		}

	var v34=document.forms["frm_admission"]["cont_no"].value;
		if(v34==null || v34==""||v34.charAt(0)==""||isNaN(v34))
		{		
		alert("Enter Contact Number (only numbers/digits).");
		document.frm_admission.cont_no.focus();
		return false;
		}
		
		if (/^\d{10}$/.test(v34))
		{
		    // value is ok, use it
		} else {
		    alert("Invalid number; Mobile Number must be ten digits")
		    document.frm_admission.cont_no.focus();
		    return false
		}

	var v35=document.forms["frm_admission"]["email_li"].value;
		if(v35==null || v35=="")
		{		
		alert("Enter your Email Id");
		document.frm_admission.email_li.focus();
		return false;
		}
	
	var atpos=v35.indexOf("@");
	var dotpos=v35.lastIndexOf(".");
	if (atpos<1 || dotpos<atpos+2 || dotpos+2>=v35.length)
	  {
	  alert("Not a valid e-mail address");
	  return false;
	  }
			
	var v36=document.forms["frm_admission"]["board_unv"].value;
		if(v36==null || v36=="")
		{		
		alert("Select Board");
		document.frm_admission.board_unv.focus();
		return false;
		}
	
	var v37=document.forms["frm_admission"]["exam_name"].value;
		if(v37==null || v37=="")
		{		
		alert("Select Examination Name");
		document.frm_admission.exam_name.focus();
		return false;
		}

	var v377=document.forms["frm_admission"]["passing_yr"].value;
		if(v377==null || v377=="")
		{		
		alert("Select Passing Year");
		document.frm_admission.passing_yr.focus();
		return false;
		}
	var v38=document.forms["frm_admission"]["t_marks"].value;
		if(v38==null || v38==""||v38.charAt(0)==""||isNaN(v38))
		{		
		alert("Enter Total Marks (Obtained Marks)");
		document.frm_admission.t_marks.focus();
		return false;
		}	

	
	var v40=document.forms["frm_admission"]["div_grd"].value;
		if(v40==null || v40=="")
		{		
		alert("Enter Div/Grade");
		document.frm_admission.div_grd.focus();
		return false;
		}
	
	var v41=document.forms["frm_admission"]["cut1"].value;
		if(v41==null || v41=="")
		{		
		alert("Enter Identification Marks-1");
		document.frm_admission.cut1.focus();
		return false;
		}
	var v42=document.forms["frm_admission"]["cut2"].value;
		if(v42==null || v42=="")
		{		
		alert("Enter Identification Marks-2");
		document.frm_admission.cut2.focus();
		return false;
		}

	
	
		
	
	
//	var v42=document.forms["frm_admission"]["vercode"].value;
//		if(v42==null || v42=="")
//		{		
//		alert("Enter Varification Code");
//		document.frm_admission.vercode.focus();
//		return false;
//		}
	
	//var v42=document.forms["frm_admission"]["vercode"].value;
	 	 //var ses="";
//	var ses = document.getElementById('Session["ver_code"]');
//				alert(v42);
//				alert(ses);
//	
//		if(v42==ses)
//		{		
//		alert("Validation Code is Correct.");
//		document.frm_admission.vercode.focus();
//		return false;
//		}
//		else
//		{
//		alert ("Incorrect Validation Code");
//		return false;
//		}
		
								
  	if(confirm("Are you Confirmed to Submit your data ? or If you want to Re-check your Application form?. If you want to Re-check your Application Form then press Cancel button otherwise press OK Button", "Information"))
	{
	return true;
	}
	else
	{
	return false;
	}


return true;		
}
</script>


<body style="background-color: #AAD5FF">

<?php echo $msg; ?>
<?php 
    $getStudentQry= mysqli_query($conn,"SELECT * FROM upload_data_reg WHERE id=".$_SESSION['user_id']);
    $getstudentDetail= mysqli_fetch_assoc($getStudentQry);
?>
<form name="frm_admission" action="" method="post" onsubmit="return validateForm()" enctype="multipart/form-data">
<div align="center">
  <input name="do" value="contact" type="hidden">

<table align="center" bgcolor="#000000" border="0" cellpadding="0" cellspacing="1" width="70%">
  <tbody><tr>
    <td bgcolor="#FFFFCC"><table bgcolor="#666666" border="0" cellpadding="0" cellspacing="1" width="100%">
      <tbody><tr>
        <td align="center" height="60" valign="top" width="100%">
		<img border="0" src="mbn.jpg" width="988" height="136"></td>
      </tr>
    </tbody></table></td>
  </tr>
  <tr>
    <td align="center" bgcolor="#000000"><span class="style44">INTERMEDIATE&nbsp; APPLICATION FORM 
	for Registration of Session 20-22</span></td>
  </tr>
  <?php 
    $checkExists= mysqli_query($conn,"SELECT * FROM `tbl_userregistration_reg` WHERE userid='".$_SESSION['user_id']."' AND response_message='Transaction successful' AND status=1");
    if(mysqli_num_rows($checkExists) > 0){
    $fetchDetail= mysqli_fetch_assoc($checkExists);
    ?>
    <tr><td><p style="color:#fff; text-align:center;">You have already register your application form. <a href="formprint.php?id=<?php echo base64_encode($fetchDetail["id"]); ?>" style="color: red;">Click here </a> to print.</p></td></tr>
  <?php } else { ?>
    <?php 
    $flag1=1;
    $flag2=1;
    $flag3=1;
    $queryCHK_IA= mysqli_query($conn,"SELECT COUNT(*) as countuniue FROM ia_unique_reg");
    $fetchCHK_IA= mysqli_fetch_assoc($queryCHK_IA);
    if($fetchCHK_IA["countuniue"] >= MAX_ADMISSION){
        $msg .='<h4 style="color:#fff;">Admission Closed for IA</h4>';
        $flag1=0;
    }
    
    $queryCHK_ICM= mysqli_query($conn,"SELECT COUNT(*) as countuniue FROM icm_unique_reg");
    $fetchCHK_ICM= mysqli_fetch_assoc($queryCHK_ICM);
    if($fetchCHK_ICM["countuniue"] >= MAX_ADMISSION){
        $msg .='<h4  style="color:#fff;">Admission Closed for ICOM</h4>';
        $flag2=0;
    }
    
    $queryCHK_ISC= mysqli_query($conn,"SELECT COUNT(*) as countuniue FROM isc_unique_reg");
    $fetchCHK_ISC= mysqli_fetch_assoc($queryCHK_ISC);
    if($fetchCHK_ISC["countuniue"] >= MAX_ADMISSION){
        $msg .='<h4 style="color:#fff;">Admission Closed for ISC</h4>';
        $flag3=0;
    }
    
    if($flag1==1 || $flag2==1 || $flag3==1) {
  ?>
  <tr>
    <td align="center" bgcolor="#EEEEEE">
    <table style="padding-top: 10px;" bgcolor="#EEEEEE" border="0" cellpadding="0" cellspacing="0" width="98%">
      <tbody><tr>
        <td align="center"><table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tbody><tr>
              <td height="25" width="21%">&nbsp; Select Course(IA/ISC/ICOM)</td>
              <td height="25" width="28%"><select name="crs_enrolment" class="style37" onchange="showCustomer(this.value)">
                <option value="">Select Course :</option>
                <option value="<?php echo $getstudentDetail["class"]; ?>"><?php echo $getstudentDetail["class"]; ?></option>
                               
                              </select></td>
             
              <td height="25" width="5%">Session</td>
              <td height="25" width="6%"><select name="sess_from" class="style37" id="sess_from">
                  <option selected="selected" value="">FROM</option>
                                    <option value="2020">2020</option>
                                </select></td>
              <td height="25" width="10%"><select name="sess_2" class="style37" id="sess_2">
                  <option selected="selected" value="">TO</option>
                                    <option value="2022">2022</option>
                                </select></td>
             <td align="right" height="25" width="12%"><span class="style43">Class Roll No&nbsp;&nbsp;</span></td>
              <td height="25" width="18%">
			<input name="pcode" class="style37"  size="21" type="text"><span class="style43">
                </span></td>
            </tr>
          </tbody></table></td>
      </tr>
      <tr>
        <td>
 
 <div id="ia_students" style="">
        <table border="0" cellpadding="0" cellspacing="1" width="100%">
  <tbody><tr>
<!--    <td>&nbsp;</td>-->
    <td><table bgcolor="#000000" border="0" cellpadding="0" cellspacing="1" width="100%">
      <tbody><tr>
        <td colspan="3" bgcolor="#33FF33" height="22">&nbsp;<span class="style33">SUBJECT DETAILS FOR I.A. STUDENTS</span></td>
      </tr>
      <tr>
        <td class="style34" bgcolor="#FFFFFF" height="22" width="33%"><div class="style7" align="center">Compulsory Subjects</div></td>
        <td class="style34" align="center" bgcolor="#FFFFFF" width="51%"><span class="style7">Optional Subjects </span></td>
        <td class="style34" align="left" bgcolor="#FFFFFF" width="16%"><div class="style7" align="center">Additional Subject</div></td>
      </tr>
      <tr>
        <td align="center" bgcolor="#FFFFFF" height="22" valign="top">            <table border="0" cellpadding="0" cellspacing="1" width="100%">
              <tbody><tr>
                <td class="style34" align="left" height="22" width="64%"><span class="style34">100 Marks :</span> </td>
                <td align="left" width="36%"><select name="ia_comp_sub1" class="style34">
                    <option selected="selected" value="">-Select Any One-</option>
                                     <option value="Hindi-Core-A">Hindi-Core-A</option>
                                       <option value="English-Core-A">English-Core-A</option>
                                    </select></td>
              </tr>
                 
                            <tr>
                <td align="left" height="22"><span class="style34">&nbsp;</span>Language Subject 100 Marks:</td>
                <td align="left"><select name="ia_comp_sub3" class="style34">
                    <option selected="selected" value="">-Select Any One-</option>
                                        <option value="English">English</option>
                                        <option value="Hindi">Hindi</option>
                                        <option value="Urdu">Urdu</option>
                                         <option value="Sanskrit">Sanskrit</option>
                                    </select></td>
              </tr>
          </tbody></table></td>
        <td align="center" bgcolor="#FFFFFF" valign="top">                                    <table border="0" cellpadding="0" cellspacing="1" width="100%">
              <tbody><tr>
                <td class="style30" valign="top" width="38%"><select name="IA_OPT_SUB1" class="style32" onchange="display(this.value)">
                    <option selected="selected" value="">-Select Any One-</option>
                                        <option value="Economics">Economics</option>
                                        <option value="Geography">Geography</option>
                                        <option value="History">History</option>
                                        <option value="Logic">Logic</option>
                                        <option value="Political Science">Political Science</option>
                                        <option value="Psychology">Psychology</option>
                                        <option value="Sociology">Sociology</option>
                                        <option value="Philosophy">Philosophy</option>


                                      </select>                </td>
                <td class="style30" valign="top" width="38%"><select name="IA_OPT_SUB2" class="style32" onchange="display(this.value)">
                    <option selected="selected" value="">-Select Any One-</option>
                                        <option value="Economics">Economics</option>
                                        <option value="Geography">Geography</option>
                                        <option value="History">History</option>
                                        <option value="Logic">Logic</option>
                                        <option value="Political Science">Political Science</option>
                                        <option value="Psychology">Psychology</option>
                                        <option value="Sociology">Sociology</option>
                                        <option value="Philosophy">Philosophy</option>

                                      </select>                </td>
                <td class="style30" valign="top" width="24%"><select name="IA_OPT_SUB3" class="style32" onchange="display(this.value)" id="IA_OPT_SUB3">
                    <option selected="selected" value="">-Select Any One-</option>
	                                   <option value="Economics">Economics</option>
                                        <option value="Geography">Geography</option>
                                        <option value="History">History</option>
                                        <option value="Logic">Logic</option>
                                        <option value="Political Science">Political Science</option>
                                        <option value="Psychology">Psychology</option>
                                        <option value="Sociology">Sociology</option>
                                       <option value="Philosophy">Philosophy</option>
 </select>                </td>
              </tr>
              <tr>
                <td class="style30" valign="top">&nbsp;</td>
                <td class="style30" valign="top">&nbsp;</td>
                <td class="style30" valign="top">&nbsp;</td>
              </tr>
              <tr>
                <td colspan="3" class="style30" valign="top">&nbsp;</td>
                </tr>
            </tbody></table></td>
        <td align="center" bgcolor="#FFFFFF" width="16%"><select name="ia_add_sub" class="style34">
            <!--<option value="">Select Subject</option>-->
            <option selected="selected" value="NONE">NONE</option>
        </select></td>
      </tr>
    </tbody></table></td>
    <!--   <td>&nbsp;</td>-->
  </tr>
</tbody></table>
</div>
 <div id="isc_students" style="display:none;">
 <table border="0" cellpadding="0" cellspacing="1" width="100%">
  <tbody><tr>
<!--    <td>&nbsp;</td>-->
    <td><table bgcolor="#000000" border="0" cellpadding="0" cellspacing="1" width="100%">
      <tbody><tr>
        <td colspan="3" bgcolor="#33FF33" height="22">&nbsp;<span class="style12">SUBJECT DETAILS FOR I.Sc. STUDENTS</span></td>
      </tr>
      <tr>
        <td class="style20" bgcolor="#FFFFFF" height="22" width="33%"><div class="style7" align="center">Compulsory Subjects</div></td>
        <td class="style20" align="center" bgcolor="#FFFFFF" width="50%"><span class="style7">Optional Subjects</span> </td>
        <td class="style20" align="left" bgcolor="#FFFFFF" width="16%"><div class="style7" align="center">Additional Subject</div></td>
      </tr>
      <tr>
        <td align="center" bgcolor="#FFFFFF" height="22"><table border="0" cellpadding="0" cellspacing="1" width="100%">
          <tbody><tr>
            <td class="style20" align="left" height="22" width="51%">
			<span class="style20">100 Marks : </span> </td>
            <td align="left" width="49%"><select name="isc_comp_sub1" class="style20" id="isc_comp_sub1">
                <option selected="selected" value="">Subject-1</option>
                <option value="Hindi-Core-A">Hindi-Core-A</option>
                <option value="English-Core-A">English-Core-A</option>
            </select></td>
          </tr>
         
          <tr>
            <td align="left" height="22"><span class="style34">&nbsp;</span>Language Subject 100 Marks: </td>
            <td align="left"><select name="isc_comp_sub3" class="style20" id="isc_comp_sub3">
                <option selected="selected" value="">Subject-3: Select Any One</option>
                                        <option value="English">English</option>
                                        <option value="Hindi">Hindi</option>
                                        <option value="Urdu">Urdu</option>
                                        <option value="Sanskrit">Sanskrit</option>
            </select></td>
          </tr>
        </tbody></table></td>
        <td align="center" bgcolor="#FFFFFF" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tbody><tr>
            <td class="style20" align="left" valign="middle" width="37%">
			<select name="ISC_OPT_SUB4" class="style32" onchange="changer();">
                    <option selected="selected" value="">-Select Any One-</option>
                                        <option value="Mathematics">Mathematics</option>
                                        <option value="Biology">Biology</option>
                                        </select></td>
            <td class="style20" align="left" valign="middle" width="39%">
			<select name="ISC_OPT_SUB5" class="style32" onchange="display(this.value)"  id="ISC_OPT_SUB5">
                    <option selected="" value="">-Select Any One-</option>
                             			<option value="Physics">Physics</option>
                                        <option value="Chemistry">Chemistry</option>
                                                </select></td>
            <td class="style20" align="left" valign="middle" width="25%">
			<select name="ISC_OPT_SUB6" class="style32" onchange="display(this.value)" id="ISC_OPT_SUB6">
                    <option selected="" value="">-Select Any One-</option>
                                        <option value="Physics">Physics</option>
                                        <option value="Chemistry">Chemistry</option>
                                      </select></td>
          </tr>
          <tr>
            <td class="style20" align="left" valign="middle" colspan="3">&nbsp;</td>
          </tr>
          <tr>
            <td class="style20" align="left" valign="middle" colspan="3">&nbsp;</td>
          </tr>
          <tr>
            <td class="style20" valign="middle" colspan="3">&nbsp;</td>
          </tr>
        </tbody></table></td>
        <td align="center" bgcolor="#FFFFFF" width="16%"><select name="isc_add_sub" class="style20" id="isc_add_sub">
	      <option selected="selected" value="NONE">NONE</option>
            			 <option value="MATHEMATICS">MATHEMATICS</option>
			 <option value="BIOLOGY">BIOLOGY</option>

               </select></td>
      </tr>
    </tbody></table></td>
<!--    <td>&nbsp;</td>-->
  </tr>
</tbody></table>
 </div>
 <div id="icom_students" style="display:none;">
   <table border="0" cellpadding="0" cellspacing="1" width="100%">
                        <tbody><tr>
<!--                          <td>&nbsp;</td>-->
                          <td><table bgcolor="#000000" border="0" cellpadding="0" cellspacing="1" width="100%">
                            <tbody><tr>
                              <td colspan="3" bgcolor="#33FF33" height="22">&nbsp;<span class="style12">SUBJECT DETAILS FOR I.Com. STUDENTS</span></td>
                            </tr>
                            <tr>
                              <td class="style20" bgcolor="#FFFFFF" height="22" width="33%"><div class="style7" align="center">Compulsory Subjects</div></td>
                              <td class="style20" align="center" bgcolor="#FFFFFF" width="50%"><span class="style7">Optional Subjects</span></td>
                              <td class="style20" align="left" bgcolor="#FFFFFF" width="16%"><div class="style7" align="center">Additional Subjects</div></td>
                            </tr>
                            <tr>
                              <td align="center" bgcolor="#FFFFFF" height="22"><table border="0" cellpadding="0" cellspacing="1" width="100%">
                                <tbody><tr>
                                  <td class="style20" align="left" height="22" width="52%">100 Marks : </td>
                                  <td align="left" width="48%"><select name="icom_comp_sub1" class="style20" id="icom_comp_sub1">
                                      <option selected="selected" value="">Subject-1</option>
                                      <option value="Hindi-Core-A">Hindi-Core-A</option>
                                      <option value="English-Core-A">English-Core-A</option>
                                  </select></td>
                                </tr>
                               
                                <tr>
                                  <td align="left" height="22"><span class="style34">&nbsp;</span>Language Subject 100 Marks: </td>
                                  <td align="left"><select name="icom_comp_sub3" class="style20" id="icom_comp_sub3">
                                      <option selected="selected" value="">Subject-3: Select Any One</option>
                                    <option value="English">English</option>
                                        <option value="Hindi">Hindi</option>
                                        <option value="Sanskrit">Sanskrit</option>
                                        <option value="Urdu">Urdu</option>

                                  </select></td>
                                </tr>
                              </tbody></table></td>
                              <td align="left" bgcolor="#FFFFFF" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tbody><tr>
                                  <td width="37%">
									<select name="ICOM_OPT_SUB7" class="style32" onchange="changer1()">
                    <option selected="selected" value="">-Select Any One-</option>
                                        <option value="Accountancy">Accountancy</option>
                                         </select></td>
                                  <td width="34%">
									<select name="ICOM_OPT_SUB8" class="style32" onchange="display(this.value)" id="ICOM_OPT_SUB8">
                    <option selected="selected" value="">-Select Any One-</option>
                                        <option value="Business Studies">Business Studies</option>
                                        <option value="Economics">Economics</option>
                                      
                                      </select></td>
                                  <td width="29%">
									<select name="ICOM_OPT_SUB9" class="style32" onchange="display(this.value)" id="ICOM_OPT_SUB9">
                    <option selected="selected" value="">-Select Any One-</option>
                                        <option value="Enterpreneurship">Enterpreneurship</option>
                                        
                                      </select></td>
                                </tr>
                                <tr>
                                  <td colspan="3">&nbsp;</td>
                                </tr>
                              </tbody></table></td>
                    <td align="center" bgcolor="#FFFFFF" width="16%"><select name="ICOM_ADD_SUB" class="style20" id="select3">
                                  <option value="NONE" selected="selected">NONE</option>
                              </select></td>
                            </tr>
                          </tbody></table></td>
<!--                          <td>&nbsp;</td>-->
                        </tr>
                  </tbody></table>
  </div>

  <!--<div id="txtHint">Customer info will be listed here..</div>.--></td>
      </tr>
      <tr><td>&nbsp;</td></tr>
     <!-- <tr><td>&nbsp;</td>
      </tr>-->
      <tr>
        <td align="center" valign="top"><table bgcolor="#000000" border="0" cellpadding="0" cellspacing="1" width="100%">
          <tbody><tr>
            <td bgcolor="#33FF33" height="20"><span class="style35">&nbsp;PERSONAL DETAILS</span></td>
          </tr>
          <tr>
            <td align="center" bgcolor="#FFFFFF" valign="top"><table align="center" bgcolor="#000000" border="0" cellpadding="0" cellspacing="1" width="100%">
              
              <tbody><tr>
                <td align="left" bgcolor="#FFFFFF" height="25" width="30%"><span class="style37">Name / <span class="style38">नाम</span></span></td>
                <td align="left" bgcolor="#FFFFFF" height="25" width="23%">
				<input name="cand_name" class="style37" id="cand_name" size="29" style="text-transform: uppercase;" placeholder="Name / नाम" type="text" readonly="true" value="<?php echo $getstudentDetail["stud_name"]; ?>"></td>
                <td align="left" bgcolor="#FFFFFF" height="25" width="25%"><span class="style37">Date of Birth /<span class="style38"> जन्मतिथि</span></span></td>
                <td align="left" bgcolor="#FFFFFF" height="25" width="23%">
		
              <select name="DOB_day" class="style20" id="DOB_day">
                          <option value="">DATE</option>
                                                    <option value="1">1</option>
                                                    <option value="2">2</option>
                                                    <option value="3">3</option>
                                                    <option value="4">4</option>
                                                    <option value="5">5</option>
                                                    <option value="6">6</option>
                                                    <option value="7">7</option>
                                                    <option value="8">8</option>
                                                    <option value="9">9</option>
                                                    <option value="10">10</option>
                                                    <option value="11">11</option>
                                                    <option value="12">12</option>
                                                    <option value="13">13</option>
                                                    <option value="14">14</option>
                                                    <option value="15">15</option>
                                                    <option value="16">16</option>
                                                    <option value="17">17</option>
                                                    <option value="18">18</option>
                                                    <option value="19">19</option>
                                                    <option value="20">20</option>
                                                    <option value="21">21</option>
                                                    <option value="22">22</option>
                                                    <option value="23">23</option>
                                                    <option value="24">24</option>
                                                    <option value="25">25</option>
                                                    <option value="26">26</option>
                                                    <option value="27">27</option>
                                                    <option value="28">28</option>
                                                    <option value="29">29</option>
                                                    <option value="30">30</option>
                                                    <option value="31">31</option>
                                                  </select><select name="DOB_mon" class="style20" id="DOB_mon">
                            <option value="">MONTH</option>
                                                        <option value="1">1</option>
                                                        <option value="2">2</option>
                                                        <option value="3">3</option>
                                                        <option value="4">4</option>
                                                        <option value="5">5</option>
                                                        <option value="6">6</option>
                                                        <option value="7">7</option>
                                                        <option value="8">8</option>
                                                        <option value="9">9</option>
                                                        <option value="10">10</option>
                                                        <option value="11">11</option>
                                                        <option value="12">12</option>
                                                      </select><select name="DOB_yr" class="style20" id="DOB_yr">
                            <option value="">YEAR</option>
                             							<option value="1976">1970</option>
                                                        <option value="1977">1971</option>
                                                        <option value="1978">1972</option>
                                                        <option value="1979">1973</option>
                                                        <option value="1980">1974</option>
                                                        <option value="1975">1975</option>
                                                        <option value="1976">1976</option>
                                                        <option value="1977">1977</option>
                                                        <option value="1978">1978</option>
                                                        <option value="1979">1979</option>
                                                        <option value="1980">1980</option>
                                                        <option value="1981">1981</option>
                                                        <option value="1982">1982</option>
                                                        <option value="1983">1983</option>
                                                        <option value="1984">1984</option>
                                                        <option value="1985">1985</option>
                                                        <option value="1986">1986</option>
                                                        <option value="1987">1987</option>
                                                        <option value="1988">1988</option>
                                                        <option value="1989">1989</option>
                                                        <option value="1990">1990</option>
                                                        <option value="1991">1991</option>
                                                        <option value="1992">1992</option>
                                                        <option value="1993">1993</option>
                                                        <option value="1994">1994</option>
                                                        <option value="1995">1995</option>
                                                        <option value="1996">1996</option>
                                                        <option value="1997">1997</option>
                                                        <option value="1998">1998</option>
                                                        <option value="1999">1999</option>
                                                        <option value="2000">2000</option>
                                                        <option value="2001">2001</option>
                                                        <option value="2002">2002</option>
                                                        <option value="2003">2003</option>
                                                        <option value="2004">2004</option>
                                                        <option value="2005">2005</option>
                                                        <option value="2006">2006</option>
                                                        <option value="2007">2007</option>
                                                        <option value="2008">2008</option>
                                                        <option value="2009">2009</option>
                                                        <option value="2010">2010</option>
                                                        <option value="2011">2011</option>
                                                        <option value="2012">2012</option>
                                                        <option value="2013">2013</option>
                                                      </select></tr>
              <tr>
                <td align="left" bgcolor="#FFFFFF" height="25"><span class="style37">Father's/Guardian&#39;s&nbsp; Name / <span class="style38">पिता 
				/अभिभावक का नाम </span></span></td>
                <td align="left" bgcolor="#FFFFFF" height="25">
				<input name="f_name" class="style37" id="f_name" size="29" style="text-transform: uppercase;" placeholder="Father's Name / पिता का नाम" type="text" readonly="true" value="<?php echo $getstudentDetail["f_name"]; ?>" ></td>
                <td align="left" bgcolor="#FFFFFF" height="25"><span class="style37">Father's Occupation /<span class="style38">पिता का व्यवसाय</span></span></td>
                <td align="left" bgcolor="#FFFFFF" height="25"><select name="f_occ" class="style37">
                    <option selected="selected" value="">SELECT OCCUPATION</option>
                    <option value="CENTRAL GOVT. SERVICE">CENTRAL GOVT. SERVICE</option>
                    <option value="STATE GOVT. SERVICE">STATE GOVT. SERVICE</option>
                    <option value="BUSINESS">BUSINESS</option>
                    <option value="FARMER">FARMER</option>
                    <option value="PRIVATE JOB">PRIVATE JOB</option>
                    <option value="OTHERS">OTHERS</option>
                </select></td>
              </tr>
              <tr>
                <td align="left" bgcolor="#FFFFFF" height="25"><span class="style37">Mother's Name / <span class="style38">माता का नाम</span></span></td>
                <td align="left" bgcolor="#FFFFFF" height="25">
				<input name="m_name" class="style37" id="m_name" size="29" style="text-transform: uppercase;" placeholder="Mother's Name / माता का नाम" type="text" ></td>
                <td align="left" bgcolor="#FFFFFF" height="25">
				<span class="style37">Adhar Number/आधार संख्या</span></td>
                <td align="left" bgcolor="#FFFFFF" height="25">
				<input name="adhar_no" class="style37" id="adhar_no" size="21" style="text-transform: uppercase;" placeholder="Adhar Number/आधार संख्या" type="text"></td>
              </tr>
              <tr>
                <td align="left" bgcolor="#FFFFFF" height="25"><span class="style37">Religion /<span class="style38"> धर्म</span> </span></td>
                <td align="left" bgcolor="#FFFFFF" height="25"><select name="religion" class="style37" id="religion">
                    <option selected="selected" value="">SELECT RELIGION</option>
                    <option value="HINDU">HINDU</option>
                    <option value="MUSLIM">MUSLIM</option>
                    <option value="SIKH">SIKH</option>
                    <option value="CHRISTIAN">CHRISTIAN</option>
                    <option value="BUDDHISM">BUDDHISM</option>
                    <option value="JAINISM">JAINISM</option>
                    <option value="OTHERS">OTHERS</option>
                </select></td>
                <td align="left" bgcolor="#FFFFFF" height="25"><span class="style37">Nationality / <span class="style38">राष्ट्रीयता</span></span></td>
                <td align="left" bgcolor="#FFFFFF" height="25"><select name="nationality" class="style37" id="nationality">
                    <option selected="selected" value="">SELECT NATIONALITY</option>
                    <option value="INDIAN">INDIAN</option>
                </select></td>
              </tr>
              <tr>
                <td align="left" bgcolor="#FFFFFF" height="25"><span class="style37"> Caste /<span class="style38"> जाति</span></span></td>
                <td align="left" bgcolor="#FFFFFF" height="25">
				<input name="caste" class="style37" id="caste" size="29" style="text-transform: uppercase;" placeholder="Caste / जाति" type="text"></td>
                <td align="left" bgcolor="#FFFFFF" height="25"><span class="style37">Category /<span class="style38"> जाति समुदाय</span></span></td>
                <td align="left" bgcolor="#FFFFFF" height="25"><select name="category" class="style37" id="category">
                    <option value="" selected="selected">SELECT CATEGORY</option>
                    <option value="<?php echo $getstudentDetail["cate"]; ?>"><?php echo $getstudentDetail["cate"]; ?></option>
                    
                </select></td>
              </tr>
              <tr>
                <td align="left" bgcolor="#FFFFFF" height="25"><span class="style37">Marital Status / <span class="style38">वैवाहिक स्थिति</span></span></td>
                <td align="left" bgcolor="#FFFFFF" height="25"><span class="style37">
                  <select name="mar_Stat" class="style37">
                    <option selected="selected" value="">SELECT MARITAL STATUS</option>
                      <option value="UNMARRIED">UNMARRIED</option>
                    <option value="MARRIED">MARRIED</option>
                    
                  </select>
                </span></td>
                <td align="left" bgcolor="#FFFFFF" height="25"><span class="style37">Gender / <span class="style38">लिंग</span> </span></td>
                <td align="left" bgcolor="#FFFFFF" height="25"><select name="gend" class="style37" id="gend">
                    <option selected="selected" value="">SELECT GENDER</option>
                  <option value="<?php echo $getstudentDetail["gender"]; ?>"><?php echo $getstudentDetail["gender"]; ?></option>
                </select></td>
              </tr>
              
            </tbody></table></td>
          </tr>
       <!--   <tr>
            <td align="center" valign="top" bgcolor="#000000">&nbsp;</td>
          </tr>-->
<!--          <tr>
            <td bgcolor="#000000">&nbsp;</td>
          </tr>-->
        </tbody></table></td>
      </tr>
      <tr>
        <td align="center" height="10" valign="top">&nbsp;</td>
      </tr>
      <tr>
        <td align="center" valign="top"><table align="center" bgcolor="#000000" border="0" cellpadding="0" cellspacing="1" width="100%">
          <tbody><tr>
            <td colspan="6" bgcolor="#33FF33" height="20">&nbsp;<span class="style39">CORRESPONDENCE 
			ADDRESS / <span class="style41">अस्थाई पता </span></span></td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF" height="22" valign="top" width="13%"><span class="style40">Vill/Mohalla</span></td>
            <td bgcolor="#FFFFFF" height="22" valign="top" width="21%"><input name="vill_moh_perm" class="style40" id="vill_moh_perm" size="20" style="text-transform: uppercase;" placeholder="गांव / मोहल्ला" type="text"></td>
            <td bgcolor="#FFFFFF" height="22" valign="top" width="16%"><span class="style40">P.O.</span></td>
            <td bgcolor="#FFFFFF" height="22" valign="top" width="17%"><input name="po_perm" class="style40" id="po_perm" size="15" style="text-transform: uppercase;" placeholder="पोस्ट" type="text"></td>
            <td bgcolor="#FFFFFF" height="22" valign="top" width="14%"><span class="style40">P.S. </span></td>
            <td bgcolor="#FFFFFF" height="22" valign="top" width="19%"><input name="ps_perm" class="style40" id="ps_perm" size="18" style="text-transform: uppercase;" placeholder="थाना" type="text"></td>
          </tr>
           <tr>
            <td bgcolor="#FFFFFF" height="22" valign="top" width="13%"><span class="style27">District </span></td>
            <td bgcolor="#FFFFFF" height="22" valign="top" width="21%"><span class="style41">
              <input name="dist_perm" class="style40" id="dist_perm" size="12" style="text-transform: uppercase;" placeholder="जिला" type="text">
            </span></td>
            <td bgcolor="#FFFFFF" height="22" valign="top" width="16%"><span class="style40">Pin Code</span></td>
            <td bgcolor="#FFFFFF" height="22" valign="top" width="17%"><span class="style41">
              <input name="pin_cd" class="style40" id="pin_cd" size="8" style="text-transform: uppercase;" placeholder="पिन कोड" type="text">
            </span></td>
            <td bgcolor="#FFFFFF" height="22" valign="top" width="14%"><span class="style40">State</span></td>
            <td bgcolor="#FFFFFF" height="22" valign="top" width="19%"><input name="state_perm" class="style40" id="state_perm" size="12" style="text-transform: uppercase;" placeholder="राज्य" type="text"></td>
          </tr>
           <tr>
            <td colspan="6" align="center" bgcolor="#FFFFFF" valign="top">
              <input name="chkopt" class="style40" onclick="Fillcorrespondance_Address(this,this.form)" value="80001" type="checkbox">
              <span class="style24">Select box if Correspondence Address is same as Permanent Address.</span></td>
            </tr>
            
               <tr>
            <td colspan="6" bgcolor="#33FF33" height="20" valign="top"><span class="style39">&nbsp;&nbsp;PERMANENT ADDRESS /&nbsp;<span class="style41">स्थाई पता</span></span></td>
            </tr>
                <tr>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="13%"><span class="style40">Vill/Mohalla</span></td>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="21%"><input name="vill_moh_cor" class="style40" id="vill_moh_cor" size="20" style="text-transform: uppercase;" placeholder="गांव / मोहल्ला" type="text"></td>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="16%"><span class="style40">P.O.</span></td>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="17%"><input name="po_cor" class="style40" id="po_cor" size="15" style="text-transform: uppercase;" placeholder="पोस्ट" type="text"></td>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="14%"><span class="style40">P.S. </span></td>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="19%"><input name="ps_cor" class="style40" id="ps_cor" size="18" style="text-transform: uppercase;" placeholder="थाना" type="text"></td>
          </tr>
                <tr>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="13%"><span class="style27">District </span></td>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="21%"><input name="dist_cor" class="style40" id="dist_cor" size="12" style="text-transform: uppercase;" placeholder="जिला" type="text"></td>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="16%"><span class="style40">Pin Code</span></td>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="17%"><input name="pin_cd_cor" class="style40" id="pin_cd_cor" size="8" style="text-transform: uppercase;" placeholder="पिन कोड" type="text"></td>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="14%"><span class="style40">State</span></td>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="19%"><input name="state_cor" class="style40" id="state_cor" size="12" style="text-transform: uppercase;" placeholder="राज्य" type="text"></td>
          </tr>
          
                  <tr>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="13%"><span class="style40">Contact No.</span></td>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="21%"><input name="cont_no" class="style40" id="cont_no" size="10" placeholder="सम्पर्क संख्या" type="text" value="<?php echo $getstudentDetail["mob_no"]; ?>"></td>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="16%"><span class="style40">Email</span></td>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="17%"><input name="email_li" class="style40" id="email_li" size="22" style="text-transform: lowercase;" placeholder="ई-मेल" type="text" value="<?php echo $getstudentDetail["email_id"]; ?>"></td>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="14%">&nbsp;</td>
            <td bgcolor="#FFFFFF" height="25" valign="top" width="19%">&nbsp;</td>
                  </tr>
          <tr>
            <td colspan="6" align="center" bgcolor="#FFFFFF" valign="top"><table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
         
            <!--  <tr>
                <td height="20" align="center" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
              <tr>
                <td height="25">&nbsp;</td>
              </tr>-->

            </table></td>
          </tr>
        </tbody></table></td>
      </tr>
      <tr>
        <td align="center" height="10" valign="top">&nbsp;</td>
      </tr>
      <tr>
        <td align="center" valign="top"><table bgcolor="#000000" border="0" cellpadding="0" cellspacing="1" height="105" width="100%">
          <tbody><tr>
            <td colspan="5" align="left" bgcolor="#33FF33" height="20">&nbsp;<span class="style39">PREVIOUS EDUCATIONAL QUALIFICATION 
			</span></td>
          </tr>
          <tr>
            <td align="center" bgcolor="#FFFFFF" height="25" width="26%"><span class="style40">
			Passing Board /<span class="style41"> उर्त्तीण बोर्ड</span><br>
            </span></td>
            <td align="center" bgcolor="#FFFFFF" width="22%"><span class="style40">Examination Name / <br>
                  <span class="style41">परीक्षा का नाम</span></span> </td>
            <td align="center" bgcolor="#FFFFFF" width="18%"><span class="style40">Passing Year /<br>
                  <span class="style41">उर्त्तीण वर्ष</span></span></td>
            <td align="center" bgcolor="#FFFFFF" width="15%">
			<span class="style40">Roll Code<br>
                  रोल कोड </span></td>
            <td align="center" bgcolor="#FFFFFF" height="25" width="18%">
			<span class="style40">Roll Number<br>
                  रोल नंबर&nbsp; </span></td>
          </tr>
          <tr>
            <td align="center" bgcolor="#FFFFFF" height="25" width="26%"><span class="style40">
              <select name="board_unv" class="style37">
                <option selected="selected" value="">SELECT BOARD</option>
                <option value="<?php echo $getstudentDetail["m_name"]; ?>"><?php echo $getstudentDetail["m_name"]; ?></option>
              </select>
            </span></td>
            <td bgcolor="#FFFFFF" height="25" width="22%"><span class="style40">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              <select name="exam_name" id="exam_name" class="style37">
                <option selected="selected" value="">SELECT EXAMINATION</option>
                <option value="10TH">10TH</option>
                <!-- <option value="C.B.S.E.">C.B.S.E.</option>
                        <option value="I.C.S.E.">I.C.S.E.</option>
                        <option value="Others Equivalent Board">Others Equivalent Board</option>-->
              </select>
            </span></td>
            <td bgcolor="#FFFFFF" height="25" width="18%"><span class="style40">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              <select name="passing_yr" class="style37">
                <option selected="selected" value="">PASSING YEAR</option>
                 <option value="2020">2020</option>
   <option value="2019">2019</option>               
<option value="2018">2018</option>
				                <option value="2017">2017</option>
				                <option value="2016">2016</option>
				                <option value="2015">2015</option>
                                <option value="2014">2014</option>
                                <option value="2013">2013</option>
                                <option value="2012">2012</option>
                                <option value="2011">2011</option>
                                <option value="2010">2010</option>
                                
                              </select>
            </span></td>
            <td align="center" bgcolor="#FFFFFF" height="25" width="15%"><span class="style40">
              <input size="13" name="t_marks" class="style40" type="text" >
            </span></td>
            <td align="center" bgcolor="#FFFFFF" height="25" width="18%"><span class="style40">
              <input size="11" name="div_grd" class="style40" style="text-transform: uppercase;" type="text">
            </span></td>
          </tr>
          <!--<tr>
                        <td height="25" align="left" bgcolor="#FFFFFF" class="style18">&nbsp;Upload Marksheet / <span class="style26">अपलोड मार्कसीट</span></td>
                        <td height="25" colspan="2" align="left" bgcolor="#FFFFFF"><input name="tenthTH_MARKSHEET" type="file" class="style20"  size="10" id="tenthTH_MARKSHEET" value="512"/></td>
                        <td height="25" align="center" bgcolor="#FFFFFF">&nbsp;</td>
                        <td height="25" align="center" bgcolor="#FFFFFF">&nbsp;</td>
                        <td height="25" align="center" bgcolor="#FFFFFF">&nbsp;</td>
                        <td height="25" align="center" bgcolor="#FFFFFF">&nbsp;</td>
                      </tr>-->
        </tbody></table></td>
      </tr>
          <tr>
        <td align="center" valign="top">&nbsp;</td>
      </tr>
      <!-- UploadSectin -->
      
      <tr>
        <td align="center" valign="top">
		<table bgcolor="#000000" border="0" cellpadding="0" cellspacing="1" height="70" width="100%">
          <tbody><tr>
            <td colspan="7" align="left" bgcolor="#33FF33" height="19">&nbsp;<span class="style39">UPLOAD DOCUMENT</span></td>
          </tr>
         <tr>
            <td height="26" bgcolor="#FFFFFF" align="left"><span class="style36">Upload Self Attested Photograph / <span class="style38">अपलोड फोटो</span></span></td>
            <td height="26" bgcolor="#FFFFFF" align="left"><input name="cand_photo" class="style37" size="10" id="cand_photo" value="512" type="file"></td>
            <td height="26" bgcolor="#FFFFFF" align="left"><span class="style36">Upload Signature / <span class="style38">अपलोड  हस्ताक् </span></span></td>
            <td height="26" bgcolor="#FFFFFF" align="left"><input name="cand_clc" class="style37" size="10" id="cand_clc" value="512" type="file"></td>
          </tr>
        
        </tbody></table></td>
      </tr>
          <tr>
        <td align="center" valign="top" height="29">&nbsp;</td>
      </tr>
      <!-- End Upload -->
          <tr>
        <td align="center" valign="top"><table bgcolor="#000000" border="0" cellpadding="0" cellspacing="1" width="100%">
          <tbody><tr>
            <td colspan="2" align="left" bgcolor="#33FF33" height="25">&nbsp;<span class="style39">OTHER&#39;S DETAILS</span></td>
          </tr>
          <tr>
            <td class="style43" align="center" bgcolor="#FFFFFF" width="44%">
			Reference No/<span style="font-size: 8.0pt; line-height: 115%; font-family: Mangal; color: black">संदर्भ संख्या</span><br>
            </td>
            <td class="style43" align="center" bgcolor="#FFFFFF" width="56%"></td>
          </tr>
          <tr>
            <td align="center" bgcolor="#FFFFFF">
			<input name="pserial" class="style37" value="<?php echo $_SESSION["ref_no"] ?>" size="21" readonly="yes" type="text"></td>
            <td align="center" bgcolor="#FFFFFF"></td>
          </tr>
          <tr>
            <td align="center" bgcolor="#33FF33" colspan="2">
			<p align="left"><b><font face="Cambria" size="2">Two Identification marks of 
			students must / छात्रों के दो पहचान चिह्न अवश्य होने चाहिए</font></b></td>
          </tr>
          <tr>
            <td align="center" bgcolor="#FFFFFF">
			1.*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
			<input name="cut1" class="style37"  size="40" type="text"></td>
            <td align="center" bgcolor="#FFFFFF">2*.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        <input name="cut2" class="style37" size="40" type="text"></td>
          </tr>
          <tr>
            <td align="center" bgcolor="#33FF33" colspan="2">
			<p align="left"><b><font face="Cambria" size="2">Bank Details of 
			Student / छात्र का बैंक विवरण</font></b></td>
          </tr>
          <tr>
            <td align="left" bgcolor="#FFFFFF">
			<font face="Cambria" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Bank 
			Account No/ बैंक खाता नम्बर:&nbsp;</font>&nbsp;&nbsp; </td>
            <td align="center" bgcolor="#FFFFFF"> 
			<input name="bnk_accno" class="style37"  size="40" type="text"></td>
          </tr>

          <tr>
            <td align="left" bgcolor="#FFFFFF">
			<font face="Cambria" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Account 
			Name/ खाते का नाम :&nbsp;</font>&nbsp;&nbsp; </td>
            <td align="center" bgcolor="#FFFFFF"> 
			<input name="bnk_acc_name" class="style37"  size="40" type="text"></td>
          </tr>

          <tr>
            <td align="left" bgcolor="#FFFFFF">
			<font face="Cambria" size="2">&nbsp; </font>&nbsp;&nbsp;
			<font face="Cambria" size="2">Bank IFSC Code/ बैंक IFSC कोड:&nbsp;</font>&nbsp;&nbsp; </td>
            <td align="center" bgcolor="#FFFFFF"> 
			<input name="bnk_ifsc_code" class="style37"  size="40" type="text"></td>
          </tr>

          <tr>
            <td align="left" bgcolor="#FFFFFF" height="24">
			<font face="Cambria" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Branch 
			Name/ शाखा का नाम</font></td>
            <td align="center" bgcolor="#FFFFFF" height="24"> 
			<input name="bnk_branch" class="style37"  size="40" type="text"></td>
          </tr>

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

      <tr>
        <td align="center" valign="top">
        
        
        </td>
      </tr>
      <tr>
        <td align="center" valign="top"><input name="submit" class="style43" value="SUBMIT" type="submit"></td>
      </tr>
<!--      <tr>
        <td align="center" valign="top">&nbsp;</td>
      </tr>-->
    </tbody></table>
   </td>
  </tr>
  

  <tr>
    <td bgcolor="#EEEEEE">
	<table border="0" cellpadding="0" cellspacing="0" width="100%" height="29">
      <tbody><tr>
        <td align="center" bgcolor="#000000" height="29">&nbsp;</td>
      </tr>
    </tbody></table></td>
  </tr>

<!--  <tr>
    <td align="center" bgcolor="#FFFFFF">&nbsp;
      <!--onclick="return CheckMe();"</td>
  </tr>-->
  <?php } else { ?> 
  <tr><td><?php echo $msg; ?></td></tr>
  <?php } } ?>
  </tbody></table>
  </div></form>
  
  <div class=" fb_reset" id="fb-root"><div style="position: absolute; top: -10000px; height: 0pt; width: 0pt;"><div><iframe src="online_adm_frm.php_files/V80PAcvrynR.htm" style="border: medium none;" tabindex="-1" title="Facebook Cross Domain Communication Frame" aria-hidden="true" id="fb_xdm_frame_http" allowtransparency="true" name="fb_xdm_frame_http" frameborder="0" scrolling="no"></iframe><iframe src="online_adm_frm.php_files/V80PAcvrynR_002.htm" style="border: medium none;" tabindex="-1" title="Facebook Cross Domain Communication Frame" aria-hidden="true" id="fb_xdm_frame_https" allowtransparency="true" name="fb_xdm_frame_https" frameborder="0" scrolling="no"></iframe></div></div><div style="position: absolute; top: -10000px; height: 0pt; width: 0pt;"><div><iframe src="online_adm_frm.php_files/ping.htm" style="display: none;" allowtransparency="true" name="f1c89a6a43a8652" frameborder="0" scrolling="no"></iframe></div></div></div></body></html>