<?php include("parent/callMe.php"); ?>
<?php  include("sessioncheck.php"); ?>
<?php   
   
 
 
       // getting branch details

        $m->where("branch_id", $_SESSION['branch']);
        $branch=$m->get("edu_branch_config");


        $m->where("iquiryFormID", $_REQUEST['formId']);
        $m->where("branch_id", $_SESSION['branch']);
       $StudentData = $m->get("eduportal_student_inquiry_form");

       $m->where("school_id", $StudentData[0]['school_id']);
       $m->where("branch_id", $_SESSION['branch']);
       $preSchoolName = $m->get("eduportal_add_school");


       $m->where("Refer_id", $StudentData[0]['refrence']); 
       $ReferdBy = $m->get("eduportal_student_referBy_admission");

       $m->where("class_id", $StudentData[0]['class_id']);
       $m->where("session_id", $_SESSION['current_session']);
       $ClassFee = $m->get("eduportal_class_fee_details");

       $documents=explode(",",$StudentData[0]['attach_documents']);


     ?>
 <!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Favicons-->
<link rel="icon" type="image/png" href="img/favicon.png" sizes="32x32" />
<title> Student Report Card</title>
<!-- Favicons-->
<link rel="icon" type="image/png" href="img/favicon.png" sizes="32x32" />

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

<script type="text/javascript">
   //window.print();
</script>

<style>
.fieldStyle{border-bottom: 1px solid black;text-align:center;border-color: black;}
.tdStyle{border-bottom:1px solid lightgray;}
.thStyle{background-color:gray;color:white;}


.section{width:100%;float:left;margin:0 auto;padding:2%;margin-left:1%;}
 
 tr td {
    
    padding:1%;
    text-align:left;
    color: black;
 }

  tr th {
    
    padding:2%;
 }
.tdalign{text-align:center;border:1px solid black;}
  

</style>

  <style>

      body {
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
        background-color: white;
        font: 12pt "Tahoma";
        color: #042954;
    }
    * {
        box-sizing: border-box;
        -moz-box-sizing: border-box;
    }
    .page {
        width: 297mm;
        height:auto;        
        padding: 1mm;
        margin: 10mm auto;
        /*border: 1px #D3D3D3 solid;*/
        border-radius: 5px;
        background: white;
        /*box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);*/
    }
    .subpage {
        width: 285mm;
        height:auto;
        
    }
    
    @page {
        size: A4 portrait; 
        margin: 0;
    }
    @media print {
        html, body {
            width:297mm;
            height:auto;        
        }
        .page {
            margin: 0;
            border: initial;
            border-radius: initial;
            width: initial;
            min-height: initial;
            box-shadow: initial;
            background: initial;
            page-break-after: blue;
        }
    }


  </style>


</head>
<body>



  <div class="book">
    <div class="page">
        <div class="subpage">






 <!-- Vouchere Fist -->
<div class="section">
   

   <div style="width:100%; text-align:center; height:80px;float:left;">




      <div style="width:20%;font-size:13px;text-align:center;float:left;height:80px;">

         <img src="<?php echo DOMAIN;?>Production/img/<?php echo $branch[0]['logo']; ?>" style="height:120px;width:120px;"  />

      </div>


      
      <div style="width:60%; float:left;">

         <span style="font-size:32px; text-align:center;font-family:times new roman;font-weight:bold;color: black;">  <?php echo $branch[0]['Branch_Name'];?> </span>

         <br><br>


         <span style="font-size:14px; text-align:center;color: gray;">  <?php echo $branch[0]['Branch_Location']."<br>"." Cell: ".$branch[0]['Owner_no'];?> </span>



      </div>


      <div style="font-size:15px;text-align:center;float:right;width:120px;height:120px;">

           

      </div>

     


            
  
   <div style="font-size:20px; text-align:center;margin-top:15%;">  

   <strong style="color: #FFAD17;background-color:black;color:white; padding: 5px 40px 8px 40px;border-radius: 21px;"> Student Inquiry Form 
   (No: <?php echo $StudentData[0]['inquiry_number'];?>) </strong> </div>
<p width="100%" style="color:black;text-align: left;font-family:times new roman;font-size: 22px;font-weight: bold;" ><i class="fa fa-user" style="font-size:35px;"></i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Student Information   </p>
<br><br>
      <table width="100%"  style="font-size:14px;margin-top: -55px;" >  
     <thead> 
      
      </thead>
      <tbody>
   
      <tr>  
         <td width="17%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Student Name   </td>
         <td width="33%" class="fieldStyle"><?php  if($StudentData[0]['student_name']!=NULL){echo $StudentData[0]['student_name'];}else {echo "--";};?>  </td>

         <td width="17%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Father Name   </td>
         <td width="33%" class="fieldStyle"> <?php  if($StudentData[0]['father_name']!=NULL){echo $StudentData[0]['father_name'];}else {echo "--";};?> </td>


      </tr>

      <tr>  
         <td width="17%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Gender   </td>
         <td width="33%" class="fieldStyle"> <?php  if($StudentData[0]['gender']!=NULL){echo $StudentData[0]['gender'];}else {echo "--";};?> </td>

         <!-- <td width="17%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Cast   </td>
         <td width="33%" class="fieldStyle">  </td> -->      
  
      </tr>

    </table>

    <p width="100%" style="color:black;text-align: left;font-family:times new roman;font-size: 22px;font-weight: bold;" ><i class="fa fa-book" style="font-size:35px;"></i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Previous Academic Information   </p>

    <table>
    
       <tr>  
         <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Previous School</td>
         <td width="20%" class="fieldStyle"> <?php  if($preSchoolName[0]['school_name']!=NULL){echo $preSchoolName[0]['school_name'];}else {echo "--";};?> </td>

         <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Previous Class   </td>
         <td width="20%" class="fieldStyle"> <?php  if($StudentData[0]['previous_class']!=NULL){echo getClassName($m,$StudentData[0]['previous_class']);}else {echo "--";};?>  </td>
      </tr>
   
      
       <tr>  
         <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp;T. Marks (Prev Class)   </td>
         <td width="20%" class="fieldStyle"> <?php  if($StudentData[0]['previous_Tmarks']!=NULL){echo $StudentData[0]['previous_Tmarks'];}else {echo "--";};?> </td>

         <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; T. OB (Prev Class)   </td>
         <td width="20%" class="fieldStyle"> <?php  if($StudentData[0]['previous_Omarks']!=NULL){echo $StudentData[0]['previous_Omarks'];}else {echo "--";};?> </td>

        
      </tr>

      <tr>  
         <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp;Test Date   </td>
         <td width="20%" class="fieldStyle"> <?php  if($StudentData[0]['test_date']!=NULL){echo date("d-M-Y",strtotime($StudentData[0]['test_date']));}else {echo "--";};?> </td>

       
      </tr>

      </table>

    <p width="100%" style="color:black;text-align: left;font-family:times new roman;font-size: 22px;font-weight: bold;" ><i class="fa fa-book" style="font-size:35px;"></i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Apply For New Class   </p>

    <table>

      <tr>  
         <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Applying For Class   </td>
         <td width="20%" class="fieldStyle"> <?php  if($StudentData[0]['class_id']!=NULL){echo getClassName($m,$StudentData[0]['class_id']);}else {echo "--";};?> </td>

         <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Applying For Section   </td>
         <td width="20%" class="fieldStyle"> <?php  if($StudentData[0]['section_id']!=NULL){echo getSectionName($m,$StudentData[0]['section_id']);}else {echo "--";};?> </td>

        
      </tr>

       <tr>  
         <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Class Fee   </td>
         <td width="20%" class="fieldStyle"> <?php  if($ClassFee[0]['tution_fee']!=NULL){echo $ClassFee[0]['tution_fee'];}else {echo "--";};?> </td>
   

  <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Class Subjects   </td>
     <td width="20%" class="fieldStyle"> <?php  $m->where("branch_id", $_SESSION['branch']);
          $m->where("class_id", $StudentData[0]['class_id']);
          $m->where("section_id", $StudentData[0]['section_id']);
          $m->where("session_id", $_SESSION['current_session']);
          $teacher_sbj = $m->get("eduportal_class_subjects");

          foreach($teacher_sbj as $teacher_sb) {

                  
            $m->where("subject_id", $teacher_sb['subject_id']);
            $subjects = $m->get("eduportal_subject_config");

              echo " ".$subjects[0]['subject'].",";
              
          }?> </td>

        
      </tr>

       <tr>  
         <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Annual / Exam fund   </td>
         <td width="20%" class="fieldStyle"> <?php  if($StudentData[0]['annual_fund']!=NULL){echo $StudentData[0]['annual_fund'];}else {echo "--";};?> </td>
   

  <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Registration Fee   </td>
     <td width="20%" class="fieldStyle"> <?php  if($StudentData[0]['registration_fee']!=NULL){echo $StudentData[0]['registration_fee'];}else {echo "--";};?></td>

        
      </tr>

      <tr>  
         <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Admission fee   </td>
         <td width="20%" class="fieldStyle"> <?php  if($StudentData[0]['admission_fee']!=NULL){echo $StudentData[0]['admission_fee'];}else {echo "--";};?> </td>
   

  <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Adm Confirmation   </td>
     <td width="20%" class="fieldStyle"> <?php  if($StudentData[0]['student_confirmed']!=NULL){echo $StudentData[0]['student_confirmed'];}else {echo "--";};?></td>

        
      </tr>

      <tr>  
   

      <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Prospectus   </td>
         <td width="20%" class="fieldStyle"> <?php  if($StudentData[0]['prospectus']!=NULL){echo $StudentData[0]['prospectus'];}else {echo "--";};?> </td>

        
      </tr>

      </table>

    <p width="100%" style="color:black;text-align: left;font-family:times new roman;font-size: 22px;font-weight: bold;" ><i class="fa fa-phone" style="font-size:35px;"></i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Contact & Address Information   </p>

    <table>

      </tr>
         <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Father Cell Number   </td>
         <td width="20%" class="fieldStyle"> <?php  if($StudentData[0]['cell']!=NULL){echo $StudentData[0]['cell'];}else {echo "--";};?> </td>

         <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Student Cell No   </td>
         <td width="20%" class="fieldStyle"> <?php  if($StudentData[0]['std_cell']!=NULL){echo $StudentData[0]['std_cell'];}else {echo "--";};?> </td>
      <tr>

      <tr>  
         <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Refered By   </td>
         <td width="20%" class="fieldStyle"> <?php  if($ReferdBy[0]['Refer_By']!=NULL){echo $ReferdBy[0]['Refer_By'];}else {echo $StudentData[0]['refrence'];};?> </td>
   

      <td width="13%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Address   </td>
         <td width="20%" class="fieldStyle"> <?php  if($StudentData[0]['address']!=NULL){echo $StudentData[0]['address'];}else {echo "--";};?> </td>

        
      </tr>

      
      </table> 
     <br><br>
      <p width="100%" style="color:black;text-align: left;font-family:times new roman;font-size: 22px;font-weight: bold;" ><i class="fa fa-user-circle" style="font-size:35px;"></i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Guardian Information   </p>
<br><br>
      <table width="100%"  style="font-size:14px;margin-top: -30px;" >  
     <thead> 
      
      </thead>
      <tbody>
   
      <tr>  
         <td width="17%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Guardian Name   </td>
         <td width="33%" class="fieldStyle"> </td>
      

      
         <td width="17%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Guardian CNIC   </td>
         <td width="33%" class="fieldStyle">  </td>

      </tr>

      <tr>  
         <td width="17%"><i class="fa fa-circle" style="color: lightgray;"></i>&nbsp;&nbsp; Guardian Contact No   </td>
         <td width="33%" class="fieldStyle">  </td>        

      </tr>      

      </table>

      <p width="100%" style="color:black;text-align: left;font-family:times new roman;font-size: 22px;font-weight: bold;" ><i class="fa fa-user-circle" style="font-size:35px;"></i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Other's   </p>

      <table width="100%"  style="font-size:14px;margin-top:30px;" >  
     <thead> 
      
      </thead>
      <tbody>
   
      <tr>  
         <td width="17%"><i class="fa fa-calendar fa-2x" style="color:black;"></i>&nbsp;&nbsp; Date </td>
         <td width="33%" class="fieldStyle">  <?php echo date("d-M-Y");?></td>
      

      
         <td width="17%"><i class="fa fa-thumbs-up fa-2x" style="color: black;"></i>&nbsp;&nbsp; Thumb   </td>
         <td width="33%" class="fieldStyle">  </td>

      </tr>

      <tr>  
         <td width="17%"><i class="fa fa-ravelry fa-2x" style="color: black;"></i>&nbsp;&nbsp;Signature </td>
         <td width="33%" class="fieldStyle">  </td>

         <td width="17%"><i class="fa fa-comment fa-2x" style="color: black;"></i>&nbsp;&nbsp;Remarks </td>
         <td width="33%" class="fieldStyle"> <?php echo $StudentData[0]['remarks'];?> </td>   

     
      </tr>
         

      </table>

       <p width="100%" style="color:black;text-align: left;font-family:times new roman;font-size: 22px;font-weight: bold;" ><i class="fa fa-paperclip" style="font-size:35px;"></i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Attach Documents  </p>

      <?php foreach ($documents as $document) { 

        $m->where("id", $document);
        $m->where("branch_id", $_SESSION['branch']);
        $AttachmentDoc = $m->get("eduportal_attach_documents");
        ?>

        <p style="text-align: left;color: black;"><span style="font-size: 23px;font-weight: bold;">&#10003;</span>&nbsp;&nbsp;<?php echo $AttachmentDoc[0]['document_type']."<br>";?> </p>
        

      <?php } ?>


      <p style="text-align: left;"><?php echo $brid[0]['admission_instructions']; ?></p>



   <table width="100%" style="font-size:15px;margin-top:10%;">  
   
   

         <tr>  
            
            <td width="30%" colspan="3"  style="text-align:center;"> 

            <br>
            
               <span style="font-size:10px;"> Software Developed By: Aqib Majeed (Software Engineer) 03016138728  </span>
            
            </td> 
         
         </tr>


   </table>


    </div>

</tbody>
</table>



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




</body>
</html>
