timekeeper

[Abandoned unfinished] CGI web application in C for time tracking. (My first, just a learning project)
Log | Files | Refs | README

commit d5968765f854666736eaf9568e7b244669512b27
parent dca46adbebe64c6f9fa7278f5829db6ef6b29781
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Sat, 23 Mar 2024 21:39:39 -0700

Add pagefrag page

This page just calls fragpage with the request's pagename as the
title and fragment name.

Diffstat:
MMakefile | 4++--
Apages/frag.c | 7+++++++
Mpages/pages.h | 1+
3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -5,8 +5,8 @@ lddflags = ${LDDFLAGS} -static -L/usr/local/lib -lkcgi -lkcgihtml -lz -lsqlbox - prefix = /var/www/htdocs/${name}.primus.lan datadir = /var/www/tmp -pages = pages/index.c pages/login.c pages/logout.c \ - pages/account.c pages/main.c pages/export.c pages/archive.c +pages = pages/index.c pages/login.c pages/logout.c pages/account.c \ + pages/main.c pages/export.c pages/archive.c pages/frag.c hdrsrc = page.c html.c user.c stmt.c key.c times.c menu.c frag.c \ pages/util.c pages/common.c src = ${hdrsrc} ${pages} diff --git a/pages/frag.c b/pages/frag.c @@ -0,0 +1,7 @@ +#include "common.h" + +enum kcgi_err +pagefrag(struct pagedata *pd) +{ + return fragpage(pd, pd->req.pagename, pd->req.pagename); +} diff --git a/pages/pages.h b/pages/pages.h @@ -16,3 +16,4 @@ enum kcgi_err pageaccount(struct pagedata *pd); enum kcgi_err pageexport(struct pagedata *pd); enum kcgi_err pagemain(struct pagedata *pd); enum kcgi_err pagearchive(struct pagedata *pd); +enum kcgi_err pagefrag(struct pagedata *pd);