intitaler commit
This commit is contained in:
120
Server/http/funk/index.php
Executable file
120
Server/http/funk/index.php
Executable file
@@ -0,0 +1,120 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>jQM Complex Demo</title>
|
||||
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0"/>
|
||||
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
|
||||
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
|
||||
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div data-role="page" id="first" data-theme="b">
|
||||
<div data-role="header" data-theme="a">
|
||||
<h3>Licht</h3>
|
||||
</div>
|
||||
|
||||
<div data-role="content">
|
||||
<form method="get" action="index.php">
|
||||
<input type="submit" value="Licht 1 an" name="test1an">
|
||||
</form>
|
||||
<form method="get" action="index.php">
|
||||
<input type="submit" value="Licht 1 aus" name="test1aus">
|
||||
</form>
|
||||
<form method="get" action="index.php">
|
||||
<input type="submit" value="Licht 2 an" name="test2an">
|
||||
</form>
|
||||
<form method="get" action="index.php">
|
||||
<input type="submit" value="Licht 2 aus" name="test2aus">
|
||||
</form>
|
||||
<form method="get" action="index.php">
|
||||
<input type="submit" value="Licht 3 an" name="test3an">
|
||||
</form>
|
||||
<form method="get" action="index.php">
|
||||
<input type="submit" value="Licht 3 aus" name="test3aus">
|
||||
</form>
|
||||
<form method="get" action="index.php">
|
||||
<input type="submit" value="Alle Lichter an" name="test4an">
|
||||
</form>
|
||||
<form method="get" action="index.php">
|
||||
<input type="submit" value="Alle Lichter aus" name="test4aus">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
if(isset($_GET['test1an']))
|
||||
{
|
||||
#exec("sudo /home/pi/raspberry-remote/send 11010 1 1");
|
||||
$connection = ssh2_connect('192.168.100.2', PASSWORD);
|
||||
ssh2_auth_password($connection, 'root', 'rune');
|
||||
$stream = ssh2_exec($connection, '/home/strolch/downloads/raspberry-remote/send 11010 1 1');
|
||||
}
|
||||
if(isset($_GET['test1aus']))
|
||||
{
|
||||
#exec("sudo /home/pi/raspberry-remote/send 11010 1 0");
|
||||
$connection = ssh2_connect('192.168.100.2', PASSWORD);
|
||||
ssh2_auth_password($connection, 'root', 'rune');
|
||||
$stream = ssh2_exec($connection, '/home/strolch/downloads/raspberry-remote/send 11010 1 0');
|
||||
}
|
||||
if(isset($_GET['test2an']))
|
||||
{
|
||||
#exec("sudo /home/pi/raspberry-remote/send 11010 2 1");
|
||||
$connection = ssh2_connect('192.168.100.2', PASSWORD);
|
||||
ssh2_auth_password($connection, 'root', 'rune');
|
||||
$stream = ssh2_exec($connection, '/home/strolch/downloads/raspberry-remote/send 11010 2 1');
|
||||
}
|
||||
|
||||
if(isset($_GET['test2aus']))
|
||||
{
|
||||
$connection = ssh2_connect('192.168.100.2', PASSWORD);
|
||||
#exec("sudo /home/pi/raspberry-remote/send 11010 2 0");
|
||||
ssh2_auth_password($connection, 'root', 'rune');
|
||||
$stream = ssh2_exec($connection, '/home/strolch/downloads/raspberry-remote/send 11010 2 0');
|
||||
|
||||
}
|
||||
if(isset($_GET['test3an']))
|
||||
{
|
||||
$connection = ssh2_connect('192.168.100.2', PASSWORD);
|
||||
#exec("sudo /home/pi/raspberry-remote/send 11010 3 1");
|
||||
ssh2_auth_password($connection, 'root', 'rune');
|
||||
$stream = ssh2_exec($connection, '/home/strolch/downloads/raspberry-remote/send 11010 3 1');
|
||||
}
|
||||
|
||||
if(isset($_GET['test3aus']))
|
||||
{
|
||||
$connection = ssh2_connect('192.168.100.2', PASSWORD);
|
||||
#exec("sudo /home/pi/raspberry-remote/send 11010 3 0");
|
||||
ssh2_auth_password($connection, 'root', 'rune');
|
||||
$stream = ssh2_exec($connection, '/home/strolch/downloads/raspberry-remote/send 11010 3 0');
|
||||
|
||||
}
|
||||
if(isset($_GET['test4an']))
|
||||
{
|
||||
$connection = ssh2_connect('192.168.100.2', PASSWORD);
|
||||
#exec("sudo /home/pi/raspberry-remote/send 11010 1 1");
|
||||
#exec("sudo /home/pi/raspberry-remote/send 11010 2 1");
|
||||
#exec("sudo /home/pi/raspberry-remote/send 11010 3 1");
|
||||
ssh2_auth_password($connection, 'root', 'rune');
|
||||
$stream = ssh2_exec($connection, '/home/strolch/downloads/raspberry-remote/send 11010 1 1');
|
||||
$stream = ssh2_exec($connection, '/home/strolch/downloads/raspberry-remote/send 11010 2 1');
|
||||
$stream = ssh2_exec($connection, '/home/strolch/downloads/raspberry-remote/send 11010 3 1');
|
||||
|
||||
}
|
||||
if(isset($_GET['test4aus']))
|
||||
{
|
||||
$connection = ssh2_connect('192.168.100.2', PASSWORD);
|
||||
#exec("sudo /home/pi/raspberry-remote/send 11010 1 0");
|
||||
#exec("sudo /home/pi/raspberry-remote/send 11010 2 0");
|
||||
#exec("sudo /home/pi/raspberry-remote/send 11010 3 0");
|
||||
ssh2_auth_password($connection, 'root', 'rune');
|
||||
$stream = ssh2_exec($connection, '/home/strolch/downloads/raspberry-remote/send 11010 1 0');
|
||||
$stream = ssh2_exec($connection, '/home/strolch/downloads/raspberry-remote/send 11010 2 0');
|
||||
$stream = ssh2_exec($connection, '/home/strolch/downloads/raspberry-remote/send 11010 3 0');
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user