diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2005-08-21 16:22:48 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2005-08-21 16:22:48 +0000 |
| commit | 7d183a779b42072de4a913029a7daad9f5b30034 (patch) | |
| tree | 2a21a8105228e1268ab33b0abe061b52b9475f7a /view.php | |
| download | pigeonholes-7d183a779b42072de4a913029a7daad9f5b30034.tar.gz pigeonholes-7d183a779b42072de4a913029a7daad9f5b30034.tar.bz2 pigeonholes-7d183a779b42072de4a913029a7daad9f5b30034.zip | |
import pigeonholes - take 2
Diffstat (limited to 'view.php')
| -rw-r--r-- | view.php | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/view.php b/view.php new file mode 100644 index 0000000..898c77e --- /dev/null +++ b/view.php @@ -0,0 +1,46 @@ +<?php +/** + * $Header: /cvsroot/bitweaver/_bit_pigeonholes/view.php,v 1.1 2005/08/21 16:22:45 squareing Exp $ + * + * Copyright ( c ) 2004 bitweaver.org + * Copyright ( c ) 2003 tikwiki.org + * Copyright ( c ) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. + * All Rights Reserved. See copyright.txt for details and a complete list of authors. + * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details + * + * $Id: view.php,v 1.1 2005/08/21 16:22:45 squareing Exp $ + * @package pigeonholes + * @subpackage functions + */ + +/** + * required setup + */ +require_once( '../bit_setup_inc.php' ); + +$gBitSystem->verifyPackage( 'pigeonholes' ); +$gBitSystem->verifyPermission( 'bit_p_view_pigeonholes' ); + +include_once( PIGEONHOLES_PKG_PATH.'lookup_pigeonholes_inc.php' ); + +// set up structure related stuff +global $gStructure; +$gStructure = new LibertyStructure( $gPigeonholes->mInfo['root_structure_id'] ); +$gStructure->load(); + +// order matters for these conditionals +if( empty( $gStructure ) || !$gStructure->isValid() ) { + $gBitSystem->fatalError( 'Invalid structure' ); +} + +$gBitSmarty->assign_by_ref( 'gStructure', $gStructure ); +$gBitSmarty->assign( 'structureInfo', $gStructure->mInfo ); +$gBitSmarty->assign( 'subtree', $gStructure->getSubTree( $gStructure->mStructureId ) ); + +$listHash = array( 'root_structure_id' => $gPigeonholes->mInfo['root_structure_id'] ); +$pigeonList = $gPigeonholes->getList( $listHash, FALSE, TRUE ); +$gBitSmarty->assign( 'pigeonList', $pigeonList['data'] ); + +// Display the template +$gBitSystem->display( 'bitpackage:pigeonholes/view_structure.tpl', tra( 'View Pigeonhole' ) ); +?> |
