HOA_MEMBER standing required to submit a record for ' . $name . '.
DSC Categories are public and readable by anyone.
To submit a record, you must complete the SASE process.
Visit
directory.diagnostics.kane-il.us
to begin.
';
}
// ---------------------------------------------------------------------------
// CONTENT ROUTER
// ---------------------------------------------------------------------------
function dsc01_content() {
if (function_exists('head_add_css')) {
head_add_css('/addon/dsc01/view/css/dsc01.css');
}
if (function_exists('head_add_js')) {
head_add_js('/addon/dsc01/view/js/dsc01.js');
}
$association_slug = argv(1) ?? '';
$sub_route = strtolower(argv(2) ?? '');
// Index — list the ten DSC categories
if (!$association_slug) {
return dsc01_render_index();
}
$raw = @file_get_contents('addon/vs01/config.json');
$cfg = $raw ? json_decode($raw, true) : [];
if (json_last_error() !== JSON_ERROR_NONE || !isset($cfg['associations'][$association_slug])) {
return dsc01_render_not_found();
}
$access = dsc01_access_state($association_slug);
// Manage route — operator only (stub)
if ($sub_route === 'manage') {
if ($access !== 'operator') {
return dsc01_access_wall($association_slug);
}
return dsc01_render_manage($association_slug);
}
// POST — submission handler
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if ($access === 'public') {
return dsc01_access_wall($association_slug);
}
if (!dsc01_verify_csrf()) {
return '
Invalid form token. Please reload and try again.
';
}
return dsc01_handle_post($association_slug, $access);
}
// Association landing — checklist
return dsc01_render_landing($association_slug, $access);
}
// ---------------------------------------------------------------------------
// NOT FOUND
// ---------------------------------------------------------------------------
function dsc01_render_not_found() {
return '