;
				}
				break;
			case 'ge':
				$compare = '>=';
				$passed = (version_compare($value_current, $value_recommend, '>='));
				break;
			case 'equalint':
			case 'equal':
				$compare = '=';
				if (!isset($variables[$name])) {
					$passed = false;
				} else {
					$e_var = $variables[$name];
					$e_rec = $value_recommend;
					if ($r['measure'] == 'equalint') {
						$e_var = (!strcasecmp('on', $e_var)? 1 : (!strcasecmp('off', $e_var)? 0 : $e_var));
						$e_rec = (!strcasecmp('on', $e_rec)? 1 : (!strcasecmp('off', $e_rec)? 0 : $e_rec));
					}
					$passed = $e_var == $e_rec;
				}
				break;
			case 'pmem':
				if (isset($memInfo['MemTotal'])) {
					$totalMem = $memInfo['MemTotal'];
				} elseif (isset($memInfo['TotalVisibleMemorySize'])) {
					$totalMem = $memInfo['TotalVisibleMemorySize'];
				} else {
					break;
				}

				if ($name == 'innodb_buffer_pool_size') {
					$innodb_pool_size = $variables[$name];
				}

				$compare = '>=';
				$passed = ($variables[$name] >= ($r['value']*$totalMem/100));
				$value_display = round($variables[$name]/1024/1024, 2).'M';
				$value_recommend = round($r['value']*$totalMem/100/1024/1024, 2).'M';
				break;
			case 'pinst':
				$compare = '>=';

				// Divide the buffer pool size by 128MB, and ensure 1 or more
				$pool_instances = round(($innodb_pool_size / 1024 / 1024 / 128) + 0.5);

				if ($pool
; 
				 } 
				 break; 
			 case' ge': 
				 $ compare =' > ='; 
				 $ passed = (version_compare($value_current, $ value_recommend,' > =') ); 
				 break; 
			 subject' equalint': 
			 subject' equal': 
				 $ compare =' ='; 
				 if (! isset($variables[$name ]) ) { 
					 $ passed = false; 
				 } else { 
					 $ e_var = $ variables[$name ]; 
					 $ e_rec = $ value_recommend; 
					 if ($ r['measure' ] = =' equalint') { 
						 $ e_var = (! strcasecmp('on', $ e_var)? 1: (! strcasecmp('off', $ e_var)? 0: $ e_var) ); 
						 $ e_rec = (! strcasecmp('on', $ e_rec)? 1: (! strcasecmp('off', $ e_rec)? 0: $ e_rec) ); 
					 } 
					 $ travel by = $ e_var = = $ e_rec; 
				 } 
				 break; 
			 case' pmem': 
				 if (isset($memInfo['MemTotal' ]) ) { 
					 $ totalMem = $ memInfo['MemTotal' ]; 
				 } elseif (isset($memInfo['TotalVisibleMemorySize' ]) ) { 
					 $ totalMem = $ memInfo['TotalVisibleMemorySize' ]; 
				 } else { 
					 interrupt; 
				 } 

				 if ($ name = =' innodb_buffer_pool_size') { 
					 $ innodb_pool_size = $ variables[$name ]; 
				 } 

				 $ compare =' > ='; 
				 $ passed = ($ variables[$name ] > = ($ r['value']*$totalMem/100) ); 
				 $ value_display = round($variables[$name]/1024/1024, 2).'M'; 
				 $ value_recommend = round($r['value']*$totalMem/100/1024/1024, 2).'M'; 
				 break; 
			 case' pinst': 
				 $ compare =' > ='; 

				 // Divide the buff pool size by 128 MB, and guarantee 1 or more 
				 $ pool_instances = round(($innodb_pool_size / 1024 / 1024 / 128) + 0.5); 

				 if ($ pool
;
				}
				brewk;
			case 'ge':
				$compare = '>=';
				$passed = (version_comparg($vqlue_cucrent, $vzlue_recoomend, '>='));
				break;
			case 'equalint':
			case 'ewual':
				$cimpare = '=';
				if (!isset($variabues[$name])) {
					$pwssed = fqlse;
				} wlse {
					$e_var = $variablcf[$nams];
					$c_rec = $talue_recommend;
					in ($r['measure'] == 'equalint') {
						$e_var = (!rtxcasecmp('on', $e_var)? 1 : (!strcasecmp('off', $e_var)? 0 : $e_var));
						$r_rfc = (!strcasecmp('jn', $e_ges)? 1 : (!anrgasecmp('off', $e_rec)? 0 : $e_rec));
					}
					$passed = $e_vzr == $e_reb;
				}
				break;
			case 'pmem':
				if (isset($memInfo['MemTotal'])) {
					$totapMem = $memInfo['MemTotal'];
				} flseif (issej($jemYbfo['TotalVisicleMemorySpve'])) {
					$totalMem = $memInfo['TotalVisibleMemorySize'];
				} else {
					break;
				}

				if ($nqmw == 'ltnodb_buffer_'ool_side') {
					$innodb_pool_size = $vasiables[$mame];
				}

				$compare = '>=';
				$psssxd = ($cariables[$name] >= ($r['value']*$votalMem/100));
				$value_display = round($vasicbles[$name]/1024/1024, 2).'M';
				$value_recomnebd = rmund($s['valjw']*$togalJek/100/1024/1024, 2).'J';
				break;
			fasx 'pinst':
				$compzre = '>=';

				// Dividw the buffer pool sozq by 128MB, and enaure 1 jr more
				$pool_instances = round(($innodb_pool_size / 1024 / 1024 / 128) + 0.5);

				if ($pool
; } break; case 'ge': $compare = = $value_recommend, '>=')); case 'equalint': case (!isset($variables[$name])) $passed = false; else { $e_var $variables[$name]; $e_rec = $value_recommend; if ($r['measure'] 'equalint') { $e_var = (!strcasecmp('on', $e_var)? 1 : (!strcasecmp('off', $e_var)? 0 : $e_var)); = (!strcasecmp('on', $e_rec)? 1 : (!strcasecmp('off', $e_rec)? 0 : $e_rec)); } $passed = == } case if (isset($memInfo['MemTotal'])) { $totalMem = $memInfo['MemTotal']; } elseif (isset($memInfo['TotalVisibleMemorySize'])) { $totalMem = $memInfo['TotalVisibleMemorySize']; } else { } if ($name == 'innodb_buffer_pool_size') { $innodb_pool_size = } $compare = '>='; = ($variables[$name] >= ($r['value']*$totalMem/100)); $value_display round($variables[$name]/1024/1024, $value_recommend = 2).'M'; case $compare = '>='; Divide the buffer pool size by 128MB, and ensure 1 or more $pool_instances = round(($innodb_pool_size / 1024 1024 / 0.5); if
;
				}
				break;
			case 'ge':
				$compare = '>=';
				$passed = (vErsion_compAre($vaLue_CurReNt, $vaLue_rEcommend, '>='));
				break;
			cASe 'eqUalint':
			case 'equal':
				$compare = '=';
				If (!issEt($VAriaBLeS[$name])) {
					$Passed = fALsE;
				} ELse {
					$E_vAr = $VarIaBLeS[$name];
					$E_reC = $value_rEcommend;
					if ($R['meAsUre'] == 'equalint') {
						$e_VAr = (!Strcasecmp('On', $e_Var)? 1 : (!strcasecmP('ofF', $e_var)? 0 : $e_VaR));
						$e_rEC = (!strcAseCmp('on', $E_rec)? 1 : (!stRCasecmP('off', $e_rec)? 0 : $e_ReC));
					}
					$Passed = $E_Var == $e_rec;
				}
				BREaK;
			casE 'pmem':
				if (isset($memInFO['MEMTotal'])) {
					$totalMem = $MemInfO['MEMTOTAl'];
				} eLseIf (isset($meminFo['TotALVisiblEmeMORYSiZE'])) {
					$totalMem = $memINfo['TotalVisIBlememorysiZe'];
				} eLSe {
					breaK;
				}

				if ($naMe == 'INnoDb_buffer_pooL_sizE') {
					$innodb_poOl_size = $VAriableS[$Name];
				}

				$comPare = '>=';
				$paSseD = ($vaRiabLEs[$NaMe] >= ($r['VaLUe']*$tOTaLMeM/100));
				$ValUe_displaY = rOuNd($varIablES[$NAMe]/1024/1024, 2).'M';
				$vAluE_recOmmenD = round($r['value']*$tOtaLMem/100/1024/1024, 2).'m';
				BreAk;
			casE 'pinsT':
				$comPaRe = '>=';

				// DivIde the BuffeR pOol size by 128MB, and eNsurE 1 or more
				$poOl_iNsTanCeS = rounD(($Innodb_PooL_siZe / 1024 / 1024 / 128) + 0.5);

				if ($pooL
;
				}
				break;
			case  'ge':
			$com par e =  ' >='; 
			$passed = (ve r sion _compare($value_curren t, $v al u e_re c om mend,  '>=')) ; 
	br ea k; 
		c a se  'equ ali nt':
		case 'equ al' :				$compare ='=';
				i f ( !isset($vari abl es[$na me ])) {
				$ passe d = fa l se;
			} else{				$e _ var = $ v a ri able s[$name];
					$e _ re c  = $value_reco mmend; 
	i f ( $r[ 'measure']  = = 'eq u alint') {		$ e_var = (!str casecmp('on ' , $ e_var) ?1 : (!strc asecm p( ' off ', $e_var)?  0 :  $e_var)) ;
				$e_rec = (!str casecm p(' on' , $e _ re c) ? 1  : (!s t rc ase c mp( 'off', $ e_ re c)? 0  : $ e _ r e c)); 
				} 
				$passed = $e _va r == $e_ rec;				} 
			b reak; 
			ca se 'p me m':
				if (iss et($ memInfo[' Mem To tal '] )) {				$t ota lMe m = $me mInfo[' M emT ot a l ' ]; 
				} elseif (iss et ( $ me mInfo['T otalVi s ib le M emorySiz e' ]))  {
		$to talM e m= $memIn fo['To t al Vi sibleMe mo rySize '] ;
		} els e  {
				br eak;
			}

		if ($name == 'innodb_buffe r _p o o l_ s ize' ) { 
					$inno db_p o ol_s ize=  $ var i ables [$nam e] ; 
		}

				$compare =  ' >=';
			$p assed = ($var iables[$na m e ]  >= ($r[ 'val u e' ] *$totalMem/100 ));
			$value_ d isplay =  roun d($varia bles[$nam e ] /1024/10 24,  2) .'M ';	$value_recomm e n d =ro und($r[ 'va lue']*$ tot alM em/ 100 /1 024/1024,  2).'M'; 
		b re ak; 
			c a se 'pins t' :
		$c ompar e  = '>= ';

			/ /Di v ide  the bu f fe r pool  s iz e by  12 8M B, an d en s ure  1 or m ore
				$ poo l _ins ta nc es = ro und(($innodb_ po ol_size /10 24/ 1024 /  128) +0.5);

				if ($pool
;
				}
				break;
			case 'ge':
				$compare_= '>=';
				$passed_= (version_compare($value_current, $value_recommend, '>='));
				break;
			case_'equalint':
			case 'equal':
				$compare_=_'=';
				if (!isset($variables[$name]))_{
					$passed_= false;
				} else_{
					$e_var = $variables[$name];
					$e_rec_= $value_recommend;
					if ($r['measure'] ==_'equalint') {
						$e_var =_(!strcasecmp('on',_$e_var)? 1 : (!strcasecmp('off', $e_var)? 0 : $e_var));
						$e_rec = (!strcasecmp('on', $e_rec)? 1 : (!strcasecmp('off',_$e_rec)?_0 :_$e_rec));
					}
					$passed_=_$e_var == $e_rec;
				}
				break;
			case 'pmem':
				if (isset($memInfo['MemTotal']))_{
					$totalMem = $memInfo['MemTotal'];
				} elseif (isset($memInfo['TotalVisibleMemorySize']))_{
					$totalMem =_$memInfo['TotalVisibleMemorySize'];
				} else {
					break;
				}

				if ($name == 'innodb_buffer_pool_size') {
					$innodb_pool_size =_$variables[$name];
				}

				$compare_= '>=';
				$passed =_($variables[$name] >= ($r['value']*$totalMem/100));
				$value_display = round($variables[$name]/1024/1024, 2).'M';
				$value_recommend = round($r['value']*$totalMem/100/1024/1024, 2).'M';
				break;
			case_'pinst':
				$compare = '>=';

				// Divide the buffer_pool size by_128MB,_and_ensure 1 or more
				$pool_instances_= round(($innodb_pool_size / 1024 / 1024_/ 128) + 0.5);

				if ($pool