Пример #1
0
    function execute()
    {
        ?>
<div id="userloginForm" class="userloginForm">

	<table border="0" width="100%"><tr><td rowspan="2">
<form name="userlogin" method="post" action="<?php 
        $this->text('action');
        ?>
">
	<div id="userloginprompt"><?php 
        $this->msgWiki('loginprompt');
        ?>
</div>
	<table> 
		<tr>
			<td class="mw-label" style="width:50px"><label for='wpName1'><?php 
        $this->msg('username_or_email');
        ?>
</label></td>
			<td class="mw-input">
				<div style="position:relative">
					<input type='text' class='loginText input_med' name="wpName" id="wpName1"
					value="<?php 
        $this->text('name');
        ?>
" size='20' />
					<?php 
        if ($this->data['messagetype'] == 'error_username') {
            ?>
						<div class="mw-error-bottom mw-error" id="wpName1_error">
							<div class="mw-error-top">
								<?php 
            $this->html('message');
            ?>
							</div>
						</div>
					<?php 
        }
        ?>
					<input type="hidden" id="wpName1_showhide" />
				</div>
			</td>
		</tr>
		<tr>
			<td class="mw-label"><label for='wpPassword1'><?php 
        $this->msg('yourpassword');
        ?>
</label></td>
			<td class="mw-input">
				<div style="position:relative;">
					<input type='password' class='loginPassword input_med' name="wpPassword" id="wpPassword1"
						value="" size='20' />
					<?php 
        if ($this->data['messagetype'] == 'error_password') {
            ?>
						<div class="mw-error-bottom mw-error" id="wpPassword1_error">
							<div class="mw-error-top">
								<?php 
            $this->html('message');
            ?>
							</div>
						</div>
					<?php 
        }
        ?>
					<input type="hidden" id="wpPassword1_showhide" />
				</div>
			</td>
		</tr>
	<?php 
        if ($this->data['usedomain']) {
            $doms = "";
            foreach ($this->data['domainnames'] as $dom) {
                $doms .= "<option>" . htmlspecialchars($dom) . "</option>";
            }
            ?>
		<tr>
			<td class="mw-label"><?php 
            $this->msg('yourdomainname');
            ?>
</td>
			<td class="mw-input">
				<select name="wpDomain" value="<?php 
            $this->text('domain');
            ?>
">
					<?php 
            echo $doms;
            ?>
				</select>
			</td>
		</tr>
	<?php 
        }
        ?>
		<tr>
			<td class="mw-input"></td>
			<td>
			<?php 
        if ($this->data['useemail'] && $this->data['canreset']) {
            ?>
				<a href="/Special:LoginReminder" id="forgot_pwd"><?php 
            global $wgLanguageCode;
            if ($wgLanguageCode == "en") {
                ?>
Forgot password? <?php 
            } else {
                echo wfMsg('forgot_pwd');
            }
            ?>
</a>
			<?php 
        }
        ?>
			</td>
		</tr>
		<tr>
			<td style="vertical-align: bottom;" class="mw-label"><?php 
        if ($this->data['header'] != "") {
            ?>
				<label style="display:block; padding-bottom: 35px">Security</label>
				<?php 
        }
        ?>
			</td>
			<td><?php 
        $this->html('header');
        /* pre-table point for form plugins... */
        ?>
</td>
		</tr>
		<tr>
			<td class="mw-submit"></td>
			<td style="padding-top:5px">
				<table cellpadding="0" cellspacing="0">
					<tr>
						<td>
							<input type='submit' class="button primary submit_button" name="wpLoginattempt" id="wpLoginattempt" value="<?php 
        $this->msg('login');
        ?>
" />
						</td>
						<td>
							<input type='checkbox' name="wpRemember" value="1" id="wpRemember" checked="checked" /> <label for="wpRemember"><?php 
        $this->msg('remembermypassword');
        ?>
</label>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</form>

</td>
<td valign="top">
	<div id="userlogin_alt_logins">
		<div class="headline">Log in via</div>
		<?php 
        echo UserLoginBox::getSocialLogin();
        ?>
	</div>
</td>
</tr>
</table>

</div>
<div id="loginend"><?php 
        $this->msgWiki('loginend');
        ?>
</div>
<?php 
    }
Пример #2
0
    function execute()
    {
        global $wgCookieExpiration;
        $expirationDays = ceil($wgCookieExpiration / (3600 * 24));
        ?>
<div id="userlogin_alt_logins">
	<div class="headline">Log in via</div>
	<?php 
        echo UserLoginBox::getSocialLogin();
        ?>
</div>
	
<div class="mw-ui-container">
	<?php 
        if ($this->haveData('languages')) {
            ?>
		<div id="languagelinks">
			<p><?php 
            $this->html('languages');
            ?>
</p>
		</div>
	<?php 
        }
        ?>
	
	<div id="userloginForm" class="userloginform">
		<div id="userloginprompt"><?php 
        $this->msgWiki('loginprompt');
        ?>
</div>
		<form name="userlogin" class="mw-ui-vform" method="post" action="<?php 
        $this->text('action');
        ?>
">
			<?php 
        if ($this->data['loggedin']) {
            ?>
				<div class="warningbox">
					<?php 
            echo $this->getMsg('userlogin-loggedin')->params($this->data['loggedinuser'])->parse();
            ?>
				</div>
			<?php 
        }
        ?>
			<section class="mw-form-header">
				<?php 
        $this->html('header');
        /* extensions such as ConfirmEdit add form HTML here */
        ?>
			</section>

			<div>
				<label for='wpName1' class='userlogin_label'>
					<?php 
        $this->msg('usernameoremail');
        ?>
				</label>
				<?php 
        $extraAttrs = array();
        echo Html::input('wpName', $this->data['name'], 'text', array('class' => 'loginText input_med', 'id' => 'wpName1', 'tabindex' => '1', 'size' => '20', 'required' => true, 'autofocus' => !$this->data['name']));
        ?>
					
				<?php 
        if (in_array('username', $this->data['errorlist'])) {
            ?>
					<div class="mw-error-bottom mw-error" id="wpName1_error">
						<div class="mw-error-top">
							<?php 
            $this->html('message');
            ?>
						</div>
					</div>
				<?php 
        }
        ?>
			</div>

			<div>
				<label for='wpPassword1'>
					<?php 
        $this->msg('userlogin-yourpassword');
        ?>
				</label>
				<?php 
        echo Html::input('wpPassword', null, 'password', array('class' => 'loginPassword input_med', 'id' => 'wpPassword1', 'tabindex' => '2', 'size' => '20', 'autofocus' => (bool) $this->data['name']));
        ?>
				<?php 
        if (in_array('password', $this->data['errorlist'])) {
            ?>
					<div class="mw-error-bottom mw-error" id="wpPassword1_error">
						<div class="mw-error-top">
							<?php 
            $this->html('message');
            ?>
						</div>
					</div>
				<?php 
        }
        ?>
			</div>
			<div id="forgot_pwd">
				<?php 
        if ($this->data['useemail'] && $this->data['canreset'] && $this->data['resetlink'] === true) {
            echo ' ' . Linker::link(SpecialPage::getTitleFor('PasswordReset'), $this->getMsg('forgot_pwd')->parse(), array('class' => 'mw-ui-flush-right'));
        }
        ?>
			</div>
			<br /><br />
			<?php 
        if (isset($this->data['usedomain']) && $this->data['usedomain']) {
            $select = new XmlSelect('wpDomain', false, $this->data['domain']);
            $select->setAttribute('tabindex', 3);
            foreach ($this->data['domainnames'] as $dom) {
                $select->addOption($dom);
            }
            ?>
				<div id="mw-user-domain-section">
					<label for='wpDomain'><?php 
            $this->msg('yourdomainname');
            ?>
</label>
					<?php 
            echo $select->getHTML();
            ?>
				</div>
			<?php 
        }
        ?>

			<?php 
        if ($this->haveData('extrafields')) {
            echo $this->data['extrafields'];
        }
        ?>

			<div class="remember_pwd">
				<?php 
        if ($this->data['canremember']) {
            ?>
					<label class="mw-ui-checkbox-label">
						<input name="wpRemember" type="checkbox" value="1" id="wpRemember" tabindex="4"
							<?php 
            if ($this->data['remember']) {
                echo 'checked="checked"';
            }
            ?>
						>
						<?php 
            echo $this->getMsg('rememberme')->numParams($expirationDays)->escaped();
            ?>
					</label>
				<?php 
        }
        ?>
			</div>

			<div>
				<?php 
        echo Html::input('wpLoginAttempt', $this->getMsg('login')->text(), 'submit', array('id' => 'wpLoginAttempt', 'tabindex' => '6', 'class' => 'mw-ui-button mw-ui-big mw-ui-block mw-ui-constructive button primary submit_button'));
        ?>
			</div>

			<?php 
        if ($this->haveData('uselang')) {
            ?>
<input type="hidden" name="uselang" value="<?php 
            $this->text('uselang');
            ?>
" /><?php 
        }
        ?>
			<?php 
        if ($this->haveData('token')) {
            ?>
<input type="hidden" name="wpLoginToken" value="<?php 
            $this->text('token');
            ?>
" /><?php 
        }
        ?>
			<?php 
        if ($this->data['cansecurelogin']) {
            ?>
<input type="hidden" name="wpForceHttps" value="<?php 
            $this->text('stickhttps');
            ?>
" /><?php 
        }
        ?>
		</form>
	</div>
</div>
<?php 
    }