本文整理汇总了PHP中get_user_privdesc函数的典型用法代码示例。如果您正苦于以下问题:PHP get_user_privdesc函数的具体用法?PHP get_user_privdesc怎么用?PHP get_user_privdesc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_user_privdesc函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build_priv_table
function build_priv_table()
{
global $a_group, $id;
$privhtml = '<div class="table-responsive">';
$privhtml .= '<table class="table table-striped table-hover table-condensed">';
$privhtml .= '<thead>';
$privhtml .= '<th>' . gettext('Name') . '</th>';
$privhtml .= '<th>' . gettext('Description') . '</th>';
$privhtml .= '</thead>';
$privhtml .= '<tbody>';
foreach (get_user_privdesc($a_group[$id]) as $i => $priv) {
$privhtml .= '<tr>';
$privhtml .= '<td>' . htmlspecialchars($priv['name']) . '</td>';
$privhtml .= '<td>' . htmlspecialchars($priv['descr']) . '</td>';
$privhtml .= '<td><a class="fa fa-trash" title="' . gettext('Delete Privilege') . '" href="system_groupmanager.php?act=delpriv&groupid=' . $id . '&privid=' . $i . '"></a></td>';
$privhtml .= '</tr>';
}
$privhtml .= '</tbody>';
$privhtml .= '</table>';
$privhtml .= '</div>';
$privhtml .= '<nav class="action-buttons">';
$privhtml .= '<a href="system_groupmanager_addprivs.php?groupid=' . $id . '" class="btn btn-success">' . gettext("Add") . '</a>';
$privhtml .= '</nav>';
return $privhtml;
}
示例2: build_priv_table
function build_priv_table()
{
global $a_user, $id;
$privhtml = '<div class="table-responsive">';
$privhtml .= '<table class="table table-striped table-hover table-condensed">';
$privhtml .= '<thead>';
$privhtml .= '<tr>';
$privhtml .= '<th>' . gettext('Inherited from') . '</th>';
$privhtml .= '<th>' . gettext('Name') . '</th>';
$privhtml .= '<th>' . gettext('Description') . '</th>';
$privhtml .= '</tr>';
$privhtml .= '</thead>';
$privhtml .= '<tbody>';
$i = 0;
foreach (get_user_privdesc($a_user[$id]) as $priv) {
$group = false;
if ($priv['group']) {
$group = $priv['group'];
}
$privhtml .= '<tr>';
$privhtml .= '<td>' . htmlspecialchars($priv['group']) . '</td>';
$privhtml .= '<td>' . htmlspecialchars($priv['name']) . '</td>';
$privhtml .= '<td>' . htmlspecialchars($priv['descr']) . '</td>';
$privhtml .= '<td>';
if (!$group) {
$privhtml .= '<a class="fa fa-trash no-confirm icon-pointer" title="' . gettext('Delete Privilege') . '" id="delprivid' . $i . '"></a></td>';
}
$privhtml .= '</td>';
$privhtml .= '</tr>';
if (!$group) {
$i++;
}
}
$privhtml .= '</tbody>';
$privhtml .= '</table>';
$privhtml .= '</div>';
$privhtml .= '<nav class="action-buttons">';
$privhtml .= '<a href="system_usermanager_addprivs.php?userid=' . $id . '" class="btn btn-success">' . gettext("Add") . '</a>';
$privhtml .= '</nav>';
return $privhtml;
}
示例3: gettext
<td width="20%"><b><?php
echo gettext("Inherited From");
?>
</b></td>
<td width="30%"><b><?php
echo gettext("Name");
?>
</b></td>
<td width="40%"><b><?php
echo gettext("Description");
?>
</b></td>
<td></td>
</tr>
<?php
foreach (get_user_privdesc($a_user[$id]) as $priv) {
?>
<tr>
<td><?php
echo !empty($priv['group']) ? $priv['group'] : "";
?>
</td>
<td><?php
echo $priv['name'];
?>
</td>
<td><?php
echo !empty($priv['descr']) ? $priv['descr'] : "";
?>
</td>
<td class="text-center">
示例4: gettext
<td width="20%" class="listhdrr"><b><?php
echo gettext("Inherited From");
?>
</b></td>
<td width="30%" class="listhdrr"><b><?php
echo gettext("Name");
?>
</b></td>
<td width="40%" class="listhdrr"><b><?php
echo gettext("Description");
?>
</b></td>
<td class="list"></td>
</tr>
<?php
$privdesc = get_user_privdesc($a_user[$id]);
if (is_array($privdesc)) {
$i = 0;
foreach ($privdesc as $priv) {
$group = false;
if ($priv['group']) {
$group = $priv['group'];
}
?>
<tr>
<td class="listlr"><?php
echo $group;
?>
</td>
<td class="listr">
<?php
示例5: build_priv_table
function build_priv_table()
{
global $a_user, $id;
$privhtml = '<div class="table-responsive">';
$privhtml .= '<table class="table table-striped table-hover table-condensed">';
$privhtml .= '<thead>';
$privhtml .= '<tr>';
$privhtml .= '<th>' . gettext('Inherited from') . '</th>';
$privhtml .= '<th>' . gettext('Name') . '</th>';
$privhtml .= '<th>' . gettext('Description') . '</th>';
$privhtml .= '</tr>';
$privhtml .= '</thead>';
$privhtml .= '<tbody>';
foreach (get_user_privdesc($a_user[$id]) as $i => $priv) {
$privhtml .= '<tr>';
$privhtml .= '<td>' . htmlspecialchars($priv['group']) . '</td>';
$privhtml .= '<td>' . htmlspecialchars($priv['name']) . '</td>';
$privhtml .= '<td>' . htmlspecialchars($priv['descr']) . '</td>';
$privhtml .= '</tr>';
}
$privhtml .= '</tbody>';
$privhtml .= '</table>';
$privhtml .= '</div>';
$privhtml .= '<nav class="action-buttons">';
$privhtml .= '<a href="system_usermanager_addprivs.php?userid=' . $id . '" class="btn btn-success">' . gettext("Add") . '</a>';
$privhtml .= '</nav>';
return $privhtml;
}