Ejemplo n.º 1
0
 * 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'];
?>
">
Ejemplo n.º 2
0
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.