make the phpgw Version-0_9_16-branch HEAD

This commit is contained in:
Ralf Becker
2003-08-28 14:31:11 +00:00
parent f76c6eedd7
commit b8557e49d9
984 changed files with 23863 additions and 36043 deletions

View File

@ -1,31 +1,31 @@
<?php
/**************************************************************************\
* phpGroupWare API - Link box generator *
* http://www.phpgroupware.org/api *
* Written by Mark Peters <skeeter@phpgroupware.org> *
* and Bettina Gille [ceb@phpgroupware.org] *
* Creates listboxes using templates *
* Copyright (C) 2000, 2001 Mark Peters *
* Copyright (C) 2002, 2003 Bettina Gille *
* ------------------------------------------------------------------------ *
* This library is part of the phpGroupWare API *
* http://www.phpgroupware.org *
* ------------------------------------------------------------------------ *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
* the Free Software Foundation; either version 2.1 of the License, *
* or any later version. *
* This library 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 Lesser General Public License for more details. *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
\**************************************************************************/
/* $Id$ */
/**************************************************************************\
* phpGroupWare API - Link box generator *
* http://www.phpgroupware.org/api *
* This file written by Mark Peters <skeeter@phpgroupware.org> *
* Creates listboxes using templates *
* Copyright (C) 2000, 2001 Mark Peters *
* -------------------------------------------------------------------------*
* This library is part of the phpGroupWare API *
* http://www.phpgroupware.org/api *
* ------------------------------------------------------------------------ *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
* the Free Software Foundation; either version 2.1 of the License, *
* or any later version. *
* This library 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 Lesser General Public License for more details. *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
\**************************************************************************/
/* $Id$ */
CreateObject('phpgwapi.portalbox');
class listbox extends portalbox
{
/*
@ -42,43 +42,24 @@
the parent class, I simply call the parent constructor. Of course,
if I then wanted to override any of the values, I could easily do so.
*/
function listbox()
function listbox($param)
{
$this->portalbox();
}
$this->setvar('classname','listbox');
$this->setvar('outerwidth',300);
$this->setvar('innerwidth',300);
$this->setvar('width',300);
function set_params($param)
{
$this->portalbox(True);
@reset($param);
while(list($key,$value) = each($param))
{
if($key != 'title')
if($key != 'title' && $key != 'primary' && $key != 'secondary' && $key != 'tertiary')
{
//echo 'Setting '.$key.':'.$value."<br>\n";
//echo 'Setting '.$key.':'.$value."<br>\n";
$this->setvar($key,$value);
}
}
$this->title = $param['title'];
if($param['app_id'])
{
$app_id = $this->getvar('app_id');
$var = Array
(
'up' => Array('url' => '/set_box.php', 'app' => $app_id),
'down' => Array('url' => '/set_box.php', 'app' => $app_id),
'close' => Array('url' => '/set_box.php', 'app' => $app_id),
'question' => Array('url' => '/set_box.php', 'app' => $app_id),
'edit' => Array('url' => '/set_box.php', 'app' => $app_id)
);
while(list($key,$value) = each($var))
{
$this->set_controls($key,$value);
}
}
$this->portalbox($param['title'], $param['primary'], $param['secondary'], $param['tertiary']);
$this->start_template();
}
/*
@ -87,45 +68,22 @@
*/
function draw($extra_data='')
{
if(is_array($this->data) && !empty($this->data))
if(count($this->data))
{
$this->p->parse('row','portal_listbox_header',True);
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']
$var = Array(
'text' => $this->data[$x]['text'],
'link' => $this->data[$x]['link']
);
$this->p->set_var($var);
$this->p->parse('row','portal_listbox_link',True);
}
$this->listbox = $var;
$this->p->parse('row','portal_listbox_footer',True);
}
$this->set_internal($extra_data);
$this->draw_box();
}
function xdraw($extra_data='')
{
if ($extra_data)
{
$this->start_template();
}
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();
return $this->draw_box();
}
}
?>