From: b Date: Sun, 9 Oct 2022 13:48:40 +0000 (+0000) Subject: Auto refresh after post X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=d31d66a5cb4aa53080a53709f9a7c6bde37159d9;p=ott%2Fmirror Auto refresh after post --- diff --git a/post.1.c b/post.1.c index 508ffb0..1feb226 100644 --- a/post.1.c +++ b/post.1.c @@ -2,7 +2,7 @@ // Copyright (C) 2014, 2022 Balthasar Szczepański // post.c automatically generated from post.1.c // write posts from the mirror. -// 29.09.2022 +// 09.10.2022 // // This file is part of OTT mirror. // @@ -377,13 +377,14 @@ void submit() } else snprintf(arg1,N_STRBUF,"info=

This message has been posted successfully.

View your submitted message

Return to the ЯOЯЯIM TTO

",timenumber,timenumber); + snprintf(arg2,N_STRBUF,"refresh=",timenumber,timenumber); printf("Content-type: text/html\n\n"); fflush(stdout); sub=fork(); if(sub==0) { - r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_VIEW,"-v",arg1,INFO_PATH,(char *)0); + r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_VIEW,"-v",arg1,"-v",arg2,INFO_PATH,(char *)0); exit(r); } waitpid(sub,&r,0); diff --git a/view.1.awk b/view.1.awk index 72b0448..e86cb5f 100644 --- a/view.1.awk +++ b/view.1.awk @@ -2,7 +2,7 @@ # Copyright (C) 2014, 2022 Balthasar Szczepański # view.awk automatically generated from view.1.awk # insert content into a viewed page. -# 29.09.2022 +# 09.10.2022 # This file is part of OTT mirror. # @@ -49,6 +49,10 @@ BEGIN{ { print info; } + else if ($0 ~ /^###refresh/) + { + print refresh; + } else if ($0 ~ /^###title/) { print title; diff --git a/www/ott/info.htm b/www/ott/info.htm index 31f6581..76e1bdd 100644 --- a/www/ott/info.htm +++ b/www/ott/info.htm @@ -1,6 +1,7 @@ +###refresh