File: login.php

package info (click to toggle)
simplesamlphp 1.19.7-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 42,920 kB
  • sloc: php: 202,044; javascript: 14,867; xml: 2,700; sh: 225; perl: 82; makefile: 70; python: 5
file content (60 lines) | stat: -rw-r--r-- 2,630 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php 
    if (!isset($this->data['autofocus'])) {
        $this->data['autofocus'] = 'username';
    }
    $this->includeAtTemplateBase('includes/header.php'); 
    if (isset($this->data['error'])) {
?>
    <div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5">
        <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l erroricon" style="margin: 15px" alt="" />
        <h2><?php echo $this->t('error_header'); ?></h2>

        <p><?php echo $this->t($this->data['error']); ?> </p>
    </div>
<?php
}
?>
    <h2 style="break: both"><?php echo $this->t('user_pass_header'); ?></h2>
    <p class="logintext"><?php echo $this->t('user_pass_text'); ?></p>

    <form action="?" method="post" name="f">

        <table>
            <tr>
                <td rowspan="2"><img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-authentication.48x48.png" id="loginicon" alt="" /></td>
                <td style="padding: .3em;"><?php echo $this->t('username'); ?></td>
                <td>
<?php
if (array_key_exists('admin', $this->data)) {
    echo '<strong style="font-size: medium">Administrator</strong>';
} else {
    echo '<input type="text" id="username" tabindex="1" name="username" autocomplete="username" ';
    if (isset($this->data['username'])) {
        echo 'value="'.htmlspecialchars($this->data['username']).'"';
    }
    echo '/>';
}
?>
                </td>
                <td style="padding: .4em;" rowspan="2">
                    <button type="submit" class="regularsubmit" tabindex="3" class="btn"><?php echo $this->t('login_button'); ?></button>
                    <input type="hidden" name="RelayState" value="<?php echo htmlspecialchars($this->data['relaystate']); ?>" />
                </td>
            </tr>
            <tr>
                <td style="padding: .3em;"><?php echo $this->t('password'); ?></td>
                <td><input id="password" type="password" tabindex="2" name="password" autocomplete="current-password" /></td>
            </tr>
            <tr>
                <td></td>
                <td></td>
                <td>
                    <button type="submit" tabindex="5" id="mobilesubmit" class="btn"><?php echo $this->t('login_button'); ?></button>
                </td>
            </tr>
        </table>
    </form>
        <h2 class="logintext"><?php echo $this->t('help_header'); ?></h2>
        <p class="logintext"><?php echo $this->t('help_text'); ?></p>
<?php
    $this->includeAtTemplateBase('includes/footer.php');