<?php
require ROOT . "/pages/start.php"; ?>
<style>
    #upload_file {
        display: none;
    }
</style>
<?php
require ROOT . "/pages/header.php";
$ajilid = $_GET['id'] ?? 0;
_selectNoParam(
    $st,
    $co,
    "SELECT btime_ajil.ajil, btime_user.tailbar, btime_user.user_id, year, month, btime_user.credit, teacher.fname, teacher.lname FROM `btime_user` 
                INNER JOIN btime_ajil ON btime_user.ajil_id = btime_ajil.id 
                    INNER JOIN teacher ON btime_user.user_id = teacher.id WHERE btime_user.ajil_id = '$ajilid'",
    $ajil,
    $tailbar,
    $user_id,
    $year,
    $month,
    $credit,
    $fname,
    $lname
);
?>
<div class="page-header">
    <div class="page-header-left d-flex align-items-center">
        <div class="page-header-title">
            <h5 class="m-b-10 text-danger"><?= $this_on ?> ХИЧЭЭЛИЙН ЖИЛ</h5>
        </div>
        <ul class="breadcrumb">
            <li class="breadcrumb-item"><a href="/">Эхлэл</a></li>
            <li class="breadcrumb-item">"Б" цагийн тооцоо</li>
            <li class="breadcrumb-item">Анализ</li>
        </ul>
    </div>
</div>
<div class="main-content">
    <div class="card stretch stretch-full">
        <div class="card-header">
            <h5 class="card-title">Анализ</h5>
        </div>
        <div class="card-body overflow-auto">
            <div class="row">
                <table class="table table-bordered table-hover w-100">
                    <thead>
                        <tr>
                            <th>№</th>
                            <th>Ажил үйлчилгээ</th>
                            <th>Тайлан</th>
                            <th>Хэрэглэгч</th>
                            <th>Он</th>
                            <th>Сар</th>
                            <th>КР</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        $dd = 1;
                        while (_fetch($st)) {
                        ?>
                            <tr>
                                <td><?= $dd ?></td>
                                <td><?= $ajil ?></td>
                                <td><?= $tailbar ?></td>
                                <td><?= $fname ?> <?= $lname ?></td>
                                <td><?= $year ?></td>
                                <td><?= $month ?></td>
                                <td><?= $credit ?></td>
                            </tr>
                        <?php
                            $dd++;
                        }
                        ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<?php require ROOT . "/pages/main-end.php"; ?>
<?php
require ROOT . "/pages/footer.php"; ?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>

<?php
require ROOT . "/pages/end.php";
?>