]> code.citadel.org Git - citadel.git/blobdiff - webcit/floors.c
Nearly all <FORM> blocks now contain a hidden input
[citadel.git] / webcit / floors.c
index 8f5b358abf596ab5b6b3dbbabf4734d29facaada..da7e0061a4f89ea0bc0386be0e0451bd4556d729 100644 (file)
@@ -3,7 +3,7 @@
  */
 /**
  * \defgroup AdminFloor Administrative screens for floor maintenance
- *
+ * \ingroup CitadelConfig
  */
 /*@{*/
 
@@ -29,7 +29,7 @@ void display_floorconfig(char *prepend_html)
 
         output_headers(1, 1, 2, 0, 0, 0);
         wprintf("<div id=\"banner\">\n"
-                "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
+                "<TABLE class=\"floors_banner\"><TR><TD>"
                 "<SPAN CLASS=\"titlebar\">");
        wprintf(_("Add/change/delete floors"));
        wprintf("</SPAN>"
@@ -46,7 +46,7 @@ void display_floorconfig(char *prepend_html)
        serv_printf("LFLR");
        serv_getln(buf, sizeof buf);
        if (buf[0] != '1') {
-               wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#770000\"><TR><TD>");
+               wprintf("<TABLE  class=\"floors_config\"><TR><TD>");
                wprintf("<SPAN CLASS=\"titlebar\">");
                wprintf(_("Error"));
                wprintf("</SPAN>\n");
@@ -64,6 +64,8 @@ void display_floorconfig(char *prepend_html)
        wprintf(_("Floor name"));
        wprintf("</TH><TH>");
        wprintf(_("Number of rooms"));
+       wprintf("</TH><TH>");
+       wprintf(_("Floor CSS"));
        wprintf("</TH></TR>\n");
 
        while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
@@ -93,11 +95,26 @@ void display_floorconfig(char *prepend_html)
                        "<INPUT TYPE=\"text\" NAME=\"floorname\" "
                        "VALUE=\"%s\" MAXLENGTH=\"250\">\n",
                        floornum, floorname);
+               wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);
                wprintf("<INPUT TYPE=\"SUBMIT\" NAME=\"sc\" "
                        "VALUE=\"%s\">"
                        "</FORM></TD>", _("Change name"));
 
-               wprintf("<TD>%d</TD></TR>\n", refcount);
+               wprintf("<TD>%d</TD>\n", refcount);
+
+               wprintf("<TD>"
+                       "<FORM METHOD=\"POST\" action=\"set_floor_css\">"
+                       "<INPUT TYPE=\"hidden\" NAME=\"floornum\" "
+                       "VALUE=\"%d\">"
+                       "<INPUT TYPE=\"text\" NAME=\"floorcss\" "
+                       "VALUE=\"%s\" MAXLENGTH=\"250\">\n",
+                       floornum, floorname);
+               wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);
+               wprintf("<INPUT TYPE=\"SUBMIT\" NAME=\"sc\" "
+                       "VALUE=\"%s\">"
+                       "</FORM></TD>", _("Change CSS"));
+
+               wprintf("</TR>\n");
        }
 
        wprintf("<TR><TD>&nbsp;</TD>"