Exemplo n.º 1
0
if (!Bulletin::isPublishedExists($mydirname, $storyid)) {
    redirect_header($mydirurl . '/index.php', 2, _MD_NOSTORY);
    exit;
}
require_once XOOPS_ROOT_PATH . '/class/template.php';
$article = new Bulletin($mydirname, $storyid);
$gperm =& BulletinGP::getInstance($mydirname);
if (!$gperm->proceed4topic('can_read', $article->getVar('topicid'))) {
    //	redirect_header($mydirurl.'/index.php',2,_NOPERM);
    exit;
}
$datetime = formatTimestamp($article->getVar('published'), $bulletin_date_format);
$tpl = new XoopsTpl();
$tpl->xoops_setTemplateDir(XOOPS_ROOT_PATH . '/themes');
$tpl->xoops_setCaching(2);
$tpl->xoops_setCacheTime(0);
$tpl->assign('charset', _CHARSET);
$tpl->assign('sitename', htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES));
$tpl->assign('sitename', htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES));
$tpl->assign('slogan', htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES));
$tpl->assign('xoops_version', htmlspecialchars(XOOPS_VERSION, ENT_QUOTES));
$tpl->assign('site_image', htmlspecialchars($bulletin_imgurl_on_print, ENT_QUOTES));
$tpl->assign('story_title', $article->getVar('title'));
$tpl->assign('story_date', $datetime);
$tpl->assign('story_topic', $article->topic_title());
$tpl->assign('story_hometext', $article->getVar('hometext'));
$tpl->assign('story_id', $storyid);
$tpl->assign('story_bodytext', $article->getDividedBodytext());
$tpl->assign('this_comes_from', sprintf(_MD_THISCOMESFROM, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)));
$tpl->assign($assing_array);
$tpl->display("db:{$mydirname}_print.html");
Exemplo n.º 2
0
<?php

$com_itemid = isset($_GET['com_itemid']) ? intval($_GET['com_itemid']) : 0 ;

// If there are no articles
if( !Bulletin::isPublishedExists( $mydirname , $com_itemid) ){
	redirect_header($mydirurl.'/index.php',2,_MD_NOSTORY);
	exit();
}

$article = new Bulletin( $mydirname , $com_itemid);

$gperm =& BulletinGP::getInstance($mydirname) ;
if( ! $gperm->proceed4topic('can_read',$article->getVar('topicid')) ){
	redirect_header($mydirurl.'/index.php',2,_NOPERM);
	exit();
}

$com_replytext = _POSTEDBY.'&nbsp;<b>'.$article->getUname().'</b>&nbsp;'._DATE.'&nbsp;<b>'.formatTimestamp($article->getvar('published')).'</b><br /><br />'.$article->getVar('hometext');
$bodytext = $article->getDividedBodytext();
if ($bodytext != '') {
	$com_replytext .= '<br /><br />'.$bodytext.'';
}
$com_replytitle = $article->getVar('title');

$_GET['page'] = 'article';
require XOOPS_ROOT_PATH.'/include/comment_new.php';

?>