Galahad Posted April 8, 2011 Share Posted April 8, 2011 (edited) This is just a quick module that shows which players are online. EDIT - When i post code using the code tags, it automatically adds <BR/> to every line i make. Will post up shortly <?php defined('IN_EZRPG') or exit; //21lockdown //http://ezrpgproject.com class Module_OnlinePlayers extends Base_Module { public function start() { requireLogin(); $query = $this->db->execute('SELECT `username`, `id`, `level`,`last_active` FROM `<ezrpg>players` WHERE `last_active`>?', array(time() - (60*5))); $online = Array(); while ($m = $this->db->fetch($query)) { $online[] = $m; } $this->tpl->assign('members', $online); $this->tpl->display('online.tpl'); } } ?> Posted module on PasteBin.com Link - http://pastebin.com/raw.php?i=XvWZKC8k Edited April 8, 2011 by 21Lockdown Error with CODE tag Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted April 8, 2011 Share Posted April 8, 2011 Seems to work fine for me, I edited your post to put the code there. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.