本文整理汇总了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>