Updates for html sitedocs

This commit is contained in:
Michiel Broek 2004-03-28 15:51:29 +00:00
parent 73a5964be8
commit 681c4bb052
14 changed files with 584 additions and 242 deletions

2
TODO
View File

@ -119,6 +119,8 @@ mbfido:
older entry to update the info with the later received file. Else
just handle the record as a dupe (In test again).
N: Hatch statistics are not updated.
mbcico:
L: Implement binkp option ND.

View File

@ -84,7 +84,7 @@ ledit.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/msg.h screen.h mutil
m_farea.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h m_global.h m_fgroup.h m_archive.h m_farea.h m_fgroup.h m_ngroup.h
m_fido.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h stlist.h m_global.h m_fido.h
m_limits.o: ../config.h ../lib/mbselib.h ../lib/users.h screen.h mutil.h ledit.h stlist.h m_global.h m_limits.h
m_menu.o: ../config.h ../lib/mbselib.h mutil.h screen.h ledit.h m_lang.h m_menu.h
m_menu.o: ../config.h ../lib/mbselib.h mutil.h screen.h ledit.h m_lang.h m_global.h m_menu.h
m_ngroup.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h stlist.h m_global.h m_ngroup.h
m_service.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h stlist.h m_global.h m_service.h
m_tty.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h stlist.h m_modem.h m_global.h m_tty.h

View File

@ -92,21 +92,6 @@ void bbs_menu(void)
int bbs_doc(FILE *fp, FILE *toc, int page)
{
FILE *wp;
if ((wp = open_webdoc((char *)"bbs.html", (char *)"BBS Setup", NULL))) {
fprintf(wp, "<A HREF=\"index.html\">Main</A>\n");
fprintf(wp, "<UL>\n");
fprintf(wp, " <LI><A HREF=\"limits.html\">Security Limits</A></LI>\n");
fprintf(wp, " <LI><A HREF=\"language.html\">Language Setup</A></LI>\n");
fprintf(wp, " <LI><A HREF=\"menus.html\">BBS Menus</A></LI>\n");
fprintf(wp, " <LI><A HREF=\"fileareas.html\">File Areas</A></LI>\n");
fprintf(wp, " <LI><A HREF=\"protocols.html\">Transfer Protocols</A></LI>\n");
fprintf(wp, " <LI><A HREF=\"oneliners.html\">Oneliners</A></LI>\n");
fprintf(wp, "</UL>\n");
fclose(wp);
}
page = newpage(fp, page);
addtoc(fp, toc, 8, 0, page, (char *)"BBS setup");

View File

@ -835,7 +835,8 @@ int bbs_file_doc(FILE *fp, FILE *toc, int page)
fprintf(wp, "<COL width='20%%'><COL width='80%%'>\n");
fprintf(wp, "<TBODY>\n");
}
add_webtable(wp, tic.Name, tic.Comment);
fprintf(wp, "<TR><TD><A HREF=\"ticarea_%s.html\">%s</A></TD><TD>%s</TD></TR>\n",
tic.Name, tic.Name, tic.Comment);
tics++;
}
fseek(ti, tichdr.syssize, SEEK_CUR);

View File

@ -772,8 +772,7 @@ int tic_group_doc(FILE *fp, FILE *toc, int page)
fprintf(wp, "<COL width='20%%'><COL width='80%%'>\n");
fprintf(wp, "<TBODY>\n");
}
sprintf(temp, "Area %d", i);
add_webtable(wp, temp, area.Name);
fprintf(wp, "<TR><TD><A HREF=\"filearea_%d.html\">Area %d</A></TD><TD>%s</TD></TR>\n", i, i, area.Name);
refs++;
}
}
@ -800,7 +799,8 @@ int tic_group_doc(FILE *fp, FILE *toc, int page)
fprintf(wp, "<COL width='20%%'><COL width='80%%'>\n");
fprintf(wp, "<TBODY>\n");
}
add_webtable(wp, tic.Name, tic.Comment);
fprintf(wp, "<TR><TD><A HREF=\"ticarea_%s.html\">%s</A></TD><TD>%s</TD></TR>\n",
tic.Name, tic.Name, tic.Comment);
refs++;
}
fseek(ti, tichdr.syssize, SEEK_CUR);
@ -830,7 +830,9 @@ int tic_group_doc(FILE *fp, FILE *toc, int page)
fprintf(wp, "<COL width='20%%'><COL width='80%%'>\n");
fprintf(wp, "<TBODY>\n");
}
add_webtable(wp, aka2str(nodes.Aka[0]), nodes.Sysop);
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++;
}
}
@ -844,6 +846,11 @@ int tic_group_doc(FILE *fp, FILE *toc, int page)
fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n");
}
fprintf(wp, "<HR>\n");
fprintf(wp, "<H3>Group Statistics</H3>\n");
add_statcnt(wp, (char *)"processed files", fgroup.Files);
add_statcnt(wp, (char *)"KBytes of files", fgroup.KBytes);
close_webdoc(wp);
}
fprintf(fp, " Group name %s\n", fgroup.Name);

View File

@ -558,8 +558,8 @@ void InitHatch(void)
int tic_hatch_doc(FILE *fp, FILE *toc, int page)
{
char temp[PATH_MAX], *tmp = NULL;
FILE *no;
int i, j, All;
FILE *wp, *ip, *no;
int i, j, nr = 0, All;
sprintf(temp, "%s/etc/hatch.data", getenv("MBSE_ROOT"));
if ((no = fopen(temp, "r")) == NULL)
@ -572,14 +572,36 @@ int tic_hatch_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, "\n\n");
fread(&hatchhdr, sizeof(hatchhdr), 1, no);
ip = open_webdoc((char *)"hatch.html", (char *)"File Areas", NULL);
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
fprintf(ip, "<UL>\n");
while ((fread(&hatch, hatchhdr.recsize, 1, no)) == 1) {
nr++;
if (j == 5) {
page = newpage(fp, page);
fprintf(fp, "\n");
j = 0;
}
sprintf(temp, "hatch_%d.html", nr);
fprintf(ip, " <LI><A HREF=\"%s\">Hatch %3d</A> %s</LI>\n", temp, nr, hatch.Spec);
if ((wp = open_webdoc(temp, (char *)"Hatch Manager", hatch.Spec))) {
fprintf(wp, "<A HREF=\"index.html\">Main</A>&nbsp;<A HREF=\"hatch.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 *)"File specification", hatch.Spec);
add_webtable(wp, (char *)"TIC File area", hatch.Name);
add_webtable(wp, (char *)"Replace file", hatch.Replace);
add_webtable(wp, (char *)"Magic filename", hatch.Magic);
add_webtable(wp, (char *)"File description", hatch.Desc);
add_webtable(wp, (char *)"Dupe check", getboolean(hatch.DupeCheck));
add_webtable(wp, (char *)"Active", getboolean(hatch.Active));
}
fprintf(fp, " File spec %s\n", hatch.Spec);
fprintf(fp, " File echo %s\n", hatch.Name);
fprintf(fp, " Replace file %s\n", hatch.Replace);
@ -599,6 +621,8 @@ int tic_hatch_doc(FILE *fp, FILE *toc, int page)
}
if (tmp == NULL)
tmp = xstrcpy((char *)"None");
if (wp != NULL)
add_webtable(wp, (char *)"Hatch on days", tmp);
fprintf(fp, " Hatch on days %s\n", tmp);
if (tmp != NULL) {
free(tmp);
@ -609,7 +633,7 @@ int tic_hatch_doc(FILE *fp, FILE *toc, int page)
if (!hatch.Month[i])
All = FALSE;
if (!All) {
for (i = 0; i < 32; i++)
for (i = 0; i < 32; i++) {
if (hatch.Month[i]) {
if (tmp == NULL) {
tmp = xstrcpy(Month[i]);
@ -618,10 +642,21 @@ int tic_hatch_doc(FILE *fp, FILE *toc, int page)
tmp = xstrcat(tmp, Month[i]);
}
}
} else
}
} else {
tmp = xstrcpy((char *)"All dates");
}
if (tmp == NULL)
tmp = xstrcpy((char *)"None");
if (wp != NULL) {
add_webtable(wp, (char *)"Hatch on dates", tmp);
fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n");
fprintf(wp, "<HR>\n");
fprintf(wp, "<H3>Hatch Statistics</H3>\n");
add_statcnt(wp, (char *)"hatched files", hatch.Hatched);
close_webdoc(wp);
}
fprintf(fp, " Hatch on dates %s\n", tmp);
if (tmp != NULL) {
free(tmp);
@ -631,6 +666,9 @@ int tic_hatch_doc(FILE *fp, FILE *toc, int page)
j++;
}
fprintf(ip, "</UL>\n");
close_webdoc(ip);
fclose(no);
return page;
}

View File

@ -526,8 +526,10 @@ int PickLanguage(char *nr)
int bbs_lang_doc(FILE *fp, FILE *toc, int page)
{
char temp[PATH_MAX];
FILE *no;
FILE *wp, *ip, *no;
int j;
DIR *dp;
struct dirent *de;
sprintf(temp, "%s/etc/language.data", getenv("MBSE_ROOT"));
if ((no = fopen(temp, "r")) == NULL)
@ -539,6 +541,10 @@ int bbs_lang_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, "\n\n");
fread(&langhdr, sizeof(langhdr), 1, no);
ip = open_webdoc((char *)"language.html", (char *)"BBS Language Setup", NULL);
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
fprintf(ip, "<UL>\n");
while ((fread(&lang, langhdr.recsize, 1, no)) == 1) {
if (j == 5) {
@ -547,6 +553,57 @@ int bbs_lang_doc(FILE *fp, FILE *toc, int page)
j = 0;
}
sprintf(temp, "language_%s.html", lang.LangKey);
fprintf(ip, " <LI><A HREF=\"%s\">%s</A> %s</LI>\n", temp, lang.LangKey, lang.Name);
if ((wp = open_webdoc(temp, (char *)"Language", lang.Name))) {
fprintf(wp, "<A HREF=\"index.html\">Main</A>&nbsp;<A HREF=\"language.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 *)"Language key", lang.LangKey);
add_webtable(wp, (char *)"Language name", lang.Name);
add_webtable(wp, (char *)"Available", getboolean(lang.Available));
add_webtable(wp, (char *)"Menu path", lang.MenuPath);
add_webtable(wp, (char *)"Textfiles path", lang.TextPath);
add_webtable(wp, (char *)"Macrofiles path", lang.MacroPath);
add_webtable(wp, (char *)"Language file", lang.Filename);
web_secflags(wp, (char *)"Security level", lang.Security);
fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n");
fprintf(wp, "<HR>\n");
fprintf(wp, "<H3>Menu files</H3>\n");
if ((dp = opendir(lang.MenuPath))) {
while ((de = readdir(dp))) {
if (de->d_name[0] != '.') {
fprintf(wp, "%s<BR>\n", de->d_name);
}
}
closedir(dp);
}
fprintf(wp, "<HR>\n");
fprintf(wp, "<H3>Text files</H3>\n");
if ((dp = opendir(lang.TextPath))) {
while ((de = readdir(dp))) {
if (de->d_name[0] != '.') {
fprintf(wp, "%s<BR>\n", de->d_name);
}
}
closedir(dp);
}
fprintf(wp, "<HR>\n");
fprintf(wp, "<H3>Macro template files</H3>\n");
if ((dp = opendir(lang.MacroPath))) {
while ((de = readdir(dp))) {
if (de->d_name[0] != '.') {
fprintf(wp, "%s<BR>\n", de->d_name);
}
}
closedir(dp);
}
close_webdoc(wp);
}
fprintf(fp, " Language key %s\n", lang.LangKey);
fprintf(fp, " Language name %s\n", lang.Name);
fprintf(fp, " Available %s\n", getboolean(lang.Available));
@ -559,6 +616,9 @@ int bbs_lang_doc(FILE *fp, FILE *toc, int page)
j++;
}
fprintf(ip, "</UL>\n");
close_webdoc(ip);
fclose(no);
return page;
}

View File

@ -538,7 +538,7 @@ char *get_limit_name(int level)
int bbs_limits_doc(FILE *fp, FILE *toc, int page)
{
char temp[PATH_MAX];
FILE *no;
FILE *up, *ip, *no;
sprintf(temp, "%s/etc/limits.data", getenv("MBSE_ROOT"));
if ((no = fopen(temp, "r")) == NULL)
@ -546,6 +546,14 @@ int bbs_limits_doc(FILE *fp, FILE *toc, int page)
addtoc(fp, toc, 8, 1, page, (char *)"BBS user limits");
ip = open_webdoc((char *)"limits.html", (char *)"BBS User Security Limits", NULL);
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
fprintf(ip, "<P>\n");
fprintf(ip, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
fprintf(ip, "<TBODY>\n");
fprintf(ip, "<TR><TH align='left'>Access Level</TH><TH align='left'>Max. time</TH>");
fprintf(ip, "<TH align='left'>Down Kb.</TH><TH align='left'>Down files</TH>");
fprintf(ip, "<TH align='left'>Active</TH><TH align='left'>Description</TH><TR>\n");
fread(&LIMIThdr, sizeof(LIMIThdr), 1, no);
fprintf(fp, "\n");
@ -554,10 +562,41 @@ int bbs_limits_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " ------ ------ ------ ------ ------ ------------------------------\n");
while ((fread(&LIMIT, LIMIThdr.recsize, 1, no)) == 1) {
fprintf(fp, " %6ld %6ld %6ld %6d %s %s\n", LIMIT.Security, LIMIT.Time, LIMIT.DownK,
LIMIT.DownF, getboolean(LIMIT.Available), LIMIT.Description);
fprintf(fp, " %6ld %6ld %6ld %6d %s %s\n",
LIMIT.Security, LIMIT.Time, LIMIT.DownK, LIMIT.DownF, getboolean(LIMIT.Available), LIMIT.Description);
fprintf(ip, "<TR><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%d</TD><TD>%s</TD><TD>%s</TD></TR>\n",
LIMIT.Security, LIMIT.Time, LIMIT.DownK, LIMIT.DownF, getboolean(LIMIT.Available), LIMIT.Description);
}
fprintf(ip, "</TBODY>\n");
fprintf(ip, "</TABLE>\n");
fprintf(ip, "<HR>\n");
fprintf(ip, "<H3>Users in security levels</H3>\n");
fprintf(ip, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
fprintf(ip, "<COL width='20%%'><COL width='40%%'><COL width='40%%'>\n");
fprintf(ip, "<TBODY>\n");
fprintf(ip, "<TR><TH align='left'>Access Level</TH><TH align='left'>User</TH><TH align='left'>Location</TH></TR>\n");
fseek(no, LIMIThdr.hdrsize, SEEK_SET);
sprintf(temp, "%s/etc/users.data", getenv("MBSE_ROOT"));
if ((up = fopen(temp, "r"))) {
fread(&usrconfighdr, sizeof(usrconfighdr), 1, up);
while ((fread(&LIMIT, LIMIThdr.recsize, 1, no)) == 1) {
fseek(up, usrconfighdr.hdrsize, SEEK_SET);
while (fread(&usrconfig, usrconfighdr.recsize, 1, up) == 1) {
if (strlen(usrconfig.sUserName) && (usrconfig.Security.level == LIMIT.Security)) {
fprintf(ip, "<TR><TD>%ld</TD><TD>%s</TD><TD>%s</TD></TR>\n",
LIMIT.Security, usrconfig.sUserName, usrconfig.sLocation);
}
}
}
fclose(up);
}
fprintf(ip, "</TBODY>\n");
fprintf(ip, "</TABLE>\n");
close_webdoc(ip);
fclose(no);
return page;
}

View File

@ -488,8 +488,8 @@ void InitMagics(void)
int tic_magic_doc(FILE *fp, FILE *toc, int page)
{
char temp[PATH_MAX];
FILE *no;
int j;
FILE *wp, *ip, *no;
int nr = 0i, j;
sprintf(temp, "%s/etc/magic.data", getenv("MBSE_ROOT"));
if ((no = fopen(temp, "r")) == NULL)
@ -499,8 +499,12 @@ int tic_magic_doc(FILE *fp, FILE *toc, int page)
addtoc(fp, toc, 10, 4, page, (char *)"File Magic processing");
j = 0;
fprintf(fp, "\n\n");
fread(&magichdr, sizeof(magichdr), 1, no);
ip = open_webdoc((char *)"magic.html", (char *)"File Magic Processing", NULL);
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
fprintf(ip, "<UL>\n");
while (fread(&magic, magichdr.recsize, 1, no) == 1) {
if (j == 6) {
page = newpage(fp, page);
@ -508,6 +512,19 @@ int tic_magic_doc(FILE *fp, FILE *toc, int page)
j = 0;
}
nr++;
sprintf(temp, "magic_%d.html", nr);
fprintf(ip, " <LI><A HREF=\"%s\">Magic %3d</A> %s</LI>\n", temp, nr, magic.Mask);
if ((wp = open_webdoc(temp, (char *)"File Magic", magic.Mask))) {
fprintf(wp, "<A HREF=\"index.html\">Main</A>&nbsp;<A HREF=\"magic.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 *)"Filemask", magic.Mask);
add_webtable(wp, (char *)"Magic type", getmagictype(magic.Attrib));
add_webtable(wp, (char *)"Active", getboolean(magic.Active));
add_webtable(wp, (char *)"TIC Area", magic.From);
fprintf(fp, " Filemask %s\n", magic.Mask);
fprintf(fp, " Type %s\n", getmagictype(magic.Attrib));
fprintf(fp, " Active %s\n", getboolean(magic.Active));
@ -515,29 +532,36 @@ int tic_magic_doc(FILE *fp, FILE *toc, int page)
switch (magic.Attrib) {
case MG_ADOPT:
case MG_MOVE:
case MG_MOVE: add_webtable(wp, (char *)"To area", magic.ToArea);
fprintf(fp, " To area %s\n", magic.ToArea);
break;
case MG_EXEC:
case MG_EXEC: add_webtable(wp, (char *)"Command", magic.Cmd);
add_webtable(wp, (char *)"Compile nodelist", getboolean(magic.Compile));
fprintf(fp, " Command %s\n", magic.Cmd);
fprintf(fp, " Compile NL %s\n", getboolean(magic.Compile));
break;
case MG_UNPACK:
case MG_COPY:
case MG_COPY: add_webtable(wp, (char *)"Compile nodelist", getboolean(magic.Compile));
add_webtable(wp, (char *)"Destination path", magic.Path);
fprintf(fp, " Compile NL %s\n", getboolean(magic.Compile));
fprintf(fp, " Path %s\n", magic.Path);
break;
case MG_KEEPNUM:fprintf(fp, " Keep # file %d\n", magic.KeepNum);
case MG_KEEPNUM: add_webdigit(wp, (char *)"Keep # files", magic.KeepNum);
fprintf(fp, " Keep # file %d\n", magic.KeepNum);
break;
}
fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n");
close_webdoc(wp);
}
fprintf(fp, "\n\n");
j++;
}
fprintf(ip, "</UL>\n");
close_webdoc(ip);
fclose(no);
return page;
}

View File

@ -1762,8 +1762,8 @@ void gold_areas(FILE *fp)
int mail_area_doc(FILE *fp, FILE *toc, int page)
{
char temp[PATH_MAX], status[5];
FILE *no;
int i = 0, j, systems, First = TRUE, LMiy;
FILE *ti, *wp, *ip, *no;
int i = 0, j, k, systems, refs, First = TRUE, LMiy;
sysconnect System;
struct tm *t;
time_t Now;
@ -1787,6 +1787,10 @@ int mail_area_doc(FILE *fp, FILE *toc, int page)
fread(&msgshdr, msgshdr.hdrsize, 1, no);
systems = msgshdr.syssize / sizeof(sysconnect);
ip = open_webdoc((char *)"msgareas.html", (char *)"Message Areas", NULL);
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
fprintf(ip, "<UL>\n");
while (fread(&msgs, msgshdr.recsize, 1, no) == 1) {
i++;
@ -1800,6 +1804,52 @@ int mail_area_doc(FILE *fp, FILE *toc, int page)
} else
fprintf(fp, "\n\n");
sprintf(temp, "msgarea_%d.html", i);
fprintf(ip, " <LI><A HREF=\"%s\">Area %d</A> %s</LI>\n", temp, i, msgs.Name);
if ((wp = open_webdoc(temp, (char *)"File area", msgs.Name))) {
fprintf(wp, "<A HREF=\"index.html\">Main</A>&nbsp;<A HREF=\"msgareas.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_webdigit(wp, (char *)"Area number", i);
add_webtable(wp, (char *)"Area name", msgs.Name);
add_webtable(wp, (char *)"Area tag", msgs.Tag);
add_webtable(wp, (char *)"Newsgroup name", msgs.Newsgroup);
add_webtable(wp, (char *)"Distribution", msgs.Distribution);
add_webtable(wp, (char *)"JAM message base", msgs.Base);
add_webtable(wp, (char *)"Offline name", msgs.QWKname);
add_webtable(wp, (char *)"Area type", getmsgtype(msgs.Type));
add_webtable(wp, (char *)"Messages type", getmsgkinds(msgs.MsgKinds));
add_webtable(wp, (char *)"Character set", getchrs(msgs.Charset));
add_webdigit(wp, (char *)"Days old msgs", msgs.DaysOld);
add_webdigit(wp, (char *)"Maximum msgs", msgs.MaxMsgs);
add_webdigit(wp, (char *)"Max articles", msgs.MaxArticles);
add_webtable(wp, (char *)"Users delete", getboolean(msgs.UsrDelete));
web_secflags(wp, (char *)"Read security", msgs.RDSec);
web_secflags(wp, (char *)"Write security", msgs.WRSec);
web_secflags(wp, (char *)"Sysop security", msgs.SYSec);
add_webtable(wp, (char *)"Link security", getflag(msgs.LinkSec.flags, msgs.LinkSec.notflags));
add_webdigit(wp, (char *)"Minimum age", msgs.Age);
add_webtable(wp, (char *)"Password", msgs.Password);
add_webtable(wp, (char *)"Group", msgs.Group);
add_webtable(wp, (char *)"Fido address", aka2str(msgs.Aka));
add_webdigit(wp, (char *)"Netmail board", msgs.NetReply);
add_webtable(wp, (char *)"Origin line", msgs.Origin);
add_webtable(wp, (char *)"Allow aliases", getboolean(msgs.Aliases));
add_webtable(wp, (char *)"OLR mandatory", getboolean(msgs.OLR_Forced));
add_webtable(wp, (char *)"OLR default on", getboolean(msgs.OLR_Default));
add_webtable(wp, (char *)"Append quotes", getboolean(msgs.Quotes));
add_webtable(wp, (char *)"Nodes mandatory", getboolean(msgs.Mandatory));
add_webtable(wp, (char *)"UnSecure toss", getboolean(msgs.UnSecure));
add_webtable(wp, (char *)"Last msg rcvd", ctime(&msgs.LastRcvd));
add_webtable(wp, (char *)"Last msg posted", ctime(&msgs.LastPosted));
fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n");
fprintf(wp, "<HR>\n");
fprintf(wp, "<H3>Nodes Reference</H3>\n");
}
fprintf(fp, " Area number %d\n", i);
fprintf(fp, " Area name %s\n", msgs.Name);
fprintf(fp, " Area tag %s\n", msgs.Tag);
@ -1833,9 +1883,16 @@ int mail_area_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Last msg rcvd. %s", ctime(&msgs.LastRcvd));
fprintf(fp, " Last msg posted %s", ctime(&msgs.LastPosted));
refs = 0;
for (j = 0; j < systems; j++) {
fread(&System, sizeof(sysconnect), 1, no);
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, 5);
memset(&status, '-', 4);
if (System.sendto)
@ -1848,8 +1905,44 @@ int mail_area_doc(FILE *fp, FILE *toc, int page)
status[3] = 'C';
fprintf(fp, " Link %2d %s %s\n", j+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>Area Statistics</H3>\n");
add_statcnt(wp, (char *)"received msgs", msgs.Received);
add_statcnt(wp, (char *)"posted msgs", msgs.Posted);
close_webdoc(wp);
}
fprintf(fp, "\n");
fprintf(fp, " Total This Month Last Month\n");
fprintf(fp, " ---------- ---------- ----------\n");
@ -1860,6 +1953,9 @@ int mail_area_doc(FILE *fp, FILE *toc, int page)
fseek(no, msgshdr.syssize, SEEK_CUR);
}
fprintf(ip, "</UL>\n");
close_webdoc(ip);
fclose(no);
return page;
}

View File

@ -34,6 +34,7 @@
#include "screen.h"
#include "ledit.h"
#include "m_lang.h"
#include "m_global.h"
#include "m_menu.h"
@ -580,7 +581,7 @@ void EditMenus(void)
int bbs_menu_doc(FILE *fp, FILE *toc, int page)
{
char *temp;
FILE *no, *mn;
FILE *wp, *ip, *no, *mn;
DIR *dp;
struct dirent *de;
int j;
@ -598,19 +599,45 @@ int bbs_menu_doc(FILE *fp, FILE *toc, int page)
fread(&langhdr, sizeof(langhdr), 1, no);
j =0;
ip = open_webdoc((char *)"menus.html", (char *)"BBS Menus", NULL);
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
while ((fread(&lang, langhdr.recsize, 1, no)) == 1) {
fprintf(ip, "<H3>BBS Menus for %s</H3>\n", lang.Name);
fprintf(ip, "<UL>\n");
if ((dp = opendir(lang.MenuPath)) != NULL) {
while ((de = readdir(dp))) {
if (de->d_name[0] != '.') {
j = 0;
fprintf(ip, "<LI><A HREF=\"menu_%s_%s.html\">%s</A></LI>\n", lang.LangKey, de->d_name, de->d_name);
sprintf(temp, "%s/%s", lang.MenuPath, de->d_name);
fprintf(fp, "\n MENU %s (%s)\n\n", de->d_name, lang.Name);
if ((mn = fopen(temp, "r")) != NULL) {
sprintf(temp, "menu_%s_%s.html", lang.LangKey, de->d_name);
if ((wp = open_webdoc(temp, lang.Name, de->d_name))) {
fprintf(wp, "<A HREF=\"index.html\">Main</A>&nbsp;<A HREF=\"menus.html\">Back</A>\n");
while (fread(&menus, sizeof(menus), 1, mn) == 1) {
if (menus.MenuKey[0])
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");
if (menus.MenuKey[0]) {
fprintf(fp, " Menu select %s\n", menus.MenuKey);
if (menus.AutoExec)
add_webtable(wp, (char *)"Menu select", menus.MenuKey);
}
if (menus.AutoExec) {
fprintf(fp, " Menu select Autoexec\n");
add_webtable(wp, (char *)"Menu select", (char *)"Autoexec");
}
sprintf(temp, "%d %s", le_int(menus.MenuType), menus.TypeDesc);
add_webtable(wp, (char *)"Menu type", temp);
add_webtable(wp, (char *)"Optional data", menus.OptionalData);
add_webtable(wp, (char *)"Display", menus.Display);
web_secflags(wp, (char *)"Security level", menus.MenuSecurity);
add_webdigit(wp, (char *)"Minimum age", menus.Age);
add_colors(wp, (char *)"Normal colors", le_int(menus.ForeGnd), le_int(menus.BackGnd));
add_colors(wp, (char *)"Bright colors", le_int(menus.HiForeGnd), le_int(menus.HiBackGnd));
fprintf(fp, " Type %d %s\n", le_int(menus.MenuType), menus.TypeDesc);
fprintf(fp, " Opt. data %s\n", menus.OptionalData);
fprintf(fp, " Display %s\n", menus.Display);
@ -621,6 +648,14 @@ int bbs_menu_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Hi-colors %s on %s\n",
get_color(le_int(menus.HiForeGnd)), get_color(le_int(menus.HiBackGnd)));
if (le_int(menus.MenuType) == 7) {
add_webtable(wp, (char *)"Door Name", menus.DoorName);
add_webtable(wp, (char *)"No door.sys file", getboolean(menus.NoDoorsys));
add_webtable(wp, (char *)"Y2K format in door.sys", getboolean(menus.Y2Kdoorsys));
add_webtable(wp, (char *)"Use COM port", getboolean(menus.Comport));
add_webtable(wp, (char *)"Run nosuid", getboolean(menus.NoSuid));
add_webtable(wp, (char *)"No Prompt after door", getboolean(menus.NoPrompt));
add_webtable(wp, (char *)"Single user door", getboolean(menus.SingleUser));
add_webtable(wp, (char *)"Hidden door", getboolean(menus.HideDoor));
fprintf(fp, " Door Name %s\n", menus.DoorName);
fprintf(fp, " No door.sys %s", getboolean(menus.NoDoorsys));
fprintf(fp, " Y2K door.sys %s", getboolean(menus.Y2Kdoorsys));
@ -637,6 +672,10 @@ int bbs_menu_doc(FILE *fp, FILE *toc, int page)
page = newpage(fp, page);
fprintf(fp, "\n");
}
fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n");
}
close_webdoc(wp);
}
fclose(mn);
}
@ -646,8 +685,12 @@ int bbs_menu_doc(FILE *fp, FILE *toc, int page)
}
closedir(dp);
}
fprintf(ip, "</UL>\n");
fprintf(ip, "<HR>\n");
}
close_webdoc(ip);
free(temp);
fclose(no);
return page;

View File

@ -184,6 +184,16 @@ void soft_info(void)
}
int horiz;
void dotter(void);
void dotter(void)
{
mvprintw(8, horiz++, (char *)".");
fflush(stdout);
}
void site_docs(void);
void site_docs(void)
@ -228,27 +238,18 @@ void site_docs(void)
fprintf(hp, " <LI>Modem Types</LI>\n");
fprintf(hp, " <LI>TTY Lines Info</LI>\n");
fprintf(hp, " <LI>Fidonet Nodes</LI>\n");
fprintf(hp, " <LI><A HREF=\"bbs.html\">BBS Setup</A></LI>\n");
fprintf(hp, " <UL>\n");
fprintf(hp, " <LI><A HREF=\"limits.html\">Security Limits</A></LI>\n");
fprintf(hp, " <LI><A HREF=\"language.html\">Language Setup</A></LI>\n");
fprintf(hp, " <LI><A HREF=\"menus.html\">BBS Menus</A></LI>\n");
fprintf(hp, " <LI><A HREF=\"fileareas.html\">File Areas</A></LI>\n");
fprintf(hp, " <LI><A HREF=\"protocols.html\">Transfer Protocols</A></LI>\n");
fprintf(hp, " <LI><A HREF=\"oneliners.html\">Oneliners</A></LI>\n");
fprintf(hp, " </UL>\n");
fprintf(hp, " <LI>Mail Setup</LI>\n");
fprintf(hp, " <UL>\n");
fprintf(hp, " <LI>Echomail Groups</LI>\n");
fprintf(hp, " <LI>Echomail Areas</LI>\n");
fprintf(hp, " </UL>\n");
fprintf(hp, " <LI>File Echo's Setup</LI>\n");
fprintf(hp, " <UL>\n");
fprintf(hp, " <LI><A HREF=\"filegroup.html\">FileEcho Groups</A></LI>\n");
fprintf(hp, " <LI>Fileecho Areas</LI>\n");
fprintf(hp, " <LI>Hatch Manager</LI>\n");
fprintf(hp, " <LI>Magic Files</LI>\n");
fprintf(hp, " </UL>\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=\"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=\"protocols.html\">Transfer Protocols</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=\"msgareas.html\">Echomail Areas</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=\"hatch.html\">Hatch Manager</A></LI>\n");
fprintf(hp, " <LI>TIC: <A HREF=\"magic.html\">Magic Files</A></LI>\n");
fprintf(hp, " <LI>Newfiles Groups</LI>\n");
fprintf(hp, " <LI>Newfiles Reports</LI>\n");
fprintf(hp, " <LI><A HREF=\"filefind.html\">Filefind Setup</A></LI>\n");
@ -263,24 +264,45 @@ void site_docs(void)
Syslog('+', "Can't create html documentation");
}
mvprintw( 8,11, (char *)"Create document in file %s/doc/site.doc", getenv("MBSE_ROOT"));
mvprintw(8,11, (char *)"Creating site documents");
fflush(stdout);
horiz = 35;
page = global_doc(fp, toc, page);
dotter();
page = fido_doc(fp, toc, page);
dotter();
page = archive_doc(fp, toc, page);
dotter();
page = virus_doc(fp, toc, page);
dotter();
page = modem_doc(fp, toc, page);
dotter();
page = tty_doc(fp, toc, page);
dotter();
page = node_doc(fp, toc, page);
dotter();
page = bbs_doc(fp, toc, page);
dotter();
page = mail_doc(fp, toc, page);
dotter();
page = tic_doc(fp, toc, page);
dotter();
page = newf_group_doc(fp, toc, page);
dotter();
page = new_doc(fp, toc, page);
dotter();
page = ff_doc(fp, toc, page);
dotter();
page = service_doc(fp, toc, page);
dotter();
page = domain_doc(fp, toc, page);
dotter();
page = task_doc(fp, toc, page);
dotter();
page = route_doc(fp, toc, page);
clrtoeol();
mvprintw( 8,11, (char *)"Created site documents in %s/doc", getenv("MBSE_ROOT"));
fflush(stdout);
/*
* Append table of contents

View File

@ -237,3 +237,27 @@ void add_colors(FILE *fp, char *hstr, int fg, int bg)
}
void add_statcnt(FILE *fp, char * hstr, statcnt st)
{
fprintf(fp, "<TABLE width='500' border='1' cellspacing='0' cellpadding='2'>\n");
fprintf(fp, "<TBODY>\n");
fprintf(fp, "<TR><TH colspan='9'>Weekdays overview of %s</TH></TR>\n", hstr);
fprintf(fp, "<TR><TH>&nbsp;</TH><TH align='left'>Sun</TH><TH align='left'>Mon</TH><TH align='left'>Tue</TH><TH align='left'>Wed</TH><TH align='left'>Thu</TH><TH align='left'>Fri</TH><TH align='left'>Sat</TH><TH align='left'>Total</TH></TR>\n");
fprintf(fp, "<TR><TH align='left'>This week</TH><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD></TR>\n", st.tdow[0], st.tdow[1], st.tdow[2], st.tdow[3], st.tdow[4], st.tdow[5], st.tdow[6], st.tweek);
fprintf(fp, "<TR><TH align='left'>Last week</TH><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD></TR>\n", st.ldow[0], st.ldow[1], st.ldow[2], st.ldow[3], st.ldow[4], st.ldow[5], st.ldow[6], st.lweek);
fprintf(fp, "</TBODY>\n");
fprintf(fp, "</TABLE>\n");
fprintf(fp, "<P>\n");
fprintf(fp, "<TABLE width='500' border='1' cellspacing='0' cellpadding='2'>\n");
fprintf(fp, "<TBODY>\n");
fprintf(fp, "<TR><TH colspan='12'>Monthly overview of %s</TH><TH align='left' rowspan='2'>Total ever</TH></TR>\n", hstr);
fprintf(fp, "<TR><TH align='left'>Jan</TH><TH align='left'>Feb</TH><TH align='left'>Mar</TH><TH align='left'>Apr</TH><TH align='left'>May</TH><TH align='left'>Jun</TH><TH align='left'>Jul</TH><TH align='left'>Aug</TH><TH align='left'>Sep</TH><TH align='left'>Oct</TH><TH align='left'>Nov</TH><TH align='left'>Dec</TH></TR>\n");
fprintf(fp, "<TR><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD><TD>%ld</TD></TR>\n",
st.month[0], st.month[1], st.month[2], st.month[3], st.month[4], st.month[5], st.month[6], st.month[7], st.month[8], st.month[0], st.month[10], st.month[11], st.total);
fprintf(fp, "</TBODY>\n");
fprintf(fp, "</TABLE>\n");
fprintf(fp, "<P>\n");
}

View File

@ -13,5 +13,6 @@ void close_webdoc(FILE *);
void add_webtable(FILE *, char *, char *);
void add_webdigit(FILE *, char *, int);
void add_colors(FILE *, char *, int, int);
void add_statcnt(FILE *, char *, statcnt);
#endif