1253 lines
117 KiB
PHP
Executable File
1253 lines
117 KiB
PHP
Executable File
<?php
|
|
require_once('fixed/config/go_con.php');
|
|
access(77);
|
|
|
|
$today = date("Y-m-d");
|
|
if (!empty($_GET['date'])) {
|
|
$today = $_GET['date'];
|
|
if (DateTime::createFromFormat('Y-m-d', $today) == false) {
|
|
$today = date("Y-m-d");
|
|
}
|
|
}
|
|
|
|
if($commercial_register_id != 5) {
|
|
echo "<script>window.location.href = 'book';</script>";
|
|
} else {
|
|
$_SESSION['commercial_register_id'] = 5;
|
|
}
|
|
|
|
$branch_id = 9;
|
|
$branch_sql = '`branch_id`='.$branch_id;
|
|
|
|
$data = array(
|
|
'status' => array(
|
|
'times' => array(),
|
|
'pray_time' => array('12:00:00','15:00:00'),
|
|
),
|
|
'emplyees' => array(),
|
|
);
|
|
|
|
|
|
$Next = date('Y-m-d', strtotime('+1 day', strtotime($today)));
|
|
$Previous = date('Y-m-d', strtotime('-1 day', strtotime($today)));
|
|
$Day = date('D', strtotime($today));
|
|
$Day_s = date('d', strtotime($today));
|
|
|
|
function Day_ar()
|
|
{
|
|
global $Day;
|
|
$find = array("Sat", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri");
|
|
$replace = array("السبت", "الأحد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة");
|
|
$ar_day_format = $Day;
|
|
$Day_ar = str_replace($find, $replace, $ar_day_format);
|
|
|
|
return $Day_ar;
|
|
}
|
|
|
|
function Today_ar()
|
|
{
|
|
global $today;
|
|
$Today_ar = date('d-m-Y', strtotime($today));
|
|
return $Today_ar;
|
|
}
|
|
|
|
$tabs = $_SESSION['tab'];
|
|
if (empty($tabs)) {
|
|
$tabs = 1;
|
|
}
|
|
$not_eq = "=";
|
|
if ($tabs == 1) {
|
|
$not_eq = "<>";
|
|
}
|
|
|
|
// work time
|
|
$commercial_register_sql = mysqli_query($db, "SELECT `commercial_register`.`start_work`, `commercial_register`.`start_work_fri`, `commercial_register`.`end_work`
|
|
FROM `branch`
|
|
LEFT JOIN `commercial_register` ON `branch`.`commercial_register_id` = `commercial_register`.`id`
|
|
WHERE `branch`.`id` = $branch_id"
|
|
);
|
|
$commercial_register = mysqli_fetch_assoc($commercial_register_sql);
|
|
$data['status']['start_time'] = $commercial_register['start_work'];
|
|
if ($Day == "Fri") {
|
|
$data['status']['start_time'] = $commercial_register['start_work_fri'];
|
|
}
|
|
$data['status']['end_time'] = $commercial_register['end_work'];
|
|
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en" dir="rtl">
|
|
<?php require_once('fixed/head/go.php'); ?>
|
|
<body class="rtl">
|
|
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@mdi/font@6.5.95/css/materialdesignicons.min.css">
|
|
<?php require_once('fixed/loader/go.php'); ?>
|
|
<div class="page-wrapper" id="pageWrapper">
|
|
<?php require_once('fixed/header/go.php'); ?>
|
|
<div class="page-body-wrapper">
|
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
|
<div class="page-body">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<style>
|
|
|
|
.mo-home-table {
|
|
box-shadow: 3px 3px 3px 3px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.mo-home-table thead th { position: sticky; top: 0; background: #f0f3f5; border:#dadada solid 1px !important;}
|
|
|
|
.mo-home-table td { border:#dadada solid 1px; min-width: 125px !important; overflow: hidden; height: 150px !important; padding: 0px !important; }
|
|
/*
|
|
width: 6.25% !important;
|
|
height: 85px !important;
|
|
padding: 5px !important;
|
|
*/
|
|
|
|
td:hover .before { display: none;}
|
|
td:hover .after { display: block; }
|
|
|
|
.modal-header h5 { font-weight: bold;}
|
|
|
|
.modal-body table { border:#eff2f4 solid 1px; width: 100%;}
|
|
|
|
span.mdi {
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* for buttons */
|
|
.frame-1 button {
|
|
outline: none;
|
|
}
|
|
|
|
.frame-1 .custom-btn {
|
|
height: 40px;
|
|
padding: 10px 25px;
|
|
border: 2px solid #000;
|
|
font-family: 'Lato', sans-serif;
|
|
font-weight: 500;
|
|
background: transparent;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
position: relative;
|
|
display: inline-block;
|
|
}
|
|
|
|
/* 7 */
|
|
.frame-1 .btn-7 {
|
|
background: #afec08;
|
|
font-weight: bold;
|
|
color: #000;
|
|
line-height: 42px;
|
|
padding: 0;
|
|
border: none;
|
|
z-index: 1;
|
|
-webkit-transition: all 0.3s linear;
|
|
transition: all 0.3s linear;
|
|
}
|
|
|
|
.frame-1 .btn-8 {
|
|
background: #000 !important;
|
|
}
|
|
|
|
.frame-1 .btn-7:hover {
|
|
background: transparent;
|
|
color: #afec08;
|
|
}
|
|
|
|
.frame-1 .btn-8:hover {
|
|
color: #f93b7a !important;
|
|
}
|
|
|
|
.frame-1 .btn-7:before,
|
|
.frame-1 .btn-7:after {
|
|
position: absolute;
|
|
content: "";
|
|
left: 0;
|
|
width: 100%;
|
|
height: 50%;
|
|
right: 0;
|
|
z-index: -1;
|
|
background: #afec08;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.frame-1 .btn-8:before,
|
|
.frame-1 .btn-8:after {
|
|
background: #f93b7a !important;
|
|
}
|
|
|
|
.frame-1 .btn-7:before {
|
|
top: 0;
|
|
}
|
|
|
|
.frame-1 .btn-7:after {
|
|
bottom: 0;
|
|
}
|
|
|
|
.frame-1 .btn-7:hover:before,
|
|
.frame-1 .btn-7:hover:after {
|
|
height: 0;
|
|
background-color: #afec08;
|
|
}
|
|
|
|
.frame-1 .btn-8:hover:before,
|
|
.frame-1 .btn-8:hover:after {
|
|
background-color: #f93b7a !important;
|
|
}
|
|
|
|
</style>
|
|
<div class="col-12">
|
|
<div class="card">
|
|
|
|
<div class="card-body new-user order-list text-center">
|
|
<div class="row">
|
|
<div class="col-12 col-sm-12 col-md-3 col-lg-4 col-xl-4">
|
|
</div>
|
|
<div class="page-title mb-3 col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
|
<i class="mdi mdi-monitor mr-2">
|
|
</i>
|
|
<h4>
|
|
حجوزات يوم
|
|
<?= Day_ar() ?>
|
|
<br />
|
|
<?= Today_ar() ?>
|
|
</h4>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-12 col-sm-12 col-md-2 col-lg-3 col-xl-3">
|
|
</div>
|
|
<div class="col-2 col-sm-2 col-md-1 col-lg-1 col-xl-1">
|
|
<a class="btn btn-danger btn-round waves-effect waves-light col-12" href="book_physical_therapy?date=<?= $Previous ?>&branch=<?= $branch_id ?>" style="padding: 0.375rem 0.75rem;">-</a>
|
|
</div>
|
|
<div class="col-8 col-sm-8 col-md-6 col-lg-4 col-xl-4">
|
|
<input id="Select-date" class="form-control" type="date" value="" style="text-align: center !important;">
|
|
</div>
|
|
<div class="col-2 col-sm-2 col-md-1 col-lg-1 col-xl-1">
|
|
<a class="btn btn-primary btn-round waves-effect waves-light col-12" href="book_physical_therapy?date=<?= $Next ?>&branch=<?= $branch_id ?>" style="padding: 0.375rem 0.75rem;">+</a>
|
|
</div>
|
|
<div class="col-12 col-sm-12 col-md-2 col-lg-3 col-xl-3">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tab-content">
|
|
<div class="tab-pane p-3 active" id="tab<?=$tabs?>" role="tabpanel">
|
|
<div class="card-body new-user order-list">
|
|
<div class="table-responsive" style="zoom:0.<?=$table_size?>;">
|
|
<table style="width: 0 !important; margin: 0 auto !important;" class="table table-hover mb-3 text-center mo-home-table">
|
|
<thead class="thead-light">
|
|
<tr>
|
|
<th></th>
|
|
<?php
|
|
$start_today_time = $data['status']['start_time'];
|
|
$end_today_time = $data['status']['end_time'];
|
|
for ($start_today_time; $start_today_time <= $end_today_time; $start_today_time++) {
|
|
$restart_temp = $start_today_time;
|
|
if ($start_today_time > 23) {
|
|
$restart_temp = $start_today_time - 24;
|
|
}
|
|
|
|
if ($restart_temp < 10) {
|
|
$start_today_time_temp = "0" . $restart_temp . ":00:00";
|
|
} else {
|
|
$start_today_time_temp = $restart_temp . ":00:00";
|
|
}
|
|
|
|
$today_temp = $today;
|
|
if ($start_today_time > 23) {
|
|
$today_temp = $Next;
|
|
}
|
|
?>
|
|
<th><?=date((date("H", strtotime($start_today_time_temp)) > 11) ? 'h:i \م' : 'h:i \ص', strtotime($start_today_time_temp))?><a href="work/php/one_clock_close?date=<?=$today_temp?>&time=<?=$start_today_time_temp?>&branch=<?=$branch_id?>"> <span style="float: right;font-size: 15px;height: 100%;" class="mdi mdi-close-outline"></span></a></th>
|
|
<?php
|
|
}
|
|
?>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$tretment_details_state = array();
|
|
|
|
// العمالة
|
|
$get_emplyee_sql = mysqli_query($db, "SELECT
|
|
`emplyee`.`id`,
|
|
`emplyee`.`name`,
|
|
`holi_days`.`day`,
|
|
`emplyee`.`branch_id`
|
|
FROM `occupation`
|
|
LEFT JOIN `emplyee` ON `emplyee`.`occupation_id` = `occupation`.`id`
|
|
LEFT JOIN `branch` ON `emplyee`.`branch_id` = `branch`.`id`
|
|
LEFT JOIN `holi_days` ON `emplyee`.`holi_days_id` = `holi_days`.`id`
|
|
LEFT JOIN `table_postion` ON `emplyee`.`id` = `table_postion`.`emplyee_id`
|
|
WHERE `occupation`.`show_in_table_id` = 2
|
|
AND `emplyee`.$branch_sql
|
|
AND `occupation`.`type_of_services_id` $not_eq $tabs
|
|
AND `emplyee`.`activation_id` = 2
|
|
AND `branch`.`commercial_register_id` = $commercial_register_id
|
|
ORDER BY -`table_postion`.`postion` DESC, `emplyee`.`id` ASC
|
|
");
|
|
while ($get_emplyee = mysqli_fetch_assoc($get_emplyee_sql)) {
|
|
$data['status']['emplyees_sql'] .= ''.$get_emplyee['id'].',';
|
|
$data['emplyees'][$get_emplyee['id']] = array(
|
|
'books' => array(),
|
|
'time_work' => array(),
|
|
'Close' => array(),
|
|
'Err' => array(),
|
|
'info' => array(
|
|
'name' => $get_emplyee['name'],
|
|
'holi_day' => $get_emplyee['day'],
|
|
'branch_id' => $get_emplyee['branch_id'],
|
|
)
|
|
);
|
|
}
|
|
|
|
$get_MAX_id_sql = mysqli_query($db, "SELECT
|
|
MAX(`bd`.`id`) AS `m_id`
|
|
FROM `book_details` AS `bd`
|
|
");
|
|
while ($get_MAX_id = mysqli_fetch_assoc($get_MAX_id_sql)) {
|
|
$data['status']['last_id'] = $get_MAX_id['m_id'];
|
|
}
|
|
|
|
$start_today_time = $data['status']['start_time'];
|
|
$end_today_time = $data['status']['end_time'];
|
|
$start_today_time_sql = $start_today_time . ":00:00";
|
|
$end_today_time_sql = $end_today_time . ":59:59";
|
|
$how_many_left = ($end_today_time - 23) - 1 . ":59:59";
|
|
$emplyees_sql = rtrim($data['status']['emplyees_sql'], ",");
|
|
|
|
$get_tretment_details_sql_state = mysqli_query($db,
|
|
"SELECT
|
|
`bd`.`day_date`,
|
|
`bd`.`day_time`,
|
|
`bd`.`branch_id`,
|
|
`bd`.`emplyee_id`,
|
|
`bd`.`status_id`,
|
|
`bd`.`date_time`,
|
|
`bd`.`book_id`,
|
|
`services`.`name`,
|
|
`book`.`tretment_id`,
|
|
`book`.`notes`,
|
|
`book`.`date_time` AS `user_date`,
|
|
`user`.`name` AS `user_book`,
|
|
`tretment`.`name` AS `tr_name`,
|
|
`tretment`.`number`
|
|
|
|
FROM `book_details` AS `bd`
|
|
|
|
LEFT JOIN `book` ON `bd`.`book_id` = `book`.`id`
|
|
LEFT JOIN `tretment` ON `book`.`tretment_id` = `tretment`.`id`
|
|
LEFT JOIN `user` ON `book`.`user_id` = `user`.`id`
|
|
LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`
|
|
LEFT JOIN `emplyee` ON `bd`.`emplyee_id` = `emplyee`.`id`
|
|
|
|
WHERE `emplyee`.`activation_id` = 2
|
|
AND ((`bd`.`day_date`='$today' AND `bd`.`day_time` >= '$start_today_time_sql' AND `bd`.`day_time` <= '$end_today_time_sql')
|
|
OR (`bd`.`day_date` = '$Next' AND `bd`.`day_time` <= '$how_many_left'))
|
|
AND `bd`.`emplyee_id` IN ($emplyees_sql)
|
|
AND `bd`.$branch_sql
|
|
AND `bd`.`status_id` NOT IN (25,26)
|
|
AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`)
|
|
FROM `book_details`
|
|
WHERE `book_details`.`book_id` = `bd`.`book_id` -- must make all like that
|
|
GROUP BY `book_details`.`book_id`
|
|
)
|
|
ORDER BY `bd`.`day_time`, `bd`.`date_time`
|
|
");
|
|
|
|
while ($get_tretment_details_state = mysqli_fetch_assoc($get_tretment_details_sql_state)) {
|
|
$data['book_ids'] .= ''.$get_tretment_details_state['book_id'].',';
|
|
if (array_key_exists($get_tretment_details_state['day_time'], $data['emplyees'][$get_tretment_details_state['emplyee_id']]['books'])) {
|
|
array_push($data['emplyees'][$get_tretment_details_state['emplyee_id']]['Err'], array(
|
|
'book_id' => $get_tretment_details_state['book_id'],
|
|
'day_date' => $get_tretment_details_state['day_date'],
|
|
'day_time' => $get_tretment_details_state['day_time'],
|
|
'status_id' => $get_tretment_details_state['status_id'],
|
|
'date_time' => $get_tretment_details_state['date_time'],
|
|
'name' => $get_tretment_details_state['name'],
|
|
'tretment_id' => $get_tretment_details_state['tretment_id'],
|
|
'notes' => $get_tretment_details_state['notes'],
|
|
'user_date' => $get_tretment_details_state['user_date'],
|
|
'tr_name' => $get_tretment_details_state['tr_name'],
|
|
'user_book' => $get_tretment_details_state['user_book'],
|
|
'number' => $get_tretment_details_state['number']
|
|
));
|
|
} else {
|
|
$data['emplyees'][$get_tretment_details_state['emplyee_id']]['books'][$get_tretment_details_state['day_time']] = array(
|
|
'book_id' => $get_tretment_details_state['book_id'],
|
|
'day_date' => $get_tretment_details_state['day_date'],
|
|
'day_time' => $get_tretment_details_state['day_time'],
|
|
'status_id' => $get_tretment_details_state['status_id'],
|
|
'date_time' => $get_tretment_details_state['date_time'],
|
|
'name' => $get_tretment_details_state['name'],
|
|
'tretment_id' => $get_tretment_details_state['tretment_id'],
|
|
'notes' => $get_tretment_details_state['notes'],
|
|
'user_date' => $get_tretment_details_state['user_date'],
|
|
'tr_name' => $get_tretment_details_state['tr_name'],
|
|
'user_book' => $get_tretment_details_state['user_book'],
|
|
'number' => $get_tretment_details_state['number']
|
|
);
|
|
}
|
|
$data['books'][$get_tretment_details_state['book_id']] = array(
|
|
'book_id' => $get_tretment_details_state['book_id'],
|
|
'day_date' => $get_tretment_details_state['day_date'],
|
|
'day_time' => $get_tretment_details_state['day_time'],
|
|
'status_id' => $get_tretment_details_state['status_id'],
|
|
'date_time' => $get_tretment_details_state['date_time'],
|
|
'name' => $get_tretment_details_state['name'],
|
|
'tretment_id' => $get_tretment_details_state['tretment_id'],
|
|
'notes' => $get_tretment_details_state['notes'],
|
|
'user_date' => $get_tretment_details_state['user_date'],
|
|
'tr_name' => $get_tretment_details_state['tr_name'],
|
|
'user_book' => $get_tretment_details_state['user_book'],
|
|
'number' => $get_tretment_details_state['number']
|
|
);
|
|
}
|
|
|
|
$get_emplyee_time_work = mysqli_query($db, "SELECT `work_time_table`.`emplyee_id`, TIME(`work_time_table`.`from_date_time`) AS fromTime,TIME(`work_time_table`.`to_date_time`) AS toTime FROM `work_time_table`
|
|
WHERE `work_time_table`.`emplyee_id` IN ($emplyees_sql) AND `work_time_table`.`to_date_time` > '$today' AND `work_time_table`.`from_date_time` < '$Next' AND `work_time_table`.`activation_id` = 2");
|
|
|
|
while ($get_time_work = mysqli_fetch_assoc($get_emplyee_time_work)) {
|
|
$from = $get_time_work['fromTime'][0] . $get_time_work['fromTime'][1];
|
|
$to = $get_time_work['toTime'][0] . $get_time_work['toTime'][1];
|
|
for ($from; $from <= $to; $from++) {
|
|
$push_time_work = $from . ":00:00";
|
|
array_push($data['emplyees'][$get_time_work['emplyee_id']]['time_work'], $push_time_work);
|
|
}
|
|
}
|
|
|
|
$book_ids_sql = rtrim($data['book_ids'], ",");
|
|
if(empty($book_ids_sql)){
|
|
$book_ids_sql = -1;
|
|
}
|
|
$pay_sql = mysqli_query($db, "SELECT
|
|
`book_id`,
|
|
`user`.`name`,
|
|
`user`.`id`,
|
|
`invoices_has_book`.`date_time`
|
|
FROM `invoices_has_book`
|
|
LEFT JOIN `user` ON `user`.`id` = `invoices_has_book`.`user_id`
|
|
WHERE `book_id` IN ($book_ids_sql)
|
|
");
|
|
while ($get_pay = mysqli_fetch_assoc($pay_sql)) {
|
|
$data['how_pay'][$get_pay['book_id']] = array(
|
|
'id' => $get_pay['id'],
|
|
'name' => $get_pay['name'],
|
|
'date_time' => $get_pay['date_time'],
|
|
);
|
|
}
|
|
|
|
$get_table_sql_state = mysqli_query($db,
|
|
"SELECT
|
|
`user`.`id`,
|
|
`user`.`name`,
|
|
`table`.`day_date`,
|
|
`table`.`day_time`,
|
|
`table`.`notes`,
|
|
`table`.`branch_id`,
|
|
`table`.`emplyee_id`,
|
|
`table`.`status_id`,
|
|
`table`.`date_time` AS `time`
|
|
|
|
FROM `table`
|
|
LEFT JOIN `user` ON `user`.`id` = `table`.`user_id`
|
|
|
|
WHERE `table`.`emplyee_id` IN ($emplyees_sql)
|
|
AND `table`.$branch_sql
|
|
AND `table`.`activation_id` = 2
|
|
AND ((`table`.`day_date` = '$today' AND `table`.`day_time` >= '$start_today_time_sql' AND `table`.`day_time` <= '$end_today_time_sql')
|
|
OR (`table`.`day_date` = '$Next' AND `table`.`day_time` <= '$how_many_left'))
|
|
ORDER BY `table`.`id` ASC"
|
|
);
|
|
|
|
while ($get_table_state = mysqli_fetch_assoc($get_table_sql_state)) {
|
|
$data['emplyees'][$get_table_state['emplyee_id']]['Close'][$get_table_state['day_time']] = array(
|
|
'id' => $get_table_state['id'],
|
|
'name' => $get_table_state['name'],
|
|
'day_date' => $get_table_state['day_date'],
|
|
'day_time' => $get_table_state['day_time'],
|
|
'notes' => $get_table_state['notes'],
|
|
'status_id' => $get_table_state['status_id'],
|
|
'time' => $get_table_state['time'],
|
|
);
|
|
}
|
|
|
|
|
|
foreach ($data['emplyees'] as $key => $value) {
|
|
$start_today_time = $data['status']['start_time'];
|
|
$end_today_time = $data['status']['end_time'];
|
|
|
|
|
|
?>
|
|
<tr>
|
|
<td class="sorting_1" style ="padding: 15px !important;">
|
|
<div style="height:120px; overflow:revert">
|
|
<img class="rounded-circle" src="uploads/emplyee/user/1.png" alt="user" data-bs-toggle="modal" data-animation="bounce" data-bs-target=".emp_<?=$data['emplyees'][$key]?>" style="width: 90px !important;height: 90px !important;">
|
|
<div style="margin-top: 10px;">
|
|
<?= $data['emplyees'][$key]['info']['name'] ?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
|
|
<?php
|
|
|
|
for ($start_today_time; $start_today_time <= $end_today_time; $start_today_time++) {
|
|
|
|
$restart_temp = $start_today_time;
|
|
if ($start_today_time > 23) {
|
|
$restart_temp = $start_today_time - 24;
|
|
}
|
|
|
|
if ($restart_temp < 10) {
|
|
$start_today_time_temp = "0" . $restart_temp . ":00:00";
|
|
} else {
|
|
$start_today_time_temp = $restart_temp . ":00:00";
|
|
}
|
|
|
|
$today_temp = $today;
|
|
if ($start_today_time > 23) {
|
|
$today_temp = $Next;
|
|
}
|
|
if (array_key_exists($start_today_time_temp, $data['emplyees'][$key]['books'])) {
|
|
|
|
switch ($data['emplyees'][$key]['books'][$start_today_time_temp]['status_id']) {
|
|
case 4: case 5:
|
|
// انتظار
|
|
?>
|
|
<td class="bg-gradient3">
|
|
<div style="display: flex !important; flex-direction: column;">
|
|
<div style="height: 25px;">
|
|
<a style="color: white !important" href="edit_booking?booking_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>">
|
|
<span style="float: left;background: green;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-book-edit"></span>
|
|
</a>
|
|
<a style="color: white !important" target="_blank" href="tel:+966<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>">
|
|
<span style="float: left;background: blue;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-phone"></span>
|
|
</a>
|
|
<a style="color: white !important" target="_blank" href="https://api.whatsapp.com/send/?phone=966<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>&text=">
|
|
<span style="float: left;background: gray;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-whatsapp"></span>
|
|
</a>
|
|
<a style="color: black !important" href="active_physical_therapy?booking_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id']?>">
|
|
<span style="float: right;background: #fff700;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-arrow-top-right"></span>
|
|
</a>
|
|
<a class="booking-cancel" style="color: white !important" href="work/order/php/cancel?booking_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id']?>&lo=book">
|
|
<span style="float: right;background: red;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-close"></span>
|
|
</a>
|
|
</div>
|
|
<div title="حجز بواسطة <?= $data['emplyees'][$key]['books'][$start_today_time_temp]['user_book'] ?>" data-bs-toggle="modal" data-animation="bounce" data-bs-target="#booking_<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>"
|
|
style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column; border-bottom: 3px solid black;">
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['tr_name'] ?></div>
|
|
</div>
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['name'] ?></div>
|
|
</div>
|
|
</div>
|
|
<div style="color:black;height:30px;background:#c1c1c1;font-weight:bold;font-size:17px;cursor:pointer;" onclick="window.location='booking_detail?number=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>';">
|
|
<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
break;
|
|
|
|
case 6: case 7:
|
|
$get_pay = $data['how_pay'][$data['emplyees'][$key]['books'][$start_today_time_temp]['book_id']];
|
|
?>
|
|
<td class="bg-gradient4">
|
|
<div style="display: flex !important; flex-direction: column;">
|
|
<div style="height: 25px;">
|
|
<a style="color: white !important" href="edit_booking?booking_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>">
|
|
<span style="float: left;background: green;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-book-edit"></span>
|
|
</a>
|
|
<a style="color: white !important" target="_blank" href="tel:+966<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>">
|
|
<span style="float: left;background: blue;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-phone"></span>
|
|
</a>
|
|
<a style="color: white !important" target="_blank" href="https://api.whatsapp.com/send/?phone=966<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>&text=">
|
|
<span style="float: left;background: gray;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-whatsapp"></span>
|
|
</a>
|
|
<a style="color: black !important" href="print?book_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>&p=9">
|
|
<span style="float: right;background: white;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-printer"></span>
|
|
</a>
|
|
<?php
|
|
if ($get_pay['id'] == $admin_id) {
|
|
?>
|
|
<a class="booking-cancel-active" style="color: white !important" href="work/order/php/cancel_active?booking_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id']?>&lo=book">
|
|
<span style="float: right;background: red;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-close active-cancel"></span>
|
|
</a>
|
|
<?php
|
|
}
|
|
?>
|
|
</div>
|
|
<div title="حجز بواسطة <?= $data['emplyees'][$key]['books'][$start_today_time_temp]['user_book'] ?> دفع بواسطة <?=$get_pay['name']?>" data-bs-toggle="modal" data-animation="bounce" data-bs-target="#booking_<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>"
|
|
style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column; border-bottom: 3px solid black;">
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['tr_name'] ?></div>
|
|
</div>
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['name'] ?></div>
|
|
</div>
|
|
</div>
|
|
<div style="color:black;height:30px;background:#c1c1c1;font-weight:bold;font-size:17px;cursor:pointer;" onclick="window.open('booking_detail?number=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>', '_blank')">
|
|
<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
break;
|
|
case 8: case 9:
|
|
?>
|
|
<td class="bg-gradient1">
|
|
<div style="display: flex !important; flex-direction: column;">
|
|
<div style="height: 25px;">
|
|
<a style="color: white !important" href="edit_booking?booking_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>">
|
|
<span style="float: left;background: green;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-book-edit"></span>
|
|
</a>
|
|
<a style="color: white !important" target="_blank" href="tel:+966<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>">
|
|
<span style="float: left;background: blue;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-phone"></span>
|
|
</a>
|
|
<a style="color: white !important" target="_blank" href="https://api.whatsapp.com/send/?phone=966<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>&text=">
|
|
<span style="float: left;background: gray;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-whatsapp"></span>
|
|
</a>
|
|
<a style="color: black !important" href="print?booking_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>&free=9">
|
|
<span style="float: right;background: white;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-printer"></span>
|
|
</a>
|
|
<a class="booking-cancel-active" style="color: white !important" href="work/order/php/cancel_active435?booking_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id']?>&lo=book">
|
|
<span style="float: right;background: red;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-close active-cancel"></span>
|
|
</a>
|
|
</div>
|
|
<div title="حجز بواسطة <?= $data['emplyees'][$key]['books'][$start_today_time_temp]['user_book'] ?>" data-bs-toggle="modal" data-animation="bounce" data-bs-target="#booking_<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>"
|
|
style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column; border-bottom: 3px solid black;">
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['tr_name'] ?></div>
|
|
</div>
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['name'] ?></div>
|
|
</div>
|
|
</div>
|
|
<div style="color:black;height:30px;background:#c1c1c1;font-weight:bold;font-size:17px;cursor:pointer;" onclick="window.location='booking_detail?number=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>';">
|
|
<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
break;
|
|
case 10:
|
|
?>
|
|
<td class="bg-gradient10">
|
|
<div style="display: flex !important; flex-direction: column;">
|
|
<div style="height: 25px;">
|
|
|
|
</div>
|
|
<div title="حجز بواسطة <?= $data['emplyees'][$key]['books'][$start_today_time_temp]['user_book'] ?>" data-bs-toggle="modal" data-animation="bounce" data-bs-target="#booking_<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>"
|
|
style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column; border-bottom: 3px solid black;">
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['tr_name'] ?></div>
|
|
</div>
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['name'] ?></div>
|
|
</div>
|
|
</div>
|
|
<div style="color:black;height:30px;background:#c1c1c1;font-weight:bold;font-size:17px;cursor:pointer;" onclick="window.location='booking_detail?number=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>';">
|
|
<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
break;
|
|
case 11:
|
|
?>
|
|
|
|
<?php
|
|
break;
|
|
case 12:
|
|
$get_pay = $data['how_pay'][$data['emplyees'][$key]['books'][$start_today_time_temp]['book_id']];
|
|
?>
|
|
<td class="bg-gradient12">
|
|
<div style="display: flex !important; flex-direction: column;">
|
|
<div style="height: 25px;">
|
|
|
|
</div>
|
|
<div title="حجز بواسطة <?= $data['emplyees'][$key]['books'][$start_today_time_temp]['user_book'] ?> دفع بواسطة <?=$get_pay['name']?>" data-bs-toggle="modal" data-animation="bounce" data-bs-target="#booking_<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>"
|
|
style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column; border-bottom: 3px solid black;">
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['tr_name'] ?></div>
|
|
</div>
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['name'] ?></div>
|
|
</div>
|
|
</div>
|
|
<div style="color:black;height:30px;background:#c1c1c1;font-weight:bold;font-size:17px;cursor:pointer;" onclick="window.open('booking_detail?number=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>', '_blank')">
|
|
<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
break;
|
|
case 13:
|
|
$get_pay = $data['how_pay'][$data['emplyees'][$key]['books'][$start_today_time_temp]['book_id']];
|
|
?>
|
|
<td class="bg-gradient12">
|
|
<div style="display: flex !important; flex-direction: column;">
|
|
<div style="height: 25px;">
|
|
|
|
</div>
|
|
<div title="حجز بواسطة <?= $data['emplyees'][$key]['books'][$start_today_time_temp]['user_book'] ?> دفع بواسطة <?=$get_pay['name']?>" data-bs-toggle="modal" data-animation="bounce" data-bs-target="#booking_<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>"
|
|
style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column; border-bottom: 3px solid black;">
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['tr_name'] ?></div>
|
|
</div>
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['name'] ?></div>
|
|
</div>
|
|
</div>
|
|
<div style="color:black;height:30px;background:#c1c1c1;font-weight:bold;font-size:17px;cursor:pointer;" onclick="window.open('booking_detail?number=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>', '_blank')">
|
|
<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
break;
|
|
case 14:
|
|
$get_pay = $data['how_pay'][$data['emplyees'][$key]['books'][$start_today_time_temp]['book_id']];
|
|
?>
|
|
<td class="bg-gradient7">
|
|
<div style="display: flex !important; flex-direction: column;">
|
|
<div style="height: 25px;">
|
|
<div class="progress sm-progress-bar">
|
|
<div class="progress-bar bg-success progress-bar-striped progress-bar-animated" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
|
|
</div>
|
|
<a style="color: black !important" href="print?book_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>&p=9">
|
|
<span style="float: right;background: white;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-printer"></span>
|
|
</a>
|
|
</div>
|
|
<div title="حجز بواسطة <?= $data['emplyees'][$key]['books'][$start_today_time_temp]['user_book'] ?> دفع بواسطة <?=$get_pay['name']?>" data-bs-toggle="modal" data-animation="bounce" data-bs-target="#booking_<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>"
|
|
style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column; border-bottom: 3px solid black;">
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['tr_name'] ?></div>
|
|
</div>
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['name'] ?></div>
|
|
</div>
|
|
</div>
|
|
<div style="color:black;height:30px;background:#c1c1c1;font-weight:bold;font-size:17px;cursor:pointer;" onclick="window.open('booking_detail?number=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>', '_blank')">
|
|
<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
break;
|
|
case 15:
|
|
$get_pay = $data['how_pay'][$data['emplyees'][$key]['books'][$start_today_time_temp]['book_id']];
|
|
?>
|
|
<td class="bg-gradient15">
|
|
<div style="display: flex !important; flex-direction: column;">
|
|
<div style="height: 25px;">
|
|
<a style="color: black !important" href="print?book_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>&p=9">
|
|
<span style="float: right;background: white;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-printer"></span>
|
|
</a>
|
|
</div>
|
|
<div title="حجز بواسطة <?= $data['emplyees'][$key]['books'][$start_today_time_temp]['user_book'] ?> دفع بواسطة <?=$get_pay['name']?>" data-bs-toggle="modal" data-animation="bounce" data-bs-target="#booking_<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>"
|
|
style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column; border-bottom: 3px solid black;">
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['tr_name'] ?></div>
|
|
</div>
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['name'] ?></div>
|
|
</div>
|
|
</div>
|
|
<div style="color:black;height:30px;background:#c1c1c1;font-weight:bold;font-size:17px;cursor:pointer;" onclick="window.open('booking_detail?number=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>', '_blank')">
|
|
<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['number'] ?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
break;
|
|
case 16:
|
|
?>
|
|
|
|
<?php
|
|
break;
|
|
case 17:
|
|
?>
|
|
|
|
<?php
|
|
break;
|
|
case 18:
|
|
?>
|
|
|
|
<?php
|
|
break;
|
|
case 19:
|
|
?>
|
|
<td class="bg-gradient19">
|
|
<div style="position: relative;">
|
|
<div style="display: flex !important; flex-direction: column;">
|
|
<div style="height: 25px;">
|
|
<a style="color: white !important" href="work/order/php/close?booking_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id']?>&date=<?= $today_temp ?>&time=<?= $start_today_time_temp ?>&emp_id=<?= $key ?>&branch=<?=$branch_id?>&lo=book">
|
|
<span style="float: right;background: red;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-close"></span>
|
|
</a>
|
|
</div>
|
|
<div data-bs-toggle="modal" data-animation="bounce" data-bs-target="#booking_<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>"
|
|
style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column; border-bottom: 3px solid black;">
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['tr_name'] ?></div>
|
|
</div>
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['name'] ?></div>
|
|
</div>
|
|
</div>
|
|
<div style="height: 30px;"></div>
|
|
</div>
|
|
<div style="display: flex;position: absolute; bottom:0; width:100%;" class="frame-1">
|
|
<button onclick="location.href = 'booking_physical_therapy?booking_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id']?>&emp_id=<?= $key ?>&date=<?= $today_temp ?>&time=<?= $start_today_time_temp ?>&branch=<?=$branch_id?>'" style="background-color: black; width: 100%;" class="custom-btn btn-7">حجز</button>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
break;
|
|
case 20:
|
|
?>
|
|
<td class="bg-gradient20">
|
|
<div style="position: relative;">
|
|
<div style="display: flex !important; flex-direction: column;">
|
|
<div style="height: 25px;">
|
|
<a style="color: white !important" href="work/order/php/close?booking_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id']?>&date=<?= $today_temp ?>&time=<?= $start_today_time_temp ?>&emp_id=<?= $key ?>&branch=<?=$branch_id?>&lo=book">
|
|
<span style="float: right;background: red;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-close"></span>
|
|
</a>
|
|
</div>
|
|
<div data-bs-toggle="modal" data-animation="bounce" data-bs-target="#booking_<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>"
|
|
style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column; border-bottom: 3px solid black;">
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['tr_name'] ?></div>
|
|
</div>
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['name'] ?></div>
|
|
</div>
|
|
</div>
|
|
<div style="height: 30px;"></div>
|
|
</div>
|
|
<div style="display: flex;position: absolute; bottom:0; width:100%;" class="frame-1">
|
|
<button onclick="location.href = 'booking_physical_therapy?booking_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id']?>&emp_id=<?= $key ?>&date=<?= $today_temp ?>&time=<?= $start_today_time_temp ?>&branch=<?=$branch_id?>'" style="background-color: black; width: 100%;" class="custom-btn btn-7">حجز</button>
|
|
<button onclick="location.href = 'work/order/php/getback?booking_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id']?>&lo=book'" style="background-color: black; width: 100%;" class="custom-btn btn-7 btn-8">استعادة</button>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
break;
|
|
case 21:
|
|
?>
|
|
<td class="bg-gradient21">
|
|
<div style="position: relative;">
|
|
<div style="display: flex !important; flex-direction: column;">
|
|
<div style="height: 25px;">
|
|
<a style="color: black !important" href="print?book_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>&p=9">
|
|
<span style="float: right;background: white;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-printer"></span>
|
|
</a>
|
|
</div>
|
|
<div data-bs-toggle="modal" data-animation="bounce" data-bs-target="#booking_<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id'] ?>"
|
|
style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column; border-bottom: 3px solid black;">
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['tr_name'] ?></div>
|
|
</div>
|
|
<div style="white-space: nowrap;">
|
|
<div><?= $data['emplyees'][$key]['books'][$start_today_time_temp]['name'] ?></div>
|
|
</div>
|
|
</div>
|
|
<div style="height: 30px;"></div>
|
|
</div>
|
|
<div style="display: flex;position: absolute; bottom:0; width:100%;" class="frame-1">
|
|
<button onclick="location.href = 'booking_physical_therapy?booking_id=<?= $data['emplyees'][$key]['books'][$start_today_time_temp]['book_id']?>&emp_id=<?= $key ?>&date=<?= $today_temp ?>&time=<?= $start_today_time_temp ?>&branch=<?=$branch_id?>'" style="background-color: black; width: 100%;" class="custom-btn btn-7">حجز</button>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
break;
|
|
}
|
|
?>
|
|
|
|
<?php
|
|
} elseif (array_key_exists($start_today_time_temp, $data['emplyees'][$key]['Close'])) {
|
|
|
|
switch ($data['emplyees'][$key]['Close'][$start_today_time_temp]['status_id']) {
|
|
case 1:
|
|
?>
|
|
<td class="bg-gradient5">
|
|
<div title="اغلق بواسطة <?=$data['emplyees'][$key]['Close'][$start_today_time_temp]['name']?>" style="display: flex !important; flex-direction: column;">
|
|
<div style="height: 25px;">
|
|
<a style="color: white !important" href="work/order/php/open?date=<?= $today_temp ?>&time=<?= $start_today_time_temp ?>&emp_id=<?= $key ?>&branch=<?=$branch_id?>&lo=book">
|
|
<span style="float: right;background: red;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-close"></span>
|
|
</a>
|
|
</div>
|
|
<div style="height: 100px; display: flex; justify-content: center; align-items: center;">
|
|
<div>مغلق بواسطة <?=$data['emplyees'][$key]['Close'][$start_today_time_temp]['name']?></div>
|
|
</div>
|
|
<div style="height: 30px;"></div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
break;
|
|
case 2:
|
|
?>
|
|
<td>
|
|
<div style="position: relative;">
|
|
<div style="display: flex !important; flex-direction: column;" title="<?= $emp_neme .' - '. $start_today_time_temp ?>">
|
|
<div style="height: 25px;">
|
|
<a style="color: white !important" href="work/order/php/close?date=<?= $today_temp ?>&time=<?= $start_today_time_temp ?>&emp_id=<?= $key ?>&branch=<?=$branch_id?>&lo=book">
|
|
<span style="float: right;background: red;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-close"></span>
|
|
</a>
|
|
</div>
|
|
<div style="height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
|
|
<div>
|
|
<div>متاح</div>
|
|
</div>
|
|
</div>
|
|
<div style="height: 30px;"></div>
|
|
</div>
|
|
<div style="display: flex;position: absolute; bottom:0; width:100%;" class="frame-1">
|
|
<button onclick="location.href = 'booking_physical_therapy?emp_id=<?= $key ?>&date=<?= $today_temp ?>&time=<?= $start_today_time_temp ?>&branch=<?=$branch_id?>'" style="background-color: black; width: 100%;" class="custom-btn btn-7">حجز</button>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
break;
|
|
case 3: //جاري الحجز
|
|
?>
|
|
<td class="bg-gradient6" style="position: relative;">
|
|
<div style="display: flex !important; flex-direction: column;">
|
|
<div style="height: 25px;">
|
|
<?php
|
|
if ($data['emplyees'][$key]['Close'][$start_today_time_temp]['id'] == $admin_id) {
|
|
?>
|
|
<a style="color: white !important" href="work/order/php/open?date=<?= $today_temp ?>&time=<?= $start_today_time_temp ?>&emp_id=<?= $key ?>&branch=<?=$branch_id?>&lo=book">
|
|
<span style="float: right;background: red;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-close"></span>
|
|
</a>
|
|
<?php
|
|
}
|
|
if ((strtotime($data['emplyees'][$key]['Close'][$start_today_time_temp]['time'])+(60*5)) < (strtotime($time))) {
|
|
$temp_day_time = $data['emplyees'][$key]['Close'][$start_today_time_temp]['day_time'];
|
|
mysqli_query($db, "INSERT INTO `table`(`day_date`, `day_time`, `notes`, `branch_id`, `emplyee_id`, `status_id`, `date_time`, `user_id`, `activation_id`)
|
|
VALUES ('$today_temp', '$temp_day_time', '', '$branch_id', '$key', '2', '$date_time', '1', '2')");
|
|
}
|
|
?>
|
|
</div>
|
|
<div style="height: 100px; display: flex; justify-content: center; align-items: center;">
|
|
<div>جاري الحجز بواسطة <?=$data['emplyees'][$key]['Close'][$start_today_time_temp]['name']?></div>
|
|
</div>
|
|
<div style="display: flex;position: absolute; bottom:0; width:100%;" class="cu_timer frame-1" value="<?=date("i:s", ((strtotime($data['emplyees'][$key]['Close'][$start_today_time_temp]['time'])+(60*5)) - (strtotime($time))))?>">
|
|
<?php
|
|
if ($data['emplyees'][$key]['Close'][$start_today_time_temp]['id'] == $admin_id) {
|
|
?>
|
|
<button onclick="location.href = 'booking_physical_therapy?emp_id=<?= $key ?>&date=<?= $today_temp ?>&time=<?= $start_today_time_temp ?>&branch=<?=$branch_id?>'" style="background-color: black; width: 100%;" class="custom-btn btn-7">استمرار</button>
|
|
<?php
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
break;
|
|
}
|
|
} else if ($data['emplyees'][$key]['info']['holi_day'] == $Day && !in_array($Day_s, array(27,28,29,30,31,1,2,3,4,5))) {
|
|
?>
|
|
<td class="bg-gradient5">
|
|
<div title="اغلق بواسطة النظام" style="display: flex !important; flex-direction: column;">
|
|
<div style="height: 25px;">
|
|
<button onclick="location.href = 'booking_physical_therapy?emp_id=<?= $key ?>&date=<?= $today_temp ?>&time=<?= $start_today_time_temp ?>&branch=<?=$branch_id?>'" class="custom-btn btn-7">OVERTIME</button>
|
|
</div>
|
|
<div style="height: 100px; display: flex; justify-content: center; align-items: center;">
|
|
<div>اجازة</div>
|
|
</div>
|
|
<div style="height: 30px;"></div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
|
|
} else if (in_array($start_today_time_temp, $data['status']['pray_time']) && in_array($start_today_time_temp, $data['emplyees'][$key]['time_work'])) {
|
|
?>
|
|
<td class="bg-gradient5">
|
|
<div title="اغلق بواسطة النظام" style="display: flex !important; flex-direction: column;">
|
|
<div style="height: 25px;">
|
|
<a style="color: white !important" href="work/order/php/open?date=<?= $today_temp ?>&time=<?= $start_today_time_temp ?>&emp_id=<?= $key ?>&branch=<?=$branch_id?>&lo=book">
|
|
<span style="float: right;background: red;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-close"></span>
|
|
</a>
|
|
</div>
|
|
<div style="height: 100px; display: flex; justify-content: center; align-items: center;">
|
|
<div>
|
|
غير متاح
|
|
<br />
|
|
(صلاه)
|
|
</div>
|
|
</div>
|
|
<div style="height: 30px;">
|
|
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
} else if (in_array($start_today_time_temp, $data['emplyees'][$key]['time_work'])) {
|
|
?>
|
|
<td>
|
|
<div style="position: relative;">
|
|
<div style="display: flex !important; flex-direction: column;" title="<?= $emp_neme .' - '. $start_today_time_temp ?>">
|
|
<div style="height: 25px;">
|
|
<a style="color: white !important" href="work/order/php/close?date=<?= $today_temp ?>&time=<?= $start_today_time_temp ?>&emp_id=<?= $key ?>&branch=<?=$branch_id?>&lo=book">
|
|
<span style="float: right;background: red;padding: 2px;width: 21px;height: 100%;" class="mdi mdi-close"></span>
|
|
</a>
|
|
</div>
|
|
<div style="height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
|
|
<div>
|
|
<div>متاح</div>
|
|
</div>
|
|
</div>
|
|
<div style="height: 30px;"></div>
|
|
</div>
|
|
<div style="display: flex;position: absolute; bottom:0; width:100%;" class="frame-1">
|
|
<button onclick="location.href = 'booking_physical_therapy?emp_id=<?= $key ?>&date=<?= $today_temp ?>&time=<?= $start_today_time_temp ?>&branch=<?=$branch_id?>'" style="background-color: black; width: 100%;" class="custom-btn btn-7">حجز</button>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
} else {
|
|
?>
|
|
<td class="bg-gradient5">
|
|
<div title="اغلق بواسطة النظام" style="display: flex !important; flex-direction: column;">
|
|
<div style="height: 25px;">
|
|
<button onclick="location.href = 'booking_physical_therapy?emp_id=<?= $key ?>&date=<?= $today_temp ?>&time=<?= $start_today_time_temp ?>&branch=<?=$branch_id?>'" class="custom-btn btn-7">OVERTIME</button>
|
|
</div>
|
|
<div style="height: 100px; display: flex; justify-content: center; align-items: center;">
|
|
<div>غير متاح</div>
|
|
</div>
|
|
<div style="height: 30px;">
|
|
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<?php
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
<!--end table-->
|
|
|
|
|
|
|
|
<?php
|
|
if (array_key_exists("books",$data)) {
|
|
foreach ($data['books'] as $key => $value) {
|
|
?>
|
|
|
|
<div id="booking_<?= $data['books'][$key]['book_id'] ?>" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
|
|
<h5 style="line-height: 2 !important; margin-right: 35px !important;" class="modal-title">
|
|
<?= $data['books'][$key]['tr_name'] ?>
|
|
-
|
|
<?= $data['books'][$key]['name'] ?>
|
|
</h5>
|
|
<button class="btn-close" style="left: unset;right: 25px;" type="button" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
|
|
</div>
|
|
<div class="modal-body">
|
|
<h5 class="modal-title mt-0" id="mySmallModalLabel">معلومات العميل</h5>
|
|
|
|
<table class=" mb-3">
|
|
<tbody>
|
|
<tr>
|
|
<td>جوال</td>
|
|
<td><?= $data['books'][$key]['number'] ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<?php
|
|
if ($data['books'][$key]['name'] == 'خدمات مجمعة') {
|
|
?>
|
|
<h5 class="modal-title mt-0" id="mySmallModalLabel">تفاصيل الخدمات المجمعة</h5>
|
|
|
|
<table class=" mb-3">
|
|
<tbody>
|
|
|
|
<?php
|
|
$book_id_for_bundle = $data['books'][$key]['book_id'];
|
|
$bundle_s = mysqli_query($db, "SELECT
|
|
`services`.`name`,
|
|
`bundle_services_has_services`.`how_many`
|
|
|
|
FROM `bundle_services_has_services`
|
|
INNER JOIN `services` ON `services`.`id` = `bundle_services_has_services`.`services_id`
|
|
|
|
WHERE `bundle_services_has_services`.`bundle_services_id` = (SELECT `bundle_services_id` FROM `book_details_has_bundle_services` WHERE `book_details_id` = (SELECT MIN(`id`) FROM `book_details` WHERE `book_id` = $book_id_for_bundle AND `status_id` = 4))");
|
|
|
|
if (mysqli_num_rows($bundle_s) > 0) {
|
|
while ($bundle_s_row = mysqli_fetch_assoc($bundle_s)) {
|
|
?>
|
|
<tr>
|
|
<td><?= $bundle_s_row['name']?></td>
|
|
<td>العدد</td>
|
|
<td><?= $bundle_s_row['how_many']?></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
|
|
<h5 class="modal-title mt-0" id="mySmallModalLabel">معلومات الجلسة</h5>
|
|
|
|
<table class=" mb-3">
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="2">رقم الجلسة</td>
|
|
<td colspan="2"><?= $data['books'][$key]['book_id'] ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">الجلسة</td>
|
|
<td colspan="2"><?= $data['books'][$key]['name'] ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">حجز بواسطة</td>
|
|
<td colspan="2"><?= $data['books'][$key]['user_book'] ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>التاريخ</td>
|
|
<td><?= date('d-m-Y', strtotime($data['books'][$key]['user_date']))?></td>
|
|
<td>الوقت</td>
|
|
<td><?= date((date("H", strtotime($data['books'][$key]['user_date'])) > 11) ? 'h:i \م' : 'h:i \ص', strtotime($data['books'][$key]['user_date'])) ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<?php
|
|
if ($data['books'][$key]['status_id'] == 6 || $data['books'][$key]['status_id'] == 8 || $data['books'][$key]['status_id'] == 14 || $data['books'][$key]['status_id'] == 15) {
|
|
?>
|
|
<h5 class="modal-title mt-0" id="mySmallModalLabel">معلومات السداد</h5>
|
|
|
|
<table class=" mb-3">
|
|
<?php
|
|
$get_pay = $data['how_pay'][$key];
|
|
?>
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="2">دفع بواسطة</td>
|
|
<td colspan="2"><?= $get_pay['name'] ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>التاريخ</td>
|
|
<td><?= date('d-m-Y', strtotime($get_pay['date_time']))?></td>
|
|
<td>الوقت</td>
|
|
<td><?= date((date("H", strtotime($get_pay['date_time'])) > 11) ? 'h:i \م' : 'h:i \ص', strtotime($get_pay['date_time'])) ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<?php
|
|
} elseif ($data['books'][$key]['status_id'] == 7) {
|
|
?>
|
|
<h5 class="modal-title mt-0" id="mySmallModalLabel">معلومات السداد</h5>
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
<h5 class="modal-title mt-0" id="mySmallModalLabel">ملاحظات</h5>
|
|
<table class=" mb-3">
|
|
<tbody>
|
|
<tr>
|
|
<td><?= $data['books'][$key]['notes'] ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="form-group row">
|
|
<div class="mt-3 col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
|
<a target="_blank" href="https://api.whatsapp.com/send/?phone=<?= $data['books'][$key]['number'] ?>&text=">
|
|
<button class="col-12 btn btn-primary align-self-center report-btn">ارسال</button>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="mt-3 col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
|
<a class=" col-12 btn btn-success align-self-center report-btn" href="active_physical_therapy?booking_id=<?= $data['books'][$key]['book_id'] ?>">
|
|
تأكيد
|
|
</a>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
}
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php require_once('fixed/footer/go.php'); ?>
|
|
</div>
|
|
</div>
|
|
<?php require_once('fixed/js/go.php'); ?>
|
|
<script>
|
|
$("#Select-date").change(function() {
|
|
var SelectedDate = $(this).val();
|
|
window.location = 'book_physical_therapy?branch=<?= $branch_id ?>&date=' + SelectedDate
|
|
});
|
|
|
|
$('.booking-cancel').on('click', function(e) {
|
|
e.preventDefault();
|
|
const href = $(this).attr('href');
|
|
|
|
swal.fire({
|
|
title: 'هل أنت متأكد',
|
|
text: 'من إلغاء الحجز',
|
|
type: 'info',
|
|
showCancelButton: true,
|
|
confirmButtonColor: '#3085d6',
|
|
cancelButtonColor: '#d33',
|
|
confirmButtonText: 'نعم',
|
|
cancelButtonText: 'لا'
|
|
|
|
|
|
}).then((result) => {
|
|
if (result.value) {
|
|
document.location.href = href;
|
|
}
|
|
})
|
|
})
|
|
|
|
$('.booking-cancel-active').on('click', function(e) {
|
|
e.preventDefault();
|
|
const href = $(this).attr('href');
|
|
|
|
swal.fire({
|
|
title: 'هل أنت متأكد',
|
|
text: 'من إلغاء الحجز المفعل',
|
|
type: 'warning',
|
|
showCancelButton: true,
|
|
confirmButtonColor: '#3085d6',
|
|
cancelButtonColor: '#d33',
|
|
confirmButtonText: 'نعم',
|
|
cancelButtonText: 'لا'
|
|
|
|
|
|
}).then((result) => {
|
|
if (result.value) {
|
|
document.location.href = href;
|
|
}
|
|
})
|
|
})
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|