diff --git a/langs/en/actions.json b/langs/en/actions.json new file mode 100644 index 0000000..f3108f4 --- /dev/null +++ b/langs/en/actions.json @@ -0,0 +1,6 @@ +{ + "Add Family": "Add Family", + "Edit": "Edit", + "View": "View", + "Edit Family": "Edit Family" +} diff --git a/langs/en/labels.json b/langs/en/labels.json new file mode 100644 index 0000000..c93a809 --- /dev/null +++ b/langs/en/labels.json @@ -0,0 +1,22 @@ +{ + "Name": "Name", + "Actions": "Actions", + "Father": "Father", + "Mother": "Mother", + "Phone": "Phone", + "Email": "Email", + "Address": "Address", + "City": "City", + "State": "State", + "ZIP Code": "ZIP Code", + "ZIP": "ZIP", + "Photo Permission": "Photo Permission", + "Yes": "Yes", + "No": "No", + "Newsletter": "Newsletter", + "Print": "Print", + "Email and Print": "Email and Print", + "Children": "Children", + "Born": "Born", + "Graduated": "Graduated" +} diff --git a/langs/en/messages.json b/langs/en/messages.json new file mode 100644 index 0000000..459a168 --- /dev/null +++ b/langs/en/messages.json @@ -0,0 +1,4 @@ +{ + "You do not have permission to do that.": "You do not have permission to do that.", + "That family ID does not exist.": "That family ID does not exist." +} diff --git a/langs/en/titles.json b/langs/en/titles.json index 6fbf103..5e833c9 100644 --- a/langs/en/titles.json +++ b/langs/en/titles.json @@ -1,4 +1,7 @@ { "home": "Home", - "test": "Test" + "Families": "Families", + "Members": "Members", + "View Family": "View Family", + "Family": "Family" } diff --git a/langs/messages.php b/langs/messages.php index 0744629..cfa920c 100644 --- a/langs/messages.php +++ b/langs/messages.php @@ -16,5 +16,13 @@ define("MESSAGES", [ "404_error" => [ "string" => "page not found", "type" => "info" + ], + "no_permission" => [ + "string" => "You do not have permission to do that.", + "type" => "danger" + ], + "family_doesnt_exist" => [ + "string" => "That family ID does not exist.", + "type" => "warning" ] ]); diff --git a/pages.php b/pages.php index ad2a84f..294c364 100644 --- a/pages.php +++ b/pages.php @@ -11,7 +11,23 @@ define("PAGES", [ "navbar" => true, "icon" => "fas fa-home" ], + "families" => [ + "title" => "Families", + "navbar" => true, + "icon" => "fas fa-users", + "styles" => [ + "static/css/datatables.min.css", + "static/css/tables.css" + ], + "scripts" => [ + "static/js/datatables.min.js", + "static/js/families.js" + ], + ], + "viewfamily" => [ + "title" => "View Family" + ], "404" => [ "title" => "404 error" ] -]); \ No newline at end of file +]); diff --git a/pages/families.php b/pages/families.php new file mode 100644 index 0000000..0b71388 --- /dev/null +++ b/pages/families.php @@ -0,0 +1,73 @@ +hasPermission("HACHEPORTAL_VIEW")) { + header("Location: ./app.php?msg=no_permission"); + die(); +} + +$writeaccess = $user->hasPermission("HACHEPORTAL_EDIT"); + +$families = $database->select("families", ['familyid (id)', 'familyname', 'phone', 'email', 'father_name (father)', 'mother_name (mother)']); +?> + +
++ | get('Actions'); ?> | +get('Name'); ?> | +get('Father'); ?> | +get('Mother'); ?> | +get('Phone'); ?> | +get('Email'); ?> | +
---|---|---|---|---|---|---|
+ | + get("View"); ?> + + get("Edit"); ?> + + | ++ | + | + | + | + |
+ | get('Actions'); ?> | +get('Name'); ?> | +get('Father'); ?> | +get('Mother'); ?> | +get('Phone'); ?> | +get('Email'); ?> | +
get("Name"); ?> | +get("Born"); ?> | +get("Graduated"); ?> | +
---|---|---|
+ | + | get("Yes") : $Strings->get("No"); ?> | +