<?php include('parent/callMe.php');?>

<?php include('Sessioncheck.php');?>

<?php   

  

// getting branch details



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

$branch1=$m->get("edu_branch_config");



$session;



   if($_REQUEST['session']!=NULL){



      $session=$_REQUEST['session'];

      

    }else {

      

      $session=$_SESSION['current_session'];

    }



if($_REQUEST['month']!=NULL){

$m->where("Month_Id", $_REQUEST['month']);

}else{

$m->where("Month_Id", date("m"));

}



$month=$m->get("eduportal_month_config");



?>





<?php  



$branch=$_SESSION['branch']; 



$sql = "SELECT * FROM  edu_student_details  WHERE branch_id='$branch' ";



   if (isset($_REQUEST['class_id'])) {    

 



    if($_REQUEST['class_id']=="All"){

      $sql;

    } else {

    $sql .= " AND class_id = '" .$_REQUEST['class_id']. "' ";



    }



    if($_REQUEST['section']!=''){

        $sql .= " AND section_id ='" . $_REQUEST['section']. "' ";

   }



   if($_REQUEST['std_status']=="All"){

      $sql;

    } else {

    $sql .= " AND status = '" .$_REQUEST['std_status']. "' ";



    }



     }

    

      if($_REQUEST['from']!=" " && $_REQUEST['from']!=NULL ) {

        $from=date("Y-m-d",strtotime($_REQUEST['from']));  



      }else {

        $from=date("Y-m-01");  

      }

     

      if($_REQUEST['to']!=" " && $_REQUEST['to']!=NULL   ) {

        $to=date("Y-m-d",strtotime($_REQUEST['to']));

      }else {

        $to=date("Y-m-t");  

      } 

      

    if ($_REQUEST['admDate']=='1') {



    $sql .= " AND date_of_adms BETWEEN '" .$from. "' AND '" .$to. "'";



    $sql .= " order by date_of_adms desc";



    } else {



    $sql .= " AND entrance_date BETWEEN '" .$from. "' AND '" .$to. "'";

    $sql .= " order by entrance_date desc";



    }



 // echo $sql;



  $WorkAssignListings = $m->query($sql);



 

 

  

 

?>



<!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">

<title>Print Salary Receipt</title>

<link rel="icon" type="image/png" href="img/favicon.png" sizes="32x32" />

<script type="text/javascript">

// window.print();

</script>

<style type="text/css">



tr th {font-size:14px;}

tr td {font-size:16px;}

  

.border{border:1px solid black;}



.alignment{padding-left:1%;text-align:left;}



.borderbottom{

  border-bottom:1px solid black;

}







@media print {

    #Header, #Footer { display: none !important; }

}

@media screen

   {

      p.bodyText {font-family:verdana, arial, sans-serif;}

   }



   @media print

   {

      p.bodyText {font-family:georgia, times, serif;}

   }

   @media screen, print

   {

      p.bodyText {font-size:10pt}

   }

   @media print {

  a[href]:after {

    content: none !important;

  }

}

.center{text-align:center;}

</style>

</head>



<body style="font-size:12px;padding-right:1%;padding-left:1%;padding-top:3%;padding-bottom:1%;">

<div style="text-align:center;font-size:24px;font-weight:bold;margin:0 auto;"><?php echo $branch1[0]['Branch_Name'];?> 

</div>



<br>



<div style="text-align:center;font-size:18px;font-weight:bold;"> Datewise Student Admission



 </div>



<hr style="width:100%;">







<div style="width:33%; float:left;font-size:18px; margin-left:10px; "> <b> From:</b> <?php echo date("d-M-Y",strtotime($_REQUEST['from']));?> To <?php echo date("d-M-Y",strtotime($_REQUEST['to']));?>  </div>





<br>  





    <form class="form-style-7" action="" method="get"  onSubmit="return student_check();"  enctype="multipart/form-data">





  

  

  



    <table border="1"  data-page-length='100' class="table table-striped table-bordered " style="width:100%;font-size:11px; border-collapse: collapse;">

          

          <thead>        

            



            <tr style="background: lightgray;">              

                <th width="" style="padding:3px;">S.No</th>

                <th width="">Student</th>

                <th width="">Father</th>

                <th width="">Adm/Roll No</th>

                <th width=""> Cell Number </th>

                <th width=""> Class </th>

                <th width=""> Admission Date </th>

                <th width="8%" style="text-align:center;"> Reg Fee </th>

                <th width="8%" style="text-align:center;"> Adm Fee </th>

                <th width="8%" style="text-align:center;"> Monthly Fee </th>

            </tr>



        </thead>

        <tbody>

     

     <?php

     

     $count=1; 



      foreach($WorkAssignListings as $WorkAssignListVal)

      { 



            $stdID=$WorkAssignListVal['student_id'];
        $clsID=$WorkAssignListVal['class_id'];
        $sessID=$_SESSION['current_session'];
        $m->where("class_id", $WorkAssignListVal['class_id']);

        $class=$m->get("edu_class_config");



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

        $section=$m->get("edu_adm_section_detail");



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

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


        $sql = "SELECT std_registration_fee,std_admission_fee,standared_admission,standared_tution_fee,std_tution_fee FROM  eduportal_student_fee_structure  WHERE branch_id='$branch' and student_id='$stdID' and class_id='$clsID' ";
        $RegAdm = $m->query($sql);


        $sql = "SELECT tution_fee FROM  eduportal_class_fee_details  WHERE branch_id='$branch' and session_id='$sessID' and class_id='$clsID' ";
        $MonthlyFee = $m->query($sql);



      ?>





      <tr>       

     

      <td style="text-align:center; padding: 3px;"><?php echo $count++;?></td>  



      

      <td style="padding-left:1px;" >

        <a style="padding: 0px 5px; font-size:14px;"  href="student_profile.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>&student=<?php echo $WorkAssignListVal['student_id']; ?>" style="cursor:pointer;">

          <?php echo $WorkAssignListVal['first_name'];?></a></td>



      



      <td style="padding-left:1px;"> <?php echo $WorkAssignListVal['last_name'];?> </td>

      <td style="padding: 3px; text-align: center;"> <?php echo $WorkAssignListVal['ref_no']; ?> / <?php echo $WorkAssignListVal['candidate_roll_no']; ?> </td>

      <td style="padding: 3px; text-align: center;"> <?php echo $WorkAssignListVal['cell_no'];?> </td>

      <td style="text-align:center; padding: 3px;">

       <?php echo getClassName($m,$WorkAssignListVal['class_id']);?> / <?php echo getSectionName($m,$WorkAssignListVal['section_id']);?> </td> 



       <td style="text-align:center; padding: 2px;">

       <?php

       if ($_REQUEST['admDate']=='1') {



        echo date("d-M-Y",strtotime($WorkAssignListVal['date_of_adms']));



       } else {



        echo date("d-M-Y",strtotime($WorkAssignListVal['entrance_date']));}?> </td>  

   

       <td><?php echo $RegAdm[0]['std_registration_fee'];?></td>
        <td><?php echo $RegAdm[0]['std_admission_fee'];?></td>
        <td><?php echo $MonthlyFee[0]['tution_fee'];?></td>

      

      </tr>





              <?php

      } ?>







           

            

           

        </tbody>

        

    </table>



</form>



    



</body>

</html>

