init III
This commit is contained in:
102
Perl Ubiquiti mpower steuerung/control center/index.php
Normal file
102
Perl Ubiquiti mpower steuerung/control center/index.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<!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="en-US" lang="en-US">
|
||||
<head>
|
||||
<title>power.andregeissler.de</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta http-equiv="Content-Style-Type" content="text/css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||
<link rel="shortcut icon" href="images/favicon.ico">
|
||||
<style type="text/css">
|
||||
/* <![CDATA[ */
|
||||
<!--
|
||||
ul#navigation {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
ul#navigation li {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
ul#navigation li a:link {
|
||||
border: 1px solid #000;
|
||||
background-color: #CCCCCC;
|
||||
padding: 2px 5px 2px 5px;
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul#navigation li a:visited {
|
||||
border: 1px solid #000;
|
||||
background-color: #CCCCCC;
|
||||
padding: 2px 5px 2px 5px;
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul#navigation li a:hover {
|
||||
border: 1px solid #000;
|
||||
background-color: #333333;
|
||||
padding: 2px 5px 2px 5px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
font#act {
|
||||
color: #0a0;
|
||||
}
|
||||
|
||||
ul#content li {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
body {
|
||||
width: 350px;
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
function delTree($dir) {
|
||||
$files = array_diff(scandir($dir), array('.','..'));
|
||||
foreach ($files as $file) {
|
||||
(is_dir("$dir/$file") && !is_link($dir)) ? delTree("$dir/$file") : unlink("$dir/$file");
|
||||
}
|
||||
return rmdir($dir);
|
||||
}
|
||||
|
||||
if($_POST["delete"] === "yes") {
|
||||
delTree("$_POST[path]");
|
||||
}
|
||||
if($_POST["add"] === "yes") {
|
||||
mkdir($_POST["name"]);
|
||||
copy("template/api.php","$_POST[name]/api.php");
|
||||
copy("template/label.php","$_POST[name]/label.php");
|
||||
copy("template/func.php","$_POST[name]/func.php");
|
||||
copy("template/state.php","$_POST[name]/state.php");
|
||||
copy("template/index.php","$_POST[name]/index.php");
|
||||
$myfile = fopen("$_POST[name]/config.php", "w");
|
||||
fwrite($myfile, "<?php\n\$switches=$_POST[port];");
|
||||
}
|
||||
|
||||
?>
|
||||
<ul id="navigation">
|
||||
<li><a href="index.php"><font id="act">Geräteliste</font></a></li>
|
||||
<li><a href="add.php">Hinzufügen</a></li>
|
||||
<li><a href="deviceview.php">Geräteansicht</a></li>
|
||||
</ul>
|
||||
<iframe src="devicelist.php" name="iframe" frameborder="0" width="380px" height="855px">
|
||||
</iframe>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user