示例#1
0
	$BTopic = new BulletinTopic( $mydirname , $_GET['topic_id'] ) ;
	$topics_array = XoopsLists :: getImgListAsArray( $xoopsModuleConfig['topicon_path'] );
	xoops_cp_header();
	include dirname(__FILE__).'/mymenu.php' ;
	$images = array();

	foreach($topics_array as $v){
		$images[] = array('image' => htmlspecialchars($v), 'option' => $BTopic->topic_imgurl() ? 'selected="selected"' : '');
	}

	//ob_start();
	//$BTopic->makeTopicSelBox( 1, $BTopic->topic_pid(), 'topic_pid' );
	//$topicselbox = ob_get_contents();
	//ob_end_clean();
	$topicselbox = $BTopic->makeTopicSelBox( true , $BTopic->topic_pid() ,  'topic_pid' ) ;
	$asssigns = array(
		'gticket_hidden' => $xoopsGTicket->getTicketHtml( __LINE__ , 1800 , 'bulletin_admin') ,
		'images' => $images,
		'topic_id' => $BTopic->topic_id(),
		'topic_pid' => $BTopic->topic_pid(),
		'topic_title' => $BTopic->topic_title('E'),
		'topic_imgurl' => $BTopic->topic_imgurl(),
		'topic_imgdir' => str_replace(XOOPS_ROOT_PATH,XOOPS_URL,$xoopsModuleConfig['topicon_path']),
		'topicselbox' => $topicselbox
	);
	break;

case 'addTopic':
//ver3.0
	if ( ! $xoopsGTicket->check( true , 'bulletin_admin' ) ) {
示例#2
0
文件: index.php 项目: nouphet/rata
     break;
 case 'modTopic':
     $template = 'bulletin_modtopic.html';
     $BTopic = new BulletinTopic($mydirname, $_GET['topic_id']);
     $topics_array = XoopsLists::getImgListAsArray($xoopsModuleConfig['topicon_path']);
     xoops_cp_header();
     include dirname(__FILE__) . '/mymenu.php';
     $images = array();
     foreach ($topics_array as $v) {
         $images[] = array('image' => htmlspecialchars($v), 'option' => $BTopic->topic_imgurl() ? 'selected="selected"' : '');
     }
     //ob_start();
     //$BTopic->makeTopicSelBox( 1, $BTopic->topic_pid(), 'topic_pid' );
     //$topicselbox = ob_get_contents();
     //ob_end_clean();
     $topicselbox = $BTopic->makeTopicSelBox(true, $BTopic->topic_pid(), 'topic_pid');
     $asssigns = array('gticket_hidden' => $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'bulletin_admin'), 'images' => $images, 'topic_id' => $BTopic->topic_id(), 'topic_pid' => $BTopic->topic_pid(), 'topic_title' => $BTopic->topic_title('E'), 'topic_imgurl' => $BTopic->topic_imgurl(), 'topic_imgdir' => str_replace(XOOPS_ROOT_PATH, XOOPS_URL, $xoopsModuleConfig['topicon_path']), 'topicselbox' => $topicselbox);
     break;
 case 'addTopic':
     //ver3.0
     if (!$xoopsGTicket->check(true, 'bulletin_admin')) {
         redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
     }
     $BTopic = new BulletinTopic($mydirname);
     $BTopic->setTopicPid($_POST['topic_pid']);
     if (empty($_POST['topic_title'])) {
         redirect_header("index.php?op=topicsmanager", 2, _AM_ERRORTOPICNAME);
     }
     $BTopic->setTopicTitle($_POST['topic_title']);
     if (isset($_POST['topic_imgurl']) && $_POST['topic_imgurl'] != "") {
         $BTopic->setTopicImgurl($_POST['topic_imgurl']);
示例#3
0
     break;
 case 'modTopic':
     $template = 'bulletin_modtopic.html';
     $BTopic = new BulletinTopic($mydirname, $_GET['topic_id']);
     $topics_array = XoopsLists::getImgListAsArray($xoopsModuleConfig['topicon_path']);
     xoops_cp_header();
     include dirname(__FILE__) . '/mymenu.php';
     $images = array();
     foreach ($topics_array as $v) {
         $images[] = array('image' => htmlspecialchars($v), 'option' => $BTopic->topic_imgurl() ? 'selected="selected"' : '');
     }
     //ob_start();
     //$BTopic->makeTopicSelBox( 1, $BTopic->topic_pid(), 'topic_pid' );
     //$topicselbox = ob_get_contents();
     //ob_end_clean();
     $topicselbox = $BTopic->makeTopicSelBox(true, $BTopic->topic_pid(), 'topic_pid');
     $asssigns = array('images' => $images, 'topic_id' => $BTopic->topic_id(), 'topic_pid' => $BTopic->topic_pid(), 'topic_title' => $BTopic->topic_title('E'), 'topic_imgurl' => $BTopic->topic_imgurl(), 'topic_imgdir' => str_replace(XOOPS_ROOT_PATH, XOOPS_URL, $xoopsModuleConfig['topicon_path']), 'topicselbox' => $topicselbox);
     break;
 case 'addTopic':
     $BTopic = new BulletinTopic($mydirname);
     $BTopic->setTopicPid($_POST['topic_pid']);
     if (empty($_POST['topic_title'])) {
         redirect_header("index.php?op=topicsmanager", 2, _AM_ERRORTOPICNAME);
     }
     $BTopic->setTopicTitle($_POST['topic_title']);
     if (isset($_POST['topic_imgurl']) && $_POST['topic_imgurl'] != "") {
         $BTopic->setTopicImgurl($_POST['topic_imgurl']);
     }
     $BTopic->store();
     $notification_handler =& xoops_gethandler('notification');
     $tags = array();