verifyPackage( 'contact' ); $gBitSystem->verifyPermission( 'p_contact_update' ); include_once CONTACT_PKG_INCLUDE_PATH . 'lookup_contact_inc.php'; if( !empty( $_REQUEST['xref_id'] ) ) { $gContent->loadXref( $_REQUEST['xref_id'] ); } if (isset($_REQUEST["fCancel"])) { if( !empty( $gContent->mContentId ) ) { header("Location: ".$gContent->getDisplayUrl() ); } else { header("Location: ".CONTACT_PKG_URL ); } die; } elseif (isset($_REQUEST["fSaveXref"])) { if( $gContent->storeXref( $_REQUEST ) ) { header("Location: ".$gContent->getDisplayUrl() ); die; } $xrefInfo = $_REQUEST; $xrefInfo['data'] = &$_REQUEST['edit']; } // formInfo might be set due to a error on submit if( empty( $xrefInfo ) ) { $xrefInfo = &$gContent->mInfo['xref_store']['data']; } $gBitSmarty->assign( 'xrefInfo', $xrefInfo ); $gBitSmarty->assign( 'title', $gContent->mInfo['title'] ); $gBitSmarty->assign( 'xref_title', $gContent->mInfo['xref_title'] ); $gBitSmarty->assign( 'errors', $gContent->mErrors ); if( isset($xrefInfo['template']) ) { $gBitSystem->display( 'bitpackage:contact/view_xref_'.$xrefInfo['template'].'.tpl', 'View: ' , [ 'display_mode' => 'view' ]); } else { $gBitSystem->display( 'bitpackage:contact/view_xref.tpl', 'View: ' , [ 'display_mode' => 'view' ]); }