<th width="10px">No</th> <th width="300px">Soal</th> <th width="100px">Files</th> <th width="150px">Aksi</th> </tr></thead><tbody>'; $no = 1; while ($data = $koneksi_db->sql_fetchrow($hasil)) { $idsoal = $data['id']; $soal = $data['soal']; $files = $data['files']; if ($files) { $gambar = '<a href="mod/ujian/download/' . $files . '" target="new"><span class="label label-success">available</span></a> <a href="?pilih=ujian&mod=yes&aksi=hapusfilessoal&idujian=' . $idujian . '&id=' . $idkursus . '&idsoal=' . $idsoal . '"><span class="label label-danger">hapus</span></a>'; } else { $gambar = '<span class="label label-danger">not-available</span>'; } $kelas = lihatkelas($idkelas); $kelas = substr_replace($kelas, "", -1, 1); $admin .= '<tr> <td><b>' . $no . '</b></td> <td>' . $soal . '</td> <td>' . $gambar . '</td> <td><a href="?pilih=ujian&mod=yes&aksi=delsoal&idujian=' . $idujian . '&id=' . $idkursus . '&idsoal=' . $idsoal . '" onclick="return confirm(\'Apakah Anda Yakin Ingin Menghapus Soal Ini ?\')"><span class="btn btn-danger">Del</span></a> <a href="?pilih=ujian&mod=yes&aksi=editsoal&idujian=' . $idujian . '&id=' . $idkursus . '&idsoal=' . $idsoal . '"><span class="btn btn-warning">Edit</span></a> <a href="?pilih=ujian&mod=yes&aksi=addsoal&idujian=' . $idujian . '&id=' . $idkursus . '"><span class="btn btn-success">Add</span></a></td> </tr>'; $no++; } $admin .= '</tbody></table>'; /************************************/ } if ($_GET['aksi'] == 'testujian') { $id = int_filter($_GET['id']); $idujian = int_filter($_GET['idujian']);
$idkelas = $data['kelas']; $konten = limitTXT(strip_tags($data['konten']), 200); $materi = $data['materi']; $kelas = $data['kelas']; $hasil2 = $koneksi_db->sql_query("SELECT * FROM kelas where id='{$kelas}'"); $data2 = $koneksi_db->sql_fetchrow($hasil2); $kelas2 = $data2['kelas']; if ($materi != "") { $available = "<a href='mod/materi/download/{$data['materi']}' target='new'><span class='btn btn-success'>{$materi}</span></a>"; } else { $available = ""; } $admin .= '<tr> <td><b>' . $no . '</b></td> <td>' . $data['judul'] . '</td> <td>' . lihatkelas($data['kelas']) . '</td> '; $admin .= "<td>{$available}</td>"; $admin .= ' <td><a href="?pilih=materi&mod=yes&aksi=del&id=' . $data['id'] . '&kursus=' . $idkursus . '" onclick="return confirm(\'Semua Data Materi akan di Hapus, Apakah Anda Yakin Ingin Menghapus Data Ini ?\')"><span class="btn btn-danger">Hapus</span></a> <a href="?pilih=materi&mod=yes&aksi=edit&materi=' . $data['id'] . '&id=' . $idkursus . '"><span class="btn btn-warning">Edit</span></a> <a href="?pilih=materi&mod=yes&aksi=detail&materi=' . $data['id'] . '&id=' . $idkursus . '"><span class="btn btn-success">Detail</span></a></td> </tr>'; $no++; } $admin .= '</tbody></table>'; /************************************/ } if ($_GET['aksi'] == "detail") { $id = int_filter($_GET['id']); $idmateri = int_filter($_GET['materi']); $admin .= '<div class="panel-heading"><b>Detail Materi</b></div>'; $hasil = $koneksi_db->sql_query("SELECT * FROM kursus_setting where id='{$id}' ");