This commit is contained in:
2024-10-14 00:08:40 +02:00
parent dbfba56f66
commit 1462d52e13
4572 changed files with 2658864 additions and 0 deletions

View File

@@ -0,0 +1,151 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de-DE" lang="de-DE">
<head>
<title>mfi.andregeissler.de</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="refresh" content="10; URL=https://mfi.andregeissler.de/">
<style>
INPUT {
font-size:20px;
}
SPAN.tdh {
font-size:25px;
}
DIV.table
{
display:table;
width:650px;
}
FORM.tr, DIV.tr
{
display:table-row;
}
SPAN.td1
{
display:table-cell;
width:10%;
vertical-align:middle;
font-size:20px;
}
SPAN.td2
{
display:table-cell;
width:50%;
vertical-align:middle;
font-size:20px;
}
SPAN.td3
{
display:table-cell;
width:15%;
vertical-align:middle;
font-size:20px;
}
SPAN.td4
{
display:table-cell;
width:15%;
vertical-align:middle;
font-size:20px;
}
.onoffswitch {
position: relative; width: 100px;
-webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
}
.onoffswitch-checkbox {
display: none;
}
.onoffswitch-label {
display: block; overflow: hidden; cursor: pointer;
border: 2px solid #999999; border-radius: 20px;
}
.onoffswitch-inner {
display: block; width: 200%; margin-left: -100%;
-moz-transition: margin 0.3s ease-in 0s; -webkit-transition: margin 0.3s ease-in 0s;
-o-transition: margin 0.3s ease-in 0s; transition: margin 0.3s ease-in 0s;
}
.onoffswitch-inner:before, .onoffswitch-inner:after {
display: block; float: left; width: 50%; height: 35px; padding: 0; line-height: 35px;
font-size: 15px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
.onoffswitch-inner:before {
content: "AN";
padding-left: 10px;
background-color: #00FF00; color: #000000;
}
.onoffswitch-inner:after {
content: "AUS";
padding-right: 10px;
background-color: #FF0000; color: #000000;
text-align: right;
}
.onoffswitch-switch {
display: block; width: 20px; margin: 7.5px;
background: #FFFFFF;
border: 2px solid #999999; border-radius: 20px;
position: absolute; top: 0; bottom: 0; right: 61px;
-moz-transition: all 0.3s ease-in 0s; -webkit-transition: all 0.3s ease-in 0s;
-o-transition: all 0.3s ease-in 0s; transition: all 0.3s ease-in 0s;
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
margin-left: 0;
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
right: 0px;
}
</style>
</head>
<body>
<?php
if( $_POST["id"] != "" ) {
$st=0;
if ($_POST['statesw'] == "on") { $st=1; }
$pdo = new PDO('mysql:host=panel.agserver.de;dbname=1_mfi', '1_mfi', 'K01v1kk0!');
$sql = "insert into queue (port_id, state, source) values (".$_POST['id'].",'".$st."', 'www')";
$pdo->query($sql);
$sql = "update port set descr='".$_POST['descr']."' where id=".$_POST['id'];
$pdo->query($sql);
}
?>
<?php
$pdo = new PDO('mysql:host=panel.agserver.de;dbname=1_mfi', '1_mfi', 'K01v1kk0!');
$sql = "SELECT * FROM device";
foreach ($pdo->query($sql) as $row) {
#echo " <table border=1 width=100%>\n";
echo " <div class=table>\n";
#echo " <tr><td colspan=2>".$row['name']."</td><td>".$row['ports']."</td></tr>\n";
echo " <form class=tr method=post action=index.php>\n";
echo " <span class=tdh>".$row['name']."</span>\n";
echo " </form>\n";
#echo " </div>\n";
$sql = "select * from port where dev_id = ".$row['id']." order by nr asc";
foreach ($pdo->query($sql) as $port) {
#echo " <tr><td>".$port['nr']."</td><td>".$port['descr']."</td><td>".$port['state']."</td></tr>\n";
echo " <form class=tr method=post action=index.php>\n";
echo " <input type=hidden name=id value=".$port['id'].">\n";
?>
<span class=td1><?php echo $port['nr'] ?></span>
<span class=td2><input type=text name=descr value='<?php echo $port['descr'] ?>'></span>
<span class=td3><input type=hidden name=state value='<?php echo $port['state'] ?>'>
<div class='onoffswitch'>
<input type='checkbox' name='statesw' class='onoffswitch-checkbox' id='myonoffswitch<?php echo $port['id'] ?>' <?php if ($port['state'] == 1) { echo "checked"; } ?>>
<label class='onoffswitch-label' for='myonoffswitch<?php echo $port['id'] ?>'>
<span class='onoffswitch-inner'></span>
<span class='onoffswitch-switch'></span>
</label>
</div>
</span>
<span class=td4><input type=submit value=speichern></span>
<?php
echo " </form>\n";
}
#echo " </table>\n <br>\n";
echo " </div>\n <br>\n";
}
?>
</body>
</html>