
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Image Upload Form</title>
    <!-- using online links -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">

    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css" integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">

    <link rel="stylesheet" href="//malihu.github.io/custom-scrollbar/jquery.mCustomScrollbar.min.css">

    <!-- CSS only -->
    <!-- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous"> -->

    <script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>


    <link rel="stylesheet" href="./flip/flip.min.css">


    <style>
        /* span {
            font-size: 12px;
        } */

        h2,
        h3,
        label {
            color: #0c0a8a
        }


        .header img {
            float: left;
            width: 120px;
            height: 120px;
            /* background: #555; */
        }

        .header h1,
        h3,
        h4,
        h5,
        h6 {
            position: relative;
            top: 18px;
            left: 10px;
        }

        @media only screen and (max-width: 600px) {

            h2,
            h3,
            label {
                color: #0c0a8a;

            }


            .header img {
                float: left;
                width: 80px;
                height: 80px;
                /* background: #555; */
            }

            .header h1,
            h2,
            h3,
            h4,
            h5,
            h6 {
                position: relative;
                top: 18px;
                left: 10px;
                font-size: 15px;
                text-align: center;
                font-weight: bold;
            }

        }


        /* Chrome, Safari, Edge, Opera */
        input::-webkit-outer-spin-button,
        input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        /* Firefox */
        input[type=number] {
            -moz-appearance: textfield;
        }


        /* countdown starts  */
        .count {
            text-align: center;
            /* padding: 20px; */
        }

        .countdown {
            display: inline-block;
            font-size: 15px;
            font-weight: bold;
            color: #333;
            margin: 10px;
            background-color: red;
            color: white;
            border: 2px solid #333;
            padding: 10px;
            border-radius: 5px;
            animation: scaleUp 0.5s ease-in-out;
        }

        @keyframes scaleUp {
            from {
                transform: scale(0);
            }

            to {
                transform: scale(1);
            }
        }

        /* countdown ends  */

        
    </style>



</head>

<body style="background-color: #91DCFC;">
    <?php

    include "connection.php";
    error_reporting(0);


    $MEM_ID = $_GET['id'];



    $sql8 = "SELECT NAA_MEMBERS.MEM_NAME,NAA_MEMBERS.MEM_PHOTO,NAA_MEMBERS.PRE_EMAIL,NAA_MEMBERS.COLL_ROLL_NO,NAA_MEMBERS.YR_OF_PASS,NAA_MEMBERS.MEM_MOBILE_NO FROM NAA_MEMBERS,NAA_EVENTS_REG
    WHERE NAA_EVENTS_REG.EVENT_CODE='02' AND NAA_EVENTS_REG.PAYMENT_STATUS= 'P' AND NAA_MEMBERS.MEM_ID = NAA_EVENTS_REG.MEM_ID AND NAA_MEMBERS.MEM_ID = '$MEM_ID'";
    $parse = ociparse($conn, $sql8);
    oci_execute($parse);
    // print_r($sql8);

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

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

            if(is_object($data)){
                $abc[$key] = $data->load();
            //	base64_to_jpeg($data->load(),'abc.jpg');
            } else{
                $abc[$key] = $data;
            }
    }
    $abc = array_map('utf8_encode', $abc);
    }

    // var_dump($cadre);
    oci_free_statement($parse);

  $photoout=$abc['MEM_PHOTO'];





    if (isset($_POST['submit1'])) {

        $MEM_PHOTO = $_POST['basedata'];
        $MEM_NAME = $_POST['MEM_NAME'];
        $MEM_MOBILE_NO = $_POST['MEM_MOBILE_NO'];
        $COLL_ROLL_NO = $_POST['COLL_ROLL_NO'];
        $CAT_CODE = '';
        $COLL_SEC = '';
        $YR_OF_PASS = $_POST['YR_OF_PASS'];
        $F_NAME = '';
        $M_NAME = '';
        $PRE_ADDR  = '';
        // $PRE_PHONE = $_POST['reg_number'];
        $PRE_EMAIL = $_POST['PRE_EMAIL'];

        $PRE_DIV = '01';
        $PRE_DIST = '35';
        $PRE_THANA = '199';
        $PRE_POST_CODE = '03';
        $PER_ADDR  = '';
        $PER_DIV = '';
        $PER_DIST = '';

        $PER_THANA = '';
        $PER_PHONE = '';
        $PER_EMAIL = '';
        $PROF_CODE = '';
        $DESIGNATION = '';
        $OFFICE_NAME = '';
        $OFF_ADDR = '';
        $OFF_DIV = '';
        $OFF_DIST = '';
        $OFF_THANA = '';
        $OFF_PHONE = '';
        $OFF_EMAIL = '';
        $mem_type = '';
        $DOB = '';
        $DOM = '';





        $returnval = 0;




        $stid = oci_parse($conn, "begin PKG__member.DPD_naa_member_INs_short(:o_status,:MEM_PHOTO,:MEM_NAME,:MEM_MOBILE_NO,:COLL_ROLL_NO,:CAT_CODE,:COLL_SEC,:YR_OF_PASS,:F_NAME,:M_NAME,:PRE_ADDR,:PRE_DIV,:PRE_DIST,:PRE_THANA,:PRE_PHONE,:PRE_EMAIL,:PER_ADDR,:PER_DIV,:PER_DIST,:PER_THANA, :PER_PHONE, :PER_EMAIL,:PROF_CODE,:DESIGNATION,:OFFICE_NAME,:OFF_ADDR,
   :OFF_DIV,:OFF_DIST,:OFF_THANA,:OFF_PHONE,:OFF_EMAIL,:mem_type,:DOB,:DOM,:PRE_POST_CODE); end;");


        oci_bind_by_name($stid, ":o_status", $returnval, -1, SQLT_INT);
        oci_bind_by_name($stid, ":MEM_PHOTO", $MEM_PHOTO, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":MEM_NAME", $MEM_NAME, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":MEM_MOBILE_NO", $MEM_MOBILE_NO, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":COLL_ROLL_NO", $COLL_ROLL_NO, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":CAT_CODE", $CAT_CODE, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":COLL_SEC", $COLL_SEC, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":YR_OF_PASS", $YR_OF_PASS, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":F_NAME", $F_NAME, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":M_NAME", $M_NAME, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":PRE_ADDR", $PRE_ADDR, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":PRE_DIV", $PRE_DIV, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":PRE_DIST", $PRE_DIST, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":PRE_THANA", $PRE_THANA, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":PRE_PHONE", $PRE_PHONE, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":PRE_EMAIL", $PRE_EMAIL, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":PER_ADDR", $PER_ADDR, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":PER_DIV", $PER_DIV, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":PER_DIST", $PER_DIST, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":PER_THANA", $PER_THANA, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":PER_PHONE", $PER_PHONE, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":PER_EMAIL", $PER_EMAIL, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":PROF_CODE", $PROF_CODE, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":DESIGNATION", $DESIGNATION, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":OFFICE_NAME", $OFFICE_NAME, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":OFF_ADDR", $OFF_ADDR, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":OFF_DIV", $OFF_DIV, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":OFF_DIST", $OFF_DIST, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":OFF_THANA", $OFF_THANA, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":OFF_PHONE", $OFF_PHONE, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":OFF_EMAIL", $OFF_EMAIL, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":mem_type", $mem_type, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":DOB", $DOB, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":DOM", $DOM, -1, SQLT_CHR);
        oci_bind_by_name($stid, ":PRE_POST_CODE", $PRE_POST_CODE, -1, SQLT_CHR);



        oci_execute($stid);

        //print $returnval;
        if ($returnval === 0) {
            echo '<script>alert("Please carefully fill up all the fields.")</script>';
        } else if ($returnval === 1) {
            echo '<script>
                // alert("Registration Already Done Using This Mobile Number.");
                Swal.fire({
                    // icon: "success",
                    text: "Your Info has been Updated Successfully",
                    confirmButtonColor: "#3085d6",
                    cancelButtonColor: "#d33",
                    confirmButtonText: "OK"
                    }).then((result) => {
                    if (result.isConfirmed) {
                        window.location.href = "https://ndc75register.net/";
                    }
                    })


            </script>';
        }

        oci_free_statement($stid);


        //     $returnval = 0;




        //     $stid = oci_parse($conn, "begin PKG__member.DPD_naa_member_INs_short(:o_status,:MEM_PHOTO,:MEM_NAME,:MEM_MOBILE_NO,:COLL_ROLL_NO,:CAT_CODE,:COLL_SEC,:YR_OF_PASS,:F_NAME,:M_NAME,:PRE_ADDR,:PRE_DIV,:PRE_DIST,:PRE_THANA,:PRE_PHONE,:PRE_EMAIL,:PER_ADDR,:PER_DIV,:PER_DIST,:PER_THANA, :PER_PHONE, :PER_EMAIL,:PROF_CODE,:DESIGNATION,:OFFICE_NAME,:OFF_ADDR,
        //    :OFF_DIV,:OFF_DIST,:OFF_THANA,:OFF_PHONE,:OFF_EMAIL,:mem_type,:DOB,:DOM,:PRE_POST_CODE); end;");


        //     oci_bind_by_name($stid, ":o_status", $returnval, -1, SQLT_INT);
        //     oci_bind_by_name($stid, ":MEM_PHOTO", $MEM_PHOTO, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":MEM_NAME", $MEM_NAME, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":MEM_MOBILE_NO", $MEM_MOBILE_NO, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":COLL_ROLL_NO", $COLL_ROLL_NO, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":CAT_CODE", $CAT_CODE, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":COLL_SEC", $COLL_SEC, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":YR_OF_PASS", $YR_OF_PASS, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":F_NAME", $F_NAME, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":M_NAME", $M_NAME, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":PRE_ADDR", $PRE_ADDR, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":PRE_DIV", $PRE_DIV, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":PRE_DIST", $PRE_DIST, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":PRE_THANA", $PRE_THANA, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":PRE_PHONE", $PRE_PHONE, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":PRE_EMAIL", $PRE_EMAIL, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":PER_ADDR", $PER_ADDR, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":PER_DIV", $PER_DIV, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":PER_DIST", $PER_DIST, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":PER_THANA", $PER_THANA, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":PER_PHONE", $PER_PHONE, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":PER_EMAIL", $PER_EMAIL, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":PROF_CODE", $PROF_CODE, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":DESIGNATION", $DESIGNATION, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":OFFICE_NAME", $OFFICE_NAME, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":OFF_ADDR", $OFF_ADDR, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":OFF_DIV", $OFF_DIV, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":OFF_DIST", $OFF_DIST, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":OFF_THANA", $OFF_THANA, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":OFF_PHONE", $OFF_PHONE, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":OFF_EMAIL", $OFF_EMAIL, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":mem_type", $mem_type, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":DOB", $DOB, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":DOM", $DOM, -1, SQLT_CHR);
        //     oci_bind_by_name($stid, ":PRE_POST_CODE", $PRE_POST_CODE, -1, SQLT_CHR);



        //     oci_execute($stid);

        //     //print $returnval;
        //     if ($returnval === 0) {
        //         echo '<script>alert("Please carefully fill up all the fields.")</script>';
        //     } else if ($returnval === 1) {
        //         header("location: register.php?id=" . $MEM_MOBILE_NO);
        //     } 

        //     oci_free_statement($stid);
        // oci_close($conn);



    }


    ?>



<!-- all validation starts  -->
<script>
     function myfun() {
        
        var massage_mobile = document.getElementById("MEM_MOBILE_NO_SR").value;




        var mobile = /^[0-9]{11}$/;






            if (mobile.test(massage_mobile)) {
                document.getElementById("e_massage_mobile").innerHTML = " ";
            } else {
                document.getElementById("e_massage_mobile").innerHTML = "mobile number should be 11 digit";
                return false;
            }


    

   

     }
  </script>
  <!-- all validation ends  -->










    <div class="container">
        <div class="card" style="background-color: #F9F896;">
            <div class="card-body">
                <div class="row">
                    <div class="col-md-2"></div>
                    <div class="col-md-8">
                        <div class="header">
                            <img src="images/ndc_75.png" alt="logo" width="60px" height="60px" />
                            <h2 class="text-center">NOTRE DAME COLLEGE, DHAKA </h2>
                            <h6 class="text-center" style="color: red;">75 Years Celebration Registration Offline Info Upload Form</h6>
                            <h4 class="text-center">For 26th January 2024(Friday)</h4>
                        </div>
                    </div>
                    <div class="col-md-3"></div>
                </div>

                <!-- <div class="row">
                        <div class="col-md-12">
                            <h4 style="color: red;">আপনার রেজিস্ট্রেশন প্রক্রিয়াটি সঠিকভাবে সম্পূর্ণ করার পর মেসেজের মাধ্যমে প্রাপ্ত মোবাইল নাম্বার ও পাসওয়ার্ড দিয়ে Sign In করে Dashboard এর Event Button এ ক্লিক করে Reunion 2023 এর জন্য নিবন্ধন করুন ।</h4>
                        </div>
                    </div> -->



               

                <hr>


                <!-- <div class="row">
                        <div class="col-md-3">
                            <p>Receipt No. <span style="border-bottom: dotted;border-width: 2px;">12134567</span> </p>
                        </div>
                        <div class="col-md-6"></div>
                        <div class="col-md-3">
                            <p>L.M No. <span style="border-bottom: dotted;border-width: 2px;">12134567</span> </p>
                        </div>
                    </div> -->



                <div class="form-body">

                    <?php  ?>
                    <form action="" method="post" enctype="multipart/form-data">

                        <div class="row m-3" style="padding-top: 20px;">
                            <div class="col-lg-4 col-md-4 col-sm-12">
                                <div class="count">
                                    <div class="countdown" id="days">00d</div>
                                    <div class="countdown" id="hours">00h</div>
                                    <div class="countdown" id="minutes">00m</div>
                                    <div class="countdown" id="seconds">00s</div>
                                </div>


                            </div>

                            <div class="col-lg-8 col-md-8 col-sm-12">
                                <div class="row">
                                    <div class="col-lg-3 col-md-3 col-sm-12">
                                        <label for="text" class="text-center font-weight-bold" style="color: #0c0a8a">Photograph <label style="color:red; font-weight:bold">*</label>:</label>


                                    </div>
                                    <?php if($output[0]['MEM_PHOTO'] != null){
                                        
                                        ?>
                                        <div class="col-lg-6 col-md-6 col-sm-12">
                                        <input type="file" accept="image/*" name="file" id="file" onchange="   preview_image(event)">
                                    </div>

                                        <?php
                                    }else{
                                        ?>
                                        <div class="col-lg-6 col-md-6 col-sm-12">
                                        <input type="file" accept="image/*" name="file" id="file" onchange="   preview_image(event)" required>
                                    </div>

                                    <script type="text/javascript">
                                        function Validate() {

                                            var basedata = document.getElementById("basedata");
                                        






                                            if (basedata.value == "") {
                                                //If the "Please Select" option is selected display error.
                                                alert("Please Enter Image!");
                                                return false;
                                            }




                                            


                                            return true;
                                        }
                                    </script>

                                        <?php
                                    }?>
                                    
                                    <div class="col-lg-3 col-md-3 col-sm-12">
                                        <img src="data:image/jpeg;base64,<?php echo $photoout; ?>" id="output_image" width="130px" height="130px"></img>
                                        <input type="text" class="form-control is-invalid" aria-describedby="validationServer03Feedback" name="basedata" id="basedata" value="<?php echo $photoout; ?>" hidden>

                                        <div id="validationServer03Feedback" class="invalid-feedback">
                                            Recent Photo
                                        </div>

                                    </div>
                                </div>
                            </div>

                        </div>


                        <div class="row m-3">
                            <div class="col-lg-6 col-md-6 col-sm-12">
                                <div class="row ">
                                    <div class="col-lg-2 col-md-2 col-sm-12">
                                        <label for="text" class="text-center font-weight-bold"> Name <label style="color:red; font-weight:bold">*</label> :</label>
                                    </div>
                                    <div class="col-lg-10 col-md-10 col-sm-12">
                                        <input type="text" class="form-control" name="MEM_NAME" id="MEM_NAME" placeholder="Enter Applicant Name" value="<?php echo $output[0]['MEM_NAME'] ?>" required>

                                    </div>
                                </div>
                            </div>


                            <div class="col-lg-6 col-md-6 col-sm-12">
                                <div class="row">
                                    <div class="col-lg-2 col-md-2 col-sm-12">
                                        <label for="text" class="text-center font-weight-bold">Email <label style="color:red; font-weight:bold">*</label> :</label>
                                    </div>
                                    <div class="col-lg-10 col-md-10 col-sm-12">
                                        <input type="email" class="form-control" name="PRE_EMAIL" id="PRE_EMAIL" placeholder="Enter Your Email Address" value="<?php echo $output[0]['PRE_EMAIL'] ?>" required>

                                    </div>
                                </div>

                            </div>


                            <div class="col-lg-6 col-md-6 col-sm-12" style="margin-top: 20px;">
                                <div class="row">
                                    <div class="col-lg-2 col-md-2 col-sm-12">
                                        <label for="text" class="text-center font-weight-bold">College Roll <label style="color:red; font-weight:bold"></label> :</label>
                                    </div>
                                    <div class="col-lg-10 col-md-10 col-sm-12">
                                        <input type="text" class="form-control" name="COLL_ROLL_NO" id="COLL_ROLL_NO" placeholder="Enter Your College Roll" value="<?php echo $output[0]['COLL_ROLL_NO'] ?>" required>

                                    </div>
                                </div>


                            </div>


                            <div class="col-lg-6 col-md-6 col-sm-12" style="margin-top: 20px;">
                                <div class="row">
                                    <div class="col-lg-2 col-md-2 col-sm-12">
                                        <label for="text" class="text-center font-weight-bold"> Passing Year <label style="color:red; font-weight:bold">*</label> :</label>
                                    </div>
                                    <div class="col-lg-10 col-md-10 col-sm-12">

                                        <?php
                                        include 'connection.php';

                                        $sql = "SELECT * FROM NAA_YEAR_MST ORDER BY YEAR_CODE DESC";
                                        $parseresults = ociparse($conn, $sql);
                                        ociexecute($parseresults);

                                        echo '<select name="YR_OF_PASS" id="YR_OF_PASS" class="form-control" required>';
                                        echo '<option value="">Select User Type</option>';
                                        while ($row = oci_fetch_assoc($parseresults)) {
                                            if ($row['YEAR_CODE'] == $output[0]['YR_OF_PASS']) {
                                                echo '<option value=' . $row['YEAR_CODE'] . ' selected>' . $row['YEAR_NAME'] . '</option>';
                                            } else {
                                                echo '<option value=' . $row['YEAR_CODE'] . '>' . $row['YEAR_NAME'] . '</option>';
                                            }
                                        }
                                        echo '</select>';
                                        oci_free_statement($parseresults);
                                        oci_close($conn);
                                        ?>
                                    </div>
                                </div>

                            </div>





                            <div class="col-lg-6 col-md-6 col-sm-12" style="margin-top: 20px;">
                                <div class="row">
                                    <div class="col-lg-2 col-md-2 col-sm-12">
                                        <label for="text" class="text-center font-weight-bold">Mobile No <label style="color:red; font-weight:bold">*</label> :</label>
                                    </div>
                                    <div class="col-lg-10 col-md-10 col-sm-12">
                                        <input type="number" class="form-control" name="MEM_MOBILE_NO" id="MEM_MOBILE_NO" placeholder="Enter Your Phone No" value="<?php echo $output[0]['MEM_MOBILE_NO'] ?>" readonly>


                                    </div>
                                </div>


                            </div>



                            <div class="col-lg-6 col-md-6 col-sm-12" style="margin-top: 20px;">


                            </div>

                            

                            <div class="col text-center">
                                <!-- Button trigger modal -->
                            <button type="button" class="btn btn-success" data-toggle="modal" data-target="#exampleModalCenter">
                            Save
                            </button>

                                <!-- <button type="submit1" class="btn btn-success m-3" name='submit1' id='submit1'>
                                    Save
                                </button> -->
                            </div>

                            <!-- Modal -->
                            <div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
                            <div class="modal-dialog modal-dialog-centered" role="document">
                                <div class="modal-content">
                                <div class="modal-header">
                                    <!-- <h5 class="modal-title" id="exampleModalLongTitle">Modal title</h5> -->
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                    <span aria-hidden="true">&times;</span>
                                    </button>
                                </div>
                                <div class="modal-body">
                                    <p style="font-weight: bold;text-align: center;">Are You Sure to Change?</p>
                                    
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-secondary" data-dismiss="modal">No</button>
                                    <!-- <button type="button" class="btn btn-primary">Save changes</button> -->
                                    <button type="submit1" class="btn btn-success m-3" name='submit1' id='submit1' onclick="return Validate()">
                                    Yes
                                </button>
                                </div>
                                </div>
                            </div>
                            </div>





                            
                    </form>
                    

                    <?php ?>
                    




                </div>

                <div class="row" style="margin-top: 20px;">
                    <div class="col-xs-4 col-lg-4 col-md-4 col-sm-12 ">

                    </div>

                    <div class="col-xs-4 col-lg-4 col-md-4 col-sm-12 text-center">
                        <p class="lead marginbottom" style="color: #061442; font-size: 20px; font-weight: bold;">Powered by </p>

                        <!-- <p class="lead marginbottom" style="color: #061442;font-family: Monotype Corsiva; font-size: 40px; font-weight: bold;">Ishop Trading</p> -->
                        <img src="images/ishop1.jpeg" height="60px" width="250px" alt="">
                        <p style="color: #061442; font-size: 14px; font-weight: bold; text-align: center;">Contact Us: 01711506593</p>
                        <!-- <p style="color: #061442; font-size: 22px; font-weight: bold;">Email : mzr071@gmail.com</p> -->
                        <!-- <p style="color: #061442; font-size: 12px; font-weight: bold;">Address : 32 Topkhana Road,Chattagram Bhaban, 3rd Floor,
                                                Purana Paltan, Dhaka - 1000</p> -->


                    </div>


                    <div class="col-xs-4 col-lg-4 col-md-4 col-sm-12 ">
                    </div>


                </div>



                <div class="col-md-12 col-lg-12 col-sm-12" style="border: 3px solid #559526;margin-top:20px;">
                    <img src="images/footer_aamarPay.png" alt="" style="width: 100%;">
                </div>
            </div>
        </div>
    </div>


    <!-- using online scripts -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
    <script src="//malihu.github.io/custom-scrollbar/jquery.mCustomScrollbar.concat.min.js"></script>
    <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
    <script src="./flip/flip.min.js"></script>
    <script>
        // Set the date we're counting down to
        var countDownDate = new Date("Jan 24, 2024 23:59:59").getTime();

        // Update the count down every 1 second
        var x = setInterval(function() {
            // Get today's date and time
            var now = new Date().getTime();

            // Find the distance between now and the count down date
            var distance = countDownDate - now;

            // Time calculations for days, hours, minutes, and seconds
            var days = Math.floor(distance / (1000 * 60 * 60 * 24));
            var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
            var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
            var seconds = Math.floor((distance % (1000 * 60)) / 1000);

            // Output the result in elements
            document.getElementById("days").innerHTML = formatTime(days) + "d";
            document.getElementById("hours").innerHTML = formatTime(hours) + "h";
            document.getElementById("minutes").innerHTML = formatTime(minutes) + "m";
            document.getElementById("seconds").innerHTML = formatTime(seconds) + "s";

            // If the count down is over, write some text 
            if (distance < 0) {
                clearInterval(x);
                document.getElementById("days").innerHTML = "00d";
                document.getElementById("hours").innerHTML = "00h";
                document.getElementById("minutes").innerHTML = "00m";
                document.getElementById("seconds").innerHTML = "00s";
            }
        }, 1000);

        // Function to format time values with leading zeros
        function formatTime(time) {
            return time.toString().padStart(2, '0');
        }
    </script>



    <!--  <script>
        $('#ad_cat').on('change', function() {
            var ad_cat = this.value;
            $.ajax({
                type: "POST",
                url: "getVersion.php",
                data: 'CAT_CODE=' + ad_cat,
                success: function(result) {
                    console.log(result);
                    $("#version_ssc").html(result);
                }
            });
        });
    </script>

     <script>
        $('#ad_cat').on('change', function() {
            var ad_cat = this.value;
            $.ajax({
                type: "POST",
                url: "getGrp.php",
                data: 'CAT_CODE=' + ad_cat,
                success: function(result) {
                    console.log(result);
                    $("#ssc_group").html(result);
                }
            });
        });
    </script> -->

    <!-- student Image show and Size Validation   starts  -->
    <script type="text/javascript">
        const MAX_WIDTH = 130;
        const MAX_HEIGHT = 130;
        const MAX_SIZE_KB = 50;
        const MIME_TYPE = "image/jpeg";
        const QUALITY = 0.9;

        const input = document.getElementById("file");
        input.onchange = function(ev) {
            const file = ev.target.files[0]; // get the file
            const blobURL = URL.createObjectURL(file);
            const img = new Image();
            img.src = blobURL;
            img.onerror = function() {
                URL.revokeObjectURL(this.src);
                // Handle the failure properly
                console.log("Cannot load image");
            };
            img.onload = function() {
                URL.revokeObjectURL(this.src);
                const [newWidth, newHeight] = calculateSize(img, MAX_WIDTH, MAX_HEIGHT);
                const canvas = document.createElement("canvas");
                canvas.width = newWidth;
                canvas.height = newHeight;
                const ctx = canvas.getContext("2d");
                ctx.drawImage(img, 0, 0, newWidth, newHeight);

                let quality = QUALITY;
                let dataURL = canvas.toDataURL(MIME_TYPE, quality);
                let dataSize = dataURL.length * 3 / 4 / 1024; // Size in KB

                while (dataSize > MAX_SIZE_KB && quality >= 0.1) {
                    quality -= 0.1;
                    dataURL = canvas.toDataURL(MIME_TYPE, quality);
                    dataSize = dataURL.length * 3 / 4 / 1024;
                }

                document.getElementById('output_image').setAttribute('src', dataURL);
                dataURL = dataURL.replace(/^data:image\/[a-z]+;base64,/, "");
                document.getElementById('basedata').value = dataURL;
                console.log("Compressed image size: " + dataSize + " KB");
                console.log(dataURL);

            };
        };

        function calculateSize(img, maxWidth, maxHeight) {
            let width = img.width;
            let height = img.height;

            // calculate the width and height, constraining the proportions
            if (width > height) {
                if (width > maxWidth) {
                    height = Math.round((height * maxWidth) / width);
                    width = maxWidth;
                }
            } else {
                if (height > maxHeight) {
                    width = Math.round((width * maxHeight) / height);
                    height = maxHeight;
                }
            }
            return [width, height];
        }
    </script>
    <!--student Image show and Size Validation  ends  -->



    <!-- present ajax start -->


</body>

</html>