FOSSology  4.4.0
Open Source License Compliance by Open Source Software
ui-refresh.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 
8 class ui_refresh extends FO_Plugin
9 {
10  function __construct()
11  {
12  $this->Name = "refresh";
13  $this->LoginFlag = 0;
14  parent::__construct();
15  }
16 
20  function GetRefresh()
21  {
22  $Mod = GetParm("mod",PARM_STRING);
23  $parm = Traceback_parm(0);
24  $Opt = preg_replace("/&/","--",$parm);
25  $V = "mod=" . $this->Name . "&remod=$Mod" . "&reopt=$Opt";
26  return($V);
27  } // GetRefresh()
28 
33  function Output()
34  {
35  if ($this->State != PLUGIN_STATE_READY) {
36  return;
37  }
38  global $Plugins;
39  $P = &$Plugins[plugin_find_id("Default")];
40  $GoMod = GetParm("remod",PARM_STRING);
41  $GoOpt = GetParm("reopt",PARM_STRING);
42  $GoOpt = preg_replace("/--/","&",$GoOpt);
43  return($P->Output($GoMod,$GoOpt));
44  }
45 }
46 
47 $NewPlugin = new ui_refresh();
48 $NewPlugin->Initialize();
This is the Plugin class. All plugins should:
Definition: FO_Plugin.php:57
Definition: state.hpp:16
__construct()
base constructor. Most plugins will just use this
Definition: ui-refresh.php:10
GetRefresh()
Generate a Refresh URL.
Definition: ui-refresh.php:20
Output()
This function is called when user output is requested. This function is responsible for content.
Definition: ui-refresh.php:33
Traceback_parm($ShowMod=1)
Get the URI query to this location.
const PARM_STRING
Definition: common-parm.php:18
GetParm($parameterName, $parameterType)
This function will retrieve the variables and check data types.
Definition: common-parm.php:46