本文整理汇总了PHP中form_password函数的典型用法代码示例。如果您正苦于以下问题:PHP form_password函数的具体用法?PHP form_password怎么用?PHP form_password使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了form_password函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: form_control
function form_control(&$setting)
{
switch ($setting->type) {
default:
case 'text':
$form_control = form_input(array('id' => $setting->slug, 'name' => $setting->slug, 'value' => $setting->value, 'class' => 'text width-20'));
break;
case 'textarea':
$form_control = form_textarea(array('id' => $setting->slug, 'name' => $setting->slug, 'value' => $setting->value, 'class' => 'width-20'));
break;
case 'password':
$form_control = form_password(array('id' => $setting->slug, 'name' => $setting->slug, 'value' => $setting->value, 'class' => 'text width-20'));
break;
case 'select':
$form_control = form_dropdown($setting->slug, $this->_format_options($setting->options), $setting->value, 'class="width-20"');
break;
case 'checkbox':
case 'radio':
$func = $setting->type == 'checkbox' ? 'form_checkbox' : 'form_radio';
$form_control = '';
foreach ($this->_format_options($setting->options) as $value => $label) {
$form_control .= ' ' . form_radio(array('id' => $setting->slug, 'name' => $setting->slug, 'checked' => $setting->value == $value, 'value' => $value)) . ' ' . $label;
}
break;
}
return $form_control;
}
示例2: set_form
function set_form()
{
$i_user = array('name' => 'username', 'value' => set_value('username'), 'placeholder' => 'ชื่อผู้ใช้', 'autofocus' => true, 'class' => 'form-control');
$i_pass = array('name' => 'password', 'placeholder' => 'รหัสผ่าน', 'class' => 'form-control');
$data = array('username' => form_input($i_user), 'password' => form_password($i_pass));
return $data;
}
示例3: test_form_password
public function test_form_password()
{
$expected = <<<EOH
<input type="password" name="password" value="" />
EOH;
$this->assertEquals($expected, form_password('password'));
}
示例4: bt_password
function bt_password($n, $name, $i = 12, $a = FALSE)
{
if ($a) {
return '<div class="form-group col-md-' . $i . '">' . "\n" . form_label($n) . "\n" . form_password(array('name' => $name, 'class' => 'form-control'), set_value($name), 'autofocus') . "\n" . '</div>' . "\n";
} else {
return '<div class="form-group col-md-' . $i . '">' . "\n" . form_label($n) . "\n" . form_password(array('name' => $name, 'class' => 'form-control'), set_value($name)) . "\n" . '</div>' . "\n";
}
}
示例5: custom_form_input
function custom_form_input($field, $input_password = false)
{
if (!$input_password) {
$result = form_input(array('id' => 'input_' . $field, 'name' => $field, 'value' => set_value($field)));
} else {
$result = form_password(array('id' => 'input_' . $field, 'name' => $field, 'value' => set_value($field)));
}
return $result . "\n <span id=\"{$field}_error\">" . form_error($field) . "</span>";
}
示例6: password
function password($name, $label)
{
$html = '<div class="input">';
$html .= "<label>{$label}</label>";
$config = array('name' => $name, 'size' => '30');
$html .= form_password($config);
$html .= form_error($name);
$html .= '</div>';
return $html;
}
示例7: form_input_and_label
function form_input_and_label($name, $value = '', $extra = '', $is_password = FALSE, $div = 'pure-control-group')
{
$extra = $extra . ' placeholder="' . lang($name) . '" id="' . $name . '"';
$value = $value || $value == 0 ? $value : '';
$div_start = empty($div) ? '' : '<div class="' . $div . '">';
$label = form_label(lang($name), $name);
$input = $is_password ? form_password($name, set_value($name, $value), $extra) : form_input($name, set_value($name, $value), $extra);
$error_box = form_error($name);
$div_end = empty($div) ? '' : '</div>';
return $div_start . $label . $input . $error_box . $div_end;
}
示例8: simbanic_password
function simbanic_password($label_name, $input_password, $input_value = '', $data = array())
{
$input_data = array('name' => $input_password, 'id' => $input_password, 'value' => isset($input_value) ? $input_value : '', 'autocomplete' => 'off');
if (array_key_exists('class', $data)) {
$data['class'] .= ' form-control simba_form_control';
} else {
$data['class'] = 'form-control simba_form_control';
}
$input = array_merge($input_data, $data);
return simbanic_label($label_name) . form_password($input) . simbanic_validation($input_password);
}
示例9: form_output
/**
* Output form input
*
* @access public
* @param array
* @return string
*/
public function form_output($params)
{
$this->CI->load->library('encrypt');
$options['name'] = $params['form_slug'];
$options['id'] = $params['form_slug'];
$options['value'] = $this->CI->encrypt->decode($params['value']);
if ($params['custom']['hide_typing'] == 'yes') {
return form_password($options);
} else {
return form_input($options);
}
}
示例10: launcher_reg
function launcher_reg()
{
$this->config->load('rf_settings', FALSE, TRUE);
### Построение вывода
$text = lang('off_reg_msgreg') . form_open('main_index/check');
$text .= b(lang('off_main_login')) . br(1) . form_input('login') . br(1) . lang('off_reg_charuse') . br(1);
$text .= b(lang('off_main_passw')) . br(1) . form_password('password') . br(1) . lang('off_reg_charuse') . br(1);
$text .= b(lang('off_acc_email')) . br(1) . form_input('email') . br(1) . lang('off_reg_emailsample') . br(1);
$text .= b(lang('off_reg_secure')) . form_input('secure') . br(1) . '<img src="' . base_url() . index_page() . '/antibot"><br>';
$text .= $this->ajax->submit_to_remote("submit", lang('off_reg_btn'), array('url' => base_url() . 'register/check', 'update' => 'content'));
echo $text . '</form>';
}
示例11: add_view
/**
* add添加页面的view
*/
function add_view($user = array())
{
$forms = array();
$name_value = form_set_defaultvalue($user, 'name');
$name_attr = array('class' => 'span4', 'name' => 'name');
$name = form_input($name_attr);
$name = form_format_widget('用户', $name, true);
$pwd_attr = array('class' => 'span4', 'name' => 'pwd', 'id' => 'pwd');
$pwd = form_password($pwd_attr);
$pwd = form_format_widget('密码', $pwd, true, '不能输入纯数字');
$repwd_attr = array('class' => 'span4', 'name' => 'repwd', 'data-confirm-to' => 'pwd', 'data-confirm-to-message' => '密码确认不正确');
$repwd = form_password($repwd_attr);
$repwd = form_format_widget('确认密码', $repwd);
/*
* 自定义按钮
*/
$custom_btn = matrix_custom_btn('取消', array('data-prompt' => '您确定取消吗?', 'data-ajax' => 'ajax/operate.php'));
$custom_btn = form_format_widget('', $custom_btn);
$field_china = form_format_field_widget('国家', '中国');
/*
* radio与checkbox
*/
$checkboxs[] = matrix_checkbox_inline(array('name' => 'join[]'), 1, '软妹子');
$checkboxs[] = matrix_checkbox_inline(array('name' => 'join[]'), 2, '红宝石', true);
$checkboxs[] = matrix_checkbox_inline(array('name' => 'join[]'), 3, '做一个春梦');
$checkboxs = form_implode($checkboxs);
$checkboxs = form_format_input_widget('搭配', $checkboxs);
/*
* 上传插件
*/
$cover = uploadify(array('id' => 'cover'));
$cover = form_format_widget('封面', $cover);
/*
* 弹出层
*/
$category_attrs = array('id' => 'selectCategory', 'data-href' => base_url('user/layer?math=Math.random()'), 'data-title' => '选择品类', 'data-height' => '400', 'data-scrolling' => 'true');
$category = matrix_btn('选择品类', $category_attrs, 'warning');
$category = form_format_widget('类别', $category);
$widget1 = array($pwd, $repwd, $custom_btn, $field_china, $checkboxs, $cover, $category);
//控件数组
$forms[] = form_detail_container($widget1, '主要内容');
/*
* 富文本编辑器
*/
$ueditor = ueditor(array('id' => 'txtContent', 'name' => 'txtContent', 'style' => 'height:250px;width:100%'));
$ueditor = form_format_widget('编辑器', $ueditor);
$widget2 = array($ueditor);
$forms[] = form_detail_container($widget2, '编辑器');
$forms[] = form_detail_actions();
//提交按钮
return form_implode($forms);
}
示例12: form_output
/**
* Output form input
*
* @access public
* @param array
* @return string
*/
public function form_output($params)
{
$this->CI->load->library('encrypt');
$options['name'] = $params['form_slug'];
$options['id'] = $params['form_slug'];
// If we have post data and are returning form
// values (because of most likely a form validation error),
// we will just have the posted plain text value
$options['value'] = $_POST ? $params['value'] : $this->CI->encrypt->decode($params['value']);
if ($params['custom']['hide_typing'] == 'yes') {
return form_password($options);
} else {
return form_input($options);
}
}
示例13: referer
function referer($id = '')
{
### Построение вывода
$this->config->load('rf_settings', FALSE, TRUE);
if ($this->config->item('REF_PAY') == false) {
redirect('register', 'refresh');
}
$this->table->set_template(tpl_table());
$this->table->add_row(lang('off_main_login'), form_input('login'), lang('off_reg_charuse'));
$this->table->add_row(lang('off_main_passw'), form_password('password'), lang('off_reg_charuse'));
$this->table->add_row(lang('off_acc_email'), form_input('email'), lang('off_reg_emailsample'));
$this->table->add_row(lang('off_reg_secure'), form_input('secure'), '<img src="' . base_url() . index_page() . '/antibot">');
$this->table->add_row(form_submit('submit', lang('off_reg_btn')), '');
$this->data['content'] = heading(icon('48x48/add_image.png') . lang('off_reg_msgreg'), 4) . form_open('register/check') . form_hidden('refid', xss_clean($id)) . $this->table->generate() . '</form>';
compile();
}
示例14: index
public function index()
{
$this->load->helper('form');
$attr = array('name' => 'myform', 'id' => 'myform');
$data['form'] = form_open('register');
$attr = array('name' => 'username', 'id' => 'username', 'placeholder' => 'Username', 'class' => 'input');
$data['username'] = form_input($attr);
$attr = array('name' => 'password', 'id' => 'password', 'placeholder' => 'Password', 'class' => 'input');
$data['password'] = form_password($attr);
$attr = array('name' => 'submit', 'id' => 'submit', 'class' => 'submit');
$data['submit'] = form_submit($attr, 'Submit Post!');
$this->load->database();
$sql = $this->db->query('SELECT name, age FROM howls ORDER BY id DESC');
$data['person'] = $sql->result();
$this->load->view('blog', $data);
}
示例15: adminuseradd_view
/**
* adminuseradd页面的view代码
*/
function adminuseradd_view($user)
{
$forms = array();
if (empty($user['account'])) {
$account_attr = array('class' => 'span4', 'name' => 'account', 'data-required' => 'true', 'data-required-message' => '请输入帐号');
$account = form_input($account_attr);
$account = form_format_widget('帐号', $account, true);
} else {
$account = form_format_field_widget('帐号', $user['account']);
}
$pwd_attr = array('class' => 'span4', 'name' => 'pwd', 'data-required' => 'true', 'data-required-message' => '请输入密码');
$pwd = form_password($pwd_attr);
$pwd = form_format_widget('密码', $pwd, true);
$widget = array($account, $pwd);
$forms[] = form_detail_container($widget);
$forms[] = form_detail_actions();
return form_implode($forms);
}