File: X509warning.php

package info (click to toggle)
simplesamlphp 1.19.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 43,240 kB
  • sloc: php: 200,806; javascript: 15,025; xml: 3,336; sh: 265; perl: 82; makefile: 70; python: 5
file content (48 lines) | stat: -rw-r--r-- 1,344 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
<?php

/**
 * Template form for X509 warnings.
 *
 * Parameters:
 * - 'target': Target URL for the continue-button.
 * - 'data': Parameters which should be included in the request.
 *
 * @package SimpleSAMLphp
 */

$warning = $this->t('{authX509:X509warning:warning}', [
    '%daysleft%' => htmlspecialchars($this->data['daysleft']),
]);

if ($this->data['renewurl']) {
    $warning .= " ".$this->t('{authX509:X509warning:renew_url}', [
        '%renewurl%' => $this->data['renewurl'],
        ]);
} else {
    $warning .= " ".$this->t('{authX509:X509warning:renew}');
}

$this->data['header'] = $this->t('{authX509:X509warning:warning_header}');
$this->data['autofocus'] = 'proceedbutton';

$this->includeAtTemplateBase('includes/header.php');

?>

<form style="display: inline; margin: 0px; padding: 0px" action="<?php echo htmlspecialchars($this->data['target']); ?>">

    <?php
    // Embed hidden fields...
    foreach ($this->data['data'] as $name => $value) {
        echo '<input type="hidden" name="'.htmlspecialchars($name).'" value="'.htmlspecialchars($value).'" />';
    }
    ?>
    <p><?php echo $warning; ?></p>

    <input type="submit" name="proceed" id="proceedbutton" value="<?php echo htmlspecialchars($this->t('{authX509:X509warning:proceed}')) ?>" />

</form>


<?php
$this->includeAtTemplateBase('includes/footer.php');