HummingBirdAnimeClient/app/views/settings.php

44 lines
852 B
PHP
Raw Normal View History

<?php
if ( ! $auth->isAuthenticated())
{
echo '<h1>Not Authorized</h1>';
2018-09-27 16:45:12 -04:00
return;
}
$sectionMapping = [
'config' => 'General Settings',
'cache' => 'Caching',
'database' => 'Collection Database Settings',
];
2018-09-27 16:45:12 -04:00
$hiddenFields = [];
$nestedPrefix = 'config';
?>
2018-09-27 16:45:12 -04:00
<pre><?= print_r($_POST, TRUE) ?></pre>
<form action="<?= $_SERVER['REQUEST_URI'] ?>" method="POST">
<main class='form'>
<button type="submit">Save Changes</button>
<br />
<?php foreach ($form as $section => $fields): ?>
<fieldset class="box">
<legend><?= $sectionMapping[$section] ?></legend>
<section class='form'>
<?php require __DIR__ . '/_form.php' ?>
</section>
</fieldset>
<?php endforeach ?>
<hr />
<?php foreach ($hiddenFields as $field): ?>
<?= $field ?>
<?php endforeach ?>
<button type="submit">Save Changes</button>
</main>
2018-09-27 16:45:12 -04:00
</form>