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

PHP get_sess_data函数代码示例

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

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



在下文中一共展示了get_sess_data函数的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: add

 function add()
 {
     # yang bisa buat pengumuman adalah pengajar / admin
     if (!is_pengajar() and !is_admin()) {
         redirect('pengumuman/index');
     }
     if ($this->form_validation->run('pengumuman') == true) {
         $judul = $this->input->post('judul', true);
         $split = explode(" s/d ", $this->input->post('tgl_tampil', true));
         $tgl_tampil = $split[0];
         $tgl_tutup = $split[1];
         $konten = $this->input->post('konten', true);
         $tampil_siswa = $this->input->post('tampil_siswa', true);
         $tampil_pengajar = $this->input->post('tampil_pengajar', true);
         $this->pengumuman_model->create($judul, $konten, $tgl_tampil, $tgl_tutup, $tampil_siswa, $tampil_pengajar, get_sess_data('user', 'id'));
         $this->session->set_flashdata('pengumuman', get_alert('success', 'Pengumuman berhasil dibuat.'));
         redirect('pengumuman/index/1');
     }
     # load komponen
     $html_js = get_tinymce('konten');
     $html_js .= load_comp_js(array(base_url('assets/comp/jquery/moment.min.js'), base_url('assets/comp/daterangepicker/jquery.daterangepicker.js'), base_url('assets/comp/daterangepicker/setup.js')));
     $data['comp_js'] = $html_js;
     $data['comp_css'] = load_comp_css(array(base_url('assets/comp/daterangepicker/daterangepicker.css')));
     $this->twig->display('tambah-pengumuman.html', $data);
 }
开发者ID:Raniratna,项目名称:new_elearning,代码行数:25,代码来源:pengumuman.php


示例3: 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


示例4: retrieve_all_users

 /**
  * Method untuk mendapatkan semua data user
  * @return array
  */
 public function retrieve_all_users()
 {
     $table_pengajar = $this->db->dbprefix('pengajar');
     $table_siswa = $this->db->dbprefix('siswa');
     $table_login = $this->db->dbprefix('login');
     $sql = "SELECT {$table_login}.username, {$table_pengajar}.nama FROM {$table_pengajar} INNER JOIN {$table_login} ON {$table_pengajar}.id = {$table_login}.pengajar_id\n                UNION\n                SELECT {$table_login}.username, {$table_siswa}.nama FROM {$table_siswa} INNER JOIN {$table_login} ON {$table_siswa}.id = {$table_login}.siswa_id";
     $result = $this->db->query($sql);
     $data = array();
     foreach ($result->result_array() as $r) {
         # selain yang login
         if (is_login() && $r['username'] == get_sess_data('login', 'username')) {
             continue;
         }
         $data[] = $r['nama'] . ' <' . $r['username'] . '>';
     }
     return $data;
 }
开发者ID:Raniratna,项目名称:new_elearning,代码行数:21,代码来源:login_model.php


示例5: 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


示例6: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     echo "\n<ul class=\"nav pull-right\">\n    <li class=\"nav-user dropdown\"><a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n        ";
     // line 4
     echo twig_escape_filter($this->env, get_sess_data("admin", "pengajar", "nama"), "html", null, true);
     echo "\n            <img src=\"";
     // line 5
     echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true);
     echo "images/user.png\" class=\"nav-avatar\" />\n        <b class=\"caret\"></b></a>\n        <ul class=\"dropdown-menu\">\n            <li><a href=\"";
     // line 8
     echo twig_escape_filter($this->env, site_url("admin/ch_profil"), "html", null, true);
     echo "\">Profil</a></li>\n            <li><a href=\"";
     // line 9
     echo twig_escape_filter($this->env, site_url("admin/ch_pass"), "html", null, true);
     echo "\">Ubah Password</a></li>\n            <li><a href=\"";
     // line 10
     echo twig_escape_filter($this->env, site_url("admin/logout"), "html", null, true);
     echo "\">Logout</a></li>\n        </ul>\n    </li>\n</ul>\n";
 }
开发者ID:Raniratna,项目名称:new_elearning,代码行数:20,代码来源:4e505f93e7580ca918527f8cadcb3691244c91af7aa832c66e0fbeba7f1c.php


示例7: hapus_pilihan

 function hapus_pilihan($segment_3 = '', $segment_4 = '', $segment_5 = '', $segment_6 = '')
 {
     $tugas_id = (int) $segment_3;
     $pertanyaan_id = (int) $segment_4;
     $pilihan_id = (int) $segment_5;
     $uri_back = (string) $segment_6;
     $tugas = $this->tugas_model->retrieve($tugas_id);
     if (empty($tugas) or $tugas['type_id'] != 3) {
         exit("Tugas tidak ditemukan");
     }
     # jika sebagai pengajar, cek kepemilikan
     if (is_pengajar() and $tugas['pengajar_id'] != get_sess_data('user', 'id')) {
         exit("Tugas tidak ditemukan");
     }
     $pertanyaan = $this->tugas_model->retrieve_pertanyaan($pertanyaan_id);
     if (empty($pertanyaan)) {
         exit("Pertanyaan tidak ditemukan");
     }
     $pilihan = $this->tugas_model->retrieve_pilihan($pilihan_id, $pertanyaan['id']);
     if (empty($pilihan)) {
         exit("Pilihan tidak ditemukan");
     }
     if (empty($uri_back)) {
         $uri_back = site_url('tugas/manajemen_soal/' . $tugas['id']);
     } else {
         $uri_back = deurl_redirect($uri_back);
     }
     $this->tugas_model->delete_pilihan($pilihan['id']);
     redirect($uri_back . '#pilihan-' . $pertanyaan['id']);
 }
开发者ID:nicefirework,项目名称:new_elearning,代码行数:30,代码来源:tugas.php


示例8: check_penerima_pesan

 function check_penerima_pesan($username = '')
 {
     $get_email = get_email_from_string($username);
     if (empty($get_email)) {
         $this->form_validation->set_message('check_penerima_pesan', 'Username tidak ditemukan.');
         return false;
     } else {
         # cek ada tidak
         if (!$this->check_username_exist($get_email)) {
             $this->form_validation->set_message('check_penerima_pesan', 'Username tidak ditemukan.');
             return false;
         }
         # cek sama dengan yang login tidak
         if ($get_email == get_sess_data('login', 'username')) {
             $this->form_validation->set_message('check_penerima_pesan', 'Anda tidak dapat mengirim pesan ke diri sendiri.');
             return false;
         }
         return true;
     }
 }
开发者ID:afrizzal,项目名称:new_elearning,代码行数:20,代码来源:MY_Controller.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>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


示例11: pass_siswa_equal_nis

/**
 * Method untuk cek apakah password siswa sama dengan nis
 *
 * @return boolean
 */
function pass_siswa_equal_nis()
{
    if (is_siswa()) {
        $nis_siswa = get_sess_data('user', 'nis');
        if (empty($nis_siswa)) {
            return false;
        }
        # ambil nis siswa
        $nis = get_row_data('siswa_model', 'retrieve', array('id' => get_sess_data('user', 'id')), 'nis');
        if (empty($nis)) {
            return false;
        }
        $md5_nis = md5($nis);
        # dapatkan password siswa
        $md5_pass = get_row_data('login_model', 'retrieve', array('id' => get_sess_data('login', 'id')), 'password');
        if ($md5_nis == $md5_pass) {
            return true;
        }
    }
    return false;
}
开发者ID:pancamedia,项目名称:Marlina-Sabil,代码行数:26,代码来源:elearning_helper.php


示例12: post_data

    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));
//.........这里部分代码省略.........
开发者ID:Raniratna,项目名称:new_elearning,代码行数:101,代码来源:ajax.php


示例13: jadwal_mapel

 function jadwal_mapel()
 {
     if (!is_siswa()) {
         redirect('siswa');
     }
     $data['list_jadwal'] = $this->get_jadwal_mapel_siswa(get_sess_data('user', 'id'));
     $this->twig->display('jadwal-mapel.html', $data);
 }
开发者ID:Raniratna,项目名称:new_elearning,代码行数:8,代码来源:siswa.php


示例14: detail_jawaban

 function detail_jawaban($siswa_id = '', $tugas_id = '')
 {
     $siswa_id = (int) $siswa_id;
     $siswa = $this->siswa_model->retrieve($siswa_id);
     if (empty($siswa)) {
         exit('Siswa tidak ditemukan');
     }
     # cek jika siswa, punya dia tidak
     if (is_siswa() and $siswa['id'] != get_sess_data('user', 'id')) {
         exit('Akses ditolak');
     }
     $tugas_id = (int) $tugas_id;
     $tugas = $this->tugas_model->retrieve($tugas_id);
     if (empty($tugas)) {
         exit('Tugas tidak ditemukan');
     }
     $data['tugas'] = $this->formatData($tugas);
     $data['siswa'] = $siswa;
     # cari history
     $history_id = 'history-mengerjakan-' . $siswa['id'] . '-' . $tugas['id'];
     $history = retrieve_field($history_id);
     if (empty($history)) {
         exit('Tugas belum dikerjakan');
     }
     $history_value = json_decode($history['value'], 1);
     # ini utnuk mengantisipasi versi < 1.5
     if (!empty($history_value['pertanyaan_id'])) {
         $soal = array();
         foreach ($history_value['pertanyaan_id'] as $key => $p_id) {
             $pertanyaan = $this->tugas_model->retrieve_pertanyaan($p_id);
             # jika pilihan ganda ambil pilihannya
             if ($history_value['tugas']['type_id'] == 3) {
                 $pertanyaan['pilihan'] = $this->tugas_model->retrieve_all_pilihan($pertanyaan['id']);
             }
             $soal[$key] = $pertanyaan;
         }
         $history_value['pertanyaan'] = $soal;
     }
     $data['history'] = $history_value;
     if ($tugas['type_id'] == 3) {
         $this->twig->display('detail-jawaban-ganda.html', $data);
     } elseif ($tugas['type_id'] == 2) {
         # jika ada post nilai
         if (!empty($_POST['nilai'])) {
             $total_nilai = 0;
             foreach ($_POST['nilai'] as $p_id => $p_nilai) {
                 $total_nilai = $total_nilai + $p_nilai;
             }
             # update history
             $new_history = $history_value;
             $new_history['nilai'] = $_POST['nilai'];
             unset($new_history['pertanyaan']);
             update_field($history_id, $history['nama'], json_encode($new_history));
             # simpan atau update nilai
             $check = $this->tugas_model->retrieve_nilai(null, $tugas['id'], $siswa['id']);
             if (empty($check)) {
                 $this->tugas_model->create_nilai($total_nilai, $tugas['id'], $siswa['id']);
             } else {
                 $this->tugas_model->update_nilai($check['id'], $total_nilai, $tugas['id'], $siswa['id']);
             }
             redirect('tugas/detail_jawaban/' . $siswa['id'] . '/' . $tugas['id']);
         }
         # cek sudah koreksi belum, dengan cara cek nilainya sudah ada belum
         $nilai = $this->tugas_model->retrieve_nilai(null, $tugas['id'], $siswa['id']);
         $data['sudah_dikoreksi'] = !empty($nilai) ? true : 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP get_sess_userico函数代码示例发布时间:2022-05-15
下一篇:
PHP get_services函数代码示例发布时间: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