FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
ui-refresh.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 
19 class ui_refresh extends FO_Plugin
20 {
21  function __construct()
22  {
23  $this->Name = "refresh";
24  $this->LoginFlag = 0;
25  parent::__construct();
26  }
27 
31  function GetRefresh()
32  {
33  $Mod = GetParm("mod",PARM_STRING);
34  $parm = Traceback_parm(0);
35  $Opt = preg_replace("/&/","--",$parm);
36  $V = "mod=" . $this->Name . "&remod=$Mod" . "&reopt=$Opt";
37  return($V);
38  } // GetRefresh()
39 
44  function Output()
45  {
46  if ($this->State != PLUGIN_STATE_READY) {
47  return;
48  }
49  global $Plugins;
50  $P = &$Plugins[plugin_find_id("Default")];
51  $GoMod = GetParm("remod",PARM_STRING);
52  $GoOpt = GetParm("reopt",PARM_STRING);
53  $GoOpt = preg_replace("/--/","&",$GoOpt);
54  return($P->Output($GoMod,$GoOpt));
55  }
56 }
57 
58 $NewPlugin = new ui_refresh();
59 $NewPlugin->Initialize();
Traceback_parm($ShowMod=1)
Get the URI query to this location.
GetRefresh()
Generate a Refresh URL.
Definition: ui-refresh.php:31
Output()
This function is called when user output is requested. This function is responsible for content...
Definition: ui-refresh.php:44
Definition: state.hpp:26
GetParm($parameterName, $parameterType)
This function will retrieve the variables and check data types.
Definition: common-parm.php:57
const PARM_STRING
Definition: common-parm.php:29
This is the Plugin class. All plugins should:
Definition: FO_Plugin.php:67