-
Notifications
You must be signed in to change notification settings - Fork 0
/
sharing.php
200 lines (189 loc) · 5.06 KB
/
sharing.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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<?php
if($_POST['from']== 'dwarka' && $_POST['to']== 'cp')
{
$distance = 22;
}
else if($_POST['from']== 'dwarka' && $_POST['to']== 'gurugram')
{
$distance = 16;
}
else if($_POST['from']== 'dwarka' && $_POST['to']== 'noida')
{
$distance = 44;
}
else if($_POST['from']== 'cp' && $_POST['to']== 'dwarka')
{
$distance = 22;
}
else if($_POST['from']== 'cp' && $_POST['to']== 'gurugram')
{
$distance = 32;
}
else if($_POST['from']== 'cp' && $_POST['to']== 'noida')
{
$distance = 25;
}
else if($_POST['from']== 'gurugram' && $_POST['to']== 'dwarka')
{
$distance = 16;
}
else if($_POST['from']== 'gurugram' && $_POST['to']== 'cp')
{
$distance = 32;
}
else if($_POST['from']== 'gurugram' && $_POST['to']== 'noida')
{
$distance = 47;
}
else if($_POST['from']== 'noida' && $_POST['to']== 'dwarka')
{
$distance = 44;
}
else if($_POST['from']== 'noida' && $_POST['to']== 'cp')
{
$distance = 25;
}
else if($_POST['from']== 'noida' && $_POST['to']== 'gurugram')
{
$distance = 47;
}
else
{
echo "<br><b>INVALID PLACE.";
}
echo "</br>From ";
echo $_POST['from'];
echo "</br>to ";
echo $_POST['to'];
echo "</br>distance is ";
echo $distance;
$total = 100 + ($distance*2);
$fare = $total/4;
echo "</br>fare is ";
echo $fare;
if($_POST['passangerno']== '1')
{
$amt= $fare*1;
}
else if($_POST['passangerno']== '2')
{
$amt= $fare*2;
}
else if($_POST['passangerno']== '3')
{
$amt= $fare*3;
}
else if($_POST['passangerno']== '4')
{
$amt= $fare*4;
}
else
{
echo "Invalid passanger number";
}
?>
<html>
<head>
<title>City Taxi Fare</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Favicons -->
<link href="assets\img\favicon.png" rel="icon">
<!--About US CSS-->
<link rel="stylesheet" href="assets\css\style.css">
<link rel="stylesheet" href="assets\css\taxi.css">
<!--Font Awesom CSS-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
<style>
table, th, td {
border:2px solid black;
padding: 10px;
text-align: center;
font-size: 25px;
}
</style>
<head>
<body>
<!-- header section starts -->
<header>
<div>
<!-- <img src="D:\travel\images\Safar_Logo.png" height="50px" width= "80px"> -->
<a href="index.html" class="logo"><span>S</span>afar</a>
</div>
<div id="menu-bar" class="fas fa-bars"></div>
<nav class="navbar">
<a href="index.html">home</a>
<a href="index.html#services">services</a>
<a href="index.html#review">review</a>
<a href="booking.html">book</a>
<a href="about.html">about us</a>
<a href="index.html#contact">contact</a>
</nav>
<div class="icons">
<i class="fa fa-user" id="login-btn"></i>
</div>
<!--<form action="" class="search-bar-container">
<input type="search" id="search-bar" placeholder="search here...">
<label for="search-bar" class="fas fa-search"></label>
</form>-->
</header>
<!-- header section ends -->
<!-- taxi section starts -->
<section class="taxi">
<div class="imgBx">
<img src="assets\img\Taxi.jpg" style="height: 600px; margin-top: 100px; " />
</div>
<div class="contentBx">
<div class="formBx" style="margin-top: 100px; ">
<table>
<tr >
<td>From</td>
<td><?php echo $_POST['from'];?></td>
</tr>
<tr >
<td>To</td>
<td><?php echo $_POST['to'];?></td>
</tr>
<tr >
<td>Distance</td>
<td><?php echo $distance;?></td>
</tr>
<tr>
<td>Fixed charges</td>
<td>Rs. 100</td>
</tr>
<tr>
<td>Per KM charges</td>
<td>Rs. 2</td>
</tr>
<tr>
<td>No. of person</td>
<td><?php echo $_POST['passangerno'];?></td>
</tr>
<tr>
<td>Total charges</td>
<td>Rs. <?php echo $total;?></td>
</tr>
<tr>
<td>Per person charges</td>
<td>Rs. <?php echo $fare;?></td>
</tr>
<tr>
<td>Charges to be paid</td>
<td>Rs. <?php echo $amt;?></td>
</tr>
</table>
</br>
<form action="index.html">
<div class="inputBx">
<input type="submit" value="OK" name="submit"/>
</div>
</form>
</div>
</div>
</section>
<!-- taxi section ends -->
<!--JS-->
<script src="assets\js\script.js"></script>
</body>
</html>