en | fr  | Contact  | Print  | Share

FrameBeurk File

Fmbk/js.php

<?php //FrameBeurk V0.65 Copyright ToolOscope 2016. Licence CeCILL-C.

define('INSTALL_PATH'dirname(__FILE__));
require(
INSTALL_PATH '/Module/Beurk/bootstrap.php');    //configuration et ouverture lien avec la DB

$TRANSAC['Etape'] = 'Js';                                // initialisation de l'action en cours

$TRANSAC['Js'] = array('Module' => 'Beurk');            // module par défaut (utilisé par Beurk_traduit pour les messages de ce controleur)

//nom de la page du Patron renvoyé en GET
if (isset($_GET['Patron']))
    
$Patron $_GET['Patron'];
else
    
$Patron '';

//------------------------- constitution du fichier de javascript ----------------------------
header('content-type: application/javascript');
header('Expires: ' gmdate('D, d M Y H:i:s'time() + $CONFIG['Param']['DureeCacheBrowser']) . ' GMT');    //durée de vie du fichier en cache paramétrée dans bootstrap.php
header('Pragma: cache');
header('Cache-Control: max-age=' $CONFIG['Param']['DureeCacheBrowser']);
header('User-Cache-Control: max-age=' $CONFIG['Param']['DureeCacheBrowser']);

//variables globales javascript
echo 'var URL_REWRITING = ' . (($CONFIG['Param']['UrlReecrite']) ? 'true' 'false') . ";\n",
    
'var URL_PATH = "' Beurk_cheminURL() . '";'"\n";

//fichier javascript associé au Patron
if (($Patron != '') && isset($CONFIG['Patron'][$Patron]) 
        && (
file_exists($fichierJs INSTALL_PATH '/Module/' $CONFIG['Patron'][$Patron]['Module'] . '/_js/patron' $Patron '.js.php'))) {
    include(
$fichierJs);
}
//fichiers javascripts associé aux modules
foreach($CONFIG['Controle']['Module'] as $module) {
    if (
file_exists($fichierJs INSTALL_PATH '/Module/' $module '/_js/module' $module '.js.php')) {
        include(
$fichierJs);
    }
}

//durée de la transaction en commentaire
echo "/* Durée d'éxécution = " . (Beurk_temps(microtime()) - $TRANSAC['Stat']['TsBeurkIni']) . ' ms */';


© 2010-2015 by ToolOscope SASU. © 2016-2018 by Arnaud De Rette. All rights reserved