diff --git a/checkers/php-dbase.php b/checkers/php-dbase.php new file mode 100644 index 0000000..c3004e7 --- /dev/null +++ b/checkers/php-dbase.php @@ -0,0 +1,9 @@ +printInfo(); + diff --git a/checkers/php-redis.php b/checkers/php-redis.php index 36ee6db..0d5140f 100644 --- a/checkers/php-redis.php +++ b/checkers/php-redis.php @@ -8,7 +8,6 @@ $checker = new BaseModule( $checker->printInfo(); - $redis = new Redis(); $redis->connect('127.0.0.1', 6379); $redis->set('foo', 'bar'); diff --git a/index.php b/index.php index 4047746..cf059dc 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,5 @@ "Unknow", - 1 => "Ok", - 2 => "Error", -); - for ($i = 0; $i < count($module_list); $i++) { - if ($module_list[$i] == "") { + if ($module_list[$i] == "") echo "Error. Module doesn't deffined". $module_list[$i] .""; - } - else { - $module_name = str_replace('php-', '', $module_list[$i]); - if (!extension_loaded($module_name)) - { - echo '
'. $module_list[$i] .":"; - echo '' . 'Click ' . `
`; - } - else - { - echo ''. $module_list[$i] .":"; - echo '' . 'Click ' . `
`; - } - } + else + printModuleInfo($module_list[$i]); } -?> + + diff --git a/utils.php b/utils.php new file mode 100644 index 0000000..323eccc --- /dev/null +++ b/utils.php @@ -0,0 +1,14 @@ +'. $module_name .":"; + echo '' . 'Click ' . ``; + } + else + { + echo ''. $module_name .":"; + echo '' . 'Click ' . `
`; + } +} \ No newline at end of file