]> code.citadel.org Git - citadel.git/blobdiff - webcit/graphics.c
use the same way to display all banners and services contents
[citadel.git] / webcit / graphics.c
index 90333ecd328f8bd53508f401ddafa3fb32d03e1f..f040f22cdc222978ae3aeb5977012d6ded190410 100644 (file)
@@ -21,14 +21,13 @@ void display_graphics_upload(char *description, char *check_cmd, char *uplurl)
        output_headers(1, 1, 0, 0, 0, 0);
 
        output_headers(1, 1, 2, 0, 0, 0);
-       wprintf("<div id=\"banner\">\n"
-               "<TABLE class=\"graphics_banner\"><TR><TD>"
-               "<SPAN CLASS=\"titlebar\">");
+       wprintf("<div id=\"banner\">\n");
+       wprintf("<h1>");
        wprintf(_("Image upload"));
-       wprintf("</SPAN>"
-               "</TD></TR></TABLE>\n"
-               "</div>\n<div id=\"content\">\n"
-       );
+       wprintf("</h1>");
+       wprintf("</div>\n");
+
+       wprintf("<div id=\"content\" class=\"service\">\n");
 
        wprintf("<div class=\"fix_scrollbar_bug\">"
                "<table class=\"graphics_background\"><tr><td>\n");
@@ -38,6 +37,7 @@ void display_graphics_upload(char *description, char *check_cmd, char *uplurl)
        wprintf("<FORM ENCTYPE=\"multipart/form-data\" action=\"%s\" "
                "METHOD=\"POST\" NAME=\"graphicsupload\">\n", uplurl);
 
+       wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);
        wprintf("<INPUT TYPE=\"hidden\" NAME=\"which_room\" VALUE=\"");
        urlescputs(bstr("which_room"));
        wprintf("\">\n");
@@ -69,7 +69,7 @@ void do_graphics_upload(char *upl_cmd)
        int pos = 0;
        int thisblock;
 
-       if (strlen(bstr("cancel_button")) > 0) {
+       if (!IsEmptyStr(bstr("cancel_button"))) {
                strcpy(WC->ImportantMessage,
                        _("Graphics upload has been cancelled."));
                display_main_menu();