-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathremote.php
More file actions
104 lines (96 loc) · 3.83 KB
/
Copy pathremote.php
File metadata and controls
104 lines (96 loc) · 3.83 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?php
/*
Copyright 2008 - Peer Oliver Schmidt
GPLv2 Licensed
*/
/*
* This file is used to display the detail page for the supplied media file
* identified by PK_File
*/
include_once("lib.inc.php");
include_once("libVDR.php");
// Small Example
$a = new SVDRP($server ="192.168.80.1");
$a->Connect();
// print_r($a->Help());
$recordings = $a->ListRecords();
// $a->GetKeys();
// print_r($a->GetVolume());
// print_r($a->GetDiskStat());
error_reporting(E_ALL);
connectDB();
/* $currentUser = 1;
$currentScreen = 1;
$currentRoom = 3;
*/ $PK_File = 0;
$remoteType='';
global $pk_file,$currentUser, $currentScreen, $currentRoom, $currentEntertainArea, $link, $mediaLink;
if (isset($_COOKIE["currentUser"])) { $currentUser = $_COOKIE["currentUser"]; }
if (isset($_COOKIE["currentRoom"])) { $currentRoom = $_COOKIE["currentRoom"]; }
if (isset($_GET["room"])) {
$currentRoom = $_GET["room"];
$currentRoom = intval($currentRoom);
$currentEntertainArea = getEntertainArea($link,$currentRoom);
}
if (isset($_GET["screen"])) {
$currentScreen = $_GET["screen"];
$currentScreen = intval($currentScreen);
}
if (isset($_GET["user"])) {
$currentUser = $_GET["user"];
}
if (isset($_GET["pk_file"])) {
$PK_File = $_GET["pk_file"];
}
if (isset($_GET["type"])) {
$remoteType = $_GET["type"]; // Type of Remote, either AV or TV atm.
}
print "<ul>\n";
if ($PK_File <> 0) {
print "<li class='group'>Media Information</li>\n";
print "<li>Playing $currentRoom $currentEntertainArea</li>\n";
print "<li>pk file $PK_File</li>\n";
getPicture($mediaLink,$PK_File);
}
print "";
if ((substr($remoteType,0,2) == 'AV') or (substr($remoteType,0,2) == 'TV')) {
print "<li class='group'>Media Control</li>\n";
print "<li onClick='tellemCommand(\"play\",\"$remoteType\",$PK_File);'>Play/Pause</li>\n";
print "<li onClick='tellemCommand(\"skipfwd\",\"$remoteType\",$PK_File);'>Skip Forward</li>\n";
print "<li onClick='tellemCommand(\"skipback\",\"$remoteType\",$PK_File);'>Skip Backward</li>\n";
}
print "<li class='group'>Other Control</li>\n";
print "<li onClick='tellemCommand(\"louder\",$PK_File);'>Volume+</li>\n";
print "<li onClick='tellemCommand(\"quieter\",$PK_File);'>Volume-</li>\n";
print "<li onClick='tellemCommand(\"mute\",$PK_File);'>Mute</li>\n";
if (lightinroom()) {
print "<li onClick='tellemCommand(\"brighter\",$PK_File);'>Brighter</li>\n";
print "<li onClick='tellemCommand(\"darker\",$PK_File);'>Darker</li>\n";
}
flush();
// ob_flush();
if (substr($remoteType,0,2) == 'TV') {
print "<li class='group'>TV Remote</li>\n";
print "<li onClick='tellemCommand(\"progfwd\",\"$remoteType\",$PK_File);'>Next Program</li>\n";
print "<li onClick='tellemCommand(\"progback\",\"$remoteType\",$PK_File);'>Prev Program</li>\n";
print "<li class='group'>Control</li>\n";
print "<li onClick='tellemCommand(\"red\",\"$remoteType\",$PK_File);'>Red</li>\n";
print "<li onClick='tellemCommand(\"green\",\"$remoteType\",$PK_File);'>Green</li>\n";
print "<li onClick='tellemCommand(\"yellow\",\"$remoteType\",$PK_File);'>Yellow</li>\n";
print "<li onClick='tellemCommand(\"blue\",\"$remoteType\",$PK_File);'>Blue</li>\n";
print "<li class='group'>Arrows</li>\n";
print "<li onClick='tellemCommand(\"up\",\"$remoteType\",$PK_File);'>Up</li>\n";
print "<li onClick='tellemCommand(\"down\",\"$remoteType\",$PK_File);'>Down</li>\n";
print "<li onClick='tellemCommand(\"left\",\"$remoteType\",$PK_File);'>Left</li>\n";
print "<li onClick='tellemCommand(\"right\",\"$remoteType\",$PK_File);'>Right</li>\n";
print "<li class='group'>Recordings</li>\n";
// print "<li>";
// print_r($recordings);
// print "</li>";
foreach($recordings as $recording) {
print "<li onClick='tellemCommand(\"play\",\"$remoteType\",\"$recording[1]\");'>$recording[7]</li>\n";
}
}
print "</ul>\n";
// $a->Disconnect();
?>