diff --git a/install/checkMaxOpenFiles.php b/install/checkMaxOpenFiles.php new file mode 100644 index 0000000000..187d38d1a9 --- /dev/null +++ b/install/checkMaxOpenFiles.php @@ -0,0 +1,7 @@ + + + + + + diff --git a/objects/functions.php b/objects/functions.php index 5768dc2eb9..8e641d3618 100644 --- a/objects/functions.php +++ b/objects/functions.php @@ -545,7 +545,7 @@ function partition(array $list, $totalItens) { return $partition; } -function sendSiteEmail($to, $subject, $message, $fromEmail='', $fromName='') { +function sendSiteEmail($to, $subject, $message, $fromEmail = '', $fromName = '') { global $advancedCustom; $resp = false; if (empty($to)) { @@ -565,10 +565,10 @@ function sendSiteEmail($to, $subject, $message, $fromEmail='', $fromName='') { _error_log("sendSiteEmail [" . count($to) . "] {$subject}"); global $config, $global; //require_once $global['systemRootPath'] . 'objects/include_phpmailer.php'; - if(empty($fromEmail)){ + if (empty($fromEmail)) { $fromEmail = $config->getContactEmail(); } - if(empty($fromName)){ + if (empty($fromName)) { $fromName = $config->getWebSiteTitle(); } $webSiteTitle = $config->getWebSiteTitle(); @@ -8188,14 +8188,13 @@ function pluginsRequired($arrayPluginName, $featureName = '') { return $obj; } -function _strtotime($datetime){ - if(is_int($datetime)){ +function _strtotime($datetime) { + if (is_int($datetime)) { return $datetime; } return strtotime($datetime); } - function _isSocketPresentOnCrontab() { foreach (getValidCrontabLines() as $line) { if (!empty($line) && preg_match('/plugin\/YPTSocket\/server.php/', $line)) { @@ -8214,11 +8213,9 @@ function _isSchedulerPresentOnCrontab() { return false; } - - -function getValidCrontabLines(){ +function getValidCrontabLines() { global $_validCrontabLines; - if(empty($validCrontabLines)){ + if (empty($validCrontabLines)) { $crontab = shell_exec('crontab -l'); $crontabLines = preg_split("/\r\n|\n|\r/", $crontab); $_validCrontabLines = array(); @@ -8238,16 +8235,16 @@ function getValidCrontabLines(){ * @param type $strOrArray * @return type return an array with the valid emails. */ -function is_email($strOrArray){ - if(empty($strOrArray)){ +function is_email($strOrArray) { + if (empty($strOrArray)) { return array(); } - if(!is_array($strOrArray)){ + if (!is_array($strOrArray)) { $strOrArray = array($strOrArray); } $valid_emails = array(); foreach ($strOrArray as $email) { - if(is_numeric($email)){ + if (is_numeric($email)) { $email = User::getEmailDb($email); } if (filter_var($email, FILTER_VALIDATE_EMAIL)) { @@ -8255,4 +8252,40 @@ function is_email($strOrArray){ } } return $valid_emails; +} + +/** + * https://codepen.io/ainalem/pen/LJYRxz + * @global type $global + * @param type $id + * @param type $type 1 to 8 [1=x, 2=<-, 3=close, 4=x, 5=<-, 6=x, 7=x, 8=x] + * @param type $parameters + * @return type + */ +function getHamburgerButton($id = '', $type = 0, $parameters = 'class="btn btn-default hamburger"', $startActive = false, $invert = false) { + global $global; + if ($type === 'x') { + $XOptions = array(1, 4, 6, 7, 8); + $type = $XOptions[rand(0, 4)]; + }else if($type === '<-'){ + $XOptions = array(2, 5); + $type = $XOptions[rand(0, 1)]; + } + $type = intval($type); + if (empty($type) || ($type < 1 && $type > 8)) { + $type = rand(1, 8); + } + if (empty($id)) { + $id = uniqid(); + } + $filePath = $global['systemRootPath'] . 'objects/functionGetHamburgerButton.php'; + return getIncludeFileContent($filePath, array('type' => $type, 'id' => $id, 'parameters' => $parameters, 'startActive' => $startActive, 'invert' => $invert)); +} + +function getUserOnlineLabel($users_id, $class='', $style=''){ + if(AVideoPlugin::isEnabledByName('YPTSocket')){ + return YPTSocket::getUserOnlineLabel($users_id, $class, $style); + }else{ + return ''; + } } \ No newline at end of file diff --git a/plugin/CustomizeAdvanced/CustomizeAdvanced.php b/plugin/CustomizeAdvanced/CustomizeAdvanced.php index 62b0f43032..4491459067 100644 --- a/plugin/CustomizeAdvanced/CustomizeAdvanced.php +++ b/plugin/CustomizeAdvanced/CustomizeAdvanced.php @@ -1,520 +1,521 @@ - Help"; - return $txt . $help; - } - - public function getName() { - return "CustomizeAdvanced"; - } - - public function getUUID() { - return "55a4fa56-8a30-48d4-a0fb-8aa6b3f69033"; - } - - public function getPluginVersion() { - return "1.0"; - } - - public function getEmptyDataObject() { - global $global; - $obj = new stdClass(); - $obj->logoMenuBarURL = ""; - $obj->encoderNetwork = "https://network.wwbn.net/"; - $obj->useEncoderNetworkRecomendation = false; - $obj->doNotShowEncoderNetwork = true; - $obj->doNotShowUploadButton = false; - $obj->uploadButtonDropdownIcon = "fas fa-video"; - $obj->uploadButtonDropdownText = ""; - $obj->encoderNetworkLabel = ""; - $obj->doNotShowUploadMP4Button = true; - $obj->disablePDFUpload = false; - $obj->disableImageUpload = false; - $obj->disableZipUpload = true; - $obj->disableMP4Upload = false; - $obj->disableMP3Upload = false; - $obj->uploadMP4ButtonLabel = ""; - $obj->doNotShowImportMP4Button = true; - $obj->importMP4ButtonLabel = ""; - $obj->doNotShowEncoderButton = false; - $obj->encoderButtonLabel = ""; - $obj->doNotShowEmbedButton = false; - $obj->embedBackgroundColor = "white"; - $obj->embedButtonLabel = ""; - $obj->embedCodeTemplate = '
'; - $obj->embedCodeTemplateObject = '
'; - $obj->htmlCodeTemplate = '{title}'; - $obj->BBCodeTemplate = '[url={permaLink}][img]{imgSRC}[/img]{title}[/url]'; - - $o = new stdClass(); - $o->type = array(-1 => __("Basic Controls"), 0 => __("No Controls"), 1 => __("All controls")); - $o->value = 1; - $obj->embedControls = $o; - $obj->embedAutoplay = false; - $obj->embedLoop = false; - $obj->embedStartMuted = false; - $obj->embedShowinfo = true; - - $obj->doNotShowEncoderHLS = false; - $obj->doNotShowEncoderResolutionLow = false; - $obj->doNotShowEncoderResolutionSD = false; - $obj->doNotShowEncoderResolutionHD = false; - $obj->openEncoderInIFrame = false; - $obj->showOnlyEncoderAutomaticResolutions = true; - $obj->doNotShowEncoderAutomaticHLS = false; - $obj->doNotShowEncoderAutomaticMP4 = false; - $obj->doNotShowEncoderAutomaticWebm = false; - $obj->doNotShowEncoderAutomaticAudio = false; - $obj->saveOriginalVideoResolution = false; - self::addDataObjectHelper('saveOriginalVideoResolution', 'Do not save original video', 'This option will make your encoder at the end trancode the video into the original format resolution'); - $obj->doNotShowExtractAudio = false; - $obj->doNotShowCreateVideoSpectrum = false; - $obj->doNotShowLeftMenuAudioAndVideoButtons = false; - $obj->doNotShowWebsiteOnContactForm = false; - $obj->doNotUseXsendFile = false; - $obj->makeVideosInactiveAfterEncode = false; - $obj->makeVideosUnlistedAfterEncode = false; - $obj->usePermalinks = false; - $obj->useVideoIDOnSEOLinks = true; - $obj->disableAnimatedGif = false; - $obj->removeBrowserChannelLinkFromMenu = false; - $obj->EnableMinifyJS = false; - $obj->disableShareAndPlaylist = false; - $obj->disableShareOnly = false; - $obj->disableEmailSharing = false; - $obj->splitBulkEmailSend = 50; - $obj->disableComments = false; - $obj->commentsMaxLength = 200; - $obj->commentsNoIndex = false; - $obj->disableYoutubePlayerIntegration = false; - $obj->utf8Encode = false; - $obj->utf8Decode = false; - $o = new stdClass(); - $o->type = "textarea"; - $o->value = ""; - $obj->menuBarHTMLCode = $o; - $o->type = "textarea"; - $o->value = ""; - $obj->underMenuBarHTMLCode = $o; - $o->type = "textarea"; - $o->value = ""; - $obj->footerHTMLCode = $o; - $obj->signInOnRight = true; - $obj->signInOnLeft = true; - $obj->forceCategory = false; - $obj->showCategoryTopImages = true; - $obj->autoPlayAjax = false; - - $plugins = Plugin::getAllEnabled(); - //import external plugins configuration options - foreach ($plugins as $value) { - $p = AVideoPlugin::loadPlugin($value['dirName']); - if (is_object($p)) { - $foreginObjects = $p->getCustomizeAdvancedOptions(); - if ($foreginObjects) { - foreach ($foreginObjects as $optionName => $defaultValue) - $obj->{$optionName} = $defaultValue; - } - } - } - - $obj->disableInstallPWAButton = false; - $obj->disablePlayLink = false; - $obj->disableHelpLeftMenu = false; - $obj->disableAboutLeftMenu = false; - $obj->disableContactLeftMenu = false; - $obj->disableAnimations = false; - $obj->disableNavbar = false; - $obj->disableNavBarInsideIframe = true; - $obj->autoHideNavbar = true; - $obj->autoHideNavbarInSeconds = 0; - $obj->videosCDN = ""; - $obj->useFFMPEGToGenerateThumbs = false; - $obj->thumbsWidthPortrait = 170; - $obj->thumbsHeightPortrait = 250; - $obj->thumbsWidthLandscape = 640; - $obj->thumbsHeightLandscape = 360; - $obj->usePreloadLowResolutionImages = false; - $obj->showImageDownloadOption = false; - $obj->doNotDisplayViews = false; - $obj->doNotDisplayLikes = false; - $obj->doNotDisplayCategoryLeftMenu = false; - $obj->doNotDisplayCategory = false; - $obj->doNotDisplayGroupsTags = false; - $obj->doNotDisplayPluginsTags = false; - $obj->showNotRatedLabel = false; - $obj->showShareMenuOpenByDefault = false; - - foreach ($global['social_medias'] as $key => $value) { - eval("\$obj->showShareButton_{$key} = true;"); - } - - $obj->askRRatingConfirmationBeforePlay_G = false; - $obj->askRRatingConfirmationBeforePlay_PG = false; - $obj->askRRatingConfirmationBeforePlay_PG13 = false; - $obj->askRRatingConfirmationBeforePlay_R = false; - $obj->askRRatingConfirmationBeforePlay_NC17 = true; - $obj->askRRatingConfirmationBeforePlay_MA = true; - $obj->filterRRating = false; - - - $obj->doNotShowLeftHomeButton = false; - $obj->doNotShowLeftTrendingButton = false; - - $obj->CategoryLabel = "Categories"; - $obj->ShowAllVideosOnCategory = false; - $obj->hideCategoryVideosCount = false; - $obj->hideEditAdvancedFromVideosManager = false; - - //ver 7.1 - $obj->paidOnlyUsersTellWhatVideoIs = false; - $obj->paidOnlyShowLabels = false; - $obj->paidOnlyLabel = "Premium"; - $obj->paidOnlyFreeLabel = "Free"; - $obj->removeSubscribeButton = false; - $obj->removeThumbsUpAndDown = false; - - $o = new stdClass(); - $o->type = "textarea"; - $o->value = ""; - $obj->videoNotFoundText = $o; - $obj->siteMapRowsLimit = 100; - $obj->siteMapUTF8Fix = false; - $obj->showPrivateVideosOnSitemap = false; - $obj->enableOldPassHashCheck = true; - $obj->disableHTMLDescription = false; - $obj->disableVideoSwap = false; - $obj->makeSwapVideosOnlyForAdmin = false; - $obj->disableCopyEmbed = false; - $obj->disableDownloadVideosList = false; - $obj->videosManegerRowCount = "[10, 25, 50, -1]"; //An Array of Integer which will be shown in the dropdown box to choose the row count. Default value is [10, 25, 50, -1]. -1 means all. When passing an Integer value the dropdown box will disapear. - $obj->videosListRowCount = "[10, 20, 30, 40, 50]"; //An Array of Integer which will be shown in the dropdown box to choose the row count. Default value is [10, 25, 50, -1]. -1 means all. When passing an Integer value the dropdown box will disapear. - $obj->videosManegerBulkActionButtons = true; - - $parse = parse_url($global['webSiteRootURL']); - $domain = str_replace(".", "", $parse['host']); - $obj->twitter_site = "@{$domain}"; - $obj->twitter_player = true; - $obj->twitter_summary_large_image = false; - $obj->footerStyle = "position: fixed;bottom: 0;width: 100%;"; - $obj->disableVideoTags = false; - $obj->doNotAllowEncoderOverwriteStatus = false; - $obj->doNotAllowUpdateVideoId = false; - $obj->makeVideosIDHarderToGuess = false; - self::addDataObjectHelper('makeVideosIDHarderToGuess', 'Make the videos ID harder to guess', 'This will change the videos_id on the URL to a crypted value. this crypt user your $global[salt] (configuration.php), so make sure you keep it save in case you need to restore your site, otherwise all the shared links will be lost'); - - - - $o = new stdClass(); - $o->type = DateTimeZone::listIdentifiers(DateTimeZone::ALL); - $o->value = 0; - $obj->timeZone = $o; - - - $obj->keywords = "AVideo, videos, live, movies"; - $obj->doNotSaveCacheOnFilesystem = false; - - - $o = new stdClass(); - $o->type = "textarea"; - $o->value = "Allow: /plugin/Live/?* -Allow: /plugin/PlayLists/*.css -Allow: /plugin/PlayLists/*.js -Allow: /plugin/TopMenu/*.css -Allow: /plugin/TopMenu/*.js -Allow: /plugin/SubtitleSwitcher/*.css -Allow: /plugin/SubtitleSwitcher/*.js -Allow: /plugin/Gallery/*.css -Allow: /plugin/Gallery/*.js -Allow: /plugin/YouPHPFlix2/*.png -Allow: /plugin/Live/*.css -Allow: /plugin/Live/*.js -Allow: /plugin/*.css -Allow: /plugin/*.js -Allow: .js -Allow: .css -Disallow: /user -Disallow: /plugin -Disallow: /mvideos -Disallow: /usersGroups -Disallow: /charts -Disallow: /upload -Disallow: /comments -Disallow: /subscribes -Disallow: /update -Disallow: /locale -Disallow: /objects/* -Allow: /plugin/Live/?* -Allow: /plugin/LiveLink/?* -Allow: /plugin/PlayLists/*.css -Allow: /plugin/PlayLists/*.js -Allow: /plugin/TopMenu/*.css -Allow: /plugin/TopMenu/*.js -Allow: /plugin/SubtitleSwitcher/*.css -Allow: /plugin/SubtitleSwitcher/*.js -Allow: /plugin/Gallery/*.css -Allow: /plugin/Gallery/*.js -Allow: /plugin/YouPHPFlix2/*.png -Allow: /plugin/Live/*.css -Allow: /plugin/Live/*.js -Allow: /plugin/*.css -Allow: /plugin/*.js -Allow: .js -Allow: .css"; - $obj->robotsTXT = $o; - self::addDataObjectHelper('robotsTXT', 'robots.txt file content', 'robots.txt is a plain text file that follows the Robots Exclusion Standard. A robots.txt file consists of one or more rules. Each rule blocks (or allows) access for a given crawler to a specified file path in that website.'); - - - return $obj; - } - - public function getHelp() { - if (User::isAdmin()) { - return "

CustomizeAdvanced (admin)

" . $this->getDescription() . "

"; - } - return ""; - } - - public function getModeYouTube($videos_id) { - global $global, $config; - $obj = $this->getDataObject(); - $video = Video::getVideo($videos_id, "viewable", true); - if (!empty($video['rrating']) && empty($_GET['rrating'])) { - $suffix = strtoupper(str_replace("-", "", $video['rrating'])); - eval("\$show = \$obj->askRRatingConfirmationBeforePlay_$suffix;"); - if (!empty($show)) { - include "{$global['systemRootPath']}plugin/CustomizeAdvanced/confirmRating.php"; - exit; - } - } - } - - public function getEmbed($videos_id) { - return $this->getModeYouTube($videos_id); - } - - public function getFooterCode() { - global $global; - - $obj = $this->getDataObject(); - $content = ''; - if ($obj->autoHideNavbar && !isEmbed()) { - $content .= ''; - $content .= ''; - } - if ($obj->autoHideNavbarInSeconds && !isEmbed()) { - $content .= ''; - } - return $content; - } - - public function getHTMLMenuRight() { - global $global; - $obj = $this->getDataObject(); - if ($obj->filterRRating) { - include $global['systemRootPath'] . 'plugin/CustomizeAdvanced/menuRight.php'; - } - } - - public function getHTMLMenuLeft() { - global $global; - $obj = $this->getDataObject(); - if ($obj->filterRRating) { - include $global['systemRootPath'] . 'plugin/CustomizeAdvanced/menuLeft.php'; - } - } - - public static function getVideoWhereClause() { - $sql = ""; - $obj = AVideoPlugin::getObjectData("CustomizeAdvanced"); - if ($obj->filterRRating && isset($_GET['rrating'])) { - if ($_GET['rrating'] === "0") { - $sql .= " AND v.rrating = ''"; - } else if (in_array($_GET['rrating'], Video::$rratingOptions)) { - $sql .= " AND v.rrating = '{$_GET['rrating']}'"; - } - } - return $sql; - } - - public function getVideosManagerListButton() { - $btn = ""; - if (User::isAdmin()) { - $btn = ''; - $btn .= ''; - } - return $btn; - } - - public function getHeadCode() { - global $global; - $obj = $this->getDataObject(); - - if($obj->makeVideosIDHarderToGuess){ - if(isVideo()){ - if(!empty($global['makeVideosIDHarderToGuessNotDecrypted'])){ - unset($global['makeVideosIDHarderToGuessNotDecrypted']); - forbiddenPage(__('Invalid ID')); - } - } - } - - $baseName = basename($_SERVER['REQUEST_URI']); - - $js = ""; - if(empty($obj->autoPlayAjax)){ - $js .= ""; - }else{ - $js .= ""; - } - if ($baseName === 'mvideos') { - $js .= ""; - $js .= ""; - } - return $js; - } - - public function onReceiveFile($videos_id) { - Video::updateFilesize($videos_id); - return true; - } - -} - -class SocialMedias{ - public $href; - public $class; - public $title; - public $iclass; - public $img; - public $onclick; - - function __construct($iclass, $img='') { - $this->iclass = $iclass; - $this->img = $img; - } - - - function getHref() { - return $this->href; - } - - function getClass() { - return $this->class; - } - - function getTitle() { - return $this->title; - } - - function getIclass() { - return $this->iclass; - } - - function getImg() { - return $this->img; - } - - function getOnclick() { - return $this->onclick; - } - - function setHref($href): void { - $this->href = $href; - } - - function setClass($class): void { - $this->class = $class; - } - - function setTitle($title): void { - $this->title = $title; - } - - function setIclass($iclass): void { - $this->iclass = $iclass; - } - - function setImg($img): void { - $this->img = $img; - } - - function setOnclick($onclick): void { - $this->onclick = $onclick; - } - - -} - -$global['social_medias'] = array( - 'Facebook'=>new SocialMedias('fab fa-facebook-square', ''), - 'Twitter'=>new SocialMedias('fab fa-twitter', ''), - 'Tumblr'=>new SocialMedias('fab fa-tumblr', ''), - 'Pinterest'=>new SocialMedias('fab fa-pinterest-p', ''), - 'Reddit'=>new SocialMedias('fab fa-reddit-alien', ''), - 'LinkedIn'=>new SocialMedias('fab fa-linkedin-in', ''), - 'Wordpress'=>new SocialMedias('fab fa-wordpress-simple', ''), - 'Pinboard'=>new SocialMedias('fas fa-thumbtack', ''), - 'Gab'=>new SocialMedias('', getURL('view/img/gab.png')), - 'CloutHub'=>new SocialMedias('', getURL('view/img/cloutHub.png')), -); \ No newline at end of file + Help"; + return $txt . $help; + } + + public function getName() { + return "CustomizeAdvanced"; + } + + public function getUUID() { + return "55a4fa56-8a30-48d4-a0fb-8aa6b3f69033"; + } + + public function getPluginVersion() { + return "1.0"; + } + + public function getEmptyDataObject() { + global $global; + $obj = new stdClass(); + $obj->logoMenuBarURL = ""; + $obj->encoderNetwork = "https://network.wwbn.net/"; + $obj->useEncoderNetworkRecomendation = false; + $obj->doNotShowEncoderNetwork = true; + $obj->doNotShowUploadButton = false; + $obj->uploadButtonDropdownIcon = "fas fa-video"; + $obj->uploadButtonDropdownText = ""; + $obj->encoderNetworkLabel = ""; + $obj->doNotShowUploadMP4Button = true; + $obj->disablePDFUpload = false; + $obj->disableImageUpload = false; + $obj->disableZipUpload = true; + $obj->disableMP4Upload = false; + $obj->disableMP3Upload = false; + $obj->uploadMP4ButtonLabel = ""; + $obj->doNotShowImportMP4Button = true; + $obj->importMP4ButtonLabel = ""; + $obj->doNotShowEncoderButton = false; + $obj->encoderButtonLabel = ""; + $obj->doNotShowEmbedButton = false; + $obj->embedBackgroundColor = "white"; + $obj->embedButtonLabel = ""; + $obj->embedCodeTemplate = '
'; + $obj->embedCodeTemplateObject = '
'; + $obj->htmlCodeTemplate = '{title}'; + $obj->BBCodeTemplate = '[url={permaLink}][img]{imgSRC}[/img]{title}[/url]'; + + $o = new stdClass(); + $o->type = array(-1 => __("Basic Controls"), 0 => __("No Controls"), 1 => __("All controls")); + $o->value = 1; + $obj->embedControls = $o; + $obj->embedAutoplay = false; + $obj->embedLoop = false; + $obj->embedStartMuted = false; + $obj->embedShowinfo = true; + + $obj->doNotShowEncoderHLS = false; + $obj->doNotShowEncoderResolutionLow = false; + $obj->doNotShowEncoderResolutionSD = false; + $obj->doNotShowEncoderResolutionHD = false; + $obj->openEncoderInIFrame = false; + $obj->showOnlyEncoderAutomaticResolutions = true; + $obj->doNotShowEncoderAutomaticHLS = false; + $obj->doNotShowEncoderAutomaticMP4 = false; + $obj->doNotShowEncoderAutomaticWebm = false; + $obj->doNotShowEncoderAutomaticAudio = false; + $obj->saveOriginalVideoResolution = false; + self::addDataObjectHelper('saveOriginalVideoResolution', 'Do not save original video', 'This option will make your encoder at the end trancode the video into the original format resolution'); + $obj->doNotShowExtractAudio = false; + $obj->doNotShowCreateVideoSpectrum = false; + $obj->doNotShowLeftMenuAudioAndVideoButtons = false; + $obj->doNotShowWebsiteOnContactForm = false; + $obj->doNotUseXsendFile = false; + $obj->makeVideosInactiveAfterEncode = false; + $obj->makeVideosUnlistedAfterEncode = false; + $obj->usePermalinks = false; + $obj->useVideoIDOnSEOLinks = true; + $obj->disableAnimatedGif = false; + $obj->removeBrowserChannelLinkFromMenu = false; + $obj->EnableMinifyJS = false; + $obj->disableShareAndPlaylist = false; + $obj->disableShareOnly = false; + $obj->disableEmailSharing = false; + $obj->splitBulkEmailSend = 50; + $obj->disableComments = false; + $obj->commentsMaxLength = 200; + $obj->commentsNoIndex = false; + $obj->disableYoutubePlayerIntegration = false; + $obj->utf8Encode = false; + $obj->utf8Decode = false; + $o = new stdClass(); + $o->type = "textarea"; + $o->value = ""; + $obj->menuBarHTMLCode = $o; + $o->type = "textarea"; + $o->value = ""; + $obj->underMenuBarHTMLCode = $o; + $o->type = "textarea"; + $o->value = ""; + $obj->footerHTMLCode = $o; + $obj->signInOnRight = true; + $obj->signInOnLeft = true; + $obj->forceCategory = false; + $obj->showCategoryTopImages = true; + $obj->autoPlayAjax = false; + + $plugins = Plugin::getAllEnabled(); + //import external plugins configuration options + foreach ($plugins as $value) { + $p = AVideoPlugin::loadPlugin($value['dirName']); + if (is_object($p)) { + $foreginObjects = $p->getCustomizeAdvancedOptions(); + if ($foreginObjects) { + foreach ($foreginObjects as $optionName => $defaultValue) + $obj->{$optionName} = $defaultValue; + } + } + } + + $obj->disableInstallPWAButton = false; + $obj->disablePlayLink = false; + $obj->disableHelpLeftMenu = false; + $obj->disableAboutLeftMenu = false; + $obj->disableContactLeftMenu = false; + $obj->disableAnimations = false; + $obj->disableNavbar = false; + $obj->disableNavBarInsideIframe = true; + $obj->autoHideNavbar = true; + $obj->autoHideNavbarInSeconds = 0; + $obj->videosCDN = ""; + $obj->useFFMPEGToGenerateThumbs = false; + $obj->thumbsWidthPortrait = 170; + $obj->thumbsHeightPortrait = 250; + $obj->thumbsWidthLandscape = 640; + $obj->thumbsHeightLandscape = 360; + $obj->usePreloadLowResolutionImages = false; + $obj->showImageDownloadOption = false; + $obj->doNotDisplayViews = false; + $obj->doNotDisplayLikes = false; + $obj->doNotDisplayCategoryLeftMenu = false; + $obj->doNotDisplayCategory = false; + $obj->doNotDisplayGroupsTags = false; + $obj->doNotDisplayPluginsTags = false; + $obj->showNotRatedLabel = false; + $obj->showShareMenuOpenByDefault = false; + + foreach ($global['social_medias'] as $key => $value) { + eval("\$obj->showShareButton_{$key} = true;"); + } + + $obj->askRRatingConfirmationBeforePlay_G = false; + $obj->askRRatingConfirmationBeforePlay_PG = false; + $obj->askRRatingConfirmationBeforePlay_PG13 = false; + $obj->askRRatingConfirmationBeforePlay_R = false; + $obj->askRRatingConfirmationBeforePlay_NC17 = true; + $obj->askRRatingConfirmationBeforePlay_MA = true; + $obj->filterRRating = false; + + $obj->doNotShowLeftHomeButton = false; + $obj->doNotShowLeftTrendingButton = false; + + $obj->CategoryLabel = "Categories"; + $obj->ShowAllVideosOnCategory = false; + $obj->hideCategoryVideosCount = false; + $obj->hideEditAdvancedFromVideosManager = false; + + //ver 7.1 + $obj->paidOnlyUsersTellWhatVideoIs = false; + $obj->paidOnlyShowLabels = false; + $obj->paidOnlyLabel = "Premium"; + $obj->paidOnlyFreeLabel = "Free"; + $obj->removeSubscribeButton = false; + $obj->removeThumbsUpAndDown = false; + + $o = new stdClass(); + $o->type = "textarea"; + $o->value = ""; + $obj->videoNotFoundText = $o; + $obj->siteMapRowsLimit = 100; + $obj->siteMapUTF8Fix = false; + $obj->showPrivateVideosOnSitemap = false; + $obj->enableOldPassHashCheck = true; + $obj->disableHTMLDescription = false; + $obj->disableVideoSwap = false; + $obj->makeSwapVideosOnlyForAdmin = false; + $obj->disableCopyEmbed = false; + $obj->disableDownloadVideosList = false; + $obj->videosManegerRowCount = "[10, 25, 50, -1]"; //An Array of Integer which will be shown in the dropdown box to choose the row count. Default value is [10, 25, 50, -1]. -1 means all. When passing an Integer value the dropdown box will disapear. + $obj->videosListRowCount = "[10, 20, 30, 40, 50]"; //An Array of Integer which will be shown in the dropdown box to choose the row count. Default value is [10, 25, 50, -1]. -1 means all. When passing an Integer value the dropdown box will disapear. + $obj->videosManegerBulkActionButtons = true; + + $parse = parse_url($global['webSiteRootURL']); + $domain = str_replace(".", "", $parse['host']); + $obj->twitter_site = "@{$domain}"; + $obj->twitter_player = true; + $obj->twitter_summary_large_image = false; + $obj->footerStyle = "position: fixed;bottom: 0;width: 100%;"; + $obj->disableVideoTags = false; + $obj->doNotAllowEncoderOverwriteStatus = false; + $obj->doNotAllowUpdateVideoId = false; + $obj->makeVideosIDHarderToGuess = false; + self::addDataObjectHelper('makeVideosIDHarderToGuess', 'Make the videos ID harder to guess', 'This will change the videos_id on the URL to a crypted value. this crypt user your $global[salt] (configuration.php), so make sure you keep it save in case you need to restore your site, otherwise all the shared links will be lost'); + + $o = new stdClass(); + $o->type = DateTimeZone::listIdentifiers(DateTimeZone::ALL); + $o->value = 0; + $obj->timeZone = $o; + + $obj->keywords = "AVideo, videos, live, movies"; + $obj->doNotSaveCacheOnFilesystem = false; + + $o = new stdClass(); + $o->type = "textarea"; + $o->value = "Allow: /plugin/Live/?* +Allow: /plugin/PlayLists/*.css +Allow: /plugin/PlayLists/*.js +Allow: /plugin/TopMenu/*.css +Allow: /plugin/TopMenu/*.js +Allow: /plugin/SubtitleSwitcher/*.css +Allow: /plugin/SubtitleSwitcher/*.js +Allow: /plugin/Gallery/*.css +Allow: /plugin/Gallery/*.js +Allow: /plugin/YouPHPFlix2/*.png +Allow: /plugin/Live/*.css +Allow: /plugin/Live/*.js +Allow: /plugin/*.css +Allow: /plugin/*.js +Allow: .js +Allow: .css +Disallow: /user +Disallow: /plugin +Disallow: /mvideos +Disallow: /usersGroups +Disallow: /charts +Disallow: /upload +Disallow: /comments +Disallow: /subscribes +Disallow: /update +Disallow: /locale +Disallow: /objects/* +Allow: /plugin/Live/?* +Allow: /plugin/LiveLink/?* +Allow: /plugin/PlayLists/*.css +Allow: /plugin/PlayLists/*.js +Allow: /plugin/TopMenu/*.css +Allow: /plugin/TopMenu/*.js +Allow: /plugin/SubtitleSwitcher/*.css +Allow: /plugin/SubtitleSwitcher/*.js +Allow: /plugin/Gallery/*.css +Allow: /plugin/Gallery/*.js +Allow: /plugin/YouPHPFlix2/*.png +Allow: /plugin/Live/*.css +Allow: /plugin/Live/*.js +Allow: /plugin/*.css +Allow: /plugin/*.js +Allow: .js +Allow: .css"; + $obj->robotsTXT = $o; + self::addDataObjectHelper('robotsTXT', 'robots.txt file content', 'robots.txt is a plain text file that follows the Robots Exclusion Standard. A robots.txt file consists of one or more rules. Each rule blocks (or allows) access for a given crawler to a specified file path in that website.'); + + return $obj; + } + + public function getHelp() { + if (User::isAdmin()) { + return "

CustomizeAdvanced (admin)

" . $this->getDescription() . "

"; + } + return ""; + } + + public function getModeYouTube($videos_id) { + global $global, $config; + $obj = $this->getDataObject(); + $video = Video::getVideo($videos_id, "viewable", true); + if (!empty($video['rrating']) && empty($_GET['rrating'])) { + $suffix = strtoupper(str_replace("-", "", $video['rrating'])); + eval("\$show = \$obj->askRRatingConfirmationBeforePlay_$suffix;"); + if (!empty($show)) { + include "{$global['systemRootPath']}plugin/CustomizeAdvanced/confirmRating.php"; + exit; + } + } + } + + public function getEmbed($videos_id) { + return $this->getModeYouTube($videos_id); + } + + public function getFooterCode() { + global $global; + + $obj = $this->getDataObject(); + $content = ''; + if ($obj->autoHideNavbar && !isEmbed()) { + $content .= ''; + $content .= ''; + } + if ($obj->autoHideNavbarInSeconds && !isEmbed()) { + $content .= ''; + } + return $content; + } + + public function getHTMLMenuRight() { + global $global, $config,$advancedCustom; + $obj = $this->getDataObject(); + if (!empty($obj->menuBarHTMLCode->value)) { + echo $obj->menuBarHTMLCode->value; + } + if ($obj->filterRRating) { + include $global['systemRootPath'] . 'plugin/CustomizeAdvanced/menuRight.php'; + } + if (User::canUpload() && empty($obj->doNotShowUploadButton)) { + include $global['systemRootPath'] . 'view/include/navbarUpload.php'; + } else { + include $global['systemRootPath'] . 'view/include/navbarNotUpload.php'; + } + } + + public function getHTMLMenuLeft() { + global $global; + $obj = $this->getDataObject(); + if ($obj->filterRRating) { + include $global['systemRootPath'] . 'plugin/CustomizeAdvanced/menuLeft.php'; + } + } + + public static function getVideoWhereClause() { + $sql = ""; + $obj = AVideoPlugin::getObjectData("CustomizeAdvanced"); + if ($obj->filterRRating && isset($_GET['rrating'])) { + if ($_GET['rrating'] === "0") { + $sql .= " AND v.rrating = ''"; + } else if (in_array($_GET['rrating'], Video::$rratingOptions)) { + $sql .= " AND v.rrating = '{$_GET['rrating']}'"; + } + } + return $sql; + } + + public function getVideosManagerListButton() { + $btn = ""; + if (User::isAdmin()) { + $btn = ''; + $btn .= ''; + } + return $btn; + } + + public function getHeadCode() { + global $global; + $obj = $this->getDataObject(); + + if ($obj->makeVideosIDHarderToGuess) { + if (isVideo()) { + if (!empty($global['makeVideosIDHarderToGuessNotDecrypted'])) { + unset($global['makeVideosIDHarderToGuessNotDecrypted']); + forbiddenPage(__('Invalid ID')); + } + } + } + + $baseName = basename($_SERVER['REQUEST_URI']); + + $js = ""; + if (empty($obj->autoPlayAjax)) { + $js .= ""; + } else { + $js .= ""; + } + if ($baseName === 'mvideos') { + $js .= ""; + $js .= ""; + } + return $js; + } + + public function onReceiveFile($videos_id) { + Video::updateFilesize($videos_id); + return true; + } + +} + +class SocialMedias { + + public $href; + public $class; + public $title; + public $iclass; + public $img; + public $onclick; + + function __construct($iclass, $img = '') { + $this->iclass = $iclass; + $this->img = $img; + } + + function getHref() { + return $this->href; + } + + function getClass() { + return $this->class; + } + + function getTitle() { + return $this->title; + } + + function getIclass() { + return $this->iclass; + } + + function getImg() { + return $this->img; + } + + function getOnclick() { + return $this->onclick; + } + + function setHref($href): void { + $this->href = $href; + } + + function setClass($class): void { + $this->class = $class; + } + + function setTitle($title): void { + $this->title = $title; + } + + function setIclass($iclass): void { + $this->iclass = $iclass; + } + + function setImg($img): void { + $this->img = $img; + } + + function setOnclick($onclick): void { + $this->onclick = $onclick; + } + +} + +$global['social_medias'] = array( + 'Facebook' => new SocialMedias('fab fa-facebook-square', ''), + 'Twitter' => new SocialMedias('fab fa-twitter', ''), + 'Tumblr' => new SocialMedias('fab fa-tumblr', ''), + 'Pinterest' => new SocialMedias('fab fa-pinterest-p', ''), + 'Reddit' => new SocialMedias('fab fa-reddit-alien', ''), + 'LinkedIn' => new SocialMedias('fab fa-linkedin-in', ''), + 'Wordpress' => new SocialMedias('fab fa-wordpress-simple', ''), + 'Pinboard' => new SocialMedias('fas fa-thumbtack', ''), + 'Gab' => new SocialMedias('', getURL('view/img/gab.png')), + 'CloutHub' => new SocialMedias('', getURL('view/img/cloutHub.png')), +); diff --git a/plugin/Gallery/style.css b/plugin/Gallery/style.css index cbb713179f..daf0ba9fb2 100644 --- a/plugin/Gallery/style.css +++ b/plugin/Gallery/style.css @@ -160,9 +160,14 @@ a.h6{ top: 5px; z-index: 1025; display: none; + } .galleryVideo .galleryVideoButtons button{ opacity: 0.5; + display: inline-grid; + padding: 2px; + justify-content: center; + width: 24px; } .galleryVideo:hover .galleryVideoButtons{ display: block !important; diff --git a/plugin/Gallery/view/BigVideo.php b/plugin/Gallery/view/BigVideo.php index a87cb9ac3e..02cc470167 100644 --- a/plugin/Gallery/view/BigVideo.php +++ b/plugin/Gallery/view/BigVideo.php @@ -1,306 +1,306 @@ -BigVideo && empty($_GET['showOnly'])) { - - if (!empty($obj->useSuggestedVideosAsCarouselInBigVideo)) { - //getAllVideos($status = "viewable", $showOnlyLoggedUserVideos = false, $ignoreGroup = false, $videosArrayId = array(), $getStatistcs = false, $showUnlisted = false, $activeUsersOnly = true) - //$videoRows = Video::getAllVideosLight("viewable", !$obj->hidePrivateVideos, false, true); - $_REQUEST['rowCount'] = 20; - $_REQUEST['current'] = 1; - $videoRows = Video::getAllVideos("viewable", false, !$obj->hidePrivateVideos, array(), false, false, true, true); - } - if (empty($videoRows)) { - $videoRows = array($video); - } - $class = ''; - $classInner = ''; - if (count($videoRows) > 1) { - $class = 'carousel slide'; - $classInner = 'carousel-inner'; - } - ?> - - -
-
- 1) { - ?> - - - - -
- getName(); - $videoRow['clean_category'] = $category->getClean_name(); - $videoRow['iconClass'] = $category->getIconClass(); - $videoRow['videoCreation'] = $videoRow['created']; - $name = User::getNameIdentificationById($videoRow['users_id']); - if (empty($get)) { - $get = array(); - } - $bigVideoAd = getAdsLeaderBoardBigVideo(); - $colClass1 = "col-sm-5"; - $colClass2 = "col-sm-7"; - $colClass3 = ""; - if (!empty($bigVideoAd)) { - $colClass1 = "col-sm-4"; - $colClass2 = "col-sm-8"; - $colClass3 = "col-sm-6"; - } - $isserie = Video::isSerie($videoRow['id']); - - $isserieClass = ""; - if ($isserie) { - $isserieClass = "isserie"; - } - ?> -
"> -
-
- -
-
- - - -
-
-
- -
-
- -
-
-
- showCategoryTag)) { - ?> - " data-toggle="tooltip" title=""> - - - - - - - showTags)) { - $videoRow['tags'] = Video::getTags($videoRow['id']); - if (!empty($videoRow['tags'])) { - foreach ($videoRow['tags'] as $value2) { - if (!empty($value2->label) && $value2->label === __("Group")) { - ?>text; ?> -
- - doNotDisplayViews)) { - if (AVideoPlugin::isEnabledByName('LiveUsers')) { - echo getLiveUsersLabelVideo($videoRow['id'], $videoRow['views_count'], "", ""); - } else { - ?> -
- - - - -
- -
- - -
- - -
- -
- - -
- - - -
- - - -
- - -
- -
-
-
- -
-
-
-
-
- -
-
-
- - - BigVideo && empty($_GET['showOnly'])) { + + if (!empty($obj->useSuggestedVideosAsCarouselInBigVideo)) { + //getAllVideos($status = "viewable", $showOnlyLoggedUserVideos = false, $ignoreGroup = false, $videosArrayId = array(), $getStatistcs = false, $showUnlisted = false, $activeUsersOnly = true) + //$videoRows = Video::getAllVideosLight("viewable", !$obj->hidePrivateVideos, false, true); + $_REQUEST['rowCount'] = 20; + $_REQUEST['current'] = 1; + $videoRows = Video::getAllVideos("viewable", false, !$obj->hidePrivateVideos, array(), false, false, true, true); + } + if (empty($videoRows)) { + $videoRows = array($video); + } + $class = ''; + $classInner = ''; + if (count($videoRows) > 1) { + $class = 'carousel slide'; + $classInner = 'carousel-inner'; + } + ?> + + +
+
+ 1) { + ?> + + + + +
+ getName(); + $videoRow['clean_category'] = $category->getClean_name(); + $videoRow['iconClass'] = $category->getIconClass(); + $videoRow['videoCreation'] = $videoRow['created']; + $name = User::getNameIdentificationById($videoRow['users_id']); + if (empty($get)) { + $get = array(); + } + $bigVideoAd = getAdsLeaderBoardBigVideo(); + $colClass1 = "col-sm-5"; + $colClass2 = "col-sm-7"; + $colClass3 = ""; + if (!empty($bigVideoAd)) { + $colClass1 = "col-sm-4"; + $colClass2 = "col-sm-8"; + $colClass3 = "col-sm-6"; + } + $isserie = Video::isSerie($videoRow['id']); + + $isserieClass = ""; + if ($isserie) { + $isserieClass = "isserie"; + } + ?> +
"> +
+
+ +
+
+ + + +
+
+
+ +
+
+ +
+
+
+ showCategoryTag)) { + ?> + " data-toggle="tooltip" title=""> + + + + + + + showTags)) { + $videoRow['tags'] = Video::getTags($videoRow['id']); + if (!empty($videoRow['tags'])) { + foreach ($videoRow['tags'] as $value2) { + if (!empty($value2->label) && $value2->label === __("Group")) { + ?>text; ?> +
+ + doNotDisplayViews)) { + if (AVideoPlugin::isEnabledByName('LiveUsers')) { + echo getLiveUsersLabelVideo($videoRow['id'], $videoRow['views_count'], "", ""); + } else { + ?> +
+ + + + +
+ +
+ + +
+ + +
+ +
+ + +
+ + + +
+ + + +
+ + +
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ + + clients = new \SplObjectStorage; $this->clients = []; $this->clientsWatchinLive = []; $this->clientsWatchVideosId = []; + $this->clientsUsersId = []; + $this->clientsChatRoom = []; + //$this->loop->ad _log_message("Construct"); + } public function onOpen(ConnectionInterface $conn) { @@ -178,7 +185,7 @@ class Message implements MessageComponentInterface { } if (!empty($client['users_id'])) { unset($this->clientsUsersId[$client['users_id']]['resourceId'][$conn->resourceId]); - if(empty($this->clientsUsersId[$client['users_id']]['resourceId'])){ + if (empty($this->clientsUsersId[$client['users_id']]['resourceId'])) { unset($this->clientsUsersId[$client['users_id']]); } } @@ -248,7 +255,7 @@ class Message implements MessageComponentInterface { $this->msgToSelfURI($json, $msgObj->send_to_uri_pattern); } else if (!empty($json['resourceId'])) { $this->msgToResourceId($json, $json['resourceId']); - }else if (!empty($json['to_users_id'])) { + } else if (!empty($json['to_users_id'])) { $this->msgToUsers_id($json, $json['to_users_id']); } else { $this->msgToAll($from, $json); @@ -361,12 +368,12 @@ class Message implements MessageComponentInterface { } try { $count = 0; - if(!is_array($users_id)){ + if (!is_array($users_id)) { $users_id = array($users_id); } foreach ($users_id as $user_id) { $user_id = intval($user_id); - if(empty($user_id)){ + if (empty($user_id)) { continue; } if ($this->isUserLive($user_id)) { @@ -376,13 +383,12 @@ class Message implements MessageComponentInterface { } } } - } catch (Exception $exc) { echo $exc->getTraceAsString(); var_dump($users_id, $this->clientsUsersId); } - _log_message("msgToUsers_id: sent to ($count) clients users_id=". json_encode($users_id)); + _log_message("msgToUsers_id: sent to ($count) clients users_id=" . json_encode($users_id)); } public function msgToSelfURI($msg, $pattern, $type = "") { @@ -572,12 +578,10 @@ class Message implements MessageComponentInterface { public function getTags() { return array('free', 'live'); } - + public function isUserLive($users_id) { return !empty($this->clientsUsersId[$users_id]) && !empty($this->clientsUsersId[$users_id]['resourceId']); } - - } diff --git a/plugin/YPTSocket/Message2.php b/plugin/YPTSocket/Message2.php new file mode 100644 index 0000000000..d5422fea4f --- /dev/null +++ b/plugin/YPTSocket/Message2.php @@ -0,0 +1,592 @@ +clients = new \SplObjectStorage; + $this->clients = []; + $this->clientsWatchinLive = []; + $this->clientsWatchVideosId = []; + $this->clientsUsersId = []; + _log_message("Construct"); + } + + public function onOpen(ConnectionInterface $conn) { + global $onMessageSentTo, $SocketGetTotals; + $SocketGetTotals = null; + $onMessageSentTo = array(); + $query = $conn->httpRequest->getUri()->getQuery(); + parse_str($query, $wsocketGetVars); + foreach ($wsocketGetVars as $key => $value) { + $wsocketGetVars[$key] = urldecode($value); + } + if (empty($wsocketGetVars['webSocketToken'])) { + _log_message("Empty websocket token "); + return false; + } + $json = getDecryptedInfo($wsocketGetVars['webSocketToken']); + if (empty($json)) { + _log_message("Invalid websocket token "); + return false; + } + // Store the new connection to send messages to later + //$this->clients->attach($conn); + $client = array(); + $client['conn'] = $conn; + $client['resourceId'] = $conn->resourceId; + $client['users_id'] = $json->from_users_id; + $client['isAdmin'] = $json->isAdmin; + $client['user_name'] = $json->user_name; + $client['browser'] = $json->browser; + $client['yptDeviceId'] = $json->yptDeviceId; + $client['client'] = deviceIdToObject($json->yptDeviceId); + if (!empty($wsocketGetVars['webSocketSelfURI'])) { + $client['selfURI'] = $wsocketGetVars['webSocketSelfURI']; + } else { + $client['selfURI'] = $json->selfURI; + } + $client['isCommandLine'] = @$wsocketGetVars['isCommandLine']; + $client['page_title'] = @utf8_encode(@$wsocketGetVars['page_title']); + $client['videos_id'] = $json->videos_id; + $client['live_key'] = object_to_array(@$json->live_key); + $client['ip'] = $json->ip; + $client['location'] = $json->location; + + if (!empty($client['live_key']['key'])) { + $this->clientsWatchinLive[$client['live_key']['key']][$client['resourceId']] = $client['users_id']; + } else + if (!empty($client['live_key']['liveLink'])) { + $this->clientsWatchinLive[$client['live_key']['liveLink']][$client['resourceId']] = $client['users_id']; + } else + if (!empty($client['videos_id'])) { + $this->clientsWatchVideosId[$client['videos_id']][$client['resourceId']] = $client['users_id']; + } + if (!empty($client['users_id'])) { + + if (!isset($this->clientsUsersId[$client['users_id']])) { + $this->clientsUsersId[$client['users_id']] = array( + "users_id" => $client['users_id'], + "isAdmin" => $client['isAdmin'], + "user_name" => $client['user_name'] + ); + $this->clientsUsersId[$client['users_id']]['resourceId'] = array(); + } + + if (!in_array($client['resourceId'], $this->clientsUsersId[$client['users_id']]['resourceId'])) { + $this->clientsUsersId[$client['users_id']]['resourceId'][$client['resourceId']] = $client['resourceId']; + } + } + _log_message("New connection ($conn->resourceId) {$json->yptDeviceId} {$client['selfURI']} {$client['browser']}"); + + $this->clients[$conn->resourceId] = $client; + /* + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $limit = 250; + } else { + $limit = 900; + } + //$limit = 99999; + if(count($this->clients)>$limit){ + $resourceId = array_key_first($this->clients); + _log_message("\e[1;32;40m*** Closing connection {$resourceId} ***\e[0m"); + //$this->clients[$resourceId]->close(); + //$this->clients->detach($this->clients[$resourceId]['conn']); + $this->clients[$resourceId]['conn']->close(); + unset($resourceId); + } + */ + if ($client['browser'] == \SocketMessageType::TESTING) { + _log_message("Test detected and received from ($conn->resourceId) " . PHP_EOL . "\e[1;32;40m*** SUCCESS TEST CONNECION {$json->test_msg} ***\e[0m"); + $this->msgToResourceId($json, $conn->resourceId, \SocketMessageType::TESTING); + } else if ($this->shouldPropagateInfo($client)) { + //_log_message("shouldPropagateInfo {$json->yptDeviceId}"); + $this->msgToAll($conn, array('users_id' => $client['users_id'], 'user_name' => $client['user_name'], 'yptDeviceId' => $client['yptDeviceId']), \SocketMessageType::NEW_CONNECTION, true); + } else { + //_log_message("NOT shouldPropagateInfo "); + } + if (!empty($json->videos_id)) { + //_log_message("msgToAllSameVideo "); + $this->msgToAllSameVideo($json->videos_id, ""); + } else { + //_log_message("NOT msgToAllSameVideo "); + } + if (!empty($json->live_key)) { + //_log_message("msgToAllSameLive "); + if (\AVideoPlugin::isEnabledByName('LiveUsers')) { + $live_key = object_to_array($json->live_key); + if (!empty($live_key['key'])) { + \_mysql_connect(); + $lt = \LiveTransmitionHistory::getLatest($live_key['key']); + if (!empty($lt['id'])) { + $l = new \LiveTransmitionHistory($lt['id']); + $total_viewers = \LiveUsers::getTotalUsers($lt['key'], $lt['live_servers_id']); + $max_viewers_sametime = $l->getMax_viewers_sametime(); + if (!empty($live_key['key'])) { + $viewers_now = count($this->clientsWatchinLive[$live_key['key']]); + } else if (!empty($live_key['liveLink'])) { + $viewers_now = count($this->clientsWatchinLive[$live_key['liveLink']]); + } + if ($viewers_now > $max_viewers_sametime) { + $l->setMax_viewers_sametime($viewers_now); + } + $l->setTotal_viewers($total_viewers); + _log_message("onOpen Connection viewers_now = {$viewers_now} => total_viewers = {$total_viewers}"); + $l->save(); + } + \_mysql_close(); + } + } + $this->msgToAllSameLive($json->live_key, ""); + } else { + //_log_message("NOT msgToAllSameLive "); + } + } + + public function onClose(ConnectionInterface $conn) { + global $onMessageSentTo, $SocketGetTotals; + $SocketGetTotals = null; + $onMessageSentTo = array(); + + unset($getStatsLive); + unset($_getStats); + // The connection is closed, remove it, as we can no longer send it messages + //$this->clients->detach($conn); + if (empty($this->clients[$conn->resourceId])) { + _log_message("onClose Connection {$conn->resourceId} not found"); + return false; + } + $client = $this->clients[$conn->resourceId]; + + if (!empty($client['live_key'])) { + if (!empty($client['live_key']['key'])) { + unset($this->clientsWatchinLive[$client['live_key']['key']][$conn->resourceId]); + } + if (!empty($client['live_key']['liveLink'])) { + unset($this->clientsWatchinLive[$client['live_key']['liveLink']][$conn->resourceId]); + } + } + if (!empty($client['users_id'])) { + unset($this->clientsUsersId[$client['users_id']]['resourceId'][$conn->resourceId]); + if(empty($this->clientsUsersId[$client['users_id']]['resourceId'])){ + unset($this->clientsUsersId[$client['users_id']]); + } + } + + unset($this->clients[$conn->resourceId]); + $users_id = $client['users_id']; + $videos_id = $client['videos_id']; + $live_key = $client['live_key']; + if ($this->shouldPropagateInfo($client)) { + $this->msgToAll($conn, array('users_id' => $client['users_id']), \SocketMessageType::NEW_DISCONNECTION); + //\AVideoPlugin::onUserSocketDisconnect($users_id, $this->clients[$conn->resourceId]); + if (!empty($videos_id)) { + $this->msgToAllSameVideo($videos_id, ""); + } + if (!empty($live_key)) { + $this->msgToAllSameLive($live_key, ""); + } + } + _log_message("Connection {$conn->resourceId} has disconnected"); + } + + public function onMessage(ConnectionInterface $from, $msg) { + global $onMessageSentTo, $SocketGetTotals; + $SocketGetTotals = null; + $onMessageSentTo = array(); + //_log_message("onMessage: {$msg}"); + $json = _json_decode($msg); + if (empty($json)) { + _log_message("onMessage ERROR: JSON is empty "); + return false; + } + if (empty($json->webSocketToken)) { + _log_message("onMessage ERROR: webSocketToken is empty "); + return false; + } + + if (!$msgObj = getDecryptedInfo($json->webSocketToken)) { + _log_message("onMessage ERROR: could not decrypt webSocketToken"); + return false; + } + + switch ($json->msg) { + case "webSocketToken": + if (empty($this->clients[$from->resourceId]['users_id'])) { + _log_message("onMessage:webSocketToken"); + $this->clients[$from->resourceId]['users_id'] = $msgObj->from_users_id; + $this->clients[$from->resourceId]['yptDeviceId'] = $msgObj->yptDeviceId; + } + break; + case "getClientsList": + if (empty($this->clientsUsersId)) { + return false; + } + //var_dump($this->clientsUsersId); + //var_dump($msgObj->from_users_id); + //var_dump($json); + //var_dump($msgObj); + $this->msgToResourceId(array('json' => $this->clientsUsersId, 'callback' => 'loadCallerPanel'), $from->resourceId); + break; + case \SocketMessageType::TESTING: + $this->msgToResourceId($json, $from->resourceId, \SocketMessageType::TESTING); + break; + default: + $this->msgToArray($json); + //_log_message("onMessage:msgObj: " . json_encode($json)); + if (!empty($msgObj->send_to_uri_pattern)) { + $this->msgToSelfURI($json, $msgObj->send_to_uri_pattern); + } else if (!empty($json['resourceId'])) { + $this->msgToResourceId($json, $json['resourceId']); + }else if (!empty($json['to_users_id'])) { + $this->msgToUsers_id($json, $json['to_users_id']); + } else { + $this->msgToAll($from, $json); + } + break; + } + } + + private function shouldPropagateInfo($client) { + if (preg_match('/^unknowDevice.*/', $client['yptDeviceId'])) { + return false; + } + if (!empty($client['isCommandLine'])) { + return false; + } + return true; + } + + public function msgToResourceId($msg, $resourceId, $type = "") { + global $onMessageSentTo, $SocketDataObj; + if (in_array($resourceId, $onMessageSentTo)) { + return false; + } + if (empty($this->clients[$resourceId]) || empty($this->clients[$resourceId]['conn'])) { + _log_message("msgToResourceId: we wil NOT send the message to resourceId=({$resourceId}) {$type} because it does not exists anymore"); + return false; + } + + // do not sent duplicated messages + $onMessageSentTo[] = $resourceId; + + if (!$this->shouldPropagateInfo($this->clients[$resourceId])) { + _log_message("msgToResourceId: we wil NOT send the message to resourceId=({$resourceId}) {$type}"); + } + + if (!is_array($msg)) { + $this->msgToArray($msg); + } + if (!empty($msg['webSocketToken'])) { + unset($msg['webSocketToken']); + } + if (empty($type)) { + $type = \SocketMessageType::DEFAULT_MESSAGE; + } + + $videos_id = $this->clients[$resourceId]['videos_id']; + $users_id = $this->clients[$resourceId]['users_id']; + $live_key = $this->clients[$resourceId]['live_key']; + + $obj = array(); + $obj['ResourceId'] = $resourceId; + $obj['type'] = $type; + + if (isset($msg['callback'])) { + $obj['callback'] = $msg['callback']; + unset($msg['callback']); + } else { + $obj['callback'] = ""; + } + + if (!empty($msg['json'])) { + $obj['msg'] = $msg['json']; + } else if (!empty($msg['msg'])) { + $obj['msg'] = $msg['msg']; + } else { + $obj['msg'] = $msg; + } + + $obj['uniqid'] = uniqid(); + $obj['users_id'] = $users_id; + $obj['videos_id'] = $videos_id; + $obj['live_key'] = $live_key; + $obj['webSocketServerVersion'] = $SocketDataObj->serverVersion; + $obj['isAdmin'] = $this->clients[$resourceId]['isAdmin']; + + $return = $this->getTotals($this->clients[$resourceId]); + + $totals = array( + 'webSocketServerVersion' => $SocketDataObj->serverVersion, + 'socket_users_id' => $users_id, + 'socket_resourceId' => $resourceId, + 'total_devices_online' => count($return['users_id']), + 'total_users_online' => count($return['devices']) + ); + + $obj['autoUpdateOnHTML'] = array_merge($totals, $return['class_to_update']); + + $obj['users_uri'] = $return['users_uri']; + $obj['resourceId'] = $resourceId; + $obj['users_id_online'] = $this->clientsUsersId; + + $msgToSend = json_encode($obj); + _log_message("msgToResourceId: resourceId=({$resourceId}) {$type}"); + $this->clients[$resourceId]['conn']->send($msgToSend); + } + + public function onError(ConnectionInterface $conn, \Exception $e) { + if (!preg_match('/protocol is shutdown/i', $e->getMessage())) { // this may be the iframe that reloads the page + $debug = $this->clients[$conn->resourceId]; + unset($debug['conn']); + var_dump($debug); + _log_message("ERROR: ($conn->resourceId) {$e->getMessage()} ", \AVideoLog::$ERROR); + } + $conn->close(); + } + + public function msgToUsers_id($msg, $users_id, $type = "") { + if (empty($users_id) || empty($this->clientsUsersId)) { + return false; + } + try { + $count = 0; + if(!is_array($users_id)){ + $users_id = array($users_id); + } + foreach ($users_id as $user_id) { + $user_id = intval($user_id); + if(empty($user_id)){ + continue; + } + if ($this->isUserLive($user_id)) { + foreach ($this->clientsUsersId[$user_id]['resourceId'] as $resourceId) { + $count++; + $this->msgToResourceId($msg, $resourceId, $type); + } + } + } + + } catch (Exception $exc) { + echo $exc->getTraceAsString(); + var_dump($users_id, $this->clientsUsersId); + } + + _log_message("msgToUsers_id: sent to ($count) clients users_id=". json_encode($users_id)); + } + + public function msgToSelfURI($msg, $pattern, $type = "") { + if (empty($pattern)) { + return false; + } + $count = 0; + foreach ($this->clients as $resourceId => $value) { + if (empty($value['selfURI'])) { + continue; + } + if (preg_match($pattern, $value['selfURI'])) { + $count++; + $this->msgToResourceId($msg, $resourceId, $type); + } + } + _log_message("msgToSelfURI: sent to ($count) clients pattern={$pattern} {$type}"); + } + + public function getTotals($_client) { + + $isAdmin = $_client['isAdmin']; + $selfURI = $_client['selfURI']; + $videos_id = $_client['videos_id']; + $users_id = $_client['users_id']; + $live_key = object_to_array($_client['live_key']); + global $SocketDataObj, $SocketGetTotals; + + if (!$isAdmin && isset($SocketGetTotals)) { + return $SocketGetTotals; + } + + $return = array( + 'users_id' => array(), + 'devices' => array(), + 'class_to_update' => array(), + 'users_uri' => array() + ); + + $users_id_array = $devices = $list = array(); + + foreach ($this->clients as $key => $client) { + if (empty($client['yptDeviceId'])) { + continue; + _log_message("getTotals: yptDeviceId is empty "); + } + unset($client['conn']); + + if ($isAdmin) { + $index = md5($client['selfURI']); + if (!isset($return['users_uri'][$index])) { + $return['users_uri'][$index] = array(); + } + if (!isset($return['users_uri'][$index][$client['yptDeviceId']])) { + $return['users_uri'][$index][$client['yptDeviceId']] = array(); + } + if (empty($client['users_id'])) { + $return['users_uri'][$index][$client['yptDeviceId']][uniqid()] = $client; + } else + if (!isset($return['users_uri'][$index][$client['yptDeviceId']][$client['users_id']])) { + $return['users_uri'][$index][$client['yptDeviceId']][$client['users_id']] = $client; + } + } + + //total_devices_online + if (!in_array($client['yptDeviceId'], $return['devices'])) { + $return['devices'][] = $client['yptDeviceId']; + } + //total_users_online + if (!empty($client['users_id']) && !in_array($client['users_id'], $return['users_id'])) { + if ($this->shouldPropagateInfo($client)) { + $return['users_id'][] = $client['users_id']; + } + } + + $keyName = ""; + if (!empty($SocketDataObj->showTotalOnlineUsersPerVideo) && !empty($client['videos_id'])) { + $keyName = getSocketVideoClassName($client['videos_id']); + } else if (!empty($SocketDataObj->showTotalOnlineUsersPerLive) && !empty($client['live_key']['key'])) { + $keyName = getSocketLiveClassName($client['live_key']['key'], $client['live_key']['live_servers_id']); + } else if (!empty($SocketDataObj->showTotalOnlineUsersPerLiveLink) && !empty($client['live_key']['liveLink'])) { + $keyName = getSocketLiveLinksClassName($client['live_key']['liveLink']); + } + + if (!empty($keyName)) { + if (!isset($return['class_to_update'][$keyName])) { + $return['class_to_update'][$keyName] = 1; + } else { + $return['class_to_update'][$keyName]++; + } + } + } + if (!$isAdmin) { + $SocketGetTotals = $return; + } + return $return; + } + + public function msgToDevice_id($msg, $yptDeviceId) { + if (empty($yptDeviceId)) { + return false; + } + $count = 0; + foreach ($this->clients as $resourceId => $value) { + if ($value['yptDeviceId'] == $yptDeviceId) { + $count++; + $this->msgToResourceId($msg, $resourceId); + } + } + _log_message("msgToDevice_id: sent to ($count) clients yptDeviceId={$yptDeviceId} "); + } + + public function msgToAll(ConnectionInterface $from, $msg, $type = "", $includeMe = false) { + _log_message("msgToAll FROM ({$from->resourceId}) {$type} Total Clients: " . count($this->clients)); + foreach ($this->clients as $key => $client) { + if (!empty($includeMe) || $from !== $client['conn']) { + //_log_message("msgToAll FROM ({$from->resourceId}) TO {$key} {$type}"); + $this->msgToResourceId($msg, $key, $type); + } + } + } + + public function msgToAllSameVideo($videos_id, $msg) { + if (empty($videos_id)) { + return false; + } + if (!is_array($msg)) { + $this->msgToArray($msg); + } + _log_message("msgToAllSameVideo: {$videos_id}"); + foreach ($this->clients as $key => $client) { + if (empty($client['videos_id'])) { + continue; + } + if ($client['videos_id'] == $videos_id) { + $this->msgToResourceId($msg, $key, \SocketMessageType::ON_VIDEO_MSG); + } + } + } + + public function msgToAllSameLive($live_key, $msg) { + if (empty($live_key)) { + return false; + } + $live_key = object_to_array($live_key); + if (!is_array($msg)) { + $this->msgToArray($msg); + } + _mysql_connect(); + $msg['is_live'] = \Live::isLiveAndIsReadyFromKey($live_key['key'], $live_key['live_servers_id'], true); + _mysql_close(); + _log_message("msgToAllSameLive: key={$live_key['key']} live_servers_id={$live_key['live_servers_id']} liveLink={$live_key['liveLink']}"); + foreach ($this->clients as $key => $client) { + if (empty($client['live_key']) || (empty($client['live_key']['key']) && empty($client['live_key']['liveLink']))) { + continue; + } + if ($client['live_key']['key'] == $live_key['key'] && $client['live_key']['live_servers_id'] == $live_key['live_servers_id']) { + $this->msgToResourceId($msg, $key, \SocketMessageType::ON_LIVE_MSG); + } else if ($client['live_key']['liveLink'] == $live_key['liveLink']) { + $this->msgToResourceId($msg, $key, \SocketMessageType::ON_LIVE_MSG); + } + } + } + + private function msgToArray(&$json) { + $json = $this->makeSureIsArray($json); + return true; + } + + private function makeSureIsArray($msg) { + if (empty($msg)) { + return array(); + } + if (is_string($msg)) { + $decoded = _json_decode($msg); + } else { + $decoded = object_to_array($msg); + } + if (is_string($msg) && !$decoded) { + return array($msg); + } else if (is_string($msg)) { + return object_to_array($decoded); + } + return object_to_array($msg); + } + + public function getTags() { + return array('free', 'live'); + } + + public function isUserLive($users_id) { + return !empty($this->clientsUsersId[$users_id]) && !empty($this->clientsUsersId[$users_id]['resourceId']); + } + + + +} + +function _log_message($msg, $type = "") { + global $SocketDataObj; + if (!empty($SocketDataObj->debugAllUsersSocket) || !empty($SocketDataObj->debugSocket)) { + //_error_log($msg, \AVideoLog::$SOCKET); + echo date('Y-m-d H:i:s') . ' ' . $msg . PHP_EOL; + } else if ($type == \AVideoLog::$ERROR) { + _error_log($msg, \AVideoLog::$SOCKET); + echo "\e[1;31;40m" . date('Y-m-d H:i:s') . ' ' . $msg . "\e[0m" . PHP_EOL; + } +} diff --git a/plugin/YPTSocket/YPTSocket.php b/plugin/YPTSocket/YPTSocket.php index 65d5fce6cf..38a44068db 100644 --- a/plugin/YPTSocket/YPTSocket.php +++ b/plugin/YPTSocket/YPTSocket.php @@ -193,6 +193,7 @@ class YPTSocket extends PluginAbstract { if (!empty($obj->enableCalls)) { echo 'callerNewConnection(response);'; } + echo 'socketNewConnection(response);'; return ''; } @@ -201,7 +202,38 @@ class YPTSocket extends PluginAbstract { if (!empty($obj->enableCalls)) { echo 'callerDisconnection(response);'; } + echo 'socketDisconnection(response);'; return ''; } + + public static function getUserOnlineLabel($users_id, $class='', $style='') { + global $global; + $users_id = intval($users_id); + $varsArray = array('users_id' => $users_id, 'class'=>$class, 'style'=>$style); + $filePath = $global['systemRootPath'] . 'plugin/YPTSocket/userOnlineLabel.php'; + return getIncludeFileContent($filePath, $varsArray); + } + + + public static function shouldShowCaller() { + global $_YPTSocketshouldShowCaller; + if(!isset($_YPTSocketshouldShowCaller)){ + $obj = new stdClass(); + $obj->show = false; + $obj->reason = ''; + if (!User::isLogged()) { + $obj->reason = 'Not logged'; + } else { + $objSocket = AVideoPlugin::getDataObjectIfEnabled('YPTSocket'); + if (empty($objSocket->enableCalls)) { + $obj->reason = 'YPTSocket enableCalls = false'; + }else{ + $obj->show = true; + } + } + $_YPTSocketshouldShowCaller = $obj; + } + return $_YPTSocketshouldShowCaller; + } } diff --git a/plugin/YPTSocket/caller.js b/plugin/YPTSocket/caller.js index 13752517e1..89756515dc 100644 --- a/plugin/YPTSocket/caller.js +++ b/plugin/YPTSocket/caller.js @@ -41,6 +41,12 @@ function callNow(to_users_id, to_identification) { //incomeCall(json); } + +function callUserNow(to_users_id) { + avideoModalIframeFull(webSiteRootURL + 'plugin/YPTSocket/callUser.php?users_id='+to_users_id); + return false; +} + function isJsonReceivingCall(json) { if (json.from_users_id != my_users_id) { // is receiving a call diff --git a/plugin/YPTSocket/getWebSocket.json.php b/plugin/YPTSocket/getWebSocket.json.php index a22ee2ff49..eb6e25cebb 100644 --- a/plugin/YPTSocket/getWebSocket.json.php +++ b/plugin/YPTSocket/getWebSocket.json.php @@ -1,21 +1,21 @@ -error = true; -$obj->msg = ""; -$obj->webSocketToken = ""; -$obj->webSocketURL = ""; - -if(!AVideoPlugin::isEnabledByName("YPTSocket")){ - $obj->msg = "Socket plugin not enabled"; - die(json_encode($obj)); -} - - -$obj->error = false; -$obj->webSocketToken = getEncryptedInfo(0); -$obj->webSocketURL = YPTSocket::getWebSocketURL(); - +error = true; +$obj->msg = ""; +$obj->webSocketToken = ""; +$obj->webSocketURL = ""; + +if(!AVideoPlugin::isEnabledByName("YPTSocket")){ + $obj->msg = "Socket plugin not enabled"; + die(json_encode($obj)); +} + + +$obj->error = false; +$obj->webSocketToken = getEncryptedInfo(0); +$obj->webSocketURL = YPTSocket::getWebSocketURL(); + die(json_encode($obj)); \ No newline at end of file diff --git a/plugin/YPTSocket/localhost.pem b/plugin/YPTSocket/localhost.pem new file mode 100644 index 0000000000..be692792d7 --- /dev/null +++ b/plugin/YPTSocket/localhost.pem @@ -0,0 +1,49 @@ +-----BEGIN CERTIFICATE----- +MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBZMRIwEAYDVQQDDAkxMjcu +MC4wLjExCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQK +DBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwHhcNMTYxMjMwMTQ1OTA2WhcNMjYx +MjI4MTQ1OTA2WjBZMRIwEAYDVQQDDAkxMjcuMC4wLjExCzAJBgNVBAYTAkFVMRMw +EQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0 +eSBMdGQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC8SZWNS+Ktg0Py +W8dx5uXZ+ZUawd3wnzLMHW7EhoUpIrIdp3kDU9NezF68dOhPMJY/Kh+6btRCxWXN +2OVTqS5Xi826j3TSE07iF83JRLeveW0PcodjUBd+RzdwCWWo2pfMJz4v7x1wu1c9 +zNi6JxxpDAXTFSB4GiWsI4tFu2XmMRhfm6LRK4WPfsZIJKokdiG5fKSPDn7nrVj0 +UUXr2eBsEAzdwL14U9+mwbLdaAkz3qK3fqi8sEC09lEWm95gKMOhkQf5qvXODtT4 +wdVrrKDTyehLv0xaItnUDnXzrkMBU5QS9TQzzqSW6ZaBsSxtONEFUiXiN9dtyXsY +YCUE54G/AgMBAAGjUDBOMB0GA1UdDgQWBBQ2GRz3QsQzdXaTMnPVCKfpigA10DAf +BgNVHSMEGDAWgBQ2GRz3QsQzdXaTMnPVCKfpigA10DAMBgNVHRMEBTADAQH/MA0G +CSqGSIb3DQEBBQUAA4IBAQA77iZ4KrpPY18Ezjt0mngYAuAxunKddXYdLZ2khywN +0uI/VzYnkFVtrsC7y2jLHSxlmE2/viPPGZDUplENV2acN6JNW+tlt7/bsrQHDQw3 +7VCF27EWiDxHsaghhLkqC+kcop5YR5c0oDQTdEWEKSbow2zayUXDYbRRs76SClTe +824Yul+Ts8Mka+AX2PXDg47iZ84fJRN/nKavcJUTJ2iS1uYw0GNnFMge/uwsfMR3 +V47qN0X5emky8fcq99FlMCbcy0gHAeSWAjClgr2dd2i0LDatUbj7YmdmFcskOgII +IwGfvuWR2yPevYGAE0QgFeLHniN3RW8zmpnX/XtrJ4a7 +-----END CERTIFICATE----- +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC8SZWNS+Ktg0Py +W8dx5uXZ+ZUawd3wnzLMHW7EhoUpIrIdp3kDU9NezF68dOhPMJY/Kh+6btRCxWXN +2OVTqS5Xi826j3TSE07iF83JRLeveW0PcodjUBd+RzdwCWWo2pfMJz4v7x1wu1c9 +zNi6JxxpDAXTFSB4GiWsI4tFu2XmMRhfm6LRK4WPfsZIJKokdiG5fKSPDn7nrVj0 +UUXr2eBsEAzdwL14U9+mwbLdaAkz3qK3fqi8sEC09lEWm95gKMOhkQf5qvXODtT4 +wdVrrKDTyehLv0xaItnUDnXzrkMBU5QS9TQzzqSW6ZaBsSxtONEFUiXiN9dtyXsY +YCUE54G/AgMBAAECggEBAKiO/3FE1CMddkCLZVtUp8ShqJgRokx9WI5ecwFApAkV +ZHsjqDQQYRNmxhDUX/w0tOzLGyhde2xjJyZG29YviKsbHwu6zYwbeOzy/mkGOaK/ +g6DmmMmRs9Z6juifoQCu4GIFZ6il2adIL2vF7OeJh+eKudQj/7NFRSB7mXzNrQWK +tZY3eux5zXWmio7pgZrx1HFZQiiL9NVLwT9J7oBnaoO3fREiu5J2xBpljG9Cr0j1 +LLiVLhukWJYRlHDtGt1CzI9w8iKo44PCRzpKyxpbsOrQxeSyEWUYQRv9VHA59LC7 +tVAJTbnTX1BNHkGZkOkoOpoZLwBaM2XbbDtcOGCAZMECgYEA+mTURFQ85/pxawvk +9ndqZ+5He1u/bMLYIJDp0hdB/vgD+vw3gb2UyRwp0I6Wc6Si4FEEnbY7L0pzWsiR +43CpLs+cyLfnD9NycuIasxs5fKb/1s1nGTkRAp7x9x/ZTtEf8v4YTmmMXFHzdo7V +pv+czO89ppEDkxEtMf/b5SifhO8CgYEAwIDIUvXLduGhL+RPDwjc2SKdydXGV6om +OEdt/V8oS801Z7k8l3gHXFm7zL/MpHmh9cag+F9dHK42kw2RSjDGsBlXXiAO1Z0I +2A34OdPw/kow8fmIKWTMu3+28Kca+3RmUqeyaq0vazQ/bWMO9px+Ud3YfLo1Tn5I +li0MecAx8DECgYEAvsLceKYYtL83c09fg2oc1ctSCCgw4WJcGAtvJ9DyRZacKbXH +b/+H/+OF8879zmKqd+0hcCnqUzAMTCisBLPLIM+o6b45ufPkqKObpcJi/JWaKgLY +vf2c+Psw6o4IF6T5Cz4MNIjzF06UBknxecYZpoPJ20F1kLCwVvxPgfl99l8CgYAb +XfOcv67WTstgiJ+oroTfJamy+P5ClkDqvVTosW+EHz9ZaJ8xlXHOcj9do2LPey9I +Rp250azmF+pQS5x9JKQKgv/FtN8HBVUtigbhCb14GUoODICMCfWFLmnumoMefnTR +iV+3BLn6Dqp5vZxx+NuIffZ5/Or5JsDhALSGVomC8QKBgAi3Z/dNQrDHfkXMNn/L ++EAoLuAbFgLs76r9VGgNaRQ/q5gex2bZEGoBj4Sxvs95NUIcfD9wKT7FF8HdxARv +y3o6Bfc8Xp9So9SlFXrje+gkdEJ0rQR67d+XBuJZh86bXJHVrMwpoNL+ahLGdVSe +81oh1uCH1YPLM29hPyaohxL8 +-----END PRIVATE KEY----- diff --git a/plugin/YPTSocket/script.js b/plugin/YPTSocket/script.js index abdea27a91..e176b5beb5 100644 --- a/plugin/YPTSocket/script.js +++ b/plugin/YPTSocket/script.js @@ -250,6 +250,38 @@ function parseSocketResponse() { } } + +function socketNewConnection(json) { + setUserOnlineStatus(json.msg.users_id); +} + +function socketDisconnection(json) { + setUserOnlineStatus(json.msg.users_id); +} + +function setInitialOnlineStatus() { + + if(!isReadyToCheckIfIsOnline()){ + setTimeout(function(){setInitialOnlineStatus();},1000); + return false; + } + + for (var users_id in users_id_online) { + setUserOnlineStatus(users_id); + } + return true; +} + +function setUserOnlineStatus(users_id){ + if(isUserOnline(users_id)){ + $('.users_id_'+users_id).removeClass('offline'); + $('.users_id_'+users_id).addClass('online'); + }else{ + $('.users_id_'+users_id).removeClass('online'); + $('.users_id_'+users_id).addClass('offline'); + } +} + $(function () { //console.log('Getting webSocketToken ...'); var getWebSocket = webSiteRootURL + 'plugin/YPTSocket/getWebSocket.json.php'; @@ -275,4 +307,5 @@ $(function () { if (inIframe()) { $('#socket_info_container').hide(); } + setInitialOnlineStatus(); }); \ No newline at end of file diff --git a/plugin/YPTSocket/server.php b/plugin/YPTSocket/server.php index 856de61073..457ab8b4c1 100644 --- a/plugin/YPTSocket/server.php +++ b/plugin/YPTSocket/server.php @@ -1,87 +1,84 @@ -serverVersion = YPTSocket::getServerVersion(); - -ob_end_flush(); -_mysql_close(); -session_write_close(); -exec('ulimit -n 20480'); // to handle over 1 k connections -$SocketDataObj->port = intval($SocketDataObj->port); -_error_log("Starting Socket server at port {$SocketDataObj->port}"); -//killProcessOnPort(); -$scheme = parse_url($global['webSiteRootURL'], PHP_URL_SCHEME); -echo "Starting AVideo Socket server version {$SocketDataObj->serverVersion} on port {$SocketDataObj->port}" . PHP_EOL; - -if (strtolower($scheme) !== 'https' || !empty($SocketDataObj->forceNonSecure)) { - echo "Your socket server does NOT use a secure connection" . PHP_EOL; - $server = IoServer::factory( - new HttpServer( - new WsServer( - new Message() - ) - ), - $SocketDataObj->port - ); - - $server->run(); -} else { - if (!file_exists($SocketDataObj->server_crt_file) || !is_readable($SocketDataObj->server_crt_file)) { - echo "SSL ERROR, we could not access the CRT file {$SocketDataObj->server_crt_file}, try to run this command as root or use sudo " . PHP_EOL; - } - if (!file_exists($SocketDataObj->server_key_file) || !is_readable($SocketDataObj->server_key_file)) { - echo "SSL ERROR, we could not access the KEY file {$SocketDataObj->server_key_file}, try to run this command as root or use sudo " . PHP_EOL; - } - - echo "Your socket server uses a secure connection" . PHP_EOL; - $parameters = [ - 'local_cert' => $SocketDataObj->server_crt_file, - 'local_pk' => $SocketDataObj->server_key_file, - 'allow_self_signed' => $SocketDataObj->allow_self_signed, // Allow self signed certs (should be false in production) - 'verify_peer' => false, - 'verify_peer_name' => false, - 'security_level' => 0 - ]; - - foreach ($parameters as $key => $value) { - echo "Parameter [{$key}]: $value " . PHP_EOL; - } - - $loop = React\EventLoop\Factory::create(); -// Set up our WebSocket server for clients wanting real-time updates - $webSock = new React\Socket\Server($SocketDataObj->uri . ':' . $SocketDataObj->port, $loop); - $webSock = new React\Socket\SecureServer($webSock, $loop, $parameters); - $webServer = new Ratchet\Server\IoServer( - new HttpServer( - new WsServer( - new Message() - ) - ), - $webSock - ); -//$socket = new Reactor($webServer->loop); -//$socket->listen(8082, '0.0.0.0'); //Port 2 -//$socket->on('connection', [$webServer, 'handleConnect']); -//$webServer->run(); - $loop->run(); +serverVersion = YPTSocket::getServerVersion(); + +ob_end_flush(); +_mysql_close(); +session_write_close(); +exec('ulimit -n 20480'); // to handle over 1 k connections +$SocketDataObj->port = intval($SocketDataObj->port); +_error_log("Starting Socket server at port {$SocketDataObj->port}"); + +//killProcessOnPort(); +$scheme = parse_url($global['webSiteRootURL'], PHP_URL_SCHEME); +echo "Starting AVideo Socket server version {$SocketDataObj->serverVersion} on port {$SocketDataObj->port}" . PHP_EOL; + +if (strtolower($scheme) !== 'https' || !empty($SocketDataObj->forceNonSecure)) { + echo "Your socket server does NOT use a secure connection" . PHP_EOL; + $server = IoServer::factory( + new HttpServer( + new WsServer( + new Message() + ) + ), + $SocketDataObj->port + ); + + $server->run(); +} else { + if (!file_exists($SocketDataObj->server_crt_file) || !is_readable($SocketDataObj->server_crt_file)) { + echo "SSL ERROR, we could not access the CRT file {$SocketDataObj->server_crt_file}, try to run this command as root or use sudo " . PHP_EOL; + } + if (!file_exists($SocketDataObj->server_key_file) || !is_readable($SocketDataObj->server_key_file)) { + echo "SSL ERROR, we could not access the KEY file {$SocketDataObj->server_key_file}, try to run this command as root or use sudo " . PHP_EOL; + } + + echo "Your socket server uses a secure connection" . PHP_EOL; + $parameters = [ + 'local_cert' => $SocketDataObj->server_crt_file, + 'local_pk' => $SocketDataObj->server_key_file, + 'allow_self_signed' => $SocketDataObj->allow_self_signed, // Allow self signed certs (should be false in production) + 'verify_peer' => false, + 'verify_peer_name' => false, + 'security_level' => 0 + ]; + + foreach ($parameters as $key => $value) { + echo "Parameter [{$key}]: $value " . PHP_EOL; + } + + $loop = React\EventLoop\Loop::get(); + + $webSock = new React\Socket\Server($SocketDataObj->uri . ':' . $SocketDataObj->port, $loop); + $webSock = new React\Socket\SecureServer($webSock, $loop, $parameters); + $webServer = new Ratchet\Server\IoServer( + new HttpServer( + new WsServer( + new Message() + ) + ), + $webSock + ); + $loop->run(); } \ No newline at end of file diff --git a/plugin/YPTSocket/server2.php b/plugin/YPTSocket/server2.php new file mode 100644 index 0000000000..750214c670 --- /dev/null +++ b/plugin/YPTSocket/server2.php @@ -0,0 +1,119 @@ +serverVersion = YPTSocket::getServerVersion(); + +ob_end_flush(); +_mysql_close(); +session_write_close(); +exec('ulimit -n 20480'); // to handle over 1 k connections +$SocketDataObj->port = intval($SocketDataObj->port); +_error_log("Starting Socket server at port {$SocketDataObj->port}"); +//killProcessOnPort(); +$scheme = parse_url($global['webSiteRootURL'], PHP_URL_SCHEME); +echo "Starting AVideo Socket server version {$SocketDataObj->serverVersion} on port {$SocketDataObj->port}" . PHP_EOL; + +if (strtolower($scheme) !== 'https' || !empty($SocketDataObj->forceNonSecure)) { + $context = array('tls' => array( + 'local_cert' => $global['systemRootPath'] . 'plugin/YPTSocket/localhost.pem', + 'allow_self_signed' => true, // Allow self signed certs (should be false in production) + 'verify_peer' => false, + 'verify_peer_name' => false, + 'security_level' => 0 + )); +} else { + $context = array('tls' => array( + 'local_cert' => $SocketDataObj->server_crt_file, + 'local_pk' => $SocketDataObj->server_key_file, + 'allow_self_signed' => $SocketDataObj->allow_self_signed, // Allow self signed certs (should be false in production) + 'verify_peer' => false, + 'verify_peer_name' => false, + 'security_level' => 0 + )); +} + +$message = new Message2(); + +$socket = new React\Socket\SocketServer($SocketDataObj->uri . ':' . $SocketDataObj->port, $context); + +$socket = new React\Socket\LimitingServer($socket, null); + +$socket->on('connection', function (React\Socket\ConnectionInterface $connection) use ($socket) { + echo '[' . $connection->getRemoteAddress() . ' connected] ' . PHP_EOL; + $connection->write('hello there!' . PHP_EOL); + // whenever a new message comes in + $connection->on('data', function ($data) use ($connection, $socket) { + // remove any non-word characters (just for the demo) + //$data = trim(preg_replace('/[^\w\d \.\,\-\!\?]/u', '', $data)); + + $parts = explode('?', $data); + + // ignore empty messages + if (empty($parts[1])) { + echo ("Empty parts " . json_encode($data)); + return; + } + + parse_str($parts[1], $wsocketGetVars); + foreach ($wsocketGetVars as $key => $value) { + $wsocketGetVars[$key] = urldecode($value); + } + if (empty($wsocketGetVars['webSocketToken'])) { + echo ("Empty websocket token " . json_encode($wsocketGetVars)); + return false; + } + $json = getDecryptedInfo($wsocketGetVars['webSocketToken']); + if (empty($json)) { + echo ("Invalid websocket token "); + return false; + } + echo 'websocket token [' . + json_encode($connection->getLocalAddress()) . + ', ' . + json_encode($connection->getRemoteAddress()) . ']' . PHP_EOL; + //echo ("websocket token ". json_encode($json)); + // prefix with client IP and broadcast to all connected clients + $data = trim(parse_url($connection->getRemoteAddress(), PHP_URL_HOST), '[]') . ': ' . $data . PHP_EOL; + foreach ($socket->getConnections() as $connection) { + $connection->write($data); + } + }); + + $connection->on('close', function () use ($connection) { + echo '[' . $connection->getRemoteAddress() . ' disconnected]' . PHP_EOL; + }); + + $connection->on('end', function () { + echo 'ended'. PHP_EOL; + }); + + $connection->on('error', function (Exception $e) { + echo 'error: ' . $e->getMessage(). PHP_EOL; + }); +}); + +$socket->on('error', function (Exception $e) { + echo 'Error: ' . $e->getMessage() . PHP_EOL; +}); + +echo 'Listening on ' . $socket->getAddress() . PHP_EOL; diff --git a/plugin/YPTSocket/userOnlineLabel.php b/plugin/YPTSocket/userOnlineLabel.php new file mode 100644 index 0000000000..9e64cd939a --- /dev/null +++ b/plugin/YPTSocket/userOnlineLabel.php @@ -0,0 +1,20 @@ +
+ + + show) { + ?> + + reason} -->"; + } + } + ?> +
\ No newline at end of file diff --git a/view/bootstrap/fixes.css b/view/bootstrap/fixes.css index 4cfff385d3..1726164fa6 100644 --- a/view/bootstrap/fixes.css +++ b/view/bootstrap/fixes.css @@ -1,1707 +1,1704 @@ -#mainNavBar { - display: block; -} -body { - padding-top: 0 !important; -} -.hidden { - display: none; -} -@media (max-width: 767px) { - .hidden-xs { - display: none !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .hidden-sm { - display: none !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .hidden-md { - display: none !important; - } -} -@media (min-width: 1200px) { - .hidden-lg { - display: none !important; - } -} - -.visible-xs, -.visible-sm, -.visible-md, -.visible-lg { - display: none !important; -} -.visible-xs-block, -.visible-xs-inline, -.visible-xs-inline-block, -.visible-sm-block, -.visible-sm-inline, -.visible-sm-inline-block, -.visible-md-block, -.visible-md-inline, -.visible-md-inline-block, -.visible-lg-block, -.visible-lg-inline, -.visible-lg-inline-block { - display: none !important; -} -@media (max-width: 767px) { - .visible-xs { - display: block !important; - } - table.visible-xs { - display: table !important; - } - tr.visible-xs { - display: table-row !important; - } - th.visible-xs, - td.visible-xs { - display: table-cell !important; - } -} -@media (max-width: 767px) { - .visible-xs-block { - display: block !important; - } -} -@media (max-width: 767px) { - .visible-xs-inline { - display: inline !important; - } -} -@media (max-width: 767px) { - .visible-xs-inline-block { - display: inline-block !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm { - display: block !important; - } - table.visible-sm { - display: table !important; - } - tr.visible-sm { - display: table-row !important; - } - th.visible-sm, - td.visible-sm { - display: table-cell !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm-block { - display: block !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm-inline { - display: inline !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm-inline-block { - display: inline-block !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md { - display: block !important; - } - table.visible-md { - display: table !important; - } - tr.visible-md { - display: table-row !important; - } - th.visible-md, - td.visible-md { - display: table-cell !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-block { - display: block !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-inline { - display: inline !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-inline-block { - display: inline-block !important; - } -} -@media (min-width: 1200px) { - .visible-lg { - display: block !important; - } - table.visible-lg { - display: table !important; - } - tr.visible-lg { - display: table-row !important; - } - th.visible-lg, - td.visible-lg { - display: table-cell !important; - } -} -@media (min-width: 1200px) { - .visible-lg-block { - display: block !important; - } -} -@media (min-width: 1200px) { - .visible-lg-inline { - display: inline !important; - } -} -@media (min-width: 1200px) { - .visible-lg-inline-block { - display: inline-block !important; - } -} -@media (max-width: 767px) { - .hidden-xs { - display: none !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .hidden-sm { - display: none !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .hidden-md { - display: none !important; - } -} -@media (min-width: 1200px) { - .hidden-lg { - display: none !important; - } -} -.visible-print { - display: none !important; -} -@media print { - .visible-print { - display: block !important; - } - table.visible-print { - display: table !important; - } - tr.visible-print { - display: table-row !important; - } - th.visible-print, - td.visible-print { - display: table-cell !important; - } -} -.navbar-toggle { - position: relative; - float: right; - padding: 9px 10px; - margin-right: 15px; - margin-top: 8px; - margin-bottom: 8px; - background-color: transparent; - background-image: none; - border: 1px solid transparent; - border-radius: 4px; -} -.navbar-toggle:focus { - outline: 0; -} -.navbar-toggle .icon-bar { - display: block; - width: 22px; - height: 2px; - border-radius: 1px; -} -.navbar-toggle .icon-bar + .icon-bar { - margin-top: 4px; -} -@media (min-width: 768px) { - .navbar-toggle { - display: none; - } -} -.navbar-lang-btn .select2-container { - margin: 0 !important; -} -.img-circle { - border-radius: 50%; -} - -.btn-default { - color: #333; - background-color: #fff; - border-color: #ccc; -} -.btn-default:focus, -.btn-default.focus { - color: #333; - background-color: #e6e6e6; - border-color: #8c8c8c; -} -.btn-default:hover { - color: #333; - background-color: #e6e6e6; - border-color: #adadad; -} -.btn-default:active, -.btn-default.active, -.open > .dropdown-toggle.btn-default { - color: #333; - background-color: #e6e6e6; - background-image: none; - border-color: #adadad; -} -.btn-default:active:hover, -.btn-default.active:hover, -.open > .dropdown-toggle.btn-default:hover, -.btn-default:active:focus, -.btn-default.active:focus, -.open > .dropdown-toggle.btn-default:focus, -.btn-default:active.focus, -.btn-default.active.focus, -.open > .dropdown-toggle.btn-default.focus { - color: #333; - background-color: #d4d4d4; - border-color: #8c8c8c; -} -.btn-default.disabled:hover, -.btn-default[disabled]:hover, -fieldset[disabled] .btn-default:hover, -.btn-default.disabled:focus, -.btn-default[disabled]:focus, -fieldset[disabled] .btn-default:focus, -.btn-default.disabled.focus, -.btn-default[disabled].focus, -fieldset[disabled] .btn-default.focus { - background-color: #fff; - border-color: #ccc; -} -.btn-default .badge { - color: #fff; - background-color: #333; -} -.btn-primary { - color: #fff; - background-color: #337ab7; - border-color: #2e6da4; -} -.btn-primary:focus, -.btn-primary.focus { - color: #fff; - background-color: #286090; - border-color: #122b40; -} -.btn-primary:hover { - color: #fff; - background-color: #286090; - border-color: #204d74; -} -.btn-primary:active, -.btn-primary.active, -.open > .dropdown-toggle.btn-primary { - color: #fff; - background-color: #286090; - background-image: none; - border-color: #204d74; -} -.btn-primary:active:hover, -.btn-primary.active:hover, -.open > .dropdown-toggle.btn-primary:hover, -.btn-primary:active:focus, -.btn-primary.active:focus, -.open > .dropdown-toggle.btn-primary:focus, -.btn-primary:active.focus, -.btn-primary.active.focus, -.open > .dropdown-toggle.btn-primary.focus { - color: #fff; - background-color: #204d74; - border-color: #122b40; -} -.btn-primary.disabled:hover, -.btn-primary[disabled]:hover, -fieldset[disabled] .btn-primary:hover, -.btn-primary.disabled:focus, -.btn-primary[disabled]:focus, -fieldset[disabled] .btn-primary:focus, -.btn-primary.disabled.focus, -.btn-primary[disabled].focus, -fieldset[disabled] .btn-primary.focus { - background-color: #337ab7; - border-color: #2e6da4; -} -.btn-primary .badge { - color: #337ab7; - background-color: #fff; -} -.btn-success { - color: #fff; - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success:focus, -.btn-success.focus { - color: #fff; - background-color: #449d44; - border-color: #255625; -} -.btn-success:hover { - color: #fff; - background-color: #449d44; - border-color: #398439; -} -.btn-success:active, -.btn-success.active, -.open > .dropdown-toggle.btn-success { - color: #fff; - background-color: #449d44; - background-image: none; - border-color: #398439; -} -.btn-success:active:hover, -.btn-success.active:hover, -.open > .dropdown-toggle.btn-success:hover, -.btn-success:active:focus, -.btn-success.active:focus, -.open > .dropdown-toggle.btn-success:focus, -.btn-success:active.focus, -.btn-success.active.focus, -.open > .dropdown-toggle.btn-success.focus { - color: #fff; - background-color: #398439; - border-color: #255625; -} -.btn-success.disabled:hover, -.btn-success[disabled]:hover, -fieldset[disabled] .btn-success:hover, -.btn-success.disabled:focus, -.btn-success[disabled]:focus, -fieldset[disabled] .btn-success:focus, -.btn-success.disabled.focus, -.btn-success[disabled].focus, -fieldset[disabled] .btn-success.focus { - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success .badge { - color: #5cb85c; - background-color: #fff; -} -.btn-info { - color: #fff; - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info:focus, -.btn-info.focus { - color: #fff; - background-color: #31b0d5; - border-color: #1b6d85; -} -.btn-info:hover { - color: #fff; - background-color: #31b0d5; - border-color: #269abc; -} -.btn-info:active, -.btn-info.active, -.open > .dropdown-toggle.btn-info { - color: #fff; - background-color: #31b0d5; - background-image: none; - border-color: #269abc; -} -.btn-info:active:hover, -.btn-info.active:hover, -.open > .dropdown-toggle.btn-info:hover, -.btn-info:active:focus, -.btn-info.active:focus, -.open > .dropdown-toggle.btn-info:focus, -.btn-info:active.focus, -.btn-info.active.focus, -.open > .dropdown-toggle.btn-info.focus { - color: #fff; - background-color: #269abc; - border-color: #1b6d85; -} -.btn-info.disabled:hover, -.btn-info[disabled]:hover, -fieldset[disabled] .btn-info:hover, -.btn-info.disabled:focus, -.btn-info[disabled]:focus, -fieldset[disabled] .btn-info:focus, -.btn-info.disabled.focus, -.btn-info[disabled].focus, -fieldset[disabled] .btn-info.focus { - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info .badge { - color: #5bc0de; - background-color: #fff; -} -.btn-warning { - color: #fff; - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning:focus, -.btn-warning.focus { - color: #fff; - background-color: #ec971f; - border-color: #985f0d; -} -.btn-warning:hover { - color: #fff; - background-color: #ec971f; - border-color: #d58512; -} -.btn-warning:active, -.btn-warning.active, -.open > .dropdown-toggle.btn-warning { - color: #fff; - background-color: #ec971f; - background-image: none; - border-color: #d58512; -} -.btn-warning:active:hover, -.btn-warning.active:hover, -.open > .dropdown-toggle.btn-warning:hover, -.btn-warning:active:focus, -.btn-warning.active:focus, -.open > .dropdown-toggle.btn-warning:focus, -.btn-warning:active.focus, -.btn-warning.active.focus, -.open > .dropdown-toggle.btn-warning.focus { - color: #fff; - background-color: #d58512; - border-color: #985f0d; -} -.btn-warning.disabled:hover, -.btn-warning[disabled]:hover, -fieldset[disabled] .btn-warning:hover, -.btn-warning.disabled:focus, -.btn-warning[disabled]:focus, -fieldset[disabled] .btn-warning:focus, -.btn-warning.disabled.focus, -.btn-warning[disabled].focus, -fieldset[disabled] .btn-warning.focus { - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning .badge { - color: #f0ad4e; - background-color: #fff; -} -.btn-danger { - color: #fff; - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger:focus, -.btn-danger.focus { - color: #fff; - background-color: #c9302c; - border-color: #761c19; -} -.btn-danger:hover { - color: #fff; - background-color: #c9302c; - border-color: #ac2925; -} -.btn-danger:active, -.btn-danger.active, -.open > .dropdown-toggle.btn-danger { - color: #fff; - background-color: #c9302c; - background-image: none; - border-color: #ac2925; -} -.btn-danger:active:hover, -.btn-danger.active:hover, -.open > .dropdown-toggle.btn-danger:hover, -.btn-danger:active:focus, -.btn-danger.active:focus, -.open > .dropdown-toggle.btn-danger:focus, -.btn-danger:active.focus, -.btn-danger.active.focus, -.open > .dropdown-toggle.btn-danger.focus { - color: #fff; - background-color: #ac2925; - border-color: #761c19; -} -.btn-danger.disabled:hover, -.btn-danger[disabled]:hover, -fieldset[disabled] .btn-danger:hover, -.btn-danger.disabled:focus, -.btn-danger[disabled]:focus, -fieldset[disabled] .btn-danger:focus, -.btn-danger.disabled.focus, -.btn-danger[disabled].focus, -fieldset[disabled] .btn-danger.focus { - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger .badge { - color: #d9534f; - background-color: #fff; -} - -#mysearch, #myNavbar, #lastItemOnMenu{ - padding-top: 4px; -} -.panel { - margin-bottom: 20px; - background-color: #fff; - border: 1px solid transparent; - border-radius: 4px; - -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); -} -.panel-body { - padding: 15px; -} -.panel-heading { - padding: 10px 15px; - border-bottom: 1px solid transparent; - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel-heading > .dropdown .dropdown-toggle { - color: inherit; -} -.panel-title { - margin-top: 0; - margin-bottom: 0; - font-size: 16px; - color: inherit; -} -.panel-title > a, -.panel-title > small, -.panel-title > .small, -.panel-title > small > a, -.panel-title > .small > a { - color: inherit; -} -.panel-footer { - padding: 10px 15px; - background-color: #f5f5f5; - border-top: 1px solid #ddd; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .list-group, -.panel > .panel-collapse > .list-group { - margin-bottom: 0; -} -.panel > .list-group .list-group-item, -.panel > .panel-collapse > .list-group .list-group-item { - border-width: 1px 0; - border-radius: 0; -} -.panel > .list-group:first-child .list-group-item:first-child, -.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { - border-top: 0; - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel > .list-group:last-child .list-group-item:last-child, -.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { - border-bottom: 0; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child { - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.panel-heading + .list-group .list-group-item:first-child { - border-top-width: 0; -} -.list-group + .panel-footer { - border-top-width: 0; -} -.panel > .table, -.panel > .table-responsive > .table, -.panel > .panel-collapse > .table { - margin-bottom: 0; -} -.panel > .table caption, -.panel > .table-responsive > .table caption, -.panel > .panel-collapse > .table caption { - padding-right: 15px; - padding-left: 15px; -} -.panel > .table:first-child, -.panel > .table-responsive:first-child > .table:first-child { - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel > .table:first-child > thead:first-child > tr:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, -.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { - border-top-left-radius: 3px; -} -.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, -.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, -.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, -.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { - border-top-right-radius: 3px; -} -.panel > .table:last-child, -.panel > .table-responsive:last-child > .table:last-child { - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, -.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { - border-bottom-left-radius: 3px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, -.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { - border-bottom-right-radius: 3px; -} -.panel > .panel-body + .table, -.panel > .panel-body + .table-responsive, -.panel > .table + .panel-body, -.panel > .table-responsive + .panel-body { - border-top: 1px solid #ddd; -} -.panel > .table > tbody:first-child > tr:first-child th, -.panel > .table > tbody:first-child > tr:first-child td { - border-top: 0; -} -.panel > .table-bordered, -.panel > .table-responsive > .table-bordered { - border: 0; -} -.panel > .table-bordered > thead > tr > th:first-child, -.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, -.panel > .table-bordered > tbody > tr > th:first-child, -.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, -.panel > .table-bordered > tfoot > tr > th:first-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, -.panel > .table-bordered > thead > tr > td:first-child, -.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, -.panel > .table-bordered > tbody > tr > td:first-child, -.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, -.panel > .table-bordered > tfoot > tr > td:first-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { - border-left: 0; -} -.panel > .table-bordered > thead > tr > th:last-child, -.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, -.panel > .table-bordered > tbody > tr > th:last-child, -.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, -.panel > .table-bordered > tfoot > tr > th:last-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, -.panel > .table-bordered > thead > tr > td:last-child, -.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, -.panel > .table-bordered > tbody > tr > td:last-child, -.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, -.panel > .table-bordered > tfoot > tr > td:last-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { - border-right: 0; -} -.panel > .table-bordered > thead > tr:first-child > td, -.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, -.panel > .table-bordered > tbody > tr:first-child > td, -.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, -.panel > .table-bordered > thead > tr:first-child > th, -.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, -.panel > .table-bordered > tbody > tr:first-child > th, -.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { - border-bottom: 0; -} -.panel > .table-bordered > tbody > tr:last-child > td, -.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, -.panel > .table-bordered > tfoot > tr:last-child > td, -.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, -.panel > .table-bordered > tbody > tr:last-child > th, -.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, -.panel > .table-bordered > tfoot > tr:last-child > th, -.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { - border-bottom: 0; -} -.panel > .table-responsive { - margin-bottom: 0; - border: 0; -} -.panel-group { - margin-bottom: 20px; -} -.panel-group .panel { - margin-bottom: 0; - border-radius: 4px; -} -.panel-group .panel + .panel { - margin-top: 5px; -} -.panel-group .panel-heading { - border-bottom: 0; -} -.panel-group .panel-heading + .panel-collapse > .panel-body, -.panel-group .panel-heading + .panel-collapse > .list-group { - border-top: 1px solid #ddd; -} -.panel-group .panel-footer { - border-top: 0; -} -.panel-group .panel-footer + .panel-collapse .panel-body { - border-bottom: 1px solid #ddd; -} -.panel-default { - border-color: #ddd; -} -.panel-default > .panel-heading { - color: #333333; - background-color: #f5f5f5; - border-color: #ddd; -} -.panel-default > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #ddd; -} -.panel-default > .panel-heading .badge { - color: #f5f5f5; - background-color: #333333; -} -.panel-default > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #ddd; -} -.panel-primary { - border-color: #337ab7; -} -.panel-primary > .panel-heading { - color: #fff; - background-color: #337ab7; - border-color: #337ab7; -} -.panel-primary > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #337ab7; -} -.panel-primary > .panel-heading .badge { - color: #337ab7; - background-color: #fff; -} -.panel-primary > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #337ab7; -} -.panel-success { - border-color: #d6e9c6; -} -.panel-success > .panel-heading { - color: #3c763d; - background-color: #dff0d8; - border-color: #d6e9c6; -} -.panel-success > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #d6e9c6; -} -.panel-success > .panel-heading .badge { - color: #dff0d8; - background-color: #3c763d; -} -.panel-success > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #d6e9c6; -} -.panel-info { - border-color: #bce8f1; -} -.panel-info > .panel-heading { - color: #31708f; - background-color: #d9edf7; - border-color: #bce8f1; -} -.panel-info > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #bce8f1; -} -.panel-info > .panel-heading .badge { - color: #d9edf7; - background-color: #31708f; -} -.panel-info > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #bce8f1; -} -.panel-warning { - border-color: #faebcc; -} -.panel-warning > .panel-heading { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #faebcc; -} -.panel-warning > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #faebcc; -} -.panel-warning > .panel-heading .badge { - color: #fcf8e3; - background-color: #8a6d3b; -} -.panel-warning > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #faebcc; -} -.panel-danger { - border-color: #ebccd1; -} -.panel-danger > .panel-heading { - color: #a94442; - background-color: #f2dede; - border-color: #ebccd1; -} -.panel-danger > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #ebccd1; -} -.panel-danger > .panel-heading .badge { - color: #f2dede; - background-color: #a94442; -} -.panel-danger > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #ebccd1; -} - - -.col-xs-1, -.col-sm-1, -.col-md-1, -.col-lg-1, -.col-xs-2, -.col-sm-2, -.col-md-2, -.col-lg-2, -.col-xs-3, -.col-sm-3, -.col-md-3, -.col-lg-3, -.col-xs-4, -.col-sm-4, -.col-md-4, -.col-lg-4, -.col-xs-5, -.col-sm-5, -.col-md-5, -.col-lg-5, -.col-xs-6, -.col-sm-6, -.col-md-6, -.col-lg-6, -.col-xs-7, -.col-sm-7, -.col-md-7, -.col-lg-7, -.col-xs-8, -.col-sm-8, -.col-md-8, -.col-lg-8, -.col-xs-9, -.col-sm-9, -.col-md-9, -.col-lg-9, -.col-xs-10, -.col-sm-10, -.col-md-10, -.col-lg-10, -.col-xs-11, -.col-sm-11, -.col-md-11, -.col-lg-11, -.col-xs-12, -.col-sm-12, -.col-md-12, -.col-lg-12 { - position: relative; - min-height: 1px; - padding-right: 15px; - padding-left: 15px; -} -.col-xs-1, -.col-xs-2, -.col-xs-3, -.col-xs-4, -.col-xs-5, -.col-xs-6, -.col-xs-7, -.col-xs-8, -.col-xs-9, -.col-xs-10, -.col-xs-11, -.col-xs-12 { - float: left; -} -.col-xs-12 { - width: 100%; -} -.col-xs-11 { - width: 91.66666667%; -} -.col-xs-10 { - width: 83.33333333%; -} -.col-xs-9 { - width: 75%; -} -.col-xs-8 { - width: 66.66666667%; -} -.col-xs-7 { - width: 58.33333333%; -} -.col-xs-6 { - width: 50%; -} -.col-xs-5 { - width: 41.66666667%; -} -.col-xs-4 { - width: 33.33333333%; -} -.col-xs-3 { - width: 25%; -} -.col-xs-2 { - width: 16.66666667%; -} -.col-xs-1 { - width: 8.33333333%; -} -.col-xs-pull-12 { - right: 100%; -} -.col-xs-pull-11 { - right: 91.66666667%; -} -.col-xs-pull-10 { - right: 83.33333333%; -} -.col-xs-pull-9 { - right: 75%; -} -.col-xs-pull-8 { - right: 66.66666667%; -} -.col-xs-pull-7 { - right: 58.33333333%; -} -.col-xs-pull-6 { - right: 50%; -} -.col-xs-pull-5 { - right: 41.66666667%; -} -.col-xs-pull-4 { - right: 33.33333333%; -} -.col-xs-pull-3 { - right: 25%; -} -.col-xs-pull-2 { - right: 16.66666667%; -} -.col-xs-pull-1 { - right: 8.33333333%; -} -.col-xs-pull-0 { - right: auto; -} -.col-xs-push-12 { - left: 100%; -} -.col-xs-push-11 { - left: 91.66666667%; -} -.col-xs-push-10 { - left: 83.33333333%; -} -.col-xs-push-9 { - left: 75%; -} -.col-xs-push-8 { - left: 66.66666667%; -} -.col-xs-push-7 { - left: 58.33333333%; -} -.col-xs-push-6 { - left: 50%; -} -.col-xs-push-5 { - left: 41.66666667%; -} -.col-xs-push-4 { - left: 33.33333333%; -} -.col-xs-push-3 { - left: 25%; -} -.col-xs-push-2 { - left: 16.66666667%; -} -.col-xs-push-1 { - left: 8.33333333%; -} -.col-xs-push-0 { - left: auto; -} -.col-xs-offset-12 { - margin-left: 100%; -} -.col-xs-offset-11 { - margin-left: 91.66666667%; -} -.col-xs-offset-10 { - margin-left: 83.33333333%; -} -.col-xs-offset-9 { - margin-left: 75%; -} -.col-xs-offset-8 { - margin-left: 66.66666667%; -} -.col-xs-offset-7 { - margin-left: 58.33333333%; -} -.col-xs-offset-6 { - margin-left: 50%; -} -.col-xs-offset-5 { - margin-left: 41.66666667%; -} -.col-xs-offset-4 { - margin-left: 33.33333333%; -} -.col-xs-offset-3 { - margin-left: 25%; -} -.col-xs-offset-2 { - margin-left: 16.66666667%; -} -.col-xs-offset-1 { - margin-left: 8.33333333%; -} -.col-xs-offset-0 { - margin-left: 0%; -} -@media (min-width: 768px) { - .col-sm-1, - .col-sm-2, - .col-sm-3, - .col-sm-4, - .col-sm-5, - .col-sm-6, - .col-sm-7, - .col-sm-8, - .col-sm-9, - .col-sm-10, - .col-sm-11, - .col-sm-12 { - float: left; - } - .col-sm-12 { - width: 100%; - } - .col-sm-11 { - width: 91.66666667%; - } - .col-sm-10 { - width: 83.33333333%; - } - .col-sm-9 { - width: 75%; - } - .col-sm-8 { - width: 66.66666667%; - } - .col-sm-7 { - width: 58.33333333%; - } - .col-sm-6 { - width: 50%; - } - .col-sm-5 { - width: 41.66666667%; - } - .col-sm-4 { - width: 33.33333333%; - } - .col-sm-3 { - width: 25%; - } - .col-sm-2 { - width: 16.66666667%; - } - .col-sm-1 { - width: 8.33333333%; - } - .col-sm-pull-12 { - right: 100%; - } - .col-sm-pull-11 { - right: 91.66666667%; - } - .col-sm-pull-10 { - right: 83.33333333%; - } - .col-sm-pull-9 { - right: 75%; - } - .col-sm-pull-8 { - right: 66.66666667%; - } - .col-sm-pull-7 { - right: 58.33333333%; - } - .col-sm-pull-6 { - right: 50%; - } - .col-sm-pull-5 { - right: 41.66666667%; - } - .col-sm-pull-4 { - right: 33.33333333%; - } - .col-sm-pull-3 { - right: 25%; - } - .col-sm-pull-2 { - right: 16.66666667%; - } - .col-sm-pull-1 { - right: 8.33333333%; - } - .col-sm-pull-0 { - right: auto; - } - .col-sm-push-12 { - left: 100%; - } - .col-sm-push-11 { - left: 91.66666667%; - } - .col-sm-push-10 { - left: 83.33333333%; - } - .col-sm-push-9 { - left: 75%; - } - .col-sm-push-8 { - left: 66.66666667%; - } - .col-sm-push-7 { - left: 58.33333333%; - } - .col-sm-push-6 { - left: 50%; - } - .col-sm-push-5 { - left: 41.66666667%; - } - .col-sm-push-4 { - left: 33.33333333%; - } - .col-sm-push-3 { - left: 25%; - } - .col-sm-push-2 { - left: 16.66666667%; - } - .col-sm-push-1 { - left: 8.33333333%; - } - .col-sm-push-0 { - left: auto; - } - .col-sm-offset-12 { - margin-left: 100%; - } - .col-sm-offset-11 { - margin-left: 91.66666667%; - } - .col-sm-offset-10 { - margin-left: 83.33333333%; - } - .col-sm-offset-9 { - margin-left: 75%; - } - .col-sm-offset-8 { - margin-left: 66.66666667%; - } - .col-sm-offset-7 { - margin-left: 58.33333333%; - } - .col-sm-offset-6 { - margin-left: 50%; - } - .col-sm-offset-5 { - margin-left: 41.66666667%; - } - .col-sm-offset-4 { - margin-left: 33.33333333%; - } - .col-sm-offset-3 { - margin-left: 25%; - } - .col-sm-offset-2 { - margin-left: 16.66666667%; - } - .col-sm-offset-1 { - margin-left: 8.33333333%; - } - .col-sm-offset-0 { - margin-left: 0%; - } -} -@media (min-width: 992px) { - .col-md-1, - .col-md-2, - .col-md-3, - .col-md-4, - .col-md-5, - .col-md-6, - .col-md-7, - .col-md-8, - .col-md-9, - .col-md-10, - .col-md-11, - .col-md-12 { - float: left; - } - .col-md-12 { - width: 100%; - } - .col-md-11 { - width: 91.66666667%; - } - .col-md-10 { - width: 83.33333333%; - } - .col-md-9 { - width: 75%; - } - .col-md-8 { - width: 66.66666667%; - } - .col-md-7 { - width: 58.33333333%; - } - .col-md-6 { - width: 50%; - } - .col-md-5 { - width: 41.66666667%; - } - .col-md-4 { - width: 33.33333333%; - } - .col-md-3 { - width: 25%; - } - .col-md-2 { - width: 16.66666667%; - } - .col-md-1 { - width: 8.33333333%; - } - .col-md-pull-12 { - right: 100%; - } - .col-md-pull-11 { - right: 91.66666667%; - } - .col-md-pull-10 { - right: 83.33333333%; - } - .col-md-pull-9 { - right: 75%; - } - .col-md-pull-8 { - right: 66.66666667%; - } - .col-md-pull-7 { - right: 58.33333333%; - } - .col-md-pull-6 { - right: 50%; - } - .col-md-pull-5 { - right: 41.66666667%; - } - .col-md-pull-4 { - right: 33.33333333%; - } - .col-md-pull-3 { - right: 25%; - } - .col-md-pull-2 { - right: 16.66666667%; - } - .col-md-pull-1 { - right: 8.33333333%; - } - .col-md-pull-0 { - right: auto; - } - .col-md-push-12 { - left: 100%; - } - .col-md-push-11 { - left: 91.66666667%; - } - .col-md-push-10 { - left: 83.33333333%; - } - .col-md-push-9 { - left: 75%; - } - .col-md-push-8 { - left: 66.66666667%; - } - .col-md-push-7 { - left: 58.33333333%; - } - .col-md-push-6 { - left: 50%; - } - .col-md-push-5 { - left: 41.66666667%; - } - .col-md-push-4 { - left: 33.33333333%; - } - .col-md-push-3 { - left: 25%; - } - .col-md-push-2 { - left: 16.66666667%; - } - .col-md-push-1 { - left: 8.33333333%; - } - .col-md-push-0 { - left: auto; - } - .col-md-offset-12 { - margin-left: 100%; - } - .col-md-offset-11 { - margin-left: 91.66666667%; - } - .col-md-offset-10 { - margin-left: 83.33333333%; - } - .col-md-offset-9 { - margin-left: 75%; - } - .col-md-offset-8 { - margin-left: 66.66666667%; - } - .col-md-offset-7 { - margin-left: 58.33333333%; - } - .col-md-offset-6 { - margin-left: 50%; - } - .col-md-offset-5 { - margin-left: 41.66666667%; - } - .col-md-offset-4 { - margin-left: 33.33333333%; - } - .col-md-offset-3 { - margin-left: 25%; - } - .col-md-offset-2 { - margin-left: 16.66666667%; - } - .col-md-offset-1 { - margin-left: 8.33333333%; - } - .col-md-offset-0 { - margin-left: 0%; - } -} -@media (min-width: 1200px) { - .col-lg-1, - .col-lg-2, - .col-lg-3, - .col-lg-4, - .col-lg-5, - .col-lg-6, - .col-lg-7, - .col-lg-8, - .col-lg-9, - .col-lg-10, - .col-lg-11, - .col-lg-12 { - float: left; - } - .col-lg-12 { - width: 100%; - } - .col-lg-11 { - width: 91.66666667%; - } - .col-lg-10 { - width: 83.33333333%; - } - .col-lg-9 { - width: 75%; - } - .col-lg-8 { - width: 66.66666667%; - } - .col-lg-7 { - width: 58.33333333%; - } - .col-lg-6 { - width: 50%; - } - .col-lg-5 { - width: 41.66666667%; - } - .col-lg-4 { - width: 33.33333333%; - } - .col-lg-3 { - width: 25%; - } - .col-lg-2 { - width: 16.66666667%; - } - .col-lg-1 { - width: 8.33333333%; - } - .col-lg-pull-12 { - right: 100%; - } - .col-lg-pull-11 { - right: 91.66666667%; - } - .col-lg-pull-10 { - right: 83.33333333%; - } - .col-lg-pull-9 { - right: 75%; - } - .col-lg-pull-8 { - right: 66.66666667%; - } - .col-lg-pull-7 { - right: 58.33333333%; - } - .col-lg-pull-6 { - right: 50%; - } - .col-lg-pull-5 { - right: 41.66666667%; - } - .col-lg-pull-4 { - right: 33.33333333%; - } - .col-lg-pull-3 { - right: 25%; - } - .col-lg-pull-2 { - right: 16.66666667%; - } - .col-lg-pull-1 { - right: 8.33333333%; - } - .col-lg-pull-0 { - right: auto; - } - .col-lg-push-12 { - left: 100%; - } - .col-lg-push-11 { - left: 91.66666667%; - } - .col-lg-push-10 { - left: 83.33333333%; - } - .col-lg-push-9 { - left: 75%; - } - .col-lg-push-8 { - left: 66.66666667%; - } - .col-lg-push-7 { - left: 58.33333333%; - } - .col-lg-push-6 { - left: 50%; - } - .col-lg-push-5 { - left: 41.66666667%; - } - .col-lg-push-4 { - left: 33.33333333%; - } - .col-lg-push-3 { - left: 25%; - } - .col-lg-push-2 { - left: 16.66666667%; - } - .col-lg-push-1 { - left: 8.33333333%; - } - .col-lg-push-0 { - left: auto; - } - .col-lg-offset-12 { - margin-left: 100%; - } - .col-lg-offset-11 { - margin-left: 91.66666667%; - } - .col-lg-offset-10 { - margin-left: 83.33333333%; - } - .col-lg-offset-9 { - margin-left: 75%; - } - .col-lg-offset-8 { - margin-left: 66.66666667%; - } - .col-lg-offset-7 { - margin-left: 58.33333333%; - } - .col-lg-offset-6 { - margin-left: 50%; - } - .col-lg-offset-5 { - margin-left: 41.66666667%; - } - .col-lg-offset-4 { - margin-left: 33.33333333%; - } - .col-lg-offset-3 { - margin-left: 25%; - } - .col-lg-offset-2 { - margin-left: 16.66666667%; - } - .col-lg-offset-1 { - margin-left: 8.33333333%; - } - .col-lg-offset-0 { - margin-left: 0%; - } -} - - -.btn-lg, -.btn-group-lg > .btn { - padding: 10px 16px; - font-size: 18px; - line-height: 1.3333333; - border-radius: 6px; -} -.btn-sm, -.btn-group-sm > .btn { - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -.btn-xs, -.btn-group-xs > .btn { - padding: 1px 5px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -.btn-block { - display: block; - width: 100%; -} -.btn-block + .btn-block { - margin-top: 5px; -} -#sideBarContainer > ul > li{ - width: 100%; -} - -.pull-right { - float: right !important; -} -.pull-left { - float: left !important; -} -#sideBarContainer > ul > li > ul{ - display: block; -} -#sideBarContainer .nav > li > a{ - position: relative; - display: block; - padding: 10px 15px; -} - -#sideBarContainer .nav > li > a:hover, -#sideBarContainer .nav > li > a:focus { - text-decoration: none; - background-color: #eeeeee; -} - -a { - text-decoration: none; - text-decoration-line: none; - text-decoration-thickness: initial; - text-decoration-style: initial; - text-decoration-color: initial; -} - -#sideBarContainer > ul > li > ul.dropdown-menu { - display: none; -} -#sideBarContainer > ul > li > ul.dropdown-menu a { - margin: 0 20px; +#mainNavBar { + display: block; +} +body { + padding-top: 0 !important; +} +.hidden { + display: none; +} +@media (max-width: 767px) { + .hidden-xs { + display: none !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .hidden-sm { + display: none !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-md { + display: none !important; + } +} +@media (min-width: 1200px) { + .hidden-lg { + display: none !important; + } +} + +.visible-xs, +.visible-sm, +.visible-md, +.visible-lg { + display: none !important; +} +.visible-xs-block, +.visible-xs-inline, +.visible-xs-inline-block, +.visible-sm-block, +.visible-sm-inline, +.visible-sm-inline-block, +.visible-md-block, +.visible-md-inline, +.visible-md-inline-block, +.visible-lg-block, +.visible-lg-inline, +.visible-lg-inline-block { + display: none !important; +} +@media (max-width: 767px) { + .visible-xs { + display: block !important; + } + table.visible-xs { + display: table !important; + } + tr.visible-xs { + display: table-row !important; + } + th.visible-xs, + td.visible-xs { + display: table-cell !important; + } +} +@media (max-width: 767px) { + .visible-xs-block { + display: block !important; + } +} +@media (max-width: 767px) { + .visible-xs-inline { + display: inline !important; + } +} +@media (max-width: 767px) { + .visible-xs-inline-block { + display: inline-block !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm { + display: block !important; + } + table.visible-sm { + display: table !important; + } + tr.visible-sm { + display: table-row !important; + } + th.visible-sm, + td.visible-sm { + display: table-cell !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-block { + display: block !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline { + display: inline !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline-block { + display: inline-block !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md { + display: block !important; + } + table.visible-md { + display: table !important; + } + tr.visible-md { + display: table-row !important; + } + th.visible-md, + td.visible-md { + display: table-cell !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-block { + display: block !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline { + display: inline !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline-block { + display: inline-block !important; + } +} +@media (min-width: 1200px) { + .visible-lg { + display: block !important; + } + table.visible-lg { + display: table !important; + } + tr.visible-lg { + display: table-row !important; + } + th.visible-lg, + td.visible-lg { + display: table-cell !important; + } +} +@media (min-width: 1200px) { + .visible-lg-block { + display: block !important; + } +} +@media (min-width: 1200px) { + .visible-lg-inline { + display: inline !important; + } +} +@media (min-width: 1200px) { + .visible-lg-inline-block { + display: inline-block !important; + } +} +@media (max-width: 767px) { + .hidden-xs { + display: none !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .hidden-sm { + display: none !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-md { + display: none !important; + } +} +@media (min-width: 1200px) { + .hidden-lg { + display: none !important; + } +} +.visible-print { + display: none !important; +} +@media print { + .visible-print { + display: block !important; + } + table.visible-print { + display: table !important; + } + tr.visible-print { + display: table-row !important; + } + th.visible-print, + td.visible-print { + display: table-cell !important; + } +} +.navbar-toggle { + position: relative; + float: right; + padding: 9px 10px; + margin-right: 15px; + margin-top: 8px; + margin-bottom: 8px; + background-color: transparent; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.navbar-toggle:focus { + outline: 0; +} +.navbar-toggle .icon-bar { + display: block; + width: 22px; + height: 2px; + border-radius: 1px; +} +.navbar-toggle .icon-bar + .icon-bar { + margin-top: 4px; +} +@media (min-width: 768px) { + .navbar-toggle { + display: none; + } +} +.navbar-lang-btn .select2-container { + margin: 0 !important; +} +.img-circle { + border-radius: 50%; +} + +.btn-default { + color: #333; + background-color: #fff; + border-color: #ccc; +} +.btn-default:focus, +.btn-default.focus { + color: #333; + background-color: #e6e6e6; + border-color: #8c8c8c; +} +.btn-default:hover { + color: #333; + background-color: #e6e6e6; + border-color: #adadad; +} +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + color: #333; + background-color: #e6e6e6; + background-image: none; + border-color: #adadad; +} +.btn-default:active:hover, +.btn-default.active:hover, +.open > .dropdown-toggle.btn-default:hover, +.btn-default:active:focus, +.btn-default.active:focus, +.open > .dropdown-toggle.btn-default:focus, +.btn-default:active.focus, +.btn-default.active.focus, +.open > .dropdown-toggle.btn-default.focus { + color: #333; + background-color: #d4d4d4; + border-color: #8c8c8c; +} +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +fieldset[disabled] .btn-default:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +fieldset[disabled] .btn-default:focus, +.btn-default.disabled.focus, +.btn-default[disabled].focus, +fieldset[disabled] .btn-default.focus { + background-color: #fff; + border-color: #ccc; +} +.btn-default .badge { + color: #fff; + background-color: #333; +} +.btn-primary { + color: #fff; + background-color: #337ab7; + border-color: #2e6da4; +} +.btn-primary:focus, +.btn-primary.focus { + color: #fff; + background-color: #286090; + border-color: #122b40; +} +.btn-primary:hover { + color: #fff; + background-color: #286090; + border-color: #204d74; +} +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + color: #fff; + background-color: #286090; + background-image: none; + border-color: #204d74; +} +.btn-primary:active:hover, +.btn-primary.active:hover, +.open > .dropdown-toggle.btn-primary:hover, +.btn-primary:active:focus, +.btn-primary.active:focus, +.open > .dropdown-toggle.btn-primary:focus, +.btn-primary:active.focus, +.btn-primary.active.focus, +.open > .dropdown-toggle.btn-primary.focus { + color: #fff; + background-color: #204d74; + border-color: #122b40; +} +.btn-primary.disabled:hover, +.btn-primary[disabled]:hover, +fieldset[disabled] .btn-primary:hover, +.btn-primary.disabled:focus, +.btn-primary[disabled]:focus, +fieldset[disabled] .btn-primary:focus, +.btn-primary.disabled.focus, +.btn-primary[disabled].focus, +fieldset[disabled] .btn-primary.focus { + background-color: #337ab7; + border-color: #2e6da4; +} +.btn-primary .badge { + color: #337ab7; + background-color: #fff; +} +.btn-success { + color: #fff; + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success:focus, +.btn-success.focus { + color: #fff; + background-color: #449d44; + border-color: #255625; +} +.btn-success:hover { + color: #fff; + background-color: #449d44; + border-color: #398439; +} +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + color: #fff; + background-color: #449d44; + background-image: none; + border-color: #398439; +} +.btn-success:active:hover, +.btn-success.active:hover, +.open > .dropdown-toggle.btn-success:hover, +.btn-success:active:focus, +.btn-success.active:focus, +.open > .dropdown-toggle.btn-success:focus, +.btn-success:active.focus, +.btn-success.active.focus, +.open > .dropdown-toggle.btn-success.focus { + color: #fff; + background-color: #398439; + border-color: #255625; +} +.btn-success.disabled:hover, +.btn-success[disabled]:hover, +fieldset[disabled] .btn-success:hover, +.btn-success.disabled:focus, +.btn-success[disabled]:focus, +fieldset[disabled] .btn-success:focus, +.btn-success.disabled.focus, +.btn-success[disabled].focus, +fieldset[disabled] .btn-success.focus { + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success .badge { + color: #5cb85c; + background-color: #fff; +} +.btn-info { + color: #fff; + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info:focus, +.btn-info.focus { + color: #fff; + background-color: #31b0d5; + border-color: #1b6d85; +} +.btn-info:hover { + color: #fff; + background-color: #31b0d5; + border-color: #269abc; +} +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + color: #fff; + background-color: #31b0d5; + background-image: none; + border-color: #269abc; +} +.btn-info:active:hover, +.btn-info.active:hover, +.open > .dropdown-toggle.btn-info:hover, +.btn-info:active:focus, +.btn-info.active:focus, +.open > .dropdown-toggle.btn-info:focus, +.btn-info:active.focus, +.btn-info.active.focus, +.open > .dropdown-toggle.btn-info.focus { + color: #fff; + background-color: #269abc; + border-color: #1b6d85; +} +.btn-info.disabled:hover, +.btn-info[disabled]:hover, +fieldset[disabled] .btn-info:hover, +.btn-info.disabled:focus, +.btn-info[disabled]:focus, +fieldset[disabled] .btn-info:focus, +.btn-info.disabled.focus, +.btn-info[disabled].focus, +fieldset[disabled] .btn-info.focus { + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info .badge { + color: #5bc0de; + background-color: #fff; +} +.btn-warning { + color: #fff; + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning:focus, +.btn-warning.focus { + color: #fff; + background-color: #ec971f; + border-color: #985f0d; +} +.btn-warning:hover { + color: #fff; + background-color: #ec971f; + border-color: #d58512; +} +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + color: #fff; + background-color: #ec971f; + background-image: none; + border-color: #d58512; +} +.btn-warning:active:hover, +.btn-warning.active:hover, +.open > .dropdown-toggle.btn-warning:hover, +.btn-warning:active:focus, +.btn-warning.active:focus, +.open > .dropdown-toggle.btn-warning:focus, +.btn-warning:active.focus, +.btn-warning.active.focus, +.open > .dropdown-toggle.btn-warning.focus { + color: #fff; + background-color: #d58512; + border-color: #985f0d; +} +.btn-warning.disabled:hover, +.btn-warning[disabled]:hover, +fieldset[disabled] .btn-warning:hover, +.btn-warning.disabled:focus, +.btn-warning[disabled]:focus, +fieldset[disabled] .btn-warning:focus, +.btn-warning.disabled.focus, +.btn-warning[disabled].focus, +fieldset[disabled] .btn-warning.focus { + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning .badge { + color: #f0ad4e; + background-color: #fff; +} +.btn-danger { + color: #fff; + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger:focus, +.btn-danger.focus { + color: #fff; + background-color: #c9302c; + border-color: #761c19; +} +.btn-danger:hover { + color: #fff; + background-color: #c9302c; + border-color: #ac2925; +} +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + color: #fff; + background-color: #c9302c; + background-image: none; + border-color: #ac2925; +} +.btn-danger:active:hover, +.btn-danger.active:hover, +.open > .dropdown-toggle.btn-danger:hover, +.btn-danger:active:focus, +.btn-danger.active:focus, +.open > .dropdown-toggle.btn-danger:focus, +.btn-danger:active.focus, +.btn-danger.active.focus, +.open > .dropdown-toggle.btn-danger.focus { + color: #fff; + background-color: #ac2925; + border-color: #761c19; +} +.btn-danger.disabled:hover, +.btn-danger[disabled]:hover, +fieldset[disabled] .btn-danger:hover, +.btn-danger.disabled:focus, +.btn-danger[disabled]:focus, +fieldset[disabled] .btn-danger:focus, +.btn-danger.disabled.focus, +.btn-danger[disabled].focus, +fieldset[disabled] .btn-danger.focus { + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger .badge { + color: #d9534f; + background-color: #fff; +} + +.panel { + margin-bottom: 20px; + background-color: #fff; + border: 1px solid transparent; + border-radius: 4px; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); +} +.panel-body { + padding: 15px; +} +.panel-heading { + padding: 10px 15px; + border-bottom: 1px solid transparent; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel-heading > .dropdown .dropdown-toggle { + color: inherit; +} +.panel-title { + margin-top: 0; + margin-bottom: 0; + font-size: 16px; + color: inherit; +} +.panel-title > a, +.panel-title > small, +.panel-title > .small, +.panel-title > small > a, +.panel-title > .small > a { + color: inherit; +} +.panel-footer { + padding: 10px 15px; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .list-group, +.panel > .panel-collapse > .list-group { + margin-bottom: 0; +} +.panel > .list-group .list-group-item, +.panel > .panel-collapse > .list-group .list-group-item { + border-width: 1px 0; + border-radius: 0; +} +.panel > .list-group:first-child .list-group-item:first-child, +.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { + border-top: 0; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .list-group:last-child .list-group-item:last-child, +.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { + border-bottom: 0; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.panel-heading + .list-group .list-group-item:first-child { + border-top-width: 0; +} +.list-group + .panel-footer { + border-top-width: 0; +} +.panel > .table, +.panel > .table-responsive > .table, +.panel > .panel-collapse > .table { + margin-bottom: 0; +} +.panel > .table caption, +.panel > .table-responsive > .table caption, +.panel > .panel-collapse > .table caption { + padding-right: 15px; + padding-left: 15px; +} +.panel > .table:first-child, +.panel > .table-responsive:first-child > .table:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { + border-top-left-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { + border-top-right-radius: 3px; +} +.panel > .table:last-child, +.panel > .table-responsive:last-child > .table:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { + border-bottom-right-radius: 3px; +} +.panel > .panel-body + .table, +.panel > .panel-body + .table-responsive, +.panel > .table + .panel-body, +.panel > .table-responsive + .panel-body { + border-top: 1px solid #ddd; +} +.panel > .table > tbody:first-child > tr:first-child th, +.panel > .table > tbody:first-child > tr:first-child td { + border-top: 0; +} +.panel > .table-bordered, +.panel > .table-responsive > .table-bordered { + border: 0; +} +.panel > .table-bordered > thead > tr > th:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, +.panel > .table-bordered > tbody > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, +.panel > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-bordered > thead > tr > td:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, +.panel > .table-bordered > tbody > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, +.panel > .table-bordered > tfoot > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; +} +.panel > .table-bordered > thead > tr > th:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, +.panel > .table-bordered > tbody > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, +.panel > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-bordered > thead > tr > td:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, +.panel > .table-bordered > tbody > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, +.panel > .table-bordered > tfoot > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; +} +.panel > .table-bordered > thead > tr:first-child > td, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, +.panel > .table-bordered > tbody > tr:first-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, +.panel > .table-bordered > thead > tr:first-child > th, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, +.panel > .table-bordered > tbody > tr:first-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { + border-bottom: 0; +} +.panel > .table-bordered > tbody > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, +.panel > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-bordered > tbody > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, +.panel > .table-bordered > tfoot > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { + border-bottom: 0; +} +.panel > .table-responsive { + margin-bottom: 0; + border: 0; +} +.panel-group { + margin-bottom: 20px; +} +.panel-group .panel { + margin-bottom: 0; + border-radius: 4px; +} +.panel-group .panel + .panel { + margin-top: 5px; +} +.panel-group .panel-heading { + border-bottom: 0; +} +.panel-group .panel-heading + .panel-collapse > .panel-body, +.panel-group .panel-heading + .panel-collapse > .list-group { + border-top: 1px solid #ddd; +} +.panel-group .panel-footer { + border-top: 0; +} +.panel-group .panel-footer + .panel-collapse .panel-body { + border-bottom: 1px solid #ddd; +} +.panel-default { + border-color: #ddd; +} +.panel-default > .panel-heading { + color: #333333; + background-color: #f5f5f5; + border-color: #ddd; +} +.panel-default > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ddd; +} +.panel-default > .panel-heading .badge { + color: #f5f5f5; + background-color: #333333; +} +.panel-default > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ddd; +} +.panel-primary { + border-color: #337ab7; +} +.panel-primary > .panel-heading { + color: #fff; + background-color: #337ab7; + border-color: #337ab7; +} +.panel-primary > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #337ab7; +} +.panel-primary > .panel-heading .badge { + color: #337ab7; + background-color: #fff; +} +.panel-primary > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #337ab7; +} +.panel-success { + border-color: #d6e9c6; +} +.panel-success > .panel-heading { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.panel-success > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #d6e9c6; +} +.panel-success > .panel-heading .badge { + color: #dff0d8; + background-color: #3c763d; +} +.panel-success > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #d6e9c6; +} +.panel-info { + border-color: #bce8f1; +} +.panel-info > .panel-heading { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.panel-info > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #bce8f1; +} +.panel-info > .panel-heading .badge { + color: #d9edf7; + background-color: #31708f; +} +.panel-info > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #bce8f1; +} +.panel-warning { + border-color: #faebcc; +} +.panel-warning > .panel-heading { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +.panel-warning > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #faebcc; +} +.panel-warning > .panel-heading .badge { + color: #fcf8e3; + background-color: #8a6d3b; +} +.panel-warning > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #faebcc; +} +.panel-danger { + border-color: #ebccd1; +} +.panel-danger > .panel-heading { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.panel-danger > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ebccd1; +} +.panel-danger > .panel-heading .badge { + color: #f2dede; + background-color: #a94442; +} +.panel-danger > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ebccd1; +} + + +.col-xs-1, +.col-sm-1, +.col-md-1, +.col-lg-1, +.col-xs-2, +.col-sm-2, +.col-md-2, +.col-lg-2, +.col-xs-3, +.col-sm-3, +.col-md-3, +.col-lg-3, +.col-xs-4, +.col-sm-4, +.col-md-4, +.col-lg-4, +.col-xs-5, +.col-sm-5, +.col-md-5, +.col-lg-5, +.col-xs-6, +.col-sm-6, +.col-md-6, +.col-lg-6, +.col-xs-7, +.col-sm-7, +.col-md-7, +.col-lg-7, +.col-xs-8, +.col-sm-8, +.col-md-8, +.col-lg-8, +.col-xs-9, +.col-sm-9, +.col-md-9, +.col-lg-9, +.col-xs-10, +.col-sm-10, +.col-md-10, +.col-lg-10, +.col-xs-11, +.col-sm-11, +.col-md-11, +.col-lg-11, +.col-xs-12, +.col-sm-12, +.col-md-12, +.col-lg-12 { + position: relative; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; +} +.col-xs-1, +.col-xs-2, +.col-xs-3, +.col-xs-4, +.col-xs-5, +.col-xs-6, +.col-xs-7, +.col-xs-8, +.col-xs-9, +.col-xs-10, +.col-xs-11, +.col-xs-12 { + float: left; +} +.col-xs-12 { + width: 100%; +} +.col-xs-11 { + width: 91.66666667%; +} +.col-xs-10 { + width: 83.33333333%; +} +.col-xs-9 { + width: 75%; +} +.col-xs-8 { + width: 66.66666667%; +} +.col-xs-7 { + width: 58.33333333%; +} +.col-xs-6 { + width: 50%; +} +.col-xs-5 { + width: 41.66666667%; +} +.col-xs-4 { + width: 33.33333333%; +} +.col-xs-3 { + width: 25%; +} +.col-xs-2 { + width: 16.66666667%; +} +.col-xs-1 { + width: 8.33333333%; +} +.col-xs-pull-12 { + right: 100%; +} +.col-xs-pull-11 { + right: 91.66666667%; +} +.col-xs-pull-10 { + right: 83.33333333%; +} +.col-xs-pull-9 { + right: 75%; +} +.col-xs-pull-8 { + right: 66.66666667%; +} +.col-xs-pull-7 { + right: 58.33333333%; +} +.col-xs-pull-6 { + right: 50%; +} +.col-xs-pull-5 { + right: 41.66666667%; +} +.col-xs-pull-4 { + right: 33.33333333%; +} +.col-xs-pull-3 { + right: 25%; +} +.col-xs-pull-2 { + right: 16.66666667%; +} +.col-xs-pull-1 { + right: 8.33333333%; +} +.col-xs-pull-0 { + right: auto; +} +.col-xs-push-12 { + left: 100%; +} +.col-xs-push-11 { + left: 91.66666667%; +} +.col-xs-push-10 { + left: 83.33333333%; +} +.col-xs-push-9 { + left: 75%; +} +.col-xs-push-8 { + left: 66.66666667%; +} +.col-xs-push-7 { + left: 58.33333333%; +} +.col-xs-push-6 { + left: 50%; +} +.col-xs-push-5 { + left: 41.66666667%; +} +.col-xs-push-4 { + left: 33.33333333%; +} +.col-xs-push-3 { + left: 25%; +} +.col-xs-push-2 { + left: 16.66666667%; +} +.col-xs-push-1 { + left: 8.33333333%; +} +.col-xs-push-0 { + left: auto; +} +.col-xs-offset-12 { + margin-left: 100%; +} +.col-xs-offset-11 { + margin-left: 91.66666667%; +} +.col-xs-offset-10 { + margin-left: 83.33333333%; +} +.col-xs-offset-9 { + margin-left: 75%; +} +.col-xs-offset-8 { + margin-left: 66.66666667%; +} +.col-xs-offset-7 { + margin-left: 58.33333333%; +} +.col-xs-offset-6 { + margin-left: 50%; +} +.col-xs-offset-5 { + margin-left: 41.66666667%; +} +.col-xs-offset-4 { + margin-left: 33.33333333%; +} +.col-xs-offset-3 { + margin-left: 25%; +} +.col-xs-offset-2 { + margin-left: 16.66666667%; +} +.col-xs-offset-1 { + margin-left: 8.33333333%; +} +.col-xs-offset-0 { + margin-left: 0%; +} +@media (min-width: 768px) { + .col-sm-1, + .col-sm-2, + .col-sm-3, + .col-sm-4, + .col-sm-5, + .col-sm-6, + .col-sm-7, + .col-sm-8, + .col-sm-9, + .col-sm-10, + .col-sm-11, + .col-sm-12 { + float: left; + } + .col-sm-12 { + width: 100%; + } + .col-sm-11 { + width: 91.66666667%; + } + .col-sm-10 { + width: 83.33333333%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-8 { + width: 66.66666667%; + } + .col-sm-7 { + width: 58.33333333%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-5 { + width: 41.66666667%; + } + .col-sm-4 { + width: 33.33333333%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-2 { + width: 16.66666667%; + } + .col-sm-1 { + width: 8.33333333%; + } + .col-sm-pull-12 { + right: 100%; + } + .col-sm-pull-11 { + right: 91.66666667%; + } + .col-sm-pull-10 { + right: 83.33333333%; + } + .col-sm-pull-9 { + right: 75%; + } + .col-sm-pull-8 { + right: 66.66666667%; + } + .col-sm-pull-7 { + right: 58.33333333%; + } + .col-sm-pull-6 { + right: 50%; + } + .col-sm-pull-5 { + right: 41.66666667%; + } + .col-sm-pull-4 { + right: 33.33333333%; + } + .col-sm-pull-3 { + right: 25%; + } + .col-sm-pull-2 { + right: 16.66666667%; + } + .col-sm-pull-1 { + right: 8.33333333%; + } + .col-sm-pull-0 { + right: auto; + } + .col-sm-push-12 { + left: 100%; + } + .col-sm-push-11 { + left: 91.66666667%; + } + .col-sm-push-10 { + left: 83.33333333%; + } + .col-sm-push-9 { + left: 75%; + } + .col-sm-push-8 { + left: 66.66666667%; + } + .col-sm-push-7 { + left: 58.33333333%; + } + .col-sm-push-6 { + left: 50%; + } + .col-sm-push-5 { + left: 41.66666667%; + } + .col-sm-push-4 { + left: 33.33333333%; + } + .col-sm-push-3 { + left: 25%; + } + .col-sm-push-2 { + left: 16.66666667%; + } + .col-sm-push-1 { + left: 8.33333333%; + } + .col-sm-push-0 { + left: auto; + } + .col-sm-offset-12 { + margin-left: 100%; + } + .col-sm-offset-11 { + margin-left: 91.66666667%; + } + .col-sm-offset-10 { + margin-left: 83.33333333%; + } + .col-sm-offset-9 { + margin-left: 75%; + } + .col-sm-offset-8 { + margin-left: 66.66666667%; + } + .col-sm-offset-7 { + margin-left: 58.33333333%; + } + .col-sm-offset-6 { + margin-left: 50%; + } + .col-sm-offset-5 { + margin-left: 41.66666667%; + } + .col-sm-offset-4 { + margin-left: 33.33333333%; + } + .col-sm-offset-3 { + margin-left: 25%; + } + .col-sm-offset-2 { + margin-left: 16.66666667%; + } + .col-sm-offset-1 { + margin-left: 8.33333333%; + } + .col-sm-offset-0 { + margin-left: 0%; + } +} +@media (min-width: 992px) { + .col-md-1, + .col-md-2, + .col-md-3, + .col-md-4, + .col-md-5, + .col-md-6, + .col-md-7, + .col-md-8, + .col-md-9, + .col-md-10, + .col-md-11, + .col-md-12 { + float: left; + } + .col-md-12 { + width: 100%; + } + .col-md-11 { + width: 91.66666667%; + } + .col-md-10 { + width: 83.33333333%; + } + .col-md-9 { + width: 75%; + } + .col-md-8 { + width: 66.66666667%; + } + .col-md-7 { + width: 58.33333333%; + } + .col-md-6 { + width: 50%; + } + .col-md-5 { + width: 41.66666667%; + } + .col-md-4 { + width: 33.33333333%; + } + .col-md-3 { + width: 25%; + } + .col-md-2 { + width: 16.66666667%; + } + .col-md-1 { + width: 8.33333333%; + } + .col-md-pull-12 { + right: 100%; + } + .col-md-pull-11 { + right: 91.66666667%; + } + .col-md-pull-10 { + right: 83.33333333%; + } + .col-md-pull-9 { + right: 75%; + } + .col-md-pull-8 { + right: 66.66666667%; + } + .col-md-pull-7 { + right: 58.33333333%; + } + .col-md-pull-6 { + right: 50%; + } + .col-md-pull-5 { + right: 41.66666667%; + } + .col-md-pull-4 { + right: 33.33333333%; + } + .col-md-pull-3 { + right: 25%; + } + .col-md-pull-2 { + right: 16.66666667%; + } + .col-md-pull-1 { + right: 8.33333333%; + } + .col-md-pull-0 { + right: auto; + } + .col-md-push-12 { + left: 100%; + } + .col-md-push-11 { + left: 91.66666667%; + } + .col-md-push-10 { + left: 83.33333333%; + } + .col-md-push-9 { + left: 75%; + } + .col-md-push-8 { + left: 66.66666667%; + } + .col-md-push-7 { + left: 58.33333333%; + } + .col-md-push-6 { + left: 50%; + } + .col-md-push-5 { + left: 41.66666667%; + } + .col-md-push-4 { + left: 33.33333333%; + } + .col-md-push-3 { + left: 25%; + } + .col-md-push-2 { + left: 16.66666667%; + } + .col-md-push-1 { + left: 8.33333333%; + } + .col-md-push-0 { + left: auto; + } + .col-md-offset-12 { + margin-left: 100%; + } + .col-md-offset-11 { + margin-left: 91.66666667%; + } + .col-md-offset-10 { + margin-left: 83.33333333%; + } + .col-md-offset-9 { + margin-left: 75%; + } + .col-md-offset-8 { + margin-left: 66.66666667%; + } + .col-md-offset-7 { + margin-left: 58.33333333%; + } + .col-md-offset-6 { + margin-left: 50%; + } + .col-md-offset-5 { + margin-left: 41.66666667%; + } + .col-md-offset-4 { + margin-left: 33.33333333%; + } + .col-md-offset-3 { + margin-left: 25%; + } + .col-md-offset-2 { + margin-left: 16.66666667%; + } + .col-md-offset-1 { + margin-left: 8.33333333%; + } + .col-md-offset-0 { + margin-left: 0%; + } +} +@media (min-width: 1200px) { + .col-lg-1, + .col-lg-2, + .col-lg-3, + .col-lg-4, + .col-lg-5, + .col-lg-6, + .col-lg-7, + .col-lg-8, + .col-lg-9, + .col-lg-10, + .col-lg-11, + .col-lg-12 { + float: left; + } + .col-lg-12 { + width: 100%; + } + .col-lg-11 { + width: 91.66666667%; + } + .col-lg-10 { + width: 83.33333333%; + } + .col-lg-9 { + width: 75%; + } + .col-lg-8 { + width: 66.66666667%; + } + .col-lg-7 { + width: 58.33333333%; + } + .col-lg-6 { + width: 50%; + } + .col-lg-5 { + width: 41.66666667%; + } + .col-lg-4 { + width: 33.33333333%; + } + .col-lg-3 { + width: 25%; + } + .col-lg-2 { + width: 16.66666667%; + } + .col-lg-1 { + width: 8.33333333%; + } + .col-lg-pull-12 { + right: 100%; + } + .col-lg-pull-11 { + right: 91.66666667%; + } + .col-lg-pull-10 { + right: 83.33333333%; + } + .col-lg-pull-9 { + right: 75%; + } + .col-lg-pull-8 { + right: 66.66666667%; + } + .col-lg-pull-7 { + right: 58.33333333%; + } + .col-lg-pull-6 { + right: 50%; + } + .col-lg-pull-5 { + right: 41.66666667%; + } + .col-lg-pull-4 { + right: 33.33333333%; + } + .col-lg-pull-3 { + right: 25%; + } + .col-lg-pull-2 { + right: 16.66666667%; + } + .col-lg-pull-1 { + right: 8.33333333%; + } + .col-lg-pull-0 { + right: auto; + } + .col-lg-push-12 { + left: 100%; + } + .col-lg-push-11 { + left: 91.66666667%; + } + .col-lg-push-10 { + left: 83.33333333%; + } + .col-lg-push-9 { + left: 75%; + } + .col-lg-push-8 { + left: 66.66666667%; + } + .col-lg-push-7 { + left: 58.33333333%; + } + .col-lg-push-6 { + left: 50%; + } + .col-lg-push-5 { + left: 41.66666667%; + } + .col-lg-push-4 { + left: 33.33333333%; + } + .col-lg-push-3 { + left: 25%; + } + .col-lg-push-2 { + left: 16.66666667%; + } + .col-lg-push-1 { + left: 8.33333333%; + } + .col-lg-push-0 { + left: auto; + } + .col-lg-offset-12 { + margin-left: 100%; + } + .col-lg-offset-11 { + margin-left: 91.66666667%; + } + .col-lg-offset-10 { + margin-left: 83.33333333%; + } + .col-lg-offset-9 { + margin-left: 75%; + } + .col-lg-offset-8 { + margin-left: 66.66666667%; + } + .col-lg-offset-7 { + margin-left: 58.33333333%; + } + .col-lg-offset-6 { + margin-left: 50%; + } + .col-lg-offset-5 { + margin-left: 41.66666667%; + } + .col-lg-offset-4 { + margin-left: 33.33333333%; + } + .col-lg-offset-3 { + margin-left: 25%; + } + .col-lg-offset-2 { + margin-left: 16.66666667%; + } + .col-lg-offset-1 { + margin-left: 8.33333333%; + } + .col-lg-offset-0 { + margin-left: 0%; + } +} + + +.btn-lg, +.btn-group-lg > .btn { + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +.btn-sm, +.btn-group-sm > .btn { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-xs, +.btn-group-xs > .btn { + padding: 1px 5px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; +} +.btn-block + .btn-block { + margin-top: 5px; +} +#sideBarContainer > ul > li{ + width: 100%; +} + +.pull-right { + float: right !important; +} +.pull-left { + float: left !important; +} +#sideBarContainer > ul > li > ul{ + display: block; +} +#sideBarContainer .nav > li > a{ + position: relative; + display: block; + padding: 10px 15px; +} + +#sideBarContainer .nav > li > a:hover, +#sideBarContainer .nav > li > a:focus { + text-decoration: none; + background-color: #eeeeee; +} + +a { + text-decoration: none; + text-decoration-line: none; + text-decoration-thickness: initial; + text-decoration-style: initial; + text-decoration-color: initial; +} + +#sideBarContainer > ul > li > ul.dropdown-menu { + display: none; +} +#sideBarContainer > ul > li > ul.dropdown-menu a { + margin: 0 20px; } \ No newline at end of file diff --git a/view/channelBody.php b/view/channelBody.php index 51435a8332..fd09860898 100644 --- a/view/channelBody.php +++ b/view/channelBody.php @@ -24,10 +24,10 @@ $current = $_POST['current']; $rowCount = 25; $_REQUEST['rowCount'] = $rowCount; -if(empty($channelPassword) && !$isMyChannel){ +if (empty($channelPassword) && !$isMyChannel) { $status = 'a'; $showUnlisted = false; -}else{ +} else { $status = 'viewable'; $showUnlisted = true; } @@ -103,17 +103,17 @@ $obj = AVideoPlugin::getObjectData("YouPHPFlix2"); doNotShowTopBannerOnChannel)) { - if(isMobile()){ + if (isMobile()) { $relativePath = $user->getBackgroundURL(User::$channel_artDesktopMin); - }else{ + } else { $relativePath = $user->getBackgroundURL(User::$channel_artDesktopMax); } ?> -
-
+
+
<?php echo $user->_getName(); ?>
+ showChannelHomeTab) { - if (!empty($_GET['current'])) { // means you are paging the Videos tab - $active = ''; - } ?> + if ($advancedCustomUser->showChannelHomeTab) { + if (!empty($_GET['current'])) { // means you are paging the Videos tab + $active = ''; + } + ?> showChannelVideosTab) { - if (!empty($_GET['current'])) { // means you are paging the Videos tab - $active = "active"; - } ?> + } + if ($advancedCustomUser->showChannelVideosTab) { + if (!empty($_GET['current'])) { // means you are paging the Videos tab + $active = "active"; + } + ?> showChannelProgramsTab && !empty($palyListsObj)) { - $totalPrograms = PlayList::getAllFromUserLight($user_id, true, false, 0, true, true); - if ($totalPrograms) { - ?> + } + if ($advancedCustomUser->showChannelProgramsTab && !empty($palyListsObj)) { + $totalPrograms = PlayList::getAllFromUserLight($user_id, true, false, 0, true, true); + if ($totalPrograms) { + ?> + } + } + ?>
showChannelHomeTab) { - if (!empty($_GET['current'])) { // means you are paging the Videos tab - $active = ''; - } - $obj = AVideoPlugin::getObjectData("YouPHPFlix2"); ?> - + if ($advancedCustomUser->showChannelHomeTab) { + if (!empty($_GET['current'])) { // means you are paging the Videos tab + $active = ''; + } + $obj = AVideoPlugin::getObjectData("YouPHPFlix2"); + ?> +
BigVideo = true; - $obj->PlayList = false; - $obj->Channels = false; - $obj->Trending = false; - $obj->pageDots = false; - $obj->TrendingAutoPlay = false; - $obj->maxVideos = 12; - $obj->Suggested = false; - $obj->paidOnlyLabelOverPoster = false; - $obj->DateAdded = true; - $obj->DateAddedAutoPlay = true; - $obj->MostPopular = false; - $obj->MostWatched = false; - $obj->SortByName = false; - $obj->Categories = false; - $obj->playVideoOnFullscreen = false; - $obj->titleLabel = true; - $obj->RemoveBigVideoDescription = true; + $obj->PlayList = false; + $obj->Channels = false; + $obj->Trending = false; + $obj->pageDots = false; + $obj->TrendingAutoPlay = false; + $obj->maxVideos = 12; + $obj->Suggested = false; + $obj->paidOnlyLabelOverPoster = false; + $obj->DateAdded = true; + $obj->DateAddedAutoPlay = true; + $obj->MostPopular = false; + $obj->MostWatched = false; + $obj->SortByName = false; + $obj->Categories = false; + $obj->playVideoOnFullscreen = false; + $obj->titleLabel = true; + $obj->RemoveBigVideoDescription = true; - include $global['systemRootPath'] . 'plugin/YouPHPFlix2/view/modeFlixBody.php'; ?> + include $global['systemRootPath'] . 'plugin/YouPHPFlix2/view/modeFlixBody.php'; + ?>
showChannelVideosTab) { - if (!empty($_GET['current'])) { // means you are paging the Videos tab - $active = "active fade in"; - } ?> + } + if ($advancedCustomUser->showChannelVideosTab) { + if (!empty($_GET['current'])) { // means you are paging the Videos tab + $active = "active fade in"; + } + ?>
@@ -255,13 +266,14 @@ $obj = AVideoPlugin::getObjectData("YouPHPFlix2"); - + + echo AVideoPlugin::getChannelButton(); + ?>
Description = false; include $global['systemRootPath'] . 'plugin/Gallery/view/BigVideo.php'; unset($uploadedVideos[0]); - } ?> + } + ?>
+ createGallerySection($uploadedVideos, "", $get); + TimeLogEnd($timeLog, __LINE__); + ?>
+ } + if (!empty($totalPrograms)) { + ?>
@@ -301,12 +314,11 @@ $obj = AVideoPlugin::getObjectData("YouPHPFlix2"); name); ?> - +
- +
+ } + ?>
diff --git a/view/css/main.css b/view/css/main.css index 4a6c5af370..4cbbb879e9 100644 --- a/view/css/main.css +++ b/view/css/main.css @@ -582,9 +582,6 @@ nav ul.items-container li:first-child ul.left-side { ul.left-side { height: 50px; } -nav ul.items-container li:last-child { - margin-right: 20px; -} nav ul.items-container li ul.right-menus { display: flex; flex-direction: row; @@ -741,9 +738,6 @@ img.blur{ .rightProfile li a{ text-align: left; } -#mainNavBar ul.items-container li:last-child { - margin-right: 0 !important; -} .ima-controls-div{ pointer-events: none !important; @@ -1121,6 +1115,9 @@ li.dropdown-submenu > ul > li > a{ #avideoModalIframeDiv{ padding-inline-start: 5px; } + button.hamburger{ + display: flex !important; + } } @@ -1265,4 +1262,188 @@ a:hover{ width: 100%; height: 100%; z-index: 1; +} + +/* hamburger menu styles*/ +button.hamburger{ + outline: none !important; + display: flex; + margin: 0 5px; + padding: 0 4px; +} +button.btn-sm.hamburger{ + margin: -2px 5px; + padding: 0; +} +button.btn-sm.hamburger svg{ + width: 24px; +} +.ham { + cursor: pointer; + -webkit-tap-highlight-color: transparent; + transition: transform 400ms; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} +.hamRotate.active { + transform: rotate(45deg); +} +.hamRotate180.active { + transform: rotate(180deg); +} +.line { + fill:none; + transition: stroke-dasharray 400ms, stroke-dashoffset 400ms; + stroke:#000; + stroke-width:5.5; + stroke-linecap:round; +} +.ham1 .top { + stroke-dasharray: 40 139; +} +.ham1 .bottom { + stroke-dasharray: 40 180; +} +.ham1.active .top { + stroke-dashoffset: -98px; +} +.ham1.active .bottom { + stroke-dashoffset: -138px; +} +.ham2 .top { + stroke-dasharray: 40 121; +} +.ham2 .bottom { + stroke-dasharray: 40 121; +} +.ham2.active .top { + stroke-dashoffset: -102px; +} +.ham2.active .bottom { + stroke-dashoffset: -102px; +} +.ham3 .top { + stroke-dasharray: 40 130; +} +.ham3 .middle { + stroke-dasharray: 40 140; +} +.ham3 .bottom { + stroke-dasharray: 40 205; +} +.ham3.active .top { + stroke-dasharray: 75 130; + stroke-dashoffset: -63px; +} +.ham3.active .middle { + stroke-dashoffset: -102px; +} +.ham3.active .bottom { + stroke-dasharray: 110 205; + stroke-dashoffset: -86px; +} +.ham4 .top { + stroke-dasharray: 40 121; +} +.ham4 .bottom { + stroke-dasharray: 40 121; +} +.ham4.active .top { + stroke-dashoffset: -68px; +} +.ham4.active .bottom { + stroke-dashoffset: -68px; +} +.ham5 .top { + stroke-dasharray: 40 82; +} +.ham5 .bottom { + stroke-dasharray: 40 82; +} +.ham5.active .top { + stroke-dasharray: 14 82; + stroke-dashoffset: -72px; +} +.ham5.active .bottom { + stroke-dasharray: 14 82; + stroke-dashoffset: -72px; +} +.ham6 .top { + stroke-dasharray: 40 172; +} +.ham6 .middle { + stroke-dasharray: 40 111; +} +.ham6 .bottom { + stroke-dasharray: 40 172; +} +.ham6.active .top { + stroke-dashoffset: -132px; +} +.ham6.active .middle { + stroke-dashoffset: -71px; +} +.ham6.active .bottom { + stroke-dashoffset: -132px; +} +.ham7 .top { + stroke-dasharray: 40 82; +} +.ham7 .middle { + stroke-dasharray: 40 111; +} +.ham7 .bottom { + stroke-dasharray: 40 161; +} +.ham7.active .top { + stroke-dasharray: 17 82; + stroke-dashoffset: -62px; +} +.ham7.active .middle { + stroke-dashoffset: 23px; +} +.ham7.active .bottom { + stroke-dashoffset: -83px; +} +.ham8 .top { + stroke-dasharray: 40 160; +} +.ham8 .middle { + stroke-dasharray: 40 142; + transform-origin: 50%; + transition: transform 400ms; +} +.ham8 .bottom { + stroke-dasharray: 40 85; + transform-origin: 50%; + transition: transform 400ms, stroke-dashoffset 400ms; +} +.ham8.active .top { + stroke-dashoffset: -64px; +} +.ham8.active .middle { + transform: rotate(90deg); +} +.ham8.active .bottom { + stroke-dashoffset: -64px; +} +.users_id_online_label .label{ + padding: 5px; + border-radius: 5px !important; +} +.users_id_online_label .label-success, +.users_id_online_label .callerButton{ + display: none; +} +.users_id_online_label .label-success:hover{ + animation: glowBox 1s infinite alternate; +} +.users_id_online_label.online .label-success, +.users_id_online_label.online .callerButton{ + display: inline; +} +.users_id_online_label.online .label-danger{ + display: none; } \ No newline at end of file diff --git a/view/css/navbar.css b/view/css/navbar.css new file mode 100644 index 0000000000..90c1a47ee0 --- /dev/null +++ b/view/css/navbar.css @@ -0,0 +1,215 @@ +/* if it is IE */ +@media all and (-ms-high-contrast:none){ + nav ul.items-container li:first-child { + display: block; + flex: 0 1 auto; /* Default */ + } +} + +#buttonMyNavbar{ + display: none; +} + +#mysearch.in, +#mysearch.collapsing { + display: block!important; +} +#myNavbar{ + display: block; +} +#myNavbar.in, +#myNavbar.collapsing { + display: block!important; +} +#searchForm { + width: 100%; + margin-left: 5px; + white-space: nowrap; +} +#searchForm .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + border-left-width: 0; +} +#searchForm input { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-right-width: 0; +} + +#rightProfileButton{ + padding: 0; + margin: 5px; + border: 0; + background: none; + background-color: transparent; +} + +#rightLoginButton{ + margin-left: 5px; + margin-right: 40px; +} + +#navbarRegularButtons{ + max-width: 70%; + /* remove the scroll because the dropsown menus does not work */ + /*overflow-x: auto;*/ + /*overflow-y: hidden;*/ +} + +#navbarRegularButtons span.hidden-mdx{ + max-width: 15vw; + display: inline-block; +} + +#navbarRegularButtons .btn{ + overflow: hidden; +} + +#navbarRegularButtons::-webkit-scrollbar { + height: 4px; +} +#lastItemOnMenu{ + padding-right: 40px; +} +#mysearch{ + height: auto !important; +} +#searchNavItem, #lastItemOnMenu{ + display: flex; + justify-content: center; + align-items: center; +} +#lastItemOnMenu ul{ + padding: 0; +} + +@media (max-width : 992px) { + #searchForm input{ + width: 100px; + } +} +@media (max-width : 767px) { + #searchForm { + padding-left: 10px; + } + #rightLoginButton, #rightProfileButton{ + margin-right: 5px; + margin-left: 0; + } + + #searchForm > div{ + width: 100%; + } + + .mobilesecondnav { + position: absolute; + left: 40%; + right: 5px; + } + + #buttonMyNavbar, #searchNavItem{ + display: block; + } + + #mysearch{ + /* width: 100%; */ + display: none; + position: absolute; + right: 0; + left: 0; + padding-left: 0px; + padding-right: 0px; + background-color: #FFF; + + } + + #myNavbar{ + display: none; + position: absolute; + right: 0; + top: 50px; + background-color: #FFF; + padding: 4px; + width: 50%; + } + #mainNavBar .navbar-brand{ + width: 100% !important; + text-align: center; + } + #mainNavBar .navbar-brand>img { + display: unset; + } + + #myNavbar ul.right-menus{ + display: block; + } + + #myNavbar ul.right-menus li{ + margin: 0; + padding: 0; + } + #myNavbar ul.right-menus .btn, #myNavbar ul.right-menus .btn-group{ + margin: 2px; + width: 100%; + } + #myNavbar ul.right-menus .btn-group{ + margin: 0; + } + nav ul.items-container li:first-child { + display: list-item; + } + #navbarRegularButtons span.hidden-mdx { + max-width: 100vw; + } + .globalsearchfield { + width: 90% !important; + } + + .searchli { + width: 100%; + margin-right: 0; + margin-left: 0; + + } + .searchdiv { + + } + .navbar-toggle { + margin-right: 5px !important; + + + } + #navbarRegularButtons, #lastItemOnMenu, .left-side { + padding: 0 5px; + } + .searchul{ + padding-left: 0px; + } +} + +li.navsub-toggle .badge { + float: right; +} +li.navsub-toggle a + ul { + padding-left: 15px; +} + +.navbar-lang-btn .select2-container{ + margin: 8px 0; +} +.navbar-lang-btn .select2-selection{ + border-color: #00000077 !important; +} + +@media screen and (min-width: 992px) { + + body.youtube>div.container-fluid{ + margin-left: 300px; + } + body.youtube div.container-fluid .col-sm-10.col-sm-offset-1.list-group-item{ + margin-left: 0; + margin-right: 0; + width: 100%; + } +} diff --git a/view/include/head.php b/view/include/head.php index a9d55749bf..2b224529bc 100644 --- a/view/include/head.php +++ b/view/include/head.php @@ -179,6 +179,8 @@ if (isRTL()) { var _serverTimeString = ""; var _serverDBTimeString = ""; var _serverTimezone = ""; + var avideoModalIframeFullScreenCloseButton = ; + var avideoModalIframeFullScreenCloseButtonSmall = ; var PHPSESSID = ""; + $new_query_string = http_build_query($params); + ?> " class="btn btn-default" style="position: absolute; right: 10px; top: 5px;"> - + - + {$customizePluginDescription}"; - } elseif (!empty($metaDescription)) { - echo "

{$metaDescription}

"; - } + echo "

{$customizePluginDescription}

"; +} elseif (!empty($metaDescription)) { + echo "

{$metaDescription}

"; +} if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !empty($advancedCustomUser->userMustBeLoggedInCloseButtonURL)) { + include $global['systemRootPath'] . 'view/include/navbarCloseButton.php'; +} elseif (((empty($advancedCustomUser->userMustBeLoggedIn) && empty($advancedCustom->disableNavbar)) || $thisScriptFile["basename"] === "signUp.php" || $thisScriptFile["basename"] === "userRecoverPass.php") || User::isLogged()) { + $updateFiles = getUpdatesFilesArray(); ?> - - userMustBeLoggedIn) && empty($advancedCustom->disableNavbar)) || $thisScriptFile["basename"] === "signUp.php" || $thisScriptFile["basename"] === "userRecoverPass.php") || User::isLogged()) { - $updateFiles = getUpdatesFilesArray(); ?> - + underMenuBarHTMLCode->value)) { echo $advancedCustom->underMenuBarHTMLCode->value; } - } elseif ($thisScriptFile["basename"] !== 'user.php' && empty($advancedCustom->disableNavbar)) { - } +} elseif ($thisScriptFile["basename"] !== 'user.php' && empty($advancedCustom->disableNavbar)) { + +} echo '', AVideoPlugin::navBarAfter(), ''; unset($_GET['parentsOnly']); ?> diff --git a/view/include/navbarCloseButton.php b/view/include/navbarCloseButton.php new file mode 100644 index 0000000000..8b4fc612c6 --- /dev/null +++ b/view/include/navbarCloseButton.php @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/view/include/navbarEncoder.php b/view/include/navbarEncoder.php index 3481c19bc8..fba4e2f028 100644 --- a/view/include/navbarEncoder.php +++ b/view/include/navbarEncoder.php @@ -1,70 +1,71 @@ -openEncoderInIFrame) || !isSameDomainAsMyAVideo($config->getEncoderURL())) { - if (!empty($advancedCustom->encoderNetwork) && empty($advancedCustom->doNotShowEncoderNetwork)) { - ?> -
  • -
    - - - -
    - " data-placement="left" > - encoderNetworkLabel) ? __("Encoder Network") : __($advancedCustom->encoderNetworkLabel); ?> - -
  • - doNotShowEncoderButton)) { - if (!empty($config->getEncoderURL())) { - ?> -
  • -
    - - - -
    - " data-placement="left" - class="faa-parent animated-hover" > - encoderButtonLabel) ? __("Encode video and audio") : __($advancedCustom->encoderButtonLabel); ?> - -
  • - -
  • - -
  • - encoderNetwork) && empty($advancedCustom->doNotShowEncoderNetwork)) { - ?> -
  • - " data-placement="left" > - encoderNetworkLabel) ? __("Encoder Network") : __($advancedCustom->encoderNetworkLabel); ?> - -
  • - doNotShowEncoderButton)) { - if (!empty($config->getEncoderURL())) { - ?> -
  • - " data-placement="left" > - encoderButtonLabel) ? __("Encode video and audio") : __($advancedCustom->encoderButtonLabel); ?> - -
  • - -
  • - -
  • - openEncoderInIFrame) || !isSameDomainAsMyAVideo($config->getEncoderURL())) { + if (!empty($advancedCustom->encoderNetwork) && empty($advancedCustom->doNotShowEncoderNetwork)) { + ?> +
  • +
    + + + +
    + " data-placement="left" > + encoderNetworkLabel) ? __("Encoder Network") : __($advancedCustom->encoderNetworkLabel); ?> + +
  • + doNotShowEncoderButton)) { + if (!empty($config->getEncoderURL())) { + ?> +
  • +
    + + + +
    + " data-placement="left" + class="faa-parent animated-hover" > + encoderButtonLabel) ? __("Encode video and audio") : __($advancedCustom->encoderButtonLabel); ?> + +
  • + +
  • + +
  • + encoderNetwork) && empty($advancedCustom->doNotShowEncoderNetwork)) { + ?> +
  • + " data-placement="left" > + encoderNetworkLabel) ? __("Encoder Network") : __($advancedCustom->encoderNetworkLabel); ?> + +
  • + doNotShowEncoderButton)) { + if (!empty($config->getEncoderURL())) { + ?> +
  • + " data-placement="left" > + encoderButtonLabel) ? __("Encode video and audio") : __($advancedCustom->encoderButtonLabel); ?> + +
  • + +
  • + +
  • + \ No newline at end of file diff --git a/view/include/navbarLang.php b/view/include/navbarLang.php new file mode 100644 index 0000000000..31567584de --- /dev/null +++ b/view/include/navbarLang.php @@ -0,0 +1,20 @@ +
  • + +
  • + \ No newline at end of file diff --git a/view/include/navbarMenuAndLogo.php b/view/include/navbarMenuAndLogo.php new file mode 100644 index 0000000000..53947b3279 --- /dev/null +++ b/view/include/navbarMenuAndLogo.php @@ -0,0 +1,40 @@ +
  • + +
  • \ No newline at end of file diff --git a/view/include/navbarNotUpload.php b/view/include/navbarNotUpload.php new file mode 100644 index 0000000000..d2bcfeb760 --- /dev/null +++ b/view/include/navbarNotUpload.php @@ -0,0 +1,25 @@ + +
  • +
    " data-placement="left" class="btn-group"> + + '; ?> + +
    +
  • + \ No newline at end of file diff --git a/view/include/navbarRightProfile.php b/view/include/navbarRightProfile.php new file mode 100644 index 0000000000..6b5b20c248 --- /dev/null +++ b/view/include/navbarRightProfile.php @@ -0,0 +1,169 @@ + +doNotShowRightProfile) && (User::isLogged() || empty($advancedCustomUser->signInOnRight))) { + $tooltip = ''; + if (User::isLogged()) { + $tooltip = 'data-toggle="tooltip" data-html="true" title="' . User::getNameIdentification() . ":: " . User::getMail() . '" data-placement="left"'; + } else { + $tooltip = 'data-toggle="tooltip" data-html="true" title="' . __("Login") . '" data-placement="left"'; + } + ?> + + \ No newline at end of file diff --git a/view/include/navbarRightSignIn.php b/view/include/navbarRightSignIn.php new file mode 100644 index 0000000000..a39538b63c --- /dev/null +++ b/view/include/navbarRightSignIn.php @@ -0,0 +1,33 @@ +signInOnRight)) { + if (User::isLogged()) { + if (!$advancedCustomUser->disableSignOutButton) { + ?> +
  • + + + + + + + + +
  • + +
  • + + + +
  • + \ No newline at end of file diff --git a/view/include/navbarSearch.php b/view/include/navbarSearch.php new file mode 100644 index 0000000000..f956bdcb10 --- /dev/null +++ b/view/include/navbarSearch.php @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/view/include/navbarSidebar.php b/view/include/navbarSidebar.php new file mode 100644 index 0000000000..d86a5d6139 --- /dev/null +++ b/view/include/navbarSidebar.php @@ -0,0 +1,581 @@ + \ No newline at end of file diff --git a/view/include/navbarUpload.php b/view/include/navbarUpload.php new file mode 100644 index 0000000000..9ef9879ea7 --- /dev/null +++ b/view/include/navbarUpload.php @@ -0,0 +1,71 @@ + +
  • +
    " data-placement="left" class="btn-group"> + + onlyVerifiedEmailCanUpload) && $advancedCustomUser->onlyVerifiedEmailCanUpload && User::isVerified()) || (isset($advancedCustomUser->onlyVerifiedEmailCanUpload) && !$advancedCustomUser->onlyVerifiedEmailCanUpload) || !isset($advancedCustomUser->onlyVerifiedEmailCanUpload)) { + echo ''; + ?> + + '; + ?> + + + +
    + +
  • \ No newline at end of file diff --git a/view/js/navbarLogged.js b/view/js/navbarLogged.js new file mode 100644 index 0000000000..83cc1bb6e6 --- /dev/null +++ b/view/js/navbarLogged.js @@ -0,0 +1,244 @@ + +var seachFormIsRunning = 0; +$(document).ready(function () { + setTimeout(function () { + $('.nav li.navsub-toggle a:not(.selected) + ul').hide(); + var navsub_toggle_selected = $('.nav li.navsub-toggle a.selected'); + navsub_toggle_selected.next().show(); + navsub_toggle_selected = navsub_toggle_selected.parent(); + + var navsub_toggle_selected_stop = 24; + while (navsub_toggle_selected.length) { + if ($.inArray(navsub_toggle_selected.prop('localName'), ['li', 'ul']) == -1) + break; + if (navsub_toggle_selected.prop('localName') == 'ul') { + navsub_toggle_selected.show().prev().addClass('selected'); + } + navsub_toggle_selected = navsub_toggle_selected.parent(); + + navsub_toggle_selected_stop--; + if (navsub_toggle_selected_stop < 0) + break; + } + }, 500); + + + $('.nav').on('click', 'li.navsub-toggle a:not(.selected)', function (e) { + var a = $(this), + b = a.next(); + if (b.length) { + e.preventDefault(); + + a.addClass('selected'); + b.slideDown(); + + var c = a.closest('.nav').find('li.navsub-toggle a.selected').not(a).removeClass('selected').next(); + + if (c.length) + c.slideUp(); + } + }); + + $('#searchForm').submit(function (event) { + if (seachFormIsRunning) { + event.preventDefault(); + return false; + } + seachFormIsRunning = 1; + var str = $('#searchFormInput').val(); + if (isMediaSiteURL(str)) { + event.preventDefault(); + console.log("searchForm is URL " + str); + seachFormPlayURL(str); + return false; + } else { + console.log("searchForm submit " + str); + document.location = webSiteRootURL + "?search=" + str; + } + }); + + $('#buttonMenu').on("click.sidebar", function (event) { + event.stopPropagation(); + YPTSidebarToggle(); + }); + $("#sidebar").on("click", function (event) { + event.stopPropagation(); + }); + $("#buttonSearch").click(function (event) { + event.stopPropagation(); + if (isSearchOpen()) { + closeSearchMenu(); + } else { + openSearchMenu(); + } + }); + $("#buttonMyNavbar").click(function (event) { + event.stopPropagation(); + if (isMyNMavbarOpen()) { + closeRightMenu(); + } else { + openRightMenu(); + } + }); + var wasMobile = true; + $(window).resize(function () { + if ($(window).width() > 767) { + // Window is bigger than 767 pixels wide - show search again, if autohide by mobile. + if (wasMobile) { + wasMobile = false; + } + } + if ($(window).width() < 767) { + // Window is smaller 767 pixels wide - show search again, if autohide by mobile. + if (wasMobile == false) { + wasMobile = true; + } + } + }); + + $(window).resize(function () { + if (!isScreeWidthCollapseSize()) { + $("#myNavbar").css({display:''}); + $("#myNavbar").removeClass('animate__bounceOutRight'); + var selector = '#buttonMyNavbar svg'; + $(selector).removeClass('active'); + $(selector).attr('aria-expanded', 'false'); + + $("#mysearch").css({display:''}); + $("#mysearch").removeClass('animate__bounceOutUp'); + } + }); +}); + +function isScreeWidthCollapseSize() { + return $('body').width() <= 767; +} + +function closeLeftMenu() { + var selector = '#buttonMenu svg'; + $(selector).removeClass('active'); + YPTSidebarClose(); +} +function openLeftMenu() { + if (isScreeWidthCollapseSize()) { + closeRightMenu(); + closeSearchMenu(); + } + var selector = '#buttonMenu svg'; + $(selector).addClass('active'); + YPTSidebarOpen(); +} + +function closeRightMenu() { + var selector = '#buttonMyNavbar svg'; + $(selector).removeClass('active'); + $("#myNavbar").removeClass('animate__bounceInRight'); + $("#myNavbar").addClass('animate__bounceOutRight'); + setTimeout(function () { + $("#myNavbar").hide(); + }, 500); +} +function openRightMenu() { + if (isScreeWidthCollapseSize()) { + closeLeftMenu(); + closeSearchMenu(); + } + var selector = '#buttonMyNavbar svg'; + $(selector).addClass('active'); + $("#myNavbar").removeClass('animate__bounceOutRight'); + $("#myNavbar").show(); + $("#myNavbar").addClass('animate__animated animate__bounceInRight'); +} + +function closeSearchMenu() { + $("#mysearch").removeClass('animate__bounceInDown'); + $("#mysearch").addClass('animate__bounceOutUp'); + setTimeout(function () { + $("#mysearch").hide(); + }, 500); +} +function openSearchMenu() { + if (isScreeWidthCollapseSize()) { + closeLeftMenu(); + closeRightMenu(); + } + $("#mysearch").removeClass('animate__bounceOutUp'); + $("#mysearch").show(); + $("#mysearch").addClass('animate__animated animate__bounceInDown'); +} + +function seachFormPlayURL(url) { + modal.showPleaseWait(); + $.ajax({ + url: webSiteRootURL + 'view/url2Embed.json.php', + method: 'POST', + data: { + 'url': url + }, + success: function (response) { + seachFormIsRunning = 0; + if (response.error) { + modal.hidePleaseWait(); + avideoToast(response.msg); + } else { + if (typeof linksToEmbed === 'function') { + document.location = response.playEmbedLink; + } else + if (typeof flixFullScreen == 'function') { + flixFullScreen(response.playEmbedLink, response.playLink); + modal.hidePleaseWait(); + } else { + document.location = response.playLink; + } + } + } + }); +} + +function isSearchOpen() { + return $('#mysearch').hasClass('animate__bounceInDown'); +} +function isMyNMavbarOpen() { + return $('#myNavbar').hasClass('animate__bounceInRight'); +} +function YPTSidebarToggle() { + if (YPTSidebarIsOpen()) { + closeLeftMenu() + } else { + openLeftMenu(); + } +} +function YPTSidebarIsOpen() { + return $('body').hasClass('youtube'); +} +function YPTSidebarOpen() { + $("#sidebar").removeClass('animate__bounceOutLeft'); + $("#sidebar").show(); + $("#sidebar").addClass('animate__animated animate__bounceInLeft'); + setTimeout(function () { + $('body').addClass('youtube'); + }, 500); + youTubeMenuIsOpened = true; +} +function YPTSidebarClose() { + $("#sidebar").removeClass('animate__bounceInLeft'); + $("#sidebar").addClass('animate__bounceOutLeft'); + setTimeout(function () { + $('body').removeClass('youtube'); + $("#sidebar").hide(); + }, 500); + youTubeMenuIsOpened = false; +} + +function YPTHidenavbar() { + if (typeof inIframe == 'undefined') { + setTimeout(function () { + YPTHidenavbar() + }, 500); + } else { + if (inIframe()) { + $("#mainNavBar").hide(); + $("body").css("padding-top", "0"); + } + } +} diff --git a/view/js/script.js b/view/js/script.js index d59b13ab9c..22c429f6df 100644 --- a/view/js/script.js +++ b/view/js/script.js @@ -1380,6 +1380,12 @@ function avideoModalIframeFullScreenClose() { if (typeof swal === 'function') { $('.swal-overlay iframe').attr('src', 'about:blank'); try { + /* + $('.swal-overlay').slideUp(); + setTimeout(function(){ + swal.close(); + },500); + */ swal.close(); } catch (e) { @@ -1449,18 +1455,19 @@ function avideoModalIframeWithClassName(url, className, updateURL) { } url = addGetParam(url, 'avideoIframe', 1); console.log('avideoModalIframeWithClassName', url, className, updateURL); - var _inIframe = ''; - if(inIframe()){ - _inIframe = 'inIframe'; - } var html = ''; - html += '
    '; - html += '
    '; + html += '
    '; + if(inIframe()){ + html += avideoModalIframeFullScreenCloseButtonSmall; + }else{ + html += avideoModalIframeFullScreenCloseButton; + html += ''; + } + html += '
    '; html += ''; var span = document.createElement("span"); span.innerHTML = html; + $('.swal-overlay').show(); swal({ content: span, closeModal: true,