Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 30 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 30 Rev 51
Line 1... Line 1...
1
<?php
1
<?php
-
 
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
-
 
3
// +------------------------------------------------------------------------------------------------------+
-
 
4
// | PHP version 5.0                                                                                     |
-
 
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
-
 
39
*@version       $Revision: 1.3 $ $Date: 2004-12-22 23:29:01 $
-
 
40
// +------------------------------------------------------------------------------------------------------+
-
 
41
*/
-
 
42
 
-
 
43
// +------------------------------------------------------------------------------------------------------+
-
 
44
// |                                            ENTETE du PROGRAMME                                       |
-
 
45
// +------------------------------------------------------------------------------------------------------+
-
 
46
 
2
require_once '../configuration/eflore_config.php';
47
require_once '../configuration/eflore_config.php';
3
 
-
 
4
header('Content-type: application/vnd.mozilla.xul+xml');
-
 
5
echo '<?xml version="1.0" encoding="UTF-8" ?>'; 
-
 
6
echo '<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>';
-
 
7
 
-
 
8
function ecrirelisteFichier($chemin)
-
 
9
{
-
 
10
    $repertoire = openDir($chemin);
-
 
11
    while ($fichier = readDir($repertoire)) {
-
 
12
        if (($fichier !='.') && ($fichier !='..')) {
-
 
13
            echo "<listitem label='$fichier'/>";
-
 
14
        }
-
 
15
    }
-
 
16
    closeDir($repertoire);
-
 
17
}
-
 
18
 
-
 
19
function ecrireFichierMap()
-
 
20
{
-
 
21
    $fichierServicesMap = fopen(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_FICHIER_MAP, 'r');
-
 
22
    $ligne = 0;
-
 
23
    while($donnee=fscanf($fichierServicesMap,"%s\t%s\t%s\t%s\t%s\t%s", $keyName, $serviceName, $viewName, $schema, $ratio, $style)) {
-
 
24
        $ligne++;
-
 
25
        if ($ligne>1) {
-
 
26
            echo "<listitem><listcell label='$keyName'/><listcell label='$serviceName'/><listcell label='$viewName'/><listcell label='$schema'/><listcell label='$ratio'/><listcell label='$style'/></listitem>";
-
 
27
        }
-
 
28
    }
-
 
29
    fclose($fichierServicesMap);
-
 
30
}
-
 
31
?>
-
 
32
 
-
 
33
<!DOCTYPE window>
-
 
34
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
-
 
35
    <script type="application/x-javascript" src="eflore_generateur.js" />
-
 
36
      <hbox flex="1">
-
 
37
                <vbox flex="1">
-
 
38
                    <label value="Macro Elements"/>
-
 
39
                    <listbox id="listemacroelements">
-
 
40
                        <?    ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO); ?>
-
 
41
                    </listbox>
-
 
42
                    <hbox>
-
 
43
                        <button label="Tout compiler" onclick="compileSelection('listemacroelements')"/>
-
 
44
                        <button label="Afficher" onclick="afficheSelection('listemacroelements')"/>
-
 
45
                    </hbox>
-
 
46
                </vbox>
-
 
47
                <vbox flex="1">
-
 
48
                    <label value="Service Donnees"/>
-
 
49
                    <listbox id="groupesmacroelements">
-
 
50
                        <?    ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE); ?>
-
 
51
                    </listbox>
-
 
52
                    <hbox>
-
 
53
                        <button label="Tout compiler"  onclick="compileSelection('groupesmacroelements')"/>
-
 
54
                        <button label="Afficher" onclick="afficheSelection('groupesmacroelements')"/>
-
 
55
                    </hbox>
-
 
56
                </vbox>
-
 
57
                <vbox flex="1">
-
 
58
                    <label value="Publications HTML"/>
-
 
59
                    <listbox>
-
 
60
                        <?    ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_PUBLI_XHTML); ?>
-
 
61
                    </listbox>
-
 
62
                    <hbox><button label="Tout compiler"/><button label="Afficher"/></hbox>
-
 
63
                </vbox>
-
 
64
                <vbox flex="1">
-
 
65
                    <label value="Publications XML"/>
-
 
66
                    <listbox>
-
 
67
                        <?    ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_PUBLI_XML); ?>
-
 
68
                    </listbox>
-
 
69
                    <hbox><button label="Tout compiler"/><button label="Afficher"/></hbox>
-
 
70
                </vbox>
-
 
71
      </hbox>
-
 
72
      <hbox flex="1" >
-
 
73
          <listbox flex="1">
-
 
74
              <listcols><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /></listcols>
-
 
75
              <listhead><listheader label="Clef"/><listheader label="Service"/><listheader label="Publication"/><listheader label="Schema a respecter"/><listheader label="Ratio de control"/><listheader label="Style"/></listhead>
-
 
76
              <? ecrireFichierMap(); ?>
-
 
77
          </listbox>
-
 
78
      </hbox>
-
 
79
</window>
-
 
80
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 $
-
 
142
*
-
 
143
* +-- Fin du code ----------------------------------------------------------------------------------------+
-
 
144
*/
-
 
145
?>
-
 
146
 
-
 
147