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


PHP Access::setModule方法代码示例

本文整理汇总了PHP中Access::setModule方法的典型用法代码示例。如果您正苦于以下问题:PHP Access::setModule方法的具体用法?PHP Access::setModule怎么用?PHP Access::setModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Access的用法示例。


在下文中一共展示了Access::setModule方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Access

<?php

require_once __DIR__ . "/../class/Access.class.php";
if (isset($_POST)) {
    $Access = new Access();
    $Access->setUsername($_POST['username']);
    $Access->setModule($_POST['module']);
    $Access->addAllowed();
    header("location:/users.admin.php?event=added-allowed");
}
开发者ID:alexzhxin,项目名称:erp.librairielabourse,代码行数:10,代码来源:addallow.postcall.php

示例2: User

<?php

require_once __DIR__ . "/autoload/session.autoload.php";
require_once __DIR__ . "/class/Network.class.php";
require_once __DIR__ . "/class/User.class.php";
require_once __DIR__ . "/class/Access.class.php";
$User = new User();
$User->checkConnected();
$Access = new Access();
$Access->setUsername($_SESSION['username']);
$Access->setModule('Acheteur');
$Access->isAllowedRedirect();
?>

<!DOCTYPE html>
<html>
<head>
  <?php 
require_once __DIR__ . "/template/headcode.template.php";
?>
  <script type="text/javascript" src="js/acheteur.js"></script>
</head>
<body>

    <?php 
include __DIR__ . "/template/modal.template.php";
?>
    
    <?php 
include __DIR__ . "/template/header.template.php";
?>
开发者ID:alexzhxin,项目名称:erp.librairielabourse,代码行数:31,代码来源:acheteur.php

示例3: Magasin

<?php

require_once __DIR__ . "/autoload/session.autoload.php";
require_once __DIR__ . "/autoload/checkconnected.autoload.php";
require_once __DIR__ . "/class/Network.class.php";
require_once __DIR__ . "/class/Stats.class.php";
require_once __DIR__ . "/class/Magasin.class.php";
require_once __DIR__ . "/class/Access.class.php";
require_once __DIR__ . "/class/User.class.php";
$Magasin = new Magasin();
$magasins = $Magasin->getMagasins();
$User = new User();
$User->checkConnected();
$Access = new Access();
$Access->setUsername($_SESSION['username']);
$Access->setModule('Statistiques');
$Access->isAllowedRedirect();
?>

<!DOCTYPE html>
<html>
<head>
  <?php 
require_once __DIR__ . "/template/headcode.template.php";
?>
</head>
<body>

    <?php 
include __DIR__ . "/template/header.template.php";
?>
开发者ID:alexzhxin,项目名称:erp.librairielabourse,代码行数:31,代码来源:stats.php

示例4: User

<?php

require_once __DIR__ . "/autoload/session.autoload.php";
require_once __DIR__ . "/class/Network.class.php";
require_once __DIR__ . "/class/User.class.php";
require_once __DIR__ . "/class/Access.class.php";
$User = new User();
$User->checkConnected();
$Access = new Access();
$Access->setUsername($_SESSION['username']);
$Access->setModule('Searcher');
$Access->isAllowedRedirect();
?>

<!DOCTYPE html>
<html>
<head>
  <?php 
require_once __DIR__ . "/template/headcode.template.php";
?>
</head>
<body>

    <?php 
include __DIR__ . "/template/modal.template.php";
?>
    
    <?php 
include __DIR__ . "/template/header.template.php";
?>
开发者ID:alexzhxin,项目名称:erp.librairielabourse,代码行数:30,代码来源:searcher.php

示例5: Access

<?php

require_once __DIR__ . "/../class/Access.class.php";
if (isset($_GET)) {
    $Access = new Access();
    $Access->setUsername($_GET['username']);
    $Access->setModule($_GET['module']);
    $Access->removeAllowed();
    header("location:/users.admin.php?event=removed-allowed");
}
开发者ID:alexzhxin,项目名称:erp.librairielabourse,代码行数:10,代码来源:deleteallowed.getcall.php

示例6: foreach

            	</table>

            </div>

            <div class="row-fluid margin-top-2">
              
              <legend>Permissions</legend>

              <?php 
foreach ($users as $key => $value) {
    echo '<div class="row-fluid margin-top-1">';
    echo '<div class="span6">';
    echo '<p>[' . $value['username'] . ']</p>';
    foreach ($modules as $key => $module) {
        $Access->setUsername($value['username']);
        $Access->setModule($module['module_name']);
        if ($Access->isAllowed()) {
            echo '<p>' . $module['module_name'] . ' <a href="getcall/deleteallowed.getcall.php?username=' . $value['username'] . '&module=' . $module['module_name'] . '">(Supprimer)</a></p>';
        }
    }
    echo '</div>';
    echo '<div class="span6">';
    echo '<p>[' . $value['username'] . ']</p>';
    echo '<form action="postcall/addallow.postcall.php" method="POST">';
    echo '<select name="module">';
    foreach ($modules as $key => $module) {
        echo '<option name="' . $module['module_name'] . '">' . $module['module_name'] . '</option>';
    }
    echo '</select>';
    echo '<input type="hidden" name="username" value="' . $value['username'] . '">';
    echo '<br>';
开发者ID:alexzhxin,项目名称:erp.librairielabourse,代码行数:31,代码来源:users.admin.php

示例7: User

<?php

require_once __DIR__ . "/autoload/session.autoload.php";
require_once __DIR__ . "/class/Network.class.php";
require_once __DIR__ . "/class/MobileDetect.class.php";
require_once __DIR__ . "/class/User.class.php";
require_once __DIR__ . "/class/Access.class.php";
$MobileDetect = new Mobile_Detect();
$User = new User();
$User->checkConnected();
$Access = new Access();
$Access->setUsername($_SESSION['username']);
$Access->setModule('Viewer');
$Access->isAllowedRedirect();
?>

<!DOCTYPE html>
<html>
<head>
    <?php 
require_once __DIR__ . "/template/headcode.template.php";
?>
</head>
<body>

    <?php 
include __DIR__ . "/template/header.template.php";
?>

  <script type="text/javascript">
  //<![CDATA[
开发者ID:alexzhxin,项目名称:erp.librairielabourse,代码行数:31,代码来源:viewer.php


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