diff options
| author | Lester Caine <lsces@lsces.co.uk> | 2010-10-18 13:24:54 +0100 |
|---|---|---|
| committer | Lester Caine <lsces@lsces.co.uk> | 2010-10-18 13:24:54 +0100 |
| commit | 02ae040e029923d2283fcbb34c10ecc65e98bc4a (patch) | |
| tree | ac7bf4df915edbd1d4594add40f337c971dc50ef /view_xref.php | |
| parent | 4924349722bf63833f4898a9bc91ccb329f4a2e6 (diff) | |
| download | contact-02ae040e029923d2283fcbb34c10ecc65e98bc4a.tar.gz contact-02ae040e029923d2283fcbb34c10ecc65e98bc4a.tar.bz2 contact-02ae040e029923d2283fcbb34c10ecc65e98bc4a.zip | |
Major overhaul of contact. Main problem was moving from the older bw formats of working up to the latest standards. Using gContent and pageInfo hashes directly in templates. Other rebuilds have gone on.
This is still work in progress and a full user manual will be added.
Diffstat (limited to 'view_xref.php')
| -rw-r--r-- | view_xref.php | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/view_xref.php b/view_xref.php new file mode 100644 index 0000000..cf9da58 --- /dev/null +++ b/view_xref.php @@ -0,0 +1,54 @@ +<?php +/** + * $Header: /cvsroot/bitweaver/_bit_contact/edit.php,v 1.6 2010/02/08 21:27:22 wjames5 Exp $ + * + * Copyright (c) 2006 bitweaver.org + * All Rights Reserved. See below for details and a complete list of authors. + * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details + * + * @package contact + * @subpackage functions + */ + +/** + * required setup + */ +require_once( '../kernel/setup_inc.php' ); + +$gBitSystem->verifyPackage( 'contact' ); +$gBitSystem->verifyPermission( 'p_contact_update' ); + +include_once( CONTACT_PKG_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; + } else { + $xrefInfo = $_REQUEST; + $xrefInfo['data'] = &$_REQUEST['edit']; + } +} + +// formInfo might be set due to a error on submit +if( empty( $xrefInfo ) ) { + $xrefInfo = &$gContent->mInfo['xref_store']; +} +$gBitSmarty->assign_by_ref( 'xrefInfo', $xrefInfo ); +$gBitSmarty->assign_by_ref( 'title', $gContent->mInfo['title'] ); +$gBitSmarty->assign_by_ref( 'xref_title', $gContent->mInfo['xref_title'] ); + +$gBitSmarty->assign_by_ref( 'errors', $gContent->mErrors ); +$gBitSystem->display( 'bitpackage:contact/view_xref.tpl', 'Edit: ' , array( 'display_mode' => 'edit' )); +?> |
