当前位置: 首页>>代码示例>>PHP>>正文


PHP form::password方法代码示例

本文整理汇总了PHP中form::password方法的典型用法代码示例。如果您正苦于以下问题:PHP form::password方法的具体用法?PHP form::password怎么用?PHP form::password使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在form的用法示例。


在下文中一共展示了form::password方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __toString

 public function __toString()
 {
     if ($this->args->blank = TRUE) {
         $value = '';
     }
     return form::password($this->field_name, $value);
 }
开发者ID:brojasmeneses,项目名称:floreriarosabel,代码行数:7,代码来源:PasswordField.php

示例2: render

 public function render()
 {
     $attributes = $this->get_attributes();
     if (arr::get($attributes, 'class')) {
         $attributes['class'] .= ' form-control';
     } else {
         $attributes['class'] = 'form-control';
     }
     return form::password($this->get_name(), $this->get_value(), $attributes);
 }
开发者ID:ariol,项目名称:adminshop,代码行数:10,代码来源:Password.php

示例3: _form

    public function _form($user)
    {
        $html = "";
        $html .= form::open(null, array('class' => 'valid_form'));
        $html .= form::input(array('email', 'Email'), $user->email, 'class="fullWidth required email"');
        $html .= form::label('New Password');
        $html .= form::password('password[]', '', 'class="fullWidth"');
        $html .= form::label('Repeat Password');
        $html .= form::password('password[]', '', 'class="fullWidth"');
        $html .= "<hr/>";
        $html .= form::label('openid', 'OpenID <img src="http://www.plaxo.com/images/openid/login-bg.gif" />');
        $html .= '<p><small><a href="http://www.openid.net" target="_BLANK">What is an OpenID?</a></small></p>
			<p><small>Please remember the "http://"</small></p>';
        $html .= form::input('openid', $user->openid, 'class="fullWidth url"');
        $html .= form::submit('submit', 'Save', 'class="submit"');
        $html .= form::close();
        return $html;
    }
开发者ID:sydlawrence,项目名称:SocialFeed,代码行数:18,代码来源:profile.php

示例4: buildForm

 private function buildForm()
 {
     $options = array('method' => "POST", 'enctype' => "multipart/form-data", 'action' => '/blog/formular/add', 'width' => '400px');
     $form = new \form('testing', $options);
     $form->label('checkbox');
     $form->checkbox('checkbox test', 'testcheckbox', 'check', '');
     $form->checkbox('checkbox test2', 'testcheckbox', 'check2', true);
     $form->label('radio');
     $form->radio('radio test', 'testradio', 'radio', '');
     $form->radio('radio test 2', 'testradio', 'radio2', true);
     $form->label('textarea');
     $form->text('textarea', ' ', ['error' => $this->error['textarea']]);
     $form->select('autos', ['a' => 'audi', 'b' => 'vw', 'c' => 'toyota'], 'b', ['label' => 'auto select']);
     $form->text('username', '', ['placeholder' => 'username', 'label' => 'Username', 'error' => $this->error['username']]);
     $form->password('password', '', ['label' => 'Password', 'error' => $this->error['password']]);
     $form->button('senden', ['type' => 'submit']);
     return $form;
 }
开发者ID:karimo255,项目名称:blog,代码行数:18,代码来源:formular.php

示例5: login

 public function login()
 {
     if ($this->a2->logged_in()) {
         //cannot create new accounts when a user is logged in
         return $this->index();
     }
     $post = Validation::factory($_POST)->pre_filter('trim')->add_rules('username', 'required', 'length[4,127]')->add_rules('password', 'required');
     if ($post->validate()) {
         if ($this->a1->login($post['username'], $post['password'])) {
             // login succesful
             url::redirect('a2demo/index');
         }
     }
     //show form
     echo form::open();
     echo 'username:' . form::input('username') . '<br>';
     echo 'password:' . form::password('password') . '<br>';
     echo form::submit(array('value' => 'login'));
     echo form::close();
 }
开发者ID:BlakeLucchesi,项目名称:kohanamodules2.3.2,代码行数:20,代码来源:a2demo.php

示例6: action_login

 public function action_login()
 {
     if ($this->user) {
         //cannot create new accounts when a user is logged in
         return $this->action_index();
     }
     $post = Validate::factory($_POST)->filter(TRUE, 'trim')->rule('username', 'not_empty')->rule('username', 'min_length', array(4))->rule('username', 'max_length', array(127))->rule('password', 'not_empty');
     if ($post->check()) {
         if ($this->a1->login($post['username'], $post['password'], isset($_POST['remember']) ? (bool) $_POST['remember'] : FALSE)) {
             $this->request->redirect('a2demo/index');
         }
     }
     //show form
     echo form::open();
     echo 'username:' . form::input('username') . '<br>';
     echo 'password:' . form::password('password') . '<br>';
     echo 'remember me:' . form::checkbox('remember', TRUE) . '<br>';
     echo form::submit('login', 'login');
     echo form::close();
     echo Kohana::debug($post->errors());
 }
开发者ID:sars,项目名称:rp,代码行数:21,代码来源:a2demo.php

示例7: render

 public function render(&$render_variables, $errors = array())
 {
     // Load base template and attributes
     $result = parent::render($render_variables, $errors);
     // Discover the type
     switch ($this->type) {
         case 'input':
             $result['template']->element = form::input($result['attributes'], $this->value);
             break;
         case 'password':
             $result['template']->element = form::password($result['attributes'], $this->value);
             break;
         case 'submit':
             $result['template']->element = form::submit($result['attributes'], $this->value);
             $render_variables['submit'] = TRUE;
             break;
         case 'radio':
             $result['template']->element = form::radio($result['attributes'], $this->value);
             break;
         case 'checkbox':
             $result['attributes']['value'] = $this->value;
             if ($this->value = Input::instance()->post($this->name)) {
                 $result['template']->element = form::checkbox($result['attributes'], $this->value, TRUE);
             } else {
                 $result['template']->element = form::checkbox($result['attributes'], $this->value);
             }
             break;
         case 'hidden':
             $result['template']->element = form::hidden($this->name, $this->value);
             break;
         case 'file':
             $result['template']->element = form::upload($result['attributes'], $this->value);
             $render_variables['enctype'] = 'multipart/form-data';
             break;
     }
     // Return the resulting output
     return (string) $result['template']->render();
 }
开发者ID:samsoir,项目名称:morf,代码行数:38,代码来源:Morf_Input.php

示例8: __

				<p>
					<label><?php 
echo __('Set your admin password:');
?>
</label>
					<?php 
echo form::password('password');
?>
				</p>
				<p>
					<label><?php 
echo __('Repeat password:');
?>
</label>
					<?php 
echo form::password('repeat');
?>
				</p>
				<p>
					<?php 
echo form::submit('submit', __('Install'), array('class' => 'submit'));
?>
				</p>

			</form>
			
		</div>
			
    </div>
    
</body>
开发者ID:bluehawk,项目名称:kohanut-core,代码行数:31,代码来源:install.php

示例9:

echo Kohana::lang('ui_main.email_settings_comment_1');
?>
			</span>
			<div class="row">
				<h4>
					<a href="#" class="tooltip"
						title="<?php 
echo Kohana::lang("tooltips.settings_server_password");
?>
"><?php 
echo Kohana::lang('ui_main.email_server_password');
?>
					</a>
				</h4>
				<?php 
print form::password('email_password', $form['email_password'], ' class="text long2"');
?>
			</div>
			<span> <?php 
echo Kohana::lang('ui_main.email_settings_comment_2');
?>
			</span>
			<div class="row">
				<h4>
					<a href="#" class="tooltip"
						title="<?php 
echo Kohana::lang("tooltips.settings_server_port");
?>
"><?php 
echo Kohana::lang('ui_main.email_server_port');
?>
开发者ID:kjgarza,项目名称:ushahidi,代码行数:31,代码来源:email.php

示例10:

echo form::input('username');
?>
			</div>
		
			<div class="form-fields">
				<?php 
echo form::label('password', 'Password');
?>
				<?php 
echo form::password('password');
?>
			</div>
		
			<div class="form-fields">
				<?php 
echo form::label('password_confirm', 'Confirm Password');
?>
				<?php 
echo form::password('password_confirm');
?>
			</div>
		
		</fieldset>
		<?php 
echo form::submit('register', 'Register');
?>
	<?php 
echo form::close();
?>
</div>
<div class="clear"></div>
开发者ID:ready4god2513,项目名称:scs,代码行数:31,代码来源:new.php

示例11: password_wrap

 /**
  * Creates a HTML form password input tag.
  *
  * @param   string|array  input name or an array of HTML attributes
  * @param   string|array  input value, when using a name or values
  * @param   string        a string to be attached to the end of the attributes
  * @param   string        $label
  * @param   string|array  $error
  * @param   string|array  $tip
  * @param   string        $show_password
  * @return  string
  */
 public static function password_wrap($data, $value = '', $extra = '', $label = '', $error = '', $tip = '', $show_password = '')
 {
     $name = is_array($data) ? arr::get($data, 'name') : $data;
     $value = is_array($value) ? arr::get($value, $name) : $value;
     // Inject show password element id
     if ($show_password) {
         if (is_array($data)) {
             $data['show'] = $name . '_show';
         } else {
             $data = array('name' => $name, 'show' => $name . '_show');
         }
     }
     // Add id to input if label given
     if ($label) {
         if (!is_array($data)) {
             $data = array('name' => $name, 'id' => $name);
         } else {
             if (!isset($data['id'])) {
                 $data['id'] = $name;
             }
         }
     }
     $input = form::password($data, $value, $extra);
     // Add 'Show password' ?
     if ($show_password) {
         $input .= form::checkbox($name . '_show', 'yes') . form::label($name . '_show', $show_password);
     }
     return form::wrap($input, $name, $label, $error, $tip);
 }
开发者ID:anqqa,项目名称:Anqh,代码行数:41,代码来源:MY_form.php

示例12: __

echo '<h3>' . __('Install or upgrade languages') . '</h3>';
if (!$is_writable) {
    echo '<p>' . sprintf(__('You can install or remove a language by adding or ' . 'removing the relevant directory in your %s folder.'), '<strong>locales</strong>') . '</p>';
}
if (!empty($dc_langs) && $is_writable) {
    $dc_langs_combo = array();
    foreach ($dc_langs as $k => $v) {
        if ($v->link && isset($iso_codes[$v->title])) {
            $dc_langs_combo[html::escapeHTML('(' . $v->title . ') ' . $iso_codes[$v->title])] = html::escapeHTML($v->link);
        }
    }
    echo '<form method="post" action="langs.php" enctype="multipart/form-data">' . '<fieldset>' . '<legend>' . __('Available languages') . '</legend>' . '<p>' . sprintf(__('You can download and install a additional language directly from Dotclear.net. ' . 'Proposed languages are based on your version: %s.'), '<strong>' . DC_VERSION . '</strong>') . '</p>' . '<p class="field"><label class="classic">' . __('Language:') . ' ' . form::combo(array('pkg_url'), $dc_langs_combo) . '</label></p>' . '<p class="field"><label class="classic required" title="' . __('Required field') . '">' . __('Your password:') . ' ' . form::password(array('your_pwd'), 20, 255) . '</label></p>' . '<input type="submit" value="' . __('Install language') . '" />' . $core->formNonce() . '</fieldset>' . '</form>';
}
if ($is_writable) {
    # 'Upload language pack' form
    echo '<form method="post" action="langs.php" enctype="multipart/form-data">' . '<fieldset>' . '<legend>' . __('Upload a zip file') . '</legend>' . '<p>' . __('You can install languages by uploading zip files.') . '</p>' . '<p class="field"><label class="classic required" title="' . __('Required field') . '">' . __('Language zip file:') . ' ' . '<input type="file" name="pkg_file" /></label></p>' . '<p class="field"><label class="classic required" title="' . __('Required field') . '">' . __('Your password:') . ' ' . form::password(array('your_pwd'), 20, 255) . '</label></p>' . '<input type="submit" name="upload_pkg" value="' . __('Upload language') . '" />' . $core->formNonce() . '</fieldset>' . '</form>';
}
dcPage::close();
# Language installation function
function dc_lang_install($file)
{
    $zip = new fileUnzip($file);
    $zip->getList(false, '#(^|/)(__MACOSX|\\.svn|\\.DS_Store|Thumbs\\.db)(/|$)#');
    if (!preg_match('/^[a-z]{2,3}(-[a-z]{2})?$/', $zip->getRootDir())) {
        throw new Exception(__('Invalid language zip file.'));
    }
    if ($zip->isEmpty() || !$zip->hasFile($zip->getRootDir() . '/main.po')) {
        throw new Exception(__('The zip file does not appear to be a valid Dotclear language pack.'));
    }
    $target = dirname($file);
    $destination = $target . '/' . $zip->getRootDir();
开发者ID:HackerMajor,项目名称:root,代码行数:31,代码来源:langs.php

示例13: gui

 public function gui()
 {
     if ($this->status == 'single') {
         echo '<p class="message">' . __('Single blog successfully imported.') . '</p>';
         return;
     }
     if ($this->status == 'full') {
         echo '<p class="message">' . __('Content successfully imported.') . '</p>';
         return;
     }
     echo '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . dcPage::jsVar('dotclear.msg.confirm_full_import', __('Are you sure you want to import a full backup file?')) . "\$(function() {" . "\$('#up_single_file').change(function() { " . "if (this.value != '') { \$('#public_single_file').val(''); } " . "}); " . "\$('#public_single_file').change(function() { " . "if (this.value != '') { \$('#up_single_file').val(''); } " . "}); " . "\$('#up_full_file').change(function() { " . "if (this.value != '') { \$('#public_full_file').val(''); } " . "}); " . "\$('#public_full_file').change(function() { " . "if (this.value != '') { \$('#up_full_file').val(''); } " . "}); " . "\$('#formfull').submit(function() { " . "return window.confirm(dotclear.msg.confirm_full_import); " . "}); " . "});\n" . "//]]>\n" . "</script>\n";
     echo '<h3>' . __('Import a single blog') . '</h3>' . '<p>' . sprintf(__('This will import a single blog backup as new content in the current blog: %s.'), '<strong>' . html::escapeHTML($this->core->blog->name) . '</strong>') . '</p>' . '<form action="' . $this->getURL(true) . '" method="post" enctype="multipart/form-data">' . '<fieldset>' . $this->core->formNonce() . form::hidden(array('do'), 1) . form::hidden(array('MAX_FILE_SIZE'), DC_MAX_UPLOAD_SIZE) . '<p><label>' . __('Upload a backup file') . ' ' . '<input type="file" id="up_single_file" name="up_single_file" size="20" />' . '</label></p>';
     $public_files = $this->getPublicFiles();
     $empty = empty($public_files);
     $public_files = array_merge(array('-' => ''), $public_files);
     echo '<p><label>' . __('or pick up a local file in your public directory') . ' ' . form::combo('public_single_file', $public_files, '', '', '', $empty) . '</label></p>';
     echo '<p><input type="submit" value="' . __('Send') . '" /></p>' . '</fieldset>' . '</form>';
     if ($this->core->auth->isSuperAdmin()) {
         echo '<h3>' . __('Import a full backup file') . '</h3>' . '<form action="' . $this->getURL(true) . '" method="post" enctype="multipart/form-data" id="formfull">' . '<div>' . form::hidden(array('MAX_FILE_SIZE'), DC_MAX_UPLOAD_SIZE) . '</div>' . '<fieldset>' . $this->core->formNonce() . form::hidden(array('do'), 1) . form::hidden(array('MAX_FILE_SIZE'), DC_MAX_UPLOAD_SIZE) . '<p><label>' . __('Upload a backup file') . ' ' . '<input type="file" id="up_full_file" name="up_full_file" size="20" />' . '</label></p>';
         echo '<p><label>' . __('or pick up a local file in your public directory') . ' ' . form::combo('public_full_file', $public_files, '', '', '', $empty) . '</label></p>';
         echo '<p><strong>' . __('Warning: This will reset all the content of your database, except users.') . '</strong></p>' . '<p><label>' . __('Your password:') . form::password('your_pwd', 20, 255) . '</label></p>' . '<p><input type="submit" value="' . __('Send') . '" /></p>' . '</fieldset>' . '</form>';
     }
 }
开发者ID:HackerMajor,项目名称:root,代码行数:23,代码来源:class.dc.import.flat.php

示例14: array

?>
</span>
		</dt>
		<dd>
			<?php 
echo form::password('password', $post['password'], array('maxlength' => 20));
?>
		</dd>
	</dl>
	<dl>
		<dt><?php 
echo form::label('password_confirm', 'Confirm password:');
?>
</dt>
		<dd><?php 
echo form::password('password_confirm', $post['password_confirm'], array('maxlength' => 20));
?>
</dd>
	</dl>
	
	<dl>
		<dt><?php 
echo Captcha::instance()->render();
?>
</dt>
		<dd><?php 
echo form::input('captcha', $post['captcha']);
?>
<br /><?php 
echo __('Type the characters you see in the picture.');
?>
开发者ID:joffuk,项目名称:modulargaming,代码行数:31,代码来源:register.php

示例15:

			<div class="row">
				<h4><?php 
echo Kohana::lang('settings.sms.clickatell_username');
?>
:</h4>
				<?php 
print form::input('clickatell_username', $form['clickatell_username'], ' class="text title_2"');
?>
			</div>
			<div class="row">
				<h4><?php 
echo Kohana::lang('settings.sms.clickatell_password');
?>
:</h4>
				<?php 
print form::password('clickatell_password', $form['clickatell_password'], ' class="text title_2"');
?>
			</div>
		</td>
	</tr>
	<tr>
		<td>
			<span class="big_blue_span">Step 3:</span>
		</td>
		<td>
			<h4 class="fix"><?php 
echo Kohana::lang('settings.sms.clickatell_check_balance');
?>
. <sup><a href="#">?</a></sup></h4>
			<div class="row">
				<h4><a href="javascript:clickatellBalance()"><?php 
开发者ID:Dirichi,项目名称:Ushahidi_Web,代码行数:31,代码来源:clickatell_settings.php


注:本文中的form::password方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。