Update index.php

This commit is contained in:
Josh North 2014-08-25 14:57:20 -04:00
parent fd3a8bd6c3
commit 8e263f5987

View File

@ -104,7 +104,9 @@
</form> </form>
<?php
<?php
// initialize scanned files directory path // initialize scanned files directory path
$scans_dir = $app_dir . $scan_dir; $scans_dir = $app_dir . $scan_dir;
@ -159,24 +161,25 @@ if (isset($_POST["scan"])) {
<div class="pure-g"> <div class="pure-g">
<div class="pure-u-1 pure-u-md-1-2"> <div class="pure-u-1 pure-u-md-1-2">
<h2>Previous Document Scans (PDF)</h2> <h2>Previous Document Scans (PDF)</h2>
<?php <?php
$phpfiles = array_reverse(glob($scan_dir . "*.pdf")); $phpfiles = array_reverse(glob($scan_dir . "*.pdf"));
foreach($phpfiles as $phpfile) { foreach($phpfiles as $phpfile) {
echo "<a target=\"_blank\" href=$phpfile>".basename($phpfile)."</a><br />"; echo "<a target=\"_blank\" href=$phpfile>".basename($phpfile)."</a><br />";
} }
?> ?>
</div> </div>
<div class="pure-u-1 pure-u-md-1-2"> <div class="pure-u-1 pure-u-md-1-2">
<h2>Previous Image Scans (JPG)</h2> <h2>Previous Image Scans (JPG)</h2>
<?php <?php
$phpfiles = array_reverse(glob($scan_dir . "*.jpg")); $phpfiles = array_reverse(glob($scan_dir . "*.jpg"));
foreach($phpfiles as $phpfile) { foreach($phpfiles as $phpfile) {
echo "<a target=\"_blank\" href=$phpfile>".basename($phpfile)."</a><br />"; echo "<a target=\"_blank\" href=$phpfile>".basename($phpfile)."</a><br />";
} }
?> ?>
</div>
</div> </div>
</body> </body>
</html> </html>