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


PHP hasRight函数代码示例

本文整理汇总了PHP中hasRight函数的典型用法代码示例。如果您正苦于以下问题:PHP hasRight函数的具体用法?PHP hasRight怎么用?PHP hasRight使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: hasRightClosePageWithError

 public static function hasRightClosePageWithError($handler)
 {
     if (hasRight($handler) == false) {
         die("You are not allowed here");
     }
     //FIXME
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:7,代码来源:rights.lib.php

示例2: Exception

<?php

if (!hasRight('userview', true)) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
sendVarToJS('ldapEnable', config::byKey('ldap::enable'));
?>
<div id="div_administration">


    <!--********************Onglet utilisateur********************************-->
    <div class="tab-pane" id="user">
        <legend>{{Liste des utilisateurs :}}</legend>
        <?php 
if (config::byKey('ldap::enable') != '1') {
    ?>
            <a class="btn btn-success pull-right" id="bt_addUser"><i class="fa fa-plus-circle"></i> {{Ajouter un utilisateur}}</a>
            <a class="btn btn-default pull-right tooltips" id="bt_addTemporariUser" title="{{A utiliser pour laisser l'accès temporaire pour de l'assistance par exemple}}"><i class="fa fa-plus-circle"></i> {{Ajouter un utilisateur temporaire}}</a>
            <br/><br/>
        <?php 
}
?>
        <table class="table table-condensed table-bordered" id="table_user">
            <thead><th>{{Nom d'utilisateur}}</th><th>{{Actions}}</th><th>{{Actif}}</th><th>{{Droits}}</th><th>{{Clef API}}</th><th>{{Date de dernière connexion}}</th><th>{{Accès direct}}</th></thead>
            <tbody></tbody>
        </table>
        <div class="form-actions" style="height: 20px;">
            <a class="btn btn-success" id="bt_saveUser"><i class="fa fa-check-circle"></i> {{Sauvegarder}}</a>
        </div>
    </div>
</div>
开发者ID:saez0pub,项目名称:core,代码行数:31,代码来源:user.php

示例3: Exception

<?php

if (!hasRight('jeeNetworkview', true)) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
?>

<div class="row row-overflow">
    <div class="col-md-2 col-sm-3">
        <div class="bs-sidebar">
            <ul id="ul_jeeNetwork" class="nav nav-list bs-sidenav">
                <a id="bt_addJeeNetwork" class="btn btn-default" style="width : 100%;margin-top : 5px;margin-bottom: 5px;"><i class="fa fa-plus-circle"></i> {{Ajouter un Jeedom}}</a>
                <li class="filter" style="margin-bottom: 5px;"><input class="filter form-control input-sm" placeholder="{{Rechercher}}" style="width: 100%"/></li>
                <?php 
foreach (jeeNetwork::all() as $jeeNetwork) {
    echo '<li class="cursor li_jeeNetwork" data-jeeNetwork_id="' . $jeeNetwork->getId() . '"><a>' . $jeeNetwork->getName() . '</a></li>';
}
?>
           </ul>
       </div>
   </div>
   <div class="col-md-10 col-sm-9 jeeNetwork" style="display: none;" id="div_conf">

      <ul class="nav nav-tabs" role="tablist">
          <li class="active"><a href="#main" role="tab" data-toggle="tab">{{Général}}</a></li>
          <li><a href="#log"  role="tab" data-toggle="tab">{{Log et messages}}</a></li>
          <li><a href="#update" role="tab" data-toggle="tab">{{Mise à jour}}</a></li>
          <li><a href="#backup" role="tab" data-toggle="tab">{{Backup}}</a></li>
          <li><a href="#administration" role="tab" data-toggle="tab">{{Administration}}</a></li>
      </ul>
开发者ID:GaelGRIFFON,项目名称:core,代码行数:30,代码来源:jeeNetwork.php

示例4: Exception

<?php

if (!hasRight('messageview')) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
$selectPlugin = init('plugin');
if ($selectPlugin != '') {
    $listMessage = message::byPlugin($selectPlugin);
} else {
    $listMessage = message::all();
}
?>
<a class="btn btn-danger pull-right" id="bt_clearMessage"><i class="fa fa-trash-o icon-white"></i> {{Vider}}</a>
<select id="sel_plugin" class="form-control" style="width: 200px;">
    <option value="" selected>{{Tout}}</option>
    <?php 
foreach (message::listPlugin() as $plugin) {
    if ($selectPlugin == $plugin['plugin']) {
        echo '<option value="' . $plugin['plugin'] . '" selected>' . $plugin['plugin'] . '</option>';
    } else {
        echo '<option value="' . $plugin['plugin'] . '">' . $plugin['plugin'] . '</option>';
    }
}
?>
</select>

<table class="table table-condensed table-bordered tablesorter" id="table_message" style="margin-top: 5px;">
    <thead>
        <tr>
            <th data-sorter="false" data-filter="false"></th><th>{{Date et heure}}</th><th>{{Plugin}}</th><th>{{Description}}</th><th data-sorter="false" data-filter="false">{{Action}}</th>
        </tr>
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:message.php

示例5: Exception

<?php

if (!hasRight('sysinfo', true)) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
?>
<iframe id="frame_sysinfo" src="<?php 
echo jeedom::getCurrentSysInfoFolder();
?>
/index.php" style="width : 100%;height : 1200px;border : none;"></iframe>

<script>
  var hWindow = $(window).height() - $('header').height() - $('footer').height() - 50;
  $('#frame_sysinfo').height(hWindow);
</script>
开发者ID:GaelGRIFFON,项目名称:core,代码行数:15,代码来源:sysinfo.php

示例6: Exception

<?php

if (!hasRight('updateview', true)) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
?>
<br/>
<div class="row row-overflow">
    <div class="col-sm-8">
        {{Dernière vérification : }}<span class="label label-info" id="span_lastUpdateCheck" style="margin-bottom: 5px;"></span>

        <a class="btn btn-warning pull-right" id="bt_checkAllUpdate" style="margin-top:5px;"><i class="fa fa-refresh"></i> {{Vérifier les objets et mises à jour}}</a>
        <a class="btn btn-primary pull-right" id="bt_allChangelog" style="margin-top:5px;"><i class="fa fa-search-plus"></i> {{Changelog}}</a>
        <div class="btn-group pull-right" style="margin-top:5px;">
            <a href="#" class="bt_updateAll btn btn-default"  data-level="0" data-mode=""><i class="fa fa-check"></i> {{Mettre à jour}}</a>
            <div class="btn-group">
                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu">
                    <li><a href="#" class="bt_updateAll expertModeVisible" data-level="0" data-mode="force"> <i class="fa fa-gavel"></i> {{Tout forcer}}</a></li>
                    <li><a href="#" class="bt_updateAll" data-level="1" data-mode=""><i class="fa fa-cube"></i> {{Plugins seulement}}</a></li>
                    <li><a href="#" class="bt_updateAll expertModeVisible" data-level="1" data-mode="force"><i class="fa fa-cube"></i> <i class="fa fa-gavel"></i> {{Plugins seulement forcés}}</a></li>
                    <li><a href="#" class="bt_updateAll" data-level="-1" data-mode=""><i class="fa fa-database"></i> {{Jeedom seulement}}</a></li>
                    <li><a href="#" class="bt_updateAll expertModeVisible" data-level="-1" data-mode="force"><i class="fa fa-database"></i> <i class="fa fa-gavel"></i> {{Jeedom seulement forcé}}</a></li>
                    <li><a href="#" class="expertModeVisible" id="bt_reapplyUpdate"><i class="fa fa-retweet"></i> {{Réappliquer une mise à jour}}</a></li>
                    <li><a href="#" class="expertModeVisible" id="bt_updateSystem"><i class="fa fa-linux"></i> {{Mettre à jour l'OS}}</a></li>
                </ul>
            </div>
        </div>
        <br/><br/>
开发者ID:saez0pub,项目名称:core,代码行数:31,代码来源:update.php

示例7: Exception

<?php

if (!hasRight('pluginview', true)) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
global $JEEDOM_INTERNAL_CONFIG;
sendVarToJS('select_id', init('id', '-1'));
$plugins_list = plugin::listPlugin(false, true);
?>

<div style="position : fixed;height:100%;width:15px;top:50px;left:0px;z-index:998;background-color:#f6f6f6;" id="bt_displayPluginList"><i class="fa fa-arrow-circle-o-right" style="color : #b6b6b6;"></i></div>

<div class="row row-overflow">
    <div class="col-md-3 col-sm-4" id="sd_pluginList" style="z-index:999">
        <div class="bs-sidebar">
            <ul id="ul_plugin" class="nav nav-list bs-sidenav">
                <center>
                    <a class="btn btn-default tooltips" id="bt_displayMarket" style="display: inline-block;"><i class="fa fa-shopping-cart"></i> {{Market}}</a>
                    <span class="btn btn-default btn-file">
                         <i class="fa fa-cloud-upload"></i> {{Envoyer un plugin}}<input class="expertModeVisible" id="bt_uploadPlugin" type="file" name="file" data-url="core/ajax/plugin.ajax.php?action=pluginupload" style="display : inline-block;">
                    </span>
                </center>
                <li class="filter" style="margin-bottom: 5px;margin-top: 5px;"><input class="filter form-control input-sm" placeholder="{{Rechercher}}" style="width: 100%"/></li>
                <?php 
foreach ($plugins_list as $category_name => $category) {
    $icon = '';
    if (isset($JEEDOM_INTERNAL_CONFIG['plugin']['category'][$category_name]) && isset($JEEDOM_INTERNAL_CONFIG['plugin']['category'][$category_name]['icon'])) {
        $icon = $JEEDOM_INTERNAL_CONFIG['plugin']['category'][$category_name]['icon'];
    }
    $name = $category_name;
    if (isset($JEEDOM_INTERNAL_CONFIG['plugin']['category'][$category_name]) && isset($JEEDOM_INTERNAL_CONFIG['plugin']['category'][$category_name]['name'])) {
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:plugin.php

示例8: Exception

<?php

if (!hasRight('planview')) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
$planHeader = null;
$planHeaders = planHeader::all();
if (init('plan_id') == '') {
    foreach ($planHeaders as $planHeader_select) {
        if ($planHeader_select->getId() == $_SESSION['user']->getOptions('defaultDashboardPlan')) {
            $planHeader = $planHeader_select;
            break;
        }
    }
} else {
    foreach ($planHeaders as $planHeader_select) {
        if ($planHeader_select->getId() == init('plan_id')) {
            $planHeader = $planHeader_select;
            break;
        }
    }
}
if (!is_object($planHeader) && count($planHeaders) > 0) {
    $planHeader = $planHeaders[0];
}
if (is_object($planHeader)) {
    sendVarToJS('planHeader_id', $planHeader->getId());
} else {
    sendVarToJS('planHeader_id', -1);
}
if (init('noControl') == '') {
开发者ID:saez0pub,项目名称:core,代码行数:31,代码来源:plan.php

示例9: Exception

<?php

if (!hasRight('cronview', true)) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
?>
<span class="pull-left">
{{Processus cron Jeedom :}} <span class="label label-default"><span class="tooltips" id="span_jeecronMasterRuns" title="{{Nombre de processus Jeedom cron maître (doit toujours être inférieur à 2)}}"></span> |
<span id="span_jeecronRuns" class="tooltips" title="{{Nombre total de processus Jeedom en cours}}"></span> |
<span id="span_nbProcess" class="tooltips" title="{{Nombre total de processus en cours sur la machine}}"></span></span>
<br/>
<span>{{Charge moyenne}} <span class="label label-default"><span id="span_loadAvg1" class="tooltips" title="{{Charge moyenne du système sur la dernière minute}}"></span> |
<span id="span_loadAvg5" class="tooltips" title="{{Charge moyenne du système sur les 5 dernières minutes}}"></span> |
<span id="span_loadAvg15" class="tooltips" title="{{Charge moyenne du système sur les 15 dernières minutes}}"></span></span></span>
</span>

<a class="btn btn-success pull-right" id="bt_save" style="margin-top: 5px;"><i class="fa fa-check-circle"></i> {{Enregistrer}}</a>
<a class="btn btn-default pull-right" id="bt_addCron" style="margin-top: 5px;"><i class="fa fa-plus-circle"></i> {{Ajouter}}</a>
<a class="btn btn-default pull-right" id="bt_refreshCron" style="margin-top: 5px;"><i class="fa fa-refresh"></i> {{Rafraîchir}}</a>
<?php 
if (config::byKey('enableCron') == 0) {
    echo '<a class="btn btn-success pull-right" id="bt_changeCronState" data-state="1" style="margin-top: 5px;"><i class="fa fa-check"></i> {{Activer le système cron}}</a>';
} else {
    echo '<a class="btn btn-danger pull-right" id="bt_changeCronState" data-state="0" style="margin-top: 5px;"><i class="fa fa-times"></i> {{Désactiver le système cron}}</a>';
}
?>
<br/><br/><br/>
<table id="table_cron" class="table table-bordered table-condensed" >
    <thead>
        <tr>
            <th class="id" style="width: 40px;">#</th>
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:cron.php

示例10: Exception

<?php

if (!hasRight('backupview', true)) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
?>
<div id="backup">
    <div class="row row-overflow">
        <div class="col-sm-6">
            <legend>{{Sauvegardes}}</legend>
            <form class="form-horizontal">
                <fieldset>
                    <div class="form-group">
                        <label class="col-sm-4 col-xs-6 control-label">{{Sauvegardes}}</label>
                        <div class="col-sm-8 col-xs-6">
                            <a class="btn btn-success bt_backupJeedom"><i class="fa fa-refresh fa-spin" style="display : none;"></i> <i class="fa fa-floppy-o"></i> {{Lancer}}</a>
                            <?php 
if (config::byKey('backup::cloudUpload') == 1) {
    ?>
                                <a class="btn btn-default bt_backupJeedom" data-noCloudBackup="1" ><i class="fa fa-refresh fa-spin" style="display : none;"></i> <i class="fa fa-floppy-o"></i> Lancer sans envoi sur le cloud</a>
                                <?php 
}
?>
                            </div>
                        </div>
                        <div class="form-group expertModeVisible">
                            <label class="col-sm-4 col-xs-6 control-label">{{Emplacement des sauvegardes}}</label>
                            <div class="col-sm-4 col-xs-6">
                                <input type="text" class="configKey form-control" data-l1key="backup::path" />
                            </div>
                        </div>
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:backup.php

示例11:

<?php 
if ($_SESSION['user']->getOptions('displayViewByDefault') == 1) {
    echo '<div class="col-lg-10 col-md-9 col-sm-8 div_displayViewContainer">';
} else {
    echo '<div class="col-lg-12 col-md-12 col-sm-12 div_displayViewContainer">';
}
?>
<i class='fa fa-picture-o cursor tooltips pull-left bt_displayView' data-display='<?php 
echo $_SESSION['user']->getOptions('displayViewByDefault');
?>
' title="{{Afficher/Masquer les vues}}"></i>

<legend style="height: 35px;color : #563d7c;">Vue <?php 
echo $view->getName();
if (init('noControl') == '') {
    if (hasRight('viewedit', true)) {
        ?>
 <a href="index.php?v=d&p=view_edit&view_id=<?php 
        echo $view->getId();
        ?>
" class="btn btn-warning btn-xs pull-right"><i class="fa fa-pencil"></i> {{Edition complète}}</a><?php 
    }
    ?>

	<i class="fa fa-pencil pull-right cursor" id="bt_editViewWidgetOrder" data-mode="0"></i>
			<?php 
}
?>
		</legend>
		<div class="row div_displayView"></div>
	</div>
开发者ID:saez0pub,项目名称:core,代码行数:31,代码来源:view.php

示例12: Exception

<?php

if (!hasRight('administrationview', true)) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
sendVarToJS('ldapEnable', config::byKey('ldap::enable'));
?>
<div id="config">
    <div class="panel-group" id="accordionConfiguration">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">
                    <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionConfiguration" href="#config_generale">
                        {{Configuration générale}}
                    </a>
                </h3>
            </div>
            <div id="config_generale" class="panel-collapse collapse in">
                <div class="panel-body">
                    <form class="form-horizontal">
                        <fieldset>
                            <div class="form-group expertModeVisible">
                                <label class="col-lg-2 col-md-3 col-sm-4 col-xs-6 control-label">{{Clef API}}</label>
                                <div class="col-lg-2 col-md-3 col-sm-4 col-xs-6">
                                    <p class="form-control-static" id="in_keyAPI"><?php 
echo config::byKey('api');
?>
</p>
                                </div>
                                <div class="col-lg-1 col-md-2 col-sm-3">
                                    <a class="btn btn-default form-control" id="bt_genKeyAPI">{{Générer}}</a>
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:administration.php

示例13: Exception

<?php

if (!hasRight('customview', true)) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
?>
<div class="alert alert-warning">{{Attention tout ce que vous écrivez ici est global et inclus sur toutes les pages, la moindre erreur peut rendre votre jeedom non fonctionel}}</div>
<div role="tabpanel">
    <ul class="nav nav-tabs" role="tablist">
        <li class="active"><a href="#desktop" aria-controls="home" role="tab" data-toggle="tab">Desktop</a></li>
        <li><a href="#mobile" aria-controls="profile" role="tab" data-toggle="tab">Mobile</a></li>
    </ul>
    <div class="tab-content">
        <div role="tabpanel" class="tab-pane active" id="desktop">
            <div class="row row-overflow">
                <div class="col-xs-6">
                    <legend>Javascript
                        <a class="btn btn-success pull-right btn-xs saveCustom" data-version="desktop" data-type="js" style="margin-top: 5px;"><i class="fa fa-check-circle"></i> {{Sauvegarder}}</a>
                    </legend>
                    <textarea class='form-control' id='ta_jsDesktopContent' style='height: 500px;'><?php 
if (file_exists(dirname(__FILE__) . '/../custom/custom.js')) {
    echo trim(file_get_contents(dirname(__FILE__) . '/../custom/custom.js'));
}
?>
</textarea>
                </div>
                <div class="col-xs-6">
                    <legend>CSS
                        <a class="btn btn-success pull-right btn-xs saveCustom" data-version="desktop" data-type="css" style="margin-top: 5px;"><i class="fa fa-check-circle"></i> {{Sauvegarder}}</a>
                    </legend>
                    <textarea class='form-control' id='ta_cssDesktopContent' style='height: 500px;'><?php 
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:custom.php

示例14: init

												<?php 
    } else {
        if (init('p') == 'scenarioAssist') {
            echo '<a class="cursor tooltips" target="_blank" href="https://jeedom.fr/doc/documentation/core/fr_FR/doc-core-scenario.html" title="{{Aide sur la page en cours}}"><i class="fa fa-question-circle" ></i></a>';
        } else {
            if (init('p') == 'view_edit') {
                echo '<a class="cursor tooltips" target="_blank" href="https://jeedom.fr/doc/documentation/core/fr_FR/doc-core-view.html" title="{{Aide sur la page en cours}}"><i class="fa fa-question-circle" ></i></a>';
            } else {
                echo '<a class="cursor tooltips" target="_blank" href="https://jeedom.fr/doc/documentation/core/fr_FR/doc-core-' . init('p') . '.html" title="{{Aide sur la page en cours}}"><i class="fa fa-question-circle" ></i></a>';
            }
        }
    }
    ?>
											</li>
											<?php 
    if (hasRight('reportsend', true)) {
        ?>
											<li>
												<a class="bt_reportBug cursor tooltips" title="{{Envoyer un rapport de bug}}">
													<i class="fa fa-exclamation-circle" ></i>
												</a>
											</li>
											<?php 
    }
    ?>
										</ul>
									</nav><!--/.nav-collapse -->
								</div>
							</header>
							<main class="container-fluid" id="div_mainContainer">
								<div style="display: none;width : 100%" id="div_alert"></div>
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:index.php

示例15: Exception

<?php

if (!hasRight('health', true)) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
?>
<legend>{{Santé de Jeedom}}</legend>
<table class="table table-condensed table-bordered">
	<thead><tr><th style="width : 250px;"></th><th style="width : 150px;">{{Résultat}}</th><th>{{Conseil}}</th></tr></thead>
	<tbody>
	<tr>
			<td style="font-weight : bold;">{{Système à jour}}</td>
			<?php 
$nbNeedUpdate = update::nbNeedUpdate();
if ($nbNeedUpdate > 0) {
    echo '<td class="alert alert-danger">' . $nbNeedUpdate . '</td>';
    echo '<td></td>';
} else {
    echo '<td class="alert alert-success">{{OK}}</td>';
    echo '<td></td>';
}
?>
		</tr>

		<tr>
			<td style="font-weight : bold;">{{Lancement des crons}}</td>
			<?php 
if (!cron::ok()) {
    echo '<td class="alert alert-danger">{{NOK}}</td>';
    echo '<td></td>';
} else {
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:health.php


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