本文整理汇总了PHP中form_password函数的典型用法代码示例。如果您正苦于以下问题:PHP form_password函数的具体用法?PHP form_password怎么用?PHP form_password使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了form_password函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:Tapha,项目名称:pyrocms,代码行数:27,代码来源:Settings.php
示例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;
}
开发者ID:VoRDKW,项目名称:kw_smart,代码行数:7,代码来源:LoginModel.php
示例3: test_form_password
public function test_form_password()
{
$expected = <<<EOH
<input type="password" name="password" value="" />
EOH;
$this->assertEquals($expected, form_password('password'));
}
开发者ID:rishikeshwalawalkar,项目名称:GetARide,代码行数:8,代码来源:form_helper_test.php
示例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";
}
}
开发者ID:jairomr,项目名称:Painel-Admin,代码行数:8,代码来源:bootstrap_helper.php
示例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>";
}
开发者ID:Rayman,项目名称:Miran-RPG,代码行数:9,代码来源:index.php
示例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;
}
开发者ID:boriscy,项目名称:polla,代码行数:10,代码来源:form2_helper.php
示例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;
}
开发者ID:UiL-OTS-labs,项目名称:babylab-admin,代码行数:11,代码来源:MY_form_helper.php
示例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);
}
开发者ID:hardikpanseriya,项目名称:testing,代码行数:11,代码来源:input_helper.php
示例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);
}
}
开发者ID:phonglanpls,项目名称:jz-proj-2012,代码行数:19,代码来源:field.encrypt.php
示例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>';
}
开发者ID:SelFish131,项目名称:rf_office,代码行数:12,代码来源:main_index.php
示例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);
}
开发者ID:pwstrick,项目名称:grape,代码行数:55,代码来源:userHelper.php
示例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);
}
}
开发者ID:rishikeshwalawalkar,项目名称:GetARide,代码行数:22,代码来源:field.encrypt.php
示例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();
}
开发者ID:SelFish131,项目名称:rf_office,代码行数:16,代码来源:register.php
示例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);
}
开发者ID:Jmrmm,项目名称:moon,代码行数:16,代码来源:Blog.php
示例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);
}
开发者ID:pwstrick,项目名称:grape,代码行数:21,代码来源:systemHelper.php
示例16: eb_input_password
function eb_input_password($name, $label = '', $tags = false)
{
if ($tags) {
extract($tags);
}
$forCIForm = $tags;
$forCIForm['name'] = $name;
unset($forCIForm['sublabel']);
echo '<span class="field ' . @$class . '">';
if (@$label) {
echo form_label($label . ':');
}
echo '<div>';
echo form_password($forCIForm);
if (@$sublabel) {
echo '<div class="sublabel">' . @$sublabel . '</div>';
}
echo '</div>';
echo '</span>';
}
开发者ID:cybercog,项目名称:exambuff,代码行数:20,代码来源:EB_form_helper.php
示例17: form_register
protected function form_register()
{
$token_rg = md5(date('d') . '-rigester_user');
$form_attributes = array('class' => 'register_f', 'id' => 'footer-form');
$hidden_f = array('token' => $token_rg);
$form_output = form_open('', $form_attributes, $hidden_f);
$user_name = array('name' => 'user_name', 'id' => 'username', 'placeholder' => 'username', 'class' => 'form-control', 'size' => '150');
$form_output .= form_input($user_name);
$form_output .= form_error('user_name');
$user_password = array('name' => 'user_pass', 'id' => 'userpass', 'placeholder' => 'password', 'size' => '150', 'class' => 'form-control');
$form_output .= form_password($user_password);
$user_repassword = array('name' => 'user_repass', 'id' => 'userrepass', 'placeholder' => 're-password', 'size' => '150', 'class' => 'form-control');
$form_output .= form_password($user_repassword);
$user_email = array('name' => 'user_email', 'id' => 'useremail', 'placeholder' => '[email protected]', 'class' => 'form-control', 'size' => '250');
$form_output .= form_input($user_name);
$data_btsm = array('name' => 're_sm', 'class' => 'btn btn-default', 'value' => 'Register');
$form_output .= form_submit($data_btsm);
$form_output .= form_close();
return $form_output;
}
开发者ID:vipprokaka12,项目名称:beta_1,代码行数:20,代码来源:Register.php
示例18: form_open
<div class="modal-body">
<?php
echo form_open('home/login');
?>
<div class="row">
<?php
echo form_label('Логин:', 'name');
?>
<?php
echo form_input('name', '', 'id="name"');
?>
</div>
<div class="row">
<?php
echo form_label('Пароль:', 'pwd');
?>
<?php
echo form_password('pwd', '', 'id="pwd"');
?>
</div>
</div>
<div class="modal-footer">
<button class="btn primary" >Войти</button>
</div>
<?php
echo form_close();
?>
</div>
</div>
开发者ID:reignmaker,项目名称:SRS,代码行数:30,代码来源:login.php
示例19: form_password
<div class="col-sm-10">
<?php
echo form_password('password', '', 'class="form-control"');
?>
</div>
</div>
<div class="form-group">
<?php
echo form_label('Confirm password', 'password_confirm', array('class' => 'col-sm-2 control-label'));
?>
<?php
echo form_error('password_confirm');
?>
<div class="col-sm-10">
<?php
echo form_password('password_confirm', '', 'class="form-control"');
?>
</div>
</div>
<div class="form-group">
<?php
echo form_label('Groups', 'groups[]', array('class' => 'col-sm-2 control-label'));
?>
<div class="col-sm-10">
<?php
if (isset($groups)) {
foreach ($groups as $group) {
echo '<div class="checkbox">';
echo '<label>';
echo form_checkbox('groups[]', $group->id, set_checkbox('groups[]', $group->id));
echo ' ' . $group->name;
开发者ID:bekseitn,项目名称:news_portal,代码行数:31,代码来源:create_user_view.php
示例20: lang
<?php
$pl = lang('global:password');
?>
<?php
echo form_password('password', set_value('password'), "placeholder='{$pl}' class='form-control'");
?>
</div>
<div class="form-group">
<label class="required"><?php
echo lang('global:confirm_password');
$pl = lang('global:confirm_password');
?>
</label>
<?php
echo form_password('confirm', set_value('confirm'), "placeholder='{$pl}' class='form-control'");
?>
</div>
<div class="form-group row">
<div class="col-lg-6 col-xl-12">
<?php
echo $cap['image'];
?>
</div>
<div class="col-lg-6 col-xl-12">
<input type="text" class="form-control" id="capText" name="capText">
<small><em>* <?php
开发者ID:nockout,项目名称:tshpro,代码行数:31,代码来源:register.php
注:本文中的form_password函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论