Rev Author Line No. Line
228 kaklik 1 <h1><?php echo $sg->translator->_g("User Management"); ?></h1>
2  
3 <form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post">
4 <table class="formTable">
5 <input type="hidden" name="action" value="saveuser" />
6 <input type="hidden" name="user" value="<?php echo $_REQUEST["user"]; ?>" />
7 <?php
8 $users = $sg->io->getUsers();
9 for($i=0; $i<count($users); $i++)
10 if($users[$i]->username == $_REQUEST["user"]) {
11 $usr = $users[$i];
12 break;
13 }
14  
15 echo "<tr><td>".$sg->translator->_g("Username")."</td><td><strong>".$usr->username."</strong></td></tr>\n";
16 if($sg->user->isAdmin())
17 echo "<tr><td>".$sg->translator->_g("Type").'</td><td>'.
18 '<label for="sgTypeAdmin"><input type="radio" class="radio" id="sgTypeAdmin" name="sgType" value="admin"'.($usr->permissions & SG_ADMIN ? ' checked="true"' : "").' />'.$sg->translator->_g("Administrator")."</label><br />\n".
19 '<label for="sgTypeUser"><input type="radio" class="radio" id="sgTypeUser" name="sgType" value="user"'. ($usr->permissions & SG_ADMIN ? "" : ' checked="true"').' />'.$sg->translator->_g("User")."</label></td></tr>\n";
20 if($sg->user->isAdmin())
21 echo "<tr><td>".$sg->translator->_g("Groups").'</td><td><input type="input" name="sgGroups" value="'.$usr->groups."\" /></td></tr>\n";
22 echo "<tr><td>".$sg->translator->_g("Email").'</td><td><input type="input" name="sgEmail" value="'.$usr->email."\" /></td></tr>\n";
23 echo "<tr><td>".$sg->translator->_g("Full name").'</td><td><input type="input" name="sgFullname" value="'.$usr->fullname."\" /></td></tr>\n";
24 echo "<tr><td>".$sg->translator->_g("Description").'</td><td><input type="input" name="sgDescription" value="'.$usr->description."\" /></td></tr>\n";
25 if($sg->user->isAdmin() && !$usr->isGuest())
26 echo "<tr><td>".$sg->translator->_g("Password").'</td><td><input type="input" name="sgPassword" value="**********" /></td></tr>'."\n";
27  
28 ?>
29 <tr>
30 <td></td>
31 <td><input type="submit" class="button" value="<?php /*"*/ echo $sg->translator->_g("Save Changes") ?>" /></td>
32 </tr>
33 </table>
34 </form>