コード例 #1
0
ファイル: link.php プロジェクト: severnaya99/Sg-2010
        }
        break;
    case 'dellink':
        if (isset($_POST['linkids'])) {
            $errors = 0;
            foreach ($_POST['linkids'] as $linkid) {
                if (!$article->deleteLink($linkid)) {
                    $errors = 1;
                }
            }
            if ($errors == 1) {
                $xoopsTpl->assign('message', $article->renderErrors());
            }
        } else {
            $xoopsTpl->assign('message', "No link selected");
        }
        break;
}
$existing_links = $article->getLinks();
include 'include/searchform.php';
$search_form->assign($xoopsTpl);
if (count($existing_links) > 0) {
    $xoopsTpl->assign('related', $existing_links);
}
$xoopsTpl->assign('breadcrumb', $article->getPath(true) . " > " . _AMS_NW_MANAGELINK);
$xoopsTpl->assign('story', $article->toArray());
$xoopsTpl->assign('lang_on', _ON);
$xoopsTpl->assign('lang_postedby', _POSTEDBY);
$xoopsTpl->assign('lang_reads', _READS);
$xoopsTpl->assign('xoops_pagetitle', $myts->htmlSpecialChars($xoopsModule->name()) . ' - ' . $myts->htmlSpecialChars($article->title()));
include XOOPS_ROOT_PATH . '/footer.php';
コード例 #2
0
ファイル: article.php プロジェクト: severnaya99/Sg-2010
$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);
$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);