コード例 #1
0
ファイル: article.php プロジェクト: severnaya99/Sg-2010
$xoopsTpl->assign('showcomments', $showcomments);
$xoopsTpl->assign('allow_rating', $allow_rating);
$xoopsTpl->assign('lang_printerpage', _AMS_NW_PRINTERFRIENDLY);
$xoopsTpl->assign('lang_sendstory', _AMS_NW_SENDSTORY);
$xoopsTpl->assign('lang_on', _AMS_NW_PUBLISHED_DATE);
$xoopsTpl->assign('lang_postedby', _AMS_NW_POSTEDBY);
$xoopsTpl->assign('lang_reads', _AMS_NW_READS);
if ($article->friendlyurl_enable != 1) {
    $xoopsTpl->assign('mail_link', 'mailto:?subject=' . sprintf(_AMS_NW_INTARTICLE, $xoopsConfig['sitename']) . '&body=' . sprintf(_AMS_NW_INTARTFOUND, $xoopsConfig['sitename']) . ':  ' . XOOPS_URL . '/modules/AMS/article.php?storyid=' . $article->storyid());
} else {
    $xoopsTpl->assign('mail_link', 'mailto:?subject=' . sprintf(_AMS_NW_INTARTICLE, $xoopsConfig['sitename']) . '&body=' . sprintf(_AMS_NW_INTARTFOUND, $xoopsConfig['sitename']) . ':  ' . $article->friendlyurl);
}
$xoopsTpl->assign('related', $article->getLinks());
$xoopsTpl->assign('page', $storypage);
$xoopsTpl->assign('admin', $admin);
$xoopsTpl->assign('hasversions', $article->hasVersions());
$xoopsTpl->assign('lang_attached_files', _AMS_NW_ATTACHEDFILES);
$sfiles = new sFiles();
$filesarr = array();
$newsfiles = array();
$filesarr = $sfiles->getAllbyStory($storyid);
$filescount = count($filesarr);
$xoopsTpl->assign('attached_files_count', $filescount);
if ($filescount > 0) {
    foreach ($filesarr as $onefile) {
        $newsfiles[] = array('file_id' => $onefile->getFileid(), 'visitlink' => XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/visit.php?fileid=' . $onefile->getFileid(), 'file_realname' => $onefile->getFileRealName(), 'file_attacheddate' => formatTimestamp($onefile->getDate()), 'file_mimetype' => $onefile->getMimetype(), 'file_downloadname' => XOOPS_UPLOAD_URL . '/' . $onefile->getDownloadname());
    }
    $xoopsTpl->assign('attached_files', $newsfiles);
}
$xoopsTpl->assign('xoops_pagetitle', $myts->htmlSpecialChars($xoopsModule->name()) . ' - ' . $myts->htmlSpecialChars($article->topic_title()) . ' - ' . $myts->htmlSpecialChars($article->title()));
$xoopsTpl->assign('breadcrumb', $article->getPath());