From 094d8ab88a2f126b622226701767d27b13469095 Mon Sep 17 00:00:00 2001 From: 3x0k1d <3x0k1d@gmail.com> Date: Mon, 5 May 2025 07:38:21 +0300 Subject: [PATCH] print changes --- checkers/php-dbase.php | 9 +++++++++ checkers/php-redis.php | 1 - index.php | 28 ++++++---------------------- utils.php | 14 ++++++++++++++ 4 files changed, 29 insertions(+), 23 deletions(-) create mode 100644 checkers/php-dbase.php create mode 100644 utils.php 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