30 lines
588 B
PHP
30 lines
588 B
PHP
<?php
|
|
|
|
define('BASEDIR', '/var/www/bridge/');
|
|
|
|
define('DB_HOST', 'localhost');
|
|
define('DB_USER', 'bridge');
|
|
define('DB_PASS', 'bridge');
|
|
define('DB_NAME', 'bridge');
|
|
|
|
define('RRDTOOL', '/usr/bin/rrdtool');
|
|
define('RRDPATH', '/var/lib/rrd');
|
|
|
|
function __autoload($classname)
|
|
{
|
|
$filename = $classname.'.class.php';
|
|
|
|
if (is_readable(BASEDIR.'include/'.$filename)) {
|
|
require_once(BASEDIR.'include/'.$filename);
|
|
|
|
} else if (is_readable(BASEDIR.'include/db_'.$filename)) {
|
|
require_once(BASEDIR.'include/db_'.$filename);
|
|
|
|
} else {
|
|
echo "Missing Class: '$classname'";
|
|
die();
|
|
}
|
|
}
|
|
|
|
?>
|