summaryrefslogtreecommitdiff
path: root/www-ssl/admin/dect.php
blob: 49cb72bc7ee02a3f1d947d98d16195509b65fa2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?PHP

$title = "Engelsystem - DECT";
$header = "DECT send call";
include ("./inc/header.php");

include ("./inc/funktion_modem.php");

if( !isset($_GET["dial"])) $_GET["dial"] = "";
if( !isset($_GET["custum"])) $_GET["custum"] = "";

if( $_GET["dial"]=="dial")
{
	if( $_GET["DECT"]=="")
		$Number = $_GET["custum"];
	else
		$Number = $_GET["DECT"];
	
	if( strlen( $_GET["timeh"])== 1)
		 $_GET["timeh"] = "0". $_GET["timeh"];
	
	if( strlen( $_GET["timem"])== 1)
		 $_GET["timem"] = "0".  $_GET["timem"];
		
	SetWackeup( $Number, $_GET["timeh"], $_GET["timem"]);

	$_GET["custum"] = $Number;
}


	echo "<form action=\"./dect.php\" method=\"GET\">\n";
	echo "<table>\n";

	echo "<tr><th>Number</th><th>h:m</th><th></th></tr>\n";

	echo "<tr><td>\n";
	// Listet alle Nicks auf
	echo "<select name=\"DECT\">\n";
	echo "\t<option value=\"\">costum</option>\n";

	$usql="SELECT * FROM User WHERE NOT DECT='' ORDER BY Nick";
	$uErg = mysql_query($usql, $con);
	$urowcount = mysql_num_rows($uErg);
	for ($k=0; $k<$urowcount; $k++)
	{
		echo "\t<option value=\"".mysql_result($uErg, $k, "DECT")."\">".
		mysql_result($uErg, $k, "Nick").
		" (". mysql_result($uErg, $k, "DECT"). ")".
		"</option>\n";
	}
	echo "</select>\n";
	
	echo "<input type=\"text\" name=\"custum\" size=\"4\" maxlength=\"4\" value=\"". $_GET["custum"]. "\">\n";
	echo "</td>\n";

	echo "<td><input type=\"text\" name=\"timeh\" size=\"2\" maxlength=\"2\" value=\"". gmdate("H", time()+90+3600). "\">:";
	echo "<input type=\"text\" name=\"timem\" size=\"2\" maxlength=\"2\" value=\"". gmdate("i", time()+90+3600). "\"></td>\n";
	echo "<td><input type=\"submit\" name=\"dial\" value=\"dial\"></td>\n";
	echo "</tr>";
	echo "</table>\n";
	
	echo "</form>";


include ("./inc/footer.php");
?>