Damn, a checkbox returns 'on' for true
authorJoey Schulze <joey@infodrom.org>
Wed, 28 Jul 2010 09:31:26 +0000 (11:31 +0200)
committerJoey Schulze <joey@infodrom.org>
Wed, 28 Jul 2010 09:31:26 +0000 (11:31 +0200)
masks/arbeitsberichte.php

index a45fa66..cfd7656 100644 (file)
@@ -264,7 +264,7 @@ function einsatz_insert($mask)
                 $_POST['gebiet'],
                 $_POST['kostenstelle'],
                 $_POST['arbeitsart'],
                 $_POST['gebiet'],
                 $_POST['kostenstelle'],
                 $_POST['arbeitsart'],
-                $_POST['akkord'],
+                $_POST['akkord']==='on'?1:0,
                 empty($_POST['bemerkung']) ? 'NULL' : "'" . pg_escape_string($_POST['bemerkung']) . "'",
                 pg_escape_string($_SESSION['sys']['login']));
 
                 empty($_POST['bemerkung']) ? 'NULL' : "'" . pg_escape_string($_POST['bemerkung']) . "'",
                 pg_escape_string($_SESSION['sys']['login']));