52 |
fred |
1 |
<?
|
|
|
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.1 $ $Date: 2004-12-22 23:28:47 $
|
|
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
41 |
*/
|
|
|
42 |
|
|
|
43 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
44 |
// | ENTETE du PROGRAMME |
|
|
|
45 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
46 |
|
|
|
47 |
require_once '../configuration/eflore_config.php';
|
|
|
48 |
require_once '../configuration/eflore_config_avancee.inc.php';
|
|
|
49 |
header("Content-type: application/vnd.mozilla.xul+xml");
|
|
|
50 |
echo '<?xml version="1.0" encoding="UTF-8" ?>';
|
|
|
51 |
echo '<?xml-stylesheet href="css/style.css" type="text/css"?>';
|
|
|
52 |
|
|
|
53 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
54 |
// | CORPS du PROGRAMME |
|
|
|
55 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
56 |
?>
|
|
|
57 |
<!DOCTYPE window>
|
|
|
58 |
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1">
|
|
|
59 |
<script type="application/x-javascript" src="eflore_editeur.js" />
|
|
|
60 |
<!-- <script type="application/x-javascript" src="eflore_generateur.js" /> -->
|
|
|
61 |
<vbox flex="1">
|
|
|
62 |
<tree id="composants" hidecolumnpicker="true" flex="1" ondblclick="afficherSelection('composants','src','editeur');">
|
|
|
63 |
<treecols>
|
|
|
64 |
<treecol id="name" label="Elements" flex="1" primary="true"/>
|
|
|
65 |
</treecols>
|
|
|
66 |
<treechildren>
|
|
|
67 |
<treeitem container="true">
|
|
|
68 |
<treerow><treecell label="Groupes" src="generateur.html"/></treerow>
|
|
|
69 |
<treechildren>
|
|
|
70 |
<? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE,'groupes_macro_elements'); ?>
|
|
|
71 |
</treechildren>
|
|
|
72 |
</treeitem>
|
|
|
73 |
<treeitem container="true">
|
|
|
74 |
<treerow><treecell label="Macroelements" src="generateur.html"/></treerow>
|
|
|
75 |
<treechildren>
|
|
|
76 |
<? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO,'macro_elements'); ?>
|
|
|
77 |
</treechildren>
|
|
|
78 |
</treeitem>
|
|
|
79 |
<treeitem container="true">
|
|
|
80 |
<treerow><treecell label="Map" src="generateur.html"/></treerow>
|
|
|
81 |
<treechildren></treechildren>
|
|
|
82 |
</treeitem>
|
|
|
83 |
</treechildren>
|
|
|
84 |
</tree>
|
|
|
85 |
<button label="Compiler macroelements" onclick="compileSelection('listemacroelements')"/>
|
|
|
86 |
<button label="Compiler groupes" onclick="compileSelection('groupesmacroelements')"/>
|
|
|
87 |
</vbox>
|
|
|
88 |
</window>
|
|
|
89 |
<?
|
|
|
90 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
91 |
// | LISTE de FONCTIONS |
|
|
|
92 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
93 |
function ecrirelisteFichier($chemin,$type)
|
|
|
94 |
{
|
|
|
95 |
$repertoire = openDir($chemin);
|
|
|
96 |
while ($fichier = readDir($repertoire))
|
|
|
97 |
{
|
|
|
98 |
if (($fichier !='.') && ($fichier !='..') && ($fichier!='CVS'))
|
|
|
99 |
{
|
|
|
100 |
echo "<treeitem><treerow>";
|
|
|
101 |
echo "<treecell label='$fichier' src='../definitions/$type/$fichier'/>";
|
|
|
102 |
echo "</treerow></treeitem>";
|
|
|
103 |
}
|
|
|
104 |
}
|
|
|
105 |
closeDir($repertoire);
|
|
|
106 |
}
|
|
|
107 |
|
|
|
108 |
|
|
|
109 |
function ecrireFichierMap()
|
|
|
110 |
{
|
|
|
111 |
$fichierServicesMap = fopen('..\\'.$appConfig['service_map'],"r");
|
|
|
112 |
$ligne = 0;
|
|
|
113 |
while($donnee=fscanf($fichierServicesMap,"%s\t%s\t%s\t%s\t%s\t%s",$keyName,$serviceName,$viewName,$schema,$ratio,$style))
|
|
|
114 |
{
|
|
|
115 |
$ligne++;
|
|
|
116 |
if ($ligne>1)
|
|
|
117 |
{
|
|
|
118 |
echo "<listitem><listcell label='$keyName'/><listcell label='$serviceName'/><listcell label='$viewName'/><listcell label='$schema'/><listcell label='$ratio'/><listcell label='$style'/></listitem>";
|
|
|
119 |
}
|
|
|
120 |
}
|
|
|
121 |
fclose($fichierServicesMap);
|
|
|
122 |
}
|
|
|
123 |
|
|
|
124 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
|
|
125 |
*
|
|
|
126 |
* $Log: not supported by cvs2svn $
|
|
|
127 |
*
|
|
|
128 |
* +-- Fin du code ----------------------------------------------------------------------------------------+
|
|
|
129 |
*/
|
|
|
130 |
?>
|
|
|
131 |
|
|
|
132 |
|