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


PHP message::nbMessage方法代码示例

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


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

示例1: date

												<?php 
    }
    ?>
											</ul>

											<ul class="nav navbar-nav navbar-right">
												<?php 
    $displayMessage = message::nbMessage() > 0 ? '' : 'display : none;';
    ?>
												<li><a href="index.php?v=d&p=message">
													<span class="label label-warning" id="span_nbMessage" style="<?php 
    echo $displayMessage;
    ?>
">
														<i class="fa fa-envelope"></i> <?php 
    echo message::nbMessage();
    ?>
 {{message(s)}}
													</span>
												</a>
											</li>
											<li>
												<a href="#">
													<i class="fa fa-clock-o"></i> <span id="horloge"><?php 
    echo date('H:i:s');
    ?>
</span>
												</a>
											</li>
											<li class="dropdown">
												<a class="dropdown-toggle" data-toggle="dropdown" href="#">
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:index.php

示例2: Exception

         $scenario->setIsActive(0);
         $jsonrpc->makeSuccess($scenario->save());
     }
     throw new Exception('La paramètre "state" ne peut être vide et doit avoir pour valeur [run,stop,enable;disable]');
 }
 /*             * ************************JeeNetwork*************************** */
 if ($jsonrpc->getMethod() == 'jeeNetwork::handshake') {
     if (config::byKey('jeeNetwork::mode') != 'slave') {
         throw new Exception('Impossible d\'ajouter une box jeedom non esclave à un réseau Jeedom');
     }
     $auiKey = config::byKey('auiKey');
     if ($auiKey == '') {
         $auiKey = config::genKey(255);
         config::save('auiKey', $auiKey);
     }
     $return = array('mode' => config::byKey('jeeNetwork::mode'), 'nbUpdate' => update::nbNeedUpdate(), 'version' => jeedom::version(), 'nbMessage' => message::nbMessage(), 'auiKey' => $auiKey, 'jeedom::url' => config::byKey('jeedom::url'), 'ngrok::port' => config::byKey('ngrok::port'));
     if (!filter_var(network::getNetworkAccess('external', 'ip'), FILTER_VALIDATE_IP) && network::getNetworkAccess('external', 'ip') != '') {
         $return['jeedom::url'] = network::getNetworkAccess('internal');
     }
     foreach (plugin::listPlugin(true) as $plugin) {
         if ($plugin->getAllowRemote() == 1) {
             $return['plugin'][] = $plugin->getId();
         }
     }
     $address = isset($params['address']) && $params['address'] != '' ? $params['address'] : getClientIp();
     config::save('jeeNetwork::master::ip', $address);
     config::save('jeeNetwork::master::apikey', $params['apikey_master']);
     config::save('jeeNetwork::slave::id', $params['slave_id']);
     if (config::byKey('internalAddr') == '') {
         config::save('internalAddr', $params['slave_ip']);
     }
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:jeeApi.php

示例3: getJsonRpc

 public static function getJsonRpc()
 {
     if (config::byKey('market::address') == '') {
         throw new Exception(__('Aucune addresse n\'est renseignée pour le market', __FILE__));
     }
     if (config::byKey('market::username') != '' && config::byKey('market::password') != '') {
         $params = array('username' => config::byKey('market::username'), 'password' => config::byKey('market::password'), 'password_type' => 'sha1', 'jeedomversion' => jeedom::version(), 'hwkey' => jeedom::getHardwareKey(), 'addrComplement' => config::byKey('externalComplement'), 'information' => array('nbMessage' => message::nbMessage(), 'hardware' => method_exists('jeedom', 'getHardwareName') ? jeedom::getHardwareName() : ''));
         if (config::byKey('market::allowDNS') != 1) {
             $params['addr'] = config::byKey('externalAddr');
             $params['addrProtocol'] = config::byKey('externalProtocol');
             $params['addrPort'] = config::byKey('externalPort');
         }
         $jsonrpc = new jsonrpcClient(config::byKey('market::address') . '/core/api/api.php', '', $params);
     } else {
         $jsonrpc = new jsonrpcClient(config::byKey('market::address') . '/core/api/api.php', '', array('jeedomversion' => jeedom::version(), 'hwkey' => jeedom::getHardwareKey()));
     }
     $jsonrpc->setCb_class('market');
     $jsonrpc->setCb_function('postJsonRpc');
     return $jsonrpc;
 }
开发者ID:saez0pub,项目名称:core,代码行数:20,代码来源:market.class.php

示例4: dirname

 *
 * You should have received a copy of the GNU General Public License
 * along with Jeedom. If not, see <http://www.gnu.org/licenses/>.
 */
try {
    require_once dirname(__FILE__) . '/../../core/php/core.inc.php';
    include_file('core', 'authentification', 'php');
    if (!isConnect()) {
        throw new Exception(__('401 - Accès non autorisé', __FILE__));
    }
    if (init('action') == 'clearMessage') {
        message::removeAll(init('plugin'));
        ajax::success();
    }
    if (init('action') == 'nbMessage') {
        ajax::success(message::nbMessage());
    }
    if (init('action') == 'all') {
        if (init('plugin') == '') {
            $messages = utils::o2a(message::all());
        } else {
            $messages = utils::o2a(message::byPlugin(init('plugin')));
        }
        foreach ($messages as &$message) {
            $message['message'] = htmlentities($message['message']);
        }
        ajax::success($messages);
    }
    if (init('action') == 'removeMessage') {
        $message = message::byId(init('id'));
        if (!is_object($message)) {
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:message.ajax.php


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