blob: 45ee77cfc9bb9e45ac404d8c748b76f4dce9fe72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<?php
// $Header$
require_once '../../kernel/includes/setup_inc.php';
use Bitweaver\Articles\BitArticleTopic;
use Bitweaver\KernelTools;
include_once( ARTICLES_PKG_INCLUDE_PATH.'lookup_article_topic_inc.php' );
// Is package installed and enabled
$gBitSystem->verifyPackage( 'articles' );
$gBitSystem->verifyPermission( 'p_articles_admin' );
if( isset( $_REQUEST["fSubmitAddTopic"] ) ) {
$gContent->storeTopic( $_REQUEST );
if ( !empty( $gContent->mErrors ) ) {
$gBitSmarty->assign('errors', $gContent->mErrors );
}
} elseif( !empty( $_REQUEST['fActivateTopic'] )&& $gContent ) {
$gContent->activateTopic();
} elseif( !empty( $_REQUEST['fDeactivateTopic'] )&& $gContent ) {
$gContent->deactivateTopic();
} elseif( !empty( $_REQUEST['fRemoveTopic'] )&& $gContent ) {
$gContent->removeTopic();
} elseif( !empty( $_REQUEST['fRemoveTopicAll'] )&& $gContent ) {
$gContent->removeTopic( TRUE );
}
$topics = BitArticleTopic::getTopicList();
$gBitSmarty->assign( 'topics', $topics );
$gBitSystem->display( 'bitpackage:articles/admin_topics.tpl', KernelTools::tra( 'Edit Topics' ) , [ 'display_mode' => 'admin' ]);
|