forked from itflow-org/itflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclients-test.php
More file actions
51 lines (43 loc) · 1.52 KB
/
Copy pathclients-test.php
File metadata and controls
51 lines (43 loc) · 1.52 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
<?php include("header.php");
$sql = mysqli_query($mysqli,"SELECT * FROM clients LEFT JOIN contacts ON clients.primary_contact = contacts.contact_id LEFT JOIN locations ON clients.primary_location = locations.location_id");
?>
<div class="card card-dark">
<div class="card-header py-2">
<h3 class="card-title mt-2"><i class="fa fa-fw fa-users"></i> Clients</h3>
<div class="card-tools">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#addClientModal"><i class="fas fa-fw fa-plus"></i> New Client</button>
</div>
</div>
<div class="card-body">
<hr>
<div class="table-responsive">
<table class="table table-striped table-hover table-borderless">
<thead>
<tr>
<th>Client ID</th>
<th>Client</th>
<th>Contact Name</th>
<th>Location</th>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($sql)){
$client_id = $row['client_id'];
$client_name = $row['client_name'];
$contact_name = $row['contact_name'];
$location_address = $row['location_address'];
?>
<tr>
<td><?php echo $client_id; ?></td>
<td><?php echo $client_name; ?></td>
<td><?php echo $contact_name; ?></td>
<td><?php echo $location_address; ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
<?php include("footer.php");