本文整理汇总了PHP中Field_checkbox函数的典型用法代码示例。如果您正苦于以下问题:PHP Field_checkbox函数的具体用法?PHP Field_checkbox怎么用?PHP Field_checkbox使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Field_checkbox函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: popup
function popup()
{
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$Param = unserialize(base64_decode($sock->GET_INFO("MimeDefangServiceOptions")));
$t = time();
if (!is_numeric($Param["DEBUG"])) {
$Param["DEBUG"] = 0;
}
if (!is_numeric($Param["MX_REQUESTS"])) {
$Param["MX_REQUESTS"] = 200;
}
if (!is_numeric($Param["MX_MINIMUM"])) {
$Param["MX_MINIMUM"] = 2;
}
if (!is_numeric($Param["MX_MAXIMUM"])) {
$Param["MX_MAXIMUM"] = 10;
}
if (!is_numeric($Param["MX_MAX_RSS"])) {
$Param["MX_MAX_RSS"] = 30000;
}
if (!is_numeric($Param["MX_MAX_AS"])) {
$Param["MX_MAX_AS"] = 90000;
}
if (!is_numeric($Param["MX_TMPFS"])) {
$Param["MX_TMPFS"] = 0;
}
$html = "\n\t<div id='{$t}-adddis'></div>\n\t<table style='width:100%' class=form>\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{debug}:</td>\n\t\t<td>" . Field_checkbox("DEBUG-{$t}", 1, $Param["DEBUG"]) . "</td>\n\t\t<td> </td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{workingdir_in_memory}:</td>\n\t\t<td style='font-size:16px'>" . Field_text("MX_TMPFS-{$t}", $Param["MX_TMPFS"], "font-size:16px;width:90px") . " M</td>\n\t\t<td>" . help_icon("{workingdir_in_memory_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{max_requests}:</td>\n\t\t<td>" . Field_text("MX_REQUESTS-{$t}", $Param["MX_REQUESTS"], "font-size:16px;width:90px") . "</td>\n\t\t<td>" . help_icon("{MX_REQUESTS_TEXT}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{MX_MINIMUM}:</td>\n\t\t<td>" . Field_text("MX_MINIMUM-{$t}", $Param["MX_MINIMUM"], "font-size:16px;width:90px") . "</td>\n\t\t<td>" . help_icon("{MX_MINIMUM_TEXT}") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{MX_MAXIMUM}:</td>\n\t\t<td>" . Field_text("MX_MAXIMUM-{$t}", $Param["MX_MAXIMUM"], "font-size:16px;width:90px") . "</td>\n\t\t<td>" . help_icon("{MX_MAXIMUM_TEXT}") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{MX_MAX_RSS}:</td>\n\t\t<td style='font-size:16px'>" . Field_text("MX_MAX_RSS-{$t}", $Param["MX_MAX_RSS"], "font-size:16px;width:110px") . " KB</td>\n\t\t<td>" . help_icon("{MX_MAX_RSS_TEXT}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{MX_MAX_AS}:</td>\n\t\t<td style='font-size:16px'>" . Field_text("MX_MAX_AS-{$t}", $Param["MX_MAX_AS"], "font-size:16px;width:110px") . " KB</td>\n\t\t<td>" . help_icon("{MX_MAX_AS_TEXT}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=3 align='right'><hr>" . button("{apply}", "SaveMimeService{$t}()", "18px") . "</td>\n\t</tr>\t\n\t</table>\n\n\t<script>\n\t\tvar x_SaveMimeService{$t}= function (obj) {\n\t\t\tvar tempvalue=obj.responseText;\n\t\t\tif(tempvalue.length>3){alert(tempvalue)};\n\t\t\tdocument.getElementById('{$t}-adddis').innerHTML='';\n\t\t\tYahooWin2Hide();\n\t\t}\t\t\n\t\n\t\tfunction SaveMimeService{$t}(){\n\t\tvar XHR = new XHRConnection(); \n\t\t var DEBUG=0;\n\t\t if(document.getElementById('DEBUG-{$t}').checked){DEBUG=1;}\n\t XHR.appendData('MX_MAX_AS',document.getElementById('MX_MAX_AS-{$t}').value);\n\t XHR.appendData('MX_MAX_RSS',document.getElementById('MX_MAX_RSS-{$t}').value);\n\t XHR.appendData('MX_MAXIMUM',document.getElementById('MX_MAXIMUM-{$t}').value);\n\t XHR.appendData('MX_MINIMUM',document.getElementById('MX_MINIMUM-{$t}').value);\n\t XHR.appendData('MX_REQUESTS',document.getElementById('MX_REQUESTS-{$t}').value);\n\t XHR.appendData('MX_TMPFS',document.getElementById('MX_TMPFS-{$t}').value);\n\t XHR.appendData('DEBUG',DEBUG);\n\t \n\t \n\t\t AnimateDiv('{$t}-adddis');\n\t\t XHR.sendAndLoad('{$page}', 'POST',x_SaveMimeService{$t});\n\t\t}\n\t</script>\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例2: popup
function popup()
{
$sock = new sockets();
$page = CurrentPageName();
$CyrusEnableLMTPUnix = $sock->GET_INFO("CyrusEnableLMTPUnix");
if ($CyrusEnableLMTPUnix == null) {
$CyrusEnableLMTPUnix = 1;
}
$nets["127.0.0.1"] = "127.0.0.1";
$net = new networking();
while (list($num, $ipaddr) = each($net->array_TCP)) {
if ($ipaddr == null) {
continue;
}
$nets[$ipaddr] = $ipaddr;
}
$CyrusLMTPListen = trim($sock->GET_INFO("CyrusLMTPListen"));
if ($CyrusLMTPListen == null) {
$CyrusLMTPListen = "127.0.0.1:2005";
}
if (preg_match("#(.+?):(.+)#", $CyrusLMTPListen, $re)) {
$ipaddr_listen = $re[1];
$port = $re[2];
}
$lmtp_unix = "/var/spool/postfix/var/run/cyrus/socket/lmtp";
$html = "\n\t<div id='cyrus_lmtp_div'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td width=1% valign='top'><img src='img/database-connect-settings-90.png'></td>\n\t\t<td valign='top'>\n\t<div style='font-size:13px;padding:5px'>{cyrus_lmtp_howto}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:13px'>{enable_lmtp_unix}:</td>\n\t\t<td>" . Field_checkbox("CyrusEnableLMTPUnix", 1, $CyrusEnableLMTPUnix, "CyrusEnableLMTPUnixSwitch()") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:13px'>{listen_ip}:</td>\n\t\t<td>\n\t\t\t<table style='width:1%'>\n\t\t\t<tr>\n\t\t\t\t<td width=1%>" . Field_array_Hash($nets, "lmtp_ipaddr", $ipaddr_listen, null, null, 0, "font-size:13px;padding:3px") . "</td>\n\t\t\t\t<td width=1%>:</td>\n\t\t\t\t<td width=1%>" . Field_text("lmtp_port", $port, "font-size:13px;padding:3px;width:40px") . "</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>\n\t\t\t" . button("{apply}", "CyrusEnableLMTPUnixSave()") . "</td>\n\t</tr>\n\t</table>\n\t</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<script>\n\t\n\tvar x_CyrusEnableLMTPUnixSave= function (obj) {\n\t\tYahooWinHide();\n\t}\t\n\t\n\tfunction CyrusEnableLMTPUnixSave(){\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('CyrusEnableLMTPUnix').checked){XHR.appendData('CyrusEnableLMTPUnix',1);}else{XHR.appendData('CyrusEnableLMTPUnix',0);}\n\t\tXHR.appendData('CyrusLMTPListen',document.getElementById('lmtp_ipaddr').value+':'+document.getElementById('lmtp_port').value);\n\t\tdocument.getElementById('cyrus_lmtp_div').innerHTML='<div style=\"width:100%\"><center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center></div>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_CyrusEnableLMTPUnixSave);\n\t}\n\t\t\n\t\tCyrusEnableLMTPUnixSwitch();\n\t</script>\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例3: popup_dns
function popup_dns()
{
$tpl = new templates();
$page = CurrentPageName();
$sock = new sockets();
$t = $_GET["t"];
$resolv_conf = explode("\n", @file_get_contents("/etc/resolv.conf"));
while (list($index, $lines) = each($resolv_conf)) {
if (preg_match("#127\\.0\\.0\\.1#", $lines)) {
continue;
}
if (preg_match("#^nameserver\\s+(.+)#", $lines, $re)) {
$g = trim($re[1]);
if ($g == "127.0.0.1") {
continue;
}
$arrayNameServers[] = $g;
}
}
$hostname = base64_decode($sock->getFrameWork("network.php?fqdn=yes"));
if (preg_match("#Name or service not known#", $hostname)) {
$mustchangeHostname = true;
$hostname = null;
}
if ($hostname == null) {
$users = new usersMenus();
$hostname = $users->fqdn;
}
$WizardNetLeaveUnconfigured = $sock->GET_INFO("WizardNetLeaveUnconfigured");
$html = "\n\t<center>\n\t<table style='width:80%' class=form>\n\t<tr>\n\t\t<td class=legend nowrap style='font-size:14px'>{i_prefer_leave_unconfigured}:</td>\n\t\t<td>" . Field_checkbox("WizardNetLeaveUnconfigured", 1, $WizardNetLeaveUnconfigured, "WizardNetLeaveUnconfiguredSave()") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{hostname}:</td>\n\t\t<td>" . Field_text("hostname-{$t}", $hostname, "font-size:14px;width:210px") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{primary_dns}:</td>\n\t\t<td>" . field_ipv4("DNS1-{$t}", $arrayNameServers[0], "font-size:14px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{secondary_dns}:</td>\n\t\t<td>" . field_ipv4("DNS2-{$t}", $arrayNameServers[1], "font-size:14px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=2 align='right'>" . button("{apply}", "SaveDNS{$t}()", 13) . "</td>\n\t</tr>\n\t</table>\n\t</center>\n\t<script>\n\tvar x_SaveDNS{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>3){alert(results);}\n\t\tWizardDNSRefresh();\n\t}\t\n\t\n\tfunction SaveDNS{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('DNS1',document.getElementById('DNS1-{$t}').value);\n\t\tXHR.appendData('DNS2',document.getElementById('DNS2-{$t}').value);\n\t\tXHR.appendData('hostname',document.getElementById('hostname-{$t}').value);\n\t\tAnimateDiv('{$t}-dns');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_SaveDNS{$t});\t\n\t\n\t}\t\t\n</script>\t\n\t\n\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例4: page
function page()
{
$page = CurrentPageName();
$tpl = new templates();
$freeweb = new freeweb($_GET["servername"]);
if (!is_numeric($freeweb->Params["MOD_FCGID"]["enabled"])) {
$freeweb->Params["MOD_FCGID"]["enabled"] = 0;
}
if (!is_numeric($freeweb->Params["MOD_FCGID"]["PHP_FCGI_MAX_REQUESTS"])) {
$freeweb->Params["MOD_FCGID"]["PHP_FCGI_MAX_REQUESTS"] = 5000;
}
if (!is_numeric($freeweb->Params["MOD_FCGID"]["PHP_FCGI_CHILDREN"])) {
$freeweb->Params["MOD_FCGID"]["PHP_FCGI_CHILDREN"] = 8;
}
if (!is_numeric($freeweb->Params["MOD_FCGID"]["FcgidBusyTimeout"])) {
$freeweb->Params["MOD_FCGID"]["FcgidBusyTimeout"] = 300;
}
if (!is_numeric($freeweb->Params["MOD_FCGID"]["FcgidIdleTimeout"])) {
$freeweb->Params["MOD_FCGID"]["FcgidIdleTimeout"] = 300;
}
if (!is_numeric($freeweb->Params["MOD_FCGID"]["FcgidMaxRequestInMem"])) {
$freeweb->Params["MOD_FCGID"]["FcgidMaxRequestInMem"] = 65536;
}
if (!is_numeric($freeweb->Params["MOD_FCGID"]["FcgidMaxProcessesPerClass"])) {
$freeweb->Params["MOD_FCGID"]["FcgidMaxProcessesPerClass"] = 100;
}
if (!is_numeric($freeweb->Params["MOD_FCGID"]["FcgidMaxRequestLen"])) {
$freeweb->Params["MOD_FCGID"]["FcgidMaxRequestLen"] = 131072;
}
if (!is_numeric($freeweb->Params["MOD_FCGID"]["FcgidOutputBufferSize"])) {
$freeweb->Params["MOD_FCGID"]["FcgidOutputBufferSize"] = 65536;
}
$html = "\n\t<div id='mod_fcgi_div'>\n\t<div class=explain>{apache_mod_fcgid_explain}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend>{enable}:<td>\n\t\t<td>" . Field_checkbox("Modfcgid_enabled", 1, $freeweb->Params["MOD_FCGID"]["enabled"], "MOD_FCGIDEnableCheck()") . "</td>\n\t\t<td> </td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{php_values}:<td>\n\t\t<td><a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('freeweb.edit.fcgid.php.php?servername={$_GET["servername"]}');\"\n\t\tstyle='font-size:13px;font-weight:bold;text-decoration:underline'>{apply}</a>\n\t\t</td>\n\t\t<td> </td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend>{PHP_FCGI_MAX_REQUESTS}:<td>\n\t\t<td>" . Field_text("PHP_FCGI_MAX_REQUESTS", $freeweb->Params["MOD_FCGID"]["PHP_FCGI_MAX_REQUESTS"], "font-size:13px;padding:3px;width:90px") . " </td>\n\t\t<td> </td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend>{PHP_FCGI_CHILDREN}:<td>\n\t\t<td>" . Field_text("PHP_FCGI_CHILDREN", $freeweb->Params["MOD_FCGID"]["PHP_FCGI_CHILDREN"], "font-size:13px;padding:3px;width:90px") . " </td>\n\t\t<td> </td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{FcgidMaxProcessesPerClass}:<td>\n\t\t<td>" . Field_text("FcgidMaxProcessesPerClass", $freeweb->Params["MOD_FCGID"]["FcgidMaxProcessesPerClass"], "font-size:13px;padding:3px;width:90px") . " </td>\n\t\t<td>" . help_icon("{FcgidMaxProcessesPerClass_explain}") . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td class=legend>{FcgidBusyTimeout}:<td>\n\t\t<td>" . Field_text("FcgidBusyTimeout", $freeweb->Params["MOD_FCGID"]["FcgidBusyTimeout"], "font-size:13px;padding:3px;width:90px") . " {seconds}</td>\n\t\t<td>" . help_icon("{FcgidBusyTimeout_explain}") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend>{FcgidIdleTimeout}:<td>\n\t\t<td>" . Field_text("FcgidIdleTimeout", $freeweb->Params["MOD_FCGID"]["FcgidIdleTimeout"], "font-size:13px;padding:3px;width:90px") . " {seconds}</td>\n\t\t<td>" . help_icon("{FcgidIdleTimeout_explain}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{FcgidMaxRequestInMem}:<td>\n\t\t<td>" . Field_text("FcgidMaxRequestInMem", $freeweb->Params["MOD_FCGID"]["FcgidMaxRequestInMem"], "font-size:13px;padding:3px;width:90px") . " bytes</td>\n\t\t<td>" . help_icon("{FcgidMaxRequestInMem_explain}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend>{FcgidMaxRequestLen}:<td>\n\t\t<td>" . Field_text("FcgidMaxRequestLen", $freeweb->Params["MOD_FCGID"]["FcgidMaxRequestLen"], "font-size:13px;padding:3px;width:90px") . " bytes</td>\n\t\t<td>" . help_icon("{FcgidMaxRequestLen_explain}") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend>{FcgidOutputBufferSize}:<td>\n\t\t<td>" . Field_text("FcgidOutputBufferSize", $freeweb->Params["MOD_FCGID"]["FcgidOutputBufferSize"], "font-size:13px;padding:3px;width:90px") . " bytes</td>\n\t\t<td>" . help_icon("{FcgidOutputBufferSize_explain}") . "</td>\n\t</tr>\t\n\t\n\t\n\t<tr>\n\t\t<td colspan=3 align='right'><hr>" . button("{apply}", "SaveModFCGID()") . "</td>\n\t</tr>\n\t</tbody>\n\t</table>\t\n\t</div>\n\n\t\n\t\n\t\n\t<script>\n\t\tvar x_SaveModFCGID=function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){alert(results);}\t\n\t\t\tRefreshTab('main_config_freewebedit');\t\n\t\t}\t\t\n\t\n\t\tfunction SaveModFCGID(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tif(document.getElementById('Modfcgid_enabled').checked){XHR.appendData('enabled',1);}else{XHR.appendData('enabled',0);}\t\t\n\t\t\tXHR.appendData('PHP_FCGI_MAX_REQUESTS',document.getElementById('PHP_FCGI_MAX_REQUESTS').value);\n\t\t\tXHR.appendData('PHP_FCGI_CHILDREN',document.getElementById('PHP_FCGI_CHILDREN').value);\n\t\t\tXHR.appendData('FcgidMaxProcessesPerClass',document.getElementById('FcgidMaxProcessesPerClass').value);\n\t\t\tXHR.appendData('FcgidBusyTimeout',document.getElementById('FcgidBusyTimeout').value);\n\t\t\t\n\t\t\tXHR.appendData('FcgidBusyTimeout',document.getElementById('FcgidBusyTimeout').value);\n\t\t\tXHR.appendData('FcgidIdleTimeout',document.getElementById('FcgidIdleTimeout').value);\n\t\t\tXHR.appendData('FcgidMaxRequestInMem',document.getElementById('FcgidMaxRequestInMem').value);\n\t\t\tXHR.appendData('FcgidMaxRequestLen',document.getElementById('FcgidMaxRequestLen').value);\n\t\t\tXHR.appendData('FcgidOutputBufferSize',document.getElementById('FcgidOutputBufferSize').value);\n\t\t\t\n\t\t\tXHR.appendData('servername','{$_GET["servername"]}');\n\t\t\tAnimateDiv('mod_fcgi_div');\n \t\tXHR.sendAndLoad('{$page}', 'POST',x_SaveModFCGID);\n\t\t}\t\n\t\t\n\t\tfunction MOD_FCGIDEnableCheck(){\n\t\t\tdocument.getElementById('PHP_FCGI_MAX_REQUESTS').disabled=true;\n\t\t\tdocument.getElementById('PHP_FCGI_CHILDREN').disabled=true;\n\t\t\tdocument.getElementById('FcgidMaxProcessesPerClass').disabled=true;\n\t\t\tdocument.getElementById('FcgidBusyTimeout').disabled=true;\n\t\t\tdocument.getElementById('FcgidIdleTimeout').disabled=true;\n\t\t\tdocument.getElementById('FcgidMaxRequestInMem').disabled=true;\n\t\t\tdocument.getElementById('FcgidMaxRequestLen').disabled=true;\n\t\t\tdocument.getElementById('FcgidOutputBufferSize').disabled=true;\n\t\t\t\n\t\t\tif(document.getElementById('Modfcgid_enabled').checked){\n\t\t\t\tdocument.getElementById('PHP_FCGI_MAX_REQUESTS').disabled=false;\n\t\t\t\tdocument.getElementById('PHP_FCGI_CHILDREN').disabled=false;\n\t\t\t\tdocument.getElementById('FcgidMaxProcessesPerClass').disabled=false;\n\t\t\t\tdocument.getElementById('FcgidBusyTimeout').disabled=false;\n\t\t\t\tdocument.getElementById('FcgidIdleTimeout').disabled=false;\n\t\t\t\tdocument.getElementById('FcgidMaxRequestInMem').disabled=false;\n\t\t\t\tdocument.getElementById('FcgidMaxRequestLen').disabled=false;\n\t\t\t\tdocument.getElementById('FcgidOutputBufferSize').disabled=false;\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\tMOD_FCGIDEnableCheck();\n\t\n\t</script>\n\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例5: popup
function popup()
{
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$MonitConfig = unserialize(base64_decode($sock->GET_INFO("SambaWatchdogMonitConfig")));
//print_r($MonitConfig);
if (!is_numeric($MonitConfig["watchdog"])) {
$MonitConfig["watchdog"] = 1;
}
if (!is_numeric($MonitConfig["watchdogCPU"])) {
$MonitConfig["watchdogCPU"] = 95;
}
if (!is_numeric($MonitConfig["watchdogMEM"])) {
$MonitConfig["watchdogMEM"] = 1500;
}
$MONIT_INSTALLED = 0;
$users = new usersMenus();
if ($users->MONIT_INSTALLED) {
$MONIT_INSTALLED = 1;
}
$t = time();
$html = "\n\t<div id='{$t}'>\n\t\t<table style='width:99%' class=form>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px'>{enable_watchdog}:</td>\n\t\t\t\t<td>" . Field_checkbox("{$t}-watchdog", 1, $MonitConfig["watchdog"], "InstanceCheckWatchdog{$t}()") . "</td>\n\t\t\t\t<td> </td>\n\t\t\t</tr>\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px'>{notify_when_cpu_exceed}:</td>\n\t\t\t\t<td style='font-size:14px'>" . Field_text("{$t}-watchdogCPU", $MonitConfig["watchdogCPU"], "font-size:14px;width:60px") . " %</td>\n\t\t\t\t<td> </td>\n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px'>{notify_when_memory_exceed}:</td>\n\t\t\t\t<td style='font-size:14px'>" . Field_text("{$t}-watchdogMEM", $MonitConfig["watchdogMEM"], "font-size:14px;width:60px") . " MB</td>\n\t\t\t\t<td> </td>\n\t\t\t</tr>\t\t\n\t\t\t<tr>\n\t\t\t\t<td colspan=3 align='right'><hr>" . button("{apply}", "SaveWatchdog{$t}()", 16) . "</td>\n\t\t\t</tr>\t\n\t\t</tbody>\n\t</table>\n</div>\n<script>\n\tfunction InstanceCheckWatchdog{$t}(){\n\t\tvar MONIT_INSTALLED={$MONIT_INSTALLED};\n\t\tdocument.getElementById('{$t}-watchdog').disabled=true;\n\t\tdocument.getElementById('{$t}-watchdogMEM').disabled=true;\n\t\tdocument.getElementById('{$t}-watchdogCPU').disabled=true;\n\t\tif(MONIT_INSTALLED==0){return;}\n\t\tdocument.getElementById('{$t}-watchdog').disabled=false;\n\t\tif(!document.getElementById('{$t}-watchdog').checked){return;}\n\t\tdocument.getElementById('{$t}-watchdogMEM').disabled=false;\n\t\tdocument.getElementById('{$t}-watchdogCPU').disabled=false;\t\t\n\t\n\t}\n\t\n\t\n\tvar x_{$t}_SaveInstance= function (obj) {\n\t\t\tYahooWin3Hide();\n\t\t}\t\n\t\n\tfunction SaveWatchdog{$t}(){\n\t\tvar XHR = new XHRConnection();\t\n\t\tif(document.getElementById('{$t}-watchdog').checked){XHR.appendData('watchdog',1);}else{XHR.appendData('watchdog',0);}\n\t\tXHR.appendData('watchdogMEM',document.getElementById('{$t}-watchdogMEM').value);\n\t\tXHR.appendData('watchdogCPU',document.getElementById('{$t}-watchdogCPU').value);\n\t\tAnimateDiv('{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_{$t}_SaveInstance);\n\t}\t\n</script>\n\n";
echo $tpl->_ENGINE_parse_body($html);
}
示例6: popup
function popup()
{
$squid = new squidbee();
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$WCCP = 1;
$arrayParams = unserialize(base64_decode($sock->getFrameWork("squid.php?compile-list=yes")));
$t = time();
$ip = new networking();
$ipsH = $ip->ALL_IPS_GET_ARRAY();
$SquidWCCPEnabled = $sock->GET_INFO("SquidWCCPEnabled");
if (!is_numeric($SquidWCCPEnabled)) {
$SquidWCCPEnabled = 0;
}
if (!isset($arrayParams["--enable-wccpv2"])) {
$WCCP = 0;
}
$WCCPHash = unserialize(base64_decode($sock->GET_INFO("WCCPHash")));
$wccp2_forwarding_method_hash = array(1 => "{wccp2_forwarding_method_hash_1}", 2 => "{wccp2_forwarding_method_hash_2}");
$wccp2_return_method_hash = array("gre" => "GRE encapsulation");
$wccp2_assignment_method_hash = array("hash" => "Hash assignment", "mask" => "Mask assignment");
$html = "\n<div style='font-size:22px'>{WCCP_NAME}</div>\n<div class=explain style='font-size:14px'>{WCCP_HOWTO}</div>\n<div id='SquidAVParamWCCP' style='width:98%' class=form>\n<table style='width:100%'>\n\t<tr>\n\t<td style='font-size:16px;' class=legend>{wccp2_enabled}:</td>\n\t<td>" . Field_checkbox("wccp2_enabled", 1, $squid->wccp2_enabled, "wccp2_enabled()") . "</td>\n\t<td> </td>\n\t</tr>\n\n\n\t<tr>\n\t\t<td style='font-size:16px' class=legend nowrap>{wccp2_routers}:</td>\n\t\t<td>" . Field_text("wccp2_router", $WCCPHash["wccp2_router"], "font-size:16px;padding:3px;width:320px") . "</td>\n\t\t<td>" . help_icon("{wccp2_routers_explain}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:16px' class=legend nowrap>{listen_address}:</td>\n\t\t<td>" . Field_array_Hash($ipsH, "listen_address-{$t}", $WCCPHash["listen_address"], "style:font-size:16px") . "</td>\n\t\t<td></td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:16px' class=legend nowrap>{wccp2_forwarding_method}:</td>\n\t\t<td>" . Field_array_Hash($wccp2_forwarding_method_hash, "wccp2_forwarding_method", $WCCPHash["wccp2_forwarding_method"], "style:font-size:16px") . "</td>\n\t\t<td> </td>\n\t</tr>\n\n\t<tr>\n\t\t<td style='font-size:16px' class=legend nowrap>{wccp2_return_method}:</td>\n\t\t<td>" . Field_array_Hash($wccp2_return_method_hash, "wccp2_return_method", $WCCPHash["wccp2_return_method"], "style:font-size:16px") . "</td>\n\t\t<td> </td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:16px' class=legend nowrap>{wccp2_assignment_method}:</td>\n\t\t<td>" . Field_array_Hash($wccp2_assignment_method_hash, "wccp2_assignment_method", $WCCPHash["wccp2_assignment_method"], "style:font-size:16px") . "</td>\n\t\t<td> </td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=3 align='right'>\n\t\t\t<hr>\n\t\t\t\t" . button("{apply}", "SquidWccp2ParamSave()", 18) . "\n\t\t</td>\n\t</tr>\n\t</table>\n</div>\n<script>\nvar X_SquidWccp2ParamSave= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);}\n\tLoadjs('squid.restart.php?prepare-js=yes');\n\t\n}\n\nfunction SquidWccp2ParamSave(){\n\tvar XHR = new XHRConnection();\n\tif(document.getElementById('wccp2_enabled').checked){\n\t\tXHR.appendData('wccp2_enabled',1);\n\t}else{\n\t\tXHR.appendData('wccp2_enabled',0);\n\t}\n\tXHR.appendData('wccp2_router',\n\tdocument.getElementById('wccp2_router').value);\n\n\tXHR.appendData('wccp2_forwarding_method',\n\tdocument.getElementById('wccp2_forwarding_method').value);\n\n\tXHR.appendData('wccp2_return_method',\n\tdocument.getElementById('wccp2_return_method').value);\n\n\tXHR.appendData('wccp2_assignment_method',\n\tdocument.getElementById('wccp2_assignment_method').value);\n\t\n\tXHR.appendData('listen_address',\n\tdocument.getElementById('listen_address-{$t}').value);\n\n\tXHR.sendAndLoad('{$page}', 'POST',X_SquidWccp2ParamSave);\n}\n\n\nfunction wccp2_disable_all(){\n\tdocument.getElementById('wccp2_forwarding_method').disabled=true;\n\tdocument.getElementById('wccp2_router').disabled=true;\n\tdocument.getElementById('wccp2_forwarding_method').disabled=true;\n\tdocument.getElementById('wccp2_return_method').disabled=true;\n\tdocument.getElementById('wccp2_assignment_method').disabled=true;\n\tdocument.getElementById('listen_address-{$t}').disabled=true;\n\t\n}\nfunction wccp2_enable_all(){\n\tdocument.getElementById('wccp2_forwarding_method').disabled=false;\n\tdocument.getElementById('wccp2_router').disabled=false;\n\tdocument.getElementById('wccp2_forwarding_method').disabled=false;\n\tdocument.getElementById('wccp2_return_method').disabled=false;\n\tdocument.getElementById('wccp2_assignment_method').disabled=false;\n\tdocument.getElementById('listen_address-{$t}').disabled=false;\n}\n\nfunction wccp2_enabled(){\n\twccp2_disable_all();\n\tvar wccp2={$WCCP};\n\tif(wccp2==0){\n\t\tdocument.getElementById('wccp2_enabled').disabled=true;\n\t\tdocument.getElementById('wccp2_enabled').checked=false;\n\t}\n\tif(document.getElementById('wccp2_enabled').checked){wccp2_enable_all();}\n}\n\nwccp2_enabled();\n</script>";
echo $tpl->_ENGINE_parse_body($html);
}
示例7: search
function search()
{
$ocs = new ocs();
$page = CurrentPageName();
$sql = $ocs->COMPUTER_SEARCH_QUERY($_GET["search"]);
$q = new mysql();
$FILEID = $_GET["FILEID"];
$results = $q->QUERY_SQL($sql, "ocsweb");
if (!$q->ok) {
echo "<p> </p><p style='font-size:15px'>{$q->mysql_error}<hr>{$sql}</p>";
return;
}
$html = "\n\t<table style='width:100%;'>\n\t<tr>\n\t\t<th colspan=2>{computer}</th>\n\t\t<th>{ip_address}</th>\n\t\t<th>{affected}</th>\n\t</tr>";
$hash = $ocs->PACKAGE_HASH_AFFECTED_COMPUTERS($FILEID);
while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
if ($ligne["IPADDRESS"] == "0.0.0.0") {
continue;
}
$HARDWARE_ID = $ligne["ID"];
$html = $html . "\n\t\t<tr " . CellRollOver() . ">\n\t\t<td width=1%><img src='img/laptop-32.png'></td>\n\t\t\t<td style='font-size:13px'>{$ligne["NAME"]}</td>\n\t\t\t<td style='font-size:13px'>{$ligne["IPSRC"]}</td>\n\t\t\t<td>" . Field_checkbox("ID_{$HARDWARE_ID}", 1, $hash[$HARDWARE_ID], "OCSPackageAffectID({$HARDWARE_ID})") . "</td>\n\t\t</tr>\n\t\t";
}
$html = $html . "</table>\n\t<script>\n\t\tvar x_OCSPackageAffectID=function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif (results.length>0){\n\t\t\t\talert(results);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(document.getElementById('packages-list')){\n\t\t\t\tRefreshOCSPackageList();\n\t\t\t}\n\t\t}\n\t\t\n\t\tfunction OCSPackageAffectID(HARDWARE_ID){\n\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tif(document.getElementById('ID_'+HARDWARE_ID).checked){\n\t\t\t\t\tXHR.appendData('AffectPackageToValue','1');\n\t\t\t\t}else{\n\t\t\t\t\tXHR.appendData('AffectPackageToValue','0');\n\t\t\t\t}\n\t\t\t\tXHR.appendData('FILEID','{$FILEID}');\n\t\t\t\tXHR.appendData('HARDWARE_ID',HARDWARE_ID);\n\t\t\t\tXHR.sendAndLoad('{$page}', 'GET',x_OCSPackageAffectID);\n\t\t}\t\n\t\n\t</script>\n\t\n\t\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例8: popup_list
function popup_list()
{
$search = trim($_GET["search"]);
if ($search != null) {
$sqladd = " AND `uri` LIKE '{$search}%' ";
}
$sql = "SELECT * FROM squid_adzapper WHERE `uri_type`='{$_GET["selected"]}' {$sqladd} ORDER BY ID DESC LIMIT 0,100";
$q = new mysql();
$tpl = new templates();
$results = $q->QUERY_SQL($sql, "artica_backup");
if (!$q->ok) {
echo "<H2>{$q->mysql_error}</H2>";
}
$html = "<table cellspacing='0' cellpadding='0' border='0' class='tableView'>\n<thead class='thead'>\n\t<tr>\n\t<th colspan=4>{ZAP_{$_GET["selected"]}}: {ZAP_{$_GET["selected"]}_explain}</th>\n\t</tr>\n</thead>\n<tbody class='tbody'>";
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
if ($classtr == "oddRow") {
$classtr = null;
} else {
$classtr = "oddRow";
}
$html = $html . "\n\t\t<tr class={$classtr}>\n\t\t<td width=1%><img src='img/fw_bold.gif'></td>\n\t\t<td><code style='font-size:13px'>{$ligne["uri"]}</code></td>\n\t\t<td width=1%>" . Field_checkbox("addzapp_{$ligne["ID"]}", 1, $ligne["enabled"], "AddZapEnable('{$ligne["ID"]}')") . "</td>\n\t\t<td width=1%>" . imgtootltip("delete-32.png", "{delete}", "AddZapDelete('{$ligne["ID"]}')") . "</td>\n\t\t</tr>";
}
$html = $html . "</tbody></table>";
echo $tpl->_ENGINE_parse_body($html);
}
示例9: popup
function popup()
{
$tpl = new templates();
$page = CurrentPageName();
$t = time();
$taskid = $_GET["taskid"];
$index = $_GET["index"];
$buttonname = "{add}";
if (!is_numeric($index)) {
$index = -1;
}
if ($index > -1) {
$buttonname = "{apply}";
$sql = "SELECT datasbackup FROM backup_schedules WHERE ID='{$taskid}'";
$q = new mysql();
$ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
$ressources = unserialize(base64_decode($ligne["datasbackup"]));
preg_match("#WEBGET:(.*)#", $ressources[$index], $re);
$ligne = unserialize(base64_decode($re[1]));
$copy = imgtootltip("img/copy-16.png", "{copy}", "CopyWebGetSite('{$re[1]}')");
}
if ($_GET["CopyFrom"] != null) {
$ligne = unserialize(base64_decode($_GET["CopyFrom"]));
unset($ligne["RemoteArticaSite"]);
}
if (!is_numeric($ligne["RemoteArticaPort"])) {
$ligne["RemoteArticaPort"] = 9000;
}
$html = "\n\t<div id='{$t}'>\n\t<div style='float:right;margin-bottom:10px'>{$copy}</div>\n\t</div>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{remote_artica_server}:</td>\n\t\t<td>" . Field_text("RemoteArticaServer-{$t}", $ligne["RemoteArticaServer"], "font-size:14px;width:220px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{remote_artica_port}:</td>\n\t\t<td>" . Field_text("RemoteArticaPort-{$t}", $ligne["RemoteArticaPort"], "font-size:14px;width:90px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{username}:</td>\n\t\t<td>" . Field_text("RemoteArticaUser-{$t}", $ligne["RemoteArticaUser"], "font-size:14px;width:220px") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{password}:</td>\n\t\t<td>" . Field_password("RemoteArticaPassword-{$t}", $ligne["RemoteArticaPassword"], "font-size:14px;width:220px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{sitename}:</td>\n\t\t<td>" . Field_text("RemoteArticaSite-{$t}", $ligne["RemoteArticaSite"], "font-size:14px;width:220px") . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{auto-restore}:</td>\n\t\t<td>" . Field_checkbox("AutoRestore-{$t}", 1, $ligne["AutoRestore"], "DefaultCheck{$t}()") . "</td>\n\t</tr>\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{mysql_instance}:</td>\n\t\t<td><span id='freeweb-mysql-instances-{$t}'></span></td>\n\t</tr>\t\n\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{sitename}:</td>\n\t\t<td>" . Field_text("AutoRestoreSiteName-{$t}", $ligne["AutoRestoreSiteName"], "font-size:14px;width:99%") . "</td>\n\t</tr>\t\n\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button($buttonname, "SaveConfig{$t}()", 16) . "</td>\n\t</tr>\n\t</table>\n<script>\n\tvar x_SaveConfig{$t}= function (obj) {\n\t\t\tvar index={$index};\n\t\t\tdocument.getElementById('{$t}').innerHTML='';\n\t\t\tvar tempvalue=obj.responseText;\n\t\t\tif(tempvalue.length>3){alert(tempvalue);return;};\n\t\t\tif(document.getElementById('backup-sources-table-list')){ \$('#backup-sources-table-list').flexReload(); }\n\t\t\tif(document.getElementById('table-backup-tasks')){ \$('#table-backup-tasks').flexReload(); }\n\t\t\tif(index<0){ YahooWin4Hide(); }\n\t\t\t\n\t\t }\t\n\n\tfunction SaveConfig{$t}(){\n\t\t\tif(!document.getElementById('AutoRestoreSqlInstance-{$t}')){alert('AutoRestoreSqlInstance-{$t} no such id');return;}\n\t\t\tvar tt=document.getElementById('RemoteArticaSite-{$t}').value;\n\t\t\tif(tt.length<3){return;}\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('taskid',{$taskid});\n\t\t\tXHR.appendData('index','{$index}');\n\t\t\tXHR.appendData('RemoteArticaServer',document.getElementById('RemoteArticaServer-{$t}').value);\n\t\t\tXHR.appendData('RemoteArticaPort',document.getElementById('RemoteArticaPort-{$t}').value);\n\t\t\tXHR.appendData('RemoteArticaUser',document.getElementById('RemoteArticaUser-{$t}').value);\n\t\t\tXHR.appendData('RemoteArticaSite',document.getElementById('RemoteArticaSite-{$t}').value);\n\t\t\tvar pp=encodeURIComponent(document.getElementById('RemoteArticaPassword-{$t}').value);\n\t\t\tif(document.getElementById('AutoRestore-{$t}').checked){XHR.appendData('AutoRestore',1);}else{XHR.appendData('AutoRestore',0);}\n\t\t\tXHR.appendData('AutoRestoreSiteName',document.getElementById('AutoRestoreSiteName-{$t}').value);\n\t\t\tXHR.appendData('AutoRestoreSqlInstance',document.getElementById('AutoRestoreSqlInstance-{$t}').value);\n\t\t\tXHR.appendData('RemoteArticaPassword',pp);\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_SaveConfig{$t});\n\t\t\tAnimateDiv('{$t}');\n\t\n\t}\n\n\tfunction CopyWebGetSite(hash){\n\t\tLoadjs('{$page}?CopyFrom='+hash+'&taskid={$taskid}');\n\t}\n\n\tfunction freeweb_mysql_instances{$t}(){\n\t\tLoadAjaxTiny('freeweb-mysql-instances-{$t}','freeweb.edit.php?freeweb-mysql-instances-field=yes&servername=&t={$t}&default-value={$ligne["AutoRestoreSqlInstance"]}&field-name=AutoRestoreSqlInstance-{$t}');\n\t}\n\t\n\tfunction DefaultCheck{$t}(){\n\t\tdocument.getElementById('AutoRestoreSiteName-{$t}').disabled=true;\n\t\tif(document.getElementById('AutoRestoreSqlInstance-{$t}')){document.getElementById('AutoRestoreSqlInstance-{$t}').disabled=true;}\n\t\t\n\t\tif(document.getElementById('AutoRestore-{$t}').checked){\n\t\t\tdocument.getElementById('AutoRestoreSiteName-{$t}').disabled=false;\n\t\t\tif(document.getElementById('AutoRestoreSqlInstance-{$t}')){document.getElementById('AutoRestoreSqlInstance-{$t}').disabled=false;}\n\t\t}\n\t\t\n\t}\n\tfunction mysql_instance_id_check(){}\n\t\n\tfreeweb_mysql_instances{$t}();\n\tDefaultCheck{$t}();\n\n\n\n</script>\t\n\t\n\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例10: popup
function popup()
{
$users = new usersMenus();
if (!$users->APACHE_INSTALLED) {
$html = "\n<table style='width:100%'>\n<tr>\n\t<td valign='top'><img id='zrfa-logo' src='img/zarfa-web-error-128.png'></td>\n\t<td valign='top'>\t\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td colspan=2><H3>{WEBMAIL}</H3>\n\t\t\t<p style='font-size:14px;color:#C61010'>{ZARAFA_ERROR_NO_APACHE}</p>\n\t\t\t\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t</td>\n\t</tr>\n\t</table>";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
return;
}
$sock = new sockets();
$ZarafaApachePort = $sock->GET_INFO("ZarafaApachePort");
$enable_ssl = $sock->GET_INFO("ZarafaApacheSSL");
if ($ZarafaApachePort == null) {
$ZarafaApachePort = "9010";
}
$ZarafaiCalEnable = $sock->GET_INFO("ZarafaiCalEnable");
${$ZarafaiCalPort} = $sock->GET_INFO('ZarafaiCalPort');
if ($ZarafaiCalPort == null) {
$ZarafaiCalPort = "8088";
}
if ($enable_ssl == null) {
$enable_ssl = "0";
}
if ($ZarafaiCalEnable == null) {
$ZarafaiCalEnable = 0;
}
$html = "\n<table style='width:100%'>\n<tr>\n\t<td valign='top'><img id='zrfa-logo' src='img/zarafa-web-128.png'></td>\n\t<td valign='top'>\n\t\n\t\t<table style='width:100%'>\n\t\t<tr><td colspan=2><H3>{WEBMAIL}</H3></td></tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:12px'>{listen_port}:</td>\n\t\t\t\t<td>" . Field_text("ZarafaApachePort", $ZarafaApachePort, "font-size:12px;padding:3px;width:60px") . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:12px'>{enable_ssl}:</td>\n\t\t\t\t<td>" . Field_checkbox("ZarafaApacheSSL", 1, $enable_ssl) . "</td>\n\t\t\t</tr>\t\n\t\t</table>\n\n\t\t<p> </p>\n\t\t\n\t<table style='width:100%'>\n\t\t<tr><td colspan=2><H3>{APP_ZARAFA_ICAL}</H3></td></tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:12px'>{listen_port}:</td>\n\t\t\t\t<td>" . Field_text("ZarafaiCalPort", $ZarafaiCalPort, "font-size:12px;padding:3px;width:60px") . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:12px'>{enable}:</td>\n\t\t\t\t<td>" . Field_checkbox("ZarafaiCalEnable", 1, $ZarafaiCalEnable) . "</td>\n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t\t<td colspan=2 align='right'>\n\t\t\t\t<hr>\n\t\t\t\t\t" . button("{apply}", "APP_ZARAFA_WEB_SAVE()") . "\n\t\t\t\t</td>\n\t\t\t</tr>\n\t</td>\n\t</tr>\n</table>\n\n\n";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例11: popup
function popup()
{
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$ISOCanDisplayUserNamePassword = $sock->GET_INFO("ISOCanDisplayUserNamePassword");
$ISOCanChangeIP = $sock->GET_INFO("ISOCanChangeIP");
$ISOCanReboot = $sock->GET_INFO("ISOCanReboot");
$ISOCanShutDown = $sock->GET_INFO("ISOCanShutDown");
$ISOCanChangeRootPWD = $sock->GET_INFO("ISOCanChangeRootPWD");
$ISOCanChangeLanguage = $sock->GET_INFO("ISOCanChangeLanguage");
if (!is_numeric($ISOCanChangeLanguage)) {
$ISOCanChangeLanguage = 1;
}
if (!is_numeric($ISOCanDisplayUserNamePassword)) {
$ISOCanDisplayUserNamePassword = 1;
}
if (!is_numeric($ISOCanChangeIP)) {
$ISOCanChangeIP = 1;
}
if (!is_numeric($ISOCanReboot)) {
$ISOCanReboot = 1;
}
if (!is_numeric($ISOCanShutDown)) {
$ISOCanShutDown = 1;
}
if (!is_numeric($ISOCanChangeRootPWD)) {
$ISOCanChangeRootPWD = 1;
}
if (!is_numeric($ISOCanChangeLanguage)) {
$ISOCanChangeLanguage = 1;
}
$html = "\n\t<div id='FROM_ISO_DIV'>\n\t<div class=explain style='margin-top:10px'>{MENU_CONSOLE_TEXT}</div>\n\t<table style='width:99%' class=form>\n\t<tbody>\n\t<tr>\n\t\t<td class=legend>{ISOCanChangeLanguage}</td>\n\t\t<td>" . Field_checkbox("ISOCanChangeLanguage", 1, null, "{$ISOCanChangeLanguage}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{ISOCanDisplayUserNamePassword}</td>\n\t\t<td>" . Field_checkbox("ISOCanDisplayUserNamePassword", 1, null, "{$ISOCanDisplayUserNamePassword}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{ISOCanChangeIP}</td>\n\t\t<td>" . Field_checkbox("ISOCanChangeIP", 1, null, "{$ISOCanChangeIP}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{ISOCanReboot}</td>\n\t\t<td>" . Field_checkbox("ISOCanReboot", 1, null, "{$ISOCanReboot}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{ISOCanShutDown}</td>\n\t\t<td>" . Field_checkbox("ISOCanShutDown", 1, null, "{$ISOCanShutDown}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{ISOCanChangeRootPWD}</td>\n\t\t<td>" . Field_checkbox("ISOCanChangeRootPWD", 1, null, "{$ISOCanChangeRootPWD}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "ISO_SAVESETS()") . "</td></tr>\t\t\t\t\t\n\t</tbody>\n\t</table>\t\n\t</div>\n\t\n\t<script>\n\t\n\tvar x_ISO_SAVESETS=function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>3){alert(results);}\t\n\t\t\tLoadjs('{$page}');\n\t\t}\t\t\n\t\n\t\tfunction ISO_SAVESETS(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tvar ISOCanChangeLanguage=0;\n\t\t\tvar ISOCanDisplayUserNamePassword=0;\n\t\t\tvar ISOCanChangeIP=0;\n\t\t\tvar ISOCanReboot=0;\n\t\t\tvar ISOCanShutDown=0;\n\t\t\tvar ISOCanChangeRootPWD=0;\n\t\t\tif(document.getElementById('ISOCanChangeLanguage').checked){ISOCanChangeLanguage=1;}\n\t\t\tif(document.getElementById('ISOCanDisplayUserNamePassword').checked){ISOCanDisplayUserNamePassword=1;}\n\t\t\tif(document.getElementById('ISOCanChangeIP').checked){ISOCanChangeIP=1;}\n\t\t\tif(document.getElementById('ISOCanReboot').checked){ISOCanReboot=1;}\n\t\t\tif(document.getElementById('ISOCanShutDown').checked){ISOCanShutDown=1;}\n\t\t\tif(document.getElementById('ISOCanChangeRootPWD').checked){ISOCanChangeRootPWD=1;}\n\t\t\tXHR.appendData('ISOCanChangeLanguage',ISOCanChangeLanguage);\n\t\t\tXHR.appendData('ISOCanDisplayUserNamePassword',ISOCanDisplayUserNamePassword);\t\n\t\t\tXHR.appendData('ISOCanChangeIP',ISOCanChangeIP);\t\n\t\t\tXHR.appendData('ISOCanReboot',ISOCanReboot);\t\n\t\t\tXHR.appendData('ISOCanShutDown',ISOCanShutDown);\t\n\t\t\tXHR.appendData('ISOCanChangeRootPWD',ISOCanChangeRootPWD);\t\n\t\t\tAnimateDiv('FROM_ISO_DIV');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_ISO_SAVESETS);\t\n\t\t\t}\n\t\t\t\n\t\t\n\t</script>\n\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例12: settings
function settings()
{
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$users = new usersMenus();
if (strlen($users->squid_ext_session_acl) < 3) {
$error = "<center class=form style='width:95%'>\n\t\t<img src='img/warning-panneau-64.png'>\n\t\t<H2>{squid_ext_session_acl_not_found_explain}</H2>\n\t\t</center>\n\t\t";
}
$SquidEnableSessionEngine = $sock->GET_INFO("SquidEnableSessionEngine");
$SquidSessionEngineTimeOut = $sock->GET_INFO("SquidSessionEngineTimeOut");
$SquidSessionEngineExternalUrl = $sock->GET_INFO("SquidSessionEngineExternalUrl");
if (!is_numeric($SquidEnableSessionEngine)) {
$SquidEnableSessionEngine = 0;
}
if (!is_numeric($SquidSessionEngineTimeOut)) {
$SquidSessionEngineTimeOut = 3600;
}
$array[1800] = "30Mn";
$array[3600] = "1h";
$array[5400] = "1h30";
$array[7200] = "2h";
$array[14400] = "4h";
$array[28800] = "8h";
$array[43200] = "12h";
$array[86400] = "1 {day}";
$array[604800] = "1 {week}";
$t = time();
$html = "{$error}\n\t<div id='div-{$t}'>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{activate_session_engine}:</td>\n\t\t<td>" . Field_checkbox("SquidEnableSessionEngine", 1, $SquidEnableSessionEngine, "SquidEnableSessionEngineCheck()") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{session_max_time}:</td>\n\t\t<td>" . Field_array_Hash($array, "SquidSessionEngineTimeOut", $SquidSessionEngineTimeOut, "style:font-size:14px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{external_webpage}:</td>\n\t\t<td>" . Field_text("SquidSessionEngineExternalUrl", $SquidSessionEngineExternalUrl, "font-size:14px;width:300px") . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "SquidEnableSessionEngineSave()", 16) . "</td>\n\t</tr>\n\t\n\t</table>\n\t</div>\n\t<script>\n\t\tfunction SquidEnableSessionEngineCheck(){\n\t\t\tdocument.getElementById('SquidSessionEngineTimeOut').disabled=true;\n\t\t\tdocument.getElementById('SquidSessionEngineExternalUrl').disabled=true;\n\t\t\tif(document.getElementById('SquidEnableSessionEngine').checked){\n\t\t\t\tdocument.getElementById('SquidSessionEngineTimeOut').disabled=false;\n\t\t\t\tdocument.getElementById('SquidSessionEngineExternalUrl').disabled=false;\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\tvar x_SquidEnableSessionEngineSave{$t}=function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>0){alert(results);}\t\t\n\t\tRefreshTab('main_squid_sessions');\n\t}\t\t\t\n\t\t\n\t\tfunction SquidEnableSessionEngineSave(){\n\t\t\tvar XHR = new XHRConnection();\n\t \t\tXHR.appendData('SquidSessionEngineTimeOut',document.getElementById('SquidSessionEngineTimeOut').value);\n\t \t\tXHR.appendData('SquidSessionEngineExternalUrl',document.getElementById('SquidSessionEngineExternalUrl').value);\n\t\t\tif(document.getElementById('SquidEnableSessionEngine').checked){XHR.appendData('SquidEnableSessionEngine',1);}else{XHR.appendData('SquidEnableSessionEngine',0);}\n\t\t\tAnimateDiv('div-{$t}');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_SquidEnableSessionEngineSave{$t});\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tSquidEnableSessionEngineCheck();\n\t</script>\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例13: main_extensions_bannedextensionslist_list
function main_extensions_bannedextensionslist_list($rule_main = null, $noecho = 0)
{
$q = new mysql();
if ($rule_main == null) {
$rule_main = $_GET["rule_main"];
}
$dans = new dansguardian_rules(null, $rule_main);
writelogs("Loading RuleID={$rule_main}", __FUNCTION__, __FILE__);
$sql = "SELECT * FROM dansguardian_files WHERE filename='bannedextensionlist' AND RuleID={$rule_main}";
writelogs("{$sql}", __FUNCTION__, __FILE__);
$results = $q->QUERY_SQL($sql, "artica_backup");
$style = CellRollOver();
$categ = "\n\t<table style='width:99%' class=form>";
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
$num = $ligne["ID"];
$onoff = Field_checkbox("bannedextensionlist_id_{$num}", 1, $ligne["enabled"], "bannedextensionlist_switch('{$num}')");
$ext = $ligne["pattern"];
$ext = str_replace('.', '', $ext);
$img = "img/ext/def_small.gif";
if (file_exists("img/ext/{$ext}_small.gif")) {
$img = "img/ext/{$ext}_small.gif";
}
$categ = $categ . "<tr {$style}>\n\t\t<td width=1%><IMG SRC='{$img}' id='image_{$num}'></td>\n\t\t<td width=1%>{$onoff}</td>\n\t\t<td width=1% style='font-size:12px'> <strong id='pattern_{$num}'>{$ligne["pattern"]}</strong></td>\n\t\t<td width=98% style='font-size:12px'><strong id='info_{$num}'>{$ligne["infos"]}</strong></td>\n\t\t<td width=1%>" . imgtootltip('ed_delete.gif', '{delete}', "bannedextensionlist_del('{$hostname}','{$rule_main}','{$num}')") . "</td>\n\t\t</tr>\n\t\t";
}
$categ = $categ . "</table>";
$tpl = new templates();
$categ = $tpl->_ENGINE_parse_body($categ);
if ($noecho == 1) {
return $categ;
}
echo $categ;
}
示例14: popup
function popup()
{
$t = time();
$q = new mysql();
$sock = new sockets();
$page = CurrentPageName();
$tpl = new templates();
$results = $q->QUERY_SQL("SELECT servername FROM freeweb WHERE groupware='UPDATEUTILITY'", "artica_backup");
$hash[null] = "{select}";
while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
$servername = $ligne["servername"];
$hash[$servername] = $servername;
}
$UpdateUtilityRedirectEnable = $sock->GET_INFO("UpdateUtilityRedirectEnable");
$UpdateUtilityExternWbsrv = $sock->GET_INFO("UpdateUtilityExternWbsrv");
$UpdateUtilityHTTPSRV = $sock->GET_INFO("UpdateUtilityHTTPSRV");
$UpdateUtilityExternWbsrvAddr = $sock->GET_INFO("UpdateUtilityExternWbsrvAddr");
if ($UpdateUtilityExternWbsrvAddr == null) {
$UpdateUtilityExternWbsrvAddr = "updateserver.example:9010";
}
if (!is_numeric($UpdateUtilityExternWbsrv)) {
$UpdateUtilityExternWbsrv = 0;
}
$html = "\n\t<div id='{$t}'></div>\t\t\n\t<div class=explain style='font-size:14px'>{ufdbguard_updateutility_explain}</div>\n\t\n\t<table style='width:99%' class=form>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{enable_filter_redirection}:</td>\n\t\t\t<td>" . Field_checkbox("UpdateUtilityRedirectEnable", 1, $UpdateUtilityRedirectEnable, "CheckU{$t}()") . "</td>\n\t\t\t<td> </td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{webserver}:</td>\n\t\t\t<td>" . Field_array_Hash($hash, "UpdateUtilityHTTPSRV", $UpdateUtilityHTTPSRV, null, null, 0, "font-size:16px") . "</td>\n\t\t\t<td> </td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{use_external_server}:</td>\n\t\t\t<td>" . Field_checkbox("UpdateUtilityExternWbsrv", 1, $UpdateUtilityExternWbsrv, "CheckU{$t}()") . "</td>\n\t\t\t<td> </td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{webserver}:</td>\n\t\t\t<td>" . Field_text("UpdateUtilityExternWbsrvAddr", $UpdateUtilityExternWbsrvAddr, "font-size:16px;width:250px") . "</td>\n\t\t\t<td> </td>\n\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td colspan=3 align='right'><hr>" . button("{apply}", "Save{$t}()", 18) . "</td>\n\t\t</tr>\n\t\t</table>\n<script>\n\tvar x_Save{$t}= function (obj) {\n\t var results=obj.responseText;\n\t if(results.length>3){alert(results);}\n\t document.getElementById('{$t}').innerHTML='';\n\t}\t\n\n\tfunction Save{$t}(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tif(document.getElementById('UpdateUtilityRedirectEnable').checked){XHR.appendData('UpdateUtilityRedirectEnable','1');}else{XHR.appendData('UpdateUtilityRedirectEnable','0');}\n\t\t\tif(document.getElementById('UpdateUtilityExternWbsrv').checked){XHR.appendData('UpdateUtilityExternWbsrv','1');}else{XHR.appendData('UpdateUtilityExternWbsrv','0');}\n\t\t\tXHR.appendData('UpdateUtilityHTTPSRV',document.getElementById('UpdateUtilityHTTPSRV').value);\n\t\t\tXHR.appendData('UpdateUtilityExternWbsrvAddr',document.getElementById('UpdateUtilityExternWbsrvAddr').value);\n\t\t\tAnimateDiv('{$t}');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_Save{$t});\t\n\t\t}\t\n\n\tfunction CheckU{$t}(){\n\t\tdocument.getElementById('UpdateUtilityHTTPSRV').disabled=true;\n\t\tdocument.getElementById('UpdateUtilityExternWbsrvAddr').disabled=true;\n\t\tif(document.getElementById('UpdateUtilityRedirectEnable').checked){\n\t\t\tdocument.getElementById('UpdateUtilityHTTPSRV').disabled=false;\n\t\t}\n\t\t\n\t\tif(document.getElementById('UpdateUtilityExternWbsrv').checked){\n\t\t\tdocument.getElementById('UpdateUtilityHTTPSRV').disabled=true;\n\t\t\tdocument.getElementById('UpdateUtilityExternWbsrvAddr').disabled=false;\t\t\n\t\t}\n\t}\n\tCheckU{$t}()\n</script>\n\t\n";
echo $tpl->_ENGINE_parse_body($html);
}
示例15: popup
function popup()
{
$smb = new samba();
$html = "\n\t<div class=explain>{ACLS_SUPPORT_EXPLAIN}</div>\n\t<hr>\n\t<div id='aclgeneral'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:12px'>{nt_acl_support}</td>\n\t\t<td>" . Field_checkbox("nt acl support", "yes", $smb->main_array["global"]["nt acl support"]) . "</td>\n\t\t<td>" . help_icon("{nt_acl_support_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:12px'>{acl_group_control}</td>\n\t\t<td>" . Field_checkbox("acl group control", "yes", $smb->main_array["global"]["acl group control"]) . "</td>\n\t\t<td>" . help_icon("{acl_group_control_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:12px'>{dos_filemode}</td>\n\t\t<td>" . Field_checkbox("dos filemode", "yes", $smb->main_array["global"]["dos filemode"]) . "</td>\n\t\t<td>" . help_icon("{dos_filemode_text}") . "</td>\n\t</tr>\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:12px'>{map_acl_inherit}</td>\n\t\t<td>" . Field_checkbox("map acl inherit", "yes", $smb->main_array["global"]["map acl inherit"]) . "</td>\n\t\t<td>" . help_icon("{map_acl_inherit_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:12px'>{acl_check_permissions}</td>\n\t\t<td>" . Field_checkbox("acl check permissions", "yes", $smb->main_array["global"]["acl check permissions"]) . "</td>\n\t\t<td>" . help_icon("{acl_check_permissions_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:12px'>{inherit_acls}</td>\n\t\t<td>" . Field_checkbox("inherit acls", "yes", $smb->main_array["global"]["inherit acls"]) . "</td>\n\t\t<td>" . help_icon("{inherit_acls_text}") . "</td>\n\t</tr>\t\n\n\t<tr>\n\t\t<td class=legend style='font-size:12px'>{inherit_permissions}</td>\n\t\t<td>" . Field_checkbox("inherit permissions", "yes", $smb->main_array["global"]["inherit permissions"]) . "</td>\n\t\t<td>" . help_icon("{inherit_permissions_text}") . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td colspan=3 align='right'>\n\t\t<hr>\n\t\t\t" . button("{apply}", "acls_global_save()") . "\n\t\t</td>\n\t</tr>\n\t</table>\n\t</div>\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}