Esempio n. 1
0
<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>&nbsp;<a href="?pilih=ujian&amp;mod=yes&amp;aksi=hapusfilessoal&amp;idujian=' . $idujian . '&amp;id=' . $idkursus . '&amp;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&amp;mod=yes&amp;aksi=delsoal&amp;idujian=' . $idujian . '&amp;id=' . $idkursus . '&amp;idsoal=' . $idsoal . '" onclick="return confirm(\'Apakah Anda Yakin Ingin Menghapus Soal Ini ?\')"><span class="btn btn-danger">Del</span></a>&nbsp;<a href="?pilih=ujian&amp;mod=yes&amp;aksi=editsoal&amp;idujian=' . $idujian . '&amp;id=' . $idkursus . '&amp;idsoal=' . $idsoal . '"><span class="btn btn-warning">Edit</span></a>&nbsp;<a href="?pilih=ujian&amp;mod=yes&amp;aksi=addsoal&amp;idujian=' . $idujian . '&amp;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']);
Esempio n. 2
0
            $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&amp;mod=yes&amp;aksi=del&amp;id=' . $data['id'] . '&amp;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>&nbsp;<a href="?pilih=materi&amp;mod=yes&amp;aksi=edit&amp;materi=' . $data['id'] . '&amp;id=' . $idkursus . '"><span class="btn btn-warning">Edit</span></a>&nbsp;<a href="?pilih=materi&amp;mod=yes&amp;aksi=detail&amp;materi=' . $data['id'] . '&amp;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}' ");