$years[$i]['string'] = sprintf(_MD_YEAR_X, $caly);
    $years[$i]['months'] = $months;
    $i++;
}
$xoopsTpl->assign('years', $years);
// 記事のリストassign
if ($fromyear != 0 && $frommonth != 0) {
    $xoopsTpl->assign('show_articles', true);
    $xoopsTpl->assign('currentmonth', $months_arr[$frommonth]);
    $xoopsTpl->assign('currentyear', $fromyear);
    // must adjust the selected time to server timestamp
    $timeoffset = $useroffset - $xoopsConfig['server_TZ'];
    $monthstart = mktime(0 - $timeoffset, 0, 0, $frommonth, 1, $fromyear);
    $monthend = mktime(23 - $timeoffset, 59, 59, $frommonth + 1, 0, $fromyear);
    $monthend = $monthend > time() ? time() : $monthend;
    $article = Bulletin::getArchives($mydirname, $monthstart, $monthend);
    $scount = count($article);
    for ($i = 0; $i < $scount; $i++) {
        $story = array();
        $story['id'] = $article[$i]->getVar('storyid');
        $story['topic'] = $article[$i]->topic_title();
        $story['topicid'] = $article[$i]->getVar('topicid');
        $story['title'] = $article[$i]->getVar('title');
        $story['counter'] = $article[$i]->getVar('counter');
        $story['date'] = formatTimestamp($article[$i]->getVar('published'), $bulletin_date_format, $useroffset);
        $story['print_link'] = 'index.php?page=print&amp;storyid=' . $article[$i]->getVar('storyid');
        // Tell A Frined使用する場合
        if ($bulletin_use_tell_a_frined) {
            $story['mail_link'] = XOOPS_URL . '/modules/tellafriend/index.php?target_uri=' . rawurlencode("{$mydirurl}/index.php?page=article&amp;storyid=" . $article[$i]->getVar('storyid')) . '&amp;subject=' . rawurlencode(sprintf(_MD_INTARTFOUND, $xoopsConfig['sitename']));
        } else {
            $story['mail_link'] = 'mailto:?subject=' . sprintf(_MD_INTARTICLE, $xoopsConfig['sitename']) . '&amp;body=' . sprintf(_MD_INTARTFOUND, $xoopsConfig['sitename']) . ':  ' . $mydirurl . '/index.php?page=article&amp;storyid=' . $article[$i]->getVar('storyid');
Beispiel #2
0
}
$xoopsTpl->assign('years', $years);

// Assign list of articles
if ($fromyear != 0 && $frommonth != 0) {
	$xoopsTpl->assign('show_articles', true);
	$xoopsTpl->assign('currentmonth', $months_arr[$frommonth]);
	$xoopsTpl->assign('currentyear', $fromyear);

	// must adjust the selected time to server timestamp
	$timeoffset = $useroffset - $xoopsConfig['server_TZ'];
	$monthstart = mktime(0 - $timeoffset, 0, 0, $frommonth, 1, $fromyear);
	$monthend   = mktime(23 - $timeoffset, 59, 59, $frommonth + 1, 0, $fromyear);
	$monthend   = ($monthend > time()) ? time() : $monthend;

	$article = Bulletin::getArchives( $mydirname , $monthstart , $monthend , 0 , 0 , true ,true );
	$scount = count($article);

	for ( $i = 0; $i < $scount; $i++ ) {
		$story = array();
	    	$story['id']         = $article[$i]->getVar('storyid');
	    	$story['topic']      = $article[$i]->topic_title();
	    	$story['topicid']    = $article[$i]->getVar('topicid');
	    	$story['title']      = $article[$i]->getVar('title');
		$story['counter']    = $article[$i]->getVar('counter');
		$story['date']       = formatTimestamp($article[$i]->getVar('published'), $bulletin_date_format, $useroffset);
		$story['print_link'] = 'index.php?page=print&amp;storyid='.$article[$i]->getVar('storyid');

		// If you are using Tell A Frined module
		if($bulletin_use_tell_a_frined){
			$story['mail_link'] = XOOPS_URL.'/modules/tellafriend/index.php?target_uri='.rawurlencode( "$mydirurl/index.php?page=article&amp;storyid=".$article[$i]->getVar('storyid') ).'&amp;subject='.rawurlencode(sprintf(_MD_INTARTFOUND,$xoopsConfig['sitename'])) ;