{ { CStrOf(mailboxespolicy)} , { strof(mailboxespolicy)"_value", sizeof(strof(mailboxespolicy)"_value") - 1 } }
};
-void LoadExpirePolicy(GPEXWhichPolicy which)
-{
+
+void LoadExpirePolicy(GPEXWhichPolicy which) {
StrBuf *Buf;
long State;
const char *Pos = NULL;
FreeStrBuf(&Buf);
}
-void SaveExpirePolicyFromHTTP(GPEXWhichPolicy which)
-{
+
+void SaveExpirePolicyFromHTTP(GPEXWhichPolicy which) {
StrBuf *Buf;
long State;
FreeStrBuf(&Buf);
}
-int ConditionalExpire(StrBuf *Target, WCTemplputParams *TP)
-{
+
+int ConditionalExpire(StrBuf *Target, WCTemplputParams *TP) {
GPEXWhichPolicy which;
int CompareWith;
return WC->Policy[which].expire_mode == CompareWith;
}
-void tmplput_ExpireValue(StrBuf *Target, WCTemplputParams *TP)
-{
+
+void tmplput_ExpireValue(StrBuf *Target, WCTemplputParams *TP) {
GPEXWhichPolicy which;
which = GetTemplateTokenNumber(Target, TP, 0, 0);
}
-void tmplput_ExpireMode(StrBuf *Target, WCTemplputParams *TP)
-{
+void tmplput_ExpireMode(StrBuf *Target, WCTemplputParams *TP) {
GPEXWhichPolicy which;
which = GetTemplateTokenNumber(Target, TP, 2, 0);
}
-void LoadZoneFiles(void)
-{
+void LoadZoneFiles(void) {
icalarray *zones;
int z;
long len;
};
-
/*
* display all configuration items
*/
-void load_siteconfig(void)
-{
+void load_siteconfig(void) {
StrBuf *Buf;
HashList *Cfg;
long len;
}
-
/*
* parse siteconfig changes
*/
-void siteconfig(void)
-{
+void siteconfig(void) {
int i, value;
StrBuf *Line;
// if WebCit Classic wasn't obsolete we would replace this with a "CONF GETVAL" type of thing
-void tmplput_servcfg(StrBuf *Target, WCTemplputParams *TP)
-{
+void tmplput_servcfg(StrBuf *Target, WCTemplputParams *TP) {
void *vBuf;
StrBuf *Buf;
}
}
-// output the global alias table
-void tmplput_servcfg_globalaliases(StrBuf *Target, WCTemplputParams *TP) {
- TRACE;
- StrBufAppendTemplate(Target, TP, "wow\n", 0);
- TRACE;
-}
-
-
-
-
-
-
-
-
-
-int ConditionalServCfg(StrBuf *Target, WCTemplputParams *TP)
-{
+int ConditionalServCfg(StrBuf *Target, WCTemplputParams *TP) {
void *vBuf;
StrBuf *Buf;
else return 0;
}
-int ConditionalServCfgCTXStrBuf(StrBuf *Target, WCTemplputParams *TP)
-{
+int ConditionalServCfgCTXStrBuf(StrBuf *Target, WCTemplputParams *TP) {
void *vBuf;
StrBuf *Buf;
StrBuf *ZoneToCheck = (StrBuf*) CTX(CTX_STRBUF);
WebcitAddUrlHandler(HKEY("siteconfig"), "", 0, siteconfig, CTX_NONE);
RegisterNamespace("SERV:CFG", 1, 2, tmplput_servcfg, NULL, CTX_NONE);
- RegisterNamespace("SERV:GLOBALALIASES", 0, 1, tmplput_servcfg_globalaliases, NULL, CTX_NONE);
RegisterConditional("COND:SERVCFG", 3, ConditionalServCfg, CTX_NONE);
RegisterConditional("COND:SERVCFG:CTXSTRBUF", 4, ConditionalServCfgCTXStrBuf, CTX_STRBUF);
RegisterIterator("PREF:ZONE", 0, ZoneHash, NULL, NULL, NULL, CTX_STRBUF, CTX_NONE, IT_NOFLAG);
--- /dev/null
+<?=("head")><?%("COND:LOGGEDIN", 1, 1, 1, "", ="paging")>
+<div id="banner">
+<h1><a href="javascript:load_aliases()">↻</a>
+<?_("Global email aliases")></h1>
+</div>
+<div id="content" class="service">
+<?!("COND:AIDE", 1)><?_("You need to be aide to view this.")><?!("X", 1)>
+<??("COND:AIDE", 2)>
+
+<div id="wc_easterbunny77">
+</div>
+
+<textarea name="global_aliases" id="global_aliases" VALUE="">
+</textarea>
+
+<script type="text/javascript">
+
+load_aliases = async() => {
+ response = await fetch("ajax_servcmd?g_cmd=LIST");
+ data = await(response.text());
+ populate_aliases(data);
+};
+
+function delete_alias(rowid) {
+ var row = document.getElementById(rowid);
+ row.parentNode.removeChild(row);
+ repopulate_the_box();
+}
+
+function populate_aliases(data) {
+ var a = "<table id=killo9867>";
+ lines = data.split("\n");
+ for (var i=1; i<lines.length && lines[i] != "000"; ++i) {
+ config_line = lines[i].split("|");
+ lineid = randomString(10);
+ a += "<tr id=" + lineid + "><td>" + config_line[0] + "</td><td>" +
+ config_line[1] + "</td><td>" +
+ "<a href=\"javascript:delete_alias('" + lineid + "');\">" +
+ "<font color=#FF0000>✖</font></a></td></tr>";
+ }
+ a += "</table>";
+ document.getElementById("wc_easterbunny77").innerHTML = a;
+ repopulate_the_box();
+}
+
+function repopulate_the_box() {
+ newbox = "";
+ t = document.getElementById("killo9867");
+ for (row of t.rows) {
+ newbox += row.cells[0].innerHTML + " - " + row.cells[1].innerHTML + "\n";
+ }
+ document.getElementById("global_aliases").innerHTML = newbox;
+}
+
+load_aliases();
+
+</script>
+
+
+<??("X", 2)>
+</div>
+</div>
+<?=("trailing")>
_("SMTP"), ="aide_siteconfig_tab_smtp",
_("IMAP4"), ="aide_siteconfig_tab_imap",
_("Pop3"), ="aide_siteconfig_tab_pop3",
- _("Global email aliases"), ="aide_siteconfig_tab_aliases",
_("Indexing/Journaling"), ="aide_siteconfig_tab_indexing",
_("Access"), ="aide_siteconfig_tab_access",
_("Directory"), ="aide_siteconfig_tab_directory",
<li><a href="do_template?template=aide_display_sitewide_config"><?_("Edit site-wide configuration")></a></li>
<li><a href="do_template?template=aide_display_inetconf"><?_("Domain names and Internet mail configuration")></a></li>
<li><a href="dotskip?room=__CitadelSMTPspoolout__&view=11"><?_("View the outbound SMTP queue")></a></li>
+<li><a href="do_template?template=aide_display_aliases"><?_("Global email aliases")></a></li>
</ul>
+++ /dev/null
-<div class="conftitle">
-<a href="javascript:load_aliases()">↻</a>
-<?_("Global email aliases")></div>
-<hr>
-
-<div id="wc_easterbunny77">
-</div>
-
-<textarea name="global_aliases" id="global_aliases" VALUE="<?SERV:GLOBALALIASES>">
-</textarea>
-
-<fcript type="text/javascript">
-
-load_aliases = async() => {
- response = await fetch("ajax_servcmd?g_cmd=LIST");
- data = await(response.text());
- populate_aliases(data);
-};
-
-function delete_alias(rowid) {
- var row = document.getElementById(rowid);
- row.parentNode.removeChild(row);
- repopulate_the_box();
-}
-
-function populate_aliases(data) {
- var a = "<table id=killo9867>";
- lines = data.split("\n");
- for (var i=1; i<lines.length && lines[i] != "000"; ++i) {
- config_line = lines[i].split("|");
- lineid = randomString(10);
- a += "<tr id=" + lineid + "><td>" + config_line[0] + "</td><td>" +
- config_line[1] + "</td><td>" +
- "<a href=\"javascript:delete_alias('" + lineid + "');\">" +
- "<font color=#FF0000>✖</font></a></td></tr>";
- }
- a += "</table>";
- document.getElementById("wc_easterbunny77").innerHTML = a;
- repopulate_the_box();
-}
-
-function repopulate_the_box() {
- newbox = "";
- t = document.getElementById("killo9867");
- for (row of t.rows) {
- newbox += row.cells[0].innerHTML + " - " + row.cells[1].innerHTML + "\n";
- }
- document.getElementById("global_aliases").innerHTML = newbox;
-}
-
-load_aliases();
-
-</fcript>