forked from itflow-org/itflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
client_contact_details_modal.php
156 lines (123 loc) · 5.18 KB
/
client_contact_details_modal.php
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<?php
$sql_assets = mysqli_query($mysqli,"SELECT * FROM assets WHERE contact_id = $contact_id");
$sql_logins = mysqli_query($mysqli,"SELECT * FROM logins WHERE contact_id = $contact_id");
$sql_software = mysqli_query($mysqli,"SELECT * FROM software WHERE contact_id = $contact_id");
?>
<div class="modal" id="contactDetailsModal<?php echo $contact_id; ?>" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content bg-dark">
<div class="modal-header">
<h5 class="modal-title text-white"><i class="fa fa-fw fa-user-edit mr-2"></i><?php echo $contact_name; ?></h5>
<button type="button" class="close text-white" data-dismiss="modal">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body bg-white">
<ul class="nav nav-pills nav-justified mb-3" id="pills-tab">
<li class="nav-item">
<a class="nav-link active" id="pills-assets-tab<?php echo $contact_id; ?>" data-toggle="pill" href="#pills-assets<?php echo $contact_id; ?>">Assets</a>
</li>
<li class="nav-item">
<a class="nav-link" id="pills-logins-tab<?php echo $contact_id; ?>" data-toggle="pill" href="#pills-logins<?php echo $contact_id; ?>">Logins</a>
</li>
<li class="nav-item">
<a class="nav-link" id="pills-software-tab<?php echo $contact_id; ?>" data-toggle="pill" href="#pills-software<?php echo $contact_id; ?>">Software</a>
</li>
</ul>
<hr>
<div class="tab-content" id="pills-tabContent<?php echo $contact_id; ?>">
<div class="tab-pane fade show active" id="pills-assets<?php echo $contact_id; ?>">
<table class="table border table-hover">
<thead class="thead-light">
<tr>
<th>Type</th>
<th>Name</th>
<th>Make<</th>
<th>Model</th>
<th>Serial</th>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($sql_assets)){
$asset_id = $row['asset_id'];
$asset_type = $row['asset_type'];
$asset_name = $row['asset_name'];
$asset_make = $row['asset_make'];
$asset_model = $row['asset_model'];
$asset_serial = $row['asset_serial'];
?>
<td><?php echo $asset_type; ?></td>
<td><?php echo $asset_name; ?></td>
<td><?php echo $asset_make; ?></td>
<td><?php echo $asset_model; ?></td>
<td><?php echo $asset_serial; ?></td>
<?php
}
?>
</tbody>
</table>
</div>
<div class="tab-pane fade" id="pills-logins<?php echo $contact_id; ?>">
<table class="table border table-hover">
<thead class="thead-light">
<tr>
<th>Name</th>
<th>Username</th>
<th>Password</th>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($sql_logins)){
$login_id = $row['login_id'];
$login_name = $row['login_name'];
$login_uri = $row['login_uri'];
$login_username = $row['login_username'];
$login_password = $row['login_password'];
$login_note = $row['login_note'];
$vendor_id = $row['vendor_id'];
$asset_id = $row['asset_id'];
$software_id = $row['software_id'];
?>
<td><?php echo $login_name; ?></td>
<td><?php echo $login_username; ?></td>
<td><?php echo $login_password; ?></td>
<?php
}
?>
</tbody>
</table>
</div>
<div class="tab-pane fade" id="pills-software<?php echo $contact_id; ?>">
<table class="table border table-hover">
<thead class="thead-light">
<tr>
<th>Software</th>
<th>Type</th>
<th>License</th>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($sql_software)){
$software_id = $row['software_id'];
$software_name = $row['software_name'];
$software_type = $row['software_type'];
$software_license = $row['software_license'];
$software_notes = $row['software_notes'];
?>
<td><?php echo $software_name; ?></td>
<td><?php echo $software_type; ?></td>
<td><?php echo $software_license; ?></td>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>