@foreach($audiolanguages as $lang)
@php
$audiogenreitems = NULL;
$audiogenreitems = array();
foreach ($menu_data as $key => $item)
{
$gmovie = App\Movie::join('videolinks','videolinks.movie_id','=','movies.id')
->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.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.slug as slug','movies.is_custom_label as is_custom_label','movies.label_id as label_id')
->where('movies.is_upcoming','!=' ,1)
->where('movies.a_language', 'LIKE', '%' . $lang->id . '%')->where('movies.id',$item->movie_id)->first();
if(isset($gmovie) && $gmovie != NULL){
$audiogenreitems[] = $gmovie;
}
if($section->order == 1){
arsort($audiogenreitems);
}
if(count($audiogenreitems) == $section->item_limit){
break;
exit(1);
}
}
$audiogenreitems = array_values(array_filter($audiogenreitems));
foreach ($menu_data as $key => $item) {
$gtvs = App\Tvseries::
join('seasons','seasons.tv_series_id','=','tv_series.id')
->join('episodes','episodes.seasons_id','=','seasons.id')
->join('videolinks','videolinks.episode_id','=','episodes.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.trailer_url as trailer_url','seasons.tmdb as tmdb','tv_series.is_custom_label as is_custom_label','tv_series.label_id as label_id')->where('seasons.a_language', 'LIKE', '%' . $lang->id . '%')
->where('tv_series.id',$item->tv_series_id)->first();
if(isset($gtvs)){
array_push($audiogenreitems, $gtvs);
}
if($section->order == 1){
arsort($audiogenreitems);
}
if(count($audiogenreitems) == $section->item_limit*2){
break;
exit(1);
}
}
$audiogenreitems = array_values(array_filter($audiogenreitems));
@endphp
@if($audiogenreitems != NULL && count($audiogenreitems)>0)
{{ ucfirst($lang->language) }} in {{ $menu->name }}
@endif
@if($section->view == 1)
@foreach($audiogenreitems 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)
@else
@endif
@if(timecalcuate($auth->id,$item->id,$item->type) != 0)
@endif
@else
@if($src)
@endif
@endif
@if($item->is_custom_label == 1)
@if(isset($item->label_id))
{{$item->label->name}}
@endif
@endif
@if(isset($protip) && $protip == 1)
{{$item->title}}
{{__('Tmdb Rating')}} {{$item->rating}}
{{$item->duration}} {{__('Mins')}}
{{$item->publish_year}}
{{$item->maturity_rating}}
@if($auth && getSubscription()->getData()->subscribed == true)
@if($item->is_upcoming != 1 && isset($item->video_link))
@if($item->maturity_rating == 'all age' || $age>=str_replace('+', '', $item->maturity_rating) )
@if(isset($item->video_link['iframeurl']) && $item->video_link['iframeurl'] != null)
{{__('playnow')}}
@else
{{__('playnow')}}
@endif
@else
{{__('playnow')}}
@endif
@endif
@if($item->trailer_url != null || $item->trailer_url != '')
{{__('Watch Trailer')}}
@endif
@else
@if($item->trailer_url != null || $item->trailer_url != '')
{{__('Watch Trailer')}}
@endif
@endif
@if($catlog == 0 && getSubscription()->getData()->subscribed == true)
@if (isset($wishlist_check->added))
{{$wishlist_check->added == 1 ? __('Remove From Watchlist') : __('Add to Watchlist')}}
@else
{{__('Add to Watchlist')}}
@endif
@elseif($catlog ==1 && $auth)
@if (isset($wishlist_check->added))
{{$wishlist_check->added == 1 ? __('Remove From Watchlist') : __('Add to Watchlist')}}
@else
{{__('Add to Watchlist')}}
@endif
@endif
@endif
@endif
@endif
@if($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(isset($protip) && $protip == 1)
{{$item->title}}
{{__('Tmdb Rating')}} {{$item->rating}}
{{__('Season')}} {{$item->season_no}}
{{$item->publish_year}}
{{$item->age_req}}
@if ($item->detail != null || $item->detail != '')
{{$item->detail}}
@else
{{$item->detail}}
@endif
@endif
@endif
@endif
@endif
@endforeach
@endif
@if($section->view == 0)
@foreach($audiogenreitems 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();
}
}
$gets1 = App\Season::where('tv_series_id','=',$item->id)->first();
if (isset($gets1) && $auth && $auth != NULL) {
$wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([
['user_id', '=', $auth->id],
['season_id', '=', $gets1->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)
@endif
@if(timecalcuate($auth->id,$item->id,$item->type) != 0)
@endif
@else
@if($src)
@endif
@endif
@if($item->is_custom_label == 1)
@if(isset($item->label_id))
{{$item->label->name}}
@endif
@endif
@if(isset($protip) && $protip == 1)
{{$item->title}}
{{__('Tmdb Rating')}} {{$item->rating}}
{{$item->duration}} {{__('Mins')}}
{{$item->publish_year}}
{{$item->maturity_rating}}
@if($auth && getSubscription()->getData()->subscribed == true)
@if($item->is_upcoming != 1 && isset($item->video_link))
@if($item->maturity_rating == 'all age' || $age>=str_replace('+', '', $item->maturity_rating) )
@if(isset($item->video_link['iframeurl']) && $item->video_link['iframeurl'] != null)
{{__('playnow')}}
@else
{{__('playnow')}}
@endif
@else
{{__('playnow')}}
@endif
@endif
@if($item->trailer_url != null || $item->trailer_url != '')
{{__('Watch Trailer')}}
@endif
@else
@if($item->trailer_url != null || $item->trailer_url != '')
{{__('Watch Trailer')}}
@endif
@endif
@if($catlog==0 && getSubscription()->getData()->subscribed == true)
@if (isset($wishlist_check->added))
{{$wishlist_check->added == 1 ? __('Remove From Watchlist') : __('Add to Watchlist')}}
@else
{{__('Add to Watchlist')}}
@endif
@elseif($catlog ==1 && $auth)
@if (isset($wishlist_check->added))
{{$wishlist_check->added == 1 ? __('Remove From Watchlist') : __('Add to Watchlist')}}
@else
{{__('Add to Watchlist')}}
@endif
@endif
@endif
@endif
@endif
@if($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(isset($protip) && $protip == 1)
{{$item->title}}
{{__('Tmdb Rating')}} {{$item->rating}}
{{__('Season')}} {{$item->season_no}}
{{$item->publish_year}}
{{$item->age_req}}
@if ($item->detail != null || $item->detail != '')
{{str_limit($item->detail,100,'...')}}
@else
{{str_limit($item->detail,100,'...')}}
@endif
@if($auth && getSubscription()->getData()->subscribed == true)
{{__('Read More')}}
@else
{{__('Read More')}}
@endif
@endif
@endif
@endif
@endif
@endforeach
@endif
@endforeach
@section('custom-script')
@endsection