-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinvoice.php
154 lines (128 loc) · 4.06 KB
/
invoice.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
<?php
include('adhead.php');
if(!isset($_SESSION['userdata']))
{
header('Location: index.php');
}
if($_SESSION['userdata']['is_admin']==1){
include('adsidebar.php');
$id=$_GET['id'];
$adm = new adminwrk();
$admc = new dbcon();
$shor = $adm->iallride($id,$admc->conn);
foreach($shor as $key=>$val)
{
$rid = $val['ride_id'];
$cid = $val['customer_user_id'];
$date = $val['ride_date'];
$cab = $val['cab_type'];
$pic = $val['from_distance'];
$drop = $val['to_distance'];
$lugg = $val['luggage'];
$fare = $val['total_fare'];
$dist = $val['total_distance'];
}
$usr = $adm->ialluser($cid,$admc->conn);
foreach($usr as $key1=>$val1)
{
$name = $val1['name'];
$email = $val1['user_name'];
$mob = $val1['mobile'];
}
?>
</head>
<body>
<div id="pbox">
<div class="invoice-box" >
<table cellpadding="0" cellspacing="0">
<tr class="top">
<td colspan="2">
<table>
<tr>
<td class="title">
<a style="width:100%; max-width:300px;">Ced<span class="gree">Cab</span>
</td>
<td>
Ride id : <?php echo $rid;?><br>
Ride Date: <?php echo $date;?><br>
</td>
</tr>
</table>
</td>
</tr>
<tr class="information">
<td colspan="2">
<table>
<tr>
<td>
Name<br>
E-Mail<br>
Mobile
</td>
<td>
<?php echo $name;?><br>
<?php echo $email;?><br>
<?php echo $mob;?>
</td>
</tr>
</table>
</td>
</tr>
<tr class="heading">
<td>
Cab Type
</td>
<td>
<?php echo $cab;?>
</td>
</tr>
<tr class="details">
<td>
Total Distance
</td>
<td>
<?php echo $dist;?> Km
</td>
</tr>
<tr class="item">
<td>
Pickup Location
</td>
<td>
<?php echo $pic;?>
</td>
</tr>
<tr class="item">
<td>
Drop Location
</td>
<td>
<?php echo $drop;?>
</td>
</tr>
<tr class="item last">
<td>
Luggage
</td>
<td>
<?php echo $lugg;?> Kg
</td>
</tr>
<tr class="total">
<td>Total Fare</td>
<td>Rs
<?php echo $fare;?>
</td>
</tr>
</table>
</div>
</div>
<div class="text-center mt-3 mr-lg-5 pr-lg-5">
<button id="prnt">Print</button>
</div>
<?php
}
else{
echo '<h1 class="text-center text-weight-bold text-dark">You Are not Authorised</h1>';
}
include('adfoot.php'); ?>