/** * accessor for singleton * * @return FluxdWatch */ function getInstance() { global $instanceFluxdWatch; // initialize if needed if (!isset($instanceFluxdWatch)) { FluxdWatch::initialize(); } return $instanceFluxdWatch; }
$tmpl->setvar('fluxdRunning', 0); } $tmpl->setvar('fluxd_dbmode', $cfg["fluxd_dbmode"]); $tmpl->setvar('fluxd_loglevel', $cfg["fluxd_loglevel"]); // Qmgr FluxdServiceMod::initializeServiceMod('Qmgr'); // would not be needed as its done in main $tmpl->setvar('fluxd_Qmgr_enabled', $cfg["fluxd_Qmgr_enabled"]); $tmpl->setvar('fluxd_Qmgr_state', FluxdQmgr::getModState()); $tmpl->setvar('fluxd_Qmgr_interval', $cfg["fluxd_Qmgr_interval"]); $tmpl->setvar('fluxd_Qmgr_maxTotalTransfers', $cfg["fluxd_Qmgr_maxTotalTransfers"]); $tmpl->setvar('fluxd_Qmgr_maxUserTransfers', $cfg["fluxd_Qmgr_maxUserTransfers"]); // Watch FluxdServiceMod::initializeServiceMod('Watch'); $tmpl->setvar('fluxd_Watch_enabled', $cfg["fluxd_Watch_enabled"]); $tmpl->setvar('fluxd_Watch_state', FluxdWatch::getModState()); $tmpl->setvar('fluxd_Watch_interval', $cfg["fluxd_Watch_interval"]); // Rssad FluxdServiceMod::initializeServiceMod('Rssad'); $tmpl->setvar('fluxd_Rssad_enabled', $cfg["fluxd_Rssad_enabled"]); $tmpl->setvar('fluxd_Rssad_state', FluxdRssad::getModState()); $tmpl->setvar('fluxd_Rssad_interval', $cfg["fluxd_Rssad_interval"]); // Fluxinet FluxdServiceMod::initializeServiceMod('Fluxinet'); $tmpl->setvar('fluxd_Fluxinet_enabled', $cfg["fluxd_Fluxinet_enabled"]); $tmpl->setvar('fluxd_Fluxinet_state', FluxdFluxinet::getModState()); $tmpl->setvar('fluxd_Fluxinet_port', $cfg["fluxd_Fluxinet_port"]); // Maintenance FluxdServiceMod::initializeServiceMod('Maintenance'); $tmpl->setvar('fluxd_Maintenance_enabled', $cfg["fluxd_Maintenance_enabled"]); $tmpl->setvar('fluxd_Maintenance_state', FluxdMaintenance::getModState());
$tmpl->setloop('public_profiles', $public_profiles); } // checkdir $tmpl->setvar('checkdir', !$isRefresh || $checkdir ? 1 : 0); } $tmpl->setvar('watch_job_loaded', !$wasWatchError); // title-bar tmplSetTitleBar("Administration - Fluxd Watch - " . ($isNew ? "Add" : "Edit") . " Job"); } break; case "deleteJob": $jobNumber = trim(tfb_getRequestVar('job')); if (empty($jobNumber)) { setWatchError('Error : No Job-Number.'); $tmpl->setvar('watch_job_deleted', 0); } else { $tmpl->setvar('watch_job_deleted', FluxdWatch::jobDelete($jobNumber) === true ? 1 : 0); } // title-bar tmplSetTitleBar("Administration - Fluxd Watch - Delete Job"); break; } $tmpl->setvar('pageop2', $pageop2); // $tmpl->setvar('enable_dereferrer', $cfg["enable_dereferrer"]); // tmplSetAdminMenu(); tmplSetFoot(); tmplSetIidVars(); // parse template $tmpl->pparse();