Mini Kabibi Habibi

Current Path : C:/xampp/htdocs/cid/system/
Upload File :
Current File : C:/xampp/htdocs/cid/system/view_mqcais_reports.php

<?php
session_start();
@include 'include/config.php';

if (!isset($_SESSION['username_school'])) {
    header('Location: login.php');
    exit();
}

$username = $_SESSION['username_school'];
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>PROJ. COURSE</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="images/favicon.ico" type="image/ico" />

    <!-- CSS Dependencies -->
    <link href="../vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="../vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link href="../vendors/nprogress/nprogress.css" rel="stylesheet">
    <link href="../vendors/iCheck/skins/flat/green.css" rel="stylesheet">
    <link href="../vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet">
    <link href="../vendors/jqvmap/dist/jqvmap.min.css" rel="stylesheet"/>
    <link href="../vendors/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">
    <link href="../build/css/custom.min.css" rel="stylesheet">

    <style>
        .action-buttons {
            min-width: 180px;
            white-space: nowrap;
        }
        .action-buttons .btn {
            margin-right: 5px;
        }
    </style>
</head>

<body class="nav-md">
<div class="container body">
    <div class="main_container">
        <!-- Sidebar -->
        <div class="col-md-3 left_col">
            <div class="left_col scroll-view">
                <div class="navbar nav_title" style="border: 0;">
                    <a href="view_mqcais_reports.php" class="site_title"><i class="fa fa-spinner"></i> <span>PROJ. COURSE</span></a>
                </div>
                <div class="clearfix"></div>

                <!-- Profile Info -->
                <div class="profile clearfix">
                    <div class="profile_info">
                        <span>Welcome,</span>
                        <h2><?php echo htmlspecialchars($username); ?></h2>
                    </div>
                </div>
                <br />

                <!-- Sidebar Menu -->
                <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
                    <div class="menu_section">
                        <h3>General</h3>
                        <ul class="nav side-menu">
                            <li><a><i class=" "></i> Home <span class="fa fa-chevron-down"></span></a>
                                <ul class="nav child_menu">
                                    <li><a href="user_index.php">Dashboard</a></li>
                                </ul>
                            </li>
                            <li><a><i class="glyphicon glyphicon"></i> Daily Accomplishments <span class="fa fa-chevron-down"></span></a>
                                <ul class="nav child_menu">
                                    <li><a href="add_daily_accomplishments.php">Submit Accomplishments</a></li>
                                    <li><a href="daily_accomplishments.php">View My Accomplishments</a></li>
                                </ul>
                            </li>

                            <li><a><i class="glyphicon glyphicon"></i> Monthly Accompishment Reports <span class="fa fa-chevron-down"></span></a>
                                <ul class="nav child_menu">
                                    <li><a href="submit_monthly_report.php">Submit Monthly Accomlishment Report</a></li>
                                    <li><a href="monthly_reports.php">View Monthly Accomplishment Reports</a></li>
                                </ul>
                            </li>
                            <li><a><i class="glyphicon glyphicon"></i> MISTA Plans <span class="fa fa-chevron-down"></span></a>
                                <ul class="nav child_menu">
                                    <li><a href="create_mista_plan.php">Create MISTA Plan</a></li>
                                    <li><a href="view_mista_plans.php">View MISTA Plans</a></li>
                                    <li><a href="submit_mista_plan.php">Submit MISTA Plan</a></li>
                                    <li><a href="submitted_mista_plans.php">Submitted MISTA Plans</a></li>
                                </ul>
                            </li>
                            <li><a><i class="glyphicon glyphicon"></i> MISTA Reports <span class="fa fa-chevron-down"></span></a>
                            <ul class="nav child_menu">
                                <li><a href="create_mista_report.php">Create MISTA Report</a></li>
                                <li><a href="view_mista_reports.php">View MISTA Reports</a></li>
                                <li><a href="submit_mista_report.php">Submit MISTA Report</a></li>
                                <li><a href="submitted_mista_reports.php">Submitted MISTA Reports</a></li>
                              </ul>
                              
                          </li>
                          <li><a><i class="glyphicon glyphicon"></i> M/QCAIS Reports <span class="fa fa-chevron-down"></span></a>
                            <ul class="nav child_menu">
                                <li><a href="create_mqcais_report.php">Create M/QCAIS Report</a></li>
                                <li><a href="view_mqcais_reports.php">View M/QCAIS Reports</a></li>
                                <li><a href="submit_mqcais_report.php">Submit M/QCAIS Report</a></li>
                                <li><a href="submitted_mqcais_reports.php">Submitted M/QCAIS Reports</a></li>
                            </ul>
                          </li>

                        </ul>
                    </div>
                </div>

                <!-- Footer -->
                <div class="sidebar-footer hidden-small">
                    <a title="Settings"><span class="glyphicon glyphicon-cog"></span></a>
                    <a title="FullScreen"><span class="glyphicon glyphicon-fullscreen"></span></a>
                    <a title="Lock"><span class="glyphicon glyphicon-eye-close"></span></a>
                    <a title="Logout" href="logout.php"><span class="glyphicon glyphicon-off"></span></a>
                </div>
            </div>
        </div>
        <!-- /Sidebar -->

        <!-- Top Navigation -->
        <div class="top_nav">
            <div class="nav_menu">
                <div class="nav toggle"><a id="menu_toggle"><i class="fa fa-bars"></i></a></div>
                <nav class="nav navbar-nav">
                    <ul class="navbar-right">
                        <li class="nav-item dropdown open" style="padding-left: 15px;">
                            <a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown">
                                <?php echo htmlspecialchars($username); ?>
                            </a>
                            <div class="dropdown-menu dropdown-usermenu pull-right">
                                <a class="dropdown-item" href="../logout.php"><i class="fa fa-sign-out pull-right"></i> Log Out</a>
                            </div>
                        </li>
                    </ul>
                </nav>
            </div>
        </div>
        <!-- /Top Navigation -->

        <!-- Page Content -->
        <div class="right_col" role="main">
            <div class="clearfix"></div>
            <div class="row">
                <div class="col-md-12 col-sm-12">
                    <div class="x_panel">
                        <div class="x_title">
                            <h2>View Monthly Consolidatd and Analyzed Iinstructional Supervisory Reports</h2>
                            <div class="clearfix"></div>
                        </div>

                        <div class="x_content">
                            <div class="table-responsive">
                                <table class="table table-striped jambo_table bulk_action">
                                    <thead>
                                        <tr class="headings">
                                            <th><input type="checkbox" id="check-all" class="flat"></th>
                                            <th>Division</th>
                                            <th>Section/Unit</th>
                                            <th>District/Learning Area</th>
                                            <th>Month</th>
                                            <th>School Year</th>
                                            
                                            <th class="action-buttons">Actions</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php
                                        // Query to fetch MQCAIS reports for the logged-in user
                                        $stmt = $conn->prepare("SELECT * FROM mqcais_reports WHERE username = ?");
                                        if (!$stmt) {
                                            die("Prepare failed: " . $conn->error);
                                        }
                                        $stmt->bind_param("s", $username);
                                        $stmt->execute();
                                        $result = $stmt->get_result();

                                        while ($row = $result->fetch_assoc()) {
                                        echo "<tr class='even pointer'>
                                            <td><input type='checkbox' class='flat' name='table_records'></td>
                                            <td>" . htmlspecialchars($row['division']) . "</td>
                                            <td>" . htmlspecialchars($row['section']) . "</td>
                                            <td>" . htmlspecialchars($row['district']) . "</td>
                                            <td>" . htmlspecialchars($row['month']) . "</td>
                                            <td>" . htmlspecialchars($row['school_year']) . "</td>
                                            
                                            <td class='action-buttons'>
                                                <a href='generate_mais_word.php?report_id={$row['id']}' class='btn btn-sm btn-success' target='_blank'>
                                                    <i class='fa fa-file-pdf-o'></i> View
                                                </a>
                                                <a href='delete_mqcais_report.php?report_id={$row['id']}' class='btn btn-sm btn-danger' onclick='return confirm(\"Are you sure you want to delete this plan?\");'>
                                                    <i class='fa fa-trash'></i> Delete
                                                </a>

                                            </td>
                                        </tr>";

                                                

                                                   
                                                        
                                                
                                            
                                        }
                                        ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- /Page Content -->

        <!-- Footer -->
        <footer>
            <div class="pull-right">
                SDO BATANGAS CITY - CID PROJECT COURSE
            </div>
            <div class="clearfix"></div>
        </footer>
    </div>
</div>

<!-- JS Scripts -->
<script src="../vendors/jquery/dist/jquery.min.js"></script>
<script src="../vendors/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="../vendors/fastclick/lib/fastclick.js"></script>
<script src="../vendors/nprogress/nprogress.js"></script>
<script src="../vendors/iCheck/icheck.min.js"></script>
<script src="../build/js/custom.min.js"></script>

</body>
</html>