コード例 #1
1
 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);
 }
コード例 #2
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);
 }
コード例 #3
0
ファイル: course.php プロジェクト: ccjuantrujillo/cepreadm
 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);
 }
コード例 #4
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/>';
 }
コード例 #5
0
    function ana_kategori_ekle()
    {
        $ozellikler = array('class' => 'kategoriEkleForm', 'id' => 'kategoriEkleForm');
        $html = form_open('kategoriler/kategori_ekle', $ozellikler);
        $html .= '<div class="col-md-4">';
        $html .= form_label('Kategori Adı', 'katAdi" class="label');
        $html .= form_input('katAdi" id="katAdi', '', 'onkeyup="seoOlustur(this.value); hCD(\'katAdi\'); kategoriMukerrerKontrol(this.value);" autocomplete="off"');
        $html .= form_label('Sef Link', 'sefLink" class="label');
        $html .= form_input('sefLink" id="sefLink', '', 'onkeyup="hCD(\'sefLink\');" autocomplete="off"');
        $html .= form_label('Title', 'title" class="label');
        $html .= form_input('title" id="title', '', 'onkeyup="hCD(\'title\');" autocomplete="off"');
        $html .= form_label('Description', 'description" class="label');
        $html .= form_input('description" id="description', '', 'onkeyup="hCD(\'description\');" autocomplete="off"');
        $html .= form_label('Keywords', 'keys" class="label');
        $html .= form_input('keys" id="keys', '', 'onkeyup="hCD(\'keys\');" autocomplete="off"');
        $html .= form_submit('kaydet" id="kaydetTus" onclick="return kategoriKaydetKontrol();', 'Kaydet');
        $html .= form_hidden('kategori_no', $this->input->post('kategori_no', true));
        $html .= '<div id="kayitSonuc">
					<img id="kaydediliyor" src="' . base_url() . 'resimler/loading.gif" />
					<div id="hataMesaji">Kaydediliyor !..</div>
				</div>';
        $html .= '</div>';
        $html .= form_close();
        echo $html;
    }
コード例 #6
0
ファイル: Cursos.php プロジェクト: adrisonluz/syschool
 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);
 }
コード例 #7
0
ファイル: Search_parser.php プロジェクト: 68kb/68kb
 /**
  * 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;
 }
 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";
 }
コード例 #10
0
ファイル: datatables_helper.php プロジェクト: NeroJz/ekv
function checkStatus($url, $id, $title)
{
    $CI =& get_instance();
    $ee = $title;
    $strStatus = '';
    $stat = 0;
    $btnSubmitStatus = '';
    switch ($CI->session->userdata("level")) {
        case 1:
            $btnSubmitStatus = "style='cursor:pointer;' onclick=formSubmit('f" . $id . "')";
            break;
        case 2:
            $btnSubmitStatus = "class='img_grey'";
            break;
        default:
            echo "Tahap Akses belum diset!!!";
            break;
    }
    $attributes = array('name' => 'f' . $id, 'id' => 'f' . $id);
    //open form with codeigniter to included CSRF
    $strStatus .= form_open($url, $attributes);
    $strStatus .= '<div align="center">';
    if ($ee == 1) {
        $strStatus .= "<img src='" . base_url() . "images/on.png'\n\t\t{$btnSubmitStatus} id='element' data-original-title='Enable Content'  />";
        $stat = 0;
    } else {
        $strStatus .= "<img src='" . base_url() . "images/off.png'\n\t{$btnSubmitStatus} alt='DELETE' id='element' data-original-title='Disable Content' />";
        $stat = 1;
    }
    $strStatus .= '<input name="hid_status" type="hidden" value="' . $stat . '">
	<input name="hid_id" type="hidden" value="' . $id . '">
	</div>
	</form>';
    return $strStatus;
}
コード例 #11
0
ファイル: Stock.php プロジェクト: khoanguyen96/stock-ticker
 /**
  * Displays the details of the requested stock.
  */
 public function display()
 {
     $this->load->helper('form');
     if (!empty($this->input->post('stock'))) {
         $code = $this->input->post('stock');
         $this->data['src'] = "../assets/js/stock-history.js";
     } else {
         $code = $this->uri->segment(3);
         $this->data['src'] = "../../assets/js/stock-history.js";
     }
     $this->data['title'] = "Stocks ~ {$code}";
     $this->data['left-panel-content'] = 'stock/index';
     $this->data['right-panel-content'] = 'stock/sales';
     $this->data['stock_code'] = $code;
     $this->data['trans'] = $this->transactions->getSalesTransactions($code);
     $form = form_open('stock/display');
     $stock_codes = array();
     $stock_names = array();
     $stocks = $this->stocks->getAllStocks();
     $stock = $this->stocks->get($code);
     foreach ($stocks as $item) {
         array_push($stock_codes, $item->Code);
         array_push($stock_names, $item->Name);
     }
     $stocks = array_combine($stock_codes, $stock_names);
     $select = form_dropdown('stock', $stocks, $code, "class = 'form-control'" . "onchange = 'this.form.submit()'");
     $this->data['Name'] = $stock->Name;
     $this->data['Code'] = $stock->Code;
     $this->data['Category'] = $stock->Category;
     $this->data['Value'] = money_format("\$%i", $stock->Value);
     $this->data['form'] = $form;
     $this->data['select'] = $select;
     $this->render();
 }
コード例 #12
0
ファイル: Player.php プロジェクト: khoanguyen96/stock-ticker
 /**
  * Displays a Player based on an post request of the dropdown menu.
  */
 public function display()
 {
     $this->data['transactions'] = $this->transactions->getAllTransactions();
     $this->data['players'] = $this->players->getAllPlayers();
     $this->load->helper('form');
     $code = $this->input->post('player');
     $this->data['Playername'] = $code;
     $this->data['title'] = "Stock Ticker";
     $this->data['left-panel-content'] = 'player/players';
     $this->data['right-panel-content'] = 'player/transactions';
     $this->data['player_code'] = $code;
     $form = form_open('player/display');
     $player_cash = array();
     $player_names = array();
     $players = $this->players->getAllPlayers();
     foreach ($players as $item) {
         array_push($player_names, $item->Player);
         array_push($player_cash, $item->Cash);
     }
     $players = array_combine($player_names, $player_names);
     $select = form_dropdown('player', $players, $code, "class = 'form-control'" . "onchange = 'this.form.submit()'");
     $this->data['form'] = $form;
     $this->data['select'] = $select;
     $this->data['ptrans'] = $this->transactions->getPlayerTransactions($code);
     $this->data['holdings'] = $this->transactions->getCurrentHoldings($code);
     $this->render();
 }
コード例 #13
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;
        }
コード例 #14
0
ファイル: verify.php プロジェクト: AnchorActivism/poetrystorm
 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;
     }
 }
コード例 #15
0
	/**
	 * Create form open
	 * @param array $data Data array
         * @return string HTML form open
	 */
	public function open($data=NULL) {
                $form_action = NULL;
                $uri = NULL;
                if (isset($this->uri)) {
                        $uri = $this->uri;
                } else {
                        $uri = $data['uri'];
                        if (empty($uri)) {
                                $uri = current_url();
                        }
                }
                if (isset($this->on_success)) {
                        $data['form_action'] = array('form_action' => 'auto');
                }
                $name = isset($this->name) ? $this->name : $data['name'];
                $data['name'] = $name;
		$data['id'] = isset($data['id']) ? $data['id'] : $data['name'];
                if (! $this->render) { 
                        $data['id'] = 'form_'.$data['id'];
                        $data['id'] = str_replace('form_form_', 'form_', $data['id']);
                        $data['uri'] = $uri;
                        $this->data[] = array('open' => $data);
                }
                $data = $this->_sanitize_param($data);
		$returns = form_open($uri, $data, $data['form_action']);
                $this->returns[] = $returns;
                return $returns;
	}
 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";
 }
コード例 #17
0
ファイル: admin.php プロジェクト: nicefirework/new_elearning
 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);
     }
 }
 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";
 }
 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";
 }
コード例 #20
0
ファイル: mantenimiento.php プロジェクト: enderochoa/tortuga
 function centinelas()
 {
     $this->load->helper('directory');
     $this->load->library('table');
     $tmpl = array('row_start' => '<tr valign="top">');
     $this->table->set_template($tmpl);
     $map = directory_map('./system/logs/');
     $lista = array();
     foreach ($map as $file) {
         if ($file != 'index.html') {
             $lista[] = anchor("supervisor/mantenimiento/borracentinela/{$file}", 'X') . " <a href='javascript:void(0)' onclick=\"carga('{$file}')\" >{$file}</a>";
         }
     }
     $copy = "<br><a href='javascript:void(0)' class='mininegro'  onclick=\"copiar()\" >Copiar texto</a>";
     $tadata = array('name' => 'sql', 'id' => 'log', 'rows' => '20', 'cols' => '60');
     $form = form_open('ejecutasql/filteredgrid/process') . form_textarea($tadata) . '<br>' . form_submit('mysubmit', 'Ejecutar como SQL') . form_close();
     $this->table->add_row(ul($lista), '<b id="fnom">Seleccione un archivo de centinela</b><br>' . $form);
     $link = site_url('supervisor/mantenimiento/vercentinela');
     $data['script'] = "<script>\n\t\t  function carga(arch){\n\t\t    link='{$link}'+'/'+arch;\n\t\t    //alert(link);\n\t\t    \$('#fnom').text(arch);\n\t\t    \$('#log').load(link);\n\t\t  };\n\t\t  function copiar(){\n\t\t    \$('#log').copy();\n\t\t  };\n\t\t</script>";
     $data['content'] = $this->table->generate();
     $data['title'] = " Centinelas ";
     //script('plugins/jquery.clipboard.pack.js')
     $data["head"] = script("jquery.pack.js") . script('plugins/jquery.copy.min.js') . $this->rapyd->get_head() . style('marcos.css') . style('estilos.css');
     $this->load->view('view_ventanas', $data);
 }
コード例 #21
0
ファイル: SP_form_helper.php プロジェクト: pkriete/simplypost
/**
 * Form Declaration - CSRF Safe
 *
 * Creates the opening portion of the form as well as a hidden field with a unique id.
 *
 * @access	public
 * @param	string	the URI segments of the form destination
 * @param	array	a key/value pair of attributes
 * @param	array	a key/value pair hidden data
 * @return	string
 */
function form_open_safe($action = '', $attributes = '', $hidden = array())
{
    $CI =& get_instance();
    $sig = $CI->input->get_csrf_token();
    $hidden = array_merge($hidden, array('act_s' => $sig));
    return form_open($action, $attributes, $hidden);
}
コード例 #22
0
ファイル: newsletter_model.php プロジェクト: toni-leigh/core
 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;
 }
コード例 #23
0
ファイル: social_pi.php プロジェクト: Ahmad-Hilali/agilan
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;
}
コード例 #24
0
ファイル: rpers.php プロジェクト: codethics/proteoerp
 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);
 }
コード例 #25
0
ファイル: employments.php プロジェクト: revol-tech/mole
 /**
  * list all employments
  */
 public function list_employments()
 {
     //initial configurations for pagination
     $config['base_url'] = site_url('admin/employments/index');
     $config['total_rows'] = $this->employments_model->record_count($this->type);
     $config['per_page'] = PAGEITEMS;
     //if there are no polls at present ...
     if ($config['total_rows'] == 0) {
         $item->id = '--';
         $item->title = '--';
         $item->title_link = '--';
         $item->date_created = '--';
         $item->employments_type = '--';
         $item->created_by = '--';
         $item->date_published = '--';
         $item->active = '--';
         $item->edit = '--';
         $item->del = '--';
         $data['items'] = $item;
         return array('data' => array($item));
     }
     //print_r($data);
     //get reqd page number
     foreach ($this->uri->segment_array() as $key => $val) {
         if ($val == 'index') {
             $config['uri_segment'] = $key + 1;
             break;
         }
     }
     $this->pagination->initialize($config);
     isset($config['uri_segment']) ? '' : ($config['uri_segment'] = $this->uri->total_segments());
     $page = $this->uri->segment($config['uri_segment']) ? $this->uri->segment($config['uri_segment']) : 0;
     //get reqd. page's data
     $data = $this->employments_model->get(array('news_type' => $this->type), $config['per_page'], $page);
     foreach ($data as $key => $val) {
         $str = '<a href="' . site_url('admin/employments/view/' . $val->id) . '">' . $val->title . '</a>';
         $data[$key]->title_link = $str;
         $str = '<a href="' . site_url('admin/employments/edit/' . $val->id) . '">edit</a>';
         $data[$key]->edit = $str;
         $str = form_open(site_url('admin/employments/del/')) . '<input type="hidden" name="employments_id" value="' . $val->id . '"/>' . '<input type="submit" name="del" value="Delete"/>' . '</form>';
         $data[$key]->del = $str;
         //to convert the userid into username
         $tmp_user = $data[$key]->created_by;
         $data[$key]->created_by = $this->ion_auth->get_user((int) $tmp_user)->username;
         //add activate/deactivate button
         $str = form_open(site_url('admin/employments/active/')) . '<input type="hidden" name="employments_id" value="' . $data[$key]->id . '"/>';
         if ($data[$key]->active == 1) {
             $str .= '<input type="hidden" name="activate" value="false"/>';
             $str .= '<input type="submit" name="active"   value="Deactivate"/>';
         } else {
             $str .= '<input type="hidden" name="activate" value="true"/>';
             $str .= '<input type="submit" name="active"   value="Activate"/>';
         }
         $str .= '</form>';
         $data[$key]->active = $str;
     }
     return array('data' => $data, 'links' => $this->pagination->create_links());
 }
コード例 #26
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();
 }
コード例 #27
0
ファイル: Items.php プロジェクト: xiaoyueguang/cake
 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();
 }
コード例 #28
0
ファイル: form.php プロジェクト: virutmath/suckhoe
function form_open_multipart($a = '', $b = array(), $c = array())
{
    if (is_string($b)) {
        $b .= ' enctype="multipart/form-data"';
    } else {
        $b['enctype'] = 'multipart/form-data';
    }
    return form_open($a, $b, $c);
}
コード例 #29
0
ファイル: form_helper.php プロジェクト: 68kb/68kb
 function form_open_multipart($action, $attributes = array(), $hidden = array())
 {
     if (is_string($attributes)) {
         $attributes .= ' enctype="multipart/form-data"';
     } else {
         $attributes['enctype'] = 'multipart/form-data';
     }
     return form_open($action, $attributes, $hidden);
 }
コード例 #30
-1
ファイル: builder.php プロジェクト: joelmwas/ci-gen
 /**
  * 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);
 }