'rounded', 'id' => 'section-box')); echo $module; } function login() { global $mainframe; // Check for request forgeries JRequest::checkToken('request') or jexit( 'Invalid Token' ); $credentials = array(); $credentials['username'] = JRequest::getVar('username', '', 'method', 'username'); $credentials['password'] = JRequest::getVar('passwd', '', 'post', 'string', JREQUEST_ALLOWRAW); $result = $mainframe->login($credentials); if (!JError::isError($result)) { $mainframe->redirect('index.php'); } LoginController::display(); } function logout() { global $mainframe; $result = $mainframe->logout(); if (!JError::isError($result)) { $mainframe->redirect('index.php?option=com_login'); } LoginController::display(); } }