30 lines
1.2 KiB
PHP
30 lines
1.2 KiB
PHP
<?php
|
|
class PenguinCoder
|
|
{
|
|
function getMenu($returnType = 'object')
|
|
{
|
|
global $registry, $conf;
|
|
require_once 'Horde/Menu.php';
|
|
$menu = &new Menu();
|
|
|
|
$menu->add(Horde::applicationUrl('index.php', true, 1.), _("/home"), 'home.png');
|
|
$menu->add(Horde::applicationUrl('journal.php', true, 1.), _("Archive"), 'journal.png');
|
|
$menu->add(Util::addParameter(Util::addParameter(Horde::applicationUrl('data.php', true, 1.), 'category', 'Machine'), 'title', _("Machines")), _("Machines"), 'machine.png');
|
|
$menu->add(Util::addParameter(Util::addParameter(Horde::applicationUrl('data.php', true, 1.), 'category', 'About'), 'title', _("About")), _("About"), 'about.png');
|
|
$menu->add(Horde::applicationUrl('rss.php', true), _("RSS"), 'rss.png');
|
|
|
|
if ($returnType == 'object') {
|
|
return $menu;
|
|
}
|
|
return $menu->render();
|
|
}
|
|
|
|
function fileUrl($filename)
|
|
{
|
|
if(is_null($filename) || !file_exists(escapeshellcmd($filename)))
|
|
return '';
|
|
return Horde::url($registry->get('webroot') . '/fileset/' .
|
|
escapeshellcmd($filename), true, -1);
|
|
}
|
|
}
|