-
Notifications
You must be signed in to change notification settings - Fork 0
/
accom_pay.php
140 lines (95 loc) · 3.33 KB
/
accom_pay.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?php
session_start();
if(isset($_SESSION['fname'])&&isset($_SESSION['reg_id']))
{
$name=$_SESSION['fname'];
$phone=$_SESSION['phone'];
if(isset($_POST['pay']))
{
require('connect.php');
$mem=$_POST['members'];
$days=$_POST['days'];
$amt=$mem*500*$days;
$status="Unpaid";
$id=$_SESSION['reg_id'];
date_default_timezone_set('Asia/Kolkata');
$date=date("Y-M-d");
$verify="Select * from accomo where reg_id='$id'";
$check=$conn->query($verify);
if($check->num_rows>0)
{
header('location:logged.php');
}
$sql="Insert into accomo values('','$id','$mem','$days','$amt','$status','$date')";
}
else
{
header('location:logged.php');
}
}
else
{
session_destroy();
header('location:login.php');
}
?>
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Accomodation</title>
<link rel="icon" href="img/favicon.png">
<link rel="stylesheet" href="css/components.css">
<link rel="stylesheet" href="css/icons.css">
<link rel="stylesheet" href="css/responsee.css">
<link rel="stylesheet" href="owl-carousel/owl.carousel.css">
<link rel="stylesheet" href="owl-carousel/owl.theme.css">
<link rel="stylesheet" href="css/lightcase.css">
<!-- CUSTOM STYLE -->
<link rel="stylesheet" href="css/template-style.css">
<link href="https://fonts.googleapis.com/css?family=Poppins:100,200,300,400,700,900&subset=latin-ext" rel="stylesheet">
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
</head>
<body class="size-1280">
<!-- PREMIUM FEATURES BUTTON -->
<a target="_blank" class="hide-s" href="../template/virtua-premium-responsive-business-template/" style="position:fixed;top:120px;right:-14px;z-index:10;"><img src="img/premium-features.png" alt=""></a>
<!-- HEADER -->
<!-- MAIN -->
<main role="main">
<article>
<!-- Header -->
<header class="section background-image text-center" style="background-image:url(img/img-05.jpg)">
<h1 class="animated-element slow text-extra-thin text-white text-s-size-30 text-m-size-40 text-size-50 text-line-height-1 margin-bottom-30 margin-top-130">
<?php
if($conn->query($sql)==true)
{
$id=$_SESSION['reg_id'];
require('connect.php');
date_default_timezone_set('Asia/Kolkata');
$date=date("Y-M-d");
$time = date('h:i:s a', time());
$task="Accomodation Registration Successfull";
$log="Insert into log values('$id','$task','$date','$time')";
$log_query=$conn->query($log);
echo "Registration Successfull<br>";
echo "Please wait Redirecting to Home Page";
$conn->close();
header("refresh:3; url=logged.php");
}
else
{
echo "Registration failed";
$conn->close();
header("refresh:3; url=logged.php");
}
?>
</h1>
<!-- white full width arrow object -->
</article>
</main>
<?php
echo "Please wait Redirecting to Home Page";
header("refresh:5; url=logged.php");
?>