function switchlogs() { switch ($_GET["tab"]) { case 0: echo UpdatesSuccess(); break; case 1: echo UpdatesErrors(); break; default: UpdatesSuccess(); break; } }
function PageAveServerUpdateConfig() { $yum = new usersMenus(); $tpl = new templates(); if ($yum->AsPostfixAdministrator == false) { return $tpl->_ENGINE_parse_body("<h3>{not allowed}</H3>"); } include_once dirname(__FILE__) . '/ressources/kav4mailservers.inc'; $kav = new kav4mailservers(1); $array_conf = $kav->array_conf["updater.options"]; $cron = $kav->CronTask(); $UseUpdateServerUrl = Field_yesno_checkbox_img('UseUpdateServerUrl', $array_conf["UseUpdateServerUrl"]); $UseUpdateServerUrlOnly = Field_yesno_checkbox_img('UseUpdateServerUrlOnly', $array_conf["UseUpdateServerUrlOnly"]); $PassiveFtp = Field_yesno_checkbox_img('PassiveFtp', $array_conf["PassiveFtp"]); $html = "\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td valign='top'><img src='img/bg_download.jpg'></td>\n\t\t<td valign='top'>\n\t\t" . RoundedLightGreen("<strong>{schedule}:« {$cron} »</strong>") . "<br>" . RoundedLightGrey("<form name=ffmupdate>\n\t\t<input type='hidden' value='{$array_conf["PostUpdateCmd"]}' name='PostUpdateCmd'>\n\t\t<H4>{keepup2date settings}</H4>\n\t\t<table>\n\t\t<tr>\n\t\t<td>{$UseUpdateServerUrl}</td>\n\t\t<td align='left' nowrap>{UseUpdateServerUrl}</td>\n\t\t\n\t\t</tr>\n\t\t<tr>\n\t\t<td>{$UseUpdateServerUrlOnly}</td>\n\t\t<td align='left'>{UseUpdateServerUrlOnly}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td>{$PassiveFtp}</td>\n\t\t<td align='left'>{PassiveFtp}</td>\n\t\t</tr>\t\t\t\n\t\t</table>\n\t\t<table>\n\t\t<tr>\n\t\t<td align='right' nowrap>{UpdateServerUrl}:</td>\n\t\t<td align='left'>" . Field_text('UpdateServerUrl', $array_conf["UpdateServerUrl"]) . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t<td align='right'>{ProxyAddress}:</td>\n\t\t<td align='left'>" . Field_text('ProxyAddress', $array_conf["ProxyAddress"]) . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t<td align='right'>{ConnectTimeout}:</td>\n\t\t<td align='left'>" . Field_text('ConnectTimeout', $array_conf["ConnectTimeout"], '') . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t<td colspan=2 align='right'><input type='button' OnClick=\"javascript:ParseForm('ffmupdate','users.kav.php',true);\" value='{submit} »'></td>\n\t\t</tr>\n\t\t</table>\n\t\t</form>") . "<br>\n\n\t\t\n\t\t\t\n\t\t<br>\n\t\t</td>\n\t\t</tr>\n\t\t<tr><td align='center' colspan=2><input type='button' OnClick=\"javascript:KavUpdates()\" value='« {update_now} »'></td></tr>\n\t\t<tr><td colspan=2>" . UpdatesError() . UpdatesSuccess() . "</td>\n\t\t</tr>\n\t\t</table>\n\t\t"; return $tpl->_ENGINE_parse_body($html); }