automatically load all temperature include files, moved almost all of them over to internal snmp functions, PLEASE TEST

git-svn-id: http://www.observium.org/svn/observer/trunk@1325 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-07-09 22:38:46 +00:00
parent 70de9b5694
commit 5c97185974
16 changed files with 246 additions and 219 deletions
+19
View File
@@ -678,4 +678,23 @@ function isHexString($str)
return preg_match("/^[a-f0-9][a-f0-9]( [a-f0-9][a-f0-9])*$/is",trim($str));
}
# Include all .inc.php files in $dir
function include_dir($dir)
{
global $device, $config;
if ($handle = opendir($dir))
{
while (false !== ($file = readdir($handle)))
{
if (filetype($dir . '/' . $file) == 'file' && substr($file,strlen($file)-8) == '.inc.php')
{
include($dir . '/' . $file);
}
}
closedir($handle);
}
}
?>