whoami7 - Manager
:
/
home
/
gracious
/
hris.graciousphils.com
/
backup hris employee
/
Upload File:
files >> /home/gracious/hris.graciousphils.com/backup hris employee/disciplinary.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>Disciplinary Action Report</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 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" style="padding-top: 75px;"> <div class="card"> <div class="card-header bg-info text-white"> <h4 style="font-weight: bold;"><img src="https://img.icons8.com/stickers/36/high-priority.png" alt="high-priority"/> Disciplinary Action</h4> <?php if (isset($_POST['confirm'])) { // status 4 = for am approval // status 5 = for head approval $superior = $_POST['superior']; $citation = $_POST['citation']; $emplist = $_POST['emplist']; $amsempid = $_POST['amsempid']; $headempid = $_POST['headempid']; $violationlist = $_POST['violationlist']; $year = $_POST['year']; if ($emplist == $amsempid) { $amsempid = 0; } else { $amsempid = $_POST['amsempid']; } if($amsempid != '0') { $stats = $amsempid; } else { $stats = $headempid; } $sql = "INSERT INTO tbloffenserequest (RequestedBy, CitationIS, Empcode, AMcode, HeadEmpcode, SuggestedViolation, Request_Year, Status) VALUES (:superior, :citation, :emplist, :amsempid, :headempid, :violationlist, :year, :stats)"; $query = $dbh->prepare($sql); $query-> bindParam(':superior', $superior, PDO::PARAM_STR); $query-> bindParam(':citation', $citation, PDO::PARAM_STR); $query-> bindParam(':emplist', $emplist, PDO::PARAM_STR); $query-> bindParam(':amsempid', $amsempid, PDO::PARAM_STR); $query-> bindParam(':headempid', $headempid, PDO::PARAM_STR); $query-> bindParam(':violationlist', $violationlist, PDO::PARAM_STR); $query-> bindParam(':year', $year, PDO::PARAM_STR); $query-> bindParam(':stats', $stats, 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>Request</strong> successfully added. </div>"; } else { echo "<div class='alert alert-dismissible alert-danger'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Request</strong> failed to add. </div>"; } } if (isset($_POST['confirmam'])) { $amremarks = $_POST['amremarks']; $idid = $_POST['idid']; $doneam = 1; $stats = $_POST['statusforhead']; $sql = "UPDATE tbloffenserequest set Amcitation = :amremarks, isDoneAm = :doneam, Status = :stats where id = :idid"; $query = $dbh->prepare($sql); $query-> bindParam(':idid', $idid, PDO::PARAM_STR); $query-> bindParam(':amremarks', $amremarks, PDO::PARAM_STR); $query-> bindParam(':doneam', $doneam, PDO::PARAM_STR); $query-> bindParam(':stats', $stats, PDO::PARAM_STR); $query-> execute(); if($query->rowCount() > 0) { echo "<div class='alert alert-dismissible alert-success'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Approval</strong> successfully added. </div>"; } else { echo "<div class='alert alert-dismissible alert-danger'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Approval</strong> failed to add. </div>"; } } if (isset($_POST['confirmhead'])) { $headremarks = $_POST['headremarks']; $idid = $_POST['idid']; $donehead = 1; $stats = $_POST['forstaffstatus']; $sql = "UPDATE tbloffenserequest set Headcitation = :headremarks, isDoneHead = :donehead, Status = :stats where id = :idid"; $query = $dbh->prepare($sql); $query-> bindParam(':idid', $idid, PDO::PARAM_STR); $query-> bindParam(':headremarks', $headremarks, PDO::PARAM_STR); $query-> bindParam(':donehead', $donehead, PDO::PARAM_STR); $query-> bindParam(':stats', $stats, PDO::PARAM_STR); $query-> execute(); if($query->rowCount() > 0) { echo "<div class='alert alert-dismissible alert-success'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Approval</strong> successfully added. </div>"; } else { echo "<div class='alert alert-dismissible alert-danger'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Approval</strong> failed to add. </div>"; } } if (isset($_POST['confirmstaff'])) { $idid = $_POST['idid']; $donestaff = 1; $stats = $_POST['forofficerstatus']; $staffremarks = $_POST['staffremarks']; $sql = "UPDATE tbloffenserequest set EmpCitation = :staffremarks, isDoneEmp = :donestaff, Status = :stats where id = :idid"; $query = $dbh->prepare($sql); $query-> bindParam(':idid', $idid, PDO::PARAM_STR); $query-> bindParam(':staffremarks', $staffremarks, PDO::PARAM_STR); $query-> bindParam(':donestaff', $donestaff, PDO::PARAM_STR); $query-> bindParam(':stats', $stats, PDO::PARAM_STR); $query-> execute(); if($query->rowCount() > 0) { echo "<div class='alert alert-dismissible alert-success'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Received</strong> successfully. </div>"; } else { echo "<div class='alert alert-dismissible alert-danger'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Approval</strong> failed to add. </div>"; } } if (isset($_POST['submitaction'])) { $employeebiocode = $_POST['employeebiocode']; $employeefullname = $_POST['employeefullname']; $department = $_POST['department']; $findings = $_POST['findings']; $actiondate = $_POST['action_date']; $violation = $_POST['violation']; $actionlist = $_POST['actionlist']; //expiry_date on hradmin account //file attachment on hradmin account $citationid = $_POST['citationid']; //employee comment on staff account //head comment on head account //HR comment on hr account $amcode = $_POST['ambiocode']; $headempcode = $_POST['headempcode']; $isempcode = $_POST['isempcode']; if($amcode != '0') { $stats = $amcode; } else { $stats = $headempcode; } $sql = "INSERT INTO tbloffense (Empcode, FullName, Department,Findings, Action_Date, Violation, Sanction, Citation_Id, HeadEmpcode, AMcode, OFCREmpcode, Status) VALUES (:employeebiocode, :employeefullname, :department, :findings, :actiondate, :violation, :actionlist, :citationid, :headempcode, :amcode, :isempcode, :stats)"; $query= $dbh->prepare($sql); $query->bindParam(':employeebiocode', $employeebiocode, PDO::PARAM_STR); $query->bindParam(':employeefullname', $employeefullname, PDO::PARAM_STR); $query->bindParam(':department', $department, PDO::PARAM_STR); $query->bindParam(':findings', $findings, PDO::PARAM_STR); $query->bindParam(':actiondate', $actiondate, PDO::PARAM_STR); $query->bindParam(':violation', $violation, PDO::PARAM_STR); $query->bindParam(':actionlist', $actionlist, PDO::PARAM_STR); $query->bindParam(':citationid', $citationid, PDO::PARAM_STR); $query->bindParam(':headempcode', $headempcode, PDO::PARAM_STR); $query->bindParam(':amcode', $amcode, PDO::PARAM_STR); $query->bindParam(':isempcode', $isempcode, PDO::PARAM_STR); $query->bindParam(':stats', $stats, PDO::PARAM_STR); $query->execute(); if($query->rowCount() > 0) { $forDARstatus = 6; $sql = "UPDATE tbloffenserequest set Status = :forDARstatus where id = :citationid"; $query= $dbh->prepare($sql); $query->bindParam(':forDARstatus', $forDARstatus, PDO::PARAM_STR); $query->bindParam(':citationid', $citationid, PDO::PARAM_STR); $query->execute(); if($query->rowCount() > 0) { echo "<div class='alert alert-dismissible alert-success'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Disciplinary Action</strong> posted successfully. </div>"; } else { echo "<div class='alert alert-dismissible alert-danger'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Disciplinary Action</strong> failed to post. </div>"; } } else { echo "<div class='alert alert-dismissible alert-danger'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Disciplinary Action</strong> failed to post. </div>"; } } if (isset($_POST['darconfirmhead'])) { $headremarks = $_POST['headremarks']; $stats = 'HR'; $head_isread = 1; $idid = $_POST['idid']; $sql = "UPDATE tbloffense set Head_Comment = :headremarks, Head_isRead = :head_isread, Status = :stats where id = :idid"; $query= $dbh->prepare($sql); $query->bindParam(':headremarks', $headremarks, PDO::PARAM_STR); $query->bindParam(':head_isread', $head_isread, PDO::PARAM_STR); $query->bindParam(':stats', $stats, PDO::PARAM_STR); $query->bindParam(':idid', $idid, PDO::PARAM_STR); $query->execute(); if($query->rowCount() > 0) { echo "<div class='alert alert-dismissible alert-success'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Disciplinary Action</strong> posted successfully. </div>"; } else { echo "<div class='alert alert-dismissible alert-danger'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Disciplinary Action</strong> failed to post. </div>"; } } if (isset($_POST['darconfirmam'])) { $amremarks = $_POST['amremarks']; $stats = $_POST['headid']; $am_isread = 1; $idid = $_POST['idid']; $sql = "UPDATE tbloffense set Am_Comment = :amremarks, AM_isRead = :am_isread, Status = :stats where id = :idid"; $query= $dbh->prepare($sql); $query->bindParam(':amremarks', $amremarks, PDO::PARAM_STR); $query->bindParam(':am_isread', $am_isread, PDO::PARAM_STR); $query->bindParam(':stats', $stats, PDO::PARAM_STR); $query->bindParam(':idid', $idid, PDO::PARAM_STR); $query->execute(); if($query->rowCount() > 0) { echo "<div class='alert alert-dismissible alert-success'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Disciplinary Action</strong> posted successfully. </div>"; } else { echo "<div class='alert alert-dismissible alert-danger'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Disciplinary Action</strong> failed to post. </div>"; } } if (isset($_POST['enddiscussion'])) { $idid = $_POST['idid']; $stats = $_POST['staffempcode']; $sql = "UPDATE tbloffense set Status = :stats where id = :idid"; $query= $dbh->prepare($sql); $query->bindParam(':stats', $stats, PDO::PARAM_STR); $query->bindParam(':idid', $idid, PDO::PARAM_STR); $query->execute(); if($query->rowCount() > 0) { echo "<div class='alert alert-dismissible alert-success'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Discussion</strong> successfully ended and for staff acknowledgement. </div>"; } else { echo "<div class='alert alert-dismissible alert-warning'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Discussion</strong> failed to post please check data input. </div>"; } } if (isset($_POST['darconfirmstaff'])) { $idid = $_POST['idid']; $empcomment = $_POST['empcomment']; $stats = 'Completed'; $sql = "UPDATE tbloffense set Employee_Comment = :empcomment, Status = :stats where id = :idid"; $query= $dbh->prepare($sql); $query->bindParam(':empcomment', $empcomment, PDO::PARAM_STR); $query->bindParam(':stats', $stats, PDO::PARAM_STR); $query->bindParam(':idid', $idid, PDO::PARAM_STR); $query->execute(); if($query->rowCount() > 0) { echo "<div class='alert alert-dismissible alert-success'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Disciplinary Action Report</strong> successfully acknowledge. </div>"; } else { echo "<div class='alert alert-dismissible alert-success'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Disciplinary Action Report</strong> failed to acknowledge. </div>"; } } ?> </div> <div class="card-header bg-info"> <ul class="nav nav-tabs " role="tablist"> <li class="nav-item" role="presentation" style="border-style: solid; border-width: 1px; border-color: #04CAF7; background-color: #72C9FF;"> <a class="nav-link active text-white" data-bs-toggle="tab" href="#request" aria-selected="true" role="tab" style="font-weight: bold;"><img src="https://img.icons8.com/stickers/30/ask-question.png" alt="ask-question"/> Request for NTE (Notice to Explain)</a> </li> <li class="nav-item" role="presentation" style="border-style: solid; border-width: 1px; border-color: #04CAF7; background-color: #72C9FF;"> <a class="nav-link text-white" data-bs-toggle="tab" href="#pending" aria-selected="false" role="tab" tabindex="-1" style="font-weight: bold;"><img src="https://img.icons8.com/stickers/30/writing-down.png" alt="writing-down"/> NTE Form Status</a> </li> <li class="nav-item" role="presentation" style="border-style: solid; border-width: 1px; border-color: #04CAF7; background-color: #72C9FF;"> <a class="nav-link text-white" data-bs-toggle="tab" href="#disciplinary" aria-selected="false" role="tab" tabindex="-1" style="font-weight: bold;"><img src="https://img.icons8.com/stickers/30/law.png" alt="law"/> Disciplinary Actions</a> </li> </ul> </div> <div class="card-body bg-white"> <div id="myTabContent" class="tab-content"> <div class="tab-pane fade active show" id="request" role="tabpanel"> <div class="col-md-12"> <div class="card"> <div class="card-header bg-info text-white"> Request for Notice to explain </div> <?php $eids = $_SESSION['empid']; $sql = "SELECT * FROM tbl_signatory WHERE Empid = :eids and Disciplinary = 1"; $query = $dbh -> prepare($sql); $query-> bindParam(':eids', $eids, PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { ?> <div class="card-body"> <div class="row"> <div class="col-md-6"> <div class="card"> <div class="card-body bg-light"> <form method="POST"> <div class="form-group"> <label for="exampleSelect1" class="form-label text-black">Employee List</label> <select class="form-select" id="emplist" name="emplist" required> <option selected>Choose Here</option> <?php $emps = $_SESSION['empid']; $sql = "SELECT * FROM tblemployees where Superior = :emps and Status = 1"; $query= $dbh -> prepare($sql); $query-> bindParam(':emps', $emps, PDO::PARAM_STR); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $employee) { ?> <option value="<?php echo htmlentities($employee->EmpId)?>"><?php echo htmlentities($employee->FirstName . " " . $employee->MiddleName . " " . $employee->LastName);?></option> <?php } } ?> </select> </div> <input type="hidden" name="superior" id="superior" value="<?php echo htmlentities($employee->Superior) ?>"> <!-- IS EMPID --> <div class="form-group"> <label for="exampleTextarea" class="form-label mt-1 text-black">Details/Facts of the incident</label> <textarea class="form-control" id="citation" name="citation" rows="3" placeholder="State briefly what, where, when, why, and how the incident happend." required></textarea> </div> <div class="form-group"> <label for="exampleSelect1" class="form-label mt-1 text-black">Nature of the Offense Allegedly Committed</label> <select class="form-select" id="violationlist" name="violationlist" required> <option selected>Choose Here</option> <?php $sql = "SELECT * FROM tbloffenselist where Status = 1"; $query= $dbh -> prepare($sql); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $action) { ?> <option value="<?php echo htmlentities($action->OffenseList)?>"><?php echo htmlentities($action->OffenseList)?></option> <?php } } ?> </select> </div> <?php $date = date('Y'); ?> <input type="hidden" name="year" id="year" value="<?php echo $date; ?>"> <?php $comp = $_SESSION['ecomp']; $sql = "SELECT * FROM tblcompany where CompanyName = :comp"; $query= $dbh -> prepare($sql); $query-> bindParam(':comp', $comp, PDO::PARAM_STR); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $company) { $compcode = $company->StCode; } } $dept = $_SESSION['dept']; $sql = "SELECT * FROM tbldepartments where StCode = :compcode and DepartmentName = :dept"; $query= $dbh -> prepare($sql); $query-> bindParam(':compcode', $compcode, PDO::PARAM_STR); $query-> bindParam(':dept', $dept, PDO::PARAM_STR); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $department) { ?> <input type="hidden" name="headempid" id="headempid" value="<?php echo htmlentities($department->Head_Control) ?>"> <?php } } $areanow = $_SESSION['area']; $sql = "SELECT * FROM tblareacomp where StCode = :compcode and DistrictName = :areanow"; $query= $dbh -> prepare($sql); $query-> bindParam(':compcode', $compcode, PDO::PARAM_STR); $query-> bindParam(':areanow', $areanow, PDO::PARAM_STR); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $ams) { ?> <input type="hidden" name="amsempid" id="amsempid" value="<?php echo htmlentities($ams->Manager_Control)?>"> <?php } } ?> <div class="col-md-12"> <button type="submit" class="btn btn-info form-control mt-2" name="confirm" id="confirm">Confirm</button> </div> </form> </div> </div> </div> <div class="col-md-6"> <div class="card"> <div class="card-body bg-light"> <div class="row"> <div class="col-md-6"> <div class="card"> <div class="card-header bg-info text-white"> 1.1 - 1.16 Violation of Work Schedule </div> <div class="card-footer bg-info"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="#guide1"> View Guide </button> </div> <!-- modal 1 --> <div class="modal fade" id="guide1" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="staticBackdropLabel">Violation of work Schedule</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light"> <img src="codeofconduct/workschedule.jpg" class="img-thumbnail" style="height:300%; width:300%; "> </div> <div class="modal-footer bg-light"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- end of modal 1 --> </div> </div> <div class="col-md-6"> <div class="card"> <div class="card-header bg-info text-white"> 2.1 - 2.12 Violation of Excellence & Efficiency Standards </div> <div class="card-footer bg-info"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="#guide2"> View Guide </button> </div> <!-- modal 1 --> <div class="modal fade" id="guide2" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="staticBackdropLabel">Violation of Excellence & Efficiency Standards</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light"> <img src="codeofconduct/excellencestandards.jpg" class="img-thumbnail" style="height:300%; width:300%; "> </div> <div class="modal-footer bg-light"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- end of modal 1 --> </div> </div> <div class="col-md-6 mt-2"> <div class="card"> <div class="card-header bg-info text-white"> 3.1 - 3.6 Acts of Negligence or Carelessness </div> <div class="card-footer bg-info"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="#guide3"> View Guide </button> </div> <!-- modal 1 --> <div class="modal fade" id="guide3" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="staticBackdropLabel">Acts of Negligence or Carelessness</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light"> <img src="codeofconduct/negligence.jpg" class="img-thumbnail" style="height:300%; width:300%; "> </div> <div class="modal-footer bg-light"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- end of modal 1 --> </div> </div> <div class="col-md-6 mt-2"> <div class="card"> <div class="card-header bg-info text-white"> 4.1 - 4.8 Violation Against Company Property </div> <div class="card-footer bg-info"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="#guide4"> View Guide </button> </div> <!-- modal 1 --> <div class="modal fade" id="guide4" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="staticBackdropLabel">Violation Against Company Property</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light"> <img src="codeofconduct/companyproperty.jpg" class="img-thumbnail" style="height:300%; width:300%; "> </div> <div class="modal-footer bg-light"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- end of modal 1 --> </div> </div> <div class="col-md-6 mt-2"> <div class="card"> <div class="card-header bg-info text-white"> 5.1 - 5.21 Acts of Dishonesty </div> <div class="card-footer bg-info"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="#guide5"> View Guide </button> </div> <!-- modal 1 --> <div class="modal fade" id="guide5" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="staticBackdropLabel">Acts of Dishonesty</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light"> <img src="codeofconduct/dishonesty.jpg" class="img-thumbnail" style="height:300%; width:300%; "> </div> <div class="modal-footer bg-light"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- end of modal 1 --> </div> </div> <div class="col-md-6 mt-2"> <div class="card"> <div class="card-header bg-info text-white"> 6.1 - 6.3 Acts of Disobedience </div> <div class="card-footer bg-info"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="#guide6"> View Guide </button> </div> <!-- modal 1 --> <div class="modal fade" id="guide6" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="staticBackdropLabel">Acts of Disobedience</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light"> <img src="codeofconduct/disobedience.jpg" class="img-thumbnail" style="height:300%; width:300%; "> </div> <div class="modal-footer bg-light"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- end of modal 1 --> </div> </div> <div class="col-md-6 mt-2"> <div class="card"> <div class="card-header bg-info text-white"> 7.1 - 7.21 Acts of Misconduct </div> <div class="card-footer bg-info"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="#guide7"> View Guide </button> </div> <!-- modal 1 --> <div class="modal fade" id="guide7" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="staticBackdropLabel">Acts of Acts of Misconduct</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light"> <img src="codeofconduct/misconduct.jpg" class="img-thumbnail" style="height:300%; width:300%; "> </div> <div class="modal-footer bg-light"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- end of modal 1 --> </div> </div> <div class="col-md-6 mt-2"> <div class="card"> <div class="card-header bg-info text-white"> 8.1 - 8.8 Violation Against Health, Safety & Security </div> <div class="card-footer bg-info"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="#guide8"> View Guide </button> </div> <!-- modal 1 --> <div class="modal fade" id="guide8" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="staticBackdropLabel">Violation Against Health, Safety & Security</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light"> <img src="codeofconduct/safetyandsecurity.jpg" class="img-thumbnail" style="height:300%; width:300%; "> </div> <div class="modal-footer bg-light"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- end of modal 1 --> </div> </div> </div> </div> </div> </div> </div> </div> <?php }else{?> <div class="card-body"> <center><h5>You don't have authorization to complete this section.</h5></center> </div> <?php }?> </div> </div> </div> <div class="tab-pane fade" id="pending" role="tabpanel"> <div class="col-md-12"> <div class="card"> <div class="card-header bg-info"> <ul class="nav nav-pills card-header-pills" role="tablist"> <li class="nav-item text-white"> <?php $eids = $_SESSION['empid']; $sql = "SELECT * FROM tbloffenserequest where Status = :eids and RequestedBy = :eids"; $query = $dbh->prepare($sql); $query->bindParam(':eids',$eids,PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $immediatesupperioroffense=$query->rowCount(); ?> <button type="button" class="nav-link show active text-white" data-bs-toggle="tab" data-bs-target="#immediatesuperior" role="tab"><img src="https://img.icons8.com/stickers/36/manager.png" alt="manager"/> <?php echo 'Immediate Superior' . " " . "<span class='badge bg-primary rounded-pill'>$immediatesupperioroffense</span>";?></button> </li> <li class="nav-item text-white"> <?php $eids = $_SESSION['empid']; $sql = "SELECT * FROM tbloffenserequest where Status = :eids and AMcode = :eids and isDoneAm = 0"; $query = $dbh->prepare($sql); $query->bindParam(':eids',$eids,PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $areamanageroffense=$query->rowCount(); ?> <button type="button" class="nav-link text-white" data-bs-toggle="tab" data-bs-target="#areamanager" role="tab"><img src="https://img.icons8.com/stickers/36/businesswoman--v2.png" alt="businesswoman--v2"/> <?php echo 'Area Manager' . " " . "<span class='badge bg-primary rounded-pill'>$areamanageroffense</span>";?></button> </li> <li class="nav-item text-white"> <?php $eids = $_SESSION['empid']; $sql = "SELECT * FROM tbloffenserequest where Status = :eids and HeadEmpcode = :eids and isDoneHead = 0"; $query = $dbh->prepare($sql); $query->bindParam(':eids',$eids,PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $headoffense=$query->rowCount(); ?> <button type="button" class="nav-link text-white" data-bs-toggle="tab" data-bs-target="#head" role="tab"><img src="https://img.icons8.com/stickers/36/businessman-skin-type-3.png" alt="businessman-skin-type-3"/> <?php echo 'Head' . " " . "<span class='badge bg-primary rounded-pill'>$headoffense</span>";?></button> </li> <li class="nav-item text-white"> <?php $eids = $_SESSION['empid']; $sql = "SELECT * FROM tbloffenserequest where Status = :eids and Empcode = :eids and isDoneEmp = 0"; $query = $dbh->prepare($sql); $query->bindParam(':eids',$eids,PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $employeeoffense=$query->rowCount(); ?> <button type="button" class="nav-link text-white" data-bs-toggle="tab" data-bs-target="#staffviewing" role="tab"><img src="https://img.icons8.com/stickers/36/administrator-female.png" alt="administrator-female"/> <?php echo 'Employee' . " " . "<span class='badge bg-primary rounded-pill'>$employeeoffense</span>";?></button> </li> </ul> </div> <div class="card-body"> <div class="tab-content p-0"> <div class="tab-pane fade show active" id="immediatesuperior" role="tabpanel"> <div class="col-md-12"> <div class="row"> <?php $eids = $_SESSION['empid']; $sql = "SELECT tbloffenserequest.id, tbloffenserequest.RequestedBy, tbloffenserequest.CitationIS, tbloffenserequest.Empcode, tbloffenserequest.AMcode, tbloffenserequest.HeadEmpcode, tbloffenserequest.EmpCitation, tbloffenserequest.Amcitation, tbloffenserequest.Headcitation, tbloffenserequest.SuggestedViolation, tbloffenserequest.isDoneAm, tbloffenserequest.isDoneHead, tbloffenserequest.Date_Requested, tbloffenserequest.Request_Year, tbloffenserequest.Status, tblemployees.EmpId, tblemployees.FirstName, tblemployees.LastName, tblemployees.MiddleName, tblemployees.PostImage, tblemployees.My_Signature, tblemployees.Company, tblemployees.Company_Area, tblemployees.Department, tblemployees.Position, tblemployees.Position_Level, tblemployees.Superior, tblemployees.NickName FROM tblemployees, tbloffenserequest WHERE tbloffenserequest.RequestedBy = :eids and tbloffenserequest.Empcode = tblemployees.EmpId and tbloffenserequest.Status = :eids and tbloffenserequest.isDoneHead = 1 and tbloffenserequest.isDoneEmp = 1"; $query= $dbh->prepare($sql); $query-> bindParam(':eids', $eids, PDO::PARAM_STR); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $result) { ?> <div class="col-md-4 mt-2"> <div class="accordion bg-transparent" id="accordionExample"> <div class="accordion-item "> <h2 class="accordion-header" id="headingOne"> <button class="accordion-button collapsed bg-info text-white" type="button" data-bs-toggle="collapse" data-bs-target="<?php echo '#employee' . $result->id; ?>" aria-expanded="false" aria-controls="collapseOne"> <img src="https://img.icons8.com/stickers/36/employee-card--v2.png" alt="employee-card--v2"/ style="float:left;"> <center style="font-weight: bold; font-size: 20px;"><?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName . " " . substr($result->MiddleName, 0, 1) . ".")); ?></center> </button> </h2> <div id="<?php echo 'employee' . $result->id; ?>" class="accordion-collapse collapse bg-light" aria-labelledby="headingOne" data-bs-parent="#accordionExample" style=""> <div class="accordion-body bg-light"> <ul class="list-group"> <li class="list-group-item list-group-item-info align-items-center"> <center>Notice To Explain for <?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName . " " . substr($result->MiddleName, 0, 1) . ".")); ?></center> </li> <li class="list-group-item list-group-item-primary align-items-center"> <label for="exampleTextarea" class="form-label mt-1 text-black">Date of Request</label> <input type="text" name="requestdate" id="requestdate" class="form-control" value="<?php echo htmlentities($result->Date_Requested); ?>"> </li> <li class="list-group-item list-group-item-primary align-items-center"> <label for="exampleTextarea" class="form-label mt-1 text-black">Details/Facts of the incident</label> <textarea class="form-control" id="citation" name="citation" rows="3" readonly><?php echo htmlentities($result->CitationIS) ?></textarea> </li> <li class="list-group-item list-group-item-primary align-items-center"> <label for="exampleSelect1" class="form-label mt-1 text-black">Nature of the Offense Allegedly Committed</label> <textarea class="form-control" id="offense" name="offense" rows="3" readonly><?php echo htmlentities($result->SuggestedViolation) ?></textarea> </li> <li class="list-group-item list-group-item-primary align-items-center"> <?php $is = $result->RequestedBy; $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); if($query->rowCount() > 0) { foreach ($results as $supervision) { ?> <center> <input type="hidden" name="immediate" id="immediate" value="<?php echo $supervision->LastName . ", " . $supervision->FirstName ; ?>"> <img src="image/<?php echo $supervision->PostImage ?>" class="img-thumbnail" style="width: 20%; height: 20%; float: left;"><center>Requested by:<br><?php echo utf8_encode(htmlentities($supervision->LastName . ", " . $supervision->FirstName . " " . substr($supervision->MiddleName, 0, 1) . ".")); ?><br><?php echo htmlentities($supervision->Position) ?></center> <?php } } ?> </center> </li> <li class="list-group-item list-group-item-primary align-items-center"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="<?php echo '#superiormodal' . $result->id ?>"> View NTE Details </button> </li> <li class="list-group-item list-group-item-primary align-items-center"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="<?php echo '#disciplinarymodal' . $result->id ?>"> Proceed to Disciplinary Action </button> </li> <div class="modal fade" id="<?php echo 'superiormodal' . $result->id; ?>" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <form method="POST"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="exampleModalLabel1">Notice to Explain</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light text-black"> <div class="row"> <div class="col-md-12"> <center><h5>Citation Report</h5></center> </div> <div class="col-md-5"> <label for="exampleSelect1" class="form-label text-black">Employee Name</label> <input type="text" name="empname" id="empname" class="form-control" value="<?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName . " " . substr($result->MiddleName, 0, 1) . ".")); ?>" readonly> </div> <div class="col-md-2"> <label for="exampleSelect1" class="form-label text-black">Date</label> <input type="text" name="citationdate" id="citationdate" class="form-control" value="<?php echo htmlentities($result->Date_Requested); ?>" readonly> </div> <div class="col-md-5"> <label for="exampleSelect1" class="form-label text-black">Department</label> <input type="text" name="department" id="department" class="form-control" value="<?php echo htmlentities($result->Department); ?>" readonly> </div> <div class="col-md-12 mt-2"> <center><h5>Nature of the offense allegedly committed</h5></center> <div class="form-group"> <select class="form-select" id="violation" name="violation"> <option value="<?php echo htmlentities($result->SuggestedViolation); ?>" disabled><?php echo htmlentities($result->SuggestedViolation); ?></option> <?php $vio = $result->SuggestedViolation; $sql = "SELECT * FROM tbloffenselist"; $query= $dbh->prepare($sql); $query->bindParam(':olist', $olist, PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $offenseoffense) { ?> <option value="<?php echo htmlentities($offenseoffense->OffenseList) ?>"><?php echo htmlentities($offenseoffense->OffenseList) ?></option> <?php } } ?> </select> </div> </div> <div class="col-md-12 mt-2"> <center><h5>It has been observed/reported that you allegedly committed an infraction of our Code of Conduct and Discipline with the following. </h5></center> <label for="exampleSelect1" class="form-label text-black">Details/Facts of the incident</label> <textarea class="form-control" id="explations" name="explations" rows="3" readonly><?php echo htmlentities($result->CitationIS) ?></textarea> </div> <div class="col-md-12 mt-1"> <label class="form-label">Area Manager/Supervisor Remarks</label> <input type="text" name="amremarks" id="amremarks" class="form-control" readonly value="<?php echo htmlentities($result->Amcitation) ?>"> <label class="form-label">Head Remarks</label> <input type="text" name="headremarks" id="headremarks" class="form-control" readonly value="<?php echo htmlentities($result->Headcitation) ?>"> </div> <div class="col-md-4 mt-2"> <?php $is = $result->RequestedBy; $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); if($query->rowCount() > 0) { foreach ($results as $issignature) { ?> <img src="signatureupload/<?php echo $issignature->My_Signature ?>" class="img-thumbnail"> <center><h6><?php echo utf8_encode(htmlentities($issignature->LastName . ", " . $issignature->FirstName . " " . substr($issignature->MiddleName, 0, 1) . ".")); ?></h6></center> <center><h6>Immediate Superior</h6></center> <?php }}?> </div> <?php if ($result->isDoneAm != 1) { ?> <div class="col-md-4 mt-2"> </div> <?php }else{ ?> <div class="col-md-4 mt-2"> <?php if ($result->AMcode == $result->Empcode) { }else{ ?> <?php $am = $result->AMcode; $sql = "SELECT * FROM tblemployees WHERE EmpId = :am"; $query= $dbh->prepare($sql); $query->bindParam(':am', $am, PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $amsignature) { ?> <img src="signatureupload/<?php echo $amsignature->My_Signature ?>" class="img-thumbnail"> <center><h6><?php echo utf8_encode(htmlentities($amsignature->LastName . ", " . $amsignature->FirstName . " " . substr($amsignature->MiddleName, 0, 1) . ".")); ?></h6></center> <center><h6>Area Manager</h6></center> <?php }}?> <?php } ?> </div> <?php } ?> <div class="col-md-4 mt-2"> <?php $head = $result->HeadEmpcode; $sql = "SELECT * FROM tblemployees WHERE EmpId = :head"; $query= $dbh->prepare($sql); $query->bindParam(':head', $head, PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $headsignature) { ?> <img src="signatureupload/<?php echo $headsignature->My_Signature ?>" class="img-thumbnail"> <center><h6><?php echo utf8_encode(htmlentities($headsignature->LastName . ", " . $headsignature->FirstName . " " . substr($headsignature->MiddleName, 0, 1) . ".")); ?></h6></center> <center><h6>Head</h6></center> <?php }}?> </div> <div class="col-md-12 mt-2"> <center><h5><p>You are hereby required to explain in writing the charge(s) against you within five (5) calendar days upon receipt of this Citation Report. Your refusal or neglect to accomplish it within the prescribed time shall mean a waiver of your right to be heard and challenge the accusation(s) being charged against you.</p></h5></center> <center><label for="exampleTextarea" class="form-label text-black">Employee's Explanation</label></center> <textarea class="form-control" id="staffremarks" name="staffremarks" rows="3" readonly><?php echo htmlentities($result->EmpCitation); ?></textarea> </div> <div class="col-md-4 mt-2"> <center><h6>Received and Acknowledged by:</h6></center> <center> <img src="signatureupload/<?php echo $result->My_Signature ?>" class="img-thumbnail" style="width: 60%; height: 60%;"> <h6><?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName . " " . substr($result->MiddleName, 0, 1) . ".")); ?></h6> </center> </div> <!-- <div class="col-md-8"> <div class="form-group"> <label for="exampleSelect1" class="form-label mt-1 text-black">Suggested Action</label> <select class="form-select" id="actionlist" name="actionlist"> <option selected>Choose Here</option> <option value="WR">WR - Written Reprimand</option> <option value="S">S - Suspension</option> <option value="D">D - Dismissal</option> <option value="TBD">TBD - To be determined</option> </select> </div> </div> --> </div> </div> <div class="modal-footer bg-info"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> </div> </form> </div> </div> </div> <div class="modal fade" id="<?php echo 'disciplinarymodal' . $result->id; ?>" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <form method="POST"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="exampleModalLabel1">Disciplinary Action Report</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light text-black"> <div class="row"> <input type="hidden" name="action_date" id="action_date" value="<?php echo $result->Date_Requested; ?>"> <input type="hidden" name="citationid" id="citationid" value="<?php echo $result->id; ?>"> <input type="hidden" name="employeebiocode" id="employeebiocode" value="<?php echo $result->Empcode; ?>"> <input type="hidden" name="ambiocode" id="ambiocode" value="<?php echo $result->AMcode; ?>"> <input type="hidden" name="headempcode" id="headempcode" value="<?php echo $result->HeadEmpcode; ?>"> <input type="hidden" name="isempcode" id="isempcode" value="<?php echo $result->RequestedBy; ?>"> <?php if ($result->MiddleName == 'N/A') { ?> <input type="hidden" name="employeefullname" id="employeefullname" value="<?php echo $result->FirstName . " " . $result->LastName; ?>"> <?php }else{ ?> <input type="hidden" name="employeefullname" id="employeefullname" value="<?php echo $result->FirstName . " " . $result->MiddleName . " " . $result->LastName; ?>"> <?php } ?> <input type="hidden" name="department" id="department" value="<?php echo $result->Department; ?>"> <div class="col-md-12"> <center><h5>Nature of the offense allegedly committed</h5></center> <div class="form-group"> <select class="form-select" id="violation" name="violation"> <option value="<?php echo htmlentities($result->SuggestedViolation); ?>"><?php echo htmlentities($result->SuggestedViolation); ?></option> <?php $olist = $result->SuggestedViolation; $sql = "SELECT * FROM tbloffenselist"; $query= $dbh->prepare($sql); $query->bindParam(':olist', $olist, PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $offenseoffense) { ?> <option value="<?php echo htmlentities($offenseoffense->OffenseList) ?>"><?php echo htmlentities($offenseoffense->OffenseList) ?></option> <?php } } ?> </select> </div> </div> <div class="col-md-12"> <label for="exampleTextarea" class="form-label mt-1 text-black">Findings</label> <textarea class="form-control" id="findings" name="findings" rows="3" required></textarea> </div> <div class="col-md-12 mt-1"> <center><h5>Offense Committed</h5></center> <div class="accordion bg-transparent" id="immediatesuperioraccordion"> <div class="accordion-item"> <h2 class="accordion-header" id="headingOne"> <button class="accordion-button collapsed bg-info text-white" type="button" data-bs-toggle="collapse" data-bs-target="<?php echo '#issanction' . $result->id; ?>" aria-expanded="true" aria-controls="collapseOne"> Sanction List </button> </h2> <div id="<?php echo 'issanction' . $result->id; ?>" class="accordion-collapse collapse bg-light" aria-labelledby="headingOne" data-bs-parent="#immediatesuperioraccordion"> <div class="accordion-body bg-light"> <div class="row"> <?php $olist = $result->SuggestedViolation; $empcodes = $result->Empcode; $citationid = $result->id; $sql = "SELECT * FROM tbloffense where Empcode = :empcodes and Violation = :olist and Action_Date <= Expiry_Date"; //$sql = "SELECT * FROM tbloffense, tbloffenserequest where Empcode = :empcodes and Violation = SuggestedViolation LIMIT 5"; $query= $dbh->prepare($sql); $query->bindParam(':olist', $olist, PDO::PARAM_STR); $query->bindParam(':empcodes', $empcodes, PDO::PARAM_STR); //$query->bindParam(':citationid', $citationid, PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $shitshit=$query->rowCount(); if($query->rowCount() > 0) { foreach ($results as $hit) { ?> <div class="col-md-4"> <div class="card"> <ul class="list-group"> <li class="list-group-item d-flex justify-content-between align-items-center bg-warning text-black"> <?php echo htmlentities($hit->FullName); ?> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> <?php echo htmlentities($hit->Violation); ?> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> <?php echo htmlentities($hit->Sanction); ?> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> Date <span class="badge bg-info rounded-pill"><?php echo htmlentities($hit->Action_Date); ?></span> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> Reset <span class="badge bg-info rounded-pill"><?php echo htmlentities($hit->Expiry_Date); ?></span> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> Count <span class="badge bg-info rounded-pill"><?php echo $cnt; ?></span> </li> </ul> </div> </div> <?php $cnt++; } }else{ echo 'No Offense Committed during the period'; } ?> </div> </div> </div> </div> </div> </div> <div class="col-md-12"> <div class="form-group"> <label for="exampleSelect1" class="form-label mt-1 text-black">Disciplinary Sanction</label> <select class="form-select" id="actionlist" name="actionlist"> <option selected>Choose Here</option> <option value="Written Reprimand">Written Reprimand</option> <option value="1 Day Suspension">1 Day Suspension</option> <option value="3 Days Suspension">3 Days Suspension</option> <option value="7 Days Suspension">7 Days Suspension</option> <option value="Dismissal">Dismissal</option> <option value="To be determined">To be determined</option> </select> </div> </div> </div> </div> <div class="modal-footer bg-info"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="submit" class="btn bg-dark text-white" name="submitaction" id="submitaction">Submit Disciplinary Action</button> </div> </form> </div> </div> </div> <!-- Disciplinary modal --> </ul> </div> </div> </div> </div> </div> <?php }} else{ echo "<center>There are no pending citation to approve</center>"; } ?> </div> </div> </div> <div class="tab-pane fade" id="areamanager" role="tabpanel"> <div class="col-md-12"> <div class="row"> <?php $eids = $_SESSION['empid']; $sql = "SELECT tbloffenserequest.id, tbloffenserequest.RequestedBy, tbloffenserequest.CitationIS, tbloffenserequest.Empcode, tbloffenserequest.AMcode, tbloffenserequest.HeadEmpcode, tbloffenserequest.EmpCitation, tbloffenserequest.AmCitation, tbloffenserequest.HeadCitation, tbloffenserequest.SuggestedViolation, tbloffenserequest.isDoneAm, tbloffenserequest.isDoneHead, tbloffenserequest.Date_Requested, tbloffenserequest.Request_Year, tbloffenserequest.Status, tblemployees.EmpId, tblemployees.FirstName, tblemployees.LastName, tblemployees.MiddleName, tblemployees.PostImage, tblemployees.My_Signature, tblemployees.Company, tblemployees.Company_Area, tblemployees.Department, tblemployees.Position, tblemployees.Position_Level, tblemployees.Superior, tblemployees.NickName FROM tblemployees, tbloffenserequest WHERE tbloffenserequest.AMcode = :eids and tbloffenserequest.Empcode = tblemployees.EmpId and tbloffenserequest.Status = :eids and tbloffenserequest.isDoneHead = 0"; $query= $dbh->prepare($sql); $query-> bindParam(':eids', $eids, PDO::PARAM_STR); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $result) { ?> <div class="col-md-4 mt-2"> <div class="accordion bg-transparent" id="accordionExample"> <div class="accordion-item "> <h2 class="accordion-header" id="headingOne"> <button class="accordion-button collapsed bg-info text-white" type="button" data-bs-toggle="collapse" data-bs-target="<?php echo '#employee' . $result->id; ?>" aria-expanded="false" aria-controls="collapseOne"> <img src="https://img.icons8.com/stickers/36/employee-card--v2.png" alt="employee-card--v2"/ style="float:left;"> <center style="font-weight: bold; font-size: 20px;"><?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName . " " . substr($result->MiddleName, 0, 1) . ".")); ?></center> </button> </h2> <div id="<?php echo 'employee' . $result->id; ?>" class="accordion-collapse collapse bg-light" aria-labelledby="headingOne" data-bs-parent="#accordionExample" style=""> <div class="accordion-body bg-light"> <ul class="list-group"> <li class="list-group-item list-group-item-info align-items-center"> <center>Request of NTE for <?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName . " " . substr($result->MiddleName, 0, 1) . ".")); ?></center> </li> <li class="list-group-item list-group-item-primary align-items-center"> <label for="exampleTextarea" class="form-label mt-1 text-black">Date of Request</label> <input type="text" name="requestdate" id="requestdate" class="form-control" value="<?php echo htmlentities($result->Date_Requested); ?>" readonly> </li> <li class="list-group-item list-group-item-primary align-items-center"> <label for="exampleTextarea" class="form-label mt-1 text-black">Details/Facts of the incident</label> <textarea class="form-control" id="citation" name="citation" rows="3" readonly><?php echo htmlentities($result->CitationIS) ?></textarea> </li> <li class="list-group-item list-group-item-primary align-items-center"> <label for="exampleSelect1" class="form-label mt-1 text-black">Nature of the Offense Allegedly Committed</label> <textarea class="form-control" id="offense" name="offense" rows="3" readonly><?php echo htmlentities($result->SuggestedViolation) ?></textarea> </li> <li class="list-group-item list-group-item-primary align-items-center"> <?php $is = $result->RequestedBy; $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); if($query->rowCount() > 0) { foreach ($results as $supervision) { ?> <center> <input type="hidden" name="immediate" id="immediate" value="<?php echo $supervision->LastName . ", " . $supervision->FirstName ; ?>"> <img src="image/<?php echo $supervision->PostImage ?>" class="img-thumbnail" style="width: 20%; height: 20%; float: left;"><center>Requested by:<br><?php echo utf8_encode(htmlentities($supervision->LastName . ", " . $supervision->FirstName . " " . substr($supervision->MiddleName, 0, 1) . ".")); ?><br><?php echo htmlentities($supervision->Position) ?></center> <?php } } ?> </center> </li> <li class="list-group-item list-group-item-primary align-items-center"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="<?php echo '#ammodal' . $result->id ?>"> Add Signature and Remarks </button> </li> <div class="modal fade" id="<?php echo 'ammodal' . $result->id; ?>" tabindex="-1" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <form method="POST"> <input type="hidden" name="statusforhead" id="statusforhead" value="<?php echo $result->HeadEmpcode; ?>"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="exampleModalLabel1">Add details</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light text-black"> <input type="hidden" name="idid" id="idid" value="<?php echo $result->id; ?>"> <label for="exampleTextarea" class="form-label text-black">Add Remarks</label> <input type="text" name="amremarks" id="amremarks" class="form-control"> </div> <div class="modal-footer bg-info"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="submit" class="btn btn-dark" name="confirmam" id="confirmam">Confirm Changes</button> </div> </form> </div> </div> </div> </ul> </div> </div> </div> </div> </div> <?php }}else{ echo "<center>There are no pending citation to approve</center>"; }?> </div> </div> </div> <div class="tab-pane fade" id="head" role="tabpanel"> <div class="col-md-12"> <div class="row"> <?php $eids = $_SESSION['empid']; $sql = "SELECT tbloffenserequest.id, tbloffenserequest.RequestedBy, tbloffenserequest.CitationIS, tbloffenserequest.Empcode, tbloffenserequest.AMcode, tbloffenserequest.HeadEmpcode, tbloffenserequest.EmpCitation, tbloffenserequest.AmCitation, tbloffenserequest.HeadCitation, tbloffenserequest.SuggestedViolation, tbloffenserequest.isDoneAm, tbloffenserequest.isDoneHead, tbloffenserequest.Date_Requested, tbloffenserequest.Request_Year, tbloffenserequest.Status, tblemployees.EmpId, tblemployees.FirstName, tblemployees.LastName, tblemployees.MiddleName, tblemployees.PostImage, tblemployees.My_Signature, tblemployees.Company, tblemployees.Company_Area, tblemployees.Department, tblemployees.Position, tblemployees.Position_Level, tblemployees.Superior, tblemployees.NickName FROM tblemployees, tbloffenserequest WHERE tbloffenserequest.HeadEmpcode = :eids and tbloffenserequest.Empcode = tblemployees.EmpId and tbloffenserequest.Status = :eids and tbloffenserequest.isDoneHead = 0"; $query= $dbh->prepare($sql); $query-> bindParam(':eids', $eids, PDO::PARAM_STR); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $result) { ?> <div class="col-md-4 mt-2"> <div class="accordion bg-transparent" id="accordionExample"> <div class="accordion-item "> <h2 class="accordion-header" id="headingOne"> <button class="accordion-button collapsed bg-info text-white" type="button" data-bs-toggle="collapse" data-bs-target="<?php echo '#employee' . $result->id; ?>" aria-expanded="false" aria-controls="collapseOne"> <img src="https://img.icons8.com/stickers/36/employee-card--v2.png" alt="employee-card--v2"/ style="float:left;"> <center style="font-weight: bold; font-size: 20px;"><?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName . " " . substr($result->MiddleName, 0, 1) . ".")); ?></center> </button> </h2> <div id="<?php echo 'employee' . $result->id; ?>" class="accordion-collapse collapse bg-light" aria-labelledby="headingOne" data-bs-parent="#accordionExample" style=""> <div class="accordion-body bg-light"> <ul class="list-group"> <li class="list-group-item list-group-item-info align-items-center"> <center>Request of NTE for <?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName . " " . substr($result->MiddleName, 0, 1) . ".")); ?></center> </li> <li class="list-group-item list-group-item-primary align-items-center"> <label for="exampleTextarea" class="form-label mt-1 text-black">Date of Request</label> <input type="text" name="requestdate" id="requestdate" class="form-control" value="<?php echo htmlentities($result->Date_Requested); ?>" readonly> </li> <li class="list-group-item list-group-item-primary align-items-center"> <label for="exampleTextarea" class="form-label mt-1 text-black">Details/Facts of the incident</label> <textarea class="form-control" id="citation" name="citation" rows="3" readonly><?php echo htmlentities($result->CitationIS) ?></textarea> </li> <li class="list-group-item list-group-item-primary align-items-center"> <label for="exampleSelect1" class="form-label mt-1 text-black">Nature of the Offense Allegedly Committed</label> <textarea class="form-control" id="offense" name="offense" rows="3" readonly><?php echo htmlentities($result->SuggestedViolation) ?></textarea> </li> <li class="list-group-item list-group-item-primary align-items-center"> <?php $is = $result->RequestedBy; $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); if($query->rowCount() > 0) { foreach ($results as $supervision) { ?> <center> <input type="hidden" name="immediate" id="immediate" value="<?php echo $supervision->LastName . ", " . $supervision->FirstName ; ?>"> <img src="image/<?php echo $supervision->PostImage ?>" class="img-thumbnail" style="width: 20%; height: 20%; float: left;"><center>Requested by:<br><?php echo utf8_encode(htmlentities($supervision->LastName . ", " . $supervision->FirstName . " " . substr($supervision->MiddleName, 0, 1) . ".")); ?><br><?php echo htmlentities($supervision->Position) ?></center> <?php } } ?> </center> </li> <li class="list-group-item list-group-item-primary align-items-center"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="<?php echo '#headmodal' . $result->id ?>"> Add Signature and Remarks </button> </li> <div class="modal fade" id="<?php echo 'headmodal' . $result->id; ?>" tabindex="-1" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <form method="POST"> <input type="hidden" name="forstaffstatus" id="forstaffstatus" class="form-control" value="<?php echo $result->Empcode; ?>"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="exampleModalLabel1">Add details</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light text-black"> <input type="hidden" name="idid" id="idid" value="<?php echo $result->id; ?>"> <label for="exampleTextarea" class="form-label text-black">Add Remarks</label> <input type="text" name="headremarks" id="headremarks" class="form-control"> </div> <div class="modal-footer bg-info"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="submit" class="btn btn-dark" name="confirmhead" id="confirmhead">Confirm Changes</button> </div> </form> </div> </div> </div> </ul> </div> </div> </div> </div> </div> <?php }} else{ echo "<center>There are no pending Citation to approve</center>"; } ?> </div> </div> </div> <div class="tab-pane fade" id="staffviewing" role="tabpanel"> <div class="col-md-12"> <div class="row"> <?php $eids = $_SESSION['empid']; $sql = "SELECT tbloffenserequest.id, tbloffenserequest.RequestedBy, tbloffenserequest.CitationIS, tbloffenserequest.Empcode, tbloffenserequest.AMcode, tbloffenserequest.HeadEmpcode, tbloffenserequest.EmpCitation, tbloffenserequest.AmCitation, tbloffenserequest.HeadCitation, tbloffenserequest.SuggestedViolation, tbloffenserequest.isDoneAm, tbloffenserequest.isDoneHead, tbloffenserequest.Date_Requested, tbloffenserequest.Request_Year, tbloffenserequest.Status, tblemployees.EmpId, tblemployees.FirstName, tblemployees.LastName, tblemployees.MiddleName, tblemployees.PostImage, tblemployees.My_Signature, tblemployees.Company, tblemployees.Company_Area, tblemployees.Department, tblemployees.Position, tblemployees.Position_Level, tblemployees.Superior, tblemployees.NickName FROM tblemployees, tbloffenserequest WHERE tbloffenserequest.Empcode = :eids and tbloffenserequest.Empcode = tblemployees.EmpId and tbloffenserequest.Status = :eids and tbloffenserequest.isDoneHead = 1"; $query= $dbh->prepare($sql); $query-> bindParam(':eids', $eids, PDO::PARAM_STR); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $result) { ?> <div class="col-md-4 mt-2"> <div class="accordion bg-transparent" id="accordionExample"> <div class="accordion-item "> <h2 class="accordion-header" id="headingOne"> <button class="accordion-button collapsed bg-info text-white" type="button" data-bs-toggle="collapse" data-bs-target="<?php echo '#employee' . $result->id; ?>" aria-expanded="false" aria-controls="collapseOne"> <img src="https://img.icons8.com/stickers/36/employee-card--v2.png" alt="employee-card--v2"/ style="float:left;"> <center style="font-weight: bold; font-size: 20px;"><?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName . " " . substr($result->MiddleName, 0, 1) . ".")); ?></center> </button> </h2> <div id="<?php echo 'employee' . $result->id; ?>" class="accordion-collapse collapse bg-light" aria-labelledby="headingOne" data-bs-parent="#accordionExample" style=""> <div class="accordion-body bg-light"> <ul class="list-group"> <li class="list-group-item list-group-item-info align-items-center"> <center>Request of NTE for <?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName . " " . substr($result->MiddleName, 0, 1) . ".")); ?></center> </li> <li class="list-group-item list-group-item-primary align-items-center"> <label for="exampleTextarea" class="form-label mt-1 text-black">Date of Request</label> <input type="text" name="requestdate" id="requestdate" class="form-control" value="<?php echo htmlentities($result->Date_Requested); ?>" readonly> </li> <li class="list-group-item list-group-item-primary align-items-center"> <label for="exampleTextarea" class="form-label mt-1 text-black">Details/Facts of the incident</label> <textarea class="form-control" id="citation" name="citation" rows="3" readonly><?php echo htmlentities($result->CitationIS) ?></textarea> </li> <li class="list-group-item list-group-item-primary align-items-center"> <label for="exampleSelect1" class="form-label mt-1 text-black">Nature of the Offense Allegedly Committed</label> <textarea class="form-control" id="offense" name="offense" rows="3" readonly><?php echo htmlentities($result->SuggestedViolation) ?></textarea> </li> <li class="list-group-item list-group-item-primary align-items-center"> <?php $is = $result->RequestedBy; $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); if($query->rowCount() > 0) { foreach ($results as $supervision) { ?> <center> <input type="hidden" name="immediate" id="immediate" value="<?php echo $supervision->LastName . ", " . $supervision->FirstName ; ?>"> <img src="image/<?php echo $supervision->PostImage ?>" class="img-thumbnail" style="width: 20%; height: 20%; float: left;"><center>Requested by:<br><?php echo utf8_encode(htmlentities($supervision->LastName . ", " . $supervision->FirstName . " " . substr($supervision->MiddleName, 0, 1) . ".")); ?><br><?php echo htmlentities($supervision->Position) ?></center> <?php } } ?> </center> </li> <li class="list-group-item list-group-item-primary align-items-center"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="<?php echo '#staffmodal' . $result->id ?>"> Add Signature and Remarks </button> </li> <div class="modal fade" id="<?php echo 'staffmodal' . $result->id; ?>" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <form method="POST"> <input type="hidden" name="forofficerstatus" id="forofficerstatus" value="<?php echo $result->RequestedBy; ?>"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="exampleModalLabel1">Add details</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light text-black"> <input type="hidden" name="idid" id="idid" value="<?php echo $result->id; ?>"> <h6><p>You are hereby required to explain in writing the charge(s) against you within five (5) calendar days upon receipt of this Citation Report. Your refusal or neglect to accomplish it within the prescribed time shall mean a waiver of your right to be heard and challenge the accusation(s) being charged against you.</p></h6> <label for="exampleTextarea" class="form-label text-black">Your Explanation</label> <textarea class="form-control" id="staffremarks" name="staffremarks" rows="3"></textarea> <div class="col-md-12"> <div class="row"> <div class="col-md-4 mt-2"> <?php $is = $result->RequestedBy; $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); if($query->rowCount() > 0) { foreach ($results as $issignature) { ?> Recommended by: <img src="signatureupload/<?php echo $issignature->My_Signature ?>" class="img-thumbnail"> <center><h6><?php echo utf8_encode(htmlentities($issignature->LastName . ", " . $issignature->FirstName . " " . substr($issignature->MiddleName, 0, 1) . ".")); ?></h6></center> <center><h6>Immediate Superior</h6></center> <?php }}?> </div> <?php if ($result->isDoneAm != 1) { ?> <div class="col-md-4 mt-2"> </div> <?php }else{ ?> <div class="col-md-4 mt-2"> <?php if ($result->AMcode == $result->Empcode) { }else{ ?> <?php $am = $result->AMcode; $sql = "SELECT * FROM tblemployees WHERE EmpId = :am"; $query= $dbh->prepare($sql); $query->bindParam(':am', $am, PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $amsignature) { ?> Approved by: <img src="signatureupload/<?php echo $amsignature->My_Signature ?>" class="img-thumbnail"> <center><h6><?php echo utf8_encode(htmlentities($amsignature->LastName . ", " . $amsignature->FirstName . " " . substr($amsignature->MiddleName, 0, 1) . ".")); ?></h6></center> <center><h6>Area Manager</h6></center> <?php }}?> <?php } ?> </div> <?php } ?> <div class="col-md-4 mt-2"> <?php $head = $result->HeadEmpcode; $sql = "SELECT * FROM tblemployees WHERE EmpId = :head"; $query= $dbh->prepare($sql); $query->bindParam(':head', $head, PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $headsignature) { ?> Noted by: <img src="signatureupload/<?php echo $headsignature->My_Signature ?>" class="img-thumbnail"> <center><h6><?php echo utf8_encode(htmlentities($headsignature->LastName . ", " . $headsignature->FirstName . " " . substr($headsignature->MiddleName, 0, 1) . ".")); ?></h6></center> <center><h6>Head</h6></center> <?php }}?> </div> </div> </div> </div> <div class="modal-footer bg-info"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="submit" class="btn btn-dark" name="confirmstaff" id="confirmstaff">Confirm Changes</button> </div> </form> </div> </div> </div> </ul> </div> </div> </div> </div> </div> <?php }}else{ echo "<center>There are no pending Citation to receive.</center>"; } ?> </div> </div> </div> </div> </div> </div> </div> </div> <div class="tab-pane fade" id="disciplinary" role="tabpanel"> <div class="col-md-12"> <div class="card"> <div class="card-header bg-info"> <ul class="nav nav-pills card-header-pills" role="tablist"> <li class="nav-item text-white"> <?php $eids = $_SESSION['empid']; $sql = "SELECT * FROM tbloffense where Status = :eids and AMcode = :eids and AM_isRead = 0"; $query = $dbh->prepare($sql); $query->bindParam(':eids',$eids,PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $areamanagerdar=$query->rowCount(); ?> <button type="button" class="nav-link text-white" data-bs-toggle="tab" data-bs-target="#darmanager" role="tab"><img src="https://img.icons8.com/stickers/36/businesswoman--v2.png" alt="businesswoman--v2"/> <?php echo 'Area Manager' . " " . "<span class='badge bg-primary rounded-pill'>$areamanagerdar</span>";?></button> </li> <li class="nav-item text-white"> <?php $eids = $_SESSION['empid']; $sql = "SELECT * FROM tbloffense where Status = :eids and HeadEmpcode = :eids and Head_isRead = 0"; $query = $dbh->prepare($sql); $query->bindParam(':eids',$eids,PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $headdar=$query->rowCount(); ?> <button type="button" class="nav-link text-white" data-bs-toggle="tab" data-bs-target="#darhead" role="tab"><img src="https://img.icons8.com/stickers/36/businessman-skin-type-3.png" alt="businessman-skin-type-3"/> <?php echo 'Head' . " " . "<span class='badge bg-primary rounded-pill'>$headdar</span>";?></button> </li> <li class="nav-item text-white"> <?php $eids = $_SESSION['empid']; $sql = "SELECT * FROM tbloffense where Status = :eids and Empcode = :eids"; $query = $dbh->prepare($sql); $query->bindParam(':eids',$eids,PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $employeedar=$query->rowCount(); ?> <button type="button" class="nav-link text-white" data-bs-toggle="tab" data-bs-target="#darstaff" role="tab"><img src="https://img.icons8.com/stickers/36/administrator-female.png" alt="administrator-female"/> <?php echo 'Employee' . " " . "<span class='badge bg-primary rounded-pill'>$employeedar</span>";?></button> </li> <li class="nav-item text-white"> <?php $eids = $_SESSION['empid']; $sql = "SELECT * FROM tbloffense where Status = 'For Discussion' and OFCREmpcode = :eids"; $query = $dbh->prepare($sql); $query->bindParam(':eids',$eids,PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $fordiscussiondar=$query->rowCount(); ?> <button type="button" class="nav-link text-white" data-bs-toggle="tab" data-bs-target="#fordiscussion" role="tab"><img src="https://img.icons8.com/stickers/36/collaboration.png" alt="collaboration"/> <?php echo 'For Discussion' . " " . "<span class='badge bg-primary rounded-pill'>$fordiscussiondar</span>";?></button> </li> </ul> </div> <div class="card-body"> <div class="tab-content p-0"> <div class="tab-pane fade" id="darmanager" role="tabpanel"> <div class="col-md-12"> <div class="row"> <?php $eids = $_SESSION['empid']; $sql = "SELECT tbloffense.id, tbloffense.Empcode, tbloffense.FullName, tbloffense.Department, tbloffense.Findings, tbloffense.Action_Date, tbloffense.Violation, tbloffense.Sanction, tbloffense.Sanction_Remarks, tbloffense.Expiry_Date, tbloffense.Citation_Id, tbloffense.Employee_Comment, tbloffense.HeadEmpcode, tbloffense.AMcode, tbloffense.OFCREmpcode, tbloffense.Head_Comment, tbloffense.Am_Comment, tbloffense.IS_Comment, tbloffense.HR_Comment, tbloffense.Status, tbloffense.Head_isRead, tbloffense.IS_isRead, tbloffense.AM_isRead, tblemployees.EmpId, tblemployees.FirstName, tblemployees.LastName, tblemployees.MiddleName, tblemployees.PostImage, tblemployees.My_Signature, tblemployees.Company, tblemployees.Company_Area, tblemployees.Department, tblemployees.Position, tblemployees.Position_Level, tblemployees.Superior, tblemployees.NickName FROM tbloffense, tblemployees WHERE tbloffense.AMcode = :eids and tbloffense.Empcode = tblemployees.EmpId and tbloffense.Status = :eids and tbloffense.AM_isRead = 0"; $query= $dbh->prepare($sql); $query-> bindParam(':eids', $eids, PDO::PARAM_STR); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $result) { ?> <div class="col-md-4 "> <div class="accordion bg-transparent" id="areamanageraccordion"> <div class="accordion-item"> <h2 class="accordion-header" id="headingOne"> <button class="accordion-button collapsed bg-info text-white" type="button" data-bs-toggle="collapse" data-bs-target="<?php echo '#darmanageraccordion' . $result->id; ?>" aria-expanded="false" aria-controls="collapseOne"> <img src="https://img.icons8.com/stickers/36/employee-card--v2.png" alt="employee-card--v2"/ style="float:left;"> <center style="font-weight: bold; font-size: 20px;"><?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName . " " . substr($result->MiddleName, 0, 1) . ".")); ?></center> </button> </h2> <div id="<?php echo 'darmanageraccordion' . $result->id; ?>" class="accordion-collapse collapse bg-light" aria-labelledby="headingOne" data-bs-parent="#areamanageraccordion" style=""> <div class="accordion-body bg-light"> <ul class="list-group"> <li class="list-group-item list-group-item-info align-items-center"> <center>Disciplinary Action for <?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName)); ?></center> </li> <li class="list-group-item list-group-item-info align-items-center"> <label for="exampleTextarea" class="form-label text-black">Date:</label> <input type="text" name="actiondate" id="actiondate" class="form-control" readonly value="<?php echo htmlentities($result->Action_Date); ?>"> </li> <li class="list-group-item list-group-item-info align-items-center"> <label for="exampleTextarea" class="form-label text-black">Department:</label> <input type="text" name="department" id="department" class="form-control" readonly value="<?php echo htmlentities($result->Department); ?>"> </li> <li class="list-group-item list-group-item-info align-items-center"> <label for="exampleTextarea" class="form-label text-black">Nature of the Offense Allegedly Committed:</label> <textarea class="form-control" id="violation" name="violation" rows="3" readonly><?php echo htmlentities($result->Violation)?></textarea> </li> <li class="list-group-item list-group-item-primary align-items-center"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="<?php echo '#darareamanager' . $result->id ?>"> View and Add Signature </button> </li> <div class="modal fade" id="<?php echo 'darareamanager' . $result->id; ?>" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <form method="POST"> <input type="hidden" name="idid" id="idid" value="<?php echo $result->id; ?>"> <input type="hidden" name="headid" id="headid" value="<?php echo $result->HeadEmpcode; ?>"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="exampleModalLabel1">Disciplinary Action Details</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light text-black"> <div class="row"> <div class="col-md-4"> <img src="image/<?php echo htmlentities($result->PostImage)?>" class="img-thumbnail" style="height:100%; width:100%; "> </div> <div class="col-md-8"> <label for="exampleTextarea" class="form-label text-black">Full Name</label> <input type="text" name="empfullname" id="empfullname" class="form-control" readonly value="<?php echo htmlentities($result->FullName); ?>"> <label for="exampleTextarea" class="form-label text-black">Department</label> <input type="text" name="department" id="department" class="form-control" readonly value="<?php echo htmlentities($result->Department); ?>"> <label for="exampleTextarea" class="form-label text-black">Nature of the Offense Allegedly Committed:</label> <textarea class="form-control" id="violation" name="violation" rows="3" readonly><?php echo htmlentities($result->Violation)?></textarea> </div> <div class="col-md-12"> <label for="exampleTextarea" class="form-label text-black">Findings</label> <textarea class="form-control" id="findings" name="findings" rows="3" readonly><?php echo htmlentities($result->Findings) ?></textarea> </div> <div class="col-md-12 mt-1"> <center><h5>Offense Committed</h5></center> <div class="accordion bg-transparent" id="areamangeraccordion"> <div class="accordion-item"> <h2 class="accordion-header" id="headingOne"> <button class="accordion-button collapsed bg-info text-white" type="button" data-bs-toggle="collapse" data-bs-target="<?php echo '#sanction' . $result->id; ?>" aria-expanded="true" aria-controls="collapseOne"> Sanction List </button> </h2> <div id="<?php echo 'sanction' . $result->id; ?>" class="accordion-collapse collapse bg-light" aria-labelledby="headingOne" data-bs-parent="#areamangeraccordion"> <div class="accordion-body bg-light"> <div class="row"> <?php $olist = $result->Violation; $empcodes = $result->Empcode; $citationid = $result->Citation_Id; $sql = "SELECT * FROM tbloffense where Empcode = :empcodes and Violation = :olist ORDER BY Empcode, Violation LIMIT 5"; $query= $dbh->prepare($sql); $query->bindParam(':olist', $olist, PDO::PARAM_STR); $query->bindParam(':empcodes', $empcodes, PDO::PARAM_STR); //$query->bindParam(':citationid', $citationid, PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt = 1; $shitshit=$query->rowCount(); if($query->rowCount() > 0) { foreach ($results as $hit) { ?> <div class="col-md-4"> <div class="card"> <ul class="list-group"> <li class="list-group-item d-flex justify-content-between align-items-center bg-warning text-black"> <?php echo htmlentities($hit->FullName); ?> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> <?php echo htmlentities($hit->Violation); ?> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> <?php echo htmlentities($hit->Sanction); ?> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> Date <span class="badge bg-info rounded-pill"><?php echo htmlentities($hit->Action_Date); ?></span> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> Reset <span class="badge bg-info rounded-pill"><?php echo htmlentities($hit->Expiry_Date); ?></span> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> Count <span class="badge bg-info rounded-pill"><?php echo $cnt; ?></span> </li> </ul> </div> </div> <?php $cnt++; } } ?> </div> </div> </div> </div> </div> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">Disciplinary Sanction</label> <input type="text" name="darsanction" id="darsanction" class="form-control" readonly value="<?php echo $result->Sanction; ?>"> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">Area Manager Remarks</label> <input type="text" name="amremarks" id="amremarks" class="form-control" placeholder="Place your remarks here"> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">Head Remarks</label> <input type="text" name="headremarks" id="headremarks" class="form-control" readonly> </div> </div> </div> <div class="modal-footer bg-info"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="submit" class="btn btn-dark" name="darconfirmam" id="darconfirmam">Submit Approval</button> </div> </form> </div> </div> </div> </ul> </div> </div> </div> </div> </div> <?php } }else{ echo "<center>There are no pending Disciplinary Action Report to approve</center>"; } ?> </div> </div> </div> <div class="tab-pane fade" id="darhead" role="tabpanel"> <div class="col-md-12"> <div class="row"> <?php $eids = $_SESSION['empid']; $sql = "SELECT tbloffense.id, tbloffense.Empcode, tbloffense.FullName, tbloffense.Department, tbloffense.Findings, tbloffense.Action_Date, tbloffense.Violation, tbloffense.Sanction, tbloffense.Sanction_Remarks, tbloffense.Expiry_Date, tbloffense.Citation_Id, tbloffense.Employee_Comment, tbloffense.HeadEmpcode, tbloffense.AMcode, tbloffense.OFCREmpcode, tbloffense.Head_Comment, tbloffense.Am_Comment, tbloffense.IS_Comment, tbloffense.HR_Comment, tbloffense.Status, tbloffense.Head_isRead, tbloffense.IS_isRead, tbloffense.AM_isRead, tblemployees.EmpId, tblemployees.FirstName, tblemployees.LastName, tblemployees.MiddleName, tblemployees.PostImage, tblemployees.My_Signature, tblemployees.Company, tblemployees.Company_Area, tblemployees.Department, tblemployees.Position, tblemployees.Position_Level, tblemployees.Superior, tblemployees.NickName FROM tbloffense, tblemployees WHERE tbloffense.HeadEmpcode = :eids and tbloffense.Empcode = tblemployees.EmpId and tbloffense.Status = :eids and tbloffense.Head_isRead = 0"; $query= $dbh->prepare($sql); $query-> bindParam(':eids', $eids, PDO::PARAM_STR); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $result) { ?> <div class="col-md-4"> <div class="accordion bg-transparent" id="headsaccordion"> <div class="accordion-item"> <h2 class="accordion-header" id="headingOne"> <button class="accordion-button collapsed bg-info text-white" type="button" data-bs-toggle="collapse" data-bs-target="<?php echo '#DARHEAD' . $result->id; ?>" aria-expanded="false" aria-controls="collapseOne"> <img src="https://img.icons8.com/stickers/36/employee-card--v2.png" alt="employee-card--v2"/ style="float:left;"> <center style="font-weight: bold; font-size: 20px;"><?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName . " " . substr($result->MiddleName, 0, 1) . ".")); ?></center> </button> </h2> <div id="<?php echo 'DARHEAD' . $result->id; ?>" class="accordion-collapse collapse bg-light" aria-labelledby="headingOne" data-bs-parent="#headsaccordion" style=""> <div class="accordion-body bg-light"> <ul class="list-group"> <li class="list-group-item list-group-item-info align-items-center"> <center>Disciplinary Action for <?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName)); ?></center> </li> <li class="list-group-item list-group-item-info align-items-center"> <label for="exampleTextarea" class="form-label text-black">Date:</label> <input type="text" name="actiondate" id="actiondate" class="form-control" readonly value="<?php echo htmlentities($result->Action_Date); ?>"> </li> <li class="list-group-item list-group-item-info align-items-center"> <label for="exampleTextarea" class="form-label text-black">Department:</label> <input type="text" name="department" id="department" class="form-control" readonly value="<?php echo htmlentities($result->Department); ?>"> </li> <li class="list-group-item list-group-item-info align-items-center"> <label for="exampleTextarea" class="form-label text-black">Nature of the Offense Allegedly Committed:</label> <textarea class="form-control" id="violation" name="violation" rows="3" readonly><?php echo htmlentities($result->Violation)?></textarea> </li> <li class="list-group-item list-group-item-primary align-items-center"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="<?php echo '#DARHEADMODAL' . $result->id ?>"> View and Add Signature </button> </li> <div class="modal fade" id="<?php echo 'DARHEADMODAL' . $result->id; ?>" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <form method="POST"> <input type="hidden" name="idid" id="idid" value="<?php echo $result->id; ?>"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="exampleModalLabel1">Disciplinary Action Details</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light text-black"> <div class="row"> <div class="col-md-4"> <img src="image/<?php echo htmlentities($result->PostImage)?>" class="img-thumbnail" style="height:100%; width:100%; "> </div> <div class="col-md-8"> <label for="exampleTextarea" class="form-label text-black">Full Name</label> <input type="text" name="empfullname" id="empfullname" class="form-control" readonly value="<?php echo htmlentities($result->FullName); ?>"> <label for="exampleTextarea" class="form-label text-black">Department</label> <input type="text" name="department" id="department" class="form-control" readonly value="<?php echo htmlentities($result->Department); ?>"> <label for="exampleTextarea" class="form-label text-black">Nature of the Offense Allegedly Committed:</label> <textarea class="form-control" id="violation" name="violation" rows="3" readonly><?php echo htmlentities($result->Violation)?></textarea> </div> <div class="col-md-12"> <label for="exampleTextarea" class="form-label text-black">Findings</label> <textarea class="form-control" id="findings" name="findings" rows="3" readonly><?php echo htmlentities($result->Findings) ?></textarea> </div> <div class="col-md-12 mt-1"> <center><h5>Offense Committed</h5></center> <div class="accordion bg-transparent" id="headaccordion"> <div class="accordion-item"> <h2 class="accordion-header" id="headingOne"> <button class="accordion-button collapsed bg-info text-white" type="button" data-bs-toggle="collapse" data-bs-target="<?php echo '#sanctiondarhead' . $result->id; ?>" aria-expanded="true" aria-controls="collapseOne"> Sanction List </button> </h2> <div id="<?php echo 'sanctiondarhead' . $result->id; ?>" class="accordion-collapse collapse bg-light" aria-labelledby="headingOne" data-bs-parent="#headaccordion"> <div class="accordion-body bg-light"> <div class="row"> <?php $olist = $result->Violation; $empcodes = $result->Empcode; $citationid = $result->Citation_Id; $sql = "SELECT * FROM tbloffense where Empcode = :empcodes and Violation = :olist ORDER BY Empcode, Violation LIMIT 5"; $query= $dbh->prepare($sql); $query->bindParam(':olist', $olist, PDO::PARAM_STR); $query->bindParam(':empcodes', $empcodes, PDO::PARAM_STR); //$query->bindParam(':citationid', $citationid, PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt = 1; $shitshit=$query->rowCount(); if($query->rowCount() > 0) { foreach ($results as $hit) { ?> <div class="col-md-4"> <div class="card"> <ul class="list-group"> <li class="list-group-item d-flex justify-content-between align-items-center bg-warning text-black"> <?php echo htmlentities($hit->FullName); ?> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> <?php echo htmlentities($hit->Violation); ?> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> <?php echo htmlentities($hit->Sanction); ?> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> Date <span class="badge bg-info rounded-pill"><?php echo htmlentities($hit->Action_Date); ?></span> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> Reset <span class="badge bg-info rounded-pill"><?php echo htmlentities($hit->Expiry_Date); ?></span> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> Count <span class="badge bg-info rounded-pill"><?php echo $cnt; ?></span> </li> </ul> </div> </div> <?php $cnt++; } } ?> </div> </div> </div> </div> </div> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">Disciplinary Sanction</label> <input type="text" name="darsanction" id="darsanction" class="form-control" readonly value="<?php echo htmlentities($result->Sanction); ?>"> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">Area Manager Remarks</label> <input type="text" name="isremarks" id="isremarks" class="form-control" readonly value="<?php echo htmlentities($result->Am_Comment); ?>"> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">Head Remarks</label> <input type="text" name="headremarks" id="headremarks" class="form-control" placeholder="Place your remarks here"> </div> </div> </div> <div class="modal-footer bg-info"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="submit" class="btn btn-dark" name="darconfirmhead" id="darconfirmhead">Submit Approval</button> </div> </form> </div> </div> </div> </ul> </div> </div> </div> </div> </div> <?php } }else{ echo "<center>There are no pending Disciplinary Action Report to approve</center>"; } ?> </div> </div> </div> <div class="tab-pane fade" id="darstaff" role="tabpanel"> <div class="col-md-12"> <div class="row"> <?php $eids = $_SESSION['empid']; $sql = "SELECT tbloffense.id, tbloffense.Empcode, tbloffense.FullName, tbloffense.Department, tbloffense.Findings, tbloffense.Action_Date, tbloffense.Violation, tbloffense.Sanction, tbloffense.Sanction_Remarks, tbloffense.Expiry_Date, tbloffense.Citation_Id, tbloffense.Employee_Comment, tbloffense.HeadEmpcode, tbloffense.AMcode, tbloffense.OFCREmpcode, tbloffense.Head_Comment, tbloffense.Am_Comment, tbloffense.IS_Comment, tbloffense.HR_Comment, tbloffense.Status, tbloffense.Head_isRead, tbloffense.IS_isRead, tbloffense.AM_isRead, tbloffense.Pres_Comments, tblemployees.EmpId, tblemployees.FirstName, tblemployees.LastName, tblemployees.MiddleName, tblemployees.PostImage, tblemployees.My_Signature, tblemployees.Company, tblemployees.Company_Area, tblemployees.Department, tblemployees.Position, tblemployees.Position_Level, tblemployees.Superior, tblemployees.NickName FROM tbloffense, tblemployees WHERE tbloffense.Empcode = :eids and tbloffense.Empcode = tblemployees.EmpId and tbloffense.Status = :eids"; $query= $dbh->prepare($sql); $query-> bindParam(':eids', $eids, PDO::PARAM_STR); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $result) { ?> <div class="col-md-4"> <div class="accordion bg-transparent" id="staffaccordion"> <div class="accordion-item"> <h2 class="accordion-header" id="headingOne"> <button class="accordion-button collapsed bg-info text-white" type="button" data-bs-toggle="collapse" data-bs-target="<?php echo '#darstaff' . $result->id; ?>" aria-expanded="false" aria-controls="collapseOne"> <img src="https://img.icons8.com/stickers/36/employee-card--v2.png" alt="employee-card--v2"/ style="float:left;"> <center style="font-weight: bold; font-size: 20px;"><?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName . " " . substr($result->MiddleName, 0, 1) . ".")); ?></center> </button> </h2> <div id="<?php echo 'darstaff' . $result->id; ?>" class="accordion-collapse collapse bg-light" aria-labelledby="headingOne" data-bs-parent="#staffaccordion" style=""> <div class="accordion-body bg-light"> <ul class="list-group"> <li class="list-group-item list-group-item-info align-items-center"> <center>Disciplinary Action for <?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName)); ?></center> </li> <li class="list-group-item list-group-item-info align-items-center"> <label for="exampleTextarea" class="form-label text-black">Date:</label> <input type="text" name="actiondate" id="actiondate" class="form-control" readonly value="<?php echo htmlentities($result->Action_Date); ?>"> </li> <li class="list-group-item list-group-item-info align-items-center"> <label for="exampleTextarea" class="form-label text-black">Department:</label> <input type="text" name="department" id="department" class="form-control" readonly value="<?php echo htmlentities($result->Department); ?>"> </li> <li class="list-group-item list-group-item-info align-items-center"> <label for="exampleTextarea" class="form-label text-black">Nature of the Offense Allegedly Committed:</label> <textarea class="form-control" id="violation" name="violation" rows="3" readonly><?php echo htmlentities($result->Violation)?></textarea> </li> <li class="list-group-item list-group-item-primary align-items-center"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="<?php echo '#DARHEADMODAL' . $result->id ?>"> View and Add Signature </button> </li> <div class="modal fade" id="<?php echo 'DARHEADMODAL' . $result->id; ?>" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <form method="POST"> <input type="hidden" name="idid" id="idid" value="<?php echo $result->id; ?>"> <input type="hidden" name="headid" id="headid" value="<?php echo $result->HeadEmpcode; ?>"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="exampleModalLabel1">Disciplinary Action Details</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light text-black"> <div class="row"> <div class="col-md-4"> <img src="image/<?php echo htmlentities($result->PostImage)?>" class="img-thumbnail" style="height:100%; width:100%; "> </div> <div class="col-md-8"> <label for="exampleTextarea" class="form-label text-black">Full Name</label> <input type="text" name="empfullname" id="empfullname" class="form-control" readonly value="<?php echo htmlentities($result->FullName); ?>"> <label for="exampleTextarea" class="form-label text-black">Department</label> <input type="text" name="department" id="department" class="form-control" readonly value="<?php echo htmlentities($result->Department); ?>"> <label for="exampleTextarea" class="form-label text-black">Nature of the Offense Allegedly Committed:</label> <textarea class="form-control" id="violation" name="violation" rows="3" readonly><?php echo htmlentities($result->Violation)?></textarea> </div> <div class="col-md-12"> <label for="exampleTextarea" class="form-label text-black">Findings</label> <textarea class="form-control" id="findings" name="findings" rows="3" readonly><?php echo htmlentities($result->Findings) ?></textarea> </div> <div class="col-md-12 mt-1"> <center><h5>Offense Committed</h5></center> <div class="accordion bg-transparent" id="accordionExample"> <div class="accordion-item"> <h2 class="accordion-header" id="headingOne"> <button class="accordion-button collapsed bg-info text-white" type="button" data-bs-toggle="collapse" data-bs-target="<?php echo '#sanction' . $result->id; ?>" aria-expanded="true" aria-controls="collapseOne"> Sanction List </button> </h2> <div id="<?php echo 'sanction' . $result->id; ?>" class="accordion-collapse collapse bg-light" aria-labelledby="headingOne" data-bs-parent="#accordionExample"> <div class="accordion-body bg-light"> <div class="row"> <?php $olist = $result->Violation; $empcodes = $result->Empcode; $citationid = $result->Citation_Id; $sql = "SELECT * FROM tbloffense where Empcode = :empcodes and Violation = :olist ORDER BY Empcode, Violation LIMIT 5"; $query= $dbh->prepare($sql); $query->bindParam(':olist', $olist, PDO::PARAM_STR); $query->bindParam(':empcodes', $empcodes, PDO::PARAM_STR); //$query->bindParam(':citationid', $citationid, PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt = 1; $shitshit=$query->rowCount(); if($query->rowCount() > 0) { foreach ($results as $hit) { ?> <div class="col-md-4"> <div class="card"> <ul class="list-group"> <li class="list-group-item d-flex justify-content-between align-items-center bg-warning text-black"> <?php echo htmlentities($hit->FullName); ?> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> <?php echo htmlentities($hit->Violation); ?> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> <?php echo htmlentities($hit->Sanction); ?> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> Date <span class="badge bg-info rounded-pill"><?php echo htmlentities($hit->Action_Date); ?></span> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> Reset <span class="badge bg-info rounded-pill"><?php echo htmlentities($hit->Expiry_Date); ?></span> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> Count <span class="badge bg-info rounded-pill"><?php echo $cnt; ?></span> </li> </ul> </div> </div> <?php $cnt++; } } ?> </div> </div> </div> </div> </div> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">Disciplinary Sanction</label> <input type="text" name="darsanction" id="darsanction" class="form-control" readonly value="<?php echo $result->Sanction;?>"> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">Area Manager Remarks</label> <input type="text" name="amremarks" id="amremarks" class="form-control" readonly value="<?php echo htmlentities($result->Am_Comment); ?>"> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">Head Remarks</label> <input type="text" name="headremarks" id="headremarks" class="form-control" readonly value="<?php echo htmlentities($result->Head_Comment);?>"> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">HR Remarks</label> <input type="text" name="hrremarks" id="hrremarks" class="form-control" readonly value="<?php echo htmlentities($result->HR_Comment);?>"> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">President's Remarks</label> <input type="text" name="presremarks" id="presremarks" class="form-control" readonly value="<?php echo htmlentities($result->Pres_Comments);?>"> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">Employee Comment</label> <input type="text" name="empcomment" id="empcomment" class="form-control" required> </div> <!-- --> </div> </div> <div class="modal-footer bg-info"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="submit" class="btn btn-dark" name="darconfirmstaff" id="darconfirmstaff">Acknowledge this DAR</button> </div> </form> </div> </div> </div> </ul> </div> </div> </div> </div> </div> <?php } }else{ echo "<center>There are no pending Disciplinary Action Report to approve</center>"; } ?> </div> </div> </div> <div class="tab-pane fade" id="fordiscussion" role="tabpanel"> <div class="col-md-12"> <div class="row"> <?php $eids = $_SESSION['empid']; $sql = "SELECT tbloffense.id, tbloffense.Empcode, tbloffense.FullName, tbloffense.Department, tbloffense.Findings, tbloffense.Action_Date, tbloffense.Violation, tbloffense.Sanction, tbloffense.Sanction_Remarks, tbloffense.Expiry_Date, tbloffense.Citation_Id, tbloffense.Employee_Comment, tbloffense.HeadEmpcode, tbloffense.AMcode, tbloffense.OFCREmpcode, tbloffense.Head_Comment, tbloffense.Am_Comment, tbloffense.IS_Comment, tbloffense.HR_Comment, tbloffense.Status, tbloffense.Head_isRead, tbloffense.IS_isRead, tbloffense.AM_isRead, tbloffense.Pres_Comments, tblemployees.EmpId, tblemployees.FirstName, tblemployees.LastName, tblemployees.MiddleName, tblemployees.PostImage, tblemployees.My_Signature, tblemployees.Company, tblemployees.Company_Area, tblemployees.Department, tblemployees.Position, tblemployees.Position_Level, tblemployees.Superior, tblemployees.NickName FROM tbloffense, tblemployees WHERE tbloffense.OFCREmpcode = :eids and tbloffense.Empcode = tblemployees.EmpId and tbloffense.Status = 'For Discussion'"; $query= $dbh->prepare($sql); $query-> bindParam(':eids', $eids, PDO::PARAM_STR); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount() > 0) { foreach ($results as $result) { ?> <div class="col-md-4"> <div class="accordion bg-transparent" id="discussionaccordion"> <div class="accordion-item"> <h2 class="accordion-header" id="headingOne"> <button class="accordion-button collapsed bg-info text-white" type="button" data-bs-toggle="collapse" data-bs-target="<?php echo '#darstaff' . $result->id; ?>" aria-expanded="false" aria-controls="collapseOne"> <img src="https://img.icons8.com/stickers/36/employee-card--v2.png" alt="employee-card--v2"/ style="float:left;"> <center style="font-weight: bold; font-size: 20px;"><?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName . " " . substr($result->MiddleName, 0, 1) . ".")); ?></center> </button> </h2> <div id="<?php echo 'darstaff' . $result->id; ?>" class="accordion-collapse collapse bg-light" aria-labelledby="headingOne" data-bs-parent="#discussionaccordion" style=""> <div class="accordion-body bg-light"> <ul class="list-group"> <li class="list-group-item list-group-item-info align-items-center"> <center>Disciplinary Action for <?php echo utf8_encode(htmlentities($result->LastName . ", " . $result->FirstName)); ?></center> </li> <li class="list-group-item list-group-item-info align-items-center"> <label for="exampleTextarea" class="form-label text-black">Date:</label> <input type="text" name="actiondate" id="actiondate" class="form-control" readonly value="<?php echo htmlentities($result->Action_Date); ?>"> </li> <li class="list-group-item list-group-item-info align-items-center"> <label for="exampleTextarea" class="form-label text-black">Department:</label> <input type="text" name="department" id="department" class="form-control" readonly value="<?php echo htmlentities($result->Department); ?>"> </li> <li class="list-group-item list-group-item-info align-items-center"> <label for="exampleTextarea" class="form-label text-black">Nature of the Offense Allegedly Committed:</label> <textarea class="form-control" id="violation" name="violation" rows="3" readonly><?php echo htmlentities($result->Violation)?></textarea> </li> <li class="list-group-item list-group-item-primary align-items-center"> <button type="button" class="btn btn-info form-control" data-bs-toggle="modal" data-bs-target="<?php echo '#discussionmodal' . $result->id ?>"> View and Add Signature </button> </li> <div class="modal fade" id="<?php echo 'discussionmodal' . $result->id; ?>" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <form method="POST"> <input type="hidden" name="idid" id="idid" value="<?php echo $result->id; ?>"> <input type="hidden" name="staffempcode" id="staffempcode" value="<?php echo $result->Empcode; ?>"> <div class="modal-header bg-info text-white"> <h5 class="modal-title" id="exampleModalLabel1">Disciplinary Action Details</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-light text-black"> <div class="row"> <div class="col-md-4"> <img src="image/<?php echo htmlentities($result->PostImage)?>" class="img-thumbnail" style="height:100%; width:100%; "> </div> <div class="col-md-8"> <label for="exampleTextarea" class="form-label text-black">Full Name</label> <input type="text" name="empfullname" id="empfullname" class="form-control" readonly value="<?php echo htmlentities($result->FullName); ?>"> <label for="exampleTextarea" class="form-label text-black">Department</label> <input type="text" name="department" id="department" class="form-control" readonly value="<?php echo htmlentities($result->Department); ?>"> <label for="exampleTextarea" class="form-label text-black">Nature of the Offense Allegedly Committed:</label> <textarea class="form-control" id="violation" name="violation" rows="3" readonly><?php echo htmlentities($result->Violation)?></textarea> </div> <div class="col-md-12"> <label for="exampleTextarea" class="form-label text-black">Findings</label> <textarea class="form-control" id="findings" name="findings" rows="3" readonly><?php echo htmlentities($result->Findings) ?></textarea> </div> <div class="col-md-12 mt-1"> <center><h5>Offense Committed</h5></center> <div class="accordion bg-transparent" id="accordiondiscussion"> <div class="accordion-item"> <h2 class="accordion-header" id="headingOne"> <button class="accordion-button collapsed bg-info text-white" type="button" data-bs-toggle="collapse" data-bs-target="<?php echo '#discussionsanction' . $result->id; ?>" aria-expanded="true" aria-controls="collapseOne"> Sanction List </button> </h2> <div id="<?php echo 'discussionsanction' . $result->id; ?>" class="accordion-collapse collapse bg-light" aria-labelledby="headingOne" data-bs-parent="#accordiondiscussion"> <div class="accordion-body bg-light"> <div class="row"> <?php $olist = $result->Violation; $empcodes = $result->Empcode; $citationid = $result->Citation_Id; $sql = "SELECT * FROM tbloffense where Empcode = :empcodes and Violation = :olist ORDER BY Empcode, Violation LIMIT 5"; $query= $dbh->prepare($sql); $query->bindParam(':olist', $olist, PDO::PARAM_STR); $query->bindParam(':empcodes', $empcodes, PDO::PARAM_STR); //$query->bindParam(':citationid', $citationid, PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt = 1; $shitshit=$query->rowCount(); if($query->rowCount() > 0) { foreach ($results as $hit) { ?> <div class="col-md-4"> <div class="card"> <ul class="list-group"> <li class="list-group-item d-flex justify-content-between align-items-center bg-warning text-black"> <?php echo htmlentities($hit->FullName); ?> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> <?php echo htmlentities($hit->Violation); ?> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> <?php echo htmlentities($hit->Sanction); ?> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> Date <span class="badge bg-info rounded-pill"><?php echo htmlentities($hit->Action_Date); ?></span> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> Reset <span class="badge bg-info rounded-pill"><?php echo htmlentities($hit->Expiry_Date); ?></span> </li> <li class="list-group-item d-flex justify-content-between align-items-center text-black"> Count <span class="badge bg-info rounded-pill"><?php echo $cnt; ?></span> </li> </ul> </div> </div> <?php $cnt++; } } ?> </div> </div> </div> </div> </div> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">Disciplinary Sanction</label> <input type="text" name="darsanction" id="darsanction" class="form-control" readonly value="<?php echo htmlentities($result->Sanction);?>"> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">Area Manager Remarks</label> <input type="text" name="amremarks" id="amremarks" class="form-control" readonly value="<?php echo htmlentities($result->Am_Comment); ?>"> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">Head Remarks</label> <input type="text" name="headremarks" id="headremarks" class="form-control" readonly value="<?php echo htmlentities($result->Head_Comment);?>"> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">HR Remarks</label> <input type="text" name="hrremarks" id="hrremarks" class="form-control" readonly value="<?php echo htmlentities($result->HR_Comment);?>"> </div> <div class="col-md-12 mt-1"> <label for="exampleTextarea" class="form-label text-black">President's Remarks</label> <input type="text" name="hrremarks" id="hrremarks" class="form-control" readonly value="<?php echo htmlentities($result->Pres_Comments);?>"> </div> </div> </div> <div class="modal-footer bg-info"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="submit" class="btn btn-dark" name="enddiscussion" id="enddiscussion">End this discussion</button> </div> </form> </div> </div> </div> </ul> </div> </div> </div> </div> </div> <?php } }else{ echo "<center>There are no pending Disciplinary Action Report for discussion</center>"; } ?> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <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