示例#1
0
 function show($id, $text = "")
 {
     if (!session::get("tooltips")) {
         // display text from database
         if ($id) {
             $helpArray = fetch_to_array(database::query("SELECT * FROM system WHERE name='{$id}'"), "");
             if ($helpArray) {
                 $entry = current($helpArray);
             }
             $right = right::get_field($id);
             $user = right::get("rights");
             $temp = $entry[text];
             // admin informations
             if (right::superuser()) {
                 $temp .= "<hr><table>";
                 $temp .= "<tr><td>fieldname</td><td>{$id}</td></tr>";
                 // fieldname
                 $temp .= "<tr><td>edit</td><td>" . right::int2string($right[edit]) . "</td></tr>";
                 // edit rights
                 $temp .= "<tr><td>view</td><td>" . right::int2string($right[view]) . "</td></tr>";
                 // view rights
                 $temp .= "</table>";
                 $clickEvent = " onmousedown = edit(&#34;{$id}&#34;)";
             }
             if ($text) {
                 $temp .= "<hr>{$text}";
             }
             return "onmouseover='return overlib(&#34;" . $temp . "&#34;);' onmouseout='return nd()' {$clickEvent}";
         }
         // display special text
     }
 }
示例#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>