FOSSology  4.4.0
Open Source License Compliance by Open Source Software
ui-topnav.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2008-2011 Hewlett-Packard Development Company, L.P.
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
7 
12 class ui_topnav extends FO_Plugin
13 {
14  var $Name = "topnav";
15  var $Version = "1.0";
16  var $MenuList = "";
17  var $Dependency = array("menus");
18 
22  function Output()
23  {
24  if ($this->State != PLUGIN_STATE_READY) {
25  return;
26  }
27 
28  global $SysConf;
29  global $Plugins;
30 
31  $html = "<table width='100%' border=0 cellpadding=0>\n <tr>\n";
32 
33  $Uri = Traceback_dir();
34 
35  if (@$SysConf['SYSCONFIG']['LogoImage'] and
36  @$SysConf['SYSCONFIG']['LogoLink']) {
37  $LogoLink = $SysConf['SYSCONFIG']['LogoLink'];
38  $LogoImg = $SysConf['SYSCONFIG']['LogoImage'];
39  } else {
40  $LogoLink = 'http://fossology.org';
41  $LogoImg = Traceback_uri . 'images/fossology-logo.gif';
42  }
43 
44  $html .= " <td width='15%'>";
45  $html .= "<a href='$LogoLink' target='_top'><img src='$LogoImg' align=absmiddle border=0></a>";
46  $html .= "</td>\n";
47  $html .= " <td valign='top'>";
48  $Menu = &$Plugins[plugin_find_id("menus")];
49  $Menu->OutputSet($this->OutputType,0);
50  $html .= $Menu->Output();
51  $html .= " </td>\n";
52  $html .= " </tr>\n";
53  $html .= "</table>\n";
54  return $html;
55  }
56 }
57 
58 $NewPlugin = new ui_topnav();
59 $NewPlugin->Initialize();
This is the Plugin class. All plugins should:
Definition: FO_Plugin.php:57
Definition: state.hpp:16
top navigater logo on UI
Definition: ui-topnav.php:13
Output()
Generate output for this plug-in.
Definition: ui-topnav.php:22
Traceback_uri()
Get the URI without query to this location.
Definition: common-parm.php:97
Traceback_dir()
Get the directory of the URI without query.