function popup() { $mysql = new mysqlserver(); $net = new networking(); $array = $net->ALL_IPS_GET_ARRAY(); $sock = new sockets(); $EnableZarafaTuning = $sock->GET_INFO("EnableZarafaTuning"); if (!is_numeric($EnableZarafaTuning)) { $EnableZarafaTuning = 0; } $users = new usersMenus(); if (!$users->ZARAFA_INSTALLED) { $EnableZarafaTuning = 0; } $array[null] = "{loopback}"; $bind = Field_array_Hash($array, "bind-address", $mysql->main_array["bind-address"], null, null, 0, "font-size:13px;padding:3px"); $chars = Charsets(); $charsets = Field_array_Hash($chars, "default-character-set", $mysql->main_array["default-character-set"], null, null, 0, "font-size:13px;padding:3px"); //Les devs de mysql conseillent un key_buffer de la taille de la somme de tous les fichiers .MYI dans le repertoire mysql. $hover = CellRollOver(); $form = "\t<table style='width:100%' class=form>\n\t<tr {$hover}>\n\t\t<td class=legend>{skip-external-locking}:</td>\n\t\t<td>" . Field_yesno_checkbox('skip-external-locking', $mysql->main_array["skip_external_locking"]) . "</td>\n\t\t<td><code>skip-external-locking</code></td>\n\t\t<td>" . help_icon('{skip-external-locking_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend>{skip-character-set-client-handshake}:</td>\n\t\t<td>" . Field_yesno_checkbox('skip-character-set-client-handshake', $mysql->main_array["skip-character-set-client-handshake"]) . "</td>\n\t\t<td><code>skip-character-set-client-handshake</code></td>\n\t\t<td>" . help_icon('{skip-character-set-client-handshake_text}') . "</td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend>Default charset:</td>\n\t\t<td colspan=3>{$charsets}</td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend>{bind-address}:</td>\n\t\t<td>{$bind}</td>\n\t\t<td><code>bind-address</code></td>\n\t\t<td> </td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend>{key_buffer}:</td>\n\t\t<td>" . Field_text("key_buffer", $mysql->main_array["key_buffer"], "font-size:13px;width:60px;padding:3px") . " M</td>\n\t\t<td><code>key_buffer</code></td>\n\t\t<td>" . help_icon('{key_buffer_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend>{key_buffer_size}:</td>\n\t\t<td>" . Field_text("key_buffer_size", $mysql->main_array["key_buffer_size"], "font-size:13px;width:60px;padding:3px") . " M</td>\n\t\t<td><code>key_buffer_size</code></td>\n\t\t<td>" . help_icon('{key_buffer_size_text}') . "</td>\n\t</tr>\t\t\n\t<tr {$hover}>\n\t\t<td class=legend>{innodb_buffer_pool_size}:</td>\n\t\t<td>" . Field_text("innodb_buffer_pool_size", $mysql->main_array["innodb_buffer_pool_size"], "font-size:13px;width:60px;padding:3px") . " M</td>\n\t\t<td><code>innodb_buffer_pool_size</code></td>\n\t\t<td>" . help_icon('{innodb_buffer_pool_size_text}') . "</td>\n\t</tr>\n\t\n\t<tr {$hover}>\n\t\t<td class=legend>{innodb_additional_mem_pool_size}:</td>\n\t\t<td>" . Field_text("innodb_additional_mem_pool_size", $mysql->main_array["innodb_additional_mem_pool_size"], "font-size:13px;width:60px;padding:3px") . " M</td>\n\t\t<td><code>innodb_additional_mem_pool_size</code></td>\n\t\t<td>" . help_icon('{innodb_additional_mem_pool_size_text}') . "</td>\n\t</tr>\t\t\n\t\n\t<tr {$hover}>\n\t\t<td class=legend>{myisam_sort_buffer_size}:</td>\n\t\t<td>" . Field_text("myisam_sort_buffer_size", $mysql->main_array["myisam_sort_buffer_size"], "font-size:13px;width:60px;padding:3px") . " M</td>\n\t\t<td><code>myisam_sort_buffer_size</code></td>\n\t\t<td>" . help_icon('{myisam_sort_buffer_size_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend>{sort_buffer_size}:</td>\n\t\t<td>" . Field_text("sort_buffer_size", $mysql->main_array["sort_buffer_size"], "font-size:13px;width:60px;padding:3px") . " M</td>\n\t\t<td><code>sort_buffer_size</code></td>\n\t\t<td>" . help_icon('{sort_buffer_size_text}') . "</td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend>{join_buffer_size}:</td>\n\t\t<td>" . Field_text("join_buffer_size", $mysql->main_array["join_buffer_size"], "font-size:13px;width:60px;padding:3px") . " M</td>\n\t\t<td><code>join_buffer_size</code></td>\n\t\t<td>" . help_icon('{join_buffer_size_text}') . "</td>\n\t</tr>\t\t\n\t<tr {$hover}>\n\t\t<td class=legend>{read_buffer_size}:</td>\n\t\t<td>" . Field_text("read_buffer_size", $mysql->main_array["read_buffer_size"], "font-size:13px;width:60px;padding:3px") . " M</td>\n\t\t<td><code>read_buffer_size</code></td>\n\t\t<td>" . help_icon('{read_buffer_size_text}') . "</td>\n\t</tr>\t\t\n\t\t<td class=legend>{query_cache_size}:</td>\n\t\t<td>" . Field_text("query_cache_size", $mysql->main_array["query_cache_size"], "font-size:13px;width:60px;padding:3px") . " M</td>\n\t\t<td><code>query_cache_size</code></td>\n\t\t<td>" . help_icon('{query_cache_size_text}') . "</td>\n\t</tr>\t\t\n\t\n\t\n\t<tr {$hover}>\n\t\t<td class=legend>{query_cache_limit}:</td>\n\t\t<td>" . Field_text("query_cache_limit", $mysql->main_array["query_cache_limit"], "font-size:13px;width:60px;padding:3px") . " M</td>\n\t\t<td><code>query_cache_limit</code></td>\n\t\t<td>" . help_icon('{query_cache_limit_text}') . "</td>\n\t</tr>\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t<tr {$hover}>\n\t\t<td class=legend>{read_rnd_buffer_size}:</td>\n\t\t<td>" . Field_text("read_rnd_buffer_size", $mysql->main_array["read_rnd_buffer_size"], "font-size:13px;width:60px;padding:3px") . " M</td>\n\t\t<td><code>read_rnd_buffer_size</code></td>\n\t\t<td>" . help_icon('{read_rnd_buffer_size_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend>{table_cache}:</td>\n\t\t<td>" . Field_text("table_cache", $mysql->main_array["table_cache"], "font-size:13px;width:60px;padding:3px") . " table(s)</td>\n\t\t<td><code>table_cache</code></td>\n\t\t<td>" . help_icon('{table_cache}') . "</td>\n\t</tr>\n\t\n\t<tr {$hover}>\n\t\t<td class=legend>{tmp_table_size}:</td>\n\t\t<td>" . Field_text("tmp_table_size", $mysql->main_array["tmp_table_size"], "font-size:13px;width:60px;padding:3px") . " M</td>\n\t\t<td><code>tmp_table_size</code></td>\n\t\t<td>" . help_icon('{tmp_table_size}') . "</td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend>{max_allowed_packet}:</td>\n\t\t<td>" . Field_text("max_allowed_packet", $mysql->main_array["max_allowed_packet"], "font-size:13px;width:60px;padding:3px") . " M</td>\n\t\t<td><code>max_allowed_packet</code></td>\n\t\t<td>" . help_icon('{max_allowed_packet}') . "</td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend>{max_connections}:</td>\n\t\t<td>" . Field_text("max_connections", $mysql->main_array["max_connections"], "font-size:13px;width:60px;padding:3px") . " M</td>\n\t\t<td><code>max_connections</code></td>\n\t\t<td>" . help_icon('{max_connections}') . "</td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend>{net_buffer_length}:</td>\n\t\t<td>" . Field_text("net_buffer_length", $mysql->main_array["net_buffer_length"], "font-size:13px;width:60px;padding:3px") . " M</td>\n\t\t<td><code>net_buffer_length</code></td>\n\t\t<td>" . help_icon('{net_buffer_length_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend>{thread_cache_size}:</td>\n\t\t<td>" . Field_text("thread_cache_size", $mysql->main_array["thread_cache_size"], "font-size:13px;width:60px;padding:3px") . " M</td>\n\t\t<td><code>thread_cache_size</code></td>\n\t\t<td>" . help_icon('{thread_cache_size_text}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=4 align='right'>\n\t\t<hr>" . button("{apply}", "SaveUMysqlParameters()") . "\n\t\t\n\t\t</td>\n\t</tr>\n\t</table>"; $html = "<div style='font-size:16px'>{mysql_settings} v. {$mysql->mysql_version_string} ({$mysql->mysqlvbin})</H1>\n\t<div id='mysqlsettings'>{$form}</div>\n\t\n\t\n\t<script>\nfunction EnableZarafaTuningCheck(){\n\tvar EnableZarafaTuning={$EnableZarafaTuning};\n\tif(EnableZarafaTuning==0){return;}\n\tif(document.getElementById('innodb_buffer_pool_size')){document.getElementById('innodb_buffer_pool_size').disabled=true;}\n\tif(document.getElementById('query_cache_size')){document.getElementById('query_cache_size').disabled=true;}\n\tif(document.getElementById('innodb_log_file_size')){document.getElementById('innodb_log_file_size').disabled=true;}\n\tif(document.getElementById('innodb_log_buffer_size')){document.getElementById('innodb_log_buffer_size').disabled=true;}\n\tif(document.getElementById('max_allowed_packet')){document.getElementById('max_allowed_packet').disabled=true;}\n\tif(document.getElementById('max_connections')){document.getElementById('max_connections').disabled=true;}\n}\nEnableZarafaTuningCheck();\n</script>\n\t\n\t"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); }
function popup_options() { $page = CurrentPageName(); $sock = new sockets(); $t = time(); $php5FuncOverloadSeven = $sock->GET_INFO("php5FuncOverloadSeven"); $php5DefaultCharset = $sock->GET_INFO("php5DefaultCharset"); $php5UploadMaxFileSize = $sock->GET_INFO("php5UploadMaxFileSize"); $php5PostMaxSize = $sock->GET_INFO("php5PostMaxSize"); $php5MemoryLimit = $sock->GET_INFO("php5MemoryLimit"); $SessionPathInMemory = trim($sock->GET_INFO("SessionPathInMemory")); $php5FuncOverloadSeven = Field_checkbox("php5FuncOverloadSeven{$t}", 1, $php5FuncOverloadSeven); $DisableMagicQuotesGpc = $sock->GET_INFO("php5DisableMagicQuotesGpc"); $DisableMagicQuotesGpc = Field_checkbox("php5DisableMagicQuotesGpc{$t}", 1, $DisableMagicQuotesGpc); $timezone_def = trim($sock->GET_INFO('timezones')); $SSLStrictSNIVHostCheck = $sock->GET_INFO("SSLStrictSNIVHostCheck"); $SSLStrictSNIVHostCheck = Field_checkbox("SSLStrictSNIVHostCheck{$t}", 1, $SSLStrictSNIVHostCheck); $EnableRRDGraphFunction = $sock->GET_INFO("EnableRRDGraphFunction"); if (!is_numeric($EnableRRDGraphFunction)) { $EnableRRDGraphFunction = 1; } $EnableRRDGraphFunction = Field_checkbox("EnableRRDGraphFunction", 1, $EnableRRDGraphFunction, "EnableRRDGraphFunctionCheck()"); $EnablePHPFPM = intval($sock->GET_INFO("EnablePHPFPM")); $EnablePHPFPMFrameWork = $sock->GET_INFO("EnablePHPFPMFrameWork"); $EnableArticaApachePHPFPM = $sock->GET_INFO("EnableArticaApachePHPFPM"); $EnablePHPFPMFreeWeb = $sock->GET_INFO("EnablePHPFPMFreeWeb"); $CleanPHPSessionTime = $sock->GET_INFO("CleanPHPSessionTime"); if (!is_numeric($CleanPHPSessionTime)) { $CleanPHPSessionTime = 2880; } if (!is_numeric($EnablePHPFPMFrameWork)) { $EnablePHPFPMFrameWork = 0; } if (!is_numeric($EnableArticaApachePHPFPM)) { $EnableArticaApachePHPFPM = 0; } if (!is_numeric($EnablePHPFPMFreeWeb)) { $EnablePHPFPMFreeWeb = 0; } if (trim($timezone_def) == null) { $timezone_def = "Europe/Berlin"; } if (!is_numeric($php5UploadMaxFileSize)) { $php5UploadMaxFileSize = 256; } if (!is_numeric($php5PostMaxSize)) { $php5PostMaxSize = 128; } if (!is_numeric($php5MemoryLimit)) { $php5MemoryLimit = 500; } if (!is_numeric($SessionPathInMemory)) { $SessionPathInMemory = 0; } $timezone = timezonearray(); for ($i = 0; $i < count($timezone); $i++) { $array[$timezone[$i]] = $timezone[$i]; } $html = "\n\t<div id='php5div'></div>\n\t<div style='width=95%' class=form>\n\t<table >\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{CleanPHPSessionTime}:</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_text("CleanPHPSessionTime{$t}", $CleanPHPSessionTime, "font-size:16px;padding:3px;width:110px") . " {minutes}</td>\n\t\t<td width=1%>" . help_icon("{CleanPHPSessionTime_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{php5FuncOverloadSeven}:</td>\n\t\t<td valign='top'>{$php5FuncOverloadSeven}</td>\n\t\t<td width=1%>" . help_icon("{php5FuncOverloadSeven_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{DisableMagicQuotesGpc}:</td>\n\t\t<td valign='top'>{$DisableMagicQuotesGpc}</td>\n\t\t<td width=1%>" . help_icon("{DisableMagicQuotesGpc_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{SSLStrictSNIVHostCheck}:</td>\n\t\t<td valign='top'>{$SSLStrictSNIVHostCheck}</td>\n\t\t<td width=1%>" . help_icon("{SSLStrictSNIVHostCheck_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{EnableRRDGraphFunction}:</td>\n\t\t<td valign='top'>{$EnableRRDGraphFunction}</td>\n\t\t<td width=1%> </td>\n\t</tr>\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>Default charset:</td>\n\t\t<td valign='top'>" . Field_array_Hash(Charsets(), "php5DefaultCharset{$t}", $php5DefaultCharset, null, null, "style:font-size:16px;padding:3px") . "</td>\n\t\t<td width=1%> </td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{timezone}:</td>\n\t\t<td valign='top'>" . Field_array_Hash($array, "timezones{$t}", $timezone_def, null, null, "style:font-size:16px;padding:3px") . "</td>\n\t\t<td width=1%> </td>\n\t</tr>\t\n\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{php5UploadMaxFileSize}:</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_text("php5UploadMaxFileSize{$t}", $php5UploadMaxFileSize, "font-size:16px;padding:3px;width:60px") . " MB</td>\n\t\t<td width=1%> </td>\n\t</tr>\t\n\t\n\t\n\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{php5PostMaxSize}:</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_text("php5PostMaxSize{$t}", $php5PostMaxSize, "font-size:16px;padding:3px;width:60px") . " MB</td>\n\t\t<td width=1%> </td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{php5MemoryLimit}:</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_text("php5MemoryLimit{$t}", $php5MemoryLimit, "font-size:16px;padding:3px;width:60px") . " MB</td>\n\t\t<td width=1%> </td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{SessionPathInMemory}:</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_text("SessionPathInMemory{$t}", $SessionPathInMemory, "font-size:16px;padding:3px;width:60px") . " MB</td>\n\t\t<td width=1%>" . help_icon("{SessionPathInMemory_explain}") . "</td>\n\t</tr>\n\n\t\t<tr><td colspan=3><span style='font-size:22px'>PHP-FPM</td></tr>\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{EnablePHPFPM}:</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_checkbox("EnablePHPFPM-{$t}", 1, $EnablePHPFPM, "EnablePHPFPMCheck{$t}()") . "</td>\n\t\t<td width=1%> </td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{EnablePHPFPM} ( Framework ):</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_checkbox("EnablePHPFPMFrameWork-{$t}", 1, $EnablePHPFPMFrameWork) . "</td>\n\t\t<td width=1%> </td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{EnablePHPFPM} ( Web console ):</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_checkbox("EnableArticaApachePHPFPM-{$t}", 1, $EnableArticaApachePHPFPM) . "</td>\n\t\t<td width=1%> </td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{EnablePHPFPM} ( FreeWeb ):</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_checkbox("EnablePHPFPMFreeWeb-{$t}", 1, $EnablePHPFPMFreeWeb) . "</td>\n\t\t<td width=1%> </td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td colspan=3 align='right'>\n\t\t<hr>" . button('{apply}', "SavePHP5AdvancedSettings{$t}()", 22) . "\n\t\t\n\t\t</td>\n\t</tr> \n\t</table>\n\t</div>\n\t<script>\n\t\n\tvar x_SavePHP5AdvancedSettings{$t}=function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>2){alert(results);}\n\t\tRefreshTab('main_config_jsweb');\n\t\t}\t\n\t\n\t\n\tfunction SavePHP5AdvancedSettings{$t}(){\n \tvar XHR = new XHRConnection();\n \tvar php5DisableMagicQuotesGpc='';\n \tvar SSLStrictSNIVHostCheck='';\n \tvar EnableRRDGraphFunction=1;\n \tvar EnablePHPFPM=0;\n \tvar EnablePHPFPMFrameWork=0;\n \tvar EnableArticaApachePHPFPM=0;\n \tvar EnablePHPFPMFreeWeb=0;\n \tif(document.getElementById('php5DisableMagicQuotesGpc{$t}').checked){php5DisableMagicQuotesGpc=1;}else{php5DisableMagicQuotesGpc=0;}\n\t\tif(document.getElementById('php5FuncOverloadSeven{$t}').checked){php5FuncOverloadSeven=1;}else{php5FuncOverloadSeven=0;}\n\t\tif(document.getElementById('SSLStrictSNIVHostCheck{$t}').checked){SSLStrictSNIVHostCheck=1;}else{SSLStrictSNIVHostCheck=0;}\n\t\tif(document.getElementById('EnableRRDGraphFunction').checked){EnableRRDGraphFunction=1;}else{EnableRRDGraphFunction=0;}\n\t\t\n\t\tif(document.getElementById('EnablePHPFPM-{$t}').checked){EnablePHPFPM=1;}else{EnablePHPFPM=0;}\n\t\tif(document.getElementById('EnablePHPFPMFrameWork-{$t}').checked){EnablePHPFPMFrameWork=1;}else{EnablePHPFPMFrameWork=0;}\n\t\tif(document.getElementById('EnableArticaApachePHPFPM-{$t}').checked){EnableArticaApachePHPFPM=1;}else{EnableArticaApachePHPFPM=0;}\n\t\tif(document.getElementById('EnablePHPFPMFreeWeb-{$t}').checked){EnablePHPFPMFreeWeb=1;}else{EnablePHPFPMFreeWeb=0;}\n\t\t\n\t\tXHR.appendData('EnablePHPFPM',EnablePHPFPM);\n\t\tXHR.appendData('EnablePHPFPMFrameWork',EnablePHPFPMFrameWork);\n\t\tXHR.appendData('EnableArticaApachePHPFPM',EnableArticaApachePHPFPM);\n\t\tXHR.appendData('EnablePHPFPMFreeWeb',EnablePHPFPMFreeWeb);\n\t\t\n\t\t\n\t\tXHR.appendData('CleanPHPSessionTime',document.getElementById('CleanPHPSessionTime{$t}').value);\n\t\tXHR.appendData('php5DefaultCharset',document.getElementById('php5DefaultCharset{$t}').value);\n\t\tXHR.appendData('php5UploadMaxFileSize',document.getElementById('php5UploadMaxFileSize{$t}').value);\n\t\tXHR.appendData('php5PostMaxSize',document.getElementById('php5PostMaxSize{$t}').value);\n\t\tXHR.appendData('php5MemoryLimit',document.getElementById('php5MemoryLimit{$t}').value);\n\t\tXHR.appendData('php5DisableMagicQuotesGpc',php5DisableMagicQuotesGpc);\n\t\tXHR.appendData('php5FuncOverloadSeven',php5FuncOverloadSeven);\t\t\t\t\n\t\tXHR.appendData('SSLStrictSNIVHostCheck',SSLStrictSNIVHostCheck);\n\t\tXHR.appendData('EnableRRDGraphFunction',EnableRRDGraphFunction);\n\t\tXHR.appendData('timezones',document.getElementById('timezones{$t}').value);\n\t\tXHR.appendData('SessionPathInMemory',document.getElementById('SessionPathInMemory{$t}').value);\n\t\t\n\t\t\n \tXHR.sendAndLoad('{$page}', 'POST',x_SavePHP5AdvancedSettings{$t});\n\t}\n\t\n\tvar x_EnableRRDGraphFunctionCheck=function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>2){alert(results);}\n\t\tdocument.getElementById('php5div').innerHTML='';\n\t\t}\t\t\n\t\n\tfunction EnableRRDGraphFunctionCheck(){\n\t\tvar EnableRRDGraphFunction=0;\n\t\tif(document.getElementById('EnableRRDGraphFunction').checked){EnableRRDGraphFunction=1;}\n\t\tvar XHR = new XHRConnection();\n\t\tAnimateDiv('php5div');\n\t\tXHR.appendData('unik-EnableRRDGraphFunction',EnableRRDGraphFunction);\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_EnableRRDGraphFunctionCheck);\n\t\n\t}\n\t\n\tfunction EnablePHPFPMCheck{$t}(){\n\t\tdocument.getElementById('EnablePHPFPMFrameWork-{$t}').disabled=true;\n\t\tdocument.getElementById('EnableArticaApachePHPFPM-{$t}').disabled=true;\n\t\tdocument.getElementById('EnablePHPFPMFreeWeb-{$t}').disabled=true;\n\t\t\n\t\t\n\t\n\t\n\t\tif(document.getElementById('EnablePHPFPM-{$t}').checked){\n\t\t\tdocument.getElementById('EnablePHPFPMFrameWork-{$t}').disabled=false;\n\t\t\tdocument.getElementById('EnableArticaApachePHPFPM-{$t}').disabled=false;\n\t\t\tdocument.getElementById('EnablePHPFPMFreeWeb-{$t}').disabled=false;\n\t\t}\n\t\n\t}\n\t\n\t EnablePHPFPMCheck{$t}();\n\t</script>\t\n"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); }
function popup_options() { $sock = new sockets(); $php5FuncOverloadSeven = $sock->GET_INFO("php5FuncOverloadSeven"); $php5DefaultCharset = $sock->GET_INFO("php5DefaultCharset"); $php5FuncOverloadSeven = Field_checkbox("php5FuncOverloadSeven", 1, $php5FuncOverloadSeven); $DisableMagicQuotesGpc = $sock->GET_INFO("php5DisableMagicQuotesGpc"); $DisableMagicQuotesGpc = Field_checkbox("php5DisableMagicQuotesGpc", 1, $DisableMagicQuotesGpc); $SSLStrictSNIVHostCheck = $sock->GET_INFO("SSLStrictSNIVHostCheck"); $SSLStrictSNIVHostCheck = Field_checkbox("SSLStrictSNIVHostCheck", 1, $SSLStrictSNIVHostCheck); $html = "\n\t<div id='php5div'>\n\t<table width=100% class=form>\n\t<tr>\n\t\t<td valign='top' class=legend nowrap>{php5FuncOverloadSeven}:</td>\n\t\t<td valign='top'>{$php5FuncOverloadSeven}</td>\n\t\t<td width=1%>" . help_icon("{php5FuncOverloadSeven_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' class=legend nowrap>{DisableMagicQuotesGpc}:</td>\n\t\t<td valign='top'>{$DisableMagicQuotesGpc}</td>\n\t\t<td width=1%>" . help_icon("{DisableMagicQuotesGpc_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td valign='top' class=legend nowrap>{SSLStrictSNIVHostCheck}:</td>\n\t\t<td valign='top'>{$SSLStrictSNIVHostCheck}</td>\n\t\t<td width=1%>" . help_icon("{SSLStrictSNIVHostCheck_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td valign='top' class=legend nowrap>Default charset:</td>\n\t\t<td valign='top'>" . Field_array_Hash(Charsets(), "php5DefaultCharset", $php5DefaultCharset, null, "style:font-size:13px:padding:3px") . "</td>\n\t\t<td width=1%> </td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td colspan=3 align='right'>\n\t\t<hr>" . button('{edit}', 'SavePHP5AdvancedSettings()') . "\n\t\t\n\t\t</td>\n\t</tr> \n\t</table>\n\t</div>\n"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); }
function popup() { $page = CurrentPageName(); $mysql = new mysqlserver(); $net = new networking(); $array = $net->ALL_IPS_GET_ARRAY(); $sock = new sockets(); $users = new usersMenus(); $MysqlBinAllAdresses = $sock->GET_INFO("MysqlBinAllAdresses"); if (!is_numeric($EnableZarafaTuning)) { $EnableZarafaTuning = 0; } if (!is_numeric($MysqlBinAllAdresses)) { $MysqlBinAllAdresses = 0; } $instance_id = $_GET["instance-id"]; if (!is_numeric($instance_id)) { $instance_id = 0; } $divcallback = $_GET["divcallback"]; $t = time(); $array[null] = "{loopback}"; $array["all"] = "{all}"; if ($instance_id > 0) { $mysql = new mysqlserver_multi($instance_id); } if ($users->ZARAFA_INSTALLED) { $EnableZarafaTuning = $sock->GET_INFO("EnableZarafaTuning"); if (!is_numeric($EnableZarafaTuning)) { $EnableZarafaTuning = 0; } if ($EnableZarafaTuning == 1) { if ($instance_id == 0) { $ZarafTuningParameters = unserialize(base64_decode($sock->GET_INFO("ZarafaTuningParameters"))); $zarafa_innodb_buffer_pool_size = $ZarafTuningParameters["zarafa_innodb_buffer_pool_size"]; $zarafa_query_cache_size = $ZarafTuningParameters["zarafa_query_cache_size"]; $zarafa_innodb_log_file_size = $ZarafTuningParameters["zarafa_innodb_log_file_size"]; $zarafa_innodb_log_buffer_size = $ZarafTuningParameters["zarafa_innodb_log_buffer_size"]; $zarafa_max_allowed_packet = $ZarafTuningParameters["zarafa_max_allowed_packet"]; $zarafa_max_connections = $ZarafTuningParameters["zarafa_max_connections"]; if (!is_numeric($zarafa_max_connections)) { $zarafa_max_connections = 150; } if (!is_numeric($zarafa_innodb_buffer_pool_size)) { $zarafa_innodb_buffer_pool_size = round($memory / 2.8); } if (!is_numeric($zarafa_innodb_log_file_size)) { $zarafa_innodb_log_file_size = round($zarafa_innodb_buffer_pool_size * 0.25); } if (!is_numeric($zarafa_innodb_log_buffer_size)) { $zarafa_innodb_log_buffer_size = 32; } if (!is_numeric($zarafa_max_allowed_packet)) { $zarafa_max_allowed_packet = 16; } if (!is_numeric($zarafa_query_cache_size)) { $zarafa_query_cache_size = 8; } if ($zarafa_innodb_log_file_size > 4000) { $zarafa_innodb_log_file_size = 2000; } $mysql->main_array["innodb_buffer_pool_size"] = $zarafa_innodb_buffer_pool_size; $mysql->main_array["innodb_log_file_size"] = $zarafa_innodb_log_file_size; $mysql->main_array["innodb_log_buffer_size"] = $zarafa_innodb_log_buffer_size; $mysql->main_array["max_allowed_packet"] = $zarafa_max_allowed_packet; $mysql->main_array["query_cache_size"] = $zarafa_query_cache_size; } } } $bind = Field_array_Hash($array, "{$t}-bind-address", $mysql->main_array["bind-address"], null, null, 0, "font-size:14px;padding:3px"); $chars = Charsets(); $charsets = Field_array_Hash($chars, "{$t}-default-character-set", $mysql->main_array["default-character-set"], null, null, 0, "font-size:14px;padding:3px"); //Les devs de mysql conseillent un key_buffer de la taille de la somme de tous les fichiers .MYI dans le repertoire mysql. $hover = CellRollOver(); $form = "\t\n<input type='hidden' value='instance-id' id='instance-id' value='{$instance_id}'>\n<center style='width:90%' class=form>\n<table >\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{skip-name-resolve}:</td>\n\t\t<td style='font-size:14px'>" . Field_yesno_checkbox("{$t}-skip-name-resolve", $mysql->main_array["skip_name_resolve"]) . "</td>\n\t\t<td><code style='font-size:12px'>skip-name-resolve</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{skip-name-resolve_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{skip-external-locking}:</td>\n\t\t<td style='font-size:14px'>" . Field_yesno_checkbox("{$t}-skip-external-locking", $mysql->main_array["skip_external_locking"]) . "</td>\n\t\t<td><code style='font-size:12px'>skip-external-locking</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{skip-external-locking_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{skip-character-set-client-handshake}:</td>\n\t\t<td style='font-size:14px'>" . Field_yesno_checkbox("{$t}-skip-character-set-client-handshake", $mysql->main_array["skip-character-set-client-handshake"]) . "</td>\n\t\t<td><code style='font-size:12px'>skip-character-set-client-handshake</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{skip-character-set-client-handshake_text}') . "</td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend>Default charset:</td>\n\t\t<td colspan=3>{$charsets}</td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{bind-address}:</td>\n\t\t<td>{$bind}</td>\n\t\t<td><code style='font-size:12px'>bind-address</code></td>\n\t\t<td> </td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{bind_all_addresses}:</td>\n\t\t<td style='font-size:14px'>" . Field_checkbox("{$t}-MysqlBinAllAdresses", 1, $MysqlBinAllAdresses, "MysqlBinAllAdressesCheck()") . "</td>\n\t\t<td> </td>\n\t\t<td> </td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{key_buffer}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-key_buffer", $mysql->main_array["key_buffer"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>key_buffer</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{key_buffer_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px;color:#D50A0A'>{key_buffer_size}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-key_buffer_size", $mysql->main_array["key_buffer_size"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>key_buffer_size</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{key_buffer_size_text}') . "</td>\n\t</tr>\t\t\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{innodb_buffer_pool_size}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-innodb_buffer_pool_size", $mysql->main_array["innodb_buffer_pool_size"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>innodb_buffer_pool_size</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{innodb_buffer_pool_size_text}') . "</td>\n\t</tr>\n\t\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{innodb_additional_mem_pool_size}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-innodb_additional_mem_pool_size", $mysql->main_array["innodb_additional_mem_pool_size"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>innodb_additional_mem_pool_size</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{innodb_additional_mem_pool_size_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{innodb_log_file_size}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-innodb_log_file_size", $mysql->main_array["innodb_log_file_size"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>innodb_log_file_size</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{innodb_log_file_size_text}') . "</td>\n\t</tr>\t\t\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{innodb_log_buffer_size}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-innodb_log_buffer_size", $mysql->main_array["innodb_log_buffer_size"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>innodb_log_buffer_size</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{innodb_log_buffer_size_text}') . "</td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{innodb_lock_wait_timeout}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-innodb_lock_wait_timeout", $mysql->main_array["innodb_lock_wait_timeout"], "font-size:14px;width:60px;padding:3px") . " {seconds}</td>\n\t\t<td><code style='font-size:12px'>innodb_lock_wait_timeout</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{innodb_lock_wait_timeout_text}') . "</td>\n\t</tr>\t\n\n\t\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{myisam_sort_buffer_size}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-myisam_sort_buffer_size", $mysql->main_array["myisam_sort_buffer_size"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>myisam_sort_buffer_size</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{myisam_sort_buffer_size_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{sort_buffer_size}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-sort_buffer_size", $mysql->main_array["sort_buffer_size"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>sort_buffer_size</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{sort_buffer_size_text}') . "</td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{join_buffer_size}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-join_buffer_size", $mysql->main_array["join_buffer_size"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>join_buffer_size</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{join_buffer_size_text}') . "</td>\n\t</tr>\t\t\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{read_buffer_size}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-read_buffer_size", $mysql->main_array["read_buffer_size"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>read_buffer_size</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{read_buffer_size_text}') . "</td>\n\t</tr>\t\t\n\t\t<td class=legend style='font-size:14px;color:#D50A0A'>{query_cache_size}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-query_cache_size", $mysql->main_array["query_cache_size"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>query_cache_size</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{query_cache_size_text}') . "</td>\n\t</tr>\t\t\n\t\n\t\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{query_cache_limit}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-query_cache_limit", $mysql->main_array["query_cache_limit"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>query_cache_limit</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{query_cache_limit_text}') . "</td>\n\t</tr>\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{read_rnd_buffer_size}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-read_rnd_buffer_size", $mysql->main_array["read_rnd_buffer_size"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>read_rnd_buffer_size</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{read_rnd_buffer_size_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px;color:#D50A0A'>{table_cache}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-table_cache", $mysql->main_array["table_cache"], "font-size:14px;width:60px;padding:3px") . " table(s)</td>\n\t\t<td><code style='font-size:12px'>table_cache</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{table_cache}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px;color:#D50A0A'>{max_heap_table_size}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-max_heap_table_size", $mysql->main_array["max_heap_table_size"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>max_heap_table_size</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{max_heap_table_size_text}') . "</td>\n\t</tr>\t\n\t\n\t\n\t\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px;color:#D50A0A'>{tmp_table_size}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-tmp_table_size", $mysql->main_array["tmp_table_size"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>tmp_table_size</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{tmp_table_size}') . "</td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{max_allowed_packet}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-max_allowed_packet", $mysql->main_array["max_allowed_packet"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>max_allowed_packet</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{max_allowed_packet}') . "</td>\n\t</tr>\t\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px;color:#D50A0A'>{max_connections}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-max_connections", $mysql->main_array["max_connections"], "font-size:14px;width:60px;padding:3px") . " </td>\n\t\t<td><code style='font-size:12px'>max_connections</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{max_connections}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px;color:#D50A0A'>{open_files_limit}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-open_files_limit", $mysql->main_array["open_files_limit"], "font-size:14px;width:60px;padding:3px") . " </td>\n\t\t<td><code style='font-size:12px'>open_files_limit</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{open_files_limit_explain}') . "</td>\n\t</tr>\t\n\t\n\t\n\t\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px;color:#D50A0A'>{wait_timeout}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-wait_timeout", $mysql->main_array["wait_timeout"], "font-size:14px;width:60px;padding:3px") . " {seconds}</td>\n\t\t<td><code style='font-size:12px'>wait_timeout</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{wait_timeout_text}') . "</td>\n\t</tr>\n\t\n\t\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px'>{net_buffer_length}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-net_buffer_length", $mysql->main_array["net_buffer_length"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>net_buffer_length</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{net_buffer_length_text}') . "</td>\n\t</tr>\n\t<tr {$hover}>\n\t\t<td class=legend style='font-size:14px;color:#D50A0A'>{thread_cache_size}:</td>\n\t\t<td style='font-size:14px'>" . Field_text("{$t}-thread_cache_size", $mysql->main_array["thread_cache_size"], "font-size:14px;width:60px;padding:3px") . " M</td>\n\t\t<td><code style='font-size:12px'>thread_cache_size</code></td>\n\t\t<td style='font-size:14px'>" . help_icon('{thread_cache_size_text}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=4 align='right'>\n\t\t<hr>" . button("{apply}", "SaveUMysqlParameters{$t}()", 16) . "\n\t\t\n\t\t</td>\n\t</tr>\n\t</table></div>"; $html = "<div style='font-size:16px'>{mysql_settings} v. {$mysql->mysql_version_string} ({$mysql->mysqlvbin})\n\t | <a href=\"javascript:blur();\" OnClick=\"Loadjs('mysql.perfs.php?instance-id={$instance_id}')\" style='font-size:16px;text-decoration:underline'>{mysql_performancesM}</a></div>\n\t<div id='mysqlsettings'>{$form}</div>\n\t\n\t\n\t<script>\n\tfunction EnableZarafaTuningCheck(){\n\t\tvar EnableZarafaTuning={$EnableZarafaTuning};\n\t\tif(EnableZarafaTuning==0){CheckZarafaValues();return;}\n\t\tif(document.getElementById('{$t}-innodb_buffer_pool_size')){document.getElementById('{$t}-innodb_buffer_pool_size').disabled=true;}\n\t\tif(document.getElementById('{$t}-query_cache_size')){document.getElementById('{$t}-query_cache_size').disabled=true;}\n\t\tif(document.getElementById('{$t}-innodb_log_file_size')){document.getElementById('i{$t}-nnodb_log_file_size').disabled=true;}\n\t\tif(document.getElementById('{$t}-innodb_log_buffer_size')){document.getElementById('{$t}-innodb_log_buffer_size').disabled=true;}\n\t\tif(document.getElementById('{$t}-max_allowed_packet')){document.getElementById('{$t}-max_allowed_packet').disabled=true;}\n\t\tif(document.getElementById('{$t}-max_connections')){document.getElementById('{$t}-max_connections').disabled=true;}\n\t\tCheckZarafaValues();\n\t}\n\n\tfunction MysqlBinAllAdressesCheck(){\n\t\tif(document.getElementById('{$t}-MysqlBinAllAdresses').checked){\n\t\t\tdocument.getElementById('{$t}-bind-address').disabled=true;\n\t\t}else{\n\t\t\tdocument.getElementById('{$t}-bind-address').disabled=false;\n\t\t}\n\t}\n\n\tfunction LockNetWorkFields(){\n\t\tvar instance_id={$instance_id};\n\t\tif(instance_id>0){\n\t\t\tdocument.getElementById('{$t}-MysqlBinAllAdresses').disabled=true;\n\t\t\tdocument.getElementById('{$t}-bind-address').disabled=true;\n\t\t}\n\t\n\t}\n\t\n\tfunction CheckZarafaValues(){\n\t\tvar EnableZarafaTuning={$EnableZarafaTuning};\t\n\t\tif(EnableZarafaTuning==0){return;}\n\t\tdocument.getElementById('{$t}-innodb_log_buffer_size').disabled=true;\n\t\tdocument.getElementById('{$t}-innodb_buffer_pool_size').disabled=true;\n\t\tdocument.getElementById('{$t}-innodb_log_file_size').disabled=true;\n\t\tdocument.getElementById('{$t}-innodb_log_buffer_size').disabled=true;\n\t\tdocument.getElementById('{$t}-max_allowed_packet').disabled=true;\n\t\tdocument.getElementById('{$t}-query_cache_size').disabled=true;\n\t\n\t\n\t}\n\t\n\t\nvar x_SaveUMysqlParameters= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>0){alert(results);}\n\tvar instance_id={$instance_id};\n\tif(instance_id>0){RefreshTab('main_config_instance_mysql_multi');return;}\n\tLoadAjax('{$divcallback}','{$page}?popup=yes&instance-id={$instance_id}');\n\t}\n\t\n\n\nfunction SaveUMysqlParameters{$t}(){\n\tvar XHR = new XHRConnection();\n\t\n\tif(document.getElementById('{$t}-MysqlBinAllAdresses').checked){XHR.appendData('MysqlBinAllAdresses',1);}else{XHR.appendData('MysqlBinAllAdresses',0);}\n\tif(document.getElementById('{$t}-skip-external-locking').checked){XHR.appendData('skip_external_locking','yes');}else{XHR.appendData('skip_external_locking','no');}\n\tif(document.getElementById('{$t}-skip-character-set-client-handshake').checked){XHR.appendData('skip-character-set-client-handshake','yes');}else{XHR.appendData('skip-character-set-client-handshake','no');}\n\tif(document.getElementById('{$t}-skip-name-resolve').checked){XHR.appendData('skip_name_resolve','yes');}else{XHR.appendData('skip_name_resolve','no');}\n\t\n\t\n\tif(document.getElementById('{$t}-key_buffer')){XHR.appendData('key_buffer',document.getElementById('{$t}-key_buffer').value);}\n\tif(document.getElementById('{$t}-innodb_buffer_pool_size')){XHR.appendData('innodb_buffer_pool_size',document.getElementById('{$t}-innodb_buffer_pool_size').value);}\n\tif(document.getElementById('{$t}-innodb_additional_mem_pool_size')){XHR.appendData('innodb_additional_mem_pool_size',document.getElementById('{$t}-innodb_additional_mem_pool_size').value);}\n\tif(document.getElementById('{$t}-read_rnd_buffer_size')){XHR.appendData('read_rnd_buffer_size',document.getElementById('{$t}-read_rnd_buffer_size').value);}\n\tif(document.getElementById('{$t}-table_cache')){XHR.appendData('table_cache',document.getElementById('{$t}-table_cache').value);}\n\tif(document.getElementById('{$t}-tmp_table_size')){XHR.appendData('tmp_table_size',document.getElementById('{$t}-tmp_table_size').value);}\n\tif(document.getElementById('{$t}-max_allowed_packet')){XHR.appendData('max_allowed_packet',document.getElementById('{$t}-max_allowed_packet').value);}\n\tif(document.getElementById('{$t}-max_connections')){XHR.appendData('max_connections',document.getElementById('{$t}-max_connections').value);}\n\tif(document.getElementById('{$t}-myisam_sort_buffer_size')){XHR.appendData('myisam_sort_buffer_size',document.getElementById('{$t}-myisam_sort_buffer_size').value);}\n\tif(document.getElementById('{$t}-net_buffer_length')){XHR.appendData('net_buffer_length',document.getElementById('{$t}-net_buffer_length').value);}\n\tif(document.getElementById('{$t}-sort_buffer_size')){XHR.appendData('sort_buffer_size',document.getElementById('{$t}-sort_buffer_size').value);}\n\tif(document.getElementById('{$t}-join_buffer_size')){XHR.appendData('join_buffer_size',document.getElementById('{$t}-join_buffer_size').value);}\n\tif(document.getElementById('{$t}-read_buffer_size')){XHR.appendData('read_buffer_size',document.getElementById('{$t}-read_buffer_size').value);}\n\tif(document.getElementById('{$t}-key_buffer_size')){XHR.appendData('key_buffer_size',document.getElementById('{$t}-key_buffer_size').value);}\n\tif(document.getElementById('{$t}-thread_cache_size')){XHR.appendData('thread_cache_size',document.getElementById('{$t}-thread_cache_size').value);}\n\tif(document.getElementById('{$t}-query_cache_limit')){XHR.appendData('query_cache_limit',document.getElementById('{$t}-query_cache_limit').value);}\n\tif(document.getElementById('{$t}-query_cache_size')){XHR.appendData('query_cache_size',document.getElementById('{$t}-query_cache_size').value);}\n\tif(document.getElementById('{$t}-table_open_cache')){XHR.appendData('table_open_cache',document.getElementById('{$t}-table_open_cache').value);}\n\tif(document.getElementById('{$t}-bind-address')){XHR.appendData('bind-address',document.getElementById('{$t}-bind-address').value);}\t\n\tif(document.getElementById('{$t}-default-character-set')){XHR.appendData('default-character-set',document.getElementById('{$t}-default-character-set').value);}\n\t\n\tif(document.getElementById('{$t}-innodb_log_file_size')){XHR.appendData('innodb_log_file_size',document.getElementById('{$t}-innodb_log_file_size').value);}\n\tif(document.getElementById('{$t}-innodb_log_buffer_size')){XHR.appendData('innodb_log_buffer_size',document.getElementById('{$t}-innodb_log_buffer_size').value);}\n\tif(document.getElementById('{$t}-innodb_lock_wait_timeout')){XHR.appendData('innodb_lock_wait_timeout',document.getElementById('{$t}-innodb_lock_wait_timeout').value);}\n\tif(document.getElementById('{$t}-wait_timeout')){XHR.appendData('wait_timeout',document.getElementById('{$t}-wait_timeout').value);}\n\tif(document.getElementById('{$t}-max_heap_table_size')){XHR.appendData('max_heap_table_size',document.getElementById('{$t}-max_heap_table_size').value);}\n\tif(document.getElementById('{$t}-open_files_limit')){XHR.appendData('open_files_limit',document.getElementById('{$t}-open_files_limit').value);}\n\n\tXHR.appendData('instance-id','{$instance_id}');\n\tAnimateDiv('mysqlsettings');\n\tXHR.sendAndLoad('{$page}', 'GET',x_SaveUMysqlParameters);\t\n}\t\n\t\n\t\n\tEnableZarafaTuningCheck();\n\tMysqlBinAllAdressesCheck();\n\tLockNetWorkFields();\n\t\n</script>\n\t\n\t"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); }
function popup(){ $mysql=new mysqlserver(); $net=new networking(); $array=$net->ALL_IPS_GET_ARRAY(); $array[null]="{all}"; $bind=Field_array_Hash($array,"bind-address",$mysql->main_array["bind-address"],null,null,0,"font-size:13px;padding:3px"); $chars=Charsets(); $charsets=Field_array_Hash($chars,"default-character-set",$mysql->main_array["default-character-set"],null,null,0,"font-size:13px;padding:3px"); //Les devs de mysql conseillent un key_buffer de la taille de la somme de tous les fichiers .MYI dans le repertoire mysql. $hover=CellRollOver(); $form=" <table style='width:100%' class=form> <tr $hover> <td class=legend>{skip-external-locking}:</td> <td>". Field_yesno_checkbox('skip-external-locking',$mysql->main_array["skip_external_locking"])."</td> <td><code>skip-external-locking</code></td> <td>". help_icon('{skip-external-locking_text}')."</td> </tr> <tr $hover> <td class=legend>{skip-character-set-client-handshake}:</td> <td>". Field_yesno_checkbox('skip-character-set-client-handshake',$mysql->main_array["skip-character-set-client-handshake"])."</td> <td><code>skip-character-set-client-handshake</code></td> <td>". help_icon('{skip-character-set-client-handshake_text}')."</td> </tr> <tr $hover> <td class=legend>Default charset:</td> <td colspan=3>$charsets</td> </tr> <tr $hover> <td class=legend>{bind-address}:</td> <td>$bind</td> <td><code>bind-address</code></td> <td> </td> </tr> <tr $hover> <td class=legend>{key_buffer}:</td> <td>". Field_text("key_buffer",$mysql->main_array["key_buffer"],"font-size:13px;width:60px;padding:3px")." M</td> <td><code>key_buffer</code></td> <td>". help_icon('{key_buffer_text}')."</td> </tr> <tr $hover> <td class=legend>{key_buffer_size}:</td> <td>". Field_text("key_buffer_size",$mysql->main_array["key_buffer_size"],"font-size:13px;width:60px;padding:3px")." M</td> <td><code>key_buffer_size</code></td> <td>". help_icon('{key_buffer_size_text}')."</td> </tr> <tr $hover> <td class=legend>{innodb_buffer_pool_size}:</td> <td>". Field_text("innodb_buffer_pool_size",$mysql->main_array["innodb_buffer_pool_size"],"font-size:13px;width:60px;padding:3px")." M</td> <td><code>innodb_buffer_pool_size</code></td> <td>". help_icon('{innodb_buffer_pool_size_text}')."</td> </tr> <tr $hover> <td class=legend>{innodb_additional_mem_pool_size}:</td> <td>". Field_text("innodb_additional_mem_pool_size",$mysql->main_array["innodb_additional_mem_pool_size"],"font-size:13px;width:60px;padding:3px")." M</td> <td><code>innodb_additional_mem_pool_size</code></td> <td>". help_icon('{innodb_additional_mem_pool_size_text}')."</td> </tr> <tr $hover> <td class=legend>{myisam_sort_buffer_size}:</td> <td>". Field_text("myisam_sort_buffer_size",$mysql->main_array["myisam_sort_buffer_size"],"font-size:13px;width:60px;padding:3px")." M</td> <td><code>myisam_sort_buffer_size</code></td> <td>". help_icon('{myisam_sort_buffer_size_text}')."</td> </tr> <tr $hover> <td class=legend>{sort_buffer_size}:</td> <td>". Field_text("sort_buffer_size",$mysql->main_array["sort_buffer_size"],"font-size:13px;width:60px;padding:3px")." M</td> <td><code>sort_buffer_size</code></td> <td>". help_icon('{sort_buffer_size_text}')."</td> </tr> <tr $hover> <td class=legend>{join_buffer_size}:</td> <td>". Field_text("join_buffer_size",$mysql->main_array["join_buffer_size"],"font-size:13px;width:60px;padding:3px")." M</td> <td><code>join_buffer_size</code></td> <td>". help_icon('{join_buffer_size_text}')."</td> </tr> <tr $hover> <td class=legend>{read_buffer_size}:</td> <td>". Field_text("read_buffer_size",$mysql->main_array["read_buffer_size"],"font-size:13px;width:60px;padding:3px")." M</td> <td><code>read_buffer_size</code></td> <td>". help_icon('{read_buffer_size_text}')."</td> </tr> <td class=legend>{query_cache_size}:</td> <td>". Field_text("query_cache_size",$mysql->main_array["query_cache_size"],"font-size:13px;width:60px;padding:3px")." M</td> <td><code>query_cache_size</code></td> <td>". help_icon('{query_cache_size_text}')."</td> </tr> <tr $hover> <td class=legend>{query_cache_limit}:</td> <td>". Field_text("query_cache_limit",$mysql->main_array["query_cache_limit"],"font-size:13px;width:60px;padding:3px")." M</td> <td><code>query_cache_limit</code></td> <td>". help_icon('{query_cache_limit_text}')."</td> </tr> <tr $hover> <td class=legend>{read_rnd_buffer_size}:</td> <td>". Field_text("read_rnd_buffer_size",$mysql->main_array["read_rnd_buffer_size"],"font-size:13px;width:60px;padding:3px")." M</td> <td><code>read_rnd_buffer_size</code></td> <td>". help_icon('{read_rnd_buffer_size_text}')."</td> </tr> <tr $hover> <td class=legend>{table_cache}:</td> <td>". Field_text("table_cache",$mysql->main_array["table_cache"],"font-size:13px;width:60px;padding:3px")." table(s)</td> <td><code>table_cache</code></td> <td>". help_icon('{table_cache}')."</td> </tr> <tr $hover> <td class=legend>{tmp_table_size}:</td> <td>". Field_text("tmp_table_size",$mysql->main_array["tmp_table_size"],"font-size:13px;width:60px;padding:3px")." M</td> <td><code>tmp_table_size</code></td> <td>". help_icon('{tmp_table_size}')."</td> </tr> <tr $hover> <td class=legend>{max_allowed_packet}:</td> <td>". Field_text("max_allowed_packet",$mysql->main_array["max_allowed_packet"],"font-size:13px;width:60px;padding:3px")." M</td> <td><code>max_allowed_packet</code></td> <td>". help_icon('{max_allowed_packet}')."</td> </tr> <tr $hover> <td class=legend>{max_connections}:</td> <td>". Field_text("max_connections",$mysql->main_array["max_connections"],"font-size:13px;width:60px;padding:3px")." M</td> <td><code>max_connections</code></td> <td>". help_icon('{max_connections}')."</td> </tr> <tr $hover> <td class=legend>{net_buffer_length}:</td> <td>". Field_text("net_buffer_length",$mysql->main_array["net_buffer_length"],"font-size:13px;width:60px;padding:3px")." M</td> <td><code>net_buffer_length</code></td> <td>". help_icon('{net_buffer_length_text}')."</td> </tr> <tr $hover> <td class=legend>{thread_cache_size}:</td> <td>". Field_text("thread_cache_size",$mysql->main_array["thread_cache_size"],"font-size:13px;width:60px;padding:3px")." M</td> <td><code>thread_cache_size</code></td> <td>". help_icon('{thread_cache_size_text}')."</td> </tr> <tr> <td colspan=4 align='right'> <hr>". button("{apply}","SaveUMysqlParameters()")." </td> </tr> </table>"; $html="<div style='font-size:16px'>{mysql_settings} v. $mysql->mysql_version_string ($mysql->mysqlvbin)</H1> <div id='mysqlsettings'>".RoundedLightWhite($form)."</div>"; $tpl=new templates(); echo $tpl->_ENGINE_parse_body($html); }