Rev Author Line No. Line
228 kaklik 1 <h1><?php echo $sg->translator->_g("User Management"); ?></h1>
2  
3 <?php if(!$sg->user->isAdmin()) echo '<p>'.$sg->translator->_g("You must be an administrator to access this area.").'</p>'; ?>
4  
5 <table>
6 <?php
7 $users = $sg->io->getUsers();
8 foreach($users as $usr) {
9 echo "<tr>\n ";
10 echo "<td><strong>".$sg->translator->_g("Username")."</strong> ";
11 if($usr->permissions & SG_SUSPENDED) echo "<strike>";
12 if($usr->permissions & SG_ADMIN) echo "<u>";
13 echo $usr->username;
14 if($usr->permissions & SG_ADMIN) echo "</u>";
15 if($usr->permissions & SG_SUSPENDED) echo "</strike>";
16 echo "</td>\n ";
17 echo "<td><strong>".$sg->translator->_g("Email")."</strong> ".$usr->email."</td>\n ";
18 echo "<td><strong>".$sg->translator->_g("Full name")."</strong> ".$usr->fullname."</td>\n ";
19 echo '<td><a href="'.$sg->formatAdminURL("edituser", null, null, null, "&amp;user=".$usr->username).'">'.$sg->translator->_g("edit")."</a></td>\n ";
20 echo '<td><a href="'.$sg->formatAdminURL("deleteuser", null, null, null, "&amp;user=".$usr->username).'">'.$sg->translator->_g("delete")."</a></td>\n ";
21 echo '<td><a href="'.$sg->formatAdminURL("suspenduser", null, null, null, "&amp;user=".$usr->username).'">'.($usr->permissions & SG_SUSPENDED ? $sg->translator->_g("unsuspend") : $sg->translator->_g("suspend"))."</a></td>\n";
22 echo "</tr>\n";
23 }
24  
25 ?>
26 </table>
27  
28 <h2><?php echo $sg->translator->_g("Create New User"); ?></h2>
29 <form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post"><p>
30 <?php echo $sg->translator->_g("Username"); ?>
31 <input type="hidden" name="action" value="newuser" />
32 <input type="input" name="user" />
33 <input type="submit" class="button" value="<?php /*"*/ echo $sg->translator->_g("Create"); ?>" />
34 </p></form>