FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
ui-topnav.php
1 <?php
2 /***********************************************************
3  Copyright (C) 2008-2011 Hewlett-Packard Development Company, L.P.
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU General Public License
7  version 2 as published by the Free Software Foundation.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License along
15  with this program; if not, write to the Free Software Foundation, Inc.,
16  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  ***********************************************************/
18 
23 class ui_topnav extends FO_Plugin
24 {
25  var $Name = "topnav";
26  var $Version = "1.0";
27  var $MenuList = "";
28  var $Dependency = array("menus");
29 
33  function Output()
34  {
35  if ($this->State != PLUGIN_STATE_READY) {
36  return;
37  }
38 
39  global $SysConf;
40  global $Plugins;
41 
42  $html = "<table width='100%' border=0 cellpadding=0>\n <tr>\n";
43 
44  $Uri = Traceback_dir();
45 
46  if (@$SysConf['SYSCONFIG']['LogoImage'] and
47  @$SysConf['SYSCONFIG']['LogoLink']) {
48  $LogoLink = $SysConf['SYSCONFIG']['LogoLink'];
49  $LogoImg = $SysConf['SYSCONFIG']['LogoImage'];
50  } else {
51  $LogoLink = 'http://fossology.org';
52  $LogoImg = Traceback_uri . 'images/fossology-logo.gif';
53  }
54 
55  $html .= " <td width='15%'>";
56  $html .= "<a href='$LogoLink' target='_top'><img src='$LogoImg' align=absmiddle border=0></a>";
57  $html .= "</td>\n";
58  $html .= " <td valign='top'>";
59  $Menu = &$Plugins[plugin_find_id("menus")];
60  $Menu->OutputSet($this->OutputType,0);
61  $html .= $Menu->Output();
62  $html .= " </td>\n";
63  $html .= " </tr>\n";
64  $html .= "</table>\n";
65  return $html;
66  }
67 }
68 
69 $NewPlugin = new ui_topnav();
70 $NewPlugin->Initialize();
Traceback_uri()
Get the URI without query to this location.
top navigater logo on UI
Definition: ui-topnav.php:23
Output()
Generate output for this plug-in.
Definition: ui-topnav.php:33
Definition: state.hpp:26
This is the Plugin class. All plugins should:
Definition: FO_Plugin.php:67
Traceback_dir()
Get the directory of the URI without query.