Subversion Repositories eFlore/Archives.eflore-consultation-v2

Compare Revisions

Ignore whitespace Rev 51 → Rev 52

/trunk/serveur/generateur/eflore_editeur.php
New file
0,0 → 1,132
<?
/*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 ----------------------------------------------------------------------------------------+
*/
?>
 
 
/trunk/serveur/generateur/generateur.html
New file
0,0 → 1,12
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Generateur de macroelements</title>
</head>
<body>
<H1>Générateur de groupes et de macroelements</H1>
Double cliquer sur l'élément à afficher.
</body>
</html>
/trunk/serveur/generateur/css/style.css
New file
0,0 → 1,6
treecell { background-color: yellow;
font-weight: bold !important;
}
treerow { background-color: yellow; }
 
tree { background-color: yellow; }
/trunk/serveur/generateur/eflore_editeur.js
New file
0,0 → 1,27
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
 
function afficherSelection(aTreeChildrenId,aAttributeName,aTabBrowserId)
{
var uneUrl = donnerAttributSelectionArbre(aTreeChildrenId,aAttributeName);
window.parent.frames[1].location.href=uneUrl;
}
 
 
function donnerAttributSelectionArbre(aTreeChildrenId,aAttributeName)
{
var unArbre=document.getElementById(aTreeChildrenId);
var uneSelection = unArbre.contentView.getItemAtIndex(unArbre.currentIndex);
var uneUrl;
if (uneSelection.firstChild.firstChild.hasAttribute(aAttributeName))
{
uneUrl = uneSelection.firstChild.firstChild.getAttribute(aAttributeName);
}
return uneUrl;
}
 
function compileSelection(listid)
{
window.parent.frames[1].location.href="eflore_traducteur.php?"+listid+"="+listid;
}
/trunk/serveur/generateur/index.html
New file
0,0 → 1,11
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Generateur</title>
</head>
<frameset cols="25%,75%">
<frame name="arbreFrame" src="eflore_editeur.php"/>
<frame name="docFrame" src="generateur.html"/>
</frameset>
</html>