本文整理汇总了PHP中AdminController::Get_MasterPrivilegios方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminController::Get_MasterPrivilegios方法的具体用法?PHP AdminController::Get_MasterPrivilegios怎么用?PHP AdminController::Get_MasterPrivilegios使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AdminController
的用法示例。
在下文中一共展示了AdminController::Get_MasterPrivilegios方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: explode
<?php
include '../../../Conf/Include.php';
set_dependencies(array("PageController", "AdminController"));
$titulo = $_REQUEST['titulo'] ?: null;
$icono = $_REQUEST['icono'] ?: null;
$inicio = $_REQUEST['inicio'] ?: null;
$priv = $_REQUEST['priv'] ?: null;
if ($titulo == null) {
exit;
}
$pieces_priv = explode(",", $priv);
$admin = new AdminController();
$admin_priv = $admin->Get_MasterPrivilegios();
unset($admin);
$priv_ids = array();
foreach ($pieces_priv as $pieces) {
foreach ($admin_priv as $val) {
if ($pieces === $val['nombre']) {
array_push($priv_ids, $val['nivel']);
}
}
}
$priv_ids = implode(",", $priv_ids);
$page = new PageController();
$page->Set_NewSeccion($titulo, $icono, $inicio, $priv_ids);
示例2: ConvertPrivToString
public function ConvertPrivToString($numeric_privs)
{
$admin = new AdminController();
$privs = $admin->Get_MasterPrivilegios();
$privs_array = array();
$numeric_array = explode(",", $numeric_privs);
for ($i = 0; $i < count($numeric_array); $i++) {
foreach ($privs as $v) {
if ($numeric_array[$i] == $v['nivel']) {
array_push($privs_array, $v['nombre']);
break;
}
}
}
$glue = implode(",", $privs_array);
if (SivarApi\Tools\Validation::Is_Empty_OrNull($glue)) {
return "all privileges";
}
return $glue;
}
示例3: AdminController
<?php
include '../../../Conf/Include.php';
set_dependencies(array("AdminController"));
$admin = new AdminController();
$result = $admin->Get_MasterPrivilegios();
$json = new \SivarApi\Tools\Services_JSON();
echo $json->encode($result);
示例4: unset
} else {
echo '<option value="' . $sec_id . '" data-content="' . "<i class='" . $sec_icono . "'></i> <b>{$sec_title}</b>" . '"></option>';
}
}
unset($page);
?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Privilegios</label>
<div class="col-md-9">
<?php
$admin = new AdminController();
$priv_master = $admin->Get_MasterPrivilegios();
$page_priv = explode(",", $dash['priv_nombre']);
$priv_string = "";
foreach ($priv_master as $values) {
$nivel = $values['nivel'];
$nameP = $values['nombre'];
if (is_array($page_priv)) {
for ($i = 0; $i < count($page_priv); $i++) {
if ($page_priv[$i] === $nivel) {
if ($i == count($page_priv) - 1) {
$priv_string .= $nameP . "";
} else {
$priv_string .= $nameP . ",";
}
}
}