extranet/www/includeheader.php

46 lines
1.3 KiB
PHP

<?php
require_once 'includecss.php';
if($sortie!='prt') require_once 'includejs.php';
$compressoff = false;
$firephp->log($sortie, 'sortie');
/* == Traitement des feuilles de styles == */
if(isset($tabStyles) && count($tabStyles)>0){
foreach($tabStyles as $name => $group){
if( in_array('all', $group['pages']) || in_array($page, $group['pages']) ){
if( ENVIRONNEMENT == 'DEV' || $sortie=='pdf' || $compressoff ){
foreach($group['list'] as $style){
print '<link rel="stylesheet" type="text/css" media="all" href="./css/'.$path_css.$style.'" />';
print "\n";
}
}else{
print '<link rel="stylesheet" type="text/css" media="all" href="'.EXTRANET_URL.'min/?g='.$name.'"/>';
print "\n";
}
}
}
}
/* == Traitement des scripts javascripts == */
$compressoff = false;
if(isset($tabScripts) && count($tabScripts)>0){
foreach($tabScripts as $name => $group){
if(in_array('all', $group['pages']) || in_array($page, $group['pages'])){
if( ENVIRONNEMENT == 'DEV' || $compressoff){
foreach($group['list'] as $script){
print '<script type="text/javascript" src="./js/'.$script.'"></script>';
print "\n";
}
}else{
print '<script type="text/javascript" src="'.EXTRANET_URL.'min/?g='.$name.'"></script>';
print "\n";
}
}
}
}