Subversion Repositories Applications.papyrus

Rev

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

Rev 370 Rev 371
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: selecteur_sites.php,v 1.6 2005-05-23 09:31:43 jpm Exp $
22
// CVS : $Id: selecteur_sites.php,v 1.7 2005-05-25 12:53:00 jpm Exp $
23
/**
23
/**
24
* Applette : selecteur sites
24
* Applette : selecteur sites
25
*
25
*
26
* Génère un formulaire contenant un menu déroulant permettant de choisir un site parmis les disponibles.
26
* Génère un formulaire contenant un menu déroulant permettant de choisir un site parmis les disponibles.
27
* Nécessite :
27
* Nécessite :
Line 38... Line 38...
38
//Auteur original :
38
//Auteur original :
39
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
39
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
40
//Autres auteurs :
40
//Autres auteurs :
41
*@author        Aucun
41
*@author        Aucun
42
*@copyright     Tela-Botanica 2000-2004
42
*@copyright     Tela-Botanica 2000-2004
43
*@version       $Revision: 1.6 $ $Date: 2005-05-23 09:31:43 $
43
*@version       $Revision: 1.7 $ $Date: 2005-05-25 12:53:00 $
44
// +------------------------------------------------------------------------------------------------------+
44
// +------------------------------------------------------------------------------------------------------+
45
*/
45
*/
Line 46... Line 46...
46
 
46
 
47
// +------------------------------------------------------------------------------------------------------+
47
// +------------------------------------------------------------------------------------------------------+
Line 128... Line 128...
128
        // Préparation du code du sites
128
        // Préparation du code du sites
129
        $champs_code_site = ($url_id_type_site == 'int') ? 'gs_code_num' : 'gs_code_alpha';
129
        $champs_code_site = ($url_id_type_site == 'int') ? 'gs_code_num' : 'gs_code_alpha';
Line 130... Line 130...
130
        
130
        
131
        // Préparation du formulaire
131
        // Préparation du formulaire
132
        $retour = str_repeat(' ', $indent_origine + ($indent_pas * 0)).
132
        $retour = str_repeat(' ', $indent_origine + ($indent_pas * 0)).
133
                '<form id="selecteur_sites" ';
133
                '<form id="sesi_selecteur" ';
134
        // Test sur XHTML strict
134
        // Test sur XHTML strict
135
        if ($bln_xhtml_strict == 0) {
135
        if ($bln_xhtml_strict == 0) {
136
            $retour .= 'name="selecteur_sites" ';
136
            $retour .= 'name="sesi_selecteur" ';
137
        }
137
        }
Line 138... Line 138...
138
        $retour .= 'action="'.$objet_pear_url->getURL().'" method="get">'."\n";
138
        $retour .= 'action="'.$objet_pear_url->getURL().'" method="get">'."\n";
139
        
139
        
140
        $retour .= str_repeat(' ', $indent_origine + ($indent_pas * 1)).
140
        $retour .= str_repeat(' ', $indent_origine + ($indent_pas * 1)).
141
                '<fieldset>'."\n";
141
                '<fieldset>'."\n";
142
        $retour .= str_repeat(' ', $indent_origine + ($indent_pas * 2)).
142
        $retour .= str_repeat(' ', $indent_origine + ($indent_pas * 2)).
143
                '<legend>'.$etiquette_legende.'</legend>'."\n";
143
                '<legend>'.$etiquette_legende.'</legend>'."\n";
144
        $retour .= str_repeat(' ', $indent_origine + ($indent_pas * 2)).
144
        $retour .= str_repeat(' ', $indent_origine + ($indent_pas * 2)).
145
                '<select id="'.$url_cle_site.'" name="'.$url_cle_site.'" onchange="javascript:this.form.submit();">'."\n";
145
                '<select id="sesi_'.$url_cle_site.'" name="'.$url_cle_site.'" onchange="javascript:this.form.submit();">'."\n";
146
        $retour .= str_repeat(' ', $indent_origine + ($indent_pas * 3)).
146
        $retour .= str_repeat(' ', $indent_origine + ($indent_pas * 3)).
147
                '<option value="'.$code_site.'" selected="selected">'.$etiquette_option_defaut.'</option>'."\n";
147
                '<option value="'.$code_site.'" selected="selected">'.$etiquette_option_defaut.'</option>'."\n";
148
        while ($ligne = $retourultat->fetchRow(DB_FETCHMODE_ASSOC)) {
148
        while ($ligne = $retourultat->fetchRow(DB_FETCHMODE_ASSOC)) {
Line 172... Line 172...
172
                    '<option value="'.$ligne[$champs_code_site].'">'.$nom.'</option>'."\n";
172
                    '<option value="'.$ligne[$champs_code_site].'">'.$nom.'</option>'."\n";
173
        }
173
        }
174
        $retour .= str_repeat(' ', $indent_origine + ($indent_pas * 2)).
174
        $retour .= str_repeat(' ', $indent_origine + ($indent_pas * 2)).
175
                '</select>'."\n";
175
                '</select>'."\n";
176
        $retour .= str_repeat(' ', $indent_origine + ($indent_pas * 2)).
176
        $retour .= str_repeat(' ', $indent_origine + ($indent_pas * 2)).
177
                '<input type="submit" value="'.$etiquette_bouton_valider.'"/>'."\n";
177
                '<input id="sesi_ok" name="sesi_ok" type="submit" value="'.$etiquette_bouton_valider.'"/>'."\n";
178
        $retour .= str_repeat(' ', $indent_origine + ($indent_pas * 1)).
178
        $retour .= str_repeat(' ', $indent_origine + ($indent_pas * 1)).
179
                '</fieldset>'."\n";
179
                '</fieldset>'."\n";
180
        $retour .= str_repeat(' ', $indent_origine + ($indent_pas * 0)).
180
        $retour .= str_repeat(' ', $indent_origine + ($indent_pas * 0)).
181
                '</form>'."\n";
181
                '</form>'."\n";
182
    }
182
    }
Line 192... Line 192...
192
 
192
 
193
 
193
 
194
/* +--Fin du code ----------------------------------------------------------------------------------------+
194
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
195
*
-
 
196
* $Log: not supported by cvs2svn $
-
 
197
* Revision 1.6  2005/05/23 09:31:43  jpm
195
*
198
* Ajout d'une majuscule à un txt.
196
* $Log: not supported by cvs2svn $
199
*
197
* Revision 1.5  2004/10/26 18:42:02  jpm
200
* Revision 1.5  2004/10/26 18:42:02  jpm
198
* Possibilité d'externaliser l'applette.
201
* Possibilité d'externaliser l'applette.
199
* Gestion des sites externes.
202
* Gestion des sites externes.