hasPermission("HACHEPORTAL_VIEW")) { header("Location: ./app.php?msg=no_permission"); die(); } $writeaccess = $user->hasPermission("HACHEPORTAL_EDIT"); if (empty($VARS['id']) || !$database->has('families', ['familyid' => $VARS['id']])) { header("Location: ./app.php?page=families&msg=family_doesnt_exist"); } $famid = $VARS['id']; $family = $database->get("families", [ 'familyid (id)', 'familyname (name)', 'phone', 'email', 'newsletter_method (newsletter)', 'address', 'city', 'state', 'zip', 'father_name (father)', 'mother_name (mother)', 'photo_permission (photo)' ], [ "familyid" => $famid ]); $children = $database->select("people", ["name", "birthday", "graduated"], ["familyid" => $famid]); ?>

get("Family"); ?>

get('Edit Family'); ?>
get("Email", false); break; case 2: $newsletter = $Strings->get("Print", false); break; case 3: $newsletter = $Strings->get("Email and Print", false); break; } $items = [ [ "db" => "father", "icon" => "fas fa-male", "label" => "Father" ], [ "db" => "mother", "icon" => "fas fa-female", "label" => "Mother" ], [ "db" => "phone", "icon" => "fas fa-phone", "label" => "Phone" ], [ "db" => "email", "icon" => "fas fa-at", "label" => "Email" ], [ "db" => "address", "icon" => "fas fa-map-marker", "label" => "Address" ], [ "db" => "city", "icon" => "fas fa-city", "label" => "City" ], [ "db" => "state", "icon" => "fas fa-flag", "label" => "State" ], [ "db" => "zip", "icon" => "fas fa-mail-bulk", "label" => "ZIP Code" ], [ "value" => $family['photo'] ? $Strings->get("Yes", false) : $Strings->get("No", false), "icon" => "fas fa-camera", "label" => "Photo Permission" ], [ "value" => $newsletter, "icon" => "fas fa-newspaper", "label" => "Newsletter" ], ]; foreach ($items as $i) { ?>
get($i['label']); echo ": "; if (empty($i['db'])) { echo $i['value']; } else { echo $family[$i['db']]; } ?>

get("Children"); ?>

get("Name"); ?> get("Born"); ?> get("Graduated"); ?>
get("Yes") : $Strings->get("No"); ?>