/trunk/client/projet/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.6 2005-09-27 16:50:41 alexandre_tb Exp $ |
// CVS : $Id: projetControleur.class.php,v 1.7 2005-09-28 16:29:39 ddelon Exp $ |
/** |
* Application projet |
33,7 → 33,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.6 $ |
*@version $Revision: 1.7 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
388,6 → 388,8 |
$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) ; |
449,7 → 451,7 |
} |
$this->_url->addQueryString (PROJET_VARIABLE_ID_PROJET, $projet->getId()) ; |
$ligne_tableau = array ($projet->getId(), '<a href="'.PROJET_CHEMIN_ATELIERS.$projet->getId().'">'.$projet->getTitre().'</a>') ; |
$ligne_tableau = array ($projet->getId(), '<a href="'.$this->_url->getURL().'">'.$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(\''. |
495,7 → 497,7 |
foreach ($projetNonParticipantListe as $projet) { |
$this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $projet->getId()) ; |
$ligne_projet = array ( |
'<a href="'.PROJET_CHEMIN_ATELIERS.$projet->getId().'">'.$projet->getTitre().'</a>' // le nom du projet |
'<a href="'.$this->_url->getURL().'">'.$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/client/projet/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.3 2005-09-27 16:42:00 alexandre_tb Exp $ |
// CVS : $Id: HTML_listeDocuments.class.php,v 1.4 2005-09-28 16:29:39 ddelon Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ |
*@version $Revision: 1.4 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
121,8 → 121,9 |
* @return void |
* @access public |
*/ |
function __construct( $utilise_pager ) |
function __construct( &$url, $utilise_pager = false, $id_repertoire = 0, $auth = '' ) |
{ |
$this->HTML_listeDocuments($url, $utilise_pager, $id_repertoire, $auth); |
} // end of member function __construct |
/trunk/client/projet/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.3 2005-09-27 16:36:56 alexandre_tb Exp $ |
// CVS : $Id: HTML_listeProjet.class.php,v 1.4 2005-09-28 16:29:39 ddelon Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ |
*@version $Revision: 1.4 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
79,8 → 79,9 |
* @return void |
* @access public |
*/ |
function __construct( ) |
function __construct($utilise_pager = false) |
{ |
$this->HTML_listeProjet($utilise_pager); |
} // end of member function __cosntruct |
/trunk/client/projet/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.3 2005-09-27 16:42:00 alexandre_tb Exp $ |
// CVS : $Id: projet.class.php,v 1.4 2005-09-28 16:29:39 ddelon Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ |
*@version $Revision: 1.4 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
145,13 → 145,14 |
/** |
* |
* |
* PHP5 |
* @return projet |
* @access public |
*/ |
function __construct( ) |
function __construct( &$dbObject, $id_projet = "") |
{ |
$this->projet($dbObject, $id_projet); |
} // end of member function __construct |
/** |
491,6 → 492,9 |
} |
$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']. |
645,9 → 649,15 |
if (DB::isError ($resultat)) { |
die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ; |
} |
$ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ; |
$nom = strtoupper(substr($chaine, 0, 1)) ; |
$nom .= $ligne->p_id + 1 ; |
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 ; |
} |
return $nom ; |
} // end of member function genereNomRepertoire |
/trunk/client/projet/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.3 2005-09-27 16:38:35 alexandre_tb Exp $ |
// CVS : $Id: fichier.class.php,v 1.4 2005-09-28 16:29:39 ddelon Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ |
*@version $Revision: 1.4 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
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,8 → 117,9 |
* @return fichier |
* @access public |
*/ |
function __construct( $chemin ) |
function __construct( $chemin, &$objetDB = "" ) |
{ |
$this->fichier($chemin, $objetDB); |
} // end of member function __construct |
/trunk/client/projet/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.3 2005-09-27 16:38:11 alexandre_tb Exp $ |
// CVS : $Id: document.class.php,v 1.4 2005-09-28 16:29:39 ddelon Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ |
*@version $Revision: 1.4 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
135,21 → 135,22 |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
$ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ; |
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 ; |
} |
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 ; |
} |
} |
} |
} // end of member function document |
162,8 → 163,10 |
* @return document |
* @access public |
*/ |
function __construct( $id_document, &$objetDB ) |
function __construct( $id_document = "", &$objetDB, $chemin = '', $chemin_icones = '' ) |
{ |
$this->document($id_document, $objetDB, $chemin, $chemin_icones); |
} // end of member function __construct |
269,15 → 272,19 |
*/ |
function _isRacine( $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 ($ligne->pd_pere == null){ |
return true ; |
} |
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 ; |
} |
} |
} |
return false ; |
} // end of member function _isRacine |
319,19 → 326,22 |
} |
$ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ; |
$chemin_rep_id_nom = array() ; |
if ($ligne->pd_pere == 0) { |
$tab = array ($ligne->pd_id, $ligne->pd_nom) ; |
if ($resultat->numRows()>0) { |
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++) { |