XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
AdminBlockOnline.class.php
1<?php
11
12if (!defined('XOOPS_ROOT_PATH')) {
13 exit();
14}
15
17{
18 public function getName()
19 {
20 return 'block_online';
21 }
22
23 public function getTitle()
24 {
25 return _AD_BLOCK_ONLINE;
26 }
27
28 public function getEntryIndex()
29 {
30 return 0;
31 }
32
33 public function isEnableCache()
34 {
35 return false;
36 }
37
38 public function execute()
39 {
40 $root =& XCube_Root::getSingleton();
41 $xoopsUser =& $root->mController->mRoot->mContext->mXoopsUser;
42
43 // Language catalog
44 $root->mLanguageManager->loadBlockMessageCatalog('user');
45
46 require_once XOOPS_ROOT_PATH . '/modules/user/blocks/user_online.php';
47 // vars
48 $contents = b_user_online_show();
49 $uid = $xoopsUser->get('uid');
50 $uname = $xoopsUser->get('uname');
51
52 // XCube RenderTarget
53 $render =& $this->getRenderTarget();
54
55 // Load theme template i.e. fallback
56 $render->setAttribute('legacy_module', 'legacy');
57 $render->setAttribute('uid', $uid);
58 $render->setAttribute('uname', $uname);
59 // Attributes Smarty vars
60 $render->setAttribute('contents', $contents);
61 $render->setAttribute('blockid', $this->getName());
62 // Render Template
63 $render->setTemplateName('legacy_admin_block_onlineinfo.html');
64 // Render System
65 $renderSystem =& $root->getRenderSystem($this->getRenderSystemName());
66 // Render Block
67 $renderSystem->renderBlock($render);
68 }
69
70 public function hasResult()
71 {
72 return true;
73 }
74
75 public function &getResult()
76 {
77 $dmy = 'dummy';
78 return $dmy;
79 }
80
81 public function getRenderSystemName()
82 {
83 return 'Legacy_AdminRenderSystem';
84 }
85}
86
87