/trunk/client/bazar/bibliotheque/bazar.fonct.cal.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: bazar.fonct.cal.php,v 1.19 2007-06-25 08:29:04 alexandre_tb Exp $ |
// CVS : $Id: bazar.fonct.cal.php,v 1.20 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* |
* Fonctions calendrier du module bazar |
29,7 → 29,7 |
*@author David Delon <david.delon@clapas.net> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.19 $ $Date: 2007-06-25 08:29:04 $ |
*@version $Revision: 1.20 $ $Date: 2007-06-25 12:15:06 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
150,7 → 150,8 |
"AND month(bf_date_debut_evenement) = ".date('m',$curStamp)." ". |
"AND bf_ce_nature = bn_id_nature ". |
"AND bn_id_nature IN (".BAZ_NUM_ANNONCE_CALENDRIER.") ". |
"AND bf_statut_fiche = 1"; |
"AND bf_statut_fiche = 1 ". |
"ORDER BY bf_jour_debut_evenement"; |
$resultat_evenement = $db->query($requete_evenements); |
/trunk/client/bazar/bibliotheque/bazar.fonct.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: bazar.fonct.php,v 1.65 2007-06-25 08:31:17 alexandre_tb Exp $ |
// CVS : $Id: bazar.fonct.php,v 1.66 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* |
* Fonctions du module bazar |
31,7 → 31,7 |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.65 $ $Date: 2007-06-25 08:31:17 $ |
*@version $Revision: 1.66 $ $Date: 2007-06-25 12:15:06 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
111,28 → 111,42 |
$lien_voir->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$lien_voir->addQueryString('typeannonce', $ligne['bn_id_nature']); |
$lien_publie_oui=$GLOBALS['_BAZAR_']['url']; |
$lien_publie_oui->addQueryString('action', BAZ_ACTION_PUBLIER); |
$lien_publie_oui->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$lien_publie_oui->addQueryString('typeannonce', $ligne['bn_id_nature']); |
// Nettoyage de l'url |
// NOTE (jpm - 23 mai 2007): pour être compatible avec PHP5 il faut utiliser tjrs $GLOBALS['_BAZAR_']['url'] car en php4 on |
// copie bien une variable mais pas en php5, cela reste une référence... |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce'); |
$lien_publie_non=$GLOBALS['_BAZAR_']['url']; |
$lien_publie_non->addQueryString('action', BAZ_ACTION_PAS_PUBLIER); |
$lien_publie_non->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$lien_publie_non->addQueryString('typeannonce', $ligne['bn_id_nature']); |
$GLOBALS['_BAZAR_']['url']->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$GLOBALS['_BAZAR_']['url']->addQueryString('typeannonce', $ligne['bn_id_nature']); |
$lien_supprimer=$GLOBALS['_BAZAR_']['url']; |
$lien_supprimer->addQueryString('action', BAZ_ACTION_SUPPRESSION); |
$lien_supprimer->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$lien_supprimer->addQueryString('typeannonce', $ligne['bn_id_nature']); |
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_FICHE); |
$lien_voir = $GLOBALS['_BAZAR_']['url']->getURL(); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action'); |
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_ACTION_PUBLIER); |
$lien_publie_oui = $GLOBALS['_BAZAR_']['url']->getURL(); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action'); |
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_ACTION_PAS_PUBLIER); |
$lien_publie_non = $GLOBALS['_BAZAR_']['url']->getURL(); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action'); |
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_ACTION_SUPPRESSION); |
$lien_supprimer = $GLOBALS['_BAZAR_']['url']->getURL(); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce'); |
$table->addRow (array( |
'<a href="'.$lien_voir->getURL().'">'.$ligne['bf_titre'].'</a>'."\n", // col 1 : le nom |
'<a href="'.$lien_voir.'">'.$ligne['bf_titre'].'</a>'."\n", // col 1 : le nom |
$annonceur."\n", // col 2 : annonceur |
$ligne['bn_label_nature']."\n", // col 3 : type annonce |
"<a href=\"".$lien_publie_oui->getURL()."\">".BAZ_OUI."</a> / \n". |
"<a href=\"".$lien_publie_non->getURL()."\">".BAZ_NON."</a>", // col 4 : publier ou pas |
"<a href=\"".$lien_supprimer->getURL()."\"". |
"<a href=\"".$lien_publie_oui."\">".BAZ_OUI."</a> / \n". |
"<a href=\"".$lien_publie_non."\">".BAZ_NON."</a>", // col 4 : publier ou pas |
"<a href=\"".$lien_supprimer."\"". |
" onclick=\"javascript:return confirm('".BAZ_CONFIRMATION_SUPPRESSION."');\">".BAZ_SUPPRIMER."</a>\n")) ; // col 5 : supprimer |
} |
185,19 → 199,19 |
elseif ($ligne['bf_statut_fiche']==0) $publiee=BAZ_ENCOURSDEVALIDATION; |
else $publiee=BAZ_REJETEE; |
$lien_voir=$GLOBALS['_BAZAR_']['url']; |
$lien_voir = $GLOBALS['_BAZAR_']['url']; |
$lien_voir->addQueryString('action', BAZ_VOIR_FICHE); |
$lien_voir->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$lien_voir->addQueryString('typeannonce', $ligne['bn_id_nature']); |
$lien_voir_url=$lien_voir->getURL(); |
$lien_modifier=$GLOBALS['_BAZAR_']['url']; |
$lien_modifier = $GLOBALS['_BAZAR_']['url']; |
$lien_modifier->addQueryString('action', BAZ_ACTION_MODIFIER); |
$lien_modifier->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$lien_modifier->addQueryString('typeannonce', $ligne['bn_id_nature']); |
$lien_modifier_url=$lien_modifier->getURL(); |
$lien_supprimer=$GLOBALS['_BAZAR_']['url']; |
$lien_supprimer = $GLOBALS['_BAZAR_']['url']; |
$lien_supprimer->addQueryString('action', BAZ_ACTION_SUPPRESSION); |
$lien_supprimer->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$lien_supprimer->addQueryString('typeannonce', $ligne['bn_id_nature']); |
374,7 → 388,7 |
$table->setRowType (0, 'th') ; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$droits=niveau_droit($ligne['bn_id_nature'],$personne); |
$droits = niveau_droit($ligne['bn_id_nature'],$personne); |
$lien_aucun_droit=$GLOBALS['_BAZAR_']['url']; |
$lien_aucun_droit->addQueryString('action', BAZ_GERER_DROITS); |
1306,6 → 1320,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.65 2007-06-25 08:31:17 alexandre_tb |
* utilisation de la bibliotheque generale api/formulaire/formulaire.fonct.inc.php a la place de bazar.fonct.formulaire.php |
* |
* Revision 1.64 2007-06-04 15:25:39 alexandre_tb |
* ajout de la carto google |
* |
/trunk/client/bazar/bibliotheque/bazar.fonct.rss.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: bazar.fonct.rss.php,v 1.84 2007-06-25 09:56:55 alexandre_tb Exp $ |
// CVS : $Id: bazar.fonct.rss.php,v 1.85 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* |
*@package bazar |
28,7 → 28,7 |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision: 1.84 $ |
*@version $Revision: 1.85 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
169,7 → 169,7 |
: ''; |
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ; |
if (!isset($GLOBALS['_BAZAR_']['typeannonce'])) $GLOBALS['_BAZAR_']['typeannonce'] = $ligne['bn_label_nature']; |
if (!isset($GLOBALS['_BAZAR_']['typeannonce'])) $GLOBALS['_BAZAR_']['typeannonce'] = $ligne['bf_ce_nature']; |
if (!isset($GLOBALS['_BAZAR_']['fiche_valide'])) $GLOBALS['_BAZAR_']['fiche_valide'] = $ligne['bf_statut_fiche']; |
//on verifie si l'utilisateur est administrateur |
$est_admin=0; |
1026,7 → 1026,24 |
$GLOBALS['_BAZAR_']['url']->addQueryString('action',BAZ_VOIR_FLUX_RSS); |
$GLOBALS['_BAZAR_']['url']->addQueryString('annonce',$GLOBALS['_BAZAR_']['id_typeannonce']); |
if ($GLOBALS['_BAZAR_']['categorie_nature']!=0) $GLOBALS['_BAZAR_']['url']->addQueryString('categorie_nature',$GLOBALS['_BAZAR_']['categorie_nature']); |
$res .= '{{Syndication titre="'.BAZ_DERNIERES_FICHES.'" url="'.$GLOBALS['_BAZAR_']['url']->getURL().'" nb=10 nouvellefenetre=0 formatdate="'.BAZ_TYPE_AFFICHAGE_LISTE.'"}}'; |
// $res .= '{{Syndication titre="'.BAZ_DERNIERES_FICHES.'" url="'.$GLOBALS['_BAZAR_']['url']->getURL().'" nb=10 nouvellefenetre=0 formatdate="'.BAZ_TYPE_AFFICHAGE_LISTE.'"}}'; |
$requete = 'SELECT DISTINCT bf_id_fiche, bf_titre, bf_date_debut_validite_fiche, bf_description, bn_label_nature, bf_date_creation_fiche FROM bazar_fiche, bazar_nature WHERE bn_id_nature=bf_ce_nature AND bn_ce_id_menu="'.$GLOBALS['_BAZAR_']['categorie_nature'].'" AND (bf_date_debut_validite_fiche<=NOW() or bf_date_debut_validite_fiche="0000-00-00") AND (bf_date_fin_validite_fiche>=NOW() or bf_date_fin_validite_fiche="0000-00-00") |
ORDER BY bf_date_creation_fiche DESC, bf_date_fin_validite_fiche DESC, bf_date_maj_fiche DESC'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete); |
if (DB::isError($resultat)) { |
return ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
if($resultat->numRows() != 0) { |
$res .= '<h2>'.BAZ_DERNIERES_FICHES.'</h2>'; |
$res .= '<ul class="liste_rss">'; |
while($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) |
{ |
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_FICHE); |
$GLOBALS['_BAZAR_']['url']->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$res .= '<li class="titre_rss"><a class="lien_rss" href="'. $GLOBALS['_BAZAR_']['url']->getURL() .'" alt="lire la fiche">'. $ligne['bf_titre'].'</a></li>'; |
} |
$res .= '</ul>'; |
} |
} |
} |
1187,6 → 1204,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.84 2007-06-25 09:56:55 alexandre_tb |
* correction de bug |
* |
* Revision 1.83 2007-06-04 15:26:02 alexandre_tb |
* remplacement d un die en return |
* |
/trunk/client/bazar/bibliotheque/bazarTemplate.class.php |
---|
20,7 → 20,7 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: bazarTemplate.class.php,v 1.2 2007-03-28 09:20:29 florian Exp $ |
// CVS : $Id: bazarTemplate.class.php,v 1.3 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
33,7 → 33,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.2 $ |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
55,7 → 55,10 |
function getTemplate ($id_template, $lang='fr-FR', $categorie_nature = 0) { |
$requete = 'select bt_template from bazar_template where bt_id_template='.$id_template. |
' and bt_id_i18n like "'.$lang.'%"' ; |
$requete .= ' and bt_categorie_nature='.$categorie_nature ; |
if($categorie_nature != 0) |
$requete .= ' and bt_categorie_nature='.$categorie_nature ; |
$resultat = $this->_db->query($requete) ; |
if (DB::isError($resultat)) return $this->raiseError ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
if ($resultat->numRows() == 0) return $this->raiseError ('Aucun template avec l\'identifiant: '.$id_template. |
/trunk/client/bazar/langues/baz_langue_fr.inc.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: baz_langue_fr.inc.php,v 1.54 2007-06-25 09:57:51 alexandre_tb Exp $ |
// CVS : $Id: baz_langue_fr.inc.php,v 1.55 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Fichier de traduction en français de l'application Bazar |
* |
30,7 → 30,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.54 $ $Date: 2007-06-25 09:57:51 $ |
*@version $Revision: 1.55 $ $Date: 2007-06-25 12:15:06 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
78,7 → 78,7 |
define ('BAZ_REJETEE', 'Rejetée'); |
define ('BAZ_PUBLIEE', 'Publiée') ; |
define ('BAZ_PAS_DE_FICHE', '<br />Vous n\'avez pas encore déposé de fiches.') ; |
define ('BAZ_PAS_DE_FICHE_A_VALIDER', 'Pas de fiches a valider pour l\'instant.'); |
define ('BAZ_PAS_DE_FICHE_A_VALIDER', 'Pas de fiches à valider pour l\'instant.'); |
define ('BAZ_VOS_ANNONCES', 'Vos fiches déposées') ; |
define ('BAZ_ANNONCES_A_ADMINISTRER', 'Les fiches à valider') ; |
define ('BAZ_MOTS_DE_PASSE_DIFFERENTS', 'Les mots de passe sont différents !') ; |
124,7 → 124,7 |
define ('BAZ_SE_DESABONNER', 'Se désabonner'); |
define ('BAZ_RSS', 'Flux RSS'); |
define ('BAZ_DERNIERE_ACTU', 'Dernières actualités'); |
if (!defined ('BAZ_DERNIERES_FICHES')) define ('BAZ_DERNIERES_FICHES', 'Les dernière fiches enregistrées'); |
if (!defined ('BAZ_DERNIERES_FICHES')) define ('BAZ_DERNIERES_FICHES', 'Les dernières fiches enregistrées'); |
define ('BAZ_A_MODERER',' à modérer'); |
define ('BAZ_CONSULTER','Consulter'); |
define ('BAZ_SAISIR','Saisir'); |
455,6 → 455,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.54 2007-06-25 09:57:51 alexandre_tb |
* nouveaux labels |
* |
* Revision 1.53 2007-06-04 15:26:42 alexandre_tb |
* nouveaux labels |
* |
/trunk/client/bazar/documentation/bazar_v0.24.sql |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/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.8 2007-04-19 15:34:35 neiluj Exp $ |
// CVS : $Id: projet.class.php,v 1.9 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.8 $ |
*@version $Revision: 1.9 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
371,42 → 371,43 |
} |
/** |
* Renvoie la liste des documents associés sous forme d'un tableau, avec les |
* Renvoie la liste des documents associes sous forme d'un tableau, avec les |
* informations afférentes. 0 => "nom (cliquable)" |
"Taille" |
"Date |
* de création" "Proriàtaire" "Visibilità" "Action |
* de creation" "Prorietaire" "Visibilite" "Action |
* (cliquable)" |
* |
* @param visibilite visibilite Si visibilite est à prive, tous les fichiers sont renvoyés ainsi qu'une entrée |
* pour indiquer la visibilité du document. |
* @param visibilite visibilite Si visibilite est prive, tous les fichiers sont renvoyes ainsi qu'une entree |
* pour indiquer la visibilite du document. |
* @return Array |
* @access public |
*/ |
function getListesDocuments( $chemin, $chemin_icones = "icones/" ) |
function getListesDocuments( $chemin, $chemin_icones = "icones/", $id_repertoire = '' ) |
{ |
// On réalise une requete sur projet_documents avec une jointure sur l'annuaire |
// et sur gen_type_de_fichier pour envoyer un résultat complet. |
// On realise une requete sur projet_documents avec une jointure sur l'annuaire |
// et sur gen_type_de_fichier pour envoyer un resultat complet. |
// On exclue les fichiers racines cad pd_pere is null |
$requete = "select pd_id from projet_documents where pd_ce_projet=".$this->_id_projet.' order by pd_nom' ; |
$requete = "select pd_id from projet_documents where pd_ce_projet=".$this->_id_projet ; |
if ($id_repertoire != '') $requete .= ' and pd_pere='.$id_repertoire; |
if ($id_repertoire == 0) $requete .= ' and pd_pere=0'; |
$requete .= ' order by pd_nom' ; |
$resultat = $this->_db->query ($requete) ; |
if (DB::isError($resultat)) { |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
$tableau_document = array() ; |
// Un compteur |
$i = 0 ; |
while ($ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT)) { |
array_push ($tableau_document, new document ($ligne->pd_id, &$this->_db, $chemin, $chemin_icones)) ; |
} |
return $tableau_document ; |
} // end of member function getListesDocuments |
} |
/** |
* Renvoie un tableau avec tous les répertoires d'un projet, imbriqué. ['rep1'], |
* Renvoie un tableau avec tous les repertoires d'un projet, imbrique. ['rep1'], |
* ['rep2'] => array (['rep21'], ['rep22']), etc . |
* |
* @return Array |
414,21 → 415,56 |
*/ |
function getListeRepertoireHierarchisee( ) |
{ |
// On ne prend que les répertoires |
$requete = "select pd_id from projet_documents where pd_ce_projet=".$this->_id_projet.' and pd_ce_type=0 order by pd_nom' ; |
// On ne prend que les repertoires |
$requete = "select pd_id, pd_pere, pd_nom from projet_documents where pd_ce_projet=".$this->_id_projet.' and pd_ce_type=0 order by pd_nom' ; |
$resultat = $this->_db->query ($requete) ; |
if (DB::isError($resultat)) { |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
$tableau_document = array() ; |
/* |
while ($ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT)) { |
array_push ($tableau_document, new document ($ligne->pd_id, $this->_db)); |
} |
*/ |
$tableau = array(); |
$tab = array(); |
return $tableau_document ; |
while ($ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT)) { |
array_push ($tableau, array ('id' => $ligne->pd_id, |
'id_pere' => $ligne->pd_pere, |
'fils' => array(), |
'label' => $ligne->pd_nom)); |
} |
// la $tableau reste un tableau de valeur a plat |
$i = 0; |
foreach ($tableau as $noeud) { |
// On teste si le noeud est racine si oui on l ajoute a l arbre sinon on ne l ajoute pas |
if ($noeud['id_pere'] == 0) { |
$tab[$i] = $noeud; |
$this->construireArbre($tab[$i], $tableau) ; |
} |
$i++; |
} |
return $tab; |
} // end of member function getListeRepertoireHierarchisee |
function construireArbre(&$noeud, $tableau) { |
$j = 0; |
foreach ($tableau as $element) { |
// pour chaque element on teste |
if ($element['id_pere'] == $noeud['id']) { |
$noeud['fils'][$j]= $element ; |
$this->construireArbre($noeud['fils'][$j],$tableau); |
} |
$j++; |
} |
} |
/** |
* Renvoie un tableau comprenant tous les objets projet de la base. |
440,7 → 476,7 |
function getTousLesProjets(&$objetDB, $exclu = '') |
{ |
$sql = ''; |
if (count($this->_projet_exclu)) { |
if (isset ($this->_projet_exclu) && count($this->_projet_exclu)) { |
$sql = 'where p_id not in ('; |
foreach ($this->_projet_exclu as $valeur) { |
$sql .= $valeur.',' ; |
/trunk/client/projet/classes/HTML_formulaireCouperColler.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_formulaireCouperColler.class.php,v 1.2 2005-09-27 16:39:25 alexandre_tb Exp $ |
// CVS : $Id: HTML_formulaireCouperColler.class.php,v 1.3 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.2 $ |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
39,6 → 39,8 |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
require_once 'HTML/QuickForm.php' ; |
/** |
* class HTML_formulaireCouperColler |
* |
58,18 → 60,13 |
$squelette->setElementTemplate( '<li style="list-style-type: none;">'."\n".'{element}'."\n".'</li>'."\n"); |
$this->addElement('radio', 'projet_repertoire', '', PROJET_RACINE, 0) ; |
if (count ($tableau_repertoire)) { |
$this->addElement('html', '<ul>') ; |
foreach ($tableau_repertoire as $cle => $valeur) { |
if ($valeur->_id_pere ==0) { |
$this->addElement ('radio', 'projet_repertoire', '', $valeur->getNomLong(), $valeur->getIdDocument()) ; |
$sous_tableau = array() ; |
foreach ($tableau_repertoire as $valeur_fils) { |
if ($valeur_fils->_id_pere == $valeur->getIdDocument()) { |
array_push ($sous_tableau, $valeur_fils) ; |
} |
} |
if (count ($sous_tableau)) $this->construitLigneRepertoire($sous_tableau) ; |
foreach ($tableau_repertoire as $valeur) { |
if ($valeur['id_pere'] ==0) { |
$this->addElement ('radio', 'projet_repertoire', '', $valeur['label'], $valeur['id']) ; |
if (count ($valeur['fils'])) $this->construireArbreRadio ($valeur['fils']); |
} |
} |
$this->addElement('html', '</ul>') ; |
82,13 → 79,20 |
$buttons[] = &HTML_QuickForm::createElement('link', 'annuler', '', |
preg_replace ("/&/", "&", $url_annuler->getURL()), PROJET_FICHIER_ANNULER |
); // Le preg_replace contourne un pb de QuickForm et Net_URL |
// qui remplacent deux fois les & par des & |
// ce qui fait échouer le lien |
// qui remplacent deux fois les & par des & |
// ce qui fait échouer le lien |
$buttons[] = &HTML_QuickForm::createElement('submit', 'valider_inscription_projet', PROJET_FICHIER_VALIDER); |
$this->addGroup($buttons, null, null, ' '); |
} // end of member function construitFormulaire |
function construireArbreRadio(&$noeud) { |
foreach ($noeud as $val) { |
$this->addElement('html', '<ul>') ; |
$this->construitLigneRepertoire($val) ; |
if (count($val['fils'])) $this->construireArbreRadio ($val['fils']) ; |
$this->addElement('html', '</ul>') ; |
} |
} |
/** |
* |
* |
96,11 → 100,9 |
* |
*/ |
function construitLigneRepertoire($tableau) { |
function construitLigneRepertoire($noeud) { |
$this->addElement('html', '<ul>') ; |
foreach ($tableau as $valeur) { |
$this->addElement('radio', 'projet_repertoire', '', $valeur->getNomLong(), $valeur->getIdDocument()) ; |
} |
$this->addElement('radio', 'projet_repertoire', '', $noeud['label'], $noeud['id']) ; |
$this->addElement('html', '</ul>') ; |
} |
/** |
127,6 → 129,6 |
$res .= '<h2>'.PROJET_CHOISISSEZ_REPERTOIRE.'</h2>' ; |
$res .= HTML_QuickForm::toHTML() ; |
return $res ; |
} // end of member function toHTML |
} // end of HTML_formulaireCouperColler |
} |
} |
?> |
/trunk/client/projet/classes/ezmlm-php-2.0/ezmlm-msgdisplay.php |
---|
1,5 → 1,5 |
<?php |
// $Id: ezmlm-msgdisplay.php,v 1.4 2007-04-19 15:34:35 neiluj Exp $ |
// $Id: ezmlm-msgdisplay.php,v 1.5 2007-06-25 12:15:07 alexandre_tb Exp $ |
// |
// ezmlm-msgdisplay.php - ezmlm-php v2.0 |
// -------------------------------------------------------------- |
148,7 → 148,7 |
$numero = substr($decimal, -2) ; |
$fichier_suivant = $numero ; |
} else { |
if ($fichier_suivant < 9)$fichier_suivant = '0'.$fichier_suivant; |
if ($fichier_suivant <= 9)$fichier_suivant = '0'.$fichier_suivant; |
} |
break; |
/trunk/client/projet/classes/ezmlm-php-2.0/services_vpopmail/derniers_messages.php |
---|
13,7 → 13,11 |
ob_start() ; |
if (!$info->show_recentmsgs()) { |
if (!$info) return 'Les fichiers de la liste ne sont pas visible sur le serveur' ; |
if (!$info) { |
ob_end_clean() ; |
echo 'Les fichiers de la liste ne sont pas visible sur le serveur' ; |
exit(); |
} |
} |
$html = ob_get_contents() ; |
ob_end_clean() ; |
/trunk/client/projet/classes/ezmlm-php-2.0/services_vpopmail/message.php |
---|
14,6 → 14,7 |
$num_message = $actionargs[1] ; |
if ($id_rep =='' || $num_message == '') exit(); |
$html = $message->display ($id_rep.'/'.$num_message) ; |
include_once 'XML/Util.php' ; |
20,6 → 21,17 |
$xml = XML_Util::getXMLDeclaration('1.0', 'ISO-8859-15', 'no') ; |
if (!$html) { |
$xml .= XML_Util::createStartElement ('erreur') ; |
$xml .= 'Le message n\'existe pas'; |
$xml .= XML_Util::createEndElement('erreur') ; |
header ('Content-type: text/xml'); |
echo $xml; |
exit(); |
} |
$xml .= XML_Util::createStartElement ('ezmlm_message', array('domaine' => $domaine, 'liste' => $liste, 'langue' => $langue)) ; |
$xml .= "\n".'<![CDATA[ '.$html.']]>'; |
/trunk/client/projet/classes/ezmlm-php-2.0/services_vpopmail/liste_abonnes.php |
---|
1,17 → 1,78 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU General Public | |
// | 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: liste_abonnes.php,v 1.3 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
* |
* Le service liste abonne |
* |
*@package projet |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
$repertoire = '/home/vpopmail/domains/'.$domaine.'/'.$liste ; |
exec ('ezmlm-list '.$repertoire, $output, $ret) ; |
/* Le service attend 2 parametres |
* domaine string le nom de domaine de la liste |
* liste string le nom de la liste |
* renvoie string une chaine xml avec la liste des mails des inscrits |
* |
* <ezmlm_liste_abonnes domaine="dom" liste="list"> |
* <email>toto@tsdd...</email> |
* <email>qsdf@fdsq ..</email> |
* ... |
* </ezmlm_liste_abonnes> |
*/ |
include_once 'XML/Util.php' ; |
$xml = XML_Util::getXMLDeclaration('1.0', 'ISO-8859-15', 'no') ; |
$xml .= XML_Util::createStartElement ('ezmlm_liste_abonnes', array('domaine' => $domaine, 'liste' => $liste)) ; |
// Les 2 parametres doivent etres present |
foreach ($output as $mail) $xml .= XML_Util::createTag('email', '', $mail) ; |
if (!isset($_GET['domaine']) || !isset($_GET['liste'])) { |
$xml .= XML_Util::createTag('erreur', 'Vous devez spécifier un domaine et une liste'); |
} else { |
$repertoire = '/home/vpopmail/domains/'.$domaine.'/'.$liste ; |
exec ('ezmlm-list '.$repertoire, $output, $ret) ; |
$xml .= XML_Util::createStartElement ('ezmlm_liste_abonnes', array('domaine' => $domaine, 'liste' => $liste)) ; |
foreach ($output as $mail) $xml .= XML_Util::createTag('email', '', $mail) ; |
$xml .= XML_Util::createEndElement('ezmlm_liste_abonnes') ; |
} |
$xml .= XML_Util::createEndElement('ezmlm_liste_abonnes') ; |
header ('Content-type: text/xml'); |
echo $xml ; |
?> |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* $Log: not supported by cvs2svn $ |
* Revision 1.2.2.1 2007-05-11 09:45:35 alexandre_tb |
* ajout de commentaire et de la gestion des erreurs |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/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.7 2007-04-19 09:22:29 alexandre_tb Exp $ |
// CVS : $Id: document.class.php,v 1.8 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.7 $ |
*@version $Revision: 1.8 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
116,6 → 116,8 |
* |
*/ |
var $_pd_lien ; |
var $nom_fichier ; |
/** |
* |
* |
128,6 → 130,7 |
{ |
$this->_db = $objetDB ; |
$this->_chemin_icone = $chemin_icones ; |
if ($id_document != "") { |
$requete = "select * from projet_documents where pd_id=".$id_document ; |
$resultat = $this->_db->query ($requete) ; |
136,8 → 139,11 |
} |
$ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ; |
if ($resultat->numRows()>0) { |
fichier::fichier($chemin.$ligne->pd_lien, $this->_db) ; |
$this->nom_fichier = $ligne->pd_lien; |
$this->_id_projet = $ligne->pd_ce_projet; |
$this->_id = $ligne->pd_id ; |
fichier::fichier($chemin.$this->getChemin(), $this->_db) ; |
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 ; |
145,6 → 151,7 |
$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 { |
237,7 → 244,7 |
if ($this->isRepertoire()) { |
return $this->_chemin_icone."repertoire.gif" ; |
} else { |
return $this->_type_mime->getCheminIcone() ; |
if (is_object ($this->_type_mime)) return $this->_type_mime->getCheminIcone() ; |
} |
} // end of member function getCheminIcone |
295,18 → 302,25 |
* @return string |
* @access public |
*/ |
function getChemin( ) |
function getChemin($prefixe = '') |
{ |
if ($this->isRepertoire()) { |
return $this->_id ; |
} else { |
return $this->_chemin ; |
$chemin_repertoire_entre_racine_et_fichier = ''; |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php'; |
$projet = new projet ($this->_db, $this->_id_projet); |
// l arborescence des repertoires |
$tableau_navigation = $this->getPath($this->_id) ; |
if (is_array ($tableau_navigation))$tableau_navigation = array_reverse($tableau_navigation); |
for ($i = 0; $i < count ($tableau_navigation); $i++) { |
$chemin_repertoire_entre_racine_et_fichier.= $tableau_navigation[$i]."/"; |
} |
} // end of member function getChemin |
return $projet->getNomRepertoire().'/'.$chemin_repertoire_entre_racine_et_fichier.$this->nom_fichier ; |
} |
/** |
* Renvoie pour le répertoire courant, les identifiants et les noms de tous les |
* Renvoie pour le repertoire ou le fichier courant, les identifiants et les noms de tous les |
* répertoires père jusqu'à la racine. 0 => ['id'], ['nom'] 1 => [id'], ['nom'] etc. |
* En commençant par la racine et en descendant. Pour la racine id vaut "" et nom |
* vaut "". |
315,11 → 329,12 |
* @return Array |
* @access public |
*/ |
function getCheminIdRepertoire( $id_repertoire, &$objetDB ) |
function getCheminIdRepertoire( $id_doc, &$objetDB ) |
{ |
if ($id_repertoire == "") $id_repertoire = 0; |
if ($id_doc == "") $id_doc = 0; |
// on commence par rechercher le répertoire père, dans la base de donnée |
$requete = "select pd_pere, pd_nom, pd_id from projet_documents where pd_id=$id_repertoire" ; |
$requete = 'select pd_pere, pd_nom, pd_id, pd_ce_type from projet_documents where pd_id='.$id_doc ; |
$resultat = $objetDB->query ($requete) ; |
if (DB::isError($resultat)) { |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
328,30 → 343,34 |
$chemin_rep_id_nom = array() ; |
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) ; |
return ; //array ($ligne->pd_pere); |
} |
array_push ($chemin_rep_id_nom, $ligne->pd_pere) ; |
$tab = document::getCheminIdRepertoire($ligne->pd_pere, $objetDB) ; |
$chemin_rep_id_nom = array_merge ($tab, $chemin_rep_id_nom) ; |
} |
$tabl_resultat = array() ; |
for ($i = 0; $i < count ($chemin_rep_id_nom); $i++) { |
$val1 = array_pop ($chemin_rep_id_nom) ; |
$val2 = array_pop ($chemin_rep_id_nom) ; |
array_push ($tabl_resultat, $val2, $val1) ; |
return array_reverse($chemin_rep_id_nom); |
} |
function getPath( $id_doc) |
{ |
if ($id_doc == "") $id_doc = 0; |
// on commence par rechercher le répertoire père, dans la base de donnée |
$requete = 'select pd_pere, pd_nom, pd_id, pd_ce_type from projet_documents where pd_id='.$id_doc ; |
$resultat = $GLOBALS['projet_db']->query ($requete) ; |
if (DB::isError($resultat)) { |
return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
return $tabl_resultat ; |
} // end of member function getCheminIdRepertoire |
$ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ; |
$chemin_rep_id_nom = array() ; |
if ($resultat->numRows()>0) { |
if ($ligne->pd_pere == 0) { |
return; |
} |
array_push ($chemin_rep_id_nom, $ligne->pd_pere) ; |
$chemin_rep_id_nom = array_merge ($chemin_rep_id_nom, document::getPath($ligne->pd_pere) ); |
} |
return $chemin_rep_id_nom; |
} |
/** |
* Calcule le chemin vers le fichier ou le répertoire uploadé |
* renvoie un chaine de la forme dir1/dir2/fichier.ext |
360,27 → 379,25 |
*/ |
function calculeCheminUploaded ($radical) { |
// On recherche le chemin vers le fichier, en fonction du répertoire |
// ici on renomme le fichier à partir du dernier ID de la table gen_voiraussi |
$requete_document = "select pd_id from projet_documents order by pd_id desc limit 1,1" ; |
$resultat_document = $this->_db->query($requete_document) ; |
$ligne_document = $resultat_document->fetchRow(DB_FETCHMODE_OBJECT) ; |
$nouveau_nom = $ligne_document->pd_id + 1 ; |
$extension = preg_replace("/^([^\.]+)\.(\w+$)/", "\\2", $_FILES['fichier']['name']) ; |
$nouveau_nom = $radical."_".$nouveau_nom.".".$extension ; |
if (isset($_FILES['fichier']['name'])) { |
$extension = preg_replace("/^([^\.]+)\.(\w+$)/", "\\2", $_FILES['fichier']['name']) ; |
} |
if ($this->_id_pere != '') { |
// On appelle la méthode getCheminIdRepertoire qui renvoie un tableau avec la liste |
// des répertoires jusqu'à la racine, on enlève la racine ($i = 0) et on concatène |
// toutes les entrées pour obtenir le chemin jusqu'au répertoire courant |
$chemin_repertoire_entre_racine_et_repertoire_a_cree = '' ; |
$tableau_navigation = $this->getCheminIdRepertoire($this->_id_pere, $this->_db) ; |
for ($i = 0; $i < count ($tableau_navigation); $i+=2) $chemin_repertoire_entre_racine_et_repertoire_a_cree.= $tableau_navigation[$i]."/"; |
$chemin = $chemin_repertoire_entre_racine_et_repertoire_a_cree.$nouveau_nom ; |
$doc_pere = new document ($this->_id_pere, $this->_db); |
return $doc_pere->getChemin(); |
$tableau_navigation = $this->getPath($this->_id_pere) ; |
for ($i = 0; $i < count ($tableau_navigation); $i++) $chemin_repertoire_entre_racine_et_repertoire_a_cree.= $tableau_navigation[$i]."/"; |
$chemin = $chemin_repertoire_entre_racine_et_repertoire_a_cree ; |
} else { |
// Si l'on est à la racine du projet, le chemin est le nom du fichier |
return $nouveau_nom ; |
// Si l'on est à la racine du projet, le chemin vide |
return $radical ; |
} |
return $chemin ; |
} |
423,7 → 440,8 |
for ($i = 0; $i < count ($tableau_navigation); $i+=2) $chemin_repertoire_entre_racine_et_repertoire_a_cree.= $tableau_navigation[$i]."/"; |
$pd_lien .= $chemin_repertoire_entre_racine_et_repertoire_a_cree ; |
} |
$pd_lien .= SQL_obtenirNouveauId($this->_db, 'projet_documents', 'pd_id')."/" ; |
//$pd_lien .= SQL_obtenirNouveauId($this->_db, 'projet_documents', 'pd_id')."/" ; |
$pd_lien = SQL_obtenirNouveauId($this->_db, 'projet_documents', 'pd_id')."/" ; |
} |
$id = SQL_obtenirNouveauId($this->_db, 'projet_documents', 'pd_id') ; |
441,6 → 459,11 |
return $pd_lien; |
} |
function genereNouveauNom ($radical, $ancien_nom, $id) { |
$extension = preg_replace("/^([^\.]+)\.(\w+$)/", "\\2", $ancien_nom) ; |
$nouveau_nom = $radical."_".$id.".".$extension ; |
return $nouveau_nom; |
} |
/** |
* Met à jour une ligne dans la table projet_document |
485,24 → 508,28 |
*/ |
function deplace( $repertoire_destination, $repertoire_projet ) |
{ |
// On récupère les informations du répertoire cible |
if ($repertoire_destination != 0) { |
$repertoire_cible = new document ($repertoire_destination, $this->_db) ; |
$rep = $repertoire_cible->_pd_lien ; |
$chemin_rep_cible = $repertoire_cible->getChemin(); |
} else { |
$rep = $repertoire_projet.'/' ; |
// Si le repertoire destination est la racine cad id =0 |
// on cree un document qui aura pour chemin le repertoire du projet |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php'; |
$projet = new projet ($this->_db, $this->_id_projet); |
$chemin_rep_cible = $projet->getNomRepertoire().'/'; |
} |
// On récupère le nom du fichier |
$decoupe = explode ('/', $this->_pd_lien) ; |
$nom_fichier = $decoupe[count($decoupe)-1] ; |
$requete = 'update projet_documents set pd_lien="'.$rep.$nom_fichier.'", pd_pere='.$repertoire_destination.' where pd_id='.$this->_id ; |
$nom_fichier = $this->_pd_lien ; |
$requete = 'update projet_documents set pd_pere='.$repertoire_destination.' where pd_id='.$this->_id ; |
$resultat = $this->_db->query ($requete) ; |
if (DB::isError($resultat)) { |
echo ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
return false ; |
} |
return fichier::deplace ($this->_chemin, PROJET_CHEMIN_FICHIER.$rep.$nom_fichier) ; |
//echo $this->_chemin.'<br>'.PROJET_CHEMIN_FICHIER.$chemin_rep_cible.$nom_fichier; |
return fichier::deplace ($this->_chemin, PROJET_CHEMIN_FICHIER.$chemin_rep_cible.$nom_fichier) ; |
} // end of member function deplace |
613,6 → 640,17 |
} |
return round ($taille / $diviseur, $precision).' '.$unite; |
} |
/** |
* Renvoie une liste de document, enfant du document courant |
* qui doit etre un repertoire bien sur |
* |
* @return mixed un tableau de document |
* @access public |
*/ |
function getDocumentsEnfant() { |
} |
} // end of document |
/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.8 2007-04-19 15:34:35 neiluj Exp $ |
// CVS : $Id: HTML_listeDocuments.class.php,v 1.9 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.8 $ |
*@version $Revision: 1.9 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
81,7 → 81,7 |
var $_chemin_icone = "icones/"; |
/** |
* L'identifiant du répertoire que l'on est en train d'observer. |
* L'identifiant du repertoire que l'on est en train d'observer. |
* @access private |
*/ |
var $_id_repertoire; |
98,7 → 98,13 |
* @access private |
*/ |
var $_auth ; |
/** |
* le style d affichage |
* @access private |
*/ |
var $_mode_affichage ; |
/** |
* |
* |
* @param bool utilise_pager Indique l'utilisation ou non du Pager. |
114,6 → 120,7 |
if (is_object($auth)) { |
$this->_auth = $auth ; |
} |
$this->_mode_affichage = 'standart'; |
} // end of member function HTML_listeDocuments |
/** |
123,7 → 130,7 |
* @return void |
* @access public |
*/ |
function __construct( &$url, $utilise_pager = false, $id_repertoire = 0, $auth = '' ) |
function __construct( &$url, $utilise_pager = false, $id_repertoire = 0, $auth = '', $id_projet = '' ) |
{ |
$this->HTML_listeDocuments($url, $utilise_pager, $id_repertoire, $auth); |
139,77 → 146,84 |
function construitEntete( $tableau_label ) |
{ |
$this->addRow ($tableau_label, NULL, 'TH') ; |
} // end of member function construitEntete |
} |
/** |
* |
* |
* @param Array tableau_label Un tableau à deux dimensions avec les labels à afficher dans le corps du |
* @param Array tableau_label Un tableau a deux dimensions avec les labels a afficher dans le corps du |
* tableau. |
* @return void |
* @access public |
*/ |
function construitListe( &$tableau_document, $droits, $mode = '', $objetDB = '') |
function construitListe( &$tableau_document, $droits, $mode = '', $objetDB = '', $id_projet = '') |
{ |
$compteur = 0 ;$class[0] = 'ligne_impaire'; $class[1] = 'ligne_paire' ; |
for ($i = 0; $i < count ($tableau_document) ; $i++) { |
// première condition : est-ce que le fichier a pour père le répertoire courant, si oui on l'affiche |
if ($tableau_document[$i]->_id_pere == $this->_id_repertoire || $mode == 'ignore_repertoire') { |
// d'abord l'image |
$icone = '<img src="'.$tableau_document[$i]->getCheminIcone().'" />' ; |
// Si le document est un répertoire, on ajoute id_repertoire au lien. |
if ($tableau_document[$i]->isRepertoire()) { |
$this->_url->addQueryString ('id_repertoire', $tableau_document[$i]->getChemin()) ; |
$lien = $this->_url->getURL() ; |
} else { // Si c'est un fichier, on fait un lien direct |
$lien = $tableau_document[$i]->getChemin() ; |
} |
// pour éviter des effets de bords, on enlève id_repertoire de l'url |
// dans le cas d'un répertoire, pour les fichiers on le laisse pour |
// qu'après une opération, on reste dans le répertoire où a eu lieu l'opération |
if ($tableau_document[$i]->isRepertoire()) $this->_url->removeQueryString('id_repertoire') ; |
// on insère le lien |
$lien_nom = '<a href="'.$lien.'">'.$icone.' '.$tableau_document[$i]->getNomLong()."</a>\n" ; |
// Pour la taille on divise par 1000 et on écrit Ko |
$taille = round($tableau_document[$i]->getTaille() / 1000).' Ko' ; |
// Récupération de l'auteur |
include_once PROJET_CHEMIN_CLASSES.'annuaire.class.php' ; |
$annuaire = new annuaire($objetDB, array('table' => PROJET_ANNUAIRE, 'identifiant' => PROJET_CHAMPS_ID, |
'nom' => PROJET_CHAMPS_NOM, 'prenom' => PROJET_CHAMPS_PRENOM)) ; |
$annuaire->setId($tableau_document[$i]->_id_proprietaire) ; |
$nom_prenom = $annuaire->getInfo('nom').' '.$annuaire->getInfo('prenom') ; |
// On rempli le tableau à donner en paramètre à HTML_Table avec toutes ces infos, une par colonne |
$ligne_tableau = array($lien_nom, $taille, $nom_prenom, $tableau_document[$i]->getDateMiseAJour()) ; |
if ($droits <= PROJET_DROIT_CONTRIBUTEUR) array_push ($ligne_tableau, $tableau_document[$i]->getVisibilite()) ; |
// On ajoute au tableau, les action couper / modifier / supprimer |
if ($droits <= PROJET_DROIT_COORDINATEUR || $this->_auth->getAuthData(PROJET_CHAMPS_ID) == $tableau_document[$i]->_id_proprietaire) |
array_push ($ligne_tableau, $this->_actions ($tableau_document[$i])) ; |
if ($tableau_document[$i]->getVisibilite() != 'prive' || $droits < PROJET_DROIT_AUCUN) { |
$this->addRow ($ligne_tableau, array('class' => $class[$compteur]), 'TD', true) ; |
// enfin , s'il y a une description, on l'ajoute, mais sur une ligne entière (colspan) |
if ($tableau_document[$i]->getDescription() != "") { |
$this->addRow (array ($tableau_document[$i]->getDescription()), |
array ('colspan' => $this->getColCount(), 'class' => $class[$compteur])) ; |
$this->updateRowAttributes ($this->getRowCount()-1, array ('class' => $class[$compteur]), true) ; |
if ($this->_mode_affichage == 'standart') { |
$compteur = 0 ;$class[0] = 'ligne_impaire'; $class[1] = 'ligne_paire' ; |
for ($i = 0; $i < count ($tableau_document) ; $i++) { |
// Premiere condition : est-ce que le fichier a pour pere le repertoire courant, si oui on l'affiche |
if ($tableau_document[$i]->_id_pere == $this->_id_repertoire || $mode == 'ignore_repertoire') { |
// d'abord l'image |
$icone = '<img src="'.$tableau_document[$i]->getCheminIcone().'" />' ; |
// Si le document est un repertoire, on ajoute id_repertoire au lien. |
if ($tableau_document[$i]->isRepertoire()) { |
$this->_url->addQueryString ('id_repertoire', $tableau_document[$i]->getIdDocument()) ; |
$lien = $this->_url->getURL() ; |
} else { // Si c'est un fichier, on fait un lien direct |
$this->_url->addQueryString('id_document', $tableau_document[$i]->getIdDocument()); |
$this->_url->addQueryString('service', 'telechargement'); |
$lien = $this->_url->getURL() ; |
$this->_url->removeQueryString('service'); |
} |
} |
$compteur++; |
} |
if ($compteur == 2) $compteur = 0 ; |
// pour eviter des effets de bords, on enleve id_repertoire de l'url |
// dans le cas d'un repertoire, pour les fichiers on le laisse pour |
// qu'apres une operation, on reste dans le repertoire ou a eu lieu l'operation |
if ($tableau_document[$i]->isRepertoire()) $this->_url->removeQueryString('id_repertoire') ; |
// on insere le lien |
$lien_nom = '<a href="'.$lien.'">'.$icone.' '.$tableau_document[$i]->getNomLong()."</a>\n" ; |
$taille = $tableau_document[$i]->getTailleFormatee(); |
// Recuperation de l'auteur |
include_once PROJET_CHEMIN_CLASSES.'annuaire.class.php' ; |
$annuaire = new annuaire($objetDB, array('table' => PROJET_ANNUAIRE, 'identifiant' => PROJET_CHAMPS_ID, |
'nom' => PROJET_CHAMPS_NOM, 'prenom' => PROJET_CHAMPS_PRENOM)) ; |
$annuaire->setId($tableau_document[$i]->_id_proprietaire) ; |
$nom_prenom = $annuaire->getInfo('nom').' '.$annuaire->getInfo('prenom') ; |
// On rempli le tableau a donner en parametre a HTML_Table avec toutes ces infos, une par colonne |
$ligne_tableau = array($lien_nom, $taille, $nom_prenom, $tableau_document[$i]->getDateMiseAJour()) ; |
if ($droits <= PROJET_DROIT_CONTRIBUTEUR) array_push ($ligne_tableau, $tableau_document[$i]->getVisibilite()) ; |
// On ajoute au tableau, les action couper / modifier / supprimer |
if ($droits <= PROJET_DROIT_COORDINATEUR || $this->_auth->getAuthData(PROJET_CHAMPS_ID) == $tableau_document[$i]->_id_proprietaire) |
array_push ($ligne_tableau, $this->_actions ($tableau_document[$i])) ; |
if ($tableau_document[$i]->getVisibilite() != 'prive' || $droits < PROJET_DROIT_AUCUN) { |
$this->addRow ($ligne_tableau, array('class' => $class[$compteur]), 'TD', true) ; |
// enfin , s'il y a une description, on l'ajoute, mais sur une ligne entière (colspan) |
if ($tableau_document[$i]->getDescription() != "") { |
$this->addRow (array ($tableau_document[$i]->getDescription()), |
array ('colspan' => $this->getColCount(), 'class' => $class[$compteur])) ; |
$this->updateRowAttributes ($this->getRowCount()-1, array ('class' => $class[$compteur]), true) ; |
} |
} |
$compteur++; |
} |
if ($compteur == 2) $compteur = 0 ; |
} |
$this->_url->removeQueryString('id_document'); |
$this->updateColAttributes(0, array ('class' => 'col1')) ; |
} else { |
} |
$this->updateColAttributes(0, array ('class' => 'col1')) ; |
} // end of member function construitListe |
/** |
* |
* |
* @param Array actions Un tableau avec les valeurs d'actions comme clé. "couper", modifier", |
* @param Array actions Un tableau avec les valeurs d'actions comme cle. "couper", modifier", |
* "supprimer". |
* @return void |
* @access public |
217,8 → 231,21 |
function setAction( $actions ) |
{ |
$this->_actions = $actions ; |
} // end of member function setAction |
} |
/** |
* |
* |
* @param string le mode, valeur possible standart ou ajax |
* @return void |
* @access public |
*/ |
function setModeAffichage( $mode ) |
{ |
$this->_mode_affichage = $mode ; |
} |
/** |
* |
* |
229,35 → 256,59 |
function setCheminIcones( $chemin ) |
{ |
$this->_chemin_icone = $chemin ; |
} // end of member function setCheminIcones |
} |
/** |
* Surcharge de l'opération de la classe mère. Ajoute la navigation dans les |
* répertoires. |
* Surcharge de l'operation de la classe mere. Ajoute la navigation dans les |
* repertoires. |
* |
* @return string |
* @access public |
*/ |
function toHTML( ) |
function toHTML($id_projet = '', $droits) |
{ |
$chemin_navig = "" ; |
if ($this->_id_repertoire != "") { |
$this->_url->removeQueryString(PROJET_VARIABLE_ID_REPERTOIRE) ; |
$chemin_navig = "<p>" ; |
$chemin_navig .= "<a href=\"".$this->_url->getURL()."\">".PROJET_RACINE."</a>\n" ; |
$this->_url->addQueryString(PROJET_VARIABLE_ID_REPERTOIRE, $this->_id_repertoire) ; |
for ($i = 0; $i < count ($this->_chemin_navigation); $i+=2) { |
$chemin_navig .= "> " ; |
$nom = $this->_chemin_navigation[$i+1] ; |
$this->_url->addQueryString ('id_repertoire', $this->_chemin_navigation[$i]) ; |
$chemin_navig .= "<a href=\"".$this->_url->getURL()."\">".$nom."</a>\n" ; |
} |
$chemin_navig .= "</p>\n" ; |
if ($this->_mode_affichage == 'standart') { |
$chemin_navig = "" ; |
if ($this->_id_repertoire != "") { |
$this->_url->removeQueryString(PROJET_VARIABLE_ID_REPERTOIRE) ; |
$chemin_navig = "<p>" ; |
$chemin_navig .= "<a href=\"".$this->_url->getURL()."\">".PROJET_RACINE."</a>\n" ; |
$this->_url->addQueryString(PROJET_VARIABLE_ID_REPERTOIRE, $this->_id_repertoire) ; |
for ($i = 0; $i < count ($this->_chemin_navigation); $i++) { |
$chemin_navig .= "> " ; |
$doc = new document ($this->_chemin_navigation[$i], $GLOBALS['projet_db']); |
$nom = $doc->getNomLong() ; |
$this->_url->addQueryString ('id_repertoire', $this->_chemin_navigation[$i]) ; |
$chemin_navig .= "<a href=\"".$this->_url->getURL()."\">".$nom."</a>\n" ; |
} |
$chemin_navig .= "</p>\n" ; |
} |
$res = $chemin_navig.HTML_Liste::toHTML() ; |
if ($this->getRowCount() == 1 && $this->_id_repertoire == '') { |
return '<div>'.PROJET_PAS_DE_DOCUMENTS.'</div>'."\n"; |
} |
} else { |
GEN_stockerFichierScript('dojo', 'api/js/dojo/dojo.js', 'text/javascript'); |
GEN_stockerFichierScript('dojoScriptProjet', 'client/projet/js/arbreDocument.js'); |
$res = '' ; |
$RCPUrl = PROJET_CHEMIN_APPLI.'services/ecouteArbreFichier.php?id_projet='.$id_projet; |
$this->_url->addQueryString(PROJET_VARIABLE_SERVICE, 'ecouteArbreFichier'); |
$RCPUrl = $this->_url->getURL(); |
// Le noeud racine |
if ($droits <= PROJET_DROIT_CONTRIBUTEUR) { |
$tree = '<div dojoType="Tree" DNDMode="between" selector="treeSelector" DNDAcceptTypes="bandTree" widgetId="bandTree" controller="treeController" eventNames="moveTo:nodeRemoved">'; |
} else { |
$tree = '<div dojoType="Tree" selector="treeSelector" DNDAcceptTypes="bandTree" widgetId="bandTree" controller="treeController">'; |
} |
$res .= '<div dojoType="TreeLoadingController" RPCUrl="'.$RCPUrl.'" widgetId="treeController" DNDController="create"></div> |
<div dojoType="TreeSelector" widgetId="treeSelector"></div>'.$tree. |
'<div dojoType="TreeNode" title="Racine" widgetId="rootNode" objectId="root" isFolder="true"></div></div>'; |
} |
$res = $chemin_navig.HTML_Liste::toHTML() ; |
if ($this->getRowCount() == 1 && $this->_id_repertoire == '') { |
return '<div>'.PROJET_PAS_DE_DOCUMENTS.'</div>'."\n"; |
} |
return $res ; |
} // end of member function toHTML |
264,7 → 315,7 |
/** |
* |
* |
* @param Array tableau_navigation Un tableau contenant les identifiants et les noms des répertoires. 0 => ["id"], |
* @param Array tableau_navigation Un tableau contenant les identifiants et les noms des repertoires. 0 => ["id"], |
* ["nom"] etc. |
* @return void |
* @access public |
275,7 → 326,7 |
} // end of member function setCheminNavigation |
/** |
* Affiche la légende des actions du module "documents" |
* Affiche la legende des actions du module "documents" |
* |
* @return string |
* @access public |
287,11 → 338,11 |
$res .= "<p><img src=\"".$this->_chemin_icone."/modif.png\" title=\"modifier\" alt=\"modifier\"> ".PROJET_LEGENDE_MODIFIE."</p>\n" ; |
$res .= "<p><img src=\"".$this->_chemin_icone."/trash.gif\" title=\"supprimer\" alt=\"supprimer\"> ".PROJET_LEGENDE_SUPPR."</p>\n" ; |
return $res ; |
} // end of member function affLegende |
} |
/** |
* Renvoie le chemin HTML, depuis le répertoire courant jusqu'à la racine. |
* Renvoie le chemin HTML, depuis le repertoire courant jusqu'a la racine. |
* |
* @return string |
* @access private |
301,13 → 352,11 |
$path = "" ; |
return $path ; |
} // end of member function _getCheminHTML |
} |
/** |
* Renvoie une chaine contenant le code html des icones des actions possibles sur un |
* fichier, c'est à dire couper, modifier, supprimer. |
* fichier, c'est a dire couper, modifier, supprimer. |
* |
* @return string |
* @access private |
318,7 → 367,7 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, $this->_actions["couper"]) ; |
$couper = ' '.PROJET_FICHIER_COUPER ; |
if (!$document->isRepertoire()) $couper = '<a href="'.$this->_url->getURL().'">'.$couper.'</a>' ; |
$couper = '<a href="'.$this->_url->getURL().'">'.$couper.'</a>' ; |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, $this->_actions["modifier"]) ; |
$modifier = '<a href="'.$this->_url->getURL().'">'.PROJET_FICHIER_MODIFIER.'</a> ' ; |
/trunk/client/projet/classes/HTML_listeParticipants.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_listeParticipants.class.php,v 1.3 2006-01-11 10:32:09 alexandre_tb Exp $ |
// CVS : $Id: HTML_listeParticipants.class.php,v 1.4 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ |
*@version $Revision: 1.4 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
96,7 → 96,7 |
* @return void |
* @access public |
*/ |
function construitListe( $elements, $tableau_statut = '' ) |
function construitListe( $elements, $tableau_statut = '', &$projet ) |
{ |
for ($i = 0; $i < count ($elements) ; $i++) { |
// L'identifiant de l'utilisateur est le premier élément du tableau |
113,6 → 113,8 |
$this->_url->removeQueryString('statut') ; |
} |
// La colonne avec l inscription a la liste de discussion |
$this->addRow ($elements[$i]) ; |
// mise à jour du champs mail en l'entourant par la balise mailto |
/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.6 2007-04-19 09:25:50 alexandre_tb Exp $ |
// CVS : $Id: fichier.class.php,v 1.7 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.6 $ |
*@version $Revision: 1.7 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
163,9 → 163,7 |
*/ |
function deplace( $origine, $destination ) |
{ |
if (copy ($origine, $destination )) { |
if (unlink($origine)) return true ; |
} |
if (rename ($origine, $destination )) return true ; |
return false ; |
} // end of member function deplace |
/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.36 2007-04-19 15:34:35 neiluj Exp $ |
// CVS : $Id: projetControleur.class.php,v 1.37 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
33,7 → 33,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.36 $ |
*@version $Revision: 1.37 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
48,7 → 48,7 |
include_once 'client/projet/langues/pro_langue_'.PROJET_LANGUE_DEFAUT.'.inc.php' ; |
} |
require_once GEN_CHEMIN_API.'sql/SQL_manipulation.fonct.php' ; |
require_once GEN_CHEMIN_API.'html/HTML_TableFragmenteur.php' ; |
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE des constantes | |
101,7 → 101,7 |
define ("PROJETCONTROLEUR_ERREUR_CREATION_REPERTOIRE", -4) ; |
/** |
* Constantes pour définir les droits |
* Constantes pour definir les droits |
* |
*/ |
define ('PROJET_DROIT_ADMINISTRATEUR', 1) ; |
112,8 → 112,8 |
define ('PROJET_DROIT_EN_ATTENTE', 32); |
/** |
* class projetControleur |
* Cette classe sert à lancer les diverses applications du module projet, en |
* fonction des paramètre de l'URL GET ou POST. La méthode principale est run() |
* Cette classe sert a lancer les diverses applications du module projet, en |
* fonction des parametre de l'URL GET ou POST. La methode principale est run() |
*/ |
class projetControleur |
{ |
120,12 → 120,12 |
/*** Attributes: ***/ |
/** |
* Contient l'action du controleur, qui correspond à une action du module projet. |
* Contient l'action du controleur, qui correspond a une action du module projet. |
* @access private |
*/ |
var $_action; |
/** |
* Une connexion à une base de donnée DB. |
* Une connexion a une base de donnee DB. |
* @access private |
*/ |
var $_db; |
143,7 → 143,7 |
var $_url; |
/** |
* L'identifiant du projet sur lequel on travaille. Dans l'action par défaut, cet |
* L'identifiant du projet sur lequel on travaille. Dans l'action par defaut, cet |
* attribut n'a pas de valeur. |
* @access private |
*/ |
150,8 → 150,8 |
var $_id_projet; |
/** |
* L'identifiant du répertoire que l'on est en train d'observer. Il sera passé en |
* paramètre à la classe HTML_listeDocuments. |
* L'identifiant du repertoire que l'on est en train d'observer. Il sera passé en |
* parametre a la classe HTML_listeDocuments. |
* @access private |
*/ |
var $_id_repertoire; |
163,7 → 163,7 |
var $_id_document; |
/** |
* La présentation de la liste des projets, par défaut vide, signifie en liste. |
* La presentation de la liste des projets, par defaut vide, signifie en liste. |
* Valeurs possibles: arbre |
* @access private |
*/ |
170,7 → 170,7 |
var $_presentation; |
/** |
* Le type du projets, par défaut 0, signifie en pas de type particumier. |
* Le type du projets, par defaut 0, signifie en pas de type particumier. |
* Valeurs possibles: 0, 1, 2, 3 ... |
* @access private |
*/ |
177,7 → 177,7 |
var $_type ; |
/** |
* Le tableau des projets à ne pas afficher, ni dans l'arbre, ni dans les listes |
* Le tableau des projets a ne pas afficher, ni dans l'arbre, ni dans les listes |
* @access private |
*/ |
var $_projet_exclu = array(); |
195,7 → 195,7 |
var $_service ; |
/** |
* Méthode principale de la classe. Elle permet d'appeler les méthodes du modules |
* Methode principale de la classe. Elle permet d'appeler les methodes du modules |
* projet en fonction de l'action. |
* |
* @return string |
217,7 → 217,7 |
return $this->messageErreur(PROJETCONTROLEUR_ACTION_INVALIDE) ; |
} |
// Si il n'y a pas d'action mais un projet, on transmet par défaut l'action PROJET_VOIR |
// Si il n'y a pas d'action mais un projet, on transmet par defaut l'action PROJET_VOIR |
if ($this->_id_projet != "" && $this->_action == PROJET_DEFAUT) { |
$this->_action = PROJET_ACTION_VOIR_RESUME ; |
$this->_url->addQueryString (PROJET_VARIABLE_ID_PROJET, $this->_id_projet) ; |
337,7 → 337,7 |
/** |
* Permet de fixer la valeur de l'action pour l'objet projetControleur. Cette action |
* provient généralement de $_POST['action'] ou $_GET['action'] |
* provient generalement de $_POST['action'] ou $_GET['action'] |
* |
* @param int action L'action à passer provient de l'URL. |
* @return void |
393,7 → 393,7 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ; |
$participant = new participe ($this->_db) ; |
// Les entête des tableaux |
// Les entetes des tableaux |
$tableau_label_statut_action = array (PROJET_GERER, PROJET_GERER, PROJET_GERER_FICHIER, PROJET_VOIR_FICHIER, "---") ; |
$auth = $this->_auth->getAuth() ; // Pour raccourcir le code |
404,7 → 404,7 |
} |
/** |
* Renvoie le menu général de l'application projet. Avec différents liens selon le |
* Renvoie le menu general de l'application projet. Avec differents liens selon le |
* statut de l'utilisateur. |
* |
* @return string |
425,7 → 425,7 |
$isAdm = 0 ; $isCoord = 0 ; $isContri = 0 ; |
} |
// Les menus spécifiques aux projets |
// Les menus specifiques aux projets |
if ($this->_id_projet != '') { |
if (!$isCoord) { |
$isCoord = $participant->isCoordinateur($this->_auth->getAuthData(PROJET_CHAMPS_ID), $this->_id_projet, $this->_db) ; |
475,7 → 475,7 |
if (!$isEnAttente) $res .= '<li class="projet_niv2"><a href="'. |
$this->_url->getURL().'">'.PROJET_S_INSCRIRE_AU_PROJET."</a></li>\n" ; |
} |
// L'action gérer les utilisateurs |
// L'action gerer les utilisateurs |
if ($isCoord || $isAdm) { |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_VOIR_PARTICIPANT) ; |
$res .= '<li class="projet_niv2"><a href="'.$this->_url->getURL().'">'.PROJET_GESTION_UTILISATEUR."</a></li>\n" ; |
484,22 → 484,26 |
//document |
if ($isContri || $isCoord || $isAdm) { |
// On ajoute l id d un repertoire s il existe |
if (isset($this->_id_repertoire)) $this->_url->addQueryString ('id_repertoire', $this->_id_repertoire); |
$res .= '<li class="projet_niv2">'.PROJET_DOCUMENT ; |
// L'action "Mettre un fichier en ligne" |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_NOUVEAU_FICHIER) ; |
$res .= '<ul><li class="projet_niv2"><a href="'.$this->_url->getURL().'">'.PROJET_METTRE_FICHIER."</a></li>\n" ; |
// L'action créer un répertoire |
// L'action creer un repertoire |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_NOUVEAU_REPERTOIRE) ; |
$res .= '<li class="projet_niv2"><a href="'.$this->_url->getURL().'">'.PROJET_CREER_REP."</a></li>\n" ; |
$res .= '</ul></li>' ; |
$this->_url->removeQueryString('id_repertoire'); |
// Forum |
$res .= '<li class="projet_niv1">'.PROJET_FORUM ; |
$res .= '<ul id="projet_groupe_niv2_for">' ; |
if ($projet->avoirListe()) { |
// On vérifie si l'utilisateur est inscrit ou non à la liste et on ajoute le lien |
// On verifie si l'utilisateur est inscrit ou non a la liste et on ajoute le lien |
//$projet->getListesAssociees(); |
include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php'; |
592,7 → 596,7 |
} // end of member function menuGeneral |
/** |
* Renvoie le formulaire de création d'un projet. |
* Renvoie le formulaire de cretion d'un projet. |
* |
* @return string |
* @access public |
632,7 → 636,7 |
$res = PROJET_PROPOSER_PROJET ; |
return $res . $formulaire_projet->toHTML() ; |
} else { |
return 'Veuillez régler les permissions en écriture sur '.PROJET_CHEMIN_FICHIER ; |
return 'Veuillez régler les permissions en écriture sur '.PROJET_CHEMIN_FICHIER ; |
} |
} // end of member function nouveauProjet |
666,7 → 670,7 |
} else { |
return $formulaire_projet->toHTML() ; |
} |
} // end of member function nouveauProjetValidation |
} |
/** |
* Valide le formulaire et appelle la fonction de mise à jour. |
710,15 → 714,15 |
$formulaire_document = new HTML_formulaireDocument('formulaire_document', 'post',preg_replace ("/&/", "&", $this->_url->getURL())) ; |
$formulaire_document->construitFormulaire($action) ; |
if ($action == PROJET_ACTION_MODIFIER) { |
include_once PROJET_CHEMIN_CLASSES.'document.class.php' ; |
$document = new document($this->_id_document, $this->_db, PROJET_CHEMIN_FICHIER, PROJET_CHEMIN_ICONES) ; |
// On affecte dans un tableau les valeurs de chaque champs du formulaire avec le nom de chaque élément de formulaire |
// On affecte dans un tableau les valeurs de chaque champs du formulaire avec le nom de chaque element de formulaire |
// voir HTML_formulaireDocument |
$valeurs_par_defaut = array ('document_nom' => $document->getNomLong(), |
'document_description' => $document->getDescription(), |
'document_visibilite' => $document->getVisibilite()) ; |
// On rajoute un champs caché avec l'identifiant du document |
// On rajoute un champs cache avec l'identifiant du document |
$formulaire_document->addElement ('hidden', 'id_document', $this->_id_document) ; |
$formulaire_document->setDefaults($valeurs_par_defaut) ; |
} else { |
729,7 → 733,7 |
} // end of member function nouveauFichier |
/** |
* Présente un formulaire pour déplacer un fichier |
* Presente un formulaire pour deplacer un fichier |
* |
* |
*/ |
738,12 → 742,13 |
$projet = new projet ($this->_db, $this->_id_projet) ; |
$res = '<h1>'.PROJET_PROJET.' : '.$projet->getTitre().'</h1>' ; |
include_once PROJET_CHEMIN_CLASSES.'document.class.php' ; |
$document = new document($this->_id_document, $this->_db, PROJET_CHEMIN_FICHIER) ; |
// On traite le cas où l'on vient de déplacer un fichier |
// On traite le cas ou l'on vient de deplacer un fichier |
if (isset ($_POST['projet_repertoire'])) { |
if (!$document -> deplace ($_POST['projet_repertoire'], $projet->getNomRepertoire())) { |
echo 'echec du Déplacement' ; |
return 'echec du déplacement' ; |
} |
return ; |
} |
751,7 → 756,9 |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_COUPER) ; |
$HTML_formulaireCouperColler = new HTML_formulaireCouperColler('formulaire_couper_coller', 'post', str_replace('&', '&', $this->_url->getURL())) ; |
$HTML_formulaireCouperColler -> construitFormulaire($projet->getListeRepertoireHierarchisee()) ; |
return $res.$HTML_formulaireCouperColler->toHTML('<img src="'.PROJET_CHEMIN_ICONES.$document->getCheminIcone().'" /> '.$document->getNomLong()); |
$tab = $projet->getListeRepertoireHierarchisee(); |
//$res .= '<pre>'.print_r ($tab, true).'</pre>'; |
return $res .$HTML_formulaireCouperColler->toHTML('<img src="'.PROJET_CHEMIN_ICONES.$document->getCheminIcone().'" /> '.$document->getNomLong()); |
} |
/** |
* Supprime un fichier. |
778,7 → 785,7 |
} // end of member function nouveauFichier |
/** |
* Renvoie le formulaire de création d'un répertoire. |
* Renvoie le formulaire de creation d'un repertoire. |
* |
* @return void |
* @access public |
804,7 → 811,7 |
*/ |
function nouveauFichierValidation( ) |
{ |
// création de l'objet projet courant |
// creation de l'objet projet courant |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ; |
$projet = new projet ($this->_db, $this->_id_projet) ; |
if (isset($_SESSION['formulaire_document']) && $_SESSION['formulaire_document'] == 'valide') { |
815,24 → 822,31 |
$formulaire_document = new HTML_formulaireDocument('formulaire_document', 'post', preg_replace ("/&/", "&", $this->_url->getURL())) ; |
$formulaire_document->construitFormulaire() ; |
if ($formulaire_document->validate()) { |
// Création d'un objet document vide |
// Creation d'un objet document vide |
$document = new document ("", $this->_db) ; |
// avant d'appeler la méthode enregistrerSQL, il faut indiquer l'identifiant du projet et l'identifiant du propriétaire |
// avant d'appeler la methode enregistrerSQL, il faut indiquer l'identifiant du projet et l'identifiant du proprietaire |
$document->setIdProjet ($this->_id_projet) ; |
$document->setIdProprietaire ($this->_auth->getAuthData (PROJET_CHAMPS_ID)) ; |
// On passe aussi le numéro de répertoire s'il existe |
// On passe aussi le numero de repertoire s'il existe |
if ($this->_id_repertoire != '') $document->setIdRepertoire($this->_id_repertoire) ; |
if ($this->_id_repertoire == 0) $document->setIdRepertoire(0) ; |
//$GLOBALS['log'] .= '<br>this->_id_repertoire: '.$this->_id_repertoire.'<br>'; |
$chemin_upload = $document->calculeCheminUploaded($projet->getNomRepertoire()) ; |
if (!$document->upload (PROJET_CHEMIN_FICHIER.$projet->getNomRepertoire().'/'.$chemin_upload)) { |
echo 'Echec de l\'upload' ; |
trigger_error('echec d\'upload !', E_USER_ERROR) ; |
//$GLOBALS['log'] .= '<br>chemin_upload: '.$chemin_upload.'<br>'; |
//$GLOBALS['log'] .= 'projet->getRepertoire() : '.$projet->getNomRepertoire().'<br>'; |
$id_document = SQL_obtenirNouveauId($this->_db, 'projet_documents', 'pd_id') ; |
$nouveau_nom = $document->genereNouveauNom($projet->getNomRepertoire(), $_FILES['fichier']['name'], $id_document); |
if (!$document->upload (PROJET_CHEMIN_FICHIER.$chemin_upload.'/'.$nouveau_nom)) { |
return 'Echec de l\'upload<br />'. |
'Fichier source : '. $_FILES['fichier']['name']; |
'Fichier destination : '.PROJET_CHEMIN_FICHIER.$projet->getNomRepertoire().'/'.$chemin_upload.'/'.$nouveau_nom ; |
} |
$document->enregistrerSQL($formulaire_document->getSubmitValues(), $projet->getNomRepertoire().'/'.$chemin_upload) ; |
//$document->enregistrerSQL($formulaire_document->getSubmitValues(), $projet->getNomRepertoire().'/'.$chemin_upload) ; |
$retour = $document->enregistrerSQL($formulaire_document->getSubmitValues(), $nouveau_nom); |
// On place a 1 la colonne p_avoir_document |
if (!$projet->avoirDocument()) $projet->setAvoirDocument(true); |
841,6 → 855,7 |
} else { |
return $formulaire_document->toHTML() ; |
} |
return $retour; |
unset ($projet) ; |
} // end of member function nouveauFichierValidation |
852,7 → 867,7 |
*/ |
function modifierFichier( ) |
{ |
// création de l'objet projet courant |
// creation de l'objet projet courant |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ; |
$projet = new projet ($this->_db, $this->_id_projet) ; |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_MODIFIER_V) ; |
860,9 → 875,9 |
$formulaire_document = new HTML_formulaireDocument('formulaire_document', 'post',preg_replace ("/&/", "&", $this->_url->getURL())) ; |
$formulaire_document->construitFormulaire(PROJET_ACTION_MODIFIER_V) ; |
if ($formulaire_document->validate()) { |
// Création d'un objet document vide |
// Creation d'un objet document vide |
$document = new document ($this->_id_document, $this->_db) ; |
// On passe aussi le numéro de répertoire s'il existe |
// On passe aussi le numero de répertoire s'il existe |
if ($this->_id_repertoire != '') $document->setIdRepertoire($this->_id_repertoire) ; |
$document->majSQL($formulaire_document->getSubmitValues()) ; |
} else { |
879,7 → 894,7 |
*/ |
function nouveauRepertoireValidation( ) |
{ |
// création de l'objet projet courant |
// creation de l'objet projet courant |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ; |
$projet = new projet ($this->_db, $this->_id_projet) ; |
889,22 → 904,26 |
$formulaire_repertoire->setType ('repertoire') ; |
$formulaire_repertoire->construitFormulaire() ; |
if ($formulaire_repertoire->validate()) { |
// Création d'un objet |
// Creation d'un objet |
$document = new document ("", $this->_db) ; |
// avant d'appeler la méthode enregistrerSQL, il faut indiquer l'identifiant du projet et l'identifiant du propriétaire |
// avant d'appeler la methode enregistrerSQL, il faut indiquer l'identifiant du projet et l'identifiant du proprietaire |
$document->setIdProjet ($this->_id_projet) ; |
$document->setIdProprietaire ($this->_auth->getAuthData (PROJET_CHAMPS_ID)) ; |
// On passe aussi le numéro de répertoire s'il existe |
// On passe aussi le numero de repertoire s'il existe |
if ($this->_id_repertoire != '') $document->setIdRepertoire($this->_id_repertoire) ; |
if ($this->_id_repertoire == 0) $document->setIdRepertoire(0) ; |
$chemin_upload = $document->calculeCheminUploaded($projet->getNomRepertoire()) ; |
$nom_repertoire = $document->enregistrerSQL($formulaire_repertoire->getSubmitValues(), $projet->getNomRepertoire()) ; |
$lien = $document->enregistrerSQL($formulaire_repertoire->getSubmitValues(), $projet->getNomRepertoire()) ; |
// La creation du repertoire sur le disque, chemin / nom_repertoire_projet / id_repertoire |
$GLOBALS['log'] .= '<br />chemin_upload:'.$chemin_upload.'<br />'; |
$GLOBALS['log'] .= '<br />mkdir('.PROJET_CHEMIN_FICHIER.$chemin_upload.$nom_repertoire.')<br />'; |
if (!mkdir (PROJET_CHEMIN_FICHIER.$chemin_upload.'/'.$nom_repertoire)) { |
// La création du répertoire sur le disque, chemin / nom_repertoire_projet / id_repertoire |
if (!mkdir (PROJET_CHEMIN_FICHIER.$lien)) { |
$document->suppressionSQL() ; |
return $this->messageErreur(PROJETCONTROLEUR_ERREUR_CREATION_REPERTOIRE).'<br />'.PROJET_CHEMIN_FICHIER.$lien ; |
return $this->messageErreur(PROJETCONTROLEUR_ERREUR_CREATION_REPERTOIRE).'<br />'. |
PROJET_CHEMIN_FICHIER.$chemin_upload.'/'.$nom_repertoire; |
} |
// On place a 1 la colonne p_avoir_document |
if (!$projet->avoirDocument()) $projet->setAvoirDocument(true); |
911,11 → 930,11 |
} else { |
return $formulaire_repertoire->toHTML() ; |
} |
} // end of member function nouveauFichierValidation |
} |
/** |
* Permet de spécifier au controleur sur quel projet l'on travaille. |
* Permet de specifier au controleur sur quel projet l'on travaille. |
* |
* @param int id_projet L'identifiant du projet. |
* @return void |
936,11 → 955,11 |
function accueilProjet( ) |
{ |
$res = '' ; |
// création de l'objet projet courant |
// creation de l'objet projet courant |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ; |
$projet = new projet ($this->_db, $this->_id_projet) ; |
// récupération de la liste des documents associés |
// recuperation de la liste des documents associés |
$liste_documents = $projet->getListesDocuments(PROJET_CHEMIN_FICHIER, PROJET_CHEMIN_ICONES) ; |
// création de la vue liste de document, on nettoie l'url |
948,7 → 967,7 |
include_once PROJET_CHEMIN_CLASSES.'HTML_listeDocuments.class.php' ; |
$vue_liste_document = new HTML_listeDocuments($this->_url, false, $this->_id_repertoire) ; |
// réglage de paramètres de la vue |
// reglage de parametres de la vue |
$vue_liste_document->setAction (array ("couper" => PROJET_ACTION_COUPER, "modifier" => PROJET_ACTION_MODIFIER, "supprimer" => PROJET_SUPPRESSION_FICHIER)) ; |
$vue_liste_document->setCheminIcones(PROJET_CHEMIN_ICONES) ; |
956,7 → 975,7 |
$tableau_navigation = document::getCheminIdRepertoire($this->_id_repertoire, $this->_db) ; |
$vue_liste_document->setCheminNavigation ($tableau_navigation) ; |
// vérification des droits de l'utilisateur |
// verification des droits de l'utilisateur |
$entete_liste = array (PROJET_FICHIERS_NOM, PROJET_FICHIERS_TAILLE, PROJET_FICHIERS_CREE_LE) ; |
if ($this->_auth->getAuth()) { |
1131,10 → 1150,10 |
} // end of member function accueilProjet |
/** |
* Permet de spécifier quel répertoire, dans la vue de document afficher. Il sera |
* passé en paramètre à la classe HTML_listeDocuments. |
* Permet de specifier quel repertoire, dans la vue de document afficher. Il sera |
* passe en parametre a la classe HTML_listeDocuments. |
* |
* @param int id_repertoire L'identifiant du répertoire à afficher. |
* @param int id_repertoire L'identifiant du repertoire a afficher. |
* @return void |
* @access public |
*/ |
1141,7 → 1160,7 |
function setIdRepertoire( $id_repertoire ) |
{ |
$this->_id_repertoire = $id_repertoire ; |
} // end of member function setIdRepertoire |
} |
/** |
* Supprime un projet et tout ce qui va avec. |
1204,7 → 1223,7 |
*/ |
function envoyerUnMailValidation( ) |
{ |
// Vérifications |
// Verifications |
if (isset($_SESSION['formulaire_mail']) && $_SESSION['formulaire_mail'] == 'valide') { |
return include_once PROJET_CHEMIN_APPLI.'actions/forums.php' ; |
} |
1214,7 → 1233,7 |
$formulaire_mail = new HTML_formulaireMail('formulaire_mail', 'post', preg_replace ("/&/", "&", $this->_url->getURL())) ; |
$formulaire_mail->construitFormulaire() ; |
if ($formulaire_mail->validate()) { |
// création de l'objet projet courant |
// creation de l'objet projet courant |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ; |
$projet = new projet ($this->_db, $this->_id_projet) ; |
$info_liste = $projet->getListesAssociees() ; |
1229,7 → 1248,7 |
$entetes['Message-ID'] = md5(time()).'@'.$projet->_listes_associes[0]->getNom().'.'.$projet->_listes_associes[0]->getDomaine() ; |
$entetes['reply-to'] = $projet->_listes_associes[0]->getAdresseEnvoi() ; |
$entetes['Content-Type'] = 'text/plain' ; |
// Traitement de la reference s'il s'agit d'une réponse |
// Traitement de la reference s'il s'agit d'une reponse |
if (isset ($_POST['messageid'])) { |
$entetes['In-Reply-To'] = $_POST['messageid'] ; |
} |
1259,7 → 1278,7 |
$formulaire_liste->setDefaults(array('domaine_liste' => PROJET_DOMAINE_LISTE)) ; |
$formulaire_liste->updateElementAttr('domaine_liste', array('readonly' => 'readonly')) ; |
return $res.$formulaire_liste->toHTML() ; |
} // end of member function formulaireListe |
} |
/** |
* Transmet au serveur la demande de création d'une nouvelle liste. |
1269,13 → 1288,14 |
*/ |
function nouvelleListeValidation( ) |
{ |
// Vérifications |
// Verifications |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_NOUVELLE_LISTE_V ); |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireListe.class.php' ; |
$formulaire_liste = new HTML_formulaireListe('formulaire_liste', 'post', preg_replace ("/&/", "&", $this->_url->getURL())) ; |
$formulaire_liste->construitFormulaire() ; |
if ($formulaire_liste->validate()) { |
// création de l'objet liste_discussion |
// creation de l'objet liste_discussion |
include_once PROJET_CHEMIN_CLASSES.'liste_discussion.class.php'; |
$liste = new liste_discussion('', $this->_db) ; |
// On vérifie que le nom de la liste soit unique |
1289,14 → 1309,14 |
$projet = new projet ($this->_db, $this->_id_projet) ; |
$projet->ajouterListe($liste) ; |
// Création de la liste |
// Creation de la liste |
$resultat_creation = file_get_contents (PROJET_SERVEUR_VPOPMAIL.'/creation_liste.php?domaine='. |
$liste->getDomaine().'&liste='.$liste->getNom().'¶metres=aBiud') ; |
// Ajout du modérateur |
// Ajout du moderateur |
$resultat_ajout_moderateur = file_get_contents (PROJET_SERVEUR_VPOPMAIL.'/ajout_moderateur.php?domaine='. |
$liste->getDomaine().'&liste='.$liste->getNom().'&mail='.$this->_auth->getUserName()) ; |
// Ajout du modérateur en tant qu'utilisateur |
// Ajout du moderateur en tant qu'utilisateur |
$resultat_ajout_utilisateur = file_get_contents (PROJET_SERVEUR_VPOPMAIL.'/ajout_abonne.php?domaine='. |
$liste->getDomaine().'&liste='.$liste->getNom().'&mail='.$this->_auth->getUserName()) ; |
1436,7 → 1456,7 |
} // end of member function voirParticipants |
/** |
* Inscrit un utilisateur à un projet avec le statut observateur |
* Inscrit un utilisateur a un projet avec le statut observateur |
* |
* @return void |
* @access public |
1481,7 → 1501,7 |
} else { |
$participant->setStatut(3, $this->_auth->getAuthData (PROJET_CHAMPS_ID), $this->_id_projet) ; |
$tableau_coordinateur = $participant->getCoordinateurs($this->_id_projet) ; |
#include_once PROJET_CHEMIN_API.'pear/Mail.php'; |
$entetes['From'] = $this->_auth->getUserName(); |
$entetes['To'] = ''; |
$entetes['Subject'] = PROJET_DEMANDE_INSCRIPTION ; |
1514,11 → 1534,12 |
} |
if ($this->_presentation != 'arbre') { |
return include_once PROJET_CHEMIN_APPLI.'actions/resume.php' ; |
return '<h1>'.$projet->getTitre().'</h1>'. |
str_replace ('nom_du_projet', $projet->getTitre(), PROJET_LAIUS_INSCRIPTION_MODERE); |
} else { |
$this->_action = PROJET_ACTION_VOIR_RESUME; |
} |
return ; |
return PROJET_LAIUS_INSCRIPTION_MODERE; |
} |
$res = '<h1>'.PROJET_INSCRIPTION_PROJET.' : '.$projet->getTitre().'</h1>'."\n" ; |
if ($projet->avoirListe()) $res .= '<h2>'.PROJET_MESSAGE_LISTE.'</h2>'."\n" ; |
1531,7 → 1552,7 |
} // end of member function inscriptionProjet |
/** |
* Inscrit l'utilisateur logué à la liste dont le paraître est en post. |
* Inscrit l'utilisateur loggue a la liste dont le parametre est en post. |
* |
* @return void |
* @access public |
1793,9 → 1814,9 |
{ |
$messageErreur = array ( |
PROJETCONTROLEUR_ACTION_INVALIDE => "Action non valide", |
PROJETCONTROLEUR_ERREUR_SUPPRESSION_REPERTOIRE => "Impossible de supprimer le répertoire", |
PROJETCONTROLEUR_PAS_DE_DOCUMENT_SELECTIONNE => 'Pas de fichier sélectionn°', |
PROJETCONTROLEUR_ERREUR_CREATION_REPERTOIRE => 'Impossible de créer le répertoire' |
PROJETCONTROLEUR_ERREUR_SUPPRESSION_REPERTOIRE => "Impossible de supprimer le répertoire", |
PROJETCONTROLEUR_PAS_DE_DOCUMENT_SELECTIONNE => 'Pas de fichier sélectionné', |
PROJETCONTROLEUR_ERREUR_CREATION_REPERTOIRE => 'Impossible de créer le répertoire' |
) ; |
return '<p class="erreur">'.$messageErreur[$valeur].'</p>' ; |
} // end of member function messageErreur |
/trunk/client/projet/classes/ezmlmAccessObject.class.php |
---|
6,34 → 6,34 |
// Ce logiciel est un programme informatique servant à gérer du contenu et des |
// applications web. |
// Ce logiciel est régi par la licence CeCILL soumise au droit français et |
// Ce logiciel est regi par la licence CeCILL soumise au droit francais et |
// respectant les principes de diffusion des logiciels libres. Vous pouvez |
// utiliser, modifier et/ou redistribuer ce programme sous les conditions |
// de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA |
// de la licence CeCILL telle que diffusee par le CEA, le CNRS et l'INRIA |
// sur le site "http://www.cecill.info". |
// En contrepartie de l'accessibilité au code source et des droits de copie, |
// de modification et de redistribution accordés par cette licence, il n'est |
// offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons, |
// seule une responsabilité restreinte pèse sur l'auteur du programme, le |
// titulaire des droits patrimoniaux et les concédants successifs. |
// En contrepartie de l'accessibilite au code source et des droits de copie, |
// de modification et de redistribution accordes par cette licence, il n'est |
// offert aux utilisateurs qu'une garantie limitee. Pour les memes raisons, |
// seule une responsabilite restreinte pese sur l'auteur du programme, le |
// titulaire des droits patrimoniaux et les concedants successifs. |
// A cet égard l'attention de l'utilisateur est attirée sur les risques |
// associés au chargement, à l'utilisation, à la modification et/ou au |
// développement et à la reproduction du logiciel par l'utilisateur étant |
// donné sa spécificité de logiciel libre, qui peut le rendre complexe à |
// manipuler et qui le réserve donc à des développeurs et des professionnels |
// avertis possédant des connaissances informatiques approfondies. Les |
// utilisateurs sont donc invités à charger et tester l'adéquation du |
// logiciel à leurs besoins dans des conditions permettant d'assurer la |
// sécurité de leurs systèmes et ou de leurs données et, plus généralement, |
// à l'utiliser et l'exploiter dans les mêmes conditions de sécurité. |
// A cet egard l'attention de l'utilisateur est attiree sur les risques |
// associes au chargement, a l'utilisation, a la modification et/ou au |
// developpement et a la reproduction du logiciel par l'utilisateur etant |
// donne sa specificite de logiciel libre, qui peut le rendre complexe a |
// manipuler et qui le reserve donc a des developpeurs et des professionnels |
// avertis possedant des connaissances informatiques approfondies. Les |
// utilisateurs sont donc invites a charger et tester l'adequation du |
// logiciel a leurs besoins dans des conditions permettant d'assurer la |
// securite de leurs systemes et ou de leurs donnees et, plus generalement, |
// a l'utiliser et l'exploiter dans les memes conditions de securite. |
// Le fait que vous puissiez accéder à cet en-tête signifie que vous avez |
// pris connaissance de la licence CeCILL, et que vous en avez accepté les |
// Le fait que vous puissiez acceder a cet en-tete signifie que vous avez |
// pris connaissance de la licence CeCILL, et que vous en avez accepte les |
// termes. |
// ---- |
// CVS : $Id: ezmlmAccessObject.class.php,v 1.4 2007-04-19 15:34:35 neiluj Exp $ |
// CVS : $Id: ezmlmAccessObject.class.php,v 1.5 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
46,7 → 46,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision: 1.4 $ |
*@version $Revision: 1.5 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
91,10 → 91,11 |
'messages_auteur', |
'messages_mois', |
'messages_thread', |
'supprimer'); |
'supprimer', |
'liste_abonnes'); |
/** |
* l'action sélectionnée |
* l'action selectionnee |
*/ |
var $action ; |
109,7 → 110,7 |
var $url ; |
/** |
* L'identifiant du répertoire |
* L'identifiant du repertoire |
*/ |
var $identifiant_repertoire ; |
120,17 → 121,17 |
var $identifiant_message; |
/** |
* L'identifiant du répertoire |
* L'identifiant du repertoire |
*/ |
var $_numeroRepertoireSuivant ; |
/** |
* L'identifiant du répertoire |
* L'identifiant du repertoire |
*/ |
var $hash_auteur ; |
/** |
* Le mois à afficher |
* Le mois a afficher |
*/ |
var $mois ; |
147,9 → 148,8 |
var $chemin_fichier_xml; |
/** |
* Creation de l'objet d'accès |
* Creation de l'objet d'acces |
* |
* |
*/ |
function ezmlmAccessObject ($action, $domaine, $liste, $langue = 'fr', $url = '') { |
197,6 → 197,7 |
function handleElement_ezmlm_messages_thread ($name, $attribs, $data) { echo $data ; } |
function handleElement_ezmlm_liste_abonnes ($name, $attribs, $data) { echo $data ; } |
/** |
* Choix de l'action |
* |
204,11 → 205,11 |
* 'calendrier_messages' |
* |
* @access public |
* @param string une action qui doit être supporté |
* @param string une action qui doit etre supporté |
*/ |
function setAction($action) { |
// vérification de l'action |
// verification de l'action |
if (!in_array($action, $this->actions_supportees)) { |
return raiseError(EZMLM_ACCESS_OBJECT_ACTION_NON_SUPPORTEE) ; |
} |
217,6 → 218,9 |
// Libere les ressources (XML_Parser::free) |
$this->free(); |
// On vide l url |
//$this->url = ''; |
$this->chemin_fichier_xml = ''; |
// Charge la nouvelle action |
$this->load() ; |
} |
246,11 → 250,11 |
} |
/** |
* Précise un message à extraire |
* Precise un message a extraire |
* |
* On indique le numéro de répertoire ezmlm et le numéro du message |
* @param integer le numéro du répertoire |
* @param integer le numéro du message |
* On indique le numero de repertoire ezmlm et le numero du message |
* @param integer le numero du repertoire |
* @param integer le numero du message |
* |
*/ |
260,9 → 264,9 |
} |
/** |
* Précise un auteur |
* Precise un auteur |
* |
* On indique le numéro de répertoire ezmlm et le numéro du message |
* On indique le numero de repertoire ezmlm et le numero du message |
* @param string le hash d'un auteur |
* |
*/ |
271,9 → 275,9 |
$this->hash_auteur = $hash_auteur; |
} |
/** |
* Précise un mois |
* Precise un mois |
* |
* On indique le numéro de répertoire ezmlm et le numéro du message |
* On indique le numero de repertoire ezmlm et le numéro du message |
* @param string le hash d'un auteur |
* |
*/ |
298,17 → 302,30 |
function parse() |
{ |
if (substr(phpversion(), 0, 1) == '5') { |
$xml = new SimpleXMLElement(file_get_contents($this->chemin_fichier_xml)); |
echo utf8_decode ($xml); |
switch ($this->action) { |
case 'calendrier_messages' : echo utf8_decode($xml->ezmlm_calendrier_messages); |
//try { |
$xml = new SimpleXMLElement($this->chemin_fichier_xml, null, true); |
switch ($this->action) { |
case 'calendrier_messages' :echo utf8_decode($xml); |
echo utf8_decode($xml->ezmlm_calendrier_messages); |
break; |
case 'message': |
echo utf8_decode ($xml); |
$this->_numeroRepertoirePrecedent = $xml->message_precedent['numero_repertoire']; |
$this->_numeroRepertoireSuivant = $xml->message_suivant['numero_repertoire']; |
$this->_numeroFichierSuivant = $xml->message_suivant['numero']; |
$this->_numeroFichierPrecedent = $xml->message_precedent['numero']; |
break; |
case 'message': |
$this->_numeroRepertoirePrecedent = $xml->message_precedent['numero_repertoire']; |
$this->_numeroRepertoireSuivant = $xml->message_suivant['numero_repertoire']; |
$this->_numeroFichierSuivant = $xml->message_suivant['numero']; |
$this->_numeroFichierPrecedent = $xml->message_precedent['numero']; |
} |
default : |
echo utf8_decode($xml); |
} |
$error = 'Erreur dans l\'accès au fichier:<br />'.$this->chemin_fichier_xml.'<br />'; |
$error = ''; |
// throw new Exception($error); |
//} |
//catch (Exception $e) { |
// echo $e->getMessage(). "<br />"; |
//} |
} else { |
return parent::parse(); |
} |
/trunk/client/projet/langues/pro_langue_fr.inc.php |
---|
10,7 → 10,7 |
* | Auteur : Alexandre Granier <alexandre@tela-botanica.org> | |
* +-----------------------------------------------------------------------+ |
* $Id: pro_langue_fr.inc.php,v 1.15 2007-03-22 16:02:40 alexandre_tb Exp $ |
* $Id: pro_langue_fr.inc.php,v 1.16 2007-06-25 12:15:07 alexandre_tb Exp $ |
*/ |
if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langue_fr.local.php')) { |
136,6 → 136,13 |
define ('PROJET_INSCRIPTION', 'Inscription') ; |
define ('PROJET_DEMANDE_INSCRIPTION', 'Demande d\'inscription au projet'); |
define ('PROJET_EN_ATTENTE', 'en attente de validation'); |
define ('PROJET_LAIUS_INSCRIPTION_MODERE', 'Votre demande d\'inscription au projet "nom_du_projet" a été enregistrée et |
est proposée pour acceptation au coordonnateur du projet"<br /><br /> |
Un accusé réception vous sera envoyé à votre courriel d\'inscription |
confirmant l\'acception de votre inscription.<br /><br /> |
Vous pourrez alors accéder à toutes les fonctions du projet "nom_du_projet"'); |
// ========== Partie concernant l'upload de fichier ================================= |
define ("PROJET_DOCUMENT_DU_PROJET", "Documents du projet") ; |
165,7 → 172,8 |
define ('PROJET_CHANGER_REPERTOIRE', 'CHANGER UN FICHIER DE REPERTOIRE') ; |
define ('PROJET_FICHIER_A_DEPLACER', 'Fichier à déplacer : ') ; |
define ('PROJET_DOCUMENT', 'Documents') ; |
define ('PROJET_AFFICHAGE_ARBORESCENT', 'Affichage arborescent'); |
define ('PROJET_AFFICHAGE_CLASSIQUE', 'Affichage classique'); |
// Création de répertoire |
define ("PROJET_REP", "Répertoire du projet") ; |
define ("PROJET_REP_CREER", "Création d'un nouveau répertoire") ; |
/trunk/client/projet/actions/wikini.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: wikini.php,v 1.16 2007-04-19 15:34:35 neiluj Exp $ |
// CVS : $Id: wikini.php,v 1.17 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.16 $ |
*@version $Revision: 1.17 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
50,7 → 50,7 |
$projet = new projet ($this->_db, $this->_id_projet) ; |
$wiki_res = '' ; |
$wiki_res.= '<h1>'.PROJET_PROJET.' : '.$projet->getTitre()."</h1>" ; |
$wiki_res.= '<h2>'.PROJET_PROJET.' : '.$projet->getTitre()."</h2>" ; |
// Les wikinis associés au projet |
if ($wiki=$projet->getWikini()) { |
if ($projet->isModere()) { |
/trunk/client/projet/actions/forums.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: forums.php,v 1.11 2007-04-19 15:34:35 neiluj Exp $ |
// CVS : $Id: forums.php,v 1.12 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.11 $ |
*@version $Revision: 1.12 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/trunk/client/projet/actions/documents.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: documents.php,v 1.7 2007-04-19 15:34:35 neiluj Exp $ |
// CVS : $Id: documents.php,v 1.8 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.7 $ |
*@version $Revision: 1.8 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/trunk/client/projet/actions/participants.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: participants.php,v 1.6 2007-04-19 15:34:35 neiluj Exp $ |
// CVS : $Id: participants.php,v 1.7 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.6 $ |
*@version $Revision: 1.7 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
53,7 → 53,7 |
$titre = '<h2>'.PROJET_LISTE_PARTICIPANT.'</h2>'."\n" ; |
$participants = new participe($this->_db) ; |
// On teste ici s'il y a une mise à jour de statut |
// On teste ici s'il y a une mise a jour de statut |
if (isset($_REQUEST['statut'])) { |
$participants->setStatut($_REQUEST['statut'], $_GET['id_utilisateur'], $this->_id_projet) ; |
$projet->getListesAssociees() ; |
67,7 → 67,7 |
} |
} |
// Ce qui suit doit être amàliorà pour sortir la requête sur l'annuaire |
// Ce qui suit doit etre ameliore pour sortir la requete sur l'annuaire |
// On teste s'il y a un ajout d'utilisateur voir HTML_listeParticipants |
if (isset($_POST['mail_utilisateur'])) { |
$requete = 'select '.PROJET_CHAMPS_ID.' from '.PROJET_ANNUAIRE.' where '.PROJET_CHAMPS_MAIL.'="'.$_POST['mail_utilisateur'].'"'; |
86,8 → 86,9 |
if ($this->_auth->getAuth()) { |
$statut = participe::getStatutSurProjetCourant($this->_auth->getAuthData(PROJET_CHAMPS_ID), $this->_id_projet, $this->_db) ; |
if ($statut == 1) $droits = PROJET_DROIT_COORDINATEUR ; |
if ($statut == 2) $droits = PROJET_DROIT_CONTRIBUTEUR ; |
if ($statut == 1) $droits = PROJET_DROIT_COORDINATEUR ; |
if ($statut == 3) $droits = PROJET_DROIT_EN_ATTENTE; |
if ($statut == 4) $droits = PROJET_DROIT_AUCUN ; |
if (participe::isAdministrateur($this->_auth->getAuthData(PROJET_CHAMPS_ID), $this->_db)) $droits = PROJET_DROIT_ADMINISTRATEUR ; |
$HTML_listeParticipants = new HTML_listeParticipants(true) ; |
96,17 → 97,18 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_VOIR_PARTICIPANT) ; |
$HTML_listeParticipants->setURL($this->_url) ; |
// Construction de l'entete |
$entete = array (PROJET_NOM, PROJET_PRENOM) ; |
$entete = array (PROJET_NOM, PROJET_PRENOM, PROJET_MAIL, PROJET_DATE_INSCRIPTION, PROJET_STATUT) ; |
if ($projet->avoirListe()) array_push ($entete, PROJET_LISTE_DE_DISCUSSION); |
$info_utilisateur = $participants->getInscrits($this->_id_projet, $droits); |
array_push ($entete, PROJET_MAIL) ; |
$info_utilisateur = $participants->getInscrits($this->_id_projet, $droits) ; |
array_push ($entete, PROJET_DATE_INSCRIPTION, PROJET_STATUT) ; |
$HTML_listeParticipants->construitEntete($entete) ; |
include_once PROJET_CHEMIN_CLASSES.'statut.class.php' ; |
if ($projet->avoirListe()) { |
$ezmlm = new ezmlmAccessObject('liste_abonnes', $projet->_liste_associes[0]->getDomaine(), |
$projet->_listes_associes[0]->getNom()); |
} |
$HTML_listeParticipants->construitListe($info_utilisateur, statut::getTousLesStatuts(PROJET_STATUT_SAUF_ADM, $this->_db), $projet) ; |
$HTML_listeParticipants->construitListe($info_utilisateur, statut::getTousLesStatuts(PROJET_STATUT_SAUF_ADM, $this->_db)) ; |
$res = $HTML_listeParticipants->toHTML() ; |
if ($droits <= PROJET_DROIT_COORDINATEUR || participe::isAdministrateur($this->_auth->getAuthData(PROJET_CHAMPS_ID), $this->_db)) { |
/trunk/client/projet/documentation/projet_v0.24.sql |
---|
173,7 → 173,5 |
# |
INSERT INTO `projet_template` VALUES (1, 'fr-FR', 'L\'utilisateur {nom} {prenom} souhaite être inscrit au projet {nom_projet} dont vous êtes modérateur.\r\nCliquez sur le lien suivant pour modérer son inscription.\r\n{lien}\r\n'); |
# Mise a jour performance |
ALTER TABLE `projet` ADD `p_avoir_document` TINYINT UNSIGNED DEFAULT '0' NOT NULL ; |
/trunk/client/projet/documentation/projet_v0.25.sql |
---|
New file |
0,0 → 1,2 |
# Mise a jour performance |
ALTER TABLE `projet` ADD `p_avoir_document` TINYINT UNSIGNED DEFAULT '0' NOT NULL ; |
/trunk/client/projet/presentation/liste.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: liste.php,v 1.7 2007-06-01 13:56:13 alexandre_tb Exp $ |
// CVS : $Id: liste.php,v 1.8 2007-06-25 12:15:07 alexandre_tb Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.7 $ |
*@version $Revision: 1.8 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
51,7 → 51,7 |
// On inclue un fichier local |
if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langue_'.$GLOBALS['lang'].'.local.inc.php')) |
include_once PROJET_CHEMIN_APPLI.'langues/pro_langue_'.$GLOBALS['lang'].'.local.inc.php' ; |
// On vérifie si l'utilisateur participe à des projets |
// On verifie si l'utilisateur participe a des projets |
//echo PROJET_CHEMIN_APPLI.'langues/pro_langue_'.$GLOBALS['lang'].'.local.inc.php'; |
// Entete de la liste, qu'on recupere dans un template |
69,7 → 69,7 |
if ($auth){ |
include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php' ; |
$utilisateur_liste = new inscription_liste($this->_db) ; |
// On teste ici s'il y a une mise à jour de statut |
// On teste ici s'il y a une mise a jour de statut |
if (isset($_POST['statut'])) { |
// $_POST['statut'] et $_GET['identifiant_projet'] proviennent du formulaire voir HTML_listeProjet |
include_once PROJET_CHEMIN_CLASSES.'annuaire.class.php' ; |
144,8 → 144,8 |
$res .= '<p>'.PROJET_TEXTE_NON_IDENTIFIE.'</p>'."\n" ; |
} |
// Maintenant la liste des projets où l'utilisateur ne participe pas. |
// Et si pas logué tous les projets |
// Maintenant la liste des projets ou l'utilisateur ne participe pas. |
// Et si pas loggue tous les projets |
if ($auth) { |
$projetNonParticipantListe = $participant -> getProjetsNonParticipant($id_u) ; |
// Si certain projet sont à exclure, on les exclu |
227,6 → 227,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.7 2007-06-01 13:56:13 alexandre_tb |
* ajout d un include manquant |
* |
* Revision 1.6 2007/04/19 15:34:35 neiluj |
* préparration release (livraison) "Narmer" - v0.25 |
* |
/trunk/client/projet/js/telechargement.js |
---|
1,3 → 1,36 |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU General Public | |
// | 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: telechargement.js,v 1.2 2007-06-25 12:15:07 alexandre_tb Exp $ |
/** |
* Application projet |
* |
* La service de telechargement |
* |
*@package projet |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2007 |
*@version $Revision: 1.2 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
var dojoConfig = { |
isDebug: true |
}; |
20,8 → 53,8 |
// Si non on dirige vers le document |
if ( !isFolder) { |
var link = treeNode['link']; |
document.location.href= 'client/projet/fichiers/'+link; |
var link = treeNode['link']; |
document.location.href =link; |
} else { |
var repertoire = dojo.widget.manager.getWidgetById('treeController'); |
repertoire.expand(treeNode); |
34,10 → 67,10 |
// on connecte le select event a la fonction treeSelectFired() --> |
dojo.event.connect(treeSelector,'select','treeSelectFired'); |
var rootNode = dojo.widget.manager.getWidgetById('rootNode'); |
// On ouvre le noeud racine |
var rootNode = dojo.widget.manager.getWidgetById('rootNode'); |
rootNode.expand(); |
} |
dojo.addOnLoad(init); |
dojo.addOnLoad(init); |
/trunk/client/projet/js/arbreDocument.js |
---|
10,7 → 10,6 |
dojo.require("dojo.event.*"); |
dojo.require("dojo.io.*"); |
function treeSelectFired() { |
// une reference vers treeSelector et vers le noeud selectionne |
23,7 → 22,10 |
// Si non on dirige vers le document |
if ( !isFolder) { |
var link = treeNode['link']; |
document.location.href= 'client/projet/fichiers/'+link; |
document.location.href= link; |
} else { |
var repertoire = dojo.widget.manager.getWidgetById('treeController'); |
repertoire.expand(treeNode); |
} |
} |
31,14 → 33,21 |
// une reference vers treeSelector |
var treeSelector = dojo.widget.manager.getWidgetById('treeSelector'); |
// on connecte le select event a la fonction treeSelectFired() --> |
// on connecte le select event a la fonction treeSelectFired() |
dojo.event.connect(treeSelector,'select','treeSelectFired'); |
//ajout d'un listener à la suppression d'un noeud |
var rootNode = dojo.widget.manager.getWidgetById('rootNode'); |
var loadingController = dojo.widget.manager.getWidgetById('treeController'); |
// L appel ci-dessous permet de charger les donnees du noeud racine |
loadingController.loadRemote(rootNode); |
// On ouvre le noeud racine |
rootNode.expand(); |
//ajout d'un listener a la suppression d'un noeud |
dojo.event.topic.subscribe("nodeRemoved", ioDeplaceFichier) ; |
} |
// envoie une requete asynchrone pour deplacer un fichier |
function ioDeplaceFichier (message) { |
52,10 → 61,5 |
}; |
//var treeLoadingController = dojo.widget.manager.getWidgetById('treeController'); |
dojo.io.bind (arguments) ; |
/* |
alert (message.child.title +" enlevé de "+ message.oldParent.title + |
" dans l'arbre " + message.oldTree.widgetId + " " + arguments.url + |
"\n " + treeLoadingController.getRPCUrl('')); |
*/ |
} |
dojo.addOnLoad(init); |
/trunk/client/projet/projet_derniers_telechargements.php |
---|
10,10 → 10,10 |
* | Auteur : Alexandre Granier <alexandre@tela-botanica.org> | |
* +-----------------------------------------------------------------------+ |
* $Id: projet_derniers_telechargements.php,v 1.4 2007-04-19 09:17:35 alexandre_tb Exp $ |
* $Id: projet_derniers_telechargements.php,v 1.5 2007-06-25 12:15:06 alexandre_tb Exp $ |
*/ |
// Cette application affiche les derniers documents uploadé dans le module projet |
// Cette application affiche les derniers documents uploades dans le module projet |
// ainsi que tous les documents du module |
// =========================================================== |
21,19 → 21,18 |
// =========================================================== |
// Le nombre à afficher |
// Le nombre a afficher |
define ("PROJET_TELECHARGEMENT_NOMBRE", 8) ; |
//==================== Les labels ======================================= |
define ("PROJET_TELECHARGEMENT_TITRE", "Page de téléchargements rapides") ; |
define ("PROJET_TELECHARGEMENT_TITRE", "Page de téléchargements rapides") ; |
define ("PROJET_TELECHARGEMENT_DERNIERS", "Derniers documents mis en ligne") ; |
define ("PROJET_TELECHARGEMENT_TOUS", "Tous les documents, par projet") ; |
//=============bibliothèques PEAR =================================== |
//=============bibliotheques PEAR =================================== |
include_once 'HTML/Table.php' ; |
include_once 'HTML/TreeMenu.php' ; |
// ========== Bibliothèque Projet ==================================== |
// ========== Bibliotheque Projet ==================================== |
include_once 'configuration/projet.config.inc.php' ; |
include_once PROJET_CHEMIN_CLASSES.'projetControleur.class.php' ; |
include_once PROJET_CHEMIN_CLASSES.'document.class.php' ; |
42,9 → 41,16 |
function afficherContenuCorps() { |
global $id_projet, $repcourant, $baseURL, $projet ; |
global $G_ftpHost,$G_ftpUser,$G_ftpPwd,$G_ftpLocal, $PHP_SELF; |
// à remplacer par un div pour genesia |
if (isset($_GET['service'])) { |
if ($_GET['service'] == 'ecouteArbreFichier') { |
include_once PROJET_CHEMIN_APPLI.'/services/ecouteArbreFichier.php'; |
} |
if ($_GET['service'] == 'telechargement') { |
include_once PROJET_CHEMIN_APPLI.'/services/telechargement.php'; |
} |
} |
// a remplacer par un div pour genesia |
$res = "<h1>".PROJET_TELECHARGEMENT_TITRE."</h1>\n" ; |
$res .= "<h2>".PROJET_TELECHARGEMENT_DERNIERS."</h2>\n" ; |
60,13 → 66,11 |
$vue_liste_document->construitEntete($entete_liste) ; |
$vue_liste_document->construitListe ($liste_documents, $droits, 'ignore_repertoire', $GLOBALS['projet_db']) ; |
$res .= $vue_liste_document->toHTML() ; |
$res .= $vue_liste_document->toHTML('', PROJET_DROIT_AUCUN) ; |
$res .= "<h2>".PROJET_TELECHARGEMENT_TOUS."</h2>\n" ; |
// Création de l'objet TreeMenu |
//GEN_stockerFichierScript(1, "api/TreeMenu/TreeMenu.js") ; |
// Les noms des fichiers graphiques |
$icon = 'folder.gif'; |
$expandedIcon = 'folder-expanded.gif'; |
76,26 → 80,23 |
$requete = "SELECT p_titre, p_id FROM projet ORDER BY p_titre" ; |
$resultat = $GLOBALS['projet_db']->query ($requete) or die ("Echec <br />".mysql_error()."<br />$requete") ; |
// $menu = new HTML_TreeMenu() ; |
// $node = new HTML_TreeNode(array('text' => "Les projets de Tela Botanica", 'link' => "", 'icon' => $icon, 'expandedIcon' => $expandedIcon)); |
$noeudProjet = '' ; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { |
$titre = $ligne->p_titre ; |
// $node_1[$i] = &$node->addItem (new HTML_TreeNode(array('text' => $titre, 'link' => "", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); |
// projet_fichiers (&$node_1[$i], $ligne->p_id) ; |
$i++ ; |
$noeudProjet .= '<div dojoType="TreeNode" title="'.$ligne->p_titre.'" widgetId="projet_'. |
$ligne->p_id.'" objectId="projet_'.$ligne->p_id.'" isFolder="true"></div>'."\n"; |
} |
// $menu->addItem($node); |
// $treeMenu = &new HTML_TreeMenu_DHTML($menu, array('images' => 'api/TreeMenu/images', 'defaultClass' => 'text')); |
// $res .= "<p>".$treeMenu->toHTML()."</p>\n" ; |
GEN_stockerFichierScript('dojo', 'api/js/dojo/dojo.js', 'text/javascript'); |
GEN_stockerFichierScript('dojoScriptProjet', PROJET_CHEMIN_APPLI.'js/telechargement.js'); |
//$res .= '<p>' ; |
$RPCUrl = PROJET_CHEMIN_APPLI.'services/ecouteArbreFichier.php'; |
$res .= '<div dojoType="TreeLoadingController" RPCUrl="'.$RPCUrl.'" widgetId="treeController" DNDController="create"></div> |
$RCPUrl = PROJET_CHEMIN_APPLI.'services/ecouteArbreFichier.php?id_projet='.$id_projet; |
$GLOBALS['url']->addQueryString(PROJET_VARIABLE_SERVICE, 'ecouteArbreFichier'); |
$RCPUrl = $GLOBALS['url']->getURL(); |
$res .= '<div dojoType="TreeLoadingController" RPCUrl="'.$RCPUrl.'" widgetId="treeController" DNDController="create"></div> |
<div dojoType="TreeSelector" widgetId="treeSelector"></div> |
<div dojoType="Tree" DNDMode="between" selector="treeSelector" widgetId="bandTree" controller="treeController"> |
<div dojoType="TreeNode" title="Racine" widgetId="rootNode" objectId="root" isFolder="true">'."\n". |
106,10 → 107,10 |
return $res ; |
} |
/** fonction projet_fichiers() - Remplie un noeud avec les fichiers et répertoires |
/** fonction projet_fichiers() - Remplie un noeud avec les fichiers et repertoires |
* |
* Le noeud est passé en référence. Ainsi, cette fonction ne retourne rien mais modifie le tableau des |
* noeuds passé en référence. |
* Le noeud est passe en reference. Ainsi, cette fonction ne retourne rien mais modifie le tableau des |
* noeuds passe en reference. |
* |
* return void |
*/ |
116,10 → 117,10 |
function projet_fichiers ($noeud, $id_rep, $pere = 0) |
{ |
//Récupération de l'identifiant du répertoire courant |
//Recuperation de l'identifiant du repertoire courant |
//La fonction est appelé récursivement quand $pere ne vaut pas null |
//$id_rep prend donc la valeur de $pere transmise par l'appel précédent de la fonction. |
//La fonction est appele recursivement quand $pere ne vaut pas null |
//$id_rep prend donc la valeur de $pere transmise par l'appel precedent de la fonction. |
// Les noms des fichiers graphiques |
$icon = 'folder.gif'; |
166,7 → 167,7 |
$resultat_fichiers = $GLOBALS['projet_db']->query($requete_fichiers) ; |
if (DB::isError ($resultat_fichiers)) { |
die ('Echec de la requete : '.$requete.'<br />'.$resultat_fichiers->getMessage()) ; |
die ('Echec de la requete : '.$requete_fichiers.'<br />'.$resultat_fichiers->getMessage()) ; |
} |
//Stockage des informations sur les fichiers du répertoires courant pour affichage dans un arbre |
187,6 → 188,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.4 2007/04/19 09:17:35 alexandre_tb |
* utilisation de dojo pour afficher l arbre des derniers documents |
* |
* Revision 1.3 2005/10/06 08:23:48 alexandre_tb |
* Ajout de commentaires |
* |
/trunk/client/projet/services/telechargement.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: telechargement.php,v 1.1 2007-04-19 09:37:50 alexandre_tb Exp $ |
// CVS : $Id: telechargement.php,v 1.2 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.1 $ |
*@version $Revision: 1.2 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
40,6 → 40,61 |
// +------------------------------------------------------------------------------------------------------+ |
if (is_object ($this) && $this->_id_document == '') { |
return 'aucun fichier demandé'; |
} else { |
if (!is_object($this) && isset ($_GET['id_document'])) { |
$id_document = $_GET['id_document']; |
} |
} |
if (is_object ($this)) { |
$id_document = $this->_id_document; |
} |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php'; |
include_once PROJET_CHEMIN_CLASSES.'document.class.php'; |
$document = new document ($id_document, $GLOBALS['projet_db'], PROJET_CHEMIN_FICHIER, PROJET_CHEMIN_ICONES) ; |
$projet = new projet ($document->_id_projet); |
// Soit le document est public et on le renvoie, soit il est prive |
// et on teste les droits |
if ($document->getVisibilite() == 'prive') { |
// On teste le login |
if ($GLOBALS['projet_auth']->getAuth()) { |
include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ; |
$id_utilisateur = $GLOBALS['projet_auth']->getAuthData(PROJET_CHAMPS_ID); |
$participant = new participe($GLOBALS['projet_db']) ; |
if ($participant->isAdministrateur($id_utilisateur) || $participant->isCoordinateur($id_utilisateur) |
|| $participant->isContributeur($id_utilisateur)) { |
$ok = true ; |
} else { |
$ok = false ; |
return 'Vous devez participer à ce projet pour accéder à ce document'; |
} |
} |
} else { |
$ok = true ; |
} |
// Recherche de l extension |
$nom_de_fichier = pathinfo ($projet->getNomRepertoire().'/'.$document->getChemin()) ; |
$extension = $nom_de_fichier['extension']; |
header('Expires: Wen, 01 Dec 1999 01:00:00 GMT');// Date du passé |
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');// toujours modifié |
header('Cache-Control: Public, must-revalidate');// HTTP/1.1 |
header('Pragma: hack'); |
header ('Content-Type: '.$document->getTypeMime()) ; |
header('Content-Length: '.(string) $document->getTaille()); |
header ('Content-Disposition: attachment; filename="'.$document->getNomLong().'.'.$extension.'"'); |
header("Content-Transfer-Encoding: binary\n"); |
readfile (PROJET_CHEMIN_FICHIER.$document->getChemin()); |
exit(); |
?> |
/trunk/client/projet/services/ecouteArbreFichier.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: ecouteArbreFichier.php,v 1.1 2007-04-19 09:37:50 alexandre_tb Exp $ |
// CVS : $Id: ecouteArbreFichier.php,v 1.2 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.1 $ |
*@version $Revision: 1.2 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
43,39 → 43,8 |
// sinon l arbre dojo ne fonctionnera pas (ligne 117 $returnArray = array) |
set_include_path(get_include_path() . PATH_SEPARATOR . '/home/alex/www/api/pear'); |
include_once ('../../../papyrus/configuration/pap_config.inc.php'); |
include_once ('../../../api/pear/DB.php'); |
include_once ('../../../api/json/JSON.php'); |
include_once (GEN_CHEMIN_API.'json/JSON.php'); |
define ('PROJET_CHEMIN_APPLI','../'); |
define ('PROJET_CHEMIN_ICONES', "client/projet/icones/") ; |
define ('PROJET_CHEMIN_CLASSES', PROJET_CHEMIN_APPLI.'classes/');//le chemin vers les fichiers propre à GSITE |
define ('PROJET_CHEMIN_FONCTIONS', PROJET_CHEMIN_APPLI.'fonctions/') ; |
define ('PROJET_CHEMIN_LIBRAIRIE','bibliotheque/');//le chemin de la librairie de fichier php |
define ('PROJET_CHEMIN_FICHIER', PROJET_CHEMIN_APPLI.'fichiers/') ; // Chemin ou seront créer les dossiers |
if (file_exists(PROJET_CHEMIN_CLASSES.'document.class.php')) { |
include_once (PROJET_CHEMIN_CLASSES.'document.class.php') ; |
} else { |
echo 'impossible document_class'; |
} |
if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langue_fr.inc.php')) { |
include_once PROJET_CHEMIN_APPLI.'langues/pro_langue_fr.inc.php' ; |
} else { |
echo 'impossible fichier de langue'; |
} |
$GLOBALS['db'] = & DB::connect(PAP_DSN); |
if (PEAR::isError($db)) { |
echo ($db->getMessage()); |
} |
// we're returning json |
//header('Content-type: text/json'); |
$action = $_REQUEST["action"]; |
$data = $_REQUEST["data"]; |
$cache = $_REQUEST["dojo.preventCache"]; |
82,7 → 51,7 |
$data = str_replace("\\\"","\"",$data); |
// instanciate a json-php instance |
// instanciation d un json-php |
$json = new services_JSON(); |
92,10 → 61,11 |
$node = $jsonData->node; |
} |
function getChildren($node) { |
// setup the database connction |
// get the parent node |
if ( $action == "getChildren") { |
$jsonData = $json->decode($data); |
// get the node object |
$node = $jsonData->node; |
// on recupere le noeud parent |
$parent = $node->objectId; |
if (isset($_REQUEST['id_projet'])) $id_projet = $_REQUEST['id_projet']; |
if (preg_match ('/projet_([0-9]+)/', $node->objectId, $match)) $id_projet = $match[1]; |
107,50 → 77,94 |
} |
$sql = 'select * from projet_documents where pd_pere='.$id_parent ; |
if (isset($id_projet)) $sql .= ' and pd_ce_projet='.$id_projet; |
// assemble the resulting rows into an array of node objects. |
// Each node object is represented in php by an associative array |
// the array of associative arrays will then be encoded in json and |
// returned back to the browser |
$resultat = $GLOBALS['db']->query($sql); |
$sql .= ' order by pd_nom'; |
$resultat = $GLOBALS['projet_db']->query($sql); |
if (DB::isError($resultat)) { |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
$returnArray = array(); |
$nodeArray = array(); |
$i = 0; |
include_once PROJET_CHEMIN_CLASSES.'document.class.php'; |
if ($GLOBALS['projet_auth']->getAuth() && is_object($this)) { |
include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ; |
$participant = new participe($GLOBALS['projet_db']) ; |
$id_u = $GLOBALS['projet_auth']->getAuthData(PROJET_CHAMPS_ID) ; |
$isCoord = $participant->isCoordinateur($id_u, $this->_id_projet, $GLOBALS['projet_db']) ; |
if ($isCoord) $droits = PROJET_DROIT_COORDINATEUR ; |
$isAdm = participe::isAdministrateur($GLOBALS['projet_auth']->getAuthData(PROJET_CHAMPS_ID), $GLOBALS['projet_db']) ; |
if ($isAdm) $droits = PROJET_DROIT_ADMINISTRATEUR ; |
if ($isAdm) $isCoord = true ; |
$isParticipant = $participant->isContributeur($id_u, $this->_id_projet, $GLOBALS['projet_db']); |
if ($isParticipant) $droits = PROJET_DROIT_CONTRIBUTEUR; |
$statut = participe::getStatutSurProjetCourant ($this->_auth->getAuthData(PROJET_CHAMPS_ID), $this->_id_projet, $this->_db) ; |
// si participant, on ajoute le champs visibilite |
} else { |
$droits = PROJET_DROIT_AUCUN; |
} |
// Recuperation de l'auteur |
include_once PROJET_CHEMIN_CLASSES.'annuaire.class.php' ; |
while ( $ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$document = new document($ligne['pd_id'], $GLOBALS['db'], PROJET_CHEMIN_FICHIER, PROJET_CHEMIN_ICONES); |
$document = new document($ligne['pd_id'], $GLOBALS['projet_db'], PROJET_CHEMIN_FICHIER, PROJET_CHEMIN_ICONES); |
$GLOBALS['url']->addQueryString('id_projet', $id_projet); |
$GLOBALS['url']->addQueryString('id_document', $document->getIdDocument()); |
$GLOBALS['url']->addQueryString(PROJET_VARIABLE_SERVICE, 'telechargement'); |
// json attend de l utf8, en lui fournissant des donnees au format htmlentities, |
// ca passe |
$annuaire = new annuaire($objetDB, array('table' => PROJET_ANNUAIRE, 'identifiant' => PROJET_CHAMPS_ID, |
'nom' => PROJET_CHAMPS_NOM, 'prenom' => PROJET_CHAMPS_PRENOM)) ; |
$annuaire->setId($document->_id_proprietaire) ; |
$nom_prenom = $annuaire->getInfo('nom').' '.$annuaire->getInfo('prenom') ; |
// On regarde si l utilisateur a les droits pour deplacer |
if ($droits <= PROJET_DROIT_COORDINATEUR || |
$GLOBALS['projet_auth']->getAuthData(PROJET_CHAMPS_ID) == $document->_id_proprietaire) { |
$actions = 'MOVE,REMOVE,EDIT' ; |
if ($document->isRepertoire()) $actions .= ',ADDCHILD'; |
} |
else $actions = ''; |
$node = array( |
'title'=> htmlentities($document->getNomLong()), |
'title'=> iconv('ISO-8859-1', 'UTF-8', $document->getNomLong()), |
'widgetId' => 'document_'.$document->getIdDocument(), |
'objectId'=> $document->getIdDocument(), |
'isFolder'=> $document->isRepertoire(), |
'link' => $document->getChemin(), |
'link' => str_replace ('&', '&', $GLOBALS['url']->getURL()), |
'childIconSrc' => $document->getCheminIcone(), |
'expandIcon' => PROJET_CHEMIN_ICONES.'folder-expanded.gif', |
'afterLabel' => ' '.$document->getTailleFormatee() |
'afterLabel' => ' '.$document->getTailleFormatee().' '.iconv('ISO-8859-1', 'UTF-8',$nom_prenom), |
); |
$returnArray[$i] = $node; |
// On regarde si l utilisateur a les droits pour deplacer |
/* |
if ($droits <= PROJET_DROIT_COORDINATEUR || |
$GLOBALS['projet_auth']->getAuthData(PROJET_CHAMPS_ID) == $document->_id_proprietaire) { |
$actions = 'MOVE,REMOVE,EDIT' ; |
if ($document->isRepertoire()) $actions .= ',ADDCHILD'; |
$node['actions'] = $actions; |
} |
else { |
$node['actions'] = ''; |
}*/ |
$nodeArray[$i] = $node; |
$i++; |
unset ($document); |
} |
return $returnArray; |
if (!is_null($nodeArray)) { |
header ('Content-type: json'); |
print $json->encode($nodeArray); |
exit(); |
} |
} |
if ( $action == "getChildren") { |
$jsonData = $json->decode($data); |
// get the node object |
$node = $jsonData->node; |
$nodeArray = getChildren($node); |
if (!is_null($nodeArray)) print $json->encode($nodeArray); |
} |
?> |
/trunk/client/projet/projet.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.php,v 1.14 2007-04-19 15:34:35 neiluj Exp $ |
// CVS : $Id: projet.php,v 1.15 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.14 $ |
*@version $Revision: 1.15 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
93,7 → 93,7 |
function afficherContenuMenu() |
{ |
$sortie = ''; |
// on fait de même pour id_projet |
// on fait de meme pour id_projet |
$id_projet = isset($_REQUEST[PROJET_VARIABLE_ID_PROJET]) ? $_REQUEST[PROJET_VARIABLE_ID_PROJET] : ''; |
// On recherche une action dans la variable $action, s'il n'y a pas, on envoie defaut |
116,7 → 116,7 |
$controleur->setPrive() ; |
} |
// Dans le cas de la présentation par arbre, on met les menus |
// Dans le cas de la presentation par arbre, on met les menus |
if (isset($GLOBALS['_GEN_commun']['info_application']->presentation)){ |
$sortie .= $controleur->menuGeneral() ; |
129,7 → 129,7 |
$controleur->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_NOUVEAU_FICHIER) ; |
$res = "<ul><li><a href=\"".$controleur->_url->getURL()."\">".PROJET_METTRE_FICHIER."</a></li>\n" ; |
// L'action créer un répertoire |
// L'action creer un repertoire |
$controleur->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_NOUVEAU_REPERTOIRE) ; |
$res .= "<li><a href=\"".$controleur->_url->getURL()."\">".PROJET_CREER_REP."</a></li>\n" ; |
$res .= '</ul></li>' ; |
180,7 → 180,7 |
$controleur->setIdDocument($id_document) ; |
} |
// récupération des paramètres de l'appli |
// recuperation des parametres de l'appli |
if (isset($GLOBALS['_GEN_commun']['info_application']->presentation)) { |
$controleur->setPresentation($GLOBALS['_GEN_commun']['info_application']->presentation) ; |
} |
205,7 → 205,7 |
$controleur->setIdProjet($GLOBALS['_GEN_commun']['info_application']->seulement) ; |
} |
// Si le parametre prive est passé, les inscriptions sont modérés |
// Si le parametre prive est passe, les inscriptions sont moderes |
// TODO : permettre la demande d'inscription |
if (isset ($GLOBALS['_GEN_commun']['info_application']->prive)) { |
$controleur->setPrive() ; |
228,6 → 228,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.14 2007/04/19 15:34:35 neiluj |
* préparration release (livraison) "Narmer" - v0.25 |
* |
* Revision 1.13 2007/04/19 09:18:46 alexandre_tb |
* ajout de la variable $service pour appeler les services (dans la cadre de liaisons asynchrones |
* |
/trunk/papyrus/applettes/syndication/syndication.php |
---|
21,7 → 21,7 |
// | along with Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: syndication.php,v 1.5 2007-04-20 12:50:18 florian Exp $ |
// CVS : $Id: syndication.php,v 1.6 2007-06-25 12:15:07 alexandre_tb Exp $ |
/** |
* papyrus_bp - syndication.php |
* |
33,7 → 33,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 1999-2006 |
*@version $Revision: 1.5 $ $Date: 2007-04-20 12:50:18 $ |
*@version $Revision: 1.6 $ $Date: 2007-06-25 12:15:07 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
46,11 → 46,11 |
'(?:'. |
'(url="[^"]*")|'. |
'(titre="[^"]*")|'. |
'(nb=(?:"|)\d+(?:"|))|'. |
'(nouvellefenetre=(?:"|)(?:0|1)(?:"|))|'. |
'(nb="?\d+"?)|'. |
'(nouvellefenetre="?(?:0|1)"?)|'. |
'(formatdate="[^"]*")|'. |
'(formatdatepro="[^"]*")|'. |
'(template="[^"]*")|'. |
'(template=".*")|'. |
')'. |
')+'. |
'\s*\}\}'; |
118,7 → 118,7 |
$options['formatdate'] = SYND_FORMAT_DATE; |
} |
if (!isset($options['formatdatepro'])) { |
$options['formatdatepro'] = SYND_FORMAT_DATE; |
$options['formatdatepro'] = false; |
} |
if (!isset($options['template'])) { |
$options['template'] = SYND_CHEMIN_SQUELETTE.SYND_SQUELETTE_LISTE; |
282,6 → 282,12 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.5.2.1 2007-06-06 15:24:37 jp_milcent |
* Amélioration de la compatibilité avec les anciennes version des balises de l'applette syndication. |
* |
* Revision 1.5 2007-04-20 12:50:18 florian |
* correction bugs suite au merge |
* |
* Revision 1.4 2007/03/28 15:53:27 florian |
* correction pb date, encodage utf-8 |
* |
/trunk/papyrus/applications/installateur/instal_base_de_donnees.inc.php |
---|
32,7 → 32,7 |
// | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
// | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: instal_base_de_donnees.inc.php,v 1.32 2007-04-20 09:05:46 alexandre_tb Exp $ |
// CVS : $Id: instal_base_de_donnees.inc.php,v 1.33 2007-06-25 12:15:07 alexandre_tb Exp $ |
/** |
* Page de création de la base de données de Papyrus. |
* |
47,7 → 47,7 |
*@author Eric FELDSTEIN |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.32 $ $Date: 2007-04-20 09:05:46 $ |
*@version $Revision: 1.33 $ $Date: 2007-06-25 12:15:07 $ |
// +------------------------------------------------------------------------------------------------------+ |
**/ |
134,7 → 134,7 |
} |
if ($requete_type == 'create') { |
$erreur = testerConfig( $sortie_verif, 'Création table '.$table_nom.'...', @mysql_query($value['query'], $dblink), |
'Déjà créée ?', 0, $erreur); |
'Déjà créée ?', 0, $erreur); |
} else if ($requete_type == 'alter') { |
$erreur = testerConfig( $sortie_verif, 'Modification structure table '.$table_nom.'...', @mysql_query($value['query'], $dblink), |
'Déjà modifiée ?', 0, $erreur); |
225,7 → 225,7 |
$sortie .= creerFormulaire($bdd); |
$sortie .= $sortie_test; |
$sortie .= '<li><input type="hidden" name="pref_serial" value="'.htmlentities(serialize($pref)).'" /></li>'."\n"; |
$sortie .= '<li><input type="submit" value="Tester à nouveau" /></li>'."\n"; |
$sortie .= '<li><input type="submit" value="Tester à nouveau" /></li>'."\n"; |
$sortie .= ' </ul>'."\n"; |
$sortie .= ' </form>'; |
//$sortie .= '<div class="code"><code>'.$sortie_verif.'</code></div>'; |
291,6 → 291,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.32 2007/04/20 09:05:46 alexandre_tb |
* correction pb encodage |
* |
* Revision 1.31 2007/04/19 16:19:45 neiluj |
* optimisation |
* |
/trunk/papyrus/applications/admin_site/bibliotheque/adsi_site.fonct.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: adsi_site.fonct.php,v 1.37 2007-04-24 13:27:57 alexandre_tb Exp $ |
// CVS : $Id: adsi_site.fonct.php,v 1.38 2007-06-25 12:15:06 alexandre_tb Exp $ |
/** |
* Bibliotheque de fonctions d'admininistration des projets |
* |
34,7 → 34,7 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@author Laurent COUDOUNEAU <lc@gsite.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.37 $ $Date: 2007-04-24 13:27:57 $ |
*@version $Revision: 1.38 $ $Date: 2007-06-25 12:15:06 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
284,7 → 284,7 |
// Validation des donnees du formulaire |
if (empty($aso_valeurs['form_sites_id_site'])) { |
$message .= '<p class="pap_erreur">Vous devez d\'abord sélectionner un site.</p>'; |
$message .= '<p class="pap_erreur">Vous devez d\'abord sélectionner un site.</p>'; |
} |
return $message; |
659,7 → 659,7 |
$aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'rows' => 3, 'cols' => 45); |
$label = '<label for="'.$id.'">'.'Mots-clés : '.'</label>'; |
$zone_mots_cles = $form->createElement('textarea', $id, $label, $aso_attributs); |
$zone_mots_cles->setValue('mots-clés du site'); |
$zone_mots_cles->setValue('mots-clés du site'); |
$form->addElement($zone_mots_cles); |
$form->addRule($id, 'Des mots clés sont requis pour le site !', 'required', '', 'client'); |
807,7 → 807,7 |
$message .= '<p class="pap_erreur">Le champ "Titre" ne doit pas être vide.</p>'; |
} |
if (empty($aso_valeurs['gs_mots_cles'])) { |
$message .= '<p class="pap_erreur">Le champ "Mots clés" ne doit pas être vide.</p>'; |
$message .= '<p class="pap_erreur">Le champ "Mots clés" ne doit pas être vide.</p>'; |
} |
if (empty($aso_valeurs['gs_description'])) { |
$message .= '<p class="pap_erreur">Le champ "Description" ne doit pas être vide.</p>'; |
913,7 → 913,7 |
'Fichier n° : '. __FILE__ .'<br /><p>'; |
return $message; |
} |
$resultat = $objet_pear_ftp->mkdir(PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha']) ; |
$resultat = $objet_pear_ftp->mkdir(PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha']) ; |
if (PEAR::isError($resultat)) { |
$message = '<p class="pap_erreur"> ERREUR Papyrus admin : impossible de créer le répertoire par ftp.<br />'. |
926,9 → 926,9 |
} |
//$objet_pear_ftp->cd(PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha']) ; |
foreach ($tab_rep_langue as $nom_rep_langue) { |
$objet_pear_ftp->mkdir(PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.$nom_rep_langue) ; |
$objet_pear_ftp->mkdir(PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.$nom_rep_langue) ; |
foreach ($tab_rep_site as $nom_rep_site) { |
$chemin_repertoire = PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.$nom_rep_langue.GEN_SEP.$nom_rep_site; |
$chemin_repertoire = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.$nom_rep_langue.GEN_SEP.$nom_rep_site; |
$resultat = $objet_pear_ftp->mkdir($chemin_repertoire) ; |
if (PEAR::isError($resultat)) { |
944,7 → 944,7 |
} |
$chemin_squelette_defaut = PAP_CHEMIN_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP. |
GEN_DOSSIER_SQUELETTE.GEN_SEP.GEN_FICHIER_SQUELETTE; |
$chemin_squelette_site = PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP. |
$chemin_squelette_site = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP. |
$aso_valeurs['gs_ce_i18n'].GEN_SEP.GEN_DOSSIER_SQUELETTE.GEN_SEP.GEN_FICHIER_SQUELETTE; |
$resultat = $objet_pear_ftp->put($chemin_squelette_defaut, $chemin_squelette_site, true, FTP_BINARY); |
if (PEAR::isError($resultat)) { |
958,7 → 958,7 |
} |
$chemin_style_defaut = PAP_CHEMIN_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP. |
GEN_DOSSIER_STYLE.GEN_SEP.GEN_FICHIER_STYLE; |
$chemin_style_site = PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP. |
$chemin_style_site = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP. |
$aso_valeurs['gs_ce_i18n'].GEN_SEP.GEN_DOSSIER_STYLE.GEN_SEP.GEN_FICHIER_STYLE; |
$resultat = $objet_pear_ftp->put($chemin_style_defaut, $chemin_style_site, true, FTP_BINARY); |
if (PEAR::isError($resultat)) { |
973,13 → 973,13 |
$chemin_image_defaut = PAP_CHEMIN_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP. |
GEN_DOSSIER_IMAGE.GEN_SEP; |
$chemin_image_site = PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP. |
$chemin_image_site = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP. |
$aso_valeurs['gs_ce_i18n'].GEN_SEP.GEN_DOSSIER_IMAGE.GEN_SEP; |
$resultat = $objet_pear_ftp->putRecursive($chemin_image_defaut, $chemin_image_site, false, FTP_BINARY); |
if (PEAR::isError($resultat)) { |
$message = '<p class="pap_erreur"> ERREUR Papyrus admin : impossible de copier les styles defaut par ftp.<br />'. |
'Fichier origine : '. $chemin_style_defaut .'<br />'. |
'Fichier copié : '. $chemin_style_site .'<br />'. |
$message = '<p class="pap_erreur"> ERREUR Papyrus admin : impossible de copier le dossier images par ftp.<br />'. |
'Fichier origine : '. $chemin_image_defaut .'<br />'. |
'Fichier copié : '. $chemin_image_site .'<br />'. |
'Erreur origine : '. $resultat->getMessage() .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
1086,7 → 1086,7 |
} |
} |
$message = '<p class="pap_info">'.'Succès de l\'ajout du site.'.'</p>'; |
$message = '<p class="pap_info">'.'Succés de l\'ajout du site.'.'</p>'; |
return $message; |
} |
1121,7 → 1121,7 |
if (!GEN_FTP_UTILISE && $id_type_site != '103') { |
foreach ($tab_rep_langue as $nom_rep_langue) { |
foreach ($tab_rep_site as $nom_rep_site) { |
$chemin_repertoire = PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP. |
$chemin_repertoire = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP. |
$nom_rep_langue.GEN_SEP.$nom_rep_site; |
$vieux_umask = umask(0); |
$resultat = creerDossier($chemin_repertoire, 0777, GEN_SEP); |
1135,9 → 1135,9 |
} |
} |
} |
$chemin_squelette_defaut = PAP_CHEMIN_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP. |
$chemin_squelette_defaut = PAP_FTP_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP. |
GEN_DOSSIER_SQUELETTE.GEN_SEP.GEN_FICHIER_SQUELETTE; |
$chemin_squelette_site = PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP. |
$chemin_squelette_site = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP. |
$aso_valeurs['gs_ce_i18n'].GEN_SEP.GEN_DOSSIER_SQUELETTE.GEN_SEP.GEN_FICHIER_SQUELETTE; |
if (!copy($chemin_squelette_defaut, $chemin_squelette_site)) { |
$message = '<p class="pap_erreur"> ERREUR Papyrus admin : impossible de créer le fichier de squellete par défaut.<br />'. |
1146,15 → 1146,15 |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
return $message; |
} |
$chemin_style_defaut = PAP_CHEMIN_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP. |
$chemin_style_defaut = PAP_FTP_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP. |
GEN_DOSSIER_STYLE.GEN_SEP.GEN_FICHIER_STYLE; |
$chemin_style_site = PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP. |
$chemin_style_site = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP. |
$aso_valeurs['gs_ce_i18n'].GEN_SEP.GEN_DOSSIER_STYLE.GEN_SEP.GEN_FICHIER_STYLE; |
if (!copy($chemin_style_defaut, $chemin_style_site)) { |
$message = '<p class="pap_erreur"> ERREUR Papyrus admin : impossible de créer le fichier de style par défaut.<br />'. |
'Fichier : '. $chemin_style_site .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
return $message; |
} |
} else if (GEN_FTP_UTILISE && $id_type_site != '103') { // 103 est le type "site externe" |
1174,55 → 1174,55 |
'Utilisateur : '. PAP_FTP_UTILISATEUR .'<br />'. |
'Erreur connexion : '.$ftp_conn->getMessage().'<br />'. |
'Erreur login : '.$ftp_login_result->getMessage().'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /><p>'; |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /><p>'; |
return $message; |
} |
$objet_pear_ftp->mkdir(PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha']) ; |
$objet_pear_ftp->mkdir(PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha']) ; |
//$objet_pear_ftp->cd(PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha']) ; |
foreach ($tab_rep_langue as $nom_rep_langue) { |
$objet_pear_ftp->mkdir(PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.$nom_rep_langue) ; |
$objet_pear_ftp->mkdir(PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.$nom_rep_langue) ; |
foreach ($tab_rep_site as $nom_rep_site) { |
$chemin_repertoire = PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.$nom_rep_langue.GEN_SEP.$nom_rep_site; |
$chemin_repertoire = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.$nom_rep_langue.GEN_SEP.$nom_rep_site; |
$resultat = $objet_pear_ftp->mkdir($chemin_repertoire) ; |
if (PEAR::isError($resultat)) { |
$message = '<p class="pap_erreur"> ERREUR Papyrus admin : impossible de créer le répertoire par ftp.<br />'. |
'Répertoire : '. $chemin_repertoire .'<br />'. |
'Répertoire : '. $chemin_repertoire .'<br />'. |
'Erreur origine : '. $resultat->getMessage() .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
return $message; |
} |
} |
} |
$chemin_squelette_defaut = PAP_CHEMIN_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP. |
$chemin_squelette_defaut = PAP_FTP_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP. |
GEN_DOSSIER_SQUELETTE.GEN_SEP.GEN_FICHIER_SQUELETTE; |
$chemin_squelette_site = PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP. |
$chemin_squelette_site = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP. |
$aso_valeurs['gs_ce_i18n'].GEN_SEP.GEN_DOSSIER_SQUELETTE.GEN_SEP.GEN_FICHIER_SQUELETTE; |
$resultat = $objet_pear_ftp->put($chemin_squelette_defaut, $chemin_squelette_site, true, FTP_BINARY); |
if (PEAR::isError($resultat)) { |
$message = '<p class="pap_erreur"> ERREUR Papyrus admin : impossible de copier le squelette defaut par ftp.<br />'. |
'Fichier origine : '. $chemin_squelette_defaut .'<br />'. |
'Fichier copié : '. $chemin_squelette_site .'<br />'. |
'Fichier copié : '. $chemin_squelette_site .'<br />'. |
'Erreur origine : '. $resultat->getMessage() .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
return $message; |
} |
$chemin_style_defaut = PAP_CHEMIN_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP. |
$chemin_style_defaut = PAP_FTP_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP. |
GEN_DOSSIER_STYLE.GEN_SEP.GEN_FICHIER_STYLE; |
$chemin_style_site = PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP. |
$chemin_style_site = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP. |
$aso_valeurs['gs_ce_i18n'].GEN_SEP.GEN_DOSSIER_STYLE.GEN_SEP.GEN_FICHIER_STYLE; |
$resultat = $objet_pear_ftp->put($chemin_style_defaut, $chemin_style_site, true, FTP_BINARY); |
if (PEAR::isError($resultat)) { |
$message = '<p class="pap_erreur"> ERREUR Papyrus admin : impossible de copier les styles defaut par ftp.<br />'. |
'Fichier origine : '. $chemin_style_defaut .'<br />'. |
'Fichier copié : '. $chemin_style_site .'<br />'. |
'Fichier copié : '. $chemin_style_site .'<br />'. |
'Erreur origine : '. $resultat->getMessage() .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
return $message; |
} |
$objet_pear_ftp->disconnect(); |
1232,8 → 1232,8 |
if ($id_site == false) { |
$message = '<p class="erreur"> ERREUR Papyrus admin : impossible de récupérer un identifiant pour la table gen_site.<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
return $message; |
} |
1384,7 → 1384,7 |
} |
} |
$message = '<p class="pap_info">'.'Succès de l\'ajout du site.'.'</p>'; |
$message = '<p class="pap_info">'.'Succés de l\'ajout du site.'.'</p>'; |
return $message; |
} |
1430,13 → 1430,13 |
$message = '<p class="pap_erreur"> ERREUR Papyrus admin : impossible de changer le nom du dossier du site.<br />'. |
'Ancien nom : '. $chemin_site_ancien .'<br />'. |
'Nouveau nom : '. $chemin_site_nouveau .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
return $message; |
} |
} else { |
$chemin_site_ancien = PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$ancien_code_alphnum.GEN_SEP; |
$chemin_site_nouveau = PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP; |
$chemin_site_ancien = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$ancien_code_alphnum.GEN_SEP; |
$chemin_site_nouveau = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP; |
// Création d'une connection ftp avec Net_FTP de PEAR |
// voir http://pear.php.net/manual/fr/package.networking.net-ftp.php |
// création de l'objet pear ftp |
1452,8 → 1452,8 |
'Utilisateur : '. PAP_FTP_UTILISATEUR .'<br />'. |
'Erreur connexion : '.$ftp_conn->getMessage().'<br />'. |
'Erreur login : '.$ftp_login_result->getMessage().'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /><p>'; |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /><p>'; |
return $message; |
} |
$resultat = $objet_pear_ftp->putRecursive($chemin_site_ancien, $chemin_site_nouveau, false, FTP_BINARY); |
1462,12 → 1462,12 |
'Dossier site ancien : '. $chemin_site_ancien .'<br />'. |
'Dossier site nouveau : '. $chemin_site_nouveau .'<br />'. |
'Erreur origine : '. $resultat->getMessage() .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
return $message; |
} |
// On utilise la racine FTP pour rm |
$chemin_site_ancien = PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$ancien_code_alphnum.GEN_SEP; |
$chemin_site_ancien = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$ancien_code_alphnum.GEN_SEP; |
// Changement du niveau d'erreur pour éviter les Notices PHP dues à Net_FTP |
error_reporting(E_PARSE); |
$resultat = $objet_pear_ftp->rm($chemin_site_ancien, true); |
1475,8 → 1475,8 |
$message = '<p class="pap_erreur"> ERREUR Papyrus admin : impossible de supprimer l\'ancien dossier du site.<br />'. |
'Dossier site ancien : '. $chemin_site_ancien .'<br />'. |
'Erreur origine : '. $resultat->getMessage() .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
return $message; |
} |
// Retour au niveau d'erreur définit dans le fichier de config de Papyrus |
1623,7 → 1623,7 |
// Nous vérifions que le site n'a pas le code alphanum correspondant au site par défaut d'administration (admin). |
if ($code_alpha_site_principal == GEN_SITE_DEFAUT) { |
$message = '<p class="pap_erreur">Si vous voulez vraiment supprimer le site d\'administration par défaut de '. |
'Papyrus, veuillez commencer par changer la valeur de son code alphanumérique. Vous pourrez '. |
'Papyrus, veuillez commencer par changer la valeur de son code alphanumérique. Vous pourrez '. |
'ensuite le supprimer via cette interface.</p>'; |
return $message; |
} |
1706,10 → 1706,10 |
$chemin_repertoire = PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$code_alpha_site_principal; |
$resultat = supprimerDossier($chemin_repertoire, GEN_SEP); |
if (!$resultat) { |
$message = '<p class="pap_erreur"> ERREUR Papyrus admin : impossible de supprimer le répertoire.<br />'. |
'Répertoire : '. $chemin_repertoire .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
$message = '<p class="pap_erreur"> ERREUR Papyrus admin : impossible de supprimer le répertoire.<br />'. |
'Répertoire : '. $chemin_repertoire .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
return $message; |
} |
} else { |
1729,22 → 1729,22 |
'Erreur login : '.$ftp_login_result->getMessage().'<br />'. |
'Serveur : '. PAP_FTP_SERVEUR .'<br />'. |
'Utilisateur : '. PAP_FTP_UTILISATEUR .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /><p>'; |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /><p>'; |
return $message; |
} |
// Changement du niveau d'erreur pour éviter les Notices PHP dues à Net_FTP |
error_reporting(E_PARSE); |
$chemin_repertoire = PAP_CHEMIN_RACINE.GEN_CHEMIN_SITES.$code_alpha_site_principal.'/'; |
$chemin_repertoire = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$code_alpha_site_principal.'/'; |
if ($code_alpha_site_principal!='') { |
$resultat = $objet_pear_ftp->rm($chemin_repertoire, true); |
if (PEAR::isError($resultat)) { |
$message = '<p class="pap_erreur"> ERREUR Papyrus admin : impossible de supprimer le répertoire par ftp.<br />'. |
$message = '<p class="pap_erreur"> ERREUR Papyrus admin : impossible de supprimer le répertoire par ftp.<br />'. |
'Erreur ftp : '.$resultat->getMessage().'<br />'. |
'Répertoire : '. $chemin_repertoire .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
'Répertoire : '. $chemin_repertoire .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier n° : '. __FILE__ .'<br /></p>'; |
return $message; |
} |
} |
1752,7 → 1752,7 |
// Retour au niveau d'erreur définit dans le fichier de config de Papyrus |
error_reporting(GEN_DEBOGAGE_NIVEAU); |
} |
$message = '<p class="pap_info">Succès de la suppression du site.</p>'; |
$message = '<p class="pap_info">Succés de la suppression du site.</p>'; |
return $message; |
} |
1826,6 → 1826,9 |
// +- Fin du code source --------------------------------------------------------------------------------+ |
/* |
* $Log: not supported by cvs2svn $ |
* Revision 1.37 2007/04/24 13:27:57 alexandre_tb |
* encodage |
* |
* Revision 1.36 2007/04/20 13:48:31 alexandre_tb |
* nettoyage accent |
* |
/trunk/papyrus/bibliotheque/classes/pap_rendu.class.php |
---|
29,7 → 29,7 |
// | Le fait que vous puissiez accéder à cet en-tête signifie que vous avez pris connaissance de la | |
// | licence CeCILL, et que vous en avez accepté les termes. | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: pap_rendu.class.php,v 1.8 2007-05-30 16:20:07 alexandre_tb Exp $ |
// CVS : $Id: pap_rendu.class.php,v 1.9 2007-06-25 12:15:07 alexandre_tb Exp $ |
/** |
* Classe : pap_rendu |
* |
42,7 → 42,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision: 1.8 $ $Date: 2007-05-30 16:20:07 $ |
*@version $Revision: 1.9 $ $Date: 2007-06-25 12:15:07 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
68,7 → 68,7 |
{ |
$noms_applettes = 'IDENTIFICATION|MENU|MOTEUR_RECHERCHE|SELECTEUR_SITES|VOUS_ETES_ICI|BAZAR_CALENDRIER';// Compatibilite ancienne syntaxe |
$GLOBALS['_PAPYRUS_']['applette']['nbr_balise'] = preg_match_all( |
'/\{\{(\w+) ?[^}]*\}\}|<!-- (?:'.$GLOBALS['_GEN_commun']['balise_prefixe'].'|'.$GLOBALS['_GEN_commun']['balise_prefixe_client'].')('.$noms_applettes.')[^ ]* -->/', |
'/\{\{(\w+) ?.*?\}\}|<!-- (?:'.$GLOBALS['_GEN_commun']['balise_prefixe'].'|'.$GLOBALS['_GEN_commun']['balise_prefixe_client'].')('.$noms_applettes.')[^ ]* -->/', |
$contenu, |
$tab_decoupage, |
PREG_SET_ORDER); |