public function editar($accion, $codigo = "")
 {
     $lista = new stdClass();
     if ($accion == "e") {
         $filter = new stdClass();
         $filter->tipoestudiociclo = $codigo;
         $tiposeestudiociclo = $this->tipoestudiociclo_model->obtener($filter);
         $lista->codigo = $tiposeestudiociclo->TIPCICLOP_Codigo;
         $lista->observacion = $tiposeestudiociclo->TIPCICLOC_Observacion;
         $lista->ciclo = $tiposeestudiociclo->CICLOP_Codigo;
         $lista->estado = $tiposeestudiociclo->TIPCICLOC_FlagEstado;
         $lista->tipoestudio = $tiposeestudiociclo->TIPP_Codigo;
     } elseif ($accion == "n") {
         $lista->codigo = "";
         $lista->observacion = "";
         $lista->ciclo = "";
         $lista->estado = 1;
         $lista->tipoestudio = "";
     }
     $arrEstado = array("0" => "::Seleccione::", "1" => "ACTIVO", "2" => "INACTIVO");
     $data['titulo'] = $accion == "e" ? "Editar Tipo de Estudio por ciclo" : "Crear Tipo de Estudio por ciclo";
     $data['form_open'] = form_open('', array("name" => "frmPersona", "id" => "frmPersona", "onsubmit" => "return valida_guiain();"));
     $data['form_close'] = form_close();
     $data['lista'] = $lista;
     $data['selestado'] = form_dropdown('estado', $arrEstado, $lista->estado, "id='estado' class='comboMedio'");
     $data['selciclo'] = form_dropdown('ciclo', $this->ciclo_model->seleccionar('0'), $lista->ciclo, "id='ciclo' class='comboMedio'");
     $data['seltipoestudio'] = form_dropdown('tipoestudio', $this->tipoestudio_model->seleccionar('0'), $lista->tipoestudio, "id='tipoestudio' class='comboMedio'");
     $data['oculto'] = form_hidden(array("accion" => $accion, "codigo_padre" => $codigo, "codigo" => $lista->codigo));
     $this->load->view("maestros/tipoestudiociclo_nuevo", $data);
 }
 public function block_content($context, array $blocks = array())
 {
     // line 4
     echo "<div class=\"module\">\n    <div class=\"module-head\">\n        <h3>";
     // line 6
     echo isset($context["module_title"]) ? $context["module_title"] : null;
     echo "</h3>\n    </div>\n    <div class=\"module-body\">\n        ";
     // line 9
     echo get_flashdata("mapel");
     echo "\n\n        ";
     // line 11
     echo form_open("admin/mapel/add", array("class" => "form-horizontal row-fluid"));
     echo "\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 15
     echo twig_escape_filter($this->env, set_value("nama"), "html", null, true);
     echo "\">\n                    <br>";
     // line 16
     echo form_error("nama");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Deskripsi</label>\n                <div class=\"controls\">\n                    <textarea name=\"info\" class=\"span12\" rows=\"5\">";
     // line 22
     echo set_value("info");
     echo "</textarea>\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <div class=\"controls\">\n                    <button type=\"submit\" class=\"btn btn-primary\">Simpan</button>\n                    <a href=\"";
     // line 28
     echo twig_escape_filter($this->env, site_url("admin/mapel"), "html", null, true);
     echo "\" class=\"btn\">Batal</a>\n                </div>\n            </div>\n        ";
     // line 31
     echo form_close();
     echo "\n\n    </div>\n</div>\n";
 }
 public function block_content($context, array $blocks = array())
 {
     // line 4
     echo "<h4>Edit Kelas Aktif</h4>\n";
     // line 5
     echo get_flashdata("class");
     echo "\n\n";
     // line 7
     echo form_open("siswa/moved_class/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . (isset($context["siswa_id"]) ? $context["siswa_id"] : null), array("class" => "form-horizontal row-fluid"));
     echo "\n<table class=\"table table-striped\">\n    <tr>\n        <td>\n            <select class=\"span2\" name=\"kelas_id\">\n                <option value=\"\">--pilih--</option>\n                ";
     // line 13
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["kelas"]) ? $context["kelas"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["k"]) {
         // line 14
         echo "                    <option value=\"";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), "html", null, true);
         echo "\" ";
         echo $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id") == $this->getAttribute(isset($context["get_aktif"]) ? $context["get_aktif"] : null, "kelas_id") ? "selected" : "";
         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 16
     echo "            </select>\n            <br>";
     // line 17
     echo form_error("kelas_id");
     echo "\n        </td>\n        <td>\n            <button type=\"submit\" class=\"btn btn-primary\">Update</button>\n        </td>\n    </tr>\n</table>\n";
     // line 24
     echo form_close();
     echo "\n";
 }
示例#4
0
 /**
  * Get search form
  *
  * @subpackage	Helpers
  * @param	int
  * @return 	string
  */
 function form($data = '')
 {
     // Set the default options
     $defaults = array('show_categories' => 'no', 'class' => 'search_form', 'id' => '', 'style' => '');
     $options = $this->_ci->settings->get_params($data['attributes'], $defaults);
     $this->_ci->load->helper('form');
     // Should we load up the categories
     $cats = '';
     if ($options['show_categories'] == 'yes') {
         $this->_ci->load->library('categories/categories_library');
         $cats = $this->_ci->categories_model->get_categories();
         $this->_ci->categories_library->category_tree($cats);
         $cats = $this->_ci->categories_library->get_categories();
         $cat_options['0'] = lang('lang_search_all');
         foreach ($cats as $row) {
             $indent = $row['cat_parent'] != 0 ? repeater('&nbsp;&raquo;&nbsp;', $row['depth']) : '';
             $cat_options[$row['cat_id']] = $indent . $row['cat_name'];
         }
         $cats = form_dropdown('category', $cat_options, 'id="cats" class="category"');
     }
     $attributes = array('class' => $options['class'], 'id' => $options['id'], 'style' => $options['style']);
     $output = form_open('search/do_search', $attributes);
     $output .= str_replace('{kb:cats}', $cats, $data['content']);
     $output .= form_close();
     return $output;
 }
示例#5
0
 public function get_newsletter_form()
 {
     /* BENCHMARK */
     $this->benchmark->mark('func_get_newsletter_form_start');
     $this->load->helper('data');
     $newsletter_html = '';
     // only make a newsletter form if users who are not site admins are signed in
     /*if ('super_admin'==$this->user['user_type'] or
           'admin_user'==$this->user['user_type'] or
           'supplier_user'==$this->user['user_type'])
       {
           $newsletter_html.='';
       }
       else
       {*/
     $attr = array('name' => 'newsletter_form', 'id' => 'newsletter_form', 'class' => 'form');
     $hidden = array('url' => uri_string());
     // reload url
     $newsletter_html .= form_open('newsletter/signup', $attr, $hidden);
     // email field
     $attr = array('name' => 'newsletter_email', 'id' => 'newsletter_email', 'class' => 'form_field', 'placeholder' => 'enter your email ...', 'value' => get_value(null, 'newsletter_email'));
     $newsletter_html .= form_input($attr, '');
     $newsletter_html .= form_input(array('name' => 'phone_number', 'class' => 'phone_number', 'style' => 'position:absolute;top:-10000px;'));
     // submit button
     $attr = array('name' => 'submit', 'id' => 'newsletter_submit', 'class' => 'checkout submit');
     $newsletter_html .= form_submit($attr, 'sign up');
     $newsletter_html .= form_close();
     /*}*/
     /* BENCHMARK */
     $this->benchmark->mark('func_get_newsletter_form_end');
     return $newsletter_html;
 }
示例#6
0
        public function getLoginForm()
        {
			$this->CI->lang->load('basic', 'english');
            $this->CI->load->helper('form');

			$form = '<div id="LoginForm">';
			$form.= '<p>'.$this->CI->lang->line('login_text').'</p>';
			$form.= form_open(site_url('login'), array(
				'id' => 'Login'
			));
			$form.= form_fieldset();
			$form.= form_label('username');
			$form.= form_input(array(
				'maxlength' => 20,
				'name' => 'username'
			));
			$form.= form_label('password');
			$form.= form_input(array(
				'maxlength' => 20,
				'name' => 'password',
				'type' => 'password'
			));
			$form.= form_submit('login_submit', $this->CI->lang->line('login_button'));
			$form.= form_fieldset_close();
			$form.= form_close();
			$form.= '</div>';

			return $form;
        }
 public function block_content($context, array $blocks = array())
 {
     // line 4
     echo "<div class=\"module\">\n    <div class=\"module-head\">\n        <h3>";
     // line 6
     echo isset($context["module_title"]) ? $context["module_title"] : null;
     echo "</h3>\n    </div>\n    <div class=\"module-body\">\n        ";
     // line 9
     echo get_flashdata("kelas");
     echo "\n\n        <div class=\"panel panel-default\">\n            <div class=\"panel-heading\">\n                Tambah Kelas\n            </div>\n            <div class=\"panel-body\">\n                ";
     // line 16
     echo form_open("admin/kelas", array("class" => "form-horizontal row-fluid"));
     echo "\n                    <div class=\"control-group\">\n                        <label class=\"control-label\">Nama Kelas <span class=\"text-error\">*</span></label>\n                        <div class=\"controls\">\n                            <input type=\"text\" name=\"nama\" class=\"span5\" placeholder=\"Nama Kelas\" value=\"";
     // line 20
     echo twig_escape_filter($this->env, set_value("nama"), "html", null, true);
     echo "\">\n                            <button type=\"submit\" class=\"btn btn-primary\">Simpan</button>\n                            ";
     // line 22
     echo form_error("nama");
     echo "\n                        </div>\n                    </div>\n                ";
     // line 25
     echo form_close();
     echo "\n            </div>\n        </div>\n\n        <p><b>Note:</b> Kelas tidak dapat di hapus namun dapat di ubah menjadi tidak aktif</p>\n\n        ";
     // line 31
     echo isset($context["kelas_hirarki"]) ? $context["kelas_hirarki"] : null;
     echo "\n\n        <br>\n        <div id=\"response_update\"></div>\n        <button class=\"btn btn-primary\" id=\"update-hirarki\">Update Hirarki</button>\n    </div>\n</div>\n";
 }
示例#8
0
function comments($comments, $object_id, $object, $usernames, $format, $return = 'agilan/index')
{
    $string = "";
    $string .= "<ol class='comments'>";
    if (isset($comments[$object_id]) && count($comments[$object_id]) > 0) {
        foreach ($comments[$object_id] as $kk => $ll) {
            $CID = $ll->user_id;
            $CU = $usernames[$ll->user_id];
            $stamp = mysql_to_unix($ll->created);
            $string .= "<li><b>" . $CU . ":</b> <small>" . $ll->comment . "<br/>" . mdate($format, $stamp) . "</small></li>";
        }
    } else {
        $string .= nbs();
    }
    $string .= "<li class='last'>";
    $string .= form_open('comments/index');
    $input = array('name' => 'comment', 'id' => 'comment', 'size' => 35);
    $string .= form_input($input);
    $string .= form_hidden('object', $object);
    $string .= form_hidden('object_id', $object_id);
    $string .= form_hidden('return_url', $return);
    $string .= form_submit('add comment', 'comment');
    $string .= form_close();
    $string .= "</li>";
    $string .= "</ol>";
    echo $string;
}
示例#9
0
 function login()
 {
     if ($this->form_validation->run() == TRUE) {
         $email = $this->input->post('email', TRUE);
         $password = md5($this->input->post('password', TRUE));
         $get_login = $this->login_model->retrieve(null, $email, $password, null, null, 1);
         if (empty($get_login)) {
             $this->session->set_flashdata('login', get_alert('warning', 'Akun tidak ditemukan'));
             redirect('admin/login');
         } else {
             //create session admin
             $get_pengajar = $this->pengajar_model->retrieve($get_login['pengajar_id']);
             //unset password admin
             unset($get_login['password']);
             $set_session['admin'] = array('login' => $get_login, 'pengajar' => $get_pengajar);
             $this->session->set_userdata($set_session);
             $_SESSION['KCFINDER'] = array();
             $_SESSION['KCFINDER']['disabled'] = false;
             $_SESSION['KCFINDER']['uploadURL'] = base_url('assets/uploads/');
             $_SESSION['KCFINDER']['uploadDir'] = "";
             redirect('admin');
         }
     } else {
         $data = array('web_title' => 'Login | Administrator', 'form_open' => form_open('admin/login', array('autocomplete' => 'off', 'class' => 'form-vertical')), 'form_close' => form_close());
         $data = array_merge(default_parser_item(), $data);
         $this->twig->display('admin-login.html', $data);
     }
 }
示例#10
0
 public function editar()
 {
     if (!($this->dados['infos'] = $this->curso_model->listar($this->id))) {
         redirect('../cursos/listar');
     }
     $dadosCurso = $this->dados['infos'][0];
     $form = form_open('#', array('class' => 'niceform'));
     $form .= '<table class="cadForm">';
     $form .= '<tr>';
     $form .= '<td>';
     $form .= form_label('Nome:', '', array('for' => 'email'));
     $form .= form_input('curso_nome', $dadosCurso['curso_nome'], array('size' => 30));
     $form .= form_hidden('curso_id', $dadosCurso['curso_id']);
     $form .= form_hidden('lixeira', $dadosCurso['lixeira']);
     $form .= '</td>';
     $form .= '<td>';
     $form .= form_label('Quantidade de aulas:', '', array('for' => 'email'));
     $form .= form_input('curso_qtd_aulas', $dadosCurso['curso_qtd_aulas'], array('size' => 20));
     $form .= '</td>';
     $form .= '</tr>';
     $form .= '<tr>';
     $form .= '<td></td>';
     $form .= '<td>';
     $form .= form_submit('cadastrar', 'Enviar', 'id="submit"');
     $form .= '</td>';
     $form .= '</tr>';
     $form .= '</table>';
     $form .= form_close();
     $form .= '<span class="obs">Todos os campos são obrigatórios.</span>';
     $this->dados['form'] = $form;
     $this->load->view('editar', $this->dados);
 }
 public function block_content($context, array $blocks = array())
 {
     // line 4
     echo "<div class=\"module\">\n    <div class=\"module-head\">\n        <h3>";
     // line 6
     echo isset($context["module_title"]) ? $context["module_title"] : null;
     echo "</h3>\n    </div>\n    <div class=\"module-body\">\n        ";
     // line 9
     echo get_flashdata("mapel");
     echo "\n\n        ";
     // line 11
     echo form_open("admin/mapel/edit/" . $this->getAttribute(isset($context["mapel"]) ? $context["mapel"] : null, "id") . "/" . enurl_redirect(isset($context["uri_back"]) ? $context["uri_back"] : null), array("class" => "form-horizontal row-fluid"));
     echo "\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 15
     echo twig_escape_filter($this->env, set_value("nama", $this->getAttribute(isset($context["mapel"]) ? $context["mapel"] : null, "nama")), "html", null, true);
     echo "\">\n                    <br>";
     // line 16
     echo form_error("nama");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Deskripsi</label>\n                <div class=\"controls\">\n                    <textarea name=\"info\" class=\"span12\" rows=\"5\">";
     // line 22
     echo set_value("info", $this->getAttribute(isset($context["mapel"]) ? $context["mapel"] : null, "info"));
     echo "</textarea>\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Status</label>\n                <div class=\"controls\">\n                    <label class=\"checkbox inline\">\n                        <input type=\"checkbox\" value=\"1\" name=\"status\" ";
     // line 29
     echo twig_escape_filter($this->env, set_checkbox("status", "1", $this->getAttribute(isset($context["mapel"]) ? $context["mapel"] : null, "aktif") == 1 ? true : false), "html", null, true);
     echo ">\n                        Aktif\n                    </label>\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <div class=\"controls\">\n                    <button type=\"submit\" class=\"btn btn-primary\">Update</button>\n                    <a href=\"";
     // line 37
     echo twig_escape_filter($this->env, isset($context["uri_back"]) ? $context["uri_back"] : null, "html", null, true);
     echo "\" class=\"btn\">Batal</a>\n                </div>\n            </div>\n        ";
     // line 40
     echo form_close();
     echo "\n\n    </div>\n</div>\n";
 }
示例#12
0
 public function import($success = "")
 {
     $data['judul_besar'] = 'PHPExcel';
     $data['judul_kecil'] = 'Import';
     $data['output'] = "<h4>Sebelum mengupload, pastikan file anda berformat <strong>.xls/.xlsx</strong></h4>";
     $data['output'] .= form_open_multipart('php_excel/do_upload');
     $form = array('name' => 'userfile', 'style' => 'position:absolute;z-index:2;top:0;left:0;filter: alpha(opacity=0);-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0;background-color:transparent;color:transparent;', 'onchange' => "\$('#upload-file-info').html(\$(this).val());");
     $data['output'] .= "<div style='position:relative;'>";
     $data['output'] .= "<a class='btn btn-primary' href='javascript:;'>";
     $data['output'] .= "Browse… " . form_upload($form);
     $data['output'] .= "</a>";
     $data['output'] .= "&nbsp;";
     $data['output'] .= "<span class='label label-info' id='upload-file-info'></span>";
     $data['output'] .= "</div>";
     $data['output'] .= "<br>";
     $data['output'] .= form_submit('name', 'Go !', 'class = "btn btn-default"');
     $data['output'] .= form_close();
     if ($success) {
         $data['pesan'] = '<div class="alert alert-success alert-dismissible">';
         $data['pesan'] .= '<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>';
         $data['pesan'] .= '<h4><i class="icon fa fa-check"></i> Alert!</h4>';
         $data['pesan'] .= 'Success alert preview. This alert is dismissable.';
         $data['pesan'] .= '</div>';
     }
     $this->load->view('welcome_message', $data, FALSE);
 }
示例#13
0
 public function editar($acta = 0, $curso = 0)
 {
     $filter = new stdClass();
     $filter->acta = $acta;
     $filter->order_by = array("f.PERSC_ApellidoPaterno" => "asc", "f.PERSC_ApellidoMaterno" => "asc", "f.PERSC_Nombre" => "asc");
     $actaprofesores = $this->actaprofesor_model->listar($filter);
     $flgDetalle = 0;
     $item = 1;
     $lista = array();
     if (count($actaprofesores) > 0) {
         foreach ($actaprofesores as $indice => $value) {
             $lista[$indice] = new stdClass();
             $lista[$indice]->nombres = $value->PERSC_Nombre;
             $lista[$indice]->paterno = $value->PERSC_ApellidoPaterno;
             $lista[$indice]->materno = $value->PERSC_ApellidoMaterno;
             $lista[$indice]->codigo = $value->ACTAPROFP_Codigo;
             $lista[$indice]->profesor = $value->codprofesor;
             $lista[$indice]->hingreso = $value->ACTAPROFC_Hingreso;
             $lista[$indice]->hsalida = $value->ACTAPROFC_Hsalida;
             $lista[$indice]->observacion = $value->ACTAPROFC_Observacion;
             $lista[$indice]->curso = $value->PROD_Nombre;
         }
         $flgDetalle = 1;
     }
     $data['titulo'] = "Asistencia de profesores";
     $data['form_open'] = form_open('', array("name" => "frmPersona", "id" => "frmPersona", "onsubmit" => "return valida_guiain();"));
     $data['form_close'] = form_close();
     $data['lista'] = $lista;
     $data['flgDetalle'] = $flgDetalle;
     $data['oculto'] = form_hidden(array("curso" => $curso, "acta" => $acta, "flgDetalle" => $flgDetalle));
     $this->load->view("ventas/actaprofesor_nuevo", $data);
 }
示例#14
0
 public function editar($accion, $codigo = "")
 {
     $lista = new stdClass();
     if ($accion == "e") {
         $filter = new stdClass();
         $filter->ciclo = $codigo;
         $ciclos = $this->ciclo_model->obtener($filter);
         $lista->finicio = date_sql(substr($ciclos->CICC_FECHA_INICIO, 0, 10));
         $lista->ffin = date_sql(substr($ciclos->CICC_FECHA_FIN, 0, 10));
         $lista->descripcion = $ciclos->CICC_DESCRIPCION;
         $lista->codigo = $ciclos->CICLOP_Codigo;
         $lista->nombre = $ciclos->COMPC_Nombre;
         $lista->tipociclo = $ciclos->TIPOCICLOP_Codigo;
     } elseif ($accion == "n") {
         $lista->finicio = "";
         $lista->ffin = "";
         $lista->descripcion = "";
         $lista->codigo = "";
         $lista->nombre = "";
         $lista->tipociclo = "";
     }
     $arrTipociclo = array("0" => "::Seleccione::", "1" => "Ciclo 1", "2" => "Ciclo 2");
     $data['titulo'] = $accion == "e" ? "Editar Ciclo" : "Crear Ciclo";
     $data['form_open'] = form_open('', array("name" => "frmPersona", "id" => "frmPersona", "onsubmit" => "return valida_guiain();"));
     $data['form_close'] = form_close();
     $data['lista'] = $lista;
     $data['seltipociclo'] = form_dropdown('tipociclo', $arrTipociclo, $lista->tipociclo, "id='tipociclo' class='comboMedio'");
     $data['oculto'] = form_hidden(array("accion" => $accion, "codigo_padre" => $codigo, "codigo" => $lista->codigo));
     $this->load->view("maestros/ciclo_nuevo", $data);
 }
示例#15
0
 public function test()
 {
     $this->load->helper('form');
     //有一个破坏html的双引号
     $string = 'Here is a string containing "quoted" text.';
     $string2 = html_escape($string);
     echo '<input type="text" name="myfield" value="' . $string2 . '" />';
     echo '<br/>';
     //创建一个表单
     //<form action="http://cyy.com/ci_cms/email/send" method="post" accept-charset="utf-8">
     echo form_open('email/send');
     echo form_close();
     echo '<br/>';
     //增加了属性
     //<form action="http://cyy.com/ci_cms/email/send" class="email" id="myform" method="post" accept-charset="utf-8">
     $attributes = array('class' => 'email', 'id' => 'myform');
     echo form_open('email/send', $attributes);
     echo form_close();
     echo '<br/>';
     //给表单添加隐藏域
     //
     $hidden = array('username' => 'Joe', 'member_id' => '234');
     echo form_open('email/send', '', $hidden);
     echo form_close();
     echo '<br/>';
 }
示例#16
0
 public function index($type = null)
 {
     switch ($type) {
         case null:
             $this->load->library('form_validation');
             $this->form_validation->set_rules('verify', 'Verification Code', 'required|xss_clean|max_length[111]');
             if ($this->form_validation->run() !== false) {
                 redirect('verify/code/' . $this->input->post('verify'));
             }
             $this->load->view('header');
             echo form_open('verify');
             echo form_label('Verify:', 'verify');
             echo form_input('verify', '', 'id="verify_input"');
             echo form_submit('submit', 'Verify');
             echo form_close();
             $this->load->view('footer');
             break;
         case 'newAccount':
             echo "<h1>Verify New Account</h1>";
             echo anchor('verify/send/newAccount', 'Send Confirmation Email', 'title="Send Confirmation Email"');
             break;
         case 'connectAccounts':
             echo "<h1>Connect Accounts</h1><h2>An account with that email already exists.</h2>";
             echo anchor('verify/send/connectAccounts', 'Connect Accounts', 'title="Connect Accounts"');
             break;
     }
 }
 public function block_content($context, array $blocks = array())
 {
     // line 4
     echo "<div class=\"btn-group pull-right\">\n    <a class=\"btn btn-primary btn-small\" href=\"";
     // line 5
     echo twig_escape_filter($this->env, site_url("tugas/tambah_soal/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id")), "html", null, true);
     echo "\">Tambah Pertanyaan</a>\n    ";
     // line 6
     if ($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "type_id") == 3) {
         // line 7
         echo "    <a class=\"btn btn-primary btn-small\" href=\"";
         echo twig_escape_filter($this->env, site_url("tugas/tambah_pilihan/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . $this->getAttribute(isset($context["pertanyaan"]) ? $context["pertanyaan"] : null, "id")), "html", null, true);
         echo "\">Tambah Pilihan</a>\n    ";
     }
     // line 9
     echo "</div>\n\n<h4>Edit Pertanyaan ke ";
     // line 11
     echo twig_escape_filter($this->env, isset($context["no_pertanyaan"]) ? $context["no_pertanyaan"] : null, "html", null, true);
     echo "</h4>\n";
     // line 12
     echo get_flashdata("tugas");
     echo "\n\n";
     // line 14
     echo form_open("tugas/edit_soal/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . $this->getAttribute(isset($context["pertanyaan"]) ? $context["pertanyaan"] : null, "id"));
     echo "\n<table class=\"table table-striped\" style=\"margin-top:20px;\">\n    <tbody>\n        <tr>\n            <td>\n                <textarea name=\"pertanyaan\" id=\"pertanyaan\" style=\"height:400px;width:100%;\">";
     // line 19
     echo set_value("pertanyaan", html_entity_decode($this->getAttribute(isset($context["pertanyaan"]) ? $context["pertanyaan"] : null, "pertanyaan")));
     echo "</textarea>\n                ";
     // line 20
     echo form_error("pertanyaan");
     echo "\n            </td>\n        <tr>\n        <tr>\n            <td colspan=\"2\">\n                <button type=\"submit\" class=\"btn btn-primary\">Update</button>\n            </td>\n        </tr>\n    </tbody>\n</table>\n";
     // line 30
     echo form_close();
     echo "\n";
 }
示例#18
0
 function close()
 {
     $output = form_close() . "\n";
     if ($this->form_id) {
         $output .= "<!-- closing " . $this->form_id . " -->\n";
     }
     return $output;
 }
示例#19
0
 function index()
 {
     $this->rapyd->load('dataform', 'datatable', 'datagrid');
     $this->load->library('table');
     $base_process_uri = $this->rapyd->uri->implode_uri("base_uri", "gfid", "orderby");
     $filter = new DataForm($this->rapyd->uri->add_clause($base_process_uri, "search"));
     $filter->title('Elija una tabla');
     $filter->attributes = array('onsubmit' => 'is_loaded()');
     $filter->tabla = new dropdownField("Tabla", "tabla");
     $filter->tabla->option("pers", "Personal");
     $filter->tabla->option("nomina", "Nomina");
     $filter->tabla->option("sprv", "Proveedores");
     $filter->tabla->option("abonotros", "Abono Otros");
     $filter->tabla->clause = "";
     //$filter->obra = new dropdownField("Obra", "depto");
     //$filter->obra->db_name='depto';
     //$filter->obra->clause="where";
     //$filter->obra->option(" ","Todos");
     //$filter->obra->options("SELECT depto, descrip FROM dpto ORDER BY depto ");
     //$filter->obra->operator="=";
     //$filter->status = new dropdownField("Status","status");
     //$filter->status->option("","Todos");
     //$filter->status->option("A","Activos");
     //$filter->status->option("I","Inactivos");
     //$filter->status->style='width:100px';
     $filter->submit('btnsubmit', 'Descargar');
     $filter->build_form();
     if ($this->rapyd->uri->is_set("search")) {
         $table = $filter->tabla->newValue;
         $mSQL = "DESCRIBE {$table}";
         $query = $this->db->query($mSQL);
         if ($query->num_rows() > 0) {
             foreach ($query->result_array() as $row) {
                 $data[] = $row;
             }
         }
         function ractivo($field)
         {
             $data2 = array('name' => 'campos[]', 'id' => 'c' . $field, 'value' => $field, 'checked' => FALSE, 'style' => 'margin:5px');
             $retorna = form_checkbox($data2);
             return $retorna;
         }
         $grid = new DataGrid("Resultados", $data);
         $grid->use_function('ractivo', 'ucwords');
         $grid->column('Campos', '<ucwords><#Field#></ucwords>');
         $grid->column('Mostrar', "<ractivo><#Field#></ractivo>", 'align="center"');
         $grid->build();
         $tabla = $grid->output;
         $filter->build_form();
         $conten = $filter->output . form_open("nomina/rpers/crear/{$table}") . $tabla . form_submit('mysubmit', 'Generar') . form_close();
     } else {
         $conten = $filter->output;
     }
     $data['content'] = $conten;
     $data['title'] = heading('Reporte');
     $data["head"] = script("jquery.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
示例#20
0
 public function classform()
 {
     $this->load->helper('form');
     echo form_open('http://127.0.0.1/cake/index.php/items/createclass');
     $data = array('name' => 'class_name');
     echo form_input($data);
     echo form_submit('submit', '提交');
     echo form_close();
 }
function buttonAndClose(&$clsForm)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    echoT($clsForm->strSubmitEntry('Save', 2, 'cmdSubmit', 'text-align: center; width: 150px;'));
    echoT(form_close('<br>'));
    echoT('<script type="text/javascript">frmAddEdit.addEditEntry.focus();</script>');
}
示例#22
0
function smarty_function_form_close($params, &$smarty)
{
    $key = 'extra';
    ${$key} = '';
    if (!empty($params[$key])) {
        ${$key} = $params[$key];
    }
    return form_close(${$key});
}
示例#23
0
 /**
  * Get the URL of a page
  *
  * Attributes:
  *  - (int) id : The id of the page to get the URL for.
  *
  * @return string
  */
 public function form()
 {
     $attributes = $this->attributes();
     // This needs to be by itself
     unset($attributes['action']);
     // Now, did they set a custom action?
     $action = $this->attribute('action', 'search/results');
     return form_open($action, $attributes) . PHP_EOL . $this->content() . PHP_EOL . form_close();
 }
示例#24
0
	/**
	 * Create form close
	 * @param array $data Data array
         * @return string HTML form close
	 */
	public function close($data=NULL) {
                if (! $this->render) { 
                        $this->data[] = array('close' => $data);
                }
                $data = $this->_sanitize_param($data);
		$returns = form_close($data['value']);
                $this->returns[] = $returns;
                return $returns;
	}
 public function block_content($context, array $blocks = array())
 {
     // line 8
     echo "<div class=\"module\">\n    <div class=\"module-head\">\n        <h3>";
     // line 10
     echo anchor("pengumuman", "Pengumuman");
     echo " / Buat Pengumuman</h3>\n    </div>\n    <div class=\"module-body\">\n        ";
     // line 13
     echo get_flashdata("pengumuman");
     echo "\n\n        ";
     // line 15
     echo form_open_multipart("pengumuman/add", array("class" => "form-horizontal row-fluid"));
     echo "\n            <div class=\"control-group\">\n                <label class=\"control-label\">Judul <span class=\"text-error\">*</span></label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"judul\" class=\"span12\" value=\"";
     // line 19
     echo twig_escape_filter($this->env, set_value("judul"), "html", null, true);
     echo "\">\n                    <br>";
     // line 20
     echo form_error("judul");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Tgl. Tampil <span class=\"text-error\">*</span></label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"tgl_tampil\" class=\"span4\" value=\"";
     // line 26
     echo twig_escape_filter($this->env, set_value("tgl_tampil"), "html", null, true);
     echo "\" id=\"tgl-tampil\">\n                    <br>";
     // line 27
     echo form_error("tgl_tampil");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Konten <span class=\"text-error\">*</span></label>\n                <div class=\"controls\">\n                    <textarea name=\"konten\" id=\"konten\" style=\"height:400px;width:100%;\">";
     // line 33
     echo set_value("konten");
     echo "</textarea>\n                    ";
     // line 34
     echo form_error("konten");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Tampil Disiswa</label>\n                <div class=\"controls\">\n                    <label class=\"radio inline\"><input type=\"radio\" name=\"tampil_siswa\" value=\"1\" ";
     // line 40
     echo twig_escape_filter($this->env, set_radio("tampil_siswa", "1", true), "html", null, true);
     echo "> Ya</label>\n                    <label class=\"radio inline\"><input type=\"radio\" name=\"tampil_siswa\" value=\"0\" ";
     // line 41
     echo twig_escape_filter($this->env, set_radio("tampil_siswa", "0"), "html", null, true);
     echo "> Tidak</label>\n                    <br>";
     // line 42
     echo form_error("tampil_siswa");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Tampil Dipengajar</label>\n                <div class=\"controls\">\n                    <label class=\"radio inline\"><input type=\"radio\" name=\"tampil_pengajar\" value=\"1\" ";
     // line 48
     echo twig_escape_filter($this->env, set_radio("tampil_pengajar", "1", true), "html", null, true);
     echo "> Ya</label>\n                    <label class=\"radio inline\"><input type=\"radio\" name=\"tampil_pengajar\" value=\"0\" ";
     // line 49
     echo twig_escape_filter($this->env, set_radio("tampil_pengajar", "0"), "html", null, true);
     echo "> Tidak</label>\n                    <br>";
     // line 50
     echo form_error("tampil_pengajar");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <div class=\"controls\">\n                    <button type=\"submit\" class=\"btn btn-primary\">Simpan</button>\n                    <a href=\"";
     // line 56
     echo twig_escape_filter($this->env, site_url("pengumuman"), "html", null, true);
     echo "\" class=\"btn btn-default\">Kembali</a>\n                </div>\n            </div>\n        ";
     // line 59
     echo form_close();
     echo "\n\n    </div>\n</div>\n";
 }
    public function set_sections()
    {
        $this->EE->load->model('template_model');
        $this->EE->load->helper(array('html', 'url'));
        $this->EE->lang->loadfile('design');
        $this->EE->lang->loadfile('template_menu');
        $query = $this->EE->template_model->get_templates(NULL, array('templates.group_id'));
        $sections = array();
        $groups = array();
        foreach ($query->result() as $row) {
            $groups[$row->group_name] = $row->group_id;
            $sections[$row->group_name][] = anchor(BASE . AMP . 'C=design' . AMP . 'M=edit_template' . AMP . 'id=' . $row->template_id, $row->template_name, array('data-href' => site_url($row->group_name . '/' . $row->template_name)));
        }
        $search_form = form_open('C=design' . AMP . 'M=manager');
        $search_form .= form_input(array('type' => 'search', 'name' => 'template_keywords', 'value' => '', 'maxlength' => '80', 'class' => 'input', 'autosave' => 'ee_template_search', 'results' => '10', 'placeholder' => 'Search Template', 'style' => 'width:140px'));
        $search_form .= form_close();
        $this->sections[''] = ul(array($search_form, anchor(BASE . AMP . 'C=design' . AMP . 'M=new_template_group', '+ ' . $this->EE->lang->line('nav_create_group')), anchor(BASE . AMP . 'C=design' . AMP . 'M=manager', $this->EE->lang->line('manager')), anchor(BASE . AMP . 'C=design' . AMP . 'M=global_variables', $this->EE->lang->line('global_vars')), anchor(BASE . AMP . 'C=design' . AMP . 'M=snippets', $this->EE->lang->line('nav_snippets')), anchor(BASE . AMP . 'C=design' . AMP . 'M=sync_templates', $this->EE->lang->line('nav_sync_templates')), anchor(BASE . AMP . 'C=design' . AMP . 'M=global_template_preferences', $this->EE->lang->line('global_prefs')), anchor(BASE . AMP . 'C=design' . AMP . 'M=template_preferences_manager', $this->EE->lang->line('prefs_manager')), anchor('javascript:void(0);', $this->EE->lang->line('view_rendered'), array('id' => 'template_menu_mode')))) . '<div class="clear"></div>';
        foreach ($sections as $key => $value) {
            array_push($value, anchor(BASE . AMP . 'C=design' . AMP . 'M=new_template' . AMP . 'group_id=' . $groups[$key], '<span class="notice">+</span>', array('class' => 'add')));
            $this->sections[anchor(BASE . AMP . 'C=design' . AMP . 'M=edit_template_group' . AMP . 'group_id=' . $groups[$key], $key) . NBS . anchor(BASE . AMP . 'C=design' . AMP . 'M=template_group_delete_confirm' . AMP . 'group_id=' . $groups[$key], '<span class="notice">-</span>')] = ul($value);
        }
        $this->EE->cp->add_to_head('<style type="text/css">#template_menu_acc{padding:10px !important;}#template_menu_acc .accessorySection{padding:0 5px;}#template_menu_acc .accessorySectionFirst{float:none;border:none;border:0;margin-bottom:10px;line-height:20px;}#template_menu_acc .accessorySectionFirst li{float:left;margin-right:14px;}#template_menu_acc .accessorySectionFirst h5{display:none;}#template_menu_acc li a{display:block;padding:0 0 3px;}#template_menu_acc li{padding:0 !important;}#template_menu_acc h5{font-size:12px !important;margin-bottom:4px !important;}#template_menu_acc .accessorySection h5 a{color:white !important;}</style>');
        $this->EE->javascript->output('$("#template_menu_acc .accessorySection:first").addClass("accessorySectionFirst");');
        $this->EE->javascript->output('
		$("#template_menu_mode").click(function(){
			if ( ! $(this).hasClass("mode")) {
				$(this).addClass("mode");
				$(this).html("' . $this->EE->lang->line('edit_templates') . '");
				$("#template_menu_acc .accessorySection:not(.accessorySectionFirst) li a:not(.add)").each(function(){
					var href = $(this).attr("data-href");
					$(this).attr("data-href", $(this).attr("href")).attr("href", href);
				});
			} else {
				$(this).removeClass("mode");
				$(this).html("' . $this->EE->lang->line('view_rendered') . '");
				$("#template_menu_acc .accessorySection:not(.accessorySectionFirst) li a:not(.add)").each(function(){
					var href = $(this).attr("data-href");
					$(this).attr("data-href", $(this).attr("href")).attr("href", href);
				});
			}
		});');
        if ($this->always_open) {
            $this->EE->javascript->output('
				$(".template_menu_acc").parent().siblings().removeClass("current");
				$("#accessoriesDiv .accessory").hide();
				$(".template_menu_acc").parent().addClass("current");
				$("#template_menu_acc").show().attr("templateMenuHeight", 0);
				$("#template_menu_acc .accessorySection:not(.accessorySectionFirst)").each(function(){
					if ($(this).outerHeight() > Number($("#template_menu_acc").attr("templateMenuHeight"))) {
						$("#template_menu_acc").attr("templateMenuHeight", $(this).outerHeight());
					}
				});
				$("#template_menu_acc .accessorySection:not(.accessorySectionFirst)").height(Number($("#template_menu_acc").attr("templateMenuHeight")));
			');
        }
    }
示例#27
0
 function index()
 {
     $this->rapyd->load("dataform", "datatable", 'datagrid');
     $this->load->library('table');
     //$mSQL=$this->db->query("SHOW tables");
     //$row = $mSQL->result_array();
     //$tables =$row;
     //$base_process_uri= $this->rapyd->uri->implode_uri("base_uri","gfid","orderby");
     //$filter = new DataForm($this->rapyd->uri->add_clause($base_process_uri, "search"));
     $filter = new DataForm('nomina/rpers/process');
     $filter->title('Filtro del Reporte');
     //$filter->attributes=array('onsubmit'=>'is_loaded()');
     $filter->tabla = new dropdownField("Tabla", "tabla");
     $filter->tabla->option("pers", "Personal");
     $filter->tabla->clause = "";
     $filter->obra = new dropdownField("Obra", "depto");
     $filter->obra->db_name = 'depto';
     $filter->obra->clause = "where";
     $filter->obra->option(" ", "Todos");
     $filter->obra->options("SELECT depto, descrip FROM dpto ORDER BY depto ");
     $filter->obra->operator = "=";
     $filter->status = new dropdownField("Status", "status");
     $filter->status->option("", "Todos");
     $filter->status->option("A", "Activos");
     $filter->status->option("I", "Inactivos");
     $filter->status->style = 'width:100px';
     //if($this->rapyd->uri->is_set("search")){
     $mSQL = 'DESCRIBE pers';
     $query = $this->db->query($mSQL);
     if ($query->num_rows() > 0) {
         foreach ($query->result_array() as $row) {
             $data[] = $row;
         }
     }
     function ractivo($field)
     {
         $data2 = array('name' => 'campos[]', 'id' => 'c' . $field, 'value' => $field, 'checked' => FALSE, 'style' => 'margin:5px');
         $retorna = form_checkbox($data2);
         return $retorna;
     }
     $grid = new DataGrid("Resultados", $data);
     $grid->use_function('ractivo');
     $grid->column("Campos", 'Field');
     $grid->column("Mostrar", "<ractivo><#Field#></ractivo>", 'align="center"');
     $grid->build();
     $tabla = $grid->output;
     //$filter->button("btnsubmit", "Consultar",'', $position="BL");
     //$filter->button("btnsubmit", "Traer Tikets", form2uri(site_url("/supervisor/tiket/traertiket"),array('cliente')), $position="BL");//
     //$filter->button("btnsubmit", "Traer Tikets", form2uri(site_url("/supervisor/tiket/traertiket"), $position="BL");//
     $filter->build_form();
     $obra = 'hola';
     $data['content'] = $filter->output . form_open("nomina/rpers/crear/{$obra}") . $tabla . form_submit('mysubmit', 'Generar') . form_close();
     $data['title'] = " Reporte ";
     $data["head"] = script("jquery.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $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
     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";
 }
 public function block_content($context, array $blocks = array())
 {
     // line 4
     echo "<div class=\"module\">\n    <div class=\"module-head\">\n        <h3>";
     // line 6
     echo isset($context["module_title"]) ? $context["module_title"] : null;
     echo "</h3>\n    </div>\n    <div class=\"module-body\">\n        ";
     // line 9
     echo get_flashdata("mapel");
     echo "\n\n        <div class=\"bs-callout bs-callout-info\">\n        <p>\n            Pilih matapelajaran yang ingin di masukkan pada <b>";
     // line 13
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["kelas"]) ? $context["kelas"] : null, "nama", array(), "array"), "html", null, true);
     echo "</b>\n        </p>\n        </div>\n        <br>\n\n        ";
     // line 18
     echo form_open("admin/mapel_kelas/add/" . $this->getAttribute(isset($context["parent"]) ? $context["parent"] : null, "id", array(), "array") . "/" . $this->getAttribute(isset($context["kelas"]) ? $context["kelas"] : null, "id", array(), "array") . "/" . enurl_redirect(isset($context["uri_back"]) ? $context["uri_back"] : null));
     echo "\n        <table class=\"table table-striped\">\n        <tbody>\n            ";
     // line 21
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["mapels"]) ? $context["mapels"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["m"]) {
         // line 22
         echo "            ";
         $context["checked"] = get_row_data("mapel_model", "retrieve_kelas", array(0 => null, 1 => $this->getAttribute(isset($context["kelas"]) ? $context["kelas"] : null, "id", array(), "array"), 2 => $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id")));
         // line 23
         echo "            <tr>\n                <td>\n                    ";
         // line 25
         if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") != 1) {
             // line 26
             echo "                    <span class=\"badge badge-warning pull-right\">Matapelajaran Tidak Aktif</span>\n                    ";
         }
         // line 28
         echo "                    <label><input type=\"checkbox\" name=\"mapel[]\" value=\"";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "html", null, true);
         echo "\" style=\"margin-top:-2px;margin-right:5px;\" ";
         echo $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") != 1 ? "disabled" : "";
         echo " ";
         echo twig_test_empty(isset($context["checked"]) ? $context["checked"] : null) ? "" : "checked";
         echo "> ";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "nama"), "html", null, true);
         echo "</label>\n                    <small>";
         // line 29
         echo nl2br(twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "info"), "html", null, true));
         echo "</small>\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 33
     echo "        </tbody>\n        </table>\n        <br>\n        <button type=\"submit\" class=\"btn btn-primary\">Simpan</button>\n        <a href=\"";
     // line 37
     echo twig_escape_filter($this->env, isset($context["uri_back"]) ? $context["uri_back"] : null, "html", null, true);
     echo "\" class=\"btn btn-default\">Kembali</a>\n        ";
     // line 38
     echo form_close();
     echo "\n\n    </div>\n</div>\n";
 }
示例#30
-1
 /**
  * generate code
  */
 function write()
 {
     $table = $this->input->post('table');
     $data = form_open('#', 'method="post" id="form"');
     $data .= $this->generate->generate_form($table);
     $data .= form_button(['value' => 'Build', 'class' => 'btn btn-primary', 'id' => 'build'], 'Build');
     $data .= form_close();
     echo json_encode($data);
 }