当前位置: 首页>>代码示例>>PHP>>正文


PHP AdminController::Get_MasterPrivilegios方法代码示例

本文整理汇总了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);
开发者ID:E89son,项目名称:LieisonCMS,代码行数:26,代码来源:save_seccion.php

示例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;
 }
开发者ID:E89son,项目名称:LieisonCMS,代码行数:20,代码来源:PageController.php

示例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);
开发者ID:E89son,项目名称:LieisonCMS,代码行数:8,代码来源:get_seccion_privs.php

示例4: unset

        } else {
            echo '<option value="' . $sec_id . '" data-content="' . "<i  class='" . $sec_icono . "'></i>&nbsp;<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 . ",";
                    }
                }
            }
开发者ID:E89son,项目名称:LieisonCMS,代码行数:31,代码来源:view_edit_paginas.php


注:本文中的AdminController::Get_MasterPrivilegios方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。