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


PHP Rights::SetRight方法代码示例

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


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

示例1:

<?php

/**
 * @package ComaCMS
 * @subpackage Authentication
 * @copyright (C) 2005-2009 The ComaCMS-Team
 */
#----------------------------------------------------------------------
# file                 : rights.php
# created              : 2009-05-23
# copyright            : (C) 2005-2009 The ComaCMS-Team
# email                : comacms@williblau.de
#----------------------------------------------------------------------
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#----------------------------------------------------------------------
global $rights_Translation;
global $rights_SqlConnection;
// Access to the translation class via $rights_Translation->GetTranslation($translation_string);
// Access to the mysql database of the system via $rights_SqlConnection->SqlQuery($sql);
// Rights::SetRight('this is the group of rights in wich it should be displayed', 'the name of the right', 'this is the string displayed to the user', 'this is the string shown as an explanation for the right', is this right dynamic?, here can be pasted an array containing dynamic content with the keys 'name' defined as ident, 'display' and 'description');
Rights::SetRight($translation->GetTranslation('pages'), 'view_page_private', $translation->GetTranslation('view_privat_pages'), $translation->GetTranslation('this_right_allows_to_view_all_privat_pages'), true);
开发者ID:BackupTheBerlios,项目名称:comacms-svn,代码行数:24,代码来源:rights.php


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