// post.cpp (1190.bicyclesonthemoon.info/aftertime/post)\r
// The post edit interface\r
-// 15.04.2019\r
// \r
-// Copyright (C) 2015, 2019 Balthasar Szczepański\r
+// Copyright (C) 2015, 2019, 2023 Balthasar Szczepański\r
// \r
// This program is free software: you can redistribute it and/or modify\r
// it under the terms of the GNU Affero General Public License as\r
{\r
story=arg;\r
if(!strcmp(story,"time")); //really shouldn't be hardcoded!\r
- else if(!strcmp(story,"prickly"));
+ else if(!strcmp(story,"prickly"));\r
else if(!strcmp(story,"potm"));\r
else if(!strcmp(story,"lucky"));\r
else if(!strcmp(story,"beany"));\r
else if(!strcmp(story,"bsta"));\r
else if(!strcmp(story,"advent"));\r
else if(!strcmp(story,"phys"));\r
+ else if(!strcmp(story,"10y"));\r
else\r
{\r
missing=true;\r
#// upload.awk\r
#// The post upload interface\r
-#// 25.05.2021\r
#// \r
-#// Copyright (C) 2015, 2019, 2021 Balthasar Szczepański\r
+#// Copyright (C) 2015, 2019, 2021, 2023 Balthasar Szczepański\r
#// \r
#// This program is free software: you can redistribute it and/or modify\r
#// it under the terms of the GNU Affero General Public License as\r
print "Story name missing."\r
return\r
}\r
- if(story !~ /^(time|prickly|potm|lucky|beany|bean2|t1i|zodiac|bftf|t-1|bsta|advent|phys)$/) #this really shouldn't be hardcoded!\r
+ if(story !~ /^(time|prickly|potm|lucky|beany|bean2|t1i|zodiac|bftf|t-1|bsta|advent|phys|10y)$/) #this really shouldn't be hardcoded!\r
{\r
print "Unknown story."\r
return\r
#// viewer.awk
#// The viewer
-#// 25.05.2021
#//
-#// Copyright (C) 2015-2021 Balthasar Szczepański
+#// Copyright (C) 2015-2021, 2023 Balthasar Szczepański
#//
#// This program is free software: you can redistribute it and/or modify
#// it under the terms of the GNU Affero General Public License as
print "<tr width=\""width"\"><td colspan=\"4\" width=\"100%\">"argtab["HTML"]"</td></tr>"
}
- for(i=-1; i<=n; ++i)
+ for(i=-1; i<=n+1; ++i)
{
+ # print "<!-- ######## "i"######## -->"
if(i<0)
noticepost=noticepath argtab["story"]"-i"
else
- noticepost=noticepath argtab["story"]"-"sprintf("%04u%s",f,s)"-"sprintf("%02u",i+1)
- # print "<!-- ######## "noticepost"######## -->"
+ noticepost=noticepath argtab["story"]"-"sprintf("%04u%s",f,s)"-"sprintf("%02u",i)
split("", noticetab, ":")
for(j=0;(getline line < noticepost)>0;++j)
{
close(noticepost)
if(j==0)
{
- if(i<0)
+ if(i<=0)
continue;
else
break;
if(i>=0)
{
nposttime=noticetab["y"]noticetab["m"]noticetab["d"]noticetab["h"]
- if (thistime<nposttime)
+ if ((thistime<nposttime) && (i>0))
break;
}
- if(i<n)
+ if(i<=n)
{
if(i>=0)
print "<tr width=\""width"\"><td colspan=\"4\" width=\"100%\"><i>"noticetab["subject_h"]"</i> "(noticetab["ID"]!=""?" (<a href=\"/ott/view?p="noticetab["ID"]"#p"noticetab["ID"]"\">OTT time travel</a>)":"")"</td></tr>"
}
else
{
- print "<tr width=\""width"\" align=\"center\"><td colspan=\"4\" width=\"100%\"><a href=\"/aftertime/viewer?story="argtab["story"](max_enhance>0?"&e="e:"")"&f="f s"&n="i+1"\">"noticetab["subject_h"]"</a></td></tr>"
+ print "<tr width=\""width"\" align=\"center\"><td colspan=\"4\" width=\"100%\"><a href=\"/aftertime/viewer?story="argtab["story"](max_enhance>0?"&e="e:"")"&f="f s"&n="i"\">"noticetab["subject_h"]"</a></td></tr>"
}
}