本文整理匯總了PHP中group::superuser方法的典型用法代碼示例。如果您正苦於以下問題:PHP group::superuser方法的具體用法?PHP group::superuser怎麽用?PHP group::superuser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類group
的用法示例。
在下文中一共展示了group::superuser方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: superuser
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;
}
}
示例2: foreach
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>