19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: pap_script.fonct.php,v 1.4 2007-09-06 14:45:06 neiluj Exp $ |
// CVS : $Id: pap_script.fonct.php,v 1.4.2.1 2008-04-16 12:46:38 alexandre_tb Exp $ |
/** |
* Les fonctions permettant d'inclure des scripts. |
* |
35,7 → 35,7 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@author Laurent COUDOUNEAU <lc@gsite.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.4 $ $Date: 2007-09-06 14:45:06 $ |
*@version $Revision: 1.4.2.1 $ $Date: 2008-04-16 12:46:38 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
128,7 → 128,7 |
* @param string le type MIME du langage de script utilisé dans le fichier à insérer. |
* @return void le chemin du fichier est stocké dans une variable (tableau associatif) globale. |
*/ |
function GEN_stockerFichierScript($id_fichier, $chemin_fichier, $type_fichier = 'text/javascript') |
function GEN_stockerFichierScript($id_fichier, $chemin_fichier, $type_fichier = 'text/javascript', $attributs = array()) |
{ |
global $_GEN_commun; |
|
135,6 → 135,7 |
if (empty($_GEN_commun['script_fichier'][$id_fichier])) { |
$_GEN_commun['script_fichier'][$id_fichier]['type'] = $type_fichier; |
$_GEN_commun['script_fichier'][$id_fichier]['chemin'] = $chemin_fichier; |
$_GEN_commun['script_fichier'][$id_fichier]['attributs'] = $attributs; |
} else { |
if (GEN_DEBOGAGE) { |
$_GEN_commun['debogage_info'] .= |
166,7 → 167,9 |
$fichiers = ''; |
if (isset($_GEN_commun['script_fichier'])) { |
while (list($cle, $valeur) = each($_GEN_commun['script_fichier'])) { |
$fichiers .= str_repeat(' ', 8).'<script type="'.$valeur['type'].'" src="'.$valeur['chemin'].'" ></script>'."\n"; |
$fichiers .= str_repeat(' ', 8).'<script type="'.$valeur['type'].'" src="'.$valeur['chemin'].'"'; |
if (is_array ($valeur['attributs'])) foreach ($valeur['attributs'] as $attr => $val) $fichiers .= ' '.$attr.'="'.$val.'"'; |
$fichiers .= '></script>'."\n"; |
} |
$sortie .= $fichiers; |
} else { |
217,6 → 220,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.4 2007-09-06 14:45:06 neiluj |
* ajout de la balise PAPYRUS_BODY_ATTRIBUTS |
* |
* Revision 1.3 2005/02/28 11:12:03 jpm |
* Modification des auteurs. |
* |