Subversion Repositories Applications.papyrus

Rev

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

Rev 126 Rev 132
Line 19... Line 19...
19
// |                                                                                                      |
19
// |                                                                                                      |
20
// | You should have received a copy of the GNU General Public License                                    |
20
// | You should have received a copy of the GNU General Public License                                    |
21
// | along with Foobar; if not, write to the Free Software                                                |
21
// | along with Foobar; if not, write to the Free Software                                                |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
23
// +------------------------------------------------------------------------------------------------------+
23
// +------------------------------------------------------------------------------------------------------+
24
// CVS : $Id: adme_general.fonct.php,v 1.1 2004-11-04 12:26:42 jpm Exp $
24
// CVS : $Id: adme_general.fonct.php,v 1.2 2004-11-08 17:41:07 jpm Exp $
25
/**
25
/**
26
* Titre
26
* Titre
27
*
27
*
28
* Description
28
* Description
29
*
29
*
Line 32... Line 32...
32
//Auteur original :
32
//Auteur original :
33
*@author        Prenom NOM <mail@tela-botanica.org>
33
*@author        Prenom NOM <mail@tela-botanica.org>
34
//Autres auteurs :
34
//Autres auteurs :
35
*@author        Aucun
35
*@author        Aucun
36
*@copyright     Tela-Botanica 2000-2004
36
*@copyright     Tela-Botanica 2000-2004
37
*@version       $Revision: 1.1 $ $Date: 2004-11-04 12:26:42 $
37
*@version       $Revision: 1.2 $ $Date: 2004-11-08 17:41:07 $
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
39
*/
39
*/
Line 40... Line 40...
40
 
40
 
41
// +------------------------------------------------------------------------------------------------------+
41
// +------------------------------------------------------------------------------------------------------+
Line 56... Line 56...
56
    $requete =  'SELECT gs_id_site, gs_code_alpha, gs_nom '.
56
    $requete =  'SELECT gs_id_site, gs_code_alpha, gs_nom '.
57
                'FROM gen_site, gen_site_relation '.
57
                'FROM gen_site, gen_site_relation '.
58
                'WHERE gsr_id_site_01 = gsr_id_site_02 '.
58
                'WHERE gsr_id_site_01 = gsr_id_site_02 '.
59
                'AND gsr_id_valeur = 102 '.// 102 = site "principal"
59
                'AND gsr_id_valeur = 102 '.// 102 = site "principal"
60
                'AND gsr_id_site_01 = gs_id_site '.
60
                'AND gsr_id_site_01 = gs_id_site '.
61
                'ORDER BY gsr_ordre';
61
                'ORDER BY gsr_ordre ASC';
Line 62... Line 62...
62
    
62
    
63
    $resultat = $objet_pear_db->query($requete);
63
    $resultat = $objet_pear_db->query($requete);
Line 64... Line 64...
64
    (DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ;
64
    (DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ;
Line 81... Line 81...
81
    $label = '<label for="'.$id.'">'.'Choix du site à administrer : '.'</label>';
81
    $label = '<label for="'.$id.'">'.'Choix du site à administrer : '.'</label>';
82
    $objet_select = new HTML_QuickForm_select($id, $label, '', $aso_attributs);
82
    $objet_select = new HTML_QuickForm_select($id, $label, '', $aso_attributs);
83
    $aso_options = array();
83
    $aso_options = array();
84
    while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
84
    while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
85
        $site_nom = $ligne->gs_nom;
85
        $site_nom = $ligne->gs_nom;
86
        if ($_GET['adme_site_id'] == 0) {
86
        if (!isset($_GET['adme_site_id']) || $_GET['adme_site_id'] == 0) {
87
            $_GET['adme_site_id'] = $ligne->gs_id_site;
87
            $_GET['adme_site_id'] = $ligne->gs_id_site;
88
        }
88
        }
89
        if ($ligne->gs_id_site == $_GET['adme_site_id']) {
89
        if ($ligne->gs_id_site == $_GET['adme_site_id']) {
90
            $objet_select->addOption(htmlentities($ligne->gs_nom.' ('.$ligne->gs_code_alpha.')'), $ligne->gs_code_alpha, 'selected="selected"');
90
            $objet_select->addOption(htmlentities($ligne->gs_nom.' ('.$ligne->gs_code_alpha.')'), $ligne->gs_id_site, 'selected="selected"');
91
        } else {
91
        } else {
92
            $objet_select->addOption(htmlentities($ligne->gs_nom.' ('.$ligne->gs_code_alpha.')'), $ligne->gs_code_alpha);
92
            $objet_select->addOption(htmlentities($ligne->gs_nom.' ('.$ligne->gs_code_alpha.')'), $ligne->gs_id_site);
93
        }
93
        }
94
    }
94
    }
95
    $resultat->free();
95
    $resultat->free();
96
    $form->addElement($objet_select);
96
    $form->addElement($objet_select);
97
    $form->addElement('submit', 'choisir_site', 'OK');
97
    $form->addElement('submit', 'choisir_site', 'OK');
Line 120... Line 120...
120
                            $etiquette_ajouter.'&nbsp;'.
120
                            $etiquette_ajouter.'&nbsp;'.
121
                            '<img class="'.ADME_CLASS_IMG_ICONE.'" src="'.ADME_IMAGE_NOUVEAU.'" alt="+" />'.
121
                            '<img class="'.ADME_CLASS_IMG_ICONE.'" src="'.ADME_IMAGE_NOUVEAU.'" alt="+" />'.
122
                        '</a>'."\n";
122
                        '</a>'."\n";
123
    $retour .= '</p>'."\n";
123
    $retour .= '</p>'."\n";
Line 124... Line 124...
124
    
124
    
125
    $retour .= ADME_afficherListeMenuClassique($objet_pear_db, $objet_pear_url, $_GET['adme_site_id'], $_GET['adme_menu_id'], $_GET['adme_menu_ouvert'], 0);
125
    $retour .= ADME_afficherListeMenuClassique($objet_pear_db, $objet_pear_url, $_GET['adme_site_id'], $_GET['adme_menu_id'], $_GET['adme_action'], 0);
126
    //---------------------------------------------------------------------------------------------------------------
126
    //---------------------------------------------------------------------------------------------------------------
127
    // Gestion des menus communs
127
    // Gestion des menus communs
128
    $etiquette_ajouter = 'Ajouter un menu commun';
128
    $etiquette_ajouter = 'Ajouter un menu commun';
129
    $retour .=     '<p>'."\n";
129
    $retour .=     '<p>'."\n";
Line 136... Line 136...
136
    $retour .=     '<a href="'.$url_ajout_menu_commun_n1.'">'.
136
    $retour .=     '<a href="'.$url_ajout_menu_commun_n1.'">'.
137
                            $etiquette_ajouter.'&nbsp;'.
137
                            $etiquette_ajouter.'&nbsp;'.
138
                            '<img class="'.ADME_CLASS_IMG_ICONE.'" src="'.ADME_IMAGE_NOUVEAU.'" alt="+" />'.
138
                            '<img class="'.ADME_CLASS_IMG_ICONE.'" src="'.ADME_IMAGE_NOUVEAU.'" alt="+" />'.
139
                        '</a>'."\n";
139
                        '</a>'."\n";
140
    $retour .=     '</p>'."\n";
140
    $retour .=     '</p>'."\n";
141
    $retour .= ADME_afficherListeMenuCommun($objet_pear_db, $objet_pear_url, $_GET['adme_site_id'], $_GET['adme_menu_id'], $_GET['adme_menu_ouvert'], 0);
141
    $retour .= ADME_afficherListeMenuCommun($objet_pear_db, $objet_pear_url, $_GET['adme_site_id'], $_GET['adme_menu_id'], $_GET['adme_action'], 0);
142
    return $retour;
142
    return $retour;
143
}
143
}
144
// +------------------------------------------------------------------------------------------------------+
144
// +------------------------------------------------------------------------------------------------------+
145
// |                                            PIED du PROGRAMME                                         |
145
// |                                            PIED du PROGRAMME                                         |
146
// +------------------------------------------------------------------------------------------------------+
146
// +------------------------------------------------------------------------------------------------------+
Line 147... Line 147...
147
 
147
 
148
 
148
 
149
/* +--Fin du code ----------------------------------------------------------------------------------------+
149
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
150
*
-
 
151
* $Log: not supported by cvs2svn $
-
 
152
* Revision 1.1  2004/11/04 12:26:42  jpm
150
*
153
* Contient les fonctions d'affichage général de l'appli ADME.
151
* $Log: not supported by cvs2svn $
154
*
152
*
155
*
153
* +-- Fin du code ----------------------------------------------------------------------------------------+
156
* +-- Fin du code ----------------------------------------------------------------------------------------+
154
*/
157
*/