当前位置: 首页>>代码示例>>PHP>>正文


PHP Field_text_table函数代码示例

本文整理汇总了PHP中Field_text_table函数的典型用法代码示例。如果您正苦于以下问题:PHP Field_text_table函数的具体用法?PHP Field_text_table怎么用?PHP Field_text_table使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Field_text_table函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: popup

function popup()
{
    $page = CurrentPageName();
    $sock = new sockets();
    $users = new usersMenus();
    $t = time();
    $SquidGuardIPWeb = $sock->GET_INFO("SquidGuardIPWeb");
    $fulluri = $sock->GET_INFO("SquidGuardIPWeb");
    $SquidGuardServerName = $sock->GET_INFO("SquidGuardServerName");
    if (preg_match("#\\/(.+?):([0-9]+)\\/#", $SquidGuardIPWeb, $re)) {
        $SquidGuardIPWeb = "{$re[1]}:{$re[2]}";
    }
    if (preg_match("#(.+?):([0-9]+)#", $SquidGuardIPWeb, $re)) {
        $SquidGuardServerName = $re[1];
        $SquidGuardApachePort = $re[2];
    }
    if ($SquidGuardServerName == "/") {
        $SquidGuardServerName = null;
    }
    if (preg_match("#(.+?)\\/#", $SquidGuardServerName)) {
        $SquidGuardServerName = $re[1];
    }
    if (preg_match("#^\\/(.+)#", $SquidGuardServerName)) {
        $SquidGuardServerName = $re[1];
    }
    $SquidGuardServerName = str_replace("/", "", $SquidGuardServerName);
    $html = "<div style='width:98%' class=form>\n\t<div class=explain style='font-size:18px'>{servername_squidguard_explain}</div>\n\t<table style='width:100%'>\n\t" . Field_text_table("servername_squidguard-{$t}", "{hostname}", $SquidGuardServerName, 35, null, 450) . Field_button_table_autonome("{apply}", "Save{$t}()", 35) . "</table>\t\n\t</div>\n<script>\nvar xSave{$t}=function(obj){\n\t\tYahooWin5Hide();\n\t\tRefreshTab('main_dansguardian_mainrules');\n\t \tLoadjs('dansguardian2.compile.php');\n}\n\nfunction Save{$t}(){\n     var XHR = new XHRConnection();\n\t XHR.appendData('servername_squidguard',document.getElementById('servername_squidguard-{$t}').value);\n     XHR.sendAndLoad('{$page}', 'POST',xSave{$t});     \t\n}\n</script>\t\t\t\n";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:articatech,项目名称:artica,代码行数:30,代码来源:ufdbguard.urichange.php

示例2: wizard_certificate_1

function wizard_certificate_1()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $hostname = $sock->GET_INFO("myhostname");
    $t = time();
    $ENC[1024] = 1024;
    $ENC[2048] = 2048;
    $ENC[4096] = 4096;
    if ($hostname == null) {
        $hostname = $sock->getFrameWork("system.php?hostname-g=yes");
        $sock->SET_INFO($hostname, "myhostname");
    }
    $title = $tpl->_ENGINE_parse_body("{new_certificate}");
    $html[] = "<div class=text-info style='font-size:18px'>{wizard_certificate_1}<br><i>{CSR_MULTIPLE_EXPLAIN}</i></div>";
    $html[] = "<div style='width:98%' class=form>";
    $html[] = "<table style='width:100%'>";
    $html[] = Field_text_table("wizard-certificate-commonname", "{CommonName}", $hostname, 22, null, 400);
    $html[] = Field_list_table("wizard-certificate-levelenc", "{level_encryption}", 2048, 22, $ENC);
    $html[] = Field_password_table("wizard-certificate-password", "{password}", "secret", 22, null, 300);
    $html[] = Field_button_table_autonome("{add}", "Submit{$t}", 30);
    $html[] = "</table>";
    $html[] = "</div>\n<script>\nvar xSubmit{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);}\n\t\$('#flexRT{$_GET["t"]}').flexReload();\n\tYahooWin6Hide();\n}\n\t\n\t\nfunction Submit{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('wizard-certificate-commonname',encodeURIComponent(document.getElementById('wizard-certificate-commonname').value));\n\tXHR.appendData('wizard-certificate-levelenc',document.getElementById('wizard-certificate-levelenc').value);\n\tXHR.appendData('wizard-certificate-password',encodeURIComponent(document.getElementById('wizard-certificate-password').value));\n\tXHR.sendAndLoad('{$page}', 'POST',xSubmit{$t});\n}\n</script>\n\t\t\n\t";
    echo $tpl->_ENGINE_parse_body(@implode("\n", $html));
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:26,代码来源:certificates.center.wizard.php

示例3: page

function page()
{
    $ID = intval($_GET["ID"]);
    $tpl = new templates();
    $page = CurrentPageName();
    $fields_size = 22;
    $rv = new squid_reverse();
    $q = new mysql_squid_builder();
    $sock = new sockets();
    $t = time();
    $servername = $_GET["servername"];
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM reverse_www WHERE servername='{$servername}'"));
    $cache_peer_id = $ligne["cache_peer_id"];
    $ligne2 = mysql_fetch_array($q->QUERY_SQL("SELECT cacheid FROM reverse_sources WHERE ID='{$cache_peer_id}'"));
    if (intval($ligne2) == 0) {
        echo FATAL_ERROR_SHOW_128("{nginx_error_no_cache_defined}");
        return;
    }
    $html[] = "<div style='width:98%' class=form>";
    $html[] = "<table style='width:100%'>";
    $html[] = "<tr><td colspan=2 style='font-size:40px;padding-bottom:20px'>{caching}</td></tr>";
    $html[] = Field_checkbox_table("proxy_buffering-{$t}", "{proxy_buffering}", $ligne["proxy_buffering"], $fields_size, "{proxy_buffering_text}");
    $html[] = Field_text_table("proxy_cache_min_uses-{$t}", "{proxy_cache_min_uses}", $ligne["proxy_cache_min_uses"], $fields_size, "{proxy_cache_min_uses_text}", 120);
    $html[] = Field_text_table("proxy_cache_valid-{$t}", "{proxy_cache_valid} ({minutes})", $ligne["proxy_cache_valid"], $fields_size, "{proxy_cache_valid_text}", 120);
    $html[] = Field_ipv4_table("proxy_buffers-{$t}", "{proxy_buffers}", $ligne["proxy_buffers"], $fields_size, "{proxy_buffers_text}", 120);
    $html[] = Field_text_table("proxy_buffer_size-{$t}", "{proxy_buffer_size} (k)", $ligne["proxy_buffer_size"], $fields_size, "{proxy_buffer_size_text}", 110);
    $html[] = Field_text_table("proxy_temp_file_write_size-{$t}", "{proxy_temp_file_write_size} (k)", $ligne["proxy_temp_file_write_size"], $fields_size, "{proxy_temp_file_write_size_text}", 110);
    $html[] = Field_text_table("proxy_max_temp_file_size-{$t}", "{proxy_max_temp_file_size} (MB)", $ligne["proxy_max_temp_file_size"], $fields_size, "{proxy_max_temp_file_size_text}", 110);
    $html[] = Field_button_table_autonome("{apply}", "Submit{$t}", 40);
    $html[] = "</table>";
    $html[] = "</div>\n\t<script>\n\tvar xSubmit{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>3){alert(results);}\n\t\tRefreshTab('main_nginx_server');\n\t\t\$('#NGINX_MAIN_TABLE').flexReload();\n\t\t\$('#NGINX_DESTINATION_MAIN_TABLE').flexReload();\n\t\tvar ID={$ID}\n\t\tif(ID==0){ YahooWin2Hide();}\n\t\n\t}\n\t\n\t\n\tfunction Submit{$t}(){\n\t\tvar proxy_buffering=0\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('general-settings','{$servername}');\n\t\tif(document.getElementById('proxy_buffering-{$t}').checked){proxy_buffering=1;}\n\t\tXHR.appendData('proxy_cache_min_uses',document.getElementById('proxy_cache_min_uses-{$t}').value);\n\t\tXHR.appendData('proxy_buffering',proxy_buffering);\n\t\tXHR.appendData('proxy_cache_valid',document.getElementById('proxy_cache_valid-{$t}').value);\n\t\tXHR.appendData('proxy_buffers',document.getElementById('proxy_buffers-{$t}').value);\n\t\tXHR.appendData('proxy_buffer_size',document.getElementById('proxy_buffer_size-{$t}').value);\n\t\t\n\t\tXHR.appendData('proxy_max_temp_file_size',document.getElementById('proxy_max_temp_file_size-{$t}').value);\n\t\tXHR.appendData('proxy_temp_file_write_size',document.getElementById('proxy_temp_file_write_size-{$t}').value);\n\t\t\n\t\tXHR.sendAndLoad('{$page}', 'POST',xSubmit{$t});\n\t}\n\t</script>\n\t\t\n\t";
    echo $tpl->_ENGINE_parse_body(@implode("\n", $html));
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:33,代码来源:nginx.site.cache.php

示例4: 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);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:26,代码来源:squid.master-ntlm.php

示例5: new_member

function new_member()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $t = time();
    $html = "<div style='width:98%' class=form>\n\t<div class=explain style='font-size:16px'>{sshd_AllowUsers_explain}</div>\n\t<table style='width:100%'>\n\t\t\t\n\t" . Field_text_table("username-{$t}", "{user2}", null, 22, null, 450) . Field_text_table("domain-{$t}", "{domain}", null, 22, null, 450) . Field_button_table_autonome("{add}", "Save{$t}", 26) . "</table>\n\t<script>\n\tvar xSave{$t}= function (obj) {\n\t\tvar res=obj.responseText;\n\t\t\n\t\tif (res.length>3){\n\t\t\talert(res);\n\t\t\treturn;\n\t\t}\n\t\t\$('#SSHD_ALLOW_TABLE').flexReload();\n\t\tYahooWinHide();\n\t\t\n\t}\t\n\n\tfunction Save{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('username',encodeURIComponent(document.getElementById('username-{$t}').value));\n\t\tXHR.appendData('domain',encodeURIComponent(document.getElementById('domain-{$t}').value));\n\t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\t\n\t}\n</script>\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:8,代码来源:sshd.AllowUsers.php

示例6: login

function login()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $failed = $tpl->javascript_parse_text("{failed}");
    $t = time();
    $html = "<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t" . Field_text_table("username-{$t}", "{username}", null, 26, "script:SaveCheck{$t}(event)", 400) . Field_password_table("password-{$t}", "{password}", null, 26, "script:SaveCheck{$t}(event)", 400) . Field_button_table_autonome("{submit}", "Save{$t}", 32) . "\n\t\t\t\n\t\t\t\n\t</div>\n<script>\nvar xSave{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length==0){alert('FATAL ERROR');return;};\n\tif(results=='FALSE'){\n\t\talert('{$failed}');\n\t\treturn;\n\t}\n\tAjaxTopMenu('template-top-menus','admin.top.menus.php');\n\tYahooWinBrowseHide();\n}\n\nfunction SaveCheck{$t}(e){\n\tif(!checkEnter(e)){return;}\n\tSave{$t}();\n}\n\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tvar pp=encodeURIComponent(document.getElementById('password-{$t}').value);\n\tXHR.appendData('artica_password',pp);\n\tXHR.appendData('artica_username',document.getElementById('username-{$t}').value);\n\tXHR.appendData('VIA_API','1');\n\tXHR.sendAndLoad('logon.php', 'POST',xSave{$t});\n}\n</script>\n";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:public.logon.php

示例7: page

function page()
{
    $sock = new sockets();
    $page = CurrentPageName();
    $tpl = new templates();
    $MikrotikTransparent = intval($sock->GET_INFO('MikrotikTransparent'));
    $MikrotikHTTPSquidPort = intval($sock->GET_INFO('MikrotikHTTPSquidPort'));
    $MikrotikVirtualIP = $sock->GET_INFO('MikrotikVirtualIP');
    $MikrotikLocalInterface = $sock->GET_INFO('MikrotikLocalInterface');
    $MikrotikNetMask = $sock->GET_INFO('MikrotikNetMask');
    $MikrotikIPAddr = $sock->GET_INFO('MikrotikIPAddr');
    $MikrotikLAN = $sock->GET_INFO('MikrotikLAN');
    $MikrotikSSLTransparent = intval($sock->GET_INFO("MikrotikSSLTransparent"));
    $MikrotikHTTPSSquidPort = intval($sock->GET_INFO("MikrotikHTTPSSquidPort"));
    $ip = new networking();
    $ipsH = $ip->Local_interfaces();
    $t = time();
    if ($MikrotikHTTPSquidPort == 0) {
        $MikrotikHTTPSquidPort = rand(9090, 63000);
    }
    if ($MikrotikHTTPSSquidPort == 0) {
        $MikrotikHTTPSSquidPort = rand(9190, 63000);
    }
    if ($MikrotikVirtualIP == null) {
        $MikrotikVirtualIP = "172.16.24.2";
    }
    if ($MikrotikNetMask == null) {
        $MikrotikNetMask = "255.255.255.252";
    }
    if ($MikrotikIPAddr == null) {
        $MikrotikIPAddr = "172.16.24.1";
    }
    if ($MikrotikLAN == null) {
        $MikrotikLAN = "192.168.1.0/24";
    }
    if ($MikrotikLocalInterface == null) {
        $MikrotikLocalInterface = "eth0";
    }
    $ARRAYBT["{apply}"] = "Apply{$t}";
    $ARRAYBT["{save}"] = "Save{$t}";
    $p = Paragraphe_switch_img("{mikrotik_compliance}", "{mikrotik_compliance_explain}", "MikrotikTransparent", $MikrotikTransparent, null, 760);
    $p2 = Paragraphe_switch_img("{mikrotik_ssl_compliance}", "{mikrotik_ssl_compliance_explain}", "MikrotikSSLTransparent", $MikrotikSSLTransparent, null, 760);
    $html = "\n\t<div style='text-align:right'><img src='img/mikrotik-150.png'></div>\n\t<div style='width:95%;padding:30px' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='vertical-align:top;width:220px'><div id='mikrotik-ipface'></div></td>\n\t\t<td style='vertical-align:top;width:99%;padding-left:30px'>\n\t\n\t\t\t{$p}{$p2}\n\t\t</td>\n\t</table>\n\t<table style='width:100%'>\n\t" . Field_text_table("MikrotikHTTPSquidPort", "{proxy_listen_port}", $MikrotikHTTPSquidPort, 22, null) . Field_text_table("MikrotikHTTPSSquidPort", "{proxy_listen_port} (SSL)", $MikrotikHTTPSSquidPort, 22, null) . Field_list_table("MikrotikLocalInterface", "{local_interface}", $MikrotikLocalInterface, 22, $ipsH) . Field_ipv4_table("MikrotikVirtualIP", "{local_ip_address}", $MikrotikVirtualIP, 22, "{MikrotikVirtualIP}", null) . Field_text_table("MikrotikNetMask", "{netmask}", $MikrotikNetMask, 22) . Field_ipv4_table("MikrotikIPAddr", "{mikrotik_address}", $MikrotikIPAddr, 22, "{mikrotik_address_explain}") . Field_area_table("MikrotikLAN", "{your_network}", $MikrotikLAN, 22, null) . Field_buttons_table_autonome($ARRAYBT, 32) . "\n\t</table>\n\t<div id='mikrotik-config'></div>\n</div>\n\n\n<script>\n\n\tvar xSave{$t}= function (obj) {\n\t\tvar res=obj.responseText;\n\t\t\n\t\tdocument.getElementById('mikrotik-config').innerHTML=res;\n\n\t}\t\n\t\n\t\n\t\n\t\n\n\n\tfunction Save{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('MikrotikSSLTransparent',document.getElementById('MikrotikSSLTransparent').value);\n\t\tXHR.appendData('MikrotikLocalInterface',document.getElementById('MikrotikLocalInterface').value);\n\t\tXHR.appendData('MikrotikTransparent',document.getElementById('MikrotikTransparent').value);\n\t\tXHR.appendData('MikrotikHTTPSquidPort',document.getElementById('MikrotikHTTPSquidPort').value);\n\t\tXHR.appendData('MikrotikHTTPSSquidPort',document.getElementById('MikrotikHTTPSSquidPort').value);\n\t\tXHR.appendData('MikrotikVirtualIP',document.getElementById('MikrotikVirtualIP').value);\n\t\tXHR.appendData('MikrotikNetMask',document.getElementById('MikrotikNetMask').value);\n\t\tXHR.appendData('MikrotikIPAddr',document.getElementById('MikrotikIPAddr').value);\n\t\tXHR.appendData('MikrotikLAN',document.getElementById('MikrotikLAN').value);\n\t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\t\n\t}\n\t\nfunction Apply{$t}(){\t\n\tSave{$t}();\n\tLoadjs('squid.compile.progress.php?restart=yes&ask=yes');\n}\n\t\nSave{$t}();\nLoadAjax('mikrotik-ipface','{$page}?mikrotik-ipface=yes');\n</script>\t\t\t\t\t\n\t\n";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:articatech,项目名称:artica,代码行数:45,代码来源:squid.transparent.mikrotik.php

示例8: new_member

function new_member(){
	$tpl=new templates();
	$page=CurrentPageName();
	$t=time();
	$html="<div style='width:98%' class=form>
	<div class=text-info style='font-size:16px'>{sshd_AllowUsers_explain}</div>
	<table style='width:100%'>
			
	".Field_text_table("username-$t", "{user2}",null,22,null,450).
	Field_text_table("domain-$t", "{domain}",null,22,null,450).
	Field_button_table_autonome("{add}", "Save$t",26).
	"</table>
	<script>
	var xSave$t= function (obj) {
		var res=obj.responseText;
		
		if (res.length>3){
			alert(res);
			return;
		}
		$('#SSHD_ALLOW_TABLE').flexReload();
		YahooWinHide();
		
	}	

	function Save$t(){
		var XHR = new XHRConnection();
		XHR.appendData('username',encodeURIComponent(document.getElementById('username-$t').value));
		XHR.appendData('domain',encodeURIComponent(document.getElementById('domain-$t').value));
		XHR.sendAndLoad('$page', 'POST',xSave$t);	
	}
</script>	
	";
	
echo $tpl->_ENGINE_parse_body($html);
	
	
	
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:39,代码来源:sshd.AllowUsers.php

示例9: rule_popup

function rule_popup(){
	$dans=new dansguardian_rules();
	$md5=$_GET["rule-popup"];
	$tpl=new templates();
	$page=CurrentPageName();
	$fields_size=22;
	$q=new mysql_squid_builder();
	$sock=new sockets();
	$t=time();
	$bt="{add}";
	if($md5<>null){$bt="{apply}";}
	
	$Timez[0]="{default}";
	$Timez[5]="5 {minutes}";
	$Timez[10]="10 {minutes}";
	$Timez[15]="15 {minutes}";
	$Timez[30]="30 {minutes}";
	$Timez[60]="1 {hour}";
	$Timez[120]="2 {hours}";
	$Timez[240]="4 {hours}";
	$Timez[720]="12 {hours}";
	$Timez[2880]="2 {days}";
	
	$cats=$dans->LoadBlackListes();
	while (list ($num, $ligne) = each ($cats) ){$newcat[$num]=$num;}
	$newcat[null]="{none}";
	$newcat["safebrowsing"]="Google Safe Browsing";
	$newcat["blacklist"]="{blacklist}";
	
	
	$ligne=mysql_fetch_array($q->QUERY_SQL("SELECT * FROM ufdb_page_rules WHERE zmd5='$md5'"));
	if(!$q->ok){echo FATAL_ERROR_SHOW_128($q->mysql_error);return;}
	
	$html[]="<div style='width:98%' class=form>";
	$html[]="<table style='width:100%'>";
	$html[]=Field_list_table("category-$t","{category}",$ligne["category"],$fields_size,$newcat,null,450);
	$html[]=Field_list_table("maxtime-$t","{unlock_during}",$ligne["maxtime"],$fields_size,$Timez,null,450);
	$html[]=Field_text_table("adgroup-$t","{active_directory_group}",$ligne["adgroup"],$fields_size,null,450);
	$html[]=Field_text_table("username-$t","{username}",$ligne["username"],$fields_size,null,450);
	$html[]=Field_checkbox_table("deny-$t", "{deny_unlock}",$ligne["deny"],$fields_size,null,"UnCheckAllow$t()");
	$html[]=Field_checkbox_table("allow-$t", "{allow_unlock}",$ligne["allow"],$fields_size,null,"UnCheckDeny$t()");
	$html[]=Field_checkbox_table("noauth-$t", "{not_authenticate}",$ligne["noauth"],$fields_size);
	$html[]=Field_list_table("addTocat-$t","{automatically_add_to}",$ligne["addTocat"],$fields_size,$newcat,null,450);
	
	
	$html[]=Field_button_table_autonome($bt,"Submit$t",30);
	$html[]="</table>";
	$html[]="</div>
	<script>
	var xSubmit$t= function (obj) {
		var results=obj.responseText;
		if(results.length>3){alert(results);}
		$('#UFDB_PAGE_RULE').flexReload();
	
	}
	
	function UnCheckAllow$t(){
		if(document.getElementById('deny-$t').checked){
			document.getElementById('allow-$t').checked=false;
		}else{
			document.getElementById('allow-$t').checked=true;
		
		}
	
	}
	
	function UnCheckDeny$t(){
		if(document.getElementById('allow-$t').checked){
			document.getElementById('deny-$t').checked=false;
		}else{
			document.getElementById('deny-$t').checked=true;
		}
	}
	
	
	function Submit$t(){
		var XHR = new XHRConnection();
		XHR.appendData('rule','$md5');
		XHR.appendData('category',document.getElementById('category-$t').value);
		XHR.appendData('adgroup',document.getElementById('adgroup-$t').value);
		XHR.appendData('username',document.getElementById('username-$t').value);
		XHR.appendData('addTocat',document.getElementById('addTocat-$t').value);
		XHR.appendData('maxtime',document.getElementById('maxtime-$t').value);
		
		
		
		
		if(document.getElementById('deny-$t').checked){
			XHR.appendData('deny','1');	
		}else{
			XHR.appendData('deny','0');	
		
		}
		if(document.getElementById('allow-$t').checked){
			XHR.appendData('allow','1');	
		}else{
			XHR.appendData('allow','0');	
		
		}	

//.........这里部分代码省略.........
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:101,代码来源:squidguardweb.rules.php

示例10: rule_popup

function rule_popup()
{
    $ID = intval($_GET["ID"]);
    $tpl = new templates();
    $page = CurrentPageName();
    $fields_size = 22;
    $q = new mysql_squid_builder();
    $sock = new sockets();
    $t = time();
    $bt = "{add}";
    if ($ID > 0) {
        $bt = "{apply}";
    }
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM acls_ntlm WHERE ID='{$ID}'"));
    if (!$q->ok) {
        echo FATAL_ERROR_SHOW_128($q->mysql_error);
        return;
    }
    $title = "{rule}: ({$ID}) {$ligne["item"]}";
    $Timez[0] = "{by_hour}";
    if (!is_numeric($ligne["quotasize"])) {
        $ligne["quotasize"] = 250;
    }
    if (!is_numeric($ligne["quotaPeriod"])) {
        $ligne["quotaPeriod"] = 1;
    }
    if ($ID == 0) {
        $title = $tpl->javascript_parse_text("{new_rule}");
        $ligne["enabled"] = 1;
    }
    $q->acl_NTLM[null] = "{select}";
    $html[] = "<div style='width:98%;font-size:28px;margin-bottom:20px'>{$title}</div>\n\t<div style='margin-top:5px;margin-bottom:20px;font-size:18px'>{whitelist_ntlm_explain}</div>\n\t";
    $html[] = "<div style='width:98%' class=form>";
    $html[] = "<table style='width:100%'>";
    $html[] = Field_list_table("type-{$t}", "{type}", $ligne["Type"], $fields_size, $q->acl_NTLM, "ShowHelp{$t}()", 450);
    $html[] = Field_text_table("item-{$t}", "{item}", $ligne["item"], $fields_size, null, 450);
    $html[] = Field_checkbox_table("enabled-{$t}", "{enabled}", $ligne["enabled"], $fields_size, null, "CheckEnabled{$t}()");
    $html[] = "<tr><td colspan=2><div id='help-{$t}'></div></td></tr>";
    $html[] = Field_button_table_autonome($bt, "Submit{$t}", 30);
    $html[] = "</table>";
    $html[] = "</div>\n\t<script>\n\tvar xSubmit{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);return;}\n\t\$('#SQUID_NTLM_WHITE').flexReload();\n\tvar ID='{$ID}';\n\tif(ID==0){ YahooWin3Hide();return;}\n\t\n}\nfunction CheckEnabled{$t}(){\n\tdocument.getElementById('type-{$t}').disabled=true;\n\tdocument.getElementById('item-{$t}').disabled=true;\n\tif(document.getElementById('enabled-{$t}').checked){\n\t\tdocument.getElementById('type-{$t}').disabled=false;\n\t\tdocument.getElementById('item-{$t}').disabled=false;\n\t}\n}\n\n\nfunction Submit{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('ID','{$ID}');\n\tXHR.appendData('item',encodeURIComponent(document.getElementById('item-{$t}').value));\n\tXHR.appendData('type',document.getElementById('type-{$t}').value);\n\tif(document.getElementById('enabled-{$t}').checked){XHR.appendData('enabled','1');}else{XHR.appendData('enabled','0');}\n\tXHR.sendAndLoad('{$page}', 'POST',xSubmit{$t});\n}\n\nfunction ShowHelp{$t}(){\n\tLoadAjaxTiny('help-{$t}','{$page}?help=yes&type='+document.getElementById('type-{$t}').value+'&t={$t}');\n}\n\nCheckEnabled{$t}();\nShowHelp{$t}();\n</script>\n\n";
    echo $tpl->_ENGINE_parse_body(@implode("\n", $html));
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:43,代码来源:squid.whitelist.ntlm.php

示例11: popup_ad

function popup_ad()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $md5 = $_GET["md5"];
    $title = $tpl->javascript_parse_text("{new_connection}");
    $btname = "{add}";
    $close = 1;
    $ruleid = $_GET["ruleid"];
    if ($md5 != null) {
        $q = new mysql_squid_builder();
        $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM hotspot_activedirectory WHERE zmd5='{$md5}'"));
        $title = $ligne["hostname"];
        $ruleid = $ligne["ruleid"];
        $btname = "{apply}";
        $close = 0;
    }
    $Timez[0] = "{unlimited}";
    $Timez[30] = "30 {minutes}";
    $Timez[60] = "1 {hour}";
    $Timez[120] = "2 {hours}";
    $Timez[180] = "3 {hours}";
    $Timez[360] = "6 {hours}";
    $Timez[720] = "12 {hours}";
    $Timez[1440] = "1 {day}";
    $Timez[2880] = "2 {days}";
    $Timez[10080] = "1 {week}";
    $Timez[20160] = "2 {weeks}";
    $Timez[40320] = "1 {month}";
    if (!is_numeric($ligne["enabled"])) {
        $ligne["enabled"] = 1;
    }
    $t = time();
    $html = "<div style='width:98%' class=form>\n\t<table style='width:100%'>" . Field_text_table("hostname-{$t}", "{hostname}", $ligne["hostname"], 22, null, 350) . Field_checkbox_table("enabled-{$t}", "{enabled}", $ligne["enabled"], $fontsize = 22, null) . "<tr>\n\t\t<td colspan=2 align='right'><hr>" . button($btname, "Save{$t}()", 36) . "</td>\n\t</tr>\n\t</table>\n\t</div>\t\t\t\n<script>\n\t\t\t\t\nvar xSave{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);return;}\n\tvar close={$close};\n\tif(close==1){YahooWin4Hide();}\n\t\$('#flexRT{$_GET["t"]}').flexReload();\n\tExecuteByClassName('SearchFunction');\n}\n\n\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('hostname',document.getElementById('hostname-{$t}').value);\n\tXHR.appendData('ruleid','{$ruleid}');\n\tXHR.appendData('md5','{$md5}');\n\tif(document.getElementById('enabled-{$t}').checked){XHR.appendData('enabled',1); }else{XHR.appendData('enabled',0);}\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n\t}\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:articatech,项目名称:artica,代码行数:36,代码来源:squid.webauth.activedirectory.php

示例12: page

function page()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $squid_reverse = new squid_reverse();
    $sslcertificates = $squid_reverse->ssl_certificates_list();
    $you_need_to_compile = $tpl->javascript_parse_text("{you_need_to_compile}");
    $servername = $_GET["servername"];
    $q = new mysql_squid_builder();
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM reverse_www WHERE servername='{$servername}'"));
    if (!is_numeric($ligne["ssl_backend_port"])) {
        $ligne["ssl_backend_port"] = 443;
    }
    $t = time();
    $ssl_use_rcert = 0;
    $to = null;
    $AS_PEER_CERTIFICATE = 0;
    $AS_PEER_CERTIFICATE_EXPLAIN = null;
    $cache_peer_id = $ligne["cache_peer_id"];
    if ($cache_peer_id > 0) {
        if (!$q->FIELD_EXISTS("reverse_sources", "ssl_remotecert")) {
            $q->QUERY_SQL("ALTER TABLE `reverse_sources` ADD `ssl_remotecert` smallint(1) NOT NULL DEFAULT '0'");
            if (!$q->ok) {
                echo $q->mysql_error_html();
            }
        }
        $ligne2 = mysql_fetch_array($q->QUERY_SQL("SELECT servername,ssl_remotecert FROM reverse_sources WHERE ID='{$cache_peer_id}'"));
        if (!$q->ok) {
            echo $q->mysql_error_html();
        }
        $to = " {to} &laquo;{$ligne2["servername"]}&raquo;";
    }
    if (intval($cache_peer_id) > 0) {
        $ligne2 = mysql_fetch_array($q->QUERY_SQL("SELECT certificate FROM reverse_sources WHERE ID='{$cache_peer_id}'"));
        if (trim($ligne2["certificate"] != null)) {
            $ligne["certificate"] = $ligne2["certificate"];
            $AS_PEER_CERTIFICATE = 1;
        }
    }
    if ($AS_PEER_CERTIFICATE == 1) {
        $AS_PEER_CERTIFICATE_EXPLAIN = "<div class=explain style=font-size:22px>\n\t\t{reverse_proxy_use_destination_server_certificate}</div>";
    }
    if ($ligne["ssl_protocols"] == null) {
        $ligne["ssl_protocols"] = "TLSv1 TLSv1.1 TLSv1.2";
    }
    if ($ligne["ssl_ciphers"] == null) {
        $ligne["ssl_ciphers"] = "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:RC4-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK";
    }
    $html[] = "<div style='width:98%' class=form>{$AS_PEER_CERTIFICATE_EXPLAIN}";
    $html[] = "<table style='width:100%'>";
    $html[] = "<tr><td colspan=2 style='font-size:40px;padding-bottom:20px'>{port}:{$ligne["port"]} &laquo;{$servername}&raquo;{$to}</td></tr>";
    $html[] = "<tr><td colspan=2>" . Paragraphe_switch_img("{reverse_proxy_ssl}", "{NGINX_USE_SSL_EXPLAIN}", "ssl-{$t}", $ligne["ssl"], null, 1400, "SwitchOffCertificate{$t}") . "</td></tr>";
    $html[] = Field_list_table("certificate-{$t}", "{certificate}", $ligne["certificate"], 28, $sslcertificates, null, 450);
    $html[] = Field_text_table("ssl_protocols-{$t}", "{ssl_protocols}", $ligne["ssl_protocols"], 28, '{ssl_protocols_text}', 600);
    $html[] = Field_text_table("ssl_ciphers-{$t}", "{ssl_ciphers}", $ligne["ssl_ciphers"], 28, null, 900);
    $html[] = "<tr><td colspan=2><p>&nbsp;</p></td></tr>";
    if ($cache_peer_id > 0) {
        $html[] = "<tr><td colspan=2>" . Paragraphe_switch_img("{destination_use_ssl}", "{NGINX_USE_SSL_EXPLAIN2}", "ssl_backend-{$t}", $ligne["ssl_backend"], null, 1400) . "</td></tr>";
        $html[] = "<tr><td colspan=2>" . Paragraphe_switch_img("{SSL_CLIENT_VERIFICATION}", "{SSL_CLIENT_VERIFICATION_EXPLAIN}", "ssl_client_certificate-{$t}", $ligne["ssl_client_certificate"], null, 1400) . "</td></tr>";
    }
    $html[] = Field_button_table_autonome("{apply}", "Submit{$t}", 40);
    $html[] = "</table>";
    $html[] = "</div>\n<script>\nvar xSubmit{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);return;}\n\t\$('#NGINX_MAIN_TABLE').flexReload();\n\talert('{$you_need_to_compile}');\n}\n\t\n\t\nfunction Submit{$t}(){\n\tvar XHR = new XHRConnection();\n\tvar AS_PEER_CERTIFICATE={$AS_PEER_CERTIFICATE};\n\tXHR.appendData('servername','{$servername}');\n\tXHR.appendData('cache_peer_id','{$cache_peer_id}');\n\tXHR.appendData('ssl',document.getElementById('ssl-{$t}').value);\n\tif(document.getElementById('ssl_backend-{$t}')){\n\t\tXHR.appendData('ssl_backend',document.getElementById('ssl_backend-{$t}').value);\n\t}\n\tif(document.getElementById('ssl_client_certificate-{$t}')){\n\t\tXHR.appendData('ssl_client_certificate',document.getElementById('ssl_client_certificate-{$t}').value);\n\t}\t\n\t\n\t\n\tXHR.appendData('ssl_protocols',document.getElementById('ssl_protocols-{$t}').value);\n\tXHR.appendData('certificate',document.getElementById('certificate-{$t}').value);\n\tXHR.appendData('ssl_ciphers',document.getElementById('ssl_ciphers-{$t}').value);\n\t\n\t\n\tXHR.sendAndLoad('{$page}', 'POST',xSubmit{$t});\n}\n\nfunction SwitchOffCertificate{$t}(){\n\tvar ssl=document.getElementById('ssl-{$t}').value;\n\t\n}\n\nfunction Check{$t}(){\n\tvar AS_PEER_CERTIFICATE={$AS_PEER_CERTIFICATE};\n\tif( AS_PEER_CERTIFICATE==1){\n\t\tdocument.getElementById('certificate-{$t}').disabled=true;\n\t}\n\tSwitchOffCertificate{$t}();\n}\nCheck{$t}();\n</script>\n\t\n\t";
    echo $tpl->_ENGINE_parse_body(@implode("\n", $html));
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:65,代码来源:nginx.site.ssl.php

示例13: mac_popup

function mac_popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $MAC = $_GET["MAC"];
    $btname = "{add}";
    $t = time();
    if ($MAC != null) {
        $btname = "{apply}";
    }
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM webfilters_nodes WHERE MAC='{$MAC}'"));
    $html = "\n\t\t<div style='width:98%' class=form>\n\t\t<table style='width:100%'>\n\t\t" . Field_text_table("MAC-{$t}", "{ComputerMacAddress}", $ligne["MAC"], 22, null, 350) . Field_text_table("uid-{$t}", "{uid}", $ligne["uid"], 22, null, 350) . Field_text_table("hostname-{$t}", "{hostname}", $ligne["hostname"], 22, null, 350) . Field_button_table_autonome("{$btname}", "Save{$t}()", 32) . "\n\t\t</table>\t\n\t\t</div>\n\t\t\t\t\n<script>\nvar xSave{$t}= function (obj) {\n\tvar res=obj.responseText;\n\tif (res.length>3){alert(res);return;}\n\tvar MAC='{$MAC}';\n\t\$('#MAC_TO_UID_TABLE').flexReload();\n\tif(MAC.length==0){YahooWin3Hide();}\n}\n\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('MAC',  document.getElementById('MAC-{$t}').value);\n\tXHR.appendData('uid',  document.getElementById('uid-{$t}').value);\n\tXHR.appendData('hostname',  document.getElementById('hostname-{$t}').value);\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>\t\t\t\t\t\t\t\t\n";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:15,代码来源:squid.macToUid.php

示例14: rule_parameters

function rule_parameters()
{
    $ID = $_GET["ID"];
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM artica_caches WHERE ID='{$ID}'", "artica_backup"));
    $t = time();
    if ($ligne["MaxSizeBytes"] == 0) {
        $ligne["MaxSizeBytes"] = 3145728000;
    }
    $ligne["MaxSizeBytes"] = $ligne["MaxSizeBytes"] / 1024;
    $ligne["MaxSizeBytes"] = $ligne["MaxSizeBytes"] / 1024;
    $html = "<div style='width:98%' class=form>\n\t<table style='width:100%'>" . Field_checkbox_table("enabled-{$t}", "{enabled}", $ligne["enabled"]) . Field_text_table("rulename-{$t}", "{rulename}", $ligne["rulename"], 18, null, 250) . Field_text_table("sitename-{$t}", "{sitename}", $ligne["sitename"], 18, null, 250) . Field_text_table("MaxSizeBytes-{$t}", "{max_size} MB", $ligne["MaxSizeBytes"], 18, null, 250) . Field_button_table_autonome("{apply}", "Save{$t}", 26) . "\n\t</table>\n</div>\t\t\n<script>\nvar xSave{$t}=function (obj) {\n\tvar tempvalue=obj.responseText;\n\tif(tempvalue.length>3){alert(tempvalue);}\n\t\$('#squid_enforce_rules_table').flexReload();\n}\n\t\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tvar EnableSquidCacheBoosters=0;\n\tif(document.getElementById('enabled-{$t}').checked){\n\tXHR.appendData('enabled',1);\n\t}else{XHR.appendData('enabled',0);}\n\t\n\tXHR.appendData('ID','{$_GET["ID"]}');\n\tXHR.appendData('MaxSizeBytes',document.getElementById('MaxSizeBytes-{$t}').value)\n\tXHR.appendData('rulename',encodeURIComponent(document.getElementById('rulename-{$t}').value));\n\tXHR.appendData('sitename',encodeURIComponent(document.getElementById('rulename-{$t}').value));\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\t\t\t\t\t\t\n}\n</script>\t\t\n";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:16,代码来源:squid.artica-rules.whitelist.php

示例15: report_main

function report_main()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $dans = new dansguardian_rules();
    $cats = $dans->LoadBlackListes();
    while (list($num, $ligne) = each($cats)) {
        $newcat[$num] = $num;
    }
    $newcat[null] = "{none}";
    $sql = "SELECT DATE_FORMAT(zDate,'%Y-%m-%d') as tdate FROM tables_day ORDER BY zDate LIMIT 0,1";
    $ligne2 = mysql_fetch_array($q->QUERY_SQL($sql));
    $mindate = $ligne2["tdate"];
    $sql = "SELECT DATE_FORMAT(zDate,'%Y-%m-%d') as tdate FROM tables_day ORDER BY zDate DESC LIMIT 0,1";
    $ligne2 = mysql_fetch_array($q->QUERY_SQL($sql));
    $maxdate = $ligne2["tdate"];
    $ID = $_GET["ID"];
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM `squid_reports` WHERE ID='{$ID}'"));
    $t = time();
    $report_days[0] = "{date_range}";
    $report_days[2] = "2 {days}";
    $report_days[7] = "1 {week}";
    $report_days[15] = "2 {weeks}";
    $report_days[-1] = "{current_month}";
    $report_days[30] = "1 {month}";
    $report_days[60] = "2 {months}";
    $report_days[90] = "3 {months}";
    $report_days[180] = "6 {months}";
    $report_days[365] = "1 {year}";
    $report_build_time_start = $ligne["report_build_time_start"];
    $report_build_time_end = $ligne["report_build_time_end"];
    if ($report_build_time_start == 0) {
        $report_build_time_start = $mindate;
    } else {
        $report_build_time_start = date("Y-m-d", $report_build_time_start);
    }
    if ($report_build_time_end == 0) {
        $report_build_time_end = $maxdate;
    } else {
        $report_build_time_end = date("Y-m-d", $report_build_time_end);
    }
    if ($ligne["report_name"] == null) {
        $ligne["report_name"] = "New report";
    }
    $html = "<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t" . Field_text_table("report_name-{$t}", "{report}", utf8_encode($ligne["report_name"]), 18, null, 350) . Field_text_table("description-{$t}", "{description}", utf8_encode($ligne["description"]), 18, null, 350) . Field_list_table("report_type-{$t}", "{type}", $ligne["report_type"], 18, $q->report_types) . Field_list_table("report_days-{$t}", "{from_the_last_time}", $ligne["report_days"], 18, $report_days, "ReportDaysCheck()") . "<tr>\n\t\t<td style='font-size:18px' class=legend>{from_date}:</td>\n\t\t<td>" . field_date("report_build_time_start-{$t}", $report_build_time_start, "font-size:18px;padding:3px;width:120px", "mindate:{$mindate};maxdate:{$maxdate}") . "</td>\n\t</tr>\n<tr>\n\t\t<td style='font-size:18px' class=legend>{to_date}:</td>\n\t\t<td>" . field_date("report_build_time_end-{$t}", $report_build_time_end, "font-size:18px;padding:3px;width:120px", "mindate:{$mindate};maxdate:{$maxdate}") . "</td>\n\t</tr>\t\t" . Field_checkbox_table("recategorize-{$t}", "{recategorize}", $ligne["recategorize"], 18) . Field_checkbox_table("categorize-{$t}", "{categorize}", $ligne["categorize"], 18) . Field_checkbox_table("report_not_categorized-{$t}", "{report_not_categorized}", $ligne["report_not_categorized"], 18) . Field_button_table_autonome("{apply}", "Save{$t}", 26) . "</table>\n\t</div>\t\n<script>\n\n\tvar xSave{$t}= function (obj) {\n\t\tvar res=obj.responseText;\n\t\t\n\t\tif (res.length>3){\n\t\t\talert(res);\n\t\t\treturn;\n\t\t}\n\t\t\$('#SQUID_MAIN_REPORTS').flexReload();\n\t\tRefreshTab('report_single_tab');\n\t}\t\n\t\n\tfunction ReportDaysCheck(){\n\t\tdocument.getElementById('report_build_time_start-{$t}').disabled=true;\n\t\tdocument.getElementById('report_build_time_end-{$t}').disabled=true;\n\t\tvar report_days=document.getElementById('report_days-{$t}').value;\n\t\tif(report_days==0){\n\t\t\tdocument.getElementById('report_build_time_start-{$t}').disabled=false;\n\t\t\tdocument.getElementById('report_build_time_end-{$t}').disabled=false;\t\t\n\t\t}\n\t}\n\n\tfunction Save{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\t\n\t\tXHR.appendData('ID',{$ID});\n\t\tXHR.appendData('report_name',encodeURIComponent(document.getElementById('report_name-{$t}').value));\n\t\tXHR.appendData('description',encodeURIComponent(document.getElementById('description-{$t}').value));\n\t\t\n\t\tXHR.appendData('report_build_time_start',document.getElementById('report_build_time_start-{$t}').value);\n\t\tXHR.appendData('report_build_time_end',document.getElementById('report_build_time_end-{$t}').value);\n\t\t\n\t\tXHR.appendData('report_type',document.getElementById('report_type-{$t}').value);\n\t\tXHR.appendData('report_days',document.getElementById('report_days-{$t}').value);\n\t\tif(document.getElementById('recategorize-{$t}').checked){XHR.appendData('recategorize',1);}else{XHR.appendData('recategorize',0);}\n\t\tif(document.getElementById('categorize-{$t}').checked){XHR.appendData('categorize',1);}else{XHR.appendData('categorize',0);}\n\t\tif(document.getElementById('report_not_categorized-{$t}').checked){XHR.appendData('report_not_categorized',1);}else{XHR.appendData('report_not_categorized',0);}\n\t\t\n\t\t\n\t\t\n\t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\t\n\t}\n\t\nReportDaysCheck();\n</script>\n\t\t\t\n\t\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:48,代码来源:squid.stats.reports.php


注:本文中的Field_text_table函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。