@extends('advertiser.layout.app') @section('advertiser_title', trans('dashboard.page_title')) @section('advertiser_content') @section('back_button')
@stop @php($slot_duration = 15)
{{--
  • All
  • Current
  • Future
  • Past
--}}
@php($i = 0) @if(!$contents->isEmpty()) @foreach($contents as $content) @php($screen_ids = $content->getContentScreens->pluck('screen_id')->toArray()) @php($viewers = DB::table('screens')->whereIn('id', $screen_ids)->sum('viewer')) @php($media_ids = $content->contentMedias->pluck('media_id')->toArray()) @php($medias = \App\Models\Media::withTrashed()->whereIn('id', $media_ids)->pluck('path')->toArray()) @if($content->start_date > date('Y-m-d')) @php($status = 'Future') @elseif($content->end_date < date('Y-m-d')) @php($status = 'Past') @elseif($content->start_date >= date('Y-m-d') || $content->start_date <= date('Y-m-d')) @php($status = 'Current') @endif @php($total_slot = 0) @php($slot_count = 0) @foreach ($medias as $key => $media) @php($info = new \SplFileInfo($media)) @php($ext = $info->getExtension()) @php($video_ext = Config('global.video_extensions')) @php($image_ext = Config('global.image_extensions')) @if(in_array($ext,$video_ext)) @php($getID3 = new \getID3) @php($file = $getID3->analyze(public_path('uploads/items/video/'.$media))) @php($duration = seconds_from_time(date('H:i:s', $file['playtime_seconds']))) @php($duration_actual = (date('H:i:s', $file['playtime_seconds']))) @php($_slot_count = $duration/15) @php($slot_count += ceil($_slot_count)) @elseif(in_array($ext,$image_ext)) @php($slot_count += 1) @endif @endforeach @php($total_slot += $slot_count) {{-- @if($status == 'Current') --}}
{{--
--}} {{--
--}}

{{ !empty($content->title) ? $content->title : date('M - d - Y') }}

@php($i++) {{-- @endif --}} @endforeach @else

No data available

@endif
@php($i = 0) @foreach($contents as $content) @php($screen_ids = $content->getContentScreens->pluck('screen_id')->toArray()) @php($viewers = DB::table('screens')->whereIn('id', $screen_ids)->sum('viewer')) @php($media_ids = $content->contentMedias->pluck('media_id')->toArray()) @php($medias =\App\Models\Media::withTrashed()->whereIn('id', $media_ids)->pluck('path')->toArray()) @if($content->start_date > date('Y-m-d')) @php($status = 'Future') @elseif($content->end_date < date('Y-m-d')) @php($status = 'Past') @elseif($content->start_date >= date('Y-m-d') || $content->start_date <= date('Y-m-d')) @php($status = 'Current') @endif @php($total_slot = 0) @php($slot_count = 0) @foreach ($medias as $key => $media) @php($info = new \SplFileInfo($media)) @php($ext = $info->getExtension()) @php($video_ext = Config('global.video_extensions')) @php($image_ext = Config('global.image_extensions')) @if(in_array($ext,$video_ext)) @php($getID3 = new \getID3) @php($file = $getID3->analyze(public_path('uploads/items/video/'.$media))) @php($duration = seconds_from_time(date('H:i:s', $file['playtime_seconds']))) @php($duration_actual = (date('H:i:s', $file['playtime_seconds']))) @php($_slot_count = $duration/15) @php($slot_count += ceil($_slot_count)) @elseif(in_array($ext,$image_ext)) @php($slot_count += 1) @endif @endforeach @php($total_slot += $slot_count) @if($status == 'Current')
{{--
--}}

{{ !empty($content->title) ? $content->title : date('M - d - Y') }}

@php($i++) @endif @endforeach
@php($i = 0) @foreach($contents as $content) @php($screen_ids = $content->getContentScreens->pluck('screen_id')->toArray()) @php($viewers = DB::table('screens')->whereIn('id', $screen_ids)->sum('viewer')) @php($media_ids = $content->contentMedias->pluck('media_id')->toArray()) @php($medias = \App\Models\Media::withTrashed()->whereIn('id', $media_ids)->pluck('path')->toArray()) @if($content->start_date > date('Y-m-d')) @php($status = 'Future') @elseif($content->end_date < date('Y-m-d')) @php($status = 'Past') @elseif($content->start_date >= date('Y-m-d') || $content->start_date <= date('Y-m-d')) @php($status = 'Current') @endif @php($total_slot = 0) @php($slot_count = 0) @foreach ($medias as $key => $media) @php($info = new \SplFileInfo($media)) @php($ext = $info->getExtension()) @php($video_ext = Config('global.video_extensions')) @php($image_ext = Config('global.image_extensions')) @if(in_array($ext,$video_ext)) @php($getID3 = new \getID3) @php($file = $getID3->analyze(public_path('uploads/items/video/'.$media))) @php($duration = seconds_from_time(date('H:i:s', $file['playtime_seconds']))) @php($duration_actual = (date('H:i:s', $file['playtime_seconds']))) @php($_slot_count = $duration/15) @php($slot_count += ceil($_slot_count)) @elseif(in_array($ext,$image_ext)) @php($slot_count += 1) @endif @endforeach @php($total_slot += $slot_count) @if($status == 'Future')
{{--
--}}

{{ !empty($content->title) ? $content->title : date('M - d - Y') }}

@php($i++) @endif @endforeach
@php($i = 0) @foreach($contents as $content) @php($screen_ids = $content->getContentScreens->pluck('screen_id')->toArray()) @php($viewers = DB::table('screens')->whereIn('id', $screen_ids)->sum('viewer')) @php($media_ids = $content->contentMedias->pluck('media_id')->toArray()) @php($medias = \App\Models\Media::withTrashed()->whereIn('id', $media_ids)->pluck('path')->toArray()) @if($content->start_date > date('Y-m-d')) @php($status = 'Future') @elseif($content->end_date < date('Y-m-d')) @php($status = 'Past') @elseif($content->start_date >= date('Y-m-d') || $content->start_date <= date('Y-m-d')) @php($status = 'Current') @endif @php($total_slot = 0) @php($slot_count = 0) @foreach ($medias as $key => $media) @php($info = new \SplFileInfo($media)) @php($ext = $info->getExtension()) @php($video_ext = Config('global.video_extensions')) @php($image_ext = Config('global.image_extensions')) @if(in_array($ext,$video_ext)) @php($getID3 = new \getID3) @php($file = $getID3->analyze(public_path('uploads/items/video/'.$media))) @php($duration = seconds_from_time(date('H:i:s', $file['playtime_seconds']))) @php($duration_actual = (date('H:i:s', $file['playtime_seconds']))) @php($_slot_count = $duration/15) @php($slot_count += ceil($_slot_count)) @elseif(in_array($ext,$image_ext)) @php($slot_count += 1) @endif @endforeach @php($total_slot += $slot_count) @if($status == 'Past')
{{--
--}}

{{ !empty($content->title) ? $content->title : date('M - d - Y') }}

@php($i++) @endif @endforeach
@php($i = 0) @php($video_ext = Config('global.video_extensions')) @php($image_ext = Config('global.image_extensions')) @if(!$contents->isEmpty()) @foreach($contents as $content) @php($screen_ids = $content->getContentScreens->pluck('screen_id')->toArray()) @php($venue_ids =DB::table('screens')->whereIn('id', $screen_ids)->pluck('venue_id')->toArray()) @php($number_of_venues = !empty($venue_ids) && $venue_ids[0] ? count(array_unique($venue_ids)) : '0') @php($viewers = DB::table('screens')->whereIn('id', $screen_ids)->sum('viewer')) @php($media_ids = $content->contentMedias->pluck('media_id')->toArray()) @php($medias = \App\Models\Media::withTrashed()->whereIn('id', $media_ids)->pluck('path')->toArray()) @if($content->start_date > date('Y-m-d')) @php($status = 'Future') @elseif($content->end_date < date('Y-m-d')) @php($status = 'Past') @elseif($content->start_date >= date('Y-m-d') || $content->start_date <= date('Y-m-d')) @php($status = 'Current') @endif @php($total_slot = 0) @php($slot_count = 0) @foreach ($medias as $key => $media) @php($info = new \SplFileInfo($media)) @php($ext = $info->getExtension()) @if(in_array($ext,$video_ext)) @php($getID3 = new \getID3) @php($file = $getID3->analyze(public_path('uploads/items/video/'.$media))) @php($duration = seconds_from_time(date('H:i:s', $file['playtime_seconds']))) @php($duration_actual = (date('H:i:s', $file['playtime_seconds']))) @php($_slot_count = $duration/15) @php($slot_count += ceil($_slot_count)) @elseif(in_array($ext,$image_ext)) @php($slot_count += 1) @endif @endforeach @php($total_slot += $slot_count) @php($i++) @endforeach @else @endif
Campaign Location Start date End date Cost (SAR) Content Slot Viewership
{{-- --}}
{{ !empty($content->title) ? $content->title : date('M - d - Y') }} {{ !empty($number_of_venues) ? $number_of_venues : 0 }} {{ date('M d - Y', strtotime($content->start_date)) }} {{ date('M d - Y', strtotime($content->end_date)) }} {{ number_format($content->price, 0) }} {{ !empty($content->contentMedias) ? count($content->contentMedias) : 0 }} {{ $total_slot }} {{ !empty($viewers) ? thousandsCurrencyFormat($viewers) : 0 }} {{ $status }}
No data available

{{ trans('dashboard.dashboard_page.title') }}

@stop @section('dashbord_styles') {{-- --}} @stop @section('advertiser_js') @include('advertiser.modules.dashboard.js.index') @stop