本文整理汇总了PHP中Paragraphe_switch_img函数的典型用法代码示例。如果您正苦于以下问题:PHP Paragraphe_switch_img函数的具体用法?PHP Paragraphe_switch_img怎么用?PHP Paragraphe_switch_img使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Paragraphe_switch_img函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: page
function page()
{
$t = time();
$sock = new sockets();
$tpl = new templates();
$page = CurrentPageName();
$SquidGuardWebUseExternalUri = intval($sock->GET_INFO("SquidGuardWebUseExternalUri"));
$SquidGuardWebExternalUri = $sock->GET_INFO("SquidGuardWebExternalUri");
$SquidGuardWebExternalUriSSL = $sock->GET_INFO("SquidGuardWebExternalUriSSL");
$SquidGuardRedirectBehavior = $sock->GET_INFO("SquidGuardRedirectBehavior");
$SquidGuardRedirectSSLBehavior = $sock->GET_INFO("SquidGuardRedirectSSLBehavior");
$SquidGuardRedirectHTTPCode = intval($sock->GET_INFO("SquidGuardRedirectHTTPCode"));
if ($SquidGuardRedirectBehavior == null) {
$SquidGuardRedirectBehavior = "url";
}
if ($SquidGuardRedirectSSLBehavior == null) {
$SquidGuardRedirectSSLBehavior = "url";
}
if (!is_numeric($SquidGuardRedirectHTTPCode)) {
$SquidGuardRedirectHTTPCode = 302;
}
$redirect_behaviorA["url"] = "{redirect_connexion}";
$redirect_behaviorA["url-rewrite"] = "{rewrite_url}";
$HTTP_CODE[301] = "{Moved_Permanently} (301)";
$HTTP_CODE[302] = "{Moved_Temporarily} (302)";
$HTTP_CODE[303] = "{http_code_see_other} (303)";
$HTTP_CODE[307] = "{Moved_Temporarily} (307)";
$html = "\n\t<div style='width:98%' class=form>\t\t\n\t<div style='font-size:50px;margin-bottom:20px'>{remote_webpage}</div>\n\t" . Paragraphe_switch_img("{UfdbUseGlobalWebPage}", "{UfdbUseGlobalWebPage_explain}", "SquidGuardWebUseExternalUri", $SquidGuardWebUseExternalUri, null, 1000, "check{$t}()") . "<table style='width:98%'>\n\t<tr>\n\t\t<td class=legend style='font-size:24px'>{fulluri}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("SquidGuardWebExternalUri", "{$SquidGuardWebExternalUri}", "font-size:24px;padding:3px;width:1073px", null, null, null, false, "") . "</td>\n\t\t<td> </td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:24px'>{fulluri} (ssl):</td>\n\t\t<td style='font-size:14px'>" . Field_text("SquidGuardWebExternalUriSSL", "{$SquidGuardWebExternalUriSSL}", "font-size:24px;padding:3px;width:1073px", null, null, null, false, "") . "</td>\n\t\t<td> </td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:24px'>{redirect_behavior}:</td>\n\t\t<td>" . Field_array_Hash($redirect_behaviorA, "SquidGuardRedirectBehavior-{$t}", $SquidGuardRedirectBehavior, "style:font-size:24px;padding:3px;width:75%", null, null, null, false, "") . "</td>\n\t\t<td> </td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:24px'>{redirect_behavior} (ssl):</td>\n\t\t<td>" . Field_array_Hash($redirect_behaviorA, "SquidGuardRedirectSSLBehavior-{$t}", $SquidGuardRedirectSSLBehavior, "style:font-size:24px;padding:3px;width:75%", null, null, null, false, "") . "</td>\n\t\t<td> </td>\n\t</tr>\n\t\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:24px'>{redirect_code}:</td>\n\t\t<td>" . Field_array_Hash($HTTP_CODE, "SquidGuardRedirectHTTPCode-{$t}", $SquidGuardRedirectHTTPCode, "style:font-size:24px;padding:3px;width:75%", null, null, null, false, "") . "</td>\n\t\t<td> </td>\n\t</tr>\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t<tr>\n\t\t<td colspan=3 align='right'><hr>" . button("{apply}", "Save{$t}()", 32) . "</td>\n\t</tr>\t\n\t</table>\n\t</div>\n\t<script>\n\nfunction check{$t}(){\n\t\tdocument.getElementById('SquidGuardWebExternalUri').disabled=true;\n\t\tdocument.getElementById('SquidGuardWebExternalUriSSL').disabled=true;\n\t\tdocument.getElementById('SquidGuardRedirectSSLBehavior-{$t}').disabled=true;\n\t\tdocument.getElementById('SquidGuardRedirectBehavior-{$t}').disabled=true;\n\t \tdocument.getElementById('SquidGuardRedirectHTTPCode-{$t}').disabled=true;\n\t\t\n\t\tvar enable=document.getElementById('SquidGuardWebUseExternalUri').value;\n\t\tif(enable==1){\n\t\t\tdocument.getElementById('SquidGuardWebExternalUri').disabled=false;\n\t\t\tdocument.getElementById('SquidGuardWebExternalUriSSL').disabled=false;\n\t\t\tdocument.getElementById('SquidGuardRedirectSSLBehavior-{$t}').disabled=false;\n\t\t\tdocument.getElementById('SquidGuardRedirectBehavior-{$t}').disabled=false;\n\t \t\tdocument.getElementById('SquidGuardRedirectHTTPCode-{$t}').disabled=false;\n\t\t}\n\n}\n\nvar xSave{$t}=function(obj){\n\tLoadjs('dansguardian2.compile.php');\n}\n\n\n\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n XHR.appendData('SquidGuardWebUseExternalUri',document.getElementById('SquidGuardWebUseExternalUri').value);\n XHR.appendData('SquidGuardWebExternalUri',document.getElementById('SquidGuardWebExternalUri').value);\n XHR.appendData('SquidGuardWebExternalUriSSL',document.getElementById('SquidGuardWebExternalUriSSL').value);\n \n \n XHR.appendData('SquidGuardRedirectHTTPCode',document.getElementById('SquidGuardRedirectHTTPCode-{$t}').value);\n XHR.appendData('SquidGuardRedirectBehavior',document.getElementById('SquidGuardRedirectBehavior-{$t}').value);\n XHR.appendData('SquidGuardRedirectSSLBehavior',document.getElementById('SquidGuardRedirectSSLBehavior-{$t}').value);\n \n \n XHR.sendAndLoad('{$page}', 'POST',xSave{$t}); \t\n}\n\n \t\n\t\n\t\ncheck{$t}();\t\n</script>";
echo $tpl->_ENGINE_parse_body($html);
}
示例2: InstantSearch
function InstantSearch()
{
$sock = new sockets();
$button = Paragraphe_switch_img('{InstantSearch_enable}', "{InstantSearch_enable_text}", 'InstantSearchEnable', $sock->GET_INFO('InstantSearchEnable', "{enable_disable}", 300));
$tt["0"] = 0;
for ($i = 1; $i < 100; $i++) {
if ($i < 10) {
$t = "0{$i}";
} else {
$t = $i;
}
$tt[$t] = $i;
}
$hour = $sock->GET_INFO("InstantSearchCrawlPeriod");
if ($hour == null) {
$hour = 120;
}
$hour = $hour / 60;
$save = "<div style='width:100%;text-align:right;margin-top:9px;border-top:1px solid #CCCCCC'>\n\t\t<input type='button' OnClick=\"javascript:InstantSearchSave();\" value='{save} »'>\n\t</div>";
$crawl = "<div style='width:100%;text-align:right;margin-top:9px;border-top:1px solid #CCCCCC'>\n\t\t<input type='button' OnClick=\"javascript:InstantCrawl();\" value='{crawl_now} »'>\n\t</div>";
$logs = "<div style='width:100%;text-align:right;margin-top:9px;border-top:1px solid #CCCCCC'>\n\t\t<input type='button' OnClick=\"javascript:InstantLogs();\" value='{events} »'>\n\t</div>";
$html = "<H1>{InstantSearch}</H1>\n\t<div id='InstantSearchDiv'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' width=60%>{$button}{$save}</td>\n\t\t<td valign='top'>\n\t\t\t<table style='width:100%'>\n\t\t\t<tr>\n\t\t\t\t<td valign='top' class=legend nowrap>{crawl_each}:</td>\n\t\t\t\t<td valign='top' >" . Field_array_Hash($tt, 'InstantSearchCrawlPeriod', $hour) . "</td>\n\t\t\t\t<td valign='top' >{hours}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td colspan=3 ><p class=caption>{crawl_each_0}</p></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t{$save}\n\t\t\t<p> </p>\n\t\t\t{$crawl}\n\t\t\t<p> </p>\n\t\t\t{$logs}\n\t\t</td>\n\t</tr>\n\t</table>\n\t</div>\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例3: page
function page()
{
$page = CurrentPageName();
$tpl = new templates();
$users = new usersMenus();
if (!$users->APACHE_MOD_BW) {
echo FATAL_ERROR_SHOW_128("{the_specified_module_is_not_installed}");
return;
}
$servername_enc = urlencode($_GET["servername"]);
$page = CurrentPageName();
$tpl = new templates();
$q = new mysql();
$sock = new sockets();
$free = new freeweb($_GET["servername"]);
$Params = $free->Params;
$t = time();
$ForceBandWidthModule = intval($Params["ModeBw"]["ForceBandWidthModule"]);
$BandwidthAll = intval($Params["ModeBw"]["BandwidthAll"]);
if ($BandwidthAll == 0) {
$BandwidthAll = 1536000;
}
$BandwidthAll = $BandwidthAll / 1024;
$html = "\n\n\t<div style='width:98%' class=form>\n\t" . Paragraphe_switch_img("{apache_Bandwidth_enable}", "{apache_Bandwidth_explain}", "bandlimit", "{$free->bandlimit}", null, 650) . "\n\t<table style='width:100%'>\n\t<td colspan=3 align=right>" . button("{rules}", "Loadjs('freeweb.mod.bw.php?servername={$servername_enc}')", 24) . "</td>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{limit_all_requests}:</td>\n\t\t<td>" . Field_checkbox("ForceBandWidthModule", 1, $ForceBandWidthModule) . "</td>\n\t\t<td></td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{default_limit}:</td>\n\t\t<td style='font-size:18px'>" . Field_text("BandwidthAll", $BandwidthAll, "font-size:18px;width:90px") . " KB/s</td>\n\t\t<td></td>\n\t</tr>\n\n\t<tr>\n\t\t<td colspan=3 align=right><hr>" . button("{apply}", "Save{$t}()", 24) . "</td>\n\t</tr>\n\t</table>\n\t<p> </p>\n\t</div>\n<script>\n\tvar xSave{$t}=function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){alert(results);}\n\t\t\tRefreshTab('main_freeweb_qos');\n\t}\n\t\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('bandlimit',document.getElementById('bandlimit').value);\n\tif(document.getElementById('ForceBandWidthModule').checked){\n\t\tXHR.appendData('ForceBandWidthModule',1);\n\t}else{\n\t\tXHR.appendData('ForceBandWidthModule',0);\n\t}\n\t\n\t\n\tXHR.appendData('BandwidthAll',document.getElementById('BandwidthAll').value);\n\tXHR.appendData('servername','{$_GET["servername"]}');\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>";
echo $tpl->_ENGINE_parse_body($html);
}
示例4: popup
function popup()
{
$tpl = new templates();
$page = CurrentPageName();
$sock = new sockets();
$DisableGoogleSSL = intval($sock->GET_INFO("DisableGoogleSSL"));
$warn_squid_restart = $tpl->javascript_parse_text("{warn_squid_restart}");
$display_dns_items = $tpl->javascript_parse_text("{display_dns_items}");
$EnableRemoteStatisticsAppliance = $sock->GET_INFO("EnableRemoteStatisticsAppliance");
if (!is_numeric($EnableRemoteStatisticsAppliance)) {
$EnableRemoteStatisticsAppliance = 0;
}
$UnlockWebStats = $sock->GET_INFO("UnlockWebStats");
if (!is_numeric($UnlockWebStats)) {
$UnlockWebStats = 0;
}
if ($UnlockWebStats == 1) {
$EnableRemoteStatisticsAppliance = 0;
}
$t = time();
$button = button("{apply}", "DisableGoogleSSLSave{$t}()", 32);
$enable = Paragraphe_switch_img("{enforce_google_to_non_ssl}", "{enforce_google_to_non_ssl_text}", "DisableGoogleSSL-{$t}", $DisableGoogleSSL, null, 750);
$html = "\n\t<div id='{$t}-div'></div>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t\n\t\t<td width=99%>{$enable}</td>\n\t</tr>\n\t<tr>\n\t\t\n\t\t<td width=99% align='right'><a href=\"javascript:blur();\" OnClick=\"javascript:YahooWin4('500','{$page}?google-dns=yes','{$display_dns_items}')\"\n\t\tstyle='font-size:22px;text-decoration:underline'>{$display_dns_items}</a>\n\t\t</td>\n\t</tr>\t\n\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>{$button}</td>\n\t</tr>\n\t</table>\n\n\t\n\t<script>\n\t\t\n\tvar x_DisableGoogleSSLSave{$t}=function(obj){\n \tvar tempvalue=obj.responseText;\n \tif(tempvalue.length>3){alert(tempvalue);}\n \tLoadjs('squid.google.compile.progress.php');\n \t\n \t}\t\n\n\tfunction DisableGoogleSSLSave{$t}(){\n\t\tif(confirm('{$warn_squid_restart}')){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('DisableGoogleSSL',document.getElementById('DisableGoogleSSL-{$t}').value);\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_DisableGoogleSSLSave{$t});\t\t\n\t\t}\n\t\n\t}\t\t\n\t\t\n\t</script>\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例5: popup
function popup()
{
$sock = new sockets();
$EnableCyrusMasterCluster = $sock->GET_INFO("EnableCyrusMasterCluster");
$CyrusClusterID = $sock->GET_INFO("CyrusClusterID");
$EnableCyrusReplicaCluster = $sock->GET_INFO("EnableCyrusReplicaCluster");
$CyrusClusterPort = $sock->GET_INFO("CyrusClusterPort");
if ($CyrusClusterPort == null) {
$CyrusClusterPort = 2005;
}
if ($CyrusClusterID == null) {
$CyrusClusterID = 1;
}
if ($EnableCyrusReplicaCluster == 1) {
echo popup_as_replica();
exit;
}
if ($EnableCyrusMasterCluster) {
$addreplica = Paragraphe("64-net-server-add.png", "{SET_REPLICA_SERVER}", "{SET_REPLICA_SERVER_TEXT}", "javascript:AddCyrusReplica()");
$sync = Paragraphe("64-syncmbx.png", "{REPLICATE_YOUR_MAILBOXES}", "{REPLICATE_YOUR_MAILBOXES_TEXT}", "javascript:Loadjs('cyrus.sync.client.php')");
}
$rebuild = Buildicon64("DEF_ICO_CYR_REBUILD");
$help_me = Paragraphe("wizard-mail-64.png", "{HELP_ME_RETRANSLATOR}", "{CYRUS_REPLICA_WIZARD_HELP}", "javascript:Loadjs('wizard.cyrus.cluster.php')");
$enable = Paragraphe_switch_img('{ENABLE_CYRUS_CLUSTER_MASTER}', '{ENABLE_CYRUS_CLUSTER_MASTER_TEXT}', 'EnableCyrusMasterCluster', $EnableCyrusMasterCluster, "ENABLE_CYRUS_CLUSTER_MASTER_TEXT", 300);
$form1 = "<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' class=legend>{listen_cluster_port}:</td>\n\t\t<td valign='top'>" . Field_text('CyrusClusterPort', $CyrusClusterPort, 'width:60px') . "</td>\n\t\t<td> </td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' class=legend>{uid}:</td>\n\t\t<td valign='top'>" . Field_text('CyrusClusterID', $CyrusClusterID, 'width:20px') . "</td>\n\t\t<td valign='top'>" . help_icon('{CyrusClusterID_TEXT}') . "</td>\n\t</tr>\t\n\t</table>";
$form = "<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>{$enable}</td>\n\t</tr>\n\t<tr>\n\t<td valign='top'>{$form1}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' align='right'><hr>\n\t\t" . button("{edit}", "EnableCyrusMasterCluster()") . "\n\t\t\t\n\t\t</td>\n\t</tr>\n\t</table>\n\t\n\t";
$html = "<H1>{CYRUS_CLUSTER}</H1>\n\t<div id='wizard_zone'>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'><img src='img/128-cluster.png'></td>\n\t<td valign='top'>\n\t<p class=caption>{CYRUS_CLUSTER_EXPLAIN}</p>\n\t{$form}\n\t</td>\n\t<td valign='top'>{$addreplica}<br>{$rebuild}<br>{$sync}<br>{$help_me}</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<br>\n\t\n\t\n\t\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
//http://madole.net/pushmail/
}
示例6: MAIN_STATUS_MIDDLE
function MAIN_STATUS_MIDDLE()
{
$tpl = new templates();
$page = CurrentPageName();
$sock = new sockets();
$t = time();
$EnableNginx = intval($sock->GET_INFO("EnableNginx"));
$EnableFreeWeb = intval($sock->GET_INFO("EnableFreeWeb"));
$EnableNginxMail = intval($sock->GET_INFO("EnableNginxMail"));
$SQUIDEnable = trim($sock->GET_INFO("SQUIDEnable"));
$users = new usersMenus();
if (!is_numeric($SQUIDEnable)) {
$SQUIDEnable = 1;
}
$p1 = Paragraphe_switch_img("{enable_reverse_proxy_service}", "{enable_reverse_proxy_service_explain}", "EnableNginx-{$t}", $EnableNginx, null, 1072);
$p2 = Paragraphe_switch_disable("{enable_reverse_imap_proxy_service}", "{enable_reverse_imap_proxy_service_explain}", "EnableNginxMail-{$t}", $EnableNginxMail, null, 1072);
$p3 = Paragraphe_switch_img("{enable_freeweb}", "{enable_freeweb_text}", "EnableFreeWeb-{$t}", $EnableFreeWeb, null, 1072);
if ($users->SQUID_INSTALLED) {
$p4 = Paragraphe_switch_img("{enable_squid_service}", "{enable_squid_service_explain}<br>{enable_squid_service_text}", "SQUIDEnable-{$t}", $SQUIDEnable, null, 1072);
}
$p2 = "<br>{$p2}";
$p2 = null;
$html = "{$p1}<br>{$p3}<br>{$p4}{$p2}<hr>\n\t<div style='text-align:right;width:98%'>" . button("{apply}", "Save{$t}()", 40) . "</div>\n\t<script>\n\t\t\t\n\tvar xSave{$t}=function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tLoadjs('nginx.verif.progress.php');\n\t\t}\t\n\t\t\n\t\tfunction Save{$t}(){\n\t\t\tvar XHR = new XHRConnection();\n \t\tXHR.appendData('EnableFreeWeb',document.getElementById('EnableFreeWeb-{$t}').value);\n \t\tXHR.appendData('EnableNginx',document.getElementById('EnableNginx-{$t}').value);\n \t\tif(document.getElementById('EnableNginxMail-{$t}')){\n \t\t\tXHR.appendData('EnableNginxMail',document.getElementById('EnableNginxMail-{$t}').value);\n \t\t}\n \t\tif(document.getElementById('SQUIDEnable-{$t}')){\n \t\t\tXHR.appendData('SQUIDEnable',document.getElementById('SQUIDEnable-{$t}').value);\n \t\t}\n \t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n\t\t\t\n\t\t}\n\t</script>";
echo $tpl->_ENGINE_parse_body($html);
}
示例7: popup
function popup()
{
$hostname = $_GET["hostname"];
$page = CurrentPageName();
$users = new usersMenus();
$tpl = new templates();
$t = time();
if (preg_match("#^([0-9]+)\\.([0-9]+)#", $users->POSTFIX_VERSION, $re)) {
$major = intval($re[1]);
$minor = intval($re[2]);
$binver = "{$major}{$minor}";
if ($binver < 210) {
echo error_not_compatible();
die;
}
}
$main = new maincf_multi($hostname);
$EnablePostfixHaProxy = $main->GET("EnablePostfixHaProxy");
if (!is_numeric($EnablePostfixHaProxy)) {
$EnablePostfixHaProxy = 0;
}
$p = Paragraphe_switch_img("{enable_smtp_haproxy}", "{enable_smtp_haproxy_explain}", "EnablePostfixHaProxy-{$t}", $EnablePostfixHaProxy, null, 880);
$html = "\n\t<div id='{$t}'>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td>{$p}</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right'>" . button("{apply}", "SaveHapProxyCompliant{$t}()", "16px") . "</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<script>\n\t\n\tvar X_SaveHapProxyCompliant{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>0){alert(results);}\n\t\tYahooWin5Hide();\n\t\t}\t\t\n\t\n\tfunction SaveHapProxyCompliant{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('hostname','{$hostname}');\n\t\tXHR.appendData('ou','{$_GET["ou"]}');\n\t\tXHR.appendData('EnablePostfixHaProxy',document.getElementById('EnablePostfixHaProxy-{$t}').value);\n\t\tAnimateDiv('{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',X_SaveHapProxyCompliant{$t});\n\t}\n\t\n\t</script>\t\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例8: popup
function popup()
{
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$t = time();
$SquidEnableParentNTLM = intval($sock->GET_INFO("SquidEnableParentNTLM"));
$SquidParentNTLMPort = intval($sock->GET_INFO("SquidParentNTLMPort"));
$SquidParentNTLMProxy = $sock->GET_INFO("SquidParentNTLMProxy");
$SquidParentNTLMProxyPort = intval($sock->GET_INFO("SquidParentNTLMProxyPort"));
$SquidParentNTLMUsername = intval($sock->GET_INFO("SquidParentNTLMUsername"));
$SquidParentNTLMPassword = intval($sock->GET_INFO("SquidParentNTLMPassword"));
$SquidParentSayHostname = $sock->GET_INFO("SquidParentSayHostname");
if ($SquidParentNTLMProxyPort == 0) {
$SquidParentNTLMProxyPort = 8080;
}
if ($SquidParentNTLMPort == 0) {
$SquidParentNTLMPort = rand(8080, 9090);
}
if ($SquidParentSayHostname == null) {
$SquidParentSayHostname = $sock->getFrameWork("cmd.php?full-hostname=yes");
}
$p = Paragraphe_switch_img("{SquidEnableParentNTLM}", "{SquidEnableParentNTLM_text}", "SquidEnableParentNTLM-{$t}", $SquidEnableParentNTLM, null, 750);
$html = "<table style='width:100%' class=form>\n<tr>\n\t<td valign='top' style=width:240px'><div id='parent-ntlm-status'></div>\n\t" . imgtootltip("refresh-32.png", null, "RefreshServ{$t}()", null) . "\n\t\n\t</td>\n\t<td valign='top' style='width:90%'>\n\t{$p}\n\t<table style='width:100%'>\n\t" . Field_text_table("SquidParentNTLMPort", "{local_listen_port}", $SquidParentNTLMPort, 22, null, 150) . Field_text_table("SquidParentSayHostname", "{hostname}", $SquidParentSayHostname, 22, null, 450) . Field_text_table("SquidParentNTLMProxy", "{remote_proxy}", $SquidParentNTLMProxy, 22, null, 450) . Field_text_table("SquidParentNTLMProxyPort", "{remote_port}", $SquidParentNTLMProxyPort, 22, null, 150) . Field_button_table_autonome("{apply}", "Save{$t}()", 36) . "</table>\n\t</td>\n</tr>\n</table>\n<script>\n\nfunction RefreshServ{$t}(){\n\tLoadAjax('parent-ntlm-status','{$page}?parent-ntlm-status=yes');\n}\n\nvar xSave{$t}= function (obj) {\n\tLoadjs('squid.restart.php?onlySquid=yes&onlyreload=yes&ApplyConfToo=yes&ask=yes',true);\n\tRefreshTab('main_squid_prents_tabs');\n}\t\t\t\n\t\t\t\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('SquidEnableParentNTLM',document.getElementById('SquidEnableParentNTLM-{$t}').value);\n\tXHR.appendData('SquidParentNTLMPort',document.getElementById('SquidParentNTLMPort').value);\n\tXHR.appendData('SquidParentNTLMProxy',document.getElementById('SquidParentNTLMProxy').value);\n\tXHR.appendData('SquidParentNTLMProxyPort',document.getElementById('SquidParentNTLMProxyPort').value);\n\tXHR.appendData('SquidParentSayHostname',document.getElementById('SquidParentSayHostname').value);\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\t\n}\nRefreshServ{$t}();\n</script>\t \t\t\n";
echo $tpl->_ENGINE_parse_body($html);
}
示例9: USER_JUNK_LEARNING_POPUP
function USER_JUNK_LEARNING_POPUP(){
$page=CurrentPageName();
$tpl=new templates();
$uid=$_GET["uid"];
$users=new user($uid);
$field=Paragraphe_switch_img('{EnableUserSpamLearning}',
'{EnableUserSpamLearning_text}','EnableUserSpamLearning',$users->EnableUserSpamLearning,null,350);
$html="
<H1>{EnableUserSpamLearning}</H1>
<p class=caption style='font-size:13px'>{EnableUserSpamLearning_explain}</p>
<table style='width:100%'>
<tr>
<td valign='top'><img src='img/bg_spam-assassin-250.png'></td>
<td valign='top'>
<br>
<div id='EnableUserSpamLearning_div'>
$field
</div>
<br>
<div style='text-align:right;width:100%'><hr>
". button("{edit}","USER_JUNK_LEARNING_SAVE()")."
</td>
</tr>
</table>
";
echo $tpl->_ENGINE_parse_body($html);
}
示例10: popup
function popup()
{
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$tcp = new networking();
$EnableDNSLinker = $sock->GET_INFO("EnableDNSLinker");
$EnableDNSLinkerCreds = unserialize(base64_decode($sock->GET_INFO("EnableDNSLinkerCreds")));
if (preg_match("#^(.+?):#", $EnableDNSLinkerCreds["CREDS"], $re)) {
$SuperAdmin = $re[1];
}
$hostname = $EnableDNSLinkerCreds["hostname"];
$listen_port = $EnableDNSLinkerCreds["listen_port"];
$listen_ip = $EnableDNSLinkerCreds["listen_addr"];
$send_listen_ip = $EnableDNSLinkerCreds["send_listen_ip"];
if (!is_numeric($EnableDNSLinker)) {
$EnableDNSLinker = 0;
}
if (!is_numeric($listen_port)) {
$listen_port = 9000;
}
$t = time();
$p = Paragraphe_switch_img("{activate_dns_linker}", "{activate_dns_linker_text}", "EnableDNSLinker", $EnableDNSLinker, null, 500);
$ips = $tcp->ALL_IPS_GET_ARRAY();
$html = "<table style='width:100%' class=form>\n\t<tr>\n\t\t<td colspan=2>{$p}</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{hostname}:</td>\n\t\t<td>" . Field_text("hostname-{$t}", $hostname, "font-size:16px;width:99%") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{listen_port}:</td>\n\t\t<td>" . Field_text("listen_port-{$t}", $listen_port, "font-size:16px;width:90px") . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{SuperAdmin}:</td>\n\t\t<td>" . Field_text("SuperAdmin", $SuperAdmin, "font-size:16px;width:99%") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{password}:</td>\n\t\t<td>" . Field_password("SuperAdminPass", null, "font-size:16px;width:70%") . "</td>\n\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{listen_ip}:</td>\n\t\t\t<td>" . Field_array_Hash($ips, "listen_addr-{$t}", $listen_ip, "style:font-size:16px;padding:3px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{send_listen_ip}:</td>\n\t\t\t<td>" . Field_array_Hash($ips, "send_listen_ip-{$t}", $send_listen_ip, "style:font-size:16px;padding:3px") . "</td>\n\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", "18") . "</td>\n\t</tr>\t\t\t\t\t\t\t\t\n\t</table>\t\t\n\t<script>\n\t\n\tvar x_Save{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>3){alert(results);}\n\t\tYahooWin3Hide();\n\t}\t\n\t\t\n\t\tfunction Save{$t}(){\n\t\t\tvar SuperAdminPass=document.getElementById('SuperAdminPass').value;\n\t\t\tif(SuperAdminPass.length==0){\n\t\t\t\talert('Please, define the password...\\n');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar pp=encodeURIComponent(document.getElementById('SuperAdminPass').value);\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('EnableDNSLinker',document.getElementById('EnableDNSLinker').value);\n\t\t\tXHR.appendData('SuperAdmin',document.getElementById('SuperAdmin').value);\n\t\t\tXHR.appendData('hostname',document.getElementById('hostname-{$t}').value);\n\t\t\tXHR.appendData('listen_port',document.getElementById('listen_port-{$t}').value);\n\t\t\tXHR.appendData('listen_addr',document.getElementById('listen_addr-{$t}').value);\n\t\t\tXHR.appendData('send_listen_ip',document.getElementById('send_listen_ip-{$t}').value);\n\t\t\tXHR.appendData('SuperAdminPass',pp);\n\t\t\tAnimateDiv('EnableDNSLinker_img');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_Save{$t});\t\t\t\n\t\t\n\t\t}\n\t</script>\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例11: popup
function popup(){
$page=CurrentPageName();
$tpl=new templates();
$sock=new sockets();
$EnableSystemOptimize=intval($sock->GET_INFO("EnableSystemOptimize"));
$t=time();
$html="<div style='width:98%' class=form>
". Paragraphe_switch_img("{enable_system_optimization}",
"{enable_system_optimization_text}","EnableSystemOptimize",$EnableSystemOptimize,null,880)."
<div style='margin-top:25px;text-align:right'>". button("{apply}","Save$t()",40)."</div>
<script>
var xSave$t= function (obj) {
var results=obj.responseText;
if(results.length>3){alert(results);return;}
Loadjs('system.optimize.progress.php');
}
function Save$t(){
var XHR = new XHRConnection();
XHR.appendData('EnableSystemOptimize',document.getElementById('EnableSystemOptimize').value);
XHR.sendAndLoad('$page', 'POST',xSave$t);
}
</script>
</div>";
echo $tpl->_ENGINE_parse_body($html);
}
示例12: TEMPLATE_SETTINGS
function TEMPLATE_SETTINGS()
{
$page = CurrentPageName();
$sock = new sockets();
$tpl = new templates();
$error = null;
$t = time();
$button = "<hr>" . button("{save}", "Save{$t}()", 40);
$TEMPLATE_TITLE = $_GET["TEMPLATE_TITLE"];
$EnableYoutubeLocker = intval($sock->GET_INFO("EnableYoutubeLocker"));
$YoutubeLockerSize = intval($sock->GET_INFO("YoutubeLockerSize"));
$q = new mysql_squid_builder();
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT COUNT(*) AS tcount FROM proxy_ports WHERE UseSSL=1 AND enabled=1"));
if ($ligne["tcount"] == 0) {
$error = "<p class=text-error style='font-size:18px'>{feature_run_only_ssl}</p>";
}
$pp = Paragraphe_switch_img("{youtube_locker}", "{youtube_locker_explain}", "EnableYoutubeLocker-{$t}", $EnableYoutubeLocker, null, 1450);
if ($YoutubeLockerSize == 0) {
$YoutubeLockerSize = 144;
}
$RESOLUTIONS[144] = "144p";
$RESOLUTIONS[240] = "240p";
$RESOLUTIONS[360] = "360p";
$RESOLUTIONS[480] = "480p";
$RESOLUTIONS[720] = "720p";
$html = "\n<div style='font-size:40px;margin-bottom:30px'>{youtube_locker}</div>\t\t\n{$error}\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t<td colspan=2>{$pp}</td>\n\t</tr>\n<tr>\n\t<td class=legend style='font-size:24px' width=1% nowrap>{video_quality}:</td>\n\t<td width=99%>" . Field_array_Hash($RESOLUTIONS, "YoutubeLockerSize-{$t}", $YoutubeLockerSize, "style:font-size:24px;width:240px") . "</td>\n</tr>\n\t<tr>\n\t<td colspan=2 align='right'>{$button}</td>\n\t</tr>\n<script>\n\tvar xSave{$t}=function(obj){\n\tvar tempvalue=obj.responseText;\n\tif(tempvalue.length>3){alert(tempvalue)};\n\tLoadjs('squid.ecap.progress.php');\n}\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('YoutubeLockerSize',document.getElementById('YoutubeLockerSize-{$t}').value);\n\tXHR.appendData('EnableYoutubeLocker',document.getElementById('EnableYoutubeLocker-{$t}').value);\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n\n</script>\n";
echo $tpl->_ENGINE_parse_body($html);
}
示例13: page
function page()
{
$tpl = new templates();
$page = CurrentPageName();
$instance_id = $_GET["instance-id"];
if (!is_numeric($instance_id)) {
$instance_id = 0;
}
$ssl_conf = Paragraphe("64-ssl-key-params.png", "{ssl_certificate}", "{ssl_certificate_text}", "javascript:Loadjs('postfix.tls.php?js-certificate=yes')");
if ($instance_id > 0) {
$q = new mysqlserver_multi($instance_id);
if ($q->usesocket == 0) {
echo $tpl->_ENGINE_parse_body("<H2>{cannot_use_ssl_no_networking_set}</H2>");
return;
}
$mysqlSSL = $q->mysqlSSL;
$ssl_path = "/etc/ssl/certs/mysql-instance-{$instance_id}-client-download";
$ssl_conf = null;
} else {
$sock = new sockets();
$mysqlSSL = $sock->GET_INFO("mysqlSSL");
$ssl_path = "/etc/ssl/certs/mysql-client-download";
}
if (!is_numeric($mysqlSSL)) {
$mysqlSSL = 0;
}
if (is_file("{$ssl_path}/mysql-ssl-client.tar")) {
$tar = Paragraphe("tar-icon-64.png", "{ssl_keys}", "{ssl_mysql_client_keys}", "javascript:s_PopUp('{$page}?ssl_client-keys=yes&instance-id={$instance_id}',1,1)");
}
$gen = Paragraphe("64-ssl-key.png", "{generate_ssl_keys}", "{generate_ssl_keys_text}", "javascript:GenerateMysqlSSLKeys()");
$enable = Paragraphe_switch_img("{UseSSL}", "{mysql_explain_enable_ssl}", "mysqlSSL{$instance_id}", $mysqlSSL, 400);
$html = "\n\t<input type='hidden' id='mysqlfile_text' value='{mysql_ssl_explain}'>\n\t<div class=explain id='mysqlfile'>{mysql_ssl_explain}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' width=1%>{$tar}{$gen}{$ssl_conf}</td>\n\t\t<td valign='top'>{$enable}<div style='text-align:right'><hr>" . button("{apply}", "SaveSSLMysql()") . "</div></td>\n\t</tr>\n\t</table>\n\t\n\t\n\t\n\t<script>\n\t\n\tvar x_SaveSSLMysql=function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif (results.length>0){alert(results);}\n\t\t\tdocument.getElementById('mysqlfile').innerHTML=document.getElementById('mysqlfile_text').value;\n\t\t\tvar instance_id={$instance_id};\n\t\t\tif(instance_id>0){RefreshTab('main_config_instance_mysql_multi');return;}\n\t\t\tRefreshTab('main_config_mysql');\n\t\t}\t\n\t\t\n\tvar x_GenerateMysqlSSLKeys=function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif (results.length>0){alert(results);}\n\t\t\tdocument.getElementById('mysqlfile').innerHTML=document.getElementById('mysqlfile_text').value;\n\t\t\tvar instance_id={$instance_id};\n\t\t\tif(instance_id>0){RefreshTab('main_config_instance_mysql_multi');return;}\t\t\t\n\t\t\tRefreshTab('main_config_mysql');\n\t\t}\t\t\n\t\n\t\t\t\n\t\tfunction SaveSSLMysql(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('mysqlSSL',document.getElementById('mysqlSSL{$instance_id}').value);\n\t\t\tXHR.appendData('instance-id','{$instance_id}');\n\t\t\tAnimateDiv('mysqlfile');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_SaveSSLMysql);\n\t\t\n\t\t}\n\t\t\n\t\tfunction GenerateMysqlSSLKeys(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('GenerateMysqlSSLKeys','yes');\n\t\t\tXHR.appendData('instance-id','{$instance_id}');\n\t\t\tAnimateDiv('mysqlfile');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_GenerateMysqlSSLKeys);\t\t\n\t\t}\n\t\t\n\t</script>\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例14: popup
function popup()
{
$sock = new sockets();
$EnableKav4Samba = $sock->GET_INFO('EnableKav4Samba');
$EnableScannedOnly = $sock->GET_INFO('EnableScannedOnly');
$EnableSambaXapian = $sock->GET_INFO('EnableSambaXapian');
if ($EnableKav4Samba == null) {
$EnableKav4Samba = 1;
}
if ($EnableScannedOnly == null) {
$EnableScannedOnly = 1;
}
if ($EnableSambaXapian == null) {
$EnableSambaXapian = 1;
}
$users = new usersMenus();
if ($users->KAV4SAMBA_INSTALLED) {
$kav = Paragraphe_switch_img('{enable_kaspersky_samba}', '{enable_kaspersky_samba_text}', 'EnableKav4Samba', $EnableKav4Samba, '{enable_disable}', 290);
} else {
$kav = Paragraphe_switch_disable('{enable_kaspersky_samba}', '{feature_not_installed}', '{feature_not_installed}', 290);
}
if ($users->SCANNED_ONLY_INSTALLED) {
$SCANNED_ONLY_INSTALLED = Paragraphe_switch_img('{enable_scanned_only}', '{enable_scanned_only_text}', 'EnableScannedOnly', $EnableScannedOnly, '{enable_disable}', 290);
} else {
$SCANNED_ONLY_INSTALLED = Paragraphe_switch_disable('{enable_scanned_only}', '{feature_not_installed}', '{feature_not_installed}', 290);
}
if ($users->XAPIAN_PHP_INSTALLED) {
$XAPIAN_INSTALLED = Paragraphe_switch_img('{enable_xapian_indexing}', '{enable_xapian_indexing_text}', 'EnableSambaXapian', $EnableSambaXapian, '{enable_disable}', 290);
}
$html = "<H1>{APP_SAMBA} {plugins}</H1>\n\t<p class=caption style='font-size:13px'>{vfs_modules_disabled_text}</p>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>{$kav}</TD>\n\t\t<td valign='top'>{$SCANNED_ONLY_INSTALLED}</TD>\n\t</TR>\n\t<tr>\n\t\t<td valign='top'>{$XAPIAN_INSTALLED}</TD>\n\t\t<td valign='top'> </TD>\n\t</TR>\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>\n\t\t" . button("{edit}", "SaveSambaPlugins()") . "\n\t\t\n\t</tr>\n\t</TABLE>\n\t\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例15: amavis_popup
function amavis_popup()
{
$t = time();
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$enable_amavisdeamon_ask = $tpl->javascript_parse_text("{enable_amavisdeamon_ask}");
$disable_amavisdeamon_ask = $tpl->javascript_parse_text("{disable_amavisdeamon_ask}");
$EnableAmavisDaemon = intval(trim($sock->GET_INFO("EnableAmavisDaemon", true)));
$EnableAmavisInMasterCF = intval(trim($sock->GET_INFO("EnableAmavisInMasterCF")));
if ($EnableAmavisDaemon == 0) {
$EnableAmavisDaemonP = "{amavis_is_currently_disabled_text}";
} else {
$EnableAmavisDaemonP = "{amavis_is_currently_enabled_text}";
}
$prepost = Paragraphe("folder-equerre-64.png", '{postfix_hooking}', '{postfix_hooking_text}', "javascript:Loadjs('{$page}?hooking-js=yes')", 'postfix_hooking_text', 210, 100);
$tr[] = $EnableAmavisDaemonP;
$tr[] = Paragraphe32("watchdog", "watchdog_amavis_text", "Loadjs('amavis.daemon.watchdog.php')", "watchdog-32.png");
$tr[] = Paragraphe32("postfix_hooking", "postfix_hooking_text", "Loadjs('amavis.index.php?hooking-js=yes')", "folder-equerre-32.png");
$tr[] = Paragraphe32("amavis_wizard_rule_per_user", "amavis_wizard_rule_per_user_text", "Loadjs('amavis.wizard.users.php')", "32-wizard.png");
$tr[] = Paragraphe32("reload_service", "reload_service_text", "AmavisCompileRules()", "service-restart-32.png");
$EnableAmavisInMasterCFT = "{postfix_afterqueue}";
$EnableAmavisInMasterCFE = "{postfix_afterqueue_text}";
//https://192.168.1.213:9000/amavis.daemon.watchdog.php?_=1345459954124
if ($EnableAmavisInMasterCF == 0) {
$EnableAmavisInMasterCFT = "{postfix_beforequeue}";
$EnableAmavisInMasterCFE = "{postfix_beforequeue_text}";
}
$html = "<table style='width:100%'>\n\t<tr>\n\t\t<td width=1% valign='top'>\n\t\t\t<div id='status-{$t}'></div>\n\t\t</td>\n\t\t<td valign='top' style='padding-left:20px'>\n\t\t\t<div style='font-size:32px;margin:bottom:10px;text-align:right'>{APP_AMAVIS}</div>\n\t\t\t" . Paragraphe_switch_img("{EnableAmavisDaemon}", "{AMAVIS_DEF}<br>{$EnableAmavisDaemonP}", "EnableAmavisDaemon", $EnableAmavisDaemon, null, 700) . "\n\t\t\t" . Paragraphe_switch_img("{postfix_afterqueue}", "{postfix_afterqueue_text}", "EnableAmavisInMasterCF", $EnableAmavisInMasterCF, null, 700) . "\n\t\t\t<p class=text-info style='font-size:14px'><strong style='font-size:16px'>{currently}:{$EnableAmavisInMasterCFT}</strong><br>{$EnableAmavisInMasterCFE}</p>\n\t\t\t<hr>\n\t\t\t<div style='width:100%;text-align:right'>" . button("{apply}", "SaveEnablePopupAmavis()", 26) . "</div>\n\t\t</td>\n\t</tr>\n\t</table>\n\t<script>\n\t\n\tvar x_EnablePopupAmavis= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);}\t\n\t\tRefreshTab('main_config_amavis');\n\t}\t\n\t\n\t\tfunction EnablePopupAmavis(){\n\t\t\tif(confirm('{$enable_amavisdeamon_ask}')){\n\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tXHR.appendData('enable-amavis','yes');\n\t\t\t\tAnimateDiv('explain-{$t}');\n\t\t\t\tXHR.sendAndLoad('amavis.daemon.status.php', 'POST',x_EnablePopupAmavis);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfunction SaveEnablePopupAmavis(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('EnableAmavisDaemon',document.getElementById('EnableAmavisDaemon').value);\n\t\t\tXHR.appendData('EnableAmavisInMasterCF',document.getElementById('EnableAmavisInMasterCF').value);\n\t\t\tXHR.sendAndLoad('amavis.daemon.status.php', 'POST',x_EnablePopupAmavis);\n\t\t}\n\t\n\t\n\t\n\t\tLoadAjax('status-{$t}','{$page}?status=yes&t={$t}');\n\t\t\n\t\t\n\t</script>\n\t\n\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}