X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=webcit%2Fsiteconfig.c;h=2f3d91cb5dcfec2f6b4fd3a66bfad500b1e45a3f;hp=1b866524e1472885ee780a4d1a6df2adb2436a4f;hb=f0cd12e35149b38761b187f22794782b7ba9c0ff;hpb=3abfd5bfcc3dd94bf554917f20144ca36dfc4218 diff --git a/webcit/siteconfig.c b/webcit/siteconfig.c index 1b866524e..2f3d91cb5 100644 --- a/webcit/siteconfig.c +++ b/webcit/siteconfig.c @@ -1,602 +1,446 @@ /* - * $Id$ - * * Administrative screen for site-wide configuration * + * Copyright (c) 1996-2011 by the citadel.org team + * + * This program is open source software. You can redistribute it and/or + * modify it under the terms of the GNU General Public License, version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ - #include "webcit.h" +#include "webserver.h" +HashList *ZoneHash = NULL; -void display_siteconfig(void) -{ - char buf[SIZ]; - int i, j; - - char general[SIZ]; - char access[SIZ]; - char network[SIZ]; - char tuning[SIZ]; - char directory[SIZ]; - char purger[SIZ]; - - /* expire policy settings */ - int sitepolicy = 0; - int sitevalue = 0; - int mboxpolicy = 0; - int mboxvalue = 0; - - output_headers(1, 1, 2, 0, 0, 0); - wprintf("
\n"); - wprintf(" | \n"); - wprintf("
");
+void SaveExpirePolicyFromHTTP(GPEXWhichPolicy which)
+{
+ StrBuf *Buf;
+ long State;
+
+ serv_printf("SPEX %s|%d|%d",
+ ExpirePolicyStrings[which][0].Key,
+ ibcstr( ExpirePolicyStrings[which][1] ),
+ ibcstr( ExpirePolicyStrings[which][1] ) );
+
+ Buf = NewStrBuf();
+ StrBuf_ServGetln(Buf);
+ GetServerStatus(Buf, &State);
+ if (State == 550)
+ AppendImportantMessage(_("Higher access is required to access this function."), -1);
+ FreeStrBuf(&Buf);
+}
- char *tabnames[] = {
- _("General"),
- _("Access"),
- _("Network"),
- _("Tuning"),
- _("Directory"),
- _("Auto-purger")
- };
+int ConditionalExpire(StrBuf *Target, WCTemplputParams *TP)
+{
+ wcsession *WCC = WC;
+ GPEXWhichPolicy which;
+ int CompareWith;
- sprintf(general, "%s");
- wprintf("", _("Save changes"));
- wprintf(" ");
- wprintf("\n", _("Cancel"));
- wprintf(" \n");
- wprintf(" |