From abbc7b375ba461a929e68d5af0ee04956b93ea3c Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 29 Aug 2022 16:28:04 +0000 Subject: [PATCH] wip #5422 @0.5 --- .../Controlleur/class.extranet.tools.php | 340 +++++++----------- 1 file changed, 125 insertions(+), 215 deletions(-) diff --git a/inc/extranet/Controlleur/class.extranet.tools.php b/inc/extranet/Controlleur/class.extranet.tools.php index 9f5fbfcb1..10d6e5759 100644 --- a/inc/extranet/Controlleur/class.extranet.tools.php +++ b/inc/extranet/Controlleur/class.extranet.tools.php @@ -1,219 +1,129 @@ '; - $res.=''; - $res.=''; - $res.=''; - $res.=''; - $res.='
' . __('Décoder une URL') . ' (' . __('de la forme') . ' : http%3A%2F%2Fwww )
Collez l\'url à décoder
Url décodée
'; - $res.=''; - $res .= ''; - $res .= commonPage::bf(); - $res .= commonPage::bMain(); - return $res; - } - - public static function tube($args) { - global $css, $js; - - $css = array(); - $js[] = JS_PATH . '/tube.js'; - $js[] = JS_PATH . '/modernizr.js'; - - $url = $_GET['u']; - $hash = sha1($url); - - $web = '/tube/' . $hash . '/'; - $dir = ROOT . $web; - if (!file_exists($dir)) { - - mkdir($dir, 0777, true); - $ext = files::getExtension($url); - $original = $dir . 'video.' . $ext; - copy($url, $original); - - require_once ROOT . '/inc/ws/Util/class.ws.tools.php'; - wsTools::encodeWebVideos($original); - } - - $loop = isset($_GET['loop']) ? $_GET['loop'] : 0; - $autoplay = isset($_GET['autoplay']) ? $_GET['autoplay'] : 0; - $controls = isset($_GET['controls']) ? $_GET['controls'] : 1; - - $fv = array('video' => $url, - 'autoPlay' => $autoplay == 1, - 'controls' => $controls == 1, - 'loop' => $loop == 1); - - if (file_exists($dir . 'video.jpg')) { - $poster = $web . 'video.jpg'; - $fv['poster'] = 'https://' . $_SERVER['HTTP_HOST'] . $poster; - } - - $res = ''; - - $alt = '