<?php

require_once "../includes/initialize.php";
session_start();
if (!isset($_SESSION['adminname'])) {
    header("Location: index.php");
    exit;
}
if (isset($_GET['id'])) {
    $bm_emp_id = $_GET['id'];
    $topper = man_power::Activity_list($bm_emp_id);
}
require_once 'header.php';
?>
<script src="jquery-ui.js" type="text/javascript"></script>
<a href="viewStatus.php"> << Back</a>

<div class="row">
    <div class="col-lg-12">
        <div class="col-xs-12">
            <table class="table table-bordered table-stripped">
                <tr style="background: #5BC6DE">
                    <th>BM Name</th>
                    <th>Regular Clinics in which rotahaler is being changed</th>
                    <th>No. Of Rotahaler Changed</th>
                    <th>Date</th>
                </tr>
                <?php 
if (!empty($topper)) {
    foreach ($topper as $value) {
        echo '<tr>' . '<td>' . $value->BM_Name . '</td>' . '<td>' . $value->regular_clinic . '</td>' . '<td>' . $value->Rotahaler . '</td>' . '<td>' . date('d-m-Y', strtotime($value->created)) . '</td>' . '</tr>';