Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 94 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 94 Rev 99
1
<?php
1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
3
// +------------------------------------------------------------------------------------------------------+
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 5.0.3                                                                                    |
4
// | PHP version 5.0.3                                                                                    |
5
// +------------------------------------------------------------------------------------------------------+
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
7
// +------------------------------------------------------------------------------------------------------+
8
// | This file is part of Serveur eRibosome.                                                              |
8
// | This file is part of Serveur eRibosome.                                                              |
9
// |                                                                                                      |
9
// |                                                                                                      |
10
// | Foobar is free software; you can redistribute it and/or modify                                       |
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                                 |
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                                    |
12
// | the Free Software Foundation; either version 2 of the License, or                                    |
13
// | (at your option) any later version.                                                                  |
13
// | (at your option) any later version.                                                                  |
14
// |                                                                                                      |
14
// |                                                                                                      |
15
// | Foobar is distributed in the hope that it will be useful,                                            |
15
// | Foobar is distributed in the hope that it will be useful,                                            |
16
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
16
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
17
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
17
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
18
// | GNU General Public License for more details.                                                         |
18
// | GNU General Public License for more details.                                                         |
19
// |                                                                                                      |
19
// |                                                                                                      |
20
// | You should have received a copy of the GNU General Public License                                    |
20
// | You should have received a copy of the GNU General Public License                                    |
21
// | along with Foobar; if not, write to the Free Software                                                |
21
// | along with Foobar; if not, write to the Free Software                                                |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
23
// +------------------------------------------------------------------------------------------------------+
23
// +------------------------------------------------------------------------------------------------------+
24
// 
24
// 
25
/**
25
/**
26
* Fichier permmetant d'afficher les sources.
26
* Fichier permmetant d'afficher les sources.
27
*
27
*
28
* Ce fichier permet d'afficher le code source d'un macro-element ou d'un groupe
28
* Ce fichier permet d'afficher le code source d'un macro-element ou d'un groupe
29
* de macro-elements
29
* de macro-elements
30
* 
30
* 
31
* Abréviation du programme : ERIBO
31
* Abréviation du programme : ERIBO
32
*
32
*
33
*@package eRibosome
33
*@package eRibosome
34
*@subpackage Generateur
34
*@subpackage Generateur
35
//Auteur original :
35
//Auteur original :
36
*@author        Frédéric LEGENS <flegens@free.fr>
36
*@author        Frédéric LEGENS <flegens@free.fr>
37
//Autres auteurs :
37
//Autres auteurs :
38
*@author        Aucun
38
*@author        Aucun
39
*@copyright     Tela-Botanica 2000-2004
39
*@copyright     Tela-Botanica 2000-2004
40
*@version       $Revision: 1.1 $ $Date: 2005-01-19 15:44:03 $
40
*@version       $Revision: 1.2 $ $Date: 2005-01-23 22:22:42 $
41
// +------------------------------------------------------------------------------------------------------+
41
// +------------------------------------------------------------------------------------------------------+
42
*/
42
*/
43
 
43
 
44
// +------------------------------------------------------------------------------------------------------+
44
// +------------------------------------------------------------------------------------------------------+
45
// |                                            ENTETE du PROGRAMME                                       |
45
// |                                            ENTETE du PROGRAMME                                       |
46
// +------------------------------------------------------------------------------------------------------+
46
// +------------------------------------------------------------------------------------------------------+
47
 
47
 
48
require_once '../configuration/eribo_config.php';
48
require_once '../configuration/eribo_config.php';
49
require_once '../configuration/eribo_config_avancee.inc.php';
49
require_once '../configuration/eribo_config_avancee.inc.php';
50
 
50
 
51
// +------------------------------------------------------------------------------------------------------+
51
// +------------------------------------------------------------------------------------------------------+
52
// |                                            CORPS du PROGRAMME                                        |
52
// |                                            CORPS du PROGRAMME                                        |
53
// +------------------------------------------------------------------------------------------------------+
53
// +------------------------------------------------------------------------------------------------------+
54
 
54
 
55
 
55
 
56
header('Content-type: text/xml');
56
header('Content-type: text/html');
57
if (!empty($_REQUEST['listemacroelements'])) {
57
if (!empty($_REQUEST['macro_elements'])) {
58
    $nom = EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO.$_REQUEST['listemacroelements'];
-
 
59
    $file = fopen($nom, 'r');
-
 
60
    $taille = fileSize($nom);
58
    $nom = EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO.$_REQUEST['macro_elements'];
61
    $lecture = fread($file,$taille); 
-
 
62
    fclose($file);
-
 
63
    echo $lecture;
59
    echo genererAffichage(EFSE_CHEMIN_GENE_XSLT.'afficher_macroelement.xslt',$nom);
64
}
60
}
65
 
61
 
66
if (!empty($_REQUEST['groupesmacroelements'])) {
-
 
67
    $nom = EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE.$_REQUEST['groupesmacroelements'];
-
 
68
    $file = fopen($nom, 'r');
62
if (!empty($_REQUEST['groupes_macro_elements'])) {
69
    $taille = fileSize($nom);
-
 
70
    $lecture = fread($file, $taille); 
-
 
71
    fclose($file);
63
    $nom = EFSE_CHEMIN_GENERATEUR_RACINE.EFSE_CHEMIN_DEF_MACRO_GROUPE.$_REQUEST['groupes_macro_elements'];
72
    echo $lecture;
64
    echo genererAffichage(EFSE_CHEMIN_GENE_XSLT.'afficher_groupemacroelement.xslt',$nom);
73
}
65
}
74
 
66
 
75
// +------------------------------------------------------------------------------------------------------+
67
// +------------------------------------------------------------------------------------------------------+
76
// |                                           LISTE de FONCTIONS                                         |
68
// |                                           LISTE de FONCTIONS                                         |
77
// +------------------------------------------------------------------------------------------------------+
69
// +------------------------------------------------------------------------------------------------------+
-
 
70
 
-
 
71
function genererAffichage($xsltFilePath, $xmlFilePath)
-
 
72
{
-
 
73
    $processeur = new XSLTprocessor();
-
 
74
    
-
 
75
    $style = new domDocument();
-
 
76
    $style->load($xsltFilePath);
-
 
77
    
-
 
78
    $processeur->importStyleSheet($style);
-
 
79
    
-
 
80
    $doc = new domDocument();
-
 
81
    
-
 
82
    $doc->load($xmlFilePath);
-
 
83
    
-
 
84
    return $processeur->transformToXML($doc);
78
 
85
}
79
 
86
 
80
/* +--Fin du code ----------------------------------------------------------------------------------------+
87
/* +--Fin du code ----------------------------------------------------------------------------------------+
81
*
88
*
82
* $Log: not supported by cvs2svn $
89
* $Log: not supported by cvs2svn $
-
 
90
* Revision 1.1  2005/01/19 15:44:03  jpm
-
 
91
* Changement de nom.
-
 
92
*
83
* Revision 1.7  2005/01/19 15:43:40  jpm
93
* Revision 1.7  2005/01/19 15:43:40  jpm
84
* Changement de nom des fichiers à appeler.
94
* Changement de nom des fichiers à appeler.
85
*
95
*
86
* Revision 1.6  2004/12/23 15:45:48  jpm
96
* Revision 1.6  2004/12/23 15:45:48  jpm
87
* Changement de version de PHP.
97
* Changement de version de PHP.
88
*
98
*
89
* Revision 1.5  2004/12/23 15:44:57  jpm
99
* Revision 1.5  2004/12/23 15:44:57  jpm
90
* Mise en conformité convention de codage.
100
* Mise en conformité convention de codage.
91
*
101
*
92
* Revision 1.4  2004/12/23 15:22:15  jpm
102
* Revision 1.4  2004/12/23 15:22:15  jpm
93
* Modification du fichier de config appelé.
103
* Modification du fichier de config appelé.
94
*
104
*
95
* Revision 1.3  2004/12/22 23:28:14  fred
105
* Revision 1.3  2004/12/22 23:28:14  fred
96
* intégration de la license
106
* intégration de la license
97
*
107
*
98
*
108
*
99
* +-- Fin du code ----------------------------------------------------------------------------------------+
109
* +-- Fin du code ----------------------------------------------------------------------------------------+
100
*/
110
*/
101
?>
111
?>