-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetReserve.php
47 lines (25 loc) · 909 Bytes
/
setReserve.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
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
include("PHP.php");
$b=trim($_POST['data']);
date_default_timezone_set("Asia/Colombo");
$time = date("Y-m-d H:i:s");
$date=date_create($time);
$check = new Database();
$dd="ETime";
$qu= "SELECT Value FROM setting WHERE Type ='$dd';";
$result = $check->Query($qu) ;
if ($result) {
$row=mysqli_fetch_array($result);
$t=$row['Value'];
}
$extime = date_add($date,date_interval_create_from_date_string(''.$t.' minutes'));
$extime= date_format($extime,"Y-m-d H:i:s");
$b= $b . ",'".$time."','".$extime."');";
$add = new Database();
$result = $add->Query($b) ;
}
$errno=$add->geterrno();
echo $errno;
exit();
?>