Your IP : 3.140.188.195


Current Path : /home/lentoinv/churchmr.com/
Upload File :
Current File : /home/lentoinv/churchmr.com/summary.php

<?php 
    session_start(); ob_start();
	//error_reporting(0); 
	//@ini_set('display_error', 0);

 include('dclm/control.php'); 



   
   
?>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Conference Participants</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.5 -->
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="dist/css/AdminLTE.min.css">
    <!-- iCheck -->
    <link rel="stylesheet" href="plugins/iCheck/square/blue.css">
  <link rel="stylesheet" href="https://cdn.datatables.net/1.11.5/css/jquery.dataTables.min.css">
  <link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.2/css/buttons.dataTables.min.css" type="text/css">
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
    .form-control{
        height:45px !important;
    }
</style>
  </head>
<body class="">
    <div class="">
      <center> 
      <!--<img src="user/upload/user.jpg"> -->
      <h3>
        <a href=""><b>GCK MINISTERIAL RENEWAL CONFERENCE</b></a> </h3></center>
      <div class="table-responsive" style="padding:0">
<table class="table" style="margin-bottom:50px">
    <thead>
    <tr>
        <th>SN</th>
        <th>Region</th>
        <th>Member Male</th>
        <th>Member Female</th>
        <th>Member Total</th>
        <th>Non-Member Male</th>
        <th>Non-Member Female</th>
        <th>Non-Member Total</th>
        <th>Grand Total</th>
        <th>Action</th>
    </tr>
    </thead>
    <tbody>
        <?php 
        function nonMember($reg,$sex){
            global $db;
        if($reg=='Akure'){
        $sql = $db->query("SELECT * FROM newevent WHERE eventid=3 AND denomination=2 AND sex='$sex' AND (lga='Akure South' OR lga='Ifedore') ");
        }
        elseif($reg=='Akure North'){
        $sql = $db->query("SELECT * FROM newevent WHERE eventid=3 AND denomination=2 AND sex='$sex' AND lga='Akure North' ");    
        }
        elseif($reg=='Owo'){
        $sql = $db->query("SELECT * FROM newevent WHERE eventid=3 AND denomination=2 AND sex='$sex' AND lga='Owo' ");    
        }
        elseif($reg=='Ose'){
        $sql = $db->query("SELECT * FROM newevent WHERE eventid=3 AND denomination=2 AND sex='$sex' AND lga='Ose' ");    
        }
        elseif($reg=='Oka'){
        $sql = $db->query("SELECT * FROM newevent WHERE eventid=3 AND denomination=2 AND sex='$sex' AND (lga='Akoko South-East' OR lga='Akoko South-West') ");    
        }
        elseif($reg=='Ikare'){
        $sql = $db->query("SELECT * FROM newevent WHERE eventid=3 AND denomination=2 AND sex='$sex' AND (lga='Akoko North-East' OR lga='Akoko North-West') ");    
        }
        elseif($reg=='Others'){
        $sql = $db->query("SELECT * FROM newevent WHERE eventid=3 AND denomination=2 AND sex='$sex' AND (region='$reg' OR lga='Others' OR lga='Idanre' OR lga='Ese Odo' OR lga='Ile Oluji/Okeigbo' OR lga='Ilaje' OR lga='Irele' OR lga='Odigbo' OR lga='Okitipupa' OR lga='Ondo East' OR lga='Ondo West') ");    
        }
        return mysqli_num_rows($sql);
        }
        
        $i=0; 
        $region = ['Akure','Akure North','Ikare','Oka','Ose','Owo','Others'];
      $a1 = $b1 =$c1=$d1=0;
        while($i<7){ $e=$i++; $reg=$region[$e];
          $sql1 = $db->query("SELECT * FROM newevent WHERE eventid=3 AND sex='Male' AND region='$reg' AND denomination=1 ");  
          $sql2 = $db->query("SELECT * FROM newevent WHERE eventid=3 AND sex='Female' AND region='$reg' AND denomination=1 ");
          $a = mysqli_num_rows($sql1);
          $b = mysqli_num_rows($sql2);
          $c=nonMember($reg,'Male');
          $d = nonMember($reg,'Female');
          
          $a1 += $a;
          $b1 += $b;
          $c1 += $c;
          $d1 += $d;
              ?>
        <tr>
            <td><?= $e+1 ?></td>
            <th><?= $reg ?></th>
            <td><?= $a ?></td>
            <td><?= $b ?></td>
            <td><?= $a+$b ?></td>
            <td><?= $c ?></td>
            <td><?= $d ?></td>
            <td><?= $c+$d ?></td>
            <th><?= $a+$b+$c+$d ?></th>
            <td><a href="?region=<?= $reg ?>" class="btn btn-primary btn sm">Statistics</a></td>
         
        </tr>
        <?php } ?>
        <tr>
            <td></td>
            <th>Grand Total</td>
            <th><?= $a1 ?></td>
            <th><?= $b1 ?></td>
            <th><?= $a1+$b1 ?></td>
            <th><?= $c1 ?></td>
            <th><?= $d1 ?></td>
            <th><?= $c1+$d1 ?></td>
            <th><?= $a1+$b1+$c1+$d1 ?></td>
            <td></td>
         
        </tr>
    </tbody>
</table>
<?php

$Region = [
      'Akure' => ["Aanuoluwa",
"Abusoro",
"Ajipowo",
"Aponmu",
"Awule",
"Ayedun",
"Boluwaji",
"Cultural",
"Dlcf",
"Esho",
"Faithfulness",
"Fanibi",
"Fiyinfolu",
"Futa",
"Glorious",
"Hospital",
"Ibukun oluwa",
"Ifeoluwa",
"Igbara-oke",
"Igbo",
"Ijapo",
"Ijare",
"Ijoka",
"Ilara",
"Inioluwa",
"Irese",
"Irewole",
"Isinkan",
"Isolo",
"Kajola",
"Oda",
"Odoikoyi",
"Oke-aro",
"Oke-ogba ",
"Oloruntedo",
"Omoniyi",
"Orita-obele",
"Oyemekun",
"Shagari",
"Surulere",
"Unity",
"Vining"],
'Akure North' => ["Agbeja", "Agunla", "Ala", "Alayere", "Ayetoro", "Bolorunduro", "Campus", "Campground", "Daada", "Igbatoro", "Igoba", "Iju College", "Iju Ijigbo", "Iluabo", "Itaogbolu", "Irowo", "Housing", "Jegele", "Kasemola", "Obaile", "Ogbese", "Okealafia", "Palace", "Ugele"],
'Ikare' => ["Jubilee", "Ekan ile", "Ogbagi", "Isowopo", "Ikaram", "Arigidi", "Okeagbe", "Olokun", "Okegbe", "Ugbe", "Campus"],
'Oka' => ["Ikese", "Agba", "Okaodo", "Owalusi", "Ayepe", "Isua", "Ilelabo", "Epinmi", "Ipe", "Okusa", "Supare", "Araromi", "Akowonjo", "Campus", "Oba", "Ayegunle", "Etioro"],
'Ose' => ["Ifon Oruju", "Ifon Moboluwaduro", "Ifon Uma", "Omialafa", "Sobe", "Arimogija", "Ute", "Okeluse", "Asolo", "Idoani", "Owani"],
'Owo' => ["Express", "Secretariat", "Okedogbon", "GRA", "Dominion", "Ijebu", "Iselu", "Victory", "Idashen", "Okeogun", "Igbo Church", "Ebira 1 and 2", "Otapete", "Campus Church", "Okebola Iyere", "Irowo Iyere", "Bolorunduro Emure", "Olutedo Emure", "Amurin", "Isho", "Isuada", "Ipenme", "Ipele", "Asabia Group"]
    ]
?>
<?php  $x = $_GET['region']??'Akure'; ?>
<h4><?= strtoupper($x) ?> REGION</h4>
<table class="table" style="margin-bottom:50px">
    <thead>
    <tr>
        <th>SN</th>
        <th>Group</th>
        <th>Strength</th>
    </tr>
    </thead>
    <tbody>
        <?php 
       
        $i=0; $sum = 0;
        while($i<count($Region[$x])){ $e=$i++; $zone=$Region[$x][$e];
          $sql = $db->query("SELECT * FROM newevent WHERE eventid=3 AND region='$x' AND zone='$zone' ");
          $sum += mysqli_num_rows($sql);
              ?>
        <tr>
            <td><?= $e+1 ?></td>
            <td><?= $zone ?></td>
            <td><?= mysqli_num_rows($sql) ?></td>
         
        </tr>
        <?php } ?>
         <tr>
            <td></td>
            <td>Total</td>
            <td><?= $sum ?></td>
         
        </tr>
    </tbody>
</table>

<h4>STATISTICS BY STATUS</h4>
<table class="table" style="margin-bottom:50px">
    <thead>
    <tr>
        <th>SN</th>
        <th>Status</th>
        <th>Strength</th>
    </tr>
    </thead>
    <tbody>
        <?php 
       $Status = ['Founder/GO','Bishop','Reverend','Pastor','Worker','Others',''];
        $i=0; $sum = 0;
        while($i<count($Status)){ $e=$i++; $x=$Status[$e];
          $sql = $db->query("SELECT * FROM newevent WHERE eventid=3 AND status='$x' ");
          $sum += mysqli_num_rows($sql);
              ?>
        <tr>
            <td><?= $e+1 ?></td>
            <td><?= $x ?></td>
            <td><?= mysqli_num_rows($sql) ?></td>
         
        </tr>
        <?php } ?>
         <tr>
            <td></td>
            <td>Total</td>
            <td><?= $sum ?></td>
         
        </tr>
    </tbody>
</table>
</div>

<?php 
// $n=0;  $sql = $db->query("SELECT * FROM newevent WHERE region = 'Akure' AND phone != '' AND zone='' AND gid=0 ");
// while($row = mysqli_fetch_assoc($sql)){$phone=$row['phone']; 
// $s = $db->query("SELECT * FROM eventdata WHERE phone = '$phone' OR phone2 = '$phone' ");
//  $n += mysqli_num_rows($s)>0 ? 1 : 0;
// } echo $n 
?>

<?php 
// $n=0;  $sql = $db->query("SELECT * FROM newevent WHERE region = 'Akure' AND phone != '' AND zone='' AND gid=0");
// while($row = mysqli_fetch_assoc($sql)){$gid=$row['gid']; $sn=$row['sn']; 
// $s = $db->query("SELECT * FROM zone WHERE sn = '$gid' ");
// if(mysqli_num_rows($s)>0){ 
//     $r = mysqli_fetch_assoc($s); $zone = $r['zone'];
//     $db->query("UPDATE newevent SET zone = '$zone' WHERE sn='$sn' ");
// }
// } echo $n
?>

       
  <?php
   function sqL20($col1,$val1,$col2,$val2)
	{
		global $db;
		$sql=$db->query("SELECT * FROM newevent WHERE $col1='$val1' AND $col2='$val2' " )or die(mysqli_error());	
		return mysqli_num_rows($sql);
	}
	
	?>     

        

      </div><!-- /.login-box-body -->
    </div><!-- /.login-box -->

    <!-- jQuery 2.1.4 -->
    <script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
    <!-- Bootstrap 3.3.5 -->
    <script src="bootstrap/js/bootstrap.min.js"></script>
    <!-- iCheck -->
    <script src="plugins/iCheck/icheck.min.js"></script>
    <!-- for data tables-->
  <script src="https://code.jquery.com/jquery-3.5.1.js"></script>
  <script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js"></script>
  <script src="https://cdn.datatables.net/buttons/2.2.2/js/dataTables.buttons.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
  <script src="https://cdn.datatables.net/buttons/2.2.2/js/buttons.html5.min.js"></script>
  <script src="https://cdn.datatables.net/buttons/2.2.2/js/buttons.print.min.js"></script>






<!-- page script -->
<script>
  $(function () {
    $('#example1').DataTable()
    $('#example2').DataTable({
      'paging'      : true,
      'lengthChange': true,
      'searching'   : true,
      'ordering'    : false,
      'info'        : true,
      'autoWidth'   : true,
      dom: 'Bfrtip',
        buttons: [
            'copy', 'csv', 'excel', 'pdf', 'print'
        ]
    })
  })

    $(document).ready(function() {
    $('.example').DataTable( {
      'lengthChange': true,
        dom: 'Bfrtip',
        buttons: [
            'copy', 'excel', 'pdf'
        ]
    } );
} );
</script>
    <script>
    function getStatus(v){
        if(v=='Others'){
            var x = '<label>Specify Status</label><input type="text" class="form-control" style="height:40px" placeholder="Status" name="status">';
        }else{
            var x = '';
        }
        $('#status').html(x);
    }
    
    </script>
  </body>
</html>

?>