Bestanden uploaden naar 'scripts'
This commit is contained in:
92
scripts/step1.php
Normal file
92
scripts/step1.php
Normal file
@@ -0,0 +1,92 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Foto importeer app</title>
|
||||
<link rel="shortcut icon" href="favicon.png" />
|
||||
<link rel="stylesheet" href="milligram.min.css">
|
||||
<script src="sweetalert.min.js"></script>
|
||||
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style>
|
||||
#content {
|
||||
margin: 0px auto;
|
||||
text-align: center;
|
||||
}
|
||||
h2 {
|
||||
letter-spacing: 3px;
|
||||
}
|
||||
img {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 1%;
|
||||
margin-bottom: 1%;
|
||||
}
|
||||
.vl {
|
||||
border-top: 1px solid #9b4dca;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
.colcontent {
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
button.collapsible {
|
||||
margin-bottom: 26px;
|
||||
}
|
||||
.collapsible {
|
||||
width: 180px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="content">
|
||||
<img src="tokyo-taxi.svg" height="51px" alt="Tokyo taxi">
|
||||
<h2>Foto importeer app</h2>
|
||||
<div class="vl"></div>
|
||||
<h3>Stap 1</h3>
|
||||
<div class="vl"></div>
|
||||
<h4>Stop de SD-kaart in de kaartlezer.<br></h4>
|
||||
<h4>Wacht vervolgens 10-15 seconden,<br>druk dan op volgende stap.<br></h4>
|
||||
|
||||
<form method="post">
|
||||
<button class="button" name="next">Volgende stap</button>
|
||||
</form>
|
||||
<div id="content">
|
||||
<div class="vl"></div>
|
||||
<p class="left">Importeer tool uitzetten</p>
|
||||
<p>
|
||||
<form method="post">
|
||||
<button class="button button-outline" name="shutdown">Zet uit</button>
|
||||
</form>
|
||||
</p>
|
||||
<p><a href="sysinfo.php">System info</a></p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (isset($_POST['next']))
|
||||
{
|
||||
$shellout = shell_exec("if [ -e /dev/sdb1 ] ; then echo 1; else echo 0; fi;");
|
||||
if ($shellout==1) {
|
||||
echo '<script>
|
||||
swal("De SD kaart is gevonden", "", "success").then(function() {
|
||||
window.location = "step2.php";
|
||||
});
|
||||
</script>';
|
||||
|
||||
}
|
||||
if ($shellout==0) {
|
||||
echo '<script>swal("De SD kaart is niet gevonden ", "Controleer of deze goed is verbonden", "error")</script>';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['shutdown']))
|
||||
{
|
||||
shell_exec('sudo shutdown -h 1');
|
||||
echo '<script>swal(" ",{title:"De importeer tool word uitgeschakeld",icon: "info",button: false,});</script>';
|
||||
}
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user