@extends('layouts.theme') @php $auth = Illuminate\Support\Facades\Auth::user(); // $subscribed = null; $withlogin= $configs->withlogin; $catlog = $configs->catlog; // Stripe\Stripe::setApiKey(env('STRIPE_SECRET')); // if (isset($auth)) { // $current_date = Illuminate\Support\Carbon::now(); // $paypal=App\PaypalSubscription::where('user_id',$auth->id)->orderBy('created_at','desc')->first(); // if (isset($paypal)) { // if (date($current_date) <= date($paypal->subscription_to)) { // if ($paypal->package_id==0) { // $nav_menus=App\Menu::all(); // $subscribed=1; // } // } // } // if ($auth->is_admin == 1 || $auth->is_assistant == 1) { // $subscribed = 1; // $nav_menus=App\Menu::orderBy('position','ASC')->get(); // } else{ // Stripe\Stripe::setApiKey(env('STRIPE_SECRET')); // if ($auth->stripe_id != null) { // $customer = \Laravel\Cashier\Cashier::findBillable($auth->stripe_id); // // $customer = Stripe\Customer::retrieve($auth->stripe_id); // } // if (isset($customer)) { // $data = $auth->subscriptions->last(); // } // if (isset($paypal) && $paypal != null && $paypal->count()>0) { // $last = $paypal; // } // $stripedate = isset($data) ? $data->created_at : null; // $paydate = isset($last) ? $last->created_at : null; // if($stripedate > $paydate){ // if($auth->subscribed($data->name) && date($current_date) <= date($data->subscription_to) && getPlan() == 1){ // $subscribed = 1; // if(isset($data->stripe_plan)){ // $planmenus= DB::table('package_menu')->where('package_id',$data->stripe_plan)->get(); // if(isset($planmenus)){ // foreach ($planmenus as $key => $value) { // $menus[]=$value->menu_id; // } // } // if(isset($menus)){ // $nav_menus=App\Menu::whereIn('id',$menus)->get(); // } // } // } // } // elseif($stripedate < $paydate){ // if ((date($current_date) <= date($last->subscription_to)) && $last->status == 1){ // $subscribed = 1; // if(isset($last->plan['plan_id'])){ // $planmenus= DB::table('package_menu')->where('package_id', $last->plan['plan_id'])->get(); // if(isset($planmenus)){ // foreach ($planmenus as $key => $value) { // $menus[]=$value->menu_id; // } // } // if(isset($menus)){ // $nav_menus=App\Menu::whereIn('id',$menus)->get(); // } // } // } // } // } // } @endphp @if(isset($movie)) @section('custom-meta') @section('title',$movie->title.' | ') @endsection @elseif($season) @php $title = $season->tvseries->title; @endphp @section('custom-meta') @endsection @section('title',"$title") @endif @section('main-wrapper') @include('modal.agemodal') @include('modal.agewarning')
@if(isset($movie)) @if($movie->poster != null)
@else
@endif @endif @if(isset($season)) @if($season->poster != null)
@elseif($season->tvseries->poster != null)
@else
@endif @endif
@if(isset($movie)) @php $a_languages = collect(); if ($movie->a_language != null) { $a_lan_list = explode(',', $movie->a_language); for($i = 0; $i < count($a_lan_list); $i++) { try { $a_language = App\AudioLanguage::find($a_lan_list[$i])->language; $a_languages->push($a_language); } catch (Exception $e) { } } } if(isset($auth)){ $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['movie_id', '=', $movie->id], ])->first(); } // Directors list of movie from model $directors = collect(); if ($movie->director_id != null) { $p_directors_list = explode(',', $movie->director_id); for($i = 0; $i < count($p_directors_list); $i++) { try { $p_director = App\Director::find($p_directors_list[$i])->name; $directors->push($p_director); } catch (Exception $e) { } } } // Actors list of movie from model $actors = collect(); if ($movie->actor_id != null) { $p_actors_list = explode(',', $movie->actor_id); for($i = 0; $i < count($p_actors_list); $i++) { try { $p_actor = App\Actor::find($p_actors_list[$i])->name; $actors->push($p_actor); } catch (Exception $e) { } } } // Genre list of movie from model $genres = collect(); if (isset($movie->genre_id)){ $genre_list = explode(',', $movie->genre_id); for ($i = 0; $i < count($genre_list); $i++) { try { $genre = App\Genre::find($genre_list[$i])->name; $genres->push($genre); } catch (Exception $e) { } } } @endphp
@if(isset($movie->video_link->iframeurl) && $movie->video_link->iframeurl != NULL) @if(strstr($movie->video_link->iframeurl, 'https://bradmax.com/')) @elseif(strstr($movie->video_link->iframeurl, '.mp4') || strstr($movie->video_link->iframeurl, '.mkv')) @else @endif @endif

{{$movie->title}} @if($movie->live == 1) @if($movie->livetvicon != NULL) @php $livetv = App\Config::pluck('livetvicon')->first(); @endphp livetvicon-image @else livetvicon-image @endif @endif

  • @if(Auth::check() && Auth::user() != NULL) @php $like=App\Like::orderBy('created_at','desc')->where('added','1')->where('blog_id',$movie->id)->count(); $unlike=App\Like::orderBy('created_at','desc')->where('added','-1')->where('blog_id',$movie->id)->count(); @endphp @endif
  • {{__('staticwords.genres')}} : @for($i = 0; $i < count($genres); $i++) @if($i == count($genres)-1) {{$genres[$i]}} @else {{$genres[$i]}}, @endif @endfor
@auth @if($configs->user_rating==1) @php $uid=Auth::user()->id; $rating=App\UserRating::where('user_id',$uid)-> where('movie_id',$movie->id)->first(); $avg_rating=App\UserRating::where('movie_id',$movie->id)->avg('rating'); @endphp
{{__('staticwords.averagerating')}} {{ number_format($avg_rating, 2) }}
{!! Form::open(['method' => 'POST', 'id'=>'formrating', 'action' => 'UserRatingController@store']) !!} {!!Form::close()!!} {{-- Give Rating --}} @endif @endauth

الفيديوهات القادمة

@if($auth && getSubscription()->getData()->subscribed == true) @if($movie->is_upcoming != 1) @if(checkInMovie($movie) == true) @if($movie->maturity_rating == 'all age' || $age>=str_replace('+', '',$movie->maturity_rating)) @if(isset($movie->video_link['iframeurl']) && $movie->video_link['iframeurl'] != null) @else @endif @else @endif @endif @endif @if($movie->trailer_url != null || $movie->trailer_url != '') {{__('staticwords.watchtrailer')}} @endif @else @if($movie->trailer_url != null || $movie->trailer_url != '') {{__('staticwords.watchtrailer')}} @endif @endif @if($catlog ==0 && getSubscription()->getData()->subscribed == true) @if (isset($wishlist_check->added)) @else @endif @elseif($catlog ==1 && $auth) @if (isset($wishlist_check->added)) @else @endif @endif @php $mlc = array(); if(isset($movie->multilinks)){ foreach ($movie->multilinks as $key => $value) { if($value->download == 1){ $mlc[] = 1; }else{ $mlc[] = 0; } } } @endphp @if(isset($movie->multilinks) && count($movie->multilinks) > 0 ) @if(Auth::user() && getSubscription()->getData()->subscribed == true) @if(in_array(1, $mlc))
@foreach($movie->multilinks as $key=> $link) @if($link->download == 1) @php $lang = App\AudioLanguage::where('id',$link->language)->first(); @endphp @endif @endforeach
@endif @endif @endif

{{$movie->detail}}

@if($button->remove_thumbnail == 0) @php if($movie->thumbnail != NULL){ $content = @file_get_contents(public_path() . '/images/movies/thumbnails/' . $movie->thumbnail); if($content){ $image = public_path() . '/images/movies/thumbnails/'.$movie->thumbnail; }else{ $image = public_path() . '/images/default-thumbnail.jpg'; } }else{ $image = public_path() . '/images/default-thumbnail.jpg'; } // echo $image; // die(); //$image = 'images/tvseries/thumbnails/'.$item->thumbnail; // Read image path, convert to base64 encoding $imageData = base64_encode(@file_get_contents($image)); if($imageData != NULL){ $src = 'data: '.mime_content_type($image).';base64,'.$imageData; } @endphp @endif
@elseif(isset($season)) @php $a_languages = collect(); if ($season->a_language != null) { $a_lan_list = explode(',', $season->a_language); for($i = 0; $i < count($a_lan_list); $i++) { try { $a_language = App\AudioLanguage::find($a_lan_list[$i])->language; $a_languages->push($a_language); } catch (Exception $e) { } } } if(isset($auth)){ $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['season_id', '=', $season->id], ])->first(); } // Actors list of movie from model $actors = collect(); if ($season->actor_id != null) { $p_actors_list = explode(',', $season->actor_id); for($i = 0; $i < count($p_actors_list); $i++) { try { $p_actor = App\Actor::find(trim($p_actors_list[$i]))->name; $actors->push($p_actor); } catch (Exception $e) { } } } // Genre list of movie from model $genres = collect(); if ($season->tvseries->genre_id != null){ $genre_list = explode(',', $season->tvseries->genre_id); for ($i = 0; $i < count($genre_list); $i++) { try { $genre = App\Genre::find($genre_list[$i])->name; $genres->push($genre); } catch (Exception $e) { } } } @endphp

{{$season->tvseries->title}}



    @if(isset($season->publish_year))
  • {{$season->publish_year}}
  • @endif @if(isset($season->season_no))
  • {{$season->season_no}} {{__('staticwords.season')}}
  • @endif @if(isset($season->tvseries->age_req))
  • {{$season->tvseries->age_req}}
  • @endif @if($configs->user_rating != 1) @if(isset($season->tvseries->rating))
  • {{__('staticwords.tmdbrating')}} {{$season->tvseries->rating}}
  • @endif @endif
  • {{ views($season) ->unique() ->count() }}
@auth @if($configs->user_rating==1) @php $uid=Auth::user()->id; $rating=App\UserRating::where('user_id',$uid)-> where('tv_id',$season->tvseries->id)->first(); $avg_rating=App\UserRating::where('tv_id',$season->tvseries->id)->avg('rating'); @endphp
{{__('staticwords.averagerating')}} {{ number_format($avg_rating, 2) }}
{!! Form::open(['method' => 'POST', 'id'=>'formratingtv', 'action' => 'UserRatingController@store']) !!} {!!Form::close()!!} {{-- Give Rating --}} @endif @endauth
@if($auth && getSubscription()->getData()->subscribed == true) @if(isset($season->episodes[0]) && checkInTvseries($season->tvseries) == true) @if($season->tvseries->age_req =='all age' || $age>=str_replace('+', '',$season->tvseries->age_req)) @if($season->episodes[0]->video_link['iframeurl'] !="") @else @endif @else @endif @endif @if($season->trailer_url != null || $season->trailer_url != '') {{__('staticwords.watchtrailer')}} @endif @else @if($season->trailer_url != null || $season->trailer_url != '') {{__('staticwords.watchtrailer')}} @endif @endif @if($catlog == 0 && getSubscription()->getData()->subscribed == true) @if (isset($wishlist_check->added)) {{$wishlist_check->added == 1 ? __('staticwords.removefromwatchlist') : __('staticwords.addtowatchlist')}} @else {{__('staticwords.addtowatchlist')}} @endif @elseif($catlog ==1 && $auth) @if (isset($wishlist_check->added)) {{$wishlist_check->added == 1 ? __('staticwords.removefromwatchlist') : __('staticwords.addtowatchlist')}} @else {{__('staticwords.addtowatchlist')}} @endif @endif

@if ($season->detail != null || $season->detail != '') {{$season->detail}} @else {{$season->tvseries->detail}} @endif

    @if (count($actors) > 0)
  • {{__('staticwords.starring')}} : @for($i = 0; $i < count($actors); $i++) @if($i == count($actors)-1) {{$actors[$i]}} @else {{$actors[$i]}}, @endif @endfor
  • @endif @if (count($genres) > 0)
  • {{__('staticwords.genres')}} : @for($i = 0; $i < count($genres); $i++) @if($i == count($genres)-1) {{$genres[$i]}} @else {{$genres[$i]}}, @endif @endfor
  • @endif @if(count($season->episodes)>0) @php $subtitles = collect(); foreach ($season->episodes as $e) { foreach ($e->subtitles as $sub) { $subtitles->push($sub->sub_lang); } } $subtitles = $subtitles->unique(); @endphp @if(count($subtitles)>0)
  • {{__('staticwords.subtitles')}} : @foreach($subtitles as $key=> $sub) @if($key == count($subtitles)-1) {{ $sub }} @else {{ $sub }}, @endif @endforeach
  • @endif @endif @if($season->a_language != null && isset($a_languages))
  • {{__('staticwords.audiolanguage')}} : @for($i = 0; $i < count($a_languages); $i++) @if($i == count($a_languages)-1) {{$a_languages[$i]}} @else {{$a_languages[$i]}}, @endif @endfor
  • @endif
@if($button->remove_thumbnail == 0) @php if($season->thumbnail){ $content = @file_get_contents(public_path() . '/images/tvseries/thumbnails/' . $season->thumbnail); if($content){ $image = 'images/tvseries/thumbnails/'.$season->thumbnail; }else{ $image = 'images/default-thumbnail.jpg'; } }elseif($season->tvseries->thumbnail){ $content = @file_get_contents(public_path() . '/images/tvseries/thumbnails/' . $season->tvseries->thumbnail); if($content){ $image = 'images/tvseries/thumbnails/'.$season->tvseries->thumbnail; }else{ $image = 'images/default-thumbnail.jpg'; } }else{ $image = 'images/default-thumbnail.jpg'; } //$image = 'images/tvseries/thumbnails/'.$item->thumbnail; // Read image path, convert to base64 encoding $imageData = base64_encode(@file_get_contents($image)); if($imageData){ $src = 'data: '.mime_content_type($image).';base64,'.$imageData; } @endphp
genre-image
@endif
@endif
{{-- @dd($actors) --}} @if(isset($actors) && count($actors) > 0)
{{__('staticwords.starring')}}
@endif


{{-- comments section start from here --}} @if(isset($movie)) @if($configs->comments == 1)

@if(isset($movie->comments) && $movie->comments->isEmpty())

 {{__('لا يوجد تعليقات ! ')}}

  {{__('كن أول من يشارك ما هو رأيك!')}}
@else {{--

{{$movie->comments->where('status',1)->count()}} {{__('staticwords.comment')}}


--}}

{{$movie->comments->count()}} {{__('staticwords.comment')}}


{{-- @foreach ($movie->comments->where('status','1') as $comment) --}} @foreach ($movie->comments as $comment)
{{--

user

--}} {{--

{{date('F jS, Y - g:i a',strtotime($comment->created_at))}}

--}}

{{date('H:i - m/d ',strtotime($comment->created_at))}}

@if(Auth::check() && (Auth::user()->is_admin == 1 || $comment->user_id == Auth::user()->id)) @endif {{-- @if(getSubscription()->getData()->subscribed == true) @endif --}}
{{$comment->comment}}
@endforeach @endif
@auth

{{__('staticwords.postcomment')}}:


{{Form::open( ['route' => ['movie.comment.store', $movie->id], 'method' => 'POST'])}}

{{Form::label('comment',__('staticwords.comment'))}} {{Form::textarea('comment', null, ['class' => 'form-control', 'rows'=> '5','cols' => '10'])}}
{{Form::submit(__('staticwords.addcomment'), ['class' => 'btn btn-md btn-default'])}}
@endauth

@endif @endif {{-- comments section start from here --}}
@if($prime_genre_slider == 1) @if (isset($suggested_movies) && count($suggested_movies) > 0)
{{__('staticwords.customeralsowatched')}}
@endif @else @if (isset($suggested_movies) && count($suggested_movies) > 0)

{{__('staticwords.customeralsowatched')}}

{{__('staticwords.atthebigscreenathome')}}

@endif @endif
@endsection @section('custom-script') @endsection