Subversion Repositories Applications.papyrus

Rev

Rev 437 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 437 Rev 438
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
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                                  |
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                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: admin_wikini.php,v 1.3 2005-09-02 11:29:25 ddelon Exp $
22
// CVS : $Id: admin_wikini.php,v 1.4 2005-09-06 08:35:36 ddelon Exp $
23
/**
23
/**
24
* Application gérant les Wikini associe à Papyrus
24
* Application gérant les Wikini associe à Papyrus
25
*
25
*
26
* Cette application permet de gérer les parametre des wikini associés à l'ensemble d'un papyrus
26
* Cette application permet de gérer les parametre des wikini associés à l'ensemble d'un papyrus
27
* TODO : afficher les utilisations par les menus.
27
* TODO : afficher les utilisations par les menus.
Line 33... Line 33...
33
*
33
*
34
*@package Admin_Wikini
34
*@package Admin_Wikini
35
//Auteur original :
35
//Auteur original :
36
*@author        David Delon <david.delon@clapas.net>
36
*@author        David Delon <david.delon@clapas.net>
37
*@copyright     Tela-Botanica 2000-2005
37
*@copyright     Tela-Botanica 2000-2005
38
*@version       $Revision: 1.3 $
38
*@version       $Revision: 1.4 $
39
// +------------------------------------------------------------------------------------------------------+
39
// +------------------------------------------------------------------------------------------------------+
40
*/
40
*/
Line 41... Line 41...
41
 
41
 
42
// +------------------------------------------------------------------------------------------------------+
42
// +------------------------------------------------------------------------------------------------------+
Line 86... Line 86...
86
 */ 
86
 */ 
Line 87... Line 87...
87
	
87
	
88
    $db = &$GLOBALS['_GEN_commun']['pear_db'] ;
88
    $db = &$GLOBALS['_GEN_commun']['pear_db'] ;
89
    $url = $GLOBALS['_GEN_commun']['url'] ;
89
    $url = $GLOBALS['_GEN_commun']['url'] ;
-
 
90
    $auth = &$GLOBALS['_GEN_commun']['pear_auth'] ;
90
    $auth = &$GLOBALS['_GEN_commun']['pear_auth'] ;
91
    
-
 
92
    isset ($GLOBALS['action']) ? '' : $GLOBALS['action'] = '' ; // On déclare action si elle n'existe pas
91
    isset ($GLOBALS['action']) ? '' : $GLOBALS['action'] = '' ; // On déclare action si elle n'existe pas
93
    
92
    if (!$auth->getAuth()) {
94
    if (!$auth->getAuth()) {
93
        return 'Identifiez-vous' ;
95
        return 'Identifiez-vous' ;
-
 
96
    }
94
    }
97
    
95
    // Le lien pour une nouvelle entrée
98
    // Le lien pour une nouvelle entrée
Line 96... Line 99...
96
    $res = '<a href="'.$url->getURL().'&amp;action=nouveau">'.ADWI_AJOUTER.'</a>'."\n<br />" ;
99
    $res = '<a href="'.$url->getURL().'&amp;action=nouveau">'.ADWI_AJOUTER.'</a>'."\n<br />" ;
Line 141... Line 144...
141
    }
144
    }
Line 142... Line 145...
142
    
145
    
143
    
146
    
144
    // Comportement par défaut
147
    // Comportement par défaut
Line 145... Line 148...
145
    // requete sur la table gen_wikini pour affichage de la liste des Wikini 
148
    // requete sur la table gen_wikini pour affichage de la liste des Wikini 
146
    $requete = "select  gewi_id_wikini, gewi_code_alpha_wikini from gen_wikini" ;
149
    $requete = "select  gewi_id_wikini, gewi_code_alpha_wikini, gewi_page from gen_wikini" ;
147
    
150
    
148
    $resultat = $db->query ($requete) ;
151
    $resultat = $db->query ($requete) ;
149
    if (DB::isError ($resultat)) {
152
    if (DB::isError ($resultat)) {
150
        $GLOBALS['_GEN_commun']['debogage_erreur']->gererErreur(E_USER_WARNING, "Echec de la requete : $requete<br />".$resultat->getMessage(),
153
        $GLOBALS['_GEN_commun']['debogage_erreur']->gererErreur(E_USER_WARNING, "Echec de la requete : $requete<br />".$resultat->getMessage(),
151
                                                                        __FILE__, __LINE__, 'admin_wikini')   ;
154
                                                                        __FILE__, __LINE__, 'admin_wikini')   ;
152
        return ;
155
        return ;
153
    }
156
    }
154
    $liste = new HTML_TableFragmenteur () ;
157
    $liste = new HTML_TableFragmenteur () ;
155
    $liste->construireEntete(array (ADWI_NOM_WIKINI, ADWI_MODIFIER, ADWI_SUPPRIMER)) ;
158
    $liste->construireEntete(array (ADWI_NOM_WIKINI, ADWI_PAGE, ADWI_MODIFIER, ADWI_SUPPRIMER)) ;
156
    $tableau_wikini = array() ;
159
    $tableau_wikini = array() ;
-
 
160
    while ($ligne = $resultat->fetchRow()) {
157
    while ($ligne = $resultat->fetchRow()) {
161
        $url->addQueryString ('id_wikini', $ligne[0]) ;
158
        $url->addQueryString ('id_wikini', $ligne[0]) ;
162
        array_push ($tableau_wikini, array ($ligne[1]."\n",    // Première colonne, le nom de l'application
159
        array_push ($tableau_wikini, array ($ligne[1]."\n",    // Première colonne, le nom de l'application
163
        									$ligne[2]."\n",    // Deuxieme colonne, la page par defaut
160
        								  '<a href="'.$url->getURL().'">'.ADWI_MODIFIER.'</a>'."\n",
164
        								  '<a href="'.$url->getURL().'">'.ADWI_MODIFIER.'</a>'."\n",
161
                                          '<a href="'.$url->getURL().'&amp;action=supprimer" onclick="javascript:return confirm (\''.ADWI_SUPPRIMER.' ?\');">'.ADWI_SUPPRIMER.'</a>'."\n"
165
                                          '<a href="'.$url->getURL().'&amp;action=supprimer" onclick="javascript:return confirm (\''.ADWI_SUPPRIMER.' ?\');">'.ADWI_SUPPRIMER.'</a>'."\n"
Line 173... Line 177...
173
 
177
 
174
 
178
 
175
/* +--Fin du code ----------------------------------------------------------------------------------------+
179
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
180
*
-
 
181
* $Log: not supported by cvs2svn $
-
 
182
* Revision 1.3  2005/09/02 11:29:25  ddelon
176
*
183
* Integrateur Wikini et administration des Wikini
177
* $Log: not supported by cvs2svn $
184
*
178
* Revision 1.2  2005/08/31 17:34:52  ddelon
185
* Revision 1.2  2005/08/31 17:34:52  ddelon
179
* Integrateur Wikini et administration des Wikini
186
* Integrateur Wikini et administration des Wikini
180
*
187
*