diff --git a/langs/en/actions.json b/langs/en/actions.json index 241fb60..c89d52d 100644 --- a/langs/en/actions.json +++ b/langs/en/actions.json @@ -8,5 +8,7 @@ "Edit Family": "Edit Family", "View Families": "View Families", "View Payments": "View Payments", - "Manual Entry": "Manual Entry" + "Manual Entry": "Manual Entry", + "View Expiring": "View Expiring", + "Remove Filter": "Remove Filter" } diff --git a/langs/en/messages.json b/langs/en/messages.json index e680ef8..b0dbce5 100644 --- a/langs/en/messages.json +++ b/langs/en/messages.json @@ -9,5 +9,6 @@ "No interests selected.": "No interests selected.", "Events updated.": "Events updated.", "You agree to use the information in this directory for homeschool use ONLY. All other purposes, such as soliciting, is strictly prohibited.": "You agree to use the information in this directory for homeschool use ONLY. All other purposes, such as soliciting, is strictly prohibited.", - "Payment saved.": "Payment saved." + "Payment saved.": "Payment saved.", + "Only showing expired or expiring memberships.": "Only showing expired or expiring memberships." } diff --git a/pages/families.php b/pages/families.php index 4ddb6ea..0e2ac51 100644 --- a/pages/families.php +++ b/pages/families.php @@ -13,15 +13,23 @@ if (!$user->hasPermission("HACHEPORTAL_VIEW")) { } $writeaccess = $user->hasPermission("HACHEPORTAL_EDIT"); - -$families = $database->select("families", ['familyid (id)', 'familyname', 'phone', 'email', 'father_name (father)', 'mother_name (mother)', 'expires']); ?> -
+
get("Add Family"); ?> + +
get("Only showing expired or expiring memberships."); ?>   get("Remove Filter"); ?>
+
+ @@ -37,6 +45,12 @@ $families = $database->select("families", ['familyid (id)', 'familyname', 'phone date("Y-m-d", strtotime("+1 month"))]; + } + $families = $database->select("families", ['familyid (id)', 'familyname', 'phone', 'email', 'father_name (father)', 'mother_name (mother)', 'expires'], $where); + foreach ($families as $f) { ?> diff --git a/pages/home.php b/pages/home.php index 2b3c6fd..ef3b74e 100644 --- a/pages/home.php +++ b/pages/home.php @@ -13,20 +13,34 @@ get("View Families"); ?> +

get("Recent Payments") ?>

select("payments", "amount", ["AND" => ["paid" => 1, "date[>]" => date("Y-m-d H:i:s", strtotime("-30 days"))]]); - $total = 0.0; - foreach ($amounts as $amt) { - $total += $amt; - } - echo number_format($total, 2); - ?>

+ $amounts = $database->select("payments", "amount", ["AND" => ["paid" => 1, "date[>]" => date("Y-m-d H:i:s", strtotime("-30 days"))]]); + $total = 0.0; + foreach ($amounts as $amt) { + $total += $amt; + } + echo number_format($total, 2); + ?>
+ + count('families', ["expires[<]" => date("Y-m-d", strtotime("+1 month"))]); + ?> +
text-light"> +
+

get("Expiring Memberships") ?>

+

+
+ +