Update index.php
This commit is contained in:
parent
9b12c8dcdb
commit
fd3a8bd6c3
200
index.php
200
index.php
@ -11,7 +11,6 @@
|
|||||||
$scanimage = "/usr/bin/scanimage"; // Absolute path to scanimage binary
|
$scanimage = "/usr/bin/scanimage"; // Absolute path to scanimage binary
|
||||||
$convert = "/usr/bin/convert"; //Absolute path to scanimage binary
|
$convert = "/usr/bin/convert"; //Absolute path to scanimage binary
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
@ -22,8 +21,90 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div class="pure-g">
|
||||||
|
<div class="pure-u-1">
|
||||||
|
<h1><?php echo $page_title; ?></h1>
|
||||||
|
<p><?php echo $user_message; ?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<form class="pure-form pure-form-aligned" action="index.php" method="post">
|
||||||
|
<div class="pure-g">
|
||||||
|
<div class="pure-u-1 pure-u-md-1-3">
|
||||||
|
<fieldset>
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<legend><h3>Device Setup</h3></legend>
|
||||||
|
<label for="device">Device</label>
|
||||||
|
<select id="device" class="pure-input-rounded">
|
||||||
|
<option value="epkowa:net:pr01.lzu01.point808.com" selected="selected">pr01 (Epson WF-2540)</option>
|
||||||
|
<option value="hpaio:/net/Deskjet_F4500_series?ip=192.168.101.222">pr02 (HP DeskJet F4580)</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<label for="source">Feed Source</label>
|
||||||
|
<select id="source" class="pure-input-rounded">
|
||||||
|
<option value="Automatic Document Feeder" selected="selected">Automatic Document Feeder</option>
|
||||||
|
<option value="Flatbed">Flatbed</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<label for="mode">Colors</label>
|
||||||
|
<select id="mode" class="pure-input-rounded">
|
||||||
|
<option value="Binary">Black & White</option>
|
||||||
|
<option value="Gray" selected="selected">Grayscale</option>
|
||||||
|
<option value="Color">Color</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<label for="resolution">Resolution</label>
|
||||||
|
<select id="resolution" class="pure-input-rounded">
|
||||||
|
<option value="75">75dpi (FASTEST!)</option>
|
||||||
|
<option value="300" selected="selected">300dpi (FAST!)</option>
|
||||||
|
<option value="600">600dpi (SLOW!)</option>
|
||||||
|
<option value="1200">1200dpi (SLOWEST!)</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="scan" value="yes" />
|
||||||
|
<input type="submit" onclick="this.disabled=true;this.value='Scanning - PLEASE be patient!';this.form.submit();" value="Scan!" class="pure-button pure-button-primary" />
|
||||||
|
</div>
|
||||||
|
<div class="pure-u-1 pure-u-md-1-3">
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<legend><h3>File Options</h3></legend>
|
||||||
|
<label for="filetype">File Type</label>
|
||||||
|
<select id="filetype" class="pure-input-rounded">
|
||||||
|
<option value="pdf" selected="selected">PDF (multipage)</option>
|
||||||
|
<option value="jpg">JPG (image)</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<label for="filenaming">File Naming</label>
|
||||||
|
<input id="filenaming" class="pure-input-rounded" placeholder="Append to filename">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="pure-u-1 pure-u-md-1-3">
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<legend><h3>Page Size</h3></legend>
|
||||||
|
<label for="l">X-Start (top-left, mm)</label>
|
||||||
|
<input type="number" id="l" class="pure-input-rounded" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<label for="t">Y-Start (top-left, mm)</label>
|
||||||
|
<input type="number" id="t" class="pure-input-rounded" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<label for="x">Width (mm)</label>
|
||||||
|
<input type="number" id="x" class="pure-input-rounded" value="215.9">
|
||||||
|
</div>
|
||||||
|
<div class="pure-control-group">
|
||||||
|
<label for="y">Height (mm)</label>
|
||||||
|
<input type="number" id="y" class="pure-input-rounded" value="279">
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</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;
|
||||||
|
|
||||||
@ -74,109 +155,28 @@ if (isset($_POST["scan"])) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="pure-g">
|
|
||||||
<div class="pure-u-1">
|
|
||||||
<h1>Scanner Web GUI</h1>
|
|
||||||
<p>aa</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<form class="pure-form pure-form-aligned" action="index.php" method="post">
|
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<div class="pure-u-1 pure-u-md-1-3">
|
<div class="pure-u-1 pure-u-md-1-2">
|
||||||
<fieldset>
|
<h2>Previous Document Scans (PDF)</h2>
|
||||||
<div class="pure-control-group">
|
<?php
|
||||||
<legend><h3>Device Setup</h3></legend>
|
$phpfiles = array_reverse(glob($scan_dir . "*.pdf"));
|
||||||
<label for="device">Device</label>
|
|
||||||
<select id="device" class="pure-input-rounded">
|
|
||||||
<option value="epkowa:net:pr01.lzu01.point808.com" selected="selected">pr01 (Epson WF-2540)</option>
|
|
||||||
<option value="hpaio:/net/Deskjet_F4500_series?ip=192.168.101.222">pr02 (HP DeskJet F4580)</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="pure-control-group">
|
|
||||||
<label for="source">Feed Source</label>
|
|
||||||
<select id="source" class="pure-input-rounded">
|
|
||||||
<option value="Automatic Document Feeder" selected="selected">Automatic Document Feeder</option>
|
|
||||||
<option value="Flatbed">Flatbed</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="pure-control-group">
|
|
||||||
<label for="mode">Colors</label>
|
|
||||||
<select id="mode" class="pure-input-rounded">
|
|
||||||
<option value="Binary">Black & White</option>
|
|
||||||
<option value="Gray" selected="selected">Grayscale</option>
|
|
||||||
<option value="Color">Color</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="pure-control-group">
|
|
||||||
<label for="resolution">Resolution</label>
|
|
||||||
<select id="resolution" class="pure-input-rounded">
|
|
||||||
<option value="75">75dpi (FASTEST!)</option>
|
|
||||||
<option value="300" selected="selected">300dpi (FAST!)</option>
|
|
||||||
<option value="600">600dpi (SLOW!)</option>
|
|
||||||
<option value="1200">1200dpi (SLOWEST!)</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="scan" value="yes" />
|
|
||||||
<input type="submit" onclick="this.disabled=true;this.value='Scanning - PLEASE be patient!';this.form.submit();" value="Scan!" class="pure-button pure-button-primary" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pure-u-1 pure-u-md-1-3">
|
|
||||||
<div class="pure-control-group">
|
|
||||||
<legend><h3>File Options</h3></legend>
|
|
||||||
<label for="filetype">File Type</label>
|
|
||||||
<select id="filetype" class="pure-input-rounded">
|
|
||||||
<option value="pdf" selected="selected">PDF (multipage)</option>
|
|
||||||
<option value="jpg">JPG (image)</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="pure-control-group">
|
|
||||||
<label for="filenaming">File Naming</label>
|
|
||||||
<input id="filenaming" class="pure-input-rounded" placeholder="Append to filename">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="pure-u-1 pure-u-md-1-3">
|
|
||||||
|
|
||||||
<div class="pure-control-group">
|
|
||||||
<legend><h3>Page Size</h3></legend>
|
|
||||||
<label for="l">X-Start (top-left, mm)</label>
|
|
||||||
<input type="number" id="l" class="pure-input-rounded" value="0">
|
|
||||||
</div>
|
|
||||||
<div class="pure-control-group">
|
|
||||||
<label for="t">Y-Start (top-left, mm)</label>
|
|
||||||
<input type="number" id="t" class="pure-input-rounded" value="0">
|
|
||||||
</div>
|
|
||||||
<div class="pure-control-group">
|
|
||||||
<label for="x">Width (mm)</label>
|
|
||||||
<input type="number" id="x" class="pure-input-rounded" value="215.9">
|
|
||||||
</div>
|
|
||||||
<div class="pure-control-group">
|
|
||||||
<label for="y">Height (mm)</label>
|
|
||||||
<input type="number" id="y" class="pure-input-rounded" value="279">
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div class="pure-g">
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2">
|
|
||||||
<h2>Previous Document Scans (PDF)</h2>
|
|
||||||
<?php
|
|
||||||
$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>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user