';
global $sys_show_source;
if ($sys_show_source) {
global $SCRIPT_NAME;
print util_make_link ('/source.php?file=' . $SCRIPT_NAME, _('Show source'), array ("class" => "showsource"));
}
echo '
';
}
function headerCSS() {
echo '
';
plugin_hook ('cssfile',$this);
}
function getRootIndex() {
return $this->rootindex;
}
/**
* boxTop() - Top HTML box
*
* @param string Box title
* @param bool Whether to echo or return the results
* @param string The box background color
*/
function boxTop($title, $id = '') {
$t_result = '
'. $title .'
';
return $t_result;
}
/**
* boxMiddle() - Middle HTML box
*
* @param string Box title
* @param string The box background color
*/
function boxMiddle($title, $id = '') {
$t_result ='
'.$title.'
';
return $t_result;
}
/**
* boxBottom() - Bottom HTML box
*
*/
function boxBottom() {
$t_result='
';
return $t_result;
}
/**
* boxGetAltRowStyle() - Get an alternating row style for tables
*
* @param int Row number
*/
function boxGetAltRowStyle($i) {
if ($i % 2 == 0) {
return 'class="bgcolor-white"';
} else {
return 'class="bgcolor-grey"';
}
}
/**
* listTableTop() - Takes an array of titles and builds the first row of a new table.
*
* @param array The array of titles
* @param array The array of title links
* @param boolean Whether to highlight or not the entry
*/
function listTableTop ($title_arr,$links_arr=false,$selected=false) {
$return = '
';
$count=count($title_arr);
if ($links_arr) {
for ($i=0; $i<$count; $i++) {
$return .= '
';
}
function tabGenerator($TABS_DIRS, $TABS_TITLES, $nested=false, $selected=false, $sel_tab_bgcolor='WHITE', $total_width='100%') {
$count=count($TABS_DIRS);
if ($count < 1) {
return;
}
// The width for each tab is given in percent. Note
// that an integer value is used as Opera doesn't seem
// to interpret fractional percentage values:
// http://www.christianmontoya.com/2007/06/26/fluid-widths-and-point-nine-nine-percent/
$width=intval((100/$count));
$rest_width=100-$count*$width;
$return = '
';
foreach($sectionsArray as $key => $section) {
$oldcountlines = $countLines;
if (is_array($section)) {
$countLines += (3 + count ($section));
} else {
$countLines += 3;
}
if ($countLines >= $break) {
//if the next block is so large that shifting it to the next column hits the breakpoint better
//the second part of statement (behind &&) proofs, that no 4th column is added
if ((($countLines - $break) >= ($break - $countLines)) && ((($break + $breakLimit)/$breakLimit) <= 3)) {
$return .= '
';
if ($countLines >= $break) {
if (($countLines - $break) < ($break - $countLines)) {
$return .= '
';
$break += $breakLimit;
}
}
}
return $return.'
';
}
/**
* beginSubMenu() - Opening a submenu.
*
* @return string Html to start a submenu.
*/
function beginSubMenu () {
$return = '
';
return $return;
}
/**
* endSubMenu() - Closing a submenu.
*
* @return string Html to end a submenu.
*/
function endSubMenu () {
$return = '
';
return $return;
}
/**
* printSubMenu() - Takes two array of titles and links and builds the contents of a menu.
*
* @param array The array of titles.
* @param array The array of title links.
* @return string Html to build a submenu.
*/
function printSubMenu ($title_arr,$links_arr) {
$count=count($title_arr);
$count--;
$return = '';
for ($i=0; $i<$count; $i++) {
$return .= util_make_link ($links_arr[$i], $title_arr[$i]) . ' | ';
}
$return .= util_make_link ($links_arr[$i], $title_arr[$i]);
return $return;
}
/**
* subMenu() - Takes two array of titles and links and build a menu.
*
* @param array The array of titles.
* @param array The array of title links.
* @return string Html to build a submenu.
*/
function subMenu ($title_arr,$links_arr) {
$return = $this->beginSubMenu () ;
$return .= $this->printSubMenu ($title_arr,$links_arr) ;
$return .= $this->endSubMenu () ;
return $return;
}
/**
* multiTableRow() - create a mutlilevel row in a table
*
* @param string the row attributes
* @param array the array of cell data, each element is an array,
* the first item being the text,
* the subsequent items are attributes (dont include
* the bgcolor for the title here, that will be
* handled by $istitle
* @param boolean is this row part of the title ?
*
*/
function multiTableRow($row_attr, $cell_data, $istitle) {
$return= '