*
* -------------------------------------------- *
* This program 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. *
\**************************************************************************/
/* $Id$ */
class nextmatchs
{
// I split this up so it can be used in differant layouts.
function show($sn,$start,$total,$extra, $twidth, $bgtheme,
$search_obj=0,$filter_obj=1,$showsearch=1)
{
echo $this->tablestart($sn,$twidth, $bgtheme);
echo $this->left($sn,$start,$total,$extra);
if ($showsearch == 1)
{
echo $this->search($search_obj);
}
echo $this->filter($filter_obj);
echo $this->right($sn,$start,$total,$extra);
echo $this->tableend();
}
// --------------------------------------------------------------------
// same as show, only without direct output for use within templates
// *** the show function can be removed as soon as every program using
// nextmatch is converted to use template and show_tpl (loge)
// --------------------------------------------------------------------
function show_tpl($sn,$start,$total,$extra, $twidth, $bgtheme,
$search_obj=0,$filter_obj=1,$showsearch=1)
{
$var = $this->tablestart($sn,$twidth, $bgtheme);
$var .= $this->left($sn,$start,$total,$extra);
if ($showsearch == 1)
{
$var .= $this->search($search_obj);
}
$var .= $this->filter($filter_obj);
$var .= $this->right($sn,$start,$total,$extra);
$var .= $this->tableend();
return $var;
}
function tablestart($scriptname, $twidth="75%", $bgtheme="D3DCE3")
{
global $filter, $qfield, $start, $order, $sort, $query, $phpgw;
$str = "
\n";
if ($start != 0) {
// Changing the sorting order screaws up the starting number
if ( ($start - $maxmatchs) < 0)
$t_start = 0;
else
$t_start = ($start - $maxmatchs);
$str .= "