Browse Source

Use Bootstrap

master
Markus Becker 4 months ago
parent
commit
86ce1b5149
  1. 2
      index.php
  2. 2
      interface/exec/fr_include.php
  3. 6
      interface/exec/pulllib.php
  4. 60
      interface/exec/upload_include.php
  5. 5
      interface/html/head.html
  6. 42
      interface/index.php
  7. 40
      interface/main.css
  8. 45
      interface/panel.php

2
index.php

@ -18,6 +18,8 @@ if($valid && isset($_GET["fid"])){
$dir="./data/$folders[$fid]";
$frames = getFilesInFolderSQL($fid);
}elseif($_SERVER['REQUEST_URI'] == "/" && $_SERVER[HTTP_HOST] == "viwetter.de"){
header("Location:https://kunden.viwetter.de");
}else{
sendError();
}

2
interface/exec/fr_include.php

@ -10,7 +10,7 @@ table#filelist td{
</style>
Hinweis: Aus Securitygründen funktionieren die Links auf fremde Ressources nicht durch einfach "draufklicken". Wenn man sich den Inhalt des Links anschauen will muss man den Text in die Adresszeile manuell kopieren.
<form>
<table id="filelist" border="1">
<table id="filelist" class="table text-center">
<tr>
<th>ID</th>
<th>Datei</th>

6
interface/exec/pulllib.php

@ -34,13 +34,13 @@ function getFolderArray(){
function buildMenu(){
$folders = getFolderArray();
echo '<h2 class="center">Men&uuml;</h2><h3>Ordner:</h3><ul>';
echo '<div class="card"><div class="h3 card-header">Men&uuml;</div><div class="card-body"><h4>Ordner</h4><ul>';
foreach ($folders as $num => $dir) {
echo "<li><a href=\"?folder=$dir%20$num&fid=$num\">$dir</a></li>";
}
echo '</ul><h3>Funktionen:</h3><ul><li><a href="?i=no&folder=neuer%20Ordner">neuer Ordner</a></li>
echo '</ul></div><hr><div class="card-body"><h3>Funktionen</h3><ul><li><a href="?i=no&folder=neuer%20Ordner">neuer Ordner</a></li>
<li><a href="?i=nu&folder=neuer%20Benutzer">neuer Benutzer</a></li>
</ul>';
</ul></div></div>';
}
// check if login data is valid

60
interface/exec/upload_include.php

@ -6,37 +6,43 @@
min-width: 1.4em;
}
</style>
<form enctype="multipart/form-data" action="./exec/upload_media.php" method="POST">
<table>
<tr>
<td>Remote oder Upload</td>
<td><table>
<div class="card">
<div class="card-body">
<form enctype="multipart/form-data" action="./exec/upload_media.php" method="POST">
<table>
<tr>
<td class="contain"><input type="radio" name="remote" value="remote" onclick="javascript:selremote()"></td>
<td>Remote</td>
<td>Remote oder Upload</td>
<td>
<table>
<tr>
<td class="contain"><input type="radio" name="remote" value="remote" onclick="javascript:selremote()"></td>
<td>Remote</td>
</tr>
<tr>
<td class="contain"><input type="radio" name="remote" value="upload" onclick="javascript:selupload()"></td>
<td>Upload</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="contain"><input type="radio" name="remote" value="upload" onclick="javascript:selupload()"></td>
<td>Upload</td>
<td>Url Eingabe</td>
<td><input type="text" name="url" id="remotelink" onkeyup="javascript:datein()" disabled></td>
</tr>
</table></td>
</tr>
<tr>
<td>Url Eingabe</td>
<td><input type="text" name="url" id="remotelink" onkeyup="javascript:datein()" disabled></td>
</tr>
<tr>
<td>Datei Upload</td>
<td><input type="file" name="userfile" id="fileupload" onchange="javascript:datein()" disabled ></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Hinzufügen" name="submitbtn" id="submitbtn"></td>
</tr>
</table>
<input type="hidden" name="fid" value="<?php echo $_GET["fid"];?>">
<input type="hidden" name="folder" value="<?php echo substr($_GET["folder"],0,strpos($_GET["folder"]," "));?>">
</form>
<tr>
<td>Datei Upload</td>
<td><input type="file" name="userfile" id="fileupload" onchange="javascript:datein()" disabled ></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Hinzufügen" name="submitbtn" id="submitbtn"></td>
</tr>
</table>
<input type="hidden" name="fid" value="<?php echo $_GET["fid"];?>">
<input type="hidden" name="folder" value="<?php echo substr($_GET["folder"],0,strpos($_GET["folder"]," "));?>">
</form>
</div>
</div>
<script type="text/javascript">
var fileupload = document.getElementById("fileupload");
var remotelink = document.getElementById("remotelink");

5
interface/html/head.html

@ -1 +1,6 @@
<link rel="stylesheet" type="text/css" href="main.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4"
crossorigin="anonymous"></script>

42
interface/index.php

@ -8,22 +8,32 @@ include("./exec/pulllib.php");
<?php echo file_get_contents("./html/head.html"); ?>
</head>
<body>
<div id="holder">
<div id="menu"><br><br>Zum Bearbeiten einloggen<br><br><br><br><br></div>
<div id="page"><h2>WMS-Login</h2><form method="post" action="panel.php"><table>
<tr>
<td>Benutzer</td>
<td><input type="text" placeholder="Benutzername" name="username"></td>
</tr>
<tr>
<td>Passwort</td>
<td><input type="password" placeholder="Passwort" name="password"></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Absenden"></td>
</tr>
</table></form></div>
<div class="container">
<div class="card mt-5">
<div class="card-header h4">
WMS-Login
</div>
<div class="card-body">
<p>Zum Bearbeiten einloggen!</p>
<form method="post" action="panel.php">
<div class="row mb-2">
<label class="col-sm-2 col-form-label">Benutzername</label>
<div class="col-auto">
<input type="text" class="form-control" name="username">
</div>
</div>
<div class="row mb-2">
<label class="col-sm-2 col-form-label">Passwort</label>
<div class="col-auto">
<input type="password" class="form-control" name="password">
</div>
</div>
<div>
<input type="submit" value="Einloggen" class="btn btn-primary">
</div>
</form>
</div>
</div>
</div>
</body>
</html>

40
interface/main.css

@ -1,40 +0,0 @@
body{
background-color: #E6E6E6;
}
div{
border-radius: .5em;
}
#holder{
margin: auto auto;
width: 80em;
}
#menu{
background-color: #66ADFA;
padding: 0 1em;
margin: 0 0;
float: left;
width: 13em;
}
#page{
background-color: #C6C6C6;
margin-left: 15.5em;
padding: .15em .5em .5em .5em;
}
.center{
text-align: center;
}
form table{
background-color: #ABABAB;
border-radius: .3em;
}
td input{
box-sizing:border-box;
width: 100%;
margin: 0 0;
}
@media (max-width: 82em){
#holder{
width: 100%;
}
}

45
interface/panel.php

@ -17,29 +17,32 @@ if (!$login){
<?php echo file_get_contents("./html/head.html"); ?>
</head>
<body>
<div id="holder">
<div id="menu"><?php buildMenu(); ?></div>
<div id="page">
<?php
if(isset($_GET["folder"])){
echo "<h2>Ordner: ".$_GET["folder"]."</h2>";
if(isset($_GET["fid"])){
echo "Standart Link: <a href=\"../?fid=".$_GET["fid"]."\">../?fid=".$_GET["fid"]."</a><br><br>";
include("./exec/upload_include.php");
println("<br>");
include("./exec/fr_include.php");
<div class="container">
<div class="row mt-3">
<div class="col-2"><?php buildMenu(); ?></div>
<div class="col-10">
<?php
if(isset($_GET["folder"])){
echo "<h2>Ordner: ".$_GET["folder"]."</h2>";
if(isset($_GET["fid"])){
echo "Standart Link: <a href=\"../?fid=".$_GET["fid"]."\">../?fid=".$_GET["fid"]."</a><br><br>";
include("./exec/upload_include.php");
println("<br>");
include("./exec/fr_include.php");
}
} else {
echo "<h2>WMS-Interface</h2>";
println("<p>Willkommen auf dem WMS-Interface.<br>Das Weather Monitoring System (WMS) besteht aus mehreren Ordnern. Um die Bilder in den Ordnern zu bearbeiten findet Ihr auf der linken Seite eine Menü.</p>");
}
} else {
echo "<h2>WMS-Interface</h2>";
println("<p>Willkommen auf dem WMS-Interface.<br>Das Weather Monitoring System (WMS) besteht aus mehreren Ordnern. Um die Bilder in den Ordnern zu bearbeiten findet Ihr auf der linken Seite eine Menü.</p>");
}
if(isset($_GET["i"])){
$include = htmlspecialchars($_GET["i"]);
if(strlen($include)==2){
include("./exec/$include"."_include.php");
if(isset($_GET["i"])){
$include = htmlspecialchars($_GET["i"]);
if(strlen($include)==2){
include("./exec/$include"."_include.php");
}
}
}
?>
?>
</div>
</div>
</div>
</body>
</html>
Loading…
Cancel
Save