whoami7 - Manager
:
/
home
/
gracious
/
hris.graciousphils.com
/
backup hris employee
/
Upload File:
files >> /home/gracious/hris.graciousphils.com/backup hris employee/citationreporthead.php
<?php session_start(); error_reporting(0); include('includes/config.php'); if(strlen($_SESSION['emplogin'])==0) { header('location:index.php'); } else{ ?> <!DOCTYPE html> <html lang="en"> <head> <!-- Title --> <title>List of Employee</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> <meta charset="UTF-8"> <meta name="description" content="Responsive Admin Dashboard Template" /> <meta name="keywords" content="admin,dashboard" /> <meta name="author" content="Steelcoders" /> <!-- Styles --> <link rel="stylesheet" href="includes/assets/bootstrap.min.css"> <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.3/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.1/css/dataTables.bootstrap5.min.css"/> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/responsive/2.3.0/css/responsive.bootstrap5.min.css"/> </head> <?php include('includes/sidebar.php');?> <body> <div class="container-fluid" style="padding-top: 100px;"> <div class="col-md-12"> <div class="card"> <div class="card-header bg-success text-white"> <?php if (isset($_POST['addcitationam'])) { $amcitation = $_POST['amcitation']; $idid = $_POST['idid']; $sql = "UPDATE tbloffenserequest set Amcitation = :amcitation, isDoneAm = '1' where id = :idid"; $query = $dbh->prepare($sql); $query-> bindParam(':idid', $idid, PDO::PARAM_STR); $query-> bindParam(':amcitation', $amcitation, PDO::PARAM_STR); $query-> execute(); if($query->rowCount() > 0) { echo "<div class='alert alert-dismissible alert-info'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Citation</strong> added successfully. </div>"; } else { echo "<div class='alert alert-dismissible alert-danger'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Citation</strong> failed to add. </div>"; } } ?> <center><h3>Citation Report</h3></center> </div> <div class="card-body bg-dark"> <div class="row"> <div class="col-md-12"> <div class="card bg-dark border-dark"> <div class="card-header bg-dark border-dark"> </div> <div class="card-body bg-white text-dark"> <div class="row"> <div class="col-md-12"> <table id="example" class="table table-bordered nowrap Responsive" style="width:100%"> <thead class="bg-success text-white"> <tr> <th>#</th> <th>Immediate Superior</th> <th>Violation</th> <th>Suggested Sanction</th> <th>Status</th> <th>Actions</th> </tr> </thead> <tbody class="text-dark" style="font-weight: bold;"> <?php /*/ $sql = "SELECT tbloffenserequest.id, tbloffenserequest.RequestedBy, tbloffenserequest.CitationIS, tblemployees.FirstName, tblemployees.MiddleName, tblemployees.LastName, tblemployees.EmpId FROM tblemployees, tbloffenserequest WHERE tblemployees.EmpId = tbloffenserequest.RequestedBy"; /*/ $eids = $_SESSION['empid']; $yeardate = date('Y'); $poslvl = $_SESSION['poslvl']; $sql = "SELECT * FROM tbloffenserequest where HeadEmpcode = :eids and Request_Year = :yeardate"; $query= $dbh -> prepare($sql); $query-> bindParam(':eids', $eids, PDO::PARAM_STR); $query-> bindParam(':yeardate', $yeardate, PDO::PARAM_STR); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt = 1; if($query->rowCount() > 0) { foreach ($results as $result) { $is = $result->RequestedBy; $emp = $result->Empcode; ?> <tr> <td><?php echo $cnt; ?></td> <?php $sql = "SELECT * FROM tblemployees where EmpId = :is"; $query= $dbh -> prepare($sql); $query-> bindParam(':is', $is, PDO::PARAM_STR); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt = 1; if($query->rowCount() > 0) { foreach ($results as $offense) { ?> <td><?php echo htmlentities($offense->FirstName . " " . $offense->MiddleName . " " . $offense->LastName);?></td> <?php }} ?> <td><?php echo htmlentities($result->SuggestedViolation); ?></td> <td><?php echo htmlentities($result->SuggestedAction); ?></td> <?php if ($result->isDoneHR == 0) { ?> <td><span class="badge bg-danger">Pending</span></td> <?php }else{ ?> <td><span class="badge bg-success">Processed</span></td> <?php } ?> <td> <div class="btn-group" role="group" aria-label="Button group with nested dropdown"> <button type="button" class="btn btn-dark"><img src="https://img.icons8.com/color-glass/24/000000/show-property.png"/></button> <div class="btn-group" role="group"> <button id="btnGroupDrop1" type="button" class="btn btn-dark dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button> <div class="dropdown-menu" aria-labelledby="btnGroupDrop1" style=""> <a class="dropdown-item"><button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="<?php echo '#view'.$result->id ?>"> <img src="https://img.icons8.com/color-glass/24/000000/visible.png"/ style="float: left;">View </button></a> <?php if ($result->isDoneHead == 1) { ?> <?php }else{ ?> <a class="dropdown-item"><button type="button" class="btn btn-success form-control" data-bs-toggle="modal" data-bs-target="<?php echo '#addcitation'.$result->id ?>"> <img src="https://img.icons8.com/stickers/24/plus-math.png" alt="plus-math"/ style="float: left;">Add </button></a> <?php } ?> </div> </div> </div> </td> <div class="modal fade" id="<?php echo 'view' .$result->id ?>" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header bg-success text-white"> <h5 class="modal-title" id="staticBackdropLabel">Citation Details </h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body text-white"> <input type="hidden" name="idid" id="idid" value="<?php echo htmlentities($result->id);?>"> <?php $sql = "SELECT * FROM tblemployees where EmpId = :emp"; $query= $dbh -> prepare($sql); $query-> bindParam(':emp', $emp, PDO::PARAM_STR); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt = 1; if($query->rowCount() > 0) { foreach ($results as $empemps) { ?> <div class="form-group"> <fieldset> <label class="form-label mt-1" for="readOnlyInput">Employee Name</label> <input class="form-control" id="employee" name="employee" type="text" value="<?php echo htmlentities($empemps->FirstName . " " . $empemps->MiddleName . " " . $empemps->LastName);?>" readonly=""> </fieldset> </div> <?php }}?> <div class="form-group"> <fieldset> <label class="form-label mt-1" for="readOnlyInput">Immediate Superior</label> <input class="form-control" id="superior" name="superior" type="text" value="<?php echo htmlentities($offense->FirstName . " " . $offense->MiddleName . " " . $offense->LastName);?>" readonly=""> </fieldset> </div> <div class="form-group"> <label for="exampleTextarea" class="form-label mt-1">Immediate Superior Citation</label> <textarea class="form-control" id="iscitation" name="iscitation" rows="3" readonly><?php echo htmlentities($result->CitationIS) ?></textarea> </div> <div class="form-group"> <fieldset> <label for="exampleTextarea" class="form-label mt-1">Nature of the offense allegedly committed</label> <textarea class="form-control" id="violation" name="violation" rows="3" readonly><?php echo htmlentities($result->SuggestedViolation) ?></textarea> </fieldset> </div> <div class="form-group"> <fieldset> <label class="form-label mt-1" for="readOnlyInput">Suggested Sanction</label> <input class="form-control" id="action" name="action" type="text" value="<?php echo htmlentities($result->SuggestedAction) ?>" readonly=""> </fieldset> </div> <div class="form-group"> <label for="exampleTextarea" class="form-label mt-1">Employee's Explanation</label> <textarea class="form-control" id="empcitation" name="empcitation" rows="3" readonly><?php echo htmlentities($result->EmpCitation) ?></textarea> </div> <div class="form-group"> <label for="exampleTextarea" class="form-label mt-1">AM's Remarks</label> <textarea class="form-control" id="empcitation" name="empcitation" rows="3" readonly><?php echo htmlentities($result->Amcitation) ?></textarea> </div> <div class="form-group"> <label for="exampleTextarea" class="form-label mt-1">Head's Remarks</label> <textarea class="form-control" id="empcitation" name="empcitation" rows="3" readonly><?php echo htmlentities($result->Headcitation) ?></textarea> </div> <div class="form-group"> <fieldset> <label class="form-label mt-1" for="readOnlyInput">Date of Report(YYYY/MM/D)</label> <input class="form-control" id="readOnlyInput" type="text" value="<?php echo htmlentities($result->Date_Requested) ?>" readonly=""> </fieldset> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Understood</button> </div> </div> </div> </div> <div class="modal fade" id="<?php echo 'addcitation'.$result->id ?>" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <form method="POST"> <div class="modal-header bg-success text-white"> <h5 class="modal-title" id="staticBackdropLabel">Add your Citation Here</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body text-white"> <input type="hidden" name="idid" id="idid"value="<?php echo htmlentities($result->id) ?>"> <div class="form-group"> <label for="exampleTextarea" class="form-label mt-1">Your Citation</label> <textarea class="form-control" id="headcitation" name="headcitation" rows="3"><?php echo htmlentities($result->Headcitation) ?></textarea> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="submit" class="btn btn-primary" name="addcitationhead" id="addcitationhead">Add Citation</button> </div> </form> </div> </div> </div> </tr> <?php $cnt++; } } ?> </tbody> </table> </div> </div> </div> <div class="card-footer bg-dark border-dark"></div> </div> </div> </div> </div> <div class="card-footer bg-success"> </div> </div> </div> </div> <script src="https://code.jquery.com/jquery-3.5.1.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/1.12.1/js/dataTables.bootstrap5.min.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/responsive/2.3.0/js/dataTables.responsive.min.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/responsive/2.3.0/js/responsive.bootstrap5.js"></script> <script type="text/javascript"> $(document).ready(function() { var table = $('#example').DataTable( { responsive: true } ); } ); </script> </body> </html> <?php } ?>
Copyright ©2021 || Defacer Indonesia