mActionForm = & new Xoopensim_ClPresenceForm(); if (!$this->mActionForm->isAdmin) { $controller->executeRedirect(CMS_MODULE_URL, 2, _AM_XPNSM_ACCESS_FORBIDDEN); } $this->action_url = CMS_MODULE_URL.'/admin/index.php?action=clpresence'; } function execute() { if (xoops_getenv('REQUEST_METHOD')=='POST') { $this->mActionForm->prepare(); $this->mActionForm->fetch(); $this->mActionForm->validate(); if (!$this->mActionForm->hasError()) { $quest = $this->mActionForm->get('quest'); if ($quest=='yes') { $ret = opensim_check_db(); if (!$ret['grid_status']) { $this->mActionForm->addErrorMessage(_MD_XPNSM_DB_CONNECT_ERROR); return; } opensim_clear_login_table(); $this->cleared = true; } } } } function executeView($render) { $root = & XCube_Root::getSingleton(); $grid_name = $root->mContext->mModuleConfig['grid_name']; $admin_menu = $root->mContext->mModule->getAdminMenu(); $render->setTemplateName(CMS_MODULE_PATH.'/templates/xoopensim_clpresence.html'); $render->setAttribute('admin_menu', $admin_menu); $render->setAttribute('grid_name', $grid_name); $render->setAttribute('cleared', $this->cleared); $render->setAttribute('action_url', $this->action_url); $render->setAttribute('actionForm', $this->mActionForm); } } ?>