$_SESSION['translations'] = $localize->GetTranslations(); $_SESSION['missingTranslations'] = $localize->GetMissingTranslations(); } foreach ($_SESSION['translations'] as $constant => $value) { $value = isset($_SESSION['missingTranslations'][$constant]) && $_SESSION['langs'][$_SESSION['ccode']]['direction'] == 'rtl' ? '<span dir="' . Localize::_FALLBACK_DIRECTION . '">' . $value . '</span>' : $value; define($constant, $value); } // If localization just changed, urldecode everything in $_GET that was encoded by http_build_query() if (isset($_GET['ccode'])) { foreach ($_GET as $k => $v) { $_GET[$k] = urldecode($v); } } // Instantiate converter class and populate vars/arrays $converter = new VideoConverter(); $videoHosts = $converter->GetVideoHosts(); $uniqueFtypes = $ftypes = $converter->GetConvertedFileTypes(); $editableFtypes = array(); $fileExts = array(); $mimeTypes = array(); $checkedExt = current(array_keys($ftypes)); array_walk($ftypes, function ($ftype, $key) use(&$editableFtypes, &$fileExts, &$checkedExt, &$mimeTypes) { if (isset($ftype['jPlayerName']) && !isset($editableFtypes[$ftype['fileExt']])) { $editableFtypes[$ftype['fileExt']] = isset($ftype['modernizrType']) ? $ftype['modernizrType'] : ''; } $fileExts[$key] = $ftype['fileExt']; if (isset($ftype['checked'])) { $checkedExt = $key; } $mimeTypes[$key] = $ftype['mimeType']; });
$_SESSION['translations'] = $localize->GetTranslations(); $_SESSION['missingTranslations'] = $localize->GetMissingTranslations(); } foreach ($_SESSION['translations'] as $constant => $value) { $value = isset($_SESSION['missingTranslations'][$constant]) && $_SESSION['langs'][$_SESSION['ccode']]['direction'] == 'rtl' ? '<span dir="' . Localize::_FALLBACK_DIRECTION . '">' . $value . '</span>' : $value; define($constant, $value); } // If localization just changed, urldecode everything in $_GET that was encoded by http_build_query() if (isset($_GET['ccode'])) { foreach ($_GET as $k => $v) { $_GET[$k] = urldecode($v); } } // Instantiate converter class $converter = new VideoConverter(); $vidHosts = array_values($converter->GetVideoHosts()); $ftypes = $converter->GetConvertedFileTypes(); // On download of edited file if (isset($_GET['dload'])) { $converter->DownloadConvertedFile($_GET['dload'], Config::_EDITED_CONVERTED_FILEDIR); } // Determine jPlayer media type $mediaType = $fileExt = 'mp3'; $mediaTypeArr = array($mediaType); $avFormat = 'audio'; $solutionOrder = 'html, flash'; $enableMetadataEditor = false; if (isset($_GET['vid_name'])) { $fileExt = end(explode(".", $_GET['vid_name'])); foreach ($ftypes as $ftype) { if ($ftype['fileExt'] == $fileExt) {