|
/* SPECIALIZED FILE FOR USE AT ROOT LEVEL
Revised 1/8/03 by Dan Chick, Byron Bignell.
Ported to PHP 2/22/03 by Lorraine Spiess.
For latest release visit http://sourceforge.net/projects/blackboxsystem/ */
function php_blackbox($tool,$action=NULL) {
if (empty($tool)) {$tool="";};
if (empty($action)) {$action="";};
if (empty($action) && Strchr($tool, ".")) {
$action = Substr(strstr($tool, "."),1);
$tool = Substr($tool, 0, strpos($tool,"."));
}
if (Strchr($action, ".")){
$extension = "";
} else {
$extension = ".php";
}
$dir = "./blackbox/";
$file = $dir.$tool."/".$action.$extension;
error_reporting(0); // allows us to customize error message;
if (file_exists($file)){
if (!include($file)) {
echo "Couldn't include ".$file;
// include("./default.htm");
}
} else {
echo "Couldn't locate ".$file;
// include("./default.htm");
}
}
| |
|