mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 16:29:22 +01:00
Fixes for register_globals=off
This commit is contained in:
parent
d169912713
commit
f930048be4
@ -24,8 +24,8 @@
|
|||||||
/* */
|
/* */
|
||||||
/*********************************************/
|
/*********************************************/
|
||||||
|
|
||||||
class menutree {
|
class menutree
|
||||||
|
{
|
||||||
var $read_from_file; // You can send the tree info from a string or file
|
var $read_from_file; // You can send the tree info from a string or file
|
||||||
var $root_level_value; // This is what the top level name or image will be
|
var $root_level_value; // This is what the top level name or image will be
|
||||||
var $last_column_size;
|
var $last_column_size;
|
||||||
@ -50,15 +50,16 @@ var $last_column_size;
|
|||||||
|
|
||||||
function showtree($treefile, $expandlevels='', $num_menus = 50, $invisible_menus = Null)
|
function showtree($treefile, $expandlevels='', $num_menus = 50, $invisible_menus = Null)
|
||||||
{
|
{
|
||||||
global $phpgw_info, $phpgw, $SCRIPT_FILENAME, $REQUEST_URI;
|
$SCRIPT_FILENAME = $GLOBALS['HTTP_SERVER_VARS']['SCRIPT_FILENAME'];
|
||||||
|
$REQUEST_URI = $GLOBALS['HTTP_SERVER_VARS']['REQUEST_URI'];
|
||||||
|
|
||||||
$img_expand = $phpgw->common->image('manual','tree_expand.gif');
|
$img_expand = $GLOBALS['phpgw']->common->image('manual','tree_expand.gif');
|
||||||
$img_collapse = $phpgw->common->image('manual','tree_collapse.gif');
|
$img_collapse = $GLOBALS['phpgw']->common->image('manual','tree_collapse.gif');
|
||||||
$img_line = $phpgw->common->image('manual','tree_vertline.gif');
|
$img_line = $GLOBALS['phpgw']->common->image('manual','tree_vertline.gif');
|
||||||
$img_split = $phpgw->common->image('manual','tree_split.gif');
|
$img_split = $GLOBALS['phpgw']->common->image('manual','tree_split.gif');
|
||||||
$img_end = $phpgw->common->image('manual','tree_end.gif');
|
$img_end = $GLOBALS['phpgw']->common->image('manual','tree_end.gif');
|
||||||
$img_leaf = $phpgw->common->image('manual','tree_leaf.gif');
|
$img_leaf = $GLOBALS['phpgw']->common->image('manual','tree_leaf.gif');
|
||||||
$img_spc = $phpgw->common->image('manual','tree_space.gif');
|
$img_spc = $GLOBALS['phpgw']->common->image('manual','tree_space.gif');
|
||||||
|
|
||||||
/*********************************************/
|
/*********************************************/
|
||||||
/* Read text file with tree structure */
|
/* Read text file with tree structure */
|
||||||
@ -191,7 +192,6 @@ var $last_column_size;
|
|||||||
// $lastlevel=$tree[$i][0];
|
// $lastlevel=$tree[$i][0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*********************************************/
|
/*********************************************/
|
||||||
/* Determine visible nodes */
|
/* Determine visible nodes */
|
||||||
/*********************************************/
|
/*********************************************/
|
||||||
@ -240,7 +240,6 @@ var $last_column_size;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*********************************************/
|
/*********************************************/
|
||||||
/* Output nicely formatted tree */
|
/* Output nicely formatted tree */
|
||||||
/*********************************************/
|
/*********************************************/
|
||||||
@ -309,7 +308,7 @@ var $last_column_size;
|
|||||||
{
|
{
|
||||||
// $str = '<table cellspacing="0" cellpadding="0" border="0" cols="'.($maxlevel+3).'" width="'.($maxlevel*16+100).'">'."\n";
|
// $str = '<table cellspacing="0" cellpadding="0" border="0" cols="'.($maxlevel+3).'" width="'.($maxlevel*16+100).'">'."\n";
|
||||||
$str = '<table cellspacing="0" cellpadding="0" border="0" cols="'.($maxlevel+3).'" width="'.($maxlevel * 16 + $this->last_column_size).'">'."\n";
|
$str = '<table cellspacing="0" cellpadding="0" border="0" cols="'.($maxlevel+3).'" width="'.($maxlevel * 16 + $this->last_column_size).'">'."\n";
|
||||||
$str .= '<a href="' . $phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/index.php',$params) . '" target="_parent">' . $this->root_level_value . '</a>';
|
$str .= '<a href="' . $GLOBALS['phpgw']->link('/'.$GLOBALS['phpgw_info']['flags']['currentapp'].'/index.php',$params) . '" target="_parent">' . $this->root_level_value . '</a>';
|
||||||
$str .= "\n".'<tr>';
|
$str .= "\n".'<tr>';
|
||||||
for ($k=0; $k<$maxlevel; $k++)
|
for ($k=0; $k<$maxlevel; $k++)
|
||||||
{
|
{
|
||||||
@ -375,12 +374,12 @@ var $last_column_size;
|
|||||||
}
|
}
|
||||||
if($expand[$cnt]==0)
|
if($expand[$cnt]==0)
|
||||||
{
|
{
|
||||||
// $str .= '<td><a href="'.$phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/'.basename($SCRIPT_FILENAME),$params).'"><img src="'.$img_expand.'" border="no" alt="+"></a></td>';
|
// $str .= '<td><a href="'.$GLOBALS['phpgw']->link('/'.$GLOBALS['phpgw_info']['flags']['currentapp'].'/'.basename($SCRIPT_FILENAME),$params).'"><img src="'.$img_expand.'" border="no" alt="+"></a></td>';
|
||||||
$str .= '<td><a href="'.$src.$extra_param.$params.'"><img src="'.$img_expand.'" border="no" alt="+"></a></td>';
|
$str .= '<td><a href="'.$src.$extra_param.$params.'"><img src="'.$img_expand.'" border="no" alt="+"></a></td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// $str .= '<td><a href="'.$phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/'.basename($SCRIPT_FILENAME),$params).'"><img src="'.$img_collapse.'" border="no" alt="-"></a></td>';
|
// $str .= '<td><a href="'.$GLOBALS['phpgw']->link('/'.$GLOBALS['phpgw_info']['flags']['currentapp'].'/'.basename($SCRIPT_FILENAME),$params).'"><img src="'.$img_collapse.'" border="no" alt="-"></a></td>';
|
||||||
$str .= '<td><a href="'.$src.$extra_param.$params.'"><img src="'.$img_collapse.'" border="no" alt="-"></a></td>';
|
$str .= '<td><a href="'.$src.$extra_param.$params.'"><img src="'.$img_collapse.'" border="no" alt="-"></a></td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -395,7 +394,7 @@ var $last_column_size;
|
|||||||
/****************************************/
|
/****************************************/
|
||||||
/* output item text */
|
/* output item text */
|
||||||
/****************************************/
|
/****************************************/
|
||||||
$str .= '<td colspan="'.($maxlevel-$tree[$cnt][0]).'"><font face="'.$phpgw_info['theme']['font'].'" size="'.$text_size.'">';
|
$str .= '<td colspan="'.($maxlevel-$tree[$cnt][0]).'"><font face="'.$GLOBALS['phpgw_info']['theme']['font'].'" size="'.$text_size.'">';
|
||||||
if ($tree[$cnt][5]=='')
|
if ($tree[$cnt][5]=='')
|
||||||
{
|
{
|
||||||
if ($tree[$cnt][2]=='')
|
if ($tree[$cnt][2]=='')
|
||||||
|
Loading…
Reference in New Issue
Block a user