Line 18... |
Line 18... |
18 |
// | You should have received a copy of the GNU General Public |
|
18 |
// | You should have received a copy of the GNU General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
Line 22... |
Line 22... |
22 |
|
22 |
|
Line 23... |
Line 23... |
23 |
// CVS : $Id: projetControleur.class.php,v 1.28 2006-07-04 09:29:49 alexandre_tb Exp $
|
23 |
// CVS : $Id: projetControleur.class.php,v 1.29 2006-10-05 08:51:09 alexandre_tb Exp $
|
24 |
|
24 |
|
25 |
/**
|
25 |
/**
|
26 |
* Application projet
|
26 |
* Application projet
|
Line 31... |
Line 31... |
31 |
//Auteur original :
|
31 |
//Auteur original :
|
32 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
32 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
33 |
//Autres auteurs :
|
33 |
//Autres auteurs :
|
34 |
*@author Aucun
|
34 |
*@author Aucun
|
35 |
*@copyright Tela-Botanica 2000-2004
|
35 |
*@copyright Tela-Botanica 2000-2004
|
36 |
*@version $Revision: 1.28 $
|
36 |
*@version $Revision: 1.29 $
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
*/
|
38 |
*/
|
Line 39... |
Line 39... |
39 |
|
39 |
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
Line 602... |
Line 602... |
602 |
* @return string
|
602 |
* @return string
|
603 |
* @access public
|
603 |
* @access public
|
604 |
*/
|
604 |
*/
|
605 |
function formulaireProjet($action)
|
605 |
function formulaireProjet($action)
|
606 |
{
|
606 |
{
|
607 |
if (!$this->_auth->getAuth()) {
|
607 |
if (!$this->_auth->getAuth()) {
|
608 |
return PROJET_TEXTE_NON_IDENTIFIE;
|
608 |
return PROJET_TEXTE_NON_IDENTIFIE;
|
609 |
}
|
609 |
}
|
- |
|
610 |
|
- |
|
611 |
if (fileperms(PROJET_CHEMIN_FICHIER) & 0x0002) {
|
610 |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, $action) ;
|
612 |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, $action) ;
|
611 |
$formulaire_projet = new HTML_formulaireProjet('formulaire_projet', 'post',str_replace ("&", "&", $this->_url->getURL())) ;
|
613 |
$formulaire_projet = new HTML_formulaireProjet('formulaire_projet', 'post',str_replace ("&", "&", $this->_url->getURL())) ;
|
612 |
$tableau_type = '' ;
|
614 |
$tableau_type = '' ;
|
613 |
if (PROJET_UTILISE_TYPE) {
|
615 |
if (PROJET_UTILISE_TYPE) {
|
614 |
include_once PROJET_CHEMIN_CLASSES.'projet_type.class.php' ;
|
616 |
include_once PROJET_CHEMIN_CLASSES.'projet_type.class.php' ;
|
615 |
$tableau_type = projet_type::getTousLesTypes($this->_db) ;
|
617 |
$tableau_type = projet_type::getTousLesTypes($this->_db) ;
|
616 |
}
|
618 |
}
|
617 |
$formulaire_projet->construitFormulaire(projet::getTousLesProjets($this->_db), $tableau_type) ;
|
619 |
$formulaire_projet->construitFormulaire(projet::getTousLesProjets($this->_db), $tableau_type) ;
|
618 |
if ($action == PROJET_MODIFIER_DESCRIPTION_V) {
|
620 |
if ($action == PROJET_MODIFIER_DESCRIPTION_V) {
|
619 |
$projet = new projet($this->_db, $this->_id_projet) ;
|
621 |
$projet = new projet($this->_db, $this->_id_projet) ;
|
620 |
$valeurs_par_defaut = array ( 'projet_titre' => $projet->getTitre(),
|
622 |
$valeurs_par_defaut = array ( 'projet_titre' => $projet->getTitre(),
|
621 |
'projet_description' => $projet->getDescription(),
|
623 |
'projet_description' => $projet->getDescription(),
|
622 |
'projet_asso' => $projet->getIdPere(),
|
624 |
'projet_asso' => $projet->getIdPere(),
|
623 |
'projet_wikini' => $projet->getWikini(),
|
625 |
'projet_wikini' => $projet->getWikini(),
|
624 |
'projet_resume' => $projet->getResume(),
|
626 |
'projet_resume' => $projet->getResume(),
|
625 |
'projet_espace_internet' => $projet->getEspaceInternet(),
|
627 |
'projet_espace_internet' => $projet->getEspaceInternet(),
|
626 |
'projet_type'=> $projet->getType(),
|
628 |
'projet_type'=> $projet->getType(),
|
627 |
'projet_moderation' => $projet->isModere()
|
629 |
'projet_moderation' => $projet->isModere()
|
628 |
) ;
|
630 |
) ;
|
629 |
$formulaire_projet->setDefaults($valeurs_par_defaut) ;
|
631 |
$formulaire_projet->setDefaults($valeurs_par_defaut) ;
|
630 |
} else {
|
632 |
} else {
|
631 |
$formulaire_projet->setDefaults (array ('projet_moderation'=> '0')) ;
|
633 |
$formulaire_projet->setDefaults (array ('projet_moderation'=> '0')) ;
|
632 |
}
|
634 |
}
|
633 |
$res = PROJET_PROPOSER_PROJET ;
|
635 |
$res = PROJET_PROPOSER_PROJET ;
|
634 |
return $res . $formulaire_projet->toHTML() ;
|
636 |
return $res . $formulaire_projet->toHTML() ;
|
- |
|
637 |
} else {
|
- |
|
638 |
return 'Veuillez régler les permissions en écriture sur '.PROJET_CHEMIN_FICHIER ;
|
- |
|
639 |
}
|
635 |
} // end of member function nouveauProjet
|
640 |
} // end of member function nouveauProjet
|
Line 636... |
Line 641... |
636 |
|
641 |
|
637 |
/**
|
642 |
/**
|
638 |
* Valide le formulaire et appelle la fonction d'insertion.
|
643 |
* Valide le formulaire et appelle la fonction d'insertion.
|