Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 94 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 94 Rev 100
1
<?php
1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
3
// +------------------------------------------------------------------------------------------------------+
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 5.0.3                                                                                    |
4
// | PHP version 5.0.3                                                                                    |
5
// +------------------------------------------------------------------------------------------------------+
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
7
// +------------------------------------------------------------------------------------------------------+
8
// | This file is part of Serveur eRibosome.                                                              |
8
// | This file is part of Serveur eRibosome.                                                              |
9
// |                                                                                                      |
9
// |                                                                                                      |
10
// | Foobar is free software; you can redistribute it and/or modify                                       |
10
// | Foobar is free software; you can redistribute it and/or modify                                       |
11
// | it under the terms of the GNU General Public License as published by                                 |
11
// | it under the terms of the GNU General Public License as published by                                 |
12
// | the Free Software Foundation; either version 2 of the License, or                                    |
12
// | the Free Software Foundation; either version 2 of the License, or                                    |
13
// | (at your option) any later version.                                                                  |
13
// | (at your option) any later version.                                                                  |
14
// |                                                                                                      |
14
// |                                                                                                      |
15
// | Foobar is distributed in the hope that it will be useful,                                            |
15
// | Foobar is distributed in the hope that it will be useful,                                            |
16
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
16
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
17
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
17
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
18
// | GNU General Public License for more details.                                                         |
18
// | GNU General Public License for more details.                                                         |
19
// |                                                                                                      |
19
// |                                                                                                      |
20
// | You should have received a copy of the GNU General Public License                                    |
20
// | You should have received a copy of the GNU General Public License                                    |
21
// | along with Foobar; if not, write to the Free Software                                                |
21
// | along with Foobar; if not, write to the Free Software                                                |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
23
// +------------------------------------------------------------------------------------------------------+
23
// +------------------------------------------------------------------------------------------------------+
24
// 
24
// 
25
/**
25
/**
26
* Fichier principal du generateur du serveur eRibosome.
26
* Fichier principal du generateur du serveur eRibosome.
27
*
27
*
28
* Ce fichier presente les macro-elements, groupes de macro-elements, ainsi que
28
* Ce fichier presente les macro-elements, groupes de macro-elements, ainsi que
29
* la map des services disponibles et permet de lancer leurs
29
* la map des services disponibles et permet de lancer leurs
30
* traductions en php
30
* traductions en php
31
* Abréviation du programme : ERIBO
31
* Abréviation du programme : ERIBO
32
*
32
*
33
*@package eRibosome
33
*@package eRibosome
34
*@subpackage Generateur
34
*@subpackage Generateur
35
//Auteur original :
35
//Auteur original :
36
*@author        Frédéric LEGENS <flegens@free.fr>
36
*@author        Frédéric LEGENS <flegens@free.fr>
37
//Autres auteurs :
37
//Autres auteurs :
38
*@author        Aucun
38
*@author        Aucun
39
*@copyright     Tela-Botanica 2000-2004
39
*@copyright     Tela-Botanica 2000-2004
40
*@version       $Revision: 1.1 $ $Date: 2005-01-19 15:44:33 $
40
*@version       $Revision: 1.2 $ $Date: 2005-01-23 22:23:32 $
41
// +------------------------------------------------------------------------------------------------------+
41
// +------------------------------------------------------------------------------------------------------+
42
*/
42
*/
43
 
43
 
44
// +------------------------------------------------------------------------------------------------------+
44
// +------------------------------------------------------------------------------------------------------+
45
// |                                            ENTETE du PROGRAMME                                       |
45
// |                                            ENTETE du PROGRAMME                                       |
46
// +------------------------------------------------------------------------------------------------------+
46
// +------------------------------------------------------------------------------------------------------+
47
 
47
 
48
require_once '../configuration/eribo_config.php';
48
require_once '../configuration/eribo_config.php';
49
require_once '../configuration/eribo_config_avancee.inc.php';
49
require_once '../configuration/eribo_config_avancee.inc.php';
50
header("Content-type: application/vnd.mozilla.xul+xml");
50
header("Content-type: application/vnd.mozilla.xul+xml");
51
echo '<?xml version="1.0" encoding="UTF-8" ?>'; 
51
echo '<?xml version="1.0" encoding="UTF-8" ?>'; 
52
echo '<?xml-stylesheet href="css/style.css" type="text/css"?>';
52
echo '<?xml-stylesheet href="css/style.css" type="text/css"?>';
53
 
53
 
54
// +------------------------------------------------------------------------------------------------------+
54
// +------------------------------------------------------------------------------------------------------+
55
// |                                            CORPS du PROGRAMME                                        |
55
// |                                            CORPS du PROGRAMME                                        |
56
// +------------------------------------------------------------------------------------------------------+
56
// +------------------------------------------------------------------------------------------------------+
57
?>
57
?>
58
<!DOCTYPE window>
58
<!DOCTYPE window>
59
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1">
59
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1">
60
    <script type="application/x-javascript" src="eribo_editeur.js" />
60
    <script type="application/x-javascript" src="eribo_editeur.js" />
61
    <!-- <script type="application/x-javascript" src="eribo_generateur.js" /> -->
61
    <!-- <script type="application/x-javascript" src="eribo_generateur.js" /> -->
62
     <vbox flex="1">
62
     <vbox flex="1">
63
         <tree  id="composants" hidecolumnpicker="true" flex="1" ondblclick="afficherSelection('composants','src','editeur');">
63
         <tree  id="composants" hidecolumnpicker="true" flex="1" ondblclick="afficherSelection('composants','src','editeur');">
64
             <treecols>
64
             <treecols>
65
                 <treecol id="name" label="Elements" flex="1" primary="true"/>
65
                 <treecol id="name" label="Elements" flex="1" primary="true"/>
66
             </treecols>
66
             </treecols>
67
             <treechildren>
67
             <treechildren>
68
                 <treeitem container="true">
68
                 <treeitem container="true">
69
                     <treerow><treecell label="Groupes" src="generateur.html"/></treerow>
69
                     <treerow><treecell label="Groupes" src="generateur.html"/></treerow>
70
                     <treechildren>
70
                     <treechildren>
71
                     <? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE,'groupes_macro_elements'); ?>
71
                     <? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE,'groupes_macro_elements'); ?>
72
                     </treechildren>
72
                     </treechildren>
73
                 </treeitem>
73
                 </treeitem>
74
                 <treeitem container="true">
74
                 <treeitem container="true">
75
                     <treerow><treecell label="Macroelements" src="generateur.html"/></treerow>
75
                     <treerow><treecell label="Macroelements" src="generateur.html"/></treerow>
76
                     <treechildren>
76
                     <treechildren>
77
                     <? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO,'macro_elements'); ?>
77
                     <? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO,'macro_elements'); ?>
78
                     </treechildren>
78
                     </treechildren>
79
                 </treeitem>
79
                 </treeitem>
80
                 <treeitem container="true">
80
                 <treeitem container="true">
81
                     <treerow><treecell label="Map" src="generateur.html"/></treerow>
81
                     <treerow><treecell label="Map" src="generateur.html"/></treerow>
82
                     <treechildren></treechildren>
82
                     <treechildren></treechildren>
83
                 </treeitem>
83
                 </treeitem>
84
             </treechildren>
84
             </treechildren>
85
         </tree>
85
         </tree>
86
        <button label="Compiler macroelements" onclick="compileSelection('listemacroelements')"/>
86
        <button label="Compiler macroelements" onclick="compileSelection('listemacroelements')"/>
87
          <button label="Compiler groupes"  onclick="compileSelection('groupesmacroelements')"/>
87
          <button label="Compiler groupes"  onclick="compileSelection('groupesmacroelements')"/>
88
      </vbox>
88
      </vbox>
89
</window>
89
</window>
90
<?php
90
<?php
91
// +------------------------------------------------------------------------------------------------------+
91
// +------------------------------------------------------------------------------------------------------+
92
// |                                           LISTE de FONCTIONS                                         |
92
// |                                           LISTE de FONCTIONS                                         |
93
// +------------------------------------------------------------------------------------------------------+    
93
// +------------------------------------------------------------------------------------------------------+    
94
function ecrirelisteFichier($chemin, $type)
94
function ecrirelisteFichier($chemin, $type)
95
{
95
{
96
    $repertoire = openDir($chemin);
96
    $repertoire = openDir($chemin);
97
    while ($fichier = readDir($repertoire)) {
97
    while ($fichier = readDir($repertoire)) {
98
        if (($fichier != '.') && ($fichier != '..') && ($fichier != 'CVS')) {
98
        if (($fichier != '.') && ($fichier != '..') && ($fichier != 'CVS')) {
99
            echo '<treeitem><treerow>';
99
            echo '<treeitem><treerow>';
100
            echo '<treecell label="'.$fichier.'" src="../definitions/'.$type.'/'.$fichier.'"/>';
100
            //echo '<treecell label="'.$fichier.'" src="../definitions/'.$type.'/'.$fichier.'"/>';
-
 
101
            echo '<treecell label="'.$fichier.'" src="eribo_afficher.php?'.$type.'='.$fichier.'"/>';
101
            echo '</treerow></treeitem>';
102
            echo '</treerow></treeitem>';
102
        }
103
        }
103
    }
104
    }
104
    closeDir($repertoire);
105
    closeDir($repertoire);
105
}
106
}
106
 
107
 
107
function ecrireFichierMap()
108
function ecrireFichierMap()
108
{
109
{
109
    $fichierServicesMap = fopen('..\\'.$appConfig['service_map'], 'r');
110
    $fichierServicesMap = fopen('..\\'.$appConfig['service_map'], 'r');
110
    $ligne = 0;
111
    $ligne = 0;
111
    while($donnee = fscanf($fichierServicesMap,"%s\t%s\t%s\t%s\t%s\t%s", $keyName, $serviceName, $viewName, $schema, $ratio, $style)) {
112
    while($donnee = fscanf($fichierServicesMap,"%s\t%s\t%s\t%s\t%s\t%s", $keyName, $serviceName, $viewName, $schema, $ratio, $style)) {
112
        $ligne++;
113
        $ligne++;
113
        if ($ligne > 1) {
114
        if ($ligne > 1) {
114
            echo    '<listitem><listcell label="'.$keyName.'"/><listcell label="'.$serviceName.'"/>'.
115
            echo    '<listitem><listcell label="'.$keyName.'"/><listcell label="'.$serviceName.'"/>'.
115
                    '<listcell label="'.$viewName.'"/><listcell label="'.$schema.'"/><listcell label="'.$ratio.'"/>'.
116
                    '<listcell label="'.$viewName.'"/><listcell label="'.$schema.'"/><listcell label="'.$ratio.'"/>'.
116
                    '<listcell label="'.$style.'"/></listitem>';
117
                    '<listcell label="'.$style.'"/></listitem>';
117
        }
118
        }
118
    }
119
    }
119
    fclose($fichierServicesMap);
120
    fclose($fichierServicesMap);
120
}
121
}
121
 
122
 
122
/* +--Fin du code ----------------------------------------------------------------------------------------+
123
/* +--Fin du code ----------------------------------------------------------------------------------------+
123
*
124
*
124
* $Log: not supported by cvs2svn $
125
* $Log: not supported by cvs2svn $
-
 
126
* Revision 1.1  2005/01/19 15:44:33  jpm
-
 
127
* Changement de nom.
-
 
128
*
125
* Revision 1.4  2005/01/19 15:43:40  jpm
129
* Revision 1.4  2005/01/19 15:43:40  jpm
126
* Changement de nom des fichiers à appeler.
130
* Changement de nom des fichiers à appeler.
127
*
131
*
128
* Revision 1.3  2004/12/23 15:45:48  jpm
132
* Revision 1.3  2004/12/23 15:45:48  jpm
129
* Changement de version de PHP.
133
* Changement de version de PHP.
130
*
134
*
131
* Revision 1.2  2004/12/23 15:43:37  jpm
135
* Revision 1.2  2004/12/23 15:43:37  jpm
132
* Mise en conformité convention de codage.
136
* Mise en conformité convention de codage.
133
*
137
*
134
* Revision 1.1  2004/12/22 23:28:47  fred
138
* Revision 1.1  2004/12/22 23:28:47  fred
135
* création de l'éditeur
139
* création de l'éditeur
136
*
140
*
137
*
141
*
138
* +-- Fin du code ----------------------------------------------------------------------------------------+
142
* +-- Fin du code ----------------------------------------------------------------------------------------+
139
*/
143
*/
140
?>
144
?>