Ejemplo n.º 1
0
$meta = null;
if (isset($_GET['url'])) {
    $meta = '<meta http-equiv="refresh" content="0;url=integrator.php?lang=' . SB_GetLanguage() . '">';
}
SB_Page::head('Integrator', 'siteBarIndex', null, null, $meta);
if (isset($_GET['url'])) {
    exit;
}
// Include skin hook file
include_once SB_Skin::path() . '/hook.inc.php';
$hook = new SB_Hook();
$sponsor = new SB_SponsorInterface($hook);
$file = './inc/sponsor.inc.php';
if (is_file($file)) {
    include_once $file;
    $sponsor = new SB_Sponsor($hook);
}
$browser = SB_reqVal('browser');
$browsers = array('firefox' => array('label' => 'Mozilla Firefox', 'homepage' => 'http://www.mozilla.org/products/firefox/', 'platforms' => '9.0/All', 'usage' => '', 'exclude' => array(), 'extra' => array('sitebar_client', 'sitebar', 'sidebar', 'livebookmarks', 'search_engine', 'iframe', 'google')), 'konqueror' => array('label' => 'Konqueror', 'homepage' => 'http://www.konqueror.org/', 'platforms' => '3.x/Linux', 'usage' => '', 'exclude' => array(), 'extra' => array('sidebar_konqueror', 'iframe', 'google')), 'opera' => array('label' => 'Opera Web Browser', 'homepage' => 'http://www.opera.com/', 'platforms' => '9.5/WinXP', 'usage' => SB_P('integrator::usage_opera'), 'exclude' => array('dir'), 'extra' => array('hotlist', 'iframe', 'google')), 'msie' => array('label' => 'Microsoft Internet Explorer', 'homepage' => 'http://www.microsoft.com/windows/ie/default.mspx', 'platforms' => '8.0/Windows', 'usage' => '', 'exclude' => array(), 'extra' => array('install', 'uninstall', 'searchbar', 'iframe', 'google')), 'maxthon' => array('label' => 'Maxthon Tabbed Browser', 'homepage' => 'http://www.maxthon.com/', 'platforms' => '1.1.120/WinXP', 'usage' => '', 'exclude' => array(), 'extra' => array('maxthon_sidebar', 'maxthon_toolbar', 'iframe', 'google')), 'other' => array('label' => 'Linux Distro/Other Tools', 'homepage' => '', 'platforms' => 'Gentoo,Debian/PHP Layers Menu', 'usage' => '', 'exclude' => array('dir', 'window', 'popup', 'addpage'), 'extra' => array('gentoo', 'debian', 'phplm')));
$bookmarklet = "javascript:var w=window;var d=w.document;var cp=d.characterSet?d.characterSet:d.charset;" . "w.open('" . SB_Page::absBaseUrl() . "command.php?command=Add%20Bookmark" . "&amp;url='+escape(w.location.href)+'" . "&amp;name='+escape(d.title)+" . "(cp?'&amp;cp='+cp:''),'sbBmkWin','" . $um->getParamB64('user', 'popup_params') . "');void(0)";
$popup = "javascript:window.open('" . SB_Page::absBaseUrl() . "index.php" . "?target=_blank','sbPopWin'," . "'directories=no,width=220,height=600,left=0,top=0,scrollbars=yes,location=no,menubar=no, status=no, toolbar=no');void(0)";
$urlParts = parse_url(SB_Page::absBaseUrl());
$uniqName = preg_replace("/[^\\w]*/", "", $urlParts['host']);
$extra = array('sitebar_client' => array('label' => 'SiteBar Client', 'url' => 'https://addons.mozilla.org/firefox/3605/', 'desc' => SB_P('integrator::hint_sitebar')), 'livebookmarks' => array('label' => 'Live Bookmarks', 'url' => sprintf('%sindex.php?w=firefox&amp;mode=download', SB_Page::absBaseUrl()), 'desc' => SB_P('integrator::hint_livebookmarks')), 'sidebar' => array('label' => 'Sidebar', 'url' => sprintf("javascript:sidebar.addPanel('SiteBar','%sindex.php','')", SB_Page::absBaseUrl()), 'desc' => SB_P('integrator::hint_sidebar')), 'search_engine' => array('label' => 'Add Search Engine', 'url' => sprintf("javascript:void(window.sidebar.addSearchEngine('%s', '%s', '%s', '%s'))", SB_Page::absBaseUrl() . 'integrator.php?lang=' . SB_GetLanguage() . '&amp;search_engine=/sitebar' . $uniqName . '.src', SB_Page::absBaseUrl() . '' . SB_Skin::imgsrc('root_transparent') . '?rename=/sitebar' . $uniqName . '.png', strlen($um->getParamB64('config', 'feed_root_name')) ? $um->getParamB64('config', 'feed_root_name') : 'SiteBar', SB_T("Bookmarks")), 'desc' => SB_P('integrator::hint_search_engine')), 'sidebar_mozilla' => array('label' => 'Sidebar', 'url' => sprintf("javascript:sidebar.addPanel('SiteBar','%sindex.php','')", SB_Page::absBaseUrl()), 'desc' => SB_P('integrator::hint_sidebar_mozilla')), 'sidebar_konqueror' => array('label' => 'Sidebar', 'url' => null, 'desc' => SB_P('integrator::hint_sidebar_konqueror', SB_Page::absBaseUrl())), 'hotlist' => array('label' => 'Add to Panel', 'url' => SB_Page::absBaseUrl() . 'index.php', 'params' => array('title' => 'SiteBar', 'rel' => 'sidebar'), 'desc' => SB_P('integrator::hint_hotlist')), 'install' => array('label' => 'Install', 'url' => 'integrator.php?lang=' . SB_GetLanguage() . '&amp;install=1', 'desc' => SB_P('integrator::hint_install')), 'uninstall' => array('label' => 'Uninstall', 'url' => 'integrator.php?lang=' . SB_GetLanguage() . '&amp;install=0', 'desc' => SB_P('integrator::hint_uninstall')), 'searchbar' => array('label' => 'Show in Search Bar', 'url' => sprintf("javascript:void(_search=open('%sindex.php','_search'))", SB_Page::absBaseUrl()), 'desc' => SB_P('integrator::hint_searchbar')), 'maxthon_sidebar' => array('label' => 'Sidebar Plugin', 'url' => sprintf("http://sitebar.org/plugin/maxthon/?sidebar=%s", SB_Page::absBaseUrlShort()), 'desc' => SB_P('integrator::hint_maxthon_sidebar')), 'maxthon_toolbar' => array('label' => 'Toolbar Plugin', 'url' => sprintf("http://sitebar.org/plugin/maxthon/?toolbar=%s", SB_Page::absBaseUrlShort()), 'desc' => SB_P('integrator::hint_maxthon_toolbar')), 'gentoo' => array('label' => 'Gentoo Ebuild', 'url' => 'http://www.gentoo-portage.com/www-apps/sitebar', 'desc' => SB_P('integrator::hint_gentoo')), 'debian' => array('label' => 'Debian', 'url' => 'http://packages.debian.org/unstable/web/sitebar', 'desc' => SB_P('integrator::hint_debian')), 'phplm' => array('label' => 'PHP Layers Menu', 'url' => 'http://phplayersmenu.sourceforge.net/', 'desc' => SB_P('integrator::hint_phplm', sprintf('%sindex.php?w=phplm', SB_Page::absBaseUrl()))));
$general = array('addpage' => array('label' => 'Add Page to SiteBar', 'url' => $bookmarklet, 'desc' => SB_P('integrator::hint_addpage')), 'window' => array('label' => 'SiteBar', 'url' => SB_Page::absBaseUrl() . 'index.php', 'desc' => SB_P('integrator::hint_window')), 'dir' => array('label' => 'SiteBar Directory', 'url' => SB_Page::absBaseUrl() . 'index.php?w=dir', 'desc' => SB_P('integrator::hint_dir')), 'popup' => array('label' => 'SiteBar Pop-up', 'url' => $popup, 'desc' => SB_P('integrator::hint_popup')), 'iframe' => array('label' => 'SiteBar iframe', 'url' => SB_Page::absBaseUrl() . 'iframe.php', 'desc' => str_replace('<IFRAME>', '&lt;IFRAME&gt;', SB_P('integrator::hint_iframe', array(SB_Page::absBaseUrl() . 'iframe.php')))), 'google' => array('label' => 'Google Widget', 'url' => SB_Page::absBaseUrl() . 'google.php', 'desc' => SB_P('integrator::hint_google', array(SB_Page::absBaseUrl() . 'google.php'))));
?>

<div id="main">
<div id="launcher">

  <div>
Ejemplo n.º 2
0
    function drawFoot()
    {
        $this->writeMenu('user', $this->userMenu);
        $this->sw->stop();
        $stat = array();
        $timeDb = $this->um->db->sw->elapsed;
        if ($timeDb >= $this->sw->elapsed) {
            $timeDb = $this->sw->elapsed - 0.01;
        }
        if ($this->um->getParam('config', 'show_statistics') && (!$this->um->isAnonymous() || $this->um->getParam('config', 'allow_sign_up'))) {
            $stat = array('links_shown' => $this->linkCount, 'nodes_shown' => $this->nodeCount, 'queries' => $this->um->db->count, 'time_db' => number_format($timeDb, 2), 'time_total' => number_format($this->sw->elapsed, 2), 'time_pct' => intval($timeDb / $this->sw->elapsed * 100));
            $this->um->statistics($stat);
            $this->tree->statistics($stat);
        }
        $this->hook->foot($this->um->config['release'] . (SB_DEVELOPMENT ? '-svn' : ''), $stat, $this->um);
        $sponsor = new SB_SponsorInterface($this->hook);
        $file = './inc/sponsor.inc.php';
        if (is_file($file)) {
            include_once $file;
            $sponsor = new SB_Sponsor($this->hook);
        }
        ?>
    <div id="sponsorSitebarBottom"><?php 
        $sponsor->sitebarBottom();
        ?>
</div>
<?php 
        if ($this->hasErrors()) {
            // Cannot be defined by skin
            echo '<div style="margin-top: 50px; color:yellow; background: red;">';
            $this->writeErrors();
            echo '</div>';
        }
        SB_Page::foot();
    }