Updates for html sitedocs
This commit is contained in:
parent
919ab787d2
commit
421bd6cf93
1
TODO
1
TODO
@ -180,5 +180,4 @@ mbsetup:
|
|||||||
Fileechos <=> Hatch
|
Fileechos <=> Hatch
|
||||||
Newfiles <=> BBS Areas
|
Newfiles <=> BBS Areas
|
||||||
Newfiles <=> Newfiles groups
|
Newfiles <=> Newfiles groups
|
||||||
Echomail groups <=> Nodes
|
|
||||||
|
|
||||||
|
@ -639,9 +639,9 @@ char *PickMGroup(char *shdr)
|
|||||||
|
|
||||||
int mail_group_doc(FILE *fp, FILE *toc, int page)
|
int mail_group_doc(FILE *fp, FILE *toc, int page)
|
||||||
{
|
{
|
||||||
char temp[PATH_MAX];
|
char temp[PATH_MAX], group[13];
|
||||||
FILE *no;
|
FILE *ti, *wp, *ip, *no;
|
||||||
int j;
|
int refs, i, j;
|
||||||
|
|
||||||
sprintf(temp, "%s/etc/mgroups.data", getenv("MBSE_ROOT"));
|
sprintf(temp, "%s/etc/mgroups.data", getenv("MBSE_ROOT"));
|
||||||
if ((no = fopen(temp, "r")) == NULL)
|
if ((no = fopen(temp, "r")) == NULL)
|
||||||
@ -655,6 +655,10 @@ int mail_group_doc(FILE *fp, FILE *toc, int page)
|
|||||||
fseek(no, 0, SEEK_SET);
|
fseek(no, 0, SEEK_SET);
|
||||||
fread(&mgrouphdr, mgrouphdr.hdrsize, 1, no);
|
fread(&mgrouphdr, mgrouphdr.hdrsize, 1, no);
|
||||||
|
|
||||||
|
ip = open_webdoc((char *)"msggroup.html", (char *)"Message Groups", NULL);
|
||||||
|
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
|
||||||
|
fprintf(ip, "<UL>\n");
|
||||||
|
|
||||||
while ((fread(&mgroup, mgrouphdr.recsize, 1, no)) == 1) {
|
while ((fread(&mgroup, mgrouphdr.recsize, 1, no)) == 1) {
|
||||||
if (j == 2) {
|
if (j == 2) {
|
||||||
page = newpage(fp, page);
|
page = newpage(fp, page);
|
||||||
@ -662,6 +666,108 @@ int mail_group_doc(FILE *fp, FILE *toc, int page)
|
|||||||
j = 0;
|
j = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sprintf(temp, "msggroup_%s.html", mgroup.Name);
|
||||||
|
fprintf(ip, " <LI><A HREF=\"%s\">%s</A> %s</LI>\n", temp, mgroup.Name, mgroup.Comment);
|
||||||
|
|
||||||
|
if ((wp = open_webdoc(temp, (char *)"Message group", mgroup.Comment))) {
|
||||||
|
fprintf(wp, "<A HREF=\"index.html\">Main</A> <A HREF=\"msggroup.html\">Back</A>\n");
|
||||||
|
fprintf(wp, "<P>\n");
|
||||||
|
fprintf(wp, "<TABLE width='400' border='0' cellspacing='0' cellpadding='2'>\n");
|
||||||
|
fprintf(wp, "<COL width='50%%'><COL width='50%%'>\n");
|
||||||
|
fprintf(wp, "<TBODY>\n");
|
||||||
|
add_webtable(wp, (char *)"Group name", mgroup.Name);
|
||||||
|
add_webtable(wp, (char *)"Comment", mgroup.Comment);
|
||||||
|
add_webtable(wp, (char *)"Active", getboolean(mgroup.Active));
|
||||||
|
add_webtable(wp, (char *)"Use Aka", aka2str(mgroup.UseAka));
|
||||||
|
add_webtable(wp, (char *)"Uplink", aka2str(mgroup.UpLink));
|
||||||
|
add_webtable(wp, (char *)"Areas file", mgroup.AreaFile);
|
||||||
|
add_webtable(wp, (char *)"Base path", mgroup.BasePath);
|
||||||
|
add_webdigit(wp, (char *)"Netmail reply area", mgroup.NetReply);
|
||||||
|
add_webdigit(wp, (char *)"Start new areas at", mgroup.StartArea);
|
||||||
|
web_secflags(wp, (char *)"Read security", mgroup.RDSec);
|
||||||
|
web_secflags(wp, (char *)"Write security", mgroup.WRSec);
|
||||||
|
web_secflags(wp, (char *)"Sysop security", mgroup.SYSec);
|
||||||
|
add_webtable(wp, (char *)"Def. link security", getflag(mgroup.LinkSec.flags, mgroup.LinkSec.notflags));
|
||||||
|
add_webtable(wp, (char *)"Use aliases", getboolean(mgroup.Aliases));
|
||||||
|
add_webtable(wp, (char *)"Add quotes", getboolean(mgroup.Quotes));
|
||||||
|
add_webtable(wp, (char *)"Auto add/del areas", getboolean(mgroup.AutoChange));
|
||||||
|
add_webtable(wp, (char *)"User add/del areas", getboolean(mgroup.UserChange));
|
||||||
|
add_webtable(wp, (char *)"Default charset", getchrs(mgroup.Charset));
|
||||||
|
add_webtable(wp, (char *)"Start area date", ctime(&mgroup.StartDate));
|
||||||
|
add_webtable(wp, (char *)"Last active date", ctime(&mgroup.LastDate));
|
||||||
|
fprintf(wp, "</TBODY>\n");
|
||||||
|
fprintf(wp, "</TABLE>\n");
|
||||||
|
fprintf(wp, "<HR>\n");
|
||||||
|
fprintf(wp, "<H3>Message Areas Reference</H3>\n");
|
||||||
|
refs = 0;
|
||||||
|
sprintf(temp, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
||||||
|
if ((ti = fopen(temp, "r"))) {
|
||||||
|
fread(&tichdr, sizeof(tichdr), 1, ti);
|
||||||
|
fseek(ti, 0, SEEK_SET);
|
||||||
|
fread(&msgshdr, msgshdr.hdrsize, 1, ti);
|
||||||
|
i = 0;
|
||||||
|
while ((fread(&msgs, msgshdr.recsize, 1, ti)) == 1) {
|
||||||
|
i++;
|
||||||
|
if (msgs.Active && (strcmp(mgroup.Name, msgs.Group) == 0)) {
|
||||||
|
if (refs == 0) {
|
||||||
|
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
|
||||||
|
fprintf(wp, "<COL width='20%%'><COL width='80%%'>\n");
|
||||||
|
fprintf(wp, "<TBODY>\n");
|
||||||
|
}
|
||||||
|
fprintf(wp, "<TR><TD><A HREF=\"msgarea_%d.html\">Area %d</A></TD><TD>%s</TD></TR>\n",
|
||||||
|
i, i, msgs.Name);
|
||||||
|
refs++;
|
||||||
|
}
|
||||||
|
fseek(ti, msgshdr.syssize, SEEK_CUR);
|
||||||
|
}
|
||||||
|
fclose(ti);
|
||||||
|
}
|
||||||
|
if (refs == 0)
|
||||||
|
fprintf(wp, "No Message Areas References\n");
|
||||||
|
else {
|
||||||
|
fprintf(wp, "</TBODY>\n");
|
||||||
|
fprintf(wp, "</TABLE>\n");
|
||||||
|
}
|
||||||
|
fprintf(wp, "<HR>\n");
|
||||||
|
fprintf(wp, "<H3>Nodes Reference</H3>\n");
|
||||||
|
refs = 0;
|
||||||
|
sprintf(temp, "%s/etc/nodes.data", getenv("MBSE_ROOT"));
|
||||||
|
if ((ti = fopen(temp, "r"))) {
|
||||||
|
fread(&nodeshdr, sizeof(nodeshdr), 1, ti);
|
||||||
|
fseek(ti, 0, SEEK_SET);
|
||||||
|
fread(&nodeshdr, nodeshdr.hdrsize, 1, ti);
|
||||||
|
while ((fread(&nodes, nodeshdr.recsize, 1, ti)) == 1) {
|
||||||
|
fseek(ti, nodeshdr.filegrp, SEEK_CUR);
|
||||||
|
for (i = 0; i < nodeshdr.mailgrp / sizeof(group); i++) {
|
||||||
|
fread(&group, sizeof(group), 1, ti);
|
||||||
|
if (strcmp(group, mgroup.Name) == 0) {
|
||||||
|
if (refs == 0) {
|
||||||
|
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
|
||||||
|
fprintf(wp, "<COL width='20%%'><COL width='80%%'>\n");
|
||||||
|
fprintf(wp, "<TBODY>\n");
|
||||||
|
}
|
||||||
|
fprintf(wp, "<TR><TD><A HREF=\"node_%d_%d_%d_%d_%s.html\">%s</A></TD><TD>%s</TD></TR>\n",
|
||||||
|
nodes.Aka[0].zone, nodes.Aka[0].net, nodes.Aka[0].node, nodes.Aka[0].point,
|
||||||
|
nodes.Aka[0].domain, aka2str(nodes.Aka[0]), nodes.Sysop);
|
||||||
|
refs++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fclose(ti);
|
||||||
|
}
|
||||||
|
if (refs == 0)
|
||||||
|
fprintf(wp, "No Nodes References\n");
|
||||||
|
else {
|
||||||
|
fprintf(wp, "</TBODY>\n");
|
||||||
|
fprintf(wp, "</TABLE>\n");
|
||||||
|
}
|
||||||
|
fprintf(wp, "<HR>\n");
|
||||||
|
fprintf(wp, "<H3>Group Statistics</H3>\n");
|
||||||
|
add_statcnt(wp, (char *)"reveived messages", mgroup.MsgsRcvd);
|
||||||
|
add_statcnt(wp, (char *)"sent messages", mgroup.MsgsSent);
|
||||||
|
close_webdoc(wp);
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(fp, " Group name %s\n", mgroup.Name);
|
fprintf(fp, " Group name %s\n", mgroup.Name);
|
||||||
fprintf(fp, " Comment %s\n", mgroup.Comment);
|
fprintf(fp, " Comment %s\n", mgroup.Comment);
|
||||||
fprintf(fp, " Active %s\n", getboolean(mgroup.Active));
|
fprintf(fp, " Active %s\n", getboolean(mgroup.Active));
|
||||||
@ -686,6 +792,9 @@ int mail_group_doc(FILE *fp, FILE *toc, int page)
|
|||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fprintf(ip, "</UL>\n");
|
||||||
|
close_webdoc(ip);
|
||||||
|
|
||||||
fclose(no);
|
fclose(no);
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
@ -244,7 +244,7 @@ void site_docs(void)
|
|||||||
fprintf(hp, " <LI>BBS: <A HREF=\"fileareas.html\">File Areas</A></LI>\n");
|
fprintf(hp, " <LI>BBS: <A HREF=\"fileareas.html\">File Areas</A></LI>\n");
|
||||||
fprintf(hp, " <LI>BBS: <A HREF=\"protocols.html\">Transfer Protocols</A></LI>\n");
|
fprintf(hp, " <LI>BBS: <A HREF=\"protocols.html\">Transfer Protocols</A></LI>\n");
|
||||||
fprintf(hp, " <LI>BBS: <A HREF=\"oneliners.html\">Oneliners</A></LI>\n");
|
fprintf(hp, " <LI>BBS: <A HREF=\"oneliners.html\">Oneliners</A></LI>\n");
|
||||||
fprintf(hp, " <LI>Mail: Echomail Groups</LI>\n");
|
fprintf(hp, " <LI>Mail: <A HREF=\"msggroup.html\">Echomail Groups</A></LI>\n");
|
||||||
fprintf(hp, " <LI>Mail: <A HREF=\"msgareas.html\">Echomail Areas</A></LI>\n");
|
fprintf(hp, " <LI>Mail: <A HREF=\"msgareas.html\">Echomail Areas</A></LI>\n");
|
||||||
fprintf(hp, " <LI>TIC: <A HREF=\"filegroup.html\">FileEcho Groups</A></LI>\n");
|
fprintf(hp, " <LI>TIC: <A HREF=\"filegroup.html\">FileEcho Groups</A></LI>\n");
|
||||||
fprintf(hp, " <LI>TIC: Fileecho Areas</LI>\n");
|
fprintf(hp, " <LI>TIC: Fileecho Areas</LI>\n");
|
||||||
|
Reference in New Issue
Block a user