<!DOCTYPE html>
<html id="html">
<head>
	<meta charset="UTF-8">
	<title>{{CONTAINER_TITLE}}</title>
	<meta name="title" content="{{CONTAINER_TITLE}}">
	<meta name="description" content="{{CONTAINER_DESC}}">
	<meta name="keywords" content="{{CONTAINER_KEYWORDS}}">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<?php if (!empty($pt->video_privacy)) { ?>
		<meta name="robots" content="noindex">
	<?php } ?>
    <meta property="fb:app_id" content="1643990952546825" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <?php if (!empty($pt->config->dailymotion_id)) { ?>
      <meta name="dailymotion-domain-verification" content="{{CONFIG dailymotion_id}}" />
    <?php } ?>
    {{OG_METATAGS}}
    <link rel="shortcut icon" type="image/png" href="{{CONFIG theme_url}}/img/icon.png"/>
    <link rel="stylesheet" href="{{CONFIG theme_url}}/css/jquery-ui.min.css">
    <link rel="stylesheet" href="{{CONFIG theme_url}}/css/jquery.tagit.css">
    <link rel="stylesheet" href="{{CONFIG theme_url}}/css/font-awesome-4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="{{CONFIG theme_url}}/css/twemoji-awesome.css">
    <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css">
    <link rel="stylesheet" href="{{CONFIG theme_url}}/css/bootstrap.min.css">
    <link rel="stylesheet" href="{{CONFIG theme_url}}/js/lib/sweetalert2/dist/sweetalert2.min.css">
    <link rel="stylesheet" href="{{CONFIG theme_url}}/js/lib/notifIt/notifIt/css/notifIt.min.css">
    <link rel="stylesheet" href="{{CONFIG theme_url}}/css/style.css" id="style-css">
    <?php if ($pt->mode == 'night' || $pt->config->night_mode == 'night'): ?>
    <link rel="stylesheet" href="{{CONFIG theme_url}}/css/night-mode.css" class="night-mode-css">
    <?php endif; ?>
    <link rel="stylesheet" href="{{CONFIG theme_url}}/css/custom.style.css">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Open+Sans|Roboto:400,500" rel="stylesheet">
    <script src="{{CONFIG theme_url}}/js/jquery-3.min.js"></script>
    <script src="{{CONFIG theme_url}}/js/jquery-ui.min.js"></script>
    <script type="text/javascript" src="{{CONFIG theme_url}}/js/jquery.form.min.js"></script>
    <script type="text/javascript" src="{{CONFIG theme_url}}/js/tag-it.min.js"></script>
    <?php if ($pt->config->player_type == 'fluidPlayer') { ?>
      <link rel="stylesheet" href="{{CONFIG theme_url}}/player/css/fluidplayer/fluidplayer.min.css" type="text/css"/>
      <script src="{{CONFIG theme_url}}/player/js/fluidplayer/fluidplayer.min.js"></script>
    <?php }elseif ($pt->config->player_type == 'videojs') { ?>
    <!-- <script src="http://imasdk.googleapis.com/js/sdkloader/ima3.js"></script> -->
      <link href="{{CONFIG theme_url}}/player/css/video_js/video-js.css" rel="stylesheet">
      <link href="{{CONFIG theme_url}}/player/css/video_js/videojs-contrib-ads.min.css" rel="stylesheet">
      <link href="{{CONFIG theme_url}}/player/css/video_js/videojs-resolution-switcher.css" rel="stylesheet">
      <link href="{{CONFIG theme_url}}/player/css/video_js/videojs.ima.css" rel="stylesheet">
    <?php }elseif ($pt->config->player_type == 'plyr') { ?>
    <script src="https://cdn.plyr.io/3.6.8/plyr.polyfilled.js"></script>
    <link rel="stylesheet" href="https://cdn.plyr.io/3.6.8/plyr.css" />
    <?php } ?>
      <link rel="stylesheet" href="{{CONFIG theme_url}}/player/css/mediaelementplayer.min.css" />
      <script src="{{CONFIG theme_url}}/player/js/mediaelement-and-player.min.js"></script>




    <script src="{{CONFIG theme_url}}/js/lib/sweetalert2/dist/sweetalert2.js"></script>
    <script src="{{CONFIG theme_url}}/js/lib/notifIt/notifIt/js/notifIt.min.js"></script>
    <link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">

    <link rel="stylesheet" href="{{CONFIG theme_url}}/css/bootstrap-select.min.css">
    <script src="{{CONFIG theme_url}}/js/bootstrap-select.min.js"></script>

	<link rel="stylesheet" href="{{CONFIG theme_url}}/css/owl.carousel.min.css">
    <script src="{{CONFIG theme_url}}/js/owl.carousel.min.js"></script>

    <?php if ($pt->language_type == 'rtl') { ?>
    <link rel="stylesheet" href="{{CONFIG theme_url}}/css/bootsrap-rtl.min.css">
    <link rel="stylesheet" href="{{CONFIG theme_url}}/css/rtl.style.css">
    <?php } ?>

    <script src="{{CONFIG theme_url}}/player/plugins/speed/speed.min.js"></script>
    <link rel="stylesheet" href="{{CONFIG theme_url}}/player/plugins/speed/speed.min.css" />
    <script src="{{CONFIG theme_url}}/player/plugins/speed/speed-i18n.js"></script>
    <script src="{{CONFIG theme_url}}/player/plugins/jump/jump-forward.min.js"></script>
    <link rel="stylesheet" href="{{CONFIG theme_url}}/player/plugins/jump/jump-forward.min.css" />
    <script src="{{CONFIG theme_url}}/player/plugins/ads/ads.min.js"></script>
    <link rel="stylesheet" href="{{CONFIG theme_url}}/player/plugins/ads/ads.min.css" />
    <script src="{{CONFIG theme_url}}/player/plugins/ads/ads-i18n.js"></script>
    <script src="{{CONFIG theme_url}}/player/plugins/vast/ads-vast-vpaid.js"></script>
    <script src="{{CONFIG theme_url}}/player/plugins/quality/quality.min.js"></script>
    <link rel="stylesheet" href="{{CONFIG theme_url}}/player/plugins/quality/quality.min.css" />
    <script src="https://cdn.jsdelivr.net/npm/mediaelement@4.2.7/build/renderers/facebook.min.js"></script>
    <script src="{{CONFIG theme_url}}/js/Fingerprintjs2/fingerprint2.js"></script>
    <script src="{{CONFIG theme_url}}/js/emoji/emojionearea/dist/emojionearea.js"></script>
    <link rel="stylesheet" type="text/css" href="{{CONFIG theme_url}}/js/emoji/emojionearea/dist/emojionearea.min.css"/>

    <script src= "https://player.twitch.tv/js/embed/v1.js"></script>

    <?php if ($pt->config->checkout_payment == 'yes') { ?>
        <script type="text/javascript" src="https://www.2checkout.com/checkout/api/2co.min.js"></script>
      <?php } ?>

    <?php if ($pt->page == 'login' && $pt->config->recaptcha == 'on') { ?>
    <script src="https://www.google.com/recaptcha/api.js" async defer></script>
    <?php } ?>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.4/socket.io.js"></script>
    <?php if (!empty($pt->config->google)) { ?>
     <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
      ga('create', '{{CONFIG google}}', 'auto');
      ga('send', 'pageview');
    </script>
    <?php } ?>
    <script>
      function RunLiveAgora(channelName,DIV_ID,token) {
        var agoraAppId = '<?php echo($pt->config->agora_app_id) ?>';
        var token = token;

        var client = AgoraRTC.createClient({mode: 'live', codec: 'vp8'});
        client.init(agoraAppId, function () {


            client.setClientRole('audience', function() {
          }, function(e) {
          });

          client.join(token, channelName, 0, function(uid) {
          }, function(err) {
          });
          }, function (err) {
          });

          client.on('stream-added', function (evt) {
          var stream = evt.stream;
          var streamId = stream.getId();

          client.subscribe(stream, function (err) {
          });
        });
        client.on('stream-subscribed', function (evt) {
          var video_id = $('#video-id').val();
         if (!video_id) {
            return false;
         }
          $('#'+DIV_ID).html('<div class="wow_liv_counter"><span id="live_word_'+video_id+'">{{LANG live}}</span> <span id="live_count_'+video_id+'"> 0</span></div><div id="live_post_comments_'+video_id+'" class="wow_liv_comments_feed user-comments"></div>');
          var remoteStream = evt.stream;
          remoteStream.play(DIV_ID);
          $('#player_'+remoteStream.getId()).find('video').css('position', 'relative');
        });
      }
        <?php if (IS_LOGGED == true && $pt->config->server == 'nodejs') {?>
           const socket = io('{{CONFIG hostname}}:{{CONFIG server_port}}');
           socket.on('connect_error', function (error) {
              console.log(error);
           });
           setTimeout(function () {
             getNotifications();
           }, 500);
           function getNotifications() {
               socket.emit('get notifications and messages');
               setTimeout(function () {
                 getNotifications();
               }, 500);
           }
           socket.on('get notifications results', function (data) {
              if (data.status == 200) {
                 if (data.messages > 0) {
                    var default_messages = $('body').attr('data-messages');

                    if (!default_messages) {
                       $('body').attr('data-messages', data.messages);
                    }

                    var default_messages = $('body').attr('data-messages');

                    if (default_messages != data.messages) {
                       $('#message-sound')[0].play();

                    }

                    $('body').attr('data-messages', data.messages);
                    $('#new-messages').html('<b>' + data.messages + '</b>');
                 } else {
                    $('#new-messages').html("");
                 }
                 if (data.notifications > 0) {
                    $('#new-notifications').html('<b>' + data.notifications + '</b>');
                 } else {
                     $('#new-notifications').html('');
                 }

              }
           });
        <?php } ?>
        var site_url = '{{CONFIG site_url}}';
        function PT_Ajax_Requests_File() {
          return site_url + '/';
        }
        function PT_Page_Loading_File() {
          return site_url + '/page_loading.php';
        }
        function OpenShareWindow(url, windowName) {
           newwindow = window.open(url, windowName, 'height=600,width=800');
           if (window.focus) {
              newwindow.focus();
           }
           return false;
        }
        function getCookie(name) {
          var value = "; " + document.cookie;
          var parts = value.split("; " + name + "=");
          if (parts.length == 2) return parts.pop().split(";").shift();
        }
    </script>
    <script src="{{CONFIG theme_url}}/js/header.js"></script>
    <?php if($pt->config->player_type == 'cloudinary'){ ?>
      <link href="{{CONFIG theme_url}}/css/cld-video-player.min.css" rel="stylesheet">

<script src="{{CONFIG theme_url}}/js/cloudinary/cloudinary-core-shrinkwrap.min.js" type="text/javascript"></script>
<script src="{{CONFIG theme_url}}/js/cloudinary/cld-video-player.min.js" type="text/javascript"></script>

    <?php } ?>
    <script src="https://imasdk.googleapis.com/js/sdkloader/ima3.js" type="text/javascript"></script>
    <?php if ($pt->config->live_video == 1 && !empty($pt->config->agora_app_id)) { ?>
      <script src="{{CONFIG theme_url}}/js/agora.js"></script>
    <?php } ?>
</head>
<script type="text/javascript">
  $(document).on('click', 'a[data-load]', function(event) {
    if ($('#live_post_id').length > 0) {
          DeleteLive();
          window.location = $(this).attr('href');
          return false;
    }
    $('#bar_loading').show();
      event.preventDefault();
      var url = $(this).attr('data-load');
      if ($('video').length > 0) {
        $('video')[0].pause();
      }
      $.ajax({
        url: PT_Page_Loading_File()+url,
        type: 'GET',
        dataType: 'html'
      })
      .done(function(data_html) {
        if ($(data_html).filter('#json-data').length > 0) {
            if (typeof(ads_) != 'undefined') {
              clearInterval(ads_);
            }

            data = JSON.parse($(data_html).filter('#json-data').val());



            (data.page == 'home') ? $('#home_menu_').addClass('active') : $('#home_menu_').removeClass('active');
            (data.page == 'history') ? $('#history_menu_').addClass('active') : $('#history_menu_').removeClass('active');
            (data.page == 'articles') ? $('#articles_menu_').addClass('active') : $('#articles_menu_').removeClass('active');
            (data.page == 'latest') ? $('#latest_menu_').addClass('active') : $('#latest_menu_').removeClass('active');
            (data.page == 'trending') ? $('#trending_menu_').addClass('active') : $('#trending_menu_').removeClass('active');
            (data.page == 'paid-videos') ? $('#paid_videos_').addClass('active') : $('#paid_videos_').removeClass('active');
            (data.page == 'top') ? $('#top_menu_').addClass('active') : $('#top_menu_').removeClass('active');
            (data.page == 'movies') ? $('#movies_menu_').addClass('active') : $('#movies_menu_').removeClass('active');
            (data.page == 'popular_channels') ? $('#popular_channels_menu_').addClass('active') : $('#popular_channels_menu_').removeClass('active');
            (data.page == 'stock') ? $('#stock_videos_menu_').addClass('active') : $('#stock_videos_menu_').removeClass('active');


            window.history.pushState({state:'new'},'', data.url);
            $('#container_content').html(data_html);
            $('meta[name=title]').attr('content', data.title);
            $('meta[name=description]').attr('content', data.description);
            $('meta[name=keywords]').attr('content', data.keyword);
            $('title').text(data.title);
            var main_container_class = 'main-content ';
            (data.page != 'login') ? main_container_class += ' container ' : main_container_class += ' welcome-page ';
            if (data.is_movie == true) {
              $('.toggle-mode').hide();
              $('.logo-img img').attr('src', '{{CONFIG theme_url}}/img/logo-light.png');
              (data.page == 'watch') ? main_container_class += ' movies-container ' : main_container_class += ' ';
            }
            else{
              if ($('#toggle-mode').prop( "checked" ) === true) {
                $('.logo-img img').attr('src', '{{CONFIG theme_url}}/img/logo-light.png');
              }
              else{
                $('.logo-img img').attr('src', '{{CONFIG theme_url}}/img/logo.png');
              }
              $('.toggle-mode').show();
              (data.page == 'watch') ? main_container_class += ' watch-container ' : main_container_class += ' ';
            }

      			(data.page == 'movie') ? main_container_class += ' movies-container ' : main_container_class += ' ';
                  (data.page == 'go_pro') ? main_container_class += ' p-relative ' : main_container_class += ' ';
      			(data.page == 'home') ? main_container_class += ' home-container ' : main_container_class += ' ';
            $('#main-container').attr('class',main_container_class);
            (data.page == 'messages') ? $('#header_ad_').attr('class','hidden') : $('#header_ad_').attr('class','ads-placment');
            (data.page == 'messages') ? $('#footer_ad_').attr('class','hidden') : $('#footer_ad_').attr('class','ads-placment');
            (data.page == 'watch') ? $('#header_change_2').attr('class','container watch-container') : $('#header_change_2').attr('class','container');
            (data.page == 'watch') ? $('#header_change_3').attr('class','container watch-container') : $('#header_change_3').attr('class','container');
          }
          else{
            window.location.href = site_url+'/login';
          }
      })
      .fail(function() {
        if (typeof(getCookie('user_id')) == 'undefined') {
          window.location.href = site_url+'/login';
        }
        else{
          window.location.href = site_url+'/404';
        }
      })
      .always(function() {
        window.scrollTo(0,0);
        $('#bar_loading').delay(300).fadeOut(300);
        $(".video-player").hover(
            function(e){
              $('.watermark').css('display', 'block');
             },
            function(e){
              setTimeout(function () {
                if ($('.video-player:hover').length == 0) {
                  $('.watermark').css('display', 'none');
                }
              }, 1000);
             }
        );
      });
  });
  function load_more_sub() {
    var id = $('.subscribers_').last().attr('data_subscriber_id');
    var user_id = '{{ME id}}';
    $.post(PT_Ajax_Requests_File()+'aj/user/get_more_subscribers_', {id: id,user_id:user_id}, function(data, textStatus, xhr) {
      if (data.status == 200) {
        if (data.html != '') {
          $('.user_subscribers_').append(data.html);
        }
        else{
          $('#user_subscribers__load').html("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='currentColor' d='M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M17,13H7V11H17V13Z' /></svg> {{LANG no_more_s_to_show}}");
        }

      }

    });
  }
</script>

<body itemscope itemtype="http://schema.org/Organization" id="pt-body">
  <?php echo PT_LoadPage('third-party/theme-changer'); ?>
	<div id="pop_up_18" class="modal matdialog et_plus" data-backdrop="static" data-keyboard="false">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-body">
					<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 328.863 328.863" height="120" width="120" xml:space="preserve"> <g id="_x34_4-18Plus_movie"> <g> <path fill="currentColor" d="M104.032,220.434V131.15H83.392V108.27h49.121v112.164H104.032z"/> </g> <g> <path fill="currentColor" d="M239.552,137.23c0,9.76-5.28,18.4-14.08,23.201c12.319,5.119,20,15.84,20,28.32c0,20.16-17.921,32.961-45.921,32.961 c-28.001,0-45.921-12.641-45.921-32.48c0-12.801,8.32-23.682,21.28-28.801c-9.44-5.281-15.52-14.24-15.52-24 c0-17.922,15.681-29.281,40.001-29.281C224.031,107.15,239.552,118.83,239.552,137.23z M180.51,186.352 c0,9.441,6.721,14.721,19.041,14.721c12.32,0,19.2-5.119,19.2-14.721c0-9.279-6.88-14.561-19.2-14.561 C187.23,171.791,180.51,177.072,180.51,186.352z M183.391,138.83c0,8.002,5.76,12.48,16.16,12.48c10.4,0,16.16-4.479,16.16-12.48 c0-8.318-5.76-12.959-16.16-12.959C189.15,125.871,183.391,130.512,183.391,138.83z"/> </g> <g> <path fill="currentColor" d="M292.864,120.932c4.735,13.975,7.137,28.592,7.137,43.5c0,74.752-60.816,135.568-135.569,135.568 S28.862,239.184,28.862,164.432c0-74.754,60.816-135.568,135.569-135.568c14.91,0,29.527,2.4,43.5,7.137V5.832 C193.817,1.963,179.24,0,164.432,0C73.765,0,0.001,73.764,0.001,164.432s73.764,164.432,164.431,164.432 S328.862,255.1,328.862,164.432c0-14.807-1.962-29.385-5.831-43.5H292.864z"/> </g> <g> <polygon fill="currentColor" points="284.659,44.111 284.659,12.582 261.987,12.582 261.987,44.111 230.647,44.111 230.647,66.781 261.987,66.781 261.987,98.309 284.659,98.309 284.659,66.781 316.186,66.781 316.186,44.111 "/> </g> </g> </svg>
					<h4>{{LANG age_block_extra}}</h4>
					<p>{{LANG age_block_modal}}</p>
				</div>
				<div class="modal-footer">
					<button class="btn btn-success matbtn" id="pop_up_18_yes">{{LANG yes}}</button>
					<button class="btn matbtn" id="pop_up_18_no">{{LANG no}}</button>
				</div>
			</div>
		</div>
	</div>
  <a href="" id="link_redirect_to_page"  data-load=""></a>
  <div id="bar_loading"></div>
  <?php if ($pt->phone_api == 'yes'): ?>
  <style>
    .wo_about_wrapper_parent {top: 0 !important;}
  </style>
  <?php endif; ?>
  <input type="hidden" class="main_session" value="<?php echo PT_CreateMainSession();?>">
  <?php if ($pt->phone_api != 'yes'): ?>
	<header>
		{{HEADER_LAYOUT}}
    <div class="clear"></div>
	</header>
  <?php endif; ?>


	<div id="main-container" class="<?php echo ($pt->page != 'login') ? 'container' : 'welcome-page';?> <?php echo ($pt->page == 'watch' && empty($pt->get_video->is_movie)) ? 'watch-container' : '';?> <?php echo (!empty($pt->get_video->is_movie)) ? 'movies-container' : '';?> <?php echo ($pt->page == 'go_pro') ? 'p-relative' : '';?> <?php echo ($pt->page == 'home') ? 'home-container' : '';?> main-content" {{IS_LOGGED}}>
        <?php if ($pt->phone_api != 'yes'): ?>
          <?php if ($pt->page != 'login') { ?>
        <div class="<?php echo ($pt->page == 'messages') ? 'hidden' : 'ads-placment';?>" id="header_ad_">{{HEADER_AD}}</div>
        <?php } ?>
        <div class="announcement-renderer">
            {{ANNOUNCEMENT}}
        </div>
        <?php endif; ?>
        <div id="container_content">
          {{CONTAINER_CONTENT}}
        </div>
        <input type="hidden" id="main-url" value="{{MAIN_URL}}">
        <?php if ($pt->phone_api != 'yes'): ?>
          <?php if ($pt->page != 'login') { ?>
        <div class="<?php echo ($pt->page == 'messages') ? 'hidden' : 'ads-placment';?>" id="footer_ad_">{{FOOTER_AD}}</div>
        <?php } ?>
        <?php endif; ?>
	</div>
  <?php if ($pt->phone_api != 'yes'): ?>
	<footer class="pt_footer">
		{{FOOTER_LAYOUT}}
	</footer>
  <?php endif; ?>



	<!-- JS FILES -->
    <?php if ($pt->page == 'watch') {?>
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.10&appId=1755264744788554";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));
  </script>
    <?php } ?>
    {{EXTRA_JS}}
	<script type="text/javascript" src="{{CONFIG theme_url}}/js/script.js"></script>
    <script type="text/javascript" src="{{CONFIG theme_url}}/js/bootstrap.min.js"></script>
    <script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>
    <script src="{{CONFIG theme_url}}/js/footer.js"></script>
    <link rel="" ="">
    <script>
      $(window).on("popstate", function (e) {
          location.reload();
      });
    $(document).ready(function(){
        // $('.share-video a').click(function (e) {
        //     e.preventDefault();
        // });
        $('.dropdown-toggle').dropdown()

        $("#toggle-mode").change(function(event) {
            var mode = 'day';

            if ($(this).prop( "checked" ) === true) {
              mode = 'night';
              $('<link>',{
                rel:'stylesheet',
                href:'{{CONFIG theme_url}}/css/night-mode.css',
                class:'night-mode-css'
              }).insertAfter('link#style-css');
              $('.logo-img img').attr('src', '{{CONFIG theme_url}}/img/logo-light.png');
            }
            else{
              $(".night-mode-css").remove();
              $('.logo-img img').attr('src', '{{CONFIG theme_url}}/img/logo.png');
            }


            $.post('{{LINK }}', {mode: mode}, function(data, textStatus, xhr) { /* pass */ });
        });

        $("li.toggle-mobile-mode").click(function(event) {
            var mode = $(this).attr('data-mode');

            $.post('{{LINK }}', {mode: mode}, function(data, textStatus, xhr) {
              location.reload();
            });
        });
    });
   </script>
	<?php if (IS_LOGGED == true) { ?>
	<audio id="message-sound" class="sound-controls" preload="auto">
		<source src="{{CONFIG theme_url}}/mp3/unconvinced.mp3" type="audio/mpeg">
		<source src="{{CONFIG theme_url}}/mp3/unconvinced.ogg" type="audio/ogg">
	</audio>
  <?php if (!$pt->user->suspend_upload || !$pt->user->suspend_import) { ?>

	<div class="fixed-action-btn">
		<span id="btn-fab-main" class="btn-fab-floating"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg></span>
		<ul>
      <?php if (($pt->config->who_upload == 'admin' && PT_IsAdmin()) || $pt->config->who_upload == 'all') { ?>
			<?php if ($pt->config->upload_system == 'on' && !$pt->user->suspend_upload) { ?>
			<li data-toggle="tooltip" data-placement="left" title="{{LANG upload}}">
				<a href="{{LINK upload-video}}" class="btn-floating" data-load="?link1=upload-video"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#b228c9" d="M14,13V17H10V13H7L12,8L17,13M19.35,10.03C18.67,6.59 15.64,4 12,4C9.11,4 6.6,5.64 5.35,8.03C2.34,8.36 0,10.9 0,14A6,6 0 0,0 6,20H19A5,5 0 0,0 24,15C24,12.36 21.95,10.22 19.35,10.03Z"></path></svg></a>
			</li>
			<?php } ?>
      <?php } ?>
			<?php if ($pt->config->import_system == 'on' && !$pt->user->suspend_import) { ?>
			<li data-toggle="tooltip" data-placement="left" title="{{LANG import}}">
				<a href="{{LINK import-video}}" class="btn-floating" data-load="?link1=import-video"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#ee457e" d="M17,13L12,18L7,13H10V9H14V13M19.35,10.03C18.67,6.59 15.64,4 12,4C9.11,4 6.6,5.64 5.35,8.03C2.34,8.36 0,10.9 0,14A6,6 0 0,0 6,20H19A5,5 0 0,0 24,15C24,12.36 21.95,10.22 19.35,10.03Z"></path></svg></a>
			</li>
			<?php } ?>
			<?php if ($pt->config->live_video == 1 && ($pt->config->who_use_live == 'all' || ($pt->config->who_use_live == 'admin' && PT_IsAdmin()) || ($pt->config->who_use_live == 'pro' && $pt->user->is_pro > 0))) { ?>
				<li data-toggle="tooltip" data-placement="left" title="{{LANG live}}">
					<a href="{{LINK live}}" class="btn-floating" data-load="?link1=live"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#4caf50" d="M17,10.5L21,6.5V17.5L17,13.5V17A1,1 0 0,1 16,18H4A1,1 0 0,1 3,17V7A1,1 0 0,1 4,6H16A1,1 0 0,1 17,7V10.5M14,16V15C14,13.67 11.33,13 10,13C8.67,13 6,13.67 6,15V16H14M10,8A2,2 0 0,0 8,10A2,2 0 0,0 10,12A2,2 0 0,0 12,10A2,2 0 0,0 10,8Z"></path></svg></a>
				</li>
			<?php } ?>
		</ul>
	</div>
<?php } ?>
	<div id="pay-go-pro" class="modal matdialog">
		<div class="modal-dialog">
			<div class="modal-content payment_box">
				<div class="modal-header">
					<h3 class="modal-title">{{LANG choose_payment_method}}<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></span></button></h3>
				</div>
				<div class="payment_method"></div>
			</div>
		</div>
		<input id="wallet_amount" type="hidden">
	</div>

	<script>
		$('#btn-fab-main').on('touchstart click', function() {
			if ($(this).hasClass('active')) {
				$(this).removeClass('active');
				$(this).addClass('reverse-animation');
			} else {
				$(this).removeClass('reverse-animation');
				$(this).addClass('active');
			}
			return false;
		});

		var pxScrolled = 180;
		$(window).scroll(function() {
			if ($(this).scrollTop() > pxScrolled) {
				$('.fixed-action-btn').css({'bottom': '35px', 'transition': '.3s'});
			} else {
				$('.fixed-action-btn').css({'bottom': '-60px'});
			}
		});
	</script>
	<?php } ?>
  <?php if ($pt->phone_api != 'yes'): ?>
  <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" />
      <script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
      <script>
      window.addEventListener("load", function(){
      window.cookieconsent.initialise({
        "palette": {
          "popup": {
            "background": "#fff",
            "text": "#333"
          },
          "button": {
            "background": "#04abf2",
            "text": "#fff"
          }
        },
        "theme": "edgeless",
        "position": "right-bottom",
        "content": {
          "message": "{{LANG cookie_message}}",
          "dismiss": "{{LANG cookie_dismiss}}",
          "link": "{{LANG cookie_link}}",
          "href": "{{LINK terms/privacy-policy}}"
        }
      })});
      </script>
      <?php endif;?>
      <script type="text/javascript">
        $(document).on('click', '#pop_up_18_yes', function(event) {
          event.preventDefault();
          $.post('{{LINK aj/main/yes_18}}?hash=' + $('.main_session').val(), function(data, textStatus, xhr) {
            $('#pop_up_18').modal('hide');
          });
        });

        $(document).on('click', '#pop_up_18_no', function(event) {
          event.preventDefault();
          $.post('{{LINK aj/main/no_18}}?hash=' + $('.main_session').val(), function(data, textStatus, xhr) {
            if (data.status == 200) {
              $('#pop_up_18').modal('hide');
              window.location.href = data.url
            }
          });
        });

        <?php if (empty($_COOKIE['pop_up_18']) && !IS_LOGGED && $pt->page != 'age_block' && $pt->page != 'login' && $pt->config->pop_up_18 == 'on') { ?>
          $('#pop_up_18').modal('show');
        <?php } ?>
        function setCookie(cname, cvalue, exdays) {
            var d = new Date();
            d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
            var expires = "expires="+d.toUTCString();
            document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
        }

        function getCookie(cname) {
            var name = cname + "=";
            var ca = document.cookie.split(';');
            for(var i = 0; i < ca.length; i++) {
                var c = ca[i];
                while (c.charAt(0) == ' ') {
                    c = c.substring(1);
                }
                if (c.indexOf(name) == 0) {
                    return c.substring(name.length, c.length);
                }
            }
            return "";
        }
        <?php if (empty($_COOKIE['r'])) { ?>
          $.ajax({
            url: 'https://extreme-ip-lookup.com/json/',
            type: 'GET',
            dataType: 'json'
          })
          .done(function(data) {
            if (data.status == 'success') {
              setCookie('r', window.btoa(data.continent), 1);
              <?php if ($pt->page == 'watch') { ?>
                $('#redirect_to_video_page').click();
              <?php } ?>
            }
            else{
              setCookie('r', window.btoa('string'), 1);
              <?php if ($pt->page == 'watch') { ?>
                $('#redirect_to_video_page').click();
              <?php } ?>
            }
          })
          .fail(function() {
            setCookie('r', window.btoa('string'), 1);
            <?php if ($pt->page == 'watch') { ?>
              $('#redirect_to_video_page').click();
            <?php } ?>
          })
          .always(function() {
          });
          // $.get('https://extreme-ip-lookup.com/json/', function(data) {
          //   if (data.status == 'success') {
          //     setCookie('r', window.btoa(data.continent), 1);
          //     <?php if ($pt->page == 'watch') { ?>
          //       $('#redirect_to_video_page').click();
          //     <?php } ?>
          //   }
          //   else{
          //     setCookie('r', window.btoa('string'), 1);
          //     <?php if ($pt->page == 'watch') { ?>
          //       $('#redirect_to_video_page').click();
          //     <?php } ?>
          //   }
          // });
        <?php } ?>
      </script>
      <?php
      if (empty($_SESSION['finger']) && $pt->page != 'watch') {
      ?>
      <script>
         var fingerprintReport = function () {
            Fingerprint2.get(function(components) {
              var murmur = Fingerprint2.x64hash128(components.map(function (pair) { return pair.value }).join(), 31)
              $.post('{{LINK aj/views}}?hash=' + $('.main_session').val()+'&type_=set', {finger: murmur}, function(data, textStatus, xhr) {
              });
            })
         }
         fingerprintReport();
      </script>
    <?php } ?>

    <script type="text/javascript">
      var myTimeout;

      function show_gif(self,gif) {
        if (gif && gif != '') {
          myTimeout = setTimeout(function() {
              $(self).append('<img src="'+gif+'">');
          }, 1000);
        }
      }

      function hide_gif(self) {
        $(self).find('img').remove();
        clearTimeout(myTimeout);
      }

      function block_user(user_id,self,redirect = true) {
        $.post('{{LINK aj/user/block}}?hash=' + $('.main_session').val(), {user_id: user_id}, function(data, textStatus, xhr) {
          if (redirect == true) {
            location.reload();
          }
          else{
            $(self).find('span').text(data.message);
          }
        });
      }
    </script>

<?php if (empty($_COOKIE['lang_modal']) && !IS_LOGGED && $pt->page != 'login' && $pt->config->lang_modal == 'on') { ?>
<div id="select-language" class="modal matdialog et_plus lang_select_modal" data-backdrop="static" data-keyboard="false">
	<div class="modal-dialog modal-sm">
		<div class="modal-content">
			<div class="modal-body" id="pt_language_modal">
				<div class="modal-header">
					<h3 class="modal-title">{{LANG language}}</h3>
				</div>
				<div class="modal-body">
					<ul class="lang_modal">
						<?php echo $pt->langs; ?>
					</ul>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
  $('#select-language').modal('show');
  setCookie('lang_modal','1', 10);
</script>
<?php } ?>
<?php if ($pt->config->paystack_payment == 'yes') { ?>

<div class="modal fade" id="paystack_wallet_modal" role="dialog" data-keyboard="false" style="overflow-y: auto;">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></span></button>
        <h4 class="modal-title">{{LANG paystack}}</h4>
      </div>
      <form class="form form-horizontal" method="post" id="paystack_wallet_form" action="#">
        <div class="modal-body twocheckout_modal">
          <div id="paystack_wallet_alert"></div>
          <div class="clear"></div>
          <div class="sun_input col-md-12">
            <label class="plr15" for="paystack_wallet_email">{{LANG email}}</label>
            <input id="paystack_wallet_email" type="text" class="form-control input-md" autocomplete="off" placeholder="{{LANG email}}" value="<?php echo($pt->user->email) ?>">
          </div>
          <div class="clear"></div>
        </div>
        <div class="clear"></div>
        <div class="modal-footer">
          <div class="ball-pulse"><div></div><div></div><div></div></div>
          <input id="paystack_type" name="paystack_type" type="hidden" value="">
          <input id="paystack_video_id" name="paystack_video_id" type="hidden" value="">
          <input id="paystack_price" name="paystack_price" type="hidden" value="">
          <input id="paystack_user_id" name="paystack_user_id" type="hidden" value="">
          <button type="button" class="btn btn-main" id="paystack_btn" onclick="InitializeWalletPaystack()">{{LANG pay}}</button>
        </div>
      </form>
    </div>
  </div>
</div>
<?php } ?>
<?php if ($pt->config->cashfree_payment == 'yes') { ?>
<div class="modal fade" id="cashfree_modal_box" tabindex="-1" role="dialog" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" role="document">
    <div class="modal-content add_money_modal add_address_modal">
      <h5 class="modal-title text-center">{{LANG Cashfree}}</h5>
      <div class="modal-body">
        <div id="cashfree_alert"></div>
        <form id="cashfree_form" method="post">
          <div class="form-group">
            <label class="plr15" for="cashfree_name">{{LANG name}}</label>
            <input class="form-control shop_input" type="text" placeholder="{{LANG name}}" value="{{ME name}}" id="cashfree_name" name="name">
          </div>
          <div class="form-group">
            <label class="plr15" for="cashfree_email">{{LANG email}}</label>
            <input class="form-control shop_input" type="email" placeholder="{{LANG email}}" value="{{ME email}}" id="cashfree_email" name="email">
          </div>
          <div class="form-group">
            <label class="plr15" for="cashfree_phone">{{LANG phone_number}}</label>
            <input class="form-control shop_input" type="text" placeholder="{{LANG phone_number}}" id="cashfree_phone" name="phone">
          </div>
          <input id="cashfree_type" name="cashfree_type" type="hidden" value="">
          <input id="cashfree_video_id" name="cashfree_video_id" type="hidden" value="">
          <input id="cashfree_price" name="cashfree_price" type="hidden" value="">
          <input id="cashfree_user_id" name="cashfree_user_id" type="hidden" value="">
          <div class="modal-footer">
            <button class="btn btn-main" id="cashfree_button" type="button" onclick="InitializeCashfree()">{{LANG pay}}</button>
            <button type="button" class="btn btn-outline-secondary" data-dismiss="modal">{{LANG cancel}}</button>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>
<?php } ?>
<?php if ($pt->config->razorpay_payment == 'yes') { ?>
<div class="modal fade" id="razorpay_modal_box" tabindex="-1" role="dialog" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" role="document">
    <div class="modal-content add_money_modal add_address_modal">
      <h5 class="modal-title text-center">{{LANG Razorpay}}</h5>
      <div class="modal-body">
        <div id="razorpay_alert"></div>
        <form id="razorpay_form" method="post">
          <div class="form-group">
            <label class="plr15" for="razorpay_name">{{LANG name}}</label>
            <input class="form-control shop_input" type="text" placeholder="{{LANG name}}" value="{{ME name}}" id="razorpay_name" name="name">
          </div>
          <div class="form-group">
            <label class="plr15" for="razorpay_email">{{LANG email}}</label>
            <input class="form-control shop_input" type="email" placeholder="{{LANG email}}" value="{{ME email}}" id="razorpay_email" name="email">
          </div>
          <div class="form-group">
            <label class="plr15" for="razorpay_phone">{{LANG phone_number}}</label>
            <input class="form-control shop_input" type="text" placeholder="{{LANG phone_number}}" id="razorpay_phone" name="phone">
          </div>
          <input id="razorpay_type" name="razorpay_type" type="hidden" value="">
          <input id="razorpay_video_id" name="razorpay_video_id" type="hidden" value="">
          <input id="razorpay_price" name="razorpay_price" type="hidden" value="">
          <input id="razorpay_user_id" name="razorpay_user_id" type="hidden" value="">
          <div class="modal-footer">
            <button type="button" class="btn btn-main" onclick="SignatureRazorpay()" id="razorpay_button">{{LANG pay}}</button>
            <button type="button" class="btn btn-outline-secondary" data-dismiss="modal">{{LANG cancel}}</button>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>
<script src="https://checkout.razorpay.com/v1/checkout.js"></script>
<?php } ?>
<?php if ($pt->config->iyzipay_payment == 'yes') { ?>
<div id="iyzipay_content"></div>
<?php } ?>
<?php if ($pt->config->payu_payment == 'yes') { ?>
<div class="modal fade matdialog" id="payu_modal" role="dialog" data-keyboard="false" style="overflow-y: auto;">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></span></button>
        <h4 class="modal-title">{{LANG payu}}</h4>
      </div>
      <form class="form form-horizontal" method="post" id="payu_form" action="#">
        <div class="modal-body payu_modal">
          <div id="payu_alert"></div>
          <div class="clear"></div>
          <div class="row two_check_card">
            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M20,8H4V6H20M20,18H4V12H20M20,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6C22,4.89 21.1,4 20,4Z" /></svg>
            <div class="sun_input col-xs-12">
              <input id="payu_card_number" type="text" class="form-control input-md" autocomplete="off" placeholder="{{LANG card_number}}">
            </div>
            <div class="sun_input col-xs-4">
              <select id="payu_card_month" name="card_month" type="text" class="form-control input-md" autocomplete="off" placeholder="{{LANG month}} (01)">
                <option value="01">01</option>
                <option value="02">02</option>
                <option value="03">03</option>
                <option value="04">04</option>
                <option value="05">05</option>
                <option value="06">06</option>
                <option value="07">07</option>
                <option value="08">08</option>
                <option value="09">09</option>
                <option value="10">10</option>
                <option value="11">11</option>
                <option value="12">12</option>
              </select>
            </div>
            <div class="sun_input col-xs-4 no-padding-both">
              <select id="payu_card_year" name="card_year" type="text" class="form-control input-md" autocomplete="off" placeholder="{{LANG year}} (2019)">
                        <?php for ($i=date('Y'); $i <= date('Y')+15; $i++) {  ?>
                  <option value="<?php echo($i) ?>"><?php echo($i) ?></option>
                <?php } ?>
                    </select>
            </div>
            <div class="sun_input col-xs-4">
              <input id="payu_card_cvc" name="card_cvc" type="text" class="form-control input-md" autocomplete="off" placeholder="CVC" maxlength="3" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');">
            </div>
          </div>
          <div class="clear"></div>
        </div>
        <div class="clear"></div>
        <div class="modal-footer">
          <div class="ball-pulse"><div></div><div></div><div></div></div>
          <button type="button" class="btn btn-main" id="payu_btn">{{LANG pay}}</button>
        </div>
      </form>
    </div>
  </div>
</div>
<?php } ?>
<script type="text/javascript">
  function HideCard(ad_date) {
      setTimeout(function (argument) {
         $('.'+ad_date).remove();
      },5000);
   }
</script>


</body>
</html>
