Exemplo n.º 1
0
 while ($story = $xoopsDB->fetchArray($result)) {
     $html = $story['nohtml'] == 0 ? 1 : 0;
     $smiley = $story['nosmiley'] == 0 ? 1 : 0;
     $ihome = $story['ihome'] == 0 ? 1 : 0;
     $type = $story['story_type'] == 1 && $story['published'] == 0 ? 0 : 1;
     if ($story['topicalign'] == 'R') {
         $topicimg = 1;
     } else {
         if ($story['topicalign'] == 'L') {
             $topicimg = 2;
         } else {
             $topicimg = 0;
         }
     }
     $new_story = new Bulletin($mydirname);
     $new_story->setVar('uid', $story['uid']);
     $new_story->setVar('title', $story['title']);
     $new_story->setVar('created', $story['created']);
     $new_story->setVar('published', $story['published']);
     $new_story->setVar('expired', $story['expired']);
     $new_story->setVar('hostname', $story['hostname']);
     $new_story->setVar('html', $html);
     $new_story->setVar('br', 1);
     $new_story->setVar('smiley', $smiley);
     $new_story->setVar('xcode', 1);
     $new_story->setVar('hometext', $story['hometext']);
     $new_story->setVar('bodytext', $story['bodytext']);
     $new_story->setVar('counter', $story['counter']);
     $new_story->setVar('topicid', $story['topicid']);
     $new_story->setVar('ihome', $ihome);
     $new_story->setVar('type', $type);
Exemplo n.º 2
0
 * Data loading section
 */
$story = new Bulletin( $mydirname , $storyid );

if ( $storyid ){
	$topicid = $story->getVar('topicid');
	if( empty($topicid) ){
		die(_MD_NO_TOPICS);
		exit;
	}
}
// In case of No Topic
$BTopic = new BulletinTopic( $mydirname, $topicid );
$topicid = $BTopic->getTopicIdByPermissionCheck($topicid);
if( $topicid ){
	$story->setVar('topicid', $topicid);
}
if( !$BTopic->topicExists() ){
	die(_MD_NO_TOPICS);
	exit;
}

$xoopsTpl->assign('topic_title', $BTopic->topic_title());

// Chanege the WSYWIG editor
if( ! empty( $_REQUEST['using_fck'] ) ) {
	$_POST['text'] = $_POST['text_fck'] ;
}

$str_arr = array('title','text');
$int_arr = array('topicid','type','topicimg','published','expired');