['label' => 'e-mailadres', 'type' => 'email'], ]; foreach ($cols as $col => &$colconf) { $colpath = "$userdir/$col.txt"; if (file_exists($colpath)) { $colconf['value'] = file_get_contents($colpath); } if (!is_writable($userdir)) { continue; # locked parent directory } if (isset($colconf['value']) and !is_writable($colpath)) { continue; # locked column file } $colconf['target'] = $colpath; # editing allowed } $colwarn = []; if ($_POST) { foreach ($_POST as $col => $val) { if (!isset($cols[$col])) { continue; # unknown } if (isset($cols[$col]['value']) and $cols[$col]['value'] === $val) { continue; # unaltered } $cols[$col]['value'] = $val; # update form value if (empty($cols[$col]['target'])) { $colwarn[$col] = "Kan niet worden aangepast."; continue; } if (!file_put_contents($cols[$col]['target'], $val)) { $colwarn[$col] = "Fout bij opslaan."; } } if ($colwarn) { print "

Instellingen zijn niet (volledig) opgeslagen. Probeer het later nog eens.

\n\n"; } else { print "

Alle instellingen zijn opgeslagen.

\n\n"; } } ?>

Geef een e-mailadres op waarmee we u kunnen bereiken indien nodig. Wij zullen dit adres nooit vrij- of doorgeven.

&$colconf) { print "\t\n"; if ($error = @$colwarn[$col]) { print "$error\n"; } } ?>