當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Globals::setGlobals方法代碼示例

本文整理匯總了PHP中Globals::setGlobals方法的典型用法代碼示例。如果您正苦於以下問題:PHP Globals::setGlobals方法的具體用法?PHP Globals::setGlobals怎麽用?PHP Globals::setGlobals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Globals的用法示例。


在下文中一共展示了Globals::setGlobals方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: die

 * modified: Ernesto J Rodriguez (Certun)
 *
 * @namespace Ext.mitos.data.REMOTING_API
 */
if (!defined('_MitosEXEC')) {
    die('No direct access allowed.');
}
/**
 * Reset session flop count
 */
$_SESSION['site']['flops'] = 0;
/*
 * Include Globals and run setGlobals static method to set the global settings
 */
include_once $_SESSION['site']['root'] . '/classes/Globals.php';
Globals::setGlobals();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title><?php 
echo $_SESSION['global_settings']['mitosehr_name'];
?>
</title>
<!--test stuff-->
<link rel="stylesheet" type="text/css" href="ui_app/dashboard.css" >
<!--end test stuff-->
<link rel="stylesheet" type="text/css" href="themes/resources/css/<?php 
echo $_SESSION['global_settings']['css_header'];
?>
">
開發者ID:ameenalvi,項目名稱:MitosEHR-Official,代碼行數:31,代碼來源:index.php

示例2: dirname

require_once dirname(__FILE__) . '/classes/MatchaHelper.php';
include_once dirname(__FILE__) . '/dataProvider/i18nRouter.php';
include_once dirname(__FILE__) . '/dataProvider/Globals.php';
header('Content-Type: text/javascript');
// check if is emergency access....
if (isset($_SESSION['user']) && isset($_SESSION['user']['emergencyAccess']) && $_SESSION['user']['emergencyAccess']) {
    $isEmerAccess = 1;
} else {
    $isEmerAccess = 0;
}
print 'isEmerAccess = ' . $isEmerAccess . ';';
// Output the translation selected by the user.
$i18n = i18nRouter::getTranslation();
print 'lang = ' . json_encode($i18n) . ';';
// Output all the globals settings on the database.
$global = Globals::setGlobals();
$global['root'] = ROOT;
$global['url'] = URL;
$global['host'] = HOST;
$global['site'] = site_dir;
print 'globals = ' . json_encode($global) . ';';
if (!isset($_SESSION['site']['error']) && (isset($_SESSION['user']) && $_SESSION['user']['auth'] == true)) {
    include_once dirname(__FILE__) . '/dataProvider/ACL.php';
    include_once dirname(__FILE__) . '/dataProvider/Facilities.php';
    include_once dirname(__FILE__) . '/dataProvider/User.php';
    $ACL = new ACL();
    $perms = array();
    /*
     * Look for user permissions and pass it to a PHP variable.
     * This variable will be used in JavaScript code
     * look at it as a PHP to JavaScript variable conversion.
開發者ID:songhongji,項目名稱:gaiaehr,代碼行數:31,代碼來源:JSrouter.php


注:本文中的Globals::setGlobals方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。