<?php
/*
 * $Horde: turba/displayobject.php,v 1.9.2.8 2003/01/03 12:48:56 jan Exp $
 *
 * Turba: Copyright 2000-2003 Charles J. Hagenbuch <chuck@horde.org>
 *
 * You should have received a copy of the GNU Public
 * License along with this package; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

define('TURBA_BASE', dirname(__FILE__));
require_once TURBA_BASE . '/lib/base.php';
require_once TURBA_BASE . '/lib/Source.php';
require_once TURBA_BASE . '/lib/ObjectView.php';

$source = Horde::getFormData('source');
$driver = &Turba_Source::singleton($source, $cfgSources[$source]);

$object = $driver->getObject(Horde::getFormData('key'));

if (is_object($object)) {
    $view = new Turba_ObjectView($object, TURBA_TEMPLATES . '/display/display.inc');
    $title = $object->getValue('name');
}

$js_onLoad = null;
require TURBA_TEMPLATES . '/common-header.inc';
require TURBA_BASE . '/menu.php';
require TURBA_BASE . '/status.php';

if (isset($view) && is_object($view)) {
    $view->display();
}

require TURBA_TEMPLATES . '/common-footer.inc';
$registry->shutdown();
