-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprint.php
More file actions
104 lines (89 loc) · 3.65 KB
/
print.php
File metadata and controls
104 lines (89 loc) · 3.65 KB
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
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['vpmsaid']==0)) {
header('location:logout.php');
} else{
?>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/normalize.css@8.0.0/normalize.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/lykmapipo/themify-icons@0.1.2/css/themify-icons.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pixeden-stroke-7-icon@1.2.3/pe-icon-7-stroke/dist/pe-icon-7-stroke.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.2.0/css/flag-icon.min.css">
<link rel="stylesheet" href="assets/css/cs-skin-elastic.css">
<link rel="stylesheet" href="assets/css/style.css">
<?php
$cid=$_GET['vid'];
$ret=mysqli_query($con,"select * from tblvehicle where ID='$cid'");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<div id="exampl">
<table border="1" class="table table-bordered mg-b-0">
<tr>
<th colspan="4" style="text-align: center; font-size:22px;"> Vehicle Parking receipt</th>
</tr>
<tr>
<th>Parking Number</th>
<td><?php echo $row['ParkingNumber'];?></td>
<th>Vehicle Category</th>
<td><?php echo $row['VehicleCategory'];?></td>
</tr>
<tr>
<th>Vehicle Company Name</th>
<td><?php echo $packprice= $row['VehicleCompanyname'];?></td>
<th>Registration Number</th>
<td><?php echo $row['RegistrationNumber'];?></td>
</tr>
<tr>
<th>Owner Name</th>
<td><?php echo $row['OwnerName'];?></td>
<th>Owner Contact Number</th>
<td><?php echo $row['OwnerContactNumber'];?></td>
</tr>
<tr>
<th>In Time</th>
<td><?php echo $row['InTime'];?></td>
<th>Status</th>
<td> <?php
if($row['Status']=="")
{
echo "Incoming Vehicle";
}
if($row['Status']=="Out")
{
echo "Outgoing Vehicle";
}
;?></td>
</tr>
<?php if($row['Remark']!=""){ ?>
<tr>
<th>Out time</th>
<td><?php echo $row['OutTime'];?></td>
<th>Rarking Charge</th>
<td><?php echo $row['ParkingCharge'];?></td>
</tr>
<tr>
<th>Remark</th>
<td colspan="3"><?php echo $row['Remark'];?></td>
</tr>
<?php } ?>
<tr>
<td colspan="4" style="text-align:center; cursor:pointer"><i class="fa fa-print fa-2x" aria-hidden="true" OnClick="CallPrint(this.value)" ></i></td>
</tr>
</table>
<?php }} ?>
</div>
<script>
function CallPrint(strid) {
var prtContent = document.getElementById("exampl");
var WinPrint = window.open('', '', 'left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0');
WinPrint.document.write(prtContent.innerHTML);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
}
</script>