Location: PHPKode > projects > RAMUI WEBBLOG > fw_blog/include/connection.php
Copyright (c) 2008 http://ramui.com. All right reserved.
This product is protected by copyright and distributed under licenses restricting copying, distribution. Permission is granted to the public to download and use this script provided that this Notice and any statement of authorship are reproduced in every page on all copies of the script.
class connection
private $con;
protected $prefix;
private $site;
public $error;
function __construct($root)
        include $root."database/config.php";
        if(!($this->con)){$this->error="Database connection error";return;}
        if(!(@mysql_select_db($dbname))){$this->error="Database not found!";return;}
        $query  = "SELECT* FROM ".$this->prefix."settings";
        $result = @mysql_query($query);
        if(!$result){$this->error="No site information!";return;}
        $this->site = @mysql_fetch_array($result, MYSQL_ASSOC);
        $selfurl = str_replace("www.","", strtolower(getenv("HTTP_HOST")));
public function get_prefix(){return $this->prefix;}
public function siteinf($param=''){return((empty($param))? $this->site : $this->site[$param]);}
Return current item: RAMUI WEBBLOG