34 lines
1.2 KiB
PHP
Executable File
34 lines
1.2 KiB
PHP
Executable File
<?php
|
|
require_once('../../../fixed/config/go_con.php');
|
|
|
|
$booking_day_date = mysqli_real_escape_string($db, $_GET['date']);
|
|
$booking_day_time = mysqli_real_escape_string($db, $_GET['time']);
|
|
$booking_emp_id = mysqli_real_escape_string($db, $_GET['emp_id']);
|
|
$booking_branch_id = mysqli_real_escape_string($db, $_GET['branch']);
|
|
|
|
$location = mysqli_real_escape_string($db, $_GET['lo']); // name of the file
|
|
$status_id = 0;
|
|
switch ($location) {
|
|
case 'book':
|
|
$status_id = 20;
|
|
break;
|
|
case 'book_visits':
|
|
$status_id = 19;
|
|
break;
|
|
|
|
default:
|
|
$status_id = 0;
|
|
break;
|
|
}
|
|
|
|
mysqli_query($db, "INSERT INTO `table`(`day_date`, `day_time`, `notes`, `branch_id`, `emplyee_id`, `status_id`, `date_time`, `user_id`, `activation_id`)
|
|
VALUES ('$booking_day_date', '$booking_day_time', '', '$booking_branch_id', '$booking_emp_id', '2', '$date_time', '$admin_id', '2')");
|
|
|
|
echo "<script type='text/javascript'>
|
|
window.location.href = '../../../$location?date=$booking_day_date&branch=$booking_branch_id';
|
|
</script>";
|
|
?>
|
|
|
|
|
|
|