<?php
/**
* Mudder系统基类
* @author moufer<moufer@163.com>
* @copyright modoer.com
* @version $Id base.class.php 1 2008-3-26 20:56 $
*/
!defined('IN_MUDDER') && exit('Access Denied');

class mud_Base {
	/**
	 * 错误信息
	 *
	 * @var string
	 */
    var $errmsg = '';
    /**
     * Unix时间戳
     *
     * @var integer
     */
    var $timestamp = 0;

    function __construct() {
    	global $timestamp;
    	$this->timestamp = $timestamp;
    }

    function mud_Base() {
        $this->__construct();
    }

    /**
     * 显示全局错误
     *
     * @param string $msg
     */
    function Halt($msg) {
        die($msg);
    }

    function Clear() {
    }

}

class Base_db extends mud_Base {

	/**
	 * DB库变量
	 *
	 * @var Db_class
	 */
    var $db     = NULL;
    /**
     * 数据表名称前缀
     *
     * @var string
     */
    var $dbpre  = 'mudder_';

    function __construct() {
        global $db,$dbpre;
        parent::__construct();
        $this->db = &$db;
        $this->dbpre = &$dbpre;
    }

    function Base_db(){
    	$this->__construct();
    }
}
?>
