本文整理汇总了PHP中SecurityGroup::havePermission方法的典型用法代码示例。如果您正苦于以下问题:PHP SecurityGroup::havePermission方法的具体用法?PHP SecurityGroup::havePermission怎么用?PHP SecurityGroup::havePermission使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SecurityGroup
的用法示例。
在下文中一共展示了SecurityGroup::havePermission方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: printContent
function printContent() {
?>
<table border="0">
<tr bgcolor=<?=BGCOLOR_ALT?>>
<th>#</th>
<? if (SecurityGroup::havePermission("DELETE")) { ?>
<th></th>
<? } ?>
<th><?=Text::getText("Name")?></th>
<th> </th>
<th> </th>
</tr>
<? $bg = TRUE; ?>
<? foreach ($this->groups as $g) { ?>
<? $bg = !$bg; ?>
<tr<? if ($bg) { ?> bgcolor=<?=BGCOLOR_ALT?><? } ?>>
<td> <?=$g->getId()?> </td>
<? if (SecurityGroup::havePermission("DELETE")) { ?>
<td><a href="<?=$this->groupDeletePage?>?<?=$this->groupDeleteParamGroupId?>=<?=$g->getId()?>" onClick="return confirm('<?=Text::getText('ConfirmDeleteGroup')?>')"><img src="<?=$this->imgDeleteSrc?>" border="0" alt="<?=Text::getText('Delete')?>"></a></td>
<? } ?>
<td> <a href="<?=$this->groupEditPage?>?<?=$this->groupEditParamGroupId?>=<?=$g->getId()?>"><?=$g->getName()?></a> </td>
<td> <a href="<?=$this->groupMembersPage?>?<?=$this->groupMembersParamGroupId?>=<?=$g->getId()?>"><?=Text::getText("Members")?></a> </td>
<td> <a href="<?=$this->groupPermissionsPage?>?<?=$this->groupPermissionsParamGroupId?>=<?=$g->getId()?>"><?=Text::getText("Permissions")?></a> </td>
</tr>
<? } ?>
</table>
<?
}
示例2: if
"><?php
echo Text::getText("Members");
?>
</a> </td>
<td> <a href="groupPermissions.php?id=<?php
echo $g->getId();
?>
"><?php
echo Text::getText("Permissions");
?>
</a> </td>
</tr>
<? } ?>
</table>
<? if (SecurityGroup::havePermission("ADD")) { ?>
<h3><?php
echo Text::getText("AddGroup");
?>
</h3>
<form method="POST" action="groupAdd.php">
<input type="hidden" name="action" value="save">
<table border="0" cellpadding="2">
<tr>
<th><?php
echo Text::getText("Name");
?>
</th>
<td><input type="text" name="name" value=""></td>
</tr>
<tr>
示例3: if
</td>
</tr>
<? if (SecurityUser::havePermission("VIEW")) { ?>
<tr class="navitem">
<td class="navitem">
<a href="<?php
echo $smellyfish_base_uri;
?>
users.php"><?php
echo Text::getText("Users");
?>
</a>
</td>
</tr>
<? } ?>
<? if (SecurityGroup::havePermission("VIEW")) { ?>
<tr class="navitem">
<td class="navitem">
<a href="<?php
echo $smellyfish_base_uri;
?>
groups.php"><?php
echo Text::getText("Groups");
?>
</a>
</td>
</tr>
<? } ?>
<tr class="navitem">
<td class="navitem">
<a href="http://nicolas.marchildon.net/carnet/category/smellyfish/">Blog</a>