Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Blame | Last modification | View Log | RSS feed

<? 
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
// +------------------------------------------------------------------------------------------------------+
// | PHP version 5.0                                                                                     |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of eFlore-Serveur.                                                                 |
// |                                                                                                      |
// | Foobar is free software; you can redistribute it and/or modify                                       |
// | it under the terms of the GNU General Public License as published by                                 |
// | the Free Software Foundation; either version 2 of the License, or                                    |
// | (at your option) any later version.                                                                  |
// |                                                                                                      |
// | Foobar is distributed in the hope that it will be useful,                                            |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
// | GNU General Public License for more details.                                                         |
// |                                                                                                      |
// | You should have received a copy of the GNU General Public License                                    |
// | along with Foobar; if not, write to the Free Software                                                |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
// +------------------------------------------------------------------------------------------------------+
// 
/**
* Fichier principal du generateur d'eFlore-Serveur
*
* Ce fichier presente les macro-elements, groupes de macro-elements, ainsi que
* la map des services disponibles et permet de lancer leurs
* traductions en php
* Abréviation du programme : EFSE
*
*@package eFlore-Serveur
//Auteur original :
*@author        Frédéric LEGENS <flegens@free.fr>
//Autres auteurs :
*@author        Aucun
*@copyright     Tela-Botanica 2000-2004
*@version       $Revision: 1.1 $ $Date: 2004-12-22 23:28:47 $
// +------------------------------------------------------------------------------------------------------+
*/

// +------------------------------------------------------------------------------------------------------+
// |                                            ENTETE du PROGRAMME                                       |
// +------------------------------------------------------------------------------------------------------+

        require_once '../configuration/eflore_config.php';
        require_once '../configuration/eflore_config_avancee.inc.php';
        header("Content-type: application/vnd.mozilla.xul+xml");
        echo '<?xml version="1.0" encoding="UTF-8" ?>'; 
        echo '<?xml-stylesheet href="css/style.css" type="text/css"?>';

// +------------------------------------------------------------------------------------------------------+
// |                                            CORPS du PROGRAMME                                        |
// +------------------------------------------------------------------------------------------------------+
?>
<!DOCTYPE window>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1">
    <script type="application/x-javascript" src="eflore_editeur.js" />
    <!-- <script type="application/x-javascript" src="eflore_generateur.js" /> -->
        <vbox flex="1">
                <tree  id="composants" hidecolumnpicker="true" flex="1" ondblclick="afficherSelection('composants','src','editeur');">
                        <treecols>
                                <treecol id="name" label="Elements" flex="1" primary="true"/>
                        </treecols>
                        <treechildren>
                                <treeitem container="true">
                                        <treerow><treecell label="Groupes" src="generateur.html"/></treerow>
                                        <treechildren>
                                        <? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE,'groupes_macro_elements'); ?>
                                        </treechildren>
                                </treeitem>
                                <treeitem container="true">
                                        <treerow><treecell label="Macroelements" src="generateur.html"/></treerow>
                                        <treechildren>
                                        <? ecrireListeFichier(EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO,'macro_elements'); ?>
                                        </treechildren>
                                </treeitem>
                                <treeitem container="true">
                                        <treerow><treecell label="Map" src="generateur.html"/></treerow>
                                        <treechildren></treechildren>
                                </treeitem>
                        </treechildren>
            </tree>
        <button label="Compiler macroelements" onclick="compileSelection('listemacroelements')"/>
                <button label="Compiler groupes"  onclick="compileSelection('groupesmacroelements')"/>
        </vbox>
</window>
<?
// +------------------------------------------------------------------------------------------------------+
// |                                           LISTE de FONCTIONS                                         |
// +------------------------------------------------------------------------------------------------------+     
        function ecrirelisteFichier($chemin,$type)
        {
                        $repertoire = openDir($chemin);
                        while ($fichier = readDir($repertoire))
                        {
                                if (($fichier !='.') && ($fichier !='..') && ($fichier!='CVS'))
                                {
                                        echo "<treeitem><treerow>";
                                        echo "<treecell label='$fichier' src='../definitions/$type/$fichier'/>";
                                        echo "</treerow></treeitem>";
                                }
                        }       
                        closeDir($repertoire);
        }
        
        
        function ecrireFichierMap()
        {
                $fichierServicesMap = fopen('..\\'.$appConfig['service_map'],"r");
                $ligne = 0;
                while($donnee=fscanf($fichierServicesMap,"%s\t%s\t%s\t%s\t%s\t%s",$keyName,$serviceName,$viewName,$schema,$ratio,$style))
                {
                        $ligne++;
                        if ($ligne>1)
                        {
                                echo "<listitem><listcell label='$keyName'/><listcell label='$serviceName'/><listcell label='$viewName'/><listcell label='$schema'/><listcell label='$ratio'/><listcell label='$style'/></listitem>";
                        }
                }
                fclose($fichierServicesMap);
        }
        
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>