• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP is_pengajar函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中is_pengajar函数的典型用法代码示例。如果您正苦于以下问题:PHP is_pengajar函数的具体用法?PHP is_pengajar怎么用?PHP is_pengajar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了is_pengajar函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: pp

 function pp()
 {
     must_login();
     if (is_pengajar()) {
         # panggil colorbox
         $html_js = load_comp_js(array(base_url('assets/comp/colorbox/jquery.colorbox-min.js'), base_url('assets/comp/colorbox/act-pengajar.js')));
         $data['comp_js'] = $html_js;
         $data['comp_css'] = load_comp_css(array(base_url('assets/comp/colorbox/colorbox.css')));
         $data['pengajar'] = $this->pengajar_model->retrieve(get_sess_data('user', 'id'));
         $data['pengajar_login'] = $this->login_model->retrieve(get_sess_data('login', 'id'));
         $data['status_id'] = get_sess_data('user', 'status_id');
         $this->twig->display('pp-pengajar.html', $data);
     }
     if (is_siswa()) {
         $retrieve_siswa = $this->siswa_model->retrieve(get_sess_data('user', 'id'));
         $retrieve_login = $this->login_model->retrieve(get_sess_data('login', 'id'));
         $retrieve_all_kelas = $this->kelas_model->retrieve_all_siswa(10, 1, array('siswa_id' => $retrieve_siswa['id']));
         $data['siswa'] = $retrieve_siswa;
         $data['siswa_login'] = $retrieve_login;
         $data['siswa_kelas'] = $retrieve_all_kelas;
         $data['status_id'] = get_sess_data('user', 'status_id');
         # panggil colorbox
         $html_js = load_comp_js(array(base_url('assets/comp/colorbox/jquery.colorbox-min.js'), base_url('assets/comp/colorbox/act-siswa.js')));
         $data['comp_js'] = $html_js;
         $data['comp_css'] = load_comp_css(array(base_url('assets/comp/colorbox/colorbox.css')));
         $data['show'] = !empty($_GET['show']) ? $_GET['show'] : '';
         $this->twig->display('pp-siswa.html', $data);
     }
 }
开发者ID:pancamedia,项目名称:Marlina-Sabil,代码行数:29,代码来源:login.php


示例2: pp

 function pp()
 {
     must_login();
     if (is_pengajar()) {
         # panggil colorbox
         $html_js = load_comp_js(array(base_url('assets/comp/colorbox/jquery.colorbox-min.js'), base_url('assets/comp/colorbox/act-pengajar.js')));
         $data['comp_js'] = $html_js;
         $data['comp_css'] = load_comp_css(array(base_url('assets/comp/colorbox/colorbox.css')));
         $data['pengajar'] = $this->pengajar_model->retrieve(get_sess_data('user', 'id'));
         $data['pengajar_login'] = $this->login_model->retrieve(get_sess_data('login', 'id'));
         $data['status_id'] = get_sess_data('user', 'status_id');
         $this->twig->display('pp-pengajar.html', $data);
     }
 }
开发者ID:nicefirework,项目名称:new_elearning,代码行数:14,代码来源:login.php


示例3: search

 function search()
 {
     must_login();
     if (empty($_GET['q'])) {
         redirect('welcome');
     }
     $q = (string) $_GET['q'];
     $q = urldecode($q);
     if (is_siswa()) {
         $kelas_aktif = $this->siswa_kelas_aktif;
     }
     # cari siswa
     $retrieve_all_siswa = $this->siswa_model->retrieve_all_filter($nis = '', $nama = $q, $jenis_kelamin = array(), $tahun_masuk = '', $tempat_lahir = '', $tgl_lahir = '', $bln_lahir = '', $thn_lahir = '', $alamat = '', $agama = array(), $kelas_id = array(), $status_id = is_admin() ? array() : array(1, 2, 3), $username = '', $page_no = 1, $pagination = false);
     foreach ($retrieve_all_siswa as $key => &$val) {
         $kelas_siswa = $this->kelas_model->retrieve_siswa(null, array('siswa_id' => $val['id'], 'aktif' => 1));
         # kelas aktif
         if (!empty($kelas_siswa) and $val['status_id'] != 3) {
             $kelas = $this->kelas_model->retrieve($kelas_siswa['kelas_id']);
             $val['kelas_aktif'] = $kelas;
         }
         $retrieve_all_siswa[$key] = $val;
     }
     # cari pengajar
     $retrieve_all_pengajar = $this->pengajar_model->retrieve_all_filter($nip = '', $nama = $q, $jenis_kelamin = array(), $tempat_lahir = '', $tgl_lahir = '', $bln_lahir = '', $thn_lahir = '', $alamat = '', $status_id = is_admin() ? array() : array(1, 2), $username = '', $is_admin = '', $page_no = 1, $pagination = false);
     # cari materi
     $retrieve_all_materi = $this->materi_model->retrieve_all($no_of_records = 10, $page_no = 1, $pengajar_id = array(), $siswa_id = array(), $mapel_id = array(), $judul = $q, $konten = null, $tgl_posting = null, $publish = null, $kelas_id = array(), $type = array(), $pagination = false);
     # cari tugas
     $retrieve_all_tugas = $this->tugas_model->retrieve_all($no_of_records = 10, $page_no = 1, $mapel_id = array(), $pengajar_id = is_pengajar() ? array(get_sess_data('user', 'id')) : array(), $type_id = array(), $kelas_id = is_siswa() ? array($kelas_aktif['kelas_id']) : array(), $judul = $q, $info = null, $aktif = array(), $pagination = false);
     # cari pesan
     $retrieve_all_pesan = $this->msg_model->retrieve_all(10, $page_no, get_sess_data('login', 'id'), array('content' => $q), false);
     foreach ($retrieve_all_pesan as $key => &$val) {
         $retrieve_all_pesan[$key] = $this->format_msg($val);
     }
     $results = array('siswa' => $retrieve_all_siswa, 'pengajar' => $retrieve_all_pengajar, 'materi' => $retrieve_all_materi, 'tugas' => $retrieve_all_tugas, 'pesan' => $retrieve_all_pesan);
     $data['results'] = $results;
     $data['keyword'] = $q;
     if (is_admin()) {
         # panggil colorbox
         $html_js = load_comp_js(array(base_url('assets/comp/colorbox/jquery.colorbox-min.js'), base_url('assets/comp/colorbox/act-siswa.js'), base_url('assets/comp/colorbox/act-pengajar.js')));
         $data['comp_js'] = $html_js;
         $data['comp_css'] = load_comp_css(array(base_url('assets/comp/colorbox/colorbox.css')));
     }
     $this->twig->display('search-results.html', $data);
 }
开发者ID:unregister,项目名称:new_elearning,代码行数:44,代码来源:welcome.php


示例4: block_content

 public function block_content($context, array $blocks = array())
 {
     // line 8
     echo "<div class=\"module\">\n    <div class=\"module-head\">\n        <h3>Materi</h3>\n    </div>\n    <div class=\"module-body\">\n        ";
     // line 13
     echo get_flashdata("materi");
     echo "\n\n        <div class=\"bs-callout bs-callout-info\">\n            ";
     // line 16
     if (is_siswa() == false) {
         // line 17
         echo "            <div class=\"btn-group pull-right\" style=\"margin-top:-5px;\">\n                ";
         // line 18
         echo anchor("materi/add/tertulis", "Tambah Materi Tertulis", array("class" => "btn btn-primary"));
         echo "\n                ";
         // line 19
         echo anchor("materi/add/file", "Tambah Materi File", array("class" => "btn btn-primary"));
         echo "\n            </div>\n            ";
     }
     // line 22
     echo "            <b><a class=\"as-link\" data-toggle=\"collapse\" data-target=\"#form-filter\"><i class=\"icon-search\" style=\"line-height: 0px;\"></i> PARAMETER PENCARIAN</a></b>\n\n            <div id=\"form-filter\" class=\"collapse\" style=\"margin-top: 5px;\">\n                ";
     // line 25
     echo form_open("materi");
     echo "\n                    <table class=\"table table-condensed\">\n                        <tr>\n                            <th  style=\"border-top: none;\">Mapel</th>\n                            <td  style=\"border-top: none;\">\n                                <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                                    ";
     // line 31
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["mapel"]) ? $context["mapel"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["m"]) {
         // line 32
         echo "                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"mapel_id[]\" value=\"";
         // line 34
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "html", null, true);
         echo "\" ";
         echo twig_escape_filter($this->env, set_checkbox("mapel_id[]", $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "mapel_id")) && in_array($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "mapel_id")) ? true : ""), "html", null, true);
         echo "> ";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "nama"), "html", null, true);
         echo "\n                                        </label>\n                                    </li>\n                                    ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 38
     echo "                                </ul>\n                            </td>\n                        </tr>\n                        <tr>\n                            <th>Kelas</th>\n                            <td>\n                                <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                                    ";
     // line 45
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["kelas"]) ? $context["kelas"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["k"]) {
         // line 46
         echo "                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"kelas_id[]\" value=\"";
         // line 48
         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"), !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "kelas_id")) && in_array($this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "kelas_id")) ? true : ""), "html", null, true);
         echo "> ";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "nama"), "html", null, true);
         echo "\n                                        </label>\n                                    </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 52
     echo "                                </ul>\n                            </td>\n                        </tr>\n                        <tr>\n                            <th>Tipe</th>\n                            <td>\n                                <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"type[]\" value=\"tertulis\" ";
     // line 61
     echo twig_escape_filter($this->env, set_checkbox("type[]", "tertulis", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) && in_array("tertulis", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) ? true : ""), "html", null, true);
     echo "> Tertulis\n                                        </label>\n                                    </li>\n                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"type[]\" value=\"file\" ";
     // line 66
     echo twig_escape_filter($this->env, set_checkbox("type[]", "file", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) && in_array("file", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) ? true : ""), "html", null, true);
     echo "> File\n                                        </label>\n                                    </li>\n                                </ul>\n                            </td>\n                        </tr>\n                        <tr>\n                            <th width=\"15%\">Judul</th>\n                            <td>\n                                <input type=\"text\" name=\"judul\" class=\"span4\" value=\"";
     // line 75
     echo twig_escape_filter($this->env, set_value("judul", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "judul")), "html", null, true);
     echo "\">\n                            </td>\n                        </tr>\n                        <tr>\n                            <th>Konten</th>\n                            <td>\n                                <input type=\"text\" name=\"konten\" class=\"span5\" value=\"";
     // line 81
     echo twig_escape_filter($this->env, set_value("konten", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "konten")), "html", null, true);
     echo "\">\n                            </td>\n                        </tr>\n                        <tr>\n                            <th>Pembuat</th>\n                            <td>\n                                <input type=\"text\" name=\"pembuat\" class=\"span4\" value=\"";
     // line 87
     echo twig_escape_filter($this->env, set_value("pembuat", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "pembuat")), "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                </form>\n            </div>\n\n        </div>\n\n        <br>\n\n        <table class=\"table table-striped\">\n            <thead>\n                <tr>\n                    <th width=\"7%\">ID</th>\n                    <th>Informasi Materi</th>\n                    <th width=\"15%\">Tipe Materi</th>\n                    <th width=\"15%\"></th>\n                </tr>\n            </thead>\n            <tbody>\n                ";
     // line 114
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["materi"]) ? $context["materi"] : null);
     foreach ($context['_seq'] as $context["no"] => $context["m"]) {
         // line 115
         echo "\n                ";
         // line 116
         if (is_admin() == true) {
             // line 117
             echo "                    ";
             $context["action_edit"] = true;
             // line 118
             echo "                    ";
             $context["action_delete"] = true;
             // line 119
             echo "                ";
         } elseif (is_pengajar() == true) {
             // line 120
             echo "                    ";
             if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "pengajar_id") == get_sess_data("user", "id")) {
                 // line 121
                 echo "                        ";
                 $context["action_edit"] = true;
                 // line 122
//.........这里部分代码省略.........
开发者ID:Raniratna,项目名称:new_elearning,代码行数:101,代码来源:7167ed078456c7dacce5699c3c84c4bbedc1d2c03ce6f2834231bba6a50b.php


示例5: reset_jawaban

 function reset_jawaban($tugas_id, $siswa_id)
 {
     # jika pengajar atau admin
     if (is_pengajar() or is_admin()) {
         $tugas_id = (int) $tugas_id;
         $tugas = $this->tugas_model->retrieve($tugas_id);
         if (empty($tugas)) {
             redirect('tugas');
         }
         $siswa = $this->siswa_model->retrieve($siswa_id);
         if (empty($siswa)) {
             redirect('tugas');
         }
         # hapus history
         $history_id = 'history-mengerjakan-' . $siswa['id'] . '-' . $tugas['id'];
         delete_field($history_id);
         # hapus nilai
         $retrieve_nilai = $this->tugas_model->retrieve_nilai(null, $tugas['id'], $siswa['id']);
         $this->tugas_model->delete_nilai($retrieve_nilai['id']);
         $this->session->set_flashdata('tugas', get_alert('success', 'Siswa berhasil dianggap belum mengerjakan.'));
         redirect('tugas/nilai/' . $tugas['id']);
     } else {
         $this->session->set_flashdata('tugas', get_alert('warning', 'Akses ditolak.'));
         redirect('tugas');
     }
 }
开发者ID:unregister,项目名称:new_elearning,代码行数:26,代码来源:tugas.php


示例6: reset_jawaban

 function reset_jawaban($tugas_id, $siswa_id)
 {
     # jika pengajar atau admin
     if (is_pengajar() or is_admin()) {
         $tugas_id = (int) $tugas_id;
         $tugas = $this->tugas_model->retrieve($tugas_id);
         if (empty($tugas)) {
             redirect('tugas');
         }
         $siswa = $this->siswa_model->retrieve($siswa_id);
         if (empty($siswa)) {
             redirect('tugas');
         }
         # hapus history
         $history_id = 'history-mengerjakan-' . $siswa['id'] . '-' . $tugas['id'];
         $history = retrieve_field($history_id);
         $history_value = json_decode($history['value'], 1);
         delete_field($history_id);
         # hapus nilai
         $retrieve_nilai = $this->tugas_model->retrieve_nilai(null, $tugas['id'], $siswa['id']);
         $this->tugas_model->delete_nilai($retrieve_nilai['id']);
         $this->session->set_flashdata('tugas', get_alert('success', 'Siswa berhasil dianggap belum mengerjakan.'));
         if ($tugas['type_id'] == 3) {
             redirect('tugas/nilai/' . $tugas['id']);
         } else {
             # jika tugas upload, dihapus juga file uploadnya biar g menuh-menuhin space
             if ($tugas['type_id'] == 1 && is_file(get_path_file($history_value['file_name']))) {
                 @unlink(get_path_file($history_value['file_name']));
             }
             redirect('tugas/koreksi/' . $tugas['id']);
         }
     } else {
         $this->session->set_flashdata('tugas', get_alert('warning', 'Akses ditolak.'));
         redirect('tugas');
     }
 }
开发者ID:etofia,项目名称:new_elearning,代码行数:36,代码来源:tugas.php


示例7: delete

 function delete($segment_3 = '')
 {
     # yang bisa edit pengumuman adalah pengajar / admin
     if (!is_pengajar() and !is_admin()) {
         redirect('pengumuman/index');
     }
     $id = (int) $segment_3;
     $pengumuman = $this->pengumuman_model->retrieve(array('id' => $id));
     if (empty($pengumuman)) {
         $this->session->set_flashdata('pengumuman', get_alert('warning', 'Pengumuman tidak ditemukan.'));
         redirect('pengumuman/index/1');
     }
     $allow_action = $this->get_allow_action($pengumuman);
     if (!in_array('delete', $allow_action)) {
         $this->session->set_flashdata('pengumuman', get_alert('warning', 'Akses ditolak.'));
         redirect('pengumuman/index/1');
     }
     $this->pengumuman_model->delete($pengumuman['id']);
     $this->session->set_flashdata('pengumuman', get_alert('success', 'Pengumuman berhasil dihapus.'));
     redirect('pengumuman/index/1');
 }
开发者ID:Raniratna,项目名称:new_elearning,代码行数:21,代码来源:pengumuman.php


示例8: delete

 function delete($segment_3 = '', $segment_4 = '')
 {
     # versi 1.2 siswa tidak bisa tambah,edit,hapus materi
     if (is_siswa()) {
         redirect('materi');
     }
     $materi_id = (int) $segment_3;
     $uri_back = (string) $segment_4;
     if (empty($uri_back)) {
         $uri_back = site_url('materi');
     } else {
         $uri_back = deurl_redirect($uri_back);
     }
     $materi = $this->materi_model->retrieve($materi_id);
     if (empty($materi)) {
         redirect($uri_back);
     }
     # cek kepemilikan
     if (is_pengajar() and $materi['pengajar_id'] != get_sess_data('user', 'id')) {
         redirect($uri_back);
     }
     if (is_siswa() and $materi['siswa_id'] != get_sess_data('user', 'id')) {
         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('warning', 'Materi berhasil dihapus.'));
     redirect($uri_back);
 }
开发者ID:etofia,项目名称:new_elearning,代码行数:32,代码来源:materi.php


示例9: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     echo "<!DOCTYPE html>\n<html lang=\"en\">\n    <head>\n        <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n        <title>";
     // line 6
     $this->displayBlock('title', $context, $blocks);
     echo "</title>\n        <link type=\"text/css\" href=\"";
     // line 7
     echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true);
     echo "bootstrap/css/bootstrap.min.css\" rel=\"stylesheet\">\n        <link type=\"text/css\" href=\"";
     // line 8
     echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true);
     echo "bootstrap/css/bootstrap-responsive.min.css\" rel=\"stylesheet\">\n        <link type=\"text/css\" href=\"";
     // line 9
     echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true);
     echo "css/theme.css\" rel=\"stylesheet\">\n        <link type=\"text/css\" href=\"";
     // line 10
     echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true);
     echo "images/icons/css/font-awesome.css\" rel=\"stylesheet\">\n        ";
     // line 11
     $this->displayBlock('css', $context, $blocks);
     // line 12
     echo "        ";
     echo isset($context["comp_css"]) ? $context["comp_css"] : null;
     echo "\n        <link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"";
     // line 13
     echo twig_escape_filter($this->env, isset($context["favicon_url"]) ? $context["favicon_url"] : null, "html", null, true);
     echo "\">\n    </head>\n    <body>\n        <div class=\"navbar navbar-fixed-top\">\n            <div class=\"navbar-inner\">\n                <div class=\"container\">\n                    <a class=\"btn btn-navbar\" data-toggle=\"collapse\" data-target=\".navbar-inverse-collapse\">\n                        <i class=\"icon-reorder shaded\"></i>\n                    </a>\n                    <a class=\"brand\" href=\"";
     // line 22
     echo twig_escape_filter($this->env, isset($context["site_url"]) ? $context["site_url"] : null, "html", null, true);
     echo "\">\n                        <img src=\"";
     // line 23
     echo twig_escape_filter($this->env, isset($context["logo_url_medium"]) ? $context["logo_url_medium"] : null, "html", null, true);
     echo "\"> ";
     echo twig_escape_filter($this->env, isset($context["site_name"]) ? $context["site_name"] : null, "html", null, true);
     echo "\n                    </a>\n                    <div class=\"nav-collapse collapse navbar-inverse-collapse\">\n                        <form class=\"navbar-search pull-left input-append\" method=\"get\" action=\"";
     // line 26
     echo twig_escape_filter($this->env, site_url("welcome/search"), "html", null, true);
     echo "\">\n                            <input type=\"text\" class=\"span3\" name=\"q\">\n                            <button class=\"btn\" type=\"submit\">\n                                <i class=\"icon-search\"></i>\n                            </button>\n                        </form>\n                        <ul class=\"nav pull-right\">\n                            <li class=\"nav-user dropdown\"><a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n                                ";
     // line 34
     echo twig_escape_filter($this->env, nama_panggilan(get_sess_data("user", "nama")), "html", null, true);
     echo "\n\n                                <img src=\"";
     // line 36
     echo twig_escape_filter($this->env, get_url_image_pengajar(get_sess_data("user", "foto"), "medium", get_sess_data("user", "jenis_kelamin")), "html", null, true);
     echo "\" class=\"nav-avatar img-polaroid\" />\n\n                                <b class=\"caret\"></b></a>\n                                <ul class=\"dropdown-menu\">\n                                    ";
     // line 40
     if (is_admin()) {
         // line 41
         echo "                                    <li>";
         echo anchor("pengajar/detail/" . get_sess_data("user", "status_id") . "/" . get_sess_data("user", "id"), "Detail Profil", array("title" => "Detail Profil"));
         echo "</li>\n                                    ";
     }
     // line 43
     echo "\n                                    ";
     // line 44
     if (is_pengajar()) {
         // line 45
         echo "                                    <li>";
         echo anchor("login/pp", "Profil & Akun Login");
         echo "</li>\n                                    ";
     }
     // line 47
     echo "\n                                    ";
     // line 48
     if (is_siswa()) {
         // line 49
         echo "                                    <li>";
         echo anchor("login/pp", "Profil & Akun Login");
         echo "</li>\n                                    ";
     }
     // line 51
     echo "\n                                    <li><a href=\"";
     // line 52
     echo twig_escape_filter($this->env, site_url("login/logout"), "html", null, true);
     echo "\">Logout</a></li>\n                                </ul>\n                            </li>\n                        </ul>\n                    </div>\n                    <!-- /.nav-collapse -->\n                </div>\n            </div>\n            <!-- /navbar-inner -->\n        </div>\n\n        <!-- /navbar -->\n        <div class=\"wrapper\">\n            <div class=\"container\">\n                <div class=\"row\">\n                    <div class=\"span3\">\n                        <div class=\"sidebar\">\n                            ";
     // line 69
     if (is_admin()) {
         // line 70
         echo "                            <ul class=\"widget widget-menu unstyled\">\n                                <li><a href=\"";
         // line 71
         echo twig_escape_filter($this->env, site_url(), "html", null, true);
         echo "\"><i class=\"menu-icon icon-home\"></i>Beranda</a></li>\n                                <li><a href=\"";
         // line 72
         echo twig_escape_filter($this->env, site_url("pengumuman"), "html", null, true);
         echo "\"><i class=\"menu-icon icon-bullhorn\"></i>Pengumuman</a></li>\n                                <li><a href=\"";
         // line 73
         echo twig_escape_filter($this->env, site_url("message"), "html", null, true);
         echo "\"><i class=\"menu-icon icon-comments\"></i>Pesan <span id=\"count-new-msg\"></span></a></li>\n                            </ul>\n\n                            <ul class=\"widget widget-menu unstyled\">\n                                <li><a href=\"";
         // line 77
         echo twig_escape_filter($this->env, site_url("siswa"), "html", null, true);
         echo "\"><i class=\"menu-icon icon-group\"></i>Siswa </a></li>\n                                <li><a href=\"";
         // line 78
         echo twig_escape_filter($this->env, site_url("pengajar"), "html", null, true);
         echo "\"><i class=\"menu-icon icon-user\"></i>Pengajar </a></li>\n                            </ul>\n\n                            <ul class=\"widget widget-menu unstyled\">\n                                <li><a href=\"";
         // line 82
         echo twig_escape_filter($this->env, site_url("tugas?clear_filter=true"), "html", null, true);
         echo "\"><i class=\"menu-icon icon-tasks\"></i>Tugas </a></li>\n                                <li><a href=\"";
         // line 83
         echo twig_escape_filter($this->env, site_url("materi?clear_filter=true"), "html", null, true);
         echo "\"><i class=\"menu-icon icon-book\"></i>Materi </a></li>\n                            </ul>\n\n                            <ul class=\"widget widget-menu unstyled\">\n                                <li><a href=\"";
//.........这里部分代码省略.........
开发者ID:etofia,项目名称:new_elearning,代码行数:101,代码来源:1d17b46455dd2185ef348b74c3dd09cbd34f19d541653c5de5b049543300.php


示例10: block_content

 public function block_content($context, array $blocks = array())
 {
     // line 8
     echo "<div class=\"module\">\n    <div class=\"module-head\">\n        <h3>Tugas</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            ";
     // line 16
     if (is_siswa() == false) {
         // line 17
         echo "            <div class=\"btn-group pull-right\" style=\"margin-top:-5px;\">\n                ";
         // line 18
         echo anchor("tugas/add/3", "Tambah Tugas Ganda", array("class" => "btn btn-primary"));
         echo "\n                ";
         // line 19
         echo anchor("tugas/add/2", "Tambah Tugas Essay", array("class" => "btn btn-primary"));
         echo "\n                ";
         // line 20
         echo anchor("tugas/add/1", "Tambah Tugas Upload", array("class" => "btn btn-primary"));
         echo "\n            </div>\n            ";
     }
     // line 23
     echo "            <b><a class=\"as-link\" data-toggle=\"collapse\" data-target=\"#form-filter\"><i class=\"icon-search\" style=\"line-height: 0px;\"></i> Filter</a></b>\n\n            <div id=\"form-filter\" class=\"collapse\" style=\"margin-top: 5px;\">\n                ";
     // line 26
     echo form_open("tugas");
     echo "\n                    <table class=\"table table-condensed\">\n                        <tr>\n                            <th  style=\"border-top: none;\">Mapel</th>\n                            <td  style=\"border-top: none;\">\n                                <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                                    ";
     // line 32
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["mapel"]) ? $context["mapel"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["m"]) {
         // line 33
         echo "                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"mapel_id[]\" value=\"";
         // line 35
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "html", null, true);
         echo "\" ";
         echo twig_escape_filter($this->env, set_checkbox("mapel_id[]", $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "mapel_id")) && in_array($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "mapel_id")) ? true : ""), "html", null, true);
         echo "> ";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "nama"), "html", null, true);
         echo "\n                                        </label>\n                                    </li>\n                                    ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 39
     echo "                                </ul>\n                            </td>\n                        </tr>\n                        ";
     // line 42
     if (is_siswa() == false) {
         // line 43
         echo "                        <tr>\n                            <th>Kelas</th>\n                            <td>\n                                <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                                    ";
         // line 47
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["kelas"]) ? $context["kelas"] : null);
         foreach ($context['_seq'] as $context["_key"] => $context["k"]) {
             // line 48
             echo "                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"kelas_id[]\" value=\"";
             // line 50
             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"), !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "kelas_id")) && in_array($this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "kelas_id")) ? true : ""), "html", null, true);
             echo "> ";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "nama"), "html", null, true);
             echo "\n                                        </label>\n                                    </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 54
         echo "                                </ul>\n                            </td>\n                        </tr>\n                        ";
     }
     // line 58
     echo "                        <tr>\n                            <th>Tipe</th>\n                            <td>\n                                <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"type[]\" value=\"3\" ";
     // line 64
     echo twig_escape_filter($this->env, set_checkbox("type[]", "3", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) && in_array("3", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) ? true : ""), "html", null, true);
     echo "> Ganda\n                                        </label>\n                                    </li>\n                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"type[]\" value=\"2\" ";
     // line 69
     echo twig_escape_filter($this->env, set_checkbox("type[]", "2", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) && in_array("2", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) ? true : ""), "html", null, true);
     echo "> Essay\n                                        </label>\n                                    </li>\n                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"type[]\" value=\"1\" ";
     // line 74
     echo twig_escape_filter($this->env, set_checkbox("type[]", "1", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) && in_array("1", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) ? true : ""), "html", null, true);
     echo "> Upload\n                                        </label>\n                                    </li>\n                                </ul>\n                            </td>\n                        </tr>\n                        <tr>\n                            <th width=\"15%\">Judul</th>\n                            <td>\n                                <input type=\"text\" name=\"judul\" class=\"span4\" value=\"";
     // line 83
     echo twig_escape_filter($this->env, set_value("judul", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "judul")), "html", null, true);
     echo "\">\n                            </td>\n                        </tr>\n                        <tr>\n                            <th>Info</th>\n                            <td>\n                                <input type=\"text\" name=\"info\" class=\"span5\" value=\"";
     // line 89
     echo twig_escape_filter($this->env, set_value("info", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "info")), "html", null, true);
     echo "\">\n                            </td>\n                        </tr>\n                        ";
     // line 92
     if (is_pengajar() == false) {
         // line 93
         echo "                        <tr>\n                            <th>Pembuat</th>\n                            <td>\n                                <input type=\"text\" name=\"pembuat\" class=\"span4\" value=\"";
         // line 96
         echo twig_escape_filter($this->env, set_value("pembuat", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "pembuat")), "html", null, true);
         echo "\">\n                            </td>\n                        </tr>\n                        ";
     }
     // line 100
     echo "                        <tr>\n                            <th>Status</th>\n                            <td>\n                                <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"status[]\" value=\"1\" ";
     // line 106
     echo twig_escape_filter($this->env, set_checkbox("status[]", "1", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status")) && in_array("1", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status")) ? true : ""), "html", null, true);
     echo "> Terbit\n                                        </label>\n                                    </li>\n                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"status[]\" value=\"0\" ";
     // line 111
//.........这里部分代码省略.........
开发者ID:unregister,项目名称:new_elearning,代码行数:101,代码来源:15a290914e04874404a546e9c3097768976d6925efc804ad62a129b0e746.php


示例11: get_sess_data

/**
 * Method untuk mendapatkan data session
 *
 * @param  string $key1
 * @param  string $key2
 * @return array
 */
function get_sess_data($key1, $key2)
{
    $CI =& get_instance();
    $CI->load->library('session');
    $sess_data = $CI->session->userdata('login_' . APP_PREFIX);
    if (!empty($sess_data)) {
        $type = '';
        if (is_admin()) {
            $type = 'admin';
        }
        if (is_pengajar()) {
            $type = 'pengajar';
        }
        if (is_siswa()) {
            $type = 'siswa';
        }
        if (!empty($type)) {
            return $sess_data[$type][$key1][$key2];
        }
    }
}

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP is_percent函数代码示例发布时间:2022-05-15
下一篇:
PHP is_payword函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap