| 
									
										
										
										
											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(); | 
					
						
							|  |  |  | ?>
 | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  | <div class="row justify-content-center"> | 
					
						
							|  |  |  |     <div class="col-12 col-md-6"> | 
					
						
							| 
									
										
										
										
											2017-12-09 02:10:45 -07:00
										 |  |  |         <form action="app.php" method="get"> | 
					
						
							|  |  |  |             <input type="hidden" name="page" value="items" /> | 
					
						
							|  |  |  |             <div class="input-group"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                 <input type="text" class="form-control" name="q" id="quicklookup_box" placeholder="<?php $Strings->get("Search"); ?>"/> | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  |                 <div class="input-group-append"> | 
					
						
							| 
									
										
										
										
											2017-12-09 02:10:45 -07:00
										 |  |  |                     <?php | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                     if (isset($_SESSION['mobile']) && $_SESSION['mobile']) { | 
					
						
							| 
									
										
										
										
											2017-12-09 02:10:45 -07:00
										 |  |  |                         ?>
 | 
					
						
							|  |  |  |                         <span class="btn btn-default" onclick="scancode('#quicklookup_box');"> | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  |                             <i class="fas fa-barcode fa-fw"></i> | 
					
						
							| 
									
										
										
										
											2017-12-09 02:10:45 -07:00
										 |  |  |                         </span> | 
					
						
							|  |  |  |                     <?php } ?>
 | 
					
						
							|  |  |  |                     <button type="submit" class="btn btn-primary"> | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  |                         <i class="fas fa-search fa-fw"></i> | 
					
						
							| 
									
										
										
										
											2017-12-09 02:10:45 -07:00
										 |  |  |                     </button> | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  |         </form> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | <br /> | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  | <div class="card-deck"> | 
					
						
							|  |  |  |     <div class="card bg-teal text-light"> | 
					
						
							|  |  |  |         <div class="card-body"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |             <h4 class="card-title"><?php $Strings->get("Total Items") ?></h4>
 | 
					
						
							| 
									
										
										
										
											2018-04-16 17:07:18 -06:00
										 |  |  |             <h1><i class="fas fa-fw fa-boxes"></i> <?php echo $database->count('items'); ?></h1>
 | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  |         </div> | 
					
						
							|  |  |  |         <div class="card-footer"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |             <a href="app.php?page=items" class="text-light"><i class="fas fa-arrow-right"></i> <?php $Strings->get("View Items"); ?></a>
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |         </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  |     <?php | 
					
						
							|  |  |  |     $lowcnt = $database->count('items', ["AND" => ["qty[<]want", "want[>]" => 0]]); | 
					
						
							|  |  |  |     ?>
 | 
					
						
							|  |  |  |     <div class="card bg-<?php echo ($lowcnt > 0 ? "deep-orange" : "green"); ?> text-light"> | 
					
						
							|  |  |  |         <div class="card-body"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |             <h4 class="card-title"><?php $Strings->get("Understocked Items") ?></h4>
 | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  |             <h1><i class="fas fa-fw fa-tachometer-alt"></i> <?php echo $lowcnt; ?></h1>
 | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |         <div class="card-footer"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |             <a href="app.php?page=items&filter=stock" class="text-light"><i class="fas fa-arrow-right"></i> <?php $Strings->get("View Understocked"); ?></a>
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |         </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2018-04-08 16:28:31 -06:00
										 |  |  | </div> |