| 
									
										
										
										
											2024-09-16 14:09:37 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |                 <div class="row"> | 
					
						
							|  |  |  | <?php if ($widget['collapsible'] === true) { ?>
 | 
					
						
							| 
									
										
										
										
											2024-10-04 11:18:28 +00:00
										 |  |  |                     <a style="text-decoration: none;" data-toggle="collapse" href="#collapse<?= htmlspecialchars($widget['name']) ?>" role="button" aria-expanded="true" aria-controls="collapse<?= htmlspecialchars($widget['name']) ?>"> | 
					
						
							|  |  |  |                         <div class="card w-auto bg-light card-body"  style="flex-direction: row;"><?= htmlspecialchars($widget['title']) ?></div>
 | 
					
						
							| 
									
										
										
										
											2024-09-16 14:09:37 +00:00
										 |  |  | <?php } else { ?>
 | 
					
						
							| 
									
										
										
										
											2024-10-04 11:18:28 +00:00
										 |  |  |                     <div class="card w-auto bg-light border-light card-body"  style="flex-direction: row;"><?= htmlspecialchars($widget['title']) ?></div>
 | 
					
						
							| 
									
										
										
										
											2024-09-16 14:09:37 +00:00
										 |  |  | <?php } ?>
 | 
					
						
							|  |  |  | <?php if ($widget['filter'] === true) { | 
					
						
							|  |  |  |     include '../app/templates/logs-filter.php'; } ?>
 | 
					
						
							|  |  |  | <?php if ($widget['collapsible'] === true) { ?>
 | 
					
						
							|  |  |  |                     </a> | 
					
						
							|  |  |  | <?php } ?>
 | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-04 11:18:28 +00:00
										 |  |  |                 <!-- widget "<?= htmlspecialchars($widget['name']) ?>" --> | 
					
						
							|  |  |  |                 <div class="collapse show" id="collapse<?= htmlspecialchars($widget['name']) ?>"> | 
					
						
							| 
									
										
										
										
											2024-09-16 14:09:37 +00:00
										 |  |  | <?php if ($time_range_specified) { ?>
 | 
					
						
							| 
									
										
										
										
											2024-10-04 11:18:28 +00:00
										 |  |  |                     <p class="m-3">time period: <strong><?= htmlspecialchars($from_time) ?> - <?= htmlspecialchars($until_time) ?></strong></p>
 | 
					
						
							| 
									
										
										
										
											2024-09-16 14:09:37 +00:00
										 |  |  | <?php } ?>
 | 
					
						
							|  |  |  |                     <div class="mb-5"> | 
					
						
							|  |  |  | <?php if ($widget['full'] === true) { ?>
 | 
					
						
							|  |  |  |                         <table class="table table-striped table-hover table-bordered"> | 
					
						
							|  |  |  |                             <thead class="thead-dark"> | 
					
						
							|  |  |  |                                 <tr> | 
					
						
							|  |  |  | <?php     foreach ($widget['table_headers'] as $header) { ?>
 | 
					
						
							| 
									
										
										
										
											2024-10-04 11:18:28 +00:00
										 |  |  |                                     <th scope="col" class="th-<?= htmlspecialchars($header) ?>"><?= htmlspecialchars($header) ?></th>
 | 
					
						
							| 
									
										
										
										
											2024-09-16 14:09:37 +00:00
										 |  |  | <?php     } ?>
 | 
					
						
							|  |  |  |                                 </tr> | 
					
						
							|  |  |  |                             </thead> | 
					
						
							|  |  |  |                             <tbody> | 
					
						
							|  |  |  | <?php     foreach ($widget['table_records'] as $row) { ?>
 | 
					
						
							|  |  |  |                                 <tr> | 
					
						
							|  |  |  | <?php | 
					
						
							|  |  |  |             foreach ($row as $key => $column) { | 
					
						
							|  |  |  |                     if ($key === 'user ID' && isset($user_id) && $user_id === $column) { ?>
 | 
					
						
							| 
									
										
										
										
											2024-10-04 11:18:28 +00:00
										 |  |  |                                     <td><strong><?= htmlspecialchars($column ?? '') ?></strong></td>
 | 
					
						
							| 
									
										
										
										
											2024-09-16 14:09:37 +00:00
										 |  |  | <?php               } else { ?>
 | 
					
						
							| 
									
										
										
										
											2024-10-04 11:18:28 +00:00
										 |  |  |                                     <td><?= htmlspecialchars($column ?? '') ?></td>
 | 
					
						
							| 
									
										
										
										
											2024-09-16 14:09:37 +00:00
										 |  |  | <?php               } | 
					
						
							|  |  |  |                 } ?>
 | 
					
						
							|  |  |  |                                 </tr> | 
					
						
							|  |  |  | <?php     } ?>
 | 
					
						
							|  |  |  |                             </tbody> | 
					
						
							|  |  |  |                         </table> | 
					
						
							|  |  |  | <?php | 
					
						
							|  |  |  | if ($widget['pagination'] && $item_count > $items_per_page) { | 
					
						
							|  |  |  |     $url = "$app_root?platform=$platform_id&page=$page"; | 
					
						
							|  |  |  |     include '../app/helpers/pagination.php'; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ?>
 | 
					
						
							|  |  |  | <?php } else { ?>
 | 
					
						
							|  |  |  |                     <p class="m-3">No matching records found.</p> | 
					
						
							|  |  |  | <?php } ?>
 | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2024-10-04 11:18:28 +00:00
										 |  |  |                 <!-- /widget "<?= htmlspecialchars($widget['name']) ?>" --> |