* copy daves great handler script and modify it to fit the simpler needs of webcit.
[citadel.git] / webcit / siteconfig.c
index f03fe5669928d39d82e2510247aaa4509ef02610..5a2ee2e6f4f780db460788e1d6513f24fe9ad12c 100644 (file)
@@ -113,7 +113,7 @@ void display_siteconfig(void)
                );
                
        wprintf("<form method=\"post\" action=\"siteconfig\">\n");
-       wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);
+       wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%d\">\n", WC->nonce);
        
        sprintf(&general[strlen(general)], "<tr><td><a href=\"display_edithello\"> %s </a></td>",           _("Change Login Logo"));
        sprintf(&general[strlen(general)],     "<td><a href=\"display_editgoodbuye\"> %s </a></td></tr>\n", _("Change Logout Logo"));
@@ -518,7 +518,7 @@ void display_siteconfig(void)
                                memcpy(ZName, this_zone, len + 1);
                                Put(List, ZName, len, ZName, NULL);
                        }
-                       SortByHashKey(List);
+                       SortByHashKey(List, 0);
                        it = GetNewHashPos();
                        while (GetNextHashPos(List, it, &len, &ZName, &ZNamee)) {
                                sprintf(&general[strlen(general)], "<option %s value=\"%s\">%s</option>\n",
@@ -577,7 +577,7 @@ void display_siteconfig(void)
                        break;
                case 56:
                        sprintf(&funambol[strlen(funambol)], "<TR><TD>");
-                       sprintf(&funambol[strlen(funambol)], _("Funambol auth details (user:pass in Base64)"));
+                       sprintf(&funambol[strlen(funambol)], _("Funambol auth details (user:pass)"));
                        sprintf(&funambol[strlen(funambol)], "</TD><TD>");
                        sprintf(&funambol[strlen(funambol)], "<input type=\"text\" NAME=\"c_funambol_auth\" MAXLENGTH=\"255\" VALUE=\"%s\">", buf);
                        sprintf(&funambol[strlen(funambol)], "</TD></TR>\n");
@@ -845,5 +845,11 @@ void siteconfig(void)
        display_aide_menu();
 }
 
-
+void 
+InitModule_SITECONFIG
+(void)
+{
+       WebcitAddUrlHandler(HKEY("display_siteconfig"), display_siteconfig, 0);
+       WebcitAddUrlHandler(HKEY("siteconfig"), siteconfig, 0);
+}
 /*@}*/