ESH/client_list_pdf.php
2024-10-23 18:28:06 +05:30

72 lines
1.9 KiB
PHP

<?php include('pdf_header.php');
include('includes/config/config.php');
// include('pop_up_top.php');
?>
<table width="100%">
<tr>
<div style="font-size:12px">
<td width="25%" align="left"> Run Date :
<?php echo date("d-M-Y"); ?>
</td>
<td width="50%" align="center" style="font-size:20px"><strong>STATE MASTER LIST </strong></td>
<td width="25%" align="left"> User :
<?php echo $username ?>
</td>
</tr>
</table>
<br>
<br>
<center>
<table border="1" style="text-align: center;" width="100%">
<?php
$sql = "SELECT * from client_master ORDER BY id DESC";
error_log($sql);
$result = mysqli_query($conn, $sql);
//echo $result;
?>
<tr bgcolor='#eeeeee'>
<td width="10%">Sr</td>
<td>Client Name</td>
<td>Client Location</td>
<td>Contact</td>
<td>Email</td>
<td>Remarks</td>
</tr>
<?php
$count = 1;
while ($row = mysqli_fetch_assoc($result)) {
extract($row_staff);
?>
<tr>
<td><?php echo $count ?></td>
<td><?php echo $row['client_name'] ?></td>
<td><?php
$id = $row['id'];
$get_location = "SELECT group_concat(client_location) as location from client_location where client_id = '" . $id . "'";
error_log("client location " . $get_location);
$result_get = mysqli_query($conn, $get_location);
$row_get = mysqli_fetch_assoc($result_get);
echo $locations = $row_get['location']; ?>
</td>
<td>
<?php echo $row['client_contact'] ?>
</td>
<td>
<?php echo $row['client_email'] ?>
</td>
<td>
<?php echo $row['remarks']?>
</td>
</tr>
<?php
$count++;
}
?>
</table>
</center>
<?php
include('pdf_footer.php');
?>