예제 #1
0
$story['morelink'] = '';
$story['adminlink'] = '';
unset($isadmin);

if(is_object($xoopsUser)) {
	if( $xoopsUser->isAdmin($xoopsModule->getVar('mid')) || (nw_getmoduleoption('authoredit', NW_MODULE_DIR_NAME) && $article->uid() == $xoopsUser->getVar('uid')) ) {
    	$isadmin = true;
    	$story['adminlink'] = $article->adminlink();
    }
}
$story['topicid'] = $article->topicid();
$story['topic_color'] = '#'.$myts->displayTarea($article->topic_color);

$story['imglink'] = '';
$story['align'] = '';
if ( $article->topicdisplay() ) {
    $story['imglink'] = $article->imglink();
    $story['align'] = $article->topicalign();
}
$story['hits'] = $article->counter();
$story['mail_link'] = 'mailto:?subject='.sprintf(_MA_NW_INTARTICLE,$xoopsConfig['sitename']).'&body='.sprintf(_MA_NW_INTARTFOUND, $xoopsConfig['sitename']).':  '.NW_MODULE_URL . '/article.php?storyid='.$article->storyid();
$xoopsTpl->assign('lang_printerpage', _MA_NW_PRINTERFRIENDLY);
$xoopsTpl->assign('lang_sendstory', _MA_NW_SENDSTORY);
$xoopsTpl->assign('lang_pdfstory', _MA_NW_MAKEPDF);

if ( $article->uname() != '' ) 
{
	$xoopsTpl->assign('lang_on', _ON);
	$xoopsTpl->assign('lang_postedby', _POSTEDBY);
} else 
{
예제 #2
0
        $picture = $story->picture();
        $approve = 0;
        $published = $story->published();
        if (isset($published) && $published > 0) {
            $approve = 1;
        }
        if ( $story -> published() != 0) {
            $published = $story->published();
        }
		if ( $story -> expired() != 0) {
            $expired = $story->expired();
        } else {
            $expired = 0;
        }
		$type = $story -> type();
        $topicdisplay = $story -> topicdisplay();
        $topicalign = $story -> topicalign( false );
        if(!nw_is_admin_group()) {
        	include_once NW_MODULE_PATH . '/include/storyform.inc.php';
        } else {
        	include_once NW_MODULE_PATH . '/include/storyform.original.php';
        }
        echo'</td></tr></table>';
        break;

	case 'preview':
		$topic_id = intval($_POST['topic_id']);
		$xt = new nw_NewsTopic($topic_id);
		if(isset($_GET['storyid'])) {
			$storyid=intval($_GET['storyid']);
		} else {