115 lines
4.3 KiB
PHP
115 lines
4.3 KiB
PHP
<?php
|
|
session_start();
|
|
|
|
if (!isset($_SESSION["ScannersList"]))
|
|
{
|
|
header("Location: interface.php");
|
|
exit;
|
|
}
|
|
|
|
require("include/appConfig.php");
|
|
?>
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>saneAdmin</title>
|
|
|
|
<script src="js/appControl.js"></script>
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
|
</head>
|
|
<body>
|
|
<div class="container text-center">
|
|
<h1><heavy>saneAdmin</heavy> - web based scanner control</h1>
|
|
</div>
|
|
|
|
<div class="container mt-5">
|
|
<div class="row">
|
|
<div class="col">
|
|
<p class="fw-medium">Settings</p>
|
|
<hr>
|
|
<div class="mb-3">
|
|
<label for="deviceIDFormSelect" class="form-label">Device:</label>
|
|
<select class="form-select" id="deviceIDFormSelect" aria-label="Device ID select">
|
|
<?php
|
|
foreach($_SESSION["ScannersList"] as $item)
|
|
echo "<option value='".$item[0]."'>".$item[1]."</option>";
|
|
?>
|
|
</select>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="outputImageResolutionFormSelect" class="form-label">Resolution of the scanned image:</label>
|
|
<select class="form-select" id="outputImageResolutionFormSelect" aria-label="Output image resolution select">
|
|
<?php
|
|
foreach($appConfig['outputImageResolution'] as $item)
|
|
{
|
|
if($item[2] === true) echo "<option value='".$item[0]."' selected>".$item[1]."</option>";
|
|
else echo "<option value='".$item[0]."'>".$item[1]."</option>";
|
|
}
|
|
?>
|
|
</select>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="outputImageColorDepthFormSelect" class="form-label">Color depth of the scanned image:</label>
|
|
<select class="form-select" id="outputImageColorDepthFormSelect" aria-label="Output image color depth select">
|
|
<?php
|
|
foreach($appConfig['outputImageColorDepth'] as $item)
|
|
{
|
|
if($item[2] === true) echo "<option value='".$item[0]."' selected>".$item[1]."</option>";
|
|
else echo "<option value='".$item[0]."'>".$item[1]."</option>";
|
|
}
|
|
?>
|
|
</select>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="outputFileFormatFormSelect" class="form-label">Output file format:</label>
|
|
<select class="form-select" id="outputFileFormatFormSelect" aria-label="Output file format select">
|
|
<?php
|
|
foreach($appConfig['outputImageFormats'] as $item)
|
|
{
|
|
if($item[2] === true) echo "<option value='".$item[0]."' selected>".$item[1]."</option>";
|
|
else echo "<option value='".$item[0]."'>".$item[1]."</option>";
|
|
}
|
|
?>
|
|
</select>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="inputPageSizeFormSelect" class="form-label">Page size:</label>
|
|
<!-- Disabled as this option was removed in Debian 12 -->
|
|
<select class="form-select" id="inputPageSizeFormSelect" aria-label="Input page size select" disabled>
|
|
<option value="a4" selected>A4</option>
|
|
</select>
|
|
</div>
|
|
<div class="d-grid gap-2">
|
|
<button onclick='scanImage();' class='btn btn-primary' type='button'>Scan</button>
|
|
<a href="api/rediscover.php" class="btn btn-primary mt-2" role="button">Rediscover device</a>
|
|
<a id="scannedImageDownloadButton" class="btn btn-primary mt-2" style="display: none;" role="button">Download image</a>
|
|
</div>
|
|
</div>
|
|
<div class="col">
|
|
<p class="fw-medium">Scanned image preview</p>
|
|
<img id="scanPreview" src="assets/placeholderImage.png" class="img-fluid" alt="Scanned image preview">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div id="scanningAnimationModal" class="modal" tabindex="-1">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-body">
|
|
<p>Scanning in progress...</p>
|
|
<div class="progress" role="progressbar">
|
|
<div class="progress-bar progress-bar-striped progress-bar-animated" style="width: 100%"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
|
|
</body>
|
|
</html>
|