本文整理汇总了PHP中mysql_squid_builder::FIELD_EXISTS方法的典型用法代码示例。如果您正苦于以下问题:PHP mysql_squid_builder::FIELD_EXISTS方法的具体用法?PHP mysql_squid_builder::FIELD_EXISTS怎么用?PHP mysql_squid_builder::FIELD_EXISTS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mysql_squid_builder
的用法示例。
在下文中一共展示了mysql_squid_builder::FIELD_EXISTS方法的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"]} «{$servername}»{$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));
}
示例2: popup
function popup()
{
$q = new mysql_squid_builder();
$ID = $_GET["ID"];
$page = CurrentPageName();
$tpl = new templates();
$t = time();
if (!$q->FIELD_EXISTS("proxy_ports", "SquidAsMasterCacheChilds")) {
$q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `SquidAsMasterCacheChilds` smallint(1) NOT NULL DEFAULT '1'");
if (!$q->ok) {
echo $q->mysql_error . "\n";
}
}
if (!$q->FIELD_EXISTS("proxy_ports", "SquidAsMasterLogExtern")) {
$q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `SquidAsMasterLogExtern` smallint(1) NOT NULL DEFAULT '0'");
if (!$q->ok) {
echo $q->mysql_error . "\n";
}
}
if (!$q->FIELD_EXISTS("proxy_ports", "SquidAsMasterFollowxForward")) {
$q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `SquidAsMasterFollowxForward` smallint(1) NOT NULL DEFAULT '0'");
if (!$q->ok) {
echo $q->mysql_error . "\n";
}
}
if (!$q->FIELD_EXISTS("proxy_ports", "SquidAsMasterLogChilds")) {
$q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `SquidAsMasterLogChilds` smallint(1) NOT NULL DEFAULT '0'");
if (!$q->ok) {
echo $q->mysql_error . "\n";
}
}
$ligne = @mysql_fetch_array($q->QUERY_SQL("SELECT * FROM proxy_ports WHERE ID={$ID}"));
$p2 = Paragraphe_switch_img("{logging_childs_connections}", "{logging_childs_connections_explain}", "SquidAsMasterLogChilds-{$t}", $ligne["SquidAsMasterLogChilds"], null, 850);
$p21 = Paragraphe_switch_img("{logging_childs_connections2}", "{logging_childs_connections_explain2}", "SquidAsMasterLogExtern-{$t}", $ligne["SquidAsMasterLogChilds"], null, 850);
$p3 = Paragraphe_switch_img("{cache_childs_requests}", "{cache_childs_requests_explain}", "SquidAsMasterCacheChilds-{$t}", $ligne["SquidAsMasterCacheChilds"], null, 850);
$p4 = Paragraphe_switch_img("{follow_x_forwarded_for}", "{follow_x_forwarded_for_explain}", "SquidAsMasterFollowxForward-{$t}", $ligne["SquidAsMasterFollowxForward"], null, 850);
if (intval($ligne["SquidAsMasterFollowxForward"]) == 1) {
$error = "<p class=explain style='font-size:16px'>{SquidAsMasterFollowxForward_error}</p>";
}
$html = "\n<div style='width:98%' class=form>\n<table style='width:100%'>\n<tr> <td colspan=2>{$p2}</td> </tr>\n<tr> <td colspan=2>{$p21}</td> </tr>\n<tr> <td colspan=2>{$p3}</td> </tr>\n<tr> <td colspan=2>{$p4}</td> </tr>\n<tr>\n\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", 32) . "</td>\n</tr>\n</table>\n</div>\n<script>\nvar xSave{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){ alert(results); return; }\n\tRefreshTab('main_proxy_listen_ports');\n}\n\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('ID','{$ID}');\n\tXHR.appendData('SquidAsMasterLogChilds',document.getElementById('SquidAsMasterLogChilds-{$t}').value);\n\tXHR.appendData('SquidAsMasterCacheChilds',document.getElementById('SquidAsMasterCacheChilds-{$t}').value);\n\tXHR.appendData('SquidAsMasterLogExtern',document.getElementById('SquidAsMasterLogExtern-{$t}').value);\n\tXHR.appendData('SquidAsMasterFollowxForward',document.getElementById('SquidAsMasterFollowxForward-{$t}').value);\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>\n";
echo $tpl->_ENGINE_parse_body($html);
}
示例3: manual_update
function manual_update()
{
$t = time();
$page = CurrentPageName();
$tpl = new templates();
$q = new mysql_squid_builder();
if (!$q->FIELD_EXISTS("itcharters", "PdfContent")) {
$q->QUERY_SQL("ALTER TABLE `itcharters` ADD `PdfContent` LONGBLOB NULL");
if (!$q->ok) {
echo $q->mysql_error_html() . "\n";
return;
}
}
if (!$q->FIELD_EXISTS("itcharters", "enablepdf")) {
$q->QUERY_SQL("ALTER TABLE `itcharters` ADD `enablepdf` smallint(1) NOT NULL DEFAULT '0',ADD INDEX ( `enablepdf` )");
if (!$q->ok) {
echo $q->mysql_error_html() . "\n";
return;
}
}
if (!$q->FIELD_EXISTS("itcharters", "PdfFileName")) {
$q->QUERY_SQL("ALTER TABLE `itcharters` ADD `PdfFileName` VARCHAR(128) NULL");
if (!$q->ok) {
echo $q->mysql_error_html() . "\n";
return;
}
}
if (!$q->FIELD_EXISTS("itcharters", "PdfFileSize")) {
$q->QUERY_SQL("ALTER TABLE `itcharters` ADD `PdfFileSize` INT UNSIGNED NULL");
if (!$q->ok) {
echo $q->mysql_error_html() . "\n";
return;
}
}
$UploadAFile = $tpl->javascript_parse_text("{upload_a_file}");
$allowedExtensions = "allowedExtensions: ['pdf'],";
$UploadAFile = str_replace(" ", " ", $UploadAFile);
$html = "\n\t<div style='font-size:30px'>{upload_a_pdf_file}</div>\n\t\n\t\n\t\n\t<center style='margin:10px;width:99%'>\n\t\t<center id='file-uploader-demo-{$t}' style='width:100%;text-align:center'></center>\n\t</center>\n\t<script>\nfunction createUploader{$t}(){\n\tvar uploader{$t} = new qq.FileUploader({\n\t\telement: document.getElementById('file-uploader-demo-{$t}'),\n\t\taction: '{$page}',{$allowedExtensions}\n\t\ttemplate: '<div class=\"qq-uploader\">' +\n\t\t'<div class=\"qq-upload-drop-area\"><span>Drop files here to upload</span></div>' +\n\t\t'<div class=\"qq-upload-button\" style=\"width:100%\"> « {$UploadAFile} » </div>' +\n\t\t'<ul class=\"qq-upload-list\"></ul>' +\n\t\t'</div>',\n\t\tdebug: false,\n\t\tparams: {\n\t\tTargetArticaUploaded: 'yes',\n\t\tID: '{$_GET["ID"]}',\n\t\t//select-file: '{$_GET["select-file"]}'\n\t\t},\n\t\tonComplete: function(id, fileName){\n\t\t\tPathUploaded{$t}(fileName);\n\t\t}\n\t});\n\n}\n\nfunction PathUploaded{$t}(fileName){\n\tLoadAjax('file-uploader-demo-{$t}','{$page}?file-uploader-demo1=yes&fileName='+fileName+'&ID={$_GET["ID"]}');\n}\ncreateUploader{$t}();\n</script>\n";
echo $tpl->_ENGINE_parse_body($html);
}
示例4: create_table
function create_table()
{
$q = new mysql_squid_builder();
$sql = "CREATE TABLE IF NOT EXISTS `bandquotas_status` (\n\t`ID` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,\n\t PatternGroup VARCHAR(90) NOT NULL,\n\tzDate datetime NOT NULL,\n\truleid BIGINT(10) NOT NULL,\n\tsize BIGINT UNSIGNED NOT NULL,\n\tpercent smallint(2) NOT NULL DEFAULT 0,\n\tfreeze smallint(2) NOT NULL DEFAULT 0,\n\tKEY `ruleid` (`ruleid`),\n\tKEY `size` (`size`),\n\tKEY `percent` (`percent`),\n\tKEY `zDate` (`zDate`),\n\tKEY `freeze` (`freeze`)\n\t) ENGINE = MYISAM;";
$q->QUERY_SQL($sql);
if (!$q->ok) {
echo $q->mysql_error_html();
die;
}
if (!$q->FIELD_EXISTS("bandquotas", "RuleName")) {
$sql = "ALTER TABLE `bandquotas` ADD `RuleName` varchar(255) default NULL";
$q->QUERY_SQL($sql);
if (!$q->ok) {
echo $q->mysql_error_html();
die;
}
}
}
示例5: popup
function popup()
{
$q = new mysql_squid_builder();
$ID = $_GET["ID"];
$page = CurrentPageName();
$tpl = new templates();
$t = time();
if (!$q->FIELD_EXISTS("proxy_ports", "FTPProxyMaxClients")) {
$q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `FTPProxyMaxClients` BIGINT(100) NOT NULL DEFAULT '64'");
if (!$q->ok) {
echo $q->mysql_error . "\n";
}
}
if (!$q->FIELD_EXISTS("proxy_ports", "FTPProxyTimeOuts")) {
$q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `FTPProxyTimeOuts` INT(100) NOT NULL DEFAULT '360'");
if (!$q->ok) {
echo $q->mysql_error . "\n";
}
}
if (!$q->FIELD_EXISTS("proxy_ports", "FTPProxyDestinationTransferMode")) {
$q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `FTPProxyDestinationTransferMode` VARCHAR(32) NOT NULL DEFAULT 'client'");
if (!$q->ok) {
echo $q->mysql_error . "\n";
}
}
if (!$q->FIELD_EXISTS("proxy_ports", "FTPUserAuthMagic")) {
$q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `FTPUserAuthMagic` VARCHAR(128) NOT NULL DEFAULT '@user'");
if (!$q->ok) {
echo $q->mysql_error . "\n";
}
}
if (!$q->FIELD_EXISTS("proxy_ports", "FTPUseMagicChar")) {
$q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `FTPUseMagicChar` VARCHAR(32) NOT NULL DEFAULT '@'");
if (!$q->ok) {
echo $q->mysql_error . "\n";
}
}
if (!$q->FIELD_EXISTS("proxy_ports", "FTPAllowMagicUser")) {
$q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `FTPAllowMagicUser` SMALLINT(1) NOT NULL DEFAULT '1'");
if (!$q->ok) {
echo $q->mysql_error . "\n";
}
}
$DestinationTransferModeR["client"] = "client";
$DestinationTransferModeR["passive"] = "passive";
$DestinationTransferModeR["active"] = "active";
$ligne = @mysql_fetch_array($q->QUERY_SQL("SELECT * FROM proxy_ports WHERE ID={$ID}"));
$html = "\n<div style='width:98%' class=form>\n<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:20px'>{MaxClients}:</td>\n\t\t<td style='font-size:18px'>" . field_text("FTPProxyMaxClients-{$t}", $ligne["FTPProxyMaxClients"], "font-size:20px;width:120px") . "</td>\n\t\t<td> </td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:20px'>{timeout2} ({seconds}):</td>\n\t\t<td style='font-size:18px'>" . field_text("FTPProxyTimeOuts-{$t}", $ligne["FTPProxyTimeOuts"], "font-size:20px;width:120px") . "</td>\n\t\t<td> </td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:20px'>" . texttooltip("{FTPProxyDestinationTransferMode}", "{FTPProxyDestinationTransferMode_explain}") . ":</td>\n\t\t<td style='font-size:20px'>" . Field_array_Hash($DestinationTransferModeR, "FTPProxyDestinationTransferMode-{$t}", $ligne["FTPProxyDestinationTransferMode"], "style:font-size:20px") . "</td>\n\t\t<td> </td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:20px'>" . texttooltip("{FTPAllowMagicUser}", "{FTPAllowMagicUser_explain}") . ":</td>\n\t\t\t<td style='font-size:20px'>" . Field_checkbox_design("FTPAllowMagicUser-{$t}", 1, $ligne["FTPAllowMagicUser"]) . "</td>\n\t\t<td> </td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:20px'>" . texttooltip("{UserAuthMagic}", "{UserAuthMagic_explain}") . ":</td>\n\t\t<td style='font-size:18px'>" . field_text("FTPUserAuthMagic-{$t}", $ligne["FTPUserAuthMagic"], "font-size:20px;width:220px") . "</td>\n\t\t<td> </td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:20px'>" . texttooltip("{FTPUseMagicChar}", "{FTPUseMagicChar_explain}") . ":</td>\n\t\t<td style='font-size:18px'>" . field_text("FTPUseMagicChar-{$t}", $ligne["FTPUseMagicChar"], "font-size:20px;width:220px") . "</td>\n\t\t<td> </td>\n\t</tr>\t\n<tr>\n\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", 32) . "</td>\n</tr>\n</table>\n</div>\n<script>\nvar xSave{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){ alert(results); return; }\n\tRefreshTab('main_proxy_listen_ports');\n}\n\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('ID','{$ID}');\n\tXHR.appendData('FTPProxyMaxClients',document.getElementById('FTPProxyMaxClients-{$t}').value);\n\tXHR.appendData('FTPProxyTimeOuts',document.getElementById('FTPProxyTimeOuts-{$t}').value);\n\tXHR.appendData('FTPProxyDestinationTransferMode',document.getElementById('FTPProxyDestinationTransferMode-{$t}').value);\n\tXHR.appendData('FTPUserAuthMagic',document.getElementById('FTPUserAuthMagic-{$t}').value);\n\tXHR.appendData('FTPUseMagicChar',document.getElementById('FTPUseMagicChar-{$t}').value);\n\tif(document.getElementById('FTPAllowMagicUser-{$t}').checked){XHR.appendData('FTPAllowMagicUser',1);}else{XHR.appendData('FTPAllowMagicUser',0);}\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>\n";
echo $tpl->_ENGINE_parse_body($html);
}
示例6: general_settings_save
function general_settings_save()
{
$_POST["remote_path"] = url_decode_special_tool($_POST["remote_path"]);
$q = new mysql_squid_builder();
if (!$q->FIELD_EXISTS("reverse_sources", "cacheid")) {
$q->QUERY_SQL("ALTER TABLE `reverse_sources` ADD `cacheid` INT(10) NOT NULL DEFAULT '0'");
}
if (!$q->FIELD_EXISTS("reverse_sources", "certificate")) {
$q->QUERY_SQL("ALTER TABLE `reverse_sources` ADD `certificate` CHAR(128) NULL");
}
$q->QUERY_SQL("UPDATE `reverse_sources` SET\n\t\t\t`servername`='{$_POST["servername"]}',\n\t\t\t`ipaddr`='{$_POST["ipaddr"]}',\n\t\t\t`remote_path`='{$_POST["remote_path"]}',\n\t\t\t`forceddomain`='{$_POST["forceddomain"]}',\n\t\t\t`port`='{$_POST["port"]}',\n\t\t\t`cacheid`='{$_POST["cacheid"]}',\n\t\t\t`certificate`='{$_POST["certificate"]}'\n\t\t\tWHERE ID='{$_POST["general-settings"]}'");
if (!$q->ok) {
echo $q->mysql_error;
}
}
示例7: websites_script_DenyConfSave
function websites_script_DenyConfSave()
{
$q = new mysql_squid_builder();
if (!$q->FIELD_EXISTS("reverse_www", "DenyConf")) {
$q->QUERY_SQL("ALTER TABLE `reverse_www` ADD `DenyConf` smallint(1) NOT NULL DEFAULT 0");
if (!$q->ok) {
echo $q->mysql_error_html();
}
}
$q->QUERY_SQL("UPDATE reverse_www SET `DenyConf`='{$_POST["DenyConfSave"]}' WHERE `servername`='{$_POST["servername"]}'");
if (!$q->ok) {
echo $q->mysql_error;
}
}
示例8: VOLUME_LOG_HOURLY_MYSQL_DUMP
function VOLUME_LOG_HOURLY_MYSQL_DUMP($MSSQLFAM)
{
$q = new mysql_squid_builder();
$q->QUERY_SQL("CREATE TABLE IF NOT EXISTS `dashboard_volume_day` ( \n\t\t\t`TIME` DATETIME,\n\t\t\t`FAMILYSITE` VARCHAR(128),\n\t\t\t`USERID` VARCHAR(64),\n\t\t\t`IPADDR` VARCHAR(64),\n\t\t\t`MAC` VARCHAR(64),\n\t\t\t`CATEGORY` VARCHAR(64),\n\t\t\t`CONTENT_TYPE` VARCHAR(64),\n\t\t\t`SIZE` BIGINT UNSIGNED, \n\t\t\t`RQS` BIGINT UNSIGNED,\n\t\t\tKEY `TIME` (`TIME`),\n\t\t\tKEY `FAMILYSITE` (`FAMILYSITE`),\n\t\t\tKEY `USERID` (`USERID`),\n\t\t\tKEY `IPADDR` (`IPADDR`),\n\t\t\tKEY `MAC` (`MAC`),\n\t\t\tKEY `CONTENT_TYPE` (`CONTENT_TYPE`)\n\t\t\t\n\t\t\t) ENGINE=MYISAM;");
if (!$q->FIELD_EXISTS("dashboard_volume_day", "CATEGORY")) {
$sql = "ALTER TABLE `dashboard_volume_day` ADD `CATEGORY` VARCHAR(64), ADD INDEX(`CATEGORY`)";
$q->QUERY_SQL($sql, "artica_backup");
}
reset($MSSQLFAM);
while (list($KEY, $MAINARRAY) = each($MSSQLFAM)) {
$HOURTIME = date("Y-m-d H:00:00", $MAINARRAY["ZDATE"]);
$USERID = mysql_escape_string2($MAINARRAY["USERID"]);
$IPADDR = $MAINARRAY["IPADDR"];
$MAC = $MAINARRAY["MAC"];
$CONTENT_TYPE = mysql_escape_string2($MAINARRAY["CONTENT_TYPE"]);
$FAMILYSITE = $MAINARRAY["FAMILYSITE"];
$CATEGORY = $MAINARRAY["CATEGORY"];
$HITS = $MAINARRAY["RQS"];
$SIZE = $MAINARRAY["SIZE"];
$line = "('{$HOURTIME}','{$FAMILYSITE}','{$USERID}','{$IPADDR}','{$MAC}','{$CONTENT_TYPE}','{$SIZE}','{$HITS}')";
$f[] = "('{$HOURTIME}','{$FAMILYSITE}','{$USERID}','{$IPADDR}','{$MAC}','{$CONTENT_TYPE}','{$SIZE}','{$HITS}')";
}
$faildir = "{$GLOBALS["LogFileDeamonLogDir"]}/mysqlvolume-failed";
@mkdir($faildir, 0755, true);
if (count($f) == 0) {
return;
}
$sql = "INSERT INTO `dashboard_volume_day` (`TIME`,`FAMILYSITE`,`USERID`,`IPADDR`,`MAC`,`CONTENT_TYPE`,`SIZE`,`RQS`) VALUES " . @implode(",", $f);
$failedPath = "{$faildir}/" . time() . ".influx.sql";
$q->QUERY_SQL($sql);
if (!$q->ok) {
events("INJECTION Failed: backup to {$failedPath} ({$q->curl_error})");
@file_put_contents($failedPath, $sql);
}
}
示例9: list_items
function list_items()
{
$STATUS = unserialize(@file_get_contents("/usr/share/artica-postfix/ressources/logs/web/nginx.status.acl"));
$tpl = new templates();
$MyPage = CurrentPageName();
$all_text = $tpl->_ENGINE_parse_body("{all}");
$GLOBALS["CLASS_TPL"] = $tpl;
$q = new mysql_squid_builder();
$OrgPage = "miniadmin.proxy.reverse.php";
$sock = new sockets();
$EnableFreeWeb = intval($sock->GET_INFO("EnableFreeWeb"));
if (!$q->FIELD_EXISTS("reverse_www", "zOrder")) {
$q->QUERY_SQL("ALTER TABLE `reverse_www` ADD `zOrder` smallint(100) NOT NULL default '0'");
if (!$q->ok) {
echo $q->mysql_error_html();
}
}
$up = imgsimple("arrow-up-32.png", null, "Loadjs('{$MyPage}?move-item-js=yes&ID={$ligne["ID"]}&dir=0&t={$_GET["t"]}')");
$down = imgsimple("arrow-down-32.png", null, "Loadjs('{$MyPage}?move-item-js=yes&ID={$ligne["ID"]}&dir=1&t={$_GET["t"]}')");
$FORCE = "cache_peer_id={$_GET["ID"]}";
$search = '%';
$table = "reverse_www";
$page = 1;
$freeweb_compile_background = $tpl->javascript_parse_text("{freeweb_compile_background}");
$reset_admin_password = $tpl->javascript_parse_text("{reset_admin_password}");
$delete_freeweb_text = $tpl->javascript_parse_text("{delete_freeweb_text}");
$delete_freeweb_nginx_text = $tpl->javascript_parse_text("{delete_freeweb_nginx_text}");
$delete_freeweb_dnstext = $tpl->javascript_parse_text("{delete_freeweb_dnstext}");
$total = 0;
if ($q->COUNT_ROWS($table, "artica_backup") == 0) {
json_error_show("no data", 1);
}
if (isset($_POST["sortname"])) {
if ($_POST["sortname"] != null) {
$ORDER = "ORDER BY {$_POST["sortname"]} {$_POST["sortorder"]}";
}
}
if (isset($_POST['page'])) {
$page = $_POST['page'];
}
$searchstring = string_to_flexquery();
if ($searchstring != null) {
$sql = "SELECT COUNT(*) as TCOUNT FROM `{$table}` WHERE {$FORCE} {$searchstring}";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_events"));
$total = $ligne["TCOUNT"];
} else {
if (strlen($FORCE) > 2) {
$sql = "SELECT COUNT(*) as TCOUNT FROM `{$table}` WHERE {$FORCE}";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_events"));
$total = $ligne["TCOUNT"];
} else {
$total = $q->COUNT_ROWS($table, "artica_events");
}
}
if (isset($_POST['rp'])) {
$rp = $_POST['rp'];
}
if (!is_numeric($rp)) {
$rp = 50;
}
$pageStart = ($page - 1) * $rp;
$limitSql = "LIMIT {$pageStart}, {$rp}";
$sql = "SELECT * FROM `{$table}` WHERE {$FORCE} {$searchstring} {$ORDER} {$limitSql}";
writelogs($sql, __FUNCTION__, __FILE__, __LINE__);
$results = $q->QUERY_SQL($sql, "artica_events");
if (!$q->ok) {
json_error_show($q->mysql_error . "<br>{$sql}", 1);
}
$data = array();
$data['page'] = $page;
$data['total'] = $total;
$data['rows'] = array();
$CurrentPage = CurrentPageName();
if (mysql_num_rows($results) == 0) {
json_error_show("no data");
}
$searchstring = string_to_flexquery();
if (!AdminPrivs()) {
$sql = "SELECT reverse_www.* FROM reverse_www,reverse_privs\n\t\tWHERE reverse_privs.servername=reverse_www.servername\n\t\tAND reverse_privs.uid='{$_SESSION["uid"]}' {$searchstring} ORDER BY servername LIMIT 0,250";
}
$results = $q->QUERY_SQL($sql, 'artica_backup');
if (!$q->ok) {
json_error_show($q->mysql_error . "<br>{$sql}");
}
$q1 = new mysql();
$t = time();
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
$servername = $ligne["servername"];
$explain_text = NGINX_EXPLAIN_REVERSE($ligne["servername"]);
$icon = "clound-in-64.png";
$freewebicon = "64-firewall-search.png";
$color = "black";
$status = array();
$portText = null;
$md = md5(serialize($ligne));
$RedirectQueries = $ligne["RedirectQueries"];
$default_server = $ligne["default_server"];
$SiteEnabled = $ligne["enabled"];
$servername_enc = urlencode($servername);
$Compile = imgsimple("apply-48.png", null, "Loadjs('nginx.single.progress.php?servername={$servername_enc}')");
//.........这里部分代码省略.........
示例10: rules_options_save
function rules_options_save(){
$q=new mysql_squid_builder();
if(!$q->FIELD_EXISTS("wpad_rules", "dntlhstname")){
$q->QUERY_SQL("ALTER TABLE `wpad_rules` ADD `dntlhstname` smallint( 1 ) DEFAULT '0'");
}
if(!$q->FIELD_EXISTS("wpad_rules", "isResolvable")){
$q->QUERY_SQL("ALTER TABLE `wpad_rules` ADD `isResolvable` smallint( 1 ) DEFAULT '0'");
}
$sql="UPDATE wpad_rules SET
dntlhstname='{$_POST["dntlhstname"]}',
isResolvable='{$_POST["isResolvable"]}'
WHERE ID='{$_POST["ID"]}'";
$q->QUERY_SQL($sql);
if(!$q->ok){echo $q->mysql_error;}
}
示例11: quota_notification
function quota_notification()
{
$q = new mysql_squid_builder();
if (!$q->FIELD_EXISTS("webfilters_quotas", "notify")) {
$q->QUERY_SQL("ALTER TABLE webfilters_quotas ADD `notify` smallint(1) NOT NULL DEFAULT 0, ADD INDEX (`notify`)");
}
if (!$q->FIELD_EXISTS("webfilters_quotas", "notify_params")) {
$q->QUERY_SQL("ALTER TABLE webfilters_quotas ADD `notify_params` TEXT");
}
}
示例12: UnLock
function UnLock($array)
{
$REMOTE_ADDR = $array["REMOTE_ADDR"];
$IPADDR = $array["REMOTE_ADDR"];
$SERVER_NAME = $array["SERVER_NAME"];
$redirecturi = $array["redirecturi"];
$LOGIN = $array["LOGIN"];
$uid = $array["LOGIN"];
$ARP = $array["ARP"];
$token = $array["token"];
$HOST = $array["HOST"];
$MAC = $ARP;
$username = $uid;
$CACHE_AUTH = $GLOBALS["CACHE_AUTH"];
$autocreate = 0;
$time = time();
$sock = new sockets();
$md5key = $token;
$q = new mysql_squid_builder();
$sql = "SELECT creationtime,uid,ttl,enabled,autocreate,autocreate_confirmed FROM hotspot_members WHERE uid='{$username}'";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql));
$finaltime = strtotime("+525600 minutes", time());
$ttl = $ligne["ttl"];
if ($ligne["autocreate"] == 1) {
if ($ligne["autocreate_confirmed"] == 0) {
$autocreate = 1;
}
}
if ($ttl > 0) {
$finaltime = strtotime("+{$ttl} minutes", $ligne["creationtime"]);
}
ToSyslog("wifidog_auth/UnLock: {$username}: Create session {$md5key} ( autocreate ={$autocreate} ) for {$LOGIN} MAC:{$MAC} with a Time To Live of {$ttl}Mn in line:" . __LINE__);
$NextCheck = strtotime("+525600 minutes", $time);
$logintime = time();
if (!is_numeric($CACHE_AUTH)) {
$CACHE_AUTH = 60;
}
if (!is_numeric($GLOBALS["MAX_TIME"])) {
$GLOBALS["MAX_TIME"] = 0;
}
if ($CACHE_AUTH > 0) {
$NextCheck = strtotime("+{$CACHE_AUTH} minutes", $time);
}
$datelogs = date("Y-m-d H:i:s", $NextCheck);
$finaltimeDate = date("Y-m-d H:i:s", $finaltime);
$MAC = trim(strtolower($MAC));
if ($GLOBALS["HOTSPOT_DEBUG"]) {
ToSyslog("wifidog_auth/UnLock: Remove sessions for {$token},{$IPADDR},{$MAC},{$uid}");
}
$q->QUERY_SQL("DELETE FROM hotspot_sessions WHERE `md5`='{$token}'");
$q->QUERY_SQL("DELETE FROM hotspot_sessions WHERE ipaddr='{$IPADDR}'");
$q->QUERY_SQL("DELETE FROM hotspot_sessions WHERE MAC='{$MAC}'");
$q->QUERY_SQL("DELETE FROM hotspot_sessions WHERE uid='{$uid}'");
if (!$q->FIELD_EXISTS("hotspot_sessions", "nextcheck")) {
$q->QUERY_SQL("ALTER TABLE `hotspot_sessions` ADD `nextcheck` BIGINT UNSIGNED ,ADD INDEX ( `nextcheck` )");
}
if (!$q->FIELD_EXISTS("hotspot_sessions", "autocreate")) {
$q->QUERY_SQL("ALTER TABLE `hotspot_sessions` ADD `autocreate` smallint(1) NOT NULL DEFAULT 0 ,ADD INDEX ( `autocreate` )");
}
$sql = "INSERT IGNORE INTO hotspot_sessions (`md5`,logintime, maxtime,finaltime,nextcheck,username,uid,MAC,hostname,ipaddr,autocreate) VALUES('{$token}',{$logintime},{$CACHE_AUTH},{$finaltime},{$NextCheck},'{$username}','{$uid}','{$MAC}','{$HOST}','{$IPADDR}','{$autocreate}')";
if ($GLOBALS["HOTSPOT_DEBUG"]) {
ToSyslog("wifidog_auth/UnLock: {$sql}");
}
$q->QUERY_SQL($sql);
if (!$q->ok) {
ToSyslog("wifidog_auth/UnLock:{$q->mysql_error} Line:" . __LINE__);
return false;
}
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT `md5` FROM hotspot_sessions WHERE `md5`='{$token}'"));
if (trim($ligne["md5"]) == null) {
ToSyslog("wifidog_auth/UnLock: MySQL Failed, {$token} is not saved Line:" . __LINE__);
return false;
}
events(2, "{$username}/{$MAC} Create a new session Finish at {$finaltime} ({$finaltimeDate})", __FILE__, __LINE__);
ToSyslog("wifidog_auth/UnLock: Create session {$token} for {$LOGIN} MAC:{$MAC} Max time:{$GLOBALS["MAX_TIME"]} Finish at {$finaltime} ({$finaltimeDate})");
return true;
}
示例13: events_search
function events_search()
{
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$q = new mysql_squid_builder();
$rp = 0;
if (isset($_POST["sortname"])) {
if ($_POST["sortname"] != null) {
$ORDER = "ORDER BY `{$_POST["sortname"]}` {$_POST["sortorder"]}";
}
}
if (isset($_POST['page'])) {
$page = $_POST['page'];
}
$searchstring = string_to_flexquery();
if (isset($_POST['rp'])) {
$rp = $_POST['rp'];
}
$pageStart = ($page - 1) * $rp;
if (is_numeric($rp)) {
$limitSql = "LIMIT {$pageStart}, {$rp}";
}
if (!$q->FIELD_EXISTS("dashboard_volume_day", "CATEGORY")) {
$sql = "ALTER TABLE `dashboard_volume_day` ADD `CATEGORY` VARCHAR(64), ADD INDEX(`CATEGORY`)";
$q->QUERY_SQL($sql, "artica_backup");
}
$table = "(SELECT SUM(SIZE) as SIZE, SUM(RQS) as RQS,`TIME`,CATEGORY,USERID,IPADDR,MAC,FAMILYSITE \n\t\t\tFROM `dashboard_volume_day` GROUP BY `TIME`,CATEGORY,USERID,IPADDR,MAC,FAMILYSITE) as t";
$searchstring = string_to_flexquery();
$sql = "SELECT COUNT(*) as TCOUNT FROM {$table} WHERE 1 {$searchstring}";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql));
if (!$q->ok) {
json_error_show($q->mysql_error);
}
$total = $ligne["TCOUNT"];
$data = array();
$data['page'] = $page;
$data['total'] = $total;
$data['rows'] = array();
if (isset($_POST['rp'])) {
$rp = $_POST['rp'];
}
$pageStart = ($page - 1) * $rp;
$limitSql = "LIMIT {$pageStart}, {$rp}";
$sql = "SELECT * FROM {$table} WHERE 1 {$searchstring} {$ORDER} {$limitSql}";
$results = $q->QUERY_SQL($sql);
if (!$q->ok) {
json_error_show($q->mysql_error . "<br>{$sql}");
}
if (mysql_num_rows($results) == 0) {
json_error_show("no data");
}
$tpl = new templates();
$font_size = "font-size:16px";
while ($ligne = mysql_fetch_assoc($results)) {
$CATEGORY = $ligne["CATEGORY"];
$FAMILYSITE = $ligne["FAMILYSITE"];
$IPADDR = $ligne["IPADDR"];
$MAC = $ligne["MAC"];
$RQS = $ligne["RQS"];
$SITE = $ligne["FAMILYSITE"];
$SIZE = $ligne["SIZE"];
$USERID = $ligne["USERID"];
$color = "#000000";
$ident = array();
if (intval($SIZE) >= 1024) {
$SIZE = FormatBytes(intval($SIZE) / 1024);
} else {
$SIZE = "{$SIZE}Bytes";
}
$RQS = FormatNumber($RQS);
$md = md5(serialize($ligne));
$time = $ligne["TIME"];
$spanON = "<span style='color:{$color};{$font_size}'>";
$spanOFF = "</span>";
$cached_text = null;
if ($USERID != null) {
$ident[] = "<a href=\"javascript:blur()\"\n\t\t\tOnClick=\"javascript:Loadjs('squid.nodes.php?node-infos-js=yes&uid={$USERID}',true);\"\n\t\t\tstyle='text-decoration:underline;color:{$color};{$font_size}'>{$USERID}</a>";
}
$ident[] = "<a href=\"javascript:blur()\"\n\t\tOnClick=\"javascript:Loadjs('squid.nodes.php?node-infos-js=yes&ipaddr={$IPADDR}',true);\"\n\t\tstyle='text-decoration:underline;color:{$color};{$font_size}'>{$IPADDR}</a>";
if ($MAC != null) {
$ident[] = "<a href=\"javascript:blur()\"\n\t\t\tOnClick=\"javascript:Loadjs('squid.nodes.php?node-infos-js=yes&MAC={$MAC}',true);\"\n\t\t\tstyle='text-decoration:underline;color:{$color};{$font_size}'>{$MAC}</a>";
}
$colorDiv = $color;
if ($colorDiv == "black") {
$colorDiv = "transparent";
}
$identities = @implode(" | ", $ident);
$data['rows'][] = array('id' => $md, 'cell' => array("{$spanON}{$time}{$spanOFF}", "{$spanON}{$identities}{$spanOFF}", "{$spanON}{$SITE}{$spanOFF}", "{$spanON}{$CATEGORY}{$spanOFF}", "{$spanON}{$SIZE}{$spanOFF}", "{$spanON}{$RQS}{$spanOFF}"));
}
echo json_encode($data);
}
示例14: SaveMysql
//.........这里部分代码省略.........
$FileTypes["video/dl"]=1;
$FileTypes["video/x-dl"]=1;
$FileTypes["video/x-dv"]=1;
$FileTypes["video/gl"]=1;
$FileTypes["video/x-gl"]=1;
$FileTypes["video/x-isvideo"]=1;
$FileTypes["video/mpeg"]=1;
$FileTypes["video/x-dv"]=1;
$FileTypes["video/quicktime"]=1;
$FileTypes["video/x-sgi-movie"]=1;
$FileTypes["video/mpeg"]=1;
$FileTypes["video/x-mpeg"]=1;
$FileTypes["video/x-mpeq2a"]=1;
$FileTypes["video/x-motion-jpeg"]=1;
$FileTypes["video/vnd.rn-realvideo"]=1;
$FileTypes["application/x-vnd.audioexplosion.mzz"]=1;
$FileTypes["audio/x-gsm"]=1;
$FileTypes["audio/make"]=1;
$FileTypes["audio/it"]=1;
$FileTypes["audio/x-jam"]=1;
$FileTypes["audio/basic"]=1;
$FileTypes["audio/x-au"]=1;
$FileTypes["audio/aiff"]=1;
$FileTypes["audio/x-aiff"]=1;
$FileTypes["audio/make"]=1;
$FileTypes["audio/mpeg"]=1;
$FileTypes["audio/x-mpeg"]=1;
$FileTypes["audio/mpeg3"]=1;
$FileTypes["audio/x-mpeg-3"]=1;
$FileTypes["audio/nspaudio"]=1;
$FileTypes["audio/x-nspaudio"]=1;
$FileTypes["audio/x-liveaudio"]=1;
$FileTypes["audio/midi"]=1;
$FileTypes["audio/nspaudio"]=1;
$FileTypes["audio/x-nspaudio"]=1;
$FileTypes["music/x-karaoke"]=1;
$FileTypes["audio/mod"]=1;
$FileTypes["audio/x-mod"]=1;
$FileTypes["application/x-midi"]=1;
$FileTypes["audio/x-mid"]=1;
$FileTypes["audio/x-midi"]=1;
$FileTypes["music/crescendo"]=1;
$FileTypes["x-music/x-midi"]=1;
$FileTypes["music/crescendo"]=1;
$FileTypes["audio/x-vnd.audioexplosion.mjuicemediafile"]=1;
}
if($_POST["html"]==1){
$FileTypes["text/html"]=1;
$FileTypes["text/javascript"]=1;
$FileTypes["text/css"]=1;
$FileTypes["application/x-javascript"]=1;
$FileTypes["application/javascript"]=1;
$FileTypes["application/java"]=1;
$FileTypes["application/java-byte-code"]=1;
$FileTypes["application/x-java-class"]=1;
$FileTypes["text/x-asm"]=1;
$FileTypes["text/asp"]=1;
$FileTypes["text/plain"]=1;
$FileTypes["text/css"]=1;
$FileTypes["text/x-c"]=1;
$FileTypes["text/html"]=1;
$FileTypes["text/x-fortran"]=1;
$FileTypes["text/x-java-source"]=1;
$FileTypes["application/x-java-commerce"]=1;
$FileTypes["application/x-javascript"]=1;
$FileTypes["application/javascript"]=1;
$FileTypes["application/ecmascript"]=1;
$FileTypes["text/javascript"]=1;
$FileTypes["text/ecmascript"]=1;
}
$FileTypes_enc=mysql_escape_string2(serialize($FileTypes));
$rulename=mysql_escape_string2($_SESSION["HYPERCACHE_NEW_RULE_WIZARDID"]["rulename"]);
$sitename=mysql_escape_string2($_SESSION["HYPERCACHE_NEW_RULE_WIZARDID"]["sitename"]);
$q=new mysql_squid_builder();
if(!$q->FIELD_EXISTS("artica_caches","FileTypes","artica_backup")){
$sql="ALTER TABLE `artica_caches` ADD `FileTypes` TEXT";
$q->QUERY_SQL($sql,"artica_backup");
}
if(!$q->FIELD_EXISTS("artica_caches","OtherDomains","artica_backup")){
$sql="ALTER TABLE `artica_caches` ADD `OtherDomains` TEXT";
$q->QUERY_SQL($sql,"artica_backup");
}
$sql="INSERT IGNORE INTO `artica_caches` (`sitename`,`rulename`,`enabled`,`FileTypes`) VALUES ('$sitename','$rulename','1','$FileTypes_enc')";
$q->QUERY_SQL($sql);
if(!$q->ok){echo $q->mysql_error;return;}
}
示例15: add_category_popup
function add_category_popup()
{
$tpl = new templates();
$page = CurrentPageName();
$dans = new dansguardian_rules();
$time = time();
$q = new mysql_squid_builder();
$error_max_dbname = $tpl->javascript_parse_text("{error_max_database_name_no_more_than}");
$error_category_textexpl = $tpl->javascript_parse_text("{error_category_textexpl}");
$error_category_nomore5 = $tpl->javascript_parse_text("{error_category_nomore5}");
if (!$q->FIELD_EXISTS("personal_categories", "PublicMode")) {
$q->QUERY_SQL("ALTER TABLE `personal_categories`\n\t\t\t\tADD `PublicMode` smallint( 1 ) NOT NULL ,\n\t\t\t\tADD INDEX ( `PublicMode` )");
}
$t = $_GET["t"];
if (!is_numeric($t)) {
$t = time();
}
$catenc = urlencode($_GET["cat"]);
$actions = button("{compile2}", "Loadjs('ufdbguard.compile.category.php?category={$catenc}&t={$t}')", 26) . " | " . button("{delete}", "Loadjs('{$page}?category-delete-js={$catenc}&t={$t}')", 26) . " | ";
if ($_GET["cat"] == null) {
$actions = null;
}
if ($_GET["cat"] != null) {
$sql = "SELECT * FROM personal_categories WHERE category='{$_GET["cat"]}'";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql));
$titleBT = "{apply}";
} else {
$action = null;
$titleBT = '{add}';
}
$proto = "http";
if ($_SERVER["HTTPS"] == "on") {
$proto = "https";
}
$uri = "{$proto}://{$_SERVER["SERVER_ADDR"]}:{$_SERVER["SERVER_PORT"]}/categories";
$catz_allow_in_public_mode = $tpl->_ENGINE_parse_body("{catz_allow_in_public_mode}");
$catz_allow_in_public_mode = str_replace("%URI", $uri, $catz_allow_in_public_mode);
$PublicMode = Paragraphe_switch_img("{allow_in_public_mode}", "{$catz_allow_in_public_mode}", "PublicMode-{$time}", $ligne["PublicMode"], null, 750);
$groups = $dans->LoadBlackListesGroups();
$groups[null] = "{select}";
$field = Field_array_Hash($groups, "CatzByGroupL", null, null, null, 0, "font-size:22px");
$blacklists = $dans->array_blacksites;
$description = "<textarea name='category_text'\n\tid='category_text-{$t}' style='height:50px;overflow:auto;width:99%;font-size:22px !important'>" . $ligne["category_description"] . "</textarea>";
if (isset($blacklists[$_GET["cat"]])) {
$description = "<input type='hidden' id='category_text-{$t}' value=''>\n\t\t<div class=text-info style='font-size:13px'>{$blacklists[$_GET["cat"]]}</div>";
}
$html = "\n\t<div id='perso-cat-form'></div>\n\t<div style='width:98%' class=form>\n\t\t\t<table style='width:100%'>\n\t\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:22px'>{category}:</td>\n\t\t\t\t<td>" . Field_text("category-to-add-{$t}", "{$_GET["cat"]}", "font-size:22px;padding:3px;width:99%;font-weight:bold") . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:22px'>{description}:</td>\n\t\t\t\t<td>{$description}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:22px'>{group}:</td>\n\t\t\t\t<td>{$field}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:22px'>{group} ({add}):</td>\n\t\t\t\t<td>" . Field_text("CatzByGroupA", null, "font-size:22px;padding:3px;width:320px") . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=2>{$PublicMode}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=2 align='right' style='font-size:22px'><hr>{$actions}" . button($titleBT, "SavePersonalCategory{$t}()", 26) . "</td>\n\t\t\t</tr>\n\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t</div>\n\t\t\n\n\t\t<script>\nvar X_SavePersonalCategory= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);return;};\n\t\$('#PERSONAL_CATEGORIES_TABLE').flexReload();\n\tYahooWin5Hide();\n\n}\n\nfunction SavePersonalCategory{$t}(){\n\tvar XHR = new XHRConnection();\n\tvar db=document.getElementById('category-to-add-{$t}').value;\n\tvar expl=document.getElementById('category_text-{$t}').value;\n\tif(db.length<5){alert('{$error_category_nomore5}');return;}\n\tif(expl.length<5){alert('{$error_category_textexpl}');return;}\n\tif(db.length>15){alert('{$error_max_dbname}: 15');return;}\n\tXHR.appendData('personal_database',db);\n\tvar pp=encodeURIComponent(document.getElementById('category_text-{$t}').value);\n\tXHR.appendData('category_text',pp);\n\tXHR.appendData('CatzByGroupA',document.getElementById('CatzByGroupA').value);\n\tXHR.appendData('CatzByGroupL',document.getElementById('CatzByGroupL').value);\n\tXHR.appendData('PublicMode',document.getElementById('PublicMode-{$time}').value);\n\t\n\t\n\t\n\tXHR.sendAndLoad('{$page}', 'POST',X_SavePersonalCategory);\n}\n\nvar X_DeletePersonalCat{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);return;};\n\t\$('#PERSONAL_CATEGORIES_TABLE').flexReload();\n\tYahooWin5Hide();\n}\n\nvar X_CompilePersonalCat{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tdocument.getElementById('perso-cat-form').innerHTML='';\n\tif(results.length>3){alert(results);return;};\n\t\$('#PERSONAL_CATEGORIES_TABLE').flexReload();\n}\n\n\nfunction DeletePersonalCat{$t}(){\n\tif(confirm('{$delete_personal_cat_ask}')){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('delete-personal-cat','{$_GET["cat"]}');\n\t\tAnimateDiv('perso-cat-form');\n\t\tXHR.sendAndLoad('{$page}', 'POST',X_DeletePersonalCat{$t});\n\t}\n\n}\n\nfunction checkform{$t}(){\n\tvar cat='{$_GET["cat"]}';\n\tif(cat.length>0){document.getElementById('category-to-add-{$t}').disabled=true;}\n}\ncheckform{$t}();\n</script>\n\n";
echo $tpl->_ENGINE_parse_body($html);
}