64 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			64 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /* 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/. */
 | |
| ?>
 | |
| 
 | |
| <div class="row justify-content-center">
 | |
|     <div class="col-12 col-md-6">
 | |
|         <form action="app.php" method="get">
 | |
|             <input type="hidden" name="page" value="viewmachine" />
 | |
|             <div class="input-group">
 | |
|                 <input type="text" class="form-control" name="id" id="quicklookup_box" placeholder="<?php $Strings->get("Machine ID"); ?>"/>
 | |
|                 <div class="input-group-append">
 | |
|                     <?php
 | |
|                     if (isset($_SESSION['mobile']) && $_SESSION['mobile']) {
 | |
|                         ?>
 | |
|                         <span class="btn btn-default" onclick="scancode('#quicklookup_box');">
 | |
|                             <i class="fas fa-barcode fa-fw"></i>
 | |
|                         </span>
 | |
|                     <?php } ?>
 | |
|                     <button type="submit" class="btn btn-primary">
 | |
|                         <i class="fas fa-search fa-fw"></i>
 | |
|                     </button>
 | |
|                 </div>
 | |
|             </div>
 | |
|         </form>
 | |
|     </div>
 | |
| </div>
 | |
| <br />
 | |
| <div class="row justify-content-center">
 | |
| <!--    <div class="col-12 col-md-4">
 | |
|         <div class="card bg-green text-light">
 | |
|             <div class="card-body">
 | |
|                 <h4 class="card-title"><?php $Strings->get("Upcoming"); ?></h4>
 | |
|                 <h1><i class="fas fa-fw fa-calendar"></i> <?php echo $database->count('schedule', ["date[>]" => date("Y-m-d H:i:s")]); ?></h1>
 | |
|             </div>
 | |
|             <div class="card-footer">
 | |
|                 <a href="app.php?page=schedule" class="text-light"><i class="fas fa-arrow-right"></i> <?php $Strings->get("View Schedule"); ?></a>
 | |
|             </div>
 | |
|         </div>
 | |
| 
 | |
|     </div>-->
 | |
|     <div class="col-12 col-md-4">
 | |
|         <div class="card bg-blue text-light">
 | |
|             <div class="card-body">
 | |
|                 <h4 class="card-title"><?php $Strings->get("Recently Updated"); ?></h4>
 | |
|                 <h1><i class="fas fa-fw fa-history"></i> <?php
 | |
|                     $machines = $database->query("SELECT COUNT(machines.machineid) as count FROM machines
 | |
| LEFT OUTER JOIN events ON events.machineid = machines.machineid
 | |
| WHERE date=(SELECT MAX(s2.date)
 | |
|                 FROM events s2
 | |
|                 WHERE machines.machineid = s2.machineid
 | |
|             )
 | |
| AND events.date > NOW() - INTERVAL 1 week
 | |
| LIMIT 100")->fetchAll();
 | |
|                     echo $machines[0]["count"];
 | |
|                     ?></h1>
 | |
|             </div>
 | |
|             <div class="card-footer">
 | |
|                 <a href="app.php?page=machines" class="text-light"><i class="fas fa-arrow-right"></i> <?php $Strings->get("View Machines"); ?></a>
 | |
|             </div>
 | |
|         </div>
 | |
|     </div>
 | |
| </div>
 |