Jump to content
MakeWebGames

Swift-Fusion || Fusion

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Everything posted by Swift-Fusion || Fusion

  1. 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>)
  2. To dominion: I am too busy to be pissing about with a pile of shite. So no, i wouldnt take any work on.
  3. 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.
  4. Sniko: Some serves disable the use of the php short tag
  5. You cannot stop people seeing a white screen, unless you used JS to manipulate through pages
  6. And why would you even need a second cron :S
  7. One of the best ways to eat up your bandwidth i seen.
  8. 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.
  9. I ment pauls story and makewebgames story.
  10. Stab in the dark much? Ok, two things here: Has anyone heard Georges full story. And why is everyone falling for pauls little story -.-
  11. Hmm, i may just do that for you Sniko
  12. Why exacally fo you need an encrypter. It makes it much harder to edit, and i belive its slower loading aswell.
  13. Two options here. With money: Buy Cronus' mod, or Buy Daves' mod Without money: Learn to code, or don't own a game :)
  14. To Hitman 17: No, unless you edit the code To Scott--: Yes, it should.
  15. :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.
  16. 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.
  17. Well, if you need any help, drop me a line on MSN. [email protected]
  18. Ok, ive noticed a theme with you. You love JS! Wouldnt IM be the same as a chat. Instant messaging = chat
  19. 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.
  20. 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
  21. 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); ?>
  22. I know how to write a .htaccess file and what it does etc. Just wanted to know if it even matters.
  23. 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
  24. Thanks for spotting that. Edited and changed.
  25. I normally add a new tab every line, for me it's easier to read.
×
×
  • Create New...