diff --git a/content/student/studentDBDML.php b/content/student/studentDBDML.php index becb31e88..79e330c7f 100644 --- a/content/student/studentDBDML.php +++ b/content/student/studentDBDML.php @@ -365,7 +365,6 @@ if(!$error) $error = true; $errormsg = 'Sie haben keine Schreibrechte fuer diesen Studiengang'; } - //Studentendaten speichern if(!$error) { @@ -377,7 +376,15 @@ if(!$error) $errormsg = 'Fehler beim Laden:'.$student->errormsg; $error = true; } + $datum = new datum(); + $gebdatum = $_POST['geburtsdatum']; + if($gebdatum!='' && !$datum->checkDatum($gebdatum)) + { + $return = false; + $errormsg = 'Geburtsdatum ist nicht korrekt.'; + $error = true; + } if(!$error) { $student->uid = $_POST['uid']; diff --git a/include/datum.class.php b/include/datum.class.php index 9b7ebcc5e..f09066009 100644 --- a/include/datum.class.php +++ b/include/datum.class.php @@ -415,6 +415,5 @@ class datum { return intval(substr($timestring, 0, 2)) + intval(substr($timestring, 3, 2)) / 60; } - } ?>