437 |
ddelon |
1 |
<?php
|
|
|
2 |
/*vim: set expandtab tabstop=4 shiftwidth=4: */
|
|
|
3 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
4 |
// | PHP version 4.1 |
|
|
|
5 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
6 |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
|
|
|
7 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
8 |
// | This library is free software; you can redistribute it and/or |
|
|
|
9 |
// | modify it under the terms of the GNU Lesser General Public |
|
|
|
10 |
// | License as published by the Free Software Foundation; either |
|
|
|
11 |
// | version 2.1 of the License, or (at your option) any later version. |
|
|
|
12 |
// | |
|
|
|
13 |
// | This library is distributed in the hope that it will be useful, |
|
|
|
14 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
|
15 |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
|
|
16 |
// | Lesser General Public License for more details. |
|
|
|
17 |
// | |
|
|
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
|
|
19 |
// | License along with this library; if not, write to the Free Software |
|
|
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
|
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
22 |
// CVS : $Id: integrateur_wikini.admin.php,v 1.1 2005-09-02 11:29:25 ddelon Exp $
|
|
|
23 |
/**
|
|
|
24 |
* Gestion des Wikini associé à un menu pour papyrus : lit et stocke les informations dans la
|
|
|
25 |
* champs gm_application_arguments de la table gen_menu
|
|
|
26 |
*
|
|
|
27 |
* Principe :
|
|
|
28 |
* Lecture arguments, decodage et affichage : Nom Wiki et Page Demarrage
|
|
|
29 |
* Affichage de l'ensemble des Wiki Disponible (avec leur page par Defaut)
|
|
|
30 |
* Choix d'un wiki
|
|
|
31 |
* Mise à jour
|
|
|
32 |
*
|
|
|
33 |
* TODO : gerer le defaut sur demmarage
|
|
|
34 |
*
|
|
|
35 |
* ------------ --------------
|
|
|
36 |
* Wiki : | | Page Principale : | |
|
|
|
37 |
* ------------ --------------
|
|
|
38 |
*
|
|
|
39 |
* Fragmenteur choix (selection uniquement)
|
|
|
40 |
*
|
|
|
41 |
* --------------------------------------
|
|
|
42 |
* | Nom Wiki | Page Demmarage |
|
|
|
43 |
* --------------------------------------
|
|
|
44 |
* | Wikini_01 | |
|
|
|
45 |
* ---------------------------------------
|
|
|
46 |
* | Wikini_02 | ChatMot |
|
|
|
47 |
* ---------------------------------------
|
|
|
48 |
*
|
|
|
49 |
* Valider - Annuler
|
|
|
50 |
*
|
|
|
51 |
*
|
|
|
52 |
*@package IntegrateurWikini
|
|
|
53 |
//Auteur original :
|
|
|
54 |
*@author David Delon <david.delon@clapas.net>
|
|
|
55 |
*@copyright Tela-Botanica 2000-2004
|
|
|
56 |
*@version $Revision: 1.1 $ $Date: 2005-09-02 11:29:25 $
|
|
|
57 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
58 |
*/
|
|
|
59 |
|
|
|
60 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
61 |
// | ENTÊTE du PROGRAMME |
|
|
|
62 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
66 |
// | CLASSE |
|
|
|
67 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
68 |
|
|
|
69 |
/** Inclusion du fichier de configuration de cette application.*/
|
|
|
70 |
require_once 'client/integrateur_wikini/configuration/adwi_configuration.inc.php';
|
|
|
71 |
|
|
|
72 |
|
|
|
73 |
/** Inclusion de l'API de fonctions gérant les erreurs sql.*/
|
|
|
74 |
require_once ADWI_CHEMIN_BIBLIOTHEQUE_API.'debogage/BOG_sql.fonct.php';
|
|
|
75 |
|
|
|
76 |
require_once ADWI_CHEMIN_BIBLIOTHEQUE_API.'html/HTML_TableFragmenteur.php' ;
|
|
|
77 |
|
|
|
78 |
require_once ADWI_CHEMIN_BIBLIOTHEQUE.'adwi_wikini.fonct.php';
|
|
|
79 |
|
|
|
80 |
// Inclusion des fichiers de traduction de l'appli ADWI dePapyrus
|
|
|
81 |
if (file_exists(ADWI_CHEMIN_LANGUE.'adwi_langue_'.$GLOBALS['_GEN_commun']['i18n'].'.inc.php')) {
|
|
|
82 |
/** Inclusion du fichier de traduction suite à la transaction avec le navigateur.*/
|
|
|
83 |
require_once ADWI_CHEMIN_LANGUE.'adwi_langue_'.$GLOBALS['_GEN_commun']['i18n'].'.inc.php';
|
|
|
84 |
} else {
|
|
|
85 |
/** Inclusion du fichier de traduction par défaut.*/
|
|
|
86 |
require_once ADWI_CHEMIN_LANGUE.'adwi_langue_'.ADWI_I18N_DEFAUT.'.inc.php';
|
|
|
87 |
}
|
|
|
88 |
|
|
|
89 |
|
|
|
90 |
class Integrateur_Wikini_Admin {
|
|
|
91 |
|
|
|
92 |
/** Fonction redigerContenu() - Affiche le formulaire de rédaction
|
|
|
93 |
*
|
|
|
94 |
*
|
|
|
95 |
* @return string Le HTML
|
|
|
96 |
*/
|
|
|
97 |
function afficherContenuCorps()
|
|
|
98 |
{
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
|
|
|
102 |
$db = &$GLOBALS['_GEN_commun']['pear_db'] ;
|
|
|
103 |
$url = $GLOBALS['_GEN_commun']['url'] ;
|
|
|
104 |
$auth = &$GLOBALS['_GEN_commun']['pear_auth'] ;
|
|
|
105 |
|
|
|
106 |
isset ($GLOBALS['action']) ? '' : $GLOBALS['action'] = '' ; // On déclare action si elle n'existe pas
|
|
|
107 |
|
|
|
108 |
if (!$auth->getAuth()) {
|
|
|
109 |
return 'Identifiez-vous' ;
|
|
|
110 |
}
|
|
|
111 |
// Comportement par défaut
|
|
|
112 |
// requete sur la table gen_wikini pour affichage de la liste des Wikini
|
|
|
113 |
$requete = "select gewi_id_wikini, gewi_code_alpha_wikini from gen_wikini" ;
|
|
|
114 |
|
|
|
115 |
$resultat = $db->query ($requete) ;
|
|
|
116 |
if (DB::isError ($resultat)) {
|
|
|
117 |
$GLOBALS['_GEN_commun']['debogage_erreur']->gererErreur(E_USER_WARNING, "Echec de la requete : $requete<br />".$resultat->getMessage(),
|
|
|
118 |
__FILE__, __LINE__, 'admin_wikini') ;
|
|
|
119 |
return ;
|
|
|
120 |
}
|
|
|
121 |
|
|
|
122 |
$liste = new HTML_TableFragmenteur () ;
|
|
|
123 |
$liste->construireEntete(array (ADWI_NOM_WIKINI, ADWI_MODIFIER)) ;
|
|
|
124 |
$tableau_wikini = array() ;
|
|
|
125 |
while ($ligne = $resultat->fetchRow()) {
|
|
|
126 |
$url->addQueryString ('id_wikini', $ligne[0]) ;
|
|
|
127 |
array_push ($tableau_wikini, array ($ligne[1]."\n", // Première colonne, le nom de l'application
|
|
|
128 |
'<a href="'.$url->getURL().'">'.ADWI_MODIFIER.'</a>'."\n",
|
|
|
129 |
));
|
|
|
130 |
}
|
|
|
131 |
$liste->construireListe($tableau_wikini) ;
|
|
|
132 |
$res .= $liste->toHTML();
|
|
|
133 |
return $res ;
|
|
|
134 |
|
|
|
135 |
}
|
|
|
136 |
|
|
|
137 |
}// Fin de la classe
|
|
|
138 |
|
|
|
139 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
140 |
// | PIED du PROGRAMME |
|
|
|
141 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
142 |
|
|
|
143 |
|
|
|
144 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
|
|
145 |
*
|
|
|
146 |
* $Log: not supported by cvs2svn $
|
|
|
147 |
*
|
|
|
148 |
* +-- Fin du code ----------------------------------------------------------------------------------------+
|
|
|
149 |
*/
|
|
|
150 |
?>
|