diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/index.php b/index.php new file mode 100644 index 0000000..fe683be --- /dev/null +++ b/index.php @@ -0,0 +1,50 @@ +<?php +require_once('smarty/Smarty.class.php'); +$titulo="YTLibre"; +$template= new Smarty(); + +/* ---- --- Variables ---- ---- */ +$template->assign("titulo", $titulo); + +/* ---- ---- CSS ---- ---- */ + +$template->assign('styles', array('frond' => 'templates/css/frond.min.css', + 'normalize' => 'templates/css/normalize.css') +); + +/* ---- ----- ---- Generated ---- ----- ---- ---- */ +if (empty($_GET['link'])){ + $template->display('templates/index.tpl'); +} else { + /* ---- ---- video-generated ---- ---- */ + require_once "tools/processor.php"; + $video_decode = new Smarty(); + + /* ---- --- Variables ---- ---- */ + $video_decode->assign("titulo", $titulo); + $video_decode->assign("videoTitle", $videoTitle); + $video_decode->assign("videoThumbURL", $videoThumbURL); + $video_decode->assign("videoAuthor", $videoAuthor); + $video_decode->assign("videoDuration", $videoDuration); + $video_decode->assign("videoViews", $videoViews); + $video_decode->assign("librethumb", $librethumb); + + $video_decode->assign("cStreams", $cStreams); + $video_decode->assign("stream", $stream); + $video_decode->assign("baselink", $baselink); + $video_decode->assign("videosStream", $videosStream); + + /* ---- ---- CSS ---- ---- */ + $video_decode->assign('styles', array('frond' => 'templates/css/frond.min.css', + 'normalize' => 'templates/css/normalize.css', + 'teal' => 'templates/libs/librevideojs/css/teal.css', + 'salida' => 'templates/css/salida.min.css') + ); + + /* ---- ---- JS ---- ---- */ + $video_decode->assign('javascript', array('librevideojs' => 'templates/libs/librevideojs/js/cliplibrejs.developer.js', + 'jquery' => 'templates/libs/jquery/dist/jquery.min.js') + ); + + $video_decode->display('templates/video.tpl'); +}
\ No newline at end of file |