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;
        }
Example #2
0
 function display_field($data)
 {
     array_merge($this->settings, $this->settings_vars);
     $text_direction = $this->settings['field_text_direction'] == 'rtl' ? 'rtl' : 'ltr';
     $field_options = $this->_get_field_options($data);
     // If they've selected something we'll make sure that it's a valid choice
     $selected = $data;
     //$this->EE->input->post($this->field_name);
     $r = form_fieldset('');
     foreach ($field_options as $option) {
         $selected = $option == $data;
         $r .= '<label>' . form_radio($this->field_name, $option, $selected) . NBS . $option . '</label>';
     }
     return $r . form_fieldset_close();
 }
Example #3
0
function form_persyaratan($caption, $persyaratan = array(), $syarats = '')
{
    $values = $syarats != '' ? unserialize($syarats) : array();
    if (is_array($persyaratan) && count($persyaratan) > 0) {
        $output = form_fieldset($caption);
        $output .= "<div id=\"control_input_syarat_pengajuan\" class=\"control-group\">\n\t";
        $output .= form_hidden('total_syarat', count($persyaratan));
        $output .= form_label('Persyaratan', 'input_syarat_pengajuan', array('class' => 'control-label'));
        $output .= "\n\t<div class=\"controls\">";
        foreach ($persyaratan as $id => $syarat) {
            $output .= form_label(form_checkbox(array('name' => 'surat_syarat[]', 'id' => 'input_syarat_' . $id, 'value' => $id, 'checked' => in_array($id, $values))) . ' ' . $syarat, 'input_syarat_' . $id, array('class' => 'checkbox'));
        }
        $output .= "\n\t</div>\n</div>";
        $output .= form_fieldset_close();
        return $output;
    }
}
Example #4
0
 private function _display_field($data, $container = 'fieldset')
 {
     array_merge($this->settings, $this->settings_vars);
     $text_direction = isset($this->settings['field_text_direction']) ? $this->settings['field_text_direction'] : 'ltr';
     $field_options = $this->_get_field_options($data);
     $selected = $data;
     $r = '';
     foreach ($field_options as $key => $value) {
         $selected = $key == $data;
         $r .= '<label>' . form_radio($this->field_name, $value, $selected) . NBS . $key . '</label>';
     }
     switch ($container) {
         case 'grid':
             $r = $this->grid_padding_container($r);
             break;
         default:
             $r = form_fieldset('') . $r . form_fieldset_close();
             break;
     }
     return $r;
 }
$array_period_y[""] = "-- Year --";
foreach ($this->M_npk->years as $k => $v) {
    $array_period_y[$k] = $v;
}
echo "<div id='filterform' style='width:800px'>";
echo form_open(site_url('/rpt/ndchurn'));
echo form_fieldset("<span style='cursor:hand' onclick=\"toggleFieldset(document.getElementById('filtertable'));\">Filter</span>");
echo "<table id='filtertable'>";
echo "<tr><td>Pengelola</td><td>:</td>";
echo "<td>" . form_dropdown('f_pgl_id', $array_pgl, array(), "class='pgl_to_ten'") . "</td></tr>";
echo "<tr><td>Tenant</td><td>:</td>";
echo "<td><span class='ct_ten_of_pgl'>" . form_dropdown('ten_id', $array_ten, array(), "class='ten_of_pgl'") . "</span></td></tr>";
echo "<tr><td>Period</td><td>:</td><td>" . form_dropdown("f_period_m", $array_period_m, isset($_POST['f_period_m']) ? array($_POST['f_period_m']) : array(date("m"))) . " " . form_dropdown("f_period_y", $array_period_y, isset($_POST['f_period_y']) ? array($_POST['f_period_y']) : array(date("Y"))) . "</td></tr>";
echo "<tr><td colspan=3 align='right'>" . form_submit('filter', 'OK', '') . "</td></tr>";
echo "</table>";
echo form_fieldset_close('');
echo form_close();
echo "</div>";
if (count($dt) > 0) {
    echo "<div id='navigation'><ul>";
    echo "<li><a href='" . site_url('/rpt/ndchurnsheet/' . $_POST['f_pgl_id'] . '/' . $_POST['ten_id'] . '/' . $_POST['f_period_y'] . $_POST['f_period_m']) . "'><img src='" . image_asset_url('xls.gif') . "' width=15 /></a></li>";
    echo "</ul></div><br>";
}
echo "<i>Count = </i>" . count($dt);
?>

<table class='tablesorter' id='tb_c2bi'>
<thead><tr><th>No.</th><th>No. Fastel</th></tr></thead>
<tbody>
<?php 
$no = 1;
Example #6
0
 public function type_fieldset_close()
 {
     return form_fieldset_close();
 }
 function fieldset_close()
 {
     $el = form_fieldset_close();
     return $this->field_suffix . $el . $this->element_suffix;
 }
<?php

// Imprime o Doctype
echo doctype('xhtml1-trans');
?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  <title>Cadastro - TreinaWeb CodeIgniter</title>
  <style type="text/css">
  small.erro{display: block;padding: 0.2em;
  background-color: #990000; color: white; margin: 0.2em;}
  </style>
</head>
<body>

<?php 
echo form_open('cadastro') . "\n\n", form_fieldset("Cadastro") . "\n", form_label('Nome', 'nome'), form_error('nome'), form_input('nome', set_value('nome', '')), "<br />", form_label('email', 'email'), form_error('email'), form_input('email', set_value('email', '')), "<br />", form_label('senha', 'senha'), form_error('senha'), form_password('senha'), "<br />", form_label('Confirmar Senha', 'senha-confirma'), form_error('senha-confirma'), form_password('senha-confirma'), "<br />", form_submit('', 'Efetuar Cadastro'), form_fieldset_close() . "\n\n", form_close(), validation_errors();
?>

</body>
</html>
Example #9
0
<?php

//BUAT HEADnya
//	$s=form_open('rumah/insert');
//DISARANKAN!!
$attributes = array('class' => 'frmBuku', 'id' => 'myform');
$s = form_open('rumah/insert', $attributes);
$a = array();
//TEXT
$data = array('name' => 'buku', 'id' => 'bukuInput', 'value' => '', 'maxlength' => '100', 'size' => '20', 'style' => 'width:50%');
$a['JUDUL'] = form_input($data);
foreach ($a as $n => $v) {
    $s .= form_fieldset($n);
    $s .= form_label($v, $n);
    $s .= form_fieldset_close();
}
$s .= form_submit('mysubmit', 'Input data!');
$s .= form_close();
print $s;
$s = '';
Example #10
0
if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}
switch ($tela) {
    case 'cadastrar':
        echo bt_row(array(form_open_multipart('midia/cadastrar'), form_fieldset(), bt_col(12, array(get_msg('msgok'), get_msg('msgerro'), erros_validacao())), bt_col(12, bt_input('Titulo midia', 'nome', 4)), bt_col(12, bt_input('Descrição', 'descricao', 2)), bt_col(12, bt_input('Alt', 'alt', 2)), bt_col(12, bt_form(12, array(form_label('Arquivo'), form_upload(array('name' => 'arquivo'), set_value('arquivo'))))), bt_col(12, array(anchor('midia/gerenciar', 'Canselar', array('class' => 'btn btn-danger espaco')), bt_submit('Salvar', 'cadastrar', 4, 3))), form_fieldset_close(), form_close()));
        break;
    case 'editar':
        $id = $this->uri->segment(3);
        if ($id == NULL) {
            set_msg('msgerro', 'Não foi informado uma midia valido.', 'aviso');
            redirect('midia/gerenciar');
        }
        $query = $this->midia->get_byid($id)->row();
        echo bt_row(array(form_open(current_url()), form_fieldset(), bt_col(12, array(get_msg('msgok'), get_msg('msgerro'), erros_validacao())), bt_col(6, array(bt_col(12, bt_input_cont('Titulo midia', 'nome', 12, $query->nome)), bt_col(12, bt_input_cont('Descrição', 'descricao', 12, $query->descricao)), bt_col(12, bt_input_cont('Alt', 'alt', 12, $query->alt)), bt_col(12, array(anchor('midia/gerenciar', 'Canselar', array('class' => 'btn btn-danger espaco')), bt_submit('Salvar', 'cadastrar', 4, 3))))), bt_col(6, trumb($query->arquivo, 300, 250, TRUE, $query->alt)), form_hidden('id', $id), form_fieldset_close(), form_close()));
        break;
    case 'gerenciar':
        bt_row(bt_col(12, array(get_msg('msgok'), get_msg('msgerro'))));
        ?>
       
         <div class="table-responsive">
            <table class="table table-hover table-striped data-table">
                <thead>
                    <tr>

                       <th>Nome<i class="fa"></i></th>
                       <th>Link<i class="fa"></i></th>
                       <th>Miniaturar<i class="fa"></i></th>
                       <th class="text-center">Ação<i class="fa"></i></th>
                    </tr>
Example #11
0
 public function form_helper()
 {
     $this->load->helper('form');
     $attributes = array('class' => 'email', 'id' => 'myform');
     echo form_open('email/send', $attributes);
     //echo form_open_multipart('email/send', $attributes);
     $data = array('name' => 'John Doe', 'email' => '*****@*****.**', 'url' => 'http://example.com');
     echo form_hidden($data);
     $data = array('name' => 'John Doe', 'email' => '*****@*****.**', 'url' => 'http://example.com');
     echo form_hidden('my_array', $data);
     $data = array('type' => 'hidden', 'name' => 'email', 'id' => 'hiddenemail', 'value' => '*****@*****.**', 'class' => 'hiddenemail');
     echo form_input($data);
     $data = array('name' => 'username', 'id' => 'username', 'value' => 'johndoe', 'maxlength' => '100', 'size' => '50', 'style' => 'width:50%');
     echo form_input($data);
     $options = array('small' => 'Small Shirt', 'med' => 'Medium Shirt', 'large' => 'Large Shirt', 'xlarge' => 'Extra Large Shirt');
     $shirts_on_sale = array('small', 'large');
     echo form_dropdown('shirts', $options, 'large');
     echo form_dropdown('shirts', $options, $shirts_on_sale);
     $js = 'id="shirts" onChange="some_function();"';
     echo form_dropdown('shirts', $options, 'large', $js);
     echo form_fieldset('Address Information');
     echo "<p>fieldset content here</p>\n";
     echo form_fieldset_close();
     $attributes = array('id' => 'address_info', 'class' => 'address_info');
     echo form_fieldset('Address Information', $attributes);
     echo "<p>fieldset content here</p>\n";
     echo form_fieldset_close();
     echo form_checkbox('newsletter', 'accept', TRUE);
     $js = 'onClick="some_function()"';
     echo form_checkbox('newsletter', 'accept', TRUE, $js);
     echo form_label('What is your Name', 'username');
     $attributes = array('class' => 'mycustomclass', 'style' => 'color: #000;');
     echo form_label('What is your Name', 'username', $attributes);
     echo form_submit('mysubmit', 'Submit Post!');
     echo form_button('name', 'content');
     $data = array('name' => 'button', 'id' => 'button', 'value' => 'true', 'type' => 'reset', 'content' => 'Reset');
     echo form_button($data);
     $js = 'onClick="some_function()"';
     echo form_button('mybutton', 'Click Me', $js);
     echo form_error('myfield', '<div class="error">', '</div>');
     echo validation_errors('<span class="error">', '</span>');
     echo form_close();
 }
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>Formulário de Contato - TreinaWeb CodeIgniter</title>
</head>

<body>

<?php 
echo form_open('contato/enviar') . "\n\n";
echo form_fieldset("Contato") . "\n";
echo form_label('Nome: ', 'txt-nome') . "<br />\n";
echo form_input("txt-nome") . "\n\n";
echo br();
// <br />
echo form_label('E-mail: ', 'txt-email') . "<br />\n";
echo form_input("txt-email") . "\n\n";
echo br();
// <br />
echo form_label('Mensagem: ', 'txt-msg') . "<br />\n";
echo form_textarea(array("name" => "txt-msg", "rows" => 10, "cols" => 50), "") . "\n\n";
echo br();
// <br />
echo form_submit("btn-enviar", "Enviar") . "\n";
echo form_fieldset_close() . "\n\n";
echo form_close();
?>

</body>
</html>
Example #13
0
	private function display_field_radio($options, $current_value = '')
	{
		$output = form_fieldset('');

		foreach($options as $value => $label)
		{
			$output .= form_label(form_radio($this->field_name, $value, $value == $current_value).NBS.$label);
		}
		
		$output .= form_fieldset_close();
		
		return $output;
	}
<?php

$txt_name = set_value("txt-postar", 'Valor inicial');
echo form_open('helpers/form'), form_fieldset("Exemplo de como recuperar dados do POST"), form_label('Seu nome:', 'txt-nome'), form_input('txt-nome', $txt_name), "<br />", form_label('Digite um nome:', 'txt-postar'), form_input('txt-postar', ''), "<br />", form_submit('btn-submeter', 'Enviar'), form_fieldset_close(), form_close();
Example #15
0
 private function _display_field($data, $container = 'fieldset')
 {
     array_merge($this->settings, $this->settings_vars);
     $text_direction = isset($this->settings['field_text_direction']) ? $this->settings['field_text_direction'] : 'ltr';
     $field_options = $this->_get_field_options($data);
     if (REQ == 'CP') {
         if ($data === TRUE) {
             $data = 'y';
         } elseif ($data === FALSE) {
             $data = 'n';
         }
         return ee('View')->make('radio:publish')->render(array('field_name' => $this->field_name, 'selected' => $data, 'options' => $field_options));
     }
     $selected = $data;
     $r = '';
     $class = 'choice mr';
     foreach ($field_options as $key => $value) {
         $selected = $key == $data;
         $r .= '<label>' . form_radio($this->field_name, $value, $selected) . NBS . $key . '</label>';
     }
     switch ($container) {
         case 'grid':
             $r = $this->grid_padding_container($r);
             break;
         default:
             $r = form_fieldset('') . $r . form_fieldset_close();
             break;
     }
     return $r;
 }
Example #16
0
		</div>
		
	<?=form_fieldset_close()?>
<?=form_close();?>

<!-------------------------------------   Add user   -------------------------------------->

<?=form_open('login/create_account')?>
	<?=form_fieldset('Creare cont')?>
	
		<div class="textfield">
			<?=form_label('username', 'user_name')?>
			<?=form_error('user_name')?>
			<?=form_input('user_name', set_value('user_name'))?>
		</div>
		
		<div class="textfield">
			<?=form_label('password', 'user_pass')?>
			<?=form_error('user_pass')?>
			<?=form_password('user_pass')?>
		</div>
		
		<div class="buttons">
			<?=form_submit('create', 'Create')?>
		</div>
		
	<?=form_fieldset_close()?>
<?=form_close();?>
       
</div>
Example #17
0
						<h5>Password</h5>
							<?php 
$extras = array('size' => '50', 'style' => 'width:50%', 'id' => 'pass');
echo form_error('pass');
echo form_password($data = 'pass', $value = set_value('pass', ''), $extras);
?>
						<h5>Confirm Password</h5>
							<?php 
$extras = array('size' => '50', 'style' => 'width:50%');
echo form_error('confpass');
echo form_password($data = 'confpass', $value = '', $extras);
?>
						<h5>upload ppic</h5>
							<input type="file" name="ppic" size="20" />
							
							<br /><br />
							
							<input type="submit" value="upload" />
					</div>
				<?php 
echo form_fieldset_close("</div> <br /><br />");
?>
			
		</div>
					


</form>

</body>
</html>
Example #18
0
 private function _display_field($data, $container = 'fieldset')
 {
     array_merge($this->settings, $this->settings_vars);
     $values = decode_multi_field($data);
     if (isset($this->settings['string_override']) && $this->settings['string_override'] != '') {
         return $this->settings['string_override'];
     }
     $values = decode_multi_field($data);
     $field_options = $this->_get_field_options($data);
     if (REQ == 'CP') {
         return ee('View')->make('checkboxes:publish')->render(array('field_name' => $this->field_name, 'values' => $values, 'options' => $field_options));
     }
     $r = '<div class="scroll-wrap pr">';
     $r .= $this->_display_nested_form($field_options, $values);
     $r .= '</div>';
     switch ($container) {
         case 'grid':
             $r = $this->grid_padding_container($r);
             break;
         default:
             $r = form_fieldset('') . $r . form_fieldset_close();
             break;
     }
     return $r;
 }
<!-- Start Inhalt
================================================== -->
<!-- Start Seitentitel -->
<?php echo '<h2>' . $heading . '</h2>'; ?>
<!-- Ende Seitentitel -->

<?php
echo form_open() . PHP_EOL;
echo form_fieldset() . PHP_EOL;
echo form_hidden('buch_id', $buch_id);
echo form_hidden('auflage_id', $auflage_id);
echo form_hidden('current_page', $current_page);
echo '<p>' . $description . '</p>' . PHP_EOL;
echo '<h1>' . $buchtitel . '</h1>' . PHP_EOL;
echo form_fieldset_close() . PHP_EOL;
echo form_fieldset() . PHP_EOL;
echo form_button('abbrechen', $back_txt, 'onClick=self.location.href="' . $back_link . '"') . PHP_EOL;
if(isset($submit_link)){
    echo form_button('löschen', $submit_txt, 'onClick=self.location.href="' . $submit_link . '"') . PHP_EOL;
}
else {
    echo form_submit('loeschen', $submit_txt, 'class="kurz go"') . PHP_EOL;
}

echo form_fieldset_close() . PHP_EOL;
echo form_close() . PHP_EOL;
?>

<!-- Ende Formular -->
<!-- Ende Inhalt -->
    public function test_form_fieldset_close()
    {
        $expected = <<<EOH
</fieldset></div></div>
EOH;
        $this->assertEquals($expected, form_fieldset_close('</div></div>'));
    }
Example #21
0
					<div class="input">
					<?php 
						$data = array(
									'name' => $key,
									'value' => set_value($key),
									'class' => 'xlarge'
								);
					echo form_input($data); ?>
					<span class="help-inline"><?php echo form_error($key); ?></span>
					</div>
				</div>
			<?php } ?>
			</fieldset>
		<?php }
	?>
	<?php echo form_fieldset_close(); ?>
	
	<div class="<?php if(form_error('informal_skill')=="") echo "clearfix"; else echo "clearfix error" ?>">
		<label for="informal_skill">Keahlian informal:  </label>
		<div class="input">
		<?php 
			$data = array(
						'name' => 'informal_skill',
						'value' => set_value('informal_skill'),
						'class' => 'xlarge'
					);
		echo form_input($data); ?>
		<span class="help-inline"><?php echo form_error('informal_skill'); ?></span>
		</div>
	</div>
	<div class="actions">
Example #22
0
    $barangay = array('name' => 'barangay', 'id' => 'barangay', 'maxlength' => '100', 'size' => '100', 'desc' => 'Barangay', 'value' => $result->barangay);
    $type_1 = array('name' => 'type', 'id' => 'type1', 'desc' => array_get('CATEGORY', 1), 'value' => '1', 'checked' => $result->category == 1);
    $type_2 = array('name' => 'type', 'id' => 'type2', 'desc' => array_get('CATEGORY', 2), 'value' => '2', 'checked' => $result->category == 2);
    $type_3 = array('name' => 'type', 'id' => 'type3', 'desc' => array_get('CATEGORY', 3), 'value' => '3', 'checked' => $result->category == 3);
    $type_4 = array('name' => 'type', 'id' => 'type4', 'desc' => array_get('CATEGORY', 4), 'value' => '4', 'checked' => $result->category == 4);
    $remarks = array('name' => 'remarks', 'id' => 'remarks', 'maxlength' => '255', 'rows' => '3', 'cols' => '100', 'desc' => 'Remarks', 'value' => $result->remarks);
    $formdate = new FormDate();
    $formdate->year['start'] = 1950;
    $formdate->year['end'] = 2010;
    //TODO: auto increment based on system time
    //set the birthday value
    $fulldate = explode('-', $result->birthday);
    $formdate->year['selected'] = $fulldate[0];
    $formdate->month['selected'] = $fulldate[1];
    $formdate->day['selected'] = $fulldate[2];
    $form_element = array(form_label($first_name['desc'], $first_name['id']) . form_input($first_name), form_label($last_name['desc'], $last_name['id']) . form_input($last_name), form_label($address['desc'], $address['id']) . form_textarea($address), form_fieldset('Sex') . form_radio($sex_m) . form_label($sex_m['desc'], $sex_m['id']) . form_radio($sex_f) . form_label($sex_f['desc'], $sex_f['id']) . form_fieldset_close(), form_fieldset('Civil status') . form_radio($status_s) . form_label($status_s['desc'], $status_s['id']) . form_radio($status_m) . form_label($status_m['desc'], $status_m['id']) . form_radio($status_l) . form_label($status_l['desc'], $status_l['id']) . form_radio($status_w) . form_label($status_w['desc'], $status_w['id']) . form_fieldset_close(), form_label($precinct['desc'], $precinct['id']) . form_input($precinct), form_label($barangay['desc'], $barangay['id']) . form_input($barangay), '<label>Birthday</label>' . $formdate->selectMonth() . $formdate->selectDay() . $formdate->selectYear(), form_fieldset('Category') . form_radio($type_1) . form_label($type_1['desc'], $type_1['id']) . form_radio($type_2) . form_label($type_2['desc'], $type_2['id']) . form_radio($type_3) . form_label($type_3['desc'], $type_3['id']) . form_radio($type_4) . form_label($type_4['desc'], $type_4['id']) . form_fieldset_close(), form_label($remarks['desc'], $remarks['id']) . form_textarea($remarks));
    ?>
    
  <?php 
    foreach ($form_element as $item) {
        ?>
      <li><?php 
        echo $item;
        ?>
</li>
  <?php 
    }
    ?>
      
  <?php 
    echo form_reset('reset', 'Reset');
Example #23
0
 function display_field($data)
 {
     array_merge($this->settings, $this->settings_vars);
     $values = decode_multi_field($data);
     if (is_string($data) && $data != '' && $data[0] == '<') {
         return $data;
     }
     if (isset($this->settings['string_override']) && $this->settings['string_override'] != '') {
         return $this->settings['string_override'];
     }
     $field_options = $this->_get_field_options($data);
     $values = decode_multi_field($data);
     $r = form_fieldset('');
     foreach ($field_options as $option) {
         $checked = in_array(form_prep($option), $values) ? TRUE : FALSE;
         $r .= '<label>' . form_checkbox($this->field_name . '[]', $option, $checked) . NBS . $option . '</label>';
     }
     return $r . form_fieldset_close();
 }
Example #24
0
/**
 * 弹出层验证表单内容
 * @param array $inputs 标签数组
 */
function form_detail($inputs)
{
    $html = '';
    foreach ($inputs as $input) {
        $html .= form_fieldset('', array('class' => 'control-group'));
        if ($input['must']) {
            //必填选项
            $input['label'] = '<span class="must_label">*</span>' . $input['label'];
        }
        $html .= form_label($input['label'], '', array('class' => 'control-label'));
        //label说明
        //是否只是展示内容
        switch ($input['widget']['display']) {
            case 1:
                $html .= '<div class="controls controls-info">';
                break;
            case 2:
                $html .= '<div class="controls controls-horizontal">';
                break;
            default:
                $html .= '<div class="controls">';
                break;
        }
        $html .= $input['widget']['input'];
        if (!empty($input['widget']['prompt'])) {
            $html .= '<span class="help-block">' . $input['widget']['prompt'] . '</span>';
        }
        $html .= '</div>';
        $html .= form_fieldset_close();
    }
    return $html;
}
 private function _display_field($data, $container = 'fieldset')
 {
     array_merge($this->settings, $this->settings_vars);
     $values = decode_multi_field($data);
     if (is_string($data) && $data != '' && $data[0] == '<') {
         return $data;
     }
     if (isset($this->settings['string_override']) && $this->settings['string_override'] != '') {
         return $this->settings['string_override'];
     }
     $field_options = $this->_get_field_options($data);
     $values = decode_multi_field($data);
     $r = '';
     foreach ($field_options as $option) {
         $checked = in_array(form_prep($option), $values) ? TRUE : FALSE;
         $r .= '<label>' . form_checkbox($this->field_name . '[]', $option, $checked) . NBS . $option . '</label>';
     }
     switch ($container) {
         case 'grid':
             $r = $this->grid_padding_container($r);
             break;
         default:
             $r = form_fieldset('') . $r . form_fieldset_close();
             break;
     }
     return $r;
 }
Example #26
0
/*  id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  creation_date DATE,
  modified_date DATE,
  /create_user_id int ( 11 ),
  /mod_user_id int ( 11 ),
  /resident_id int ( 11 ),
  /description VARCHAR ( 255 ),
  /status VARCHAR ( 15 ),
  /remarks VARCHAR ( 255 ),
  /deadline DATE*/
$formdate = new FormDate();
$formdate->year['start'] = 2010;
$formdate->year['end'] = 2010 + 10;
//TODO: auto increment based on system time
//$formdate->month['values'] = 'numbers';
$form_element = array('<div class="desc">Encoder</div><div class="info">' . $encoder_name . '</div>', '<div class="desc">Resident</div><div class="info">' . $resident_name . '</div>', form_label($description['desc'], $description['id']) . form_textarea($description), form_label($has_deadline['desc'], $has_deadline['id']) . form_checkbox($has_deadline), '<label>Deadine</label>' . $formdate->selectMonth() . $formdate->selectDay() . $formdate->selectYear(), form_fieldset('Status') . form_radio($status_1) . form_label($status_1['desc'], $status_1['id']) . form_radio($status_2) . form_label($status_2['desc'], $status_2['id']) . form_radio($status_3) . form_label($status_3['desc'], $status_3['id']) . form_radio($status_4) . form_label($status_4['desc'], $status_4['id']) . form_fieldset_close(), form_label($remarks['desc'], $remarks['id']) . form_textarea($remarks));
?>
  
<?php 
foreach ($form_element as $item) {
    ?>
  <li><?php 
    echo $item;
    ?>
</li>
<?php 
}
?>

<?php 
echo form_reset('reset', 'Reset');
Example #27
0
            set_msg('msgerro', 'Não foi informado um usuario valido.', 'aviso');
            redirect('usuarios/gerenciar');
        }
        if (is_admin() || $iduser == $this->session->userdata('user_id')) {
            $query = $this->usuarios->get_byid($iduser)->row();
            echo bt_row(array(form_open(current_url(), array('role' => 'form')), form_fieldset(), bt_col(12, array(get_msg('msgok'), get_msg('msgerro'), erros_validacao())), bt_col(12, bt_input_disabled('Nome', 'nome', 4, $query->nome)), bt_col(12, array(bt_input_disabled('Login', 'loginoff', 2, $query->login), form_hidden('login', $query->login))), bt_col(12, bt_input_disabled('E-Mail', 'email', 4, $query->email)), bt_col(12, bt_password('Senha', 'senha', 2)), bt_col(12, bt_password('Repita Senha', 'senha2', 2)), bt_col(12, array(anchor('usuarios/gerenciar', 'Canselar', array('class' => 'btn btn-danger espaco')), bt_submit('Salvar', 'alterarsenha', 4, 3))), form_hidden('idusuario', $iduser), form_fieldset_close(), form_close()));
        } else {
            set_msg('msgerro', 'Não tem permição para alterar a senha.', 'aviso');
            redirect('usuarios/gerenciar');
        }
        break;
    case 'editar':
        $iduser = $this->uri->segment(3);
        if ($iduser == NULL) {
            set_msg('msgerro', 'Não foi informado um usuario valido.', 'aviso');
            redirect('usuarios/gerenciar');
        }
        if (is_admin() || $iduser == $this->session->userdata('user_id')) {
            $query = $this->usuarios->get_byid($iduser)->row();
            echo bt_row(array(form_open(current_url(), array('role' => 'form')), form_fieldset(), bt_col(12, array(get_msg('msgok'), get_msg('msgerro'), erros_validacao())), bt_col(12, bt_input_cont('Nome', 'nome', 4, $query->nome)), bt_col(12, array(bt_input_disabled('Login', 'loginoff', 2, $query->login), form_hidden('login', $query->login))), bt_col(12, bt_input_disabled('E-Mail', 'email', 4, $query->email)), $iduser == 1 ? '<div class=col-md-12><br/> </div>' : bt_col(12, bt_form(6, array(bt_checkbox('ativo', '1', 'Ativa um usuario', $query->ativo == 1 ? TRUE : FALSE), is_admin() ? bt_checkbox('adm', '1', 'Dar porder de ADM', $query->adm == 1 ? TRUE : FALSE) : ''))), bt_col(12, array(anchor('usuarios/gerenciar', 'Canselar', array('class' => 'btn btn-danger espaco')), bt_submit('Salvar', 'alterarsenha', 4, 3))), form_hidden('idusuario', $iduser), form_fieldset_close(), form_close()));
        } else {
            set_msg('msgerro', 'Não tem permição para alterar este usuario.', 'aviso');
            redirect('usuarios/gerenciar');
        }
        break;
    default:
        echo '<div class="alert alert-warning">
                    <strong>Warning!</strong> A tela solicitada não foi encontrada!!
                </div>';
        break;
}
Example #28
0
<?php

$this->load->helper('form');
$attributes = array('id' => "adduser_form");
echo form_open('manager/register_user', $attributes);
$username = array('name' => 'username', 'id' => 'username', 'maxlength' => '64', 'size' => '50');
$password = array('name' => 'password', 'id' => 'password', 'maxlength' => '64', 'size' => '50');
$verify = array('name' => 'verify', 'id' => 'verify', 'maxlength' => '64', 'size' => '50');
$real_name = array('name' => 'realname', 'id' => 'realname', 'maxlength' => '100', 'size' => '50');
$type_encoder = array('name' => 'type', 'id' => 'type1', 'value' => '0');
$type_admin = array('name' => 'type', 'id' => 'type2', 'value' => '1');
$form_element = array(form_label('Username', $username['id']) . form_input($username), form_label('Password', $password['id']) . form_password($password), form_label('Verify password', $verify['id']) . form_password($password), form_label('Real name', $real_name['id']) . form_input($real_name), form_fieldset('Account type') . form_radio($type_encoder) . form_label('Encoder', $type_encoder['id']) . form_radio($type_admin) . form_label('Administrator', $type_admin['id']) . form_fieldset_close());
foreach ($form_element as $item) {
    echo '<li>' . $item . '</li>';
}
echo form_reset('reset', 'Reset');
echo form_submit('login', 'Register');
echo form_close();
//end of adduser.php
Example #29
0
            if ($num_of_linked_accounts >= 1 && isset($account->password)) {
                ?>
							<?php 
                echo form_open(uri_string());
                ?>
							<?php 
                echo form_fieldset();
                ?>
							<?php 
                echo form_hidden('openid', $openid_link->openid);
                ?>
							<?php 
                echo form_button(array('type' => 'submit', 'class' => 'btn', 'content' => '<i class="icon-trash"></i> ' . lang('linked_remove')));
                ?>
							<?php 
                echo form_fieldset_close();
                ?>
							<?php 
                echo form_close();
                ?>
							<?php 
            }
            ?>
                        </div>
                    </div>

					<?php 
        }
        ?>
				<?php 
    }
Example #30
0
function get_enquire_form($form = NULL)
{
    $str = '';
    $str = '<article class="article">';
    $str .= '<h2> Enquire Your Query below,</h2>';
    $str .= '<p> Or Email us at info@icubank.in </p>';
    if (validation_errors()) {
        $str .= '<div class="alert alert-danger">';
        $str .= validation_errors();
        $str .= '</div>';
    }
    $str .= form_open();
    $str .= form_fieldset('Clear Your Doubts');
    $str .= '<div class="pull-left " height="100%" width="100%">';
    $str .= '<img src="' . base_url('wc-load/theme/img/enquireicub.png') . '" width="300px" height="260px">';
    $str .= '</div>';
    $str .= '<div class="pull-right">';
    $str .= form_label('Name', 'name');
    $data = array('name' => 'name', 'title' => 'Name', 'id' => 'name');
    $str .= form_input($data, set_value('name', $form->name));
    $str .= '<br>';
    $str .= form_label('Email', 'email');
    $data = array('name' => 'email', 'title' => 'Email', 'id' => 'email');
    $str .= form_input($data, set_value('email', $form->email));
    $str .= '<br>';
    $str .= form_label('Message', 'message');
    $data = array('name' => 'message', 'title' => 'Message', 'id' => 'message', 'rows' => '5', 'width' => '100%', 'cols' => '53');
    $str .= form_textarea($data, set_value('message', $form->message)) . '<br>';
    $str .= form_submit('enquire', 'Send Query', 'class="btn btn-success"');
    $str .= '</div>';
    $str .= '<div class="clear"></div>';
    $str .= form_fieldset_close();
    $str .= form_close();
    $str .= '</article>';
    return $str;
}