-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbarcode_page_cd.php
More file actions
110 lines (78 loc) · 2.67 KB
/
barcode_page_cd.php
File metadata and controls
110 lines (78 loc) · 2.67 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
<?php
ob_start();
?>
<!-- <link rel="stylesheet" type="text/css" href="print.css" media="print"> -->
<!--Title-->
<div class="col-12 d-flex align-items-center justify-content-between">
<h4 class="page-title">
<button onclick="window.print();" type="submit" class="btn btn-info" name="" ><i class="menu-icon icon-printer"></i> Print</button>
</h4>
<div class="d-flex align-items-center">
<div class="wrapper mr-4 d-none d-sm-block">
<p class="mb-0">Print
<b class="mb-0">Section</b>
</p>
</div>
<div class="wrapper">
<a href="system" class="btn btn-link btn-sm font-weight-bold">
<i class="icon-home"></i>Home</a>
</div>
</div>
</div>
<style>
@media print{
body * {
visibility: hidden;
}
.print-container, .print-container * {
visibility: visible;
border: none;
}
}
</style>
<div class="row print-container col-12 d-flex align-items-center justify-content-between" style="margin-top:20px;">
<div class="col-12">
<div class="card">
<div class="card-body">
<h4 class="header-title">Recent Print Barcods</h4><br>
<div class="d-block" style="height:2px; background-color:#564a4a26"></div><br>
<?php
include 'connection_DB.php';
session_start();
if(isset($_POST['generateBarcode'])) {
$ides = $_POST['barcodeText'];
foreach($ides as $y)
{
$query = mysqli_query($con, 'SELECT copy FROM cd WHERE cd_id = "'.$y.'" LIMIT 0,1');
$row = mysqli_fetch_array($query);
$book_copy = $row[0];
for($i = 1; $i<=$book_copy; $i++){
$barcodeText = trim($y);
$barcodeType=$_POST['barcodeType'];
$barcodeDisplay=$_POST['barcodeDisplay'];
$barcodeSize=$_POST['barcodeSize'];
$printText=$_POST['printText'];
echo "<div class='float-left mr-1 mb-2'>";
echo '<h4>Gawharshad University</h4>';
echo '<img class="barcode" alt="'.$barcodeText.'" src="barcode.php?text='.$barcodeText.'&codetype='.$barcodeType.'&orientation='.$barcodeDisplay.'&size='.$barcodeSize.'&print='.$printText.'"/>';
echo "</div>";
}
}
}
?>
</div>
</div>
</div>
</div>
<style>
img.barcode {
border: 1px solid #ccc;
padding: 20px 10px;
border-radius: 5px;
}
</style>
<?php
$section = ob_get_contents();
ob_end_clean();
include_once("master_page.php");
?>