1: <?php
2:
3: if (!defined('XOOPS_ROOT_PATH')) exit();
4:
5: class UserOnlineObject extends XoopsSimpleObject
6: {
7: var $mModule = null;
8:
9: function UserOnlineObject()
10: {
11: static $initVars;
12: if (isset($initVars)) {
13: $this->mVars = $initVars;
14: return;
15: }
16: $this->initVar('online_uid', XOBJ_DTYPE_INT, '0', true);
17: $this->initVar('online_uname', XOBJ_DTYPE_STRING, '', true, 25);
18: $this->initVar('online_updated', XOBJ_DTYPE_INT, '0', true);
19: $this->initVar('online_module', XOBJ_DTYPE_INT, '0', true);
20: $this->initVar('online_ip', XOBJ_DTYPE_STRING, '', true, 15);
21: $initVars=$this->mVars;
22: }
23:
24: function loadModule()
25: {
26: if ($this->get('online_module')) {
27: $handler =& xoops_gethandler('module');
28: $this->mModule =& $handler->get($this->get('online_module'));
29: }
30: }
31: }
32:
33: class UserOnlineHandler extends XoopsObjectGenericHandler
34: {
35: var $mTable = "online";
36: var $mPrimary = "";
37: var $mClass = "UserOnlineObject";
38: }
39:
40: ?>
41: