nhance/app/Views/id_card_view.php

80 lines
4.2 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Driving License ID Card</title>
</head>
<body>
<table>
<?php if(isset($data)) { ?>
<?php foreach ($data as $key => $value) { ?>
<tr>
<td>
<!-- Left side of the ID card -->
<div
style="width: 400px; height: 250px; background-color: #f0f0f0; border: 1px solid #ccc; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; margin: 0 10px;">
<div style="padding: 20px; box-sizing: border-box; border-right: 1px solid #ccc;">
<div style="margin-bottom: 10px; display: flex; justify-content: space-between;">
<label style="font-weight: bold;">Name:</label>
<span><?= htmlspecialchars($value['name']) ?></span>
</div>
<div style="margin-bottom: 10px; display: flex; justify-content: space-between;">
<label style="font-weight: bold;">Policy No:</label>
<span><?= htmlspecialchars($value['tpa_id']) ?></span>
</div>
<div style="margin-bottom: 10px; display: flex; justify-content: space-between;">
<label style="font-weight: bold;">Card No:</label>
<span><?= 'KR2-0' . $key ?></span>
</div>
<div style="margin-bottom: 10px; display: flex; justify-content: space-between;">
<label style="font-weight: bold;">Emp.Id:</label>
<span><?= htmlspecialchars($value['emp_code']) ?></span>
</div>
<div style="margin-bottom: 10px; display: flex; justify-content: space-between;">
<label style="font-weight: bold;">Age:</label>
<span><?= htmlspecialchars($value['emp_age']) ?></span>
</div>
<div style="margin-bottom: 10px; display: flex; justify-content: space-between;">
<label style="font-weight: bold;">Valid up to:</label>
<span><?= htmlspecialchars(formatDateOrReturn($value['policy_end_date'])) ?></span>
</div>
</div>
</div>
</td>
<td>
<!-- Right side of the ID card -->
<div
style="width: 400px; height: 250px; background-color: #f0f0f0; border: 1px solid #ccc; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; margin: 0 10px; font-size:smaller">
<div style="padding: 20px; box-sizing: border-box; border-left: 1px solid #ccc;">
<div style="padding-top: 20px;position: relative;bottom: 36px;">
<h4>Terms and Conditions</h4>
<p>This card is non-transferable and is valid at network hospitals only.</p>
<ul style="padding-left: 20px;">
<li>will enable Card Holder to avail cashless hospitalization only on the basis of
</li>
<li>In the case of photoless identity cards issued to beneficiaries, acceptable
proof</li>
<li>Notify the authorities in case of any changes to your personal information.</li>
<li>The mentioned covers are add-ons by paying additional premium and available only if opted by the policyholders.</li>
</ul>
</div>
</div>
</div>
</td>
</tr>
<?php } ?>
<?php } ?>
</table>
<?php if(!isset($data)) { ?>
<a href="<?= htmlspecialchars(base_url('util/digital-id-card/'.md5('EMP004').'/'.md5('12'))) ?>"
target="_blank">button</a>
<?php } ?>
</body>
</html>