]> code.citadel.org Git - citadel.git/blobdiff - webcit/inetconf.c
* Replaced all the "centered 99% tables" with 100% width tables wrapped
[citadel.git] / webcit / inetconf.c
index 2becce66a58f60c3246b0e4be5191bc50cbe0003..091592f2fd88e5908eb02dbfbedd132db1877933 100644 (file)
@@ -1,9 +1,8 @@
 /* 
- * inetconf.c
+ * $Id$
  *
  * Functions which handle Internet domain configuration etc.
  *
- * $Id$
  */
 
 #include <ctype.h>
@@ -81,13 +80,6 @@ void display_inetconf(void)
        }
        ic_misc = strdup("");
 
-       output_headers(1, 1, 2, 0, 0, 0, 0);
-       wprintf("<div id=\"banner\">\n");
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
-       wprintf("<SPAN CLASS=\"titlebar\">Internet configuration</SPAN>\n");
-       wprintf("</TD></TR></TABLE>\n");
-       wprintf("</div>\n<div id=\"content\">\n");
-
        serv_printf("CONF GETSYS|application/x-citadel-internet-config");
        serv_gets(buf);
        if (buf[0] == '1') while (serv_gets(buf), strcmp(buf, "000")) {
@@ -114,7 +106,15 @@ void display_inetconf(void)
 
        }
 
-       wprintf("<TABLE border=0 width=100%%><TR><TD VALIGN=TOP>\n");
+       output_headers(1, 1, 2, 0, 0, 0, 0);
+       wprintf("<div id=\"banner\">\n");
+       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
+       wprintf("<SPAN CLASS=\"titlebar\">Internet configuration</SPAN>\n");
+       wprintf("</TD></TR></TABLE>\n");
+       wprintf("</div>\n<div id=\"content\">\n");
+
+       wprintf("<div style=\"margin-right:1px\">"
+               "<table border=0 width=100%%><tr><td valign=top>\n");
        for (which=0; which<ic_max; ++which) {
                if (which == (ic_max / 2)) {
                        wprintf("</TD><TD VALIGN=TOP>");
@@ -149,8 +149,7 @@ void display_inetconf(void)
                        "</TD></TR></TABLE></FORM>\n");
                do_template("endbox");
        }
-       wprintf("</TD></TR></TABLE>\n");
-
+       wprintf("</td></tr></table></div>\n");
        wDumpContent(1);
 
        for (i=0; i<ic_max; ++i) {
@@ -161,10 +160,15 @@ void display_inetconf(void)
 
 
 void save_inetconf(void) {
-       char buf[SIZ];
-       char ename[SIZ];
-       char etype[SIZ];
-       char newconfig[65536];
+       char *buf;
+       char *ename;
+       char *etype;
+       char *newconfig;
+
+       buf = malloc(SIZ);
+       ename = malloc(SIZ);
+       etype = malloc(SIZ);
+       newconfig = malloc(65536);
 
        strcpy(newconfig, "");
        serv_printf("CONF GETSYS|application/x-citadel-internet-config");
@@ -199,4 +203,9 @@ void save_inetconf(void) {
        }
        
        display_inetconf();
+
+       free(buf);
+       free(ename);
+       free(etype);
+       free(newconfig);
 }