20 return 'block_overview';
25 return _AD_BLOCK_OVERVIEW;
38 public function execute()
40 $root =& XCube_Root::getSingleton();
42 $root->mLanguageManager->loadBlockMessageCatalog(
'legacy');
44 $root->mLanguageManager->loadModuleAdminMessageCatalog(
'user');
46 $render =& $this->getRenderTarget();
48 $render->setAttribute(
'legacy_module',
'legacy');
51 $moduleHandler =& xoops_gethandler(
'module');
53 $module_total = $moduleHandler->getCount();
54 $active_module_total = $moduleHandler->getCount(
new Criteria(
'isactive', 1));
55 $render->setAttribute(
'ModuleTotal', $module_total);
56 $render->setAttribute(
'activeModuleTotal', $active_module_total);
57 $render->setAttribute(
'inactiveModuleTotal', $module_total - $active_module_total);
60 $block_handler =& xoops_getmodulehandler(
'newblocks',
'legacy');
61 $block_total = $block_handler->getCount();
62 $inactive_block_total = $block_handler->getCount(
new Criteria(
'isactive', 0));
63 $active_block_total = $block_total-$inactive_block_total;
64 $render->setAttribute(
'BlockTotal', $block_total);
65 $render->setAttribute(
'ActiveBlockTotal', $active_block_total);
66 $render->setAttribute(
'InactiveBlockTotal', $inactive_block_total);
69 $active_installed_criteria->add(
new Criteria(
'isactive', 1));
70 $active_installed_block_total = $block_handler->getCount($active_installed_criteria);
71 $render->setAttribute(
'ActiveInstalledBlockTotal', $active_installed_block_total);
72 $render->setAttribute(
'ActiveUninstalledBlockTotal', $active_block_total - $active_installed_block_total);
75 $inactive_installed_criteria->add(
new Criteria(
'isactive', 0));
76 $inactive_installed_block_total = $block_handler->getCount($inactive_installed_criteria);
77 $render->setAttribute(
'InactiveInstalledBlockTotal', $inactive_installed_block_total);
78 $render->setAttribute(
'InactiveUninstalledBlockTotal', $inactive_block_total - $inactive_installed_block_total);
81 $member_handler =& xoops_getmodulehandler(
'users',
'user');
82 $active_total = $member_handler->getCount(
new Criteria(
'level', 0,
'>'));
83 $inactive_total = $member_handler->getCount(
new Criteria(
'level', 0));
84 $render->setAttribute(
'activeUserTotal', $active_total);
85 $render->setAttribute(
'inactiveUserTotal', $inactive_total);
86 $render->setAttribute(
'UserTotal', $active_total+$inactive_total);
88 $render->setAttribute(
'blockid', $this->
getName());
90 $render->setTemplateName(
'legacy_admin_block_overview.html');
95 $renderSystem->renderBlock($render);
98 public function hasResult()
103 public function &getResult()
111 return 'Legacy_AdminRenderSystem';