403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/HostingSpaces/admin/chatme24.com/wwwroot/update/update-chameleon-5.2-5.3/m/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/HostingSpaces/admin/chatme24.com/wwwroot/update/update-chameleon-5.2-5.3/m//live_streaming.php
<?php
/* (C) Websplosion LLC, 2001-2021

IMPORTANT: This is a commercial software product
and any kind of using it must agree to the Websplosion's license agreement.
It can be found at http://www.chameleonsocial.com/license.doc

This notice may not be removed from the source code. */
$area = "login";
include("./_include/core/pony_start.php");

LiveStreaming::checkAviableLiveStreaming();

checkAccessFeatureByPayment('live_streaming', false);

User::accessCheckToProfile(true);

class CLiveStreaming extends CHtmlBlock
{
	function parseBlock(&$html)
	{
		global $g;
		global $g_user;

        $typeChat = 'webrtc';
        $html->setvar('type_chat', $typeChat);
        $liveView = get_param_int('live');

        $guid = $g_user['user_id'];
        $clientId = User::getParamUid($guid, 'user_id');

        $html->setvar('client_guid', $guid);

        $lStartStreaming = l('start_striming_presenter');
        $lStopStreaming = l('stop_striming_presenter');
        if ($guid != $clientId) {
            $lStartStreaming = l('start_striming_viewer');
            $lStopStreaming = l('stop_striming_viewer');
        }
        $html->setvar('start_striming_j', toJs($lStartStreaming));
        $html->setvar('stop_striming_j', toJs($lStopStreaming));
        $html->setvar('start_striming', $lStartStreaming);

        $isPresenter = intval($guid == $clientId);
        $html->setvar('user_presenter', $isPresenter);

		$price = Pay::getServicePrice('live_stream', 'credits');
		$html->setvar('ls_pay_price', $price);
		
        $isStreamStart = get_param_int('stream');
        if ($isStreamStart) {
            $isAutoConnect = 0;
        } else {
            $isAutoConnect = $isPresenter ? 0 : intval(Common::isOptionActive('live_streaming_auto_connect'));
        }
        ////$isAutoConnect = 0;

        $isParseChat = true;
        $userInfo = User::getInfoBasic($clientId);
        $pageTitle = '';
		$pageTitleAll = '';

        $liveDemo = false;
        $liveInfo = array();
        if ($userInfo) {
            if ($isPresenter) {
                $pageTitle = l('page_title_my');
                $langMobile = loadLanguageSiteMobile(Common::getOption('lang_loaded', 'main'));

                global $p;
                $pSrc = $p;
                $p = 'videochat.php';
                $html->setvar('app_does_not_have_permissions_to_access_the_camera_and_the_microphone', toJs(l('app_does_not_have_permissions_to_access_the_camera_and_the_microphone', $langMobile)));
                $p = $pSrc;
            } else {
                //$name = User::nameOneLetterFull($userInfo['name']);
                $name = User::nameShort($userInfo['name']);
                $pageTitle = lSetVars('page_title', array('name' => $name));//if (IS_DEMO && get_param('demo')) {
                $userLiveNowId = LiveStreaming::getUserLiveNowId($clientId);
                $videoInfo = array();
                if (!$liveView && $userLiveNowId) {
                    $liveView = $userLiveNowId;
                }
                if (!$userLiveNowId || ($liveView && $liveView != $userLiveNowId)) {
                    $isParseChat = false;
                } elseif($liveView) {
                    $liveInfo = LiveStreaming::getInfoLive($liveView);
                    if (!$liveInfo || !$liveInfo['status']) {
                        $isParseChat = false;
                    } elseif($liveInfo) {
                        $videoInfo = DB::one('vids_video', 'id = ' . to_sql($liveInfo['video_id']));
                        if ($videoInfo) {
                            if (trim($videoInfo['subject'])) {
                                $pageTitle = trim($videoInfo['subject']);
								$pageTitleAll = $pageTitle;
                            }
                            if (IS_DEMO && $liveInfo['demo']) {
                                $liveDemo = true;
                                $html->setvar('ls_demo_viewer_live_id', $liveView);
                                $html->setvar('ls_demo_viewer_url', toJs($g['path']['url_files'] . User::getVideoFile($videoInfo, 'video_src', '')));
                            }
                        }
                    }
                }
            }

			if ($pageTitleAll) {
				$html->setvar('page_title_all', toAttr($pageTitleAll));
			}
            $html->setvar('page_title', $pageTitle);

            if ($isParseChat) {
                if ($isPresenter || User::isOnline($clientId, $userInfo) || $liveDemo) {
                    $clientIdStr = LiveStreaming::getIdByLiveStreaming($clientId);
                    if (IS_DEMO) {
                        $session = '';
                        if ($isPresenter) {
                            $session = addslashes(session_id());
                        } elseif (!$liveDemo && isset($liveInfo['demo_session'])) {
                            $session = $liveInfo['demo_session'];
                        }
                        if ($session) {
                            $clientIdStr = $clientIdStr  . '_' . $session;
                        }
                        $html->setvar('client_id_session_demo', $session);
                    }

                    $html->setvar('client_id', $clientIdStr);

                } else {
                    $isParseChat = false;
                }
            }
        } else {
            $isParseChat = false;
        }

        $html->setvar('user_client_uid', $guid);
        $html->setvar('user_client_url', User::url($guid));
        $html->setvar('user_client_photo', User::getPhotoDefault($guid, 'r'));

        if (!$isParseChat && !$isPresenter) {
            $isAutoConnect = 0;
        }

        //if (!$isPresenter && !$isStreamStart && $isAutoConnect) {
		if ($isPresenter){
			$pageUrl = Common::pageUrl('live', $guid);
		} else {
			if ($isStreamStart) {
				$pageUrl = Common::pageUrl('live_', $clientId, $liveView);
			} else {
				$pageUrl = Common::pageUrl('live_id', $clientId, $liveView);
			}
		}
        if (!$isPresenter && !$isStreamStart) {
			$pageUrl = Common::pageUrl('live_', $clientId, $liveView);
            $html->setvar('page_url_start', $pageUrl);
            $html->setvar('page_live_view_id', $liveView);
            $html->parse('viewer_auto_connect_js');
        }
		$html->setvar('page_url_history', $pageUrl);//Impact mobile

        $html->setvar('auto_connect', $isAutoConnect);

        if ($isParseChat) {
            LiveStreaming::parseBlockComments($html, 0);//2667

            if (!$isPresenter && !$isStreamStart && $isAutoConnect) {
                $html->parse('module_hide_btn_connect_bl', false);
                $html->parse('module_hide_btn_connect', false);
            } elseif ($isPresenter) {
                $html->parse('presenter_start_js', false);
                $html->parse('module_hide_btn_connect_bl', false);
                $html->parse('module_hide_btn_connect', false);
            }

            $html->setvar('is_mobile', Common::isMobile(false, true, true));
            $html->setvar('media_server', $g['webrtc_app_live_streaming']);//. '1'

            $html->parse('live_streaming_webrtc_js');
        } else {
            if (!$pageTitle) {
                $html->setvar('page_title', l('page_title_empty'));
            }

            if ($liveView) {
                $msgAlert = $isPresenter ? toJs(l('you_cannot_attend_your_live')) : '';
                $html->setvar('no_live_streaming_js_msg', $msgAlert);
            }
            $html->parse('no_live_streaming_js');
        }

		parent::parseBlock($html);
	}
}

$optionTmplSet = Common::getTmplSet();

$tmpl = array('main' => $g['tmpl']['dir_tmpl_mobile'] . 'live_streaming.html',
			  'live_streaming' => $g['tmpl']['dir_tmpl_mobile'] . '_live_streaming.html');


$page = new CLiveStreaming("", $tmpl);
$header = new CHeader("header", $g['tmpl']['dir_tmpl_mobile'] . "_header.html");
$page->add($header);

if (Common::isParseModule('user_menu')) {
    $user_menu = new CUserMenu("user_menu", $g['tmpl']['dir_tmpl_mobile'] . "_user_menu.html");
    if ($optionTmplSet == 'urban') {
        $header->add($user_menu);
    } else {
        $page->add($user_menu);
    }
}

$tmplFooter = $g['tmpl']['dir_tmpl_mobile'] . "_footer.html";
if (Common::isOptionActive('is_allow_empty_footer', 'template_options')) {
    $tmplFooter = $g['tmpl']['dir_tmpl_mobile'] . "_footer_empty.html";
}
$footer = new CFooter("footer", $tmplFooter);
$page->add($footer);

loadPageContentAjax($page);

include("./_include/core/main_close.php");

Youez - 2016 - github.com/yon3zu
LinuXploit