 <div>
    <ul class="breadcrumb">
        <li>
            <a href="index.php">Home</a>
        </li>
        <li>
            <a href="index.php?page=vol_count"> Volunteers count</a>
        </li>
    </ul>
</div>
 
 
 <div class="row">
        <div class="box col-md-12">
            <div class="box-inner">
                <div class="box-header well" data-original-title="">
                    <h2><i class="glyphicon glyphicon-th"></i> Volunteers count</h2>

                    <div class="box-icon">
                        <a href="#" class="btn btn-setting btn-round btn-default"><i
                                class="glyphicon glyphicon-cog"></i></a>
                        <a href="#" class="btn btn-minimize btn-round btn-default"><i
                                class="glyphicon glyphicon-chevron-up"></i></a>
                        <a href="#" class="btn btn-close btn-round btn-default"><i
                                class="glyphicon glyphicon-remove"></i></a>
                    </div>
                </div>
                <div class="box-content">
                  <br>

                  
                  <table width="500" border="0" cellspacing="0" cellpadding="0" class="table table-striped table-bordered bootstrap-datatable datatable responsive">
  <tr>
    <td>#</td>
    <td>branch name</td>
    <td>volunteers count</td>
    <td></td>
  </tr>
  
  <?php
  
  $count=1;
  $count_q="select branches_id , branches_name_en ,count(distinct(voluntary_personalInfoId)) c  from voluntary
inner join branches on branches_id=voluntary_branchid
where 1=1
 ";
 if($_SESSION['admin_role']==3){ $count_q=$count_q."and  branches_id='".$_SESSION['admin_branchid']."'";}
 $count_q=$count_q."group by   branches_id";
 

  $count_res=mysqli_query($conn,$count_q);
  if($count_res){
	  while($count_row=mysqli_fetch_assoc($count_res)){
		  
    ?>
  <tr>
    <td><?php echo($count++); ?></td>
    <td><?php echo($count_row['branches_name_en']); ?></td>
    <td><?php echo($count_row['c']); ?></td>
    <td><a href="index.php?page=volbranch&id=<?php echo($count_row['branches_id']); ?>" class="btn btn-warning btn-xs"> <i class="glyphicon glyphicon-zoom-in icon-white"></i> view volunteers</a></td>
  </tr>
  
  
  <?php }
	  } ?>
</table>
 
                   
                   
                   
                   
                   
                   
                   
                </div>
            </div>
        </div>
        <!--/span-->
    </div><!--/row-->
