login($params['flyers-user'], $params['flyers-password']); if (!$success) return "Login Failed"; $db->query("UPDATE members SET `pollworker`=TRUE where skymanager_id=" . ((int) $user->getUserId())); if ($db->getError()) return "Failed to update user permissions"; $conf = json_encode([ 'host' => $params['db-host'], 'user' => $params['db-username'], 'pass' => $params['db-password'], 'db' => $params['db-database'] ], JSON_PRETTY_PRINT); if (file_put_contents(BASE . "/inc/config.json", $conf) === false) return "Failed to write configuration."; return false; } $params = []; foreach ($required as $field) { if (array_key_exists($field, $_POST) && !empty($_POST[$field])) $params[$field] = $_POST[$field]; } $error = null; if (!empty($params)) $error = test_config($params); if ($error === false) { header('Location: /index.php'); die(); } ?>

Michigan Flyers

Voting System Setup

$error"; ?>

Database Setup

Flyers Access Setup