X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fsiteconfig.c;h=4038bd03fd0a02cdd61a241cd8dce0ef642a7612;hb=9045713bf3089e4b6d2c9719580f011adf4d6f97;hp=273650c90a5ee52b9f1b1253a3ad9004e94b3b96;hpb=fc38b4ebc2fda27a37097e839e094f71c36ed75d;p=citadel.git diff --git a/webcit/siteconfig.c b/webcit/siteconfig.c index 273650c90..4038bd03f 100644 --- a/webcit/siteconfig.c +++ b/webcit/siteconfig.c @@ -1,642 +1,433 @@ /* - * $Id$ - * * Administrative screen for site-wide configuration - * */ #include "webcit.h" +#include "webserver.h" -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]; - char idxjnl[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("
");
+ConstStr ExpirePolicyStrings[][2] = {
+ { { CStrOf(roompolicy) } , { strof(roompolicy) "_value", sizeof(strof(roompolicy) "_value") - 1 } },
+ { { CStrOf(floorpolicy) } , { strof(floorpolicy) "_value", sizeof(strof(floorpolicy) "_value") - 1 } },
+ { { CStrOf(sitepolicy) } , { strof(sitepolicy) "_value", sizeof(strof(sitepolicy) "_value") - 1 } },
+ { { CStrOf(mailboxespolicy)} , { strof(mailboxespolicy)"_value", sizeof(strof(mailboxespolicy)"_value") - 1 } }
+};
- char *tabnames[] = {
- _("General"),
- _("Access"),
- _("Network"),
- _("Tuning"),
- _("Directory"),
- _("Auto-purger"),
- _("Indexing/Journaling")
- };
+void LoadExpirePolicy(GPEXWhichPolicy which)
+{
+ StrBuf *Buf;
+ wcsession *WCC = WC;
+ long State;
+ const char *Pos = NULL;
+
+ serv_printf("GPEX %s", ExpirePolicyStrings[which][0].Key);
+ Buf = NewStrBuf();
+ StrBuf_ServGetln(Buf);
+ WCC->Policy[which].loaded = 1;
+ if (GetServerStatus(Buf, &State) == 2) {
+ Pos = ChrPtr(Buf) + 4;
+ WCC->Policy[which].expire_mode = StrBufExtractNext_long(Buf, &Pos, '|');
+ WCC->Policy[which].expire_value = StrBufExtractNext_long(Buf, &Pos, '|');
+ }
+ else if (State == 550)
+ AppendImportantMessage(_("Higher access is required to access this function."), -1);
+ FreeStrBuf(&Buf);
+}
- sprintf(general, "%s"); - wprintf("", _("Save changes")); - wprintf(" "); - wprintf("\n", _("Cancel")); - wprintf(" |