1<?php 2/** 3 * Copyright 2002-2017 Horde LLC (http://www.horde.org/) 4 * 5 * See the enclosed file LICENSE for license information (BSD). If you 6 * did not receive this file, see http://www.horde.org/licenses/bsdl.php. 7 * 8 * @author Chuck Hagenbuch <chuck@horde.org> 9 */ 10 11require_once __DIR__ . '/lib/Application.php'; 12Horde_Registry::appInit('whups'); 13 14// Get refresh interval. 15if ($r_time = $prefs->getValue('summary_refresh_time') && 16 !$browser->hasFeature('xmlhttpreq')) { 17 $page_output->metaRefresh($r_time, Horde::url('mybugs.php')); 18} 19 20Whups::addTopbarSearch(); 21 22// Load layout from preferences for authenticated users, and a default 23// block set for guests. 24if (!$registry->isAuthenticated()) { 25 $prefs->setValue('mybugs_layout', serialize(array( 26 array(array('app' => 'whups', 'params' => array('type2' => 'whups_Block_Myqueries', 'params' => false), 'height' => 1, 'width' => 1)), 27 array(array('app' => 'whups', 'params' => array('type2' => 'whups_Block_Queuesummary', 'params' => false), 'height' => 1, 'width' => 1)), 28 ))); 29} elseif (!@unserialize($prefs->getValue('mybugs_layout'))) { 30 $prefs->setValue('mybugs_layout', serialize(array( 31 array(array('app' => 'whups', 'params' => array('type2' => 'whups_Block_Mytickets', 'params' => false), 'height' => 1, 'width' => 1)), 32 array(array('app' => 'whups', 'params' => array('type2' => 'whups_Block_Myrequests', 'params' => false), 'height' => 1, 'width' => 1)), 33 array(array('app' => 'whups', 'params' => array('type2' => 'whups_Block_Myqueries', 'params' => false), 'height' => 1, 'width' => 1)) 34 ))); 35} 36 37Whups::addFeedLink(); 38 39$layout = new Horde_Core_Block_Layout_View( 40 $injector->getInstance('Horde_Core_Factory_BlockCollection')->create(array('whups'), 'mybugs_layout')->getLayout(), 41 Horde::url('mybugs_edit.php'), 42 Horde::url('mybugs.php', true) 43); 44$layout_html = $layout->toHtml(); 45 46$menuBottom = '<div id="menuBottom"><a href="' . Horde::url('mybugs_edit.php') . '">' . _("Add Content") . '</a></div><div class="clear"> </div>'; 47$page_output->header(array( 48 'title' => sprintf(_("My %s"), $registry->get('name')) 49)); 50$notification->notify(array('listeners' => 'status')); 51echo $layout_html; 52$page_output->footer(); 53