Anons79 Mini Shell

Directory : /home/aplikasiposinfo/public_html/isranhadikaltim.id/resources/views/rekap/
Upload File :
Current File : /home/aplikasiposinfo/public_html/isranhadikaltim.id/resources/views/rekap/excel2.blade.php

<?php
$date = date('d/m/Y');
header('Content-Type:   application/vnd.ms-excel; charset=utf-8');
header('Content-Disposition: attachment; filename=' . $filename); //File name extension was wrong
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: private', false);
?>
<style type="text/css">
    /* table {
        text-align: center;
    } */

    * {
        font-family: Arial, sans-serif;
    }

    .table-data {
        border-collapse: collapse;
        width: 100%;
    }

    .th-data,
    .td-data {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
        word-wrap: break-word;
        font-size: 12px;
        font-family: Arial;
    }
</style>
@php
    $timezone = new \DateTimeZone('Asia/Makassar');
    $date = new DateTime();
    $date->setTimeZone($timezone);
@endphp
{{-- <table>
    <tr>
        <td colspan="13">
            <h2>{{ $title }}</h2>
        </td>
    </tr>
    <tr>
        <td colspan="13">
            <h2>{{ @$subtitle }}</h2>
        </td>
    </tr>
    <tr>
        <td colspan="13">
            <br>
            <br>
        </td>
    </tr>
</table> --}}
@if ($title == 'Rekap Jumlah Inputan Pengguna')
    <table id="example2" class="table-data" style="width: 100%;"
        class="table-responsive no-padding table table-bordered table-hover">
        <thead>
            <tr>
                <th class="th-data" style="text-align: center">No</th>
                <th class="th-data" style="text-align: center">Nama Pengguna</th>
                <th class="th-data" style="text-align: center">Role Pengguna</th>
                <th class="th-data" style="text-align: center">Total Data Warga </th>
            </tr>
        </thead>
        <tbody>
            @foreach ($datas as $a)
                <tr>
                    <td class="td-data">{{ $no++ }}</td>
                    <td class="td-data">{{ $a->name }}</td>
                    <td class="td-data">
                        @if ($a->role == 0)
                            User Operator
                        @elseif ($a->role == 1)
                            User Super Admin
                        @elseif ($a->role == 2)
                            User Admin
                        @endif
                    </td>
                    <td class="td-data">{{ $a->total }} data</td>
                </tr>
            @endforeach
        </tbody>
    </table>
@else
    <table id="example2" class="table-data" style="width: 100%;"
        class="table-responsive no-padding table table-bordered table-hover">
        <thead>
            <tr>
                <th class="th-data" style="text-align: center">No</th>
                <th class="th-data" style="text-align: center">Nama</th>
                <th class="th-data" style="text-align: center">NIK <br> (16 Digit)</th>
                <th class="th-data" style="text-align: center">Jenis Kelamin (P/L)</th>
                <th class="th-data" style="text-align: center">Alamat</th>
                <th class="th-data" style="text-align: center">RT (Jika ada)</th>
                <th class="th-data" style="text-align: center">RW (Jika ada)</th>
                {{-- <th class="th-data" style="text-align: center">RW (Jika ada)</th> --}}
                <th class="th-data" style="text-align: center">Tempat Lahir</th>
                <th class="th-data" style="text-align: center">Tanggal Lahir <br> (dd-mm-yyyy)</th>
                <th class="th-data" style="text-align: center">Kode Pekerjaan</th>
                <th class="th-data" style="text-align: center">Belum / Sudah / Pernah Kawin <br> (B/S/P*)</th>
                <th class="th-data" style="text-align: center">Kode Kelurahan Alamat KTP</th>
                <th class="th-data" style="text-align: center">No. Telp</th>
                <th class="th-data" style="text-align: center">Email</th>
                <th class="th-data" style="text-align: center">Nama <br> Penghubung</th>
                <th class="th-data" style="text-align: center">No.Telp</th>
            </tr>
        </thead>
        <tbody>
            @foreach ($datas as $data)
                <tr>
                    <td class="td-data">
                        {{ $no++ }}
                    </td>
                    <td class="td-data">
                        {{ $data->nama_lengkap }}
                    </td>
                    {{-- @php
                    $number = $data->nik;
                    echo "<td>=\"$number\"</td>";
                @endphp --}}
                    <td class="td-data">
                        '{{ $data->nik }}'
                    </td>

                    <td class="td-data">
                        {{ substr($data->jenis_kelamin, 0, 1) }}
                    </td>
                    <td class="td-data">
                        {{ $data->alamat }}
                    </td>
                    @php
                        $rt = explode('/', $data->rt);
                        if (count($rt) == 1) {
                            $rt[] = 0;
                        }
                    @endphp
                    <td class="td-data">
                        {{ $rt[0] }}
                    </td>
                    <td class="td-data">
                        {{ $data->rw == 0 ? $rt[1] : $data->rw }}
                    </td>

                    <td class="td-data">
                        {{ $data->tempat_lahir }}
                    </td>
                    <td class="td-data">
                        {{ date('d-m-Y', strtotime($data->tanggal_lahir)) }}
                    </td>
                    <td class="td-data">
                        @php
                            $pekerjaan = explode('/', $data->pekerjaan);
                            echo preg_replace('/\?/', '', $pekerjaan[0]);
                        @endphp
                    </td>
                    <td class="td-data">
                        {{ substr($data->kawin, 0, 1) }}
                    </td>
                    <td class="td-data">
                        {{ $data->kelurahan_id }}
                    </td>
                    <td class="td-data">
                        '{{ $data->no_telepon }}'
                    </td>
                    <td class="td-data">
                        {{ $data->email != null ? str_replace('@', ' @', $data->email) : '-' }}
                    </td>

                    {{-- <td>
                    {{ $data->no_telepon }}
                    </td> --}}
                    <td class="td-data">
                        {{ $data->nama_penghubung }}
                    </td>
                    <td class="td-data">
                        '{{ $data->no_telp_penghubung }}'
                    </td>
                </tr>
            @endforeach
        </tbody>
    </table>
@endif

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