-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprintbulk.php
More file actions
192 lines (154 loc) · 5.41 KB
/
printbulk.php
File metadata and controls
192 lines (154 loc) · 5.41 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
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
<?php
session_start();
include("db_connect.php");
require "vendor/autoload.php";
if(!isset($_COOKIE['adminid'])&&$_COOKIE['adminemail']){ header('location:index.php');
exit;}
$fromm=$_POST['startpoint'];
$too=$_POST['endpoint'];
$startsat=$_POST['receiptrange'];
$_SESSION['from']=$fromm;
$_SESSION['to']=$too;
$_SESSION['receiptrange']=$startsat;
$from=$_SESSION['from'];
$to=$_SESSION['to'];
$startsat=$_SESSION['receiptrange'];
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>card</title>
<style>
body{
background:#FFFFFF;
}
#bg {
height: 450px;
margin:60px;
float: left;
}
#id {
width:250px;
height:450px;
position:absolute;
opacity: 0.88;
font-family: sans-serif;
transition: 0.4s;
background-color: #FFFFFF;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.6);
transition: 0.4s;
}
#id::before {
content: "";
position: absolute;
width: 100%;
height: 100%;
background: url('images/malawi.png');
background-repeat:repeat-x;
background-size: 250px 450px;
opacity: 0.2;
z-index: -1;
text-align:center;
}
.container{
font-size: 12px;
font-family: sans-serif;
}
.id-1{
transition: 0.4s;
width:250px;
height:450px;
background: #FFFFFF;
text-align:center;
font-size: 16px;
font-family: sans-serif;
float: left;
margin:auto;
margin-left:270px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.6);
transition: 0.4s;
}
</style>
</head>
<body>
<script type="text/javascript">
window.print();
setTimeout(function(){
window.close()
},750)
</script>
<?php
$sqluse ="SELECT * FROM Inorg WHERE id=1 ";
$retrieve = mysqli_query($db,$sqluse);
$numb=mysqli_num_rows($retrieve);
while($foundk = mysqli_fetch_array($retrieve))
{
$profileK= $foundk['pname'];
$name = $foundk['name'];
}
$sqlmember ="SELECT * FROM Users WHERE id>=$from && id<=$to";
$retrieve = mysqli_query($db,$sqlmember);
$count=0;
while($found = mysqli_fetch_array($retrieve))
{
$title=$found['Mtitle'];$firstname=$found['Firstname'];$sirname=$found['Sirname'];$rank=$found['Rank'];
$id=$found['id'];$dept=$found['Department'];$contact=$found['Email'];
$count=$count+1; $get_time=$found['Time']; $time=time(); $pass=$found['Staffid'];
$names=$firstname." ".$sirname;
$profile= $found['Picname'];
$serial= $id;
$Bar = new Picqer\Barcode\BarcodeGeneratorSVG();
$code = $Bar->getBarcode($serial, $Bar::TYPE_CODE_128);
?>
<div id="bg">
<div id="id">
<table>
<tr> <td><?php if($numb!=0 ){
if($profile!=""){echo"<img src='media/$profileK' width='70px' height='70px' alt=''>";}
else{
echo"<img src='assets/img/eg-dark.png' alt='Avatar' width='70px' height='70px'>";
}
}else{
?>
<img src="assets/img/eg-dark.png" alt="Avatar" width="70px" height="70px"> <?php }?>
</td>
<td><h3><b><?php echo $name ?></b></h3></td>
</tr>
</table>
<center>
<?php
if($profile!=""){
echo"<img src='images/$profile' height='175px' width='200px' alt='' style='border: 2px solid black;'>";
}
else{
echo"<img src='images/profile.jpg' height='175px' width='200px' alt='' style='border: 2px solid black;'>";
}
?> </center>
<div class="container" align="center">
<p style="margin-top:2%">Name</p>
<p style="font-weight: bold;margin-top:-4%"><?php if(isset($names)){ $namez=$title.' '.$names;echo$namez;} ?></p>
<p style="margin-top:-4%">Rank</p>
<p style="font-weight: bold;margin-top:-4%"><?php if(isset($rank)){ echo$rank;} ?></p>
<p style="margin-top:-4%">STAFF ID:</p>
<p style="font-weight: bold;margin-top:-4%"><?php if(isset($pass)){ echo$pass;} ?></p>
<p style="margin-top:-4%">MINISTRY/DEARTMENT:</p>
<p style="font-weight: bold;margin-top:-4%"><?php if(isset($dept)){ echo$dept;} ?></p>
<p style="margin-top:-4%">HOLDER SIGNATURE</p>
</div>
</div>
<div class="id-1">
<center><img src="assets/img/eg-dark.png" alt="Avatar" width="200px" height="175px" >
<div class="container" align="center">
<p style="margin:auto">The bearer whose photograph appears overleaf is a staff of</p>
<h2 style="color:#00BFFF;margin-left:2%">Exampli Gratia ID</h2>
<p style="margin:auto">If lost and found please return to the nearest police station</p>
<hr align="center" style="border: 1px solid black;width:80%;margin-top:13%"></hr>
<p align="center" style="margin-top:-2%">Authorised Signature</p>
<p> <?php if(isset($code)){ echo$code;}?>
</p>
<?php if(isset($name)){ echo"Property of ".$name;}?></center>
</div>
</div>
</div>
<?php } ?>
</body>
</html>