function drawHeadPage() { $inPlaceCmds = implode("','", $this->um->inPlaceCommands()); SB_Page::head(null, null, "SB_initPage( new Array('{$inPlaceCmds}'));\nSB_gWinPrefs = '" . $this->um->getParamB64('user', 'popup_params') . "';", "SB_onLoad();", '<meta name="viewport" content="width=320, user-scalable=no, minimum-scale=1">' . "\n"); $style = ''; if (SB_Page::isMSIE()) { //JIGSAW doesn't validate $style = ' style="filter: alpha(opacity=50);"'; } echo '<div id="dragNodeIcon"' . $style . '><img class="favicon" src="' . SB_Skin::imgsrc('node') . '" alt=""></div>' . "\r"; echo '<div id="dragLinkIcon"' . $style . '><img class="favicon" src="' . SB_Skin::imgsrc('link') . '" alt=""></div>' . "\r"; echo '<div id="hidden" class="hidden">' . "\r"; $this->drawJavaScriptData(); // Optimization for MSIE to keep images in the cache if (SB_Page::isMSIE()) { $images = array('collapse', 'connect', 'empty', 'filter', 'join', 'join_last', 'link', 'link_private', 'link_wrong_favicon', 'logo', 'menu', 'minus', 'minus_last', 'node', 'node_open', 'plus', 'plus_last', 'reload', 'reload_all', 'root', 'root_deleted', 'root_plus', 'root_transparent', 'search'); foreach ($images as $image) { echo ' ' . SB_Skin::img($image) . "\r"; } } echo "</div>\r"; }
static function targetWindow() { static $trg = null; if ($trg === null) { $target = SB_Page::isMSIE() || SB_Page::isOPERA() ? '_main' : '_content'; if (isset($_REQUEST['target'])) { $newtarget = $_REQUEST['target']; if (preg_match('/^\\w+/', $newtarget)) { $target = $newtarget; } } $trg = $target; } return $trg; }
function buildExportBookmarks() { $fields = array(); $writers = array(); $dirName = './inc/writers'; $dir = opendir($dirName); require_once './inc/writer.inc.php'; while (($fileName = readdir($dir)) !== false) { if (preg_match('/(\\w+)\\.inc\\.php$/i', $fileName, $reg)) { $name = $reg[1]; require_once $dirName . '/' . $fileName; if (!SB_safeVal($SB_writer_hidden, $name)) { $writers[$name] = array(SB_safeVal($SB_writer_title, $name), SB_safeVal($SB_writer_default, $name)); } } } closedir($dir); asort($writers); $fields['Select Output Format'] = array('name' => 'writer', 'type' => 'callback', 'function' => '_buildFeedBuildList', 'params' => array('name' => 'w', 'title' => SB_T('Select Output Format'), 'values' => $writers)); if (SB_Page::isMSIE()) { $fields['-raw1-'] = SB_P('command::export_bk_ie_hint') . '<br>'; } $fields['Codepage'] = array('type' => 'callback', 'function' => '_buildCodepage'); $fields['Sort Mode'] = array('name' => 'sort', 'type' => 'select', '_options' => '_buildFolderSortMode', '_select' => 'custom'); $fields['Order of Folders v. Bookmarks'] = array('name' => 'mix', 'type' => 'select', '_options' => '_buildMixMode', '_select' => $this->um->getParam('user', 'mix_mode')); $fields['Limit Number of Bookmarks'] = array('name' => 'max'); $fields['Limit Description Length'] = array('name' => 'len'); if ($this->um->getParam('config', 'use_hit_counter')) { $fields['Use Hit Counter'] = array('name' => 'hits', 'type' => 'checkbox', 'title' => SB_P('command::tooltip_hits')); } $fields['Exclude Root Folder'] = array('name' => 'exr', 'type' => 'checkbox', 'title' => SB_P('command::tooltip_exclude_root')); $fields['Ignore Private Bookmarks'] = array('name' => 'igp', 'type' => 'checkbox', 'title' => SB_P('command::tooltip_private')); $fields['Include Subfolders'] = array('name' => 'sd', 'type' => 'checkbox', 'checked' => null, 'title' => SB_P('command::tooltip_subdir')); $fields['Flatten the Hierarchy'] = array('name' => 'flat', 'type' => 'checkbox', 'title' => SB_P('command::tooltip_flat')); if (!SB_reqChk('doall')) { $fields['-hidden1-'] = array('name' => 'nid_acl', 'value' => SB_reqValInt('nid_acl')); } else { $fields['-hidden1-'] = array('name' => 'doall', 'value' => 1); } $fields['Add SiteBar Commands'] = array('name' => 'cmd', 'type' => 'checkbox', 'title' => SB_P('command::tooltip_cmd')); $fields['Download Bookmarks'] = array('type' => 'button'); $fields['Username'] = array('name' => 'username'); $fields['Password (visible to others)'] = array('name' => 'pass'); $fields['Show Feed URL'] = array('type' => 'button'); if (!count($writers)) { $this->error("No feed available!"); } return $fields; }