isFeatureActive( 'feature_contact' ) ) { $gBitSystem->fatalError( "The Contact feature is disabled." ); } include_once( MESSU_PKG_PATH.'messu_lib.php' ); $userInfo = $gBitUser->getUserInfo( array( 'login' => $gBitSystem->getPreference( 'contact_user' ) ) ); $email = $userInfo['email']; if( empty( $email ) ) { $gBitSystem->fatalError( "This feature is not correctly set up. The email address is missing." ); } else { $gBitSmarty->assign( 'email', $email ); } if( $gBitSystem->isPackageActive( 'quicktags' ) ) { include_once( QUICKTAGS_PKG_PATH.'quicktags_inc.php' ); } if (!empty($_REQUEST['send'])) { if( empty( $_REQUEST['subject'] ) && empty( $_REQUEST['body'] ) ) { $gBitSystem->fatalError( "Either a subject or a message body is required." ); } $messulib->post_message( $userInfo['login'], $gBitUser->mUsername, $_REQUEST['to'], '', $_REQUEST['subject'], $_REQUEST['body'], $_REQUEST['priority']); $feedback['success'] = tra( 'Your message was sent to' ).': '.( !empty( $userInfo['real_name'] ) ? $userInfo['real_name'] : $userInfo['login'] ); $gBitSmarty->assign( 'feedback', $feedback ); } $gBitSystem->display( 'bitpackage:messu/contact.tpl'); ?>