--- /dev/null
+<?php
+$cols = [
+ 'username' => [
+ 'label' => 'login',
+ 'value' => $user['name'],
+ 'target' => NULL,
+ 'pattern' => "[a-z0-9-]+",
+ 'size' => 10,
+ ],
+ 'name' => [
+ 'label' => 'volledige naam',
+ 'explain' => "Alleen zichtbaar voor andere leden.",
+ 'filter' => ["\n", '; '],
+ 'size' => 30,
+ 'filename' => 'name.txt',
+ ],
+ 'email' => [
+ 'label' => 'e-mailadres',
+ 'type' => 'email',
+ 'explain' => "Voor contact van of met deze site. Wij zullen dit nooit vrij- of doorgeven.",
+ 'size' => 30,
+ 'filename' => 'email.txt',
+ ],
+ 'avatar' => [
+ 'label' => 'portretfoto',
+ 'type' => 'file',
+ 'filename' => 'avatar.jpg',
+ ],
+ 'tags' => [
+ 'label' => 'groepen',
+ 'filename' => 'profile/.tags',
+ 'values' => [],
+ ],
+];
+
+if (isset($user['pass'])) {
+ $cols['newpass'] = [
+ 'label' => 'wachtwoord',
+ 'input' => <<<'EOT'
+ <input type="password" name="oldpass" value="" placeholder="Huidig wachtwoord" />
+ <input type="password" id="newpass" name="newpass" value="" placeholder="Nieuw wachtwoord" />
+ <input type="password" name="passconf" value="" placeholder="Nogmaals" />
+EOT
+ ,
+ 'hide' => 'pass',
+ ];
+}
];
}
-$cols = [
- 'name' => [
- 'label' => 'volledige naam',
- 'explain' => "Alleen zichtbaar voor andere leden.",
- 'filter' => ["\n", '; '],
- 'size' => 30,
- 'filename' => 'name.txt',
- ],
- 'email' => [
- 'label' => 'e-mailadres',
- 'type' => 'email',
- 'explain' => "Voor contact van of met deze site. Wij zullen dit nooit vrij- of doorgeven.",
- 'size' => 30,
- 'filename' => 'email.txt',
- ],
- 'avatar' => [
- 'label' => 'portretfoto',
- 'type' => 'file',
- 'filename' => 'avatar.jpg',
- ],
- 'tags' => [
- 'label' => 'groepen',
- 'values' => [],
- 'filename' => 'profile/.tags',
- ],
-];
+require_once('edit.inc.php');
foreach ($cols as $col => &$colconf) {
if (!isset($colconf['filename'])) {
$colconf['target'] = $colpath; # editing allowed
}
-$cols = [
- 'username' => [
- 'label' => 'login',
- 'value' => $user['name'],
- 'target' => NULL,
- 'pattern' => "[a-z0-9-]+",
- 'size' => 10,
- ],
-] + $cols;
-
-if (isset($user['pass'])) {
- $cols['newpass'] = [
- 'label' => 'wachtwoord',
- 'input' => <<<'EOT'
- <input type="password" name="oldpass" value="" placeholder="Huidig wachtwoord" />
- <input type="password" id="newpass" name="newpass" value="" placeholder="Nieuw wachtwoord" />
- <input type="password" name="passconf" value="" placeholder="Nogmaals" />
-EOT
- ,
- 'hide' => 'pass',
- ];
-}
-
$colwarn = [];
if ($_POST) {
if (!file_exists($user['dir']) and !@mkdir($user['dir'])) {