<commit_before><?php include 'backend/Core.php'; 
    //Validation url param
    $postid = filter_var((empty($_GET['movie'])?'':$_GET['movie']),FILTER_SANITIZE_STRING);
    //Data video
    $url = Core::getInstance()->api.'/video/post/data/read/'.$postid.'/?apikey='.Core::getInstance()->apikey;
    $data = json_decode(Core::execGetRequest($url));
    //Data adblock1 (sidebar)
    $urlsidebar = Core::getInstance()->api.'/ads/data/show/sidebar/?apikey='.Core::getInstance()->apikey;
    $datasidebar = json_decode(Core::execGetRequest($urlsidebar));
    //Data adblock2 (footer)
    $urlfooter = Core::getInstance()->api.'/ads/data/show/footer/?apikey='.Core::getInstance()->apikey;
    $datafooter = json_decode(Core::execGetRequest($urlfooter));
    //Data adblock3 (content)
    $urlcontent = Core::getInstance()->api.'/ads/data/show/content/?apikey='.Core::getInstance()->apikey;
    $datacontent = json_decode(Core::execGetRequest($urlcontent));


    if (!empty($data)){
        if ($data->{'status'} == "success"){
            $title = $data->result[0]->{'Title'};
            $description = $data->result[0]->{'Description'};
            $keyword = $data->result[0]->{'Tags_inline'};
            $author = $data->result[0]->{'User'};
        } else {
            $title = '';
            $description = '';
            $keyword = '';
            $author = '';
            Core::goToPageFrontend('index.php');
        }
    } else {
        $title = '';
        $description = '';
        $keyword = '';
        $author = '';
        Core::goToPageFrontend('index.php');
    }
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta name="description" content="<?php echo $description;?>">
    <meta name="keyword" content="<?php echo $keyword;?>">
    <meta name="author" content="<?php echo $author;?>">
    <?php
        if (!empty($data)){
            if ($data->{'status'} == "success"){
                echo '<!-- Open Graphs -->
                    <meta itemprop="name" content="'.$data->result[0]->{'Title'}.'">
                    <meta itemprop="description" content="'.$data->result[0]->{'Description'}.'">
                    <meta itemprop="image" content="'.$data->result[0]->{'Image'}.'">
                	<meta name="twitter:card" content="summary_large_image" />
                	<meta name="twitter:title" content="'.$data->result[0]->{'Title'}.'" />
                	<meta name="twitter:description" content="'.$data->result[0]->{'Description'}.'" />
                	<meta name="twitter:image" content="'.$data->result[0]->{'Image'}.'" />
                    <meta property="og:title" content="'.$data->result[0]->{'Title'}.'" />
                    <meta property="og:description" content="'.$data->result[0]->{'Description'}.'" />
                    <meta property="og:url" content="'.(isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'" />
                    <meta property="og:image" content="'.$data->result[0]->{'Image'}.'" />
                	<meta property="og:site_name" content="'.Core::getInstance()->title.'" />
                    <meta property="og:type" content="video.movie" />
                	<meta property="og:video:release_date" content="'.date_format(date_create($data->result[0]->{'Created_at'}), 'Y-m-d').'" />';
                echo "\n";
                echo '<meta property="og:video:duration" content="'.Core::convertTimeToSeconds($data->result[0]->{'Duration'}).'" />';
                echo "\n";
                foreach ($data->result[0]->{'Director'} as $name => $valuedirector) {
                    echo '<meta property="og:video:director" content="'.$valuedirector.'" />';
                    echo "\n";
                }
                foreach ($data->result[0]->{'Stars'} as $name => $valuestars) {
                    echo '<meta property="og:video:actor" content="'.$valuestars.'" />';
                    echo "\n";
                }
                foreach ($data->result[0]->{'Tags'} as $name => $valuegenre) {
                    echo '<meta property="og:video:tag" content="'.$valuegenre.'" />';
                    echo "\n";
                }
            }
        }
    ?>

    <title><?php echo Core::getInstance()->title;?> | Watch <?php echo $title;?></title>

    <?php include 'global-meta.php';?>
</head>

<body class="single-video dark">
<?php include 'global-header.php';?>

<div class="content-wrapper">
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-xs-12 col-sm-12">
                <!--<h1><a href="<?php echo (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']?>"><?php echo $title;?></a></h1>-->
                <?php
                    if (!empty($data)){
                        if ($data->{'status'} == "success"){
                            $totalvideo=0;
                            foreach ($data->result[0]->{'Embed'} as $name => $valuevideo) {
                                $totalvideo++;
                            }
                            if ($totalvideo>1) echo '<h1><a href="'.(isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'">'.$title.'</a></h1>';
                            $datavideo = '';
                            $n=1;
                            foreach ($data->result[0]->{'Embed'} as $name => $valuevideo) {
                                if ($totalvideo>1){
                                    $datavideo .= '<h4 class="color-active"># '.$n++.'</h4>
                                        <div class="sv-video">
                                            <div class="video-responsive">
                                                <div>
                                                    '.$valuevideo.'
                                                    <div style="width: 50px; height: 50px; position: absolute; opacity: 0; right: 10px; top: 10px;">&nbsp;</div>
                                                </div>
                                            </div>
                                        </div><br>';
                                } else{
                                    $datavideo .= '<div class="sv-video">
                                            <div class="video-responsive">
                                                <div>
                                                    '.$valuevideo.'
                                                    <div style="width: 50px; height: 50px; position: absolute; opacity: 0; right: 10px; top: 10px;">&nbsp;</div>
                                                </div>
                                            </div>
                                        </div><br>';
                                }
                            }
                            $datavideo = substr($datavideo, 0, -4);
                            echo $datavideo;

                            //author
                            if ($totalvideo==1) echo '<h1><a href="'.(isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'">'.$title.'</a></h1>';
                            echo '<div class="author">
                                    <div class="sv-views">
                                        <div class="sv-views-count">
                                            '.number_format($data->result[0]->{'Viewer'}).' views
                                        </div>
                                        <div class="sv-views-progress">
                                            <div class="sv-views-progress-bar"></div>
                                        </div>
                                        <div class="sv-views-stats text-right">
                                            <span id="totalliked" class="green"><i class="fa fa-thumbs-up iliked"></i> '.number_format($data->result[0]->{'Liked'}).'</span>
                                            <span id="totaldisliked" class="percent"><i class="fa fa-thumbs-down idisliked"></i> '.number_format($data->result[0]->{'Disliked'}).'</span><commit_msg>Update UI for series video<commit_after><?php include 'backend/Core.php'; 
    //Validation url param
    $postid = filter_var((empty($_GET['movie'])?'':$_GET['movie']),FILTER_SANITIZE_STRING);
    //Data video
    $url = Core::getInstance()->api.'/video/post/data/read/'.$postid.'/?apikey='.Core::getInstance()->apikey;
    $data = json_decode(Core::execGetRequest($url));
    //Data adblock1 (sidebar)
    $urlsidebar = Core::getInstance()->api.'/ads/data/show/sidebar/?apikey='.Core::getInstance()->apikey;
    $datasidebar = json_decode(Core::execGetRequest($urlsidebar));
    //Data adblock2 (footer)
    $urlfooter = Core::getInstance()->api.'/ads/data/show/footer/?apikey='.Core::getInstance()->apikey;
    $datafooter = json_decode(Core::execGetRequest($urlfooter));
    //Data adblock3 (content)
    $urlcontent = Core::getInstance()->api.'/ads/data/show/content/?apikey='.Core::getInstance()->apikey;
    $datacontent = json_decode(Core::execGetRequest($urlcontent));


    if (!empty($data)){
        if ($data->{'status'} == "success"){
            $title = $data->result[0]->{'Title'};
            $description = $data->result[0]->{'Description'};
            $keyword = $data->result[0]->{'Tags_inline'};
            $author = $data->result[0]->{'User'};
        } else {
            $title = '';
            $description = '';
            $keyword = '';
            $author = '';
            Core::goToPageFrontend('index.php');
        }
    } else {
        $title = '';
        $description = '';
        $keyword = '';
        $author = '';
        Core::goToPageFrontend('index.php');
    }
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta name="description" content="<?php echo $description;?>">
    <meta name="keyword" content="<?php echo $keyword;?>">
    <meta name="author" content="<?php echo $author;?>">
    <?php
        if (!empty($data)){
            if ($data->{'status'} == "success"){
                echo '<!-- Open Graphs -->
                    <meta itemprop="name" content="'.$data->result[0]->{'Title'}.'">
                    <meta itemprop="description" content="'.$data->result[0]->{'Description'}.'">
                    <meta itemprop="image" content="'.$data->result[0]->{'Image'}.'">
                	<meta name="twitter:card" content="summary_large_image" />
                	<meta name="twitter:title" content="'.$data->result[0]->{'Title'}.'" />
                	<meta name="twitter:description" content="'.$data->result[0]->{'Description'}.'" />
                	<meta name="twitter:image" content="'.$data->result[0]->{'Image'}.'" />
                    <meta property="og:title" content="'.$data->result[0]->{'Title'}.'" />
                    <meta property="og:description" content="'.$data->result[0]->{'Description'}.'" />
                    <meta property="og:url" content="'.(isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'" />
                    <meta property="og:image" content="'.$data->result[0]->{'Image'}.'" />
                	<meta property="og:site_name" content="'.Core::getInstance()->title.'" />
                    <meta property="og:type" content="video.movie" />
                	<meta property="og:video:release_date" content="'.date_format(date_create($data->result[0]->{'Created_at'}), 'Y-m-d').'" />';
                echo "\n";
                echo '<meta property="og:video:duration" content="'.Core::convertTimeToSeconds($data->result[0]->{'Duration'}).'" />';
                echo "\n";
                foreach ($data->result[0]->{'Director'} as $name => $valuedirector) {
                    echo '<meta property="og:video:director" content="'.$valuedirector.'" />';
                    echo "\n";
                }
                foreach ($data->result[0]->{'Stars'} as $name => $valuestars) {
                    echo '<meta property="og:video:actor" content="'.$valuestars.'" />';
                    echo "\n";
                }
                foreach ($data->result[0]->{'Tags'} as $name => $valuegenre) {
                    echo '<meta property="og:video:tag" content="'.$valuegenre.'" />';
                    echo "\n";
                }
            }
        }
    ?>

    <title><?php echo Core::getInstance()->title;?> | Watch <?php echo $title;?></title>

    <?php include 'global-meta.php';?>
</head>

<body class="single-video dark">
<?php include 'global-header.php';?>

<div class="content-wrapper">
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-xs-12 col-sm-12">
                <!--<h1><a href="<?php echo (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']?>"><?php echo $title;?></a></h1>-->
                <?php
                    if (!empty($data)){
                        if ($data->{'status'} == "success"){
                            $totalvideo=0;
                            foreach ($data->result[0]->{'Embed'} as $name => $valuevideo) {
                                $totalvideo++;
                            }
                            if ($totalvideo>1) echo '<h1><a href="'.(isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'">'.$title.'</a></h1>';
                            $datavideo = '';
                            $n=1;
                            foreach ($data->result[0]->{'Embed'} as $name => $valuevideo) {
                                if ($totalvideo>1){
                                    $datavideo .= '<button type="button" class="btn btn-dropdown" data-toggle="collapse" data-target="#eps'.$n.'">Episode '.$n.' <span class="caret"></span></button><br>
                                        <div id="eps'.$n.'" class="collapse'.(($n==1)?' in':'').'">
                                            <div class="sv-video">
                                                <div class="video-responsive">
                                                    <div>
                                                        '.$valuevideo.'
                                                        <div style="width: 50px; height: 50px; position: absolute; opacity: 0; right: 10px; top: 10px;">&nbsp;</div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div><br>';
                                    $n++;
                                } else{
                                    $datavideo .= '<div class="sv-video">
                                            <div class="video-responsive">
                                                <div>
                                                    '.$valuevideo.'
                                                    <div style="width: 50px; height: 50px; position: absolute; opacity: 0; right: 10px; top: 10px;">&nbsp;</div>
                                                </div>
                                            </div>
                                        </div><br>';
                                }
                            }
                            $datavideo = substr($datavideo, 0, -4);
                            echo $datavideo;

                            //author
                            if ($totalvideo==1) echo '<h1><a href="'.(isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'">'.$title.'</a></h1>';
                            echo '<div class="author">
                                    <div class="sv-views">
                                        <div class="sv-views-count">
                                            '.number_format($data->result[0]->{'Viewer'}).' views
                                        </div>
                                        <div class="sv-views-progress">
                                            <div class="sv-views-progress-bar"></div>
                                        </div>
                                        <div class="sv-views-stats text-right">
                                            <span id="totalliked" class="green"><i class="fa fa-thumbs-up iliked"></i> '.number_format($data->result[0]->{'Liked'}).'</span>
                                            <span id="totaldisliked" class="percent"><i class="fa fa-thumbs-down idisliked"></i> '.number_format($data->result[0]->{'Disliked'}).'</span>
{'fraction_non_alphanumeric': 0.1915226719239244, 'fraction_numerical': 0.00771193320190189, 'mean_word_length': 1.4812257229175658, 'pattern_counts': {'":': 0, '<': 206, '<?xml version=': 0, '>': 336, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 106, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1423041', 'n_tokens_mistral': 4497, 'n_tokens_neox': 4338, 'n_words': 751}