Swift-Fusion || Fusion
Members-
Posts
29 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Swift-Fusion || Fusion
-
Danny has asked me to post this: Events (<span id='events'>0</span>) Mailbox (<span id='mail'>0</span>) Hospital (<span id='hospital'>0</span>) Jail (<span id='jail'>0</span>)
-
Paypal donation system not working
Swift-Fusion || Fusion replied to katalin's topic in Modification Support
To dominion: I am too busy to be pissing about with a pile of shite. So no, i wouldnt take any work on. -
Paypal donation system not working
Swift-Fusion || Fusion replied to katalin's topic in Modification Support
Heres what to do; find the mcc files either pay someone to secure them or pay someone to re-code them or pay someone to make you a better engine anything that removes all of the shit mcc code would be the best option, therefore one or two. -
Sniko: Some serves disable the use of the php short tag
-
You cannot stop people seeing a white screen, unless you used JS to manipulate through pages
-
Paul, i ment the fact that you, yes you, were infact MakeWebGames, sure, these n00bs have been convinced, your acting like you wernt in the account.
-
I ment pauls story and makewebgames story.
-
Stab in the dark much? Ok, two things here: Has anyone heard Georges full story. And why is everyone falling for pauls little story -.-
-
Hospital/Jail Count Instant Update
Swift-Fusion || Fusion replied to VitalEnd's topic in Free Modifications
Hmm, i may just do that for you Sniko -
Need help with a secure PHP locking and encrypter.
Swift-Fusion || Fusion replied to kcmajor36's topic in PHP
Why exacally fo you need an encrypter. It makes it much harder to edit, and i belive its slower loading aswell. -
mccode-v2 Paypal/donation package creation.
Swift-Fusion || Fusion replied to Gungneer's topic in Free Modifications
To Hitman 17: No, unless you edit the code To Scott--: Yes, it should. -
Whats the best capatch?
Swift-Fusion || Fusion replied to DELETE-ME-NOW-'s topic in General Discussion
:o You made that Paul. Ive been using the excact same one, I found it on the internet after searching for a basic number captcha. -
Whats the best capatch?
Swift-Fusion || Fusion replied to DELETE-ME-NOW-'s topic in General Discussion
Damn, have you checked out the API, it tells you where to place everything. Its simple, if you cant do this, what chance do you have at a successfull game. -
[Placeholder] JS/Ajax/PHP Chat + IM
Swift-Fusion || Fusion replied to Aurora078's topic in General Discussion
Well, if you need any help, drop me a line on MSN. [email protected] -
[Placeholder] JS/Ajax/PHP Chat + IM
Swift-Fusion || Fusion replied to Aurora078's topic in General Discussion
Ok, ive noticed a theme with you. You love JS! Wouldnt IM be the same as a chat. Instant messaging = chat -
May i suggest using a .htaccess edit, to make people go from domain.tld to http://www.domain.tld :) This can easily be found on google.
-
PHP 5 MySql class system.
Swift-Fusion || Fusion replied to Swift-Fusion || Fusion's topic in Tutorials
Thats for that advice, Ill look into updating the update function, but as this was for my own needs, i secured anything in the file, then executed it. Also, ill look into MySQLi. Thanks to both of you -
Okay; Today i needed a class file that would save me time while doing everyting i needed. Its MySql only, and has examples for most function. Replies would be great, ways to improve etc would also be appricated. When inlcuded into a file, it doesnt need to be set up like McCodes, just use $db->blahh etc........ Nothing has been tested, any errors, I'll fix. <?php /* Copywrite goes to Fusion Writen by Fusion Please keep this, it doesnt affect the code so why not? */ class details { const DB_HOST = 'localhost', DB_USER = 'username', DB_PASS = 'password', DB_NAME = 'database'; } $details = new details; class database { var $connection_identifier; var $numb_queries; var $last_query; public function __construct($host, $user, $pass, $db) { $this->connection_identifier = mysql_connect($host, $user, $pass, 1) OR DIE('Error: Server connection failed.'); mysql_select_db($db) OR DIE('Error: Database connection failed.'); return $this->connection_identifier; } public function change_database($newdb) { return mysql_select_db($newdb); } public function execute($input) { $this->numb_queries++; $query = str_replace('<prefix>', '`'. $details->DB_NAME .'`.', $input); $this->last_query = mysql_query($query, $this->connection_identifier) OR $this->debug($query); return $this->last_query; } /* $userid = 4 Example: $db->select('money', 'members', '`userid` = '. $userid .''); Output: SELECT `money` FROM <prefix>`members` WHERE (`userid` = 4); */ public function select($select, $table, $where) { $query = $this->execute("SELECT `". $select."` FROM <prefix>`". $table ."` WHERE (". $where .");"); return ($this->num_rows($query)) ? $this->fetch($query, 'single') : 'N/A'; } /* $deluserid = 4 Example: $db->delete('members', '`userid` = '. $deluserid .''); Output: DELETE FROM <prefix>`members` WHERE (`userid` = 4); */ public function delete($table, $where) { $query = "DELETE FROM <prefix>`". $table ."` WHERE (". $where .");"; return $this->execute($query); } /* $_POST['username'] = 'bob' $_POST['email'] = '[email protected]' $_POST['password'] = 'bobloves666' Example: $db->insert('members', '`username`, `email`, `password`', '\''. $_POST['username'] .'\', \''. $_POST['email'] .'\', \''. $_POST['password'] .'\''); Output: INSERT INTO <prefix>`members` (`username`, `email`, `password`) VALUES ('bob', '[email protected]', 'bobloves666'); */ public function insert($table, $columns, $values) { $columns = !empty($columns) ? '('. $columns .')' : ''; $query = "INSERT INTO <prefix>`". $table ."` ". $columns ." VALUES (". $values .");"; return $this->execure($query); } /* $userid = 4 Example: $db->update('members', 'money', 'money', '+', '666', '`userid` = '. $userid .''); Output: UPDATE <prefix>`members` SET `money` = `money` + 666 WHERE (`userid` = 4); */ public function update($table, $what, $equal, $aORm, $value, $where) { $query = "UPDATE <prefix>`". $table ."` SET `". $what ."` = `". $equal ."` ". $aORm ." ". $value ." WHERE (". $where .");"; return $this->execute($query); } /* Example: $db->truncate('members'); Output: TRUNCATE TABLE <prefix>`members`; */ public function truncate($table) { $query = "TRUNCATE TABLE <prefix>`". $table ."`;"; return $this->execute($query); } /* Fetch row example: $db->fetch($db->execute('somequery'), 'row'); Fetch array example: $db->fetch($db->execute('somequery'), 'array'); Fetch single example: $db->fetch($db->execute('somequery'), 'single'); */ public function fetch($input, $fetchwhat = 'row') { if($fetchwhat == 'row') { return mysql_fetch_assoc($input); } else if($fetchwhat == 'array') { return mysql_fetch_array($input); } else if($fetchwhat == 'single') { return mysql_result($input, 0, 0); } } /* Fetch_object example: $db->object('somequery'); */ public function object($input) { $input = (empty($input)) ? $this->last_query : $input; $execute = $this->execute($input); $object = mysql_fetch_object($execute); mysql_free_result($object); return $object; } private function debug($input) { exit('<p style="margin: 2px;">MySQL Error: '. mysql_error .' Query was: '. $input .'</p>'); } public function count() { return $this->numb_queries; } public function last_insert() { return mysql_insert_id(); } public function escape_string($input) { return mysql_real_escape_string($input); } public function close() { return mysql_close(); } } $db = new database($details->DB_HOST, $details->DB_USER, $details->DB_PASS, $details->DB_NAME); unset($details); ?>
-
Does 'nice URL's' really matter?
Swift-Fusion || Fusion replied to Swift-Fusion || Fusion's topic in General
I know how to write a .htaccess file and what it does etc. Just wanted to know if it even matters. -
Ok, just wondering do you really this 'nice URL's' matter. e.g. http://www.domain.com/nice/url/page I mean; sure developers notice it, but do game players notice it? And does it even matter? Regards
-
Updated Secure lotto
Swift-Fusion || Fusion replied to Swift-Fusion || Fusion's topic in Free Modifications
Thanks for spotting that. Edited and changed. -
Updated Secure lotto
Swift-Fusion || Fusion replied to Swift-Fusion || Fusion's topic in Free Modifications
I normally add a new tab every line, for me it's easier to read.