コード例 #1
0
ファイル: article.php プロジェクト: severnaya99/Sg-2010
$myts =& MyTextSanitizer::getInstance();
$article = new WfsArticle($item_id);
if ($article->ishtml == '2') {
    $xoopsOption['template_main'] = 'wfsection_htmlart.html';
} else {
    $xoopsOption['template_main'] = 'wfsection_article.html';
}
include_once XOOPS_ROOT_PATH . "/header.php";
//$article = new WfsArticle($item_id);
if (checkAccess($article->groupid)) {
    if (isset($HTTP_GET_VARS['page'])) {
        $page = intval($HTTP_GET_VARS['page']);
    } else {
        $page = 0;
        if (!($xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid()))) {
            $article->updateCounter();
        }
    }
    $articletag = array();
    if ($article->uid > 0) {
        $user = new xoopsUser($article->uid);
        if ($wfsConfig['realname'] && $user->getvar('name') != '') {
            $articletag['poster'] = $user->getvar('name');
        } else {
            $articletag['poster'] = $user->getvar('uname');
        }
        $articletag['poster'] = "<a href='" . XOOPS_URL . "/userinfo.php?uid=" . $user->getVar('uid') . "'>" . $articletag['poster'] . "</a>";
    } else {
        $articletag['poster'] = $xoopsConfig['anonymous'];
    }
    // $datetime