<%@ Page Language="C#" AutoEventWireup="true" CodeFile="bonafidecertificates.aspx.cs" Inherits="module_bonafidecertificates" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Bonafide Certificate</title>
    <style>
  table,
  th,
  td {
    border: 1px solid black;
    border-collapse: collapse;
  }

  .padding {
    padding-left: 10px;
  }

  .font {
    font-size: 20px;
  }

  
  .container {
    display: flex;
    align-items: center;
    padding: 10px;
  }

  .logo img {
    max-width: 100px;
    /* Adjust the width as needed */
    height: auto;
  }

  .text {
    flex-grow: 1;
    padding-left: 10px;
    /* Adjust the spacing between the logo and text */
  }
</style>
    <script type="text/javascript" src="../assets/js/jquery.min.js"></script>
    <script type="text/javascript">
        var certificateid = null;
        $(document).ready(function () {
            certificateid = GetParameterValues('ID'); 
            $.ajax({
                type: "POST",
                url: "bonafidecertificates.aspx/GetData",
                data: "{certids :'" + certificateid + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d != "") {
                        data = JSON.parse(data.d);
                        var fullname = data[0].title + "." + data[0].fname + " " + data[0].mname + " " + data[0].lname;
                        if (data[0].title == "Ku." || data[0].title == "Miss.") {
                            $("#lbltitle").html("Her"); $("#lbltitle1").html("her"); $("#lbltitle2").html("her"); $("#lbltitles").html("She");
                            $("#lblrelation").html("Daughter");
                        }
                        else if (data[0].title == "Mr.") {
                            $("#lbltitle").html("His"); $("#lbltitle1").html("his"); $("#lbltitle2").html("his"); $("#lbltitles").html("He");
                            $("#lblrelation").html("Son");
                        }
                        $("#recptsnos").html(data[0].receptnos);
                        $("#lblstudname").html(fullname);
                        $("#labelfathernm").html(data[0].fathernm);
                        var clsid = data[0].clsname + "   (" + data[0].divsnm + ")";
                        $("#lblcalss").html(clsid);
                        var date2 = new Date(data[0].fromdate);
                        var date8 = new Date(data[0].todate);
                        var date2year = date2.getFullYear();
                        var date8year = date8.getFullYear();
                        var dtyearstr = date2year + "-" + date8year;
                        $("#lblyrsid1").html(date2year);
                        $("#lblyrsid2").html(date8year);
                        $("#lblissudt").html(data[0].recptdate);
                       
                        $("#lblcastes").html(data[0].feesname +  "(" +data[0].caste + ")");
                        $("#lbldobs").html(data[0].dobdts);
                        var birthyear = new Date(data[0].dob);
                        var monname = birthyear.toLocaleString('default', { month: 'long' });
                      var dobstr = data[0].dobdts;
                       var dobsplits = dobstr.split("-");

                        var yrsplit = dobsplits[2];
                        var daysplits = dobsplits[0];
                        var dobstring = daysplits + "-" + monname + "-" + yrsplit;
                       
                        $("#lblwordsdob").html(dobstring);
                    }
                    },
                    error: function (error) {
                        console.log(JSON.stringify(error));
                    }
            });
           // window.print();
        });
        function GetParameterValues(param) {
            var url = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
            for (var i = 0; i < url.length; i++) {
                var urlparam = url[i].split('=');
                if (urlparam[0] == param) {
                    return urlparam[1];
                }
            }
        }
        $(document).ajaxStop(function () {
            // alert("All AJAX requests completed");
            setTimeout(function () { window.print() }, 1000);
            //window.print();
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
  <div class="container" align="center">
    <div class="logo">
      <img src="../assets/images/logo.png" alt="Logo">
    </div>
    <div class="text">
      <p style="text-align: center;"> <span style="font-size: 18px;">Shri Tuljabhavani Sewabhawi Shaikshanik Va</span>
        <br /> <span style="font-size: 18px;">Samajik Shikshan Sanstha, Kothari</span>
        <br /> <span style="font-size:30px"> <b>HI-TECH COLLEGE OF
            PHARMACY</b></span> <br /> <span style="font-size: 15px;">Padoli Patha Nagpur Highway, Chandrapur-442
          406</span>
      </p>
    </div>
  </div>

  <p style="font-size: 18px; text-align: center; margin-left: 50px; font-style: italic;"> <b>Affiliated to the MSBTE, Mumbai &
      <br /> Gondwana University, Gadchiroli</b>
  </p>
         <div style="display: flex; justify-content: space-between;">
    <p style="border-bottom:1px solid #000000;font-size:15px"><b>No : <label id="recptsnos"></label></b></p>
    <p style="font-size:15px">Date : <label id="lblissudt"></label></p>

  </div>
  <h1 align="center">Bonafide Certificate</h1>

  <p  style="text-align:justify;word-spacing:3px;line-height:28px;font-size:20px"> <span style="padding-left: 10%;">This is to certify that</span> &nbsp;
  <span style="border-bottom:1px solid #000000;border-width:50%"><b> <label id="lblstudname"></label></b></span>
    <span>&nbsp;<label id="lblrelation"></label>&nbsp;  of &nbsp;<b><label id="labelfathernm"  style="border-bottom:1px solid #000000;border-width:50%"></label></b></span> &nbsp;
    <span>was/is a Bonafide student of
      this college studying in</span>&nbsp;
    <b><label id="lblcalss" style="border-bottom:1px solid #000000;border-width:50%"></label></b> class during the academic
    year  &nbsp;<b> <label id="lblyrsid1" style="border-bottom:1px solid #000000;border-width:50%"></label>  to &nbsp;<label id="lblyrsid2" style="border-bottom:1px solid #000000;border-width:50%"></label></b>.</p>
      <p  style="text-align:justify;word-spacing:3px;line-height:25px;font-size:20px;"><span style="padding-left: 10%;"><label id="lbltitle"></label> date of Birth is
     <b><label id="lbldobs" style="border-bottom:1px solid #000000;border-width:50%"></label></b> in words
      (
    <b> <label id="lblwordsdob" style="border-bottom:1px solid #000000;border-width:50%"></label> </b>).
    <label id="lbltitles"></label> belongs to the caste -
    <b> <label id="lblcastes" style="border-bottom:1px solid #000000;border-width:50%"></label></b>
          </span>
  </p> <br />
  <p style="font-size:20px;text-align:justify;word-spacing:3px;line-height:28px;"> To the best of my knowledge <label id="lbltitle1"></label> character and conduct been found to be good and satisfactory during <label id="lbltitle2"></label> stay in the college.</p> <br /><br /><br /> <br /> <br /> <br />
  <div style="display: flex; justify-content: space-between;">
    <h3> <b>Clerk -incharge</b> </h3>
    <h3> <b>Principal</b> </h3>
  </div>
</body>
    </div>
    </form>
</body>
</html>
