update cities
This commit is contained in:
parent
69846c8387
commit
d22f5a1d5d
@ -11,16 +11,28 @@ if ($method === 'POST') {
|
||||
$input = json_decode(file_get_contents('php://input'), true) ?? $_POST;
|
||||
$action = $input['action'] ?? '';
|
||||
|
||||
if ($action === 'add_city') {
|
||||
$name_en = $input['name_en'] ?? '';
|
||||
$name_ar = $input['name_ar'] ?? '';
|
||||
if ($action === 'add' || $action === 'add_city') {
|
||||
$name_en = $input['name_en'] ?? $input['name'] ?? '';
|
||||
$name_ar = $input['name_ar'] ?? $input['name'] ?? '';
|
||||
|
||||
if ($name_en && $name_ar) {
|
||||
try {
|
||||
$stmt = $db->prepare("INSERT INTO cities (name_en, name_ar) VALUES (?, ?)");
|
||||
$stmt->execute([$name_en, $name_ar]);
|
||||
$id = $db->lastInsertId();
|
||||
echo json_encode(['success' => true, 'id' => $id, 'name_en' => $name_en, 'name_ar' => $name_ar]);
|
||||
|
||||
$lang = $_SESSION['lang'] ?? 'en';
|
||||
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'id' => $id,
|
||||
'name_en' => $name_en,
|
||||
'name_ar' => $name_ar,
|
||||
'city' => [
|
||||
'id' => $id,
|
||||
'name' => ($lang === 'ar' && !empty($name_ar)) ? $name_ar : $name_en
|
||||
]
|
||||
]);
|
||||
} catch (Exception $e) {
|
||||
echo json_encode(['success' => false, 'error' => $e->getMessage()]);
|
||||
}
|
||||
|
||||
5
cookies.txt
Normal file
5
cookies.txt
Normal file
@ -0,0 +1,5 @@
|
||||
# Netscape HTTP Cookie File
|
||||
# https://curl.se/docs/http-cookies.html
|
||||
# This file was generated by libcurl! Edit at your own risk.
|
||||
|
||||
127.0.0.1 FALSE / FALSE 0 PHPSESSID hvh0shk5nt5h4nbcfvo601cpjc
|
||||
@ -76,7 +76,7 @@
|
||||
<select name="nationality" class="form-select select2-modal">
|
||||
<option value=""><?php echo __('search'); ?>...</option>
|
||||
<?php foreach ($all_countries as $c): ?>
|
||||
<option value="<?php echo htmlspecialchars($c); ?>"><?php echo htmlspecialchars($c); ?></option>
|
||||
<option value="<?php echo htmlspecialchars($c); ?>" <?php echo $c === 'Oman' ? 'selected' : ''; ?>><?php echo htmlspecialchars($c); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@ -280,7 +280,7 @@ $site_favicon = !empty($site_settings['company_favicon']) ? $site_settings['comp
|
||||
</button>
|
||||
<div class="collapse navbar-collapse justify-content-end" id="topNav">
|
||||
<div class="d-flex align-items-center">
|
||||
<a href="?lang=<?php echo get_lang_code(); ?>" class="btn btn-outline-secondary btn-sm me-3">
|
||||
<a href="?lang=<?php echo get_lang_code() === 'ar' ? 'en' : 'ar'; ?>" class="btn btn-outline-secondary btn-sm me-3">
|
||||
<i class="bi bi-translate"></i> <?php echo get_lang_name(); ?>
|
||||
</a>
|
||||
<div class="dropdown">
|
||||
|
||||
@ -55,9 +55,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_attendance'])) {
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h1 class="h3 mb-0 text-gray-800">Attendance Logs</h1>
|
||||
<h1 class="h3 mb-0 text-gray-800"><?php echo __("attendance_logs"); ?></h1>
|
||||
<button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#addAttendanceModal">
|
||||
<i class="fas fa-plus"></i> Manual Entry
|
||||
<i class="fas fa-plus"></i> <?php echo __("manual_entry"); ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -66,7 +66,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_attendance'])) {
|
||||
<div class="card-body">
|
||||
<form method="GET" class="form-inline">
|
||||
<select name="employee_id" class="form-control mr-2 mb-2">
|
||||
<option value="">All Employees</option>
|
||||
<option value=""><?php echo __("all_employees"); ?></option>
|
||||
<?php foreach ($employees as $id => $name): ?>
|
||||
<option value="<?php echo $id; ?>" <?php echo (isset($_GET['employee_id']) && $_GET['employee_id'] == $id) ? 'selected' : ''; ?>>
|
||||
<?php echo htmlspecialchars($name); ?>
|
||||
@ -74,7 +74,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_attendance'])) {
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<input type="date" name="date" class="form-control mr-2 mb-2" value="<?php echo $_GET['date'] ?? ''; ?>">
|
||||
<button type="submit" class="btn btn-primary mb-2">Filter</button>
|
||||
<button type="submit" class="btn btn-primary mb-2"><?php echo __("filter"); ?></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@ -86,13 +86,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_attendance'])) {
|
||||
<table class="table table-bordered" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Employee</th>
|
||||
<th>Date</th>
|
||||
<th>Check In</th>
|
||||
<th>Check Out</th>
|
||||
<th>Status</th>
|
||||
<th>Source</th>
|
||||
<th><?php echo __("id"); ?></th>
|
||||
<th><?php echo __("employee"); ?></th>
|
||||
<th><?php echo __("date"); ?></th>
|
||||
<th><?php echo __("check_in"); ?></th>
|
||||
<th><?php echo __("check_out"); ?></th>
|
||||
<th><?php echo __("status"); ?></th>
|
||||
<th><?php echo __("source"); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -115,7 +115,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_attendance'])) {
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php if (empty($logs)): ?>
|
||||
<tr><td colspan="7" class="text-center">No logs found</td></tr>
|
||||
<tr><td colspan="7" class="text-center"><?php echo __("no_logs_found"); ?></td></tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -145,7 +145,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_attendance'])) {
|
||||
<form method="POST">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Add Attendance Log</h5>
|
||||
<h5 class="modal-title"><?php echo __("add_attendance_log"); ?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
@ -153,7 +153,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_attendance'])) {
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="add_attendance" value="1">
|
||||
<div class="form-group">
|
||||
<label>Employee</label>
|
||||
<label><?php echo __("employee"); ?></label>
|
||||
<select name="employee_id" class="form-control" required>
|
||||
<?php foreach ($employees as $id => $name): ?>
|
||||
<option value="<?php echo $id; ?>"><?php echo htmlspecialchars($name); ?></option>
|
||||
@ -161,32 +161,32 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_attendance'])) {
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Date</label>
|
||||
<label><?php echo __("date"); ?></label>
|
||||
<input type="date" name="date" class="form-control" required value="<?php echo date('Y-m-d'); ?>">
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-6">
|
||||
<label>Check In Time</label>
|
||||
<label><?php echo __("check_in_time"); ?></label>
|
||||
<input type="time" name="check_in" class="form-control">
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label>Check Out Time</label>
|
||||
<label><?php echo __("check_out_time"); ?></label>
|
||||
<input type="time" name="check_out" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Status</label>
|
||||
<label><?php echo __("status"); ?></label>
|
||||
<select name="status" class="form-control">
|
||||
<option value="Present">Present</option>
|
||||
<option value="Late">Late</option>
|
||||
<option value="Absent">Absent</option>
|
||||
<option value="On Leave">On Leave</option>
|
||||
<option value="Present"><?php echo __("present"); ?></option>
|
||||
<option value="Late"><?php echo __("late"); ?></option>
|
||||
<option value="Absent"><?php echo __("absent"); ?></option>
|
||||
<option value="On Leave"><?php echo __("on_leave"); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="submit" class="btn btn-primary">Save</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo __("close"); ?></button>
|
||||
<button type="submit" class="btn btn-primary"><?php echo __("save"); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -24,11 +24,11 @@ $recent_attendance = $pdo->query("
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h1 class="h3 mb-0 text-gray-800">HR Dashboard</h1>
|
||||
<h1 class="h3 mb-0 text-gray-800"><?php echo __("hr_dashboard"); ?></h1>
|
||||
<div>
|
||||
<a href="employees.php" class="btn btn-sm btn-primary shadow-sm"><i class="fas fa-users fa-sm text-white-50"></i> Employees</a>
|
||||
<a href="hr_attendance.php" class="btn btn-sm btn-info shadow-sm"><i class="fas fa-clock fa-sm text-white-50"></i> Attendance</a>
|
||||
<a href="hr_leaves.php" class="btn btn-sm btn-warning shadow-sm"><i class="fas fa-calendar-minus fa-sm text-white-50"></i> Leave Requests</a>
|
||||
<a href="employees.php" class="btn btn-sm btn-primary shadow-sm"><i class="fas fa-users fa-sm text-white-50"></i> <?php echo __("employees"); ?></a>
|
||||
<a href="hr_attendance.php" class="btn btn-sm btn-info shadow-sm"><i class="fas fa-clock fa-sm text-white-50"></i> <?php echo __("attendance"); ?></a>
|
||||
<a href="hr_leaves.php" class="btn btn-sm btn-warning shadow-sm"><i class="fas fa-calendar-minus fa-sm text-white-50"></i> <?php echo __("leave_requests"); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -39,7 +39,7 @@ $recent_attendance = $pdo->query("
|
||||
<div class="card-body">
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-primary text-uppercase mb-1">Total Employees</div>
|
||||
<div class="text-xs font-weight-bold text-primary text-uppercase mb-1">Total <?php echo __("employees"); ?></div>
|
||||
<div class="h5 mb-0 font-weight-bold text-gray-800"><?php echo $total_employees; ?></div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
@ -55,7 +55,7 @@ $recent_attendance = $pdo->query("
|
||||
<div class="card-body">
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-success text-uppercase mb-1">Present Today</div>
|
||||
<div class="text-xs font-weight-bold text-success text-uppercase mb-1"><?php echo __("present_today"); ?></div>
|
||||
<div class="h5 mb-0 font-weight-bold text-gray-800"><?php echo $present_today; ?></div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
@ -71,7 +71,7 @@ $recent_attendance = $pdo->query("
|
||||
<div class="card-body">
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-info text-uppercase mb-1">On Leave Today</div>
|
||||
<div class="text-xs font-weight-bold text-info text-uppercase mb-1"><?php echo __("on_leave_today"); ?></div>
|
||||
<div class="h5 mb-0 font-weight-bold text-gray-800"><?php echo $on_leave_today; ?></div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
@ -87,7 +87,7 @@ $recent_attendance = $pdo->query("
|
||||
<div class="card-body">
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-warning text-uppercase mb-1">Pending Requests</div>
|
||||
<div class="text-xs font-weight-bold text-warning text-uppercase mb-1"><?php echo __("pending_requests"); ?></div>
|
||||
<div class="h5 mb-0 font-weight-bold text-gray-800"><?php echo $pending_leaves; ?></div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
@ -104,17 +104,17 @@ $recent_attendance = $pdo->query("
|
||||
<div class="col-lg-6 mb-4">
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Recent Attendance Logs</h6>
|
||||
<h6 class="m-0 font-weight-bold text-primary"><?php echo __("recent_attendance_logs"); ?></h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Employee</th>
|
||||
<th>Status</th>
|
||||
<th>Time</th>
|
||||
<th>Source</th>
|
||||
<th><?php echo __("employee"); ?></th>
|
||||
<th><?php echo __("status"); ?></th>
|
||||
<th><?php echo __("time"); ?></th>
|
||||
<th><?php echo __("source"); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -130,14 +130,14 @@ $recent_attendance = $pdo->query("
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
In: <?php echo $log['check_in'] ? date('H:i', strtotime($log['check_in'])) : '-'; ?><br>
|
||||
Out: <?php echo $log['check_out'] ? date('H:i', strtotime($log['check_out'])) : '-'; ?>
|
||||
<?php echo __('check_in'); ?>: <?php echo $log['check_in'] ? date('H:i', strtotime($log['check_in'])) : '-'; ?><br><br>
|
||||
<?php echo __('check_out'); ?>: <?php echo $log['check_out'] ? date('H:i', strtotime($log['check_out'])) : '-'; ?>
|
||||
</td>
|
||||
<td><?php echo htmlspecialchars($log['source']); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php if(empty($recent_attendance)): ?>
|
||||
<tr><td colspan="4" class="text-center">No logs today</td></tr>
|
||||
<tr><td colspan="4" class="text-center"><?php echo __("no_logs_today"); ?></td></tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -150,23 +150,23 @@ $recent_attendance = $pdo->query("
|
||||
<div class="col-lg-6 mb-4">
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-info">Simulate Biometric Device Push</h6>
|
||||
<h6 class="m-0 font-weight-bold text-info"><?php echo __("simulate_biometric_device_push"); ?></h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p>Use this form to test biometric integration. In a real scenario, the device POSTs to <code>/api/biometric_push.php</code>.</p>
|
||||
<form id="biometricSimForm">
|
||||
<div class="form-group">
|
||||
<label>Employee ID</label>
|
||||
<label><?php echo __("employee_id"); ?></label>
|
||||
<input type="number" class="form-control" name="employee_id" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Type</label>
|
||||
<label><?php echo __("type"); ?></label>
|
||||
<select class="form-control" name="type">
|
||||
<option value="check_in">Check In</option>
|
||||
<option value="check_out">Check Out</option>
|
||||
<option value="check_in"><?php echo __("check_in"); ?></option>
|
||||
<option value="check_out"><?php echo __("check_out"); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-block">Simulate Push</button>
|
||||
<button type="submit" class="btn btn-primary btn-block"><?php echo __("simulate_push"); ?></button>
|
||||
</form>
|
||||
<div id="simResult" class="mt-3"></div>
|
||||
</div>
|
||||
|
||||
@ -65,9 +65,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h1 class="h3 mb-0 text-gray-800">Leave Requests</h1>
|
||||
<h1 class="h3 mb-0 text-gray-800"><?php echo __("leave_requests"); ?></h1>
|
||||
<button class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#addLeaveModal">
|
||||
<i class="fas fa-plus"></i> New Request
|
||||
<i class="fas fa-plus"></i> <?php echo __("new_request"); ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -76,12 +76,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<div class="card-body">
|
||||
<form method="GET" class="d-flex align-items-center">
|
||||
<select name="status" class="form-select me-2" style="width: auto;">
|
||||
<option value="">All Statuses</option>
|
||||
<option value="Pending" <?php echo (isset($_GET['status']) && $_GET['status'] == 'Pending') ? 'selected' : ''; ?>>Pending</option>
|
||||
<option value="Approved" <?php echo (isset($_GET['status']) && $_GET['status'] == 'Approved') ? 'selected' : ''; ?>>Approved</option>
|
||||
<option value="Rejected" <?php echo (isset($_GET['status']) && $_GET['status'] == 'Rejected') ? 'selected' : ''; ?>>Rejected</option>
|
||||
<option value=""><?php echo __("all_statuses"); ?></option>
|
||||
<option value="Pending" <?php echo (isset($_GET['status']) && $_GET['status'] == 'Pending') ? 'selected' : ''; ?>><?php echo __("pending"); ?></option>
|
||||
<option value="Approved" <?php echo (isset($_GET['status']) && $_GET['status'] == 'Approved') ? 'selected' : ''; ?>><?php echo __("approved"); ?></option>
|
||||
<option value="Rejected" <?php echo (isset($_GET['status']) && $_GET['status'] == 'Rejected') ? 'selected' : ''; ?>><?php echo __("rejected"); ?></option>
|
||||
</select>
|
||||
<button type="submit" class="btn btn-primary">Filter</button>
|
||||
<button type="submit" class="btn btn-primary"><?php echo __("filter"); ?></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@ -93,13 +93,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<table class="table table-bordered" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Employee</th>
|
||||
<th>Type</th>
|
||||
<th>Duration</th>
|
||||
<th>Days</th>
|
||||
<th>Reason</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
<th><?php echo __("employee"); ?></th>
|
||||
<th><?php echo __("type"); ?></th>
|
||||
<th><?php echo __("duration"); ?></th>
|
||||
<th><?php echo __("days"); ?></th>
|
||||
<th><?php echo __("reason"); ?></th>
|
||||
<th><?php echo __("status"); ?></th>
|
||||
<th><?php echo __("actions"); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -124,22 +124,22 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<?php if($req['status'] == 'Pending'): ?>
|
||||
<form method="POST" style="display:inline;">
|
||||
<input type="hidden" name="id" value="<?php echo $req['id']; ?>">
|
||||
<button type="submit" name="approve_leave" class="btn btn-success btn-sm" title="Approve"><i class="fas fa-check"></i></button>
|
||||
<button type="submit" name="approve_leave" class="btn btn-success btn-sm" title="<?php echo __("approve"); ?>"><i class="fas fa-check"></i></button>
|
||||
</form>
|
||||
<form method="POST" style="display:inline;">
|
||||
<input type="hidden" name="id" value="<?php echo $req['id']; ?>">
|
||||
<button type="submit" name="reject_leave" class="btn btn-danger btn-sm" title="Reject"><i class="fas fa-times"></i></button>
|
||||
<button type="submit" name="reject_leave" class="btn btn-danger btn-sm" title="<?php echo __("reject"); ?>"><i class="fas fa-times"></i></button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<form method="POST" style="display:inline;" onsubmit="return confirm('Delete this request?');">
|
||||
<form method="POST" style="display:inline;" onsubmit="return confirm('<?php echo __("confirm_delete_request"); ?>');">
|
||||
<input type="hidden" name="id" value="<?php echo $req['id']; ?>">
|
||||
<button type="submit" name="delete_leave" class="btn btn-secondary btn-sm" title="Delete"><i class="fas fa-trash"></i></button>
|
||||
<button type="submit" name="delete_leave" class="btn btn-secondary btn-sm" title="<?php echo __("delete"); ?>"><i class="fas fa-trash"></i></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php if (empty($requests)): ?>
|
||||
<tr><td colspan="7" class="text-center">No requests found</td></tr>
|
||||
<tr><td colspan="7" class="text-center"><?php echo __("no_requests_found"); ?></td></tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -168,13 +168,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<form method="POST">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Request Leave</h5>
|
||||
<h5 class="modal-title"><?php echo __("request_leave"); ?></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="add_leave" value="1">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Employee</label>
|
||||
<label class="form-label"><?php echo __("employee"); ?></label>
|
||||
<select name="employee_id" class="form-select" required>
|
||||
<?php foreach ($employees as $id => $name): ?>
|
||||
<option value="<?php echo $id; ?>"><?php echo htmlspecialchars($name); ?></option>
|
||||
@ -182,32 +182,32 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Leave Type</label>
|
||||
<label class="form-label"><?php echo __("leave_type"); ?></label>
|
||||
<select name="leave_type" class="form-select">
|
||||
<option value="Annual">Annual</option>
|
||||
<option value="Sick">Sick</option>
|
||||
<option value="Casual">Casual</option>
|
||||
<option value="Unpaid">Unpaid</option>
|
||||
<option value="Annual"><?php echo __("annual"); ?></option>
|
||||
<option value="Sick"><?php echo __("sick"); ?></option>
|
||||
<option value="Casual"><?php echo __("casual"); ?></option>
|
||||
<option value="Unpaid"><?php echo __("unpaid"); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label">Start Date</label>
|
||||
<label class="form-label"><?php echo __("start_date"); ?></label>
|
||||
<input type="date" name="start_date" class="form-control" required>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label">End Date</label>
|
||||
<label class="form-label"><?php echo __("end_date"); ?></label>
|
||||
<input type="date" name="end_date" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Reason</label>
|
||||
<label class="form-label"><?php echo __("reason"); ?></label>
|
||||
<textarea name="reason" class="form-control" rows="2"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><?php echo __("close"); ?></button>
|
||||
<button type="submit" class="btn btn-primary"><?php echo __("submit"); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
210
lang.php
210
lang.php
@ -464,7 +464,49 @@ $translations = array (
|
||||
'none' => 'None',
|
||||
'ssl' => 'SSL',
|
||||
'tls' => 'TLS',
|
||||
'room_number' => 'Room Number'
|
||||
'room_number' => 'Room Number',
|
||||
'hr_dashboard' => 'HR Dashboard',
|
||||
'attendance_logs' => 'Attendance Logs',
|
||||
'total_employees' => 'Total Employees',
|
||||
'present_today' => 'Present Today',
|
||||
'on_leave_today' => 'On Leave Today',
|
||||
'pending_requests' => 'Pending Requests',
|
||||
'recent_attendance_logs' => 'Recent Attendance Logs',
|
||||
'employee' => 'Employee',
|
||||
'source' => 'Source',
|
||||
'no_logs_today' => 'No logs today',
|
||||
'simulate_biometric_device_push' => 'Simulate Biometric Device Push',
|
||||
'employee_id' => 'Employee ID',
|
||||
'check_in' => 'Check In',
|
||||
'check_out' => 'Check Out',
|
||||
'simulate_push' => 'Simulate Push',
|
||||
'manual_entry' => 'Manual Entry',
|
||||
'all_employees' => 'All Employees',
|
||||
'id' => 'ID',
|
||||
'no_logs_found' => 'No logs found',
|
||||
'add_attendance_log' => 'Add Attendance Log',
|
||||
'check_in_time' => 'Check In Time',
|
||||
'check_out_time' => 'Check Out Time',
|
||||
'present' => 'Present',
|
||||
'late' => 'Late',
|
||||
'absent' => 'Absent',
|
||||
'on_leave' => 'On Leave',
|
||||
'new_request' => 'New Request',
|
||||
'approved' => 'Approved',
|
||||
'rejected' => 'Rejected',
|
||||
'duration' => 'Duration',
|
||||
'days' => 'Days',
|
||||
'no_requests_found' => 'No requests found',
|
||||
'request_leave' => 'Request Leave',
|
||||
'leave_type' => 'Leave Type',
|
||||
'annual' => 'Annual',
|
||||
'sick' => 'Sick',
|
||||
'casual' => 'Casual',
|
||||
'unpaid' => 'Unpaid',
|
||||
'submit' => 'Submit',
|
||||
'approve' => 'Approve',
|
||||
'reject' => 'Reject',
|
||||
'confirm_delete_request' => 'Are you sure you want to delete this request?'
|
||||
),
|
||||
'ar' =>
|
||||
array (
|
||||
@ -805,67 +847,67 @@ $translations = array (
|
||||
'upload_failed' => 'File upload failed',
|
||||
'profile_updated_successfully' => 'Profile updated successfully',
|
||||
'error_updating_profile' => 'Error updating profile',
|
||||
'settings_updated_successfully' => 'Settings updated successfully.',
|
||||
'company_details' => 'Company Details',
|
||||
'company_name' => 'Company Name',
|
||||
'company_email' => 'Company Email',
|
||||
'company_phone' => 'Company Phone',
|
||||
'company_address' => 'Company Address',
|
||||
'ctr_no' => 'CR No.',
|
||||
'registration_no' => 'Registration No.',
|
||||
'vat_no' => 'VAT No.',
|
||||
'timezone' => 'Timezone',
|
||||
'working_hours_start' => 'Working Hours Start',
|
||||
'working_hours_end' => 'Working Hours End',
|
||||
'currency_settings' => 'Currency Settings',
|
||||
'currency_symbol' => 'Currency Symbol',
|
||||
'decimal_digits' => 'Decimal Digits',
|
||||
'company_logo' => 'Company Logo',
|
||||
'company_favicon' => 'Company Favicon',
|
||||
'civil_id' => 'Civil ID',
|
||||
'nationality' => 'Nationality',
|
||||
'dob' => 'Date of Birth',
|
||||
'gender' => 'Gender',
|
||||
'blood_group' => 'Blood Group',
|
||||
'insurance_company' => 'Insurance Company',
|
||||
'address' => 'Address',
|
||||
'male' => 'Male',
|
||||
'female' => 'Female',
|
||||
'other' => 'Other',
|
||||
'edit_patient' => 'Edit Patient',
|
||||
'delete_patient' => 'Delete Patient',
|
||||
'confirm_delete' => 'Are you sure you want to delete',
|
||||
'add_doctor' => 'Add Doctor',
|
||||
'edit_doctor' => 'Edit Doctor',
|
||||
'specialization_en' => 'Specialization (English)',
|
||||
'specialization_ar' => 'Specialization (Arabic)',
|
||||
'hr_management' => 'HR Management',
|
||||
'attendance' => 'Attendance',
|
||||
'leave_requests' => 'Leave Requests',
|
||||
'add_employee' => 'Add Employee',
|
||||
'edit_employee' => 'Edit Employee',
|
||||
'delete_employee' => 'Delete Employee',
|
||||
'select_position' => 'Select Position',
|
||||
'no_employees_found' => 'No employees found',
|
||||
'visit_settings' => 'Visit Settings',
|
||||
'disable_visit_edit_24h' => 'Disable editing visits after 24 hours',
|
||||
'disable_visit_edit_24h_desc' => 'If enabled, visits cannot be edited 24 hours after their creation.',
|
||||
'details' => 'Details',
|
||||
'vitals' => 'Vitals',
|
||||
'symptoms_diagnosis' => 'Symptoms & Diagnosis',
|
||||
'treatment_plan' => 'Treatment Plan',
|
||||
'prescriptions' => 'Prescriptions',
|
||||
'weight' => 'Weight',
|
||||
'blood_pressure' => 'Blood Pressure',
|
||||
'heart_rate' => 'Heart Rate',
|
||||
'temperature' => 'Temperature',
|
||||
'symptoms' => 'Symptoms',
|
||||
'diagnosis' => 'Diagnosis',
|
||||
'drug_name' => 'Drug Name',
|
||||
'dosage' => 'Dosage',
|
||||
'instructions' => 'Instructions',
|
||||
'add_drug' => 'Add Drug',
|
||||
'nursing_notes' => 'Nursing Notes',
|
||||
'settings_updated_successfully' => 'تم تحديث الإعدادات بنجاح.',
|
||||
'company_details' => 'تفاصيل الشركة',
|
||||
'company_name' => 'اسم الشركة',
|
||||
'company_email' => 'البريد الإلكتروني للشركة',
|
||||
'company_phone' => 'هاتف الشركة',
|
||||
'company_address' => 'عنوان الشركة',
|
||||
'ctr_no' => 'رقم السجل التجاري',
|
||||
'registration_no' => 'رقم التسجيل',
|
||||
'vat_no' => 'الرقم الضريبي',
|
||||
'timezone' => 'المنطقة الزمنية',
|
||||
'working_hours_start' => 'بداية ساعات العمل',
|
||||
'working_hours_end' => 'نهاية ساعات العمل',
|
||||
'currency_settings' => 'إعدادات العملة',
|
||||
'currency_symbol' => 'رمز العملة',
|
||||
'decimal_digits' => 'الخانات العشرية',
|
||||
'company_logo' => 'شعار الشركة',
|
||||
'company_favicon' => 'أيقونة الشركة',
|
||||
'civil_id' => 'الرقم المدني',
|
||||
'nationality' => 'الجنسية',
|
||||
'dob' => 'تاريخ الميلاد',
|
||||
'gender' => 'الجنس',
|
||||
'blood_group' => 'فصيلة الدم',
|
||||
'insurance_company' => 'شركة التأمين',
|
||||
'address' => 'العنوان',
|
||||
'male' => 'ذكر',
|
||||
'female' => 'أنثى',
|
||||
'other' => 'أخرى',
|
||||
'edit_patient' => 'تعديل بيانات المريض',
|
||||
'delete_patient' => 'حذف المريض',
|
||||
'confirm_delete' => 'هل أنت متأكد أنك تريد الحذف',
|
||||
'add_doctor' => 'إضافة طبيب',
|
||||
'edit_doctor' => 'تعديل بيانات الطبيب',
|
||||
'specialization_en' => 'التخصص (إنجليزي)',
|
||||
'specialization_ar' => 'التخصص (عربي)',
|
||||
'hr_management' => 'الموارد البشرية',
|
||||
'attendance' => 'الحضور والانصراف',
|
||||
'leave_requests' => 'طلبات الإجازة',
|
||||
'add_employee' => 'إضافة موظف',
|
||||
'edit_employee' => 'تعديل بيانات الموظف',
|
||||
'delete_employee' => 'حذف الموظف',
|
||||
'select_position' => 'اختر الوظيفة',
|
||||
'no_employees_found' => 'لا يوجد موظفين',
|
||||
'visit_settings' => 'إعدادات الزيارة',
|
||||
'disable_visit_edit_24h' => 'منع تعديل الزيارات بعد 24 ساعة',
|
||||
'disable_visit_edit_24h_desc' => 'إذا تم التفعيل، لن يمكن تعديل الزيارة بعد 24 ساعة من إنشائها.',
|
||||
'details' => 'التفاصيل',
|
||||
'vitals' => 'العلامات الحيوية',
|
||||
'symptoms_diagnosis' => 'الأعراض والتشخيص',
|
||||
'treatment_plan' => 'خطة العلاج',
|
||||
'prescriptions' => 'الوصفات الطبية',
|
||||
'weight' => 'الوزن',
|
||||
'blood_pressure' => 'ضغط الدم',
|
||||
'heart_rate' => 'معدل ضربات القلب',
|
||||
'temperature' => 'درجة الحرارة',
|
||||
'symptoms' => 'الأعراض',
|
||||
'diagnosis' => 'التشخيص',
|
||||
'drug_name' => 'اسم الدواء',
|
||||
'dosage' => 'الجرعة',
|
||||
'instructions' => 'التعليمات',
|
||||
'add_drug' => 'إضافة دواء',
|
||||
'nursing_notes' => 'ملاحظات التمريض',
|
||||
'issue_new_token' => 'Issue New Token',
|
||||
'select_patient' => 'Select Patient',
|
||||
'showing_last_50_patients' => 'Showing last 50 registered patients',
|
||||
@ -934,6 +976,48 @@ $translations = array (
|
||||
'none' => 'بدون',
|
||||
'ssl' => 'SSL',
|
||||
'tls' => 'TLS',
|
||||
'room_number' => 'رقم الغرفة'
|
||||
'room_number' => 'رقم الغرفة',
|
||||
'hr_dashboard' => 'لوحة معلومات الموارد البشرية',
|
||||
'attendance_logs' => 'سجلات الحضور',
|
||||
'total_employees' => 'إجمالي الموظفين',
|
||||
'present_today' => 'حاضر اليوم',
|
||||
'on_leave_today' => 'في إجازة اليوم',
|
||||
'pending_requests' => 'الطلبات المعلقة',
|
||||
'recent_attendance_logs' => 'سجلات الحضور الحديثة',
|
||||
'employee' => 'الموظف',
|
||||
'source' => 'المصدر',
|
||||
'no_logs_today' => 'لا توجد سجلات اليوم',
|
||||
'simulate_biometric_device_push' => 'محاكاة دفع جهاز البصمة',
|
||||
'employee_id' => 'معرف الموظف',
|
||||
'check_in' => 'تسجيل الدخول',
|
||||
'check_out' => 'تسجيل الخروج',
|
||||
'simulate_push' => 'محاكاة الدفع',
|
||||
'manual_entry' => 'إدخال يدوي',
|
||||
'all_employees' => 'جميع الموظفين',
|
||||
'id' => 'المعرف',
|
||||
'no_logs_found' => 'لا توجد سجلات',
|
||||
'add_attendance_log' => 'إضافة سجل حضور',
|
||||
'check_in_time' => 'وقت تسجيل الدخول',
|
||||
'check_out_time' => 'وقت تسجيل الخروج',
|
||||
'present' => 'حاضر',
|
||||
'late' => 'متأخر',
|
||||
'absent' => 'غائب',
|
||||
'on_leave' => 'في إجازة',
|
||||
'new_request' => 'طلب جديد',
|
||||
'approved' => 'موافق عليه',
|
||||
'rejected' => 'مرفوض',
|
||||
'duration' => 'المدة',
|
||||
'days' => 'الأيام',
|
||||
'no_requests_found' => 'لا توجد طلبات',
|
||||
'request_leave' => 'طلب إجازة',
|
||||
'leave_type' => 'نوع الإجازة',
|
||||
'annual' => 'سنوية',
|
||||
'sick' => 'مرضية',
|
||||
'casual' => 'عارضة',
|
||||
'unpaid' => 'غير مدفوعة',
|
||||
'submit' => 'إرسال',
|
||||
'approve' => 'موافقة',
|
||||
'reject' => 'رفض',
|
||||
'confirm_delete_request' => 'هل أنت متأكد من حذف هذا الطلب؟'
|
||||
)
|
||||
);
|
||||
|
||||
@ -16,7 +16,7 @@ try {
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<?php require_once __DIR__ . "/helpers.php"; ?><html lang="<?php echo get_lang_code(); ?>" dir="<?php echo get_dir(); ?>">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user