-
Notifications
You must be signed in to change notification settings - Fork 0
/
live.php
43 lines (36 loc) · 994 Bytes
/
live.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
<?php
// fetch bootloader
require('bootloader.php');
// live enabled
if (!$system['live_enabled']) {
_error(404);
}
// live permission
if (!$user->_data['can_go_live']) {
_error('PERMISSION');
}
// check demo account
if ($user->_data['user_demo']) {
_error('PERMISSION');
}
// page header
page_header(__($system['system_title']) . ' - ' . __("Live Video"));
// get agora (uid|token|channel_name)
$agora = $user->agora_token_builder(true);
/* assign variables */
$smarty->assign('agora', $agora);
// set page|group|event id
if (isset($_GET['page_id']) && is_numeric($_GET['page_id'])) {
/* assign variables */
$smarty->assign('page_id', $_GET['page_id']);
}
if (isset($_GET['group_id']) && is_numeric($_GET['group_id'])) {
/* assign variables */
$smarty->assign('group_id', $_GET['group_id']);
}
if (isset($_GET['event_id']) && is_numeric($_GET['event_id'])) {
/* assign variables */
$smarty->assign('event_id', $_GET['event_id']);
}
// page footer
page_footer("live");