Subversion Repositories Applications.papyrus

Rev

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

Rev 1372 Rev 1398
Line 8... Line 8...
8
*   | Affiche les derniers fichiers uploader dans le module projet          |
8
*   | Affiche les derniers fichiers uploader dans le module projet          |
9
*   +-----------------------------------------------------------------------+
9
*   +-----------------------------------------------------------------------+
10
*   | Auteur : Alexandre Granier <alexandre@tela-botanica.org> 		        |
10
*   | Auteur : Alexandre Granier <alexandre@tela-botanica.org> 		        |
11
*   +-----------------------------------------------------------------------+
11
*   +-----------------------------------------------------------------------+
Line 12... Line 12...
12
 
12
 
13
*   $Id: projet_derniers_telechargements.php,v 1.4 2007-04-19 09:17:35 alexandre_tb Exp $
13
*   $Id: projet_derniers_telechargements.php,v 1.4.2.1 2007-05-11 13:59:27 alexandre_tb Exp $
Line 14... Line 14...
14
*/
14
*/
15
 
15
 
Line 29... Line 29...
29
define ("PROJET_TELECHARGEMENT_DERNIERS", "Derniers documents mis en ligne") ;
29
define ("PROJET_TELECHARGEMENT_DERNIERS", "Derniers documents mis en ligne") ;
30
define ("PROJET_TELECHARGEMENT_TOUS", "Tous les documents, par projet") ;
30
define ("PROJET_TELECHARGEMENT_TOUS", "Tous les documents, par projet") ;
Line 31... Line 31...
31
 
31
 
32
//=============bibliothèques PEAR  ===================================
32
//=============bibliothèques PEAR  ===================================
33
include_once 'HTML/Table.php' ;
-
 
Line 34... Line 33...
34
include_once 'HTML/TreeMenu.php' ;
33
include_once 'HTML/Table.php' ;
35
 
34
 
36
// ========== Bibliothèque Projet ====================================
35
// ========== Bibliothèque Projet ====================================
37
include_once 'configuration/projet.config.inc.php' ;
36
include_once 'configuration/projet.config.inc.php' ;
38
include_once PROJET_CHEMIN_CLASSES.'projetControleur.class.php' ;
37
include_once PROJET_CHEMIN_CLASSES.'projetControleur.class.php' ;
Line 39... Line 38...
39
include_once PROJET_CHEMIN_CLASSES.'document.class.php' ;
38
include_once PROJET_CHEMIN_CLASSES.'document.class.php' ;
40
include_once PROJET_CHEMIN_APPLI.'langues/pro_langue_fr.inc.php' ;
39
include_once PROJET_CHEMIN_APPLI.'langues/pro_langue_fr.inc.php' ;
41
 
-
 
Line -... Line 40...
-
 
40
 
-
 
41
 
-
 
42
function afficherContenuCorps() {
42
 
43
    global $id_projet, $repcourant, $baseURL, $projet ;
43
function afficherContenuCorps() {
44
    
Line 44... Line 45...
44
    global $id_projet, $repcourant, $baseURL, $projet ;
45
    if (isset($_GET['service']) && $_GET['service'] == 'ecouteArbreFichier') {
Line 62... Line 63...
62
    $vue_liste_document->construitListe ($liste_documents, $droits, 'ignore_repertoire', $GLOBALS['projet_db']) ;
63
    $vue_liste_document->construitListe ($liste_documents, $droits, 'ignore_repertoire', $GLOBALS['projet_db']) ;
63
    $res .= $vue_liste_document->toHTML() ;
64
    $res .= $vue_liste_document->toHTML() ;
Line 64... Line 65...
64
    
65
    
Line 65... Line -...
65
    $res .= "<h2>".PROJET_TELECHARGEMENT_TOUS."</h2>\n" ;
-
 
66
    
-
 
67
    // Création de l'objet TreeMenu
66
    $res .= "<h2>".PROJET_TELECHARGEMENT_TOUS."</h2>\n" ;
68
    //GEN_stockerFichierScript(1, "api/TreeMenu/TreeMenu.js") ;
67
    
69
    
68
 
70
    // Les noms des fichiers graphiques
69
    // Les noms des fichiers graphiques
Line 71... Line 70...
71
    $icon         = 'folder.gif';
70
    $icon         = 'folder.gif';
72
    $expandedIcon = 'folder-expanded.gif';
71
    $expandedIcon = 'folder-expanded.gif';
73
    
72
    
74
    $i = 0 ;
73
    $i = 0 ;
Line 75... Line -...
75
    // Requete sur les projets
-
 
76
    $requete = "SELECT p_titre, p_id FROM projet ORDER BY p_titre" ;
-
 
77
    $resultat = $GLOBALS['projet_db']->query ($requete) or die ("Echec <br />".mysql_error()."<br />$requete") ;
74
    // Requete sur les projets
78
    
75
    $requete = "SELECT p_titre, p_id FROM projet ORDER BY p_titre" ;
79
//    $menu = new HTML_TreeMenu() ;
76
    $resultat = $GLOBALS['projet_db']->query ($requete) or die ("Echec <br />".mysql_error()."<br />$requete") ;
80
//    $node = new HTML_TreeNode(array('text' => "Les projets de Tela Botanica", 'link' => "", 'icon' => $icon, 'expandedIcon' => $expandedIcon));
-
 
81
    $noeudProjet = '' ;
-
 
82
    while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
77
    
83
        $titre = $ligne->p_titre ;
78
    $noeudProjet = '' ;
84
//        $node_1[$i] = &$node->addItem (new HTML_TreeNode(array('text' => $titre, 'link' => "", 'icon' => $icon, 'expandedIcon' => $expandedIcon)));
79
    while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
85
//        projet_fichiers (&$node_1[$i], $ligne->p_id) ;
80
        $titre = $ligne->p_titre ;
86
        $i++ ;
-
 
87
        $noeudProjet .= '<div dojoType="TreeNode" title="'.$ligne->p_titre.'" widgetId="projet_'.
-
 
88
        				$ligne->p_id.'" objectId="projet_'.$ligne->p_id.'" isFolder="true"></div>'."\n";
-
 
89
    }
81
        $i++ ;
90
//    $menu->addItem($node);
82
        $noeudProjet .= '<div dojoType="TreeNode" title="'.$ligne->p_titre.'" widgetId="projet_'.
91
//    $treeMenu = &new HTML_TreeMenu_DHTML($menu, array('images' => 'api/TreeMenu/images', 'defaultClass' => 'text'));
83
        				$ligne->p_id.'" objectId="projet_'.$ligne->p_id.'" isFolder="true"></div>'."\n";
92
//    $res .= "<p>".$treeMenu->toHTML()."</p>\n" ;
84
    }
-
 
85
  
93
    
86
    GEN_stockerFichierScript('dojo', 'api/js/dojo/dojo.js', 'text/javascript');
-
 
87
    GEN_stockerFichierScript('dojoScriptProjet', PROJET_CHEMIN_APPLI.'js/telechargement.js');
-
 
88
    //$res .= '<p>' ;
-
 
89
    
94
    GEN_stockerFichierScript('dojo', 'api/js/dojo/dojo.js', 'text/javascript');
90
    $RCPUrl = PROJET_CHEMIN_APPLI.'services/ecouteArbreFichier.php?id_projet='.$id_projet;
95
    GEN_stockerFichierScript('dojoScriptProjet', PROJET_CHEMIN_APPLI.'js/telechargement.js');
91
	$GLOBALS['url']->addQueryString(PROJET_VARIABLE_SERVICE, 'ecouteArbreFichier');
96
    //$res .= '<p>' ;
92
			
97
    $RPCUrl = PROJET_CHEMIN_APPLI.'services/ecouteArbreFichier.php';
93
	$RCPUrl = $GLOBALS['url']->getURL();
98
    $res .= '<div dojoType="TreeLoadingController" RPCUrl="'.$RPCUrl.'" widgetId="treeController" DNDController="create"></div>
94
    $res .= '<div dojoType="TreeLoadingController" RPCUrl="'.$RCPUrl.'" widgetId="treeController" DNDController="create"></div>
Line 164... Line 160...
164
    }
160
    }
165
    $requete_fichiers .= ' ORDER BY projet_documents.pd_nom ASC' ;
161
    $requete_fichiers .= ' ORDER BY projet_documents.pd_nom ASC' ;
Line 166... Line 162...
166
 
162
 
167
    $resultat_fichiers = $GLOBALS['projet_db']->query($requete_fichiers) ;
163
    $resultat_fichiers = $GLOBALS['projet_db']->query($requete_fichiers) ;
168
    if (DB::isError ($resultat_fichiers)) {
164
    if (DB::isError ($resultat_fichiers)) {
169
        die ('Echec de la requete : '.$requete.'<br />'.$resultat_fichiers->getMessage()) ;
165
        die ('Echec de la requete : '.$requete_fichiers.'<br />'.$resultat_fichiers->getMessage()) ;
Line 170... Line 166...
170
    }
166
    }
171
    
167
    
172
    //Stockage des informations sur les fichiers du répertoires courant pour affichage dans un arbre
168
    //Stockage des informations sur les fichiers du répertoires courant pour affichage dans un arbre
Line 185... Line 181...
185
}
181
}
Line 186... Line 182...
186
 
182
 
187
/* +--Fin du code ----------------------------------------------------------------------------------------+
183
/* +--Fin du code ----------------------------------------------------------------------------------------+
188
*
184
*
-
 
185
* $Log: not supported by cvs2svn $
-
 
186
* Revision 1.4  2007/04/19 09:17:35  alexandre_tb
-
 
187
* utilisation de dojo pour afficher l arbre des derniers documents
189
* $Log: not supported by cvs2svn $
188
*
190
* Revision 1.3  2005/10/06 08:23:48  alexandre_tb
189
* Revision 1.3  2005/10/06 08:23:48  alexandre_tb
191
* Ajout de commentaires
190
* Ajout de commentaires
192
*
191
*
193
*
192
*