
<?php
header("Content-type: application/vnd-ms-excel");
header("Content-Disposition: attachment; filename=$nama_file.xls");
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Peserta KONASPI 2024</title>
	
	<style type="text/css">
	body{ background-color: #FFF; }
		.num {
          mso-number-format:"\@";
         }
        .title-sm{
          /*font-family: 'myriadproregular'; */
          font-size: 15pt; font-weight: bold;
         } 
         .title-lg{
          /*font-family: 'myriadproregular';  */
          font-size: 24pt; font-weight: bold;
         }          
          body{ font-size: 11pt;
            /*font-family: 'myriadproregular'; */
          }
          .title-jurusan{
             /*font-family: 'myriadproregular';  */
             font-size: 20pt; font-weight: bold;
          }

          #head-title{
             /*font-family: MyriadPro-Regular; */
             src: url("{{ asset('assets/font/MyriadPro-Regular.otf') }}");
             font-family:MyriadPro-Regular;
             font-weight:bold;
          }
          
          #head-big{
             /*font-family:MyriadPro-Cond; */
             font-weight:bold;
             font-size:22pt;
          }
          
          #container td{
             /*font-family:MyriadPro-Regular;*/
          }

          .page-break {
              page-break-after: always;
          }

          div.ui-menu li {
			    list-style:none;
			    background-image:none;
			    background-repeat:none;
			    background-position:0; 
			}
			ul
			{
			    list-style-type:none;
			    padding:0px;
			    margin:0px;
			}
			li
			{
			    background-image:url(sqpurple.gif);
			    background-repeat:no-repeat;
			    background-position:0px 5px; 
			    padding-left:14px;
			}
            
            .responsive {
                width: 100%;
                height: auto;
                }


        .kotak {
            border: 1px solid #000; 
            width: 15px;
            height: 15px;  
            font-weight: bold;   
            font-size:9pt
          
            } 
             
           
	</style>  <style> .str{ mso-number-format:\@; } </style>
    <center>
      DAFTAR PESERTA KONASPI 2024
    </center>
        <table>
                                <thead>
                                    <tr style="text-align: center;">
                                    <th>No.</th>
                                    <th>Kode Registrasi</th>
                                    <th>Nama</th>
                                    <th>Email</th>
                                    <th>Telepon</th>
                                    <th>Instansi</th>
                                    <th>Jabatan</th>
                                    <th>Alamat</th>
                                    <th>Kode Pos</th>
                                    <th>Kota</th>
                                    <th>Virtual Account</th>
                                    <th>Tagihan</th>
                                    <th>Kegiatan</th>
                                    <th>Konferensi</th>
                                    <th>Tanggal Daftar</th>
                                    <th>Tanggal Bayar</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @php
                                        $no = 1;
                                    @endphp
                                    @foreach ($peserta as $p)
                                        <tr style="text-align: center;">
                                            <td>{{ $no }}</td>
                                            <td>{{ $p->kode_registrasi }}</td>
                                            <td>{{ $p->nama}}</td>
                                            <td>{{ $p->email}}</td>
                                            <td>'{{ $p->telepon }}</td>
                                            <td>{{ $p->instansi}}</td>
                                            <td>{{ $p->jabatan }}</td>
                                            <td>{{ $p->alamat }}</td>
                                            <td>{{ $p->kode_pos }}</td>
                                            <td>{{ $p->kota }}</td>
                                            <td>'{{ $p->nomor_va }}</td>
                                            <td>{{ $p->tagihan }}</td>
                                            @php
                                                $keg = DB::table('v_kegiatan')->where('id_registrasi', $p->id)->get();
                                            @endphp
                                            <td align="left">
                                                @foreach($keg as $k)
                                                    {{ $k->kegiatan.";" }}<br>
                                                @endforeach
                                            </td>
                                            <td align="left">
                                                @foreach($keg as $k)
                                                    {{ $k->konferensi.";" }}<br>
                                                @endforeach
                                            </td>
                                            <td>{{ $p->created_at }}</td>
                                            <td>{{ $p->tanggal_bayar }}</td>
                                        </tr>
                                        @php
                                            $no++;
                                        @endphp
                                    @endforeach
                                </tbody>
                            </table>