Prettier index pages
This commit is contained in:
parent
5e581ad412
commit
b5c1bab007
@ -793,8 +793,11 @@ int archive_doc(FILE *fp, FILE *toc, int page)
|
||||
i = j = 0;
|
||||
|
||||
ip = open_webdoc((char *)"archivers.html", (char *)"Archivers", NULL);
|
||||
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
|
||||
fprintf(ip, "<UL>\n");
|
||||
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n<P>\n");
|
||||
fprintf(ip, "<TABLE width='400' border='0' cellspacing='0' cellpadding='2'>\n");
|
||||
fprintf(ip, "<COL width='10%%'><COL width='70%%'><COL width='20%%'>\n");
|
||||
fprintf(ip, "<TBODY>\n");
|
||||
fprintf(ip, "<TR><TH align='left'>Name</TH><TH align='left'>Comment</TH><TH align='left'>Available</TH></TR>\n");
|
||||
|
||||
fprintf(fp, "\n\n");
|
||||
fread(&archiverhdr, sizeof(archiverhdr), 1, arch);
|
||||
@ -809,6 +812,7 @@ int archive_doc(FILE *fp, FILE *toc, int page)
|
||||
i++;
|
||||
|
||||
sprintf(temp, "archiver_%d.html", i);
|
||||
|
||||
if ((wp = open_webdoc(temp, (char *)"Archiver", archiver.comment))) {
|
||||
fprintf(wp, "<A HREF=\"index.html\">Main</A> <A HREF=\"archivers.html\">Back</A>\n");
|
||||
fprintf(wp, "<P>\n");
|
||||
@ -829,7 +833,8 @@ int archive_doc(FILE *fp, FILE *toc, int page)
|
||||
fprintf(wp, "</TABLE>\n");
|
||||
close_webdoc(wp);
|
||||
}
|
||||
fprintf(ip, "<LI><A HREF=\"%s\">%s</A></LI>\n", temp, archiver.comment);
|
||||
fprintf(ip, "<TR><TD><A HREF=\"%s\">%s</A></TD><TD>%s</TD><TD>%s</TD></TR>\n",
|
||||
temp, archiver.name, archiver.comment, getboolean(archiver.available));
|
||||
|
||||
fprintf(fp, " Comment %s\n", archiver.comment);
|
||||
fprintf(fp, " Short name %s\n", archiver.name);
|
||||
@ -847,7 +852,8 @@ int archive_doc(FILE *fp, FILE *toc, int page)
|
||||
}
|
||||
|
||||
fclose(arch);
|
||||
fprintf(ip, "</UL>\n");
|
||||
fprintf(ip, "</TBODY>\n");
|
||||
fprintf(ip, "</TABLE>\n");
|
||||
close_webdoc(ip);
|
||||
return page;
|
||||
}
|
||||
|
@ -545,8 +545,11 @@ int fido_doc(FILE *fp, FILE *toc, int page)
|
||||
fread(&fidonethdr, sizeof(fidonethdr), 1, fido);
|
||||
|
||||
ip = open_webdoc((char *)"fidonet.html", (char *)"Fidonet networks", NULL);
|
||||
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
|
||||
fprintf(ip, "<UL>\n");
|
||||
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n<P>\n");
|
||||
fprintf(ip, "<TABLE width='400' border='0' cellspacing='0' cellpadding='2'>\n");
|
||||
fprintf(ip, "<COL width='10%%'><COL width='70%%'><COL width='20%%'>\n");
|
||||
fprintf(ip, "<TBODY>\n");
|
||||
fprintf(ip, "<TR><TH align='left'>Zone</TH><TH align='left'>Comment</TH><TH align='left'>Available</TH></TR>\n");
|
||||
|
||||
while ((fread(&fidonet, fidonethdr.recsize, 1, fido)) == 1) {
|
||||
|
||||
@ -557,7 +560,8 @@ int fido_doc(FILE *fp, FILE *toc, int page)
|
||||
}
|
||||
|
||||
sprintf(temp, "fidonet_%d.html", fidonet.zone[0]);
|
||||
fprintf(ip, " <LI><A HREF=\"%s\">Zone %d</A> %s</LI>\n", temp, fidonet.zone[0], fidonet.comment);
|
||||
fprintf(ip, " <TR><TD><A HREF=\"%s\">%d</A></TD><TD>%s</TD><TD>%s</TD></TR>\n",
|
||||
temp, fidonet.zone[0], fidonet.comment, getboolean(fidonet.available));
|
||||
|
||||
if ((wp = open_webdoc(temp, (char *)"Fidonet network", fidonet.comment))) {
|
||||
fprintf(wp, "<A HREF=\"index.html\">Main</A> <A HREF=\"fidonet.html\">Back</A>\n");
|
||||
@ -603,7 +607,8 @@ int fido_doc(FILE *fp, FILE *toc, int page)
|
||||
j++;
|
||||
}
|
||||
|
||||
fprintf(ip, "</UL>\n");
|
||||
fprintf(ip, "</TBODY>\n");
|
||||
fprintf(ip, "</TABLE>\n");
|
||||
close_webdoc(ip);
|
||||
|
||||
fclose(fido);
|
||||
|
@ -700,7 +700,11 @@ int modem_doc(FILE *fp, FILE *toc, int page)
|
||||
|
||||
ip = open_webdoc((char *)"modem.html", (char *)"Modems", NULL);
|
||||
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
|
||||
fprintf(ip, "<UL>\n");
|
||||
fprintf(ip, "<P>\n");
|
||||
fprintf(ip, "<TABLE width='400' border='0' cellspacing='0' cellpadding='2'>\n");
|
||||
fprintf(ip, "<COL width='10%%'><COL width='70%%'><COL width='20%%'>\n");
|
||||
fprintf(ip, "<TBODY>\n");
|
||||
fprintf(ip, "<TR><TH align='left'>Nr</TH><TH align='left'>Comment</TH><TH align='left'>Available</TH></TR>\n");
|
||||
|
||||
while ((fread(&modem, modemhdr.recsize, 1, mdm)) == 1) {
|
||||
if (j == 1) {
|
||||
@ -710,7 +714,8 @@ int modem_doc(FILE *fp, FILE *toc, int page)
|
||||
}
|
||||
|
||||
nr++;
|
||||
fprintf(ip, " <LI><A HREF=\"modem_%d.html\">%s</A></LI>\n", nr, modem.modem);
|
||||
fprintf(ip, " <TR><TD><A HREF=\"modem_%d.html\">%d</A></TD><TD>%s</TD><TD>%s</TD></TR>\n",
|
||||
nr, nr, modem.modem, getboolean(modem.available));
|
||||
sprintf(temp, "modem_%d.html", nr);
|
||||
if ((wp = open_webdoc(temp, (char *)"Modem", modem.modem))) {
|
||||
fprintf(wp, "<A HREF=\"index.html\">Main</A> <A HREF=\"modem.html\">Back</A>\n");
|
||||
@ -792,7 +797,8 @@ int modem_doc(FILE *fp, FILE *toc, int page)
|
||||
j++;
|
||||
}
|
||||
|
||||
fprintf(ip, "</UL>\n");
|
||||
fprintf(ip, "</TBODY>\n");
|
||||
fprintf(ip, "</TABLE>\n");
|
||||
close_webdoc(ip);
|
||||
|
||||
fclose(mdm);
|
||||
|
@ -590,7 +590,11 @@ int tty_doc(FILE *fp, FILE *toc, int page)
|
||||
|
||||
ip = open_webdoc((char *)"ttyinfo.html", (char *)"TTY Lines", NULL);
|
||||
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
|
||||
fprintf(ip, "<UL>\n");
|
||||
fprintf(ip, "<P>\n");
|
||||
fprintf(ip, "<TABLE width='400' border='0' cellspacing='0' cellpadding='2'>\n");
|
||||
fprintf(ip, "<COL width='10%%'><COL width='70%%'><COL width='20%%'>\n");
|
||||
fprintf(ip, "<TBODY>\n");
|
||||
fprintf(ip, "<TR><TH align='left'>TTY</TH><TH align='left'>Comment</TH><TH align='left'>Available</TH></TR>\n");
|
||||
|
||||
while ((fread(&ttyinfo, ttyinfohdr.recsize, 1, tty)) == 1) {
|
||||
if (j == 3) {
|
||||
@ -600,7 +604,8 @@ int tty_doc(FILE *fp, FILE *toc, int page)
|
||||
}
|
||||
|
||||
sprintf(temp, "ttyinfo_%s.html", ttyinfo.tty);
|
||||
fprintf(ip, "<LI><A HREF=\"%s\">%s</A></LI>\n", temp, ttyinfo.comment);
|
||||
fprintf(ip, "<TR><TD><A HREF=\"%s\">%s</A></TD><TD>%s</TD><TD>%s</TD></TR>\n",
|
||||
temp, ttyinfo.tty, ttyinfo.comment, getboolean(ttyinfo.available));
|
||||
if ((wp = open_webdoc(temp, (char *)"TTY Line", ttyinfo.comment))) {
|
||||
/*
|
||||
* There are devices like pts/1, this will create a subdir for the
|
||||
@ -649,7 +654,8 @@ int tty_doc(FILE *fp, FILE *toc, int page)
|
||||
j++;
|
||||
}
|
||||
|
||||
fprintf(ip, "</UL>\n");
|
||||
fprintf(ip, "</TBODY>\n");
|
||||
fprintf(ip, "</TABLE>\n");
|
||||
close_webdoc(ip);
|
||||
|
||||
fclose(tty);
|
||||
|
@ -441,7 +441,11 @@ int virus_doc(FILE *fp, FILE *toc, int page)
|
||||
|
||||
ip = open_webdoc((char *)"virscan.html", (char *)"Virus Scanners", NULL);
|
||||
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
|
||||
fprintf(ip, "<UL>\n");
|
||||
fprintf(ip, "<P>\n");
|
||||
fprintf(ip, "<TABLE width='400' border='0' cellspacing='0' cellpadding='2'>\n");
|
||||
fprintf(ip, "<COL width='10%%'><COL width='70%%'><COL width='20%%'>\n");
|
||||
fprintf(ip, "<TBODY>\n");
|
||||
fprintf(ip, "<TR><TH align='left'>Nr</TH><TH align='left'>Comment</TH><TH align='left'>Available</TH></TR>\n");
|
||||
|
||||
while ((fread(&virscan, virscanhdr.recsize, 1, vir)) == 1) {
|
||||
|
||||
@ -453,7 +457,8 @@ int virus_doc(FILE *fp, FILE *toc, int page)
|
||||
|
||||
nr++;
|
||||
sprintf(temp, "virscan_%d.html", nr);
|
||||
fprintf(ip, "<LI><A HREF=\"%s\">%s</A></LI>\n", temp, virscan.comment);
|
||||
fprintf(ip, "<TR><TD><A HREF=\"%s\">%d</A></TD><TD>%s</TD><TD>%s</TD></TR>\n",
|
||||
temp, nr, virscan.comment, getboolean(virscan.available));
|
||||
if ((wp = open_webdoc(temp, (char *)"Virus Scanner", virscan.comment))) {
|
||||
fprintf(wp, "<A HREF=\"index.html\">Main</A> <A HREF=\"virscan.html\">Back</A>\n");
|
||||
fprintf(wp, "<P>\n");
|
||||
@ -479,7 +484,8 @@ int virus_doc(FILE *fp, FILE *toc, int page)
|
||||
j++;
|
||||
}
|
||||
|
||||
fprintf(ip, "</UL>\n");
|
||||
fprintf(ip, "</TBODY>\n");
|
||||
fprintf(ip, "</TABLE>\n");
|
||||
close_webdoc(ip);
|
||||
|
||||
fclose(vir);
|
||||
|
Reference in New Issue
Block a user