Anons79 Mini Shell

Directory : /home/proudlyafrican/public_html/resources/views/admin/subscribers/
Upload File :
Current File : /home/proudlyafrican/public_html/resources/views/admin/subscribers/list.blade.php

@extends('admin.head')
@section('middle')

<script src="https://cdn.ckeditor.com/4.12.1/standard/ckeditor.js"></script>
<style>
    .modal-lg {
        max-width: 80%;
    }
    .note-popover{
        display: none;
    }
    .note-editor .btn-toolbar button[data-event="showImageDialog"] {
        display: none !important;
    }

    .note-editor .btn-toolbar button[data-event="showVideoDialog"] {
        display: none !important;
    }


    .nav-tabs .nav-item .nav-link.active {
        color: green;
        font-weight: bold;
    }
    .cke_chrome {
        display: block;
        border: 1px solid #d1d1d1;
        padding: 0;
        width: 100%;
    }


</style>

<style>
    .modal-lg {
        max-width: 80%;
    }
    .note-popover{
        display: none;
    }
    .note-editor .btn-toolbar button[data-event="showImageDialog"] {
        display: none !important;
    }

    .note-editor .btn-toolbar button[data-event="showVideoDialog"] {
        display: none !important;
    }


    .nav-tabs .nav-item .nav-link.active {
        color: green;
        font-weight: bold;
    }


</style>

<style>
    .modal-lg {
        max-width: 80%;
    }
    .note-editor .btn-toolbar button[data-event="showImageDialog"] {
        display: none !important;
    }

    .note-editor .btn-toolbar button[data-event="showVideoDialog"] {
        display: none !important;
    }


    .nav-tabs .nav-item .nav-link.active {
        color: green;
        font-weight: bold;
    }
    .more-btn, .more-menu-btn {
        background: none;
        border: 0 none;
        line-height: normal;
        overflow: visible;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        width: 100%;
        text-align: left;
        outline: none;
        cursor: pointer;
    }
    .more-dot {
        background-color: rgba(25, 8, 26, 0.64);
        margin: 0 auto;
        display: inline-block;
        width: 5px;
        height: 5px;
        margin-right: 1px;
        border-radius: 50%;
        transition: background-color 0.3s;
    }

    .button-62 {
        background: linear-gradient(to bottom right, #EF4765, #FF9A5A);
        border: 0;
        border-radius: 12px;
        color: #FFFFFF;
        cursor: pointer;
        display: inline-block;
        font-family: -apple-system,system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
        font-size: 12px;
        font-weight: 500;
        line-height: 2.0;
        outline: transparent;
        padding: 0 1rem;
        text-align: center;
        text-decoration: none;
        transition: box-shadow .2s ease-in-out;
        user-select: none;
        -webkit-user-select: none;
        touch-action: manipulation;
        white-space: nowrap;
    }
</style>


<!-- jQuery library -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>

<!-- Popper JS -->
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>

<!-- Latest compiled JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js"></script>
<section class="content">
    <div style="text-align: center" >
        @if(Session::has('insert'))
        <div class="alert alert-success alert-block">
            <!-- <button type="button" class="close" data-dismiss="alert">×</button>  -->
            <strong>{{ Session::get('insert') }}</strong>
        </div>
        @endif

        @if(Session::has('update'))
        <div class="alert alert-success alert-block">
            <!-- <button type="button" class="close" data-dismiss="alert">×</button>  -->
            <strong>{{ Session::get('update') }}</strong>
        </div>
        @endif
        @if(Session::has('delete'))
        <div class="alert alert-danger alert-block">
            <!-- <button type="button" class="close" data-dismiss="alert">×</button>  -->
            <strong>{{ Session::get('delete') }}</strong>
        </div>
        @endif
    </div>



    <div class="row">
        <div class="col-xs-12">


        <div class="modal" id="myModal">
            <div class="modal-dialog">
                <div class="modal-content">

                    <!-- Modal Header -->
                    <div class="modal-header">
                        <h4 class="modal-title">Are You Sure You Want To Resend Email To All Subscribers?</h4>
                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                    </div>

                    <!-- Modal body -->
                    <form method="post" action="{{ url('resend_email_to_all_subscribers') }}">



                        <input type="hidden" name="_token" value="<?php  echo csrf_token(); ?>">
                        <input type="hidden" name="hidden_email_id" id="hidden_email_id">


                        <!-- Modal footer -->
                        <div class="modal-footer">
                            <input type="submit" value="Send Email" class="btn btn-primary">
                            <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>

                        </div>
                    </form>

                </div>
            </div>
        </div>


            <div class="modal" id="myModal2">
                <div class="modal-dialog modal-lg">
                    <div class="modal-content">

                        <!-- Modal Header -->
                        <div class="modal-header">
                            <h4 class="modal-title">Send Message To Single Subscriber</h4>
                            <button type="button" class="close" data-dismiss="modal">&times;</button>
                        </div>

                        <!-- Modal body -->
                        <form method="post" action="{{ url('send_email_to_singlesubscriber') }}" enctype="multipart/form-data">



                            <input type="hidden" name="_token" value="<?php  echo csrf_token(); ?>">
                            <div class="modal-body">
                                <input type="hidden" name="hidden_subscriber_id" id="hidden_subscriber_id">
                                <!--                        <textarea style="margin-top: 100px;" name="email_text" class="summernote2"></textarea>-->
                                <textarea style="height: 1050px; width: 100%" class="form-control"  name="editor2"></textarea>
                            </div>
                            <div class="col-md-12" style="margin-top: 20px">
                                @if ($errors->has('images')) <p class="help-block" style="color: red">{{ $errors->first('images') }}</p> @endif

                                <label style="color: black">Attachments(if any)</label>
                                <input class="form-control" type="file" name="files[]" id="image" multiple="multiple"  resize-max-height="300"
                                       resize-max-width="250"
                                       resize-quality="0.7" >
                                <br>
                            </div>

                            <!-- Modal footer -->
                            <div class="modal-footer">
                                <input type="submit" value="Send Email" class="btn btn-primary">
                                <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
                            </div>
                            </form>

                    </div>
                </div>
            </div>

            <div class="modal" id="myModal3">
                <div class="modal-dialog">
                    <div class="modal-content">

                        <!-- Modal Header -->
                        <div class="modal-header">
                            <h4 class="modal-title">Are You Sure You Want To Resend Email To The Subscriber?</h4>
                            <button type="button" class="close" data-dismiss="modal">&times;</button>
                        </div>

                        <!-- Modal body -->
                        <form method="post" action="{{ url('resend_email_to_single_subscriber') }}">



                            <input type="hidden" name="_token" value="<?php  echo csrf_token(); ?>">
                            <input type="hidden" name="hidden_single_email_id" id="hidden_single_email_id">


                            <!-- Modal footer -->
                            <div class="modal-footer">
                                <input type="submit" value="Send Email" class="btn btn-primary">
                                <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>

                            </div>
                        </form>

                    </div>
                </div>
            </div>


            <div class="modal" id="myModal4">
                <div class="modal-dialog modal-lg">
                    <div class="modal-content">

                        <!-- Modal Header -->
                        <div class="modal-header">
                            <h4 class="modal-title">Complete Email</h4>
                            <button type="button" class="close" data-dismiss="modal">&times;</button>
                        </div>

                        <!-- Modal body -->

                        <div class="modal-body">
                            <div id="complete_email_body">

                            </div>

                            <div id="files_table">
                                <table class="table table-striped table-bordered table-hover dataTables-example dataTable" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info" role="grid">


                                    <thead>

                                    <tr role="row">
                                        <th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 208px;">S/No</th>
                                        <th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 208px;">File</th>

                                    </tr>
                                    </thead>

                                    <tbody class="table_file_body">


                                    </tbody>


                                </table>
                            </div>


                        </div>

                        <!-- Modal footer -->
                        <div class="modal-footer">

                            <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>

                        </div>


                    </div>
                </div>
            </div>

            <div class="box">
                <div class="box-header">
                    <h3 class="box-title">Subcribers Detail</h3>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <ul class="nav nav-tabs" role="tablist">
                        <li class="nav-item">
                            <a id="first" class="nav-link active" data-toggle="tab" href="#tabs-1" role="tab">Subscribers</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" data-toggle="tab" href="#tabs-2" role="tab">Send Bulk Email</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" data-toggle="tab" href="#tabs-3" role="tab">Email History</a>
                        </li>

                    </ul><!-- Tab panes -->
                    <div class="tab-content">
                        <div class="tab-pane active" id="tabs-1" role="tabpanel">
                            <table id="example1" class="table table-bordered table-striped">
                                <thead>
                                <tr>
                                    <th>SR #</th>
                                    <th>Email</th>
                                    <th style="width: 20%;">Action</th>

                                </tr>
                                </thead>
                                <tbody>
                                <?php  $count=1; ?>
                                @foreach($subscribers as $subscriber)
                                <tr>
                                    <td>{{ $count }}</td>
                                    <td>{{ $subscriber->email }}
                                    @if($subscriber->active_flag=='N')
                                       <br> (<span style="color: red;">Unsubscribed</span>)
                                    @else
                                    @endif

                                    </td>
                                    <td style="width: 20%">
                                        @if($subscriber->active_flag=='Y')
                                        <a  href=""    data-value="{{ $subscriber->id }}" class="khan2 btn btn-primary" data-toggle="modal" data-target="#myModal2"><i class="fa fa-eye"></i>Send Email</a>
                                        @endif

                                        <a data-toggle="modal" data-target="#confirm-delete" data-href="{{ url('delete_subscriber') }}/{{ $subscriber->id }}" class="btn btn-danger"><i class="glyphicon glyphicon-trash"></i></a></td>

                                    </td>

                                </tr>
                                <?php $count=$count+1; ?>
                                @endforeach
                                </tbody>

                            </table>
                        </div>
                        <div class="tab-pane" id="tabs-2" role="tabpanel">
                            <form action="{{ url('send_email_to_subscribers') }}" method="POST" enctype="multipart/form-data">
                                {{ csrf_field() }}
                                <div class="row">
                                    <div class="col-md-12 form-group">


                                        <p class="font-bold">
                                            <!--                                    Email-->
                                        </p>

                                        <div class="input-group bootstrap-touchspin">

                                            <!--                            <textarea class="form-control" name="emailtext" style="height: 200px" placeholder="Enter Your Email Text Here"></textarea>-->
                                            <!--                        <textarea style="margin-top: 100px;" name="email_text" class="summernote"></textarea>-->
                                            <textarea style="height: 1050px; width: 100%" class="form-control"  name="editor1"></textarea>
                                        </div>

                                        <div class="col-md-12" style="margin-top: 20px">
                                            @if ($errors->has('images')) <p class="help-block" style="color: red">{{ $errors->first('images') }}</p> @endif

                                            <label style="color: black">Attachments(if any)</label>
                                            <input class="form-control" type="file" name="files[]" id="image" multiple="multiple"  resize-max-height="300"
                                                   resize-max-width="250"
                                                   resize-quality="0.7" >
                                            <br>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-12">



                                        <button style="float: right" type="submit" class="btn btn-w-m btn-primary">Submit</button>
<br><br>
                                        <span style="float: right; font-weight: bold; color: #008000;  margin-top: 3px; font-size: 14px">({{ $email_subscriber_count }} email subscribers to receive email)</span>

                                    </div>

                                </div>
                            </form>

                        </div>

                        <div class="tab-pane" id="tabs-3" role="tabpanel">
                            <table class="table table-striped table-bordered table-hover dataTables-example dataTable" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info" role="grid">


                                <thead>
                                <a class=""></a>
                                <tr role="row">

                                    <th class="sorting_asc" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending" style="width: 10px;">S/No</th>
                                    <th class="sorting_asc" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending" style="width: 166px;">Emails</th>
                                    <th class="sorting_asc" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending" style="width: 166px;">Users</th>
                                    <th class="sorting_asc" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending" style="width: 166px;">Time And Date</th>
                                    <th class="sorting_asc" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending" style="width: 166px;">Action</th>



                                </tr>
                                </thead>
                                <tbody>
                                <?php  $count=1; ?>
                                @foreach($emails as $email)

                                <tr style="background-color: #ffffff">
                                    <td style="width: 5%;">{{ $count }}</td>
                                    <td class="sorting_1" style="width: 50%;">
                                        <?php
                                        // strip tags to avoid breaking any html
                                        $string = strip_tags($email->email);
                                        if (strlen($string) > 200) {
                                            $base_url= url('/');
                                            // truncate string
                                            $stringCut = substr($string, 0, 200);
                                            $endPoint = strrpos($stringCut, ' ');

                                            //if the string doesn't contain any space then it will cut without word basis.
                                            $string = $endPoint? substr($stringCut, 0, $endPoint) : substr($stringCut, 0);
//                        $string .= "<a href='./read_complete_email/$email->email_id'>...More</a>";
                                            $string .= "<span class='read_more' data-sale='$email->email_id'  value='$email->email_id'><a href='#'  >...More</a></span>";
                                        }
                                        echo $string;
                                        ?>

                                    </td>
                                    <td class="sorting_1" style="width: 10%;">
                                        @if($email->type=='A')
                                        <span style="font-weight: bold;color: green">All Subsribers</span>
                                        @else
                                        <span style="font-weight: bold;color: #0000ff">{{ $email->subscriber_email }}</span>
                                        @endif
                                    </td>
                                    <td class="sorting_1" style="width: 15%;"><?php echo $email->date ?></td>

                                    <td style="width: 15%">



                                        @if($email->subscriber_id!="")
                                        <button value="{{ $email->email_id }}" type="button" class="btn btn-primary khan3" data-toggle="modal" data-target="#myModal3">
                                            Resend<i class="glyphicon glyphicon-envelope"></i>
                                        </button>
                                        @else
                                        <button value="{{ $email->email_id }}" type="button" class="btn btn-primary khan" data-toggle="modal" data-target="#myModal">
                                            Resend<i class="glyphicon glyphicon-envelope"></i>
                                        </button>
                                        @endif
                                        <!--                                <a href="{{ url('resend_email_to_subscribers') }}/{{ $email->email_id }}" class="btn btn-primary">Resend<i class="glyphicon glyphicon-envelope"></i></a>-->



                                        <a data-toggle="modal" data-target="#confirm-delete" data-href="{{ url('delete_email') }}/{{ $email->email_id }}" class="btn btn-danger"><i class="glyphicon glyphicon-trash"></i></a>


                                    </td>

                                </tr>
                                <?php  $count=$count+1; ?>
                                @endforeach
                                </tbody>



                            </table>

                        </div>

                    </div>

                </div>
                <!-- /.box-body -->
            </div>
            <!-- /.box -->
        </div>
        <!-- /.col -->
    </div>
    <!-- /.row -->
</section>
<script>
    $(document).ready(function(){
        $('#first').click();
        $("#checkAll").click(function(){
            $('input:checkbox').not(this).prop('checked', this.checked);
        });
        $('.khan').on('click',function(){
            var fired_button = $(this).val();
            $('#hidden_email_id').val(fired_button);

        })

        $('.khan2').on('click',function(){
            var fired_button = $(this).data("value");

            $('#hidden_subscriber_id').val(fired_button);

        });

        $('.khan3').on('click',function(){

            var fired_button = $(this).val();

            $('#hidden_single_email_id').val(fired_button);

        })

        $('.read_more').on('click',function(){
            var x = $(this).data('sale');



            $.get('get_complete_email' + '/' + x, function (data) {
                console.log(data);
                var $el = $("#complete_email_body");
                $el.empty();
                $.each(data, function(key,value){
                    $el.html(value.email)
                });
                $('#myModal4').modal('show');
            });

            $.get('get_complete_email_files' + '/' + x, function (data) {
                console.log(data);
                var count=0;
                $.each(data, function(key,value){
                    count=count+1;
                });
                if(count>0){
                    var $el = $(".table_file_body");
                    $el.empty();
                    $('#files_table').show();
                    var sr_no=1;
                    $.each(data, function(key,value){
                        var newRow = $('<tr>' +
                            '<td><span>'+sr_no+'</span></td>'+
                            '<td><span><a download href="public/uploads/attachments/'+value.file_name+'"><button class="btn btn-primary"><i class="glyphicon glyphicon-download"></i>'+ value.file_name+'</button></span></td>'+
                            '</tr>');
                        $('.table_file_body').append(newRow);
                        sr_no=sr_no+1;
                    });

                }
                else{
                    $('#files_table').hide();
                }

            });



        });
    });
</script>

<script type="text/javascript">

    CKEDITOR.replace('editor2', {
        filebrowserUploadUrl: "{{route('ckeditor.upload', ['_token' => csrf_token() ])}}",
        filebrowserUploadMethod: 'form',
        height: '300px'
    });

    CKEDITOR.replace('editor1', {
        filebrowserUploadUrl: "{{route('ckeditor.upload', ['_token' => csrf_token() ])}}",
        filebrowserUploadMethod: 'form',
        height: '300px',
        width:'1050px'

    });



</script>
@endsection

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]