diff --git a/lang/en_us.php b/lang/en_us.php
index 2620fcb..d8b24c5 100644
--- a/lang/en_us.php
+++ b/lang/en_us.php
@@ -41,6 +41,8 @@ define("STRINGS", [
"notes" => "Notes",
"view punch card" => "View punch card",
"na" => "N/A",
- "this week" => "This week",
- "x on the clock" => "{time} on the clock"
+ "this week" => "This Week",
+ "x on the clock" => "{time} on the clock",
+ "x punches" => "{count} punches",
+ "history" => "History"
]);
\ No newline at end of file
diff --git a/pages.php b/pages.php
index 840a68e..e9bf776 100644
--- a/pages.php
+++ b/pages.php
@@ -14,7 +14,7 @@ define("PAGES", [
"title" => "404 error"
],
"punches" => [
- "title" => "punch card",
+ "title" => "history",
"navbar" => true,
"icon" => "clock-o",
"styles" => [
diff --git a/pages/home.php b/pages/home.php
index 6d2e3d7..b05a541 100644
--- a/pages/home.php
+++ b/pages/home.php
@@ -36,7 +36,7 @@ redirectifnotloggedin();
?>
-
+
diff --git a/pages/punches.php b/pages/punches.php
index 0202678..72b3709 100644
--- a/pages/punches.php
+++ b/pages/punches.php
@@ -2,33 +2,49 @@
require_once __DIR__ . '/../required.php';
redirectifnotloggedin();
+
+
+require_once __DIR__ . "/../lib/dates.php";
+$weekstart = sqldatetime(getstartofweek(WEEK_START));
+$punches = $database->select('punches', ['in', 'out'], ['AND' => ['uid' => $_SESSION['uid'], 'in[>]' => $weekstart]]);
+$punchtimes = [];
+foreach ($punches as $p) {
+ $punchtimes[] = [$p['in'], $p['out']];
+}
+$totalseconds = sumelapsedtimearray($punchtimes);
+$totalpunches = count($punches);
?>
+