186 lines
10 KiB
PHP
Executable File
186 lines
10 KiB
PHP
Executable File
<?php
|
|
require_once('fixed/config/go_con.php');
|
|
//access(76);
|
|
?>
|
|
|
|
<!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">
|
|
<style>
|
|
a.active {
|
|
background-color: #e6edef;
|
|
}
|
|
h1 {
|
|
background: #24695c;
|
|
padding-right: 10px;
|
|
color: white;
|
|
margin-left: 10px;
|
|
font-weight: bold;
|
|
}
|
|
</style>
|
|
<?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="email-wrap bookmark-wrap">
|
|
<div class="row">
|
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
|
<div class="card">
|
|
<div class="tab-content" id="profile-tabContent">
|
|
<div class="tab-pane fade show active" id="all">
|
|
<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>
|
|
تفاصيل المستفيدين من الكود
|
|
<br/>
|
|
</h4>
|
|
</div>
|
|
<div class="col-12 col-sm-12 col-md-3 col-lg-4 col-xl-4">
|
|
</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">
|
|
<table id="employee_data" class="table table-bordered text-center" style="vertical-align: middle;">
|
|
<thead class="table-primary" style="vertical-align: middle;">
|
|
<tr>
|
|
<th scope="col">#</th>
|
|
<th scope="col">معلومات العميل</th>
|
|
<th scope="col">تاريخ اول زيارة</th>
|
|
<th scope="col">المستفاد منه</th>
|
|
<th scope="col">المتبقي له</th>
|
|
<th scope="col">الاهداء من طرف</th>
|
|
<th scope="col">الكود</th>
|
|
<th scope="col">تاريخ ارسال الكود</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$total = 0;
|
|
$get_book_details_sql = mysqli_query($db,
|
|
"SELECT
|
|
`tretment`.`name`,
|
|
`tretment`.`number`,
|
|
DATE(`tretment_has_free_service`.`date_time`) AS `frist_come`,
|
|
(SELECT
|
|
COUNT(`tretment_has_free_service`.`id`)
|
|
FROM `tretment_has_free_service`
|
|
WHERE `tretment_id` = `tretment`.`id` AND `tretment_has_free_service`.`done_id` = 1) AS `waiting`,
|
|
(SELECT
|
|
COUNT(`tretment_has_free_service`.`id`)
|
|
FROM `tretment_has_free_service`
|
|
WHERE `tretment_id` = `tretment`.`id` AND `tretment_has_free_service`.`done_id` = 2) AS `done`,
|
|
(SELECT
|
|
`tretment`.`name`
|
|
FROM `tretment_has_free_3_serv_coupon`
|
|
INNER JOIN `tretment` ON `tretment_has_free_3_serv_coupon`.`tretment_id` = `tretment`.`id`
|
|
WHERE `tretment_has_free_3_serv_coupon`.`id` = `tretment_has_free_service`.`table_id`) AS `from_name`,
|
|
(SELECT
|
|
`tretment`.`number`
|
|
FROM `tretment_has_free_3_serv_coupon`
|
|
INNER JOIN `tretment` ON `tretment_has_free_3_serv_coupon`.`tretment_id` = `tretment`.`id`
|
|
WHERE `tretment_has_free_3_serv_coupon`.`id` = `tretment_has_free_service`.`table_id`) AS `from`,
|
|
(SELECT
|
|
`tretment_has_free_3_serv_coupon`.`code`
|
|
FROM `tretment_has_free_3_serv_coupon`
|
|
INNER JOIN `tretment` ON `tretment_has_free_3_serv_coupon`.`tretment_id` = `tretment`.`id`
|
|
WHERE `tretment_has_free_3_serv_coupon`.`id` = `tretment_has_free_service`.`table_id`) AS `code`,
|
|
(SELECT
|
|
DATE(`tretment_has_free_3_serv_coupon`.`date_time`)
|
|
FROM `tretment_has_free_3_serv_coupon`
|
|
INNER JOIN `tretment` ON `tretment_has_free_3_serv_coupon`.`tretment_id` = `tretment`.`id`
|
|
WHERE `tretment_has_free_3_serv_coupon`.`id` = `tretment_has_free_service`.`table_id`) AS `date_send`
|
|
|
|
FROM `tretment_has_free_service`
|
|
INNER JOIN `tretment` ON `tretment_has_free_service`.`tretment_id` = `tretment`.`id`
|
|
WHERE `tretment_has_free_service`.`db_tables_id` = 19 GROUP BY `tretment_has_free_service`.`tretment_id`
|
|
ORDER BY `frist_come`
|
|
");
|
|
|
|
$count = 1;
|
|
while ($get_book_details = mysqli_fetch_assoc($get_book_details_sql)) {
|
|
?>
|
|
<tr>
|
|
<th scope="row"><?=$count?></th>
|
|
<td><?=$get_book_details['name']?><br><?=$get_book_details['number']?></td>
|
|
<td><?=$get_book_details['frist_come']?></td>
|
|
<td><?=$get_book_details['done']?></td>
|
|
<td><?=$get_book_details['waiting']?></td>
|
|
<td><?=$get_book_details['from_name']?><br><?=$get_book_details['from']?></td>
|
|
<td><?=$get_book_details['code']?></td>
|
|
<td><?=$get_book_details['date_send']?></td>
|
|
</tr>
|
|
<?php
|
|
$count++;
|
|
}
|
|
?>
|
|
</tbody>
|
|
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="8" style="background: black;"></td>
|
|
</tr>
|
|
<?php
|
|
$total = 0;
|
|
$get_book_details_sql = mysqli_query($db,
|
|
"SELECT
|
|
`tretment`.`name`,
|
|
`tretment`.`number`,
|
|
`tretment_has_free_3_serv_coupon`.`code`,
|
|
DATE(`tretment_has_free_3_serv_coupon`.`date_time`) AS `date_send`
|
|
|
|
FROM `tretment_has_free_3_serv_coupon`
|
|
INNER JOIN `tretment` ON `tretment_has_free_3_serv_coupon`.`tretment_id` = `tretment`.`id`
|
|
WHERE `status` = 1
|
|
");
|
|
|
|
$count = 1;
|
|
while ($get_book_details = mysqli_fetch_assoc($get_book_details_sql)) {
|
|
?>
|
|
<tr>
|
|
<th scope="row"><?=$count?></th>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
<td><?=$get_book_details['name']?><br><?=$get_book_details['number']?></td>
|
|
<td><?=$get_book_details['code']?></td>
|
|
<td><?=$get_book_details['date_send']?></td>
|
|
</tr>
|
|
<?php
|
|
$count++;
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</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'); ?>
|
|
</body>
|
|
</html>
|