0) { ob_end_flush(); } require ('settings.inc'); $inpnam = implode("_",array("def",$wintyp)); // $xeader = implode("_",array("header",$wintyp)); $this->color_header = (${$inpnam}["thcolor"]) ? ${$inpnam}["thcolor"] : "#999999"; $this->color_bg = (${$inpnam}["tbcolor"]) ? ${$inpnam}["tbcolor"] : "#f0f0f0"; $this->font_title = (${$inpnam}["thfont"]) ? ${$inpnam}["thfont"] : "color=\"#ffffff\""; $this->font_main = (${$inpnam}["tbfont"]) ? ${$inpnam}["tbfont"] : "color=\"#000000\""; $this->columns = $locset; $this->ncols = 0; echo "color_bg."\">\n"; echo "color_header."\">\n"; $colnr = 0; if ( $wintyp == "clusdes" && $schema != "GLUE2" ) { $position = 3; $keys = array_keys($locset); unset($locset[$keys[$position]]); } foreach ( $locset as $colnam => $colwid) { if ( $colnam == "0" || $colnam == "help" ) continue; $this->ncols ++; $colnr++; $value = $colnam; if ( $schema == "GLUE2" && $value == "Queue") { $value = "Share Name"; } // Specific sorting links for the front module if ( $wintyp == "loadmon" ) { // Keep old arguments, if any, except of order $allargs = ""; foreach ( $_GET as $argm => $argval ) { if ( $argm == "order" ) continue; $allargs .= $argm."=".$argval."&"; } $str1 = "font_title.">".$value.""; if ( $colnr == 1 ) $value = $str1."country".$str2; elseif ( $colnr == 3 ) $value = $str1."cpu".$str2; elseif ( $colnr == 4 ) $value = $str1."grun".$str2; } $width = ($colwid)?$colwid:"1%"; echo "\n"; } echo "\n"; } /** * @return void * @param contents array * @desc Draws a table row */ function addrow( $contents, $bgcol="" ) { if ( count($contents) != $this->ncols ) { $this->adderror("Incompatible data"); return 1; } $this->contents = $contents; if ($bgcol) { echo "\n"; } else { echo "\n"; } foreach ($contents as $colent) { $value = $colent; echo "\n"; } echo "\n"; } /** * @return void * @param color string * @desc Draws a spanning row containing a spacer */ function addspacer( $color="#000000" ) { echo "\n"; echo ""; echo "\n"; } /** * @return void * @param errtxt string * @desc Draws a spanning row containing error message */ function adderror( $errtxt="Error", $bgcol="" ) { $this->errtxt = $errtxt; echo "\n"; echo ""; echo "\n"; } /** * @return void * @param errtxt string * @param nrows integer * @param color string * @desc Adds a cell spanning $nrows rows */ function rowspan( $nrows, $errtxt=" ", $color="#ffffcc" ) { $this->errtxt = $errtxt; $ncols = $this->ncols - 1; $nrows = $nrows + 1; echo "\n"; echo ""; echo ""; echo "\n"; } /** * @return void * @desc Closes a table */ function close() { echo "
font_title."> $value 
font_main."> $value 
ncols."\" bgcolor=\"$color\" height=\"0\">\"\"
ncols."\""; if ($bgcol) echo " bgcolor=\"$bgcol\""; echo ">font_main."> $errtxt
 $errtxt\"\"
\n"; # ob_end_flush(); ob_implicit_flush(FALSE); } } class LmTableSp extends LmTable { var $spcolor; /** * @return void * @param contents array * @param color string * @desc Draws a table row with a spacer above */ function addrow( $contents, $bgcol="", $color="#ffffff" ) { $ncols = count($contents); $this->contents = $contents; if ($bgcol) { echo "\n"; } else { echo "\n"; } foreach ($contents as $colent) { $value = $colent; echo "font_main."> $value \n"; } echo "\n"; echo "\n"; echo "\"\""; echo "\n"; } /** * @return void * @param errtxt string * @param color string * @desc Draws a spanning row containing error message */ function adderror( $errtxt="Error", $color="#ffffff", $bgcol="" ) { $this->errtxt = $errtxt; $ncols = $this->ncols; $tospan = $this->rowspan; if ( $tospan ) $ncols = $ncols - 1; echo "\n"; echo "\"\""; echo "\n"; echo "\n"; echo "ncols."\""; if ($bgcol) echo " bgcolor=\"$bgcol\""; echo ">font_main."> $errtxt"; echo "\n"; } /** * @return void * @param errtxt string * @param nrows integer * @param color string * @desc Adds a cell spanning $nrows rows */ function rowspan( $nrows, $errtxt=" ", $color="#ffffcc" ) { $this->errtxt = $errtxt; $ncols = $this->ncols - 1; $nrows = (2 * $nrows) + 1; echo "\n"; echo " $errtxt"; echo "\"\""; echo "\n"; } } class LmTableFree extends LmTableSp { /** * @return LmTableFree * @param headers array * @desc Starts an HTML table */ function __construct( $headers ) { ob_implicit_flush(0); ob_start(); $this->color_header = "#666666"; $this->color_bg = "#f0f0f0"; $this->font_title = "color=\"#ffffff\""; $this->font_main = "color=\"#000000\""; $this->columns = count($headers); $this->ncols = 0; echo "color_bg."\">\n"; echo "color_header."\">\n"; foreach ( $headers as $colnam ) { $this->ncols ++; $value = $colnam; $width = "1%"; echo "\n"; } echo "\n"; } } ?>
font_title."> $value