[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: schedule.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 = 'Employees Schedule'; $shopname = $_SESSION['business_name_Xw211qAAsq4']; $notificationType = "success"; if(isset($_POST['del'])){ $SID = filter_input(INPUT_POST, 'SID', FILTER_SANITIZE_STRING); $SID = htmlspecialchars($SID, ENT_QUOTES, 'UTF-8'); $stmt = $con->prepare("DELETE FROM employees WHERE employee_id = ?"); $stmt->execute(array($SID)); } if(isset($_POST['update'])){ $first_name = filter_input(INPUT_POST, 'first_name', FILTER_SANITIZE_STRING); $first_name = htmlspecialchars($first_name, ENT_QUOTES, 'UTF-8'); $last_name = filter_input(INPUT_POST, 'last_name', FILTER_SANITIZE_STRING); $last_name = htmlspecialchars($last_name, ENT_QUOTES, 'UTF-8'); $email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING); $email = htmlspecialchars($email, ENT_QUOTES, 'UTF-8'); $phone_number = filter_input(INPUT_POST, 'phone_number', FILTER_SANITIZE_STRING); $phone_number = htmlspecialchars($phone_number, ENT_QUOTES, 'UTF-8'); $employee_id = filter_input(INPUT_POST, 'employee_id', FILTER_SANITIZE_STRING); $employee_id = htmlspecialchars($employee_id, ENT_QUOTES, 'UTF-8'); $stmt_update_service = $con->prepare("UPDATE employees SET first_name = ?, last_name = ?, phone_number = ?,email = ? WHERE employee_id = ?"); $stmt_update_service->execute(array($first_name,$last_name,$phone_number,$email,$employee_id)); } } ?> <!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" /> <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">Employees Schedule</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-12"> <div class="card"> <?php if(isset($_GET['employee'])){ $do = htmlspecialchars($_GET['employee']); $stmt = $con->prepare("SELECT e.first_name,e.last_name,s.from_hour,s.to_hour,d.day FROM employees e,employees_schedule s,days d WHERE e.employee_id = s.employee_id and s.day_id = d.day_value and e.business_name = ? and e.employee_id = ? "); $stmt->execute(array($shopname,$do)); $rows_services = $stmt->fetchAll(); foreach($rows_services as $service){ } } ?> <div class="card-body"> <center><h3>Working days and time for <?php echo $service['first_name'].' '.$service['last_name'] ?></h3></center> <br /> <div class="table-responsive"> <table class="table table-bordered"> <thead style="background-color:#428bca;border:#428bca;"> <tr style="color: #ffffff;"> <th>Wroking Days</th> <th>Wroking start time </th> <th>Wroking end time </th> </tr> </thead> <tbody> <tr> <?php foreach($rows_services as $service){ ?> <td><?php echo $service['day'];?></td> <td><?php echo $time12hr = date("h:i A", strtotime($service['from_hour']));?></td> <td><?php echo $time12hr = date("h:i A", strtotime($service['to_hour']));?></td> </tr> <?php };?> </tbody> </table> </div> </div> <!-- end card body--> </div> <!-- end card --> </div><!-- end col--> </div> </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: 60.08 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