diff --git a/htdocs/comm/action/fiche.php3 b/htdocs/comm/action/fiche.php3 index e75568126a8..d58e2af2c7a 100644 --- a/htdocs/comm/action/fiche.php3 +++ b/htdocs/comm/action/fiche.php3 @@ -49,17 +49,21 @@ if ($action=='add_action') $societe = new Societe($db); $societe->fetch($socid); - $actioncomm = new ActionComm($db); - + + $actioncomm->date = $db->idate(mktime($HTTP_POST_VARS["achour"], + $HTTP_POST_VARS["acmin"], + 0, + $HTTP_POST_VARS["acmonth"], + $HTTP_POST_VARS["acday"], + $HTTP_POST_VARS["acyear"]) + ); if ($actionid == 5) { - $actioncomm->date = $db->idate(mktime($heurehour,$heuremin,0,$remonth,$reday,$reyear)); $actioncomm->percent = 0; } else { - $actioncomm->date = $date; $actioncomm->percent = 100; } $actioncomm->priority = 2; @@ -116,6 +120,14 @@ if ($action=='add_action') Header("Location: ".DOL_URL_ROOT."/comm/fiche.php3?socid=$socid"); } +if ($HTTP_POST_VARS["action"] == 'confirm_delete' && $HTTP_POST_VARS["confirm"] == yes) +{ + $actioncomm = new ActionComm($db); + $actioncomm->delete($id); + Header("Location: index.php"); +} + + /******************************************************************************/ /* */ /* Fin des Actions */ @@ -183,12 +195,12 @@ if ($action=='create' && $actionid && $contactid) { */ else { + $html = new Form($db); print_titre ("Action effectuée"); print '
\n"; + } + $act = new ActionComm($db); $act->fetch($id); @@ -246,7 +281,7 @@ if ($id) print '