Skip to content

Commit

Permalink
Update refresh-inventory.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rschitz committed Nov 2, 2023
1 parent eb46ddd commit f8b8b17
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion var/www/admin/refresh-inventory.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
session_start();
$title = "Refresh SexiGraf VI Offline Inventory";
$title = "SexiGraf Inventory Refresh & History";
require("header.php");
require("helper.php");
?>
Expand Down Expand Up @@ -55,6 +55,20 @@
</div>';
}
?>

<?php
$dir = "/mnt/wfs/inventory/";
chdir($dir);
array_multisort(array_map('filemtime', ($files = glob("*.*"))), SORT_DESC, $files);
foreach($files as $filename) {
if ($filename != "." && $filename != ".." && $filename != "vipscredentials.xml" && $filename != "vbrpscredentials.xml") {
$invlist .= '<li><a href="/sexihistory/'.$filename.'">'.$filename.'</a></li>';
}
}
?>
<h1>Inventory History:</h1>
<ul><?php echo $invlist; ?></ul>

<script type="text/javascript" src="js/bootstrap.min.js"></script>
</body>
</html>

0 comments on commit f8b8b17

Please sign in to comment.