summaryrefslogtreecommitdiffstats
path: root/inc/simplesamlphp/templates/metadata-converter.php
blob: f8b17c114200d5c79d7df16d14c21c41db1880ac (plain)
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
<?php
$this->data['header'] = $this->t('metaconv_title');
$this->includeAtTemplateBase('includes/header.php');
?>



<h2><?php echo $this->t('metaconv_title'); ?></h2>

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

<p><?php echo($this->t('{admin:metaconv_xmlmetadata}')); ?></p>
<p>
<textarea rows="20" cols="120" name="xmldata"><?php echo htmlspecialchars($this->data['xmldata']); ?></textarea>
</p>
<p>
<input type="submit" value="<?php echo $this->t('metaconv_parse'); ?>" />
</p>
</form>

<?php

$output = $this->data['output'];

if($output !== NULL) {

	echo('<h2>' . $this->t('metaconv_converted') . '</h2>' . "\n");

	foreach($output as $type => $text) {
		if($text === '') {
			continue;
		}

		echo('<h3>' . htmlspecialchars($type) . '</h3>' . "\n");
		echo('<pre class="metadatabox">' . htmlspecialchars($text) . '</pre>' . "\n");
	}
}

?>

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