

<?php $__env->startSection('main-content'); ?>
<main>
    <div class="container-fluid">
        <h2 class="mt-5 mb-4">Enrollment Client</h2>

        <div class="row">
            <div class="col-md-12">
                <div class="card card-primary">
                    <div class="card-header">
                        <h6 class="card-title">Upload Html File MIS Date (<?php echo e(date('d-M-Y', strtotime($lastMisDate->c_date))); ?>-<?php echo e($formattedTime); ?>)</h6>
                    </div>
                    <div class="card-body" id="demo">

                        <form action="<?php echo e(url('admin/enrollment-client-upload-excel')); ?>" method="post"
                            enctype="multipart/form-data">
                            <?php echo csrf_field(); ?>
                            
                            <div class="row">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="excel_file">Html File</label>
                                        <input type="file" class="form-control" name="excel_file" id="fileInput" onchange="previewFile()" accept=".html, .htm">
                                      
                                        <?php $__errorArgs = ['excel_file'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <p style="color: red"><?php echo e($message); ?></p>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                    </div>
                                </div>

                                <div class="col-sm-6"></div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label>&nbsp;</label>
                                        <div class="clear"></div>
                                        <input type="submit" value="Upload" class="btn btn-success float-right">
                                    </div>
                                </div>
                               
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="preview" style="max-width: 100%; margin-top: 10px; display: none; overflow-x: scroll;"></div>
                                        <script>
                                            function previewFile() {
                                                $("body").addClass("sb-nav-fixed sb-sidenav-toggled");
                                                var preview = document.getElementById('preview');
                                                var fileInput = document.getElementById('fileInput');

                                                var file = fileInput.files[0];
                                                var reader = new FileReader();

                                                reader.onloadend = function () {
                                                    preview.innerHTML = '<p>' + reader.result + '</p>';
                                                    preview.style.display = 'block';
                                                };

                                                if (file) {
                                                    reader.readAsText(file); // Use readAsText for non-image files
                                                } else {
                                                    preview.innerHTML = '';
                                                    preview.style.display = 'none';
                                                }
                                            }
                                        </script>
                                    </div>
                            </div>
                        </form>
                    </div>
                    <!-- /.card-body -->
                </div>
                <!-- /.card -->
            </div>
        </div>
    </div>
</main>
<?php $__env->stopSection(); ?>




<?php echo $__env->make('admin.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/aks5g/public_html/aadhar.aks.5g.in/resources/views/admin/enrollment_client.blade.php ENDPATH**/ ?>