From 534c0058a2e04fc9e9588189a7c9b87756c3df61 Mon Sep 17 00:00:00 2001 From: deva Date: Sat, 11 Oct 2008 13:57:06 +0000 Subject: Added basis admin diagnostics page... to be expanded later. --- forum/htdocs/index.php | 13 ++++++--- forum/utils/diagnostics.php | 64 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 forum/utils/diagnostics.php (limited to 'forum') diff --git a/forum/htdocs/index.php b/forum/htdocs/index.php index d4547e9..99169ab 100644 --- a/forum/htdocs/index.php +++ b/forum/htdocs/index.php @@ -38,10 +38,13 @@ include_once($UTIL_DIR . "/clientinfo.php"); + Profileuid == 0) { +?> Diagnostics "; + if($result) $str .= $yes; + else $str .= $no; + $str .= ""; + return $str; +} + +function testFile($file, $readable, $writeable, $executable) +{ + echo ""; + echo "" . $file . ""; + echo "" . testResult(file_exists($file), true) . ""; + echo "" . testResult(is_file($file), true, "file", "not file") . ""; + echo "" . testResult(is_readable($file), $readable) . ""; + echo "" . testResult(is_writeable($file), $writeable) . ""; + echo "" . testResult(is_executable($file), $executable) . ""; + echo "\n"; +} + +function testLink($link, $readable, $writeable, $executable) +{ + echo ""; + echo "" . $link . ""; + echo "" . testResult(file_exists($link), true) . ""; + echo "" . testResult(is_link($link), true, "link", "not link") . ""; + echo "" . testResult(is_readable($link), $readable) . ""; + echo "" . testResult(is_writeable($link), $writeable) . ""; + echo "" . testResult(is_executable($link), $executable) . ""; + echo "\n"; +} + +function testDir($dir, $readable, $writeable, $executable) +{ + echo ""; + echo "" . $dir . ""; + echo "" . testResult(file_exists($dir), true) . ""; + echo "" . testResult(is_dir($dir), true, "dir", "not dir") . ""; + echo "" . testResult(is_readable($dir), $readable) . ""; + echo "" . testResult(is_writeable($dir), $writeable) . ""; + echo "" . testResult(is_executable($dir), $executable) . ""; + echo "\n"; +} + +?> + + + +
NameExistsTypeReadableWriteableExecutable
\ No newline at end of file -- cgit v1.2.3