Exemplo n.º 1
0
 function superuser($id = "")
 {
     if (!$id and $id = user::id()) {
         $id = user::id();
     }
     $userArray = user::get($id);
     if (group::superuser($userArray[group])) {
         return TRUE;
     } else {
         return FALSE;
     }
 }
Exemplo n.º 2
0
    echo form::field("password", "password", "", 30, "", "Password ", "", "new-password");
    echo "<br>";
    echo form::field("submit", "action", "anlegen");
    echo form::field("hidden", "action", "add");
    echo "</fieldset>";
    echo "</form>";
    // ----------------------------------------------------------------------------
    // list groups
    $groupArray = group::get_list();
    echo "<fieldset><legend>Gruppen</legend>";
    echo "<table>";
    echo "<th>group</th>";
    echo "<th>rights</th>";
    foreach ($groupArray as $entry) {
        echo "<tr>";
        echo "<td>" . $entry[text] . "</td>";
        echo "<td>" . right::int2string($entry[rights], group::superuser($entry[value])) . "</td>";
        echo "</tr>";
    }
    echo "</table>";
    echo "</fieldset>";
    echo "</div>";
} else {
    form::standard();
}
?>



</body>
</html>