<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h4 class="m-0">Manage - Tution Fee</h4>
          </div><!-- /.col -->
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item">Dashboard</li>
              <li class="breadcrumb-item ">Extra</li>
              <li class="breadcrumb-item active">School Fees</li>
            </ol>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    
    <section class="content">
      <div class="container-fluid">
        <div class="row">
          <div class="col-md-3 col-sm-6 col-12">
            <div class="info-box">
              <span class="info-box-icon bg-info"><i class="far fa-envelope"></i></span>
              <?php
                include('../include/config.php');
                $result = mysqli_query($con,"SELECT * FROM pupils");
                $num_rows1 = mysqli_num_rows($result);
                {
                    $sts=htmlentities($num_rows1); 
                }
                ?>
                                  
              <div class="info-box-content">
                <span class="info-box-text">Registered Pupils</span>
                <h4 class="info-box-number budge"><?php echo $sts; ?></h4>
              </div>
              <!-- /.info-box-content -->
            </div>
            <!-- /.info-box -->
          </div>
          
          <!--div class="col-md-3 col-sm-6 col-12">
            <div class="info-box">
  
              <div class="info-box-content">
                <center>
                    <button type="button" class="btn btn-success" data-toggle="modal" data-target="#modalfees" id="seemodal">
                  <i class="fa fa-plus"></i> Create sub-fee structure
                </button>
                </center>
              </div>
              <!-- /.info-box-content >
            </div>
            <!-- /.info-box >
          </div-->
        
           <div class="col-md-3 col-sm-6 col-12">
            <div class="info-box">
              <div class="info-box-content">
                <center>
                    <a href="Pupils.php?page=Fee" class="btn btn-warning" id="">
                  <i class="fa fa-id-card"></i> Whole Fee structure
                </a>
                </center>
              </div>
              <!-- /.info-box-content -->
            </div>
            <!-- /.info-box -->
          </div>
          
          </div>
         </div>
    </section>
          
    
    <section class="content" style="text-decoration:none;font-weight:normal;font-family:Times;font-size:12px">
           <div class="row">
            <div class="col-md-6 col-sm-6 col-lg-6">
                <center><h4 class="text-success">Manage Tution Fee</h4></center>
             <div class="table-responsive" id="tablefeefolde">
                 <table class="table table-bordered" id="feeorigin" >
                     <thead>
                         <tr>
                             <th>#</th>
                             <th>Class/Grade</th>
                             <th>Tution Fee (KES)</th>
                             <th>Action</th>
                         </tr>
                     </thead>
                     <tbody>
                            <?php
                        $sql = "select * from Fees ORDER BY Grade ASC";
                        $result = $con->query($sql);
                        if ($result->num_rows > 0) 
                        {
                            $cnt='1';
                            while($row = $result->fetch_assoc()) 
                            {
                            ?>	
                            <tr>
                            <td><?php echo $cnt; ?></td>
                            <td><?php echo $row["Grade"]; ?></td>
                            <td>
                                <input style="font-weight:bold;font-size:15px" type="text"  onkeypress="return /[0-9]/i.test(event.key)" value="<?php echo $row['Tution']; ?>" class="tutioninput text-danger" />
                            </td>
                            <td>
                                <input type="hidden"  onkeypress="return /[0-9]/i.test(event.key)" name="feeidholder" class="feeipholderr" value="<?php echo $row["count"]; ?>" />
                                
                                <i class="fa fa-save text-green btnfeeedit btn-xs" id="bed" title="Click to Update">
                                    
                                </i>
                            </td>
                            </tr>
                            <?php
                            $cnt=$cnt+1;
                            }
                        }
                            ?>
                     </tbody>
                 </table> 
              </div>
              </div>
              
              <!---Manage Boarding Feee -->
               <div class="col-md-3 col-sm-3 col-lg-3">
                <center><h4 class="text-success">Boarding Fee</h4></center>
             <div class="table-responsive" id="">
                 <table class="table table-bordered" id="" >
                     <thead>
                         <tr>
                             <th>Amount (KES)</th>
                             <th>Action</th>
                         </tr>
                     </thead>
                     <tbody>
                            <tr>
                            <?php
                            $sql = "select * from bofee";
                            $result = $con->query($sql);
                            while($row = $result->fetch_assoc()) 
                            {
                               $bofe=$row["Fee"];
                            }
                            ?>
                            <td><input type="text" style="font-size:18px;font-weight:800" name="amt" value="<?php echo $bofe; ?>" id="bofee" onkeypress="return /[0-9]/i.test(event.key)" class="form-control text-danger" /> 
                            </td>
                            <td>
                                <button class="btn btn-primary btn-sm btnbofee" id="btnbofee"> <i class="fa fa-save"></i> Save</button>
                            </td>
                            </tr>
                     </tbody>
                 </table> 
              </div>
              </div>
        
              <!-- Manage Motivation Fee -->
            <div class="col-md-3 col-sm-3 col-lg-3">
                <center><h4 class="text-success">Motivation Fee</h4></center>
             <div class="table-responsive" id="">
                 <table class="table table-bordered" id="" >
                     <thead>
                         <tr>
                             <th>Amount (Ksh)</th>
                             <th>Action</th>
                         </tr>
                     </thead>
                     <tbody>
                            <tr>
                            <?php
                            $sql = "select * from motifee";
                            $result = $con->query($sql);
                            while($row = $result->fetch_assoc()) 
                            {
                               $bofe=$row["Amount"];
                            }
                            ?>
                            <td><input type="text" style="font-size:18px;font-weight:800" name="amt" value="<?php echo $bofe; ?>" id="mofee" onkeypress="return /[0-9]/i.test(event.key)" class="form-control text-danger mofee" /> 
                            </td>
                            <td>
                                <button class="btn btn-success btn-sm btnmofee" id="btnbofee"> <i class="fa fa-save"></i> Save</button>
                            </td>
                            </tr>
                     </tbody>
                 </table> 
              </div>
              </div>
              
            <!--div class="col-md-6 col-sm-6 col-lg-6">
                <center><h3 class="text-success">Other Fees Particulars</h3></center>
             <div class="table-responsiveve" id="tablefeeextra">
                 <table class="table table-bordered" id="tableextrafee" >
                     <thead>
                         <tr>
                             <th>#</th>
                             <th>Fee Type</th>
                             <th>Fee/Cost (KES)</th>
                             <th>Category</th>
                             <th>Description</th>
                             <th>Action</th>
                         </tr>
                     </thead>
                     <tbody>
                            <?php
                        $sql = "select * from Fees3";
                        $result = $con->query($sql);
                        if ($result->num_rows > 0) 
                        {
                            $cnt='1';
                            while($row = $result->fetch_assoc()) 
                            {
                            ?>	
                            <tr>
                            <td><?php echo $cnt; ?></td>
                            <td><?php echo $row["Type"]; ?></td>
                            <td><?php echo $row["Amount"]; ?> </td>
                            <td><?php echo $row["Cat"]; ?> </td>
                            <td><?php echo $row["Infor"]; ?></td>
                            
                            <td>
                                <input type="hidden" name="feeidholderr" class="feeipholder" value="<?php echo $row["id"]; ?>" />
                                <i class="fa fa-edit text-green btnfeeedittt btn-xs" id="bed">
                                    
                                </i> | <i class="fa fa-trash btn-xs text-danger" id="bedit">
                                    
                                </i>
                            </td>
                            </tr>
                            <?php
                            $cnt=$cnt+1;
                            }
                        }
                            ?>
                     </tbody>
                 </table> 
              </div>
              </div-->
            </div>
      
    </section>
  
</div>

