@extends('layouts.theme') @section('title',"$menu->name") @section('main-wrapper') @php $age = AgeHelper::getage(); @endphp
@if(isset($home_slides) && count($home_slides) > 0)
@endif @include('modal.agemodal') @include('modal.agewarning') @if(count($menu->menusections)>0) @foreach($menu->menusections as $section) @php $recentlyadded = []; foreach ($recent_data as $key => $item) { $d = \Request::getHost(); $domain = str_replace("www.", "", $d); if (strstr($domain, 'localhost') ) { $ipaddress='43.251.92.73'; }else{ $ipaddress = $request->getClientIp(); } $geoip = geoip()->getLocation($ipaddress); $usercountry = strtoupper($geoip->country); $rm = \DB::table('movies') ->select('movies.id as id','movies.title as title','movies.type as type','movies.status as status','movies.genre_id as genre_id','movies.thumbnail as thumbnail','movies.live as live','movies.slug as slug','movies.tmdb as tmdb','movies.is_custom_label as is_custom_label','movies.label_id as label_id') ->where('movies.is_upcoming','!=' ,1) ->where('movies.is_kids','!=' ,1) ->where('movies.country', 'NOT like', '%'.$usercountry.'%') ->where('movies.id',$item->movie_id)->first(); $recentlyadded[] = $rm; if($section->order == 1){ arsort($recentlyadded); } if(count($recentlyadded) == $section->item_limit){ break; exit(1); } } foreach ($recent_data as $key => $item) { $d = \Request::getHost(); $domain = str_replace("www.", "", $d); if (strstr($domain, 'localhost') ) { $ipaddress='43.251.92.73'; }else{ $ipaddress = $request->getClientIp(); } $geoip = geoip()->getLocation($ipaddress); $usercountry = strtoupper($geoip->country); $rectvs = \DB::table('tv_series') ->join('seasons','seasons.tv_series_id','=','tv_series.id') ->select('seasons.id as seasonid','tv_series.genre_id as genre_id','tv_series.id as id','tv_series.type as type','tv_series.status as status','tv_series.title as title','tv_series.thumbnail as thumbnail','seasons.season_slug as season_slug','seasons.tmdb as tmdb','tv_series.is_custom_label as is_custom_label','tv_series.label_id as label_id') ->where('tv_series.is_kids','!=' ,1) ->where('tv_series.country', 'NOT like', '%'.$usercountry.'%') ->where('tv_series.id',$item->tv_series_id)->first(); $recentlyadded[] = $rectvs; if($section->order == 1){ arsort($recentlyadded); } if(count($recentlyadded) == $section->item_limit){ break; exit(1); } } $recentlyadded = array_values(array_filter($recentlyadded)); @endphp @if($section->section_id == 1 && $recentlyadded != NULL && count($recentlyadded)>0)
{{__('Recently Added In')}} {{ $menu->name }}

{{__('at the big screen at home')}}

@if($auth && getSubscription()->getData()->subscribed == true) {{__('view all')}} @else {{__('view all')}} @endif
@if($section->view == 1)
@endif @if($section->view == 0)
@foreach($recentlyadded as $item) @php if(isset($auth) && $auth != NULL){ if ($item->type == 'M') { $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['movie_id', '=', $item->id], ])->first(); } } if(isset($auth) && $auth != NULL){ $gets1 = App\Season::where('tv_series_id','=',$item->id)->first(); if (isset($gets1)) { $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['season_id', '=', $gets1->id], ])->first(); } } else{ $gets1 = App\Season::where('tv_series_id','=',$item->id)->first(); } @endphp @if($item->status == 1) @if($item->type == 'M') @php $image = public_path() .'/images/movies/thumbnails/'.$item->thumbnail; // Read image path, convert to base64 encoding $imageData = base64_encode(@file_get_contents($image)); if($imageData){ // Format the image SRC: data:{mime};base64,{data}; $src = 'data: '.mime_content_type($image).';base64,'.$imageData; }else{ $src = Avatar::create($item->title)->toBase64(); } @endphp @if(hidedata($item->id,$item->type) != 1)
@if($auth && getSubscription()->getData()->subscribed == true) @if($src) genre-image @else genre-image @endif
@if(timecalcuate($auth->id,$item->id,$item->type) != 0)
@endif @else @if($src) genre-image @else genre-image @endif @endif @if($item->is_custom_label == 1) @if(isset($item->label_id)) {{$item->label->name}} @endif @endif
@if($auth && getSubscription()->getData()->subscribed == true) {{$item->title}} @else {{$item->title}} @endif
@endif @elseif($item->type == 'T') @php $image = public_path() . '/images/tvseries/thumbnails/'.$item->thumbnail; // Read image path, convert to base64 encoding $imageData = base64_encode(@file_get_contents($image)); if($imageData){ // Format the image SRC: data:{mime};base64,{data}; $src = 'data: '.mime_content_type($image).';base64,'.$imageData; }else{ $src =Avatar::create($item->title)->toBase64(); } @endphp @if(hidedata($gets1->id,$gets1->type) != 1)
@if($auth && getSubscription()->getData()->subscribed == true) @if($src) genre-image @endif
@else @if($src) genre-image @endif @endif @if($item->is_custom_label == 1) @if(isset($item->label_id)) {{$item->label->name}} @endif @endif
@if($auth && getSubscription()->getData()->subscribed == true)
{{$item->title}}
@else
{{$item->title}}
@endif
@endif @endif @endif @endforeach
@endif
@endif @endforeach @foreach($menu->menusections as $section) @php $featuresitems = []; foreach ($menu_data as $key => $item) { $d = \Request::getHost(); $domain = str_replace("www.", "", $d); if (strstr($domain, 'localhost') ) { $ipaddress='43.251.92.73'; }else{ $ipaddress = $request->getClientIp(); } $geoip = geoip()->getLocation($ipaddress); $usercountry = strtoupper($geoip->country); $fmovie = \DB::table('movies') ->select('movies.id as id','movies.title as title','movies.type as type','movies.status as status','movies.genre_id as genre_id','movies.thumbnail as thumbnail','movies.slug as slug','movies.tmdb as tmdb','movies.is_custom_label as is_custom_label','movies.label_id as label_id') ->where('movies.is_upcoming','!=' ,1) ->where('movies.is_kids','!=' ,1) ->where('movies.country', 'NOT like', '%'.$usercountry.'%') ->where('movies.id',$item->movie_id)->where('featured', '1')->first(); if($fmovie){ $featuresitems[] = $fmovie; } if($section->order == 1){ arsort($featuresitems); } if(count($featuresitems) == $section->item_limit){ break; exit(); } } foreach ($menu_data as $key => $item) { $d = \Request::getHost(); $domain = str_replace("www.", "", $d); if (strstr($domain, 'localhost') ) { $ipaddress='43.251.92.73'; }else{ $ipaddress = $request->getClientIp(); } $geoip = geoip()->getLocation($ipaddress); $usercountry = strtoupper($geoip->country); $ftvs = \DB::table('tv_series') ->join('seasons','seasons.tv_series_id','=','tv_series.id') ->select('seasons.id as seasonid','tv_series.genre_id as genre_id','tv_series.id as id','tv_series.type as type','tv_series.status as status','tv_series.title as title','tv_series.thumbnail as thumbnail','seasons.season_slug as season_slug','seasons.tmdb as tmdb','tv_series.is_custom_label as is_custom_label','tv_series.label_id as label_id') ->where('tv_series.is_kids','!=' ,1) ->where('tv_series.country', 'NOT like', '%'.$usercountry.'%') ->where('tv_series.id',$item->tv_series_id)->where('tv_series.featured','1')->first(); if($ftvs){ $featuresitems[] = $ftvs; } if($section->order == 1){ arsort($featuresitems); } if(count($featuresitems) == $section->item_limit+1){ break; exit(); } } $featuresitems = array_values(array_filter($featuresitems)); @endphp @if($section->section_id == 3 && $featuresitems != NULL && count($featuresitems)>0)
{{__('Featured In')}} {{ $menu->name }}

{{__('at the big screen at home')}}

@if($section->view == 1)
@endif @if($section->view == 0)
@foreach($featuresitems as $item) @php if(isset($auth) && $auth != NULL){ if ($item->type == 'M') { $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['movie_id', '=', $item->id], ])->first(); } } if(isset($auth) && $auth != NULL){ $gets1 = App\Season::where('tv_series_id','=',$item->id)->first(); if (isset($gets1)) { $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['season_id', '=', $gets1->id], ])->first(); } } else{ $gets1 = App\Season::where('tv_series_id','=',$item->id)->first(); } @endphp @if($item->status == 1) @if($item->type == 'M') @php $image = 'images/movies/thumbnails/'.$item->thumbnail; // Read image path, convert to base64 encoding $imageData = base64_encode(@file_get_contents($image)); if($imageData){ // Format the image SRC: data:{mime};base64,{data}; $src = 'data: '.mime_content_type($image).';base64,'.$imageData; }else{ $src = Avatar::create($item->title)->toBase64(); } @endphp @if(hidedata($item->id,$item->type) != 1)
@if($auth && getSubscription()->getData()->subscribed == true) @if($src) genre-image @endif
@if(timecalcuate($auth->id,$item->id,$item->type) != 0)
@endif @else @if($src) genre-image @endif @endif @if($item->is_custom_label == 1) @if(isset($item->label_id)) {{$item->label->name}} @endif @endif
@if($auth && getSubscription()->getData()->subscribed == true) {{$item->title}} @else {{$item->title}} @endif
@endif @elseif($item->type == 'T') @php $image = 'images/tvseries/thumbnails/'.$item->thumbnail; // Read image path, convert to base64 encoding $imageData = base64_encode(@file_get_contents($image)); if($imageData){ // Format the image SRC: data:{mime};base64,{data}; $src = 'data: '.mime_content_type($image).';base64,'.$imageData; }else{ $src = Avatar::create($item->title)->toBase64(); } @endphp @if(hidedata($gets1->id,$gets1->type) != 1)
@if($auth && getSubscription()->getData()->subscribed == true) @if($src) genre-image @endif
@else @if($src) genre-image @endif @endif @if($item->is_custom_label == 1) @if(isset($item->label_id)) {{$item->label->name}} @endif @endif
@if($auth && getSubscription()->getData()->subscribed == true)
{{$item->title}}
@else
{{$item->title}}
@endif
@endif @endif @endif @endforeach
@endif
@endif @endforeach @if(Auth::user() && $auth != NULL && getSubscription()->getData()->subscribed == true) @foreach($menu->menusections as $section) @php $watchistory_last_movie=App\WatchHistory::where('user_id',$auth->id)->orderBy('id','DESC')->where('movie_id','!=',NULL)->take(3)->get(); $watchistory_last_tv=App\WatchHistory::where('user_id',$auth->id)->orderBy('id','DESC')->where('tv_id','!=',NULL)->take(3)->get(); $customGenreMovie = []; $customGenreTv = []; foreach ($watchistory_last_movie as $key => $w) { $movie_find_last = App\Movie::where('id','=',$w->movie_id)->where('is_kids',0)->first(); if(isset($movie_find_last)){ $customGenreMovie[] = $movie_find_last->genre_id; } } foreach ($watchistory_last_tv as $key => $k) { $tv_show = App\TvSeries::where('id','=',$k->tv_id)->where('is_kids',0)->first(); if(isset($tv_show)){ $customGenreTv[] = $tv_show->genre_id; } } $customGenreMovie = array_unique($customGenreMovie); $customGenreTv = array_unique($customGenreTv); $recom_block = collect(); $customGenreMovie = array_unique($customGenreMovie); $customGenreTv = array_unique($customGenreTv); //Getting Recommnaded Movies based on genre foreach ($customGenreMovie as $key => $g) { $x = App\Movie::orderBy('id','DESC')->where('is_kids',0)->where('genre_id', 'LIKE', '%' . $g . '%')->take(50)->get(); $recom_block->push($x); } //Getting Recommnaded Tv Series based on genre foreach ($customGenreTv as $key => $g) { $y =App\TvSeries::orderBy('id','DESC')->where('is_kids',0)->where('genre_id', 'LIKE', '%' . $g . '%')->take(50)->get(); $recom_block->push($y); } $recom_block = $recom_block->flatten(); @endphp @if($section->section_id == 4 && $recom_block != NULL && count($recom_block)>0)
@php $watch = App\WatchHistory::OrderBy('id','DESC')->first(); $movie = App\Movie::where('id',$watch->movie_id)->first(); $tv = App\TvSeries::where('id',$watch->tv_id)->first(); @endphp @if(isset($movie))
{{__('Because you watched')}}: {{isset($movie->title) ?ucfirst($movie->title) : ''}}

{{__('at the bigs creen at home')}}

@else
{{__('Because you watched')}} : {{isset($tv->title) ? ucfirst($tv->title) : ''}}

{{__('at the big screen at home')}}

@endif
@if($section->view == 1)
@endif @if($section->view == 0)
@foreach($recom_block as $item) @php if(isset($auth) && $auth != NULL){ if ($item->type == 'M') { $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['movie_id', '=', $item->id], ])->first(); } } if(isset($auth) && $auth != NULL){ $gets1 = App\Season::where('tv_series_id','=',$item->id)->first(); if (isset($gets1)) { $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['season_id', '=', $gets1->id], ])->first(); } } else{ $gets1 = App\Season::where('tv_series_id','=',$item->id)->first(); } @endphp @if($item->status == 1) @if($item->type == 'M') @php $image = 'images/movies/thumbnails/'.$item->thumbnail; // Read image path, convert to base64 encoding $imageData = base64_encode(@file_get_contents($image)); if($imageData){ // Format the image SRC: data:{mime};base64,{data}; $src = 'data: '.mime_content_type($image).';base64,'.$imageData; }else{ $src = Avatar::create($item->title)->toBase64(); } @endphp @if(isset($item) && hidedata($item->id,$item->type) != 1)
@if($auth && getSubscription()->getData()->subscribed == true) @if($src) genre-image @endif
@if(timecalcuate($auth->id,$item->id,$item->type) != 0)
@endif @else @if($src) genre-image @endif @endif @if($item->is_custom_label == 1) @if(isset($item->label_id)) {{$item->label->name}} @endif @endif
@if($auth && getSubscription()->getData()->subscribed == true) {{$item->title}} @else {{$item->title}} @endif
@endif @elseif($item->type == 'T') @php $image = 'images/tvseries/thumbnails/'.$item->thumbnail; // Read image path, convert to base64 encoding $imageData = base64_encode(@file_get_contents($image)); if($imageData){ // Format the image SRC: data:{mime};base64,{data}; $src = 'data: '.mime_content_type($image).';base64,'.$imageData; }else{ $src = Avatar::create($item->title)->toBase64(); } @endphp @if(isset($gets1) && hidedata($gets1->id,$gets1->type) != 1)
@if($auth && getSubscription()->getData()->subscribed == true) @if($src) genre-image @endif
@else @if($src) genre-image @endif @endif @if($item->is_custom_label == 1) @if(isset($item->label_id)) {{$item->label->name}} @endif @endif
@if($auth && getSubscription()->getData()->subscribed == true)
{{$item->title}}
@else
{{$item->title}}
@endif
@endif @endif @endif @endforeach
@endif
@endif @endforeach @endif @foreach($menu->menusections as $section) @if($section->section_id == 12 && $top_data != NULL)
@if(isset($top_data->menu_data))
{{__('Top rated')}} {{__('in')}} {{ $menu->name }}
@endif
@endif @endforeach @if(Auth::user() && $auth != NULL && getSubscription()->getData()->subscribed == true) @foreach($menu->menusections as $section) @php $historyadded = []; foreach ($watchistory as $key => $item) { $rm = App\Movie:: join('watch_histories','movies.id','=','watch_histories.movie_id') ->join('menu_videos','menu_videos.movie_id','=','movies.id') ->join('videolinks','videolinks.movie_id','=','movies.id') ->select('movies.id as id','watch_histories.movie_id as movie_id','movies.title as title','movies.rating as rating','movies.duration as duration','movies.publish_year as publish_year','movies.maturity_rating as maturity_rating','movies.detail as detail','movies.trailer_url as trailer_url','videolinks.iframeurl as iframeurl','movies.status as status','movies.type as type','movies.thumbnail as thumbnail','movies.slug as slug','movies.tmdb as tmdb','movies.is_custom_label as is_custom_label','movies.label_id as label_id') ->where('movies.is_upcoming','!=' ,1) ->where('watch_histories.id',$item->id)->where('menu_videos.menu_id',$menu->id)->first(); $historyadded[] = $rm; if($section->order == 1){ arsort($historyadded); } if(count($historyadded) == $section->item_limit){ break; exit(1); } } foreach ($watchistory as $key => $item) { $rectvs = App\TvSeries:: join('watch_histories','tv_series.id','=','watch_histories.tv_id') ->join('seasons','seasons.tv_series_id','=','tv_series.id') ->join('episodes','episodes.seasons_id','=','seasons.id') ->join('videolinks','videolinks.episode_id','=','episodes.id') ->join('menu_videos','menu_videos.tv_series_id','=','tv_series.id') ->select('seasons.id as seasonid','tv_series.genre_id as genre_id','tv_series.id as id','tv_series.type as type','tv_series.status as status','tv_series.thumbnail as thumbnail','tv_series.title as title','tv_series.rating as rating','seasons.publish_year as publish_year','tv_series.maturity_rating as age_req','tv_series.detail as detail','seasons.season_no as season_no','videolinks.iframeurl as iframeurl','seasons.season_slug as season_slug','seasons.tmdb as tmdb','tv_series.is_custom_label as is_custom_label','tv_series.label_id as label_id') ->where('watch_histories.id',$item->id)->where('menu_videos.menu_id',$menu->id)->first(); $historyadded[] = $rectvs; if($section->order == 1){ arsort($historyadded); } if(count($historyadded) == $section->item_limit){ break; exit(1); } } $historyadded = array_values(array_filter($historyadded)); @endphp @if($section->section_id == 5 && $historyadded != NULL && count($historyadded)>0)
{{__('Continue Watching For')}} {{Auth::user()->name}}

{{__('at the big screen at home')}}

@if($auth && getSubscription()->getData()->subscribed == true) {{__('view all')}} @endif
@if($section->view == 1)
@endif @if($section->view == 0)
@foreach($historyadded as $item) @php if(isset($auth) && $auth != NULL){ if ($item->type == 'M') { $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['movie_id', '=', $item->id], ])->first(); } } if(isset($auth) && $auth != NULL){ $gets1 = App\Season::where('tv_series_id','=',$item->id)->first(); if (isset($gets1)) { $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['season_id', '=', $gets1->id], ])->first(); } } else{ $gets1 = App\Season::where('tv_series_id','=',$item->id)->first(); } @endphp @if($item->status == 1) @if($item->type == 'M') @php $image = 'images/movies/thumbnails/'.$item->thumbnail; // Read image path, convert to base64 encoding $imageData = base64_encode(@file_get_contents($image)); if($imageData){ // Format the image SRC: data:{mime};base64,{data}; $src = 'data: '.mime_content_type($image).';base64,'.$imageData; }else{ $src = Avatar::create($item->title)->toBase64(); } @endphp @if(hidedata($item->id,$item->type) != 1)
@if($auth && getSubscription()->getData()->subscribed == true) @if($src) genre-image @endif
@if(timecalcuate($auth->id,$item->id,$item->type) != 0)
@endif @else @if($src) genre-image @endif @endif @if(isset($item->is_upcoming) && $item->is_upcoming == 1) Upcoming @endif
@if($auth && getSubscription()->getData()->subscribed == true) {{$item->title}} @else {{$item->title}} @endif
@endif @elseif($item->type == 'T') @php $image = 'images/tvseries/thumbnails/'.$item->thumbnail; // Read image path, convert to base64 encoding $imageData = base64_encode(@file_get_contents($image)); if($imageData){ // Format the image SRC: data:{mime};base64,{data}; $src = 'data: '.mime_content_type($image).';base64,'.$imageData; }else{ $src = Avatar::create($item->title)->toBase64(); } @endphp @if(hidedata($gets1->id,$gets1->type) != 1)
@if($auth && getSubscription()->getData()->subscribed == true) @if($src) genre-image @endif
@endif
@if($auth && getSubscription()->getData()->subscribed == true)
{{$item->title}}
@endif
@endif @endif @endif @endforeach
@endif
@endif @endforeach @endif @foreach($menu->menusections as $section)
@if($section->section_id == 7 && $short_promo != NULL && count($short_promo)>0) @endif
@endforeach
@foreach($menu->menusections as $section) @if($section->section_id == 9 && $upcomingitems != NULL)
{{__('Upcoming Movie')}} {{ $menu->name }}

{{__('at the big screen at home')}}

@if($section->view == 1)
@endif
@endif @endforeach @foreach($menu->menusections as $section) @if($section->section_id == 6) @include('lang2') @if(count($getallaudiolanguage) > 0)
{{__('view all language')}}
@endif @endif @endforeach @foreach($menu->menusections as $section) @if($section->section_id == 2) @if(count($menu->menugenreshow) > 0) @include('selectgenre2') @endif @if(count($getallgenre) > 0)
{{__('view all genre')}}
@endif @endif @endforeach @endif @foreach($menu->menusections as $section) @if($section->section_id == 8) @if($configs->blog == '1') @if(isset($menu->getblogs) && count($menu->getblogs)>0)

{{__('recently blog')}}

{{__('atthebigscreenathome')}}

{{__('view all')}}
@endif @endif @endif @endforeach @if(isset($liveevent) && count($liveevent) > 0)

{{__('live event')}}

{{__('at the big screen at home')}}

@endif @if(isset($audio) && count($audio)>0)

{{__('Audio')}}

@endif
@php if (isset($ad) ) { if ($ad->ishome==1 && $ad->status==1) { $code= $ad->code; echo html_entity_decode($code); } } @endphp
@endsection @section('custom-script') @endsection