aboutsummaryrefslogtreecommitdiff
path: root/templates/userlist.tpl.php
blob: e05ea6d67f8070958a4b30745f91cd248b19713e (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
<?php

$userservice =& ServiceFactory::getServiceInstance('UserService');

$currentUser = $userservice->getCurrentUser();
$currentUserID = $userservice->getCurrentUserId();
$currentUsername = $currentUser[$userservice->getFieldName('username')];


$this->includeTemplate($GLOBALS['top_include']);

echo '<ol id="bookmarks">';

foreach(array_keys($users) as $key) {

	echo '<li class="xfolkentry">'."\n";

	echo '<div class="link">';
	echo '<a href="'.createURL('profile', $users[$key][$userservice->getFieldname('username')]).'">'.$users[$key][$userservice->getFieldName('username')].'</a>';
	echo '</div>';

	if($users[$key][$userservice->getFieldName('username')] != $currentUsername) {
	    echo '<div class="meta">';
	    echo '<a href="'.createURL('admin','delete/'.$users[$key][$userservice->getFieldname('username')]).'" onclick="return confirm(\''.T_('Are you sure?').'\');">'.T_('Delete').'</a>';
	    echo '</div>';
	}

	echo '</li>'."\n";
}

$this->includeTemplate('sidebar.tpl');
$this->includeTemplate($GLOBALS['bottom_include']);

?>