if (!$gperm_handler->checkRight("ams_submit", $article->topicid(), $groups, $xoopsModule->getVar('mid'))) { redirect_header(XOOPS_URL . '/modules/AMS/index.php', 3, _NOPERM); exit; } } if (!$gperm_handler->checkRight("ams_audience", $article->audienceid, $groups, $xoopsModule->getVar('mid'))) { redirect_header(XOOPS_URL . '/modules/AMS/index.php', 3, sprintf(_AMS_NW_NOTALLOWEDAUDIENCE, $article->audience)); exit; } } else { $admin = true; } $storypage = isset($_GET['page']) ? intval($_GET['page']) : 0; // update counter only when viewing top page if (empty($_GET['com_id']) && $storypage == 0) { $article->updateCounter(); } if ($admin) { $xoopsConfig['module_cache'][$xoopsModule->getVar('mid')] = 0; } $xoopsOption['template_main'] = 'ams_article.html'; include_once XOOPS_ROOT_PATH . '/header.php'; $xoopsTpl->assign('story', $article->toArray($admin, true, $storypage)); $artbanner = $article->getBanner(); if ($artbanner == "") { $artbanner = " "; } $xoopsTpl->assign('articlebanner', $myts->displayTarea($artbanner, 1)); $showcomments = XOOPS_COMMENT_APPROVENONE != $xoopsModuleConfig['com_rule'] ? 1 : 0; $allow_rating = $xoopsUser || $xoopsModuleConfig['anonymous_vote'] ? 1 : 0; $xoopsTpl->assign('showcomments', $showcomments);