* Only supported only "mysqli" DB driver.
The driver don't support $dbport in config.inc.php.
It needs to keep it a null string as ''.
* Including the UTF-8 patch.
* Ignoring E_USER_WARNING.
ini_set('display_errors', '0');
ini_set('mysql.trace_mode', '0');
error_reporting(E_ALL);
ini_set('display_errors', '0');
ini_set('mysql.trace_mode', '0');
error_reporting(E_ALL);
+ //PHP5.4 PHP Notice: Undefined variable: PHP7 STOP deprecated and Warning
+ error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED & ~E_USER_WARNING);
}
\ No newline at end of file
}
\ No newline at end of file
{
if (@mysqli_select_db($this->db_connect_id, $this->dbname))
{
{
if (@mysqli_select_db($this->db_connect_id, $this->dbname))
{
+ //Set utf-8
+ mysqli_query($this->db_connect_id, 'SET CHARACTER SET utf8');
return $this->db_connect_id;
}
}
return $this->db_connect_id;
}
}
}
function sql_escape($msg) {
}
function sql_escape($msg) {
- if (function_exists('mysql_real_escape_string')) {
- return @mysql_real_escape_string($msg, $this->db_connect_id);
+ if (function_exists('mysqli_real_escape_string')) {
+ return @mysqli_real_escape_string($this->db_connect_id, $msg);
- return mysql_escape_string($msg);
+ return mysqli_escape_string($this->db_connect_id, $msg);
{
$this->sql_transaction('rollback');
}
{
$this->sql_transaction('rollback');
}
trigger_error($message, E_USER_ERROR);
}
trigger_error($message, E_USER_ERROR);
}
}
require_once $servicedir . strtolower($name) .'.php';
}
}
require_once $servicedir . strtolower($name) .'.php';
}
- $instances[$name] = call_user_func(array($name, 'getInstance'), $db);
+ $instances[$name] = call_user_func_array(array($name, 'getInstance'), array(&$db));
}
return $instances[$name];
}
}
return $instances[$name];
}
if(!empty($host)) {
@exec("nslookup -type=$type $host", $output);
while(list($k, $line) = each($output)) {
if(!empty($host)) {
@exec("nslookup -type=$type $host", $output);
while(list($k, $line) = each($output)) {
- if(eregi("^$host", $line)) {
+ if(preg_match("/^$host/i", $line)) { //eregi("^$host", $line)
if (isset($_SESSION[$this->getSessionKey()])) {
return $_SESSION[$this->getSessionKey()];
} else if (isset($_COOKIE[$this->getCookieKey()])) {
if (isset($_SESSION[$this->getSessionKey()])) {
return $_SESSION[$this->getSessionKey()];
} else if (isset($_COOKIE[$this->getCookieKey()])) {
- $cook = split(':', $_COOKIE[$this->getCookieKey()]);
+ $cook = explode(':', $_COOKIE[$this->getCookieKey()]); //split(':', $_COOKIE[$this->getCookieKey()]);
//cookie looks like this: 'id:md5(username+password)'
$query = 'SELECT * FROM '. $this->getTableName() .
' WHERE MD5(CONCAT('.$this->getFieldName('username') .
//cookie looks like this: 'id:md5(username+password)'
$query = 'SELECT * FROM '. $this->getTableName() .
' WHERE MD5(CONCAT('.$this->getFieldName('username') .