VaKeR CYBER ARMY
Logo of a company Server : Apache
System : Linux host44.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
User : vapecompany ( 2719)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /home/vapecompany/demo.vapecompany.com.bd/resources/views/backend/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/vapecompany/demo.vapecompany.com.bd/resources/views/backend/all_notification.blade.php
@extends('backend.layout.app')
@section('content')
<style type="text/css">
    .mailbox .message-center {
    height: auto!important;
}
</style>
 <div class="page-wrapper">
            <!-- ============================================================== -->
            <!-- Bread crumb and right sidebar toggle -->
            <!-- ============================================================== -->
            <div class="page-breadcrumb">
                <div class="row">
                    <div class="col-5 align-self-center">
                        <h4 class="page-title">Dashboard</h4>

                    </div>
                    <div class="col-7 align-self-center">
                        <div class="d-flex no-block justify-content-end align-items-center">
                         <!--    <div class="mr-2">
                                <div class="lastmonth"></div>
                            </div> -->
                           <!--  <div class=""><small>LAST MONTH</small>
                                <h4 class="text-info mb-0 font-medium">$58,256</h4></div> -->
                        </div>
                    </div>
                </div>
            </div>
            <!-- ============================================================== -->
            <!-- End Bread crumb and right sidebar toggle -->
            <!-- ============================================================== -->
            <!-- ============================================================== -->
            <!-- Container fluid  -->
            <!-- ============================================================== -->
            <div class="container-fluid">
                <!-- ============================================================== -->
                <!-- Earnings -->
                <!-- ============================================================== -->

                <!-- ============================================================== -->
                <!-- Product Sales -->
                <!-- ============================================================== -->
                <div class="row">
                    <div class="col-sm-12">
                        <div class="mailbox animated bounceInDown show">
                            <span class="with-arrow"><span class="bg-primary"></span></span>
                                <ul class="list-style-none">
                                    <li>
                                        <div class="drop-title bg-primary text-white">
                                            <h4 class="mb-0 mt-1">
                                {{$countnoti}}  New</h4>
                                            <span class="font-light">Notifications</span>
                                        </div>
                                    </li>
                                    <li id="mainms">
                                        <div class="message-center notifications ps-container ps-theme-default" id="messageSc">
                                         <!-- Message -->
                                          @foreach($allNotification as $notification)
                                            @if($notification->r_status == 0)
                                            <a target="_blank" style="background: #d4e0e7;" href="{{url('/notification')}}/{{$notification->notification_id}}"class="message-item">
                                            @else
                                            <a target="_blank" href="{{url('/notification')}}/{{$notification->notification_id}}"class="message-item">
                                            @endif

                                                <span class="btn btn-danger btn-circle">
                                                    <i class="fas fa-dolly-flatbed"></i>
                                                </span>
                                                <div class="mail-contnet">
                                                    <h5 class="message-title">{{$notification->message}}</h5>
                                                    <span class="time">{{Carbon\Carbon::parse($notification->notefication_date)->format('d-m-Y H:i a')}}</span>
                                                </div>
                                            </a>
                                        @endforeach


                                           </div>

                                           <div id="load_data_message" style="padding: 10px;display: none;">
                                               <button type='button' class='btn btn-warning'>Please Wait....</button>
                                           </div>
                                            <div id="load_data_message2" style="padding: 10px;display: none;">
                                               <button type='button' class='btn btn-info'>No more found</button>
                                           </div>

                                    </li>

                                </ul>
                            </div>
                     </div>
                </div>
                <!-- ============================================================== -->



            </div>
            <!-- ============================================================== -->
            <!-- End Container fluid  -->
           @endsection
@section('script')
<script type="text/javascript">

    var start=0;
    var action="inactive";
    $(document).ready(function() {
    $(window).scroll(function(event){

        if($(window).scrollTop() + $(window).height() > $("#messageSc").height() && action == 'inactive'){
            start= start+10;
            action = 'active';
            $('#load_data_message').show();
            setTimeout(function(){
                load_country_data(start);
            }, 1000);
        }

    });

    function load_country_data(start)
    {
      $.ajax({
       url:"{{url('all_notification')}}",
       method:"POST",
       data:{limit:10, start:start},
       cache:false,
       success:function(data)
        {

            $('#messageSc').append(data);
            if(data == '')
            {
            $('#load_data_message').hide();
             $('#load_data_message2').show();
             action = 'active';

            }
            else
            {
             $('#load_data_message').hide();
             action = "inactive";
            }
        }
    });
  }
});
</script>
@endsection

VaKeR 2022