static function target($setdefault = null) { static $trg = null; if ($trg === null) { $trg = ' target="' . ($setdefault ? $setdefault : SB_Page::targetWindow()) . '"'; } return $trg; }
function drawToolBar() { // There must not be any place between the images, therefore // those funny tag endings. $coloring = 'onmousedown="SB_buttonDown(this);" ' . 'onmouseup="SB_buttonUp(this);" ' . 'onmouseover="SB_buttonOver(this);' . ($this->useToolTips ? 'SB_toolTip(this,event);' : '') . '" ' . 'onmouseout="SB_buttonOut(this);' . ($this->useToolTips ? 'SB_toolTipHide()' : '') . ';"'; $title = $this->useToolTips ? 'x_title' : 'title'; $favicon = ''; if ($this->um->getParam('user', 'use_search_engine')) { $favicon = $this->um->getParamB64('user', 'search_engine_ico'); if ($this->um->getParam('config', 'use_favicon_cache')) { $favicon = SB_Page::cdnBaseUrl() . "favicon.php?" . md5($favicon) . '=' . base64_encode($favicon); } } $usefilter = true; ?> <div id="toolbarPlace" class="hidden"></div> <div id="toolbar" class="cmnSubTitle"> <div id="tlbSearch"><input id="fldSearch" class="siteBarPageBackground" type="text" onkeyup="SB_storeSearch(this); var e=(event?event:window.event); if (e.keyCode==13) SB_defaultSearch('<?php echo SB_Page::targetWindow(); ?> ','<?php echo $this->um->getParam('user', 'default_search_tool'); ?> ');" value="<?php echo SB_safeVal($_COOKIE, 'SB3SEARCH'); ?> "><?php if ($usefilter) { ?> <img id="btnFilter" src="<?php echo SB_Skin::imgsrc('filter'); ?> " <?php echo $title; ?> ="<?php echo SB_T('Filter Loaded Bookmarks'); ?> " onclick="SB_filter(true)" <?php echo $coloring; ?> alt="F" ><?php } if (!$this->um->getParam('user', 'hide_xslt') || $this->um->getParam('user', 'use_search_engine')) { ?> <a href="<?php echo SB_Page::absBaseUrl(); ?> search.php" <?php echo SB_Page::target(); ?> ><img id="btnSearch" src="<?php echo SB_Skin::imgsrc('search'); ?> " <?php echo $title; ?> ="<?php echo SB_T('Backend Bookmark Search'); ?> " <?php echo $coloring; ?> alt="" ></a><?php } if ($this->um->getParam('user', 'use_search_engine')) { ?> <a href="<?php echo SB_Page::absBaseUrl(); ?> search.php?web=1" <?php echo SB_Page::target(); ?> ><img id="btnSearchWeb" src="<?php echo $favicon; ?> " <?php echo $title; ?> ="<?php echo SB_T('Search Web'); ?> " <?php echo $coloring; ?> alt="" ></a><?php } ?> </div> <div id="tlbOther"><img id="btnCollapse" src="<?php echo SB_Skin::imgsrc('collapse'); ?> " <?php echo $title; ?> ="<?php echo SB_T('Collapse/Expand All'); ?> " onclick="SB_collapseAll();" <?php echo $coloring; ?> alt="" ><?php if ($this->um->getParam('user', 'use_hiding')) { ?> <img id="btnReloadAll" src="<?php echo SB_Skin::imgsrc('reload_all'); ?> " <?php echo $title; ?> ="<?php echo SB_T('Reload with Hidden Folders'); ?> " onclick="SB_reloadAll();" <?php echo $coloring; ?> alt="" ><?php } ?> <img id="btnReload" src="<?php echo SB_Skin::imgsrc('reload'); ?> " <?php echo $title; ?> ="<?php echo SB_T('Reload'); ?> " onclick="SB_reloadPage();" <?php echo $coloring; ?> alt="" ></div> </div> <?php $msgFile = "./inc/message.inc.php"; if (is_file($msgFile)) { include $msgFile; } foreach ($this->um->plugins as $plugin) { if (isset($plugin['message']) && $plugin['message']) { include $plugin['dir'] . '/message.inc.php'; } } $messageCountNew = $this->um->messengerGetNewCount(); if ($messageCountNew != 0) { $readurl = SB_Page::relBaseUrl() . 'messenger.php'; $target = SB_Page::target(); $img = SB_Page::relBaseUrl() . 'skins/msg_new.gif'; $message = ''; if ($messageCountNew == 1) { $message = SB_T("You have a new message!"); } else { $message = SB_T("You have %d new messages!", array($messageCountNew)); } echo <<<_DOC <div class="cmnSubTitle" id="messengerInformation"> <a style="width:100%; color:black; text-decoration:none;" href="{$readurl}" {$target}>{$message}<img src="{$img}"></a> </div> _DOC; } $groups = $this->um->getPendingGroups(); if (!$this->um->isAnonymous() && count($groups)) { echo <<<_DOC <div class="cmnSubTitle" id="pendingInvitation"> _DOC; foreach ($groups as $gid => $rec) { $user = $this->um->getUser($rec['invitator']); $message = SB_P('sitebar::invitation', array($user['fullname'], $rec['name'])); $ahref = SB_Page::absBaseUrl() . 'command.php?command=Accept Membership&do=yes&gid=' . $gid; $atext = SB_T('Accept'); $rhref = SB_Page::absBaseUrl() . 'command.php?command=Reject Membership&do=yes&gid=' . $gid; $rtext = SB_T('Reject'); echo <<<_DOC <div> <table> <tr> <td class='pendingInvitationLabel'>{$message}</td> <td class='pendingInvitationButtons'> <span class='accept'><a href='{$ahref}'>{$atext}</a></span><br> <span class='reject'><a href='{$rhref}'>{$rtext}</a></span> </td> </tr> </table> </div> _DOC; } } echo "</div>\n"; }