+ if (file_put_contents($cols[$col]['target'], $val) === FALSE) {
+ $colwarn[$col] = "Fout bij opslaan.";
+ }
+ }
+
+ foreach ($_FILES as $col => $val) {
+ if (!isset($cols[$col]) and @$cols[$col]['type'] == 'file') {
+ continue; # unknown
+ }
+ switch ($val['error']) {
+ case UPLOAD_ERR_OK:
+ break;
+ case UPLOAD_ERR_NO_FILE:
+ continue 2; # current
+ default:
+ $colwarn[$col] = "Afbeelding niet goed ontvangen.";
+ continue 2;
+ }
+ if (empty($cols[$col]['target'])) {
+ $colwarn[$col] = "Kan niet worden aangepast.";
+ continue;
+ }
+ if (!@move_uploaded_file($val['tmp_name'], $cols[$col]['target'])) {