-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinsertScheduleAny.php
47 lines (32 loc) · 1.22 KB
/
insertScheduleAny.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
//insert.php
include 'classes.php';
$notification = new Notification();
// $conn = (new Connection())->createConnection();
if (isset($_POST["sender_id"])) {
$customerID = $_POST["sender_id"];
$latitude = $_POST['lat'];
$longitude = $_POST['lng'];
$address = $_POST['address'];
$date = $_POST['date'];
$time = $_POST['time'];
// echo $_SESSION['HirespecificLat'];
// echo $address;
// echo $lat;
// echo $lng;
// echo $_POST['radioAddress'];
// echo $_POST['radio'];
// $date = QueryHandler::real_escape_string($_POST["date"]);
// $time = QueryHandler::real_escape_string($_POST["time"]);
$receiver_id = $_POST["tradesman_id"];
$sender_id = $_POST["sender_id"];
$service_id = $_POST['service_id'];
$service = new Service();
$service->read($service_id);
$service_name = $service->getService_name();
$notifi = "Scheduling request for " . $service_name . " at " . $address;
echo $receiver_id.$notifi.$sender_id.$latitude.$longitude.$address;
$notification->schedule($receiver_id, $sender_id, $date, $time, $notifi, $service_id, $longitude, $latitude);
}
echo 'insert schedule php file';
?>