Finished html sitedocs

This commit is contained in:
Michiel Broek 2004-04-03 18:46:54 +00:00
parent d0c085aa94
commit 2bd0f01dd9
19 changed files with 726 additions and 317 deletions

View File

@ -6,20 +6,23 @@ v0.51.3 22-Mar-2003
Removed one setup entry for check for free diskspace, there Removed one setup entry for check for free diskspace, there
were two different values for the same purpose. The removed were two different values for the same purpose. The removed
one was not used. one was not used.
Moved doc directory from /opt/mbse/doc to /opt/mbse/share/doc.
mbtask: mbtask:
Signal handler for sigchld set to sig_dfl, test for Fedora. Signal handler for sigchld set to sig_dfl, test for Fedora.
Removed setup for old diskspace parameter. Removed setup for old diskspace parameter.
mbsetup: mbsetup:
Added experimental sitedoc creation in html format. Added html sitedocs creation. The advantage of html over the
The advantage of html over the old plain doc is to easy see old plain doc is to easy see crossreferences using hyperlinks.
crossreferences using hyperlinks. The html files are created in /opt/mbse/share/doc/html.
The html files are created in /opt/mbse/doc/html.
The ~/doc/xref.doc and ~/doc/stat.doc are not created anymore, The ~/doc/xref.doc and ~/doc/stat.doc are not created anymore,
there was nothing in it yet. there was nothing in it yet.
Removed setup for the unused free diskspace parameter. Removed setup for the unused free diskspace parameter.
mbfido:
The area tags are now created in /opt/mbse/share/doc/tags.
v0.51.2 06-Mar-2004 - 22-Mar-2003 v0.51.2 06-Mar-2004 - 22-Mar-2003

View File

@ -55,9 +55,13 @@ install:
@if [ -f ${PREFIX}/etc/sysinfo.data ] ; then \ @if [ -f ${PREFIX}/etc/sysinfo.data ] ; then \
chmod 0660 ${PREFIX}/etc/sysinfo.data ; \ chmod 0660 ${PREFIX}/etc/sysinfo.data ; \
fi fi
@if [ ! -d ${PREFIX}/doc ] ; then \ @if [ ! -d ${PREFIX}/share ] ; then \
mkdir ${PREFIX}/doc ; \ mkdir ${PREFIX}/share ; \
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/doc ; \ ${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/share ; \
fi
@if [ ! -d ${PREFIX}/share/doc ] ; then \
mkdir ${PREFIX}/share/doc ; \
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/share/doc ; \
fi fi
@if [ ! -d ${PREFIX}/fdb ] ; then \ @if [ ! -d ${PREFIX}/fdb ] ; then \
mkdir ${PREFIX}/fdb ; \ mkdir ${PREFIX}/fdb ; \

5
TODO
View File

@ -169,8 +169,3 @@ mbsetup:
N: When a message area is deleted, delete the rulesfile too. N: When a message area is deleted, delete the rulesfile too.
X: Generate crossreference document:
Fileechos <=> Groups
Fileechos <=> Magic processing
Fileechos <=> Hatch

View File

@ -40,16 +40,15 @@ void MakeTags(void)
char *gname, *dname, *tname, *aname; char *gname, *dname, *tname, *aname;
Syslog('+', "Start making tagfiles"); Syslog('+', "Start making tagfiles");
gname = calloc(128, sizeof(char)); gname = calloc(PATH_MAX, sizeof(char));
dname = calloc(128, sizeof(char)); dname = calloc(PATH_MAX, sizeof(char));
tname = calloc(128, sizeof(char)); tname = calloc(PATH_MAX, sizeof(char));
aname = calloc(128, sizeof(char)); aname = calloc(PATH_MAX, sizeof(char));
sprintf(gname, "%s/etc/mgroups.data", getenv("MBSE_ROOT")); sprintf(gname, "%s/etc/mgroups.data", getenv("MBSE_ROOT"));
sprintf(dname, "%s/etc/mareas.data", getenv("MBSE_ROOT")); sprintf(dname, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
if (((fg = fopen(gname, "r")) == NULL) || if (((fg = fopen(gname, "r")) == NULL) || ((fd = fopen(dname, "r")) == NULL)) {
((fd = fopen(dname, "r")) == NULL)) {
WriteError("$Can't open data"); WriteError("$Can't open data");
} else { } else {
fread(&mgrouphdr, sizeof(mgrouphdr), 1, fg); fread(&mgrouphdr, sizeof(mgrouphdr), 1, fg);
@ -57,17 +56,17 @@ void MakeTags(void)
while ((fread(&mgroup, mgrouphdr.recsize, 1, fg)) == 1) { while ((fread(&mgroup, mgrouphdr.recsize, 1, fg)) == 1) {
if (mgroup.Active) { if (mgroup.Active) {
sprintf(tname, "%s/doc/%s.msgs.tag", getenv("MBSE_ROOT"), mgroup.Name); sprintf(tname, "%s/share/doc/tags/%s.msgs.tag", getenv("MBSE_ROOT"), mgroup.Name);
mkdirs(tname, 0755);
td = fopen(tname, "w"); td = fopen(tname, "w");
sprintf(aname, "%s/doc/%s.msgs.are", getenv("MBSE_ROOT"), mgroup.Name); sprintf(aname, "%s/share/doc/tags/%s.msgs.are", getenv("MBSE_ROOT"), mgroup.Name);
ad = fopen(aname, "w"); ad = fopen(aname, "w");
fprintf(ad, "; Mail areas in group %s\n", mgroup.Name); fprintf(ad, "; Mail areas in group %s\n", mgroup.Name);
fprintf(ad, ";\n"); fprintf(ad, ";\n");
fseek(fd, msgshdr.hdrsize, SEEK_SET); fseek(fd, msgshdr.hdrsize, SEEK_SET);
while ((fread(&msgs, msgshdr.recsize, 1, fd)) == 1) { while ((fread(&msgs, msgshdr.recsize, 1, fd)) == 1) {
if (msgs.Active && strlen(msgs.Tag) && if (msgs.Active && strlen(msgs.Tag) && strcmp(mgroup.Name, msgs.Group) == 0) {
strcmp(mgroup.Name, msgs.Group) == 0) {
fprintf(ad, "%-35s %s\n", msgs.Tag, msgs.Name); fprintf(ad, "%-35s %s\n", msgs.Tag, msgs.Name);
fprintf(td, "%s\n", msgs.Tag); fprintf(td, "%s\n", msgs.Tag);
} }
@ -85,8 +84,7 @@ void MakeTags(void)
sprintf(gname, "%s/etc/fgroups.data", getenv("MBSE_ROOT")); sprintf(gname, "%s/etc/fgroups.data", getenv("MBSE_ROOT"));
sprintf(dname, "%s/etc/tic.data", getenv("MBSE_ROOT")); sprintf(dname, "%s/etc/tic.data", getenv("MBSE_ROOT"));
if (((fg = fopen(gname, "r")) == NULL) || if (((fg = fopen(gname, "r")) == NULL) || ((fd = fopen(dname, "r")) == NULL)) {
((fd = fopen(dname, "r")) == NULL)) {
WriteError("$Can't open data"); WriteError("$Can't open data");
} else { } else {
fread(&fgrouphdr, sizeof(fgrouphdr), 1, fg); fread(&fgrouphdr, sizeof(fgrouphdr), 1, fg);
@ -94,17 +92,16 @@ void MakeTags(void)
while ((fread(&fgroup, fgrouphdr.recsize, 1, fg)) == 1) { while ((fread(&fgroup, fgrouphdr.recsize, 1, fg)) == 1) {
if (fgroup.Active) { if (fgroup.Active) {
sprintf(tname, "%s/doc/%s.file.tag", getenv("MBSE_ROOT"), fgroup.Name); sprintf(tname, "%s/share/doc/tags/%s.file.tag", getenv("MBSE_ROOT"), fgroup.Name);
td = fopen(tname, "w"); td = fopen(tname, "w");
sprintf(aname, "%s/doc/%s.file.are", getenv("MBSE_ROOT"), fgroup.Name); sprintf(aname, "%s/share/doc/tags/%s.file.are", getenv("MBSE_ROOT"), fgroup.Name);
ad = fopen(aname, "w"); ad = fopen(aname, "w");
fprintf(ad, "; TIC file areas in group %s\n", fgroup.Name); fprintf(ad, "; TIC file areas in group %s\n", fgroup.Name);
fprintf(ad, ";\n"); fprintf(ad, ";\n");
fseek(fd, tichdr.hdrsize, SEEK_SET); fseek(fd, tichdr.hdrsize, SEEK_SET);
while ((fread(&tic, tichdr.recsize, 1, fd)) == 1) { while ((fread(&tic, tichdr.recsize, 1, fd)) == 1) {
if (tic.Active && strlen(tic.Name) && if (tic.Active && strlen(tic.Name) && strcmp(fgroup.Name, tic.Group) == 0) {
strcmp(fgroup.Name, tic.Group) == 0) {
fprintf(ad, "%-21s %s\n", tic.Name, tic.Comment); fprintf(ad, "%-21s %s\n", tic.Name, tic.Comment);
fprintf(td, "%s\n", tic.Name); fprintf(td, "%s\n", tic.Name);
} }

View File

@ -812,8 +812,8 @@ int archive_doc(FILE *fp, FILE *toc, int page)
if ((wp = open_webdoc(temp, (char *)"Archiver", archiver.comment))) { if ((wp = open_webdoc(temp, (char *)"Archiver", archiver.comment))) {
fprintf(wp, "<A HREF=\"index.html\">Main</A>&nbsp;<A HREF=\"archivers.html\">Back</A>\n"); fprintf(wp, "<A HREF=\"index.html\">Main</A>&nbsp;<A HREF=\"archivers.html\">Back</A>\n");
fprintf(wp, "<P>\n"); fprintf(wp, "<P>\n");
fprintf(wp, "<TABLE width='400' border='0' cellspacing='0' cellpadding='2'>\n"); fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
fprintf(wp, "<COL width='50%%'><COL width='50%%'>\n"); fprintf(wp, "<COL width='30%%'><COL width='70%%'>\n");
fprintf(wp, "<TBODY>\n"); fprintf(wp, "<TBODY>\n");
add_webtable(wp, (char *)"Short name", archiver.name); add_webtable(wp, (char *)"Short name", archiver.name);
add_webtable(wp, (char *)"Available", getboolean(archiver.available)); add_webtable(wp, (char *)"Available", getboolean(archiver.available));

View File

@ -594,7 +594,8 @@ int tic_hatch_doc(FILE *fp, FILE *toc, int page)
fprintf(wp, "<COL width='30%%'><COL width='70%%'>\n"); fprintf(wp, "<COL width='30%%'><COL width='70%%'>\n");
fprintf(wp, "<TBODY>\n"); fprintf(wp, "<TBODY>\n");
add_webtable(wp, (char *)"File specification", hatch.Spec); add_webtable(wp, (char *)"File specification", hatch.Spec);
add_webtable(wp, (char *)"TIC File area", hatch.Name); fprintf(wp, "<TR><TH align='left'>TIC File area</TH><TD><A HREF=\"ticarea_%s.html\">%s</A></TD></TR>\n",
hatch.Name, hatch.Name);
add_webtable(wp, (char *)"Replace file", hatch.Replace); add_webtable(wp, (char *)"Replace file", hatch.Replace);
add_webtable(wp, (char *)"Magic filename", hatch.Magic); add_webtable(wp, (char *)"Magic filename", hatch.Magic);
add_webtable(wp, (char *)"File description", hatch.Desc); add_webtable(wp, (char *)"File description", hatch.Desc);

View File

@ -539,6 +539,7 @@ int bbs_limits_doc(FILE *fp, FILE *toc, int page)
{ {
char temp[PATH_MAX]; char temp[PATH_MAX];
FILE *up, *ip, *no; FILE *up, *ip, *no;
int nr;
sprintf(temp, "%s/etc/limits.data", getenv("MBSE_ROOT")); sprintf(temp, "%s/etc/limits.data", getenv("MBSE_ROOT"));
if ((no = fopen(temp, "r")) == NULL) if ((no = fopen(temp, "r")) == NULL)
@ -584,10 +585,12 @@ int bbs_limits_doc(FILE *fp, FILE *toc, int page)
while ((fread(&LIMIT, LIMIThdr.recsize, 1, no)) == 1) { while ((fread(&LIMIT, LIMIThdr.recsize, 1, no)) == 1) {
fseek(up, usrconfighdr.hdrsize, SEEK_SET); fseek(up, usrconfighdr.hdrsize, SEEK_SET);
nr = 0;
while (fread(&usrconfig, usrconfighdr.recsize, 1, up) == 1) { while (fread(&usrconfig, usrconfighdr.recsize, 1, up) == 1) {
nr++;
if (strlen(usrconfig.sUserName) && (usrconfig.Security.level == LIMIT.Security)) { if (strlen(usrconfig.sUserName) && (usrconfig.Security.level == LIMIT.Security)) {
fprintf(ip, "<TR><TD>%ld</TD><TD>%s</TD><TD>%s</TD></TR>\n", fprintf(ip, "<TR><TD>%ld</TD><TD><A HREF=\"user_%d.html\">%s</A></TD><TD>%s</TD></TR>\n",
LIMIT.Security, usrconfig.sUserName, usrconfig.sLocation); LIMIT.Security, nr, usrconfig.sUserName, usrconfig.sLocation);
} }
} }
} }

View File

@ -524,7 +524,8 @@ int tic_magic_doc(FILE *fp, FILE *toc, int page)
add_webtable(wp, (char *)"Filemask", magic.Mask); add_webtable(wp, (char *)"Filemask", magic.Mask);
add_webtable(wp, (char *)"Magic type", getmagictype(magic.Attrib)); add_webtable(wp, (char *)"Magic type", getmagictype(magic.Attrib));
add_webtable(wp, (char *)"Active", getboolean(magic.Active)); add_webtable(wp, (char *)"Active", getboolean(magic.Active));
add_webtable(wp, (char *)"TIC Area", magic.From); fprintf(wp, "<TR><TH align='left'>TIC Area</TH><TD><A HREF=\"ticarea_%s.html\">%s</A></TD></TR>\n",
magic.From, magic.From);
fprintf(fp, " Filemask %s\n", magic.Mask); fprintf(fp, " Filemask %s\n", magic.Mask);
fprintf(fp, " Type %s\n", getmagictype(magic.Attrib)); fprintf(fp, " Type %s\n", getmagictype(magic.Attrib));
fprintf(fp, " Active %s\n", getboolean(magic.Active)); fprintf(fp, " Active %s\n", getboolean(magic.Active));
@ -532,8 +533,9 @@ int tic_magic_doc(FILE *fp, FILE *toc, int page)
switch (magic.Attrib) { switch (magic.Attrib) {
case MG_ADOPT: case MG_ADOPT:
case MG_MOVE: add_webtable(wp, (char *)"To area", magic.ToArea); case MG_MOVE: fprintf(fp, " To area %s\n", magic.ToArea);
fprintf(fp, " To area %s\n", magic.ToArea); fprintf(wp, "<TR><TH align='left'>TIC Area</TH><TD><A HREF=\"ticarea_%s.html\">%s</A></TD></TR>\n",
magic.ToArea, magic.ToArea);
break; break;
case MG_EXEC: add_webtable(wp, (char *)"Command", magic.Cmd); case MG_EXEC: add_webtable(wp, (char *)"Command", magic.Cmd);
add_webtable(wp, (char *)"Compile nodelist", getboolean(magic.Compile)); add_webtable(wp, (char *)"Compile nodelist", getboolean(magic.Compile));

View File

@ -524,7 +524,7 @@ char *PickProtocol(int nr)
int bbs_prot_doc(FILE *fp, FILE *toc, int page) int bbs_prot_doc(FILE *fp, FILE *toc, int page)
{ {
char temp[PATH_MAX]; char temp[PATH_MAX];
FILE *no; FILE *wp, *ip, *no;
int j; int j;
sprintf(temp, "%s/etc/protocol.data", getenv("MBSE_ROOT")); sprintf(temp, "%s/etc/protocol.data", getenv("MBSE_ROOT"));
@ -537,6 +537,10 @@ int bbs_prot_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, "\n\n"); fprintf(fp, "\n\n");
fread(&PROThdr, sizeof(PROThdr), 1, no); fread(&PROThdr, sizeof(PROThdr), 1, no);
ip = open_webdoc((char *)"protocol.html", (char *)"BBS Transfer Protocols", NULL);
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
fprintf(ip, "<UL>\n");
while ((fread(&PROT, PROThdr.recsize, 1, no)) == 1) { while ((fread(&PROT, PROThdr.recsize, 1, no)) == 1) {
if (j == 4) { if (j == 4) {
@ -545,6 +549,30 @@ int bbs_prot_doc(FILE *fp, FILE *toc, int page)
j = 0; j = 0;
} }
sprintf(temp, "protocol_%s.html", PROT.ProtKey);
fprintf(ip, "<LI><A HREF=\"%s\">%s</A></LI>\n", temp, PROT.ProtName);
if ((wp = open_webdoc(temp, (char *)"BBS Transfer Protocol", PROT.ProtName))) {
fprintf(wp, "<A HREF=\"index.html\">Main</A>&nbsp;<A HREF=\"protocol.html\">Back</A>\n");
fprintf(wp, "<P>\n");
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
fprintf(wp, "<COL width='30%%'><COL width='70%%'>\n");
fprintf(wp, "<TBODY>\n");
add_webtable(wp, (char *)"Selection key", PROT.ProtKey);
add_webtable(wp, (char *)"Protocol name", PROT.ProtName);
add_webtable(wp, (char *)"Upload command", PROT.ProtUp);
add_webtable(wp, (char *)"Download command", PROT.ProtDn);
add_webtable(wp, (char *)"Available", getboolean(PROT.Available));
add_webtable(wp, (char *)"Batch protocol", getboolean(PROT.Batch));
add_webtable(wp, (char *)"Bidirectional", getboolean(PROT.Bidir));
add_webtable(wp, (char *)"User advice", PROT.Advice);
sprintf(temp, "%d%%", PROT.Efficiency);
add_webtable(wp, (char *)"Efficiency", temp);
web_secflags(wp, (char *)"Security level", PROT.Level);
fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n");
close_webdoc(wp);
}
fprintf(fp, " Selection key %s\n", PROT.ProtKey); fprintf(fp, " Selection key %s\n", PROT.ProtKey);
fprintf(fp, " Protocol name %s\n", PROT.ProtName); fprintf(fp, " Protocol name %s\n", PROT.ProtName);
fprintf(fp, " Upload command %s\n", PROT.ProtUp); fprintf(fp, " Upload command %s\n", PROT.ProtUp);
@ -560,6 +588,9 @@ int bbs_prot_doc(FILE *fp, FILE *toc, int page)
j++; j++;
} }
fprintf(ip, "</UL>\n");
close_webdoc(ip);
fclose(no); fclose(no);
return page; return page;
} }

View File

@ -512,7 +512,7 @@ void InitRoute(void)
int route_doc(FILE *fp, FILE *toc, int page) int route_doc(FILE *fp, FILE *toc, int page)
{ {
char *temp; char *temp;
FILE *no; FILE *wp, *no;
int j; int j;
temp = calloc(PATH_MAX, sizeof(char)); temp = calloc(PATH_MAX, sizeof(char));
@ -529,6 +529,14 @@ int route_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, "\n\n"); fprintf(fp, "\n\n");
fread(&routehdr, sizeof(routehdr), 1, no); fread(&routehdr, sizeof(routehdr), 1, no);
wp = open_webdoc((char *)"route.html", (char *)"Netmail Routing", NULL);
fprintf(wp, "<A HREF=\"index.html\">Main</A>\n");
fprintf(wp, "<UL>\n");
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
fprintf(wp, "<TBODY>\n");
fprintf(wp, "<TR><TH align='left'>Route mask</TH><TH align='left'>Src username</TH><TH align='left'>Action</TH>");
fprintf(wp, "<TH align='left'>Destination</TH><TH align='left'>Dest username</TH><TH align='left'>Active</TH></TR>\n");
while ((fread(&route, routehdr.recsize, 1, no)) == 1) { while ((fread(&route, routehdr.recsize, 1, no)) == 1) {
if (j == 7) { if (j == 7) {
@ -537,6 +545,9 @@ int route_doc(FILE *fp, FILE *toc, int page)
j = 0; j = 0;
} }
fprintf(wp, "<TR><TD>%s</TD><TD>%s</TD><TD>%s</TD><TD>%s</TD><TD>%s</TD><TD>%s</TD></TR>\n",
route.mask, route.sname, get_routetype(route.routetype),
aka2str(route.dest), route.dname, getboolean(route.Active));
fprintf(fp, " Route mask %s\n", route.mask); fprintf(fp, " Route mask %s\n", route.mask);
fprintf(fp, " Src username %s\n", route.sname); fprintf(fp, " Src username %s\n", route.sname);
fprintf(fp, " Route action %s\n", get_routetype(route.routetype)); fprintf(fp, " Route action %s\n", get_routetype(route.routetype));
@ -547,6 +558,9 @@ int route_doc(FILE *fp, FILE *toc, int page)
j++; j++;
} }
fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n");
close_webdoc(wp);
fclose(no); fclose(no);
free(temp); free(temp);
return page; return page;

View File

@ -415,7 +415,7 @@ void InitService(void)
int service_doc(FILE *fp, FILE *toc, int page) int service_doc(FILE *fp, FILE *toc, int page)
{ {
char temp[PATH_MAX]; char temp[PATH_MAX];
FILE *no; FILE *wp, *no;
int j; int j;
sprintf(temp, "%s/etc/service.data", getenv("MBSE_ROOT")); sprintf(temp, "%s/etc/service.data", getenv("MBSE_ROOT"));
@ -431,6 +431,13 @@ int service_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " --------------- -------- ------\n"); fprintf(fp, " --------------- -------- ------\n");
fread(&servhdr, sizeof(servhdr), 1, no); fread(&servhdr, sizeof(servhdr), 1, no);
wp = open_webdoc((char *)"service.html", (char *)"Mail Service Manager", NULL);
fprintf(wp, "<A HREF=\"index.html\">Main</A>\n");
fprintf(wp, "<UL>\n");
fprintf(wp, "<TABLE width='400' border='0' cellspacing='0' cellpadding='2'>\n");
fprintf(wp, "<TBODY>\n");
fprintf(wp, "<TR><TH align='left'>Service</TH><TH align='left'>Action</TH><TH align='left'>Active</TH></TR>\n");
while ((fread(&servrec, servhdr.recsize, 1, no)) == 1) { while ((fread(&servrec, servhdr.recsize, 1, no)) == 1) {
if (j == 50) { if (j == 50) {
@ -441,6 +448,8 @@ int service_doc(FILE *fp, FILE *toc, int page)
j = 0; j = 0;
} }
fprintf(wp, "<TR><TD>%s</TD><TD>%s</TD><TD>%s</TD></TR>\n",
servrec.Service, getservice(servrec.Action), getboolean(servrec.Active));
fprintf(fp, " %-15s %-8s %s\n", servrec.Service, getservice(servrec.Action), getboolean(servrec.Active)); fprintf(fp, " %-15s %-8s %s\n", servrec.Service, getservice(servrec.Action), getboolean(servrec.Active));
j++; j++;
} }

View File

@ -185,7 +185,7 @@ void task_menu(void)
int task_doc(FILE *fp, FILE *toc, int page) int task_doc(FILE *fp, FILE *toc, int page)
{ {
char temp[PATH_MAX]; char temp[PATH_MAX];
FILE *no; FILE *wp, *no;
sprintf(temp, "%s/etc/task.data", getenv("MBSE_ROOT")); sprintf(temp, "%s/etc/task.data", getenv("MBSE_ROOT"));
if ((no = fopen(temp, "r")) == NULL) if ((no = fopen(temp, "r")) == NULL)
@ -193,6 +193,36 @@ int task_doc(FILE *fp, FILE *toc, int page)
fread(&TCFG, sizeof(TCFG), 1, no); fread(&TCFG, sizeof(TCFG), 1, no);
fclose(no); fclose(no);
wp = open_webdoc((char *)"task.html", (char *)"Task Manager", NULL);
fprintf(wp, "<A HREF=\"index.html\">Main</A>\n");
fprintf(wp, "<P>\n");
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
fprintf(wp, "<COL width='30%%'><COL width='70%%'>\n");
fprintf(wp, "<TBODY>\n");
add_webtable(wp, (char *)"Command on mailout", TCFG.cmd_mailout);
add_webtable(wp, (char *)"Command on mailin", TCFG.cmd_mailin);
add_webtable(wp, (char *)"Command on newnews", TCFG.cmd_newnews);
add_webtable(wp, (char *)"Command on mbindex 1", TCFG.cmd_mbindex1);
add_webtable(wp, (char *)"Command on mbindex 2", TCFG.cmd_mbindex1);
add_webtable(wp, (char *)"Command on mbindex 3", TCFG.cmd_mbindex2);
add_webtable(wp, (char *)"Command on msglink", TCFG.cmd_msglink);
add_webtable(wp, (char *)"Command on reqindex", TCFG.cmd_reqindex);
fprintf(wp, "<TR><TD colspan=2>&nbsp;</TD></TR>\n");
add_webtable(wp, (char *)"Zone Mail Hour start", TCFG.zmh_start);
add_webtable(wp, (char *)"Zone Mail Hour end", TCFG.zmh_end);
fprintf(wp, "<TR><TD colspan=2>&nbsp;</TD></TR>\n");
add_webtable(wp, (char *)"ISP connect command", TCFG.isp_connect);
add_webtable(wp, (char *)"ISP hangup command", TCFG.isp_hangup);
add_webtable(wp, (char *)"ISP ping host 1", TCFG.isp_ping1);
add_webtable(wp, (char *)"ISP ping host 2", TCFG.isp_ping2);
fprintf(wp, "<TR><TD colspan=2>&nbsp;</TD></TR>\n");
sprintf(temp, "%0.2f", TCFG.maxload);
add_webtable(wp, (char *)"Maximum system load", temp);
add_webdigit(wp, (char *)"Max TCP/IP connections", TCFG.max_tcp);
fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n");
close_webdoc(wp);
page = newpage(fp, page); page = newpage(fp, page);
addtoc(fp, toc, 16, 0, page, (char *)"Task manager"); addtoc(fp, toc, 16, 0, page, (char *)"Task manager");

View File

@ -1258,8 +1258,8 @@ int NodeInTic(fidoaddr A)
int tic_areas_doc(FILE *fp, FILE *toc, int page) int tic_areas_doc(FILE *fp, FILE *toc, int page)
{ {
char temp[PATH_MAX], status[4]; char temp[PATH_MAX], status[4];
FILE *no; FILE *ti, *wp, *ip, *no;
int i, systems, First = TRUE; int refs, i, k, nr, systems, First = TRUE;
sysconnect System; sysconnect System;
sprintf(temp, "%s/etc/tic.data", getenv("MBSE_ROOT")); sprintf(temp, "%s/etc/tic.data", getenv("MBSE_ROOT"));
@ -1271,6 +1271,10 @@ int tic_areas_doc(FILE *fp, FILE *toc, int page)
fread(&tichdr, tichdr.hdrsize, 1, no); fread(&tichdr, tichdr.hdrsize, 1, no);
systems = tichdr.syssize / sizeof(sysconnect); systems = tichdr.syssize / sizeof(sysconnect);
ip = open_webdoc((char *)"ticareas.html", (char *)"TIC Areas", NULL);
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
fprintf(ip, "<UL>\n");
while ((fread(&tic, tichdr.recsize, 1, no)) == 1) { while ((fread(&tic, tichdr.recsize, 1, no)) == 1) {
page = newpage(fp, page); page = newpage(fp, page);
@ -1282,6 +1286,57 @@ int tic_areas_doc(FILE *fp, FILE *toc, int page)
} else } else
fprintf(fp, "\n\n"); fprintf(fp, "\n\n");
sprintf(temp, "ticarea_%s.html", tic.Name);
fprintf(ip, " <LI><A HREF=\"%s\">Area %s</A> %s</LI>\n", temp, tic.Name, tic.Comment);
if ((wp = open_webdoc(temp, (char *)"TIC Area", tic.Comment))) {
fprintf(wp, "<A HREF=\"index.html\">Main</A>&nbsp;<A HREF=\"ticareas.html\">Back</A>\n");
fprintf(wp, "<P>\n");
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
fprintf(wp, "<COL width='30%%'><COL width='70%%'>\n");
fprintf(wp, "<TBODY>\n");
add_webtable(wp, (char *)"Area tag", tic.Name);
add_webtable(wp, (char *)"Active", getboolean(tic.Active));
add_webtable(wp, (char *)"Comment", tic.Comment);
sprintf(temp, "%s/etc/fareas.data", getenv("MBSE_ROOT"));
if ((ti = fopen(temp, "r"))) {
fread(&areahdr, sizeof(areahdr), 1, ti);
fseek(ti, areahdr.hdrsize + (areahdr.recsize * (tic.FileArea -1)), SEEK_SET);
if (fread(&area, areahdr.recsize, 1, ti) == 1) {
fprintf(wp, "<TR><TH align='left'>BBS area</TH><TD>%ld <A HREF=\"filearea_%ld.html\">%s</A></TD></TR>\n",
tic.FileArea, tic.FileArea, area.Name);
}
fclose(ti);
}
add_webtable(wp, (char *)"Message", tic.Message);
fprintf(wp, "<TR><TH align='left'>TIC file group</TH><TD><A HREF=\"filegroup_%s.html\">%s</A></TD></TR>\n",
tic.Group, tic.Group);
add_webdigit(wp, (char *)"Keep Number", tic.KeepLatest);
add_webtable(wp, (char *)"Fido Aka", aka2str(tic.Aka));
add_webtable(wp, (char *)"Convert to", tic.Convert);
add_webtable(wp, (char *)"Convert all", getboolean(tic.ConvertAll));
add_webtable(wp, (char *)"Banner file", tic.Banner);
add_webtable(wp, (char *)"Security", getflag(tic.LinkSec.flags, tic.LinkSec.notflags));
add_webtable(wp, (char *)"Allow replace", getboolean(tic.Replace));
add_webtable(wp, (char *)"Dupe check", getboolean(tic.DupCheck));
add_webtable(wp, (char *)"Secure", getboolean(tic.Secure));
add_webtable(wp, (char *)"Touch filedate", getboolean(tic.Touch));
add_webtable(wp, (char *)"Virus scan", getboolean(tic.VirScan));
add_webtable(wp, (char *)"Announce files", getboolean(tic.Announce));
add_webtable(wp, (char *)"Update magic name", getboolean(tic.UpdMagic));
add_webtable(wp, (char *)"Get FILE_ID.DIZ", getboolean(tic.FileId));
add_webtable(wp, (char *)"Mandatory area", getboolean(tic.Mandat));
add_webtable(wp, (char *)"Uplink disconnect", getboolean(tic.UplDiscon));
add_webtable(wp, (char *)"Notified uplink", getboolean(tic.Notified));
fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n");
fprintf(wp, "<HR>\n");
fprintf(wp, "<H3>Area Statistics</H3>\n");
add_statcnt(wp, (char *)"processed files", tic.Files);
add_statcnt(wp, (char *)"processed KBytes", tic.KBytes);
fprintf(wp, "<HR>\n");
fprintf(wp, "<H3>Connected Systems</H3>\n");
}
fprintf(fp, " Area tag %s\n", tic.Name); fprintf(fp, " Area tag %s\n", tic.Name);
fprintf(fp, " Active %s\n", getboolean(tic.Active)); fprintf(fp, " Active %s\n", getboolean(tic.Active));
fprintf(fp, " Comment %s\n", tic.Comment); fprintf(fp, " Comment %s\n", tic.Comment);
@ -1306,9 +1361,16 @@ int tic_areas_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Upl. discon %s\n", getboolean(tic.UplDiscon)); fprintf(fp, " Upl. discon %s\n", getboolean(tic.UplDiscon));
fprintf(fp, " Notified %s\n\n", getboolean(tic.Notified)); fprintf(fp, " Notified %s\n\n", getboolean(tic.Notified));
refs = 0;
for (i = 0; i < systems; i++) { for (i = 0; i < systems; i++) {
fread(&System, sizeof(sysconnect), 1, no); fread(&System, sizeof(sysconnect), 1, no);
if (System.aka.zone) { if (System.aka.zone) {
if ((refs == 0) && (wp != NULL)) {
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
fprintf(wp, "<COL width='20%%'><COL witdh='10%%'><COL width='70%%'>\n");
fprintf(wp, "<TBODY>\n");
}
refs++;
memset(&status, 0, 4); memset(&status, 0, 4);
memset(&status, '-', 3); memset(&status, '-', 3);
if (System.sendto) if (System.sendto)
@ -1318,9 +1380,104 @@ int tic_areas_doc(FILE *fp, FILE *toc, int page)
if (System.pause) if (System.pause)
status[2] = 'P'; status[2] = 'P';
fprintf(fp, " Link %2d %s %s\n", i+1, status, aka2str(System.aka)); fprintf(fp, " Link %2d %s %s\n", i+1, status, aka2str(System.aka));
if (wp != NULL) {
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 + nodeshdr.mailgrp, SEEK_CUR);
for (k = 0; k < 20; k++) {
if ((nodes.Aka[k].zone == System.aka.zone) &&
(nodes.Aka[k].net == System.aka.net ) &&
(nodes.Aka[k].node == System.aka.node) &&
(nodes.Aka[k].point == System.aka.point) &&
(strcmp(nodes.Aka[k].domain, System.aka.domain) == 0)) {
fprintf(wp, "<TR><TD><A HREF=\"node_%d_%d_%d_%d_%s.html\">%s</A></TD><TD>%s</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]), status, nodes.Sysop);
} }
} }
} }
fclose(ti);
}
}
}
}
if (wp != NULL) {
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>Hatch References</H3>\n");
sprintf(temp, "%s/etc/hatch.data", getenv("MBSE_ROOT"));
nr = refs = 0;
if ((ti = fopen(temp, "r"))) {
fread(&hatchhdr, sizeof(hatchhdr), 1, ti);
while ((fread(&hatch, hatchhdr.recsize, 1, ti)) == 1) {
nr++;
if (hatch.Active && (strcmp(tic.Name, hatch.Name) == 0)) {
if (refs == 0) {
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
fprintf(wp, "<COL width='30%%'><COL width='70%%'>\n");
fprintf(wp, "<TBODY>\n");
}
refs++;
sprintf(temp, "hatch_%d.html", nr);
fprintf(wp, "<TR><TD><A HREF=\"%s\">Hatch %d</A></TD><TD>%s</TD></TR>\n",
temp, nr, hatch.Spec);
}
}
fclose(ti);
}
if (refs == 0)
fprintf(wp, "No Hatch References\n");
else {
fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n");
}
fprintf(wp, "<HR>\n");
fprintf(wp, "<H3>Magic References</H3>\n");
sprintf(temp, "%s/etc/magic.data", getenv("MBSE_ROOT"));
nr = refs = 0;
if ((ti = fopen(temp, "r"))) {
fread(&magichdr, sizeof(magichdr), 1, ti);
while ((fread(&magic, magichdr.recsize, 1, ti)) == 1) {
nr++;
if (magic.Active && (strcmp(tic.Name, magic.From) == 0)) {
if (refs == 0) {
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
fprintf(wp, "<COL width='30%%'><COL width='70%%'>\n");
fprintf(wp, "<TBODY>\n");
}
refs++;
sprintf(temp, "magic_%d.html", nr);
fprintf(wp, "<TR><TD><A HREF=\"%s\">Magic %d</A></TD><TD>(%s) %s</TD></TR>\n",
temp, nr, getmagictype(magic.Attrib), magic.Mask);
}
}
fclose(ti);
}
if (refs == 0)
fprintf(wp, "No Magic References\n");
else {
fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n");
}
close_webdoc(wp);
}
}
fprintf(ip, "</UL>\n");
close_webdoc(ip);
fclose(no); fclose(no);
return page; return page;

View File

@ -525,7 +525,7 @@ void InitTtyinfo(void)
int tty_doc(FILE *fp, FILE *toc, int page) int tty_doc(FILE *fp, FILE *toc, int page)
{ {
char temp[PATH_MAX]; char temp[PATH_MAX];
FILE *tty; FILE *wp, *ip, *tty;
int j; int j;
sprintf(temp, "%s/etc/ttyinfo.data", getenv("MBSE_ROOT")); sprintf(temp, "%s/etc/ttyinfo.data", getenv("MBSE_ROOT"));
@ -539,6 +539,10 @@ int tty_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, "\n\n"); fprintf(fp, "\n\n");
fread(&ttyinfohdr, sizeof(ttyinfohdr), 1, tty); fread(&ttyinfohdr, sizeof(ttyinfohdr), 1, tty);
ip = open_webdoc((char *)"ttyinfo.html", (char *)"TTY Lines", NULL);
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
fprintf(ip, "<UL>\n");
while ((fread(&ttyinfo, ttyinfohdr.recsize, 1, tty)) == 1) { while ((fread(&ttyinfo, ttyinfohdr.recsize, 1, tty)) == 1) {
if (j == 3) { if (j == 3) {
page = newpage(fp, page); page = newpage(fp, page);
@ -546,6 +550,39 @@ int tty_doc(FILE *fp, FILE *toc, int page)
j = 0; j = 0;
} }
sprintf(temp, "ttyinfo_%s.html", ttyinfo.tty);
fprintf(ip, "<LI><A HREF=\"%s\">%s</A></LI>\n", temp, ttyinfo.comment);
if ((wp = open_webdoc(temp, (char *)"TTY Line", ttyinfo.comment))) {
/*
* There are devices like pts/1, this will create a subdir for the
* pts lines, we need a different return path.
*/
if (strchr(ttyinfo.tty, '/'))
fprintf(wp, "<A HREF=\"index.html\">Main</A>&nbsp;<A HREF=\"../ttyinfo.html\">Back</A>\n");
else
fprintf(wp, "<A HREF=\"index.html\">Main</A>&nbsp;<A HREF=\"ttyinfo.html\">Back</A>\n");
fprintf(wp, "<P>\n");
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
fprintf(wp, "<COL width='30%%'><COL width='70%%'>\n");
fprintf(wp, "<TBODY>\n");
add_webtable(wp, (char *)"TTY name", ttyinfo.comment);
add_webtable(wp, (char *)"Device name", ttyinfo.tty);
add_webtable(wp, (char *)"Phone or DNS", ttyinfo.phone);
add_webtable(wp, (char *)"Line speed", ttyinfo.speed);
add_webtable(wp, (char *)"Fido flags", ttyinfo.flags);
add_webtable(wp, (char *)"Equipment", getlinetype(ttyinfo.type));
add_webtable(wp, (char *)"Available", getboolean(ttyinfo.available));
add_webtable(wp, (char *)"Auth. log", getboolean(ttyinfo.authlog));
add_webtable(wp, (char *)"Honor ZMH", getboolean(ttyinfo.honor_zmh));
add_webtable(wp, (char *)"Callout", getboolean(ttyinfo.callout));
add_webtable(wp, (char *)"Modem type", ttyinfo.modem);
add_webdigit(wp, (char *)"Locked speed", ttyinfo.portspeed);
add_webtable(wp, (char *)"EMSI name", ttyinfo.name);
fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n");
close_webdoc(wp);
}
fprintf(fp, " TTY name %s\n", ttyinfo.comment); fprintf(fp, " TTY name %s\n", ttyinfo.comment);
fprintf(fp, " Device name %s\n", ttyinfo.tty); fprintf(fp, " Device name %s\n", ttyinfo.tty);
fprintf(fp, " Phone or DNS %s\n", ttyinfo.phone); fprintf(fp, " Phone or DNS %s\n", ttyinfo.phone);
@ -563,6 +600,9 @@ int tty_doc(FILE *fp, FILE *toc, int page)
j++; j++;
} }
fprintf(ip, "</UL>\n");
close_webdoc(ip);
fclose(tty); fclose(tty);
return page; return page;
} }

View File

@ -662,3 +662,98 @@ void InitUsers(void)
} }
void users_doc(void)
{
char temp[PATH_MAX];
FILE *wp, *ip, *fp;
int nr = 0;
sprintf(temp, "%s/etc/users.data", getenv("MBSE_ROOT"));
if ((fp = fopen(temp, "r")) == NULL)
return;
fread(&usrconfighdr, sizeof(usrconfighdr), 1, fp);
ip = open_webdoc((char *)"users.html", (char *)"BBS Users", NULL);
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
fprintf(ip, "<UL>\n");
while (fread(&usrconfig, usrconfighdr.recsize, 1, fp) == 1) {
nr++;
sprintf(temp, "user_%d.html", nr);
fprintf(ip, "<LI><A HREF=\"%s\">%s</A></LI>\n", temp, usrconfig.sUserName);
if ((wp = open_webdoc(temp, (char *)"BBS User", usrconfig.sUserName))) {
fprintf(wp, "<A HREF=\"index.html\">Main</A>&nbsp;<A HREF=\"users.html\">Back</A>\n");
fprintf(wp, "<P>\n");
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
fprintf(wp, "<COL width='30%%'><COL width='70%%'>\n");
fprintf(wp, "<TBODY>\n");
add_webtable(wp, (char *)"Fidonet Name", usrconfig.sUserName);
add_webtable(wp, (char *)"Unix Name", usrconfig.Name);
web_secflags(wp, (char *)"Security level", usrconfig.Security);
add_webtable(wp, (char *)"Expiry date", usrconfig.sExpiryDate);
web_secflags(wp, (char *)"Expiry security level", usrconfig.ExpirySec);
add_webtable(wp, (char *)"First login date", ctime(&usrconfig.tFirstLoginDate));
add_webtable(wp, (char *)"Last login date", ctime(&usrconfig.tLastLoginDate));
add_webtable(wp, (char *)"Last password change", ctime(&usrconfig.tLastPwdChange));
add_webdigit(wp, (char *)"Credit", usrconfig.Credit);
add_webtable(wp, (char *)"Hidden from lists", getboolean(usrconfig.Hidden));
add_webtable(wp, (char *)"Never delete", getboolean(usrconfig.NeverDelete));
add_webtable(wp, (char *)"Comment", usrconfig.sComment);
add_webtable(wp, (char *)"Locked out", getboolean(usrconfig.LockedOut));
add_webtable(wp, (char *)"Guest user", getboolean(usrconfig.Guest));
add_webtable(wp, (char *)"OLR Extended info", getboolean(usrconfig.OL_ExtInfo));
add_webtable(wp, (char *)"Has e-mail", getboolean(usrconfig.Email));
add_webdigit(wp, (char *)"Total calls", usrconfig.iTotalCalls);
add_webdigit(wp, (char *)"total downloads", usrconfig.Downloads);
add_webdigit(wp, (char *)"Downloaded KBytes", usrconfig.DownloadK);
add_webdigit(wp, (char *)"Total uploads", usrconfig.Uploads);
add_webdigit(wp, (char *)"Uploaded KBytes", usrconfig.UploadK);
add_webdigit(wp, (char *)"Posted messages", usrconfig.iPosted);
add_webdigit(wp, (char *)"Minutes left today", usrconfig.iTimeLeft);
fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n");
fprintf(wp, "<H3>User personal settings</H3>\n");
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
fprintf(wp, "<COL width='30%%'><COL width='70%%'>\n");
fprintf(wp, "<TBODY>\n");
add_webtable(wp, (char *)"Handle", usrconfig.sHandle);
add_webtable(wp, (char *)"Location", usrconfig.sLocation);
add_webtable(wp, (char *)"Address", usrconfig.address[0]);
add_webtable(wp, (char *)"Address", usrconfig.address[1]);
add_webtable(wp, (char *)"Address", usrconfig.address[2]);
add_webtable(wp, (char *)"Voice phone", usrconfig.sVoicePhone);
add_webtable(wp, (char *)"Data phone", usrconfig.sDataPhone);
add_webtable(wp, (char *)"Date of birth", usrconfig.sDateOfBirth);
add_webtable(wp, (char *)"Password", usrconfig.Password);
add_webtable(wp, (char *)"Sex", usrconfig.sSex);
add_webtable(wp, (char *)"Protocol", usrconfig.sProtocol);
add_webtable(wp, (char *)"Archiver", usrconfig.Archiver);
add_webtable(wp, (char *)"Character set", getchrs(usrconfig.Charset));
add_webdigit(wp, (char *)"Screen length", usrconfig.iScreenLen);
sprintf(temp, "%c", usrconfig.iLanguage);
add_webtable(wp, (char *)"Language", temp);
add_webtable(wp, (char *)"Use hotkeys", getboolean(usrconfig.HotKeys));
add_webtable(wp, (char *)"ANSI mode", getboolean(usrconfig.GraphMode));
add_webtable(wp, (char *)"Do not disturb", getboolean(usrconfig.DoNotDisturb));
add_webtable(wp, (char *)"Clear Screen", getboolean(usrconfig.Cls));
add_webtable(wp, (char *)"More prompt", getboolean(usrconfig.More));
add_webtable(wp, (char *)"Message editor", getmsgeditor(usrconfig.MsgEditor));
add_webtable(wp, (char *)"Scan new mail", getboolean(usrconfig.MailScan));
add_webtable(wp, (char *)"Display news", getboolean(usrconfig.ieNEWS));
add_webtable(wp, (char *)"Display newfiles", getboolean(usrconfig.ieFILE));
add_webtable(wp, (char *)"Emacs editor keys", getboolean(usrconfig.FSemacs));
fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n");
close_webdoc(wp);
}
}
fprintf(ip, "</UL>\n");
close_webdoc(ip);
fclose(fp);
}

View File

@ -1,12 +1,11 @@
/* m_users.h */
#ifndef _USERS_H #ifndef _USERS_H
#define _USERS_H #define _USERS_H
/* $Id$ */
int CountUsers(void); int CountUsers(void);
void EditUsers(void); void EditUsers(void);
void InitUsers(void); void InitUsers(void);
void users_doc(void);
#endif #endif

View File

@ -414,8 +414,8 @@ void InitVirus(void)
int virus_doc(FILE *fp, FILE *toc, int page) int virus_doc(FILE *fp, FILE *toc, int page)
{ {
char temp[PATH_MAX]; char temp[PATH_MAX];
FILE *vir; FILE *wp, *ip, *vir;
int j; int nr = 0, j;
sprintf(temp, "%s/etc/virscan.data", getenv("MBSE_ROOT")); sprintf(temp, "%s/etc/virscan.data", getenv("MBSE_ROOT"));
if ((vir = fopen(temp, "r")) == NULL) if ((vir = fopen(temp, "r")) == NULL)
@ -427,6 +427,10 @@ int virus_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, "\n\n"); fprintf(fp, "\n\n");
fread(&virscanhdr, sizeof(virscanhdr), 1, vir); fread(&virscanhdr, sizeof(virscanhdr), 1, vir);
ip = open_webdoc((char *)"virscan.html", (char *)"Virus Scanners", NULL);
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
fprintf(ip, "<UL>\n");
while ((fread(&virscan, virscanhdr.recsize, 1, vir)) == 1) { while ((fread(&virscan, virscanhdr.recsize, 1, vir)) == 1) {
if (j == 5) { if (j == 5) {
@ -435,6 +439,25 @@ int virus_doc(FILE *fp, FILE *toc, int page)
j = 0; j = 0;
} }
nr++;
sprintf(temp, "virscan_%d.html", nr);
fprintf(ip, "<LI><A HREF=\"%s\">%s</A></LI>\n", temp, virscan.comment);
if ((wp = open_webdoc(temp, (char *)"Virus Scanner", virscan.comment))) {
fprintf(wp, "<A HREF=\"index.html\">Main</A>&nbsp;<A HREF=\"virscan.html\">Back</A>\n");
fprintf(wp, "<P>\n");
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
fprintf(wp, "<COL width='30%%'><COL width='70%%'>\n");
fprintf(wp, "<TBODY>\n");
add_webtable(wp, (char *)"Scanner name", virscan.comment);
add_webtable(wp, (char *)"Command line", virscan.scanner);
add_webtable(wp, (char *)"Options", virscan.options);
add_webtable(wp, (char *)"Available", getboolean(virscan.available));
add_webdigit(wp, (char *)"Errorlevel OK", virscan.error);
fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n");
close_webdoc(wp);
}
fprintf(fp, " Scanner name %s\n", virscan.comment); fprintf(fp, " Scanner name %s\n", virscan.comment);
fprintf(fp, " Command line %s\n", virscan.scanner); fprintf(fp, " Command line %s\n", virscan.scanner);
fprintf(fp, " Options %s\n", virscan.options); fprintf(fp, " Options %s\n", virscan.options);
@ -444,6 +467,9 @@ int virus_doc(FILE *fp, FILE *toc, int page)
j++; j++;
} }
fprintf(ip, "</UL>\n");
close_webdoc(ip);
fclose(vir); fclose(vir);
return page; return page;
} }

View File

@ -196,7 +196,8 @@ void site_docs(void)
if (config_read() == -1) if (config_read() == -1)
return; return;
sprintf(temp, "%s/doc/site.doc", getenv("MBSE_ROOT")); sprintf(temp, "%s/share/doc/site.doc", getenv("MBSE_ROOT"));
mkdirs(temp, 0755);
if ((fp = fopen(temp, "w")) == NULL) if ((fp = fopen(temp, "w")) == NULL)
return; return;
@ -225,30 +226,30 @@ void site_docs(void)
fprintf(hp, " <LI><A HREF=\"global.html\">Global Configuration</A></LI>\n"); fprintf(hp, " <LI><A HREF=\"global.html\">Global Configuration</A></LI>\n");
fprintf(hp, " <LI><A HREF=\"fidonet.html\">Fido Networks</A></LI>\n"); fprintf(hp, " <LI><A HREF=\"fidonet.html\">Fido Networks</A></LI>\n");
fprintf(hp, " <LI><A HREF=\"archivers.html\">Archivers</A></LI>\n"); fprintf(hp, " <LI><A HREF=\"archivers.html\">Archivers</A></LI>\n");
fprintf(hp, " <LI>Virus Scaners</LI>\n"); fprintf(hp, " <LI><A HREF=\"virscan.html\">Virus Scanners</A></LI>\n");
fprintf(hp, " <LI><A HREF=\"modem.html\">Modem Types</A></LI>\n"); fprintf(hp, " <LI><A HREF=\"modem.html\">Modem Types</A></LI>\n");
fprintf(hp, " <LI>TTY Lines Info</LI>\n"); fprintf(hp, " <LI><A HREF=\"ttyinfo.html\">TTY Lines Info</A></LI>\n");
fprintf(hp, " <LI><A HREF=\"nodes.html\">Fidonet Nodes</A></LI>\n"); fprintf(hp, " <LI><A HREF=\"nodes.html\">Fidonet Nodes</A></LI>\n");
fprintf(hp, " <LI>BBS: <A HREF=\"limits.html\">Security Limits</A></LI>\n"); fprintf(hp, " <LI>BBS: <A HREF=\"limits.html\">Security Limits</A></LI>\n");
fprintf(hp, " <LI>BBS: <A HREF=\"language.html\">Language Setup</A></LI>\n"); fprintf(hp, " <LI>BBS: <A HREF=\"language.html\">Language Setup</A></LI>\n");
fprintf(hp, " <LI>BBS: <A HREF=\"menus.html\">BBS Menus</A></LI>\n"); fprintf(hp, " <LI>BBS: <A HREF=\"menus.html\">BBS Menus</A></LI>\n");
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=\"protocol.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: <A HREF=\"msggroup.html\">Echomail Groups</A></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: <A HREF=\"ticareas.html\">Fileecho Areas</A></LI>\n");
fprintf(hp, " <LI>TIC: <A HREF=\"hatch.html\">Hatch Manager</A></LI>\n"); fprintf(hp, " <LI>TIC: <A HREF=\"hatch.html\">Hatch Manager</A></LI>\n");
fprintf(hp, " <LI>TIC: <A HREF=\"magic.html\">Magic Files</A></LI>\n"); fprintf(hp, " <LI>TIC: <A HREF=\"magic.html\">Magic Files</A></LI>\n");
fprintf(hp, " <LI><A HREF=\"newgroup.html\">Newfiles Groups</A></LI>\n"); fprintf(hp, " <LI><A HREF=\"newgroup.html\">Newfiles Groups</A></LI>\n");
fprintf(hp, " <LI><A HREF=\"newfiles.html\">Newfiles Reports</A></LI>\n"); fprintf(hp, " <LI><A HREF=\"newfiles.html\">Newfiles Reports</A></LI>\n");
fprintf(hp, " <LI><A HREF=\"filefind.html\">Filefind Setup</A></LI>\n"); fprintf(hp, " <LI><A HREF=\"filefind.html\">Filefind Setup</A></LI>\n");
fprintf(hp, " <LI>BBS Users</LI>\n"); fprintf(hp, " <LI><A HREF=\"users.html\">BBS Users</A></LI>\n");
fprintf(hp, " <LI>Mail Services</LI>\n"); fprintf(hp, " <LI><A HREF=\"service.html\">Mail Service Manager</A></LI>\n");
fprintf(hp, " <LI><A HREF=\"domain.html\">Domain translation</A></LI>\n"); fprintf(hp, " <LI><A HREF=\"domain.html\">Domain translation</A></LI>\n");
fprintf(hp, " <LI>Task Manager</LI>\n"); fprintf(hp, " <LI><A HREF=\"task.html\">Task Manager</A></LI>\n");
fprintf(hp, " <LI>Network Routing</LI>\n"); fprintf(hp, " <LI><A HREF=\"route.html\">Network Routing</A></LI>\n");
fprintf(hp, "</UL>\n"); fprintf(hp, "</UL>\n");
close_webdoc(hp); close_webdoc(hp);
} else { } else {
@ -292,6 +293,8 @@ void site_docs(void)
dotter(); dotter();
page = route_doc(fp, toc, page); page = route_doc(fp, toc, page);
dotter(); dotter();
users_doc();
dotter();
ol_doc(); ol_doc();
clrtoeol(); clrtoeol();
mvprintw( 8,11, (char *)"Created site documents in %s/doc", getenv("MBSE_ROOT")); mvprintw( 8,11, (char *)"Created site documents in %s/doc", getenv("MBSE_ROOT"));

View File

@ -152,7 +152,7 @@ FILE *open_webdoc(char *filename, char *title, char *title2)
time_t now; time_t now;
temp = calloc(PATH_MAX, sizeof(char)); temp = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "%s/doc/html/%s", getenv("MBSE_ROOT"), filename); sprintf(temp, "%s/share/doc/html/%s", getenv("MBSE_ROOT"), filename);
mkdirs(temp, 0755); mkdirs(temp, 0755);
if ((fp = fopen(temp, "w+")) == NULL) { if ((fp = fopen(temp, "w+")) == NULL) {