Subversion Repositories Applications.projet

Compare Revisions

Ignore whitespace Rev 15 → Rev 14

/trunk/classes/projet.class.php
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: projet.class.php,v 1.4 2005-09-28 16:29:39 ddelon Exp $
// CVS : $Id: projet.class.php,v 1.3 2005-09-27 16:42:00 alexandre_tb Exp $
/**
* Application projet
*
31,7 → 31,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.4 $
*@version $Revision: 1.3 $
// +------------------------------------------------------------------------------------------------------+
*/
 
145,14 → 145,13
 
/**
*
* PHP5
*
* @return projet
* @access public
*/
function __construct( &$dbObject, $id_projet = "")
function __construct( )
{
$this->projet($dbObject, $id_projet);
} // end of member function __construct
 
/**
492,9 → 491,6
}
$id = SQL_obtenirNouveauId($this->_db, 'projet', 'p_id') ;
$requete = 'insert into projet set p_id='.$id ;
if (!isset($tableau_de_valeur['projet_wikini'])) {
$tableau_de_valeur['projet_wikini']='';
}
$requete .= ', p_titre="'.$tableau_de_valeur['projet_titre'].'", p_description="'.$tableau_de_valeur['projet_description'].'"'.
', p_espace_internet="'.$tableau_de_valeur['projet_espace_internet'].'", p_date_creation=NOW()'.
', p_wikini="'.$tableau_de_valeur['projet_wikini'].'", p_nom_repertoire="'.$nom_repertoire.'", p_resume="'.$tableau_de_valeur['projet_resume'].
649,15 → 645,9
if (DB::isError ($resultat)) {
die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ;
}
if ($resultat->numRows() > 0) {
$ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ;
$nom = strtoupper(substr($chaine, 0, 1)) ;
$nom .= $ligne->p_id + 1 ;
}
else {
$nom = strtoupper(substr($chaine, 0, 1)) ;
$nom .= 1 ;
}
$ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ;
$nom = strtoupper(substr($chaine, 0, 1)) ;
$nom .= $ligne->p_id + 1 ;
return $nom ;
} // end of member function genereNomRepertoire
/trunk/classes/fichier.class.php
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: fichier.class.php,v 1.4 2005-09-28 16:29:39 ddelon Exp $
// CVS : $Id: fichier.class.php,v 1.3 2005-09-27 16:38:35 alexandre_tb Exp $
/**
* Application projet
*
31,7 → 31,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.4 $
*@version $Revision: 1.3 $
// +------------------------------------------------------------------------------------------------------+
*/
 
97,7 → 97,7
* @return void
* @access public
*/
function fichier( $chemin, &$objetDB = "")
function fichier( $chemin, $objetDB = "")
{
$this->_chemin = $chemin ;
// On analyse l'extension pour découvrir le type mime
117,9 → 117,8
* @return fichier
* @access public
*/
function __construct( $chemin, &$objetDB = "" )
function __construct( $chemin )
{
$this->fichier($chemin, $objetDB);
} // end of member function __construct
 
/trunk/classes/document.class.php
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: document.class.php,v 1.4 2005-09-28 16:29:39 ddelon Exp $
// CVS : $Id: document.class.php,v 1.3 2005-09-27 16:38:11 alexandre_tb Exp $
/**
* Application projet
*
31,7 → 31,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.4 $
*@version $Revision: 1.3 $
// +------------------------------------------------------------------------------------------------------+
*/
 
135,22 → 135,21
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
}
$ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ;
if ($resultat->numRows()>0) {
fichier::fichier($chemin.$ligne->pd_lien, $this->_db) ;
$this->_id = $ligne->pd_id ;
if (is_object ($this->_type_mime)) $this->_type_mime->setCheminIcone ($chemin_icones) ;
$this->_id_proprietaire = $ligne->pd_ce_utilisateur ;
$this->_nom_long = $ligne->pd_nom ;
$this->_visibilite = $ligne->pd_visibilite ;
$this->_date_mise_a_jour = $ligne->pd_date_de_mise_a_jour ;
$this->_description = $ligne->pd_description ;
$this->_pd_lien = $ligne->pd_lien;
if ($this->_isRacine($ligne->pd_pere)) {
$this->_id_pere = 0 ;
} else {
$this->_id_pere = $ligne->pd_pere ;
}
}
fichier::fichier($chemin.$ligne->pd_lien, $this->_db) ;
$this->_id = $ligne->pd_id ;
if (is_object ($this->_type_mime)) $this->_type_mime->setCheminIcone ($chemin_icones) ;
$this->_id_proprietaire = $ligne->pd_ce_utilisateur ;
$this->_nom_long = $ligne->pd_nom ;
$this->_visibilite = $ligne->pd_visibilite ;
$this->_date_mise_a_jour = $ligne->pd_date_de_mise_a_jour ;
$this->_description = $ligne->pd_description ;
$this->_pd_lien = $ligne->pd_lien;
if ($this->_isRacine($ligne->pd_pere)) {
$this->_id_pere = 0 ;
} else {
$this->_id_pere = $ligne->pd_pere ;
}
}
} // end of member function document
163,10 → 162,8
* @return document
* @access public
*/
function __construct( $id_document = "", &$objetDB, $chemin = '', $chemin_icones = '' )
function __construct( $id_document, &$objetDB )
{
$this->document($id_document, $objetDB, $chemin, $chemin_icones);
} // end of member function __construct
 
272,19 → 269,15
*/
function _isRacine( $id_document )
{
if ($id_document) {
$requete = "select pd_pere from projet_documents where pd_id=".$id_document ;
$resultat = $this->_db->query ($requete) ;
if (DB::isError($resultat)) {
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
}
$ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT) ;
if ($resultat->numRows() >0) {
if ($ligne->pd_pere == null){
return true ;
}
}
}
$requete = "select pd_pere from projet_documents where pd_id=$id_document" ;
$resultat = $this->_db->query ($requete) ;
if (DB::isError($resultat)) {
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
}
$ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT) ;
if ($ligne->pd_pere == null){
return true ;
}
return false ;
} // end of member function _isRacine
 
326,22 → 319,19
}
$ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ;
$chemin_rep_id_nom = array() ;
if ($resultat->numRows()>0) {
if ($ligne->pd_pere == 0) {
$tab = array ($ligne->pd_id, $ligne->pd_nom) ;
if ($ligne->pd_pere == 0) {
$tab = array ($ligne->pd_id, $ligne->pd_nom) ;
return $tab ;
}
else {
$requete_pere = "select pd_id, pd_nom from projet_documents where pd_id=$ligne->pd_pere" ;
$resultat_pere = $objetDB->query ($requete_pere) ;
if (DB::isError($resultat_pere)) {
die ("Echec de la requete<br />".$resultat_pere->getMessage()."<br />".$resultat_pere->getDebugInfo()) ;
}
$ligne_pere = $resultat_pere->fetchRow (DB_FETCHMODE_OBJECT) ;
array_push ($chemin_rep_id_nom, $ligne->pd_id,$ligne->pd_nom) ;
$tab = document::getCheminIdRepertoire($ligne_pere->pd_id, $objetDB) ;
$chemin_rep_id_nom = array_merge ($chemin_rep_id_nom, $tab) ;
}
} else {
$requete_pere = "select pd_id, pd_nom from projet_documents where pd_id=$ligne->pd_pere" ;
$resultat_pere = $objetDB->query ($requete_pere) ;
if (DB::isError($resultat_pere)) {
die ("Echec de la requete<br />".$resultat_pere->getMessage()."<br />".$resultat_pere->getDebugInfo()) ;
}
$ligne_pere = $resultat_pere->fetchRow (DB_FETCHMODE_OBJECT) ;
array_push ($chemin_rep_id_nom, $ligne->pd_id,$ligne->pd_nom) ;
$tab = document::getCheminIdRepertoire($ligne_pere->pd_id, $objetDB) ;
$chemin_rep_id_nom = array_merge ($chemin_rep_id_nom, $tab) ;
}
$tabl_resultat = array() ;
for ($i = 0; $i < count ($chemin_rep_id_nom); $i++) {
/trunk/classes/projetControleur.class.php
20,7 → 20,7
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
 
// CVS : $Id: projetControleur.class.php,v 1.7 2005-09-28 16:29:39 ddelon Exp $
// CVS : $Id: projetControleur.class.php,v 1.6 2005-09-27 16:50:41 alexandre_tb Exp $
 
/**
* Application projet
33,7 → 33,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.7 $
*@version $Revision: 1.6 $
// +------------------------------------------------------------------------------------------------------+
*/
 
388,8 → 388,6
$arbre = new arbre() ;
// recherche du projet principal
$cime='';
foreach ($projetListe as $projet) {
$this->_url->addQueryString (PROJET_VARIABLE_ID_PROJET, $projet->getId()) ;
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_VOIR_PARTICIPANT) ;
451,7 → 449,7
}
$this->_url->addQueryString (PROJET_VARIABLE_ID_PROJET, $projet->getId()) ;
$ligne_tableau = array ($projet->getId(), '<a href="'.$this->_url->getURL().'">'.$projet->getTitre().'</a>') ;
$ligne_tableau = array ($projet->getId(), '<a href="'.PROJET_CHEMIN_ATELIERS.$projet->getId().'">'.$projet->getTitre().'</a>') ;
if ($auth) {
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_DESINSCRIPTION_PROJET) ;
array_push ($ligne_tableau, '<a href="'.$this->_url->getURL().'" onclick="javascript:return confirm(\''.
497,7 → 495,7
foreach ($projetNonParticipantListe as $projet) {
$this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $projet->getId()) ;
$ligne_projet = array (
'<a href="'.$this->_url->getURL().'">'.$projet->getTitre().'</a>' // le nom du projet
'<a href="'.PROJET_CHEMIN_ATELIERS.$projet->getId().'">'.$projet->getTitre().'</a>' // le nom du projet
) ;
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_S_INSCRIRE) ;
if ($auth) array_push ($ligne_projet, '<a href="'.$this->_url->getURL().'">'.PROJET_S_INSCRIRE.'</a>') ;
/trunk/classes/HTML_listeDocuments.class.php
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: HTML_listeDocuments.class.php,v 1.4 2005-09-28 16:29:39 ddelon Exp $
// CVS : $Id: HTML_listeDocuments.class.php,v 1.3 2005-09-27 16:42:00 alexandre_tb Exp $
/**
* Application projet
*
31,7 → 31,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.4 $
*@version $Revision: 1.3 $
// +------------------------------------------------------------------------------------------------------+
*/
 
121,9 → 121,8
* @return void
* @access public
*/
function __construct( &$url, $utilise_pager = false, $id_repertoire = 0, $auth = '' )
function __construct( $utilise_pager )
{
$this->HTML_listeDocuments($url, $utilise_pager, $id_repertoire, $auth);
} // end of member function __construct
 
/trunk/classes/HTML_listeProjet.class.php
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: HTML_listeProjet.class.php,v 1.4 2005-09-28 16:29:39 ddelon Exp $
// CVS : $Id: HTML_listeProjet.class.php,v 1.3 2005-09-27 16:36:56 alexandre_tb Exp $
/**
* Application projet
*
31,7 → 31,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.4 $
*@version $Revision: 1.3 $
// +------------------------------------------------------------------------------------------------------+
*/
 
79,9 → 79,8
* @return void
* @access public
*/
function __construct($utilise_pager = false)
function __construct( )
{
$this->HTML_listeProjet($utilise_pager);
} // end of member function __cosntruct