form.php
来自「一款可以和GOOGLE媲美的开源统计系统,运用AJAX.功能强大. 无色提示:」· PHP 代码 · 共 52 行
PHP
52 行
<?php/** * Piwik - Open source web analytics * * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id: Form.php 661 2008-10-29 17:19:06Z matt $ * * @package Piwik_Login */require_once "core/Form.php";/** * * @package Piwik_Login */class Piwik_Login_Form extends Piwik_Form{ function __construct() { parent::__construct(); // reset $this->updateAttributes('id="loginform" name="loginform"'); } function init() { // if form_url is not defined go to current url $urlToGoAfter = Piwik_Common::getRequestVar('form_url', Piwik_Url::getCurrentUrl(), 'string'); // if the current url to redirect contains module=login we insteaed redirect to the referer url if(stripos($urlToGoAfter,'module=login') !== false) { $urlToGoAfter = Piwik_Url::getReferer(); } $formElements = array( array('text', 'form_login'), array('password', 'form_password'), array('hidden', 'form_url', $urlToGoAfter) ); $this->addElements( $formElements ); $formRules = array( array('form_login', sprintf(Piwik_Translate('General_Required'), Piwik_Translate('Login_Login')), 'required'), array('form_password', sprintf(Piwik_Translate('General_Required'), Piwik_Translate('Login_Password')), 'required'), ); $this->addRules( $formRules ); $this->addElement('submit', 'submit'); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?