<?php
defined('APK') or exit('Anda tidak dizinkan mengakses langsung script ini!');
?>
<div class='row'>
<div class='col-md-12'>
            <div class="card">
               <div class="card-header">
			   <div class='right '>
                    <button class='btn btn-sm btn-outline-primary' onclick="frames['frameresult'].print()"><i class='fa fa-print'></i> Print</button>                   
                </div>
                  <h5 class='card-title'><i class="fas fa-th"></i> Nomor Peserta</h5></div>    
			  
             <div class="card-body">
			 <div class="example-container">
                <div class="example-content">
             <div class="row">
			<div class='col-md-3'></div>
			<div class='col-md-6'>
				<div class="panel panel-default">	
					<div class='box-header with-border'>
						<h4 class='box-title'></h4>
						
             </div>
            <div class='box-body'>
                <?= $info ?>
                <div class='form-group text-center'>
                    <label>Header No Peserta</label>
                    <textarea id='headerkartu' class='form-control text-center' onchange='kirim_form();' rows='2'><?= $setting['header_kartu'] ?></textarea>
                </div>
                <div class='form-group text-center'>
                    <label class="bold">Pilih Kelas</label>
					<p>
                    <div class='row'>
                        <div class='col-md-4'>
                            <?php
                            $total = mysqli_num_rows(mysqli_query($koneksi, "SELECT * FROM kelas"));
                            $limit = number_format($total / 3, 0, '', '');
                            $limit2 = number_format($limit * 2, 0, '', '');
                            $sql_kelas = mysqli_query($koneksi, "SELECT * FROM kelas ORDER BY nama ASC LIMIT 0,$limit");
                            ?>
                            <?php while ($kelas = mysqli_fetch_array($sql_kelas)) : ?>
                                <div class='radio'>
                                    <label><input type='radio' name='idk' value="<?= $kelas['id_kelas'] ?>" onclick="printnopes('<?= $kelas[0] ?>')" /> <?= $kelas['nama'] ?></label>
                                </div>
                            <?php endwhile ?>
                        </div>
                        <div class='col-md-4'>
                            <?php
                            $sql_kelas = mysqli_query($koneksi, "SELECT * FROM kelas ORDER BY nama ASC LIMIT $limit,$limit");
                            ?>
                            <?php while ($kelas = mysqli_fetch_array($sql_kelas)) : ?>
                                <div class='radio'>
                                    <label><input type='radio' name='idk' value="<?= $kelas['id_kelas'] ?>" onclick="printnopes('<?= $kelas[0] ?>')" /> <?= $kelas['nama'] ?></label>
                                </div>
                            <?php endwhile ?>
                        </div>
                        <div class='col-md-4'>
                            <?php
                            $sql_kelas = mysqli_query($koneksi, "SELECT * FROM kelas ORDER BY nama ASC LIMIT $limit2,$total");
                            ?>
                            <?php while ($kelas = mysqli_fetch_array($sql_kelas)) : ?>
                                <div class='radio'>
                                    <label><input type='radio' name='idk' value="<?= $kelas['id_kelas'] ?>" onclick="printnopes('<?= $kelas[0] ?>')" /> <?= $kelas['nama'] ?></label>
                                </div>
                            <?php endwhile ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</div>
<iframe id='loadframe' name='frameresult' src='sandik_ujian/print_nopes.php' style='display:none'></iframe>