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] UberCMS Error [Help]
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="Zvo" data-source="post: 277234" data-attributes="member: 40984"><p><?php</p><p>/*=======================================================================</p><p>| UberCMS - Advanced Website and Content Management System for uberEmu</p><p>| #######################################################################</p><p>| Copyright (c) 2010, Roy 'Meth0d'</p><p>| <a href="http://www.meth0d.org" target="_blank">http://www.meth0d.org</a></p><p>| #######################################################################</p><p>| This program is free software: you can redistribute it and/or modify</p><p>| it under the terms of the GNU General Public License as published by</p><p>| the Free Software Foundation, either version 3 of the License, or</p><p>| (at your option) any later version.</p><p>| #######################################################################</p><p>| This program is distributed in the hope that it will be useful,</p><p>| but WITHOUT ANY WARRANTY; without even the implied warranty of</p><p>| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</p><p>| GNU General Public License for more details.</p><p>\======================================================================*/</p><p></p><p>class MySQL</p><p>{</p><p> private $connected = false;</p><p> private $hostname = "localhost";</p><p> private $username = "uber_uberdb";</p><p> private $password = "F5eWRuca";</p><p> private $database = "uber_db";</p><p> private $link;</p><p> </p><p> public function MySQL($host, $user, $pass, $db)</p><p> {</p><p> $this->connected = false; </p><p> $this->hostname = $host;</p><p> $this->username = $user;</p><p> $this->password = $pass;</p><p> $this->database = $db;</p><p> }</p><p> </p><p> public function IsConnected()</p><p> {</p><p> if ($this->connected)</p><p> {</p><p> return true;</p><p> }</p><p> </p><p> return false;</p><p> }</p><p></p><p> public function Connect()</p><p> {</p><p> $this->link = @mysql_connect($this->hostname, $this->username, $this->password) or $this->error(mysql_error());</p><p> @mysql_select_db($this->database, $this->link) or $this->error(mysql_error());</p><p> </p><p> $this->connected = true;</p><p> }</p><p> </p><p> public function Disconnect()</p><p> {</p><p> if($this->connected)</p><p> {</p><p> @mysql_close($this->link) or $this->error("could not close conn");</p><p> $this->connected = false;</p><p> }</p><p> }</p><p> </p><p> public function DoQuery($query)</p><p> {</p><p> $resultset = @mysql_query($query, $this->link) or $this->error(mysql_error());</p><p> return $resultset;</p><p> }</p><p> </p><p> public function Evaluate($resultset)</p><p> {</p><p> return @mysql_result($resultset, 0);</p><p> }</p><p> </p><p> public function Error($errorString)</p><p> {</p><p> global $core;</p><p> </p><p> $core->systemError('Database Error', $errorString);</p><p> }</p><p> </p><p> public function __destruct()</p><p> {</p><p> $this->disconnect();</p><p> }</p><p>}</p><p></p><p>?></p></blockquote><p></p>
[QUOTE="Zvo, post: 277234, member: 40984"] <?php /*======================================================================= | UberCMS - Advanced Website and Content Management System for uberEmu | ####################################################################### | Copyright (c) 2010, Roy 'Meth0d' | [url]http://www.meth0d.org[/url] | ####################################################################### | This program is free software: you can redistribute it and/or modify | it under the terms of the GNU General Public License as published by | the Free Software Foundation, either version 3 of the License, or | (at your option) any later version. | ####################################################################### | This program is distributed in the hope that it will be useful, | but WITHOUT ANY WARRANTY; without even the implied warranty of | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | GNU General Public License for more details. \======================================================================*/ class MySQL { private $connected = false; private $hostname = "localhost"; private $username = "uber_uberdb"; private $password = "F5eWRuca"; private $database = "uber_db"; 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('Database Error', $errorString); } public function __destruct() { $this->disconnect(); } } ?> [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[Help] UberCMS Error [Help]
Top