$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'); $bai_arr = array('html','smiley','br','xcode','autodate','autoexpdate','notifypub','block','ihome','approve'); foreach( $str_arr as $k ){
// $form->addItem(5, _AM_RIGHT_XCODE); // $form->addItem(6, _AM_RIGHT_SMILEY); $form->addItem(7, _AM_RIGHT_RELATION); $asssigns = array('form' => $form->render()); break; case 'topicsmanager': xoops_cp_header(); include dirname(__FILE__) . '/mymenu.php'; $template = 'bulletin_topicsmanager.html'; $BTopic = new BulletinTopic($mydirname); $topics_array = XoopsLists::getImgListAsArray($xoopsModuleConfig['topicon_path']); $images = array(); foreach ($topics_array as $v) { $images[]['image'] = htmlspecialchars($v); } $topics_exists = $BTopic->topicExists() ? 1 : 0; //ob_start(); //$BTopic->makeTopicSelBox( 1, 0, 'topic_pid' ); //$topicselbox = ob_get_contents(); //ob_end_clean(); //ob_start(); //$BTopic->makeTopicSelBox(); //$topicselbox2 = ob_get_contents(); //ob_end_clean(); $topicselbox = $BTopic->makeTopicSelBox(true, 0, 'topic_pid'); $topicselbox2 = $BTopic->makeTopicSelBox(); $asssigns = array('gticket_hidden' => $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'bulletin_admin'), 'images' => $images, 'topics_exists' => $topics_exists, 'topicselbox' => $topicselbox, 'topicselbox2' => $topicselbox2); $tpl->assign($asssigns); //$tpl->display( 'db:'.$mydirname.'_admin_category.html' ) ; break; case 'modTopic':
'form' => $form->render() ); break; case 'topicsmanager': xoops_cp_header(); include dirname(__FILE__).'/mymenu.php' ; $template = 'bulletin_topicsmanager.html'; $BTopic = new BulletinTopic( $mydirname ); $topics_array = XoopsLists :: getImgListAsArray( $xoopsModuleConfig['topicon_path'] ); $images = array(); foreach($topics_array as $v) { $images[]['image'] = htmlspecialchars($v); } $topics_exists = ( $BTopic->topicExists() ) ? 1 : 0 ; //ob_start(); //$BTopic->makeTopicSelBox( 1, 0, 'topic_pid' ); //$topicselbox = ob_get_contents(); //ob_end_clean(); //ob_start(); //$BTopic->makeTopicSelBox(); //$topicselbox2 = ob_get_contents(); //ob_end_clean(); $topicselbox = $BTopic->makeTopicSelBox( true , 0 , 'topic_pid' ) ; $topicselbox2 = $BTopic->makeTopicSelBox() ; $asssigns = array( 'gticket_hidden' => $xoopsGTicket->getTicketHtml( __LINE__ , 1800 , 'bulletin_admin') , 'images' => $images, 'topics_exists' => $topics_exists,