@extends('frontEnd.layout') @section('content') @php $title_var = "title_" . app()->getLocale(); $title_var2 = "title_" . config('app.fallback_locale','en'); $details_var = "details_" . app()->getLocale(); $details_var2 = "details_" . config('app.fallback_locale','en'); if ($Topic->$title_var != "") { $title = $Topic->$title_var; } else { $title = $Topic->$title_var2; } if ($Topic->$details_var != "") { $details = $details_var; } else { $details = $details_var2; } $section = ""; try { if ($Topic->section->$title_var != "") { $section = $Topic->section->$title_var; } else { $section = $Topic->section->$title_var2; } } catch (Exception $e) { $section = ""; } @endphp @if($Topic->photo_file !="")

{{ $title }}

@else

{{ $title }}

@endif
@if($WebmasterSection->type==2 && $Topic->video_file!="") {{--video--}}

@if($Topic->icon !="")   @endif {{ $title }}

@if($Topic->video_type ==1) @php $Youtube_id = Helper::Get_youtube_video_id($Topic->video_file); @endphp @if($Youtube_id !="") {{-- Youtube Video --}} @endif @elseif($Topic->video_type ==2) @php $Vimeo_id = Helper::Get_vimeo_video_id($Topic->video_file); @endphp @if($Vimeo_id !="") {{-- Vimeo Video --}} @endif @elseif($Topic->video_type ==3) @if($Topic->video_file !="") {{-- Embed Video --}} {!! $Topic->video_file !!} @endif @else @endif
@elseif($WebmasterSection->type==3 && $Topic->audio_file!="") {{--audio--}}

@if($Topic->icon !="")   @endif {{ $title }}

@if($Topic->photo_file !="") {{ $title }} @endif
@elseif(count($Topic->photos)>0) {{--photo slider--}}

@if($Topic->icon !="")   @endif {{ $title }}

{{-- @if($Topic->photo_file !="")--}} {{--
  • --}} {{-- {{ $title }}--}} {{--
  • --}} {{-- @endif--}} {!! $Topic->$details !!} @foreach($Topic->photos as $photo)
  • {{ $photo->title  }}
  • @endforeach
    @else {{--one photo--}}

    @if($Topic->icon !="")   @endif {{ $title }}

    @if($Topic->photo_file !="") {{ $title }} @endif
    @endif {{--Additional Feilds--}} @if(count($Topic->webmasterSection->customFields) >0)
    @php $cf_title_var = "title_" . app()->getLocale(); $cf_title_var2 = "title_" . config('app.fallback_locale','en'); @endphp @foreach($Topic->webmasterSection->customFields as $customField) @php if ($customField->$cf_title_var != "") { $cf_title = $customField->$cf_title_var; } else { $cf_title = $customField->$cf_title_var2; } $cf_saved_val = ""; $cf_saved_val_array = array(); if (count($Topic->fields) > 0) { foreach ($Topic->fields as $t_field) { if ($t_field->field_id == $customField->id) { if ($customField->type == 7) { // if multi check $cf_saved_val_array = explode(", ", $t_field->field_value); } else { $cf_saved_val = $t_field->field_value; } } } } @endphp @if(($cf_saved_val!="" || count($cf_saved_val_array) > 0) && ($customField->lang_code == "all" || $customField->lang_code == app()->getLocale())) @if($customField->type ==12) {{--Vimeo Video Link--}} @php $CF_Vimeo_id = Helper::Get_vimeo_video_id($cf_saved_val); @endphp @if($CF_Vimeo_id !="")
    {!! $cf_title !!} :
    {{-- Vimeo Video --}}
    @endif @elseif($customField->type ==11) {{--Youtube Video Link--}} @php $CF_Youtube_id = Helper::Get_youtube_video_id($cf_saved_val); @endphp @if($CF_Youtube_id !="")
    {!! $cf_title !!} :
    {{-- Youtube Video --}}
    @endif @elseif($customField->type ==10) {{--Video File--}}
    {!! $cf_title !!} :
    @elseif($customField->type ==9) {{--Attach File--}} @elseif($customField->type ==8) {{--Photo File--}}
    {!! $cf_title !!} :
    {{ $cf_title }} - {{ $title }}
    @elseif($customField->type ==7) {{--Multi Check--}}
    {!! $cf_title !!} :
    @php $cf_details_var = "details_" . app()->getLocale(); $cf_details_var2 = "details_en" . config('app.fallback_locale','en'); if ($customField->$cf_details_var != "") { $cf_details = $customField->$cf_details_var; } else { $cf_details = $customField->$cf_details_var2; } $cf_details_lines = preg_split('/\r\n|[\r\n]/', $cf_details); $line_num = 1; @endphp @foreach ($cf_details_lines as $cf_details_line) @if (in_array($line_num,$cf_saved_val_array)) {!! $cf_details_line !!} @endif @php $line_num++; @endphp @endforeach
    @elseif($customField->type ==6) {{--Select--}}
    {!! $cf_title !!} :
    @php $cf_details_var = "details_" . app()->getLocale(); $cf_details_var2 = "details_en" . config('app.fallback_locale','en'); if ($customField->$cf_details_var != "") { $cf_details = $customField->$cf_details_var; } else { $cf_details = $customField->$cf_details_var2; } $cf_details_lines = preg_split('/\r\n|[\r\n]/', $cf_details); $line_num = 1; @endphp @foreach ($cf_details_lines as $cf_details_line) @if ($line_num == $cf_saved_val) {!! $cf_details_line !!} @endif @php $line_num++; @endphp @endforeach
    @elseif($customField->type ==5) {{--Date & Time--}}
    {!! $cf_title !!} :
    {!! date('Y-m-d H:i:s', strtotime($cf_saved_val)) !!}
    @elseif($customField->type ==4) {{--Date--}}
    {!! $cf_title !!} :
    {!! date('Y-m-d', strtotime($cf_saved_val)) !!}
    @elseif($customField->type ==3) {{--Email Address--}}
    {!! $cf_title !!} :
    {!! $cf_saved_val !!}
    @elseif($customField->type ==2) {{--Number--}}
    {!! $cf_title !!} :
    {!! $cf_saved_val !!}
    @elseif($customField->type ==1) {{--Text Area--}}
    {!! $cf_title !!} :
    {!! nl2br($cf_saved_val) !!}
    @else {{--Text Box--}}
    {!! $cf_title !!} :
    {!! $cf_saved_val !!}
    @endif @endif @endforeach

    @endif {{--End of -- Additional Feilds--}} @if($Topic->attach_file !="") @php $file_ext = strrchr($Topic->attach_file, "."); $file_ext = strtolower($file_ext); @endphp
    @if($file_ext ==".jpg"|| $file_ext ==".jpeg"|| $file_ext ==".png"|| $file_ext ==".gif")
    {{ $title }}
    @else {!! Helper::GetIcon(url('uploads/topics/'),$Topic->attach_file) !!}  {{ trans('frontLang.downloadAttach') }} @endif
    @endif {{-- Show Additional attach files --}} @if(count($Topic->attachFiles)>0)
    @foreach($Topic->attachFiles as $attachFile) @php if ($attachFile->$title_var != "") { $file_title = $attachFile->$title_var; } else { $file_title = $attachFile->$title_var2; } @endphp @endforeach
    @endif
    {{ trans('frontLang.share') }} :
    @if(count($Topic->maps) >0)

    {{ trans('frontLang.locationMap') }}

    @endif @if($WebmasterSection->comments_status)
    @if(count($Topic->approvedComments)>0)

    {{ trans('frontLang.comments') }}


    @foreach($Topic->approvedComments as $comment) @php $dtformated = date('d M Y h:i A', strtotime($comment->date)); @endphp
    {{$comment->name}}
    {{$comment->name}}
    {{ $dtformated }}
    {!! nl2br(strip_tags($comment->comment)) !!}
    @endforeach @endif

    {{ trans('frontLang.newComment') }}

     {{ trans('frontLang.youCommentSent') }}   {{ trans('frontLang.refresh') }}
    {{ trans('frontLang.youMessageNotSent') }}
    {{Form::open(['route'=>['Home'],'method'=>'POST','class'=>'commentForm'])}}
    {!! Form::text('comment_name',"", array('placeholder' => trans('frontLang.yourName'),'class' => 'form-control','id'=>'comment_name', 'data-msg'=> trans('frontLang.enterYourName'),'data-rule'=>'minlen:4')) !!}
    {!! Form::email('comment_email',"", array('placeholder' => trans('frontLang.yourEmail'),'class' => 'form-control','id'=>'comment_email', 'data-msg'=> trans('frontLang.enterYourEmail'),'data-rule'=>'email')) !!}
    {!! Form::textarea('comment_message','', array('placeholder' => trans('frontLang.comment'),'class' => 'form-control','id'=>'comment_message','rows'=>'5', 'data-msg'=> trans('frontLang.enterYourComment'),'data-rule'=>'required')) !!}
    @if(env('NOCAPTCHA_STATUS', false))
    {!! NoCaptcha::renderJs(app()->getLocale()) !!} {!! NoCaptcha::display() !!}
    @endif
    {{Form::close()}}
    @endif @if($WebmasterSection->order_status)

    {{ trans('frontLang.orderForm') }}

     {{ trans('frontLang.youOrderSent') }}
    {{ trans('frontLang.youMessageNotSent') }}
    {{Form::open(['route'=>['Home'],'method'=>'POST','class'=>'orderForm'])}}
    {!! Form::text('order_name',"", array('placeholder' => trans('frontLang.yourName'),'class' => 'form-control','id'=>'order_name', 'data-msg'=> trans('frontLang.enterYourName'),'data-rule'=>'minlen:4')) !!}
    {!! Form::text('order_phone',"", array('placeholder' => trans('frontLang.phone'),'class' => 'form-control','id'=>'order_phone', 'data-msg'=> trans('frontLang.enterYourPhone'),'data-rule'=>'minlen:4')) !!}
    {!! Form::email('order_email',"", array('placeholder' => trans('frontLang.yourEmail'),'class' => 'form-control','id'=>'order_email', 'data-msg'=> trans('frontLang.enterYourEmail'),'data-rule'=>'email')) !!}
    {!! Form::number('order_qty',"", array('placeholder' => trans('frontLang.quantity'),'class' => 'form-control','id'=>'order_qty', 'data-msg'=> trans('frontLang.yourQuantity'),'data-rule'=>'minlen:1','min'=>'1')) !!}
    {!! Form::textarea('order_message','', array('placeholder' => trans('frontLang.notes'),'class' => 'form-control','id'=>'order_message','rows'=>'5')) !!}
    @if(env('NOCAPTCHA_STATUS', false))
    {!! NoCaptcha::renderJs(app()->getLocale()) !!} {!! NoCaptcha::display() !!}
    @endif
    {{Form::close()}}
    @endif @if($WebmasterSection->related_status) @if(count($Topic->relatedTopics)) @endif @endif
    {{-- @if(count($Categories) >0)--}} {{-- @include('frontEnd.includes.side')--}} {{-- @endif--}}
    @endsection @section('footerInclude') @if(count($Topic->maps) >0) @foreach($Topic->maps->slice(0,1) as $map) @php $MapCenter = $map->longitude . "," . $map->latitude; @endphp @endforeach @php $map_title_var = "title_" . app()->getLocale(); $map_details_var = "details_" . app()->getLocale(); @endphp @endif @endsection