Some updates
[infodrom.org/infocon.infodrom.org] / src / future.php
1 <?php
2 function __autoload($class)
3 {
4   if (!defined('CLASS_PATH')) throw new Exception('Class path not defined');
5
6   $fname = CLASS_PATH . '/'.strtolower($class).'.class.php';
7
8   if (!file_exists($fname)) throw new Exception(sprintf('Class %s not found', $class));
9
10   require_once($fname);
11 }
12
13 #global $db;
14
15 #$dsn = sprintf('%s:host=%s;dbname=%s', DBDRIVER, DBHOST, DBNAME);
16 #$db = new Database(DBDRIVER, DBHOST, DBNAME, DBUSER, DBPASS);
17 #if (defined('MAIL_ERROR')) $db->setErrorMail(MAIL_ERROR);
18