public function block_content($context, array $blocks = array()) { // line 8 echo "<div class=\"module message\">\n <div class=\"module-head\">\n <h3>Pesan</h3>\n </div>\n <div class=\"module-body\">\n <div class=\"module-option clearfix\">\n "; // line 14 echo get_flashdata("msg"); echo "\n\n <div class=\"pull-right\">\n <form class=\"form-search\" method=\"get\" action=\""; // line 17 echo twig_escape_filter($this->env, site_url("message/index/"), "html", null, true); echo "\">\n <div class=\"input-append\">\n <input type=\"text\" class=\"span3 search-query\" placeholder=\"cari pesan...\" name=\"q\" value=\""; // line 19 echo twig_escape_filter($this->env, isset($context["keyword"]) ? $context["keyword"] : null, "html", null, true); echo "\">\n <button type=\"submit\" class=\"btn\"><i class=\"icon-search\"></i></button>\n </div>\n </form>\n </div>\n <div class=\"pull-left\">\n <a href=\""; // line 25 echo twig_escape_filter($this->env, site_url("message/create/"), "html", null, true); echo "\" class=\"btn btn-primary\"><i class=\"icon-pencil\"></i> Tulis pesan</a>\n </div>\n </div>\n <div class=\"module-body table\">\n <table class=\"table table-message\">\n <tbody>\n "; // line 31 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["inbox"]) ? $context["inbox"] : null); foreach ($context['_seq'] as $context["_key"] => $context["d"]) { // line 32 echo " <tr class=\""; echo $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "opened") == 0 ? "unread" : ""; echo " clickable-row\" data-href=\""; echo twig_escape_filter($this->env, site_url("message/detail/" . $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "id") . "#msg-" . $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "id")), "html", null, true); echo "\">\n <td class=\"cell-author\">\n <img style=\"height:30px;width:30px; margin-right: 10px;\" class=\"img-polaroid img-circle pull-left\" src=\""; // line 34 echo twig_escape_filter($this->env, get_url_image_siswa($this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "profil"), "foto"), "medium", $this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "profil"), "jenis_kelamin")), "html", null, true); echo "\">\n <a href=\""; // line 35 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "profil"), "link_profil"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, character_limiter($this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "profil"), "nama"), 23, "..."), "html", null, true); echo "</a>\n <br><small>"; // line 36 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "date"), "html", null, true); echo "</small>\n </td>\n <td class=\"cell-title hidden-phone hidden-tablet\">\n <a class=\"pull-right\" style=\"margin-left:10px;\" href=\""; // line 39 echo twig_escape_filter($this->env, site_url("message/detail/" . $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "id") . "/?confirm=1#confirm"), "html", null, true); echo "\"><i class=\"icon-trash\"></i></a>\n "; // line 40 echo character_limiter(strip_tags($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "content")), 80, "..."); echo "\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['d'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 44 echo "\n </tbody>\n </table>\n </div>\n <div class=\"module-foot\">\n "; // line 49 echo isset($context["pagination"]) ? $context["pagination"] : null; echo "\n </div>\n\n </div>\n</div>\n"; }
public function block_content($context, array $blocks = array()) { // line 8 echo "<div class=\"module\">\n <div class=\"module-head\">\n <h3>"; // line 10 echo anchor("tugas", "Tugas"); echo " / Koreksi</h3>\n </div>\n <div class=\"module-body\">\n "; // line 13 echo get_flashdata("tugas"); echo "\n\n <div class=\"bs-callout bs-callout-info\">\n <div class=\"btn-group pull-right\" style=\"margin-top:-5px;\">\n "; // line 17 echo anchor("tugas/edit/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon icon-edit\"></i> Edit Tugas", array("class" => "btn btn-default")); echo "\n "; // line 18 if ($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "aktif") == 0) { // line 19 echo " "; echo anchor("tugas/terbitkan/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon-ok\"></i> Terbitkan", array("class" => "btn btn-success btn-small")); echo "\n "; } elseif ($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "aktif") == 1) { // line 21 echo " "; echo anchor("tugas/tutup/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon-minus\"></i> Tutup", array("class" => "btn btn-danger btn-small")); echo "\n "; } // line 23 echo " </div>\n <b><a class=\"as-link\" data-toggle=\"collapse\" data-target=\"#detail-tugas\"><i class=\"icon-info-sign\" style=\"line-height: 0px;\"></i> "; // line 24 echo twig_escape_filter($this->env, twig_upper_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "judul")), "html", null, true); echo "</a></b>\n\n <div id=\"detail-tugas\" class=\"collapse\" style=\"margin-top: 5px;\">\n <table class=\"table\">\n <tr>\n <th style=\"border-top: none;\" width=\"15%\">Tipe</th>\n <td style=\"border-top: none;\">"; // line 30 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "type_label"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th>Judul</th>\n <td>"; // line 34 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "judul"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th>Matapelajaran</th>\n <td>"; // line 38 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "mapel"), "nama"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th>Kelas</th>\n <td>\n <ul class=\"unstyled inline\" style=\"margin-left: -5px;margin-bottom: 0px;\">\n "; // line 44 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "tugas_kelas")); foreach ($context['_seq'] as $context["_key"] => $context["k"]) { // line 45 echo " <li>"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "nama"), "html", null, true); echo "</li>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['k'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 47 echo " </ul>\n </td>\n </tr>\n <tr>\n <th>Info</th>\n <td>"; // line 52 echo $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "info"); echo "</td>\n </tr>\n <tr>\n <th>Durasi</th>\n <td>"; // line 56 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "durasi"), "html", null, true); echo " Menit</td>\n </tr>\n </table>\n </div>\n\n </div>\n <br>\n\n <table class=\"table table-striped datatable\">\n <thead>\n <tr>\n <th>Siswa</th>\n <th>Kelas</th>\n <th>Nilai</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n "; // line 74 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["data_siswa"]) ? $context["data_siswa"] : null); foreach ($context['_seq'] as $context["_key"] => $context["s"]) { // line 75 echo " <tr>\n <td>\n <img style=\"height:20px;width:20px; margin-right: 10px;\" class=\"img-polaroid img-circle pull-left\" src=\""; // line 77 echo twig_escape_filter($this->env, get_url_image_siswa($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "foto"), "medium", $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "jenis_kelamin")), "html", null, true); echo "\">\n <a href=\""; // line 78 echo twig_escape_filter($this->env, site_url("siswa/detail/" . $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "id")), "html", null, true); echo "\"><b>"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "nama"), "html", null, true); echo " "; echo !twig_test_empty($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "nis")) ? "<span class=\"text-muted\">(" . $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "nis") . ")</span>" : ""; echo "</b></a>\n </td>\n <td>"; // line 80 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "kelas_aktif"), "nama"), "html", null, true); echo "</td>\n <td>"; // line 81 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "nilai"), "nilai"), "html", null, true); echo "</td>\n <td>\n <div class=\"btn-group\">\n "; // line 84 if (twig_test_empty($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "nilai"))) { // line 85 echo " "; echo anchor("tugas/detail_jawaban/" . $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id"), "Koreksi", array("class" => "btn btn-small btn-primary iframe-koreksi-jawaban")); echo "\n "; } else { // line 87 echo " "; echo anchor("tugas/detail_jawaban/" . $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id"), "Detail", array("class" => "btn btn-small btn-primary iframe-koreksi-jawaban")); echo "\n "; } // line 89 echo " <a href=\""; echo twig_escape_filter($this->env, site_url("tugas/reset_jawaban/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "id")), "html", null, true); echo "\" class=\"btn btn-small btn-default\" onclick=\"return confirm('Anda yakin ingin menganggap siswa belum mengerjakan?')\" data-toggle=\"tooltip\" title=\"Reset jawaban siswa, <br>anggap siswa menjadi belum mengerjakan.\">Reset</a>\n </div>\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['s'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 94 echo " </tbody>\n </table>\n\n </div>\n</div>\n"; }
function detail($segment_3 = '', $segment_4 = '') { $materi_id = (int) $segment_3; if (empty($materi_id)) { $data['error'] = "Materi tidak ditemukan."; } $materi = $this->materi_model->retrieve($materi_id); if (empty($materi) or empty($materi['publish'])) { $data['error'] = "Materi tidak ditemukan."; } # tambah views jika materi terfulis if (empty($materi['file'])) { $plus_views = false; # buat session kalo sudah baca materi yan ini $session_read = $this->session->userdata('read_materi'); if (empty($session_read)) { $this->session->set_userdata(array('read_materi' => array($materi['id']))); $plus_views = true; } else { if (!in_array($materi['id'], $session_read)) { $plus_views = true; } } if ($plus_views) { $this->materi_model->plus_views($materi['id']); } } switch ($segment_4) { default: case 'download': # jika request download if ($segment_4 == 'download' and !empty($materi['file'])) { $data_file = file_get_contents(get_path_file($materi['file'])); // Read the file's contents $name_file = $materi['file']; $this->materi_model->plus_views($materi['id']); force_download($name_file, $data_file); } if (!isset($data['error'])) { $data['materi'] = $materi; $data['materi']['download_link'] = site_url('materi/detail/' . $materi['id'] . '/download'); # cari tipenya if (empty($materi['file'])) { $type = 'tertulis'; } else { $type = 'file'; $data['materi']['file_info'] = get_file_info(get_path_file($materi['file'])); $data['materi']['file_info']['mime'] = get_mime_by_extension(get_path_file($materi['file'])); } $data['type'] = $type; $data['materi']['mapel'] = $this->mapel_model->retrieve($materi['mapel_id']); # cari materi kelas $materi_kelas = $this->materi_model->retrieve_all_kelas($materi['id']); foreach ($materi_kelas as $mk) { $kelas = $this->kelas_model->retrieve($mk['kelas_id']); $data['materi']['materi_kelas'][] = $kelas; } # cari pembuatnya if (!empty($materi['pengajar_id'])) { $pengajar = $this->pengajar_model->retrieve($materi['pengajar_id']); $data['materi']['pembuat'] = array('nama' => $pengajar['nama'], 'link_foto' => get_url_image_pengajar($pengajar['foto'], 'medium', $pengajar['jenis_kelamin'])); if (is_admin()) { $data['materi']['pembuat']['link_profil'] = site_url('pengajar/detail/' . $pengajar['status_id'] . '/' . $pengajar['id']); } else { $data['materi']['pembuat']['link_profil'] = site_url('pengajar/detail/' . $pengajar['id']); } } if (!empty($materi['siswa_id'])) { $siswa = $this->siswa_model->retrieve($materi['siswa_id']); $data['materi']['pembuat'] = array('nama' => $siswa['nama'], 'link_foto' => get_url_image_siswa($siswa['foto'], 'medium', $siswa['jenis_kelamin'])); if (is_admin()) { $data['materi']['pembuat']['link_profil'] = site_url('siswa/detail/' . $siswa['status_id'] . '/' . $siswa['id']); } else { $data['materi']['pembuat']['link_profil'] = site_url('siswa/detail/' . $siswa['id']); } } } else { $data['materi'] = array(); } break; } $this->twig->display('detail-materi.html', $data); }
function detail($segment_3 = '', $segment_4 = '', $segment_5 = '') { $materi_id = (int) $segment_3; if (empty($materi_id)) { show_error("Materi tidak ditemukan."); } $materi = $this->materi_model->retrieve($materi_id); if (empty($materi) or empty($materi['publish'])) { show_error("Materi tidak ditemukan."); } # tambah views jika materi terfulis if (empty($materi['file'])) { $plus_views = false; # buat session kalo sudah baca materi yan ini $session_read = $this->session->userdata('read_materi'); if (empty($session_read)) { $this->session->set_userdata(array('read_materi' => array($materi['id']))); $plus_views = true; } else { if (!in_array($materi['id'], $session_read)) { $plus_views = true; } } if ($plus_views) { $this->materi_model->plus_views($materi['id']); } } $data['materi'] = $materi; switch ($segment_4) { case 'laporkan': $komentar = $this->komentar_model->retrieve((int) $segment_5); if (empty($komentar) or $komentar['tampil'] == 0 or $komentar['materi_id'] != $materi['id']) { show_error('Komentar tidak ditemukan'); } $data['komentar'] = $komentar; $this->form_validation->set_rules('alasan', 'Alasan', 'required|trim|xss_clean'); if (!empty($_POST['alasan']) and $_POST['alasan'] == 'tulis') { $this->form_validation->set_rules('alasan_lain', 'Tulis alasan', 'required|trim|xss_clean'); } if ($this->form_validation->run() == true) { $alasan = $this->input->post('alasan', true); if ($alasan == 'tulis') { $alasan = $this->input->post('alasan_lain', true); } $unix_id = uniqid() . time(); $field_id = 'laporkan-komentar'; $retrieve_field = retrieve_field($field_id); if (empty($retrieve_field)) { create_field($field_id, 'Laporkan Komentar', json_encode(array($unix_id => array('materi_id' => $materi['id'], 'komentar_id' => $komentar['id'], 'alasan' => $alasan, 'login_id' => get_sess_data('login', 'id'), 'tgl_lapor' => date('Y-m-d H:i:s'))))); } else { $value_field = json_decode($retrieve_field['value'], 1); # cek sudah ada belum datanya $exist = false; foreach ($value_field as $val) { if ($val['materi_id'] == $materi['id'] and $val['login_id'] == get_sess_data('login', 'id') and $val['komentar_id'] == $komentar['id']) { $exist = true; } } if (!$exist) { $value_field[$unix_id] = array('materi_id' => $materi['id'], 'komentar_id' => $komentar['id'], 'alasan' => $alasan, 'login_id' => get_sess_data('login', 'id'), 'tgl_lapor' => date('Y-m-d H:i:s')); update_field($field_id, 'Laporkan Komentar', json_encode($value_field)); } } $this->session->set_flashdata('laporkan', get_alert('success', 'Laporan berhasil dikirim.')); redirect('materi/detail/' . $materi['id'] . '/laporkan/' . $komentar['id']); } $this->twig->display('laporkan-komentar.html', $data); break; default: case 'download': # jika request download if ($segment_4 == 'download' and !empty($materi['file'])) { $data_file = file_get_contents(get_path_file($materi['file'])); // Read the file's contents $name_file = $materi['file']; $this->materi_model->plus_views($materi['id']); force_download($name_file, $data_file); } # post komentar $this->form_validation->set_rules('komentar', 'Komentar', 'required|trim|xss_clean'); if ($this->form_validation->run() == true) { $komentar_id = $this->komentar_model->create(get_sess_data('login', 'id'), $materi['id'], $tampil = 1, $this->input->post('komentar', true)); redirect('materi/detail/' . $materi['id'] . '/#komentar-' . $komentar_id); } $data['materi']['download_link'] = site_url('materi/detail/' . $materi['id'] . '/download'); # ambil komentar $retrieve_all_komentar = $this->komentar_model->retrieve_all(20, (int) $segment_4, null, $materi['id'], 1); # format komentar foreach ($retrieve_all_komentar['results'] as $key => $val) { $retrieve_all_komentar['results'][$key] = $this->format_komentar($val); } $data['materi']['komentar'] = $retrieve_all_komentar['results']; $data['materi']['jml_komentar'] = $retrieve_all_komentar['total_record']; $data['materi']['komentar_pagination'] = $this->pager->view($retrieve_all_komentar, 'materi/detail/' . $materi['id'] . '/'); # cari tipenya if (empty($materi['file'])) { $type = 'tertulis'; } else { $type = 'file'; $data['materi']['file_info'] = get_file_info(get_path_file($materi['file'])); $data['materi']['file_info']['mime'] = get_mime_by_extension(get_path_file($materi['file'])); } $data['type'] = $type; $data['materi']['mapel'] = $this->mapel_model->retrieve($materi['mapel_id']); # cari materi kelas $arr_materi_kelas_id = array(); $materi_kelas = $this->materi_model->retrieve_all_kelas($materi['id']); foreach ($materi_kelas as $mk) { $arr_materi_kelas_id[] = $mk['kelas_id']; $kelas = $this->kelas_model->retrieve($mk['kelas_id']); $data['materi']['materi_kelas'][] = $kelas; } # cari pembuatnya if (!empty($materi['pengajar_id'])) { $pengajar = $this->pengajar_model->retrieve($materi['pengajar_id']); $data['materi']['pembuat'] = array('nama' => $pengajar['nama'], 'link_foto' => get_url_image_pengajar($pengajar['foto'], 'medium', $pengajar['jenis_kelamin'])); if (is_admin()) { $data['materi']['pembuat']['link_profil'] = site_url('pengajar/detail/' . $pengajar['status_id'] . '/' . $pengajar['id']); } else { $data['materi']['pembuat']['link_profil'] = site_url('pengajar/detail/' . $pengajar['id']); } } if (!empty($materi['siswa_id'])) { $siswa = $this->siswa_model->retrieve($materi['siswa_id']); $data['materi']['pembuat'] = array('nama' => $siswa['nama'], 'link_foto' => get_url_image_siswa($siswa['foto'], 'medium', $siswa['jenis_kelamin'])); if (is_admin()) { $data['materi']['pembuat']['link_profil'] = site_url('siswa/detail/' . $siswa['status_id'] . '/' . $siswa['id']); } else { $data['materi']['pembuat']['link_profil'] = site_url('siswa/detail/' . $siswa['id']); } } # cari materi terkait $retrieve_terkait_mapel = $this->materi_model->retrieve_all($no_of_records = 10, $page_no = 1, $pengajar_id = array(), $siswa_id = array(), $mapel_id = array($materi['mapel_id']), $judul = null, $konten = null, $tgl_posting = null, $publish = 1, $kelas_id = array(), $type = array(), $pagination = false); $data_terkait = array(); foreach ($retrieve_terkait_mapel as $row) { if (empty($data_terkait[$row['id']]) and $row['id'] != $materi['id'] and count($data_terkait) <= 20) { $data_terkait[$row['id']] = $row; } } $retrieve_terkait_kelas = $this->materi_model->retrieve_all($no_of_records = 10, $page_no = 1, $pengajar_id = array(), $siswa_id = array(), $mapel_id = array(), $judul = null, $konten = null, $tgl_posting = null, $publish = 1, $kelas_id = $arr_materi_kelas_id, $type = array(), $pagination = false); foreach ($retrieve_terkait_kelas as $row) { if (empty($data_terkait[$row['id']]) and $row['id'] != $materi['id'] and count($data_terkait) <= 20) { $data_terkait[$row['id']] = $row; } } $data['terkait'] = $data_terkait; # setup componen SyntaxHighlighter $html_js = load_comp_js(array(base_url('assets/comp/SyntaxHighlighter/scripts/shCore.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushAppleScript.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushAS3.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushBash.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushColdFusion.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushCpp.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushCSharp.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushCss.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushDelphi.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushDiff.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushErlang.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushGroovy.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushJava.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushJavaFX.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushJScript.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushPerl.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushPhp.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushPlain.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushPowerShell.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushPython.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushRuby.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushSass.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushScala.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushSql.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushVb.js'), base_url('assets/comp/SyntaxHighlighter/scripts/shBrushXml.js'), base_url('assets/comp/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML'))); $html_js .= '<script type="text/javascript">SyntaxHighlighter.all();</script>'; # setup tinymce komentar $tiny_option = 'theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,bullist,numlist,|,link,unlink,|,sub,sup,charmap,tiny_mce_wiris_formulaEditor,|,emotions,image,media,youtubeIframe,syntaxhl,code", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", file_browser_callback : "openKCFinder", theme_advanced_resizing : false, content_css : "' . base_url('assets/comp/tinymce/com/content.css') . '", convert_urls: false, force_br_newlines : false, force_p_newlines : false,'; $html_js .= get_tinymce('komentar', 'advanced', array('pdw'), $tiny_option); # setup colorbox $html_js .= load_comp_js(array(base_url('assets/comp/colorbox/jquery.colorbox-min.js'), base_url('assets/comp/colorbox/act-materi.js'))); $data['comp_js'] = $html_js; $data['comp_css'] = load_comp_css(array(base_url('assets/comp/SyntaxHighlighter/styles/shCoreEclipse.css'), base_url('assets/comp/colorbox/colorbox.css'))); $this->twig->display('detail-materi.html', $data); break; } }
function format_msg($retrieve) { # jika inbox yang dicari pengirimnya if ($retrieve['type_id'] == 1) { $get_user = $retrieve['sender_receiver_id']; } elseif ($retrieve['type_id'] == 2) { $get_user = $retrieve['owner_id']; } # cari sender/receiver $login = $this->login_model->retrieve($get_user); if (!empty($login['siswa_id'])) { $user = $this->siswa_model->retrieve($login['siswa_id']); if (is_admin()) { $user['link_profil'] = site_url('siswa/detail/' . $user['status_id'] . '/' . $user['id']); } else { $user['link_profil'] = site_url('siswa/detail/' . $user['id']); } $user['link_image'] = get_url_image_siswa($user['foto'], 'medium', $user['jenis_kelamin']); } elseif (!empty($login['pengajar_id'])) { $user = $this->pengajar_model->retrieve($login['pengajar_id']); if (is_admin()) { $user['link_profil'] = site_url('pengajar/detail/' . $user['status_id'] . '/' . $user['id']); } else { $user['link_profil'] = site_url('pengajar/detail/' . $user['id']); } $user['link_image'] = get_url_image_pengajar($user['foto'], 'medium', $user['jenis_kelamin']); } $retrieve['profil'] = $user; $retrieve['login'] = $login; # format tanggal, jika hari ini if (date('Y-m-d') == date('Y-m-d', strtotime($retrieve['date']))) { $retrieve['date'] = date('H:i', strtotime($retrieve['date'])); } elseif (date('Y-m-d', strtotime('-1 day', strtotime(date('Y-m-d')))) == date('Y-m-d', strtotime($retrieve['date']))) { $retrieve['date'] = date('H:i', strtotime($retrieve['date'])) . ' kemarin'; } elseif (date('Y-m-d', strtotime('-2 day', strtotime(date('Y-m-d')))) == date('Y-m-d', strtotime($retrieve['date']))) { $retrieve['date'] = date('H:i', strtotime($retrieve['date'])) . ' lusa'; } else { $retrieve['date'] = tgl_jam_indo($retrieve['date']); } return $retrieve; }
function materi($act = 'list', $segment_4 = '', $segment_5 = '', $segment_6 = '', $segment_7 = '', $segment_8 = '') { $this->must_login(); $data['web_title'] = 'Materi | Administrator'; switch ($act) { case 'detail': $content_file = 'admin_materi/detail.html'; $materi_id = (int) $segment_4; if (empty($materi_id)) { $data['error'] = "Materi tidak ditemukan"; } $materi = $this->materi_model->retrieve($materi_id); if (empty($materi) or empty($materi['publish'])) { $data['error'] = "Materi tidak ditemukan"; } switch ($segment_5) { default: case 'download': # jika request download if ($segment_5 == 'download' and !empty($materi['file'])) { $data_file = file_get_contents(get_path_file($materi['file'])); // Read the file's contents $name_file = $materi['file']; force_download($name_file, $data_file); } if (!isset($data['error'])) { $data['materi'] = $materi; $data['materi']['download_link'] = site_url('admin/materi/detail/' . $materi['id'] . '/download'); # cari tipenya if (empty($materi['file'])) { $type = 'tertulis'; } else { $type = 'file'; $data['materi']['file_info'] = get_file_info(get_path_file($materi['file'])); $data['materi']['file_info']['mime'] = get_mime_by_extension(get_path_file($materi['file'])); } $data['type'] = $type; $data['materi']['mapel'] = $this->mapel_model->retrieve($materi['mapel_id']); # cari materi kelas $materi_kelas = $this->materi_model->retrieve_all_kelas($materi['id']); foreach ($materi_kelas as $mk) { $kelas = $this->kelas_model->retrieve($mk['kelas_id']); $data['materi']['materi_kelas'][] = $kelas; } # cari pembuatnya if (!empty($materi['pengajar_id'])) { $pengajar = $this->pengajar_model->retrieve($materi['pengajar_id']); $data['materi']['pembuat'] = array('nama' => $pengajar['nama'], 'link_profil' => site_url('admin/pengajar/detail/' . $pengajar['status_id'] . '/' . $pengajar['id']), 'link_foto' => get_url_image_pengajar($pengajar['foto'], 'medium', $pengajar['jenis_kelamin'])); } if (!empty($materi['siswa_id'])) { $siswa = $this->siswa_model->retrieve($materi['siswa_id']); $data['materi']['pembuat'] = array('nama' => $siswa['nama'], 'link_profil' => site_url('admin/siswa/' . $siswa['status_id'] . '/' . $siswa['id']), 'link_foto' => get_url_image_siswa($siswa['foto'], 'medium', $siswa['jenis_kelamin'])); } } else { $data['materi'] = array(); } break; } break; case 'delete': $materi_id = (int) $segment_4; $uri_back = (string) $segment_5; if (empty($uri_back)) { $uri_back = site_url('admin/materi'); } else { $uri_back = deurl_redirect($uri_back); } $materi = $this->materi_model->retrieve($materi_id); if (empty($materi)) { redirect($uri_back); } # jika file if (!empty($materi['file']) and is_file(get_path_file($materi['file']))) { unlink(get_path_file($materi['file'])); } $this->materi_model->delete($materi['id']); $this->session->set_flashdata('materi', get_alert('success', 'Materi berhasil dihapus')); redirect($uri_back); break; case 'edit': $type = (string) strtolower($segment_4); $materi_id = (int) $segment_5; $uri_back = (string) $segment_6; if (empty($uri_back)) { $uri_back = redirect('admin/materi'); } else { $uri_back = deurl_redirect($uri_back); } $data['uri_back'] = $uri_back; if (!in_array($type, array('file', 'tertulis'))) { redirect($uri_back); } $materi = $this->materi_model->retrieve($materi_id); if (empty($materi)) { redirect($uri_back); } # hanya ambil kelas_idnya $materi_kelas = $this->materi_model->retrieve_all_kelas($materi['id']); $materi_kelas_id = array(); foreach ($materi_kelas as $r) { $materi_kelas_id[] = $r['kelas_id']; } $content_file = 'admin_materi/edit.html'; $data['module_title'] = anchor($uri_back, 'Materi') . ' / Edit Materi ' . $type; $data['type'] = $type; $data['materi'] = $materi; $data['mapel'] = $this->mapel_model->retrieve_all_mapel(); $data['kelas'] = $this->kelas_model->retrieve_all(null, array('aktif' => 1)); $data['materi_kelas'] = $materi_kelas_id; $data['comp_js'] = get_tinymce('konten'); if ($type == 'file') { $data['file_info'] = get_file_info(get_path_file($materi['file'])); $data['file_info']['mime'] = get_mime_by_extension(get_path_file($materi['file'])); } # post action $success = false; if ($type == 'tertulis') { if ($this->form_validation->run('admin/materi/edit/tertulis') == TRUE) { $mapel_id = $this->input->post('mapel_id', TRUE); $judul = $this->input->post('judul', TRUE); $konten = $this->input->post('konten', TRUE); $this->materi_model->update($materi['id'], get_sess_data('admin', 'pengajar', 'id'), null, $mapel_id, $judul, $konten, null, 1); $success = true; } } elseif ($type == 'file') { $upload_success = false; $is_new_file = false; # jika tidak ada yang diupload, file tetap sama if (empty($_FILES['userfile']['tmp_name'])) { $update_file = $materi['file']; $upload_success = true; } else { $config['upload_path'] = get_path_file(); $config['allowed_types'] = 'doc|zip|rar|txt|docx|xls|xlsx|pdf|tar|gz|jpg|jpeg|JPG|JPEG|png|ppt|pptx'; $config['max_size'] = '0'; $config['max_width'] = '0'; $config['max_height'] = '0'; $config['file_name'] = url_title($this->input->post('judul', TRUE) . '_' . time(), '_', TRUE); $this->upload->initialize($config); if ($this->upload->do_upload()) { $upload_data = $this->upload->data(); $update_file = $upload_data['file_name']; $upload_success = true; $is_new_file = true; } else { $data['error_upload'] = '<span class="text-error">' . $this->upload->display_errors() . '</span>'; } } if ($this->form_validation->run('admin/materi/edit/file') == TRUE and $upload_success == TRUE) { $mapel_id = $this->input->post('mapel_id', TRUE); $judul = $this->input->post('judul', TRUE); $this->materi_model->update($materi['id'], get_sess_data('admin', 'pengajar', 'id'), null, $mapel_id, $judul, null, $update_file, 1); if ($is_new_file) { # hapus file sebelumnya if (is_file(get_path_file($materi['file']))) { unlink(get_path_file($materi['file'])); } } $success = true; } else { if ($is_new_file == TRUE and is_file(get_path_file($update_file))) { unlink(get_path_file($update_file)); } } } if ($success) { # cari kelas materi mana yang harus ditambah / dihapus $kelas_id = $this->input->post('kelas_id', TRUE); $kelas_post_id = array(); foreach ($kelas_id as $post_kelas_id) { $post_kelas_id = (int) $post_kelas_id; if (!empty($post_kelas_id)) { $check = $this->materi_model->retrieve_kelas(null, $materi['id'], $post_kelas_id); if (empty($check)) { # tambahkan $this->materi_model->create_kelas($materi['id'], $post_kelas_id); } $kelas_post_id[] = $post_kelas_id; } } if (count($materi_kelas_id) > count($kelas_post_id)) { $diff_kelas = array_diff($materi_kelas_id, $kelas_post_id); foreach ($diff_kelas as $diff_kelas_id) { $retrieve = $this->materi_model->retrieve_kelas(null, $materi['id'], $diff_kelas_id); # hapus if (!empty($retrieve)) { $this->materi_model->delete_kelas($retrieve['id']); } } } $this->session->set_flashdata('materi', get_alert('success', 'Materi berhasil diperbaharui')); redirect($uri_back); } break; case 'add': $type = (string) strtolower($segment_4); if (!in_array($type, array('file', 'tertulis'))) { redirect('admin/materi'); } $content_file = 'admin_materi/add.html'; $data['module_title'] = anchor('admin/materi', 'Materi') . ' / Tambah Materi ' . $type; $data['type'] = $type; $data['mapel'] = $this->mapel_model->retrieve_all_mapel(); $data['kelas'] = $this->kelas_model->retrieve_all(null, array('aktif' => 1)); $data['comp_js'] = get_tinymce('konten'); $success = false; if ($type == 'tertulis') { if ($this->form_validation->run('admin/materi/add/tertulis') == TRUE) { $mapel_id = $this->input->post('mapel_id', TRUE); $judul = $this->input->post('judul', TRUE); $konten = $this->input->post('konten', TRUE); $materi_id = $this->materi_model->create(get_sess_data('admin', 'pengajar', 'id'), null, $mapel_id, $judul, $konten, null, 1); $success = true; } } elseif ($type == 'file') { $config['upload_path'] = get_path_file(); $config['allowed_types'] = 'doc|zip|rar|txt|docx|xls|xlsx|pdf|tar|gz|jpg|jpeg|JPG|JPEG|png|ppt|pptx'; $config['max_size'] = '0'; $config['max_width'] = '0'; $config['max_height'] = '0'; $config['file_name'] = url_title($this->input->post('judul', TRUE) . '_' . time(), '_', TRUE); $this->upload->initialize($config); if ($this->form_validation->run('admin/materi/add/file') == TRUE and $this->upload->do_upload()) { $mapel_id = $this->input->post('mapel_id', TRUE); $judul = $this->input->post('judul', TRUE); $upload_data = $this->upload->data(); $file = $upload_data['file_name']; $materi_id = $this->materi_model->create(get_sess_data('admin', 'pengajar', 'id'), null, $mapel_id, $judul, null, $file, 1); $success = true; } else { $upload_data = $this->upload->data(); if (!empty($upload_data) and is_file(get_path_file($upload_data['file_name']))) { unlink(get_path_file($upload_data['file_name'])); } $data['error_upload'] = '<span class="text-error">' . $this->upload->display_errors() . '</span>'; } } if ($success) { # simpan kelas materi $kelas_id = $this->input->post('kelas_id', TRUE); foreach ($kelas_id as $materi_kelas_id) { $this->materi_model->create_kelas($materi_id, $materi_kelas_id); } $this->session->set_flashdata('materi', get_alert('success', 'Materi berhasil ditambah')); if (!empty($materi_id)) { redirect('admin/materi/edit/' . $type . '/' . $materi_id); } else { redirect('admin/materi'); } } break; default: case 'list': $content_file = 'admin_materi/list.html'; $data['module_title'] = 'Materi'; $page_no = (int) $segment_4; if (empty($page_no)) { $page_no = 1; } # jika ada post filter if ($this->form_validation->run('admin/materi/filter') == true) { $pengajar = $this->input->post('pengajar', TRUE); $siswa = $this->input->post('siswa', TRUE); # cari id pengajar $pengajar_id = array(); if (!empty($pengajar)) { foreach ($this->pengajar_model->retrieve_all_by_name($pengajar) as $val) { $pengajar_id[] = $val['id']; } } # cari id siswa $siswa_id = array(); if (!empty($siswa)) { foreach ($this->siswa_model->retrieve_all_by_name($siswa) as $val) { $siswa_id[] = $val['id']; } } $filter = array('judul' => $this->input->post('judul', true), 'konten' => $this->input->post('konten', true), 'pengajar_id' => $pengajar_id, 'pengajar' => $pengajar, 'siswa_id' => $siswa_id, 'siswa' => $siswa, 'mapel_id' => $this->input->post('mapel_id', true), 'kelas_id' => $this->input->post('kelas_id', true), 'type' => $this->input->post('type', true)); $this->session->set_userdata('filter_materi', $filter); } $filter = $this->session->userdata('filter_materi'); if (empty($filter)) { $filter = array('judul' => '', 'konten' => '', 'pengajar_id' => array(), 'pengajar' => '', 'siswa_id' => array(), 'siswa' => '', 'mapel_id' => array(), 'kelas_id' => array(), 'type' => array()); } $data['filter'] = $filter; # ambil semua data materi $retrieve_all_materi = $this->materi_model->retrieve_all(50, $page_no, $filter['pengajar_id'], $filter['siswa_id'], $filter['mapel_id'], $filter['judul'], $filter['konten'], $tgl_posting = null, $publish = 1, $filter['kelas_id'], $filter['type']); # format array data $results = array(); foreach ($retrieve_all_materi['results'] as $key => $val) { # cari pembuatnya if (!empty($val['pengajar_id'])) { $pengajar = $this->pengajar_model->retrieve($val['pengajar_id']); $val['pembuat'] = $pengajar; $val['pembuat']['link_profil'] = site_url('admin/pengajar/detail/' . $pengajar['status_id'] . '/' . $pengajar['id']); } if (!empty($val['siswa_id'])) { $siswa = $this->siswa_model->retrieve($val['siswa_id']); $val['pembuat'] = $siswa; $val['pembuat']['link_profil'] = site_url('admin/siswa/detail/' . $siswa['status_id'] . '/' . $siswa['id']); } # cari materi kelas $materi_kelas = $this->materi_model->retrieve_all_kelas($val['id']); foreach ($materi_kelas as $mk) { $kelas = $this->kelas_model->retrieve($mk['kelas_id']); $val['materi_kelas'][] = $kelas; } # cari matapelajarannya $val['mapel'] = $this->mapel_model->retrieve($val['mapel_id']); $results[$key] = $val; } $data['materi'] = $results; $data['pagination'] = $this->pager->view($retrieve_all_materi, 'admin/materi/list/' . $page_no . '/'); $data['kelas'] = $this->kelas_model->retrieve_all(null, array('aktif' => 1)); $data['mapel'] = $this->mapel_model->retrieve_all_mapel(); break; } $data = array_merge(default_parser_item(), $data); $this->twig->display($content_file, $data); }
public function block_content($context, array $blocks = array()) { // line 8 echo "<div class=\"module\">\n <div class=\"module-head\">\n <h3>Pencarian</h3>\n </div>\n <div class=\"module-body\">\n <div class=\"well well-small\" style=\"box-shadow: none;\">\n Hasil pencarian dengan kata kunci : <b>"; // line 14 echo twig_escape_filter($this->env, isset($context["keyword"]) ? $context["keyword"] : null, "html", null, true); echo "</b>\n </div>\n\n "; // line 17 if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "siswa"))) { // line 18 echo " <b><i class=\"icon-group\"></i> Siswa </b>(ditemukan "; echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "siswa")), "html", null, true); echo " record)\n <table class=\"table table-condensed table-striped\">\n "; // line 20 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "siswa")); foreach ($context['_seq'] as $context["_key"] => $context["v"]) { // line 21 echo " <tr>\n <td>\n <img style=\"height:30px;width:30px; margin-right: 10px;\" class=\"img-polaroid img-circle pull-left\" src=\""; // line 23 echo twig_escape_filter($this->env, get_url_image_siswa($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "foto"), "medium", $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "jenis_kelamin")), "html", null, true); echo "\">\n <b>"; // line 24 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nama"), "html", null, true); echo " "; echo !twig_test_empty($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nis")) ? "<span class=\"text-muted\">(" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nis") . ")</span>" : ""; echo "</b>\n <br>"; // line 25 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") != 3 ? $this->getAttribute($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "kelas_aktif"), "nama") . " , " : "", "html", null, true); echo " "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "jenis_kelamin"), "html", null, true); echo " , "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "agama"), "html", null, true); echo "\n </td>\n <td width=\"20%\">\n <ul class=\"nav nav-pills\" style=\"margin-bottom:0px;\">\n "; // line 29 if (is_admin()) { // line 30 echo " <li><a class=\"btn btn-default btn-small\" href=\""; echo twig_escape_filter($this->env, site_url("siswa/detail/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "html", null, true); echo "\"><i class=\"icon-zoom-in\"></i> Detail</a></li>\n <li class=\"dropdown\">\n <a class=\"btn btn-default btn-small\" href=\"#\" id=\"act-"; // line 32 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><i class=\"icon-edit\"></i> Edit <b class=\"caret\" style=\"margin-top:5px;\"></b></a>\n <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"act-"; // line 33 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\">\n <li>"; // line 34 echo anchor("siswa/edit_profile/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Profil", array("class" => "iframe-4", "title" => "Edit Profil Siswa")); echo "</li>\n <li>"; // line 35 echo anchor("siswa/edit_picture/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Foto", array("class" => "iframe-5", "title" => "Edit Foto Siswa")); echo "</li>\n "; // line 36 if ($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") != 3) { // line 37 echo " <li>"; echo anchor("siswa/moved_class/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Kelas Aktif", array("class" => "iframe-kelas-aktif", "title" => "Edit Kelas Aktif")); echo "</li>\n "; } // line 39 echo " <li>"; echo anchor("siswa/edit_username/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Username", array("class" => "iframe-2", "title" => "Edit Username Siswa")); echo "</li>\n <li>"; // line 40 echo anchor("siswa/edit_password/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Password", array("class" => "iframe-3", "title" => "Edit Password Siswa")); echo "</li>\n </ul>\n </li>\n "; } else { // line 44 echo " <li><a class=\"btn btn-default btn-small\" href=\""; echo twig_escape_filter($this->env, site_url("siswa/detail/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "html", null, true); echo "\"><i class=\"icon-zoom-in\"></i> Detail</a></li>\n "; } // line 46 echo " </ul>\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['v'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 50 echo " </table>\n <br>\n "; } // line 53 echo "\n "; // line 54 if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengajar"))) { // line 55 echo " <b><i class=\"icon-user\"></i> Pengajar </b>(ditemukan "; echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengajar")), "html", null, true); echo " record)\n <table class=\"table table-condensed table-striped\">\n "; // line 57 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengajar")); foreach ($context['_seq'] as $context["no"] => $context["v"]) { // line 58 echo " <tr>\n <td>\n <img style=\"height:30px;width:30px; margin-right: 10px;\" class=\"img-polaroid img-circle pull-left\" src=\""; // line 60 echo twig_escape_filter($this->env, get_url_image_pengajar($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "foto"), "medium", $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "jenis_kelamin")), "html", null, true); echo "\">\n <b>"; // line 61 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nama"), "html", null, true); echo " "; echo !twig_test_empty($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nip")) ? "<span class=\"text-muted\">(" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nip") . ")</span>" : ""; echo "</b>\n "; // line 62 $context["is_admin"] = get_row_data("login_model", "retrieve", array(0 => null, 1 => null, 2 => null, 3 => null, 4 => $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "is_admin"); // line 63 echo " "; if ((isset($context["is_admin"]) ? $context["is_admin"] : null) == 1) { // line 64 echo " <span class=\"label label-warning\">Administrator</span>\n "; } // line 66 echo " <br><b>Alamat :</b> "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "alamat"), "html", null, true); echo "\n </td>\n <td width=\"20%\">\n <ul class=\"nav nav-pills\" style=\"margin-bottom:0px;\">\n "; // line 70 if (is_admin() == true) { // line 71 echo " <li><a class=\"btn btn-default btn-small\" href=\""; echo twig_escape_filter($this->env, site_url("pengajar/detail/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "html", null, true); echo "\"><i class=\"icon-zoom-in\"></i> Detail</a></li>\n <li class=\"dropdown\">\n <a class=\"btn btn-default btn-small\" href=\"#\" id=\"act-"; // line 73 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><i class=\"icon-edit\"></i> Edit <b class=\"caret\" style=\"margin-top:5px;\"></b></a>\n <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"act-"; // line 74 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\">\n <li>"; // line 75 echo anchor("pengajar/edit_profile/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Profil", array("class" => "iframe-4", "title" => "Edit Profil Pengajar")); echo "</li>\n <li>"; // line 76 echo anchor("pengajar/edit_picture/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Foto", array("class" => "iframe-5", "title" => "Edit Foto Pengajar")); echo "</li>\n <li>"; // line 77 echo anchor("pengajar/edit_username/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Username", array("class" => "iframe-2", "title" => "Edit Username Pengajar")); echo "</li>\n <li>"; // line 78 echo anchor("pengajar/edit_password/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Password", array("class" => "iframe-3", "title" => "Edit Password Pengajar")); echo "</li>\n </ul>\n </li>\n "; } else { // line 82 echo " <li><a class=\"btn btn-default btn-small\" href=\""; echo twig_escape_filter($this->env, site_url("pengajar/detail/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "html", null, true); echo "\"><i class=\"icon-zoom-in\"></i> Detail</a></li>\n "; } // line 84 echo " </ul>\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['no'], $context['v'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 88 echo " </table>\n <br>\n "; } // line 91 echo "\n "; // line 92 if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "materi"))) { // line 93 echo " <b><i class=\"icon-book\"></i> Materi </b>(ditemukan "; echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "materi")), "html", null, true); echo " record)\n <table class=\"table table-condensed table-striped\">\n "; // line 95 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "materi")); foreach ($context['_seq'] as $context["_key"] => $context["m"]) { // line 96 echo " "; if (is_admin() == true) { // line 97 echo " "; $context["action_edit"] = true; // line 98 echo " "; $context["action_delete"] = true; // line 99 echo " "; } elseif (is_pengajar() == true) { // line 100 echo " "; if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "pengajar_id") == get_sess_data("user", "id")) { // line 101 echo " "; $context["action_edit"] = true; // line 102 echo " "; $context["action_delete"] = true; // line 103 echo " "; } else { // line 104 echo " "; $context["action_edit"] = false; // line 105 echo " "; $context["action_delete"] = false; // line 106 echo " "; } // line 107 echo " "; } // line 108 echo "\n "; // line 109 if (is_siswa()) { // line 110 echo " <tr>\n <td>\n <a href=\""; // line 112 echo twig_escape_filter($this->env, site_url("materi/detail/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id")), "html", null, true); echo "\" target=\"_tab\">"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true); echo "</a>\n </td>\n </tr>\n "; } else { // line 116 echo " <tr>\n <td>\n "; // line 118 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true); echo "\n </td>\n <td width=\"20%\">\n <div class=\"btn-group\">\n "; // line 122 if (!twig_test_empty($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "file"))) { // line 123 echo " "; $context["url_type"] = "file"; // line 124 echo " "; } else { // line 125 echo " "; $context["url_type"] = "tertulis"; // line 126 echo " "; } // line 127 echo " "; echo anchor("materi/detail/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-zoom-in\"></i> Detail", array("class" => "btn btn-default btn-small", "target" => "_tab")); echo "\n\n "; // line 129 if ((isset($context["action_edit"]) ? $context["action_edit"] : null) == true) { // line 130 echo " "; echo anchor("materi/edit/" . (isset($context["url_type"]) ? $context["url_type"] : null) . "/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url() . "?q=" . (isset($context["keyword"]) ? $context["keyword"] : null)), "<i class=\"icon-edit\"></i> Edit", array("class" => "btn btn-default btn-small")); echo "\n "; } // line 132 echo "\n "; // line 133 if ((isset($context["action_delete"]) ? $context["action_delete"] : null) == true) { // line 134 echo " "; echo anchor("materi/delete/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url() . "?q=" . (isset($context["keyword"]) ? $context["keyword"] : null)), "<i class=\"icon-trash\"></i> Hapus", array("class" => "btn btn-default btn-small", "onclick" => "return confirm('Anda yakin ingin menghapus?')")); echo "\n "; } // line 136 echo " </div>\n </td>\n </tr>\n "; } // line 140 echo " "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 141 echo " </table>\n <br>\n "; } // line 144 echo "\n "; // line 145 if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "tugas"))) { // line 146 echo " <b><i class=\"icon-tasks\"></i> Tugas </b>(ditemukan "; echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "tugas")), "html", null, true); echo " record)\n <table class=\"table table-condensed table-striped\">\n "; // line 148 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "tugas")); foreach ($context['_seq'] as $context["no"] => $context["m"]) { // line 149 echo " "; if (is_admin() || is_pengajar()) { // line 150 echo " <tr>\n <td>\n "; // line 152 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true); echo "\n </td>\n <td width=\"20%\">\n <div class=\"btn-group\">\n "; // line 156 if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Ganda" || $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Essay") { // line 157 echo " "; echo anchor("tugas/manajemen_soal/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon icon-tasks\"></i> Soal", array("class" => "btn btn-primary btn-small")); echo "\n "; } // line 159 echo " "; if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") == 0) { // line 160 echo " "; echo anchor("tugas/terbitkan/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url() . "?q=" . (isset($context["keyword"]) ? $context["keyword"] : null)), "<i class=\"icon-ok\"></i> Terbitkan", array("class" => "btn btn-success btn-small")); echo "\n "; } elseif ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") == 1) { // line 162 echo " "; echo anchor("tugas/tutup/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url() . "?q=" . (isset($context["keyword"]) ? $context["keyword"] : null)), "<i class=\"icon-minus\"></i> Tutup", array("class" => "btn btn-danger btn-small")); echo "\n "; } // line 164 echo "\n "; // line 165 echo anchor("tugas/edit/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url() . "?q=" . (isset($context["keyword"]) ? $context["keyword"] : null)), "<i class=\"icon-edit\"></i> Edit", array("class" => "btn btn-default btn-small")); echo "\n "; // line 166 if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_id") == 3) { // line 167 echo " "; echo anchor("tugas/nilai/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-eye-open\"></i> Lihat Nilai", array("class" => "btn btn-info btn-small")); echo "\n "; } else { // line 169 echo " "; echo anchor("tugas/koreksi/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-check\"></i> Koreksi", array("class" => "btn btn-info btn-small")); echo "\n "; } // line 171 echo " </div>\n </td>\n </tr>\n "; } else { // line 175 echo " <tr>\n <td>\n <a href=\""; // line 177 echo twig_escape_filter($this->env, site_url("tugas?judul=" . urlencode($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"))), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true); echo "</a>\n </td>\n </tr>\n "; } // line 181 echo " "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['no'], $context['m'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 182 echo " </table><br>\n "; } // line 184 echo "\n "; // line 185 if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pesan"))) { // line 186 echo " <b><i class=\"icon-comments\"></i> Pesan </b>(ditemukan "; echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pesan")), "html", null, true); echo " record)\n <div class=\"message\">\n <table class=\"table table-message\">\n <tbody>\n "; // line 190 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pesan")); foreach ($context['_seq'] as $context["_key"] => $context["d"]) { // line 191 echo " <tr class=\""; echo $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "opened") == 0 ? "unread" : ""; echo " clickable-row\" data-href=\""; echo twig_escape_filter($this->env, site_url("message/detail/" . $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "id") . "#msg-" . $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "id")), "html", null, true); echo "\">\n <td class=\"cell-author\">\n <img style=\"height:30px;width:30px; margin-right: 10px;\" class=\"img-polaroid img-circle pull-left\" src=\""; // line 193 echo twig_escape_filter($this->env, get_url_image_siswa($this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "profil"), "foto"), "medium", $this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "profil"), "jenis_kelamin")), "html", null, true); echo "\">\n <a href=\""; // line 194 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "profil"), "link_profil"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, character_limiter($this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "profil"), "nama"), 23, "..."), "html", null, true); echo "</a>\n <br><small>"; // line 195 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "date"), "html", null, true); echo "</small>\n </td>\n <td class=\"cell-title hidden-phone hidden-tablet\">\n <a class=\"pull-right\" style=\"margin-left:10px;\" href=\""; // line 198 echo twig_escape_filter($this->env, site_url("message/detail/" . $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "id") . "/?confirm=1#confirm"), "html", null, true); echo "\"><i class=\"icon-trash\"></i></a>\n "; // line 199 if (!twig_test_empty($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "receiver"))) { // line 200 echo " <div>To <a href=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "receiver"), "link_profil"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "receiver"), "nama"), "html", null, true); echo "</a></div>\n "; } // line 202 echo " "; echo character_limiter(strip_tags($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "content")), 80, "..."); echo "\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['d'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 206 echo " </tbody>\n </table>\n <div>\n <br>\n "; } // line 211 echo "\n "; // line 212 if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengumuman"))) { // line 213 echo " <b><i class=\"icon-bullhorn\"></i> Pengumuman </b>(ditemukan "; echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengumuman")), "html", null, true); echo " record)\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th width=\"5%\">ID</th>\n <th>Judul</th>\n <th width=\"17%\">Tgl. Tampil</th>\n <th width=\"17%\">Tgl. Tutup</th>\n <th width=\"15%\"></th>\n </tr>\n </thead>\n <tbody>\n "; // line 225 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengumuman")); foreach ($context['_seq'] as $context["_key"] => $context["p"]) { // line 226 echo " <tr>\n <td><b>"; // line 227 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id"), "html", null, true); echo "</b></td>\n <td><a href=\""; // line 228 echo twig_escape_filter($this->env, site_url("pengumuman/detail/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true); echo "\"><b>"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "judul"), "html", null, true); echo "</b></a></td>\n <td>"; // line 229 echo twig_escape_filter($this->env, tgl_indo($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "tgl_tampil")), "html", null, true); echo "</td>\n <td>"; // line 230 echo twig_escape_filter($this->env, tgl_indo($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "tgl_tutup")), "html", null, true); echo "</td>\n <td>\n <div class=\"btn-group\">\n "; // line 233 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "allow_action")); foreach ($context['_seq'] as $context["_key"] => $context["a"]) { // line 234 echo " "; if ((isset($context["a"]) ? $context["a"] : null) == "detail") { // line 235 echo " <a class=\"btn btn-default btn-small\" href=\""; echo twig_escape_filter($this->env, site_url("pengumuman/detail/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true); echo "\" data-toggle=\"tooltip\" title=\"Detail\"><i class=\"icon-zoom-in\"></i></a>\n "; } // line 237 echo "\n "; // line 238 if ((isset($context["a"]) ? $context["a"] : null) == "edit") { // line 239 echo " <a class=\"btn btn-default btn-small\" href=\""; echo twig_escape_filter($this->env, site_url("pengumuman/edit/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true); echo "\" data-toggle=\"tooltip\" title=\"Edit\"><i class=\"icon-edit\"></i></a>\n "; } // line 241 echo "\n "; // line 242 if ((isset($context["a"]) ? $context["a"] : null) == "delete") { // line 243 echo " <a onclick=\"return confirm('Anda yakin ingin menghapus?')\" class=\"btn btn-default btn-small\" href=\""; echo twig_escape_filter($this->env, site_url("pengumuman/delete/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true); echo "\" data-toggle=\"tooltip\" title=\"Edit\"><i class=\"icon-trash\"></i></a>\n "; } // line 245 echo " "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['a'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 246 echo " </div>\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['p'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 250 echo " </tbody>\n </table>\n <br>\n "; } // line 254 echo "\n </div>\n</div>\n"; }
/** * Method untuk mendapatkan link foto pengajar/admin/siswa ketika sudah login * * @param string $img * @param string $size * @param string $jk * @return string url */ function get_url_image_session($img = '', $size = 'medium', $jk = 'Laki-laki') { if (is_pengajar() or is_admin()) { return get_url_image_pengajar($img, $size, $jk); } elseif (is_siswa()) { return get_url_image_siswa($img, $size, $jk); } }
public function block_content($context, array $blocks = array()) { // line 8 echo "<div class=\"module\">\n <div class=\"module-head\">\n "; // line 10 if (is_admin()) { // line 11 echo " <h3>"; echo anchor("siswa/index/" . (isset($context["status_id"]) ? $context["status_id"] : null), "Data Siswa"); echo " / Detail Siswa</h3>\n "; } else { // line 13 echo " <h3>"; echo anchor("siswa/filter", "Filter Siswa"); echo " / Detail Siswa</h3>\n "; } // line 15 echo " </div>\n <div class=\"module-body\">\n "; // line 17 echo get_flashdata("siswa"); echo "\n\n "; // line 19 if ($this->getAttribute(isset($context["siswa_login"]) ? $context["siswa_login"] : null, "id") != get_sess_data("login", "id")) { // line 20 echo " <div class=\"row-fluid\">\n <div class=\"span4\">\n <div class=\"btn-group\">\n <a class=\"btn btn-default btn-sm\" href=\""; // line 23 echo twig_escape_filter($this->env, site_url("message/to/siswa/" . $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "id")), "html", null, true); echo "\"><i class=\"icon-comments\"></i> Kirim Pesan</a>\n </div>\n </div>\n </div>\n <br>\n "; } // line 29 echo "\n <div class=\"panel panel-default\">\n <div class=\"panel-heading\">\n <strong>Profil Siswa</strong>\n "; // line 33 if (is_admin()) { // line 34 echo " <div class=\"btn-group pull-right\" style=\"margin-top:-4px;\">\n "; // line 35 echo anchor("siswa/edit_profile/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "id"), "Edit Profil", array("class" => "iframe-4 btn btn-small btn-primary", "title" => "Edit Profil Siswa")); echo "\n "; // line 36 echo anchor("siswa/edit_picture/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "id"), "Edit Foto", array("class" => "iframe-5 btn btn-small btn-primary", "title" => "Edit Foto Siswa")); echo "\n </div>\n "; } // line 39 echo " </div>\n <div class=\"panel-body\">\n <table class=\"table\">\n <tr>\n <th bgcolor=\"#FBFBFB\" width=\"25%\" style=\"border-top: 0px;\">NIS</th>\n <td style=\"border-top: 0px;\">"; // line 44 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "nis"), "html", null, true); echo "</td>\n <td rowspan=\"5\" width=\"15%\" style=\"border-top: 0px;\">\n <img style=\"width:113px;\" class=\"img-polaroid\" src=\""; // line 46 echo twig_escape_filter($this->env, get_url_image_siswa($this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "foto"), "medium", $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "jenis_kelamin")), "html", null, true); echo "\">\n </td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Nama</th>\n <td>"; // line 51 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "nama"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Jenis Kelamin</th>\n <td>"; // line 55 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "jenis_kelamin"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Tahun Masuk</th>\n <td colspan=\"2\">"; // line 59 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "tahun_masuk"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Tempat Lahir</th>\n <td>"; // line 63 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "tempat_lahir"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Tanggal Lahir</th>\n <td>"; // line 67 echo twig_escape_filter($this->env, !twig_test_empty($this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "tgl_lahir")) ? tgl_indo($this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "tgl_lahir")) : "", "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Agama</th>\n <td colspan=\"2\">"; // line 71 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "agama"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Alamat</th>\n <td colspan=\"2\">"; // line 75 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "alamat"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Status</th>\n <td colspan=\"2\">\n "; // line 80 if ($this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "status_id") == 0) { // line 81 echo " Pending\n "; } elseif ($this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "status_id") == 1) { // line 83 echo " Aktif\n "; } elseif ($this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "status_id") == 2) { // line 85 echo " Blocking\n "; } elseif ($this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "status_id") == 3) { // line 87 echo " Alumni\n "; } // line 89 echo " </td>\n </tr>\n </table>\n </div>\n </div>\n\n <div class=\"row-fluid\">\n <div class=\"span6\">\n <div class=\"panel panel-default\" id=\"riwayat-kelas\">\n <div class=\"panel-heading\">\n <strong>Riwayat Kelas</strong>\n "; // line 100 if (is_admin() && (isset($context["status_id"]) ? $context["status_id"] : null) != 3) { // line 101 echo " <div class=\"btn-group pull-right\" style=\"margin-top:-4px;\">\n "; // line 102 echo anchor("siswa/moved_class/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "id"), "Pindah Kelas", array("class" => "iframe btn btn-small btn-primary", "title" => "Pindah siswa ke Kelas lain")); echo "\n </div>\n "; } // line 105 echo " </div>\n <div class=\"panel-body\">\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th width=\"5%\">No</th>\n <th>Kelas</th>\n "; // line 112 if ((isset($context["status_id"]) ? $context["status_id"] : null) != 3) { // line 113 echo " <th>Aktif</th>\n "; } // line 115 echo " </tr>\n </thead>\n <tbody>\n "; // line 118 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["siswa_kelas"]) ? $context["siswa_kelas"] : null, "results")); foreach ($context['_seq'] as $context["no"] => $context["v"]) { // line 119 echo " <tr>\n <td>"; // line 120 echo twig_escape_filter($this->env, isset($context["no"]) ? $context["no"] : null, "html", null, true); echo ".</td>\n <td>\n "; // line 122 echo twig_escape_filter($this->env, get_row_data("kelas_model", "retrieve", array(0 => $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "kelas_id"), 1 => true), "nama"), "html", null, true); echo "\n </td>\n "; // line 124 if ((isset($context["status_id"]) ? $context["status_id"] : null) != 3) { // line 125 echo " <td>\n "; // line 126 if ($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "aktif") == 1) { // line 127 echo " <i class=\"icon icon-ok\"></i>\n "; } // line 129 echo " </td>\n "; } // line 131 echo " </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['no'], $context['v'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 133 echo " </tbody>\n </table>\n </div>\n </div>\n </div>\n "; // line 138 if (is_admin()) { // line 139 echo " <div class=\"span6\">\n <div class=\"panel panel-default\" id=\"akun\">\n <div class=\"panel-heading\">\n <strong>Akun Login</strong>\n <div class=\"btn-group pull-right\" style=\"margin-top:-4px;\">\n "; // line 144 echo anchor("siswa/edit_username/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "id"), "Edit Username", array("class" => "iframe-2 btn btn-small btn-primary", "title" => "Edit Username Siswa")); echo "\n "; // line 145 echo anchor("siswa/edit_password/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "id"), "Edit Password", array("class" => "iframe-3 btn btn-small btn-primary", "title" => "Edit Password Siswa")); echo "\n </div>\n </div>\n <div class=\"panel-body\">\n <table class=\"table\">\n <tbody>\n <tr>\n <th width=\"30%\" bgcolor=\"#FBFBFB\" style=\"border-top: 0px;\">Username</th>\n <td style=\"border-top: 0px;\">\n "; // line 154 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["siswa_login"]) ? $context["siswa_login"] : null, "username"), "html", null, true); echo "\n </td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Password</th>\n <td>\n *********\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n "; } // line 169 echo " </div>\n\n </div>\n</div>\n"; }
public function block_content($context, array $blocks = array()) { // line 8 echo "<div class=\"module\">\n <div class=\"module-head\">\n <h3>Data Siswa</h3>\n </div>\n <div class=\"module-body\">\n "; // line 13 echo get_flashdata("siswa"); echo "\n\n <div class=\"row-fluid\">\n <div class=\"span7\">\n <a href=\""; // line 17 echo twig_escape_filter($this->env, site_url("siswa/add/" . (isset($context["status_id"]) ? $context["status_id"] : null)), "html", null, true); echo "\" class=\"btn btn-primary\">Tambah Siswa</a>\n </div>\n\n <div class=\"span5\">\n <div class=\"btn-group\">\n "; // line 22 echo anchor("siswa/index/1", "Aktif", array("class" => (isset($context["status_id"]) ? $context["status_id"] : null) == 1 ? "btn btn-info" : "btn btn-default")); echo "\n "; // line 23 echo anchor("siswa/index/0", "Pending", array("class" => (isset($context["status_id"]) ? $context["status_id"] : null) == 0 ? "btn btn-info" : "btn btn-default")); echo "\n "; // line 24 echo anchor("siswa/index/2", "Blocking", array("class" => (isset($context["status_id"]) ? $context["status_id"] : null) == 2 ? "btn btn-info" : "btn btn-default")); echo "\n "; // line 25 echo anchor("siswa/index/3", "Alumni", array("class" => (isset($context["status_id"]) ? $context["status_id"] : null) == 3 ? "btn btn-info" : "btn btn-default")); echo "\n "; // line 26 echo anchor("siswa/filter", "<i class=\"icon-search\" style=\"line-height: 0px;\"></i> Filter", array("class" => "btn btn-default")); echo "\n </div>\n </div>\n </div>\n <br>\n\n "; // line 32 echo form_open("siswa/index/" . (isset($context["status_id"]) ? $context["status_id"] : null)); echo "\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th width=\"7%\">\n "; // line 37 if ((isset($context["status_id"]) ? $context["status_id"] : null) == 0 || (isset($context["status_id"]) ? $context["status_id"] : null) == 2) { // line 38 echo " <input type=\"checkbox\" style=\"margin-top:-2px;\" onclick=\"ch_uch_checkbox(this)\">\n "; } // line 40 echo " ID\n </th>\n <th>Informasi Siswa</th>\n <th width=\"22%\"></th>\n </tr>\n </thead>\n <tbody>\n "; // line 47 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["siswas"]) ? $context["siswas"] : null); foreach ($context['_seq'] as $context["no"] => $context["v"]) { // line 48 echo " <tr>\n <td>\n "; // line 50 if ((isset($context["status_id"]) ? $context["status_id"] : null) == 0 || (isset($context["status_id"]) ? $context["status_id"] : null) == 2) { // line 51 echo " <input type=\"checkbox\" name=\"siswa_id[]\" value=\""; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\" style=\"margin-top:-2px;\">\n "; } // line 53 echo " <b>"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "</b>\n </td>\n <td>\n <img style=\"height:40px;width:40px; margin-right: 10px;\" class=\"img-polaroid img-circle pull-left\" src=\""; // line 56 echo twig_escape_filter($this->env, get_url_image_siswa($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "foto"), "medium", $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "jenis_kelamin")), "html", null, true); echo "\">\n <b>"; // line 57 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nama"), "html", null, true); echo " "; echo !twig_test_empty($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nis")) ? "<span class=\"text-muted\">(" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nis") . ")</span>" : ""; echo "</b>\n <br>"; // line 58 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") != 3 ? $this->getAttribute($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "kelas_aktif"), "nama") . " , " : "", "html", null, true); echo " "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "jenis_kelamin"), "html", null, true); echo " , "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "agama"), "html", null, true); echo "\n </td>\n <td>\n <ul class=\"nav nav-pills\" style=\"margin-bottom:0px;\">\n <li><a class=\"btn btn-default btn-small\" href=\""; // line 62 echo twig_escape_filter($this->env, site_url("siswa/detail/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "html", null, true); echo "\"><i class=\"icon-zoom-in\"></i> Detail</a></li>\n <li class=\"dropdown\">\n <a class=\"btn btn-default btn-small\" href=\"#\" id=\"act-"; // line 64 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><i class=\"icon-edit\"></i> Edit <b class=\"caret\" style=\"margin-top:5px;\"></b></a>\n <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"act-"; // line 65 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\">\n <li>"; // line 66 echo anchor("siswa/edit_profile/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Profil", array("class" => "iframe-4", "title" => "Edit Profil Siswa")); echo "</li>\n <li>"; // line 67 echo anchor("siswa/edit_picture/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Foto", array("class" => "iframe-5", "title" => "Edit Foto Siswa")); echo "</li>\n "; // line 68 if ((isset($context["status_id"]) ? $context["status_id"] : null) != 3) { // line 69 echo " <li>"; echo anchor("siswa/moved_class/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Kelas Aktif", array("class" => "iframe", "title" => "Edit Kelas Aktif")); echo "</li>\n "; } // line 71 echo " <li>"; echo anchor("siswa/edit_username/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Username", array("class" => "iframe-2", "title" => "Edit Username Siswa")); echo "</li>\n <li>"; // line 72 echo anchor("siswa/edit_password/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Password", array("class" => "iframe-3", "title" => "Edit Password Siswa")); echo "</li>\n </ul>\n </li>\n </ul>\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['no'], $context['v'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 79 echo " </tbody>\n </table>\n\n "; // line 82 if (!twig_test_empty(isset($context["siswas"]) ? $context["siswas"] : null) && ((isset($context["status_id"]) ? $context["status_id"] : null) == 0 || (isset($context["status_id"]) ? $context["status_id"] : null) == 2)) { // line 83 echo " <br>\n <div class=\"row-fluid\">\n <div class=\"span7\">\n <table cellpadding=\"5\">\n <tr>\n <th valign=\"top\">Update Status Terpilih</th>\n <td valign=\"top\">\n <select name=\"status_id\" style=\"width:100%;\">\n <option>--Pilih Status--</option>\n <option value=\"1\">Aktif</option>\n "; // line 93 if ((isset($context["status_id"]) ? $context["status_id"] : null) == 0) { // line 94 echo " <option value=\"2\">Blocking</option>\n "; } elseif ((isset($context["status_id"]) ? $context["status_id"] : null) == 2) { // line 96 echo " <option value=\"3\">Alumni</option>\n "; } // line 98 echo " </select>\n </td>\n <td valign=\"top\">\n <button type=\"submit\" class=\"btn\">Update</button>\n </td>\n </tr>\n </table>\n </div>\n </div>\n "; } // line 108 echo "\n "; // line 109 echo form_close(); echo "\n\n <br>\n "; // line 112 echo isset($context["pagination"]) ? $context["pagination"] : null; echo "\n\n </div>\n</div>\n"; }
public function block_content($context, array $blocks = array()) { // line 4 echo "<div class=\"module\">\n <div class=\"module-head\">\n <h3>"; // line 6 echo isset($context["module_title"]) ? $context["module_title"] : null; echo "</h3>\n </div>\n <div class=\"module-body\">\n "; // line 9 echo get_flashdata("siswa"); echo "\n\n <div class=\"row-fluid\">\n <div class=\"span7\">\n <a href=\""; // line 13 echo twig_escape_filter($this->env, site_url("admin/siswa/add/1"), "html", null, true); echo "\" class=\"btn btn-primary\">Tambah Siswa</a>\n </div>\n\n <div class=\"span5\">\n <div class=\"btn-group\">\n "; // line 18 echo anchor("admin/siswa/list/1", "Aktif", array("class" => "btn btn-default")); echo "\n "; // line 19 echo anchor("admin/siswa/list/0", "Pending", array("class" => "btn btn-default")); echo "\n "; // line 20 echo anchor("admin/siswa/list/2", "Blocking", array("class" => "btn btn-default")); echo "\n "; // line 21 echo anchor("admin/siswa/list/3", "Alumni", array("class" => "btn btn-default")); echo "\n "; // line 22 echo anchor("admin/siswa/filter", "<i class=\"icon-search\" style=\"line-height: 0px;\"></i> Filter", array("class" => "btn btn-info")); echo "\n </div>\n </div>\n </div>\n\n <br>\n\n <div class=\"bs-callout bs-callout-info\">\n <b><a id=\"button\" href=\"javascript:void(0)\">PARAMETER PENCARIAN</a></b>\n "; // line 31 echo form_open("admin/siswa/filter"); echo "\n <table class=\"table table-condensed\" id=\"form-search\">\n <tr>\n <th width=\"20%\">NIS</th>\n <td>\n <input type=\"text\" name=\"nis\" class=\"span2\" style=\"margin-bottom:0px;\" value=\""; // line 36 echo twig_escape_filter($this->env, set_value("nis", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "nis", array(), "any", true, true) ? $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "nis") : ""), "html", null, true); echo "\">\n </td>\n </tr>\n <tr>\n <th>Nama</th>\n <td>\n <input type=\"text\" name=\"nama\" class=\"span4\" style=\"margin-bottom:0px;\" value=\""; // line 42 echo twig_escape_filter($this->env, set_value("nama", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "nama", array(), "any", true, true) ? $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "nama") : ""), "html", null, true); echo "\">\n </td>\n </tr>\n <tr>\n <th>Jenis Kelamin</th>\n <td>\n <p style=\"margin-top:0px; margin-bottom:5px;\">\n <label class=\"checkbox inline\">\n <input type=\"checkbox\" name=\"jenis_kelamin[]\" value=\"Laki-laki\" "; // line 50 echo twig_escape_filter($this->env, set_checkbox("jenis_kelamin[]", "Laki-laki", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "jenis_kelamin", array(), "any", true, true) && twig_in_filter("Laki-laki", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "jenis_kelamin")) ? true : false), "html", null, true); echo "> Laki-laki\n </label>\n <label class=\"checkbox inline\">\n <input type=\"checkbox\" name=\"jenis_kelamin[]\" value=\"Perempuan\" "; // line 53 echo twig_escape_filter($this->env, set_checkbox("jenis_kelamin[]", "Perempuan", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "jenis_kelamin", array(), "any", true, true) && twig_in_filter("Perempuan", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "jenis_kelamin")) ? true : false), "html", null, true); echo "> Perempuan\n </label>\n </p>\n </td>\n <tr>\n <tr>\n <th>Tahun Masuk</th>\n <td>\n <input type=\"text\" name=\"tahun_masuk\" maxlength=\"4\" style=\"width:15%;margin-bottom:0px;\" value=\""; // line 61 echo twig_escape_filter($this->env, set_value("tahun_masuk", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "tahun_masuk", array(), "any", true, true) ? $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "tahun_masuk") : ""), "html", null, true); echo "\">\n </td>\n <tr>\n <tr>\n <th>Tempat Lahir</th>\n <td>\n <input type=\"text\" name=\"tempat_lahir\" class=\"span3\" style=\"margin-bottom:0px;\" value=\""; // line 67 echo twig_escape_filter($this->env, set_value("tempat_lahir", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "tempat_lahir", array(), "any", true, true) ? $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "tempat_lahir") : ""), "html", null, true); echo "\">\n </td>\n <tr>\n <tr>\n <th>Tanggal Lahir</th>\n <td>\n <select class=\"span2\" style=\"width: 10%;\" name=\"tgl_lahir\">\n <option value=\"\">Tgl</option>\n "; // line 75 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(range(1, 31)); foreach ($context['_seq'] as $context["_key"] => $context["i"]) { // line 76 echo " <option value=\""; echo twig_escape_filter($this->env, isset($context["i"]) ? $context["i"] : null, "html", null, true); echo "\" "; echo twig_escape_filter($this->env, set_select("tgl_lahir", isset($context["i"]) ? $context["i"] : null, $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "tgl_lahir", array(), "any", true, true) && (isset($context["i"]) ? $context["i"] : null) == $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "tgl_lahir") ? true : false), "html", null, true); echo ">"; echo twig_escape_filter($this->env, isset($context["i"]) ? $context["i"] : null, "html", null, true); echo "</option>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 78 echo " </select>\n <select class=\"span2\" style=\"width: 17%;\" name=\"bln_lahir\">\n <option value=\"\">Bulan</option>\n "; // line 81 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(range(1, 12)); foreach ($context['_seq'] as $context["_key"] => $context["i"]) { // line 82 echo " <option value=\""; echo twig_escape_filter($this->env, isset($context["i"]) ? $context["i"] : null, "html", null, true); echo "\" "; echo twig_escape_filter($this->env, set_select("bln_lahir", isset($context["i"]) ? $context["i"] : null, $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "bln_lahir", array(), "any", true, true) && (isset($context["i"]) ? $context["i"] : null) == $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "bln_lahir") ? true : false), "html", null, true); echo ">"; echo twig_escape_filter($this->env, get_indo_bulan(isset($context["i"]) ? $context["i"] : null), "html", null, true); echo "</option>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 84 echo " </select>\n <input type=\"text\" name=\"thn_lahir\" class=\"span1\" maxlength=\"4\" value=\""; // line 85 echo twig_escape_filter($this->env, set_value("thn_lahir", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "thn_lahir", array(), "any", true, true) ? $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "thn_lahir") : ""), "html", null, true); echo "\" placeholder=\"Tahun\">\n </td>\n <tr>\n <tr>\n <th>Alamat</th>\n <td>\n <input type=\"text\" name=\"alamat\" class=\"span4\" style=\"margin-bottom:0px;\" value=\""; // line 91 echo twig_escape_filter($this->env, set_value("alamat", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "alamat", array(), "any", true, true) ? $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "alamat") : ""), "html", null, true); echo "\">\n </td>\n <tr>\n <tr>\n <th>Agama</th>\n <td>\n <p style=\"margin-top:0px; margin-bottom:5px;\">\n <label class=\"checkbox inline\"><input type=\"checkbox\" name=\"agama[]\" value=\"ISLAM\" "; // line 98 echo twig_escape_filter($this->env, set_checkbox("agama[]", "ISLAM", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "agama", array(), "any", true, true) && twig_in_filter("ISLAM", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "agama")) ? true : false), "html", null, true); echo ">ISLAM</label>\n <label class=\"checkbox inline\"><input type=\"checkbox\" name=\"agama[]\" value=\"KRISTEN\" "; // line 99 echo twig_escape_filter($this->env, set_checkbox("agama[]", "KRISTEN", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "agama", array(), "any", true, true) && twig_in_filter("KRISTEN", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "agama")) ? true : false), "html", null, true); echo ">KRISTEN</label>\n <label class=\"checkbox inline\"><input type=\"checkbox\" name=\"agama[]\" value=\"KATOLIK\" "; // line 100 echo twig_escape_filter($this->env, set_checkbox("agama[]", "KATOLIK", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "agama", array(), "any", true, true) && twig_in_filter("KATOLIK", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "agama")) ? true : false), "html", null, true); echo ">KATOLIK</label>\n <label class=\"checkbox inline\"><input type=\"checkbox\" name=\"agama[]\" value=\"HINDU\" "; // line 101 echo twig_escape_filter($this->env, set_checkbox("agama[]", "HINDU", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "agama", array(), "any", true, true) && twig_in_filter("HINDU", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "agama")) ? true : false), "html", null, true); echo ">HINDU</label>\n <label class=\"checkbox inline\"><input type=\"checkbox\" name=\"agama[]\" value=\"BUDHA\" "; // line 102 echo twig_escape_filter($this->env, set_checkbox("agama[]", "BUDHA", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "agama", array(), "any", true, true) && twig_in_filter("BUDHA", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "agama")) ? true : false), "html", null, true); echo ">BUDHA</label>\n </p>\n </td>\n <tr>\n <tr>\n <th>Kelas</th>\n <td>\n <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n "; // line 110 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["kelas_all"]) ? $context["kelas_all"] : null); foreach ($context['_seq'] as $context["_key"] => $context["k"]) { // line 111 echo " <li><label class=\"checkbox inline\"><input type=\"checkbox\" name=\"kelas_id[]\" value=\""; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), "html", null, true); echo "\" "; echo twig_escape_filter($this->env, set_checkbox("kelas_id[]", $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "kelas_id", array(), "any", true, true) && twig_in_filter($this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "kelas_id")) ? true : false), "html", null, true); echo ">"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "nama"), "html", null, true); echo "</label></li>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['k'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 113 echo " </ul>\n </td>\n <tr>\n <tr>\n <th>Status</th>\n <td>\n <p style=\"margin-top:0px; margin-bottom:5px;\">\n <label class=\"checkbox inline\"><input type=\"checkbox\" name=\"status_id[]\" value=\"0\" "; // line 120 echo twig_escape_filter($this->env, set_checkbox("status_id[]", "0", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status_id", array(), "any", true, true) && twig_in_filter(0, $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status_id")) ? true : false), "html", null, true); echo "> Pending</label>\n <label class=\"checkbox inline\"><input type=\"checkbox\" name=\"status_id[]\" value=\"1\" "; // line 121 echo twig_escape_filter($this->env, set_checkbox("status_id[]", "1", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status_id", array(), "any", true, true) && twig_in_filter(1, $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status_id")) ? true : false), "html", null, true); echo "> Aktif</label>\n <label class=\"checkbox inline\"><input type=\"checkbox\" name=\"status_id[]\" value=\"2\" "; // line 122 echo twig_escape_filter($this->env, set_checkbox("status_id[]", "2", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status_id", array(), "any", true, true) && twig_in_filter(2, $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status_id")) ? true : false), "html", null, true); echo "> Blocking</label>\n <label class=\"checkbox inline\"><input type=\"checkbox\" name=\"status_id[]\" value=\"3\" "; // line 123 echo twig_escape_filter($this->env, set_checkbox("status_id[]", "3", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status_id", array(), "any", true, true) && twig_in_filter(3, $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status_id")) ? true : false), "html", null, true); echo "> Alumni</label>\n </p>\n </td>\n <tr>\n <tr>\n <th>Username</th>\n <td>\n <input type=\"text\" name=\"username\" class=\"span3\" style=\"margin-bottom:0px;\" value=\""; // line 130 echo twig_escape_filter($this->env, set_value("username", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "username", array(), "any", true, true) ? $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "username") : ""), "html", null, true); echo "\">\n </td>\n </tr>\n <tr>\n <td></td>\n <td>\n <button type=\"submit\" class=\"btn btn-primary\">Filter</button>\n </td>\n </tr>\n </table>\n "; // line 140 echo form_close(); echo "\n </div>\n\n <br>\n\n "; // line 145 echo form_open("admin/siswa/filter_action"); echo "\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th width=\"7%\">\n <input type=\"checkbox\" style=\"margin-top:-2px;\" onclick=\"ch_uch_checkbox(this)\">\n No\n </th>\n <th colspan=\"2\">Nis</th>\n <th>Nama</th>\n <th width=\"15%\">Kelas</th>\n <th width=\"10%\">Status</th>\n <th width=\"22%\"></th>\n </tr>\n </thead>\n <tbody>\n "; // line 161 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["siswas"]) ? $context["siswas"] : null); foreach ($context['_seq'] as $context["no"] => $context["v"]) { // line 162 echo " <tr>\n <td>\n <input type=\"checkbox\" name=\"siswa_id[]\" value=\""; // line 164 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\" style=\"margin-top:-2px;\" "; echo $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") == 3 ? "disabled" : ""; echo ">\n "; // line 165 echo twig_escape_filter($this->env, isset($context["no"]) ? $context["no"] : null, "html", null, true); echo ".\n </td>\n <td width=\"5%\">\n <img style=\"height:30px;width:27px;\" class=\"img-polaroid\" src=\""; // line 168 echo twig_escape_filter($this->env, get_url_image_siswa($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "foto"), "small", $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "jenis_kelamin")), "html", null, true); echo "\">\n </td>\n <td>\n "; // line 171 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nis"), "html", null, true); echo "\n </td>\n <td>\n "; // line 174 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nama"), "html", null, true); echo "\n </td>\n <td>\n "; // line 177 $context["kelas_aktif"] = get_row_data("kelas_model", "retrieve_siswa", array(0 => null, 1 => array("siswa_id" => $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "aktif" => "1"))); // line 178 echo " "; echo twig_escape_filter($this->env, get_row_data("kelas_model", "retrieve", array(0 => $this->getAttribute(isset($context["kelas_aktif"]) ? $context["kelas_aktif"] : null, "kelas_id"), 1 => true), "nama"), "html", null, true); echo "\n </td>\n <td>\n "; // line 181 if ($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") == 0) { // line 182 echo " Pending\n "; } elseif ($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") == 1) { // line 184 echo " Aktif\n "; } elseif ($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") == 2) { // line 186 echo " Blocking\n "; } elseif ($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") == 3) { // line 188 echo " Alumni\n "; } // line 190 echo " </td>\n <td>\n <ul class=\"nav nav-pills\" style=\"margin-bottom:0px;\">\n <li><a class=\"btn btn-default btn-small\" href=\""; // line 193 echo twig_escape_filter($this->env, site_url("admin/siswa/detail/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "html", null, true); echo "\"><i class=\"icon-zoom-in\"></i> Detail</a></li>\n <li class=\"dropdown\">\n <a class=\"btn btn-default btn-small\" href=\"#\" id=\"act-"; // line 195 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><i class=\"icon-edit\"></i> Edit <b class=\"caret\" style=\"margin-top:5px;\"></b></a>\n <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"act-"; // line 196 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\">\n <li>"; // line 197 echo anchor("admin/siswa/edit_profile/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Profil", array("class" => "iframe-4", "title" => "Edit Profil Siswa")); echo "</li>\n <li>"; // line 198 echo anchor("admin/siswa/edit_picture/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Foto", array("class" => "iframe-5", "title" => "Edit Foto Siswa")); echo "</li>\n "; // line 199 if ($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") != 3) { // line 200 echo " <li>"; echo anchor("admin/siswa/moved_class/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Kelas Aktif", array("class" => "iframe", "title" => "Edit Kelas Aktif")); echo "</li>\n "; } // line 202 echo " <li>"; echo anchor("admin/siswa/edit_username/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Username", array("class" => "iframe-2", "title" => "Edit Username Siswa")); echo "</li>\n <li>"; // line 203 echo anchor("admin/siswa/edit_password/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Password", array("class" => "iframe-3", "title" => "Edit Password Siswa")); echo "</li>\n </ul>\n </li>\n </ul>\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['no'], $context['v'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 210 echo " </tbody>\n </table>\n\n "; // line 213 if (!twig_test_empty(isset($context["siswas"]) ? $context["siswas"] : null)) { // line 214 echo " <br>\n <div class=\"row-fluid\">\n <div class=\"span8\">\n <table cellpadding=\"5\">\n <tr>\n <th valign=\"top\">Aksi Terpilih</th>\n <td valign=\"top\">\n <select name=\"status_id\" style=\"width:auto;\">\n <option value=\"\">--Update Status--</option>\n <option value=\"1\">Aktif</option>\n <option value=\"2\">Blocking</option>\n <option value=\"3\">Alumni</option>\n </select>\n </td>\n <td valign=\"top\">\n <select name=\"kelas_id\" style=\"width:auto;\">\n <option value=\"\">--Pindah Kelas--</option>\n "; // line 231 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["kelas"]) ? $context["kelas"] : null); foreach ($context['_seq'] as $context["_key"] => $context["k"]) { // line 232 echo " <option value=\""; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "nama"), "html", null, true); echo "</option>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['k'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 234 echo " </select>\n </td>\n <td valign=\"top\">\n <button type=\"submit\" class=\"btn btn-primary\">Update</button>\n </td>\n </tr>\n </table>\n </div>\n </div>\n "; } // line 244 echo "\n "; // line 245 echo form_close(); echo "\n\n <br>\n "; // line 248 echo isset($context["pagination"]) ? $context["pagination"] : null; echo "\n\n </div>\n</div>\n"; }
/** * Method untuk mendapatkan data yang sedang login berdasarkan login_id * * @param integer $login_id * @return array */ function get_user_data($login_id) { # cari sender/receiver $login = $this->login_model->retrieve($login_id); if (!empty($login['siswa_id'])) { $user = $this->siswa_model->retrieve($login['siswa_id']); if (is_admin()) { $user['link_profil'] = site_url('siswa/detail/' . $user['status_id'] . '/' . $user['id']); } else { $user['link_profil'] = site_url('siswa/detail/' . $user['id']); } $user['link_image'] = get_url_image_siswa($user['foto'], 'medium', $user['jenis_kelamin']); } elseif (!empty($login['pengajar_id'])) { $user = $this->pengajar_model->retrieve($login['pengajar_id']); if (is_admin()) { $user['link_profil'] = site_url('pengajar/detail/' . $user['status_id'] . '/' . $user['id']); } else { $user['link_profil'] = site_url('pengajar/detail/' . $user['id']); } $user['link_image'] = get_url_image_pengajar($user['foto'], 'medium', $user['jenis_kelamin']); } return $user; }
function post_data($page) { switch ($page) { case 'hirarki_kelas': $o = 1; foreach ((array) $_POST['list'] as $id => $parent_id) { if (!is_numeric($parent_id)) { $parent_id = null; } $retrieve = $this->kelas_model->retrieve($id, true); # update $this->kelas_model->update($id, $retrieve['nama'], $parent_id, $o, $retrieve['aktif']); $o++; } break; case 'get_subkelas': $parent_id = $this->input->post('parent_kelas_id', true); if (!empty($parent_id)) { echo '<option value="">--pilih--</option>'; $subkelas = $this->kelas_model->retrieve_all($parent_id, array('aktif' => 1)); foreach ($subkelas as $sub) { echo '<option value="' . $sub['id'] . '">' . $sub['nama'] . '</option>'; } } break; case 'mapel_kelas': $kelas_id = $this->input->post('kelas_id', TRUE); echo '<option value="">Pilih Matapelajaran</option>'; $retrieve_all = $this->mapel_model->retrieve_all_kelas(null, $kelas_id, 1); foreach ($retrieve_all as $v) { $m = $this->mapel_model->retrieve($v['mapel_id']); if (empty($m)) { continue; } echo '<option value="' . $v['id'] . '">' . $m['nama'] . '</option>'; } break; case 'update_jawaban_ganda': if (!is_siswa()) { exit('Akses ditolak'); } $tugas_id = (int) $this->input->post('tugas_id', true); $pertanyaan_id = (int) $this->input->post('pertanyaan_id', true); $pilihan_id = (int) $this->input->post('pilihan_id', true); $tugas = $this->tugas_model->retrieve($tugas_id); if (empty($tugas)) { exit('Akses ditolak'); } $pertanyaan = $this->tugas_model->retrieve_pertanyaan($pertanyaan_id); if (empty($pertanyaan)) { exit('Akses ditolak'); } if ($pertanyaan['tugas_id'] != $tugas['id']) { exit('Akses ditolak'); } $pilihan = $this->tugas_model->retrieve_pilihan($pilihan_id, $pertanyaan['id']); if (empty($pilihan)) { exit('Akses ditolak'); } $table_name = 'field_tambahan'; $field_id = 'mengerjakan-' . get_sess_data('user', 'id') . '-' . $tugas['id']; $field_name = 'Mengerjakan Tugas'; $check_field = retrieve_field($field_id); if (empty($check_field)) { exit('Akses ditolak'); } # update index jawaban $field_value = json_decode($check_field['value'], 1); $field_value['jawaban'][$pertanyaan['id']] = $pilihan['id']; update_field($field_id, $field_name, json_encode($field_value)); break; case 'update_jawaban_essay': if (!is_siswa()) { exit('Akses ditolak'); } $tugas_id = (int) $this->input->post('tugas_id', true); $pertanyaan_id = (int) $this->input->post('pertanyaan_id', true); $jawaban = $this->input->post('jawaban', true); $tugas = $this->tugas_model->retrieve($tugas_id); if (empty($tugas)) { exit('Akses ditolak'); } $pertanyaan = $this->tugas_model->retrieve_pertanyaan($pertanyaan_id); if (empty($pertanyaan)) { exit('Akses ditolak'); } if ($pertanyaan['tugas_id'] != $tugas['id']) { exit('Akses ditolak'); } $table_name = 'field_tambahan'; $field_id = 'mengerjakan-' . get_sess_data('user', 'id') . '-' . $tugas['id']; $field_name = 'Mengerjakan Tugas'; $check_field = retrieve_field($field_id); if (empty($check_field)) { exit('Akses ditolak'); } # update index jawaban $field_value = json_decode($check_field['value'], 1); $field_value['jawaban'][$pertanyaan['id']] = $jawaban; update_field($field_id, $field_name, json_encode($field_value)); break; case 'new_msg': $active_msg_id = $this->input->post('active_msg_id', true); $active_msg_id = (int) $active_msg_id; if (empty($active_msg_id)) { echo ''; } $msg = $this->msg_model->retrieve(get_sess_data('login', 'id'), $active_msg_id, false, false); if (empty($msg)) { echo ''; } $msg = $msg['retrieve']; $this->db->where('owner_id', get_sess_data('login', 'id')); $this->db->where('opened', '0'); $this->db->where_in('sender_receiver_id', array(get_sess_data('login', 'id'), $msg['sender_receiver_id'])); $this->db->order_by('id', 'ASC'); $results = $this->db->get('messages'); foreach ($results->result_array() as $retrieve) { $this->msg_model->update_read($retrieve['id']); # jika inbox yang dicari pengirimnya if ($retrieve['type_id'] == 1) { $get_user = $retrieve['sender_receiver_id']; } elseif ($retrieve['type_id'] == 2) { $get_user = $retrieve['owner_id']; } # cari sender/receiver $login = $this->login_model->retrieve($get_user); if (!empty($login['siswa_id'])) { $user = $this->siswa_model->retrieve($login['siswa_id']); if (is_admin()) { $user['link_profil'] = site_url('siswa/detail/' . $user['status_id'] . '/' . $user['id']); } else { $user['link_profil'] = site_url('siswa/detail/' . $user['id']); } $user['link_image'] = get_url_image_siswa($user['foto'], 'medium', $user['jenis_kelamin']); } elseif (!empty($login['pengajar_id'])) { $user = $this->pengajar_model->retrieve($login['pengajar_id']); if (is_admin()) { $user['link_profil'] = site_url('pengajar/detail/' . $user['status_id'] . '/' . $user['id']); } else { $user['link_profil'] = site_url('pengajar/detail/' . $user['id']); } $user['link_image'] = get_url_image_pengajar($user['foto'], 'medium', $user['jenis_kelamin']); } # format tanggal, jika hari ini if (date('Y-m-d') == date('Y-m-d', strtotime($retrieve['date']))) { $retrieve['date'] = date('H:i', strtotime($retrieve['date'])); } elseif (date('Y-m-d', strtotime('-1 day', strtotime(date('Y-m-d')))) == date('Y-m-d', strtotime($retrieve['date']))) { $retrieve['date'] = date('H:i', strtotime($retrieve['date'])) . ' kemarin'; } elseif (date('Y-m-d', strtotime('-2 day', strtotime(date('Y-m-d')))) == date('Y-m-d', strtotime($retrieve['date']))) { $retrieve['date'] = date('H:i', strtotime($retrieve['date'])) . ' lusa'; } else { $retrieve['date'] = tgl_jam_indo($retrieve['date']); } ?> <tr id="msg-<?php echo $val['id']; ?> "> <td class="user flag-new"> <img class="img-user img-polaroid img-circle pull-left" src="<?php echo $user['link_image']; ?> "> <a href="{{ n.profil.link_profil }}"><?php echo character_limiter($user['nama'], 23, '...'); ?> </a> <br><small><?php echo $retrieve['date']; ?> </small> </td> <td class="msg-content"> <a class="pull-right" style="margin-left:10px;" href="<?php echo site_url('message/del/' . $retrieve['id'] . '/' . $msg['id']); ?> " onclick="return confirm('Anda yakin ingin menghapus?')"><i class="icon-trash"></i></a> <?php echo html_entity_decode($retrieve['content']); ?> </td> </tr> <?php } break; } }
public function block_content($context, array $blocks = array()) { // line 4 echo "<div class=\"module\">\n <div class=\"module-head\">\n <h3>"; // line 6 echo isset($context["module_title"]) ? $context["module_title"] : null; echo "</h3>\n </div>\n <div class=\"module-body\">\n "; // line 9 echo get_flashdata("siswa"); echo "\n\n <div class=\"row-fluid\">\n <div class=\"span7\">\n <a href=\""; // line 13 echo twig_escape_filter($this->env, site_url("admin/siswa/add/" . (isset($context["status_id"]) ? $context["status_id"] : null)), "html", null, true); echo "\" class=\"btn btn-primary\">Tambah Siswa</a>\n </div>\n\n <div class=\"span5\">\n <div class=\"btn-group\">\n "; // line 18 echo anchor("admin/siswa/list/1", "Aktif", array("class" => (isset($context["status_id"]) ? $context["status_id"] : null) == 1 ? "btn btn-info" : "btn btn-default")); echo "\n "; // line 19 echo anchor("admin/siswa/list/0", "Pending", array("class" => (isset($context["status_id"]) ? $context["status_id"] : null) == 0 ? "btn btn-info" : "btn btn-default")); echo "\n "; // line 20 echo anchor("admin/siswa/list/2", "Blocking", array("class" => (isset($context["status_id"]) ? $context["status_id"] : null) == 2 ? "btn btn-info" : "btn btn-default")); echo "\n "; // line 21 echo anchor("admin/siswa/list/3", "Alumni", array("class" => (isset($context["status_id"]) ? $context["status_id"] : null) == 3 ? "btn btn-info" : "btn btn-default")); echo "\n "; // line 22 echo anchor("admin/siswa/filter", "<i class=\"icon-search\" style=\"line-height: 0px;\"></i> Filter", array("class" => "btn btn-default")); echo "\n </div>\n </div>\n </div>\n <br>\n "; // line 27 if ((isset($context["status_id"]) ? $context["status_id"] : null) == 1) { // line 28 echo " <p><b>Note: </b> Siswa tidak dapat dihapus namun dapat di ubah menjadi blocking.</p>\n "; } // line 30 echo "\n "; // line 31 echo form_open("admin/siswa/list" . (isset($context["status_id"]) ? $context["status_id"] : null)); echo "\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th width=\"7%\">\n "; // line 36 if ((isset($context["status_id"]) ? $context["status_id"] : null) == 0 || (isset($context["status_id"]) ? $context["status_id"] : null) == 2) { // line 37 echo " <input type=\"checkbox\" style=\"margin-top:-2px;\" onclick=\"ch_uch_checkbox(this)\">\n "; } // line 39 echo " No\n </th>\n <th colspan=\"2\">Nis</th>\n <th>Nama</th>\n <th width=\"15%\">Kelas</th>\n <th width=\"22%\"></th>\n </tr>\n </thead>\n <tbody>\n "; // line 48 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["siswas"]) ? $context["siswas"] : null); foreach ($context['_seq'] as $context["no"] => $context["v"]) { // line 49 echo " <tr>\n <td>\n "; // line 51 if ((isset($context["status_id"]) ? $context["status_id"] : null) == 0 || (isset($context["status_id"]) ? $context["status_id"] : null) == 2) { // line 52 echo " <input type=\"checkbox\" name=\"siswa_id[]\" value=\""; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\" style=\"margin-top:-2px;\">\n "; } // line 54 echo " "; echo twig_escape_filter($this->env, isset($context["no"]) ? $context["no"] : null, "html", null, true); echo ".\n </td>\n <td width=\"5%\">\n <img style=\"height:30px;width:27px;\" class=\"img-polaroid\" src=\""; // line 57 echo twig_escape_filter($this->env, get_url_image_siswa($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "foto"), "small", $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "jenis_kelamin")), "html", null, true); echo "\">\n </td>\n <td>\n "; // line 60 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nis"), "html", null, true); echo "\n </td>\n <td>\n "; // line 63 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nama"), "html", null, true); echo "\n </td>\n <td>\n "; // line 66 $context["kelas_aktif"] = get_row_data("kelas_model", "retrieve_siswa", array(0 => null, 1 => array("siswa_id" => $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "aktif" => "1"))); // line 67 echo " "; echo twig_escape_filter($this->env, get_row_data("kelas_model", "retrieve", array(0 => $this->getAttribute(isset($context["kelas_aktif"]) ? $context["kelas_aktif"] : null, "kelas_id"), 1 => true), "nama"), "html", null, true); echo "\n </td>\n <td>\n <ul class=\"nav nav-pills\" style=\"margin-bottom:0px;\">\n <li><a class=\"btn btn-default btn-small\" href=\""; // line 71 echo twig_escape_filter($this->env, site_url("admin/siswa/detail/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "html", null, true); echo "\"><i class=\"icon-zoom-in\"></i> Detail</a></li>\n <li class=\"dropdown\">\n <a class=\"btn btn-default btn-small\" href=\"#\" id=\"act-"; // line 73 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><i class=\"icon-edit\"></i> Edit <b class=\"caret\" style=\"margin-top:5px;\"></b></a>\n <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"act-"; // line 74 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\">\n <li>"; // line 75 echo anchor("admin/siswa/edit_profile/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Profil", array("class" => "iframe-4", "title" => "Edit Profil Siswa")); echo "</li>\n <li>"; // line 76 echo anchor("admin/siswa/edit_picture/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Foto", array("class" => "iframe-5", "title" => "Edit Foto Siswa")); echo "</li>\n "; // line 77 if ((isset($context["status_id"]) ? $context["status_id"] : null) != 3) { // line 78 echo " <li>"; echo anchor("admin/siswa/moved_class/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Kelas Aktif", array("class" => "iframe", "title" => "Edit Kelas Aktif")); echo "</li>\n "; } // line 80 echo " <li>"; echo anchor("admin/siswa/edit_username/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Username", array("class" => "iframe-2", "title" => "Edit Username Siswa")); echo "</li>\n <li>"; // line 81 echo anchor("admin/siswa/edit_password/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Password", array("class" => "iframe-3", "title" => "Edit Password Siswa")); echo "</li>\n </ul>\n </li>\n </ul>\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['no'], $context['v'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 88 echo " </tbody>\n </table>\n\n "; // line 91 if (!twig_test_empty(isset($context["siswas"]) ? $context["siswas"] : null) && ((isset($context["status_id"]) ? $context["status_id"] : null) == 0 || (isset($context["status_id"]) ? $context["status_id"] : null) == 2)) { // line 92 echo " <br>\n <div class=\"row-fluid\">\n <div class=\"span7\">\n <table cellpadding=\"5\">\n <tr>\n <th valign=\"top\">Update Status Terpilih</th>\n <td valign=\"top\">\n <select name=\"status_id\" style=\"width:100%;\">\n <option>--Pilih Status--</option>\n <option value=\"1\">Aktif</option>\n "; // line 102 if ((isset($context["status_id"]) ? $context["status_id"] : null) == 0) { // line 103 echo " <option value=\"2\">Blocking</option>\n "; } elseif ((isset($context["status_id"]) ? $context["status_id"] : null) == 2) { // line 105 echo " <option value=\"3\">Alumni</option>\n "; } // line 107 echo " </select>\n </td>\n <td valign=\"top\">\n <button type=\"submit\" class=\"btn\">Update</button>\n </td>\n </tr>\n </table>\n </div>\n </div>\n "; } // line 117 echo "\n "; // line 118 echo form_close(); echo "\n\n <br>\n "; // line 121 echo isset($context["pagination"]) ? $context["pagination"] : null; echo "\n\n </div>\n</div>\n"; }
public function block_content($context, array $blocks = array()) { // line 8 echo "<div class=\"panel panel-default\">\n <div class=\"panel-heading\">\n <strong>Profil Publik</strong>\n <div class=\"btn-group pull-right\" style=\"margin-top:-4px;\">\n "; // line 12 echo anchor("siswa/edit_profile/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "id"), "Edit Profil", array("class" => "iframe-4 btn btn-small btn-primary", "title" => "Edit Profil Siswa")); echo "\n "; // line 13 echo anchor("siswa/edit_picture/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "id"), "Edit Foto", array("class" => "iframe-5 btn btn-small btn-primary", "title" => "Edit Foto Siswa")); echo "\n </div>\n </div>\n <div class=\"panel-body\">\n <table class=\"table\">\n <tr>\n <th bgcolor=\"#FBFBFB\" width=\"25%\" style=\"border-top: 0px;\">NIS</th>\n <td style=\"border-top: 0px;\">"; // line 20 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "nis"), "html", null, true); echo "</td>\n <td rowspan=\"5\" width=\"15%\" style=\"border-top: 0px;\">\n <img style=\"width:113px;\" class=\"img-polaroid\" src=\""; // line 22 echo twig_escape_filter($this->env, get_url_image_siswa($this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "foto"), "medium", $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "jenis_kelamin")), "html", null, true); echo "\">\n </td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Nama</th>\n <td>"; // line 27 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "nama"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Jenis Kelamin</th>\n <td>"; // line 31 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "jenis_kelamin"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Tahun Masuk</th>\n <td colspan=\"2\">"; // line 35 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "tahun_masuk"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Tempat Lahir</th>\n <td>"; // line 39 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "tempat_lahir"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Tanggal Lahir</th>\n <td>"; // line 43 echo twig_escape_filter($this->env, !twig_test_empty($this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "tgl_lahir")) ? tgl_indo($this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "tgl_lahir")) : "", "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Agama</th>\n <td colspan=\"2\">"; // line 47 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "agama"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Alamat</th>\n <td colspan=\"2\">"; // line 51 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "alamat"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Status</th>\n <td colspan=\"2\">\n "; // line 56 if ($this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "status_id") == 0) { // line 57 echo " Pending\n "; } elseif ($this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "status_id") == 1) { // line 59 echo " Aktif\n "; } elseif ($this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "status_id") == 2) { // line 61 echo " Blocking\n "; } elseif ($this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "status_id") == 3) { // line 63 echo " Alumni\n "; } // line 65 echo " </td>\n </tr>\n </table>\n </div>\n</div>\n\n<div class=\"row-fluid\">\n <div class=\"span6\">\n <div class=\"panel panel-default\" id=\"riwayat-kelas\">\n <div class=\"panel-heading\">\n <strong>Riwayat Kelas</strong>\n </div>\n <div class=\"panel-body\">\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th width=\"5%\">No</th>\n <th>Kelas</th>\n "; // line 83 if ((isset($context["status_id"]) ? $context["status_id"] : null) != 3) { // line 84 echo " <th>Aktif</th>\n "; } // line 86 echo " </tr>\n </thead>\n <tbody>\n "; // line 89 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["siswa_kelas"]) ? $context["siswa_kelas"] : null, "results")); foreach ($context['_seq'] as $context["no"] => $context["v"]) { // line 90 echo " <tr>\n <td>"; // line 91 echo twig_escape_filter($this->env, isset($context["no"]) ? $context["no"] : null, "html", null, true); echo ".</td>\n <td>\n "; // line 93 echo twig_escape_filter($this->env, get_row_data("kelas_model", "retrieve", array(0 => $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "kelas_id"), 1 => true), "nama"), "html", null, true); echo "\n </td>\n "; // line 95 if ((isset($context["status_id"]) ? $context["status_id"] : null) != 3) { // line 96 echo " <td>\n "; // line 97 if ($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "aktif") == 1) { // line 98 echo " <i class=\"icon icon-ok\"></i>\n "; } // line 100 echo " </td>\n "; } // line 102 echo " </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['no'], $context['v'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 104 echo " </tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"span6\">\n <div class=\"panel panel-default\" id=\"akun\">\n <div class=\"panel-heading\">\n <strong>Akun Login</strong>\n <div class=\"btn-group pull-right\" style=\"margin-top:-4px;\">\n "; // line 114 echo anchor("siswa/edit_username/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "id"), "Edit Username", array("class" => "iframe-2 btn btn-small btn-primary", "title" => "Edit Username Siswa")); echo "\n "; // line 115 echo anchor("siswa/edit_password/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "id"), "Edit Password", array("class" => "iframe-3 btn btn-small btn-primary", "title" => "Edit Password Siswa")); echo "\n </div>\n </div>\n <div class=\"panel-body\">\n <table class=\"table\">\n <tbody>\n <tr>\n <th width=\"30%\" bgcolor=\"#FBFBFB\" style=\"border-top: 0px;\">Username</th>\n <td style=\"border-top: 0px;\">\n "; // line 124 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["siswa_login"]) ? $context["siswa_login"] : null, "username"), "html", null, true); echo "\n </td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Password</th>\n <td>\n *********\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n</div>\n"; }
public function block_content($context, array $blocks = array()) { // line 4 echo "<strong>Edit Foto <span class=\"text-error\">*</span></strong>\n"; // line 5 echo get_flashdata("edit"); echo "\n\n"; // line 7 echo form_open_multipart("admin/siswa/edit_picture/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . (isset($context["siswa_id"]) ? $context["siswa_id"] : null)); echo "\n<table class=\"table table-striped\">\n <tbody>\n <tr>\n <td>\n <img class=\"img-polaroid\" src=\""; // line 12 echo twig_escape_filter($this->env, get_url_image_siswa($this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "foto"), "medium", $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "jenis_kelamin")), "html", null, true); echo "\">\n </td>\n <td>\n <input type=\"file\" name=\"userfile\" class=\"btn btn-small\" style=\"max-width:190px;\">\n "; // line 16 echo !twig_test_empty(isset($context["error_upload"]) ? $context["error_upload"] : null) ? isset($context["error_upload"]) ? $context["error_upload"] : null : ""; echo "\n </td>\n <tr>\n <tr>\n <td colspan=\"2\">\n <button type=\"submit\" class=\"btn btn-primary\">Update</button>\n </td>\n </tr>\n </tbody>\n</table>\n"; // line 26 echo form_close(); echo "\n"; }