| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  | <?php | 
					
						
							| 
									
										
										
										
											2017-12-16 13:32:58 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* This Source Code Form is subject to the terms of the Mozilla Public | 
					
						
							|  |  |  |  * License, v. 2.0. If a copy of the MPL was not distributed with this | 
					
						
							|  |  |  |  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  | require_once __DIR__ . '/../required.php'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | redirectifnotloggedin(); | 
					
						
							|  |  |  | ?>
 | 
					
						
							| 
									
										
										
										
											2017-11-13 16:16:49 -07:00
										 |  |  | <div class="btn-group mgn-btm-10px"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |     <a href="app.php?page=editloc" class="btn btn-success"><i class="fa fa-plus"></i> <?php $Strings->get("new location"); ?></a>
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  | </div> | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  | <table id="loctable" class="table table-bordered table-hover table-sm"> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |     <thead> | 
					
						
							|  |  |  |         <tr> | 
					
						
							|  |  |  |             <th data-priority="0"></th> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |             <th data-priority="1"><?php $Strings->get('actions'); ?></th>
 | 
					
						
							|  |  |  |             <th data-priority="1"><i class="fas fa-map-marker"></i> <?php $Strings->get('location'); ?></th>
 | 
					
						
							|  |  |  |             <th data-priority="2"><i class="fas fa-barcode"></i> <?php $Strings->get('code'); ?></th>
 | 
					
						
							|  |  |  |             <th data-priority="3"><i class="fas fa-hashtag"></i> <?php $Strings->get('item count'); ?></th>
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |         </tr> | 
					
						
							|  |  |  |     </thead> | 
					
						
							|  |  |  |     <tbody> | 
					
						
							|  |  |  |         <?php | 
					
						
							|  |  |  |         $locs = $database->select('locations', [ | 
					
						
							|  |  |  |             'locid', | 
					
						
							|  |  |  |             'locname', | 
					
						
							|  |  |  |             'loccode' | 
					
						
							|  |  |  |         ]); | 
					
						
							|  |  |  |         foreach ($locs as $loc) { | 
					
						
							|  |  |  |             $itemcount = $database->count('items', ['locid' => $loc['locid']]); | 
					
						
							|  |  |  |             ?>
 | 
					
						
							|  |  |  |             <tr> | 
					
						
							|  |  |  |                 <td></td> | 
					
						
							|  |  |  |                 <td> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                     <a class="btn btn-primary btn-sm" href="app.php?page=editloc&id=<?php echo $loc['locid']; ?>"><i class="fas fa-edit"></i> <?php $Strings->get("edit"); ?></a>
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                 </td> | 
					
						
							|  |  |  |                 <td><?php echo $loc['locname']; ?></td>
 | 
					
						
							|  |  |  |                 <td><?php echo $loc['loccode']; ?></td>
 | 
					
						
							|  |  |  |                 <td><?php echo $itemcount; ?></td>
 | 
					
						
							|  |  |  |             </tr> | 
					
						
							|  |  |  |             <?php | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         ?>
 | 
					
						
							|  |  |  |     </tbody> | 
					
						
							|  |  |  |     <tfoot> | 
					
						
							|  |  |  |         <tr> | 
					
						
							| 
									
										
										
										
											2017-07-05 19:56:23 -06:00
										 |  |  |             <th data-priority="0"></th> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |             <th data-priority="1"><?php $Strings->get('actions'); ?></th>
 | 
					
						
							|  |  |  |             <th data-priority="1"><i class="fas fa-map-marker"></i> <?php $Strings->get('location'); ?></th>
 | 
					
						
							|  |  |  |             <th data-priority="2"><i class="fas fa-barcode"></i> <?php $Strings->get('code'); ?></th>
 | 
					
						
							|  |  |  |             <th data-priority="3"><i class="fas fa-hashtag"></i> <?php $Strings->get('item count'); ?></th>
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |         </tr> | 
					
						
							|  |  |  |     </tfoot> | 
					
						
							|  |  |  | </table> |