Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
[Help] HabboRP CMS Error
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="BR4DLEY" data-source="post: 218238" data-attributes="member: 10966"><p>Hey, so im making a rp as you may know and when i set my CMS up it does this</p><p> </p><p><strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">Warning</span></span></span></strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">: mysql_pconnect() [</span></span></span><a href="http://localhost/function.mysql-pconnect" target="_blank"><span style="font-size: 15px"><span style="font-family: 'Times New Roman'">function.mysql-pconnect</span></span></a><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">]: Access denied for user 'ODBC'@'localhost' (using password: NO) in </span></span></span><strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">C:\xampp\htdocs\app\class.engine.php</span></span></span></strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000"> on line </span></span></span><strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">47</span></span></span></strong></p><p><strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">MySQL Engine - RevCMS: </span></span></span></strong></p><p><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000"><strong>Remote Server:</strong> The remote server seems to be offline, odd, it's being looked into.</span></span></span><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000"> Code</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000"><?php</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">namespace Revolution;</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">if(!defined('IN_INDEX')) { die('Sorry, you cannot access this file.'); }</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">class engine</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">private $initiated;</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">private $connected;</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">private $connection;</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">final public function Initiate()</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">global $_CONFIG;</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">if(!$this->initiated)</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$this->setMySQL('connect', mysql_connect);</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$this->setMySQL('pconnect', mysql_pconnect);</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$this->setMysql('select_db', mysql_select_db);</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$this->setMySQL('query', mysql_query);</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$this->setMySQL('num_rows', mysql_num_rows);</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$this->setMySQL('fetch_assoc', mysql_fetch_assoc);</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$this->setMySQL('fetch_array',mysql_fetch_array);</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$this->setMySQL('result', mysql_result);</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$this->setMySQL('free_result', mysql_free_result);</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$this->setMySQL('escape_string', mysql_real_escape_string);</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$this->initiated = true;</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$this->connect($_CONFIG['mysql']['connection_type']);</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">final public function setMySQL($key, $value)</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$this->mysql[$key] = $value;</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">/*-------------------------------Manage Connection-------------------------------------*/</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">final public function connect($type)</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">global $core, $_CONFIG;</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">if(!$this->connected)</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$this->connection = $this->mysql[$type]($_CONFIG['mysql']['localhost'], $_CONFIG['mysql']['root'], $_CONFIG['mysql']['********']);</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">if($this->connection)</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$mydatabase = $this->mysql['select_db']($_CONFIG['mysql']['hrp'], $this->connection);</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">if($mydatabase)</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$this->connected = true;</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">else</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$core->systemError('MySQL Engine', 'MySQL could not connect to database');</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">else</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$core->systemError('MySQL Engine', '<b>Remote Server:</b> The remote server seems to be offline, odd, it\'s being looked into.');</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">//$core->systemError('MySQL Engine', 'MySQL could not connect to host');</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">final public function disconnect()</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">global $core;</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">if($this->connected)</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">if($this->mysql['close'])</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$this->connected = false;</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">else</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$core->systemError('MySQL Engine', 'MySQL could not disconnect.');</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">/*-------------------------------Secure MySQL variables-------------------------------------*/</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">final public function secure($var)</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">return $this->mysql['escape_string'](stripslashes(htmlspecialchars($var)));</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">/*-------------------------------Manage MySQL queries-------------------------------------*/</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">final public function query($sql)</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">return $this->mysql['query']($sql, $this->connection) or die(mysql_error());</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">final public function num_rows($sql)</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">return $this->mysql['num_rows']($this->mysql['query']($sql, $this->connection));</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">final public function result($sql)</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">return $this->mysql['result']($this->mysql['query']($sql, $this->connection), 0);</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">final public function free_result($sql)</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">return $this->mysql['free_result']($sql);</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">final public function fetch_array($sql)</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$query = $this->mysql['query']($sql, $this->connection);</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$data = array();</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">while($row = $this->mysql['fetch_array']($query))</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">$data[] = $row;</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">return $data;</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">final public function fetch_assoc($sql)</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">{</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">return $this->mysql['fetch_assoc']($this->mysql['query']($sql, $this->connection));</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">}</span></span></span><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">Help?</span></span></span></p></blockquote><p></p>
[QUOTE="BR4DLEY, post: 218238, member: 10966"] Hey, so im making a rp as you may know and when i set my CMS up it does this [B][SIZE=4][FONT=Times New Roman][COLOR=#000000]Warning[/COLOR][/FONT][/SIZE][/B][SIZE=4][FONT=Times New Roman][COLOR=#000000]: mysql_pconnect() [[/COLOR][/FONT][/SIZE][URL='http://localhost/function.mysql-pconnect'][SIZE=4][FONT=Times New Roman]function.mysql-pconnect[/FONT][/SIZE][/URL][SIZE=4][FONT=Times New Roman][COLOR=#000000]]: Access denied for user 'ODBC'@'localhost' (using password: NO) in [/COLOR][/FONT][/SIZE][B][SIZE=4][FONT=Times New Roman][COLOR=#000000]C:\xampp\htdocs\app\class.engine.php[/COLOR][/FONT][/SIZE][/B][SIZE=4][FONT=Times New Roman][COLOR=#000000] on line [/COLOR][/FONT][/SIZE][B][SIZE=4][FONT=Times New Roman][COLOR=#000000]47[/COLOR][/FONT][/SIZE][/B] [B][SIZE=4][FONT=Times New Roman][COLOR=#000000]MySQL Engine - RevCMS: [/COLOR][/FONT][/SIZE][/B] [SIZE=4][FONT=Times New Roman][COLOR=#000000][B]Remote Server:[/B] The remote server seems to be offline, odd, it's being looked into.[/COLOR][/FONT][/SIZE][SIZE=4][FONT=Times New Roman][COLOR=#000000] Code[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]<?php[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000][/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]namespace Revolution;[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]if(!defined('IN_INDEX')) { die('Sorry, you cannot access this file.'); }[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]class engine[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]private $initiated;[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]private $connected;[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]private $connection;[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]final public function Initiate()[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]global $_CONFIG;[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]if(!$this->initiated)[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$this->setMySQL('connect', mysql_connect);[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$this->setMySQL('pconnect', mysql_pconnect);[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$this->setMysql('select_db', mysql_select_db);[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$this->setMySQL('query', mysql_query);[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$this->setMySQL('num_rows', mysql_num_rows);[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$this->setMySQL('fetch_assoc', mysql_fetch_assoc);[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$this->setMySQL('fetch_array',mysql_fetch_array);[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$this->setMySQL('result', mysql_result);[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$this->setMySQL('free_result', mysql_free_result);[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$this->setMySQL('escape_string', mysql_real_escape_string);[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$this->initiated = true;[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$this->connect($_CONFIG['mysql']['connection_type']);[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]final public function setMySQL($key, $value)[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$this->mysql[$key] = $value;[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]/*-------------------------------Manage Connection-------------------------------------*/[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]final public function connect($type)[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]global $core, $_CONFIG;[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]if(!$this->connected)[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$this->connection = $this->mysql[$type]($_CONFIG['mysql']['localhost'], $_CONFIG['mysql']['root'], $_CONFIG['mysql']['********']);[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]if($this->connection)[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$mydatabase = $this->mysql['select_db']($_CONFIG['mysql']['hrp'], $this->connection);[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]if($mydatabase)[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$this->connected = true;[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]else[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$core->systemError('MySQL Engine', 'MySQL could not connect to database');[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]else[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$core->systemError('MySQL Engine', '<b>Remote Server:</b> The remote server seems to be offline, odd, it\'s being looked into.');[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]//$core->systemError('MySQL Engine', 'MySQL could not connect to host');[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]final public function disconnect()[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]global $core;[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]if($this->connected)[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]if($this->mysql['close'])[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$this->connected = false;[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]else[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$core->systemError('MySQL Engine', 'MySQL could not disconnect.');[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]/*-------------------------------Secure MySQL variables-------------------------------------*/[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]final public function secure($var)[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]return $this->mysql['escape_string'](stripslashes(htmlspecialchars($var)));[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]/*-------------------------------Manage MySQL queries-------------------------------------*/[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]final public function query($sql)[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]return $this->mysql['query']($sql, $this->connection) or die(mysql_error());[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]final public function num_rows($sql)[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]return $this->mysql['num_rows']($this->mysql['query']($sql, $this->connection));[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]final public function result($sql)[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]return $this->mysql['result']($this->mysql['query']($sql, $this->connection), 0);[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]final public function free_result($sql)[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]return $this->mysql['free_result']($sql);[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]final public function fetch_array($sql)[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$query = $this->mysql['query']($sql, $this->connection);[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$data = array();[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]while($row = $this->mysql['fetch_array']($query))[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]$data[] = $row;[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]return $data;[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]final public function fetch_assoc($sql)[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]{[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]return $this->mysql['fetch_assoc']($this->mysql['query']($sql, $this->connection));[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]}[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000]Help?[/COLOR][/FONT][/SIZE][SIZE=3][FONT=Times New Roman][COLOR=#000000][/COLOR][/FONT][/SIZE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[Help] HabboRP CMS Error
Top