
<?php 



 $m->where("session_id", $WorkAssignListVal[0]['session_id']);

  $session=$m->get("edu_session_config");



  $m->where("parents_cellno", $WorkAssignListVal[0]['cell_no']);

  $parentsIdPaswrd = $m->get("eduportal_parents_access");







 //date in mm/dd/yyyy format; or it can be in other formats as well

  $birthDate = date("m-d-Y",strtotime($WorkAssignListVal[0]['dob']));

  //explode the date to get month, day and year

  $birthDate = explode("-", $birthDate);

  //get age from date or birthdate

  $age = (date("md", date("U", mktime(0, 0, 0, $birthDate[0], $birthDate[1], $birthDate[2]))) > date("md")

    ? ((date("Y") - $birthDate[2]) - 1)

    : (date("Y") - $birthDate[2]));

 // echo "Age is:" . $age;




$m->where("student_id", $WorkAssignListVal[0]['student_id']);

$m->where("class_id", $WorkAssignListVal[0]['class_id']);

//$m->where("session_id", $_SESSION['current_session']);

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

$StudentFee = $m->get("eduportal_student_fee_structure");

//print_r($StudentFee);

//echo "<br>".$StudentFee[0]['standared_admission'];

$m->where("class_id", $WorkAssignListVal[0]['class_id']);

$m->where("session_id", $_SESSION['current_session']);

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

$ClassFee = $m->get("eduportal_class_fee_details");



?>

<style type="text/css">

  .equal-width-table th,
  .equal-width-table td {
    width: 20%; /* Adjust the width as needed */
    word-wrap: break-word;
  }

</style>

<div class="row">

  <div class="col-md-2">

        <div class="profile_img">

        <div id="crop-avatar">

          <!-- Current avatar -->

           <?php if($WorkAssignListVal[0]['image']!=NULL){ ?>



      <img src="<?php echo DOMAIN;?>Production/students_pics/<?php echo $WorkAssignListVal[0]['image'];?>" id="preview" class="img-thumbnail" style="width:180px;height:150px;"   />



   <?php }else { ?>   



       <img src="<?php echo DOMAIN;?>Production/images/upload.png" id="preview" height="150px" class="img-thumbnail" width="180px"  />





   <?php } ?>

                        </div>

                      </div>



        

      </div>

    <div class="col-md-5" >



        <table width="100%"  class="responsive">

                            

            <tr>

               <th colspan="2" style="background-color:#00AFEF;color:white;" width="100%"> Personal Information </th>

            </tr>

                            

            <tr>

               <th class="tdStyle" width="40%"> Student Name: </th>

               <td class="tdStyle" width="60%"> <?php  if($WorkAssignListVal[0]['first_name']!=NULL){echo strtoupper($WorkAssignListVal[0]['first_name']);}else {echo "--";};?> </td>

            </tr>

            <?php if ($WorkAssignListVal[0]['urdu_name']!=NULL) { ?>                

            

            <tr>

               <th class="tdStyle" width="40%"> Student Name Urdu: </th>

               <td class="tdStyle" width="60%"> <?php  if($WorkAssignListVal[0]['urdu_name']!=NULL){echo strtoupper($WorkAssignListVal[0]['urdu_name']);}else {echo "--";};?> </td>

            </tr>



           <?php } ?>



            <tr>

               <th class="tdStyle" width="40%"> Father/Husband Name: </th>

               <td class="tdStyle" width="60%"> <?php  if($WorkAssignListVal[0]['last_name']!=NULL){echo strtoupper($WorkAssignListVal[0]['last_name']);}else {echo "--";};?> </td>

            </tr>



            <tr>

               <th class="tdStyle" width="50%"> Admission No: </th>

               <td class="tdStyle" width="50%"> <?php  if($WorkAssignListVal[0]['ref_no']!=NULL){echo $WorkAssignListVal[0]['ref_no'];}else {echo "--";};?> </td>

            </tr>

      

            <tr>

               <th class="tdStyle" width="30%"> Religion: </th>

               <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['religion']!=NULL){echo strtoupper($WorkAssignListVal[0]['religion']);}else {echo "--";};?> </td>

            </tr>



            <!-- <tr>

               <th class="tdStyle" width="30%"> Cast: </th>

               <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['cast']!=NULL){echo strtoupper($WorkAssignListVal[0]['cast']);}else {echo "--";};?> </td>

            </tr> -->



            <tr>

               <th class="tdStyle" width="30%"> Gender: </th>

               <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['gender']!=NULL){echo strtoupper($WorkAssignListVal[0]['gender']);}else {echo "--";};?> </td>

            </tr>

            <tr>

               <th class="tdStyle" width="40%"> Date Of Birth: </th>

               <td class="tdStyle" width="60%"> <?php  if($WorkAssignListVal[0]['dob']!=NULL){echo date("d-M-Y",strtotime($WorkAssignListVal[0]['dob']));}else {echo "--";};?> </td>

            </tr>



            <tr>

               <th class="tdStyle" width="40%"> Place Of Birth: </th>

               <td class="tdStyle" width="60%"> <?php  if($WorkAssignListVal[0]['place_of_birth']!=NULL){echo $WorkAssignListVal[0]['place_of_birth'];}else {echo "--";};?> </td>

            </tr>



            <tr>

               <th class="tdStyle" width="40%"> Student Age: </th>

               <td class="tdStyle" width="60%"> <?php  if($WorkAssignListVal[0]['dob']!=NULL){echo $age." Year Old";}else {echo "--";};?> </td>

            </tr>



            <tr>

               <th class="tdStyle" width="40%"> Family ID No: </th>

               <td class="tdStyle" width="60%"> <?php  

                  $ID_firstFourDigit = substr($WorkAssignListVal[0]['formBNo'], 0, 5);

                  $ID_Center = substr($WorkAssignListVal[0]['formBNo'], 0, 12); 

                  $IDlastnumber=substr($WorkAssignListVal[0]['formBNo'], -1);

                  $IDcenter=substr($WorkAssignListVal[0]['formBNo'], -7);

                

                  



               if($WorkAssignListVal[0]['formBNo']!=NULL){echo $WorkAssignListVal[0]['formBNo']; /*$ID_firstFourDigit."-".$IDcenter."-".$IDlastnumber;*/}else {echo "--";};?> </td>

            </tr>

            <tr>

               <th class="tdStyle" width="40%"> Gaurdian Name: </th>

               <td class="tdStyle" width="60%"> <?php  if($WorkAssignListVal[0]['gardian_name']!=NULL){echo strtoupper($WorkAssignListVal[0]['gardian_name']);}else {echo "--";};?> </td>

            </tr>            



            <tr>

               <th class="tdStyle" width="40%"> Gaurdian CNIC: </th>

               <td class="tdStyle" width="60%"> <?php  if($WorkAssignListVal[0]['cnic']!=NULL){echo $WorkAssignListVal[0]['cnic'];}else {echo "--";};?> </td>

            </tr>

            <tr>

               <th class="tdStyle" width="30%"> Roll No : </th>

               <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['candidate_roll_no']!=NULL){echo $WorkAssignListVal[0]['candidate_roll_no'];}else {echo "--";};?> </td>

            </tr>



            <tr>

               <th class="tdStyle" width="30%"> Admission Date: </th>

               <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['date_of_adms']!=NULL){echo date("d-M-Y",strtotime($WorkAssignListVal[0]['date_of_adms']));}else {echo "--";};?> </td>

            </tr>



            <tr>

               <th class="tdStyle" width="30%"> Chronical Disease : </th>

               <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['chronical_disease']!=NULL){echo $WorkAssignListVal[0]['chronical_disease'];}else {echo "--";};?> </td>

            </tr>

            <?php if ($WorkAssignListVal[0]['student_documents'] != NULL) { ?>
             
            <tr>
                <th class="tdStyle" width="100%">                
                <a class="btn btn-success" style="padding: 0px 5px; font-size:14px;" href="<?php echo DOMAIN.AgentDirectory;?>student_documents/<?php echo $WorkAssignListVal[0]['student_documents'];?>" download><i class="fa fa-download"></i> Download Documents</a>
                </th>

            </tr>

        <?php } ?>




            <!-- <tr>

               <th class="tdStyle" width="30%"> Parent Id: </th>

               <td class="tdStyle" width="70%"> <?php  if($parentsIdPaswrd[0]['parents_cellno']!=NULL){echo $parentsIdPaswrd[0]['parents_cellno'];}else {echo "--";};?> </td>

            </tr>



            <tr>

               <th class="tdStyle" width="30%"> Parent Password: </th>

               <td class="tdStyle" width="70%"> <?php  if($parentsIdPaswrd[0]['password']!=NULL){echo $parentsIdPaswrd[0]['password'];}else {echo "--";};?> </td>

            </tr> -->



        </table>



       </div>

          <div class="col-md-5" >

          <table width="100%"  class="responsive">



            <tr>

                <th colspan="2" style="background-color:#00AFEF;color:white;" width="100%"> Academic Information  </th>

            </tr>

       

            <tr>

                <th class="tdStyle" width="30%"> Session: </th>

                <td class="tdStyle" width="70%"> <?php  if($session[0]['session_year']!=NULL){echo $session[0]['session_year'];}else {echo "--";};?> </td>

            </tr>
<!-- 
            <tr>

                <th class="tdStyle" width="30%"> Year: </th>

                <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['year']!=NULL){echo $WorkAssignListVal[0]['year'];}else {echo "--";};?> </td>

            </tr> -->

            <tr>

                <th class="tdStyle" width="30%"> Class : </th>

                <td class="tdStyle" width="70%"> <?php  if($class[0]['Class_Name']!=NULL){echo strtoupper($class[0]['Class_Name']);}else {echo "--";};?> </td>

            </tr>



             <tr>

                <th class="tdStyle" width="30%"> Section : </th>

                <td class="tdStyle" width="70%"> <?php  if($section[0]['section_name']!=NULL){echo strtoupper($section[0]['section_name']);}else {echo "--";};?> </td>

            </tr>



            <tr>

                <th class="tdStyle" width="30%"> Previous Class : </th>

                <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['old_class']!=NULL){echo strtoupper($WorkAssignListVal[0]['old_class']);}else {echo "--";};?> </td>

            </tr>



            <tr>

                <th class="tdStyle" width="30%"> Prev.Institute : </th>

                <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['old_school']!=NULL){echo strtoupper($WorkAssignListVal[0]['old_school']);}else {echo "--";};?> </td>

            </tr>



            <tr>

                <th class="tdStyle" width="50%"> Previous Total : </th>

                <td class="tdStyle" width="50%"> <?php  if($WorkAssignListVal[0]['old_tmarks']!=NULL){echo $WorkAssignListVal[0]['old_tmarks'];}else {echo "--";};?> </td>

            </tr>



            <tr>

                <th class="tdStyle" width="50%"> Previous Obtained : </th>

                <td class="tdStyle" width="50%"> <?php  if($WorkAssignListVal[0]['old_obtmarks']!=NULL){echo $WorkAssignListVal[0]['old_obtmarks'];}else {echo "--";};?> </td>

            </tr>



            <tr>

            

                <th colspan="2" style="background-color:#00AFEF;color:white;" width="100%">Contact & Address Information  </th>

            </tr>



            <tr>

                <th class="tdStyle" width="30%"> SMS Reporting Number: </th>

                <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['cell_no']!=NULL){echo $WorkAssignListVal[0]['cell_no'];}else {echo "--";};?>  </td>

            </tr>



            <tr>

                <th class="tdStyle" width="30%"> Father Contact No: </th>

                <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['father_cellno']!=NULL){echo $WorkAssignListVal[0]['father_cellno'];}else {echo "--";};?>  </td>

            </tr>



            <!-- <tr>

                <th class="tdStyle" width="30%"> Father Business No: </th>

                <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['father_Bnumber']!=NULL){echo $WorkAssignListVal[0]['father_Bnumber'];}else {echo "--";};?>  </td>

            </tr> -->



            <tr>

                <th class="tdStyle" width="30%"> Mother Contact No: </th>

                <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['mother_cell']!=NULL){echo $WorkAssignListVal[0]['mother_cell'];}else {echo "--";};?>  </td>

            </tr>



            <tr>

                <th class="tdStyle" width="30%"> Home Contact No: </th>

                <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['home_number']!=NULL){echo $WorkAssignListVal[0]['home_number'];}else {echo "--";};?>  </td>

            </tr>





             <tr>

                <th class="tdStyle" width="30%"> Whatsapp No: </th>

                <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['whatsapp_number']!=NULL){echo $WorkAssignListVal[0]['whatsapp_number'];}else {echo "--";};?>  </td>

            </tr>



            <tr>

               <th class="tdStyle" width="40%"> Gaurdian Cell No: </th>

               <td class="tdStyle" width="60%"> <?php  if($WorkAssignListVal[0]['gardian_no']!=NULL){echo $WorkAssignListVal[0]['gardian_no'];}else {echo "--";};?> </td>

            </tr>



            <tr>

                <th class="tdStyle" width="30%"> Email: </th>

                <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['email']!=NULL){echo strtoupper($WorkAssignListVal[0]['email']);}else {echo "--";};?> </td>

            </tr>

            <tr>

                <th class="tdStyle" width="30%"> Father Email: </th>

                <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['father_email']!=NULL){echo strtoupper($WorkAssignListVal[0]['father_email']);}else {echo "--";};?> </td>

            </tr>

            <tr>

                <th class="tdStyle" width="30%"> Mother Email: </th>

                <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['mother_email']!=NULL){echo strtoupper($WorkAssignListVal[0]['mother_email']);}else {echo "--";};?> </td>

            </tr>



            <tr>

                <th class="tdStyle" width="30%"> Address: </th>

                <td class="tdStyle" width="70%"> <?php  if($WorkAssignListVal[0]['address']!=NULL){echo strtoupper($WorkAssignListVal[0]['address']);}else {echo "--";};?> </td>

            </tr>





        <tr>



<?php 



  

  $m->where("Country_Id", $WorkAssignListVal[0]['Country_Id']);

  $country =  $m->get('eduportal_country_config', $data);



  $m->where("State_Id", $WorkAssignListVal[0]['State_Id']);

  $state =  $m->get('eduportal_state_config', $data);



  $m->where("City_Id", $WorkAssignListVal[0]['City_Id']);

  $city =  $m->get('eduportal_city_config', $data);



 

   

?>





            <th class="tdStyle" width="30%"> Location: </th>

            <td class="tdStyle" width="70%"> 



             <?php  if($city[0]['City_Name']!=NULL){echo strtoupper($city[0]['City_Name']);}else {echo "--";};?>, 

              <?php  if($state[0]['State_Name']!=NULL){echo strtoupper($state[0]['State_Name']);}else {echo "--";};?>

                     

            </td>

          </tr>







      </table>

      </div>

<div class="col-md-10" style="float: right;">
    <br>
<table width="100%" class="responsive equal-width-table table table-striped table-bordered">

<tr>

<th colspan="5" style="background-color:#00AFEF;color:white;text-align: center;" width="100%"> Fee Information </th>

</tr>
    <tr style="background-color:lightgray;color:black;">
        <th class="col">Fee</th>
        <th class="col">Standard</th>
        <th class="col">Net</th>
        <th class="col">Scholarship</th>
        <th class="col">Scholarship%</th>
    </tr>
<!-- $StudentFee[0]['standared_tution_fee'] -->
    <tr>
        <td class="col">Monthly Fee</td>
        <td class="col"><?php echo $ClassFee[0]['tution_fee'];?></td>
        <td class="col"><?php echo $StudentFee[0]['std_tution_fee'];?></td>
        <td class="col"><?php echo $ClassFee[0]['tution_fee']-$StudentFee[0]['std_tution_fee'];?></td>
        <td class="col">
            <?php
                 $disAmt=$ClassFee[0]['tution_fee']-$StudentFee[0]['std_tution_fee'];
                 $dis=$disAmt*100/$ClassFee[0]['tution_fee'];
                 if($dis!=NULL){echo number_format($dis, 2)."%";}else {echo "--";};?>

        </td>
    </tr>

     <tr>
        <td class="col">Admission Fee</td>
        <td class="col"><?php echo $StudentFee[0]['standared_admission'];?></td>
        <td class="col"><?php echo $StudentFee[0]['standared_admission']-$StudentFee[0]['std_admission_fee'];?></td>
        <td class="col"><?php echo $StudentFee[0]['std_admission_fee'];?></td>
        <td class="col">
            <?php
                 $disAmt=$StudentFee[0]['standared_admission']-$StudentFee[0]['std_admission_fee'];
                 $dis=$StudentFee[0]['std_admission_fee']*100/$StudentFee[0]['standared_admission'];
                 if($dis!=NULL){echo number_format($dis, 2)."%";}else {echo "--";};?>

        </td>
    </tr>

     <tr>
        <td class="col">Registration Fee</td>
        <td class="col"><?php echo $StudentFee[0]['std_registration_fee'];?></td>
        <td class="col"></td>
        <td class="col"></td>
        <td class="col"></td>
    </tr>

</table>

</div>

      <!-- <div class="col-md-2">

                <div class="form-group ">

                      <label class="required" style="color:white; "> . </label> <br>

                      <a onclick="FamilyData(<?php echo $WorkAssignListVal[0]['student_id'];?>,'<?php echo $WorkAssignListVal[0]['cell_no'];?>')" class="btn btn-success"> Show Family Data </a>      

                  </div>

              </div>





            <div id="myID<?php echo $WorkAssignListVal[0]['student_id'];?>" style="display:none">

   



            </div> --> 



</div>

