Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 54 | 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
// +------------------------------------------------------------------------------------------------------+
8
// | This file is part of eFlore-Serveur.                                                                 |
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
/**
26
* Fichier principal du generateur d'eFlore-Serveur
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
31
* Abréviation du programme : EFSE
32
*
33
*@package eFlore-Serveur
34
//Auteur original :
35
*@author        Frédéric LEGENS <flegens@free.fr>
36
//Autres auteurs :
37
*@author        Aucun
38
*@copyright     Tela-Botanica 2000-2004
58 jpm 39
*@version       $Revision: 1.5 $ $Date: 2004-12-23 15:45:48 $
51 fred 40
// +------------------------------------------------------------------------------------------------------+
41
*/
42
 
43
// +------------------------------------------------------------------------------------------------------+
44
// |                                            ENTETE du PROGRAMME                                       |
45
// +------------------------------------------------------------------------------------------------------+
46
 
54 jpm 47
require_once '../configuration/eflore_config_avancee.inc.php';
51 fred 48
 
49
// +------------------------------------------------------------------------------------------------------+
50
// |                                            CORPS du PROGRAMME                                        |
51
// +------------------------------------------------------------------------------------------------------+
52
 
53
header('Content-type: application/vnd.mozilla.xul+xml');
54
echo '<?xml version="1.0" encoding="UTF-8" ?>';
55
echo '<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>'
56
 
57
?>
58
 
59
<!DOCTYPE window>
60
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
61
    <script type="application/x-javascript" src="eflore_generateur.js" />
62
      <hbox flex="1">
63
                <vbox flex="1">
64
                    <label value="Macro Elements"/>
65
                    <listbox id="listemacroelements">
66
                        <?    ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO); ?>
67
                    </listbox>
68
                    <hbox>
69
                        <button label="Tout compiler" onclick="compileSelection('listemacroelements')"/>
70
                        <button label="Afficher" onclick="afficheSelection('listemacroelements')"/>
71
                    </hbox>
72
                </vbox>
73
                <vbox flex="1">
74
                    <label value="Service Donnees"/>
75
                    <listbox id="groupesmacroelements">
76
                        <?    ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE); ?>
77
                    </listbox>
78
                    <hbox>
79
                        <button label="Tout compiler"  onclick="compileSelection('groupesmacroelements')"/>
80
                        <button label="Afficher" onclick="afficheSelection('groupesmacroelements')"/>
81
                    </hbox>
82
                </vbox>
83
                <!--
84
                <vbox flex="1">
85
                    <label value="Publications HTML"/>
86
                    <listbox>
87
                        <?    ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_PUBLI_XHTML); ?>
88
                    </listbox>
89
                    <hbox><button label="Tout compiler"/><button label="Afficher"/></hbox>
90
                </vbox>
91
                <vbox flex="1">
92
                    <label value="Publications XML"/>
93
                    <listbox>
94
                        <?    ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_PUBLI_XML); ?>
95
                    </listbox>
96
                    <hbox><button label="Tout compiler"/><button label="Afficher"/></hbox>
97
                </vbox>
98
                -->
99
      </hbox>
100
      <hbox flex="1" >
101
          <listbox flex="1">
102
              <listcols><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /></listcols>
103
              <listhead><listheader label="Clef"/><listheader label="Service"/><listheader label="Publication"/><listheader label="Schema a respecter"/><listheader label="Ratio de control"/><listheader label="Style"/></listhead>
104
              <? ecrireFichierMap(); ?>
105
          </listbox>
106
      </hbox>
107
</window>
108
 
109
<?
110
 
111
// +------------------------------------------------------------------------------------------------------+
112
// |                                           LISTE de FONCTIONS                                         |
113
// +------------------------------------------------------------------------------------------------------+
114
 
115
function ecrirelisteFichier($chemin)
116
{
117
    $repertoire = openDir($chemin);
118
    while ($fichier = readDir($repertoire)) {
119
        if (($fichier !='.') && ($fichier !='..')) {
120
            echo "<listitem label='$fichier'/>";
121
        }
122
    }
123
    closeDir($repertoire);
124
}
125
 
126
function ecrireFichierMap()
127
{
128
    $fichierServicesMap = fopen(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_FICHIER_MAP, 'r');
129
    $ligne = 0;
130
    while($donnee=fscanf($fichierServicesMap,"%s\t%s\t%s\t%s\t%s\t%s", $keyName, $serviceName, $viewName, $schema, $ratio, $style)) {
131
        $ligne++;
132
        if ($ligne>1) {
133
            echo "<listitem><listcell label='$keyName'/><listcell label='$serviceName'/><listcell label='$viewName'/><listcell label='$schema'/><listcell label='$ratio'/><listcell label='$style'/></listitem>";
134
        }
135
    }
136
    fclose($fichierServicesMap);
137
}
138
 
139
/* +--Fin du code ----------------------------------------------------------------------------------------+
140
*
141
* $Log: not supported by cvs2svn $
58 jpm 142
* Revision 1.4  2004/12/23 15:22:15  jpm
143
* Modification du fichier de config appelé.
144
*
54 jpm 145
* Revision 1.3  2004/12/22 23:29:01  fred
146
* intégration de la license
51 fred 147
*
54 jpm 148
*
51 fred 149
* +-- Fin du code ----------------------------------------------------------------------------------------+
150
*/
151
?>
152