180 lines
8.8 KiB
PHP
Executable File
180 lines
8.8 KiB
PHP
Executable File
<?php
|
|
require_once('fixed/config/go_con.php');
|
|
access(5);
|
|
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en" dir="rtl">
|
|
<?php require_once('fixed/head/go.php'); ?>
|
|
<body class="rtl">
|
|
<?php require_once('fixed/loader/go.php'); ?>
|
|
<!-- page-wrapper Start-->
|
|
<div class="page-wrapper" id="pageWrapper">
|
|
<?php require_once('fixed/header/go.php'); ?>
|
|
<!-- Page Body Start-->
|
|
<div class="page-body-wrapper">
|
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
|
<div class="page-body">
|
|
<!-- Container-fluid starts-->
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<h1 class="text-center">
|
|
الحجوزات
|
|
</h1>
|
|
<hr class="hrline">
|
|
</div>
|
|
</div>
|
|
|
|
<h4 class="mt-0 header-title">معلومات البحث</h4>
|
|
|
|
<div class="form-group row">
|
|
<div class="col-8 col-sm-6 col-lg-2 ">
|
|
<label for="" class="col-form-label text-right">رقم الجوال</label>
|
|
<input id="number" name="tretment_number" class="form-control clickfun" type="number" value="<?php if (!empty($_GET['number'])) {echo $_GET['number'];}?>" required>
|
|
</div>
|
|
<div class="col-4 col-sm-6 col-lg-1 ">
|
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="search">بحث</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table-responsive" id="get_data" style="vertical-align: middle;padding-bottom: 123px;padding-left: 69px;">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container-fluid custom_add">
|
|
<div class="row">
|
|
<style>
|
|
h3 {
|
|
font-size: 1.17em !important;
|
|
font-weight: bold !important;
|
|
}
|
|
|
|
</style>
|
|
<?php
|
|
$month = date('Y-m');
|
|
$get_emplyee_sql = mysqli_query($db, "SELECT
|
|
`tretment`.`name` AS `tr_name`,
|
|
`tretment`.`number`,
|
|
`book_details`.`day_date`,
|
|
`book_details`.`day_time`,
|
|
`book`.`notes`,
|
|
`book_details`.`status_id`,
|
|
`book_details`.`branch_id`,
|
|
`emplyee`.`id` AS `emp_id`,
|
|
`emplyee`.`his_img`,
|
|
`emplyee`.`name` AS `emp_name`,
|
|
`services`.`name`,
|
|
`status`.`small_name` AS `state_string`
|
|
FROM user
|
|
LEFT JOIN `book` ON `book`.`user_id` = `user`.`id`
|
|
LEFT JOIN `book_details` ON `book`.`id` = `book_details`.`book_id`
|
|
LEFT JOIN `services` ON `book_details`.`services_id` = `services`.`id`
|
|
LEFT JOIN `emplyee` ON `book_details`.`emplyee_id` = `emplyee`.`id`
|
|
LEFT JOIN `tretment` ON `book`.`tretment_id` = `tretment`.`id`
|
|
LEFT JOIN `status` ON `book_details`.`status_id` = `status`.`id`
|
|
|
|
WHERE `user`.`id` = '1' AND DATE_FORMAT(`book_details`.`date_time`, '%Y-%m') = '$month' AND `book_details`.`id` IN (SELECT MAX(`id`) FROM `book_details` GROUP BY `book_id`)
|
|
ORDER BY `book_details`.`date_time` DESC LIMIT 9");
|
|
|
|
while ($emplyee_row = mysqli_fetch_assoc($get_emplyee_sql)) {
|
|
?>
|
|
<div class="col-lg-4">
|
|
<div class="card profile-card">
|
|
<div class="card-body p-0" style="background-color: #086367 !important;">
|
|
<div class="media p-3 align-items-center">
|
|
<img src="work/image/emp_img/<?=$emplyee_row['emp_id']?>/<?=$emplyee_row['his_img']?>" alt="user" class="rounded-circle thumb-xl">
|
|
<div class="media-body ml-3 align-self-center">
|
|
<h5 class="mb-1 text-white"><?=$emplyee_row['emp_name']?></h5>
|
|
<p class="mb-0 font-14 text-white"><?=$emplyee_row['name']?></p>
|
|
</div>
|
|
<a class="btn-light btn-sm" href="book.php?branch=<?=$emplyee_row['branch_id']?>&date=<?=$emplyee_row['day_date']?>">
|
|
<i class="fa fa-calendar" style="font-size: 18px;"></i></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card-body pb-0">
|
|
<h5 class="text-center"><?=$emplyee_row['tr_name']?> - <?=$emplyee_row['number']?></h5>
|
|
<p class="font-14 text-muted text-center"><?=$emplyee_row['notes']?></p>
|
|
</div>
|
|
<div class="card-body socials-data pb-0 px-0">
|
|
<div class="row text-center border-top m-0">
|
|
<div class="col-4 border-left py-3">
|
|
<h3 class="mt-0 mb-1"><?=$emplyee_row['day_date']?></h3>
|
|
<span class="font-14 text-muted">التاريخ</span>
|
|
</div>
|
|
<div class="col-4 border-left py-3">
|
|
<h3 class="mt-0 mb-1"><?=date((date("H", strtotime($emplyee_row['day_time'])) > 11) ? 'h:i \م' : 'h:i \ص', strtotime($emplyee_row['day_time']))?></h3>
|
|
<span class="font-14 text-muted">الوقت</span>
|
|
</div>
|
|
<div class="col-4 py-3">
|
|
<h3 class="mt-0 mb-1"><?=$emplyee_row['state_string']?></h3>
|
|
<span class="font-14 text-muted">الحالة</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
<!-- Container-fluid Ends-->
|
|
</div>
|
|
<?php require_once('fixed/footer/go.php'); ?>
|
|
</div>
|
|
</div>
|
|
<?php require_once('fixed/js/go.php'); ?>
|
|
<script>
|
|
$(function() {
|
|
$("#search").click(function() {
|
|
booking_d();
|
|
});
|
|
});
|
|
$('.clickfun').keypress(function (e) {
|
|
var key = e.which;
|
|
if(key == 13) {
|
|
booking_d();
|
|
}
|
|
});
|
|
click = 0;
|
|
function booking_d() {
|
|
let number = $("#number").val();
|
|
if (number.length !== 9) {
|
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
|
return false;
|
|
}
|
|
|
|
if (click == 0) {
|
|
click++
|
|
$.post("work/order/ajax/booking_detail_ajax_1.php", {
|
|
number
|
|
}, function(get_data) {
|
|
$("#get_data").html(get_data);
|
|
$(".custom_add").hide();
|
|
})
|
|
} else {
|
|
swalfun("يرجى الانتظار", "تم بالفعل الضعط علية", "warning");
|
|
}
|
|
|
|
}
|
|
<?php
|
|
if (!empty($_GET['number'])) {
|
|
echo "booking_d()";
|
|
}
|
|
?>
|
|
</script>
|
|
</body>
|
|
</html>
|