File: error.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 (74 lines) | stat: -rw-r--r-- 3,045 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
$this->data['header'] = $this->t($this->data['dictTitle']);

$this->data['head'] = <<<EOF
<meta name="robots" content="noindex, nofollow" />
<meta name="googlebot" content="noarchive, nofollow" />
EOF;

$this->includeAtTemplateBase('includes/header.php');
?>
    <h2><?php echo $this->t($this->data['dictTitle']); ?></h2>
<?php
echo htmlspecialchars($this->t($this->data['dictDescr'], $this->data['parameters']));

// include optional information for error
if (isset($this->data['includeTemplate'])) {
    $this->includeAtTemplateBase($this->data['includeTemplate']);
}
?>
    <div class="trackidtext">
        <p><?php echo $this->t('report_trackid'); ?></p>
        <div class="input-group" style="width: 1em;">
            <pre id="trackid" class="input-left"><?php echo $this->data['error']['trackId']; ?></pre>
            <button data-clipboard-target="#trackid" id="btntrackid" class="btnaddonright">
                <img src="/<?php echo $this->data['baseurlpath'].'resources/icons/clipboard.svg'; ?>"
                     alt="Copy to clipboard" />
            </button>
        </div>
    </div>
<?php
// print out exception only if the exception is available
if ($this->data['showerrors']) {
?>
    <h2><?php echo $this->t('debuginfo_header'); ?></h2>
    <p><?php echo $this->t('debuginfo_text'); ?></p>

    <div style="border: 1px solid #eee; padding: 1em; font-size: x-small">
        <p style="margin: 1px"><?php echo htmlspecialchars($this->data['error']['exceptionMsg']); ?></p>
        <pre style="padding: 1em; font-family: monospace;"><?php
            echo htmlspecialchars($this->data['error']['exceptionTrace']); ?></pre>
    </div>
<?php
}

/* Add error report submit section if we have a valid technical contact. 'errorreportaddress' will only be set if
 * the technical contact email address has been set.
 */
if (isset($this->data['errorReportAddress'])) {
?>
    <h2><?php echo $this->t('report_header'); ?></h2>
    <form action="<?php echo htmlspecialchars($this->data['errorReportAddress']); ?>" method="post">
        <p><?php echo $this->t('report_text'); ?></p>
        <p><?php echo $this->t('report_email'); ?>
            <input type="email" size="25" name="email" value="<?php echo htmlspecialchars($this->data['email']); ?>" />
        </p>
        <p>
            <textarea class="metadatabox" name="text" rows="6" cols="50" style="width: 100%; padding: 0.5em;"><?php
                echo $this->t('report_explain'); ?></textarea>
        </p>
        <p>
            <input type="hidden" name="reportId" value="<?php echo $this->data['error']['reportId']; ?>"/>
            <button type="submit" name="send" class="btn"><?php echo $this->t('report_submit'); ?></button>
        </p>
    </form>
    <?php
}
?>
    <h2 style="clear: both"><?php echo $this->t('howto_header'); ?></h2>
    <p><?php echo $this->t('howto_text'); ?></p>
    <script type="text/javascript">
        var clipboard = new ClipboardJS('#btntrackid');
    </script>
<?php
$this->includeAtTemplateBase('includes/footer.php');