19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: admin_menu.php,v 1.5 2004-09-23 16:49:24 jpm Exp $ |
// CVS : $Id: admin_menu.php,v 1.6 2004-09-23 17:45:19 jpm Exp $ |
/** |
* Application gérant les menus de Papyrus |
* |
33,7 → 33,7 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.5 $ $Date: 2004-09-23 16:49:24 $ |
*@version $Revision: 1.6 $ $Date: 2004-09-23 17:45:19 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
46,6 → 46,7 |
|
/** Inclusion de la bibliothèque PEAR de conception de formulaire.*/ |
require_once ADME_CHEMIN_BIBLIOTHEQUE_PEAR.'HTML/QuickForm.php'; |
require_once ADME_CHEMIN_BIBLIOTHEQUE_PEAR.'HTML/QuickForm/select.php'; |
|
/** Inclusion de l'API de fonctions gérant les erreurs sql.*/ |
require_once ADME_CHEMIN_BIBLIOTHEQUE_API.'debogage_1.0/BOG_sql.fonct.php'; |
338,18 → 339,23 |
$partie_site_debut = '<fieldset>'."\n". |
'<legend>Listes des sites</legend>'."\n"; |
$form->addElement('html', $partie_site_debut); |
$id = 'adminProject'; |
$aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'onchange' => 'javascript:this.form.submit();'); |
$label = '<label for="'.$id.'">'.'Choix du site à administrer : '.'</label>'; |
$objet_select = new HTML_QuickForm_select($id, $label, '', $aso_attributs); |
$aso_options = array(); |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { |
if (empty($adminProject)) { |
$adminProject = $ligne->gs_code_alpha; |
} |
$aso_options[$ligne->gs_code_alpha] = htmlentities($ligne->gs_nom.' ('.$ligne->gs_code_alpha.')'); |
if ($ligne->gs_code_alpha == $adminProject) { |
$objet_select->addOption(htmlentities($ligne->gs_nom.' ('.$ligne->gs_code_alpha.')'), $ligne->gs_code_alpha, 'selected="selected"'); |
} else { |
$objet_select->addOption(htmlentities($ligne->gs_nom.' ('.$ligne->gs_code_alpha.')'), $ligne->gs_code_alpha); |
} |
} |
$resultat->free(); |
$id = 'adminProject'; |
$aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++); |
$label = '<label for="'.$id.'">'.'Choix du site à administrer : '.'</label>'; |
$form->addElement('select', $id, $label, $aso_options, $aso_attributs); |
$form->addElement($objet_select); |
$form->addElement('submit', 'choisir_site', 'OK'); |
$partie_site_fin = '</fieldset>'."\n"; |
$form->addElement('html', $partie_site_fin); |
452,6 → 458,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.5 2004/09/23 16:49:24 jpm |
* Correction d'une erreur dans l'url de l'ajout de menu commun. |
* |
* Revision 1.4 2004/07/06 17:24:54 jpm |
* Suppression d'inclusions de fichiers inutiles. |
* |