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_menu.php,v 1.5 2004-09-23 16:49:24 jpm Exp $
|
22 |
// CVS : $Id: admin_menu.php,v 1.6 2004-09-23 17:45:19 jpm Exp $
|
23 |
/**
|
23 |
/**
|
24 |
* Application gérant les menus de Papyrus
|
24 |
* Application gérant les menus de Papyrus
|
25 |
*
|
25 |
*
|
26 |
* Cette application permet de gérer les menus classiques, les menus communs
|
26 |
* Cette application permet de gérer les menus classiques, les menus communs
|
27 |
* et les liaison d'une application à un menu.
|
27 |
* et les liaison d'une application à un menu.
|
Line 31... |
Line 31... |
31 |
*@author Laurent COUDOUNEAU <lc@gsite.org>
|
31 |
*@author Laurent COUDOUNEAU <lc@gsite.org>
|
32 |
//Autres auteurs :
|
32 |
//Autres auteurs :
|
33 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
|
33 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
|
34 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
34 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
35 |
*@copyright Tela-Botanica 2000-2004
|
35 |
*@copyright Tela-Botanica 2000-2004
|
36 |
*@version $Revision: 1.5 $ $Date: 2004-09-23 16:49:24 $
|
36 |
*@version $Revision: 1.6 $ $Date: 2004-09-23 17:45:19 $
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
*/
|
38 |
*/
|
Line 39... |
Line 39... |
39 |
|
39 |
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
Line 44... |
Line 44... |
44 |
/** Inclusion du fichier de configuration de cette application.*/
|
44 |
/** Inclusion du fichier de configuration de cette application.*/
|
45 |
require_once GEN_CHEMIN_PAP.'applications/admin_menu/configuration/adme_configuration.inc.php';
|
45 |
require_once GEN_CHEMIN_PAP.'applications/admin_menu/configuration/adme_configuration.inc.php';
|
Line 46... |
Line 46... |
46 |
|
46 |
|
47 |
/** Inclusion de la bibliothèque PEAR de conception de formulaire.*/
|
47 |
/** Inclusion de la bibliothèque PEAR de conception de formulaire.*/
|
- |
|
48 |
require_once ADME_CHEMIN_BIBLIOTHEQUE_PEAR.'HTML/QuickForm.php';
|
Line 48... |
Line 49... |
48 |
require_once ADME_CHEMIN_BIBLIOTHEQUE_PEAR.'HTML/QuickForm.php';
|
49 |
require_once ADME_CHEMIN_BIBLIOTHEQUE_PEAR.'HTML/QuickForm/select.php';
|
49 |
|
50 |
|
Line 50... |
Line 51... |
50 |
/** Inclusion de l'API de fonctions gérant les erreurs sql.*/
|
51 |
/** Inclusion de l'API de fonctions gérant les erreurs sql.*/
|
Line 336... |
Line 337... |
336 |
'<!-- BEGIN required --><span class="symbole_obligatoire">*</span><!-- END required -->'."\n".
|
337 |
'<!-- BEGIN required --><span class="symbole_obligatoire">*</span><!-- END required -->'."\n".
|
337 |
'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n");
|
338 |
'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n");
|
338 |
$partie_site_debut = '<fieldset>'."\n".
|
339 |
$partie_site_debut = '<fieldset>'."\n".
|
339 |
'<legend>Listes des sites</legend>'."\n";
|
340 |
'<legend>Listes des sites</legend>'."\n";
|
340 |
$form->addElement('html', $partie_site_debut);
|
341 |
$form->addElement('html', $partie_site_debut);
|
- |
|
342 |
$id = 'adminProject';
|
- |
|
343 |
$aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'onchange' => 'javascript:this.form.submit();');
|
- |
|
344 |
$label = '<label for="'.$id.'">'.'Choix du site à administrer : '.'</label>';
|
- |
|
345 |
$objet_select = new HTML_QuickForm_select($id, $label, '', $aso_attributs);
|
341 |
$aso_options = array();
|
346 |
$aso_options = array();
|
342 |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
|
347 |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
|
343 |
if (empty($adminProject)) {
|
348 |
if (empty($adminProject)) {
|
344 |
$adminProject = $ligne->gs_code_alpha;
|
349 |
$adminProject = $ligne->gs_code_alpha;
|
345 |
}
|
350 |
}
|
- |
|
351 |
if ($ligne->gs_code_alpha == $adminProject) {
|
- |
|
352 |
$objet_select->addOption(htmlentities($ligne->gs_nom.' ('.$ligne->gs_code_alpha.')'), $ligne->gs_code_alpha, 'selected="selected"');
|
- |
|
353 |
} else {
|
346 |
$aso_options[$ligne->gs_code_alpha] = htmlentities($ligne->gs_nom.' ('.$ligne->gs_code_alpha.')');
|
354 |
$objet_select->addOption(htmlentities($ligne->gs_nom.' ('.$ligne->gs_code_alpha.')'), $ligne->gs_code_alpha);
|
- |
|
355 |
}
|
347 |
}
|
356 |
}
|
348 |
$resultat->free();
|
357 |
$resultat->free();
|
349 |
$id = 'adminProject';
|
358 |
$form->addElement($objet_select);
|
350 |
$aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++);
|
- |
|
351 |
$label = '<label for="'.$id.'">'.'Choix du site à administrer : '.'</label>';
|
- |
|
352 |
$form->addElement('select', $id, $label, $aso_options, $aso_attributs);
|
- |
|
353 |
$form->addElement('submit', 'choisir_site', 'OK');
|
359 |
$form->addElement('submit', 'choisir_site', 'OK');
|
354 |
$partie_site_fin = '</fieldset>'."\n";
|
360 |
$partie_site_fin = '</fieldset>'."\n";
|
355 |
$form->addElement('html', $partie_site_fin);
|
361 |
$form->addElement('html', $partie_site_fin);
|
Line 356... |
Line 362... |
356 |
|
362 |
|
Line 450... |
Line 456... |
450 |
|
456 |
|
451 |
|
457 |
|
452 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
458 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
- |
|
459 |
*
|
- |
|
460 |
* $Log: not supported by cvs2svn $
|
- |
|
461 |
* Revision 1.5 2004/09/23 16:49:24 jpm
|
453 |
*
|
462 |
* Correction d'une erreur dans l'url de l'ajout de menu commun.
|
454 |
* $Log: not supported by cvs2svn $
|
463 |
*
|
455 |
* Revision 1.4 2004/07/06 17:24:54 jpm
|
464 |
* Revision 1.4 2004/07/06 17:24:54 jpm
|
456 |
* Suppression d'inclusions de fichiers inutiles.
|
465 |
* Suppression d'inclusions de fichiers inutiles.
|
457 |
*
|
466 |
*
|