Пример #1
0
    </tr>';
$no = 1;
$hasil = $koneksi_db->sql_query("SELECT * FROM akad_siswapelanggaran where tgl between '{$tgl1}' and '{$tgl2}' and  siswa='{$idsiswa}' order by tgl asc");
while ($data = $koneksi_db->sql_fetchrow($hasil)) {
    $id = $data['id'];
    $tgl = $data['tgl'];
    $kelas = $data['kelas'];
    $siswa = $data['siswa'];
    $pelanggaran = $data['pelanggaran'];
    $point = $data['point'];
    echo '<tr height="25">    	
    	<td align="center">' . $no . '</td>
	       <td align="center">' . tanggalindoshort($tgl) . '</td>
        <td align="center">' . getkelas($kelas) . '</td>
        <td align="left">' . getkatdaripelanggaran2($pelanggaran) . '</td>
		<td align="left">' . getpelanggaran($pelanggaran) . '</td>
       	<td align="center">' . $point . '</td>       
        <td align="left">' . gethukuman($pelanggaran) . '</td>
    </tr>';
    $pointtotal += $point;
    $no++;
}
echo '<tr>	
		<td width="5%" colspan="5" align="right" bgcolor="#CCCCCC"><strong>Jumlah&nbsp;&nbsp;</strong></td>
   		<td width="5%" height="25" align="center">' . $pointtotal . '</td>     
        <td width="*" bgcolor="#CCCCCC"></td>
    </tr>
	<!-- END TABLE CONTENT -->
    </table>	';
echo "</body></html>";
/*
Пример #2
0
            <th>Point</th>			
            <th>Aksi</th>
        </tr>
    </thead>';
        $hasil = $koneksi_db->sql_query("SELECT * FROM akad_siswapelanggaran  where siswa='{$siswa}' order by tgl desc");
        while ($data = $koneksi_db->sql_fetchrow($hasil)) {
            $tgl1 = $data['tgl'];
            $siswa = $data['siswa'];
            $kelas = $data['kelas'];
            $pelanggaran = $data['pelanggaran'];
            $point = $data['point'];
            $admin .= '<tr>
<td>' . datetimes($tgl1, false, false) . '</td>
<td>' . getsiswa($siswa) . '</td>
<td>' . getkelas($kelas) . '</td>
<td>' . getpelanggaran($pelanggaran) . '</td>
<td>' . $point . '</td>
<td><a href="?pilih=siswapelanggaran&amp;mod=yes&amp;aksi=del&amp;id=' . $data['id'] . '&siswa=' . $siswa . '" onclick="return confirm(\'Apakah Anda Yakin Ingin Menghapus Data Ini ?\')"><span class="btn btn-danger">Hapus</span></a> <a href="?pilih=siswapelanggaran&amp;mod=yes&amp;aksi=edit&amp;id=' . $data['id'] . '"><span class="btn btn-warning">Edit</span></a></td>
</tr>';
        }
        $admin .= '</tbody></table>';
        $admin .= '</div>';
    }
    if ($_GET['aksi'] == '') {
        $admin .= '<div class="panel panel-info">
<div class="panel-heading"><h3 class="panel-title">Daftar Pelanggaran Siswa</h3></div>';
        $admin .= '
<table id="example"class="table table-striped table-bordered" cellspacing="0" width="100%">
    <thead>
        <tr>
            <th>NIS</th>