Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 58 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
51 fred 1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +------------------------------------------------------------------------------------------------------+
58 jpm 4
// | PHP version 5.0.3                                                                                    |
51 fred 5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
93 jpm 8
// | This file is part of Serveur eRibosome.                                                              |
51 fred 9
// |                                                                                                      |
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                                 |
12
// | the Free Software Foundation; either version 2 of the License, or                                    |
13
// | (at your option) any later version.                                                                  |
14
// |                                                                                                      |
15
// | Foobar is distributed in the hope that it will be useful,                                            |
16
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
17
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
18
// | GNU General Public License for more details.                                                         |
19
// |                                                                                                      |
20
// | You should have received a copy of the GNU General Public License                                    |
21
// | along with Foobar; if not, write to the Free Software                                                |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
23
// +------------------------------------------------------------------------------------------------------+
24
//
25
/**
93 jpm 26
* Fichier principal du generateur du serveur eRibosome.
51 fred 27
*
28
* Ce fichier presente les macro-elements, groupes de macro-elements, ainsi que
29
* la map des services disponibles et permet de lancer leurs
30
* traductions en php
93 jpm 31
* Abréviation du programme : ERIBO
51 fred 32
*
93 jpm 33
*@package eRibosome
34
*@subpackage Generateur
51 fred 35
//Auteur original :
36
*@author        Frédéric LEGENS <flegens@free.fr>
37
//Autres auteurs :
38
*@author        Aucun
39
*@copyright     Tela-Botanica 2000-2004
93 jpm 40
*@version       $Revision: 1.6 $ $Date: 2005-01-19 15:43:40 $
51 fred 41
// +------------------------------------------------------------------------------------------------------+
42
*/
43
 
44
// +------------------------------------------------------------------------------------------------------+
45
// |                                            ENTETE du PROGRAMME                                       |
46
// +------------------------------------------------------------------------------------------------------+
47
 
93 jpm 48
require_once '../configuration/eribo_config_avancee.inc.php';
51 fred 49
 
50
// +------------------------------------------------------------------------------------------------------+
51
// |                                            CORPS du PROGRAMME                                        |
52
// +------------------------------------------------------------------------------------------------------+
53
 
54
header('Content-type: application/vnd.mozilla.xul+xml');
55
echo '<?xml version="1.0" encoding="UTF-8" ?>';
56
echo '<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>'
57
 
58
?>
59
 
60
<!DOCTYPE window>
61
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
93 jpm 62
    <script type="application/x-javascript" src="eribo_generateur.js" />
51 fred 63
      <hbox flex="1">
64
                <vbox flex="1">
65
                    <label value="Macro Elements"/>
66
                    <listbox id="listemacroelements">
67
                        <?    ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO); ?>
68
                    </listbox>
69
                    <hbox>
70
                        <button label="Tout compiler" onclick="compileSelection('listemacroelements')"/>
71
                        <button label="Afficher" onclick="afficheSelection('listemacroelements')"/>
72
                    </hbox>
73
                </vbox>
74
                <vbox flex="1">
75
                    <label value="Service Donnees"/>
76
                    <listbox id="groupesmacroelements">
77
                        <?    ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE); ?>
78
                    </listbox>
79
                    <hbox>
80
                        <button label="Tout compiler"  onclick="compileSelection('groupesmacroelements')"/>
81
                        <button label="Afficher" onclick="afficheSelection('groupesmacroelements')"/>
82
                    </hbox>
83
                </vbox>
84
                <!--
85
                <vbox flex="1">
86
                    <label value="Publications HTML"/>
87
                    <listbox>
88
                        <?    ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_PUBLI_XHTML); ?>
89
                    </listbox>
90
                    <hbox><button label="Tout compiler"/><button label="Afficher"/></hbox>
91
                </vbox>
92
                <vbox flex="1">
93
                    <label value="Publications XML"/>
94
                    <listbox>
95
                        <?    ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_PUBLI_XML); ?>
96
                    </listbox>
97
                    <hbox><button label="Tout compiler"/><button label="Afficher"/></hbox>
98
                </vbox>
99
                -->
100
      </hbox>
101
      <hbox flex="1" >
102
          <listbox flex="1">
103
              <listcols><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /></listcols>
104
              <listhead><listheader label="Clef"/><listheader label="Service"/><listheader label="Publication"/><listheader label="Schema a respecter"/><listheader label="Ratio de control"/><listheader label="Style"/></listhead>
105
              <? ecrireFichierMap(); ?>
106
          </listbox>
107
      </hbox>
108
</window>
109
 
110
<?
111
 
112
// +------------------------------------------------------------------------------------------------------+
113
// |                                           LISTE de FONCTIONS                                         |
114
// +------------------------------------------------------------------------------------------------------+
115
 
116
function ecrirelisteFichier($chemin)
117
{
118
    $repertoire = openDir($chemin);
119
    while ($fichier = readDir($repertoire)) {
120
        if (($fichier !='.') && ($fichier !='..')) {
93 jpm 121
            echo '<listitem label="'.$fichier.'"/>';
51 fred 122
        }
123
    }
124
    closeDir($repertoire);
125
}
126
 
127
function ecrireFichierMap()
128
{
129
    $fichierServicesMap = fopen(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_FICHIER_MAP, 'r');
130
    $ligne = 0;
93 jpm 131
    while($donnee = fscanf($fichierServicesMap,"%s\t%s\t%s\t%s\t%s\t%s", $keyName, $serviceName, $viewName, $schema, $ratio, $style)) {
51 fred 132
        $ligne++;
93 jpm 133
        if ($ligne > 1) {
134
            echo '<listitem><listcell label="'.$keyName.'"/><listcell label="'.$serviceName.'"/><listcell label="'.$viewName.'"/><listcell label="'.$schema.'"/><listcell label="'.$ratio.'"/><listcell label="'.$style.'"/></listitem>';
51 fred 135
        }
136
    }
137
    fclose($fichierServicesMap);
138
}
139
 
140
/* +--Fin du code ----------------------------------------------------------------------------------------+
141
*
142
* $Log: not supported by cvs2svn $
93 jpm 143
* Revision 1.5  2004/12/23 15:45:48  jpm
144
* Changement de version de PHP.
145
*
58 jpm 146
* Revision 1.4  2004/12/23 15:22:15  jpm
147
* Modification du fichier de config appelé.
148
*
54 jpm 149
* Revision 1.3  2004/12/22 23:29:01  fred
150
* intégration de la license
51 fred 151
*
54 jpm 152
*
51 fred 153
* +-- Fin du code ----------------------------------------------------------------------------------------+
154
*/
155
?>
156