]> code.citadel.org Git - citadel.git/blobdiff - webcit/mainmenu.c
* Started moving all of the global variables into a struct, to facilitate
[citadel.git] / webcit / mainmenu.c
index 543a86ce186e1606e6192fee22fbe82849d8c3d1..8713620f46809bc4f9b270c6f9c48d69182f4aa8 100644 (file)
@@ -35,10 +35,10 @@ void embed_main_menu(void)
        wprintf("Skip to next room</B></A><BR>\n");
        wprintf("(come back here later)</LI>\n");
 
-       if ((strlen(ugname) > 0) && (strcasecmp(ugname, wc_roomname))) {
+       if ((strlen(WC->ugname) > 0) && (strcasecmp(WC->ugname, WC->wc_roomname))) {
                wprintf("<LI><B><A HREF=\"/ungoto\">\n");
                wprintf("Ungoto</B></A><BR>\n");
-               wprintf("(oops! Back to %s)</LI>\n", ugname);
+               wprintf("(oops! Back to %s)</LI>\n", WC->ugname);
        }
        wprintf("</UL>\n");
 
@@ -140,7 +140,7 @@ void embed_advanced_menu(void)
        wprintf("Create a new room</A>\n");
 
        wprintf("<LI><A HREF=\"/display_zap\">");
-       wprintf("Zap (forget) this room (%s)</A>\n", wc_roomname);
+       wprintf("Zap (forget) this room (%s)</A>\n", WC->wc_roomname);
 
        wprintf("<LI><A HREF=\"/zapped_list\">");
        wprintf("List all forgotten rooms</A>\n");
@@ -149,7 +149,7 @@ void embed_advanced_menu(void)
 
        wprintf("</TD><TD>");
 
-       if ((axlevel >= 6) || (is_room_aide)) {
+       if ((WC->axlevel >= 6) || (WC->is_room_aide)) {
                wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=007777><TR><TD>");
                wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
                wprintf("<B>Administrative functions</B>\n");
@@ -157,21 +157,12 @@ void embed_advanced_menu(void)
 
                wprintf("<UL>");
                wprintf("<LI><A HREF=\"/display_editroom\">\n");
-               wprintf("Edit this room</A>\n");
-
-               wprintf("<LI><A HREF=\"/confirm_delete_room\">\n");
-               wprintf("Delete this room</A>\n");
-
-               wprintf("<LI><A HREF=\"/display_editroompic\">\n");
-               wprintf("Set or change the graphic for this room's banner</A>\n");
-
-               wprintf("<LI><A HREF=\"/display_editinfo\">\n");
-               wprintf("Edit this room's Info file</A>\n");
+               wprintf("Edit or delete this room</A>\n");
 
                wprintf("<LI><A HREF=\"/display_siteconfig\">\n");
                wprintf("Edit site-wide configuration</A>\n");
 
-               if (axlevel >= 6) {
+               if (WC->axlevel >= 6) {
                        wprintf("<LI><A HREF=\"/validate\">\n");
                        wprintf("Validate new users</A>\n");
 
@@ -261,11 +252,13 @@ void do_generic(void)
                display_main_menu();
                return;
        }
-       serv_printf("%s", bstr("g_cmd"));
-       serv_gets(buf);
 
        printf("HTTP/1.0 200 OK\n");
        output_headers(1);
+
+       serv_printf("%s", bstr("g_cmd"));
+       serv_gets(buf);
+
        wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=770077><TR><TD>");
        wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
        wprintf("<B>Server command results</B>\n");