Subversion Repositories eFlore/Archives.herbiers

Rev

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

Rev 7 Rev 12
Line 19... Line 19...
19
// |                                                                                                      |
19
// |                                                                                                      |
20
// | You should have received a copy of the GNU General Public License                                    |
20
// | You should have received a copy of the GNU General Public License                                    |
21
// | along with Foobar; if not, write to the Free Software                                                |
21
// | along with Foobar; if not, write to the Free Software                                                |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
23
// +------------------------------------------------------------------------------------------------------+
23
// +------------------------------------------------------------------------------------------------------+
24
// CVS : $Id: hba_manipulation.fonct.php,v 1.2 2006-10-30 18:57:46 jp_milcent Exp $
24
// CVS : $Id: hba_manipulation.fonct.php,v 1.3 2006-10-31 15:06:44 jp_milcent Exp $
25
/**
25
/**
26
* Fonctions de manipulation de la base de données Herbier.
26
* Fonctions de manipulation de la base de données Herbier.
27
*
27
*
28
* Fonctions permettant d'ajouter, modifier ou supprimer des informations dans la base de données Herbier.
28
* Fonctions permettant d'ajouter, modifier ou supprimer des informations dans la base de données Herbier.
29
*
29
*
Line 32... Line 32...
32
//Auteur original :
32
//Auteur original :
33
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
33
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
34
//Autres auteurs :
34
//Autres auteurs :
35
*@author        Jean-Pascal MILCENT <jpm@clapas.org>
35
*@author        Jean-Pascal MILCENT <jpm@clapas.org>
36
*@copyright     Tela-Botanica 2000-2005
36
*@copyright     Tela-Botanica 2000-2005
37
*@version       $Revision: 1.2 $ $Date: 2006-10-30 18:57:46 $
37
*@version       $Revision: 1.3 $ $Date: 2006-10-31 15:06:44 $
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
39
*/
39
*/
Line 40... Line 40...
40
 
40
 
41
// +------------------------------------------------------------------------------------------------------+
41
// +------------------------------------------------------------------------------------------------------+
Line 328... Line 328...
328
    $form->addCommentaire('Indiquez ci-dessous tous les détails concernant l\'accès aux collections de l\'institution, comme les horaires d\'ouverture, les droits à acquitter...');
328
    $form->addCommentaire('Indiquez ci-dessous tous les détails concernant l\'accès aux collections de l\'institution, comme les horaires d\'ouverture, les droits à acquitter...');
329
    $form->addChamps('ACCESS_RESTRICTION', 'Conditions d\'accès : ');
329
    $form->addChamps('ACCESS_RESTRICTION', 'Conditions d\'accès : ');
330
    $form->addCommentaire('<br />'.'Pensez à supprimer le contenu du champs ci-dessous si les informations que vous saisissez ne viennent pas de l\'Index Herbariorum, remplacez par votre nom.');
330
    $form->addCommentaire('<br />'.'Pensez à supprimer le contenu du champs ci-dessous si les informations que vous saisissez ne viennent pas de l\'Index Herbariorum, remplacez par votre nom.');
331
    $form->addChamps('SOURCE_DES_DONNEES', 'Source des informations');
331
    $form->addChamps('SOURCE_DES_DONNEES', 'Source des informations');
332
    $form->addCommentaire('<strong><span class="symbole_obligatoire">'.'*'.'</span>'.' : '.'</strong>'.'champ obligatoire.');
332
    $form->addCommentaire('<strong><span class="symbole_obligatoire">'.'*'.'</span>'.' : '.'</strong>'.'champ obligatoire.');
333
    $form->addChamps('DATE_DERNIERE_MODIF', '', date('Y-m-j H:i:s', time()), $type = 'hidden');
333
	// Gestion des métadonnées
334
    $form->addChamps('CE_MODIFIER_PAR', '',  $un_herbier->utilisateur->getId(), $type = 'hidden');
334
	gererMetaForm(&$form, &$un_herbier);
335
    
335
	    
336
    if ($form->id != HBA_EXEMPLE_ID) {
336
    if ($form->id != HBA_EXEMPLE_ID) {
337
        $form->submit('Valider', 'herbier_pere');
337
        $form->submit('Valider', 'herbier_pere');
338
    }
338
    }
339
    $form->annuler('Annuler', sprintf($un_herbier->url_action, HBA_ACTION_ANNULER));
339
    $form->annuler('Annuler', sprintf($un_herbier->url_action, HBA_ACTION_ANNULER));
340
}
340
}
Line 482... Line 482...
482
    $form->addChamps('MAIL', 'email : ');
482
    $form->addChamps('MAIL', 'email : ');
483
    $form->addChamps('TEL', 'Tél : ');
483
    $form->addChamps('TEL', 'Tél : ');
484
    $form->addChamps('FAX', 'Fax : ');
484
    $form->addChamps('FAX', 'Fax : ');
485
    $form->addChamps('FONCTION', 'Fonction : ');
485
    $form->addChamps('FONCTION', 'Fonction : ');
486
    $form->radioEnum('CONTACT', 'La personne est-elle contact ? : ','non');
486
    $form->radioEnum('CONTACT', 'La personne est-elle contact ? : ','non');
-
 
487
    // Gestion des métadonnées
-
 
488
	gererMetaForm(&$form, &$un_herbier);
-
 
489
        
487
    if ($un_herbier->organisation->getId() != HBA_EXEMPLE_ID) {
490
    if ($un_herbier->organisation->getId() != HBA_EXEMPLE_ID) {
488
        $form->submit('Valider');
491
        $form->submit('Valider');
489
    }
492
    }
490
    $form->annuler('Annuler', sprintf($un_herbier->url_action_org, MOD_HERB, $un_herbier->organisation->getId()));
493
    $form->annuler('Annuler', sprintf($un_herbier->url_action_org, MOD_HERB, $un_herbier->organisation->getId()));
491
}
494
}
Line 685... Line 688...
685
                            'l\'acquisition, notices nécrologiques et/ou biographiques...)'.'</li>'.
688
                            'l\'acquisition, notices nécrologiques et/ou biographiques...)'.'</li>'.
686
                            '</ul>'."\n"
689
                            '</ul>'."\n"
687
                        );
690
                        );
688
    $form->addChamps('DOC_STATE', 'État de la documentation : ');
691
    $form->addChamps('DOC_STATE', 'État de la documentation : ');
689
    $form->addChamps('PERCENT_DATABASED', '% de la documentation en base de données : ');
692
    $form->addChamps('PERCENT_DATABASED', '% de la documentation en base de données : ');
690
    $form->addChamps('DATE_DERNIERE_MODIF', '', date('Y-m-j H:i:s', time()), $type = 'hidden');
693
	// Gestion des métadonnées
691
    $form->addChamps('CE_MODIFIER_PAR', '',  $un_herbier->utilisateur->getId(), $type = 'hidden');
694
	gererMetaForm(&$form, &$un_herbier); 
-
 
695
    
Line 692... Line 696...
692
    
696
    
693
    if ($un_herbier->organisation->getId() != HBA_EXEMPLE_ID) {
697
    if ($un_herbier->organisation->getId() != HBA_EXEMPLE_ID) {
694
        $form->submit('Valider');
698
        $form->submit('Valider');
695
    }
699
    }
Line 827... Line 831...
827
    
831
    
828
    $form->addChamps('TXT_INDIC', 'Texte de la note : ');
832
    $form->addChamps('TXT_INDIC', 'Texte de la note : ');
829
    $form->addChamps('REM_INDIC', 'Remarque : ');
833
    $form->addChamps('REM_INDIC', 'Remarque : ');
830
    $form->checkboxFromTable(   'HERBIERS_INDIC par HERBIERS_A_UN_TYPE et HERBIERS_TYPE', 
834
    $form->checkboxFromTable(   'HERBIERS_INDIC par HERBIERS_A_UN_TYPE et HERBIERS_TYPE', 
-
 
835
                                'Cocher les cases : ', '', 'LIGNE', 'ID_INDIC', 'ID_TYPE', 'ID_TYPE');
831
                                'Cocher les cases : ', '', 'LIGNE', 'ID_INDIC', 'ID_TYPE', 'ID_TYPE');
836
	
832
    $form->submit('Valider');
837
    $form->submit('Valider');
833
    $form->annuler('Annuler', sprintf($un_herbier->getUrlActionOrgColl(), HBA_ACTION_COLL_DEROULER, $id_org, $id_coll));
838
    $form->annuler('Annuler', sprintf($un_herbier->getUrlActionOrgColl(), HBA_ACTION_COLL_DEROULER, $id_org, $id_coll));
Line 834... Line 839...
834
}
839
}
Line 1391... Line 1396...
1391
            $retour .= '<p class="hba_attention">'.'Aucun inscrit!'.'</p>'."\n";
1396
            $retour .= '<p class="hba_attention">'.'Aucun inscrit!'.'</p>'."\n";
1392
        }
1397
        }
1393
    }
1398
    }
1394
    return $retour;
1399
    return $retour;
1395
}
1400
}
-
 
1401
 
-
 
1402
function gererMetaForm(&$form, &$herbier)
-
 
1403
{
-
 
1404
	// Pour écraser ces valeurs même en modification nous métons temporairement le mode à vide. 
-
 
1405
    $mode = '';
-
 
1406
    if ($form->mode == 'MOD') {
-
 
1407
    	$form->mode = '';
-
 
1408
    	$mode = 'MOD';
-
 
1409
    }
-
 
1410
    $form->addChamps('DATE_DERNIERE_MODIF', '', date('Y-m-j H:i:s', time()), $type = 'hidden');
-
 
1411
    $form->addChamps('CE_MODIFIER_PAR', '',  $herbier->utilisateur->getId(), $type = 'hidden');
-
 
1412
    $form->mode = $mode;
-
 
1413
}
1396
// +------------------------------------------------------------------------------------------------------+
1414
// +------------------------------------------------------------------------------------------------------+
Line 1397... Line 1415...
1397
 
1415
 
1398
/* +--Fin du code ----------------------------------------------------------------------------------------+
1416
/* +--Fin du code ----------------------------------------------------------------------------------------+
1399
*
1417
*
-
 
1418
* $Log: not supported by cvs2svn $
-
 
1419
* Revision 1.2  2006/10/30 18:57:46  jp_milcent
-
 
1420
* Ajout de champs pour les flux rss.
1400
* $Log: not supported by cvs2svn $
1421
*
1401
* Revision 1.1  2005/11/23 10:32:32  jp_milcent
1422
* Revision 1.1  2005/11/23 10:32:32  jp_milcent
1402
* Ajout au dépot de l'application Herbiers.
1423
* Ajout au dépot de l'application Herbiers.
1403
* Elle doit à terme migrer dans eFlore.
1424
* Elle doit à terme migrer dans eFlore.
1404
*
1425
*