File: modlist.php

package info (click to toggle)
simplesamlphp 1.14.11-1%2Bdeb9u2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 15,024 kB
  • sloc: php: 72,337; xml: 1,078; python: 376; sh: 220; perl: 185; makefile: 57
file content (38 lines) | stat: -rw-r--r-- 1,371 bytes parent folder | download
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
<?php
$this->data['header'] = $this->t('{modinfo:modinfo:modlist_header}');
$this->includeAtTemplateBase('includes/header.php');

#$icon_enabled  = '<img src="/' . $this->data['baseurlpath'] . 'resources/icons/silk/accept.png" alt="' .
#htmlspecialchars($this->t(...)" />';
#$icon_disabled = '<img src="/' . $this->data['baseurlpath'] . 'resources/icons/silk/delete.png" alt="disabled" />';

?>

<h2><?php echo($this->data['header']); ?></h2>

<table class="modules" style="width: 100%">
<tr>
<th><?php echo($this->t('{modinfo:modinfo:modlist_name}')); ?></th>
<th ><?php echo($this->t('{modinfo:modinfo:modlist_status}')); ?></th>
</tr>
<?php
ksort($this->data['modules']);

$i = 0;
foreach($this->data['modules'] as $id => $info) {
	echo('<tr class="' . ($i++ % 2 == 0 ? 'odd' : 'even') . '">');
	echo('<td><tt>' . htmlspecialchars($id) . '</tt></td>'."\n");
	
	if($info['enabled']) {
		echo('<td><img src="/' . $this->data['baseurlpath'] . 'resources/icons/silk/accept.png" alt="' .
			htmlspecialchars($this->t('{modinfo:modinfo:modlist_enabled}')) . '" /></td>'."\n");
	} else {
		echo('<td><img src="/' . $this->data['baseurlpath'] . 'resources/icons/silk/delete.png" alt="' .
			htmlspecialchars($this->t('{modinfo:modinfo:modlist_disabled}')) . '" /></td>'."\n");
	}
	
	echo('</tr>'."\n");
}
?>
</table>
<?php $this->includeAtTemplateBase('includes/footer.php');