function Messenger() { $this->ajax = SB_reqChk('ajax'); $this->um = SB_UserManager::staticInstance(); SB_Skin::set($this->um->getParam('user', 'skin')); $this->db =& $this->um->db; if (SB_reqChk('folder')) { $this->folder = SB_reqVal('folder'); } }
function SB_WriterInterface() { $this->um =& SB_UserManager::staticInstance(); $this->SB_Converter($this->um->getParam('config', 'use_conv_engine')); $this->tree =& SB_Tree::staticInstance(); // Set the default value accordingly $this->switches['hits'] = $this->um->getParam('config', 'use_hit_counter'); if (!isset($_SERVER['HTTPS']) && $this->um->getParam('user', 'private_over_ssl_only')) { $this->tree->skipPrivate = true; } SB_Skin::set($this->um->getParam('user', 'skin')); $this->sw = new SB_StopWatch(); $this->sw->start(); }
$url .= '&popup_params=' . $um->getParam('user', 'popup_params'); // Redirect to the central URL, or to the own URL with the information header('Location: ' . $url); exit; } // Now we have the information, we are on the right page and we will use cookies // We will redirect using META tag later on to support all browsers if (isset($_GET['url'])) { foreach (array('skin', 'version', 'url', 'popup_params') as $key) { $cookieName = 'sbi_' . $key; $_COOKIE[$cookieName] = $_REQUEST[$key]; setcookie($cookieName, $_REQUEST[$key]); } } SB_Page::absBaseUrl($_COOKIE['sbi_url']); SB_Skin::set($_COOKIE['sbi_skin']); if (preg_match('/^\\w+/', $_GET['lang'])) { SB_SetLanguage($_GET['lang']); } $um->setParam('user', $_COOKIE['popup_params']); if (isset($_REQUEST['install'])) { IEInstall(); exit; } if (isset($_REQUEST['search_engine'])) { SearchEngine(); exit; } // Redirect and keep cookies $meta = null; if (isset($_GET['url'])) {
function faviconReturn($favicon_md5, $lid = null, $refresh = false) { $ico = $this->faviconGet($favicon_md5, $lid, $refresh); // 30 days keep cached in browser $age = 60 * 60 * 24 * 30; if (!$ico) { // Sent wrong icon image SB_Skin::set($this->um->getParam('user', 'skin')); $ico = $this->file_get_contents(SB_Skin::imgsrc('link_wrong_favicon')); $age = 60 * 60 * 24; // Try tomorrow } if ($refresh) { $age = -1; } header('Accept-Ranges: bytes'); header('Cache-Control: public, max-age=' . $age); header('Content-Length: ' . strlen($ico)); $type = 'image/x-icon'; if (substr($ico, 0, 3) == 'GIF') { $type = 'image/gif'; } else { if (substr($ico, 6, 4) == 'JFIF') { $type = 'image/jpeg'; } else { if (substr($ico, 1, 3) == 'PNG') { $type = 'image/png'; } } } header('Content-Type: ' . $type); print $ico; }
$name = 'auto'; break; } echo '<option value="' . $name . '"' . ($label[1] ? ' selected' : '') . '>' . SB_T($label[0]) . "</option>\n"; } ?> </select> </div> <?php } } /******************************************************************************/ /******************************************************************************/ /******************************************************************************/ $cw = new SB_CommandWindow(); SB_Skin::set($cw->um->getParam('user', 'skin')); // On error no reloading and no closing if ($cw->hasErrors()) { $cw->reload = false; $cw->close = false; } $isIIS = strstr($_SERVER['SERVER_SOFTWARE'], 'IIS'); $metaClose = false; $metaTag = '<meta name="viewport" content="width=320, user-scalable=no">' . "\n"; if ($cw->close && $isIIS && in_array($cw->command, $cw->um->inPlaceCommands())) { $metaClose = true; $metaTag .= '<meta http-equiv="refresh" content="0;url=index.php' . $cw->getParams() . "\">\n"; } // On command success when auto close is required and we do not use IIS with // in place commands. if ($cw->close && !$cw->fields && !$metaClose) {