<?php
session_start();

if (!isset($_SESSION['id'])) {
    header("location: index.php");
}
include "fetch_data.php";
include "connection.php";

error_reporting(0);






/* Start Procedure for GRAPH */
$APP_ID = $_SESSION['id'];
// echo "$APP_ID";
$curs11 = oci_new_cursor($conn);

$stid11 = oci_parse($conn, "begin PKG_AD_ADM.DPD_AD_ADM_grid(:cur_data,:APP_ID); end;");

oci_bind_by_name($stid11, ":cur_data", $curs11, -1, OCI_B_CURSOR);
oci_bind_by_name($stid11, ":APP_ID", $APP_ID, -1, SQLT_INT);

oci_execute($stid11);
oci_execute($curs11);
$abc = array();
while (($row11 = oci_fetch_array($curs11, OCI_ASSOC + OCI_RETURN_NULLS)) != false) {

    foreach ($row11 as $key => $data) {

        if (is_object($data)) {
            $abc[$key] = $data->load();
        } else {
            $abc[$key] = $data;
        }
    }
    $abc = array_map('utf8_encode', $abc);
}
/* End Procedure for GRAPH */

//var_dump($abc);


/* retrive religion */
$reli = "SELECT RG_NAME FROM AD_RELIGION_MST WHERE RG_CODE = '" . $abc['RG_CODE'] . "' ";
$reli = ociparse($conn, $reli);
oci_execute($reli);
$reli = oci_fetch_assoc($reli);



/* retrive ssc group */
$ssc_gr = "SELECT * FROM AD_SSC_GR WHERE GR_CODE = '" . $abc['SSC_GR_CODE'] . "' ";
$ssc_gr = ociparse($conn, $ssc_gr);
oci_execute($ssc_gr);
$ssc_gr = oci_fetch_assoc($ssc_gr);


/* retrive board */
$board = "SELECT BOARD_NAME FROM AD_BOARD WHERE BOARD_CODE = '" . $abc['BOARD_CODE'] . "' ";
$board = ociparse($conn, $board);
oci_execute($board);
$board = oci_fetch_assoc($board);



/* retrive category */
$ap_cat = "SELECT CAT_NAME FROM AD_CAT WHERE CAT_CODE = '" . $abc['APP_CAT'] . "' ";
$ap_cat = ociparse($conn, $ap_cat);
oci_execute($ap_cat);
$ap_cat = oci_fetch_assoc($ap_cat);






$sql_button = "select count(*) ispay from AD_ADMISSION WHERE APP_ID = '$APP_ID' AND PAYMENT_STATUS = 'P'";
// print_r($sql_button);
$parse = ociparse($conn, $sql_button);
oci_execute($parse);


while ($row = oci_fetch_assoc($parse)) {
    $button[] = $row;
}

// var_dump($division);
// echo count($division);
oci_free_statement($parse);






?>









<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">

    <script src="js/jquery-1.8.3.min.js"></script>
    <!-- <script id = "myScript" src="https://scripts.pay.bka.sh/versions/1.2.0-beta/checkout/bKash-checkout.js"></script> -->
    <script id="myScript" src="https://scripts.sandbox.bka.sh/versions/1.2.0-beta/checkout/bKash-checkout-sandbox.js"></script>




    <style>
        #all {
            font-size: 12px;
            margin: 0px;
            padding: 0;
            font-weight: 700;
            font-family: 'Times New Roman', Times, serif
        }

        #invoice {
            margin-left: 30px;
            margin-right: 15px;
            /* margin-top: 20px; */
            margin-bottom: 20px;

        }

        #main {
            width: 750px;
            /* height: 1020px; */
            height: auto;
            margin-left: auto;
            margin-right: auto;
            padding-left: 25px;

        }

        #head {
            text-align: center;
        }

        h6 {
            font-size: 13px;
            background-color: black;
            color: white;
        }

        label {
            margin-right: 5px;
            font-weight: bold;

        }

        #v_head {
            border: 1px solid;
            padding-left: 10px;
            padding-right: 10px;
            font-weight: bold;
            text-align: center;
            width: 100px;
        }

        #value {

            border-bottom: 1px solid black;
            font-weight: bold;
            text-align: center;
        }
    </style>

</head>

<!-- <body onLoad="download()" ;> -->

<body>
    <?php include 'dashboard.php'; ?>
    <div id="all" class="card mt-2">
        <div class="card-body">
            <div class="d-flex justify-content-right mt-2">
                <div class="ml-2">
                    <a href="admissionedit.php" class="btn btn-success">Edit</a>
                </div>





                <?php

                if ($button[0]['ISPAY'] == 0) {
                ?>

                    <div class="ml-2">
                        <!-- <a href="payment" class="btn btn-success">Payment</a> -->
                        <!-- <a href="payment" class="btn btn-success">Payment</a> -->
                        <a href="bkash2_pay/payment.php" id="bKash_button" class="btn btn-success">Pay With bKash</a>

                    </div>

                <?php
                } else if ($button[0]['ISPAY'] > 0) {
                ?>

                    <div class="ml-2">
                        <button id="download" class="btn btn-success">download</button>
                    </div>


                <?php
                }

                ?>
            </div>
            <div class="pt-2" id="invoice">
                <div id="main" class="p-3">
                    <!-- Header & Picture  -->
                    <div class="row mx-1">
                        <div class="col-3 ">
                            <img src="assets/img/logo.jpg" style="height: 60px; width: 60px;">
                        </div>
                        <div id="head" class="col-6">
                            <h5 style="font-size:16px;">NOTRE DAME COLLEGE, DHAKA</h5>
                            <h5 style="font-size:12px;">ADMISSOIN FORM 2023-2024</h5>
                            <!-- <h5 style="font-size:12px;"><?php echo $abc['APP_CAT'] ?></h5> -->
                            <h5 style="font-size:12px;"><?php echo $ap_cat['CAT_NAME'] ?></h5>
                            <!-- <h5 style="font-size:12px;">(Bangla Medium)</h5> -->
                        </div>
                        <div class="col-3">
                            <img src="data:image/jpeg;base64,<?php echo $photoout; ?>" id="output_image" width="90px" height="90px"></img>
                        </div>
                    </div>

                    <br>
                    <!-- Application part -->
                    <div class="row">
                        <div class="ml-3">
                            <label style="font-weight: bold;font-size: 10px;">Application ID No.</label>
                            <label style="font-size: 10px;"><?php echo $abc['APP_ROLL_NO'] ?></label>
                        </div>
                        <div class="">
                            <label style="font-weight: bold;font-size: 10px;">Adm. Serial No.</label>
                            <label id="v_head"></label>
                        </div>
                        <div class="ml-2">
                            <label style="font-weight: bold;font-size: 10px;">College Roll No.</label>
                            <label id="v_head" style="font-size: 10px;"></label>
                        </div>
                    </div>
                    <!-- Name of studnet -->
                   
                    <!-- 2nd row starts  -->

                    <div class="row">
                        <div style="margin-left: 15px;">
                            <label style="font-size: 10px;">Name of Student: </label>
                            <label style="width: 300px;font-size: 10px;" id="value"> <?php echo $abc['STD_NAME'] ?></label>
                        </div>
                        <div class="ml-2">
                            <label style="font-size: 10px;">Nick Name: </label>
                            <label style="width: 100px;font-size: 10px;" id="value"><?php echo $abc['NICK_NAME'] ?></label>
                        </div>

                        <div style="margin-left: 15px;">
                            <label style="font-size: 10px;">Date of Birth: </label>
                            <label id="value" style="font-size: 10px;"><?php echo $abc['DOB'] ?></label>
                        </div>
                    </div>

                    <!-- 2nd row ends  -->



                    <!-- 3rd row starts  -->
                
                    <div class="row">
                        <!-- <div style="margin-left: 15px;">
                            <label style="font-size: 10px;">Date of Birth: </label>
                            <label id="value" style="font-size: 10px;"><?php echo $abc['DOB'] ?></label>
                        </div> -->
                        <div class="col-3">
                            <label style="font-size: 10px;">Blood Group: </label>
                            <label id="value" style="font-size: 10px;"> <?php echo $abc['BLOOD_GR'] ?></label>
                        </div>
                        <div class="col-3">
                            <label style="font-size: 10px;">Religion: </label>
                            <label style="width: 60px;font-size: 10px;" id="value"><?php echo $reli['RG_NAME']; ?></label>
                        </div>
                        <div class="col-3">
                            <label style="font-size: 10px;">Sect/Caste: </label>
                            <label style="width: 70px;font-size: 10px;" id="value"> <?php echo $abc['RG_SECT'] ?></label>
                            <!-- <label style="width: 60px;" id="value"> <?php echo $reli['RG_NAME']; ?></label> -->
                        </div>
                        <div class="col-3">
                            <label style="font-size: 10px;">Nationality: </label>
                            <label id="value" style="font-size: 10px;"> Bangladeshi</label>
                        </div>

                        <!-- <div style="margin-left: 5px;">
                          <label style="font-size: 10px;">Birth Reg. Number: </label>
                            <label style="width: 130px;font-size: 10px;" id="value"> <?php echo $abc['BIRTH_REG_NO'] ?></label>
                        </div> -->
                    </div>

                    <!-- 3rd row ends  -->


                    <div class="row">
                        <div class="col-4">
                            <label style="font-size: 10px;">Birth Reg. Number: </label>
                            <span style="width: 130px;font-size: 10px;" id="value"><?php echo $abc['BIRTH_REG_NO'] ?></span>
                        </div>
                        <div class="col-4">
                            <label style="font-size: 10px;"> Student's Mobile No. </label>
                            <span style="width: 150px;font-size: 10px;" id="value"><?php echo $abc['STD_MOBILE_NO'] ?></span>
                        </div>
                        <div class="col-4">
                            <label style="font-size: 10px;">Number for College SMS : </label>
                            <span style="width: 100px;font-size: 10px;" id="value"> <?php echo $abc['SMS_MOBILE_NO'] ?></span>
                        </div>
                    </div>


                    
                    <!-- SSC Information part -->
                    <h6 style="width: 200px;margin-top : auto;">SSC INFORMATION:</h6>
                    <div style="margin-left: 5px;">
                        <div class="row">
                            <div class="col-3">
                                <label style="font-size: 10px;"> SSC Group: </label>
                                <!-- <label style="width: 100px;" id="value"><?php echo $abc['APP_ROLL_NO'] ?></label> -->
                                <span style="width: 100px;font-size: 10px;" id="value"><?php echo $ssc_gr['GR_NAME'] ?></span>
                            </div>

                            <div class="col-9">
                                <label style="font-size: 10px;">Name of School: </label>
                                <span style="width: 250px;font-size: 10px;" id="value"> <?php echo $abc['SCHOOL_NAME'] ?></span>
                            </div>

                            <!-- <div class="col-4">
                                <label style="font-size: 10px;"> Exam. Centre: </label>
                                <span style="width: 100px;font-size: 10px;" id="value"> <?php echo $abc['EXAM_CENTER'] ?></span>
                            </div> -->
                        </div>


                        <div class="row">
                        <div class="col-3">
                                <label style="font-size: 10px;">Board: </label>
                                <!-- <label style="width: 80px;" id="value"> <?php echo $abc['APP_ROLL_NO'] ?></label> -->
                                <span style="width: 80px;font-size: 10px;" id="value"> <?php echo $board['BOARD_NAME'] ?></span>
                            </div>


                            <div class="col-9">


                                <label style="font-size: 10px;">School Address:  </label>
                                <span style="width: 300px;font-size: 10px;" id="value"> <?php echo $abc['SCHOOL_ADDR'] ?></span>
                            </div>

                        </div>
                        <div class="row" >
                           <div class="col-4">
                                <label style="font-size: 10px;">Exam. Roll: </label>
                                <span style="width: 80px;font-size: 10px;" id="value"><?php echo $abc['EXAM_ROLL_NO'] ?></span>
                            </div>

                            <div class="col-4">
                                <label style="font-size: 10px;"> Exam. Year: </label>
                                <span style="width: 60px;font-size: 10px;" id="value"><?php echo $abc['EXAM_YEAR'] ?></span>
                            </div>

                            <div class="col-4">
                                <label style="font-size: 10px;">Reg. No. </label>
                                <span style="width: 80px;font-size: 10px;" id="value"><?php echo $abc['REG_NO'] ?></span>
                            </div>

                            <div class="col-4">
                                <label style="font-size: 10px;"> Reg. Year/Session:</label>
                                <span style="width: 100px;font-size: 10px;" id="value"><?php echo $abc['SESSION_NO'] ?></span>
                            </div>

                            <div class="col-4">
                                <label style="font-size: 10px;">GPA: </label>
                                <span style="width: 80px;font-size: 10px;" id="value"><?php echo $abc['SSC_GPA'] ?></span>
                            </div>

                            <div class="col-4">
                                <label style="font-size: 10px;">Number of A+: </label>
                                <span style="width: 80px;font-size: 10px;" id="value"><?php echo $abc['TOTAL_APLUS'] ?></span>
                            </div>
                        </div>

                    </div>

                    <!-- SSC Subject & Grade POint Part -->
                    <h6 style="width: 250px;">SSC SUBJECTS & GRADE POINT:</h6>


                    <?php
                    if ($ap_cat['CAT_NAME'] == 'Humanities') {
                    ?>

                        <div style="margin-left: 5px;">
                            <div class="row">
                                <div class="col-2">
                                    <label style="font-size: 10px;"> Bangla: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_BANG'] ?></span>
                                </div>
                                <div class="col-2">
                                    <label style="font-size: 10px;">English: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_ENG'] ?></span>
                                </div>
                                <div class="col-2">
                                    <label style="font-size: 10px;">Religion: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_RELI'] ?></span>
                                </div>
                                <div class="col-2">
                                    <label style="font-size: 10px;">Mathematics: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_MATH'] ?></span>
                                </div>
                                <div class="col-2">
                                    <label style="font-size: 10px;"> Science: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_SCIENCE'] ?></span>
                                </div>

                                <div class="col-2">
                                    <label style="font-size: 10px;">Civics </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_CIVICS'] ?></span>
                                </div>

                                <div class="col-3">
                                    <label style="font-size: 10px;"> Economics: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_ECONOMICS'] ?></span>
                                </div>

                                <div class="col-3">
                                    <label style="font-size: 10px;">Geopraghy : </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_GEO_ENV'] ?></span>
                                </div>

                                <div class="col-6">
                                    <label style="font-size: 10px;">Additional Subject: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['ADD_SUB_NAME'] ?>&nbsp&nbsp<?php echo $abc['MARKS_ADD_SUB'] ?></span>
                                </div>

                                <div class="col-6">
                                    <label style="font-size: 9px;">Others Sub. 1 : </label>
                                    <span id="value" style="font-size: 9px;"> <?php echo $abc['OTHER_SUB1_NAME'] ?>&nbsp&nbsp<?php echo $abc['MARKS_OTHER_SUB1'] ?></span>
                                </div>

                                <div class="col-6">
                                    <label style="font-size: 9px;">Others Sub. 2 : </label>
                                    <span id="value" style="font-size: 9px;"><?php echo $abc['OTHER_SUB2_NAME'] ?>&nbsp&nbsp<?php echo $abc['MARKS_OTHER_SUB2'] ?></span>
                                </div>

                                <div class="col-6">
                                    <label style="font-size: 9px;">Others Sub. 3 : </label>
                                    <span id="value" style="font-size: 9px;"> <?php echo $abc['OTHER_SUB3_NAME'] ?>&nbsp&nbsp<?php echo $abc['MARKS_OTHER_SUB3'] ?></span>
                                </div>

                                <div class="col-6">
                                    <label style="font-size: 9px;">Others Sub. 4 : </label>
                                    <span id="value" style="font-size: 9px;"> <?php echo $abc['OTHER_SUB4_NAME'] ?>&nbsp&nbsp<?php echo $abc['MARKS_OTHER_SUB4'] ?></span>
                                </div>

                                



                            </div>












                        </div>

                    <?php
                    } else if ($ap_cat['CAT_NAME'] == 'Business Studies') {
                    ?>
                        <div style="margin-left: 5px;">
                            <div class="row">
                                <div class="col-2">
                                    <label style="font-size: 10px;"> Bangla: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_BANG'] ?></span>
                                </div>
                                <div class="col-2">
                                    <label style="font-size: 10px;">English: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_ENG'] ?></span>
                                </div>
                                <div class="col-2">
                                    <label style="font-size: 10px;">Religion: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_RELI'] ?></span>
                                </div>
                                <div class="col-2">
                                    <label style="font-size: 10px;">Mathematics: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_MATH'] ?></span>
                                </div>
                                <div class="col-2">
                                    <label style="font-size: 10px;"> Science: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_SCIENCE'] ?></span>
                                </div>
                                <div class="col-2">
                                    <label style="font-size: 10px;">Accounting: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_ACCNT'] ?></span>
                                </div>

                                <div class="col-4">
                                    <label style="font-size: 10px;"> Finance and Banking: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_FIN_BANK'] ?></span>
                                </div>
                                <div class="col-4">
                                    <label style="font-size: 10px;">Business Entrepreneurship: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_BUSS_ENTER'] ?></span>
                                </div>

                                <div class="col-4">
                                    <label style="font-size: 10px;">Additional Subject: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['ADD_SUB_NAME'] ?>&nbsp&nbsp<?php echo $abc['MARKS_ADD_SUB'] ?></span>
                                </div>

                                <div class="col-6">
                                    <label style="font-size: 10px;">Others Sub. 1 : </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['OTHER_SUB1_NAME'] ?>&nbsp&nbsp<?php echo $abc['MARKS_OTHER_SUB1'] ?></span>
                                </div>

                                <div class="col-6">
                                    <label style="font-size: 10px;">Others Sub. 2 : </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['OTHER_SUB2_NAME'] ?>&nbsp&nbsp<?php echo $abc['MARKS_OTHER_SUB2'] ?></span>
                                </div>

                                <div class="col-6">
                                    <label style="font-size: 10px;">Others Sub. 3 : </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['OTHER_SUB3_NAME'] ?>&nbsp&nbsp<?php echo $abc['MARKS_OTHER_SUB3'] ?></span>
                                </div>

                                <div class="col-6">
                                    <label style="font-size: 10px;">Others Sub. 4 : </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['OTHER_SUB4_NAME'] ?>&nbsp&nbsp<?php echo $abc['MARKS_OTHER_SUB4'] ?></span>
                                </div>


                                


                            </div>




                        </div>
                    <?php
                    } else {
                    ?>
                        <div style="margin-left: 5px;">
                            <div class="row">
                                <div class="col-2">
                                    <label style="font-size: 10px;"> Bangla: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_BANG'] ?></span>
                                </div>
                                <div class="col-2">
                                    <label style="font-size: 10px;">English: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_ENG'] ?></span>
                                </div>
                                <div class="col-2">
                                    <label style="font-size: 10px;">Religion: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_RELI'] ?></span>
                                </div>
                                <div class="col-2">
                                    <label style="font-size: 10px;">Mathematics: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_MATH'] ?></span>
                                </div>
                                <!-- <div class="col-2">
                            <label> ICT: </label>
                            <label id="value"><?php echo $abc['MARKS_ICT'] ?></label>
                        </div> -->
                                <div class="col-2">
                                    <label style="font-size: 10px;">Physics: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_PHY'] ?></span>
                                </div>
                                <div class="col-2">
                                    <label style="font-size: 10px;">Chemistry: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_CHE'] ?></span>
                                </div>

                                <div class="col-3">
                                    <label style="font-size: 10px;">Biology: </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_BIO'] ?></span>
                                </div>

                                <div class="col-3">
                                    <label style="font-size: 10px;"> Higher Math. </label>
                                    <span id="value" style="font-size: 10px;"><?php echo $abc['MARKS_HMATH'] ?></span>
                                </div>

                                <div class="col-6" >
                                    <label style="font-size: 9px;">Additional Subject: </label>
                                    <span style="width: 100px;font-size: 9px;" id="value"><?php echo $abc['ADD_SUB_NAME'] ?>&nbsp&nbsp<?php echo $abc['MARKS_ADD_SUB'] ?></span>
                                </div>

                                <div class="col-6">
                                    <label style="font-size: 10px;">Others Sub. 1 : </label>
                                    <span style="width: 150px;font-size: 10px;" id="value"><?php echo $abc['OTHER_SUB1_NAME'] ?>&nbsp&nbsp<?php echo $abc['MARKS_OTHER_SUB1'] ?></span>
                                </div>
                                <div class="col-6">
                                    <label style="font-size: 10px;">Others Sub. 2 : </label>
                                    <span style="width: 150px;font-size: 10px;" id="value"><?php echo $abc['OTHER_SUB2_NAME'] ?>&nbsp&nbsp<?php echo $abc['MARKS_OTHER_SUB2'] ?></span>
                                </div>

                                <div class="col-6">
                                    <label style="font-size: 10px;">Others Sub. 3 : </label>
                                    <span style="width: 150px;font-size: 10px;" id="value"><?php echo $abc['OTHER_SUB3_NAME'] ?>&nbsp&nbsp<?php echo $abc['MARKS_OTHER_SUB3'] ?></span>
                                </div>


                                <div class="col-6">
                                    <label style="font-size: 10px;">Others Sub. 4 : </label>
                                    <span style="width: 150px;font-size: 10px;" id="value"><?php echo $abc['OTHER_SUB4_NAME'] ?>&nbsp&nbsp<?php echo $abc['MARKS_OTHER_SUB4'] ?></span>
                                </div>

                                
                            </div>



                            <!-- <div class="row">
                        <div class="col-8" style="margin-left: 5px;">
                            <label>Additional Subject: </label>
                            <label style="width: 250px;" id="value"><?php echo $abc['ADD_SUB_NAME'] ?>&nbsp&nbsp<?php echo $abc['MARKS_ADD_SUB'] ?></label>
                        </div>

                    </div> -->

                        </div>
                    <?php
                    }
                    ?>






                    <!-- Address Part  -->
                    <div class="row">
                        <div class="col-6">
                            <h6 style="width: 200px;margin-top : 20px;">PERMANENT ADDRESS: </h6>
                            <div class="col-12">
                                <!-- <label> Vill </label> -->
                                <label id="" style="font-size: 10px; width:300px;"><?php echo $abc['PERM_ADDRS'] ?></label>

                               

                            </div>
                            
                        </div>

                        


                        <div class="col-6">
                            <h6 style="width: 250px;margin-top : 20px;">Dhaka Residence Address: </h6>
                            <div class="col-12">
                                <!-- <label> Vill.</label> -->
                                <label id="" style="font-size: 10px;width:300px;"><?php echo $abc['DHK_RES_ADDRS'] ?></label>
                            </div>
                          
                        </div>
                    </div>

                    <!-- Father Information Part -->
                    <h6 style="width: 200px; ">FATHER'S INFORMATION:</h6>
                    <div style="margin-left: 5px;">
                        <div class="row">
                            <div class="col-7">
                                <label style="font-size: 10px;"> Name:</label>
                                <span style="width: 270px;font-size: 10px;" id="value"><?php echo $abc['F_NAME'] ?></span>
                            </div>
                            <div class="col-5">
                                <label style="font-size: 10px;">Occupation: </label>
                                <span style="width: 100px;font-size: 10px;" id="value"><?php echo $abc['F_OCCU'] ?></span>
                            </div>
                            <div class="col-7">
                                <label style="font-size: 10px;">Designation: </label>
                                <span style="width: 100%;font-size: 10px;" id="value"><?php echo $abc['F_DESIG'] ?></span>
                            </div>

                            <div class="col-5">
                                <label style="font-size: 10px;"> ID Number:</label>
                                <span style="width: 150px; font-size: 10px;" id="value"><?php echo $abc['F_NID'] ?></span>
                            </div>

                            

                            
                            <div class="col-4">
                                <label style="font-size: 10px;">Mobile No. </label>
                                <span id="value" style="font-size: 10px;"><?php echo $abc['F_MOBILE_NO'] ?></span>
                            </div>

                            <div class="col-4">
                                <label style="font-size: 10px;"> Parents income Tk. </label>
                                <span id="value" style="font-size: 10px;"><?php echo $abc['MONTH_INCOME_PARENTS'] ?></span>
                            </div>

                            <div class="col-4">
                                <label style="font-size: 10px;">Total Family Income Tk. </label>
                                <span id="value" style="font-size: 10px;"><?php echo $abc['TOT_FAMILY_INCOME'] ?></span>
                            </div>

                            <div class="col-12">
                                <label style="font-size: 10px;"> Office Address:</label>
                                <span style="width: 100%;font-size: 10px;" id=""> <?php echo $abc['F_OFF_ADDRS'] ?></span>
                            </div>


                        </div>


                    </div>

                    <!-- Mother Information Part -->
                    <h6 style="width: 200px; ">MOTHER'S INFORMATION:</h6>
                    <div style="margin-left: 5px;">
                        <div class="row">
                            <div class="col-7">
                                <label style="font-size: 10px;"> Name:</label>
                                <span style="width: 270px;font-size: 10px;" id="value"> <?php echo $abc['M_NAME'] ?></span>
                            </div>
                            <div class="col-5">
                                <label style="font-size: 10px;">Occupation: </label>
                                <span style="width: 100px;font-size: 10px;" id="value"> <?php echo $abc['M_OCCU'] ?></span>
                            </div>
                            <div class="col-7">
                                <label style="font-size: 10px;">Designation: </label>
                                <span style="width: 100%;font-size: 10px;" id="value"><?php echo $abc['M_DESIG'] ?></span>
                            </div>

                            <div class="col-5">
                                <label style="font-size: 10px;"> ID Number:</label>
                                <span style="width: 300px;font-size: 10px;" id="value"><?php echo $abc['M_NID'] ?></span>
                            </div>

                            <div class="col-9">
                                <label style="font-size: 10px;"> Office Address:</label>
                                <span style="width: 100%;font-size: 10px;font-weight: bold;" id=""><?php echo $abc['M_OFF_ADDRS'] ?></span>
                            </div>

                            <div class="col-3">
                                <label style="font-size: 10px;">Mobile No. </label>
                                <span id="value" style="font-size: 10px;"><?php echo $abc['M_MOBILE_NO'] ?></span>
                            </div>
                        </div>




                    </div>

                    <!-- Local Guardian Part  -->
                    <div class="row ml-1">
                        <h6 style="width:100%;">LOCAL GUARDIAN : (if the parents are not in Dhaka city)</h6>
                    </div>
                    <div style="margin-left: 5px;">
                        <div class="row">
                            <div class="col-7">
                                <label style="font-size: 10px;"> Name: </label>
                                <span style="width: 300px;font-size: 9px;" id="value"><?php echo $abc['LG_NAME'] ?></span>
                            </div>

                            <div class="col-5">
                                <label style="font-size: 10px;"> Occupation: </label>
                                <span id="value" style="font-size: 9px;"><?php echo $abc['LG_OCCU'] ?></span>
                            </div>

                            <div class="col-3">
                                <label style="font-size: 10px;">Relationship: </label>
                                <span style="width: 100px;font-size: 10px;" id="value"><?php echo $abc['LG_RELATION'] ?></span>
                            </div>
                            

                            <div class="col-3">
                                <label style="font-size: 10px;">Mobile No </label>
                                <span style="width: 200px;font-size: 10px;" id="value"> <?php echo $abc['LG_MOBILE_NO'] ?></span>
                            </div>

                            <div class="col-6">
                                <label style="font-size: 10px;"> Designation</label>
                                <span style="width: 100%;font-size: 10px;" id="value"><?php echo $abc['LG_DESIG'] ?></span>
                            </div>

                            <div class="col-12">
                                <label style="font-size: 10px;">Dhaka Res. Address: </label>
                                <span style="width: 100%;font-size: 10px;" id=""> <?php echo $abc['LG_DHK_RES_ADDRS'] ?></span>
                            </div>
                        </div>

                        <div class="row">

                        </div>
                    </div>

                    <!-- Progress Report  Part -->
                    <!-- <h6 style="width: 300px; ">PROGRESS REPORT TO BE SENT TO:</h6> -->
                    <!-- <div>
                        <div class="row">
                            <div class="col-3">
                                <label style="font-size: 10px;"> Name </label>
                                <span style="width: 300px;font-size: 10px;" id="value"> <?php echo $abc['PR_NAME'] ?></span>
                            </div>
                            <div class="col-3">
                                <label style="font-size: 10px;">Relationship: </label>
                                <span id="value" style="font-size: 10px;"> <?php echo $abc['PR_RELATION'] ?></span>
                            </div>

                            <div class="col-3">
                                <label style="font-size: 10px;"> Mobile No. </label>
                                <span style="width: 250px;font-size: 10px;" id="value"> <?php echo $abc['PR_MOBILE_NO'] ?></span>
                            </div>

                            <div class="col-12">
                                <label style="font-size: 10px;"> Address: </label>
                                <span style="width: 100%;font-size: 10px;" id="value"> <?php echo $abc['PR_ADDRS'] ?></span>
                            </div>
                        </div>


                    </div> -->
                </div>

                <br>
                

                <!-- <div style="margin-top:120px">
        </div> -->


                <!-- subject you wish to study  -->


                <div id="main" class="p-3">

                    <div class="row" style="margin-top: 100px;">

                        <?php
                        if ($ap_cat['CAT_NAME']  == 'Humanities') {
                        ?>

                            <div class="col-12">
                                <h6 style="text-align:center">Subject you wish to study at Notre Dame collage<h6>
                            </div>

                            <?php if ($abc['SUB_GR_CODE'] == 03) { ?>
                                <div class="col border border-dark">
                                    <table>
                                        <th style="text-align:center">Group - H(✔)</th>
                                        <tr>
                                            <td style="font-size: 9px;"> 1.Bangla</td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 9px;"> 2.English</td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 9px;"> 3.ICT (Information & Communication Techonology)</td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 9px;"> 4.History</td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 9px;"> 5.Social Work</td>
                                        </tr>
                                        <tr>
                                            <td style="text-align:center;font-size: 9px;"> (Choose any one as an addition subject from the below)</td>
                                        </tr>
                                        
                                            <?php if ($abc['LOGIC'] == 'Y') { ?>
                                                <tr>
                                                <td style="font-size: 9px;"> 6. LOGIC(✔)</td>
                                                </tr>
                                                <tr>
                                                <td style="font-size: 9px;"> 7. Economics</td>
                                                </tr>
                                            <?php } elseif ($abc['ENCONOMICS'] == 'Y') { ?>
                                                <tr>
                                                <td style="font-size: 9px;"> 6. Economics(✔)</td>
                                                </tr>
                                                <tr>
                                                <td style="font-size: 9px;"> 7. LOGIC</td>
                                                </tr>
                                            <?php } ?>
                                        
                                    </table>
                                </div>
                            <?php } else if ($abc['SUB_GR_CODE'] == 04) { ?>

                                <div class="col border border-dark">
                                    <table>
                                        <th style="text-align:center">Group - W(✔)</th>
                                        <tr>
                                            <td style="font-size: 9px;"> 1.Bangla</td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 9px;"> 2.English</td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 9px;"> 3.ICT (Information & Communication Techonology)</td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 9px;"> 4.Economics</td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 9px;"> 5.Social Work</td>
                                        </tr>
                                        <tr>
                                            <td style="text-align:center; font-size:9px;"> (Choose any one as an addition subject from the below)</td>
                                        </tr>
                                        
                                            <?php if ($abc['LOGIC'] == 'Y') { ?>
                                                <tr>
                                                <td style="font-size: 9px;"> 6. Geo(✔)</td>
                                                </tr>

                                                <tr>
                                                <td style="font-size: 9px;"> 7. Civics</td>
                                                </tr>
                                            <?php } elseif (($abc['CIVICS'] == 'Y')) { ?>
                                                <tr>
                                                <td style="font-size: 9px;"> 6. Civics(✔)</td>
                                                </tr>

                                                <tr>
                                                <td style="font-size: 9px;"> 7. Geo</td>
                                                </tr>
                                            <?php } ?>
                                        </tr>
                                    </table>
                                </div>
                            <?php } else if ($abc['SUB_GR_CODE'] == 05) { ?>

                                <div class="col border border-dark">
                                    <table>
                                        <th style="text-align:center">Group - G(✔)</th>
                                        <tr>
                                            <td style="font-size: 9px;"> 1.Bangla</td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 9px;"> 2.English</td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 9px;"> 3.ICT (Information & Communication Techonology)</td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 9px;"> 4.Logic</td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 9px;"> 5.Geography</td>
                                        </tr>
                                        <tr>
                                            <td style="text-align:center;font-size: 9px;"> (Choose any one as an addition subject from the below)</td>
                                        </tr>
                                        
                                            <?php if ($abc['ENCONOMICS'] == 'Y') { ?>
                                                <tr>
                                                <td style="font-size: 9px;"> 6. Economics(✔)</td>
                                                </tr>

                                                <tr>
                                                <td style="font-size: 9px;"> 7. Civics</td>
                                                </tr>
                                            <?php } elseif (($abc['CIVICS'] == 'Y')) { ?>
                                                <tr>
                                                <td style="font-size: 9px;"> 6. Civics(✔)</td>
                                                </tr>

                                                <tr>
                                                <td style="font-size: 9px;"> 7. Economics</td>
                                                </tr>
                                            <?php } ?>
                                        

                                    </table>
                                </div>
                            <?php } else if ($abc['SUB_GR_CODE'] == 06) { ?>

                                <div class="col border border-dark">
                                    <table>
                                        <th style="text-align:center">Group - L(✔)</th>
                                        <tr>
                                            <td style="font-size: 9px;"> 1.Bangla</td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 9px;"> 2.English</td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 9px;"> 3.ICT (Information & Communication Techonology)</td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 9px;"> 4.Logic</td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 9px;"> 5.History</td>
                                        </tr>
                                        <tr>
                                            <td style="text-align:center;font-size:9px;"> (Choose any one as an addition subject from the below)</td>
                                        </tr>
                                        
                                            <?php if ($abc['ENCONOMICS'] == 'Y') { ?>
                                                <tr>
                                                <td style="font-size: 9px;"> 6. Economics(✔)</td>
                                                </tr>

                                                <tr>
                                                <td style="font-size: 9px;"> 7. Civics</td>
                                                </tr>
                                            <?php } elseif (($abc['CIVICS'] == 'Y')) { ?>
                                                <tr>
                                                <td style="font-size: 9px;"> 6. Civics(✔)</td>
                                                </tr>

                                                <tr>
                                                <td style="font-size: 9px;"> 7. Economics</td>
                                                </tr>


                                            <?php } ?>
                                        </tr>

                                    </table>
                                </div>
                            <?php } ?>

                        <?php
                        } elseif ($ap_cat['CAT_NAME'] == 'Business Studies') {
                        ?>
                            <div class="col border">
                                <table>
                                    <th style="background-color: black; color:white">Subject you wish to study at Notre Dame College</th>
                                    <tr>
                                        <td style="font-size: 9px;"> 1.Bangla</td>
                                    </tr>
                                    <tr>
                                        <td style="font-size: 9px;"> 2.English</td>
                                    </tr>
                                    <tr>
                                        <td style="font-size: 9px;"> 3.ICT (Information & Communication Techonology)</td>
                                    </tr>
                                    <tr>
                                        <td style="font-size: 9px;"> 4.Accounting</td>
                                    </tr>
                                    <tr>
                                        <td style="font-size: 9px;"> 5.Business Oganization and Management</td>
                                    </tr>
                                    <tr>
                                        <td style="font-size: 9px;"> 6.Finance, Banking and Insurance </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align:center; font-size: 9px;"> (Choose any one as an addition subject from the below)</td>
                                    </tr>
                                    <!-- <tr>
                                <td> 7. Statistics( ) / Economics () (Additional Subject)</td>
                            </tr> -->

                                    
                                        <?php if ($abc['STATISTICS'] == 'Y') { ?>
                                            <tr>
                                            <td style="font-size: 9px;"> 7. Statistics(✔)</td>
                                            </tr>

                                            <tr>
                                            <td style="font-size: 9px;"> 8. Economics</td>

                                            </tr>
                                        <?php } elseif (($abc['ENCONOMICS'] == 'Y')) { ?>
                                            <tr>
                                            <td style="font-size: 9px;"> 7. Economics(✔)</td>
                                            </tr>
                                            
                                            <tr>
                                            <td style="font-size: 9px;"> 8. Statistics</td>

                                            </tr>
                                        <?php } ?>
                                    

                                </table>

                            </div>
                        <?php
                        } else {
                        ?>
                            <div class="col-6 border">
                                <table>
                                    <th style="background-color: black; color:white">Subject you wish to study at Notre Dame College</th>
                                    <tr>
                                        <td> 1.Bangla</td>
                                    </tr>
                                    <tr>
                                        <td> 2.English</td>
                                    </tr>
                                    <tr>
                                        <td> 3.ICT (Information & Communication Techonology)</td>
                                    </tr>
                                    <tr>
                                        <td> 4.Physics</td>
                                    </tr>
                                    <tr>
                                        <td> 5.Chemistry</td>
                                    </tr>
                                    <tr>
                                        <td> Choose any one as an addition subject from the below)</td>
                                    </tr>
                                    
                                        <!-- <td> 6. Higher math</td> -->

                                        <?php if ($abc['HIGHER_MATH'] == 'Y') { ?>
                                            <tr>
                                            <td> 6. Higher math(✔)</td>
                                            </tr>

                                            <tr>
                                            <td> 7. Biology</td>
                                            </tr>
                                        <?php } elseif (($abc['BIOLOGY'] == 'Y')) { ?>
                                            <tr>
                                            <td> 6. Biology(✔)</td>
                                            </tr>

                                            <tr>
                                            <td> 7. Higher math</td>
                                            </tr>
                                        <?php } ?>
                                   
                                    <!-- <tr>
                                <td> 7.Biology</td>
                            </tr> -->
                                </table>

                            </div>
                            <div class="border" style="margin-left: 62px; width:300px;">
                                <p class="pt-5 pl-2" style="font-size: 12px; text-decoration: underline ;">TO BE FILLED BY THE COLLEGE</p>
                                <p class="pl-2"> Form Checked by:...........................</p>
                                <p class="pl-2"> Date :...........................</p>
                            </div>
                        <?php
                        }
                        ?>

                    </div>

                    <br>
                    <p class="light" style="font-size: 10px;">Activites in which you took part while in high school</p>
                    <p style="font-size: 10px;">Sports(Details):<span style="width: 300px; border-bottom: 1px solid black;">&nbsp<?php echo $abc['SPORTS_DTLS'] ?></span></p>
                    <p style="font-size: 10px;">Clubs: <span style=" width: 250px; border-bottom: 1px solid black;">&nbsp<?php echo $abc['CLUBS_DTLS'] ?></span></p>
                    <p style="font-size: 10px;">Other: <span style=" width: 250px; border-bottom: 1px solid black;">&nbsp<?php echo $abc['OTHERS_DTLS'] ?></span></p>

                    <br>

                    <div>
                        <p style="font-weight: bold;font-size:16px; ">Agreement by guardian and student regarding the college policy on discipline:</p>

                        <p style="font-size:13px;">"I hereby agree to abide by the rules and regulations of Notre Dame College and I promise that as long as I am a student
                            of this college I will do nothing , either inside or outside the college that may interfere with its orderly administration
                            and discipline. If it happens I will accept the decision made by the college authority in accordance with the policy of the college.
                            I further declare that the statments made above are true to the best of my knowledge."
                        </p>
                    </div>

                    <div class="row">
                        <div class="col-5">
                            <p style="font-size:13px;"> Date: ...................... </p>
                        </div>
                        <div class="offset-9" style="text-decoration: overline;">
                            <p style="font-size:13px;"> Signature of student:</p>
                        </div>
                    </div>
                    <br>
                    <p style="font-size:13px;">
                        "I hereby attest the statements made above by my son/ward, I declare that shall be responsible for ther
                        good conduct of my son/ward ............................................... and that I shall be
                        responsible for the payment of fees according to the regulations of the college."
                    </p>

                    <div class="row">
                        <div class="col-5">
                        <p style="font-size:13px;"> Date: ...................... </p>

                        </div>
                        <div class="offset-7">
                            <p style="text-decoration: overline;font-size:13px;">Signature of Parents/Guardian:</p>
                            <p style="font-size:13px;">Name:........................................</p>
                            <p style="font-size:13px;">Relatoin with the person signing:.........................</p>
                        </div>

                    </div>

                </div>

            </div>
        </div>
    </div>
    <div style="margin-top: 20px;"></div>

    <!-- 
    <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
        integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
        crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
        integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
        crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
        integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
        crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.2/html2pdf.bundle.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.0/jspdf.umd.min.js"></script>
    <script type="text/javascript" src="https://html2canvas.hertzen.com/dist/html2canvas.min.js"></script>
    <script type="text/javascript" src="https://html2canvas.hertzen.com/dist/html2canvas.js"></script> -->



    <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>

    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>

    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.2/html2pdf.bundle.js"></script>


    <script>
        window.onload = function() {
            document.getElementById("download")
                .addEventListener("click", () => {
                    const invoice = this.document.getElementById("invoice");
                    console.log(invoice);
                    console.log(window);
                    var opt = {
                        margin: [0, 0, 0, 0],
                        filename: 'Admission Form.pdf',
                        image: {
                            type: 'jpeg',
                            quality: 1
                        },
                        html2canvas: {
                            dpi: 192,
                            scale: 1,
                            letterRendering: true,
                            useCORS: true
                        },
                        jsPDF: {
                            unit: 'mm',
                            format: 'a4',
                            orientation: 'portrait'
                        }
                    };
                    //html2pdf().from(invoice).save();
                    html2pdf().from(invoice).set(opt).save();
                })
        }
    </script>


    <!-- <script>
        function download() {
            const invoice = this.document.getElementById("invoice");
            console.log(invoice);
            console.log(window);
            var opt = {
                filename: 'myfile.pdf',
                image: {
                    type: 'jpeg',
                    quality: 1
                },
                html2canvas: {
                    dpi: 192,
                    scale: 1,
                    letterRendering: true,
                    useCORS: true
                },
                jsPDF: {
                    unit: 'mm',
                    format: 'a4',
                    orientation: 'portrait'
                }
            };
            //html2pdf().from(invoice).save();
            html2pdf().from(invoice).set(opt).save();
        }
    </script>
 -->








</body>


<!-- image: { type: 'png', quality: 0.98  }, -->


</html>