From 1131c45694a571df5ff99875e4d593c88aaae35a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 Jul 2005 11:29:15 +0000 Subject: [PATCH] Supprime style obsolete FicheSubmit --- htdocs/contact/perso.php | 170 +++++++++++++++++++-------------------- 1 file changed, 84 insertions(+), 86 deletions(-) diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 72e7a965a17..b544df9b247 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur +/* Copyright (C) 2004 Rodolphe Quiedeville + * Copyright (C) 2004-2005 Laurent Destailleur * * 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 @@ -18,14 +18,13 @@ * * $Id$ * $Source$ - * */ /** - \file htdocs/contact/perso.php + \file htdocs/contact/perso.php \ingroup societe - \brief Onglet informations personnelles d'un contact - \version $Revision$ + \brief Onglet informations personnelles d'un contact + \version $Revision$ */ require("./pre.inc.php"); @@ -35,30 +34,33 @@ require (DOL_DOCUMENT_ROOT."/lib/vcard/vcard.class.php"); $langs->load("companies"); -if ($_POST["action"] == 'update') +if ($_POST["action"] == 'update') { - $contact = new Contact($db); - $contact->id = $_POST["contactid"]; + $contact = new Contact($db); + $contact->id = $_POST["contactid"]; - if ($_POST["birthdayyear"]) { - if ($_POST["birthdayyear"]<=1970 && $_SERVER["WINDIR"]) { - # windows mktime does not support negative date timestamp so birthday is not supported for old persons + if ($_POST["birthdayyear"]) + { + if ($_POST["birthdayyear"]<=1970 && $_SERVER["WINDIR"]) + { + // windows mktime does not support negative date timestamp so birthday is not supported for old persons $contact->birthday = $_POST["birthdayyear"].'-'.$_POST["birthdaymonth"].'-'.$_POST["birthdayday"]; - //array_push($error,"Windows ne sachant pas gérer des dates avant 1970, les dates de naissance avant cette date ne seront pas sauvegardées"); - } else { - $contact->birthday = mktime(0,0,0,$_POST["birthdaymonth"],$_POST["birthdayday"],$_POST["birthdayyear"]); + // array_push($error,"Windows ne sachant pas gérer des dates avant 1970, les dates de naissance avant cette date ne seront pas sauvegardées"); + } else { + $contact->birthday = mktime(0,0,0,$_POST["birthdaymonth"],$_POST["birthdayday"],$_POST["birthdayyear"]); + } } - } - $contact->birthday_alert = $_POST["birthday_alert"]; + $contact->birthday_alert = $_POST["birthday_alert"]; - $result = $contact->update_perso($_POST["contactid"], $user); + $result = $contact->update_perso($_POST["contactid"], $user); } /* * * */ + llxHeader(); $contact = new Contact($db); @@ -87,104 +89,100 @@ $h++; dolibarr_fiche_head($head, $hselected, $langs->trans("Contact").": ".$contact->firstname.' '.$contact->name); -if ($_GET["action"] == 'edit') +if ($_GET["action"] == 'edit') { - // Fiche info perso en mode edition + /* + * Fiche en mode edition + */ - print ''; + print "
'; + print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; - if ($contact->socid > 0) + if ($contact->socid > 0) { - $objsoc = new Societe($db); - $objsoc->fetch($contact->socid); + $objsoc = new Societe($db); + $objsoc->fetch($contact->socid); - print $langs->trans("Company").' : '.$objsoc->nom_url.'
'; + print ''; } - print $langs->trans("Name").' : '.$contact->name.' '.$contact->firstname ."
"; + print ''; - print '
'.$langs->trans("Company").''.$objsoc->nom_url.'
'.$langs->trans("Name").''.$contact->name.' '.$contact->firstname .'
'; - - $html = new Form($db); - - print ''; - - print ''; + print $html->select_date($contact->birthday,'birthday',0,0,0); + } else { + print $html->select_date(0,'birthday',0,0,1); } - else + print ''; + + print ''; + print ''; } + else + { + print ''; + } + print ''; - print "
'.$langs->trans("Birthday").''; - if ($contact->birthday && $contact->birthday > 0) { - print $html->select_date($contact->birthday,'birthday',0,0,0); - } else { - print $html->select_date(0,'birthday',0,0,1); - } - print ''.$langs->trans("Alert").': '; - if ($contact->birthday_alert) + print '
'.$langs->trans("Birthday").''; + $html=new Form($db); + if ($contact->birthday && $contact->birthday > 0) { - print ''.$langs->trans("Alert").': '; + if ($contact->birthday_alert) { - print '
"; + print '

"; - print ""; - print ""; - - print '
'; - - print ""; + print ""; } else { - /* - * Visualisation de la fiche - * - */ - print ''; + else + print ' (alerte anniversaire inactive)'; + } + else { + print '"; + } + print ""; - print ""; + print "
'; - - if ($contact->socid > 0) - { - $objsoc = new Societe($db); - $objsoc->fetch($contact->socid); + /* + * Fiche en mode visu + */ + print ''; - print $langs->trans("Company").' : '.$objsoc->nom_url.'
'; + if ($contact->socid > 0) + { + $objsoc = new Societe($db); + $objsoc->fetch($contact->socid); + + print ''; } - print $langs->trans("Name").' : '.$contact->name.' '.$contact->firstname ."
"; + print ''; - if ($contact->birthday && $contact->birthday > 0) { - print $langs->trans("Birthdate").' : '.dolibarr_print_date($contact->birthday); + if ($contact->birthday && $contact->birthday > 0) { + print '"; - print "
'.$langs->trans("Company").''.$objsoc->nom_url.'
'.$langs->trans("Name").''.$contact->name.' '.$contact->firstname .'
'.$langs->trans("Birthdate").''.dolibarr_print_date($contact->birthday); - if ($contact->birthday_alert) - print ' (alerte anniversaire active)
'; - else - print ' (alerte anniversaire inactive)
'; - } - else { - print $langs->trans("Birthday").' : '.$langs->trans("Unknown")."
"; - } - - print "

"; + if ($contact->birthday_alert) + print ' (alerte anniversaire active)
'.$langs->trans("Birthday").''.$langs->trans("Unknown")."

"; - // Barre d'actions - if ($user->societe_id == 0) + print "
"; + + // Barre d'actions + if ($user->societe_id == 0) { - print '
'; - - print ''.$langs->trans('Edit').''; + print '
'; - print "
"; + print ''.$langs->trans('Edit').''; + + print "
"; } } $db->close(); -llxFooter("Dernière modification $Date$ révision $Revision$"); +llxFooter('$Date$ - $Revision$'); ?>