62 lines
1.9 KiB
PHP
Executable File
62 lines
1.9 KiB
PHP
Executable File
<?php
|
|
require_once('../../../fixed/config/go_con.php');
|
|
access(78);
|
|
|
|
$book_id = mysqli_real_escape_string($db, $_GET['id']);
|
|
|
|
if (!empty($book_id)) {
|
|
|
|
$get_booking_sql = mysqli_query($db, "SELECT `day_date`, `day_time`, `services_id`, `branch_id`, `emplyee_id`, `status_id` FROM `book_details` WHERE `book_id` = '$book_id' AND `status_id` IN (6,8,12,13) ORDER BY `id` DESC LIMIT 1");
|
|
if (mysqli_num_rows($get_booking_sql) == 1) {
|
|
$row = mysqli_fetch_assoc($get_booking_sql);
|
|
$day_date = $row['day_date'];
|
|
$day_time = $row['day_time'];
|
|
$the_service = $row['services_id'];
|
|
$emplyee_id = $row['emplyee_id'];
|
|
$branch_id = $row['branch_id'];
|
|
$status_id = $row['status_id'];
|
|
|
|
$why = "تم فتح الجلسة";
|
|
|
|
|
|
if(mysqli_query(
|
|
$db,
|
|
"INSERT INTO `book_details`(`day_date`, `day_time`, `services_id`, `branch_id`, `emplyee_id`, `notes`, `status_id`, `user_id`, `activation_id`, `date_time`, `book_id`)
|
|
VALUES ('$day_date','$day_time','$the_service','$branch_id','$emplyee_id','$why','$status_id','$admin_id','2','$date_time','$book_id')"
|
|
)) {
|
|
echo "
|
|
<script type='text/javascript'>
|
|
window.history.back();
|
|
</script>
|
|
";
|
|
} else {
|
|
echo "
|
|
<script>
|
|
alert('sads')
|
|
</script>
|
|
";
|
|
|
|
}
|
|
|
|
} else {
|
|
echo "
|
|
<script type='text/javascript'>
|
|
window.history.back();
|
|
</script>
|
|
";
|
|
}
|
|
} else {
|
|
echo "
|
|
<script type='text/javascript'>
|
|
window.history.back();
|
|
</script>
|
|
";
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|