getDataObject(); if (!empty($_GET['c'])) { $user = User::getChannelOwner($_GET['c']); if (!empty($user)) { $_GET['u'] = $user['user']; } } if (!empty($_GET['c'])) { $user = User::getChannelOwner($_GET['c']); if ($user['status'] !== 'a') { header("Location: {$global['webSiteRootURL']}"); } } if (!empty($_GET['u']) && !empty($_GET['embedv2'])) { include $global['systemRootPath'] . 'plugin/Live/view/videoEmbededV2.php'; exit; } else if (!empty($_GET['u']) && !empty($_GET['embed'])) { include $global['systemRootPath'] . 'plugin/Live/view/videoEmbeded.php'; exit; } else if (!empty($_GET['u'])) { include $global['systemRootPath'] . 'plugin/Live/view/modeYoutubeLive.php'; exit; } else if (!User::isLogged()) { gotToLoginAndComeBackHere(""); exit; } else if (!User::canStream()) { forbiddenPage(__($obj->streamDeniedMsg)); } require_once $global['systemRootPath'] . 'objects/userGroups.php'; require_once $global['systemRootPath'] . 'objects/functions.php'; require_once $global['systemRootPath'] . 'plugin/Live/Objects/LiveTransmition.php'; $users_id = User::getId(); if (!empty($_GET['users_id']) && User::isAdmin()) { $users_id = intval($_GET['users_id']); } // if user already have a key $trasnmition = LiveTransmition::createTransmitionIfNeed($users_id); $getLiveKey = array('key' => $trasnmition['key'], 'live_servers_id' => Live::getLiveServersIdRequest()); setLiveKey($trasnmition['key'], Live::getLiveServersIdRequest(), @$_REQUEST['live_index']); if (!empty($_GET['resetKey'])) { LiveTransmition::resetTransmitionKey($users_id); header("Location: {$global['webSiteRootURL']}plugin/Live/"); exit; } $trans = new LiveTransmition($trasnmition['id']); $groups = $trans->getGroups(); //check if channel name exists $channelName = User::getUserChannelName(); if (empty($channelName)) { $channelName = uniqid(); $user = new User($users_id); $user->setChannelName($channelName); $user->save(); } //$global['ignoreChat2'] = 1; $col1Class = "col-md-12 col-lg-12"; $col2Class = "hidden"; $chat2 = AVideoPlugin::getObjectDataIfEnabled("Chat2"); if (!empty($chat2) && !empty($chat2->useStaticLayout)) { $col1Class = "col-md-8 col-lg-8"; $col2Class = "col-md-4 col-lg-4"; } ?>