egroupware/phpgwapi/inc/class.help_helper.inc.php

104 lines
3.1 KiB
PHP
Raw Normal View History

2002-11-30 03:02:32 +01:00
<?php
/*******************************************************************\
* phpGroupWare API - help system manager *
* Written by Bettina Gille [ceb@phpgroupware.org] *
* Manager for the phpGroupWare help system *
2003-05-22 01:12:44 +02:00
* Copyright (C) 2002, 2003 Bettina Gille *
2002-11-30 03:02:32 +01:00
* ----------------------------------------------------------------- *
* This library is part of the phpGroupWare API *
2003-05-22 01:12:44 +02:00
* http://www.phpgroupware.org *
2002-11-30 03:02:32 +01:00
* ----------------------------------------------------------------- *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
\*******************************************************************/
/* $Id$ */
require_once('class.help.inc.php');
class help_helper extends help
{
function help_helper()
{
$this->help();
}
function set_params($param)
{
$this->help(True);
@reset($param);
while(list($key,$value) = each($param))
{
if($key != 'title')
{
//echo 'Setting '.$key.':'.$value."<br>\n";
$this->setvar($key,$value);
}
}
$this->title = $param['title'];
2002-12-01 04:35:02 +01:00
if(is_array($param['controls']))
2002-11-30 03:02:32 +01:00
{
2002-12-01 04:35:02 +01:00
while(list($key,$value) = each($param['controls']))
2002-11-30 03:02:32 +01:00
{
2002-12-01 04:35:02 +01:00
$this->set_controls('app',$key,$value);
2002-11-30 03:02:32 +01:00
}
2002-12-16 02:20:12 +01:00
$this->set_controls('base');
2002-11-30 03:02:32 +01:00
}
}
function draw($extra_data='')
{
if(is_array($this->data) && !empty($this->data))
{
for ($x = 0; $x < count($this->data); $x++)
{
$var[] = array
(
'text' => $this->data[$x]['text'],
'link' => $this->data[$x]['link'],
'lang_link_statustext' => $this->data[$x]['lang_link_statustext']
);
}
$this->listbox = $var;
}
$this->set_internal($extra_data);
$this->draw_box();
}
function xdraw($extra_data='')
{
if ($extra_data)
{
2002-12-01 04:35:02 +01:00
$this->start_template();
2002-11-30 03:02:32 +01:00
}
if(is_array($this->data) && !empty($this->data))
{
for ($x = 0; $x < count($this->data); $x++)
{
$var[] = array
(
'text' => $this->data[$x]['text'],
'link' => $this->data[$x]['link'],
'lang_link_statustext' => $this->data[$x]['lang_link_statustext']
);
}
$this->listbox = $var;
}
$this->set_xinternal($extra_data);
$this->draw_box();
}
}
?>