-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93f3894
commit bb63a29
Showing
5 changed files
with
247 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
ini_set('display_errors', 1); | ||
ini_set('display_startup_errors', 1); | ||
error_reporting(E_ALL); | ||
|
||
$target = htmlspecialchars($_GET["target"]); | ||
if (empty($target)) { | ||
header($_SERVER["SERVER_PROTOCOL"] . " 400 OK"); | ||
die("Error: No scanning function selected (try append: ?target=<file|email|image|ocr>"); | ||
} | ||
if (in_array($target, array('file','email','image','ocr'))) { | ||
$output = shell_exec('/opt/brother/scanner/brscan-skey/script/scanto'.$target.'.sh'); | ||
} | ||
else | ||
{ | ||
header($_SERVER["SERVER_PROTOCOL"] . " 400 OK"); | ||
die("Error: Thou shalt not inject unknown script names!"); | ||
} | ||
|
||
header($_SERVER["SERVER_PROTOCOL"] . " 200 OK"); | ||
header("Cache-Control: public"); // needed for internet explorer | ||
header("Content-Type: text/plain"); | ||
die($output); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="stylesheet" href="main.css"> | ||
<title>Brother Scanner</title> | ||
<?php | ||
$button_file = $_ENV["RENAME_GUI_SCANTOFILE"] | ||
if(empty($_ENV["RENAME_GUI_SCANTOFILE"])) | ||
{ | ||
$button_file = "Scan to file" | ||
} | ||
$button_email = $_ENV["RENAME_GUI_SCANTOEMAIL"] | ||
if(empty($_ENV["RENAME_GUI_SCANTOEMAIL"])) | ||
{ | ||
$button_email = "Scan to email" | ||
} | ||
$button_image = $_ENV["RENAME_GUI_SCANTOIMAGE"] | ||
if(empty($_ENV["RENAME_GUI_SCANTOIMAGE"])) | ||
{ | ||
$button_image = "Scan to image" | ||
} | ||
$button_ocr = $_ENV["RENAME_GUI_SCANTOOCR"] | ||
if(empty($_ENV["RENAME_GUI_SCANTOOCR"])) | ||
{ | ||
$button_ocr = "Scan to OCR" | ||
} | ||
?> | ||
|
||
</head> | ||
<body> | ||
<div class="form"> | ||
<div class="title">Brother Scanner</div> | ||
<div class="cut cut-long"></div> | ||
<form action="/scan.php?target=file" method="get"> | ||
<button type="submit" name="action" class="submit"><?php $button_file ?></button> | ||
</form> | ||
<form action="/scan.php?target=email" method="get"> | ||
<button type="submit" name="action" class="submit"><?php $button_email ?></button> | ||
</form> | ||
<form action="/scan.php?target=image" method="get"> | ||
<button type="submit" name="action" class="submit"><?php $button_image ?></button> | ||
</form> | ||
<form action="/scan.php?target=ocr" method="get"> | ||
<button type="submit" name="action" class="submit"><?php $button_ocr ?></button> | ||
</form> | ||
</div> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
#based on https://codepen.io/ainalem/pen/GRqPwoz | ||
|
||
body { | ||
align-items: center; | ||
background-color: #000; | ||
display: flex; | ||
justify-content: center; | ||
height: 100vh; | ||
} | ||
|
||
.form { | ||
background-color: #15172b; | ||
border-radius: 20px; | ||
box-sizing: border-box; | ||
# height: 550px; | ||
# height: 100%; | ||
padding: 20px; | ||
# width: 320px; | ||
} | ||
|
||
.title { | ||
color: #eee; | ||
font-family: sans-serif; | ||
font-size: 36px; | ||
font-weight: 600; | ||
margin-top: 30px; | ||
} | ||
|
||
.subtitle { | ||
color: #eee; | ||
font-family: sans-serif; | ||
font-size: 16px; | ||
font-weight: 600; | ||
margin-top: 10px; | ||
} | ||
|
||
.input-container { | ||
height: 50px; | ||
position: relative; | ||
width: 100%; | ||
} | ||
|
||
.ic1 { | ||
margin-top: 30px; | ||
} | ||
|
||
.ic2 { | ||
margin-top: 30px; | ||
} | ||
|
||
.ic3 { | ||
margin-top: 30px; | ||
height: auto; | ||
} | ||
|
||
.input { | ||
background-color: #303245; | ||
border-radius: 12px; | ||
border: 0; | ||
box-sizing: border-box; | ||
color: #eee; | ||
font-size: 18px; | ||
height: 100%; | ||
outline: 0; | ||
padding: 4px 20px 0; | ||
width: 100%; | ||
} | ||
|
||
.cut { | ||
background-color: #15172b; | ||
border-radius: 10px; | ||
height: 20px; | ||
left: 20px; | ||
position: absolute; | ||
top: -20px; | ||
transform: translateY(0); | ||
transition: transform 200ms; | ||
width: 76px; | ||
} | ||
|
||
.cut-short { | ||
width: 50px; | ||
} | ||
|
||
.cut-long { | ||
width: 100px; | ||
} | ||
|
||
.input:focus ~ .cut, | ||
.input:not(:placeholder-shown) ~ .cut { | ||
transform: translateY(8px); | ||
} | ||
|
||
.placeholder { | ||
color: #65657b; | ||
font-family: sans-serif; | ||
left: 20px; | ||
line-height: 14px; | ||
pointer-events: none; | ||
position: absolute; | ||
transform-origin: 0 50%; | ||
transition: transform 200ms, color 200ms; | ||
top: 20px; | ||
} | ||
|
||
.input:focus ~ .placeholder, | ||
.input:not(:placeholder-shown) ~ .placeholder { | ||
transform: translateY(-30px) translateX(10px) scale(0.75); | ||
} | ||
|
||
.input:not(:placeholder-shown) ~ .placeholder { | ||
color: #808097; | ||
} | ||
|
||
.input:focus ~ .placeholder { | ||
color: #dc2f55; | ||
} | ||
|
||
.submit { | ||
background-color: #08d; | ||
border-radius: 12px; | ||
border: 0; | ||
box-sizing: border-box; | ||
color: #eee; | ||
cursor: pointer; | ||
font-size: 18px; | ||
height: 50px; | ||
margin-top: 30px; | ||
// outline: 0; | ||
text-align: center; | ||
width: 100%; | ||
} | ||
|
||
.submit:active { | ||
background-color: #06b; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters