* Read the config file if it exists */ if (file_exists('config.php')) { require_once 'config.php'; } /* * Parse incoming args */ parse_str($_SERVER['QUERY_STRING']); /* * Create our primary class, and read the working directory */ $pm = new PageMaker($rootdir, $template, $style); /* * $d is the relative directory we'll append to the rootdir */ $pm->read_directory($d); if (isset($f)) { $pm->process_file($f); } else { } /* * Make sure we have a template before we call one. */ if (!file_exists($template)) { die("We are homeless, gimme shelter, missing template " . $template); } include $template; ?>