forked from SimeonFr/PhantomBot-WebPanel
/
stream-alerts-player.php
56 lines (52 loc) · 2.15 KB
/
stream-alerts-player.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
<?php
/**
* Created by PhpStorm.
* User: Robin | Juraji
* Date: 3-12-2015
* Time: 03:43
*/
require_once('AppLoader.class.php');
\PBPanel\AppLoader::loadUtil('DataStore');
$dataStore = new \PBPanel\Util\DataStore();
$eventServerAdress = $dataStore->getVar('connector', 'botIp') . ':' . (intval($dataStore->getVar('connector', 'botBasePort')) + 2);
$alertSettings = json_encode([
'bgColor' => $dataStore->getVar('misc', 'streamAlertBG', '#ffffff'),
'follow' => [
'bgImage' => addslashes($dataStore->getVar('streamalertsettings', 'followerAlertBG')),
'textTemplate' => $dataStore->getVar('streamalertsettings', 'followerAlertText'),
'soundFile' => addslashes($dataStore->getVar('streamalertsettings', 'followerAlertSound')),
'customCss' => $dataStore->getVar('streamalertsettings', 'followerAlertCSS'),
],
'host' => [
'bgImage' => addslashes($dataStore->getVar('streamalertsettings', 'hostAlertBG')),
'textTemplate' => $dataStore->getVar('streamalertsettings', 'hostAlertText'),
'soundFile' => addslashes($dataStore->getVar('streamalertsettings', 'hostAlertSound')),
'customCss' => $dataStore->getVar('streamalertsettings', 'hostAlertCSS'),
],
'subscribe' => [
'bgImage' => addslashes($dataStore->getVar('streamalertsettings', 'subscribeAlertBG')),
'textTemplate' => $dataStore->getVar('streamalertsettings', 'subscribeAlertText'),
'soundFile' => addslashes($dataStore->getVar('streamalertsettings', 'subscribeAlertSound')),
'customCss' => $dataStore->getVar('streamalertsettings', 'subscribeAlertCSS'),
],
]);
?>
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<link rel="icon" href="/favicon.ico" type="image/x-icon"/>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" href="app/css/defaultAlertCSS.css"/>
<script>
var botAddress = '<?= $eventServerAdress ?>',
alertSettings = <?= $alertSettings ?>;
</script>
<script src="//code.jquery.com/jquery-1.11.3.min.js" type="text/javascript"></script>
<script src="app/js/rsocket.min.js"></script>
<script src="app/js/stream-alerts.min.js"></script>
</head>
<body>
</body>
</html>