Subversion Repositories eFlore/Archives.eflore-consultation-v2

Compare Revisions

Ignore whitespace Rev 93 → Rev 94

/trunk/serveur/generateur/eflore_editeur.php
File deleted
\ No newline at end of file
/trunk/serveur/generateur/eflore_generateur.php
File deleted
/trunk/serveur/generateur/eflore_traducteur.php
File deleted
\ No newline at end of file
/trunk/serveur/generateur/eflore_editeur.js
File deleted
/trunk/serveur/generateur/eflore_generateur.js
File deleted
\ No newline at end of file
/trunk/serveur/generateur/eflore_afficher.php
File deleted
\ No newline at end of file
/trunk/serveur/generateur/eribo_editeur.php
New file
0,0 → 1,140
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 5.0.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Serveur eRibosome. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
//
/**
* Fichier principal du generateur du serveur eRibosome.
*
* Ce fichier presente les macro-elements, groupes de macro-elements, ainsi que
* la map des services disponibles et permet de lancer leurs
* traductions en php
* Abréviation du programme : ERIBO
*
*@package eRibosome
*@subpackage Generateur
//Auteur original :
*@author Frédéric LEGENS <flegens@free.fr>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-01-19 15:44:33 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
require_once '../configuration/eribo_config.php';
require_once '../configuration/eribo_config_avancee.inc.php';
header("Content-type: application/vnd.mozilla.xul+xml");
echo '<?xml version="1.0" encoding="UTF-8" ?>';
echo '<?xml-stylesheet href="css/style.css" type="text/css"?>';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
?>
<!DOCTYPE window>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1">
<script type="application/x-javascript" src="eribo_editeur.js" />
<!-- <script type="application/x-javascript" src="eribo_generateur.js" /> -->
<vbox flex="1">
<tree id="composants" hidecolumnpicker="true" flex="1" ondblclick="afficherSelection('composants','src','editeur');">
<treecols>
<treecol id="name" label="Elements" flex="1" primary="true"/>
</treecols>
<treechildren>
<treeitem container="true">
<treerow><treecell label="Groupes" src="generateur.html"/></treerow>
<treechildren>
<? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE,'groupes_macro_elements'); ?>
</treechildren>
</treeitem>
<treeitem container="true">
<treerow><treecell label="Macroelements" src="generateur.html"/></treerow>
<treechildren>
<? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO,'macro_elements'); ?>
</treechildren>
</treeitem>
<treeitem container="true">
<treerow><treecell label="Map" src="generateur.html"/></treerow>
<treechildren></treechildren>
</treeitem>
</treechildren>
</tree>
<button label="Compiler macroelements" onclick="compileSelection('listemacroelements')"/>
<button label="Compiler groupes" onclick="compileSelection('groupesmacroelements')"/>
</vbox>
</window>
<?php
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
function ecrirelisteFichier($chemin, $type)
{
$repertoire = openDir($chemin);
while ($fichier = readDir($repertoire)) {
if (($fichier != '.') && ($fichier != '..') && ($fichier != 'CVS')) {
echo '<treeitem><treerow>';
echo '<treecell label="'.$fichier.'" src="../definitions/'.$type.'/'.$fichier.'"/>';
echo '</treerow></treeitem>';
}
}
closeDir($repertoire);
}
 
function ecrireFichierMap()
{
$fichierServicesMap = fopen('..\\'.$appConfig['service_map'], 'r');
$ligne = 0;
while($donnee = fscanf($fichierServicesMap,"%s\t%s\t%s\t%s\t%s\t%s", $keyName, $serviceName, $viewName, $schema, $ratio, $style)) {
$ligne++;
if ($ligne > 1) {
echo '<listitem><listcell label="'.$keyName.'"/><listcell label="'.$serviceName.'"/>'.
'<listcell label="'.$viewName.'"/><listcell label="'.$schema.'"/><listcell label="'.$ratio.'"/>'.
'<listcell label="'.$style.'"/></listitem>';
}
}
fclose($fichierServicesMap);
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2005/01/19 15:43:40 jpm
* Changement de nom des fichiers à appeler.
*
* Revision 1.3 2004/12/23 15:45:48 jpm
* Changement de version de PHP.
*
* Revision 1.2 2004/12/23 15:43:37 jpm
* Mise en conformité convention de codage.
*
* Revision 1.1 2004/12/22 23:28:47 fred
* création de l'éditeur
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/generateur/eribo_generateur.php
New file
0,0 → 1,159
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 5.0.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Serveur eRibosome. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
//
/**
* Fichier principal du generateur du serveur eRibosome.
*
* Ce fichier presente les macro-elements, groupes de macro-elements, ainsi que
* la map des services disponibles et permet de lancer leurs
* traductions en php
* Abréviation du programme : ERIBO
*
*@package eRibosome
*@subpackage Generateur
//Auteur original :
*@author Frédéric LEGENS <flegens@free.fr>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-01-19 15:45:02 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
require_once '../configuration/eribo_config_avancee.inc.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
header('Content-type: application/vnd.mozilla.xul+xml');
echo '<?xml version="1.0" encoding="UTF-8" ?>';
echo '<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>'
 
?>
 
<!DOCTYPE window>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
<script type="application/x-javascript" src="eribo_generateur.js" />
<hbox flex="1">
<vbox flex="1">
<label value="Macro Elements"/>
<listbox id="listemacroelements">
<? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO); ?>
</listbox>
<hbox>
<button label="Tout compiler" onclick="compileSelection('listemacroelements')"/>
<button label="Afficher" onclick="afficheSelection('listemacroelements')"/>
</hbox>
</vbox>
<vbox flex="1">
<label value="Service Donnees"/>
<listbox id="groupesmacroelements">
<? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE); ?>
</listbox>
<hbox>
<button label="Tout compiler" onclick="compileSelection('groupesmacroelements')"/>
<button label="Afficher" onclick="afficheSelection('groupesmacroelements')"/>
</hbox>
</vbox>
<!--
<vbox flex="1">
<label value="Publications HTML"/>
<listbox>
<? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_PUBLI_XHTML); ?>
</listbox>
<hbox><button label="Tout compiler"/><button label="Afficher"/></hbox>
</vbox>
<vbox flex="1">
<label value="Publications XML"/>
<listbox>
<? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_PUBLI_XML); ?>
</listbox>
<hbox><button label="Tout compiler"/><button label="Afficher"/></hbox>
</vbox>
-->
</hbox>
<hbox flex="1" >
<listbox flex="1">
<listcols><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /></listcols>
<listhead><listheader label="Clef"/><listheader label="Service"/><listheader label="Publication"/><listheader label="Schema a respecter"/><listheader label="Ratio de control"/><listheader label="Style"/></listhead>
<? ecrireFichierMap(); ?>
</listbox>
</hbox>
</window>
 
<?
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
function ecrirelisteFichier($chemin)
{
$repertoire = openDir($chemin);
while ($fichier = readDir($repertoire)) {
if (($fichier !='.') && ($fichier !='..')) {
echo '<listitem label="'.$fichier.'"/>';
}
}
closeDir($repertoire);
}
 
function ecrireFichierMap()
{
$fichierServicesMap = fopen(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_FICHIER_MAP, 'r');
$ligne = 0;
while($donnee = fscanf($fichierServicesMap,"%s\t%s\t%s\t%s\t%s\t%s", $keyName, $serviceName, $viewName, $schema, $ratio, $style)) {
$ligne++;
if ($ligne > 1) {
echo '<listitem><listcell label="'.$keyName.'"/><listcell label="'.$serviceName.'"/><listcell label="'.$viewName.'"/><listcell label="'.$schema.'"/><listcell label="'.$ratio.'"/><listcell label="'.$style.'"/></listitem>';
}
}
fclose($fichierServicesMap);
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.6 2005/01/19 15:43:40 jpm
* Changement de nom des fichiers à appeler.
*
* Revision 1.5 2004/12/23 15:45:48 jpm
* Changement de version de PHP.
*
* Revision 1.4 2004/12/23 15:22:15 jpm
* Modification du fichier de config appelé.
*
* Revision 1.3 2004/12/22 23:29:01 fred
* intégration de la license
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
 
/trunk/serveur/generateur/eribo_traducteur.php
New file
0,0 → 1,135
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 5.0.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Serveur eRibosome. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
//
/**
* Fichier de traduction des définitions en php.
*
* Ce fichier permet de transformer la définition d'un macro-element ou d'un
* groupe de macro-elements en code php.
*
* Abréviation du programme : ERIBO
*
*@package eRibosome
*@subpackage Generateur
//Auteur original :
*@author Frédéric LEGENS <flegens@free.fr>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-01-19 15:45:16 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
require_once '../configuration/eribo_config.php';
require_once '../configuration/eribo_config_avancee.inc.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
if(!empty($_REQUEST['listemacroelements']))
{
genererTousMacroElements(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO);
//genererTousMacroElements('..\\'.$appConfig['def_macro']);
}
 
if(!empty($_REQUEST['groupesmacroelements']))
{
genererTousGroupesMacroElements(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE);
//genererTousGroupesMacroElements('..\\'.$appConfig['def_groupes']);
}
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
function genererTousGroupesMacroElements($chemin)
{
$repertoire = openDir($chemin);
while ($fichier = readDir($repertoire)) {
if (($fichier != '.') && ($fichier != '..') && ($fichier != 'CVS')) {
echo '<li>'.$fichier.' début de la génération';
$res = EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_MV_MACRO_GROUPE.$fichier.'.php';
genererFichier(EFSE_CHEMIN_GENE_XSLT.'groupemacroelement.xslt', $chemin.$fichier, $res);
echo 'Fin de la génération';
}
}
closeDir($repertoire);
}
 
function genererTousMacroElements($chemin)
{
$repertoire = openDir($chemin);
while ($fichier = readDir($repertoire)) {
if (($fichier != '.') && ($fichier != '..') && ($fichier != 'CVS')) {
echo '<li>'.$fichier.' début de la génération';
$res = EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_MV_MACRO.$fichier.'.php';
genererFichier(EFSE_CHEMIN_GENE_XSLT.'macroelement.xslt',$chemin.$fichier,$res);
echo 'Fin de la génération';
}
}
closeDir($repertoire);
}
 
function genererFichier($xsltFilePath, $xmlFilePath, $resFilePath)
{
$processeur = new XSLTprocessor();
$style = new domDocument();
$style->load($xsltFilePath);
$processeur->importStyleSheet($style);
$doc = new domDocument();
$doc->load($xmlFilePath);
$handle = fopen ($resFilePath, 'w');
fwrite($handle, $processeur->transformToXML($doc));
fclose($handle);
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.5 2005/01/19 15:43:40 jpm
* Changement de nom des fichiers à appeler.
*
* Revision 1.4 2004/12/23 15:45:48 jpm
* Changement de version de PHP.
*
* Revision 1.3 2004/12/23 15:21:48 jpm
* Mise en conformité convention de codage.
*
* Revision 1.2 2004/12/22 23:29:15 fred
* intégration de la license
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/serveur/generateur/eribo_editeur.js
New file
0,0 → 1,27
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
 
function afficherSelection(aTreeChildrenId, aAttributeName, aTabBrowserId)
{
var uneUrl = donnerAttributSelectionArbre(aTreeChildrenId, aAttributeName);
window.parent.frames[1].location.href = uneUrl;
}
 
 
function donnerAttributSelectionArbre(aTreeChildrenId, aAttributeName)
{
var unArbre = document.getElementById(aTreeChildrenId);
var uneSelection = unArbre.contentView.getItemAtIndex(unArbre.currentIndex);
var uneUrl;
if (uneSelection.firstChild.firstChild.hasAttribute(aAttributeName))
{
uneUrl = uneSelection.firstChild.firstChild.getAttribute(aAttributeName);
}
return uneUrl;
}
 
function compileSelection(listid)
{
window.parent.frames[1].location.href="eribo_traducteur.php?"+listid+"="+listid;
}
/trunk/serveur/generateur/eribo_generateur.js
New file
0,0 → 1,10
function afficheSelection(listid)
{
var liste = document.getElementById(listid);
window.location.assign("http://eflore-test.tela-botanica.org/serveurXML/generateur/eribo_afficher.php?"+listid+"="+liste.selectedItem.label);
}
 
function compileSelection(listid)
{
window.location.assign("http://eflore-test.tela-botanica.org/serveurXML/generateur/eribo_traducteur.php?"+listid+"="+listid);
}
/trunk/serveur/generateur/eribo_afficher.php
New file
0,0 → 1,101
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 5.0.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Serveur eRibosome. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
//
/**
* Fichier permmetant d'afficher les sources.
*
* Ce fichier permet d'afficher le code source d'un macro-element ou d'un groupe
* de macro-elements
*
* Abréviation du programme : ERIBO
*
*@package eRibosome
*@subpackage Generateur
//Auteur original :
*@author Frédéric LEGENS <flegens@free.fr>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-01-19 15:44:03 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
require_once '../configuration/eribo_config.php';
require_once '../configuration/eribo_config_avancee.inc.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
header('Content-type: text/xml');
if (!empty($_REQUEST['listemacroelements'])) {
$nom = EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO.$_REQUEST['listemacroelements'];
$file = fopen($nom, 'r');
$taille = fileSize($nom);
$lecture = fread($file,$taille);
fclose($file);
echo $lecture;
}
 
if (!empty($_REQUEST['groupesmacroelements'])) {
$nom = EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE.$_REQUEST['groupesmacroelements'];
$file = fopen($nom, 'r');
$taille = fileSize($nom);
$lecture = fread($file, $taille);
fclose($file);
echo $lecture;
}
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.7 2005/01/19 15:43:40 jpm
* Changement de nom des fichiers à appeler.
*
* Revision 1.6 2004/12/23 15:45:48 jpm
* Changement de version de PHP.
*
* Revision 1.5 2004/12/23 15:44:57 jpm
* Mise en conformité convention de codage.
*
* Revision 1.4 2004/12/23 15:22:15 jpm
* Modification du fichier de config appelé.
*
* Revision 1.3 2004/12/22 23:28:14 fred
* intégration de la license
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>