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 "    <link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"";
     echo twig_escape_filter($this->env, isset($context["favicon_url"]) ? $context["favicon_url"] : null, "html", null, true);
     echo "\">\n</head>\n<body>\n\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\n                <a class=\"brand\" href=\"";
     // line 23
     echo twig_escape_filter($this->env, site_url(), "html", null, true);
     echo "\">\n                    <img src=\"";
     // line 24
     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\n                <div class=\"nav-collapse collapse navbar-inverse-collapse\">\n                    <ul class=\"nav pull-right\">\n                        ";
     // line 29
     if (get_pengaturan("registrasi-siswa", "value") == 1 || get_pengaturan("registrasi-pengajar", "value") == 1) {
         // line 30
         echo "                        <li><a href=\"";
         echo twig_escape_filter($this->env, site_url("login/register"), "html", null, true);
         echo "\">Register</a></li>\n                        ";
     }
     // line 32
     echo "                    </ul>\n                </div>\n            </div>\n        </div><!-- /navbar-inner -->\n    </div><!-- /navbar -->\n\n    <div class=\"wrapper\">\n        <div class=\"container\">\n\n            ";
     // line 41
     $this->displayBlock('content', $context, $blocks);
     // line 42
     echo "\n        </div>\n    </div><!--/.wrapper-->\n\n    <div class=\"footer\">\n        <div class=\"container\">\n            <center>\n                <b class=\"copyright\">";
     // line 49
     echo isset($context["copyright"]) ? $context["copyright"] : null;
     echo " </b> All rights reserved.<br>\n                ";
     // line 50
     echo isset($context["version"]) ? $context["version"] : null;
     echo " | Page loaded in ";
     echo twig_escape_filter($this->env, isset($context["elapsed_time"]) ? $context["elapsed_time"] : null, "html", null, true);
     echo " seconds.\n            </center>\n        </div>\n    </div>\n    ";
     // line 54
     $this->displayBlock('js', $context, $blocks);
     // line 59
     echo "</body>\n";
 }
 public function block_content($context, array $blocks = array())
 {
     // line 8
     echo "<div class=\"module\">\n    <div class=\"module-head\">\n        <h3>Pengaturan</h3>\n    </div>\n    <div class=\"module-body\">\n        ";
     // line 13
     echo get_flashdata("pengaturan");
     echo "\n\n        ";
     // line 15
     echo form_open_multipart("welcome/pengaturan", array("class" => "form-horizontal row-fluid"));
     echo "\n            <div class=\"control-group\">\n                <label class=\"control-label\">Nama sekolah <span class=\"text-error\">*</span></label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"nama-sekolah\" class=\"span8\" value=\"";
     // line 19
     echo twig_escape_filter($this->env, set_value("nama-sekolah", get_pengaturan("nama-sekolah", "value")), "html", null, true);
     echo "\">\n                    <br>";
     // line 20
     echo form_error("nama-sekolah");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Alamat sekolah <span class=\"text-error\">*</span></label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"alamat\" class=\"span8\" value=\"";
     // line 26
     echo twig_escape_filter($this->env, set_value("alamat", get_pengaturan("alamat", "value")), "html", null, true);
     echo "\">\n                    <br>";
     // line 27
     echo form_error("alamat");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Telpon</label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"telp\" class=\"span5\" value=\"";
     // line 33
     echo twig_escape_filter($this->env, set_value("telp", get_pengaturan("telp", "value")), "html", null, true);
     echo "\">\n                    <br>";
     // line 34
     echo form_error("telp");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Registrasi siswa</label>\n                <div class=\"controls\">\n                    <label class=\"radio inline\">\n                        <input type=\"radio\" name=\"registrasi-siswa\" value=\"1\" ";
     // line 41
     echo twig_escape_filter($this->env, set_radio("registrasi-siswa", "1", get_pengaturan("registrasi-siswa", "value") == "1" ? true : ""), "html", null, true);
     echo "> Tampilkan\n                    </label>\n                    <label class=\"radio inline\">\n                        <input type=\"radio\" name=\"registrasi-siswa\" value=\"0\" ";
     // line 44
     echo twig_escape_filter($this->env, set_radio("registrasi-siswa", "0", get_pengaturan("registrasi-siswa", "value") == "0" ? true : ""), "html", null, true);
     echo "> Sembuyikan\n                    </label>\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Registrasi pengajar</label>\n                <div class=\"controls\">\n                    <label class=\"radio inline\">\n                        <input type=\"radio\" name=\"registrasi-pengajar\" value=\"1\" ";
     // line 52
     echo twig_escape_filter($this->env, set_radio("registrasi-pengajar", "1", get_pengaturan("registrasi-pengajar", "value") == "1" ? true : ""), "html", null, true);
     echo "> Tampilkan\n                    </label>\n                    <label class=\"radio inline\">\n                        <input type=\"radio\" name=\"registrasi-pengajar\" value=\"0\" ";
     // line 55
     echo twig_escape_filter($this->env, set_radio("registrasi-pengajar", "0", get_pengaturan("registrasi-pengajar", "value") == "0" ? true : ""), "html", null, true);
     echo "> Sembuyikan\n                    </label>\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Info Registrasi</label>\n                <div class=\"controls\">\n                    <textarea name=\"info-registrasi\" class=\"tinymce\" style=\"width:100%; height:300px;\">";
     // line 62
     echo set_value("info-registrasi", get_pengaturan("info-registrasi", "value"));
     echo "</textarea>\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Peraturan E-learning</label>\n                <div class=\"controls\">\n                    <textarea name=\"peraturan-elearning\" class=\"tinymce\" style=\"width:100%; height:300px;\">";
     // line 68
     echo set_value("peraturan-elearning", get_pengaturan("peraturan-elearning", "value"));
     echo "</textarea>\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Email server</label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"email-server\" class=\"span5\" value=\"";
     // line 74
     echo twig_escape_filter($this->env, set_value("email-server", get_pengaturan("email-server", "value")), "html", null, true);
     echo "\">\n                    <br>";
     // line 75
     echo form_error("email-server");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <div class=\"controls\">\n                    <button type=\"submit\" class=\"btn btn-primary\">Update</button>\n                </div>\n            </div>\n        ";
     // line 83
     echo form_close();
     echo "\n\n    </div>\n</div>\n";
 }
Exemplo n.º 3
0
 function __construct()
 {
     parent::__construct();
     must_login();
     # cek versi
     $versi = get_pengaturan('versi', 'value');
     if ($versi < '1.2') {
         $this->config_model->update('versi', 'Versi', '1.2');
     }
 }
Exemplo n.º 4
0
 function __construct()
 {
     parent::__construct();
     if (!$this->db->table_exists('messages')) {
         $this->msg_model->create_table();
     }
     # cek versi, kalo masih 1.0 update ke 1.1
     $versi = get_pengaturan('versi', 'value');
     if ($versi == '1.0') {
         $this->config_model->update('versi', 'Versi', '1.1');
     }
     must_login();
 }
Exemplo n.º 5
0
 function __construct()
 {
     parent::__construct();
     date_default_timezone_set($this->default_timezone);
     # load helper
     $this->load->helper(array('url', 'form', 'text', 'elearning', 'security', 'file', 'number', 'date', 'download', 'plugins'));
     try {
         $success = install_success();
         if (!$success) {
             redirect('setup');
         }
     } catch (Exception $e) {
         redirect('setup');
     }
     $this->load->database();
     # load library
     $this->load->library(array('session', 'form_validation', 'pager', 'parser', 'image_lib', 'upload', 'twig', 'user_agent', 'email'));
     # load saja semua model
     $this->load->model(array('config_model', 'kelas_model', 'login_model', 'mapel_model', 'materi_model', 'pengajar_model', 'siswa_model', 'tugas_model', 'msg_model', 'pengumuman_model', 'komentar_model'));
     # delimiters form validation
     $this->form_validation->set_error_delimiters('<span class="text-error"><i class="icon-info-sign"></i> ', '</span>');
     if (is_login()) {
         # cek session kcfindernya ada atau tidak
         if (empty($_SESSION['E-LEARNING']['KCFINDER'])) {
             create_sess_kcfinder(get_sess_data('login', 'id'));
         }
     }
     if (is_siswa()) {
         # jika kelas aktifnya kosong, sebaiknya di die jasa
         $kelas_aktif = $this->kelas_model->retrieve_siswa(null, array('siswa_id' => get_sess_data('user', 'id'), 'aktif' => 1));
         if (empty($kelas_aktif)) {
             exit('Kelas aktif anda tidak ditemukan, segera hubungi admin e-learning.');
         }
         $this->siswa_kelas_aktif = $kelas_aktif;
         # cek sedang ujian tidak
         $this->cek_mode_ujian();
     }
     $this->update_link = 'http://www.dokumenary.net/category/new-elearning/feed/';
     $this->portal_update_link = 'http://www.dokumenary.net/category/new-elearning/';
     $this->bug_tracker_link = 'http://www.dokumenary.net/category/bug-tracker-new-elearning/';
     // $this->output->enable_profiler(TRUE);
     # cek versi
     $versi_install = '1.6';
     $versi = get_pengaturan('versi', 'value');
     if ($versi < $versi_install) {
         $this->config_model->update('versi', 'Versi', $versi_install);
     }
 }
Exemplo n.º 6
0
 function edit($id = '')
 {
     $retrieve = get_pengaturan($id);
     if (empty($retrieve)) {
         redirect('email');
     }
     if (!empty($_POST) and !is_demo_app()) {
         $value = array('subject' => $_POST['subject'], 'body' => $_POST['body']);
         $this->config_model->update($id, $retrieve['nama'], json_encode($value));
         redirect('email/edit/' . $id);
     }
     $retrieve_value = json_decode($retrieve['value'], 1);
     $data['template'] = array('id' => $retrieve['id'], 'nama' => $retrieve['nama'], 'subject' => $retrieve_value['subject'], 'body' => $retrieve_value['body']);
     $data['comp_js'] = get_tinymce('body', 'simple');
     $this->twig->display('edit-email-template.html', $data);
 }
/**
 * Method untuk deklarasi array default yang akan di parser dan di berikan ke view
 *
 * @param  array  $add_item
 * @return array
 */
function default_parser_item($add_item = array())
{
    $CI =& get_instance();
    $url_referrer = '';
    if ($CI->agent->is_referral()) {
        $url_referrer = $CI->agent->referrer();
    } else {
        # kalo kosong diisi dengan segment
        $url_referrer = site_url($CI->uri->segment(1));
    }
    $return = array('base_url' => base_url(), 'site_url' => site_url(), 'favicon_url' => base_url('assets/images/favicon.ico'), 'copyright_setup' => 'Copyright &copy; 2014 Almazari - <a href="http://www.dokumenary.net">dokumenary.net</a>', 'copyright' => 'Copyright &copy; 2014 ' . get_pengaturan('nama-sekolah', 'value') . ' by Almazari - <a href="http://www.dokumenary.net">dokumenary.net</a>', 'version' => '<a href="https://github.com/almazary/new_elearning">@dev version</a>', 'current_url' => current_url(), 'logo_url_small' => get_logo_url(), 'logo_url_medium' => get_logo_url('medium'), 'logo_url_large' => get_logo_url('large'), 'base_url_theme' => base_url_theme() . '/', 'site_name_default' => 'E-Learning System', 'site_name' => 'E-Learning ' . get_pengaturan('nama-sekolah', 'value'), 'comp_css' => '', 'comp_js' => '', 'url_referrer' => $url_referrer);
    if (!empty($add_item) and is_array($add_item)) {
        $return = array_merge($return, $add_item);
    }
    return $return;
}
 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    <link type=\"text/css\" href=\"";
     // line 11
     echo twig_escape_filter($this->env, base_url("assets/comp/pace/flash.css"), "html", null, true);
     echo "\" rel=\"stylesheet\">\n    <link type=\"text/css\" href=\"";
     // line 12
     echo twig_escape_filter($this->env, base_url("assets/comp/offline/offline-theme-chrome.css"), "html", null, true);
     echo "\" rel=\"stylesheet\">\n    <script type=\"text/javascript\" src=\"//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"></script>\n    ";
     // line 14
     $this->displayBlock('css', $context, $blocks);
     // line 15
     echo "    ";
     echo isset($context["comp_css"]) ? $context["comp_css"] : null;
     echo "\n    <link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"";
     // line 16
     echo twig_escape_filter($this->env, isset($context["favicon_url"]) ? $context["favicon_url"] : null, "html", null, true);
     echo "\">\n</head>\n<body style=\"display: none;\">\n\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\n                <a class=\"brand\" href=\"";
     // line 27
     echo twig_escape_filter($this->env, site_url(), "html", null, true);
     echo "\">\n                    <img src=\"";
     // line 28
     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\n                <div class=\"nav-collapse collapse navbar-inverse-collapse\">\n                    <ul class=\"nav pull-right\">\n                        ";
     // line 33
     if (get_pengaturan("registrasi-siswa", "value") == 1 || get_pengaturan("registrasi-pengajar", "value") == 1) {
         // line 34
         echo "                        <li><a href=\"";
         echo twig_escape_filter($this->env, site_url("login/register"), "html", null, true);
         echo "\">Register</a></li>\n                        ";
     }
     // line 36
     echo "                    </ul>\n                </div>\n            </div>\n        </div><!-- /navbar-inner -->\n    </div><!-- /navbar -->\n\n    <div class=\"wrapper\">\n        <div class=\"container\">\n\n            ";
     // line 45
     $this->displayBlock('content', $context, $blocks);
     // line 46
     echo "\n        </div>\n    </div><!--/.wrapper-->\n\n    <div class=\"footer\">\n        <div class=\"container\">\n            <center>\n                <b class=\"copyright\">";
     // line 53
     echo isset($context["copyright"]) ? $context["copyright"] : null;
     echo " </b> All rights reserved.<br>\n                ";
     // line 54
     echo isset($context["version"]) ? $context["version"] : null;
     echo " | Page loaded in ";
     echo twig_escape_filter($this->env, isset($context["elapsed_time"]) ? $context["elapsed_time"] : null, "html", null, true);
     echo " seconds.\n            </center>\n        </div>\n    </div>\n    <script src=\"";
     // line 58
     echo twig_escape_filter($this->env, base_url("assets/comp/pace/pace.min.js"), "html", null, true);
     echo "\" type=\"text/javascript\"></script>\n    <script src=\"";
     // line 59
     echo twig_escape_filter($this->env, base_url("assets/comp/offline/offline.min.js"), "html", null, true);
     echo "\" type=\"text/javascript\"></script>\n    <script src=\"";
     // line 60
     echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true);
     echo "scripts/jquery-1.9.1.min.js\" type=\"text/javascript\"></script>\n    <script src=\"";
     // line 61
     echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true);
     echo "scripts/jquery-ui-1.10.1.custom.min.js\" type=\"text/javascript\"></script>\n    <script src=\"";
     // line 62
     echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true);
     echo "bootstrap/js/bootstrap.min.js\" type=\"text/javascript\"></script>\n    ";
     // line 63
     $this->displayBlock('js', $context, $blocks);
     // line 64
     echo "    ";
     echo isset($context["comp_js"]) ? $context["comp_js"] : null;
     echo "\n    <script type=\"text/javascript\">\n        \$( document ).ready(function() {\n            \$(\"body\").show();\n        });\n    </script>\n</body>\n";
 }
Exemplo n.º 9
0
function kirim_email_approve_pengajar($pengajar_id)
{
    $pengajar = get_row_data('pengajar_model', 'retrieve', array($pengajar_id));
    $login = get_row_data('login_model', 'retrieve', array(null, null, null, null, $pengajar_id));
    $tabel_profil = '<table border="1" cellspacing="0" cellpadding="5">
        <tr>
            <td valign="top">NIP</td>
            <td>' . $pengajar['nip'] . '</td>
        </tr>
        <tr>
            <td valign="top">Nama</td>
            <td>' . $pengajar['nama'] . '</td>
        </tr>
        <tr>
            <td valign="top">Jenis kelamin</td>
            <td>' . $pengajar['jenis_kelamin'] . '</td>
        </tr>
        <tr>
            <td valign="top">Tempat lahir</td>
            <td>' . $pengajar['tempat_lahir'] . '</td>
        </tr>
        <tr>
            <td valign="top">Tgl. Lahir</td>
            <td>' . tgl_indo($pengajar['tgl_lahir']) . '</td>
        </tr>
        <tr>
            <td valign="top">Alamat</td>
            <td>' . $pengajar['alamat'] . '</td>
        </tr>
    </table>';
    @kirim_email('email-template-approve-pengajar', $login['username'], array('nama' => $nama, 'nama_sekolah' => get_pengaturan('nama-sekolah', 'value'), 'tabel_profil' => $tabel_profil, 'url_login' => site_url('login')));
}
Exemplo n.º 10
0
 function index($step = '')
 {
     switch ($step) {
         case '4':
             if (!empty($this->db_error)) {
                 redirect('setup/index/1');
             }
             $check = $this->config_model->retrieve('nama-sekolah');
             if (empty($check)) {
                 redirect('setup/index/2');
             }
             # cek kelas
             $check = $this->db->count_all_results('kelas');
             if (empty($check)) {
                 redirect('setup/index/3');
             }
             if ($this->form_validation->run('register/pengajar') == true) {
                 $nip = $this->input->post('nip', TRUE);
                 $nama = $this->input->post('nama', TRUE);
                 $jenis_kelamin = $this->input->post('jenis_kelamin', TRUE);
                 $tempat_lahir = $this->input->post('tempat_lahir', TRUE);
                 $tgl_lahir = $this->input->post('tgl_lahir', TRUE);
                 $bln_lahir = $this->input->post('bln_lahir', TRUE);
                 $thn_lahir = $this->input->post('thn_lahir', TRUE);
                 $alamat = $this->input->post('alamat', TRUE);
                 $username = $this->input->post('username', TRUE);
                 $password = $this->input->post('password2', TRUE);
                 $is_admin = 1;
                 $foto = null;
                 if (empty($thn_lahir)) {
                     $tanggal_lahir = null;
                 } else {
                     $tanggal_lahir = $thn_lahir . '-' . $bln_lahir . '-' . $tgl_lahir;
                 }
                 # simpan data siswa
                 $pengajar_id = $this->pengajar_model->create($nip, $nama, $jenis_kelamin, $tempat_lahir, $tanggal_lahir, $alamat, $foto, 1);
                 # simpan data login
                 $this->login_model->create($username, $password, null, $pengajar_id, $is_admin);
                 # create success install
                 $this->config_model->create('install-success', 'install-success', '1');
                 $this->session->set_flashdata('login', get_alert('success', 'Instalasi e-learning berhasil, silahkan login sebagai administrator.'));
                 redirect('login');
             }
             # cek admin
             $this->db->where('is_admin', 1);
             $result = $this->db->get('login');
             $result = $result->row_array();
             $data['success'] = false;
             if (!empty($result)) {
                 $data['success'] = true;
             }
             $this->twig->display('install-step-4.html', $data);
             break;
         case '3':
             if (!empty($this->db_error)) {
                 redirect('setup/index/1');
             }
             $check = $this->config_model->retrieve('nama-sekolah');
             if (empty($check)) {
                 redirect('setup/index/2');
             }
             # cek kelas
             $check = $this->db->count_all_results('kelas');
             if (!empty($check)) {
                 redirect('setup/index/4');
             }
             if (!empty($_POST)) {
                 # simpan kelas
                 foreach ($_POST['kelas'] as $key => $val) {
                     # cek parent sudah ada belum
                     $this->db->where('nama', "KELAS {$key}");
                     $this->db->where('parent_id', null);
                     $result = $this->db->get('kelas');
                     $parent = $result->row_array();
                     if (empty($parent)) {
                         $parent_id = $this->kelas_model->create("KELAS {$key}", null);
                     } else {
                         $parent_id = $parent['id'];
                     }
                     # simpan child
                     foreach ($val as $child) {
                         $this->db->where('nama', "KELAS {$key} - {$child}");
                         $this->db->where('parent_id', $parent_id);
                         $result = $this->db->get('kelas');
                         $result = $result->row_array();
                         if (empty($result)) {
                             $this->kelas_model->create("KELAS {$key} - {$child}", $parent_id);
                         }
                     }
                 }
                 # simpan mapel
                 foreach ($_POST['mapel'] as $nama) {
                     # cek mapel
                     $this->db->where('nama', $nama);
                     $result = $this->db->get('mapel');
                     $result = $result->row_array();
                     if (empty($result)) {
                         $this->mapel_model->create($nama);
                     }
                 }
                 redirect('setup/index/4');
             }
             $data['jenjang'] = get_pengaturan('jenjang', 'value');
             $this->twig->display('install-step-3.html', $data);
             break;
         case '2':
             if (!empty($this->db_error)) {
                 redirect('setup/index/1');
             }
             $check = $this->config_model->retrieve('nama-sekolah');
             if (!empty($check)) {
                 redirect('setup/index/3');
             }
             if ($this->form_validation->run('setup/index/2') == true) {
                 foreach ($_POST as $key => $val) {
                     $this->config_model->create($key, $key, $val);
                 }
                 redirect('setup/index/3');
             }
             $this->twig->display('install-step-2.html');
             break;
         case '1':
         default:
             if (empty($this->db_error)) {
                 # cek tabel pengaturan, jika sudah ada lanjut ke step 2
                 if ($this->db->table_exists('pengaturan')) {
                     redirect('setup/index/2');
                 }
                 # run query
                 $sql = file_get_contents(APPPATH . 'install/table-master');
                 $sql = str_replace('{$prefix}', $this->prefix, $sql);
                 $sqls = explode(';', $sql);
                 array_pop($sqls);
                 $this->db->trans_start();
                 foreach ($sqls as $statement) {
                     $statment = $statement . ";";
                     $this->db->query($statement);
                 }
                 $this->db->trans_complete();
                 redirect('setup/index/2');
             }
             $set_base_url = explode('index.php', current_url());
             $data['set_base_url'] = $set_base_url[0];
             $data['error'] = $this->db_error;
             $this->twig->display('install-step-1.html', $data);
             break;
     }
 }
Exemplo n.º 11
0
 function register($sebagai = 'siswa')
 {
     if (is_login()) {
         redirect('welcome');
     }
     # cek fitur
     $registrasi_siswa = get_pengaturan('registrasi-siswa', 'value');
     $registrasi_pengajar = get_pengaturan('registrasi-pengajar', 'value');
     if (empty($registrasi_siswa) && empty($registrasi_pengajar)) {
         redirect('login');
     }
     $sebagai = empty($sebagai) ? 'siswa' : $sebagai;
     $allow_register = array('siswa', 'pengajar');
     if (!in_array($sebagai, $allow_register)) {
         redirect('login/register');
     }
     if (empty($registrasi_siswa) && $sebagai == 'siswa') {
         redirect('login/register/pengajar');
     }
     if (empty($registrasi_pengajar) && $sebagai == 'pengajar') {
         redirect('login/register/siswa');
     }
     $data = array();
     if ($sebagai == 'siswa') {
         if ($this->form_validation->run('register/siswa') == true) {
             $nis = $this->input->post('nis', TRUE);
             $nama = $this->input->post('nama', TRUE);
             $jenis_kelamin = $this->input->post('jenis_kelamin', TRUE);
             $tahun_masuk = $this->input->post('tahun_masuk', TRUE);
             $kelas_id = $this->input->post('kelas_id', TRUE);
             $tempat_lahir = $this->input->post('tempat_lahir', TRUE);
             $tgl_lahir = $this->input->post('tgl_lahir', TRUE);
             $bln_lahir = $this->input->post('bln_lahir', TRUE);
             $thn_lahir = $this->input->post('thn_lahir', TRUE);
             $agama = $this->input->post('agama', TRUE);
             $alamat = $this->input->post('alamat', TRUE);
             $username = $this->input->post('username', TRUE);
             $password = $this->input->post('password2', TRUE);
             if (empty($thn_lahir)) {
                 $tanggal_lahir = null;
             } else {
                 $tanggal_lahir = $thn_lahir . '-' . $bln_lahir . '-' . $tgl_lahir;
             }
             $foto = null;
             # simpan data siswa
             $siswa_id = $this->siswa_model->create($nis, $nama, $jenis_kelamin, $tempat_lahir, $tanggal_lahir, $agama, $alamat, $tahun_masuk, $foto, 0);
             # simpan data login
             $this->login_model->create($username, $password, $siswa_id, null);
             # simpan kelas siswa
             $this->kelas_model->create_siswa($kelas_id, $siswa_id, 1);
             # kirim email registrasi
             @kirim_email('email-template-register-siswa', $username, array('nama' => $nama, 'nama_sekolah' => get_pengaturan('nama-sekolah', 'value')));
             $this->session->set_flashdata('register', get_alert('success', 'Terimakasih telah melakukan registrasi sebagai siswa, tunggu pengaktifan akun oleh admin.'));
             redirect('login/register/siswa');
         }
         $data['kelas'] = $this->kelas_model->retrieve_all_child();
     } elseif ($sebagai == 'pengajar') {
         if ($this->form_validation->run('register/pengajar') == true) {
             $nip = $this->input->post('nip', TRUE);
             $nama = $this->input->post('nama', TRUE);
             $jenis_kelamin = $this->input->post('jenis_kelamin', TRUE);
             $tempat_lahir = $this->input->post('tempat_lahir', TRUE);
             $tgl_lahir = $this->input->post('tgl_lahir', TRUE);
             $bln_lahir = $this->input->post('bln_lahir', TRUE);
             $thn_lahir = $this->input->post('thn_lahir', TRUE);
             $alamat = $this->input->post('alamat', TRUE);
             $username = $this->input->post('username', TRUE);
             $password = $this->input->post('password2', TRUE);
             $is_admin = 0;
             $foto = null;
             if (empty($thn_lahir)) {
                 $tanggal_lahir = null;
             } else {
                 $tanggal_lahir = $thn_lahir . '-' . $bln_lahir . '-' . $tgl_lahir;
             }
             # simpan data siswa
             $pengajar_id = $this->pengajar_model->create($nip, $nama, $jenis_kelamin, $tempat_lahir, $tanggal_lahir, $alamat, $foto, 0);
             # simpan data login
             $this->login_model->create($username, $password, null, $pengajar_id, $is_admin);
             # kirim email registrasi
             @kirim_email('email-template-register-pengajar', $username, array('nama' => $nama, 'nama_sekolah' => get_pengaturan('nama-sekolah', 'value')));
             $this->session->set_flashdata('register', get_alert('success', 'Terimakasih telah melakukan registrasi sebagai pengajar, tunggu pengaktifan akun oleh admin.'));
             redirect('login/register/pengajar');
         }
     }
     $data['sebagai'] = $sebagai;
     $this->twig->display('register.html', $data);
 }
 public function block_content($context, array $blocks = array())
 {
     // line 8
     echo "<div class=\"module\">\n    <div class=\"module-head\">\n        <h3>Pengaturan</h3>\n    </div>\n    <div class=\"module-body\">\n        ";
     // line 13
     echo get_flashdata("pengaturan");
     echo "\n\n        ";
     // line 15
     if (is_demo_app()) {
         // line 16
         echo "            ";
         echo get_alert("warning", get_demo_msg());
         echo "\n        ";
     }
     // line 18
     echo "\n        ";
     // line 19
     echo form_open_multipart("welcome/pengaturan", array("class" => "form-horizontal row-fluid"));
     echo "\n            <div class=\"control-group\">\n                <label class=\"control-label\">Nama sekolah <span class=\"text-error\">*</span></label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"nama-sekolah\" class=\"span8\" value=\"";
     // line 23
     echo twig_escape_filter($this->env, set_value("nama-sekolah", get_pengaturan("nama-sekolah", "value")), "html", null, true);
     echo "\">\n                    <br>";
     // line 24
     echo form_error("nama-sekolah");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Alamat sekolah <span class=\"text-error\">*</span></label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"alamat\" class=\"span8\" value=\"";
     // line 30
     echo twig_escape_filter($this->env, set_value("alamat", get_pengaturan("alamat", "value")), "html", null, true);
     echo "\">\n                    <br>";
     // line 31
     echo form_error("alamat");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Telpon</label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"telp\" class=\"span5\" value=\"";
     // line 37
     echo twig_escape_filter($this->env, set_value("telp", get_pengaturan("telp", "value")), "html", null, true);
     echo "\">\n                    <br>";
     // line 38
     echo form_error("telp");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Registrasi siswa</label>\n                <div class=\"controls\">\n                    <label class=\"radio inline\">\n                        <input type=\"radio\" name=\"registrasi-siswa\" value=\"1\" ";
     // line 45
     echo twig_escape_filter($this->env, set_radio("registrasi-siswa", "1", get_pengaturan("registrasi-siswa", "value") == "1" ? true : ""), "html", null, true);
     echo "> Tampilkan\n                    </label>\n                    <label class=\"radio inline\">\n                        <input type=\"radio\" name=\"registrasi-siswa\" value=\"0\" ";
     // line 48
     echo twig_escape_filter($this->env, set_radio("registrasi-siswa", "0", get_pengaturan("registrasi-siswa", "value") == "0" ? true : ""), "html", null, true);
     echo "> Sembunyikan\n                    </label>\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Registrasi pengajar</label>\n                <div class=\"controls\">\n                    <label class=\"radio inline\">\n                        <input type=\"radio\" name=\"registrasi-pengajar\" value=\"1\" ";
     // line 56
     echo twig_escape_filter($this->env, set_radio("registrasi-pengajar", "1", get_pengaturan("registrasi-pengajar", "value") == "1" ? true : ""), "html", null, true);
     echo "> Tampilkan\n                    </label>\n                    <label class=\"radio inline\">\n                        <input type=\"radio\" name=\"registrasi-pengajar\" value=\"0\" ";
     // line 59
     echo twig_escape_filter($this->env, set_radio("registrasi-pengajar", "0", get_pengaturan("registrasi-pengajar", "value") == "0" ? true : ""), "html", null, true);
     echo "> Sembunyikan\n                    </label>\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Info Registrasi</label>\n                <div class=\"controls\">\n                    <textarea name=\"info-registrasi\" class=\"tinymce\" style=\"width:100%; height:300px;\">";
     // line 66
     echo set_value("info-registrasi", get_pengaturan("info-registrasi", "value"));
     echo "</textarea>\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Peraturan E-learning</label>\n                <div class=\"controls\">\n                    <textarea name=\"peraturan-elearning\" class=\"tinymce\" style=\"width:100%; height:300px;\">";
     // line 72
     echo set_value("peraturan-elearning", get_pengaturan("peraturan-elearning", "value"));
     echo "</textarea>\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Email server</label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"email-server\" class=\"span5\" value=\"";
     // line 78
     echo twig_escape_filter($this->env, set_value("email-server", get_pengaturan("email-server", "value")), "html", null, true);
     echo "\">\n                    <br>";
     // line 79
     echo form_error("email-server");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">SMTP host</label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"smtp-host\" class=\"span5\" value=\"";
     // line 85
     echo twig_escape_filter($this->env, set_value("smtp-host", get_pengaturan("smtp-host", "value")), "html", null, true);
     echo "\">\n                    <br>";
     // line 86
     echo form_error("smtp-host");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">SMTP username</label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"smtp-username\" class=\"span5\" value=\"";
     // line 92
     echo twig_escape_filter($this->env, set_value("smtp-username", get_pengaturan("smtp-username", "value")), "html", null, true);
     echo "\">\n                    <br>";
     // line 93
     echo form_error("smtp-username");
     echo "\n                </div>\n            </div>\n            ";
     // line 96
     if (is_demo_app() == false) {
         // line 97
         echo "            <div class=\"control-group\">\n                <label class=\"control-label\">SMTP password</label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"smtp-pass\" class=\"span5\" value=\"";
         // line 100
         echo twig_escape_filter($this->env, set_value("smtp-pass", get_pengaturan("smtp-pass", "value")), "html", null, true);
         echo "\">\n                    <br>";
         // line 101
         echo form_error("smtp-pass");
         echo "\n                </div>\n            </div>\n            ";
     }
     // line 105
     echo "            <div class=\"control-group\">\n                <label class=\"control-label\">SMTP port</label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"smtp-port\" class=\"span5\" value=\"";
     // line 108
     echo twig_escape_filter($this->env, set_value("smtp-port", get_pengaturan("smtp-port", "value")), "html", null, true);
     echo "\">\n                    <br>";
     // line 109
     echo form_error("smtp-port");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Slider halaman login</label>\n                <div class=\"controls\" style=\"background-color: #FBFBFB; padding: 10px;border-radius: 5px;\">\n                    <table class=\"table table-condensed\">\n                        <tr>\n                            <td style=\"border-top: none;\">\n                                <div class=\"row-fluid\">\n                                    <div class=\"span2\" style=\"margin-bottom: 10px;\">\n                                        Gambar 1\n                                    </div>\n                                    <div class=\"span10\">\n                                        ";
     // line 123
     if (get_pengaturan("img-slide-1", "value")) {
         // line 124
         echo "                                        <a href=\"";
         echo twig_escape_filter($this->env, site_url("welcome/pengaturan/?delete-img=1"), "html", null, true);
         echo "\" class=\"pull-right\" title=\"Hapus gambar\"><i class=\"icon-trash\"></i></a>\n                                        <img src=\"";
         // line 125
         echo twig_escape_filter($this->env, get_url_image(get_pengaturan("img-slide-1", "value")), "html", null, true);
         echo "\" class=\"img-polaroid\" style=\"max-height: 150px;margin-bottom:10px;\">\n                                        <br>Ganti gambar :\n                                        ";
     }
     // line 128
     echo "                                        <input type=\"file\" name=\"img-slide-1\">\n                                    </div>\n                                </div>\n                                <div class=\"row-fluid\" style=\"margin-bottom: 10px;margin-top: 10px;\">\n                                    <div class=\"span2\">\n                                        Info gambar 1\n                                    </div>\n                                    <div class=\"span10\">\n                                        <textarea name=\"info-slide-1\" class=\"span12\" placeholder=\"text atau html\">";
     // line 136
     echo set_value("info-slide-1", get_pengaturan("info-slide-1", "value"));
     echo "</textarea>\n                                    </div>\n                                </div>\n                            </td>\n                        </tr>\n                        <tr>\n                            <td style=\"border-top:1px dashed #fbfbfb;\">\n                                <div class=\"row-fluid\">\n                                    <div class=\"span2\" style=\"margin-bottom: 10px;\">\n                                        Gambar 2\n                                    </div>\n                                    <div class=\"span10\">\n                                        ";
     // line 148
     if (get_pengaturan("img-slide-2", "value")) {
         // line 149
         echo "                                        <a href=\"";
         echo twig_escape_filter($this->env, site_url("welcome/pengaturan/?delete-img=2"), "html", null, true);
         echo "\" class=\"pull-right\" title=\"Hapus gambar\"><i class=\"icon-trash\"></i></a>\n                                        <img src=\"";
         // line 150
         echo twig_escape_filter($this->env, get_url_image(get_pengaturan("img-slide-2", "value")), "html", null, true);
         echo "\" class=\"img-polaroid\" style=\"max-height: 150px;margin-bottom:10px;\">\n                                        <br>Ganti gambar :\n                                        ";
     }
     // line 153
     echo "                                        <input type=\"file\" name=\"img-slide-2\">\n                                    </div>\n                                </div>\n                                <div class=\"row-fluid\" style=\"margin-bottom: 10px;margin-top: 10px;\">\n                                    <div class=\"span2\">\n                                        Info gambar 2\n                                    </div>\n                                    <div class=\"span10\">\n                                        <textarea name=\"info-slide-2\" class=\"span12\" placeholder=\"text atau html\">";
     // line 161
     echo set_value("info-slide-2", get_pengaturan("info-slide-2", "value"));
     echo "</textarea>\n                                    </div>\n                                </div>\n                            </td>\n                        </tr>\n                        <tr>\n                            <td style=\"border-top:1px dashed #fbfbfb;\">\n                                <div class=\"row-fluid\">\n                                    <div class=\"span2\" style=\"margin-bottom: 10px;\">\n                                        Gambar 3\n                                    </div>\n                                    <div class=\"span10\">\n                                        ";
     // line 173
     if (get_pengaturan("img-slide-3", "value")) {
         // line 174
         echo "                                        <a href=\"";
         echo twig_escape_filter($this->env, site_url("welcome/pengaturan/?delete-img=3"), "html", null, true);
         echo "\" class=\"pull-right\" title=\"Hapus gambar\"><i class=\"icon-trash\"></i></a>\n                                        <img src=\"";
         // line 175
         echo twig_escape_filter($this->env, get_url_image(get_pengaturan("img-slide-3", "value")), "html", null, true);
         echo "\" class=\"img-polaroid\" style=\"max-height: 150px;margin-bottom:10px;\">\n                                        <br>Ganti gambar :\n                                        ";
     }
     // line 178
     echo "                                        <input type=\"file\" name=\"img-slide-3\">\n                                    </div>\n                                </div>\n                                <div class=\"row-fluid\" style=\"margin-bottom: 10px;margin-top: 10px;\">\n                                    <div class=\"span2\">\n                                        Info gambar 3\n                                    </div>\n                                    <div class=\"span10\">\n                                        <textarea name=\"info-slide-3\" class=\"span12\" placeholder=\"text atau html\">";
     // line 186
     echo set_value("info-slide-3", get_pengaturan("info-slide-3", "value"));
     echo "</textarea>\n                                    </div>\n                                </div>\n                            </td>\n                        </tr>\n                        <tr>\n                            <td style=\"border-top:1px dashed #fbfbfb;\">\n                                <div class=\"row-fluid\">\n                                    <div class=\"span2\" style=\"margin-bottom: 10px;\">\n                                        Gambar 4\n                                    </div>\n                                    <div class=\"span10\">\n                                        ";
     // line 198
     if (get_pengaturan("img-slide-4", "value")) {
         // line 199
         echo "                                        <a href=\"";
         echo twig_escape_filter($this->env, site_url("welcome/pengaturan/?delete-img=4"), "html", null, true);
         echo "\" class=\"pull-right\" title=\"Hapus gambar\"><i class=\"icon-trash\"></i></a>\n                                        <img src=\"";
         // line 200
         echo twig_escape_filter($this->env, get_url_image(get_pengaturan("img-slide-4", "value")), "html", null, true);
         echo "\" class=\"img-polaroid\" style=\"max-height: 150px;margin-bottom:10px;\">\n                                        <br>Ganti gambar :\n                                        ";
     }
     // line 203
     echo "                                        <input type=\"file\" name=\"img-slide-4\">\n                                    </div>\n                                </div>\n                                <div class=\"row-fluid\" style=\"margin-bottom: 10px;margin-top: 10px;\">\n                                    <div class=\"span2\">\n                                        Info gambar 4\n                                    </div>\n                                    <div class=\"span10\">\n                                        <textarea name=\"info-slide-4\" class=\"span12\" placeholder=\"text atau html\">";
     // line 211
     echo set_value("info-slide-4", get_pengaturan("info-slide-4", "value"));
     echo "</textarea>\n                                    </div>\n                                </div>\n                            </td>\n                        </tr>\n                    </table>\n                </div>\n            </div>\n\n            ";
     // line 220
     if (is_demo_app() == false) {
         // line 221
         echo "            <div class=\"control-group\">\n                <div class=\"controls\">\n                    <button type=\"submit\" class=\"btn btn-primary\">Update</button>\n                </div>\n            </div>\n            ";
     }
     // line 227
     echo "        ";
     echo form_close();
     echo "\n\n    </div>\n</div>\n";
 }
 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     echo "<!DOCTYPE html>\n<html>\n<head>\n    <title>Print Nilai</title>\n    <link type=\"text/css\" href=\"";
     // line 5
     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 6
     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 7
     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 8
     $this->displayBlock('css', $context, $blocks);
     // line 9
     echo "    <link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"";
     echo twig_escape_filter($this->env, isset($context["favicon_url"]) ? $context["favicon_url"] : null, "html", null, true);
     echo "\">\n</head>\n<body onload=\"window.print()\">\n<div class=\"container\">\n    <center>\n        <h3 style=\"margin-bottom: 0px;line-height: 30px;\">";
     // line 14
     echo twig_escape_filter($this->env, get_pengaturan("nama-sekolah", "value"), "html", null, true);
     echo "</h3>\n        ";
     // line 15
     echo twig_escape_filter($this->env, get_pengaturan("alamat", "value"), "html", null, true);
     echo "\n    </center>\n    <hr style=\"border: none;border-bottom: 2px solid #333;margin-bottom: 10px;margin-top: 10px;\">\n\n    <p><b>Nilai ";
     // line 19
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "judul"), "html", null, true);
     echo ", ";
     echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "mapel"), "nama"), "html", null, true);
     echo "</b></p>\n\n    ";
     // line 21
     if ($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "type_id") == 3) {
         // line 22
         echo "    <table class=\"table table-bordered table-striped\">\n        <thead>\n            <tr>\n                <th width=\"5%\">No</th>\n                <th>Nis</th>\n                <th>Nama</th>\n                <th>Kelas</th>\n                <th>Benar</th>\n                <th>Salah</th>\n                <th>Kosong</th>\n                <th>Nilai</th>\n            </tr>\n        </thead>\n        <tbody>\n            ";
         // line 36
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["data_nilai"]) ? $context["data_nilai"] : null);
         $context['loop'] = array('parent' => $context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true);
         if (is_array($context['_seq']) || is_object($context['_seq']) && $context['_seq'] instanceof Countable) {
             $length = count($context['_seq']);
             $context['loop']['revindex0'] = $length - 1;
             $context['loop']['revindex'] = $length;
             $context['loop']['length'] = $length;
             $context['loop']['last'] = 1 === $length;
         }
         foreach ($context['_seq'] as $context["_key"] => $context["n"]) {
             // line 37
             echo "            <tr>\n                <td>";
             // line 38
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["loop"]) ? $context["loop"] : null, "index"), "html", null, true);
             echo ".</td>\n                <td>";
             // line 39
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["n"]) ? $context["n"] : null, "siswa"), "nis"), "html", null, true);
             echo "</td>\n                <td>";
             // line 40
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["n"]) ? $context["n"] : null, "siswa"), "nama"), "html", null, true);
             echo "</td>\n                <td>";
             // line 41
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute(isset($context["n"]) ? $context["n"] : null, "siswa"), "kelas_aktif"), "nama"), "html", null, true);
             echo "</td>\n                <td>";
             // line 42
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute(isset($context["n"]) ? $context["n"] : null, "history"), "value"), "jml_benar"), "html", null, true);
             echo "</td>\n                <td>";
             // line 43
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute(isset($context["n"]) ? $context["n"] : null, "history"), "value"), "jml_salah"), "html", null, true);
             echo "</td>\n                <td>";
             // line 44
             echo twig_escape_filter($this->env, count($this->getAttribute($this->getAttribute($this->getAttribute(isset($context["n"]) ? $context["n"] : null, "history"), "value"), "pertanyaan")) != $this->getAttribute($this->getAttribute($this->getAttribute(isset($context["n"]) ? $context["n"] : null, "history"), "value"), "jml_benar") + $this->getAttribute($this->getAttribute($this->getAttribute(isset($context["n"]) ? $context["n"] : null, "history"), "value"), "jml_salah") ? count($this->getAttribute($this->getAttribute($this->getAttribute(isset($context["n"]) ? $context["n"] : null, "history"), "value"), "pertanyaan")) - ($this->getAttribute($this->getAttribute($this->getAttribute(isset($context["n"]) ? $context["n"] : null, "history"), "value"), "jml_benar") + $this->getAttribute($this->getAttribute($this->getAttribute(isset($context["n"]) ? $context["n"] : null, "history"), "value"), "jml_salah")) : 0, "html", null, true);
             echo "</td>\n                <td>";
             // line 45
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["n"]) ? $context["n"] : null, "nilai"), "html", null, true);
             echo "</td>\n            </tr>\n            ";
             ++$context['loop']['index0'];
             ++$context['loop']['index'];
             $context['loop']['first'] = false;
             if (isset($context['loop']['length'])) {
                 --$context['loop']['revindex0'];
                 --$context['loop']['revindex'];
                 $context['loop']['last'] = 0 === $context['loop']['revindex0'];
             }
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['n'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 48
         echo "        </tbody>\n    </table>\n    ";
     }
     // line 51
     echo "\n    ";
     // line 52
     if ($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "type_id") == 2 || $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "type_id") == 1) {
         // line 53
         echo "    <table class=\"table table-bordered table-striped\">\n        <thead>\n            <tr>\n                <th width=\"5%\">No</th>\n                <th>Nis</th>\n                <th>Nama</th>\n                <th>Kelas</th>\n                <th>Nilai</th>\n            </tr>\n        </thead>\n        <tbody>\n            ";
         // line 64
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["data_siswa"]) ? $context["data_siswa"] : null);
         $context['loop'] = array('parent' => $context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true);
         if (is_array($context['_seq']) || is_object($context['_seq']) && $context['_seq'] instanceof Countable) {
             $length = count($context['_seq']);
             $context['loop']['revindex0'] = $length - 1;
             $context['loop']['revindex'] = $length;
             $context['loop']['length'] = $length;
             $context['loop']['last'] = 1 === $length;
         }
         foreach ($context['_seq'] as $context["_key"] => $context["s"]) {
             // line 65
             echo "            <tr>\n                <td>";
             // line 66
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["loop"]) ? $context["loop"] : null, "index"), "html", null, true);
             echo ".</td>\n                <td>";
             // line 67
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "nis"), "html", null, true);
             echo "</td>\n                <td>";
             // line 68
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "nama"), "html", null, true);
             echo "</td>\n                <td>";
             // line 69
             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 70
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "nilai"), "nilai"), "html", null, true);
             echo "</td>\n            </tr>\n            ";
             ++$context['loop']['index0'];
             ++$context['loop']['index'];
             $context['loop']['first'] = false;
             if (isset($context['loop']['length'])) {
                 --$context['loop']['revindex0'];
                 --$context['loop']['revindex'];
                 $context['loop']['last'] = 0 === $context['loop']['revindex0'];
             }
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['s'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 73
         echo "        </tbody>\n    </table>\n    ";
     }
     // line 76
     echo "</div>\n</body>\n</html>";
 }
Exemplo n.º 14
0
 function edit_username($segment_3 = '', $segment_4 = '')
 {
     if (is_pengajar()) {
         exit('Akses ditolak');
     }
     # cek pengaturan
     if (is_siswa() and get_pengaturan('edit-username-siswa', 'value') == '0') {
         exit('Maaf fitur dinonaktifkan oleh administrator');
     }
     $status_id = (int) $segment_3;
     $siswa_id = (int) $segment_4;
     $retrieve_siswa = $this->siswa_model->retrieve($siswa_id);
     if (empty($retrieve_siswa)) {
         exit('Data siswa tidak ditemukan');
     }
     # jika sebagai siswa, hanya profilnya dia yang bisa diupdate
     if (is_siswa() and get_sess_data('user', 'id') != $retrieve_siswa['id']) {
         exit('Akses ditolak');
     }
     $data['login'] = $this->login_model->retrieve(null, null, null, $siswa_id);
     $data['status_id'] = $status_id;
     $data['siswa_id'] = $siswa_id;
     if ($this->form_validation->run('siswa/edit_username') == TRUE) {
         $login_id = $this->input->post('login_id', TRUE);
         $username = $this->input->post('username', TRUE);
         # update username
         $this->login_model->update($login_id, $username, $siswa_id, null, $data['login']['is_admin'], $data['login']['reset_kode']);
         $this->session->set_flashdata('edit', get_alert('success', 'Username siswa berhasil diperbaharui.'));
         redirect('siswa/edit_username/' . $status_id . '/' . $siswa_id);
     }
     $this->twig->display('edit-siswa-username.html', $data);
 }
 public function block_content($context, array $blocks = array())
 {
     // line 8
     echo "<div class=\"row\">\n    <div class=\"module span8 offset2\">\n            <div class=\"module-head\">\n                <h3>Register E-learning</h3>\n            </div>\n\n            <div class=\"module-body\">\n                ";
     // line 15
     echo get_flashdata("register");
     echo "\n\n                ";
     // line 17
     if (!twig_test_empty(get_pengaturan("info-registrasi", "value"))) {
         // line 18
         echo "                <div class=\"well well-small\" style=\"box-shadow: none;\">\n                    <b>Informasi : </b><br>\n                    ";
         // line 20
         echo get_pengaturan("info-registrasi", "value");
         echo "\n                </div>\n                ";
     }
     // line 23
     echo "\n                <ul class=\"nav nav-tabs\">\n                    ";
     // line 25
     if (get_pengaturan("registrasi-siswa", "value") == 1) {
         // line 26
         echo "                    <li ";
         echo (isset($context["sebagai"]) ? $context["sebagai"] : null) == "siswa" ? "class=\"active\"" : "";
         echo "><a href=\"#register-siswa\" data-toggle=\"tab\">Sebagai siswa</a></li>\n                    ";
     }
     // line 28
     echo "\n                    ";
     // line 29
     if (get_pengaturan("registrasi-pengajar", "value") == 1) {
         // line 30
         echo "                    <li ";
         echo (isset($context["sebagai"]) ? $context["sebagai"] : null) == "pengajar" ? "class=\"active\"" : "";
         echo "><a href=\"#register-pengajar\" data-toggle=\"tab\">Sebagai pengajar</a></li>\n                    ";
     }
     // line 32
     echo "                </ul>\n\n                <div class=\"tab-content\">\n                    ";
     // line 35
     if (get_pengaturan("registrasi-siswa", "value") == 1) {
         // line 36
         echo "                    <div class=\"tab-pane fade ";
         echo (isset($context["sebagai"]) ? $context["sebagai"] : null) == "siswa" ? "active" : "";
         echo " in\" id=\"register-siswa\">\n                        ";
         // line 37
         echo form_open_multipart("login/register/siswa", array("class" => "form-horizontal row-fluid"));
         echo "\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">NIS</label>\n                                <div class=\"controls\">\n                                    <input type=\"text\" id=\"nis\" name=\"nis\" class=\"span4\" value=\"";
         // line 41
         echo twig_escape_filter($this->env, set_value("nis"), "html", null, true);
         echo "\">\n                                    <br>";
         // line 42
         echo form_error("nis");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Nama <span class=\"text-error\">*</span></label>\n                                <div class=\"controls\">\n                                    <input type=\"text\" name=\"nama\" class=\"span8\" value=\"";
         // line 48
         echo twig_escape_filter($this->env, set_value("nama"), "html", null, true);
         echo "\">\n                                    <br>";
         // line 49
         echo form_error("nama");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Jenis Kelamin <span class=\"text-error\">*</span></label>\n                                <div class=\"controls\">\n                                    <label class=\"radio inline\"><input type=\"radio\" name=\"jenis_kelamin\" value=\"Laki-laki\" ";
         // line 55
         echo twig_escape_filter($this->env, set_radio("jenis_kelamin", "Laki-laki"), "html", null, true);
         echo "> Laki-laki</label>\n                                    <label class=\"radio inline\"><input type=\"radio\" name=\"jenis_kelamin\" value=\"Perempuan\" ";
         // line 56
         echo twig_escape_filter($this->env, set_radio("jenis_kelamin", "Perempuan"), "html", null, true);
         echo "> Perempuan</label>\n                                    <br>";
         // line 57
         echo form_error("jenis_kelamin");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Tahun Masuk <span class=\"text-error\">*</span></label>\n                                <div class=\"controls\">\n                                    <input type=\"text\" name=\"tahun_masuk\" class=\"span2\" maxlength=\"4\" value=\"";
         // line 63
         echo twig_escape_filter($this->env, set_value("tahun_masuk"), "html", null, true);
         echo "\">\n                                    <br>";
         // line 64
         echo form_error("tahun_masuk");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Kelas <span class=\"text-error\">*</span></label>\n                                <div class=\"controls\">\n                                    <select class=\"span3\" name=\"kelas_id\">\n                                        <option value=\"\">--pilih--</option>\n                                        ";
         // line 72
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["kelas"]) ? $context["kelas"] : null);
         foreach ($context['_seq'] as $context["_key"] => $context["k"]) {
             // line 73
             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, set_select("kelas_id", $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 75
         echo "                                    </select>\n                                    <br>";
         // line 76
         echo form_error("kelas_id");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Tempat Lahir</label>\n                                <div class=\"controls\">\n                                    <input type=\"text\" name=\"tempat_lahir\" class=\"span5\" value=\"";
         // line 82
         echo twig_escape_filter($this->env, set_value("tempat_lahir"), "html", null, true);
         echo "\">\n                                    <br>";
         // line 83
         echo form_error("tempat_lahir");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Tanggal Lahir</label>\n                                <div class=\"controls\">\n                                    <select class=\"span2\" style=\"width: 10%;\" name=\"tgl_lahir\">\n                                        <option value=\"\">Tgl</option>\n                                        ";
         // line 91
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(range(1, 31));
         foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
             // line 92
             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), "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 94
         echo "                                    </select>\n                                    <select class=\"span2\" style=\"width: 17%;\" name=\"bln_lahir\">\n                                        <option value=\"\">Bulan</option>\n                                        ";
         // line 97
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(range(1, 12));
         foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
             // line 98
             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), "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 100
         echo "                                    </select>\n                                    <input type=\"text\" name=\"thn_lahir\" class=\"span2\" maxlength=\"4\" value=\"";
         // line 101
         echo twig_escape_filter($this->env, set_value("thn_lahir"), "html", null, true);
         echo "\" placeholder=\"Tahun\">\n                                    <br>";
         // line 102
         echo form_error("thn_lahir");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Agama</label>\n                                <div class=\"controls\">\n                                    <select name=\"agama\" class=\"span2\">\n                                        <option value=\"\">--pilih--</option>\n                                        <option value=\"ISLAM\" ";
         // line 110
         echo twig_escape_filter($this->env, set_select("agama", "ISLAM"), "html", null, true);
         echo ">ISLAM</option>\n                                        <option value=\"KRISTEN\" ";
         // line 111
         echo twig_escape_filter($this->env, set_select("agama", "KRISTEN"), "html", null, true);
         echo ">KRISTEN</option>\n                                        <option value=\"KATOLIK\" ";
         // line 112
         echo twig_escape_filter($this->env, set_select("agama", "KATOLIK"), "html", null, true);
         echo ">KATOLIK</option>\n                                        <option value=\"HINDU\" ";
         // line 113
         echo twig_escape_filter($this->env, set_select("agama", "HINDU"), "html", null, true);
         echo ">HINDU</option>\n                                        <option value=\"BUDHA\" ";
         // line 114
         echo twig_escape_filter($this->env, set_select("agama", "BUDHA"), "html", null, true);
         echo ">BUDHA</option>\n                                    </select>\n                                    <br>";
         // line 116
         echo form_error("agama");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Alamat</label>\n                                <div class=\"controls\">\n                                    <input type=\"text\" name=\"alamat\" class=\"span8\" value=\"";
         // line 122
         echo twig_escape_filter($this->env, set_value("alamat"), "html", null, true);
         echo "\">\n                                    <br>";
         // line 123
         echo form_error("alamat");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Username <span class=\"text-error\">*</span></label>\n                                <div class=\"controls\">\n                                    <input type=\"text\" id=\"username\" name=\"username\" class=\"span5\" value=\"";
         // line 129
         echo twig_escape_filter($this->env, set_value("username"), "html", null, true);
         echo "\" placeholder=\"alamat email\">\n                                    <br>";
         // line 130
         echo form_error("username");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Password <span class=\"text-error\">*</span></label>\n                                <div class=\"controls\">\n                                    <input type=\"password\" name=\"password\" class=\"span5\" value=\"";
         // line 136
         echo twig_escape_filter($this->env, set_value("password"), "html", null, true);
         echo "\">\n                                    <br>";
         // line 137
         echo form_error("password");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Ulangi Password <span class=\"text-error\">*</span></label>\n                                <div class=\"controls\">\n                                    <input type=\"password\" name=\"password2\" class=\"span5\" value=\"";
         // line 143
         echo twig_escape_filter($this->env, set_value("password2"), "html", null, true);
         echo "\">\n                                    <br>";
         // line 144
         echo form_error("password2");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <div class=\"controls\">\n                                    <button type=\"submit\" class=\"btn btn-primary\">Register</button>\n                                </div>\n                            </div>\n                        ";
         // line 152
         echo form_close();
         echo "\n                    </div>\n                    ";
     }
     // line 155
     echo "\n                    ";
     // line 156
     if (get_pengaturan("registrasi-pengajar", "value") == 1) {
         // line 157
         echo "                    <div class=\"tab-pane fade ";
         echo (isset($context["sebagai"]) ? $context["sebagai"] : null) == "pengajar" ? "active" : "";
         echo " in\" id=\"register-pengajar\">\n                        ";
         // line 158
         echo form_open_multipart("login/register/pengajar", array("class" => "form-horizontal row-fluid"));
         echo "\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">NIP</label>\n                                <div class=\"controls\">\n                                    <input type=\"text\" id=\"nip\" name=\"nip\" class=\"span4\" value=\"";
         // line 162
         echo twig_escape_filter($this->env, set_value("nip"), "html", null, true);
         echo "\">\n                                    <br>";
         // line 163
         echo form_error("nip");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Nama <span class=\"text-error\">*</span></label>\n                                <div class=\"controls\">\n                                    <input type=\"text\" name=\"nama\" class=\"span8\" value=\"";
         // line 169
         echo twig_escape_filter($this->env, set_value("nama"), "html", null, true);
         echo "\">\n                                    <br>";
         // line 170
         echo form_error("nama");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Jenis Kelamin <span class=\"text-error\">*</span></label>\n                                <div class=\"controls\">\n                                    <label class=\"radio inline\"><input type=\"radio\" name=\"jenis_kelamin\" value=\"Laki-laki\" ";
         // line 176
         echo twig_escape_filter($this->env, set_radio("jenis_kelamin", "Laki-laki"), "html", null, true);
         echo "> Laki-laki</label>\n                                    <label class=\"radio inline\"><input type=\"radio\" name=\"jenis_kelamin\" value=\"Perempuan\" ";
         // line 177
         echo twig_escape_filter($this->env, set_radio("jenis_kelamin", "Perempuan"), "html", null, true);
         echo "> Perempuan</label>\n                                    <br>";
         // line 178
         echo form_error("jenis_kelamin");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Tempat Lahir</label>\n                                <div class=\"controls\">\n                                    <input type=\"text\" name=\"tempat_lahir\" class=\"span5\" value=\"";
         // line 184
         echo twig_escape_filter($this->env, set_value("tempat_lahir"), "html", null, true);
         echo "\">\n                                    <br>";
         // line 185
         echo form_error("tempat_lahir");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Tanggal Lahir</label>\n                                <div class=\"controls\">\n                                    <select class=\"span2\" style=\"width: 10%;\" name=\"tgl_lahir\">\n                                        <option value=\"\">Tgl</option>\n                                        ";
         // line 193
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(range(1, 31));
         foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
             // line 194
             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), "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 196
         echo "                                    </select>\n                                    <select class=\"span2\" style=\"width: 17%;\" name=\"bln_lahir\">\n                                        <option value=\"\">Bulan</option>\n                                        ";
         // line 199
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(range(1, 12));
         foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
             // line 200
             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), "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 202
         echo "                                    </select>\n                                    <input type=\"text\" name=\"thn_lahir\" class=\"span2\" maxlength=\"4\" value=\"";
         // line 203
         echo twig_escape_filter($this->env, set_value("thn_lahir"), "html", null, true);
         echo "\" placeholder=\"Tahun\">\n                                    <br>";
         // line 204
         echo form_error("thn_lahir");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Alamat</label>\n                                <div class=\"controls\">\n                                    <input type=\"text\" name=\"alamat\" class=\"span10\" value=\"";
         // line 210
         echo twig_escape_filter($this->env, set_value("alamat"), "html", null, true);
         echo "\">\n                                    <br>";
         // line 211
         echo form_error("alamat");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Username <span class=\"text-error\">*</span></label>\n                                <div class=\"controls\">\n                                    <input type=\"text\" id=\"username\" name=\"username\" class=\"span5\" value=\"";
         // line 217
         echo twig_escape_filter($this->env, set_value("username"), "html", null, true);
         echo "\" placeholder=\"alamat email\">\n                                    <br>";
         // line 218
         echo form_error("username");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Password <span class=\"text-error\">*</span></label>\n                                <div class=\"controls\">\n                                    <input type=\"password\" name=\"password\" class=\"span5\" value=\"";
         // line 224
         echo twig_escape_filter($this->env, set_value("password"), "html", null, true);
         echo "\">\n                                    <br>";
         // line 225
         echo form_error("password");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <label class=\"control-label\">Ulangi Password <span class=\"text-error\">*</span></label>\n                                <div class=\"controls\">\n                                    <input type=\"password\" name=\"password2\" class=\"span5\" value=\"";
         // line 231
         echo twig_escape_filter($this->env, set_value("password2"), "html", null, true);
         echo "\">\n                                    <br>";
         // line 232
         echo form_error("password2");
         echo "\n                                </div>\n                            </div>\n                            <div class=\"control-group\">\n                                <div class=\"controls\">\n                                    <button type=\"submit\" class=\"btn btn-primary\">Register</button>\n                                </div>\n                            </div>\n                        ";
         // line 240
         echo form_close();
         echo "\n                    </div>\n                    ";
     }
     // line 243
     echo "\n                </div>\n            </div>\n    </div>\n</div>\n";
 }
 public function block_content($context, array $blocks = array())
 {
     // line 4
     echo "<div class=\"btn-controls\">\n    <div class=\"btn-box-row row-fluid\">\n        <div class=\"span12\">\n            <div class=\"widget-usage\" style=\"padding: 10px 15px;\">\n                <small class=\"pull-right\">";
     // line 8
     echo twig_escape_filter($this->env, tgl_indo(date("Y-m-d")), "html", null, true);
     echo ", IP ";
     echo twig_escape_filter($this->env, get_ip(), "html", null, true);
     echo "</small>\n                Selamat datang di <b>E-learning ";
     // line 9
     echo twig_escape_filter($this->env, get_pengaturan("nama-sekolah", "value"), "html", null, true);
     echo "</b>\n                <br>\n                <i class=\"icon icon-map-marker\"></i> ";
     // line 11
     echo twig_escape_filter($this->env, get_pengaturan("alamat", "value"), "html", null, true);
     echo "\n                ";
     // line 12
     if (!twig_test_empty(get_pengaturan("telp", "value"))) {
         // line 13
         echo "                <i class=\"icon icon-phone\"></i> ";
         echo twig_escape_filter($this->env, get_pengaturan("telp", "value"), "html", null, true);
         echo "\n                ";
     }
     // line 15
     echo "            </div>\n        </div>\n    </div>\n    <br>\n\n    ";
     // line 20
     if (is_admin()) {
         // line 21
         echo "    <div class=\"btn-box-row row-fluid\">\n        <a href=\"";
         // line 22
         echo twig_escape_filter($this->env, site_url("siswa/index/1"), "html", null, true);
         echo "\" class=\"btn-box big span3\">\n            <i class=\"icon-group\"></i><b>";
         // line 23
         echo twig_escape_filter($this->env, isset($context["jml_siswa"]) ? $context["jml_siswa"] : null, "html", null, true);
         echo "</b>\n            <p class=\"text-muted\">Siswa</p>\n        </a>\n        <a href=\"";
         // line 26
         echo twig_escape_filter($this->env, site_url("pengajar/index/1"), "html", null, true);
         echo "\" class=\"btn-box big span3\">\n            <i class=\"icon-user\"></i><b>";
         // line 27
         echo twig_escape_filter($this->env, isset($context["jml_pengajar"]) ? $context["jml_pengajar"] : null, "html", null, true);
         echo "</b>\n            <p class=\"text-muted\">Pengajar</p>\n        </a>\n        <a href=\"";
         // line 30
         echo twig_escape_filter($this->env, site_url("siswa/index/0"), "html", null, true);
         echo "\" class=\"btn-box big span3\">\n            <i class=\"icon-group\"></i><b>";
         // line 31
         echo twig_escape_filter($this->env, isset($context["jml_siswa_pending"]) ? $context["jml_siswa_pending"] : null, "html", null, true);
         echo "</b>\n            <p class=\"text-muted\">Pending siswa</p>\n        </a>\n        <a href=\"";
         // line 34
         echo twig_escape_filter($this->env, site_url("pengajar/index/0"), "html", null, true);
         echo "\" class=\"btn-box big span3\">\n            <i class=\"icon-user\"></i><b>";
         // line 35
         echo twig_escape_filter($this->env, isset($context["jml_pengajar_pending"]) ? $context["jml_pengajar_pending"] : null, "html", null, true);
         echo "</b>\n            <p class=\"text-muted\">Pending pengajar</p>\n        </a>\n    </div>\n\n    <div class=\"btn-box-row row-fluid\">\n        <div class=\"span6\">\n            <div class=\"well well-small\" style=\"box-shadow: none;background-color: #FFF;\">\n                <b><i class=\"icon-bullhorn\"></i> Pengumuman</b>\n                <table class=\"table table-striped table-condensed\">\n                    ";
         // line 45
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["pengumuman"]) ? $context["pengumuman"] : null);
         foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
             // line 46
             echo "                    <tr>\n                        <td>";
             // line 47
             echo anchor("pengumuman/detail/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id"), $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "judul"));
             echo "</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 50
         echo "                </table>\n            </div>\n        </div>\n       \n    ";
     }
     // line 55
     echo "\n    ";
     // line 56
     if (is_pengajar()) {
         // line 57
         echo "    <div class=\"btn-box-row row-fluid\">\n        <div class=\"span6\">\n            <div class=\"widget-usage\" style=\"padding: 10px 15px;\">\n                <b><i class=\"icon-bullhorn\"></i> Pengumuman</b>\n                <table class=\"table table-striped table-condensed\">\n                    ";
         // line 62
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["pengumuman"]) ? $context["pengumuman"] : null);
         foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
             // line 63
             echo "                    <tr>\n                        <td>";
             // line 64
             echo anchor("pengumuman/detail/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id"), $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "judul"));
             echo "</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 67
         echo "                </table>\n            </div>\n        </div>\n        <div class=\"span6\">\n            <div class=\"widget-usage\" style=\"padding: 10px 15px;\">\n                <b>Peraturan E-learning : </b><br>\n                ";
         // line 73
         echo get_pengaturan("peraturan-elearning", "value");
         echo "\n            </div>\n        </div>\n    </div>\n    ";
     }
     // line 78
     echo "\n    ";
     // line 79
     if (is_siswa()) {
         // line 80
         echo "    <div class=\"btn-box-row row-fluid\">\n        <div class=\"span6\">\n\n            <div class=\"widget-usage\" style=\"padding: 10px 15px; margin-bottom: 20px;\">\n                <b>Tugas terbaru</b>\n                <table class=\"table table-striped table-condensed\">\n                    ";
         // line 86
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["tugas_terbaru"]) ? $context["tugas_terbaru"] : null);
         foreach ($context['_seq'] as $context["_key"] => $context["m"]) {
             // line 87
             echo "                    <tr>\n                        <td>\n                            <a href=\"";
             // line 89
             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                    ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 93
         echo "                </table>\n            </div>\n\n            <div class=\"widget-usage\" style=\"padding: 10px 15px; margin-bottom: 20px;\">\n                <b>Materi terbaru</b>\n                <table class=\"table table-striped table-condensed\">\n                    ";
         // line 99
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["materi_terbaru"]) ? $context["materi_terbaru"] : null);
         foreach ($context['_seq'] as $context["_key"] => $context["m"]) {
             // line 100
             echo "                    <tr>\n                        <td>\n                            <a href=\"";
             // line 102
             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                    ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 106
         echo "                </table>\n            </div>\n\n        </div>\n        <div class=\"span6\">\n            <div class=\"widget-usage\" style=\"padding: 10px 15px; margin-bottom: 20px;\">\n                <b><i class=\"icon-bullhorn\"></i> Pengumuman</b>\n                <table class=\"table table-striped table-condensed\">\n                    ";
         // line 114
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["pengumuman"]) ? $context["pengumuman"] : null);
         foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
             // line 115
             echo "                    <tr>\n                        <td>";
             // line 116
             echo anchor("pengumuman/detail/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id"), $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "judul"));
             echo "</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 119
         echo "                </table>\n            </div>\n\n            <div class=\"widget-usage\" style=\"padding: 10px 15px;\">\n                <b>Peraturan E-learning : </b><br>\n                ";
         // line 124
         echo get_pengaturan("peraturan-elearning", "value");
         echo "\n            </div>\n        </div>\n    </div>\n    ";
     }
     // line 129
     echo "\n</div>\n<!--/#btn-controls-->\n";
 }
 public function block_content($context, array $blocks = array())
 {
     // line 4
     echo "<div class=\"btn-controls\">\n    <div class=\"btn-box-row row-fluid\">\n        <div class=\"span12\">\n            <div class=\"widget-usage\" style=\"padding: 10px 15px;margin-bottom: 20px;\">\n                <small class=\"pull-right\">";
     // line 8
     echo twig_escape_filter($this->env, tgl_indo(date("Y-m-d")), "html", null, true);
     echo ", IP ";
     echo twig_escape_filter($this->env, get_ip(), "html", null, true);
     echo "</small>\n                Selamat datang di <b>E-learning ";
     // line 9
     echo twig_escape_filter($this->env, get_pengaturan("nama-sekolah", "value"), "html", null, true);
     echo "</b>\n                <br>\n                <i class=\"icon icon-map-marker\"></i> ";
     // line 11
     echo twig_escape_filter($this->env, get_pengaturan("alamat", "value"), "html", null, true);
     echo "\n                ";
     // line 12
     if (!twig_test_empty(get_pengaturan("telp", "value"))) {
         // line 13
         echo "                <i class=\"icon icon-phone\"></i> ";
         echo twig_escape_filter($this->env, get_pengaturan("telp", "value"), "html", null, true);
         echo "\n                ";
     }
     // line 15
     echo "            </div>\n\n            ";
     // line 17
     if (is_admin() == false && !twig_test_empty(get_pengaturan("peraturan-elearning", "value"))) {
         // line 18
         echo "            <div class=\"widget-usage\" style=\"padding: 10px 15px;\">\n                <b>Peraturan E-learning : </b><br>\n                ";
         // line 20
         echo get_pengaturan("peraturan-elearning", "value");
         echo "\n            </div>\n            ";
     }
     // line 23
     echo "        </div>\n    </div>\n    <br>\n    ";
     // line 26
     if (is_siswa()) {
         // line 27
         echo "    <div class=\"btn-box-row row-fluid\">\n        <div class=\"span6\">\n            <div class=\"widget-usage\" style=\"padding: 10px 15px;\">\n                <b>Materi terbaru</b>\n                <table class=\"table table-striped table-condensed\">\n                    ";
         // line 32
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["materi_terbaru"]) ? $context["materi_terbaru"] : null);
         foreach ($context['_seq'] as $context["_key"] => $context["m"]) {
             // line 33
             echo "                    <tr>\n                        <td>\n                            <a href=\"";
             // line 35
             echo twig_escape_filter($this->env, site_url("materi/detail/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id")), "html", null, true);
             echo "\" target=\"_blank\">";
             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                    ";
         }
         $_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 "                </table>\n            </div>\n        </div>\n        <div class=\"span6\">\n            <div class=\"widget-usage\" style=\"padding: 10px 15px;\">\n                <b>Tugas terbaru</b>\n                <table class=\"table table-striped table-condensed\">\n                    ";
         // line 46
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["tugas_terbaru"]) ? $context["tugas_terbaru"] : null);
         foreach ($context['_seq'] as $context["_key"] => $context["m"]) {
             // line 47
             echo "                    <tr>\n                        <td>\n                            <a href=\"";
             // line 49
             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                    ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 53
         echo "                </table>\n            </div>\n        </div>\n    </div>\n    ";
     }
     // line 58
     echo "\n    ";
     // line 59
     if (is_admin()) {
         // line 60
         echo "    <div class=\"btn-box-row row-fluid\" style=\"margin-top:-20px;\">\n        <a href=\"";
         // line 61
         echo twig_escape_filter($this->env, site_url("siswa/index/1"), "html", null, true);
         echo "\" class=\"btn-box big span3\">\n            <i class=\"icon-group\"></i><b>";
         // line 62
         echo twig_escape_filter($this->env, isset($context["jml_siswa"]) ? $context["jml_siswa"] : null, "html", null, true);
         echo "</b>\n            <p class=\"text-muted\">Siswa</p>\n        </a>\n        <a href=\"";
         // line 65
         echo twig_escape_filter($this->env, site_url("pengajar/index/1"), "html", null, true);
         echo "\" class=\"btn-box big span3\">\n            <i class=\"icon-user\"></i><b>";
         // line 66
         echo twig_escape_filter($this->env, isset($context["jml_pengajar"]) ? $context["jml_pengajar"] : null, "html", null, true);
         echo "</b>\n            <p class=\"text-muted\">Pengajar</p>\n        </a>\n        <a href=\"";
         // line 69
         echo twig_escape_filter($this->env, site_url("siswa/index/0"), "html", null, true);
         echo "\" class=\"btn-box big span3\">\n            <i class=\"icon-group\"></i><b>";
         // line 70
         echo twig_escape_filter($this->env, isset($context["jml_siswa_pending"]) ? $context["jml_siswa_pending"] : null, "html", null, true);
         echo "</b>\n            <p class=\"text-muted\">Pending siswa</p>\n        </a>\n        <a href=\"";
         // line 73
         echo twig_escape_filter($this->env, site_url("pengajar/index/0"), "html", null, true);
         echo "\" class=\"btn-box big span3\">\n            <i class=\"icon-user\"></i><b>";
         // line 74
         echo twig_escape_filter($this->env, isset($context["jml_pengajar_pending"]) ? $context["jml_pengajar_pending"] : null, "html", null, true);
         echo "</b>\n            <p class=\"text-muted\">Pending pengajar</p>\n        </a>\n    </div>\n\n    <div class=\"well well-small\" style=\"box-shadow: none;background-color: #FFF;\">\n        <div class=\"pull-right\">\n            <a class=\"muted\" href=\"";
         // line 81
         echo twig_escape_filter($this->env, isset($context["portal_update_link"]) ? $context["portal_update_link"] : null, "html", null, true);
         echo "\" target=\"_blank\">Portal update</a> |\n            <a class=\"muted\" href=\"";
         // line 82
         echo twig_escape_filter($this->env, isset($context["bug_tracker_link"]) ? $context["bug_tracker_link"] : null, "html", null, true);
         echo "\" target=\"_blank\">Bug tracker</a>\n        </div>\n        <b><i class=\"icon-bullhorn\"></i> Info Update</b>\n        <table class=\"table table-striped table-condensed\" id=\"info-update\"></table>\n        <input type=\"hidden\" id=\"info-update-link\" value=\"";
         // line 86
         echo twig_escape_filter($this->env, isset($context["info_update_link"]) ? $context["info_update_link"] : null, "html", null, true);
         echo "\">\n    </div>\n    ";
     }
     // line 89
     echo "</div>\n<!--/#btn-controls-->\n";
 }
Exemplo n.º 18
0
 function pengaturan()
 {
     must_login();
     if (!is_admin()) {
         redirect('welcome');
     }
     if (!is_demo_app()) {
         # bagian hapus gambar
         if (!empty($_GET['delete-img'])) {
             $img_id = (int) $_GET['delete-img'];
             if ($img_id > 0 and $img_id <= 4) {
                 $key = 'img-slide-' . $img_id;
                 $retrieve = $this->config_model->retrieve($key);
                 if (!empty($retrieve) and !empty($retrieve['value'])) {
                     # hapus file
                     if (is_file(get_path_image($retrieve['value']))) {
                         unlink(get_path_image($retrieve['value']));
                     }
                     $this->config_model->update($key, $key, '');
                 }
             }
             redirect('welcome/pengaturan');
         }
         if ($this->form_validation->run('pengaturan') == true) {
             foreach ($_POST as $key => $val) {
                 # cek ada tidak, kalo ada update
                 $retrieve = $this->config_model->retrieve($key);
                 if (!empty($retrieve)) {
                     $this->config_model->update($key, $retrieve['nama'], $val);
                 } else {
                     $this->config_model->create($key, $key, $val);
                 }
             }
             # untuk upload gambar
             foreach ($_FILES as $key => $val) {
                 if (!empty($val['tmp_name'])) {
                     $config = array();
                     $config['upload_path'] = get_path_image();
                     $config['allowed_types'] = 'jpg|jpeg|png';
                     $config['max_size'] = '0';
                     $config['max_width'] = '0';
                     $config['max_height'] = '0';
                     $config['file_name'] = $key;
                     $this->upload->initialize($config);
                     if ($this->upload->do_upload($key)) {
                         # hapus file sebelumnya
                         $old_file = get_pengaturan($key, 'value');
                         if (is_file(get_path_image($old_file))) {
                             unlink(get_path_image($old_file));
                         }
                         $upload_data = $this->upload->data();
                         $retrieve = $this->config_model->retrieve($key);
                         if (!empty($retrieve)) {
                             $this->config_model->update($key, $key, $upload_data['file_name']);
                         } else {
                             $this->config_model->create($key, $key, $upload_data['file_name']);
                         }
                     }
                 }
             }
             $this->session->set_flashdata('pengaturan', get_alert('success', 'Pengaturan berhasil diperbaharui.'));
             redirect('welcome/pengaturan');
         }
     }
     $data['comp_js'] = get_tinymce('tinymce, textarea.tinymce');
     $this->twig->display('pengaturan.html', $data);
 }