summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2013-08-22 15:43:46 +0100
committerlsces <lester@lsces.co.uk>2013-08-22 15:43:46 +0100
commit650ee28714ab4666ee37d0a230bf21a2bce812fc (patch)
tree959797a23d3dc76da174027c48f3c79a0f02ab90 /admin
parentb32cd9d6457137cc0d4cecd4f384d624eeee88fe (diff)
downloadcontact-650ee28714ab4666ee37d0a230bf21a2bce812fc.tar.gz
contact-650ee28714ab4666ee37d0a230bf21a2bce812fc.tar.bz2
contact-650ee28714ab4666ee37d0a230bf21a2bce812fc.zip
Expand admin functionality
Diffstat (limited to 'admin')
-rw-r--r--admin/admin_contact_type.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/admin/admin_contact_type.php b/admin/admin_contact_type.php
new file mode 100644
index 0000000..511af13
--- /dev/null
+++ b/admin/admin_contact_type.php
@@ -0,0 +1,30 @@
+<?php
+// $Header$
+require_once( '../../kernel/setup_inc.php' );
+
+include_once( CONTACT_PKG_PATH.'Contact.php' );
+
+// Is package installed and enabled
+$gBitSystem->verifyPackage( 'contact' );
+$gBitSystem->verifyPermission( 'p_contact_admin' );
+
+if( isset( $_REQUEST["fSubmitAddContactType"] ) ) {
+ $gContent->storeTopic( $_REQUEST );
+ if ( !empty( $gContent->mErrors ) ) {
+ $gBitSmarty->assign_by_ref('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 );
+}
+
+$contacttype = ContactType::getContactTypeList();
+$gBitSmarty->assign( 'contacttype', $contacttype );
+
+$gBitSystem->display( 'bitpackage:contact/admin_contact_type.tpl', tra( 'Edit Contact Types' ) , array( 'display_mode' => 'admin' ));
+?>