Initial commit

master
Michael Reber 5 years ago
parent f5c4a11121
commit 6a297690e4

@ -0,0 +1,19 @@
<?php
// UDP port to open socket. Usually it's port 9
$port = 9;
// Change all values below, for personal usage:
$sitename = "-- blackNET --";
$config['access-password'] = "MY_PASSWORD_TO_ACCESS";
// Network Broadcast Address:
$networkbroadcast = "192.168.1.255";
// All MAC's must be written in the form of "00:1E:8C:5B:C8:29" (Windows and Linux)!
$maclist = [
"NAS-Storage" => "00:11:32:25:A8:75",
//"HP-Proliant-dev-Server" => "28:92:4a:39:e3:62",
"HP-gen8-server" => "2c:44:fd:82:0c:bb",
//"Michael-PC" => "d0:50:99:1b:b0:98",
];
?>

2337
css/font-awesome.css vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -0,0 +1,275 @@
*, *:before, *:after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html, body {
font-size: 62.5%;
height: 100%;
overflow: hidden;
}
@media (max-width: 768px) {
html, body {
font-size: 50%;
}
}
svg {
display: inline-block;
width: 2rem;
height: 2rem;
overflow: visible;
}
.svg-icon {
cursor: pointer;
}
.svg-icon path {
stroke: rgba(255, 255, 255, 0.9);
fill: none;
stroke-width: 1;
}
input, button {
outline: none;
border: none;
}
.container {
position: relative;
height: 100%;
background-image: url("../img/wood.jpg");
background-size: cover;
overflow: auto;
font-family: "Open Sans", Helvetica, Arial, sans-serif;
}
.row {
position: absolute;
top: 50%;
left: 50%;
margin-left: -15rem;
margin-top: -26.5rem;
width: 30rem;
height: 53rem;
overflow: hidden;
}
.login {
position: relative;
height: 100%;
background: -webkit-linear-gradient(top, rgba(113, 113, 113, 0.8) 0%, rgba(0, 0, 0, 0.6) 100%);
background: linear-gradient(to bottom, rgba(113, 113, 113, 0.8) 0%, rgba(0, 0, 0, 0.6) 100%);
-webkit-transition: opacity 0.1s, -webkit-transform 0.3s cubic-bezier(0.17, -0.65, 0.665, 1.25);
transition: opacity 0.1s, -webkit-transform 0.3s cubic-bezier(0.17, -0.65, 0.665, 1.25);
transition: opacity 0.1s, transform 0.3s cubic-bezier(0.17, -0.65, 0.665, 1.25);
transition: opacity 0.1s, transform 0.3s cubic-bezier(0.17, -0.65, 0.665, 1.25), -webkit-transform 0.3s cubic-bezier(0.17, -0.65, 0.665, 1.25);
-webkit-transform: scale(1);
transform: scale(1);
}
.login.inactive {
opacity: 0;
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
.login__lock {
position: absolute;
top: 8rem;
left: 10rem;
width: 14rem;
height: 2.8rem;
font-size: 128px;
}
@media screen and (min-width: 769px) {
.login__lock {
font-size: 152px;
}
}
.login__check {
position: absolute;
top: 16rem;
left: 13.5rem;
width: 14rem;
height: 2.8rem;
background: #fff;
-webkit-transform-origin: 0 100%;
transform-origin: 0 100%;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.login__check:before {
content: "";
position: absolute;
left: 0;
bottom: 100%;
width: 2.8rem;
height: 5.2rem;
background: #fff;
box-shadow: inset -0.2rem -2rem 2rem rgba(0, 0, 0, 0.2);
}
.login__form {
position: absolute;
top: 50%;
left: 0;
width: 100%;
height: 50%;
padding: 1.5rem 2.5rem;
text-align: center;
}
.login__row {
height: 5rem;
padding-top: 1rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.login__icon {
margin-bottom: -0.4rem;
margin-right: 0.5rem;
}
.login__icon.name path {
stroke-dasharray: 73.50196075439453;
stroke-dashoffset: 73.50196075439453;
-webkit-animation: animatePath 2s 0.5s forwards;
animation: animatePath 2s 0.5s forwards;
}
.login__icon.pass path {
stroke-dasharray: 92.10662841796875;
stroke-dashoffset: 92.10662841796875;
-webkit-animation: animatePath 2s 0.5s forwards;
animation: animatePath 2s 0.5s forwards;
}
.login__input {
display: inline-block;
width: 22rem;
height: 100%;
padding-left: 1.5rem;
font-size: 1.5rem;
background: transparent;
color: #FDFCFD;
}
.login__submit {
position: relative;
width: 100%;
height: 4rem;
margin: 5rem 0 2.2rem;
color: rgba(255, 255, 255, 0.8);
background: #FF3366;
font-size: 1.5rem;
border-radius: 3rem;
cursor: pointer;
overflow: hidden;
-webkit-transition: width 0.3s 0.15s, font-size 0.1s 0.15s;
transition: width 0.3s 0.15s, font-size 0.1s 0.15s;
}
.login__submit:after {
content: "";
position: absolute;
top: 50%;
left: 50%;
margin-left: -1.5rem;
margin-top: -1.5rem;
width: 3rem;
height: 3rem;
border: 2px dotted #fff;
border-radius: 50%;
border-left: none;
border-bottom: none;
-webkit-transition: opacity 0.1s 0.4s;
transition: opacity 0.1s 0.4s;
opacity: 0;
}
.login__submit.processing {
width: 4rem;
font-size: 0;
}
.login__submit.processing:after {
opacity: 1;
-webkit-animation: rotate 0.5s 0.4s infinite linear;
animation: rotate 0.5s 0.4s infinite linear;
}
.login__submit.success {
-webkit-transition: opacity 0.1s 0.3s, background-color 0.1s 0.3s, -webkit-transform 0.3s 0.1s ease-out;
transition: opacity 0.1s 0.3s, background-color 0.1s 0.3s, -webkit-transform 0.3s 0.1s ease-out;
transition: transform 0.3s 0.1s ease-out, opacity 0.1s 0.3s, background-color 0.1s 0.3s;
transition: transform 0.3s 0.1s ease-out, opacity 0.1s 0.3s, background-color 0.1s 0.3s, -webkit-transform 0.3s 0.1s ease-out;
-webkit-transform: scale(30);
transform: scale(30);
opacity: 0.9;
}
.login__submit.success:after {
-webkit-transition: opacity 0.1s 0s;
transition: opacity 0.1s 0s;
opacity: 0;
-webkit-animation: none;
animation: none;
}
.login__signup {
font-size: 1.2rem;
color: #ABA8AE;
}
.login__signup a {
color: #fff;
cursor: pointer;
}
.ripple {
position: absolute;
width: 15rem;
height: 15rem;
margin-left: -7.5rem;
margin-top: -7.5rem;
background: rgba(0, 0, 0, 0.4);
-webkit-transform: scale(0);
transform: scale(0);
-webkit-animation: animRipple 0.4s;
animation: animRipple 0.4s;
border-radius: 50%;
}
@-webkit-keyframes animRipple {
to {
-webkit-transform: scale(3.5);
transform: scale(3.5);
opacity: 0;
}
}
@keyframes animRipple {
to {
-webkit-transform: scale(3.5);
transform: scale(3.5);
opacity: 0;
}
}
@-webkit-keyframes rotate {
to {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes rotate {
to {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@-webkit-keyframes animatePath {
to {
stroke-dashoffset: 0;
}
}
@keyframes animatePath {
to {
stroke-dashoffset: 0;
}
}

@ -0,0 +1,75 @@
body {
font: 12pt Helvetica, sans-serif;
margin-top: 12px;
height: 100%;
background-image: url(../img/wood.jpg);
overflow: auto;
}
.container {
background-color: white;
margin: 8px;
}
.title {
font-size: 16pt;
color: black;
text-align: center;
padding-top: 20px;
}
.undertitle{
font-size: 12pt;
color: #656565;
text-align: center;
}
.normal {
text-align: center;
padding-top: 10px;
}
.logo {
padding: 10px;
padding-top: 20px;
text-align: center;
}
.messageOK{
color: green;
text-align: center;
}
.contentSend{
text-align: center;
margin: 10px;
}
.messageNOK{
color: red;
text-align: center;
}
.textarea{
width: 300px;
height: 80px;
font-family: Courier, monospace;
font-size: 10px;
}
.wakeonlanForm{
padding-top: 60px;
padding-bottom: 72px;
}
.logout{
position: absolute;
right: 2.3rem;
font-family: cursive;
margin-top: -29px;
}
.logout a{
text-decoration: none;
color: grey;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 KiB

@ -0,0 +1,65 @@
<?php
require(__DIR__.'/login.php');
require(__DIR__.'/config.php');
function isMobile() {
//return preg_match("/(android)/i", $_SERVER["HTTP_USER_AGENT"]);
return true;
}
?>
<?php if(isMobile()){ ?>
<!DOCTYPE html>
<html>
<?php
include 'wol_functions.php';
?>
<head>
<title>blackNET -- /wake on Lan/</title>
<meta id="viewport" name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link rel="stylesheet" href="css/style.css?random=<?php echo uniqid(); ?>" />
<link rel="shortcut icon" href="favicon.ico">
<!-- Piwik -->
<!-- End Piwik Code -->
</head>
<body>
<div class="container">
<div class="title"><?php echo $sitename; ?></div>
<div class="undertitle">/wake on Lan/</div>
<div class="logo"><a href="/wakeonlan/"><img src="img/remote.png" alt="wake on Lan" /></a></div>
<?php
$result = null;
// $wakemachine = $_GET["wake_machine"];
$wakemachine = (isset($_GET['wake_machine']) ? $_GET['wake_machine'] : null); // new and better
if($wakemachine != "" && $wakemachine != "-1")
$result = WakeOnLan($networkbroadcast, $wakemachine, $port);
if($result != null)
echo "<div class=\"messageOK\">WOL for ".$wakemachine." was successful!</div>\n<hr />\n";
?>
<form class="wakeonlanForm" name="WakeOnLan" method="get" action="index.php">
<div class="normal">
<label for="WakeOnLan" class="label">Select a machine to wake-up:<br /></label>
</div>
<div class="normal">
<select name="wake_machine" id="WakeOnLan">
<option value="-1">------</option><?php PopulateMACList($maclist); ?>
</select>
<input type="submit" value="Wake-up" />
</div>
</form>
<div class="logout"><a href="index.php?logout=1">Logout</a></div>
</div>
</body>
</html>
<?php } else { ?>
<meta http-equiv="refresh" content="0; URL=https://www.blackgate.org">
<?php } ?>

@ -0,0 +1,44 @@
$(document).ready(function() {
var animating = false,
submitPhase1 = 1100,
submitPhase2 = 400,
logoutPhase1 = 800,
$login = $(".login"),
$app = $(".app");
function ripple(elem, e) {
$(".ripple").remove();
var elTop = elem.offset().top,
elLeft = elem.offset().left,
x = e.pageX - elLeft,
y = e.pageY - elTop;
var $ripple = $("<div class='ripple'></div>");
$ripple.css({top: y, left: x});
elem.append($ripple);
};
$(document).on("click", ".login__submit", function(e) {
if (animating) return;
animating = true;
var that = this;
ripple($(that), e);
$(that).addClass("processing");
setTimeout(function() {
$(that).addClass("success");
setTimeout(function() {
$app.show();
$app.css("top");
$app.addClass("active");
}, submitPhase2 - 70);
setTimeout(function() {
$login.hide();
$login.addClass("inactive");
animating = false;
$(that).removeClass("success processing");
}, submitPhase2);
}, submitPhase1);
});
});

@ -0,0 +1,151 @@
<?php
###############################################################
# Page Password Protect 1.2
###############################################################
# By Michael R. - swiss
###############################################################
defined('_VALID') or define('_VALID', true);
defined('_ADMIN') or define('_ADMIN', true);
require(__DIR__.'/config.php');
# LOGIN OVERRIDE FUNCTION FOR LOCAL ACCESS!
function getUserIP() {
$client = @$_SERVER['HTTP_CLIENT_IP'];
$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
$remote = $_SERVER['REMOTE_ADDR'];
if(filter_var($client, FILTER_VALIDATE_IP)) {
$ip = $client;
}
elseif(filter_var($forward, FILTER_VALIDATE_IP)) {
$ip = $forward;
}
else {
$ip = $remote;
}
return $ip;
}
#$user_ip = getUserIP();
//print("Your IP is: ".$user_ip); #FOR DEBUGGING!
#if ($user_ip != "xx.xx.xx.xx") {
# IF IP-ADRESS IS NOT MY IP, CONSTRUCT LOGIN-PAGE:
//Set access password for using the webproxy
$adminPassword = $config['access-password'];
$LOGIN_INFORMATION = array( $adminPassword );
defined('USE_USERNAME') or define('USE_USERNAME', false);
// time out after NN minutes of inactivity. Set to 0 to not timeout
defined('TIMEOUT_MINUTES') or define('TIMEOUT_MINUTES', 0);
// This parameter is only useful when TIMEOUT_MINUTES is not zero
// true - timeout time from last activity, false - timeout time from login
defined('TIMEOUT_CHECK_ACTIVITY') or define('TIMEOUT_CHECK_ACTIVITY', true);
// timeout in seconds
$timeout = (TIMEOUT_MINUTES == 0 ? 0 : time() + TIMEOUT_MINUTES * 60);
// logout?
if(isset($_GET['logout'])) {
setcookie("verify", '', $timeout, '/'); // clear password;
header('Location: ' . "/wakeonlan/");
exit();
}
if(!function_exists('showLoginPasswordProtect')) {
// show login form
function showLoginPasswordProtect($error_msg) {
?>
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Please authenticate!</title>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">
<link rel='stylesheet prefetch' href='//fonts.googleapis.com/css?family=Open+Sans'>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/login.css?random=<?php echo uniqid(); ?>">
</head>
<body onLoad="document.getElementsByTagName('input')[0].focus();"
<div class="container">
<div class="row">
<div class="login">
<!--<div class="login__check"></div>-->
<div class="login__lock"><i class="fa fa-lock" aria-hidden="true"></i></div>
<div class="login__form">
<form method="post">
<div class="login__row">
<svg class="login__icon pass svg-icon" viewBox="0 0 20 20">
<path d="M0,20 20,20 20,8 0,8z M10,13 10,16z M4,8 a6,8 0 0,1 12,0" />
</svg>
<input type="password" name="access_password" class="login__input pass" placeholder="Password"/>
</div>
<button type="submit" value="Submit" class="login__submit">Login</button>
</form>
<p class="login__signup">Don't have an password? &nbsp;<a>Ask M.Reber</a></p>
<font color="red" style="font-size: x-small";><?php echo $error_msg; ?></font>
</div>
</div>
</div>
</div>
<script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src="js/login.js"></script>
</body>
</html>
<?php
// stop at this point
die();
}
}
// user provided password
if (isset($_POST['access_password'])) {
$login = isset($_POST['access_login']) ? $_POST['access_login'] : '';
$pass = $_POST['access_password'];
if (!USE_USERNAME && !in_array($pass, $LOGIN_INFORMATION)
|| (USE_USERNAME && ( !array_key_exists($login, $LOGIN_INFORMATION) || $LOGIN_INFORMATION[$login] != $pass ) )
) {
showLoginPasswordProtect("wrong password!");
}
else {
// set cookie if password was validated
setcookie("verify", md5($login.'%'.$pass), $timeout, '/');
// Some programs (like Form1 Bilder) check $_POST array to see if parameters passed
// So need to clear password protector variables
unset($_POST['access_login']);
unset($_POST['access_password']);
unset($_POST['Submit']);
header('Location: ' . $logoutURL . '/wakeonlan/');
}
}
else {
// check if password cookie is set
if (!isset($_COOKIE['verify'])) {
showLoginPasswordProtect("");
}
// check if cookie is good
$found = false;
foreach($LOGIN_INFORMATION as $key=>$val) {
$lp = (USE_USERNAME ? $key : '') .'%'.$val;
if ($_COOKIE['verify'] == md5($lp)) {
$found = true;
// prolong timeout
if (TIMEOUT_CHECK_ACTIVITY) {
setcookie("verify", md5($lp), $timeout, '/');
}
break;
}
}
if (!$found) {
showLoginPasswordProtect("");
}
}
//}
?>

@ -0,0 +1,482 @@
@import "compass/css3";
*, *:before, *:after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
$openSans: 'Open Sans', Helvetica, Arial, sans-serif;
html, body {
font-size: 62.5%;
height: 100%;
overflow: hidden;
@media (max-width: 768px) {
font-size: 50%;
}
}
svg {
display: inline-block;
width: 2rem;
height: 2rem;
overflow: visible;
}
.svg-icon {
cursor: pointer;
path {
stroke: rgba(255,255,255,0.9);
fill: none;
stroke-width: 1;
}
}
input, button {
outline: none;
border: none;
}
.cont {
position: relative;
height: 100%;
background-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/142996/slider-2.jpg');
background-size: cover;
overflow: auto;
font-family: $openSans;
}
.demo {
position: absolute;
top: 50%;
left: 50%;
margin-left: -15rem;
margin-top: -26.5rem;
width: 30rem;
height: 53rem;
overflow: hidden;
}
.login {
position: relative;
height: 100%;
background: linear-gradient(to bottom, rgba(146, 135, 187, 0.8) 0%, rgba(0,0,0,0.6) 100%);
transition: opacity 0.1s, transform 0.3s cubic-bezier(0.17, -0.65, 0.665, 1.25);
transform: scale(1);
&.inactive {
opacity: 0;
transform: scale(1.1);
}
&__check {
position: absolute;
top: 16rem;
left: 13.5rem;
width: 14rem;
height: 2.8rem;
background: #fff;
transform-origin: 0 100%;
transform: rotate(-45deg);
&:before {
content: "";
position: absolute;
left: 0;
bottom: 100%;
width: 2.8rem;
height: 5.2rem;
background: #fff;
box-shadow: inset -0.2rem -2rem 2rem rgba(0,0,0,0.2);
}
}
&__form {
position: absolute;
top: 50%;
left: 0;
width: 100%;
height: 50%;
padding: 1.5rem 2.5rem;
text-align: center;
}
&__row {
height: 5rem;
padding-top: 1rem;
border-bottom: 1px solid rgba(255,255,255,0.2);
}
&__icon {
margin-bottom: -0.4rem;
margin-right: 0.5rem;
&.name path {
stroke-dasharray: 73.50196075439453;
stroke-dashoffset: 73.50196075439453;
animation: animatePath 2s 0.5s forwards;
}
&.pass path {
stroke-dasharray: 92.10662841796875;
stroke-dashoffset: 92.10662841796875;
animation: animatePath 2s 0.5s forwards;
}
}
&__input {
display: inline-block;
width: 22rem;
height: 100%;
padding-left: 1.5rem;
font-size: 1.5rem;
background: transparent;
color: #FDFCFD;
}
&__submit {
position: relative;
width: 100%;
height: 4rem;
margin: 5rem 0 2.2rem;
color: rgba(255,255,255,0.8);
background: #FF3366;
font-size: 1.5rem;
border-radius: 3rem;
cursor: pointer;
overflow: hidden;
transition: width 0.3s 0.15s, font-size 0.1s 0.15s;
&:after {
content: "";
position: absolute;
top: 50%;
left: 50%;
margin-left: -1.5rem;
margin-top: -1.5rem;
width: 3rem;
height: 3rem;
border: 2px dotted #fff;
border-radius: 50%;
border-left: none;
border-bottom: none;
transition: opacity 0.1s 0.4s;
opacity: 0;
}
&.processing {
width: 4rem;
font-size: 0;
&:after {
opacity: 1;
animation: rotate 0.5s 0.4s infinite linear;
}
}
&.success {
transition: transform 0.3s 0.1s ease-out, opacity 0.1s 0.3s, background-color 0.1s 0.3s;
transform: scale(30);
opacity: 0.9;
//background-color: rgba(255,255,255,0.95);
&:after {
transition: opacity 0.1s 0s;
opacity: 0;
animation: none;
}
}
}
&__signup {
font-size: 1.2rem;
color: #ABA8AE;
a {
color: #fff;
cursor: pointer;
}
}
}
.app {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
display: none;
transition: opacity 0.1s, transform 0.3s cubic-bezier(0.68, -0.45, 0.465, 1.25);
transform: scale(1.2);
&.active {
opacity: 1;
transform: scale(1);
.app__user-photo {
transform: scale(1);
}
.app__meeting {
transform: translateY(0);
opacity: 1;
}
.app__logout {
transform: scale(1);
}
}
&__top {
position: relative;
height: 28rem;
background: rgba(0,0,0,0.5);
padding: 6rem 1.5rem 2rem;
text-align: center;
}
&__bot {
position: relative;
height: 25rem;
background: #fff;
}
&__menu-btn {
position: absolute;
top: 2rem;
left: 1.5rem;
width: 1.8rem;
height: 1.7rem;
cursor: pointer;
span,
&:before,
&:after {
position: absolute;
left: 0;
width: 100%;
height: 1px;
background: rgba(255,255,255,0.6);
}
span {
top: 0.8rem;
}
&:before {
content: "";
top: 0;
}
&:after {
content: "";
bottom: 0;
}
}
&__icon {
position: absolute;
top: 2rem;
&.search {
right: 1.5rem;
stroke-dasharray: 61.847137451171875;
stroke-dashoffset: 61.847137451171875;
animation: animatePath 0.5s 0.5s forwards;
}
}
&__hello {
font-size: 2.2rem;
color: #fff;
font-weight: normal;
margin-bottom: 3rem;
}
&__user {
position: relative;
display: inline-block;
width: 9rem;
height: 9rem;
margin-bottom: 3rem;
}
&__user-photo {
width: 100%;
height: 100%;
border-radius: 50%;
transition: transform 0.3s 0.2s cubic-bezier(.62,.35,.56,1.55);
transform: scale(0);
}
&__user-notif {
position: absolute;
top: 0;
right: 0;
width: 3rem;
height: 3rem;
border-radius: 50%;
line-height: 3rem;
text-align: center;
background: #50D2C2;
color: #fff;
font-size: 1.5rem;
}
&__month:after {
content: "";
display: table;
clear: both;
}
&__month-name {
display: inline-block;
color: rgba(255,255,255,0.6);
font-size: 1.2rem;
text-transform: uppercase;
}
&__month-btn {
display: inline-block;
width: 1.2rem;
height: 1.2rem;
border: 1px solid rgba(255,255,255,0.6);
border-left: none;
border-bottom: none;
cursor: pointer;
&.left {
float: left;
transform: rotate(-135deg);
}
&.right {
float: right;
transform: rotate(45deg);
}
}
&__days {
height: 7rem;
padding: 1.5rem 2rem;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
&__day {
width: 14%;
text-align: center;
font-size: 1.2rem;
&.weekday {
color: #919197;
text-transform: uppercase;
}
&.date {
font-size: 1.2rem;
font-weight: bold;
color: #3C3C43;
}
}
&__meeting {
position: relative;
height: 6rem;
border-top: 1px solid #EEEEEF;
padding: 1rem 2rem 1rem 7.5rem;
transition: transform 0.3s, opacity 0.3s;
transform: translateY(-50%);
opacity: 0;
@for $i from 1 through 5 {
&:nth-child(#{$i}) {
transition-delay: 0.1s + 0.1s * $i;
}
}
&-photo {
position: absolute;
left: 2rem;
top: 1rem;
width: 4rem;
height: 4rem;
}
&-name {
color: #000;
font-size: 1.3rem;
}
&-info {
color: #949498;
font-size: 1.1rem;
}
}
&__logout {
position: absolute;
bottom: 3.3rem;
right: 3.3rem;
width: 4.6rem;
height: 4.6rem;
margin-right: -2.3rem;
margin-bottom: -2.3rem;
background: #FC3768;
color: #fff;
font-size: 2rem;
border-radius: 50%;
cursor: pointer;
transition: bottom 0.4s 0.1s, right 0.4s 0.1s, transform 0.4s 0.4s, opacity 0.1s 0.7s, background-color 0.1s 0.7s;
transform: scale(0);
&.clicked {
bottom: 50%;
right: 50%;
transform: scale(30) !important;
opacity: 0.9;
//background-color: rgba(255,255,255,0.95);
svg {
opacity: 0;
}
}
&-icon {
position: absolute;
width: 3rem;
height: 3rem;
top: 50%;
left: 50%;
margin-left: -1.5rem;
margin-top: -1.5rem;
transition: opacity 0.1s;
path {
stroke-width: 4px;
stroke-dasharray: 64.36235046386719;
stroke-dashoffset: 64.36235046386719;
animation: animatePath 0.5s 0.5s forwards;
}
}
}
}
.ripple {
position: absolute;
width: 15rem;
height: 15rem;
margin-left: -7.5rem;
margin-top: -7.5rem;
background: rgba(0,0,0,0.4);
transform: scale(0);
animation: animRipple 0.4s;
border-radius: 50%;
}
@keyframes animRipple {
to {
transform: scale(3.5);
opacity: 0;
}
}
@keyframes rotate {
to {
transform: rotate(360deg);
}
}
@keyframes animatePath {
to {
stroke-dashoffset: 0;
}
}

@ -0,0 +1,73 @@
<?php
flush();
require(__DIR__.'/config.php');
function WakeOnLan($addr, $mac, $socket_number){
if (strlen($mac) != 17)
return FALSE;
if (preg_match('/[^A-Fa-f0-9:]/',$mac))
return FALSE;
$addr_byte = explode(':', $mac);
$hw_addr = '';
for ($a=0; $a <6; $a++)
$hw_addr .= chr(hexdec($addr_byte[$a]));
$msg = chr(255).chr(255).chr(255).chr(255).chr(255).chr(255);
for ($a = 1; $a <= 16; $a++)
$msg .= $hw_addr;
$s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
if ($s == FALSE) {
echo "<div class=\"messageNOK\">Can't create socket!</div>\n";
echo "Error: '".socket_last_error($s)."' - " . socket_strerror(socket_last_error($s));
return FALSE;
}
else {
$opt_ret = socket_set_option($s, SOL_SOCKET, SO_BROADCAST, TRUE);
if ($opt_ret < 0) {
echo "setsockopt() failed, error: " . strerror($opt_ret) . "<br />\n";
return FALSE;
}
if (socket_sendto($s, $msg, strlen($msg), 0, $addr, $socket_number)) {
$content = bin2hex($msg);
echo "<hr />\n";
echo "<div class=\"messageOK\">Magic Packet Sent!</div>\n";
echo "<div class=\"contentSend\"><b>Port:</b> ".$socket_number." <b>MAC:</b> ".$_GET['wake_machine']." <b>Data:</b></br>\n";
echo "<textarea readonly class=\"textarea\" name=\"content\" >".$content."</textarea><br /></div>\n";
socket_close($s);
return TRUE;
}
else {
echo "<div class=\"messageNOK\">Magic Packet failed to send!</div>\n";
return FALSE;
}
}
}
function PopulateMACList($maclist) {
// Takes an array in the format "key" => "mac"
// Cycles through the array
// Checks if MAC contains only valid caracters ( Aa-Ff 0-9 . : - )
// If valid, removes any ". : -" it finds
// Creates a <option> tag with XX:XX:XX:XX:XX:XX format
foreach ($maclist as $host => $mac)
if (!preg_match('/[^A-Fa-f0-9\.-:]/',$mac)) {
$mac=preg_replace('/[^A-Fa-f0-9]/', "",$mac);
$mac=join(":",str_split($mac,2));
if (strlen($mac) == 17) {
echo "<option value=\"".$mac."\">".$host."</option>\n";
}
}
}
?>
Loading…
Cancel
Save