Layout(); $this->imgroot = THEME_DIR.'/images/'; $this->jsroot = THEME_DIR.'/js/'; } /** * Layout() - Constructor */ function Layout() { // Constructor for parent class... if ( file_exists($GLOBALS['sys_custom_path'] . '/index_std.php') ) { $this->rootindex = $GLOBALS['sys_custom_path'] . '/index_std.php'; } else { $this->rootindex = $GLOBALS['gfwww'].'index_std.php'; } $this->Error(); } /** * header() - "steel theme" top of page * * @param array Header parameters array */ function header($params) { if (!isset($params['title'])) { $params['title'] = $GLOBALS['sys_name']; } else { $params['title'] = $GLOBALS['sys_name'] . ': ' . $params['title']; } print ''; echo '
'. util_make_link ('/', html_image('header/top-logo.png',192,54,array('alt'=>'FusionForge Home'))) .' |
'; echo $this->searchBox(); echo ' | '; if (session_loggedin()) { $u =& user_get_object(user_getid()); echo util_make_link ('/account/logout.php', sprintf("%s (%s)", _('Log Out'), $u->getRealName()), array('class'=>'userlink')); echo ' '; echo util_make_link ('/account/', _('My Account'), array('class'=>'userlink')); } else { $url = '/account/login.php'; if(getStringFromServer('REQUEST_METHOD') != 'POST') { $url .= '?return_to='; $url .= urlencode(getStringFromServer('REQUEST_URI')); } echo util_make_link ($url, _('Log In'),array('class'=>'userlink')); echo ' '; if (!$GLOBALS['sys_user_reg_restricted']) { echo util_make_link ('/account/register.php', _('New Account'),array('class'=>'userlink')); } } plugin_hook ('headermenu', $params); echo $this->quickNav(); echo ' |
'.$title_arr[$i].' | '; } } else { for ($i=0; $i<$count; $i++) { $return .= ''.$title_arr[$i].' | '; } } return $return.'
---|
' . "\n";
$return .= ' ' . "\n";
$return .= ' ' . "\n";
$return .= ''.$TABS_TITLES[$i].'' . "\n";
$return .= ' ';
$return .= ' | ' . "\n";
// right part
// if the next tab is not selected, close this tab
if ($selected != $i+1) {
$return .= '' . "\n";
$return .= ' ';
$parameters = array(
SEARCH__PARAMETER_GROUP_ID => $group_id,
SEARCH__PARAMETER_ARTIFACT_ID => $atid,
SEARCH__PARAMETER_FORUM_ID => $forum_id,
SEARCH__PARAMETER_GROUP_PROJECT_ID => $group_project_id
);
$searchManager =& getSearchManager();
$searchManager->setParametersValues($parameters);
$searchEngines =& $searchManager->getAvailableSearchEngines();
echo '
';
$parameters = $searchManager->getParameters();
foreach($parameters AS $name => $value) {
print '';
}
print '';
print '';
if (isset($group_id) && $group_id) {
print util_make_link ('/search/advanced_search.php?group_id='.$group_id, _('Advanced search'), array('class'=>'userlink'));
}
print ' ';
print '';
}
function advancedSearchBox($sectionsArray, $group_id, $words, $isExact) {
// display the searchmask
print '
';
//create javascript methods for select none/all
print '
';
}
function createUnderSections($sectionsArray) {
global $group_subsection_names;
$countLines = 0;
foreach ($sectionsArray as $section) {
if(is_array($section)) {
$countLines += (3 + count ($section));
} else {
//2 lines one for section name and one for checkbox
$countLines += 3;
}
}
$breakLimit = round($countLines/3);
$break = $breakLimit;
$countLines = 0;
$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= 'FONTCOLOR_HTMLBOX_TITLE.'">';
}
$return .= $cell_data[$c][0];
if ( $istitle ) {
$return .='';
}
$return .= ' | ';
}
$return .= ''.strip_tags($feedback, '';
}
}
/**
* getThemeIdFromName()
*
* @param string the dirname of the theme
* @return integer the theme id
*/
function getThemeIdFromName($dirname) {
$res=db_query_params ('SELECT theme_id FROM themes WHERE dirname=$1',
array($dirname));
return db_result($res,0,'theme_id');
}
}
// Local Variables:
// mode: php
// c-file-style: "bsd"
// End:
?>
|