// htmlPath: path to the html file to be displayed // if there is a .css file in the same directory, it will be used // in the styling of the page $htmlPath = $_GET['path']; if ($htmlPath == null) { $htmlPath = "./content/Home/home.html"; } $dirMarker = strrpos($htmlPath, "/"); $dir = substr($htmlPath, 0, $dirMarker); if ($handle = opendir($dir)) { while(false !== ($file = readdir($handle))) { if (false != (strpos($file, ".css"))) { if (false == (strpos($file, "~"))) { $cssFile = $file; } } // if (false != (stripos($file, "header"))) { if(false != (strpos($file, ".jpg"))) { $topBannerFile = $file; } // } } } $cssPath = $dir."/".$cssFile; $headerPath = $dir."/".$topBannerFile; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "