"; while (false !== ($file = readdir($handle))) { if (is_dir("$dir/$file") && $file != "." && $file != "..") { $configfile = "$dir/$file/configuration.php"; if (is_file($configfile)) { $hasdir = true; $iframe_width = 100; $iframe_height = 100; $configfilecontent = file_get_contents($configfile); $match = preg_match("/define\s*\(\s*['\"]THUMBWIDTH['\"]\s*,\s*['\"](\d*)['\"]/i", $configfilecontent, $matches); if ($match != 0) $iframe_width = $matches[1]; $match = preg_match("/define\s*\(\s*['\"]THUMBHEIGHT['\"]\s*,\s*['\"](\d*)['\"]/i", $configfilecontent, $matches); if ($match != 0) $iframe_height = $matches[1]; $url = "$rel_path/$file/"; $url_iframe = $url . "snapshot.php?title=no&menu=no&countdown=no&thumb=yes&clickurl=" . urlencode($url); echo "
$file
"; $count++; } } } echo "\n"; } if (!$hasdir) { echo "No device found"; } ?>