-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhandmatig.php
149 lines (134 loc) · 5.96 KB
/
handmatig.php
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?php
require_once ('tvfunctions.php'); // Functions for TV scripts
authorize(0);
require_once ('tvconfig.php'); // Settings for TV scripts
require_once ('message.php'); // Translation
testConfiguration(); // Test if configuration of directorys is OK
if (isset($_POST['action'])) {
if ($_POST['action']==KKA_BROADCAST) {
exec('/home/tv/scripts/broadcastlink.sh');
}
elseif ($_POST['action']==KKA_DELETE_CACHE) {
exec('/home/tv/scripts/deletecache.sh');
}
elseif ($_POST['action']==KKA_DELETE_BROADCAST_CACHE) {
exec('/home/tv/scripts/deletebroadcastcache.sh');
}
elseif ($_POST['action']==KKA_MISSING_MEDIA) {
}
elseif ($_POST['action']==KKA_BACKUP) {
exec('/usr/bin/sudo /home/tv/scripts/backup/backup.sh');
}
elseif ($_POST['action']==KKA_AUDIO_LINEIN1) {
exec('/usr/bin/sudo /home/tv/scripts/audio-wissel.sh line1');
}
elseif ($_POST['action']==KKA_AUDIO_LINEIN2) {
exec('/usr/bin/sudo /home/tv/scripts/audio-wissel.sh line2');
}
elseif ($_POST['action']==KKA_AUDIO_OFF) {
exec('/usr/bin/sudo /home/tv/scripts/audio-uit.sh');
}
elseif ($_POST['action']==TVA_PLAY_FILE) {
exec('/usr/bin/sudo -u tv /home/tv/scripts/speelvideo-headless.sh "'.$_POST['filename'].'"');
}
elseif ($_POST['action']==TVA_STOP_PLAYER) {
exec('/usr/bin/sudo -u root /home/tv/scripts/killvideo.sh');
}
elseif ($_POST['action']==TVA_COMPOSITE_LINEIN1) {
exec('/usr/bin/sudo -u tv /home/tv/scripts/composite-headless.sh line1');
}
elseif ($_POST['action']==TVA_COMPOSITE_LINEIN2) {
exec('/usr/bin/sudo -u tv /home/tv/scripts/composite-headless.sh line2');
}
elseif ($_POST['action']==TVA_FIREWIRE) {
exec('/usr/bin/sudo -u tv /home/tv/scripts/firewire-headless.sh');
}
elseif ($_POST['action']==TVA_FIREWIRE_HYBRID) {
exec('/usr/bin/sudo -u tv /home/tv/scripts/firewire-hybrid-headless.sh');
}
elseif ($_POST['action']==TVA_X_576_1080) {
exec('/usr/bin/sudo /home/tv/scripts/resolutie/naar1080.sh');
}
elseif ($_POST['action']==TVA_X_1080_576) {
exec('/usr/bin/sudo /home/tv/scripts/resolutie/naar576.sh');
}
elseif ($_POST['action']==TVA_X_RESTART) {
exec('/usr/bin/sudo /home/tv/scripts/restartX.sh');
}
elseif ($_POST['action']==TVA_REBOOT) {
exec('/usr/bin/sudo reboot');
}
elseif ($_POST['action']==TVA_POWEROFF) {
exec('/usr/bin/sudo poweroff');
}
elseif ($_POST['action']==TVA_MOUNT_USB) {
exec('/bin/mount /mnt/usb');
}
elseif ($_POST['action']==TVA_UMOUNT_USB) {
exec('/bin/umount /mnt/usb');
}
elseif ($_POST['action']==TVA_MOUNT_DVD) {
exec('/bin/mount /mnt/dvd');
}
elseif ($_POST['action']==TVA_UMOUNT_DVD) {
exec('/bin/umount /mnt/dvd');
}
}
?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title><?php echo OWNER;?></title>
<link rel="stylesheet" href="tv.css" type="text/css" />
</head>
<body>
<form method="post" enctype="multipart/form-data">
<b>Handmatige bediening, BLIJF HIER VANAF ALS JE NIET WEET WAT JE DOET!</b><br /><br />
<fieldset class="navigation">
<?php echo 'Gebruiker: ', $_SERVER['PHP_AUTH_USER']; ?>
</fieldset>
<fieldset class="main">
<legend>Kabelkrantadmin</legend>
<fieldset class="buttons">
<legend>Acties</legend>
<input type="submit" name="action" value="<?php echo KKA_DELETE_CACHE; ?>" class="button" />
<input type="submit" name="action" value="<?php echo KKA_DELETE_BROADCAST_CACHE; ?>" class="button" />
<input type="submit" name="action" value="<?php echo KKA_BROADCAST; ?>" class="button" />
<input type="submit" name="action" value="<?php echo KKA_MISSING_MEDIA; ?>" class="button" />
<input type="submit" name="action" value="<?php echo KKA_BACKUP; ?>" class="button" />
<input type="submit" name="action" value="<?php echo KKA_AUDIO_LINEIN1; ?>" class="button" />
<input type="submit" name="action" value="<?php echo KKA_AUDIO_LINEIN2; ?>" class="button" />
<input type="submit" name="action" value="<?php echo KKA_AUDIO_OFF; ?>" class="button" />
</fieldset>
</fieldset>
<fieldset class="main">
<legend>Televisie</legend>
<fieldset class="buttons">
<legend>Acties</legend>
<input type="submit" name="action" value="<?php echo TVA_STOP_PLAYER; ?>" class="button" />
<input type="submit" name="action" value="<?php echo TVA_COMPOSITE_LINEIN1; ?>" class="button" />
<input type="submit" name="action" value="<?php echo TVA_COMPOSITE_LINEIN2; ?>" class="button" />
<input type="submit" name="action" value="<?php echo TVA_FIREWIRE; ?>" class="button" />
<input type="submit" name="action" value="<?php echo TVA_FIREWIRE_HYBRID; ?>" class="button" />
<?php echo @multidirtoselectExts('filename', array(M3UDIR, '/mnt/usb', '/mnt/dvd', '/mnt/dvd/VIDEO_TS'), '', false, 0, array('m3u', 'mkv', 'avi', 'mp4', 'vob', 'mov', 'flv')); ?>
<input type="submit" name="action" value="<?php echo TVA_PLAY_FILE; ?>" class="button" />
</fieldset>
</fieldset>
<fieldset class="main">
<legend>Beheer van de PC</legend>
<fieldset class="buttons">
<input type="submit" name="action" value="<?php echo TVA_MOUNT_USB; ?>" class="button" />
<input type="submit" name="action" value="<?php echo TVA_UMOUNT_USB; ?>" class="button" />
<input type="submit" name="action" value="<?php echo TVA_MOUNT_DVD; ?>" class="button" />
<input type="submit" name="action" value="<?php echo TVA_UMOUNT_DVD; ?>" class="button" />
<input type="submit" name="action" value="<?php echo TVA_X_576_1080; ?>" class="button" />
<input type="submit" name="action" value="<?php echo TVA_X_1080_576; ?>" class="button" />
<input type="submit" name="action" value="<?php echo TVA_X_RESTART; ?>" class="button" />
<input type="submit" name="action" value="<?php echo TVA_REBOOT; ?>" class="button" />
<input type="submit" name="action" value="<?php echo TVA_POWEROFF; ?>" class="button" />
</fieldset>
</fieldset>
</form>
</body>
</html>