Subversion Repositories Applications.projet

Rev

Rev 97 | Rev 201 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 97 Rev 157
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
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
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: document.class.php,v 1.5 2006-01-18 10:52:03 alexandre_tb Exp $
22
// CVS : $Id: document.class.php,v 1.6 2007-01-04 17:03:04 alexandre_tb Exp $
23
/**
23
/**
24
* Application projet
24
* Application projet
25
*
25
*
26
* La classe document
26
* La classe document
27
*
27
*
Line 29... Line 29...
29
//Auteur original :
29
//Auteur original :
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
31
//Autres auteurs :
31
//Autres auteurs :
32
*@author        Aucun
32
*@author        Aucun
33
*@copyright     Tela-Botanica 2000-2004
33
*@copyright     Tela-Botanica 2000-2004
34
*@version       $Revision: 1.5 $
34
*@version       $Revision: 1.6 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
Line 365... Line 365...
365
        $requete_document = "select pd_id from projet_documents order by pd_id desc limit 1,1" ;
365
        $requete_document = "select pd_id from projet_documents order by pd_id desc limit 1,1" ;
366
        $resultat_document = $this->_db->query($requete_document) ;
366
        $resultat_document = $this->_db->query($requete_document) ;
367
        $ligne_document = $resultat_document->fetchRow(DB_FETCHMODE_OBJECT) ;
367
        $ligne_document = $resultat_document->fetchRow(DB_FETCHMODE_OBJECT) ;
368
        $nouveau_nom = $ligne_document->pd_id+ 1 ;
368
        $nouveau_nom = $ligne_document->pd_id+ 1 ;
Line 369... Line 369...
369
        
369
        
Line 370... Line 370...
370
        $extension = preg_replace("/([^\.]+)\.([a-zA-Z0-9]+$)/", "\\2", $_FILES['fichier']['name']) ;
370
        $extension = preg_replace("/^([^\.]+)\.(\w+$)/", "\\2", $_FILES['fichier']['name']) ;
371
        
371
        
372
        $nouveau_nom = $radical."_".$nouveau_nom.".".$extension ;
372
        $nouveau_nom = $radical."_".$nouveau_nom.".".$extension ;
373
        if ($this->_id_pere != '') {
373
        if ($this->_id_pere != '') {