233 lines
4.7 KiB
PHP
233 lines
4.7 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<style>
|
|
html,
|
|
body {
|
|
width: 50mm;
|
|
height: 35mm;
|
|
margin: 0;
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
#container {
|
|
width: inherit;
|
|
height: inherit;
|
|
margin: 0;
|
|
padding: 0;
|
|
background-color: pink;
|
|
}
|
|
|
|
h1 {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
</style>
|
|
</head>
|
|
<?php
|
|
include ('includes/functions.php');
|
|
|
|
$data = $_REQUEST['waste_id'];
|
|
// echo $data;
|
|
$requests = "?waste_id=" . $data;
|
|
$data = explode("^", $data);
|
|
$waste_id = $data[0];
|
|
|
|
$waste_type = $data[1];
|
|
$waste_cat = $data[2];
|
|
|
|
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')
|
|
$url = "https://";
|
|
else
|
|
$url = "http://";
|
|
// Append the host(domain name, ip) to the URL.
|
|
$url .= $_SERVER['HTTP_HOST'];
|
|
|
|
// Append the requested resource location to the URL
|
|
$url .= $_SERVER['REQUEST_URI'];
|
|
|
|
$link = $url . $requests;
|
|
|
|
$queryc = "select * from company_profile ";
|
|
|
|
//echo $query;
|
|
|
|
$resultc = mysqli_query($conn, $queryc);
|
|
|
|
$row_company = mysqli_fetch_array($resultc);
|
|
|
|
@extract($row_company);
|
|
|
|
if ($_SESSION['current_ohcttype'] == '' || empty($_SESSION['current_ohcttype'])) {
|
|
$_SESSION['current_ohcttype'] = getFieldFromTable('ohc_type_id', 'bio_medical_waste_new', 'waste_id', $waste_id);
|
|
}
|
|
|
|
$query_ohc = "select * from ohc_type where ohc_type_id='" . $_SESSION['current_ohcttype'] . "' ";
|
|
|
|
//echo $query;
|
|
|
|
$result_ohc = mysqli_query($conn, $query_ohc);
|
|
|
|
$row_ohc = mysqli_fetch_array($result_ohc);
|
|
|
|
@extract($row_ohc);
|
|
|
|
$queryw = "SELECT * FROM `bio_medical_waste_new` WHERE waste_id='" . $waste_id . "'";
|
|
|
|
//echo $query;
|
|
|
|
$resultw = mysqli_query($conn, $queryw);
|
|
|
|
$row_waste = mysqli_fetch_array($resultw);
|
|
|
|
@extract($row_waste);
|
|
|
|
?>
|
|
|
|
<style type="text/css">
|
|
* {
|
|
font-family: 'Times New Roman', Times, serif
|
|
}
|
|
|
|
.btn {
|
|
background-color: #4CAF50;
|
|
border-radius: 5%;
|
|
border: none;
|
|
color: white;
|
|
padding: 15px 32px;
|
|
text-align: center;
|
|
text-decoration: none;
|
|
display: inline-block;
|
|
font-size: 16px;
|
|
margin: 4px 2px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
@media print {
|
|
#printPageButton {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
hr,
|
|
h4 {
|
|
|
|
margin-top: 0px;
|
|
margin-bottom: 0px;
|
|
|
|
}
|
|
|
|
body {
|
|
height: 200px;
|
|
width: 300px;
|
|
}
|
|
</style>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
<h4>Sender:</h4>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<div align="left">
|
|
|
|
<h4 style="font-weight: lighter;">
|
|
<?php echo $row_company['company_name'] ?>
|
|
|
|
<pre style="margin-top: 0px;margin-bottom: 0px;"><?php
|
|
echo $row_ohc['address']
|
|
?>
|
|
</pre>
|
|
|
|
</h4>
|
|
</div>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<hr>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
<h4>Receiver:</h4>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<div align="left">
|
|
|
|
<h4 style="font-weight: lighter;">
|
|
<?php echo getTableFieldValue('bio_wast_collector', 'collector_name', 'collector_id', $row_waste['collected_by']) ?>
|
|
</h4>
|
|
</div>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
<hr>
|
|
<table class="qty_table">
|
|
<tr>
|
|
<td>
|
|
|
|
<h4>Date of Disposal:</h4>
|
|
<h4 style="font-weight: lighter;">
|
|
<?= date_format(date_create($row_waste['waste_gen_date']), "d-M-Y") ?>
|
|
</h4>
|
|
|
|
|
|
</td>
|
|
<td rowspan="3" align="left">
|
|
|
|
<?php
|
|
include 'phpqrcode/qrlib.php';
|
|
$location = 'qr-code/' . rand() . '.png';
|
|
QRcode::png($link, $location, '', 3, '', '');
|
|
?>
|
|
<img style="margin-left: 22px;" src="<?= $location ?>" alt="">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<div align="left">
|
|
|
|
<h4>Category:<span style="font-weight: lighter;">
|
|
<?= $waste_cat ?>
|
|
</span>
|
|
</h4>
|
|
|
|
</div>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
|
|
<td colspan="2">
|
|
<div align="left">
|
|
|
|
<h4>Weight:<span style="font-weight: lighter;">
|
|
<?= $row_waste[$waste_type] . " gms" ?>
|
|
</span></h4>
|
|
|
|
|
|
</div>
|
|
</td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<button align="center" id="printPageButton" class="btn btn-success" onClick="window.print();">Print</button>
|
|
|
|
</html>
|