Began making changes to do better handling of character sets.
[citadel.git] / webcit / floors.c
index 5d1ba0ce42278554ff4a5029107cd4ea93c3e838..d9192854094877b0aca6e8ecd574c18dca43ad43 100644 (file)
@@ -1,10 +1,11 @@
 /*
  * $Id$
- *
- * Administrative screens for floor maintenance
- *
  */
-
+/**
+ * \defgroup AdminFloor Administrative screens for floor maintenance
+ * \ingroup CitadelConfig
+ */
+/*@{*/
 
 #include "webcit.h"
 #include "webserver.h"
 
 
 
-/*
+/**
+ * \brief Display floor config
  * Display floor configuration.  If prepend_html is not NULL, its contents
  * will be displayed at the top of the screen.
+ * \param prepend_html pagetitle to prepend
  */
 void display_floorconfig(char *prepend_html)
 {
@@ -24,7 +27,7 @@ void display_floorconfig(char *prepend_html)
        char floorname[SIZ];
        int refcount;
 
-        output_headers(1, 1, 2, 0, 0, 0, 0);
+        output_headers(1, 1, 2, 0, 0, 0);
         wprintf("<div id=\"banner\">\n"
                 "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
                 "<SPAN CLASS=\"titlebar\">");
@@ -53,7 +56,7 @@ void display_floorconfig(char *prepend_html)
                return;
        }
 
-       wprintf("<div id=\"fix_scrollbar_bug\">"
+       wprintf("<div class=\"fix_scrollbar_bug\">"
                "<TABLE BORDER=1 WIDTH=100%% bgcolor=\"#ffffff\">\n"
                "<TR><TH>");
        wprintf(_("Floor number"));
@@ -61,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")) {
@@ -71,20 +76,20 @@ void display_floorconfig(char *prepend_html)
                wprintf("<TR><TD><TABLE border=0><TR><TD>%d", floornum);
                if (refcount == 0) {
                        wprintf("</TD><TD>"
-                               "<A HREF=\"/delete_floor?floornum=%d\">"
+                               "<a href=\"delete_floor?floornum=%d\">"
                                "<FONT SIZE=-1>", floornum);
                        wprintf(_("(delete floor)"));
                        wprintf("</A></FONT><br />");
                }
                wprintf("<FONT SIZE=-1>"
-                       "<A HREF=\"/display_editfloorpic&"
+                       "<a href=\"display_editfloorpic&"
                        "which_floor=%d\">", floornum);
                wprintf(_("(edit graphic)"));
                wprintf("</A></TD></TR></TABLE>");
                wprintf("</TD>");
 
                wprintf("<TD>"
-                       "<FORM METHOD=\"POST\" ACTION=\"/rename_floor\">"
+                       "<FORM METHOD=\"POST\" action=\"rename_floor\">"
                        "<INPUT TYPE=\"hidden\" NAME=\"floornum\" "
                        "VALUE=\"%d\">"
                        "<INPUT TYPE=\"text\" NAME=\"floorname\" "
@@ -94,11 +99,24 @@ void display_floorconfig(char *prepend_html)
                        "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=\"SUBMIT\" NAME=\"sc\" "
+                       "VALUE=\"%s\">"
+                       "</FORM></TD>", _("Change CSS"));
+
+               wprintf("</TR>\n");
        }
 
        wprintf("<TR><TD>&nbsp;</TD>"
-               "<TD><FORM METHOD=\"POST\" ACTION=\"/create_floor\">"
+               "<TD><FORM METHOD=\"POST\" action=\"create_floor\">"
                "<INPUT TYPE=\"text\" NAME=\"floorname\" "
                "MAXLENGTH=\"250\">\n"
                "<INPUT TYPE=\"SUBMIT\" NAME=\"sc\" "
@@ -111,7 +129,9 @@ void display_floorconfig(char *prepend_html)
 }
 
 
-
+/**
+ * \brief delete the actual floor
+ */
 void delete_floor(void) {
        int floornum;
        char buf[SIZ];
@@ -132,7 +152,9 @@ void delete_floor(void) {
        display_floorconfig(message);
 }
 
-
+/**
+ * \brief tart creating a new floor
+ */
 void create_floor(void) {
        char buf[SIZ];
        char message[SIZ];
@@ -152,7 +174,9 @@ void create_floor(void) {
        display_floorconfig(message);
 }
 
-
+/**
+ * \brief rename this floor
+ */
 void rename_floor(void) {
        int floornum;
        char buf[SIZ];
@@ -171,3 +195,4 @@ void rename_floor(void) {
 }
 
 
+/*@}*/