$_POST['modify_time'] = date('YmdHis'); $_POST['history'] = $personell_obj->ConcatHistory("Update: " . date('Y-m-d H:i:s') . " = " . $encoder . "\n"); # Disable the pid variable if (isset($_POST['pid'])) { unset($_POST['pid']); } $personell_obj->setDataArray($_POST); if ($personell_obj->updateDataFromInternalArray($personell_nr)) { header("location: personell_register_show.php" . URL_REDIRECT_APPEND . "&personell_nr={$personell_nr}&origin=admit&target=personell_reg&newdata={$newdata}"); exit; } else { $error = TRUE; } } else { $newdata = 1; if (!$personell_obj->InitPersonellNrExists($GLOBAL_CONFIG['personell_nr_init'])) { $_POST['nr'] = $GLOBAL_CONFIG['personell_nr_init']; } if ($_POST['date_join']) { $_POST['date_join'] = @formatDate2STD($_POST['date_join'], $date_format); } if ($_POST['date_exit']) { $_POST['date_exit'] = @formatDate2STD($_POST['date_exit'], $date_format); } if ($_POST['contract_start']) { $_POST['contract_start'] = @formatDate2STD($_POST['contract_start'], $date_format); } if ($_POST['contract_end']) { $_POST['contract_end'] = @formatDate2STD($_POST['contract_end'], $date_format); } $_POST['create_id'] = $encoder;