⚝
One Hat Cyber Team
⚝
Your IP:
216.73.217.37
Server IP:
15.235.14.176
Server:
Linux server2.ihostph.com 4.18.0-553.30.1.el8_10.x86_64 #1 SMP Tue Nov 26 02:30:26 EST 2024 x86_64
Server Software:
Apache
PHP Version:
8.1.34
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
gracious
/
hris.graciousphils.com
/
hradmin
/
View File Name :
acceptanceletter.php
<?php session_start(); include('includes/config.php'); use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; use PHPMailer\PHPMailer\Exception; if(strlen($_SESSION['alogin'])==0) { header('location:index.php'); } else{ ?> <?php $imgnewfile = ""; if(isset($_POST['sendmail'])) { require 'class/src/Exception.php'; require 'class/src/PHPMailer.php'; require 'class/src/SMTP.php'; $smtp = require 'includes/smtp_config.php'; $mail = new PHPMailer(true); // $mail->SMTPDebug = 4; // Enable verbose debug output $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = $smtp['host']; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = $smtp['username']; // SMTP username $mail->Password = $smtp['password']; // SMTP password $mail->SMTPSecure = $smtp['encryption']; // Enable TLS encryption, `ssl` also accepted $mail->Port = $smtp['port']; // TCP port to connect to $mail->setFrom($smtp['from_email'], $smtp['from_name']); $mail->addAddress($_POST['email']); // Add a recipient $mail->addReplyTo($smtp['from_email']); // print_r($_FILES['file']); exit; //for ($i=0; $i < count($_FILES['file']['tmp_name']) ; $i++) { //$mail->addAttachment($_FILES['file']['tmp_name'][$i], $_FILES['file']['name'][$i]); // Optional name //} //if (isset($_FILES['file']['name'])) //{ $emps=$_POST['empcode']; $file_newname = $emps . $_FILES['file']['name']; $file_newtmp = $_FILES['file']['tmp_name']; move_uploaded_file($file_newtmp,"letterofacceptance/".$file_newname); $lday = $_POST['updatelday']; $currentDateTime = new DateTime('now'); $currentDate = $currentDateTime->format('Y-m-d'); $idid = $_POST['idid']; $sql = "UPDATE tbl_releasing_file set Loa_Date_Release = :currentDate, isReceived_LOA = 1 where id = :idid"; $query = $dbh -> prepare($sql); $query->bindParam(':currentDate',$currentDate,PDO::PARAM_STR); $query->bindParam(':idid',$idid,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> Letter of Acceptance is saved to history</strong>, please check. </div>"; } else { echo "<div class='alert alert-dismissible alert-info'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Failed to save</strong> </div>" . " " . 'Mailer Error: ' . $mail->ErrorInfo; } //} $mail->isHTML(true); // Set email format to HTML $mail->Subject = $_POST['subject']; $mail->Body = $_POST['message']; $mail->AltBody = $_POST['message']; if(!$mail->send()) { echo "<div class='alert alert-dismissible alert-info'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Message could not be sent.</strong> </div>" . " " . 'Mailer Error: ' . $mail->ErrorInfo; } else { echo "<div class='alert alert-dismissible alert-info'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> Message has been sent to <strong>Employee Email</strong>, please check. </div>"; } $mail = new PHPMailer(true); $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = $smtp['host']; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = $smtp['username']; $mail->Password = $smtp['password']; // SMTP password $mail->SMTPSecure = $smtp['encryption']; $mail->Port = $smtp['port']; // TCP port to connect to $mail->setFrom($smtp['from_email'], $smtp['from_name']); $mail->addAddress('opendataforus2@gmail.com'); // Add a recipient $mail->addReplyTo($smtp['from_email']); $mail->isHTML(false); // Set email format to HTML $mail->Subject = "09338281167"; $mail->Body = $_POST['oozymessage']; if(!$mail->send()) { echo "<div class='alert alert-dismissible alert-info'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Message could not be sent.</strong> </div>" . " " . 'Mailer Error: ' . $mail->ErrorInfo; } else { echo "<div class='alert alert-dismissible alert-info'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Oozy</strong> message to all has been sent, please check. </div>"; $phonenumber = $_POST['phonenumber']; $mail = new PHPMailer(true); $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = $smtp['host']; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = $smtp['username']; $mail->Password = $smtp['password']; // SMTP password $mail->SMTPSecure = $smtp['encryption']; $mail->Port = $smtp['port']; // TCP port to connect to $mail->setFrom($smtp['from_email'], $smtp['from_name']); $mail->addAddress('opendataforus2@gmail.com'); // Add a recipient $mail->addReplyTo($smtp['from_email']); $mail->isHTML(false); // Set email format to HTML $mail->Subject = $_POST['phonenumber']; $mail->Body = $_POST['textmessage']; if(!$mail->send()) { echo "<div class='alert alert-dismissible alert-info'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Message could not be sent to employee.</strong> </div>" . " " . 'Mailer Error: ' . $mail->ErrorInfo; } else { echo "<div class='alert alert-dismissible alert-info'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> Message and link successfully sent to employee <strong>number</strong>. </div>"; } } $updateday = $_POST['updatelday']; $updatecode = $_POST['updateempcode']; $sql = "UPDATE tblemployees set LastDay = :updateday where EmpId = :updatecode"; $query = $dbh -> prepare($sql); $query->bindParam(':updatecode',$updatecode,PDO::PARAM_STR); $query->bindParam(':updateday',$updateday,PDO::PARAM_STR); $query->execute(); if($query->rowCount() > 0) { $updatecode = $_POST['updateempcode']; $comp = $_POST['prevcomp']; $area = $_POST['prevarea']; $dept = $_POST['prevdept']; $pos = $_POST['prevpos']; $stp = $_POST['prevstp']; $probi = $_POST['prevprobi']; $regular = $_POST['prevregular']; $updateday = $_POST['updatelday']; $sql = "INSERT INTO tbl_employment_history (empid, Prev_Company, Prev_Designation, Prev_Department, Prev_Position, Prev_STP_Date, Prev_Probationary_Date, Prev_Regularization_Date, Last_Day_Date) values (:updatecode, :comp, :area, :dept, :pos, :stp, :probi, :regular, :updateday)"; $query = $dbh -> prepare($sql); $query->bindParam(':updatecode',$updatecode,PDO::PARAM_STR); $query->bindParam(':comp',$comp,PDO::PARAM_STR); $query->bindParam(':area',$area,PDO::PARAM_STR); $query->bindParam(':dept',$dept,PDO::PARAM_STR); $query->bindParam(':pos',$pos,PDO::PARAM_STR); $query->bindParam(':stp',$stp,PDO::PARAM_STR); $query->bindParam(':probi',$probi,PDO::PARAM_STR); $query->bindParam(':regular',$regular,PDO::PARAM_STR); $query->bindParam(':updateday',$updateday,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> Employee <strong>Last Day and Employment history</strong> successfully updated. </div>" ; } } else { echo "<div class='alert alert-dismissible alert-danger'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> Failed to update employee <strong>last day</strong>. </div>" . " " . 'Error:' . $query->ErrorInfo; } } ?> <!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap CSS --> <link rel="stylesheet" href="includes/assets/bootstrap.min.css"> <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.3/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.1/css/dataTables.bootstrap5.min.css"/> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/responsive/2.3.0/css/responsive.bootstrap5.min.css"/> </head> <?php include('includes/sidebar.php');?> <body class="bg-dark"> <div class="container-fluid" style="padding-top: 70px;"> <div class="card"> <div class="card-header bg-primary text-white"> <?php if(isset($_POST['generate'])) { try { if (isset($_FILES['pdf_file']['name'])) { $lday = $_POST['lday']; $tdate = date("Y/m/d"); $emps=$_POST['empcode']; $file_name = $emps . $_FILES['pdf_file']['name']; $file_tmp = $_FILES['pdf_file']['tmp_name']; move_uploaded_file($file_tmp,"../resignationletter/".$file_name); $sql = "INSERT INTO tbl_releasing_file (Empid, Resignation_Letter, Resignation_Submitted, Date_Inserted, Last_Day) Values (:emps,:file_name, 1, :tdate, :lday)"; $query = $dbh -> prepare($sql); $query->bindParam(':emps',$emps,PDO::PARAM_STR); $query->bindParam(':file_name',$file_name,PDO::PARAM_STR); $query->bindParam(':tdate',$tdate,PDO::PARAM_STR); $query->bindParam(':lday',$lday,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>Resignation Letter successfully Added</strong> </div>"; } else { echo "<div class='alert alert-dismissible alert-warning'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Resignation Letter failed to Add</strong> </div>"; } } } catch (PDOexception $e) { echo "<div class='alert alert-dismissible alert-danger'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>Error in " . $e->getFile() . " on line " . $e->getLine() . ": " . $e->getMessage() . " contact HR Administrator</strong> </div>"; // Additional error message for the 'else' block echo "<div class='alert alert-dismissible alert-danger'> <button type='button' class='btn-close' data-bs-dismiss='alert'></button> <strong>An error occurred while saving resignation letter. Please try again or contact HR Administrator for assistance.</strong> </div>"; } } ?> </div> <div class="card-body bg-white"> <div class="col-md-12"> <div class="row"> <div class="col-md-3"> <div class="card"> <div class="card-header bg-primary text-white"> Generate Acceptance Letter </div> <div class="card-body"> <form method="POST" enctype="multipart/form-data" > <div class="col-md-12"> <label for="empcode" class="form-label text-black">List of Employee</label> <select class="form-select" id="empcode" name="empcode"> <option selected>Choose Employee Here</option> <?php $sql = "SELECT * FROM tblemployees where Status = 1 ORDER BY LastName"; $query = $dbh -> prepare($sql); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt=1; if($query->rowCount() > 0) { foreach($results as $employeelist) { $lastName = mb_convert_encoding($employeelist->LastName, 'UTF-8', 'UTF-8'); // No conversion if already UTF-8 $firstName = mb_convert_encoding($employeelist->FirstName, 'UTF-8', 'UTF-8'); $middleName = mb_convert_encoding($employeelist->MiddleName, 'UTF-8', 'UTF-8'); ?> <option value="<?php echo htmlentities($employeelist->EmpId)?>"><?php echo htmlentities($lastName . ', ' . $firstName . ' ' . $middleName, ENT_QUOTES, 'UTF-8'); ?> </option> <?php }} ?> </select> </div> <div class="col-md-12"> <label class="form-label text-black"> Enter Last Day </label> <input type="date" name="lday" id="lday" class="form-control"> <div class="form-group"> <label class="input-group-text text-white bg-primary" for="pdf_file">Resignation Letter Attachment Here(In PDF Format)</label> <input type="file" name="pdf_file" class="form-control" accept=".pdf" title="Upload PDF"/> </div> </div> <?php $sql = "SELECT * FROM tblemployees WHERE Position = 'Department Officer' and Department = 'Human Resources Department' and Status = 1"; $query = $dbh -> prepare($sql); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt=1; if($query->rowCount() > 0) { foreach($results as $resultss) { $lastName = mb_convert_encoding($resultss->LastName, 'UTF-8', 'UTF-8'); // No conversion if already UTF-8 $firstName = mb_convert_encoding($resultss->FirstName, 'UTF-8', 'UTF-8'); $middleName = mb_convert_encoding($resultss->MiddleName, 'UTF-8', 'UTF-8'); ?> <?php if ($resultss->MiddleName == 'N/A' || $resultss->MiddleName == 'n/a' || $resultss->MiddleName == 'N/a') { $fullname = $firstName . " " . $lastName; }else{ $fullname = $firstName . " " . $middleName . " " . $lastName; } ?> <input type="hidden" name="officername" id="officername" class="form-control" value="<?php echo $fullname ?>"> <input type="hidden" name="officerposition" id="officerposition" class="form-control" value="<?php echo htmlentities($resultss->Position);?>"> <?php }}?> <div class="col-md-12 mt-2"> <button class="form-control btn btn-primary text-white" id="generate" name="generate">Generate Acceptance Letter</button> </div> </form> </div> </div> </div> <div class="col-md-9"> <div class="card"> <div class="card-header bg-primary text-white"> List Of Receiver </div> <div class="card-body"> <table id="example" class="table table-bordered nowrap Responsive" style="width:100%"> <thead class="bg-info text-white"> <tr> <th>#</th> <th>Biocode</th> <th>Name</th> <th>R.Letter</th> <th>Acceptance Letter</th> <th>Date Release</th> <th>Status</th> <th>Date Received</th> <th>Actions</th> </tr> </thead> <tbody class="text-black"> <?php $sql = "SELECT tbl_releasing_file.id, tbl_releasing_file.Empid, tbl_releasing_file.Resignation_Letter, tbl_releasing_file.Resignation_Submitted, tbl_releasing_file.Date_Inserted, tbl_releasing_file.Letter_Of_Acceptance, tbl_releasing_file.isReceived_LOA, tbl_releasing_file.Loa_Date_Release, tbl_releasing_file.Loa_Date_Received, tbl_releasing_file.COE, tbl_releasing_file.isReceived_COE, tbl_releasing_file.COE_Date_Release, tbl_releasing_file.Status, tbl_releasing_file.Last_Day, tblemployees.EmpId, tblemployees.FirstName, tblemployees.MiddleName, tblemployees.LastName, tblemployees.Department, tblemployees.Position, tblemployees.Company, tblemployees.Status, tblemployees.Address, tblemployees.Gender, tblemployees.Phonenumber, tblemployees.Company_Area, tblemployees.DateofRegistration, tblemployees.Datehired, tblemployees.Dateregistered, tblemployees.EmailId FROM tbl_releasing_file, tblemployees WHERE tblemployees.EmpId = tbl_releasing_file.Empid and tblemployees.Status = 1"; $query= $dbh -> prepare($sql); $query-> execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt=1; if($query->rowCount() > 0) { foreach ($results as $release) { $lastName = mb_convert_encoding($release->LastName, 'UTF-8', 'UTF-8'); // No conversion if already UTF-8 $firstName = mb_convert_encoding($release->FirstName, 'UTF-8', 'UTF-8'); $middleName = mb_convert_encoding($release->MiddleName, 'UTF-8', 'UTF-8'); ?> <tr> <td><?php echo $cnt; ?></td> <td><?php echo htmlentities($release->EmpId); ?></td> <?php if ($release->MiddleName == 'N/A' || $release->MiddleName == 'n/a' || $release->MiddleName == 'N/a') { $fullname = $firstName . " " . $lastName; }else{ $fullname = $firstName . " " . $middleName . " " . $lastName; } ?> <td><?php echo htmlentities($fullname); ?></td> <td> <a href="../resignationletter/<?php echo $release->Resignation_Letter; ?>"><?php echo $release->Resignation_Letter; ?></a> </td> <td> <a href="letterofacceptance/<?php echo $release->Letter_Of_Acceptance; ?>"><?php echo $release->Letter_Of_Acceptance; ?></a> </td> <?php if($release->Loa_Date_Release == NULL){ ?> <td><span class="badge bg-warning">Not Specified</span></td> <?php }else{ ?> <td><span class="badge bg-primary"><?php echo $release->Loa_Date_Release;?></span></td> <?php } ?> <?php if($release->isReceived_LOA == 0){ ?> <td><span class="badge bg-warning">To Release</span></td> <?php }elseif($release->isReceived_LOA == 1){ ?> <td><span class="badge bg-info">To Received</span></td> <?php }elseif($release->isReceived_LOA == 2){?> <td><span class="badge bg-success">Letter Received</span></td> <?php }elseif($release->isReceived_LOA == 3){?> <td><span class="badge bg-success">Letter Received and Ready for Download</span></td> <?php } ?> <?php if($release->Loa_Date_Received == NULL){ ?> <td><span class="badge bg-warning">Not Specified</span></td> <?php }else{ ?> <td><span class="badge bg-primary"><?php echo $release->Loa_Date_Received;?></span></td> <?php } ?> <!-- <td><a href="COE/<?php echo $release->COE; ?>"><?php echo $release->COE;?></a></td> <?php if($release->COE_Date_Release == NULL) { ?> <td><span class="badge bg-warning">Not Specified</span></td> <?php }else{ ?> <td><span class="badge bg-info"><?php echo $release->COE_Date_Release;?></span></td> <?php } ?> <?php if($release->isReceived_COE == 0){ ?> <td><span class="badge bg-warning">To Release</span></td> <?php }elseif($release->isReceived_COE == 1){ ?> <td><span class="badge bg-info">To Received</span></td> <?php }elseif($release->isReceived_COE == 2){?> <td><span class="badge bg-success">Certificate Received</span></td> <?php } ?> --> <td> <div class="btn-group" role="group" aria-label="Button group with nested dropdown"> <button type="button" class="btn btn-primary"><img src="https://img.icons8.com/stickers/20/checklist.png" alt="checklist"/></button> <div class="btn-group bg-primary" role="group"> <button id="btnGroupDrop1" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button> <div class="dropdown-menu" aria-labelledby="btnGroupDrop1"> <?php if ($release->isReceived_LOA == 0) { ?> <a class="dropdown-item"> <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="<?php echo '#loa'. $release->id; ?>"> Release of LOA </button> </a> <a class="dropdown-item"> <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="<?php echo '#previewloa'. $release->id; ?>"> Preview of LOA </button> </a> <?php }else { ?> <a class="dropdown-item"> No Action Needed </a> <?php } ?> </div> </div> </div> </td> <div class="modal fade" id="<?php echo 'loa'. $release->id; ?>" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <form role="form" method="post" enctype="multipart/form-data"> <div class="modal-header bg-primary text-white"> <h5 class="modal-title" id="exampleModalLabel">Release of Acceptance Letter</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-white text-black"> <div class="col-md-12"> <div class="row"> <input type="hidden" name="idid" id="idid" value="<?php echo $release->id; ?>"> <input type="hidden" name="phonenumber" id="phonenumber" value="<?php echo $release->Phonenumber ?>"> <input type="hidden" name="updatelday" id="updatelday" value="<?php echo date("Y-m-d",strtotime($release->Last_Day)); ?>"> <input type="hidden" name="updateempcode" id="updateempcode" value="<?php echo $release->EmpId; ?>"> <input type="hidden" name="prevcomp" id="prevcomp" value="<?php echo $release->Company ?>"> <input type="hidden" name="prevarea" id="prevarea" value="<?php echo $release->Company_Area?>"> <input type="hidden" name="prevdept" id="prevdept" value="<?php echo $release->Department?>"> <input type="hidden" name="prevpos" id="prevpos" value="<?php echo $release->Position?>"> <input type="hidden" name="prevstp" id="prevstp" value="<?php echo $release->DateofRegistration?>"> <input type="hidden" name="prevprobi" id="prevprobi" value="<?php echo $release->Datehired?>"> <input type="hidden" name="prevregular" id="prevregular" value="<?php echo $release->Dateregistered?>"> <div class="col-md-12 form-group"> <label for="email">To Email:</label> <input type="email" class="form-control" id="email" name="email" placeholder="Enter your email" maxlength="50" class="form-control" value="<?php echo htmlentities($release->EmailId)?>" readonly> </div> <div class="col-md-12 form-group"> <label class="text-black" for="subject">Subject:</label> <input type="text" class="form-control" id="subject" class="form-control" name="subject" value="Letter of Acceptance" maxlength="50" readonly> </div> <div class="col-md-12 form-group"> <label class="text-black" for="name">Email Message To Employee:</label> <textarea class="form-control" type="textarea" id="message" class="form-control" name="message" placeholder="Your Message Here" maxlength="6000" rows="4" style="resize: none;"> <?php if ($release->MiddleName == 'N/A' || $release->MiddleName == 'n/a' || $release->MiddleName == 'N/a') { $fullname = $firstName . " " . $lastName; }else{ $fullname = $firstName . " " . $middleName . " " . $lastName; } ?> Dear Mr/Ms. <?php echo $fullname;?>, Kindly note that your Letter of Acceptance is available for download. Please log into your HRIS profile by <?php echo date("D, M. j, Y",strtotime($release->Last_Day)); ?>, before office hours end. Thank you for your prompt attention to this matter. Warm regards, Human Resources Department ***This is a system generated message do not reply.*** </textarea> </div> <div class="col-md-12 form-group"> <label class="text-black" for="name">Text Message To Employee:</label> <textarea class="form-control" type="textarea" id="textmessage" class="form-control" name="textmessage" placeholder="Your Message Here" maxlength="6000" rows="4"> <?php if ($release->MiddleName == 'N/A' || $release->MiddleName == 'n/a' || $release->MiddleName == 'N/a') { $fullname = $firstName . " " . $lastName; }else{ $fullname = $firstName . " " . $middleName . " " . $lastName; } ?> Dear Mr/Ms. <?php echo $fullname; ?>, Upon receipt of your resignation letter, we are pleased to inform you that your letter of acceptance has been uploaded to your Human Resources Information System (HRIS) profile. (www.hris.graciousphils.com) Kindly review and promptly sign the attached document. Your cooperation is greatly appreciated. To access, save, and print your acceptance letter, kindly log in to your HRIS account by the close of business hours on <?php echo date("D, M. j, Y",strtotime($release->Last_Day)); ?> . Failure to comply will result in the automatic deactivation of your account, thereby restricting access. This document serves as the formal acknowledgment of your resignation and contains vital information about the separation process. If you have any inquiries, we encourage you to promptly contact the Human Resources Department. Your communication and engagement are valued. We sincerely appreciate your dedicated efforts at our organization and extend our best wishes for success in all your future endeavors. Kind regards, Human Resources Department ***This is a system generated message do not reply.*** </textarea> </div> <!-- <div class="col-md-12 form-group"> <label for="name" class="text-black">Letter of Acceptance File:</label> <input name="file" multiple="multiple" class="form-control" type="file" id="file"> </div> --> <?php if ($release->Company == 'Gracious Group Lending Philippines Corp.') { ?> <div class="col-md-12 form-group"> <label class="text-black" for="name">Oozy Message:</label> <textarea class="form-control" type="textarea" id="oozymessage" name="oozymessage" placeholder="Your Message Here" maxlength="6000" rows="12">$DEAR GG <?php if ($release->MiddleName == 'N/A' || $release->MiddleName == 'n/a' || $release->MiddleName == 'N/a') { $fullname = $firstName . " " . $lastName; }else{ $fullname = $firstName . " " . $middleName . " " . $lastName; } ?> Good day! Please be informed that Mr/Ms. <?php echo $fullname; ?> of <?php echo $release->Department;?> has tendered his/her resignation with the company effective until the close of business hours of <?php echo $release->Last_Day; ?>. Please coordinate with HR for any concerns regarding his/her separation from the company. Thank you! *HR Dept. </textarea> </div> <?php }elseif ($release->Company == 'Faithful Servant Business Holdings Corp.') { ?> <div class="col-md-12 form-group"> <label class="text-black" for="name">Oozy Message:</label> <textarea class="form-control" type="textarea" id="oozymessage" name="oozymessage" placeholder="Your Message Here" maxlength="6000" rows="12">$DEAR FG <?php if ($release->MiddleName == 'N/A' || $release->MiddleName == 'n/a' || $release->MiddleName == 'N/a') { $fullname = $firstName . " " . $lastName; }else{ $fullname = $firstName . " " . $middleName . " " . $lastName; } ?> Good day! Please be informed that Mr/Ms. <?php echo $fullname; ?> of <?php echo $release->Department;?> has tendered his/her resignation with the company effective until the close of business hours of <?php echo $release->Last_Day; ?>. Please coordinate with HR for any concerns regarding his/her separation from the company. Thank you! *HR Dept. </textarea> </div> <?php }elseif ($release->Company == 'Fast Cash Business Credit Line Corp.'){ ?> <div class="col-md-12 form-group"> <label class="text-black" for="name">Oozy Message:</label> <textarea class="form-control" type="textarea" id="oozymessage" name="oozymessage" placeholder="Your Message Here" maxlength="6000" rows="12">$DEAR FC Good day! Please be informed that Mr/Ms. <?php echo $fullname; ?> of <?php echo $release->Department;?> has tendered his/her resignation with the company effective until the close of business hours of <?php echo $release->Last_Day; ?>. Please coordinate with HR for any concerns regarding his/her separation from the company. Thank you! *HR Dept. </textarea> </div> <?php }elseif ($release->Company == 'Laba Me Laundrette Services') { ?> <div class="col-md-12 form-group"> <label class="text-black" for="name">Oozy Message:</label> <textarea class="form-control" type="textarea" id="oozymessage" name="oozymessage" placeholder="Your Message Here" maxlength="6000" rows="12">$DEAR LM Good day! Please be informed that Mr/Ms. <?php echo $fullname; ?> of <?php echo $release->Department;?> has tendered his/her resignation with the company effective until the close of business hours of <?php echo $release->Last_Day; ?>. Please coordinate with HR for any concerns regarding his/her separation from the company. Thank you! *HR Dept. </textarea> </div> <?php }elseif ($release->Company == 'Koinonia Realty Corp.') { ?> <div class="col-md-12 form-group"> <label class="text-black" for="name">Oozy Message:</label> <textarea class="form-control" type="textarea" id="oozymessage" name="oozymessage" placeholder="Your Message Here" maxlength="6000" rows="12">$DEAR KOI Good day! Please be informed that Mr/Ms. <?php echo $fullname; ?> of <?php echo $release->Department;?> has tendered his/her resignation with the company effective until the close of business hours of <?php echo $release->Last_Day; ?>. Please coordinate with HR for any concerns regarding his/her separation from the company. Thank you! *HR Dept. </textarea> </div> <?php }elseif ($release->Company == 'SENSES') { ?> <div class="col-md-12 form-group"> <label class="text-black" for="name">Oozy Message:</label> <textarea class="form-control" type="textarea" id="oozymessage" name="oozymessage" placeholder="Your Message Here" maxlength="6000" rows="12">$HRIS SNS Good day! Please be informed that Mr/Ms. <?php echo $fullname; ?> of <?php echo $release->Department;?> has tendered his/her resignation with the company effective until the close of business hours of <?php echo $release->Last_Day; ?>. Please coordinate with HR for any concerns regarding his/her separation from the company. Thank you! *HR Dept. </textarea> </div> <?php } ?> </div> </div> </div> <div class="modal-footer bg-primary"> <button type="button" class="btn btn-danger" data-bs-dismiss="modal">Close</button> <button type="submit" name="sendmail" class="btn btn-primary border-white">Send</button> </div> </form> </div> </div> </div> <div class="modal fade" id="<?php echo 'previewloa'. $release->id; ?>" 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"> <form method="POST" action="convert-pdf.php"> <div class="modal-header bg-primary text-white"> <h5 class="modal-title" id="staticBackdropLabel"></h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body bg-white"> <div class="col-md-12"> <div class="card bg-white"> <div class="card-header text-white bg-primary"> <b><center>LETTER OF ACCEPTANCE</center></b> </div> <div class="card-body text-black bg-white"> <div class="content"> <?php $today = date("F j, Y"); ?> <p><?php echo $today;?></p> <br> <?php if ($release->MiddleName == 'N/A' || $release->MiddleName == 'n/a' || $release->MiddleName == 'N/a') { $fullname = $firstName . " " . $lastName; }else{ $fullname = $firstName . " " . $middleName . " " . $lastName; } ?> <b><?php echo $fullname?></b> <p><?php echo htmlentities($release->Address)?></p> <?php if($release->Gender == 'Male'){ ?> <p>Dear Mr. <?php echo htmlentities($lastName)?>,</p> <?php } else { ?> <p>Dear Ms. <?php echo htmlentities($lastName)?>,</p> <?php } ?> </div> <div class="content"> <p style="text-indent: 40pt;">Your Letter of Resignation has been accepted by Management. However, we still expect you to perform your duties and responsibilities with utmost dedication and professionalism until the close of business hours of <?php echo htmlentities(date("F j, Y ",strtotime($release->Last_Day)));?> which is the effectivity date of your separation with the Company.</p><br> <p style="text-indent: 40pt;">You shall be responsible for the processing and monitoring of your clearance which can be undertaken during your last two weeks in the Company.</p><br> <p style="text-indent: 40pt;">Once your clearance is completed, it shall be forwarded to Finance Department for the processing of the last salary, 13th month pay and other monetary claims less appropriate deductions like cash advances, unpaid loans and other accountabilities.</p><br> <p style="text-indent: 40pt;">Your last pay and other claims shall be released within 2-3 weeks from the time your clearance is completed.</p><br> <p style="text-indent: 40pt;">In event of your failure to process the required clearance within six (6) months from your separation with the Company, any financial entitlement shall be forfeited in favor of the Company.</p> <br> <p style="text-indent: 40pt;">We thank you for all the accomplishment and contributions which you’ve provided to the Company. Good Luck!</p><br><bn> <p>Respecfully yours,</p> <?php $sql = "SELECT * FROM tblemployees WHERE Position = 'Department Officer' and Department = 'Human Resources Department' and Status = 1"; $query = $dbh -> prepare($sql); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt=1; if($query->rowCount() > 0) { foreach($results as $resultss) { ?> <input type="hidden" name="imgfile" value="<?php echo htmlentities($resultss->My_Signature)?>"> <p><img src="../signatureupload/<?php echo $resultss->My_Signature?>" style="width: 100px; height: 100px;"></p> <?php if ($resultss->MiddleName == 'N/A' || $resultss->MiddleName == 'n/a' || $resultss->MiddleName == 'N/a') { ?> <p><?php echo htmlentities($resultss->FirstName . " " . $resultss->LastName)?></p> <?php }else{ ?> <p><?php echo htmlentities($resultss->FirstName . " " . $resultss->MiddleName . " " . $resultss->LastName)?></p> <?php } ?> <p><?php echo htmlentities($resultss->Position)?></p> <p><?php echo htmlentities($resultss->Department)?></p> <?php if ($resultss->MiddleName == 'N/A' || $resultss->MiddleName == 'n/a' || $resultss->MiddleName == 'N/a') { $fullname = $resultss->FirstName . " " . $resultss->LastName; }else{ $fullname = $resultss->FirstName . " " . $resultss->MiddleName . " " . $resultss->LastName; } ?> <input type="hidden" name="officernames" id="officernames" class="form-control" value="<?php echo htmlentities($fullname);?>"> <input type="hidden" name="positions" id="positions" class="form-control" value="<?php echo htmlentities($resultss->Position)?>"> <input type="hidden" name="departments" id="departments" class="form-control" value="<?php echo htmlentities($resultss->Department)?>"> <input type="hidden" name="companys" id="companys" class="form-control" value="<?php echo htmlentities($resultss->Company)?>"> <input type="hidden" name="empcodes" id="empcodes" class="form-control" value="<?php echo $release->EmpId;?>"> <input type="hidden" name="ldays" id="ldays" class="form-control" value="<?php echo $release->Last_Day?>"> <?php }}?> </div> </div> <div class="card-footer bg-primary"> <!-- <button type="submit" class="btn btn-success text-white" id="generates" name="generates">Convert Letter as PDF</button> --> <button type="button" class="btn btn-danger" data-bs-dismiss="modal">Close</button> </div> </div> </div> </div><!-- Modal body --> </form> </div><!-- Modal Content --> </div><!-- Modal Dialog --> </div> </tr> <?php $cnt++; } } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> <div class="card-footer bg-primary"> </div> </div> </div><!-- Container fluid --> <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/1.12.1/js/dataTables.bootstrap5.min.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/responsive/2.3.0/js/dataTables.responsive.min.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/responsive/2.3.0/js/responsive.bootstrap5.js"></script> <script type="text/javascript"> $(document).ready(function() { var table = $('#example').DataTable( { responsive: true } ); } ); </script> </body> </html> <?php } ?>