
 <div class="modal fade" id="view<?php echo $gid ?>" tabindex="-1" role="form" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> Cancel &times;</button>
                <h4 class="modal-title" id="myModalLabel"> User: <?php echo $Fname." ".$Lname ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Groups: <?php echo $numrows  ?> </h4>
				
            </div>
				<div class="modal-body">
			   
					   <table id="datatable-buttons" class="table table-striped table-bordered">
                      <thead>
                        <tr>
                          <th>Goup Name</th>
                          <th>No. of Contacts</th>
                        </tr>
                      </thead>
                      <tbody>
					  
					  	<?php
						$sql = "select * from airtime_groups where customer_id='$cid'";
						$rst = mysql_query($sql);
						while($rw=mysql_fetch_array($rst)){
							$name = $rw['name'];
							$userid = $rw['customer_id'];
							$grp = $rw['group_id'];
							$s = mysql_query("select * from airtime_contacts where group_id='$grp' and customer_id='$userid' ");
							$nmrws = mysql_num_rows($s);
					    ?>
					 <tr> <td> <?php echo $name ?> </td>
					  <td> <?php echo $nmrws ?> </td> </tr>
						<?php
						}
						?>
					  </tbody>
                      </table>
							
				</div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>

