diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index da4150bf691..03f7307dec8 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -21,12 +21,7 @@ */ require("./pre.inc.php"); require("../contact.class.php"); - -if ($sortorder == "") -{ - $sortfield="lower(s.nom)"; - $sortorder="ASC"; -} +require (DOL_DOCUMENT_ROOT."/lib/vcard/vcard.class.php"); if ($HTTP_POST_VARS["action"] == 'add') { @@ -43,6 +38,7 @@ if ($HTTP_POST_VARS["action"] == 'add') $contact->phone_pro = $HTTP_POST_VARS["phone_pro"]; $contact->phone_perso = $HTTP_POST_VARS["phone_perso"]; $contact->phone_mobile = $HTTP_POST_VARS["phone_mobile"]; + $contact->jabberid = $HTTP_POST_VARS["jabberid"]; $_GET["id"] = $contact->create($user); } @@ -57,7 +53,6 @@ if ($_GET["action"] == 'delete') $result = $contact->delete($_GET["id"]); Header("Location: index.php"); - } @@ -70,16 +65,24 @@ if ($action == 'update') $contact->name = $HTTP_POST_VARS["name"]; $contact->firstname = $HTTP_POST_VARS["firstname"]; - $contact->poste = $poste; + $contact->poste = $HTTP_POST_VARS["poste"]; $contact->phone_pro = $HTTP_POST_VARS["phone_pro"]; $contact->phone_perso = $HTTP_POST_VARS["phone_perso"]; $contact->phone_mobile = $HTTP_POST_VARS["phone_mobile"]; $contact->fax = $HTTP_POST_VARS["fax"]; - $contact->note = $note; + $contact->note = $HTTP_POST_VARS["note"]; $contact->email = $HTTP_POST_VARS["email"]; - - $result = $contact->update($HTTP_POST_VARS["contactid"]); + $contact->jabberid = $HTTP_POST_VARS["jabberid"]; + + $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($HTTP_POST_VARS["contactid"], $user); } @@ -110,7 +113,7 @@ if ($_GET["action"] == 'create') print '