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.1 2005-09-22 14:02:47 ddelon Exp $ |
// CVS : $Id: projet.class.php,v 1.2 2005-09-26 20:18:27 ddelon Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.1 $ |
*@version $Revision: 1.2 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
140,13 → 140,14 |
|
/** |
* |
* |
* PHP5 |
* @return projet |
* @access public |
*/ |
function __construct( ) |
function __construct( &$dbObject, $id_projet = "") |
{ |
|
$this->projet($dbObject, $id_projet); |
|
} // end of member function __construct |
|
/** |
429,6 → 430,7 |
*/ |
function enregistrerSQL( $tableau_de_valeur ) |
{ |
|
$nom_repertoire = projet::genereNomRepertoire($tableau_de_valeur['projet_titre'], $this->_db) ; |
if (!$this->_creationRepertoire ($nom_repertoire)) { |
echo 'Impossible de crée un répertoire' ; |
436,6 → 438,9 |
} |
$id = SQL_obtenirNouveauId($this->_db, 'projet', 'p_id') ; |
$requete = 'insert into projet set p_id='.$id ; |
if (!isset($tableau_de_valeur['projet_wikini'])) { |
$tableau_de_valeur['projet_wikini']=''; |
} |
$requete .= ', p_titre="'.$tableau_de_valeur['projet_titre'].'", p_description="'.$tableau_de_valeur['projet_description'].'"'. |
', p_espace_internet="'.$tableau_de_valeur['projet_espace_internet'].'", p_date_creation=NOW()'. |
', p_wikini="'.$tableau_de_valeur['projet_wikini'].'", p_nom_repertoire="'.$nom_repertoire.'", p_resume="'.$tableau_de_valeur['projet_resume'].'"' ; |
585,9 → 590,15 |
if (DB::isError ($resultat)) { |
die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ; |
} |
$ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ; |
$nom = strtoupper(substr($chaine, 0, 1)) ; |
$nom .= $ligne->p_id + 1 ; |
if ($resultat->numRows() > 0) { |
$ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ; |
$nom = strtoupper(substr($chaine, 0, 1)) ; |
$nom .= $ligne->p_id + 1 ; |
} |
else { |
$nom = strtoupper(substr($chaine, 0, 1)) ; |
$nom .= 1 ; |
} |
return $nom ; |
|
} // end of member function genereNomRepertoire |