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


PHP mysql_squid_builder::mysql_error_html方法代码示例

本文整理汇总了PHP中mysql_squid_builder::mysql_error_html方法的典型用法代码示例。如果您正苦于以下问题:PHP mysql_squid_builder::mysql_error_html方法的具体用法?PHP mysql_squid_builder::mysql_error_html怎么用?PHP mysql_squid_builder::mysql_error_html使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mysql_squid_builder的用法示例。


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

示例1: 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} «{$ligne2["servername"]}»";
    }
    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=text-info>{reverse_proxy_use_destination_server_certificate}</div>";
    }
    $html[] = "<div style='width:98%' class=form>{$AS_PEER_CERTIFICATE_EXPLAIN}";
    $html[] = "<table style='width:100%'>";
    $html[] = "<tr><td colspan=2 style='font-size:28px;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, 700, "SwitchOffCertificate{$t}") . "</td></tr>";
    $html[] = Field_list_table("certificate-{$t}", "{certificate}", $ligne["certificate"], 22, $sslcertificates, null, 450);
    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, 700) . "</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, 700) . "</td></tr>";
    }
    $html[] = Field_button_table_autonome("{apply}", "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);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\t\n\tXHR.appendData('certificate',document.getElementById('certificate-{$t}').value);\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:brucewu16899,项目名称:1.6.x,代码行数:56,代码来源:nginx.site.ssl.php

示例2: popup

function popup()
{
    $tpl = new templates();
    $sock = new sockets();
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $sql = "CREATE TABLE IF NOT EXISTS `nginx_exchecp` (\n\t\t\t`ID` INT( 5 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,\n\t\t\t`hostname` VARCHAR( 255 ) NOT NULL ,\n\t\t\t`ipsrc` VARCHAR( 255 ) NOT NULL ,\n\t\t\t`enabled` INT( 1 ) NOT NULL DEFAULT '1',\n\t\t\tINDEX ( `enabled`,`ipsrc`,`hostname` )) ENGINE=MYISAM;";
    $q->QUERY_SQL($sql);
    if (!$q->ok) {
        echo $q->mysql_error_html();
    }
    $enabled = $tpl->_ENGINE_parse_body("{enable}");
    $delete = $tpl->_ENGINE_parse_body("{delete}");
    $new_proxy = $tpl->javascript_parse_text("{new_host}");
    $files = $tpl->_ENGINE_parse_body("{files}");
    $hosts = $tpl->javascript_parse_text("{hosts}");
    $apply_params = $tpl->_ENGINE_parse_body("{apply}");
    $title = $tpl->javascript_parse_text("ECP:{clients_restrictions}");
    $remove = $tpl->javascript_parse_text("{delete} {host}");
    $new_host = $tpl->javascript_parse_text("{new_host}");
    $apache_auth_ip_explain = $tpl->javascript_parse_text("{apache_auth_ip_explain}");
    $tt = $_GET["tt"];
    $servernameenc = urlencode($_GET["servername"]);
    $t = time();
    $html = "\n\t<table class='NGINX_EXCHECP_TABLE' style='display: none' id='NGINX_EXCHECP_TABLE' style='width:99%'></table>\n<script>\nvar tmp{$t}='';\n\$(document).ready(function(){\n\$('#NGINX_EXCHECP_TABLE').flexigrid({\n\turl: '{$page}?proxies-list=yes&t={$t}&servername={$servernameenc}',\n\tdataType: 'json',\n\tcolModel : [\n\t\t{display: '<span style=font-size:18px>{$hosts}</span>', name : 'ipsrc', width : 936, sortable : true, align: 'left'},\n\t\t{display: '&nbsp;', name : 'delete', width : 60, sortable : true, align: 'center'},\n\t\t\n\t],\nbuttons : [\n{name: '<strong style=font-size:22px>{$new_host}</strong>', bclass: 'Add', onpress : AuthIpAdd{$t}},\t\n{name: '<strong style=font-size:22px >{$apply_params}</strong>', bclass: 'apply', onpress : Apply{$t}},\n\t\t],\t\n\tsearchitems : [\n\t\t{display: '{$hosts}', name : 'zDate'},\n\t\t\n\t\t\n\t\t],\n\tsortname: 'ipsrc',\n\tsortorder: 'asc',\n\tusepager: true,\n\ttitle: '<strong style=font-size:30px>{$title}</strong>',\n\tuseRp: true,\n\trp: 50,\n\tshowTableToggleBtn: false,\n\twidth: '99%',\n\theight: 600,\n\tsingleSelect: true\n\t\n\t});   \n});\t\n\tfunction SquidBuildNow{$t}(){\n\t\tLoadjs('squid.windowsupdate.whitelist.progress.php');\n\t}\n\t\nfunction AddProxyChild(){\n\tYahooWin5('750','{$page}?add-proxy=yes&t={$t}','{$new_proxy}');\n\n}\n\tvar x_EnableDisableProxyClient{$t}= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>2){alert(results);return;}\n\t\t\t\$('#NGINX_EXCHECP_TABLE').flexReload();\n\t\t}\t\n\nfunction AuthIpAdd{$t}(){\n\tvar ip=prompt('{$apache_auth_ip_explain}');\n\tif(ip){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('authip-add',ip);\n\t\tXHR.appendData('servername','{$_GET["servername"]}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_EnableDisableProxyClient{$t});\n\t}\n}\nfunction Apply{$t}(){\n\tLoadjs('nginx.single.progress.php?servername={$servernameenc}');\n}\n\n\n\nfunction LocalForwardedFor(){\n\tLoadjs('squid.forwarded_for.php');\n}\n\n\tvar x_DeleteSquidChild{$t}= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>2){alert(results);return;}\n\t\t\t\$('#rowTSC'+tmp{$t}).remove();\n\t\t}\t\t\n\n\tfunction DeleteSquidChild(ID){\n\t\ttmp{$t}=ID;\n\t\tif(confirm('{$remove} '+ID+' ?')){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('proxy-delete',ID);\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_DeleteSquidChild{$t});\n\t\t}\n\t}\n\t\n\t\n\t\n\tfunction EnableDisableProxyClient(ID){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('proxy-enable',ID);\n\t\tif(document.getElementById('ProxyClient_'+ID).checked){\n\t\t\tXHR.appendData('enable',1);\n\t\t}else{\n\t\t\tXHR.appendData('enable',0);\n\t\t}\n\t\t\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_EnableDisableProxyClient{$t});\t\n\t}\n\t\n</script>\n";
    echo $html;
}
开发者ID:articatech,项目名称:artica,代码行数:28,代码来源:nginx.exchange.ecp.php

示例3: table

function table()
{
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $page = CurrentPageName();
    $page = CurrentPageName();
    $sock = new sockets();
    $t = time();
    if (!$q->TABLE_EXISTS("ufdbunlock")) {
        $sql = "CREATE TABLE IF NOT EXISTS `squidlogs`.`ufdbunlock` (\n\t\t\t`md5` VARCHAR( 90 ) NOT NULL ,\n\t\t\t`logintime` BIGINT UNSIGNED ,\n\t\t\t`finaltime` INT UNSIGNED ,\n\t\t\t`uid` VARCHAR(128) NOT NULL,\n\t\t\t`MAC` VARCHAR( 90 ) NULL,\n\t\t\t`www` VARCHAR( 128 ) NOT NULL ,\n\t\t\t`ipaddr` VARCHAR( 128 ) ,\n\t\t\tPRIMARY KEY ( `md5` ) ,\n\t\t\tKEY `MAC` (`MAC`),\n\t\t\tKEY `logintime` (`logintime`),\n\t\t\tKEY `finaltime` (`finaltime`),\n\t\t\tKEY `uid` (`uid`),\n\t\t\tKEY `www` (`www`),\n\t\t\tKEY `ipaddr` (`ipaddr`)\n\t\t\t)  ENGINE = MEMORY;";
        $q->QUERY_SQL($sql);
        if (!$q->ok) {
            echo FATAL_ERROR_SHOW_128($q->mysql_error_html());
            return;
        }
    }
    //
    $ipaddr = $tpl->_ENGINE_parse_body("{ipaddr}");
    $uid = $tpl->_ENGINE_parse_body("{uid}");
    $sitename = $tpl->_ENGINE_parse_body("{sitename}");
    $date = $tpl->_ENGINE_parse_body("{created}");
    $finish = $tpl->_ENGINE_parse_body("{finish}");
    $delete = $tpl->_ENGINE_parse_body("{delete}");
    $member = $tpl->javascript_parse_text("{members}");
    $parameters = $tpl->javascript_parse_text("{settings}");
    $title = $tpl->_ENGINE_parse_body("{unblock_queue}");
    $buttons = "\n\tbuttons : [\n\t\t{name: '{$parameters}', bclass: 'Reconf', onpress : unblock_parms},\n\t\n\t],";
    $buttons = null;
    $html = "\n\n<table class='UFDBGUARD_QUEUE_RELEASE' style='display: none' id='UFDBGUARD_QUEUE_RELEASE' style='width:100%'></table>\n<script>\nvar rowid{$t}='';\n\$(document).ready(function(){\n\$('#UFDBGUARD_QUEUE_RELEASE').flexigrid({\n\turl: '{$page}?rules-table-list=yes&t={$t}',\n\tdataType: 'json',\n\tcolModel : [\n\t\t{display: '{$date}', name : 'logintime', width : 180, sortable : true, align: 'left'},\t\n\t\t{display: '{$ipaddr}', name : 'ipaddr', width : 160, sortable : true, align: 'left'},\n\t\t{display: '{$uid}', name : 'uid', width : 160, sortable : true, align: 'left'},\t\t\n\t\t{display: '{$sitename}', name : 'www', width : 299, sortable : true, align: 'left'},\n\t\t{display: '{$finish}', finaltime : 'uid', width :180, sortable : true, align: 'left'},\n\t\t{display: '{$delete}', name : 'delete', width : 70, sortable : false, align: 'center'},\n\t\t],\n\t{$buttons}\n\tsearchitems : [\n\t\t{display: '{$ipaddr}', name : 'ipaddr'},\n\t\t{display: '{$member}', name : 'uid'},\n\t\t{display: '{$sitename}', name : 'www'},\n\t\t],\n\tsortname: 'logintime',\n\tsortorder: 'desc',\n\tusepager: true,\n\ttitle: '<strong style=font-size:22px>{$title}</strong>',\n\tuseRp: true,\n\trp: 50,\n\tshowTableToggleBtn: false,\n\twidth: '99%',\n\theight: 400,\n\tsingleSelect: true,\n\trpOptions: [10, 20, 30, 50,100,200]\n\t\n\t});   \n});\n\n\tfunction unblock_parms(){\n\t\tLoadjs('squidguardweb.unblock.php')\n\t}\n\n\tvar xBannedDeleteQueueUFDB= function (obj) {\n\t\tvar res=obj.responseText;\n\t\tif (res.length>3){alert(res);return;}\n\t\t\$('#row'+rowid{$t}).remove();\n\t\t\$('#UFDBGUARD_QUEUE_RELEASE').flexReload();\n\t}\t\t\n\t\t\n\tfunction BannedDeleteQueueUFDB(md5){\n\t\trowid{$t}=md5;\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('DeleteWhiteListed', md5);\n\t\tXHR.sendAndLoad('{$page}', 'POST',xBannedDeleteQueueUFDB);  \n\t}\n\n</script>\n";
    echo $html;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:31,代码来源:squidguardweb.unblock.queue.php

示例4: items_js

function items_js()
{
    $ID = $_GET["ID"];
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $objects = $tpl->_ENGINE_parse_body("{objects}");
    $items = $tpl->_ENGINE_parse_body("{items}");
    $new_item = $tpl->_ENGINE_parse_body("{link_object}");
    $new_group = $tpl->_ENGINE_parse_body("{new_proxy_object}");
    $reverse = $tpl->_ENGINE_parse_body("{reverse}");
    $t = $_GET["t"];
    $MyTime = time();
    $q = new mysql_squid_builder();
    $sql = "CREATE TABLE IF NOT EXISTS `squidlogs`.`qos_sqacllinks` (\n\t\t\t`zmd5` VARCHAR( 90 ) NOT NULL PRIMARY KEY ,\n\t\t\t`aclid` BIGINT UNSIGNED ,\n\t\t\t`negation` smallint(1) NOT NULL ,\n\t\t\t`gpid` INT UNSIGNED ,\n\t\t\t`zOrder` INT( 10 ) NOT NULL ,\n\t\t\tINDEX ( `aclid` , `gpid`,`negation`),\n\t\t\tKEY `zOrder`(`zOrder`)\n\t\t\t)  ENGINE = MYISAM;";
    $q->QUERY_SQL($sql);
    if (!$q->ok) {
        echo $q->mysql_error_html();
        die;
    }
    $html = "\n\t<table class='QOS_RULES_GROUPS_ID' style='display: none' id='QOS_RULES_GROUPS_ID' style='width:99%'></table>\n<script>\nvar DeleteAclKey=0;\nfunction LoadTable{$t}(){\n\$('#QOS_RULES_GROUPS_ID').flexigrid({\n\turl: '{$page}?items-list=yes&ID={$ID}&t={$t}&aclid={$_GET["aclid"]}',\n\tdataType: 'json',\n\tcolModel : [\n\t\t{display: '&nbsp;', name : 'zOrder', width :20, sortable : true, align: 'center'},\t\n\t\t{display: '{$objects}', name : 'gpid', width : 311, sortable : true, align: 'left'},\n\t\t{display: '{$reverse}', name : 'negation', width : 31, sortable : false, align: 'center'},\n\t\t{display: '{$items}', name : 'items', width : 69, sortable : false, align: 'center'},\n\t\t{display: '&nbsp;', name : 'up', width :20, sortable : false, align: 'center'},\n\t\t{display: '&nbsp;', name : 'down', width :20, sortable : false, align: 'center'},\t\t\n\t\t{display: '&nbsp;', name : 'del', width : 31, sortable : false, align: 'center'},\n\t\t\n\t],\nbuttons : [\n\t{name: '<strong style=font-size:18px>{$new_item}</strong>', bclass: 'add', onpress : LinkAclItem},\n\n\t\t],\t\n\tsearchitems : [\n\t\t{display: '{$items}', name : 'GroupName'},\n\t\t],\n\tsortname: 'zOrder',\n\tsortorder: 'asc',\n\tusepager: true,\n\ttitle: '',\n\tuseRp: true,\n\trp: 15,\n\tshowTableToggleBtn: false,\n\twidth: '99%',\n\theight: 350,\n\tsingleSelect: true\n\t\n\t});   \n}\nfunction LinkAclItem() {\n\tLoadjs('squid.BrowseAclGroups.php?callback=LinkAclRuleGpid{$_GET["aclid"]}&FilterType=IPTABLES');\n\t\n}\t\n\nfunction LinkAddAclItem(){\n\tLoadjs('squid.acls.groups.php?AddGroup-js=-1&link-acl={$_GET["aclid"]}&table-acls-t={$t}');\n}\n\nvar x_LinkAclRuleGpid{$MyTime}= function (obj) {\n\tvar res=obj.responseText;\n\tif(res.length>3){alert(res);return;}\n\t\n\tif(document.getElementById('GLOBAL_SSL_CENTER_ID')){\n\t\t\$('#'+document.getElementById('GLOBAL_SSL_CENTER_ID').value).flexReload();\n\t}\n\t\n\t\$('#QOS_RULES_GROUPS_ID').flexReload();\n\t\$('#table-{$t}').flexReload();\n\n\t\n\t\n}\t\n\nfunction LinkAclRuleGpid{$_GET["aclid"]}(gpid){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('acl-rule-link', '{$_GET["aclid"]}');\n\t\tXHR.appendData('gpid', gpid);\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_LinkAclRuleGpid{$MyTime});  \t\t\n\t}\n\t\n\tfunction DeleteObjectLinks(mkey){\n\t\tDeleteAclKey=mkey;\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('acl-rule-link-delete', mkey);\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_DeleteObjectLinks{$MyTime});\n\t\t\t\t\n\t}\n\t\n\tfunction ChangeNegation(mkey){\n\t\tvar value=0;\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('negation-'+mkey).checked){value=1;}\n\t\tXHR.appendData('acl-rule-link-negation', mkey);\n\t\tXHR.appendData('value', value);\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_LinkAclRuleGpid{$MyTime});\n\t}\n\t\nvar xQosRuleGroupUpDown{$_GET["aclid"]}= function (obj) {\n\tvar res=obj.responseText;\n\tif(res.length>3){alert(res);return;}\n\t\$('#QOS_RULES_GROUPS_ID').flexReload();\n}\t\n\t\nfunction QosRuleGroupUpDown(mkey,direction){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('acl-rule-link-order', mkey);\n\tXHR.appendData('direction', direction);\n\tXHR.appendData('aclid', '{$_GET["aclid"]}');\n\tXHR.sendAndLoad('{$page}', 'POST',xQosRuleGroupUpDown{$_GET["aclid"]});\n\n}\n\n\tvar x_DeleteObjectLinks{$MyTime}= function (obj) {\n\t\tvar res=obj.responseText;\n\t\tif(res.length>3){alert(res);return;}\n\t\t\$('#row'+DeleteAclKey).remove();\n\t\t\$('#table-{$t}').flexReload();\n\t\tif(document.getElementById('GLOBAL_SSL_CENTER_ID')){\n\t\t\t\$('#'+document.getElementById('GLOBAL_SSL_CENTER_ID').value).flexReload();\n\t\t}\n\t}\t\n\t\nLoadTable{$t}();\n</script>\n\t\n\t";
    echo $html;
}
开发者ID:articatech,项目名称:artica,代码行数:23,代码来源:system.qos.container.rules.php

示例5: step5

function step5()
{
    $allsystems = 0;
    $final = "<script>\n\t\t\tYahooWin5Hide();\n\t\t\tLoadjs('dansguardian2.compile.php');\n\t\t\tCacheOff();\n\t\t\tLoadAjaxRound('main-ufdb-frontend','ufdbguard.status.php');\n\t\t\t\t\n\t\t</script>";
    $tpl = new templates();
    $sock = new sockets();
    $WizardUFDB = unserialize(base64_decode($sock->GET_INFO("WizardUFDB")));
    if ($WizardUFDB["SOURCE_TYPE"] == "ALL") {
        $allsystems = 1;
    }
    $ARRAY[0] = "{block_sexual_websites}";
    $ARRAY[1] = "{block_susp_websites}";
    $ARRAY[2] = "{block_multi_websites}";
    $wizard_Name = strtolower('Wizard - rule ' . $tpl->javascript_parse_text($ARRAY[$WizardUFDB["CATZ"]]));
    $wizard_Name_tests = addslashes(utf8_encode($wizard_Name));
    $q = new mysql_squid_builder();
    $sql = "SELECT ID FROM webfilter_rules WHERE `groupname`='{$wizard_Name_tests}'";
    $results = $q->QUERY_SQL($sql);
    $mysql_num_rows = intval(mysql_num_rows($results));
    if ($mysql_num_rows > 0) {
        $wizard_Name = "{$wizard_Name} - " . intval($mysql_num_rows + 1);
    }
    $RULES["AllSystems"] = $allsystems;
    $RULES["ExternalWebPage"] = null;
    $RULES["UseExternalWebPage"] = 0;
    $RULES["UseSecurity"] = 0;
    $RULES["bypass"] = 0;
    $RULES["enabled"] = 1;
    $RULES["endofrule"] = 'any';
    $RULES["freeweb"] = '';
    $RULES["groupmode"] = 1;
    $RULES["groupname"] = $wizard_Name;
    $RULES["zOrder"] = 0;
    $fieldsAddA = array();
    $fieldsAddB = array();
    while (list($num, $ligne) = each($RULES)) {
        $fieldsAddA[] = "`{$num}`";
        $fieldsAddB[] = "'" . addslashes(utf8_encode($ligne)) . "'";
        $fieldsEDIT[] = "`{$num}`='" . addslashes(utf8_encode($ligne)) . "'";
        $DEFAULTARRAY[$num] = $ligne;
    }
    $sql_add = "INSERT IGNORE INTO webfilter_rules (" . @implode(",", $fieldsAddA) . ") VALUES (" . @implode(",", $fieldsAddB) . ")";
    $q->QUERY_SQL($sql_add);
    if (!$q->ok) {
        echo $q->mysql_error_html();
        return;
    }
    $ruleid = $q->last_id;
    if ($ruleid == 0) {
        echo "<p class=text-error>Fatal last ID = 0</p>";
        return;
    }
    $array["malware"] = true;
    $array["warez"] = true;
    $array["hacking"] = true;
    $array["phishing"] = true;
    $array["spyware"] = true;
    $array["weapons"] = true;
    $array["violence"] = true;
    $array["suspicious"] = true;
    $array["paytosurf"] = true;
    $array["sect"] = true;
    $array["proxy"] = true;
    $array["gamble"] = true;
    $array["redirector"] = true;
    if ($WizardUFDB["CATZ"] == 0) {
        $array["porn"] = true;
        $array["agressive"] = true;
        $array["dynamic"] = true;
        $array["alcohol"] = true;
        $array["astrology"] = true;
        $array["dangerous_material"] = true;
        $array["drugs"] = true;
        $array["hacking"] = true;
        $array["tattooing"] = true;
        $array["terrorism"] = true;
        $array["dating"] = true;
        $array["mixed_adult"] = true;
        $array["sex/lingerie"] = true;
        $array["publicite"] = true;
        $array["tracker"] = true;
        $array["marketingware"] = true;
        $array["mailing"] = true;
        $array["downloads"] = true;
        $array["gamble"] = true;
    }
    if ($WizardUFDB["CATZ"] == 1) {
        $array["porn"] = true;
        $array["dating"] = true;
        $array["mixed_adult"] = true;
        $array["sex/lingerie"] = true;
    }
    if ($WizardUFDB["CATZ"] == 2) {
        $array["publicite"] = true;
        $array["tracker"] = true;
        $array["marketingware"] = true;
        $array["mailing"] = true;
    }
    if ($WizardUFDB["CATZ"] == 3) {
        $array["audio-video"] = true;
//.........这里部分代码省略.........
开发者ID:articatech,项目名称:artica,代码行数:101,代码来源:dansguardian2.wizard.rule.php

示例6: remove_cache_button

function remove_cache_button()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $button_browse = null;
    $button_empty = null;
    $sql = "SELECT COUNT(ID) as tcount,report_type FROM `reports_cache` GROUP BY report_type HAVING `report_type`='FLOW'";
    $ligne = mysql_fetch_array($q->QUERY_SQL($sql));
    if (!$q->ok) {
        echo $q->mysql_error_html();
    }
    if (intval($ligne["tcount"]) > 0) {
        $button_browse = $tpl->_ENGINE_parse_body(button("{browse_cache}", "Loadjs('squid.statistics.browse-cache.php?report_type=FLOW')", 16));
    }
    $button_empty = $tpl->_ENGINE_parse_body(button("{empty_cache}", "Loadjs('{$page}?remove-cache-js=yes&zmd5={$_GET["zmd5"]}')", 16));
    echo "<table><tr><td nowrap>{$button_browse}</td><td>&nbsp;</td><td>{$button_empty}</td></tr></table>";
}
开发者ID:articatech,项目名称:artica,代码行数:18,代码来源:squid.statistics.webfiltering.php

示例7: wifidog_password_perform

function wifidog_password_perform()
{
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $sessionkey = $_REQUEST["sessionkey"];
    if ($sessionkey == null) {
        return wifidog_password("Missing field sessionkey");
    }
    $url = $_REQUEST["url"];
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT uid FROM hotspot_members WHERE `sessionkey`='{$sessionkey}'"));
    if ($ligne["uid"] == null) {
        echo BuildFullPage(null, "<center>{this_account_didnot_exists}<hr><span style='font-size:12px'>{$sessionkey}</span></center>", "<META http-equiv=\"refresh\" content=\"5; URL={$url}\">");
        return;
    }
    $password2 = trim($_POST["password2"]);
    $password = trim($_POST["password"]);
    if ($password2 != $password) {
        return wifidog_password("{password_mismatch}");
    }
    $password = md5($password);
    $sql = "UPDATE hotspot_members\n\tSET autocreate_confirmed=1,\n\t\tautocreate=1,\n\t\tpassword='{$password}'\n\t\tWHERE sessionkey='{$sessionkey}'";
    $q->QUERY_SQL($sql);
    if (!$q->ok) {
        return wifidog_password($q->mysql_error_html());
    }
    $ArticaHotSpotSMTP = SMTP_SETTINGS();
    $btsize = $ArticaHotSpotSMTP["SKIN_BUTTON_SIZE"];
    $fontsize = $ArticaHotSpotSMTP["SKIN_FONT_SIZE"];
    $text_form = "\n\t<div style='width:98%' class=form>\n\t<center>\n\t<div style='font-size:{$fontsize}'><center>{updated_password_successfully}<br>{$url}</center></div>\n\t<img src='img/wait_verybig_mini_red.gif'></center></div>";
    $text_form = $tpl->_ENGINE_parse_body($text_form);
    echo BuildFullPage($text_form, null, "<META http-equiv=\"refresh\" content=\"5; URL={$url}\">");
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:32,代码来源:hotspot.php

示例8: category_table

function category_table()
{
    $ID = $_GET["mainid"];
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $category = $tpl->_ENGINE_parse_body("{extension}");
    $description = $tpl->_ENGINE_parse_body("{description}");
    $category = $tpl->_ENGINE_parse_body("{category}");
    $delete = $tpl->_ENGINE_parse_body("{delete}");
    $group = $tpl->_ENGINE_parse_body("{group}");
    $add = $tpl->_ENGINE_parse_body("{add}:{extension}");
    $addDef = $tpl->_ENGINE_parse_body("{add}:{default}");
    $new_category = $tpl->_ENGINE_parse_body("{new_category}");
    $OnlyActive = $tpl->_ENGINE_parse_body("{OnlyActive}");
    $Group = $tpl->_ENGINE_parse_body("{group}");
    $All = $tpl->_ENGINE_parse_body("{all}");
    $TB_WIDTH = 897;
    $group = $_GET["group"];
    if (isset($_GET["CatzByEnabled"])) {
        $CatzByEnabled = "&CatzByEnabled=yes";
    }
    $t = $_GET["t"];
    $d = time();
    $sql = "CREATE TABLE IF NOT EXISTS `cicap_profiles_blks` (\n\t\t\t\t   `ID` INT( 5 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,\n\t\t\t\t    mainid INT(3) NOT NULL,\n\t\t\t\t  \tbltype smallint(1) NOT NULL,\n\t\t\t\t  \tcategory VARCHAR(128) NOT NULL,\n\t\t\t\t  KEY `mainid` (`mainid`),\n\t\t\t\t  KEY `category` (`category`),\n\t\t\t\t  KEY `bltype` (`bltype`)\n\t\t\t\t)  ENGINE = MYISAM;";
    $q->QUERY_SQL($sql);
    if (!$q->ok) {
        echo $q->mysql_error_html();
        return;
    }
    $description_size = 639;
    $buttons = "\tbuttons : [\n\t{name: '{$new_category}', bclass: 'add', onpress : AddCatz},\n\t{name: '{$OnlyActive}', bclass: 'Search', onpress : OnlyActive{$t}},\n\t{name: '{$All}', bclass: 'Search', onpress : OnlyAll{$t}},\n\t{name: '{$Group}', bclass: 'Search', onpress : GroupBy{$t}},\n\t],";
    $buttons = null;
    if ($_GET["bltype"] == 1) {
        $title = $tpl->javascript_parse_text("{categories}: {whitelist}");
    } else {
        $title = $tpl->javascript_parse_text("{categories}: {blacklist}");
    }
    if (is_numeric($_GET["table-size"])) {
        $TB_WIDTH = $_GET["table-size"];
    }
    if (is_numeric($_GET["group-size"])) {
        $description_size = $_GET["group-size"];
    }
    $html = "\n\t<table class='blacklist{$t}{$_GET["bltype"]}' style='display: none' id='blacklist{$t}{$_GET["bltype"]}' style='width:99%'></table>\n\t<script>\n\tvar CatzByEnable{$t}=0;\n\t\$(document).ready(function(){\n\t\$('#blacklist{$t}{$_GET["bltype"]}').flexigrid({\n\turl: '{$page}?category-list=yes&mainid={$ID}&bltype={$_GET["bltype"]}&t={$_GET["t"]}',\n\tdataType: 'json',\n\tcolModel : [\n\t{display: '&nbsp;', name : 'none', width :28, sortable : false, align: 'center'},\n\t{display: '{$category}', name : 'categorykey', width : 108, sortable : true, align: 'left'},\n\t{display: '{$description}', name : 'description', width : {$description_size}, sortable : false, align: 'left'},\n\t{display: '', name : 'none2', width : 25, sortable : false, align: 'left'},\n\n\t],\n\t{$buttons}\n\tsearchitems : [\n\t{display: '{$category}', name : 'categorykey'},\n\t{display: '{$description}', name : 'description'},\n\t{display: '{$group}', name : 'master_category'},\n\t],\n\tsortname: 'categorykey',\n\tsortorder: 'asc',\n\tusepager: true,\n\ttitle: '<span style=font-size:18px>{$title}</span>',\n\tuseRp: true,\n\trp: 15,\n\tshowTableToggleBtn: false,\n\twidth: {$TB_WIDTH},\n\theight: 350,\n\tsingleSelect: true\n\n});\n});\nfunction ChooseGroup(group) {\nalert(group);\n\n}\n\nfunction GroupBy{$t}(){\nYahooSearchUser(300,'{$page}?blacklist-list-group=yes&iditem=blacklist-table-{$t}-{$d}&RULEID={$ID}&modeblk={$_GET["modeblk"]}&TimeID={$_GET["TimeID"]}&CatzByEnable='+CatzByEnable{$t},'{$Group}');\n}\n\nfunction OnlyActive{$t}(){\nCatzByEnable{$t}=1;\n\$('#blacklist-table-{$t}-{$d}').flexOptions({url: '{$page}?blacklist-list=yes&RULEID={$ID}&modeblk={$_GET["modeblk"]}&group={$group}&CatzByEnabled=yes&TimeID={$_GET["TimeID"]}'}).flexReload(); ExecuteByClassName('SearchFunction');\n}\nfunction OnlyAll{$t}(){\nCatzByEnable{$t}=0;\n\$('#blacklist-table-{$t}-{$d}').flexOptions({url: '{$page}?blacklist-list=yes&RULEID={$ID}&modeblk={$_GET["modeblk"]}&group={$group}&TimeID={$_GET["TimeID"]}'}).flexReload(); ExecuteByClassName('SearchFunction');\n}\n\nvar x_bannedextensionlist_AddDefault=function(obj){\nvar results=obj.responseText;\nif(results.length>3){alert(results);}\nYahooWin6Hide();\nRefreshBannedextensionlist();\n}\n\nfunction bannedextensionlist_AddDefault(){\nvar XHR = new XHRConnection();\nXHR.appendData('bannedextensionlist-default','{$ID}');\nAnimateDiv('annedextensionlist-div');\nXHR.sendAndLoad('{$page}', 'POST',x_bannedextensionlist_AddDefault);\n\n}\n\nvar x_bannedextensionlist_enable=function(obj){\nvar results=obj.responseText;\nif(results.length>3){alert(results);RefreshBannedextensionlist();}\n}\n\nfunction bannedextensionlist_enable(md5){\nvar XHR = new XHRConnection();\nXHR.appendData('bannedextensionlist-key',md5);\nif(document.getElementById('disable_'+md5).checked){XHR.appendData('bannedextensionlist-enable','1');}else{XHR.appendData('bannedextensionlist-enable','0');}\nXHR.sendAndLoad('{$page}', 'POST',x_bannedextensionlist_enable);\n}\n\nvar x_bannedextensionlist_delete=function(obj){\nvar results=obj.responseText;\nif(results.length>3){alert(results);return;}\n\$('#row'+bannedextensionlist_KEY).remove();\n}\n\nfunction bannedextensionlist_delete(md5){\nbannedextensionlist_KEY=md5;\nvar XHR = new XHRConnection();\nXHR.appendData('bannedextensionlist-delete',md5);\nXHR.sendAndLoad('{$page}', 'POST',x_bannedextensionlist_delete);\n}\n\nfunction AddCatz(){\nLoadjs('dansguardian2.databases.php?add-perso-cat-js=yes');\n}\n\n</script>\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:47,代码来源:c-icap.profiles.php

示例9: search

function search()
{
    $page = CurrentPageName();
    $boot = new boostrap_form();
    $tpl = new templates();
    $searchstring = string_to_flexquery("search");
    $ORDER = $boot->TableOrder(array("subject" => "ASC"));
    $limitSql = "LIMIT 0,250";
    $sql = "SELECT * FROM reverse_pages_content WHERE 1 {$searchstring} ORDER BY {$ORDER} {$limitSql}";
    $q = new mysql_squid_builder();
    $results = $q->QUERY_SQL($sql);
    if (!$q->ok) {
        echo $q->mysql_error_html();
    }
    while ($ligne = mysql_fetch_assoc($results)) {
        $ID = $ligne["ID"];
        $jsselect = null;
        $select = null;
        $js = $boot->trswitch("Loadjs('miniadmin.crm.pages.php?ID={$ID}')");
        if ($_GET["field-id"] != null) {
            $select = "Loadjs('{$page}?select-js=yes&ID={$ID}&field-id={$_GET["field-id"]}')";
            $jsselect = $boot->trswitch($select);
            $select_img = imgsimple("arrow-right-24.png", null, $select);
        }
        $delete_img = imgsimple("delete-24.png", null, "Loadjs('{$page}?delete-js=yes&ID={$ID}')");
        $tr[] = "\n\t<tr id='{$ligne["ID"]}'>\n\t<td width='99%' nowrap {$js}><i class='icon-tags'></i> {$ligne["subject"]}</a></td>\n\t<td width='45px' nowrap style='vertical-align:middle;text-align:center'>{$select_img}</td>\n\t<td width='45px' nowrap style='vertical-align:middle;text-align:center'>{$delete_img}</td>\n\t</tr>";
    }
    $html = $boot->TableCompile(array("subject" => "{subject}", "ID" => "select", "delete" => "{delete}"), $tr);
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:30,代码来源:miniadmin.crm.browsepages.php

示例10: CategoriesCheckRightsRead

function CategoriesCheckRightsRead()
{
    $users = new usersMenus();
    if ($users->AsDansGuardianAdministrator) {
        return true;
    }
    $q = new mysql_squid_builder();
    $sql = "SELECT PublicMode FROM personal_categories WHERE category='{$_REQUEST["category"]}'";
    $ligne = mysql_fetch_array($q->QUERY_SQL($sql));
    if (!$q->ok) {
        echo $q->mysql_error_html();
        return;
    }
    $GLOBALS["CategoriesCheckRights"][] = "{$_REQUEST["category"]}: Public Mode: {$ligne["PublicMode"]}";
    if ($ligne["PublicMode"] == 1) {
        return true;
    }
    $CategoriesCheckPerms = CategoriesCheckPerms();
    if ($CategoriesCheckPerms[$_REQUEST["category"]] == 1) {
        return true;
    }
    return false;
}
开发者ID:articatech,项目名称:artica,代码行数:23,代码来源:class.mysql.squid.builder.php

示例11: upload_artica_final

function upload_artica_final()
{
    $fileName = $_GET["fileName"];
    $content_dir = dirname(__FILE__) . "/ressources/conf/upload";
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $page = CurrentPageName();
    $t = time();
    $ID = $_GET["ID"];
    $FilePath = "{$content_dir}/{$fileName}";
    $data = mysql_escape_string2(@file_get_contents($FilePath));
    $size = strlen($data);
    $q->QUERY_SQL("UPDATE itcharters SET `PdfContent`='{$data}',`PdfFileSize`='{$size}',`PdfFileName`='{$fileName}' WHERE ID='{$ID}'");
    if (!$q->ok) {
        echo $q->mysql_error_html();
        return;
    }
    echo "<script>RefreshTab('itchart_tabs');YahooWinBrowseHide();\$('#IT_CHART_TABLE').flexReload();</script>";
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:19,代码来源:itchart.pdf.upload.php

示例12: graph_current_hour_day

function graph_current_hour_day(){
	$timekey=date('Ymd');
	$time=time();
	$page=CurrentPageName();
	$q=new mysql_squid_builder();
	$table="squidmemory_$timekey";
	
	$sql="SELECT HOUR(zDate) as zhour,AVG(memoryuse) as memoryuse FROM `$table` GROUP BY HOUR(zDate) ORDER BY HOUR(zDate)";
	$results=$q->QUERY_SQL($sql);
	if(!$q->ok){echo $q->mysql_error_html();return;}
	
	while ($ligne = mysql_fetch_assoc($results)) {
		if(strlen($ligne["zhour"])==1){$ligne["zhour"]="0{$ligne["zhour"]}";}
		$ttime="{$ligne["zhour"]}h";
		$size=$size/1024;
		$xdata[]=$ttime;
		$ydata[]=$ligne["memoryuse"];
	
	}
	
	$title="{memory_size_this_day} (MB)";
	$timetext="{minutes}";
	
	
	$highcharts=new highcharts();
	$highcharts->container=$_GET["container"];
	$highcharts->xAxis=$xdata;
	$highcharts->TitleFontSize="14px";
	$highcharts->AxisFontsize="12px";
	$highcharts->Title=$title;
	$highcharts->yAxisTtitle="{size} (MB)";
	$highcharts->xAxisTtitle=$timetext;
	$highcharts->xAxis_labels=false;
	$highcharts->LegendPrefix=date("H")."h";
	$highcharts->LegendSuffix="MB";
	//$highcharts->subtitle="<a href=\"javascript:Loadjs('squid.sizegraphs.php')\" style='text-decoration:underline'>{more_details}</a>";
	$highcharts->datas=array("{size}"=>$ydata);
	echo $highcharts->BuildChart();	
	
	
	
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:42,代码来源:squid.memory.status.php

示例13: create_table

function create_table()
{
    $sql = "CREATE TABLE IF NOT EXISTS `artica_caches_wl` (\n\t\t`ID` BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n\t\t`sitename` VARCHAR( 256 ) NOT NULL,\n\t\t`enabled` smallint(1) NOT NULL DEFAULT 1,\n\t\t UNIQUE KEY `sitename` (`sitename`),\n\t\t KEY `enabled` (`enabled`)\n\t\t)  ENGINE = MYISAM;\n\t\t\t";
    $q = new mysql_squid_builder();
    $q->QUERY_SQL($sql);
    if (!$q->ok) {
        echo $q->mysql_error_html();
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:squid.artica-rules.whitelist.php

示例14: history_content

function history_content()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $xdata = array();
    $ydata = array();
    $field = $_GET["field"];
    $value = $_GET["value"];
    $familysite = $_GET["familysite"];
    $month_table = "quotamonth_" . date("Ym");
    $month_text = date("{F}");
    if ($q->COUNT_ROWS($month_table) == 0) {
        $month_text = date("{F}", strtotime('first day of previous month'));
        $month_table = "quotamonth_" . date("Ym", strtotime('first day of previous month'));
    }
    $sql = "SELECT `day`,`familysite`,`{$field}`,SUM(size) as QuerySize FROM \n\t\t`{$month_table}`  GROUP BY `day`,`familysite` ,`{$field}`\n\t\tHAVING `{$field}`='{$value}' AND familysite='{$familysite}' ORDER BY `day`";
    $results = $q->QUERY_SQL($sql);
    if (!$q->ok) {
        echo $q->mysql_error_html();
    }
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $size = round($ligne["QuerySize"] / 1024 / 1000);
        $day = $ligne["day"];
        $xdata[] = $day;
        $ydata[] = $size;
    }
    $targetedfile = "ressources/logs/" . basename(__FILE__) . "." . __FUNCTION__ . "." . md5($sql) . ".png";
    $targetedfile2 = "ressources/logs/" . basename(__FILE__) . "." . __FUNCTION__ . "." . md5($sql) . ".2.png";
    $gp = new artica_graphs();
    $gp->width = 650;
    $gp->height = 350;
    $gp->filename = "{$targetedfile}";
    $gp->xdata = $xdata;
    $gp->ydata = $ydata;
    $gp->y_title = $tpl->_ENGINE_parse_body("{size}");
    $gp->x_title = $tpl->_ENGINE_parse_body("{days}");
    $gp->title = null;
    $gp->margin0 = true;
    $gp->Fillcolor = "blue@0.9";
    $gp->color = "146497";
    $gp->line_green();
    if (!is_file($targetedfile)) {
        writelogs("Fatal \"{$targetedfile}\" no such file!", __FUNCTION__, __FILE__, __LINE__);
    } else {
        $html = $html . "\n\t\t<div style='font-size:18px;margin:8px'>&laquo;{$value}&raquo;&nbsp;|&nbsp;{$familysite}&nbsp;|&nbsp;{$month_text}</div>\n\t\t<center>\n\t\t\t<div style='width:99%' class=form>\n\t\t\t\t\n\t\t\t\t<img src='{$targetedfile}'>\n\t\t\t</div>\n\t\n\t\t</center>\n\t\t\n\t\t";
    }
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:49,代码来源:squid.members.sitename.php

示例15: status_remote_mysql_server

function status_remote_mysql_server(){
	$tpl=new templates();
	$q=new mysql_squid_builder();
	if(!$q->BD_CONNECT()){
		return Paragraphe32("mysql_error", "noacco:mysql://$q->mysql_server:$q->mysql_port<br>$q->mysql_error","","database-error-32.png");
	}else{
		$results=$q->EXECUTE_SQL("SHOW STATUS");
		
		if(!$q->ok){echo $q->mysql_error_html();}
		while ($ligne = mysql_fetch_assoc($results)) { $ARRAY[$ligne["Variable_name"]]=$ligne["Value"]; }
		
		$time=time()-$ARRAY["Uptime"];
		$Uptime=distanceOfTimeInWords($time,time());
		$Threads_connected=$ARRAY["Threads_connected"];
		$Connections=$ARRAY["Connections"];
		$Connections=FormatNumber($Connections);
		$MySqlServer="$q->mysql_server:$q->mysql_port";
		if($q->mysql_server){$MySqlServer=$tpl->_ENGINE_parse_body("{local_database}");}
		
		return Paragraphe32("noacco:$MySqlServer", "{running} {since} $Uptime<br>Threads: $Threads_connected<br>{connections}:$Connections	
				","","database-link-32.png");
	}
	
	
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:25,代码来源:squid.statistics.central.php


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