<?php include(__DIR__."/../layout/top.php"); ?> <div class="row"> <div class="col-md-12"> <h3>Settings</h3> <form method="post"> <?php foreach($settings as $setting) { $button = false; echo '<h4>'.$setting->name.'</h4>'; echo '<p>'.$setting->description.'</p>'; switch ($setting->typ) { case 'checkbox': echo '<input type="checkbox" name="'.$setting->name.'"'; if($setting->value) { echo' checked="checked"'; } echo '>'.$setting->name.'<br>'; $button = true; break; case 'textinput': echo '<input class="form-control" name="'.$setting->name.'" value="'.$setting->value.'">'; break; case 'password': echo '<input class="form-control" type="password" name="'.$setting->name.'" value="'.$setting->value.'">'; break; } echo "<hr>"; } ?> <input type="submit" value="Save" class="btn btn-success"> </form> </div> </div> <?php include(__DIR__."/../layout/bottom.php"); ?>