Subversion Repositories eFlore/Archives.eflore-consultation-v2

Compare Revisions

Ignore whitespace Rev 26 → Rev 27

/trunk/serveur/generateur/eflore_generateur.php
New file
0,0 → 1,84
<?
require_once '..\\eflore_config.php';
header("Content-type: application/vnd.mozilla.xul+xml");
echo '<?xml version="1.0" encoding="UTF-8" ?>';
echo '<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>';
function ecrirelisteFichier($chemin)
{
$repertoire = openDir($chemin);
while ($fichier = readDir($repertoire))
{
if (($fichier !='.') && ($fichier !='..'))
{
echo "<listitem label='$fichier'/>";
}
}
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);
}
?>
 
 
<!DOCTYPE window>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
<script type="application/x-javascript" src="eflore_generateur.js" />
<hbox flex="1">
<vbox flex="1">
<label value="Macro Elements"/>
<listbox id="listemacroelements">
<? ecrireListeFichier('..\\'.$appConfig['def_macro']); ?>
</listbox>
<hbox>
<button label="Tout compiler" onclick="compileSelection('listemacroelements')"/>
<button label="Afficher" onclick="afficheSelection('listemacroelements')"/>
</hbox>
</vbox>
<vbox flex="1">
<label value="Service Donnees"/>
<listbox id="groupesmacroelements">
<? ecrireListeFichier('..\\'.$appConfig['def_groupes']); ?>
</listbox>
<hbox>
<button label="Tout compiler" onclick="compileSelection('groupesmacroelements')"/>
<button label="Afficher" onclick="afficheSelection('groupesmacroelements')"/>
</hbox>
</vbox>
<vbox flex="1">
<label value="Publications HTML"/>
<listbox>
<? ecrireListeFichier('..\\'.$appConfig['publi_html']); ?>
</listbox>
<hbox><button label="Tout compiler"/><button label="Afficher"/></hbox>
</vbox>
<vbox flex="1">
<label value="Publications XML"/>
<listbox>
<? ecrireListeFichier('..\\'.$appConfig['publi_xml']); ?>
</listbox>
<hbox><button label="Tout compiler"/><button label="Afficher"/></hbox>
</vbox>
</hbox>
<hbox flex="1" >
<listbox flex="1">
<listcols><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /><listcol flex="1" /></listcols>
<listhead><listheader label="Clef"/><listheader label="Service"/><listheader label="Publication"/><listheader label="Schema a respecter"/><listheader label="Ratio de control"/><listheader label="Style"/></listhead>
<? ecrireFichierMap(); ?>
</listbox>
</hbox>
</window>