115 lines
4.0 KiB
PHP
115 lines
4.0 KiB
PHP
<?php include('pdf_header.php');
|
|
?>
|
|
<link href="includes/css-js/admin.css" rel="stylesheet" type="text/css" />
|
|
<style>
|
|
.btn {
|
|
background-color: #4CAF50;
|
|
border-radius: 5%;
|
|
/* Green */
|
|
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;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<body>
|
|
<?php include('pdf_ohc_header.php') ?>
|
|
<br><br>
|
|
<table border="1" width="100%">
|
|
<strong>
|
|
<tr bgcolor="#eeeeee">
|
|
<td align="left" width="1%">Sr.</td>
|
|
<td align="left" width="5%">Shift</td>
|
|
<td align="left" width="5%">Shift Start Time</td>
|
|
<td align="left" width="5%">Shift End Time</td>
|
|
<td align="left" width="5%">Communication Date.</td>
|
|
<td align="left" width="5%">Staff Name </td>
|
|
<td align="left" width="18%">Communication Details</td>
|
|
<td align="left" width="15%">Remarks</td>
|
|
</tr>
|
|
|
|
<?php
|
|
$count=1;
|
|
$sql_communication = "select distinct c.comm_date, c.modified_by,t.emp_id as emp_id from communication_details c left join tbl_users t on t.user_id=c.modified_by ";
|
|
//echo $sql_communication;
|
|
$results_communication = @mysqli_query($conn, $sql_communication);
|
|
|
|
|
|
while ($row = @mysqli_fetch_assoc($results_communication)) {
|
|
$modified_by = $row['modified_by'];
|
|
$comm_date = $row['comm_date'];
|
|
|
|
$emp_id = $row['emp_id'];
|
|
$sql_communication_details = "select c.details,c.remarks,c.comm_date,c.communication_id,ssd.*, ss.* from communication_details c left join shift_status_details ssd on c.shift_details_id = ssd.shift_details_id left join shift_status ss on ss.shift_status_id = ssd.shift_id where c.modified_by ='" . $modified_by . "' and c.comm_date ='" . $comm_date . "' ";
|
|
$results_communication_details = @mysqli_query($conn, $sql_communication_details);
|
|
$sql_export = $sql_communication_details;
|
|
error_log("sql comm details: " . $sql_communication_details);
|
|
//$communication_info='';
|
|
|
|
$communication_info = "";
|
|
$remarks_info = "";
|
|
while ($row_details = @mysqli_fetch_assoc($results_communication_details)) {
|
|
@extract($row_details);
|
|
if (isset($row_details['details']) && $row_details['details'] != '') {
|
|
$communication_info .= '<b>' . getTableFieldValue('communication', 'com_item', 'communication_id', $row_details['communication_id']) . '</b>::' . $row_details['details'] . '<br>';
|
|
|
|
error_log("dettttttttttttttails" . $communication_info);
|
|
}
|
|
if (isset($row_details['remarks']) && $row_details['remarks'] != '') {
|
|
$remarks_info .= '<b>' . getTableFieldValue('communication', 'com_item', 'communication_id', $row_details['communication_id']) . '</b>::' . $row_details['remarks'] . '<br>';
|
|
|
|
error_log("remarks:::" . $remarks_info);
|
|
}
|
|
|
|
$status_name = $row_details['status_name'];
|
|
$start_date_time = $row_details['start_date_time'];
|
|
$end_date_time = $row_details['end_date_time'];
|
|
}
|
|
?>
|
|
|
|
<tr>
|
|
<td><?php echo $count ?></td>
|
|
<td><?php echo $status_name ?></td>
|
|
<td><?php echo $start_date_time ?></td>
|
|
<td><?php echo $end_date_time ?></td>
|
|
<td><?php echo date_format(date_create($row1['comm_date']), "d-M-Y ") ?></td>
|
|
<td><?php echo getTableFieldValue('tbl_users ', 'user_name', 'user_id', $row['modified_by']) ?></td>
|
|
<td><?php echo $communication_info ?></td>
|
|
<td><?php echo $remarks_info ?></td>
|
|
|
|
|
|
|
|
</tr>
|
|
<?php
|
|
$count++;
|
|
}
|
|
?>
|
|
</table>
|
|
</body>
|
|
|
|
<div align="center">
|
|
|
|
<button align="center" id="printPageButton" class="btn btn-success" onClick="window.print();">Print</button>
|
|
</div>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
window.print();
|
|
|
|
});
|
|
</script>
|
|
<?php
|
|
// include('pdf_footer.php');
|
|
?>
|