@extends('user.app')
@php $meta_title = trim($cms->meta_title); @endphp
@section('pagetitle'){{ ($meta_title) ? $meta_title : $cms->title }}@stop
@section('pagedescription')
@php $meta_details = trim($cms->meta_details); @endphp
<meta name="description" content="{{ $meta_details }}">
@stop
@section('pagekeywords')
@php $meta_tags = trim($cms->meta_tags); @endphp
<meta name="keywords" content="{{ $meta_tags }}">
@stop
@section('main-content')
<div class="banner-part">
    @php
    $photos1 =array();
    $img_path1 = '';
    $img_path2 = '';
    if( !empty($cms->image1))
    {
    $photos1 = unserialize( $cms->image1);
    if(count($photos1)>0)
    {
    $img_path1=url('/logo/'.$photos1['image1']);
    }
    }
    $photos2 =array();
    if( !empty($cms->image2))
    {
    $photos2 = unserialize( $cms->image2);
    if(count($photos2)>0)
    {
    $img_path2 = url('/logo/'.$photos2['image2']);
    }
    }
    @endphp
    
    <div class="slider">
        <div class="item">
            <img src="{{ $img_path1 }}" alt="Know Our Facalty">
        </div>
        <div class="item">
            <img src="{{ $img_path2 }}" alt="Know Our Facalty">
        </div>
    </div>
    <!--  <div class="banner_text">
        <div class="container">
            <div class="row">
                <div class="col-md-offset-2 col-md-8 col-sm-7">
                    <h2>Online Learning</h2>
                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis nihil modi, nostrum voluptatibus eligendi, sequi animi perspiciatis minima architecto cum aperiam nisi dolore atque quia, consequatur sed laborum suscipit repellat.</p>
                </div>
            </div>
        </div>
    </div> -->
    
</div>
<section class="body-cont1">
    <div class="container">
        <div class="row">
            <div class="col-md-12 text-center">
                <ul>
                    <li>
                        <img src="{{ asset('user/images/online.png') }}" alt="value added products"><a href="#">value added products </a>
                    </li>
                    <li>
                        <img src="{{ asset('user/images/theft.png') }}" alt="secured transactions"><a href="#"> secured transactions</a>
                    </li>
                    <li>
                        <img src="{{ asset('user/images/logistics-delivery-truck-in-movement.png') }}" alt="prompt delivery"><a href="#"> prompt delivery </a>
                    </li>
                    <li>
                        <img src="{{ asset('user/images/delivery-man.png') }}" alt="cod"> <a href="#">cod </a>
                    </li>
                    <li>
                        <img src="{{ asset('user/images/customer-service.png') }}" alt="after sales services"> <a href="#">after sales services</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</section>
<!--<section class="body-cont2">
    <div class="container">
        <div class="row">
            <div class="col-md-12 text-center">
                <h2>Popular Courses</h2>
            </div>
            <div class="clearfix"></div>
            <div class="online-courses">
                @if(isset($popular))
                @foreach($popular as $value)
                <div class="item">
                    <div class="card">
                         @php

                        $discount_price = $value->discounted_price;

                        if(strpos($discount_price,'.') !== false) {

                        $new_discount_price=ceil(number_format((float)round($discount_price), 2, '.', ''));

                        }else{
                        $new_discount_price= $value->discounted_price;
                        }

                        $price = $value->price;

                        if (strpos($price,'.') !== false) {

                        $new_price=ceil(number_format((float)round($price), 2, '.', ''));

                        }else{
                        $new_price= $value->price;
                        }

                        $pcartprice =0;
                        $pcartprice = ($new_discount_price) ? $new_discount_price : $new_price;

                        @endphp
                        @php
                        $photos =array();
                        if( !empty($value->product_image))
                        {
                        $photos = unserialize( $value->product_image);
                        if(count($photos)>0)
                        {
                        $img_path=url('/logo/'.$photos['product_image']);
                        @endphp
                        @foreach($educators as $educator)
                        @if($value->faculty_name==$educator->id )
                        @if($educator->discount>0)
                        <span class="course-discount">{{ ($educator->discount) ? $educator->discount : 0 }}% off</span>
                        @endif
                        @endif
                        @endforeach
                        <a href="{{url('/')}}/enrol/{{ $value->slug }}" class="packlink"><img  alt="{{$value->package_name}}" class="card-img-top"  src="{{ $img_path }}"></a>
                        @php
                        }
                        }
                        @endphp
                        <div class="card-body">
                            <h3><a href="{{url('/')}}/enrol/{{ $value->slug }}" class="packlink">{{$value->package_name}}</a></h3>
                            @foreach($educators as $educator)
                            
                            @if($value->faculty_name==$educator->id )
                            <p class="tutor">By <a href="{{url('/')}}/educator/{{ $educator->slug }}" class="educatorlink">{{$educator->coaching_classes}}</a></p>
                            @endif
                            @endforeach
                            {{-- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eligendi, nisi ratione illo. </p> --}}
                            <h4 class="cross-t">
                            <del> Rs.{{ $value->price }}</del>

							@php

							$discount_price = $value->discounted_price;

								if (strpos($discount_price,'.') !== false) {

								 $new_discount_price=ceil(number_format((float)round($discount_price), 2, '.', ''));

								}else {
								   $new_discount_price= $value->discounted_price;
								}
							@endphp
                            Rs.{{ $new_discount_price }}
                            </h4>
                            
                        </div>
                        {{-- <a href="{{url('/')}}/enrol/{{ $value->slug }}">add to cart</a>                      --}}
                        <div class="over">
                            <ul>
                                <li>
                                    @if (Auth::check())
                                    {!! Form::open(array('route' => 'cart.store', 'class' => 'form' ,'id' =>'createroomsform','files' => true)) !!}
                                    {{ Form::hidden('product_id', $value->id) }}
                                    {{ Form::hidden('user_id',Auth::user()->id ) }}
                                    {{ Form::hidden('name', $value->package_name) }}
                                    {{ Form::hidden('quantity', 1) }}
                                    {{ Form::hidden('price', $pcartprice) }}
                                    {!! Form::submit('',
                                    array('class'=>'add-acte-down')) !!}
                                    {!! Form::close() !!}
                                    @else
                                    <a title="Cart"  href=""  onClick="return false;" class="add-acte add-acte-cart" pid="{{$value->id}}"><i class="fas fa-cart-arrow-down"></i></a>
                                    @endif
                                </li>
                                <li><a title="Call back" href="#" class="contact_user_detal" course_id="{{ $value->id }}"><i class="fas fa-phone-square"></i></a></li>
                                    @if ($value->lectures_link!="")
                                    <li> <a title="Video" href="javascript:void(0);" class="video"  product_id="{{course_video_link($value->id)}}"><i class="fab fa-youtube"></i></a></li>
                                    @else
                                     <li> <a href="#"  class="disable"><i class="fab fa-youtube"></i></a></li>
                                    @endif
                                <li><a title="View" href="{{url('/')}}/enrol/{{ $value->slug }}"><i class="fas fa-eye"></i></a></li>
                                <li>
                                    @if (Auth::check())
                                    {!! Form::open(array('route' => 'wishlist.store', 'class' => 'form' ,'id' =>'createroomsform','files' => true)) !!}
                                    {{ Form::hidden('product_id', $value->id) }}
                                    {{ Form::hidden('user_id',Auth::user()->id ) }}
                                    {{ Form::hidden('name', $value->package_name) }}
                                    {{ Form::hidden('quantity', 1) }}
                                    {{ Form::hidden('price', $pcartprice) }}
                                    {!! Form::submit('',
                                    array('class'=>'add-acte-login')) !!}
                                    {!! Form::close() !!}
                                    @else
                                    <a title="Wishlist" href="" onClick="return false;" class="add-acte add-acte-wishlist" pid="{{$value->id}}"><i class="fas fa-heart"></i></a>
                                    @endif
                                </li>
                            </ul>
                        </div>
                        </div>
                    </div>
                    @endforeach
                    @endif
                </div>
            </div>
        </div>
    </section>-->
    <div class="ctr-area ptb-100">
        
        <div class="top-divider"></div>
        <div class="bottom-divider"></div>
        
        <div class="container">
            <div class="ctr-text-content">
                {{-- <h1>ACCELERATE YOUR FUTURE. LEARN ANYTIME, ANYWHERE.</h1>
                <p>Our training courses are created and updated by renowned industry specialists. Our blended learning approach combines online lessons, instructor-led live virtual classrooms, project work, and 24/7 teaching assistants. Our vibrant community of professionals and certified specialists is a powerful resource pool of tips, methods, and insightful advice.</p> --}}
                {!! $cms->description1 !!}
                
                @if (!Auth::check())
                <a href="{{ url('login') }}">Join Now</a>
                
                @endif
            </div>
        </div>
    </div>
    <section class="body-cont2">
        <div class="container">
            <div class="row">
                <div class="col-md-12 text-center">
                    <h2>Recommended Courses</h2>
                </div>
                <div class="clearfix"></div>
                <div class="online-courses">
                    @if(isset($randomcources))
                    @foreach($randomcources as $value)
                    <div class="item">
                        <div class="card">
                            @php
                        	$discount_price = $value->discounted_price;

							 if(strpos($discount_price,'.') !== false) {

							     $new_discount_price=ceil(number_format((float)round($discount_price), 2, '.', ''));

							 }else{
								  $new_discount_price= $value->discounted_price;
							 }

                            $price = $value->price;

							if (strpos($price,'.') !== false) {

								 $new_price=ceil(number_format((float)round($price), 2, '.', ''));

							}else{
								  $new_price= $value->price;
							}

                            $pcartprice =0;
                            $pcartprice = ($new_discount_price) ? $new_discount_price:$new_price;
                            
                            @endphp
                            @php
                            $photos =array();
                            if( !empty($value->product_image))
                            {
                            $photos = unserialize( $value->product_image);
                            if(count($photos)>0)
                            {
                            $img_path=url('/logo/'.$photos['product_image']);
                            @endphp
                            @foreach($educators as $educator)
                            
                            
                            @if($value->faculty_name==$educator->id )
                            @if($educator->discount>0)
                            <span class="course-discount">{{ ($educator->discount) ? $educator->discount : 0 }}% off</span>
                            @endif
                            @endif
                            @endforeach
                            
                            <a href="{{url('/')}}/enrol/{{ $value->slug }}" class="packlink"><img  alt="{{$value->package_name}}"  class="card-img-top"  src="{{ $img_path }}"></a>
                            @php
                            }
                            }
                            @endphp
                            <div class="card-body">
                                <h3><a href="{{url('/')}}/enrol/{{ $value->slug }}" class="packlink">{{$value->package_name}}</a></h3>
                                @foreach($educators as $educator)
                                
                                
                                @if($value->faculty_name==$educator->id )
                                <p class="tutor">By <a href="{{url('/')}}/educator/{{ $educator->slug }}" class="educatorlink">{{$educator->coaching_classes}}</a></p>
                                @endif
                                @endforeach
                                <h4 class="cross-t">
                                <del>Rs.{{ $value->price }}</del>

                                @php
								$discount_price = $value->discounted_price;

									if (strpos($discount_price,'.') !== false) {

									 $new_discount_price=ceil(number_format((float)round($discount_price), 2, '.', ''));

									}else {
									   $new_discount_price= $value->discounted_price;
									}
								@endphp
                                Rs.{{ $new_discount_price }}
                                </h4>
                            </div>
                            <div class="over">
                                <ul>
                                    <li>
                                        @if (Auth::check())
                                        {!! Form::open(array('route' => 'cart.store', 'class' => 'form' ,'id' =>'createroomsform','files' => true)) !!}
                                        {{ Form::hidden('product_id', $value->id) }}
                                        {{ Form::hidden('user_id',Auth::user()->id ) }}
                                        {{ Form::hidden('name', $value->package_name) }}
                                        {{ Form::hidden('quantity', 1) }}
                                        {{ Form::hidden('price', $pcartprice) }}
                                        {!! Form::submit('',
                                        array('class'=>'add-acte-down')) !!}
                                        {!! Form::close() !!}
                                        @else
                                        <a title="Cart"  href="" onClick="return false;" class="add-acte add-acte-cart" pid="{{$value->id}}"><i class="fas fa-cart-arrow-down"></i></a>
                                        @endif
                                    </li>

                                    <li><a title="Call back" href="#" class="contact_user_detal" course_id="{{ $value->id }}"><i class="fas fa-phone-square"></i></a></li>
                                    @if ($value->lectures_link!="")
                                    <li> <a title="Video" href="javascript:void(0);" class="video"  product_id="{{course_video_link($value->id)}}"><i class="fab fa-youtube"></i></a>
                                    @else
                                     <li> <a href="#"  class="disable" ><i class="fab fa-youtube"></i></a>
                                    @endif

                                    <li><a title="View" href="{{url('/')}}/enrol/{{ $value->slug }}"><i class="fas fa-eye"></i></a></li>
                                    <li>
                                        @if (Auth::check())
                                        {!! Form::open(array('route' => 'wishlist.store', 'class' => 'form' ,'id' =>'createroomsform','files' => true)) !!}
                                        {{ Form::hidden('product_id', $value->id) }}
                                        {{ Form::hidden('user_id',Auth::user()->id ) }}
                                        {{ Form::hidden('name', $value->package_name) }}
                                        {{ Form::hidden('quantity', 1) }}
                                        {{ Form::hidden('price', $pcartprice) }}
                                        {!! Form::submit('',
                                        array('class'=>'add-acte-login')) !!}
                                        {!! Form::close() !!}
                                        @else
                                        <a title="Wishlist"  href=""  onClick="return false;" class="add-acte add-acte-wishlist" pid="{{$value->id}}"><i class="fas fa-heart"></i></a>
                                        @endif
                                    </li>

                                    </ul>
                                </div>
                            </div>
                        </div>
                        @endforeach
                        @endif
                    </div>
                </div>
            </div>
        </section>
        <section class="why-choose-us">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-md-6">
                        <div class="image"></div>
                    </div>
                    
                    <div class="col-md-6">
                        <div class="why-choose ptb-100">
                            <h3>Why Choose Us</h3>
                            
                            <div class="single-choose">
                                <div class="icon">
                                    <i class="fas fa-book"></i>
                                </div>
                                
                                <div class="content">
                                    <h4>Popular Courses</h4>
                                    <p>Find best courses from a complete learning system that helps you maintain focus, discipline, and score. Our tailored courses will help you to reach your full potential without leaving your comfort zone.</p>
                                    {{-- {{ strip_tags( html_entity_decode(stripslashes($course->other_details),ENT_QUOTES,"UTF-8") ) }} --}}
                                </div>
                            </div>
                            
                            <div class="single-choose">
                                <div class="icon">
                                    <i class="fas fa-chalkboard-teacher"></i>
                                </div>
                                
                                <div class="content">
                                    <h4>Qualified Teachers</h4>
                                    <p>Good teachers know how to bring out the best in their students. Get taught by India's top faculty. Anytime. Anywhere.</p>
                                </div>
                            </div>
                            
                            <div class="single-choose mb-0">
                                <div class="icon">
                                    <i class="fas fa-headset"></i>
                                </div>
                                
                                <div class="content">
                                    <h4>24/7 Online Support</h4>
                                    <p>As a student, you work hard. Complication can come by anytime. We understand that. We are here to assist you from any kind of adverse situation 24/7.</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <section class="body-cont2">
            <div class="container">
                <div class="row">
                    <div class="col-md-12 text-center">
                        <h2>BuyOnlineClasses.com</h2>
                    </div>
                    <div class="clearfix"></div>
                    <div class="online-course">
                        {!! $cms->description2 !!}
                    </div>
                </div>
            </div>
        </section>
        <section class="how-it-works red-bg ptb-100">
            
            <div class="top-divider"></div>
            <div class="bottom-divider"></div>
            
            <div class="container">
                <div class="section-title">
                    <h3>How It Works<span>?</span></h3>
                </div>
                
                <div class="row">
                    <div class="col-lg-4 col-md-6">
                        <div class="work-process">
                            <i class="fas fa-book"></i>
                            <h3>Search Courses</h3>
                            <p>Interested in learning something new? With courses that are flexible around you and your passion, find your potential and improve your skills.</p>
                        </div>
                    </div>
                    
                    <div class="col-lg-4 col-md-6">
                        <div class="work-process">
                            <i class="fas fa-info"></i>
                            <h3>View Course Details</h3>
                            <p>Browse the website and watch the videos to decide whether it fits your learning style.</p>
                        </div>
                    </div>
                    
                    <div class="col-lg-4 col-md-6 offset-md-3 offset-lg-0">
                        <div class="work-process">
                            <i class="fas fa-thumbs-up"></i>
                            <h3>Apply, Enroll or Register</h3>
                            <p>Get started on your application whenever you’re ready. You can register for our classes/ courses online at any time.</p>
                        </div>
                    </div>
                    
                    <div class="col-lg-12 col-md-12">
                        <div class="view-all text-center">
                            
                            @if (!Auth::check())
                            <a href="{{url('/login')}}">Register Now <i class="fas fa-angle-double-right"></i></a>
                            
                            @endif
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <div class="clearfix"></div>
        @endsection