diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -45,5 +45,30 @@ if (empty($_GET['link'])){ 'jquery' => 'templates/libs/jquery/dist/jquery.min.js') ); + /* ---- ---- Embed ---- ---- */ + if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") { + $pro = 'https'; + } else { + $pro = 'http'; + } + + $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); + + $subject = $pro."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['SCRIPT_NAME']; + + $pattern = array(); + $pattern[0] = '/index.php/'; + $substitution = array(); + $substitution[0] = 'embed?link='; + + $embed_url = preg_replace($pattern, $substitution, $subject); + + $decode_url_embed = "<iframe width='560' height='315' src='".$embed_url.$baselink."' frameborder='0' scrolling='no'></iframe>"; + + $current_url = htmlentities($decode_url_embed); + + $video_decode->assign("current_url", $current_url); + /* ---- ---- END ---- --- */ + $video_decode->display('templates/video.tpl'); } |