verifyPackage( 'contact' ); $gBitSystem->verifyPermission( 'p_contact_update' ); include_once( CONTACT_PKG_PATH.'lookup_contact_inc.php' ); if (isset($_REQUEST["fCancel"])) { if( !empty( $gContent->mContentId ) ) { header("Location: ".$gContent->getDisplayUrl() ); } else { header("Location: ".CONTACT_PKG_URL ); } die; } elseif (isset($_REQUEST["fAddXref"])) { if( $gContent->storeXref( $_REQUEST ) ) { header("Location: ".$gContent->getDisplayUrl() ); } else { $xrefInfo = $_REQUEST; $xrefInfo['data'] = &$_REQUEST['edit']; } } if( !isset( $_REQUEST['xref_type'] ) ) $_REQUEST['xref_type'] = 0; // formInfo might be set due to a error on submit if( empty( $xrefInfo ) ) { $xrefInfo = &$gContent->mInfo['xref_store']; $xrefInfo['content_id'] = $gContent->mContentId; $xrefInfo['xref_type'] = $_REQUEST['xref_type']; } $xrefInfo['xref_type_list'] = $gContent->getXrefTypeList( $xrefInfo['xref_type'] ); $gBitSmarty->assign_by_ref( 'xrefInfo', $xrefInfo ); $gBitSmarty->assign_by_ref( 'title', $gContent->mInfo['title'] ); $gBitSmarty->assign_by_ref( 'errors', $gContent->mErrors ); $gBitSystem->display( 'bitpackage:contact/add_xref.tpl', 'Edit: ' , array( 'display_mode' => 'edit' )); ?>