* * This program 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 of the License, or * (at your option) any later version. * * This program 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 program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ * $Source$ * */ require("./pre.inc.php"); require("../contact.class.php"); require (DOL_DOCUMENT_ROOT."/lib/vcard/vcard.class.php"); if ($action == 'update') { $contact = new Contact($db); $contact->birthday = mktime(12, 1 , 1, $HTTP_POST_VARS["remonth"], $HTTP_POST_VARS["reday"], $HTTP_POST_VARS["reyear"]); $contact->birthday_alert = $HTTP_POST_VARS["birthday_alert"]; $result = $contact->update_perso($HTTP_POST_VARS["contactid"], $user); } /* * * */ llxHeader(); print '
'; print 'Général'; print 'Informations personnelles'; print 'VCard'; print 'Info'; print '
'; print '
'; if ($_GET["action"] == 'edit') { print_fiche_titre ("Edition d'un contact"); $contact = new Contact($db); $contact->fetch($_GET["id"], $user); print '
'; print ''; print ''; if ($contact->socid > 0) { $objsoc = new Societe($db); $objsoc->fetch($contact->socid); print 'Société : '.$objsoc->nom.'
'; } print 'Nom : '.$contact->name.' '.$contact->firstname ."
"; print ''; print ''; } else { print ''; } print "
Date de naissance'; $html = new Form($db); print $html->select_date('','re',0,0,1); print 'Alerte : '; if ($contact->birthday_alert) { print '
"; print '
'; print ""; } else { /* * Visualisation de la fiche * */ $contact = new Contact($db); $contact->fetch($_GET["id"], $user); print_fiche_titre ("Contact : ". $contact->firstname.' '.$contact->name); if ($contact->socid > 0) { $objsoc = new Societe($db); $objsoc->fetch($contact->socid); print 'Société : '.$objsoc->nom.'
'; } if ($contact->birthday) print 'Date de naissance : '.strftime("%d %B %Y",$contact->birthday); if ($contact->birthday_alert) print ' (alerte)'; print "
"; print "
"; if ($user->societe_id == 0) { print '
'; print 'Editer'; print 'Supprimer'; print "
"; } } $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$"); ?>