<?php
/*=======================================================================
| UberCMS - Meth0d.
| #######################################################################
| UberCMS Instalador criado por UDontKnow. Por favor não retire os créditos.
| UberCMS Install created by UDontKnow. Please do not remove the credits.
|
or udontknow[MENTION=21474]hot[/MENTION]mail.com.br
\======================================================================*/
class MySQL
{
private $connected = false;
private $hostname = "localhost";
private $username = "root";
private $password = "cmqqmccmq";
private $database = "php";
private $link;
public function MySQL($host, $user, $pass, $db)
{
$this->connected = false;
$this->hostname = $host;
$this->username = $user;
$this->password = $pass;
$this->database = $db;
}
public function IsConnected()
{
if ($this->connected)
{
return true;
}
return false;
}
public function Connect()
{
$this->link = mysql_connect($this->hostname, $this->username, $this->password) or $this->error(mysql_error());
mysql_select_db($this->database, $this->link) or $this->error(mysql_error());
$this->connected = true;
}
public function Disconnect()
{
if($this->connected)
{
@
mYsQL_close($this->link) or $this->error("could not close conn");
$this->connected = false;
}
}
public function DoQuery($query)
{
$resultset = @
mYsQL_query($query, $this->link) or $this->error(mysql_error());
return $resultset;
}
public function Evaluate($resultset)
{
return @
mYsQL_result($resultset, 0);
}
public function Error($errorString)
{
global $core;
$core->systemError('Erro no Banco de Dados. ', $errorString);
}
public function __destruct()
{
$this->disconnect();
}
}
?>