function print_statistic_result($date, $bar, $value, $width) { global $vbulletin; $bgclass = fetch_row_bgclass(); $style = 'width:' . $width . '%; ' . 'height:' . vB_Template_Runtime::fetchStyleVar('pollbar_height') . '; ' . 'border:' . vB_Template_Runtime::fetchStyleVar('pollbar_border') . '; ' . 'background:' . vB_Template_Runtime::fetchStyleVar('pollbar' . $bar . '_background') . '; '; echo '<tr><td width="0" class="' . $bgclass . '">' . $date . "</td>\n"; echo '<td width="100%" class="' . $bgclass . '" nowrap="nowrap"><div style="' . $style . '"> </div></td>' . "\n"; echo '<td width="0%" class="' . $bgclass . '" nowrap="nowrap">' . $value . "</td></tr>\n"; }
function print_statistic_result($date, $bar, $value, $width) { global $vbulletin; $bgclass = fetch_row_bgclass(); $style = 'width:' . $width . '%; ' . 'height: 23px; ' . 'border:' . vB_Template_Runtime::fetchStyleVar('poll_result_border') . '; ' . 'background:' . vB_Template_Runtime::fetchStyleVar('poll_result_color_' . str_pad(strval(intval($bar)), 2, '0', STR_PAD_LEFT)) . '; '; echo '<tr><td width="0" class="' . $bgclass . '">' . $date . "</td>\n"; echo '<td width="100%" class="' . $bgclass . '" nowrap="nowrap"><div style="' . $style . '"> </div></td>' . "\n"; echo '<td width="0%" class="' . $bgclass . '" nowrap="nowrap">' . $value . "</td></tr>\n"; }
/** * Shows the form for inline mod authentication. */ function show_inline_mod_login($showerror = false) { global $vbulletin, $vbphrase, $show; $show['inlinemod_form'] = true; $show['passworderror'] = $showerror; if (!$showerror) { $vbulletin->url = SCRIPTPATH; } $forumHome = vB_Library::instance('content_channel')->getForumHomeChannel(); eval(standard_error(fetch_error('nopermission_loggedin', $vbulletin->userinfo['username'], vB_Template_Runtime::fetchStyleVar('right'), vB::getCurrentSession()->get('sessionurl'), $vbulletin->userinfo['securitytoken'], vB5_Route::buildUrl($forumHome['routeid'] . 'home|fullurl')))); }
function str($str, $amp = false) { global $vbulletin; if ($amp) { $str = str_replace('&', '&', $str); } $charset = vB_Template_Runtime::fetchStyleVar('charset'); if ($charset == '') { $charset = 'ISO-8859-1'; } return to_utf8($str, $charset); }
public function output() { global $vbulletin, $db; // Smilies $result = $db->query_read_slave("\n\t\t\tSELECT smilietext AS text, smiliepath AS path, smilie.title, smilieid,\n\t\t\t\timagecategory.title AS category\n\t\t\tFROM " . TABLE_PREFIX . "smilie AS smilie\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)\n\t\t\tORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder\n\t\t"); $categories = array(); while ($smilie = $db->fetch_array($result)) { $categories[$smilie['category']][] = $smilie; } $data = array('bburl' => $vbulletin->options['bburl'], 'smilies' => $categories, 'logo' => vB_Template_Runtime::fetchStyleVar('titleimage'), 'colors' => array('titletext' => vB_Template_Runtime::fetchStyleVar('navbar_tab_color'), 'primarytext' => vB_Template_Runtime::fetchStyleVar('link_color'), 'secondarytext' => vB_Template_Runtime::fetchStyleVar('forumbits_text_color'), 'bodytext' => vB_Template_Runtime::fetchStyleVar('postbit_color'), 'highlighttext' => vB_Template_Runtime::fetchStyleVar('body_color'), 'background' => vB_Template_Runtime::fetchStyleVar('forumhead_background.backgroundColor'), 'foreground' => vB_Template_Runtime::fetchStyleVar('forumrow_background.backgroundColor'), 'buttoncolor' => vB_Template_Runtime::fetchStyleVar('control_background.backgroundColor'), 'highlightcolor' => vB_Template_Runtime::fetchStyleVar('notices_background.backgroundColor'))); return $data; }
function vB_XML_Builder($content_type = null, $charset = null) { if ($content_type) { $this->content_type = $content_type; } if ($charset == null) { $userinfo = vB_User::fetchUserinfo(); $charset = !empty($userinfo['lang_charset']) ? $userinfo['lang_charset'] : vB_Template_Runtime::fetchStyleVar('charset'); if (empty($charset)) { $charset = 'utf-8'; } } $this->charset = strtolower($charset) == 'iso-8859-1' ? 'windows-1252' : $charset; }
public function processed_output() { $output = $this->output(); if (!($charset = vB_Template_Runtime::fetchStyleVar('charset'))) { global $vbulletin; $charset = $vbulletin->userinfo['lang_charset']; } $lower_charset = strtolower($charset); if ($lower_charset != 'utf-8') { // Browsers tend to interpret character set iso-8859-1 as windows-1252 if ($lower_charset == 'iso-8859-1') { $lower_charset = 'windows-1252'; } $this->processregistered($output, $lower_charset); } return $output; }
function file_download($filestring, $filename, $filetype = 'application/octet-stream') { if (!isset($isIE)) { static $isIE; $isIE = iif(is_browser('ie') or is_browser('opera'), true, false); } if ($isIE and $filetype == 'application/octet-stream') { $filetype = 'application/octetstream'; } if (preg_match('~&#([0-9]+);~', $filename)) { if (function_exists('iconv')) { $filename = @iconv(vB_Template_Runtime::fetchStyleVar('charset'), 'UTF-8//IGNORE', $filename); } $filename = preg_replace_callback('~&#([0-9]+);~', 'convert_int_to_utf8_callback', $filename); $filename_charset = 'utf-8'; } else { $filename_charset = vB_Template_Runtime::fetchStyleVar('charset'); } $filename = preg_replace('#[\\r\\n]#', '', $filename); // Opera and IE have not a clue about this, mozilla puts on incorrect extensions. if (is_browser('mozilla')) { $filename = "filename*=" . $filename_charset . "''" . rawurlencode($filename); } else { // other browsers seem to want names in UTF-8 if ($filename_charset != 'utf-8' and function_exists('iconv')) { $filename = @iconv($filename_charset, 'UTF-8//IGNORE', $filename); } // Should just make this (!is_browser('ie')) if (is_browser('opera') or is_browser('konqueror') or is_browser('safari')) { // Opera / konqueror does not support encoded file names $filename = 'filename="' . str_replace('"', '', $filename) . '"'; } else { // encode the filename to stay within spec $filename = 'filename="' . rawurlencode($filename) . '"'; } } header('Content-Type: ' . $filetype); header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Content-Disposition: attachment; ' . $filename); header('Content-Length: ' . strlen($filestring)); header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); echo $filestring; exit; }
function construct_nav_group($title, $nav_file = 'vbulletin') { // creates a <select> or <table> for the left panel of index.php // (depending on value of $cpnavjs) global $_NAV, $_NAVPREFS, $vbulletin, $vbphrase, $options, $groupid; static $localphrase, $navlinks; if (VB_AREA == 'AdminCP') { if (!isset($groupid)) { $groupid = array(); $navlinks = implode(',', $_NAVPREFS); $localphrase = array('expand_group' => $vbphrase['expand_group'], 'collapse_group' => $vbphrase['collapse_group']); } if (!isset($groupid["{$nav_file}"])) { $groupid["{$nav_file}"] = 0; } if (in_array("{$nav_file}_" . $groupid["{$nav_file}"], $_NAVPREFS)) { $dowhat = 'collapse'; $style = ''; $tooltip = $localphrase['collapse_group']; } else { $dowhat = 'expand'; $style = 'display:none'; $tooltip = $localphrase['expand_group']; } $_NAV .= "\n\t<a name=\"grp{$nav_file}_{$groupid[$nav_file]}\"></a>\n\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"navtitle\" ondblclick=\"toggle_group('{$nav_file}_{$groupid[$nav_file]}'); return false;\">\n\t\t<tr>\n\t\t\t<td><strong>{$title}</strong></td>\n\t\t\t<td align=\"" . vB_Template_Runtime::fetchStyleVar('right') . "\">\n\t\t\t\t<a href=\"index.php?" . $vbulletin->session->vars['sessionurl'] . "do=buildnavprefs&nojs=" . $vbulletin->GPC['nojs'] . "&prefs={$navlinks}&dowhat={$dowhat}&id={$nav_file}_{$groupid[$nav_file]}#grp{$nav_file}_{$groupid[$nav_file]}\" target=\"_self\"\n\t\t\t\t\tonclick=\"toggle_group('{$nav_file}_{$groupid[$nav_file]}'); return false;\"\n\t\t\t\t\toncontextmenu=\"toggle_group('{$nav_file}_{$groupid[$nav_file]}'); save_group_prefs('{$nav_file}_{$groupid[$nav_file]}'); return false\"\n\t\t\t\t><img src=\"../cpstyles/" . $vbulletin->options['cpstylefolder'] . "/cp_{$dowhat}.gif\" title=\"{$tooltip}\" id=\"button_{$nav_file}_{$groupid[$nav_file]}\" alt=\"+\" border=\"0\" /></a>\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>"; $_NAV .= "\n\t\t<div id=\"group_{$nav_file}_{$groupid[$nav_file]}\" class=\"navgroup\" style=\"{$style}\">\n"; } else { $_NAV .= "\n\t\n\t\t<div class=\"navtitle\">{$title}</div>\n\t\t<div class=\"navgroup\">\n"; } foreach ($options as $link) { $_NAV .= $link; } $_NAV .= "\t\t</div>\n"; $options = array(); ++$groupid[$nav_file]; }
/** * Fetches the charset being used by the templater. * * @return string */ public function getCharset() { $charset = $this->charset; if ($charset == null) { if (!($charset = vB_Template_Runtime::fetchStyleVar('charset'))) { $charset = vB::$vbulletin->userinfo['lang_charset']; } } return $charset; }
$options['productdisable'] = $vbphrase['disable']; } else { $options['productenable'] = $vbphrase['enable']; } $options['productexport'] = $vbphrase['export']; $options['productdelete'] = $vbphrase['uninstall']; $safeid = preg_replace('#[^a-z0-9_]#', '', $product['productid']); if (file_exists(DIR . '/includes/version_' . $safeid . '.php')) { include_once DIR . '/includes/version_' . $safeid . '.php'; } $define_name = 'FILE_VERSION_' . strtoupper($safeid); if (defined($define_name) and constant($define_name) !== '') { $product['version'] = constant($define_name); } $i++; print_cells_row(array($title, htmlspecialchars_uni($product['version']), htmlspecialchars_uni($product['description']), "<div align=\"" . vB_Template_Runtime::fetchStyleVar('right') . "\">\r\n\t\t\t\t<select name=\"s{$product['productid']}\" id=\"prodsel{$i}\" onchange=\"js_page_jump({$i}, '{$product['productid']}')\" class=\"bginput\">\r\n\t\t\t\t\t" . construct_select_options($options) . "\r\n\t\t\t\t</select> <input type=\"button\" class=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_page_jump({$i}, '{$product['productid']}');\" />\r\n\t\t\t</div>"), false, '', -2); } print_table_footer(); echo '<p align="center">' . construct_link_code($vbphrase['add_import_product'], "plugin.php?" . $vbulletin->session->vars['sessionurl'] . "do=productadd") . '</p>'; } // ############################################################################# if ($_REQUEST['do'] == 'productversioncheck') { $vbulletin->input->clean_array_gpc('r', array('productid' => TYPE_STR)); $product = $db->query_first("\r\n\t\tSELECT *\r\n\t\tFROM " . TABLE_PREFIX . "product\r\n\t\tWHERE productid = '" . $db->escape_string($vbulletin->GPC['productid']) . "'\r\n\t"); if (!$product or empty($product['versioncheckurl'])) { print_stop_message('invalid_product_specified'); } $version_url = @parse_url($product['versioncheckurl']); if (!$version_url) { print_stop_message('invalid_version_check_url_specified'); }
function docompare3_print_control_form($inline, $wrap) { global $vbphrase, $vbulletin; $editlink = '?do=edit&templateid=' . $vbulletin->GPC['templateid'] . '&group=&searchstring=&expandset=5&showmerge=1'; print_form_header('template', 'docompare3', false, true, 'cpform', '90%', '', false); construct_hidden_code('templateid', $vbulletin->GPC['templateid']); construct_hidden_code('wrap', $wrap); construct_hidden_code('inline', $inline); print_table_header($vbphrase['display_options']); print_table_footer(2, '<div style="float:' . vB_Template_Runtime::fetchStyleVar('right') . '"><a href="' . $editlink . '" style="font-weight: bold">' . $vbphrase['merge_edit_link'] . '</a></div> <div align="' . vB_Template_Runtime::fetchStyleVar('left') . '"><input type="submit" name="switch_inline" class="submit" value="' . ($inline ? $vbphrase['view_side_by_side'] : $vbphrase['view_inline']) . '" accesskey="r" /> <input type="submit" name="switch_wrapping" class="submit" value="' . ($wrap ? $vbphrase['disable_wrapping'] : $vbphrase['enable_wrapping']) . '" accesskey="s" /></div>' ); }
if ($vbulletin->userinfo['userid'] > 0) { $pollvotes = $db->query_read_slave("\n\t\t\tSELECT voteoption\n\t\t\tFROM " . TABLE_PREFIX . "pollvote\n\t\t\tWHERE userid = " . $vbulletin->userinfo['userid'] . " AND pollid = {$pollid}\n\t\t"); if ($db->num_rows($pollvotes) > 0) { $uservoted = 1; } } if ($showresults or $uservoted) { if ($uservoted) { $uservote = array(); while ($pollvote = $db->fetch_array($pollvotes)) { $uservote["{$pollvote['voteoption']}"] = 1; } } } $left = vB_Template_Runtime::fetchStyleVar('left'); $right = vB_Template_Runtime::fetchStyleVar('right'); $option['open'] = $left[0]; $option['close'] = $right[0]; foreach ($splitvotes as $index => $value) { $arrayindex = $index + 1; $option['uservote'] = iif($uservote["{$arrayindex}"], true, false); $option['question'] = $bbcode_parser->parse($splitoptions["{$index}"], $forum['forumid'], true); // public link if ($pollinfo['public'] and $value) { $option['votes'] = '<a href="' . fetch_seo_url('poll', $pollinfo, array('do' => 'showresults')) . '">' . vb_number_format($value) . '</a>'; } else { $option['votes'] = vb_number_format($value); //get the vote count for the option } $option['number'] = $counter; //number of the option
foreach ($result as $permission) { $npermscache[$permission['nodeid']][$permission['groupid']] = $permission; } // get usergroup default permissions $permissions = array(); $usergroupcache = vB::getDatastore()->getValue('usergroupcache'); foreach ($usergroupcache as $usergroupid => $usergroup) { $permissions["{$usergroupid}"] = $usergroup['forumpermissions']; } //build_channel_permissions(); ?> <center> <div class="tborder" style="width: 100%"> <div class="alt1" style="padding: 8px"> <div class="darkbg" style="padding: 4px; border: 2px inset; text-align: <?php echo vB_Template_Runtime::fetchStyleVar('left'); ?> "> <?php // run the display function if ($vbulletin->options['cp_collapse_forums']) { ?> <script type="text/javascript"> <!-- function js_forum_jump(nodeid) { if (forumid > 0) { window.location = 'forumpermission.php?do=modify&n=' + nodeid; } }
/** * Prepares the appropriate url for a group icon. * The url is based on whether fileavatars are in use, and whether a thumb is required. * * @param array mixed $groupinfo - GroupInfo array of the group to fetch the icon for * @param boolean $thumb - Whether to return a thumb url * @param boolean $path - Whether to fetch the path or the url * @param boolean $force_file - Always get the file path as if it existed */ function fetch_socialgroupicon_url($groupinfo, $thumb = false, $path = false, $force_file = false) { global $vbulletin; $iconurl = false; if ($vbulletin->options['sg_enablesocialgroupicons']) { if (!$groupinfo['icondateline']) { return vB_Template_Runtime::fetchStyleVar('unknownsgicon'); } if ($vbulletin->options['usefilegroupicon'] or $force_file) { $iconurl = ($path ? $vbulletin->options['groupiconpath'] : $vbulletin->options['groupiconurl']) . ($thumb ? '/thumbs' : '') . '/socialgroupicon' . '_' . $groupinfo['groupid'] . '_' . $groupinfo['icondateline'] . '.gif'; } else { $iconurl = 'image.php?' . vB::getCurrentSession()->get('sessionurl') . 'groupid=' . $groupinfo['groupid'] . '&dateline=' . $groupinfo['icondateline'] . ($thumb ? '&type=groupthumb' : ''); } } return $iconurl; }
function vB_XML_Builder(&$registry, $content_type = null, $charset = null) { if (is_object($registry)) { $this->registry =& $registry; } else { trigger_error("vB_XML_Builder::Registry object is not an object", E_USER_ERROR); } if ($content_type) { $this->content_type = $content_type; } if ($charset == null) { $charset = $this->registry->userinfo['lang_charset'] ? $this->registry->userinfo['lang_charset'] : vB_Template_Runtime::fetchStyleVar('charset'); } $this->charset = strtolower($charset) == 'iso-8859-1' ? 'windows-1252' : $charset; }
/** * Constructor - checks that the registry object has been passed correctly. * * @param array Information about the content that owns these attachments * @param array List of attachments belonging to the specifed post * @param boolean Display download count * @param boolean View has permissions to download attachments * @param boolean Viewer has permission to get attachments * @param boolean Viewer has permission to set thumbnails * * @return void */ function process_attachments(&$post, &$attachments, $hidecounter = false, $canmod = false, $canget = true, $canseethumb = true, $linkonly = false) { global $show, $vbphrase; if (!empty($attachments)) { $show['modattachmentlink'] = ($canmod or $post['userid'] == $this->registry->userinfo['userid']); $show['attachments'] = true; $show['moderatedattachment'] = $show['thumbnailattachment'] = $show['otherattachment'] = false; $show['imageattachment'] = $show['imageattachmentlink'] = false; $attachcount = sizeof($attachments); $thumbcount = 0; if (!$this->registry->options['viewattachedimages']) { $showimagesprev = $this->registry->userinfo['showimages']; $this->registry->userinfo['showimages'] = false; } foreach ($attachments as $attachmentid => $attachment) { if ($canget and $canseethumb and $attachment['thumbnail_filesize'] == $attachment['filesize']) { // This is an image that is already thumbnail sized.. $attachment['hasthumbnail'] = 0; $attachment['forceimage'] = $this->registry->options['viewattachedimages'] ? $this->registry->userinfo['showimages'] : 0; } else { if (!$canseethumb) { $attachment['hasthumbnail'] = 0; } } $show['newwindow'] = $attachment['newwindow']; $attachment['filename'] = fetch_censored_text(htmlspecialchars_uni($attachment['filename'], false)); $attachment['attachmentextension'] = strtolower(file_extension($attachment['filename'])); $attachment['filesize'] = vb_number_format($attachment['filesize'], 1, true); if (vB_Template_Runtime::fetchStyleVar('dirmark')) { $attachment['filename'] .= vB_Template_Runtime::fetchStyleVar('dirmark'); } ($hook = vBulletinHook::fetch_hook('postbit_attachment')) ? eval($hook) : false; if ($attachment['state'] == 'visible') { if ($hidecounter) { $attachment['counter'] = $vbphrase['n_a']; $show['views'] = false; } else { $show['views'] = true; } $lightbox_extensions = array('gif', 'jpg', 'jpeg', 'jpe', 'png', 'bmp'); $ext = $linkonly ? null : $attachment['attachmentextension']; $attachmenturl = create_full_url("attachment.php?{$this->registry->session->vars['sessionurl']}attachmentid={$attachment['attachmentid']}&d={$attachment['dateline']}"); $imageurl = create_full_url("attachment.php?{$this->registry->session->vars['sessionurl']}attachmentid={$attachment['attachmentid']}&stc=1&d={$attachment['dateline']}"); $thumburl = create_full_url("attachment.php?{$this->registry->session->vars['sessionurl']}attachmentid={$attachment['attachmentid']}&stc=1&thumb=1&d={$attachment['thumbnail_dateline']}"); switch ($ext) { case 'gif': case 'jpg': case 'jpeg': case 'jpe': case 'png': case 'bmp': case 'tiff': case 'tif': case 'psd': case 'pdf': if (!$this->registry->userinfo['showimages']) { // Special case for PDF - don't list it as an 'image' if ($attachment['attachmentextension'] == 'pdf') { $templater = vB_Template::create('postbit_attachment'); $templater->register('attachment', $attachment); $templater->register('url', $attachmenturl); $post['otherattachments'] .= $templater->render(); $show['otherattachment'] = true; } else { $templater = vB_Template::create('postbit_attachment'); $templater->register('attachment', $attachment); $templater->register('url', $attachmenturl); $post['imageattachmentlinks'] .= $templater->render(); $show['imageattachmentlink'] = true; } } else { if ($this->registry->options['viewattachedimages'] == 1 or $this->registry->options['viewattachedimages'] == 2 and $attachcount > 1) { if ($attachment['hasthumbnail'] or !$canget and !in_array($attachment['attachmentextension'], array('tiff', 'tif', 'psd', 'pdf'))) { $thumbcount++; if ($this->registry->options['attachrow'] and $thumbcount >= $this->registry->options['attachrow']) { $thumbcount = 0; $show['br'] = true; } else { $show['br'] = false; } $show['cangetattachment'] = ($canget and in_array($attachment['attachmentextension'], $lightbox_extensions)); $templater = vB_Template::create('postbit_attachmentthumbnail'); $templater->register('attachment', $attachment); $templater->register('url', $attachmenturl); $templater->register('pictureurl', $thumburl); $post['thumbnailattachments'] .= $templater->render(); $show['thumbnailattachment'] = true; } else { if (!in_array($attachment['attachmentextension'], array('tiff', 'tif', 'psd', 'pdf')) and $attachment['forceimage']) { $templater = vB_Template::create('postbit_attachmentimage'); $templater->register('attachment', $attachment); $templater->register('url', $attachmenturl); $templater->register('pictureurl', $imageurl); $post['imageattachments'] .= $templater->render(); $show['imageattachment'] = true; } else { // Special case for PDF - don't list it as an 'image' if ($attachment['attachmentextension'] == 'pdf') { $templater = vB_Template::create('postbit_attachment'); $templater->register('attachment', $attachment); $templater->register('url', $attachmenturl); $post['otherattachments'] .= $templater->render(); $show['otherattachment'] = true; } else { $templater = vB_Template::create('postbit_attachment'); $templater->register('attachment', $attachment); $templater->register('url', $attachmenturl); $post['imageattachmentlinks'] .= $templater->render(); $show['imageattachmentlink'] = true; } } } } else { if (!in_array($attachment['attachmentextension'], array('tiff', 'tif', 'psd', 'pdf')) and ($this->registry->options['viewattachedimages'] == 3 or $this->registry->options['viewattachedimages'] == 2 and $attachcount == 1)) { $templater = vB_Template::create('postbit_attachmentimage'); $templater->register('attachment', $attachment); $templater->register('url', $attachmenturl); $templater->register('pictureurl', $imageurl); $post['imageattachments'] .= $templater->render(); $show['imageattachment'] = true; } else { $templater = vB_Template::create('postbit_attachment'); $templater->register('attachment', $attachment); $templater->register('url', $attachmenturl); $post['imageattachmentlinks'] .= $templater->render(); $show['imageattachmentlink'] = true; } } } break; default: $templater = vB_Template::create('postbit_attachment'); $templater->register('attachment', $attachment); $templater->register('url', $attachmenturl); $post['otherattachments'] .= $templater->render(); $show['otherattachment'] = true; } } else { $templater = vB_Template::create('postbit_attachment'); $templater->register('attachment', $attachment); $templater->register('url', $attachmenturl); $post['moderatedattachments'] .= $templater->render(); $show['moderatedattachment'] = true; } } if (!$this->registry->options['viewattachedimages']) { $this->registry->userinfo['showimages'] = $showimagesprev; } } else { $show['attachments'] = false; } }
function tagcp_format_tag_entry($tag, $synonyms_in_list) { global $vbulletin; $tagdm = datamanager_init('tag', $vbulletin, ERRTYPE_ARRAY); $tagdm->set_existing($tag); if (!$synonyms_in_list) { $label = $tag['tagtext']; $synonyms = $tagdm->fetch_synonyms(); if (count($synonyms)) { $list_id = 'synlist_' . $tag['tagid']; $synonym_list = '<span class="cbsubgroup-trigger" onclick="return js_show_synlist(this, \'' . $list_id . '\')">' . '<img src="../cpstyles/' . $vbulletin->options['cpstylefolder'] . '/collapse_generic_collapsed.gif" />'. '</span>'; $synonym_list .= '<ul class="cbsubgroup" id="' . $list_id . '" style="display:none">'; foreach ($synonyms as $synonym) { $synonym_list .= '<li>' . format_tag_list_item($synonym->fetch_field('tagid'), $synonym->fetch_field('tagtext')) . '</li>'; } $synonym_list .= '</ul>'; } } else { $canonical = $tagdm->fetch_canonical_tag(); if ($canonical) { $label = '<i>' . $tag['tagtext'] . '</i> (' . $canonical->fetch_field('tagtext') . ')'; } else { $label = $tag['tagtext']; } $synonym_list = ''; } $tag_item_text = format_tag_list_item($tag['tagid'], $label); return '<div id="tag' . $tag['tagid'] . '" class="alt1" style="float:' . vB_Template_Runtime::fetchStyleVar('left') . ';clear:' . vB_Template_Runtime::fetchStyleVar('left') . '">' . "\n" . $tag_item_text . "\n" . $synonym_list . "\n" . '</div>'; }
$pm['touser'] = fetch_touser_string($pm); $pm['folder'] = $foldernames["{$pm['folder']}"]; $pm['message'] = preg_replace("/(\r\n|\r|\n)/s", "\r\n", $pm['message']); $pm['message'] = fetch_censored_text($pm['message']); unset($pm['folder']); ($hook = vBulletinHook::fetch_hook('private_downloadpm_bit')) ? eval($hook) : false; $xml->add_group('privatemessage'); foreach ($pm as $key => $val) { $xml->add_tag($key, $val); } $xml->close_group(); } $xml->close_group(); } $xml->close_group(); $doc = "<?xml version=\"1.0\" encoding=\"" . vB_Template_Runtime::fetchStyleVar('charset') . "\"?>\r\n\r\n"; $doc .= "<!-- " . $vbulletin->options['bbtitle'] . ';' . $vbulletin->options['bburl'] . " -->\r\n"; // replace --/---/... with underscores for valid XML comments $doc .= '<!-- ' . construct_phrase($vbphrase['private_message_dump_for_user_x_y'], preg_replace('#(-(?=-)|(?<=-)-)#', '_', $vbulletin->userinfo['username']), vbdate($vbulletin->options['dateformat'] . ' ' . $vbulletin->options['timeformat'], TIMENOW)) . " -->\r\n\r\n"; $doc .= $xml->output(); $xml = null; // download the file file_download($doc, str_replace(array('\\', '/'), '-', "{$vbphrase['dump_privatemessages']}-" . $vbulletin->userinfo['username'] . "-" . vbdate($vbulletin->options['dateformat'], TIMENOW) . '.xml'), 'text/xml'); break; // ***************************** // download as CSV // ***************************** // download as CSV case 'csv': // column headers $csv = "{$vbphrase['date']},{$vbphrase['folder']},{$vbphrase['title']},{$vbphrase['dump_from']},{$vbphrase['dump_to']},{$vbphrase['message']}\r\n";
function fetch_iconinfo($iconid = 0) { global $vbulletin, $vbphrase, $vbulletin; $iconid = intval($iconid); switch ($iconid) { case -1: DEVDEBUG('returning poll icon'); return array('iconpath' => vB_Template_Runtime::fetchStyleVar('imgdir_misc') . "/poll_posticon.gif", 'title' => $vbphrase['poll']); case 0: if (!empty($vbulletin->options['showdeficon'])) { DEVDEBUG("returning default icon"); return array('iconpath' => $vbulletin->options['showdeficon'], 'title' => ''); } else { return false; } default: if ($vbulletin->iconcache !== null) { // we can get the icon info from the template cache DEVDEBUG("returning iconid:{$iconid} from the template cache"); return $vbulletin->iconcache["{$iconid}"]; } else { // we have to get the icon from a query DEVDEBUG("QUERYING iconid:{$iconid})"); return $vbulletin->db->query_first_slave("\n\t\t\t\t\tSELECT title, iconpath\n\t\t\t\t\tFROM " . TABLE_PREFIX . "icon\n\t\t\t\t\tWHERE iconid = {$iconid}\n\t\t\t\t"); } } }
$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY); $userdata->set('username', $vbulletin->GPC['username']); if (!empty($userdata->errors)) { $status = "invalid"; $message = ""; $image = vB_Template_Runtime::fetchStyleVar('imgdir_misc') . "/cross.png"; foreach ($userdata->errors AS $index => $error) { $message .= "$error"; } } else { $status = "valid"; $image = vB_Template_Runtime::fetchStyleVar('imgdir_misc') . "/tick.png"; $message = $vbphrase['username_is_valid']; } $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml'); $xml->add_group('response'); $xml->add_tag('status', $status); $xml->add_tag('image', $image); $xml->add_tag('message', $message); $xml->close_group(); $xml->print_xml(); } // grabbing bb codes for quoting on quick reply if ($_POST['do'] == 'getquotes') {
print_stop_message2('invalid_user_specified'); } $vbulletin->GPC['username'] = vB_String::unHtmlSpecialChars($userinfo['username']); } else { $userid = 0; } } if ($vbulletin->GPC['ipaddress'] or $userid) { if ($vbulletin->GPC['ipaddress']) { print_form_header('', ''); print_table_header(construct_phrase($vbphrase['ip_address_search_for_ip_address_x'], $vbulletin->GPC['ipaddress'])); $hostname = @gethostbyaddr($vbulletin->GPC['ipaddress']); if (!$hostname or $hostname == $vbulletin->GPC['ipaddress']) { $hostname = $vbphrase['could_not_resolve_hostname']; } print_description_row("<div style=\"margin-" . vB_Template_Runtime::fetchStyleVar('left') . ":20px\"><a href=\"usertools.php?" . vB::getCurrentSession()->get('sessionurl') . "do=gethost&ip=" . $vbulletin->GPC['ipaddress'] . "\">" . $vbulletin->GPC['ipaddress'] . "</a> : <b>{$hostname}</b></div>"); $results = construct_ip_usage_table($vbulletin->GPC['ipaddress'], 0, $vbulletin->GPC['depth']); print_description_row($vbphrase['post_ip_addresses'], false, 2, 'thead'); print_description_row($results ? $results : $vbphrase['no_matches_found_gerror']); $results = construct_ip_register_table($vbulletin->GPC['ipaddress'], 0, $vbulletin->GPC['depth']); print_description_row($vbphrase['registration_ip_addresses'], false, 2, 'thead'); print_description_row($results ? $results : $vbphrase['no_matches_found_gerror']); print_table_footer(); } if ($userid) { print_form_header('', ''); print_table_header(construct_phrase($vbphrase['ip_address_search_for_user_x'], htmlspecialchars_uni($vbulletin->GPC['username']))); print_label_row($vbphrase['registration_ip_address'], $userinfo['ipaddress'] ? $userinfo['ipaddress'] : $vbphrase['n_a']); $results = construct_user_ip_table($userid, 0, $vbulletin->GPC['depth']); print_description_row($vbphrase['post_ip_addresses'], false, 2, 'thead'); print_description_row($results ? $results : $vbphrase['no_matches_found_gerror']);
if (!$pages) { $pages = 1; } print_form_header('attachment', 'search', 0, 1); construct_hidden_code('prevsearch', $vbulletin->GPC['prevsearch']); construct_hidden_code('prunedate', $vbulletin->GPC['prunedate']); construct_hidden_code('pagenum', $vbulletin->GPC['pagenum']); print_table_header(construct_phrase($vbphrase['showing_attachments_x_to_y_of_z'], ($vbulletin->GPC['pagenum'] - 1) * $vbulletin->GPC['search']['results'] + 1, iif($vbulletin->GPC['search']['results'] * $vbulletin->GPC['pagenum'] > $attachments['count'], $attachments['count'], $vbulletin->GPC['search']['results'] * $vbulletin->GPC['pagenum']), $attachments['count']), 7); print_cells_row(array('<input type="checkbox" name="allbox" title="' . $vbphrase['check_all'] . '" onclick="js_check_all(this.form);" />', $vbphrase['filename'], $vbphrase['username'], $vbphrase['date'], $vbphrase['filesize'], $vbphrase['downloads'], $vbphrase['controls']), 1); $currentrow = 1; $attachmultiple = new vB_Attachment_Display_Multiple($vbulletin); $attachments = $attachmultiple->fetch_results(implode(" AND ", $query), false, ($vbulletin->GPC['pagenum'] - 1) * $vbulletin->GPC['search']['results'], $vbulletin->GPC['search']['results'], $vbulletin->GPC['search']['orderby'], $vbulletin->GPC['search']['ordering']); foreach ($attachments as $attachment) { $cell = array(); $cell[] = "<input type=\"checkbox\" name=\"a_delete[]\" value=\"{$attachment['attachmentid']}\" tabindex=\"1\" />"; $cell[] = "<p align=\"" . vB_Template_Runtime::fetchStyleVar('left') . "\"><a href=\"../attachment.php?" . $vbulletin->session->vars['sessionurl'] . "attachmentid={$attachment['attachmentid']}&d={$attachment['dateline']}\">" . fetch_censored_text(htmlspecialchars_uni($attachment['filename'], false)) . '</a></p>'; $cell[] = iif($attachment['userid'], "<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u={$attachment['userid']}\">{$attachment['username']}</a>", $attachment['username']); $cell[] = vbdate($vbulletin->options['dateformat'], $attachment['dateline']) . construct_link_code($vbphrase['view_content'], $attachmultiple->fetch_content_url($attachment, '../'), true); $cell[] = vb_number_format($attachment['filesize'], 1, true); $cell[] = $attachment['counter']; $cell[] = '<span class="smallfont">' . construct_link_code($vbphrase['edit'], "attachment.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&attachmentid={$attachment['attachmentid']}") . construct_link_code($vbphrase['delete'], "attachment.php?" . $vbulletin->session->vars['sessionurl'] . "do=delete&attachmentid={$attachment['attachmentid']}") . '</span>'; print_cells_row($cell); $currentrow++; if ($currentrow > $vbulletin->GPC['search']['results']) { break; } } print_description_row('<input type="submit" class="button" name="massdelete" value="' . $vbphrase['delete_selected_attachments'] . '" tabindex="1" />', 0, 7, '', 'center'); $db->free_result($results); if ($pages > 1 and $vbulletin->GPC['pagenum'] < $pages) { print_table_footer(7, iif($vbulletin->GPC['pagenum'] > 1, "<input type=\"submit\" name=\"prev_page\" class=\"button\" tabindex=\"1\" value=\"{$vbphrase['prev_page']}\" accesskey=\"s\" />") . "\n<input type=\"submit\" name=\"next_page\" class=\"button\" tabindex=\"1\" value=\"{$vbphrase['next_page']}\" accesskey=\"s\" />");
/** * Renders the output after preperation. * @see vB_Template::render() * * @param boolean Whether to suppress the HTML comment surrounding option (for JS, etc) * @return string */ protected function render_output($suppress_html_comments = false, $nopermissioncheck = false) { if (!($charset = vB_Template_Runtime::fetchStyleVar('charset'))) { global $vbulletin; $charset = $vbulletin->userinfo['lang_charset']; } $lower_charset = strtolower($charset); if ($lower_charset != 'utf-8') { // Browsers tend to interpret character set iso-8859-1 as windows-1252 if ($lower_charset == 'iso-8859-1') { $lower_charset = 'windows-1252'; } $this->processregistered($this->registered, $lower_charset); } return json_encode($this->registered); }
} // ############################################################################# // list existing ads if ($_REQUEST['do'] == 'modify') { print_form_header('ad', 'quickupdate'); print_column_style_code(array('width:100%', 'white-space:nowrap')); print_table_header($vbphrase['ad_manager']); $ad_result = $db->query("SELECT * FROM " . TABLE_PREFIX . "ad ORDER BY displayorder, title"); $ad_count = $db->num_rows($ad_result); if ($ad_count) { print_description_row('<label><input type="checkbox" id="allbox" checked="checked" />' . $vbphrase['toggle_active_status_for_all'] . '</label><input type="image" src="../' . $vbulletin->options['cleargifurl'] . '" name="normalsubmit" />', false, 2, 'thead" style="font-weight:normal; padding:0px 4px 0px 4px'); while ($ad = $db->fetch_array($ad_result)) { print_label_row('<a href="ad.php?' . $vbulletin->session->vars['sessionurl'] . 'do=locate&editloc=1&ad_location=' . $ad['adlocation'] . '&adid=' . $ad['adid'] . '" title="' . $vbphrase['edit_ad'] . '">' . $ad['title'] . '</a>', '<div style="white-space:nowrap">' . '<label class="smallfont"><input type="checkbox" name="active[' . $ad['adid'] . ']" value="1"' . ($ad['active'] ? ' checked="checked"' : '') . ' />' . $vbphrase['active'] . '</label> ' . '<input type="image" src="../cpstyles/' . $vbulletin->options['cpstylefolder'] . '/move_down.gif" name="displayorderswap[' . $ad['adid'] . ',higher]" />' . '<input type="text" name="displayorder[' . $ad['adid'] . ']" value="' . $ad['displayorder'] . '" class="bginput" size="4" title="' . $vbphrase['display_order'] . '" style="text-align:' . vB_Template_Runtime::fetchStyleVar('right') . '" />' . '<input type="image" src="../cpstyles/' . $vbulletin->options['cpstylefolder'] . '/move_up.gif" name="displayorderswap[' . $ad['adid'] . ',lower]" />' . construct_link_code($vbphrase['edit'], 'ad.php?' . $vbulletin->session->vars['sessionurl'] . 'do=locate&editloc=1&ad_location=' . $ad['adlocation'] . '&adid=' . $ad['adid']) . construct_link_code($vbphrase['delete'], 'ad.php?' . $vbulletin->session->vars['sessionurl'] . 'do=delete&adid=' . $ad['adid']) . '</div>'); } } print_label_row('<input type="button" class="button" value="' . $vbphrase['add_new_ad'] . '" onclick="window.location=\'ad.php?' . $vbulletin->session->vars['sessionurl'] . 'do=locate\';" />', $ad_count ? '<div align="' . vB_Template_Runtime::fetchStyleVar('right') . '"><input type="submit" class="button" accesskey="s" value="' . $vbphrase['save'] . '" /> <input type="reset" class="button" accesskey="r" value="' . $vbphrase['reset'] . '" /></div>' : ' ', 'tfoot'); print_table_footer(); ?> <script type="text/javascript"> <!-- function toggle_all_active(e) { for (var i = 0; i < this.form.elements.length; i++) { if (this.form.elements[i].type == "checkbox" && this.form.elements[i].name.substr(0, 6) == "active") { this.form.elements[i].checked = this.checked; } } }
function do_login_redirect() { global $vbulletin, $vbphrase; $vbulletin->input->fetch_basepath(); if ( $vbulletin->url == 'login.php' OR $vbulletin->url == $vbulletin->options['forumhome'] . '.php' OR strpos($vbulletin->url, 'do=logout') !== false OR (!$vbulletin->options['allowmultiregs'] AND strpos($vbulletin->url, $vbulletin->basepath . 'register.php') === 0) ) { $vbulletin->url = $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q']; } else { $vbulletin->url = fetch_replaced_session_url($vbulletin->url); $vbulletin->url = preg_replace('#^/+#', '/', $vbulletin->url); // bug 3654 don't ask why } $temp = strpos($vbulletin->url, '?'); if ($temp) { $formfile = substr($vbulletin->url, 0, $temp); } else { $formfile =& $vbulletin->url; } $postvars = $vbulletin->GPC['postvars']; ($hook = vBulletinHook::fetch_hook('login_redirect')) ? eval($hook) : false; // recache the global group to get the stuff from the new language $globalgroup = $vbulletin->db->query_first_slave(" SELECT phrasegroup_global, languagecode, charset FROM " . TABLE_PREFIX . "language WHERE languageid = " . intval($vbulletin->userinfo['languageid'] ? $vbulletin->userinfo['languageid'] : $vbulletin->options['languageid']) ); if ($globalgroup) { $vbphrase = array_merge($vbphrase, unserialize($globalgroup['phrasegroup_global'])); if (vB_Template_Runtime::fetchStyleVar('charset') != $globalgroup['charset']) { // change the character set in a bunch of places - a total hack global $headinclude; $headinclude = str_replace( "content=\"text/html; charset=" . vB_Template_Runtime::fetchStyleVar('charset') . "\"", "content=\"text/html; charset=$globalgroup[charset]\"", $headinclude ); vB_Template_Runtime::addStyleVar('charset', $globalgroup['charset'], 'imgdir'); $vbulletin->userinfo['lang_charset'] = $globalgroup['charset']; exec_headers(); } if ($vbulletin->GPC['postvars']) { $postvars = @unserialize(verify_client_string($vbulletin->GPC['postvars'])); if ($postvars['securitytoken'] = 'guest') { $vbulletin->userinfo['securitytoken_raw'] = sha1($vbulletin->userinfo['userid'] . sha1($vbulletin->userinfo['salt']) . sha1(COOKIE_SALT)); $vbulletin->userinfo['securitytoken'] = TIMENOW . '-' . sha1(TIMENOW . $vbulletin->userinfo['securitytoken_raw']); $postvars['securitytoken'] = $vbulletin->userinfo['securitytoken']; $vbulletin->GPC['postvars'] = sign_client_string(serialize($postvars)); } } vB_Template_Runtime::addStyleVar('languagecode', $globalgroup['languagecode']); } eval(print_standard_redirect('redirect_login', true, true, $vbulletin->userinfo['languageid'])); }
/** * Gets a cache key * @param int * * @return string */ protected function getHash($widgetid) { if (!($charset = vB_Template_Runtime::fetchStyleVar('charset'))) { $charset = vB::$vbulletin->userinfo['lang_charset']; } $context = new vB_Context('widget' , array('widgetid' => $widgetid, 'charset' => $charset)); return strval($context); }
function fetch_reminders_array2() { // prints out all reminders for the appropriate control panel global $vbulletin, $permissions, $vbphrase; if ($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) { $condition = ''; } else { $condition = 'AND allowmodcp = 1'; } $reminders = $vbulletin->db->query_read("\n\t\tSELECT * FROM " . TABLE_PREFIX . "adminreminder\n\t\tWHERE duedate < " . (TIMENOW + 7 * 86400) . "\n\t\t{$condition} ORDER BY duedate\n\t"); if ($vbulletin->db->num_rows($reminders)) { print_form_header(iif(VB_AREA == 'AdminCP', '../modcp/reminder', 'reminder'), 'docompleted'); print_table_header($vbphrase['adminfunctions_getreminders2_header'], 4); print_cells_row(array($vbphrase['adminfunctions_getreminders2_duedate'], $vbphrase['event'], $vbphrase['edit'], $vbphrase['status']), 1, 0, -1); while ($reminder = $vbulletin->db->fetch_array($reminders)) { if ($reminder['completed'] == 0) { if ($reminder['duedate'] < TIMENOW) { $date = '<b class="col-i">%s</b>'; $status = '<b>' . $vbphrase['adminfunctions_getreminders2_overdue'] . '</b>'; $hint = $vbphrase['adminfunctions_getreminders2_completed']; $checkbox = ''; } else { $date = '%s'; $status = 'Pending'; $hint = $vbphrase['adminfunctions_getreminders2_completed']; $checkbox = ''; } } else { $date = '%s'; $status = $vbphrase['adminfunctions_getreminders2_complete']; $hint = $vbphrase['adminfunctions_getreminders2_delete']; $checkbox = ' checked="checked" disabled="disabled"'; } $cell = array(); $cell[] = '<p class="smallfont" style="white-space:nowrap">' . sprintf($date, vbdate("M jS 'y", $reminder['duedate'])) . '</p>'; $cell[] = '<p class="smallfont">' . $reminder['title'] . '</p>'; //$cell[] = '<span class="smallfont">'.construct_link_code($status, $link, 0, $hint) . '</span>'; $cell[] = '<p class="smallfont">' . construct_link_code($vbphrase['edit'], "reminder.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&id[{$reminder['adminreminderid']}]=1") . '</p>'; $cell[] = '<p class="smallfont" style="text-align:' . vB_Template_Runtime::fetchStyleVar('right') . '">' . $status . '<input type="checkbox" name="id[' . $reminder['adminreminderid'] . ']" value="1" tabindex="1"' . $checkbox . ' /></p>'; print_cells_row($cell, 0, '', -2); } print_submit_row($vbphrase['adminfunctions_getreminders2_delcomplete'], 0, 4); } unset($reminder); $vbulletin->db->free_result($reminders); }
if ($filename_conv !== false) { $filename = $filename_conv; } } $filename = preg_replace( '~&#([0-9]+);~e', "convert_int_to_utf8('\\1')", $filename ); $filename_charset = 'utf-8'; } else { $filename_charset = vB_Template_Runtime::fetchStyleVar('charset'); } $filename = preg_replace('#[\r\n]#', '', $filename); // Opera and IE have not a clue about this, mozilla puts on incorrect extensions. if (is_browser('mozilla')) { $filename = "filename*=" . $filename_charset . "''" . rawurlencode($filename); } else { // other browsers seem to want names in UTF-8 if ($filename_charset != 'utf-8' AND function_exists('iconv')) { $filename_conv = iconv($filename_charset, 'UTF-8//IGNORE', $filename);
/** * Prints a block of controls for editing a CSS item on css.php?do=edit * * @param string Item title * @param string Item description * @param array Item info array * @param boolean Print links edit section * @param boolean Print table break */ function print_css_row($title, $description, $item, $dolinks = false, $restarttable = true) { global $bgcounter, $css, $css_info, $color, $vbphrase, $vbulletin; static $item_js; ++$item_js; $color = fetch_inherited_color($css_info["$item"], $vbulletin->GPC['dostyleid']); $title = htmlspecialchars_uni($title); switch ($css_info["$item"]) { case -1: $tblhead_title = $title; $revertlink = ''; $revertctrl = ''; break; case $vbulletin->GPC['dostyleid']: $tblhead_title = "$title <span class=\"normal\">(" . $vbphrase['customized_in_this_style'] . ")</span>"; $revertlink = 'title=' . urlencode($title) . '&item=' . urlencode($item); $revertctrl = "<label for=\"rvcss_$item\">$vbphrase[revert_this_group_of_settings]<input type=\"checkbox\" id=\"rvcss_$item\" name=\"delete[css][$item]\" value=\"1\" tabindex=\"1\" title=\"$vbphrase[revert]\" /></label>"; break; default: $tblhead_title = "$title <span class=\"normal\">(" . construct_phrase($vbphrase['customized_in_a_parent_style_x'], $css_info["$item"]) . ")</span>"; $revertlink = 'title=' . urlencode($title) . '&item=' . urlencode($item); $revertctrl = ''; break; } echo "\n\n<!-- START $title CSS -->\n\n"; print_column_style_code(array('width: 50%', 'width: 50%')); print_table_header($tblhead_title, 2); print_label_row( "\n\t<fieldset title=\"$vbphrase[standard_css]\"> <legend>$vbphrase[standard_css]</legend> <table cellpadding=\"0\" cellspacing=\"2\" border=\"0\" width=\"100%\"> <col width=\"50%\"></col>\n" . construct_css_input_row($vbphrase['background'], "['$item']['background']", $color, true) . construct_css_input_row($vbphrase['font_color'], "['$item']['color']", $color, true) . construct_css_input_row($vbphrase['font_style'], "['$item']['font']['style']", $color) . construct_css_input_row($vbphrase['font_size'], "['$item']['font']['size']", $color) . construct_css_input_row($vbphrase['font_family'], "['$item']['font']['family']", $color) . construct_text_align_code($vbphrase['alignment'], "['$item']['text-align']", $color) . " </table> </fieldset>\n\t", " <fieldset id=\"extra_a_$item_js\" title=\"$vbphrase[extra_css]\"> <legend>$vbphrase[extra_css]</legend> <div align=\"center\" style=\"padding: 2px\"> <textarea name=\"css[$item][EXTRA]\" rows=\"4\" cols=\"50\" class=\"$color\" style=\"padding: 2px; width: 90%\" tabindex=\"1\" dir=\"ltr\">" . htmlspecialchars_uni($css["$item"]['EXTRA']) . "</textarea> </div> </fieldset> " . iif($description != '', "<fieldset id=\"desc_a_$item_js\" title=\"$vbphrase[description]\" style=\"margin-bottom:4px;\"> <legend>$vbphrase[description]</legend> <div class=\"smallfont\" style=\"margin:4px 4px 0px 4px\"> <img src=\"../cpstyles/" . $vbulletin->options['cpstylefolder'] . "/cp_help.gif\" alt=\"$title\" align=\"" . vB_Template_Runtime::fetchStyleVar('right') . "\" style=\"padding:0px 0px 0px 2px\" /> $description </div> </fieldset>") . "\n" , 'alt2'); if (is_browser('mozilla')) { echo "<script type=\"text/javascript\">reflow_fieldset('a_$item_js', true);</script>\n"; } if ($dolinks) { print_description_row(' <table cellpadding="4" cellspacing="0" border="0" width="100%"> <tr> ' . construct_link_css_input_row($vbphrase['normal_link'], $item, 'N', $color) . ' ' . construct_link_css_input_row($vbphrase['visited_link'], $item, 'V', $color) . ' ' . construct_link_css_input_row($vbphrase['hover_link'], $item, 'M', $color) . ' </tr> </table> ', 0, 2, 'alt2" style="padding: 0px'); } if ($revertctrl != '') { print_description_row('<div class="smallfont" style="text-align: center">' . $revertctrl . '</div>', 0, 2, 'thead'); } print_description_row(" <div class=\"alt1\" style=\"border:inset 1px; padding:2px 10px 2px 10px; float:" . vB_Template_Runtime::fetchStyleVar('left') . "\">" . construct_phrase($vbphrase['css_selector_x'], "<code>$item</code>") . "</div> <!--" . iif($revertlink != '', "<input type=\"button\" class=\"button\" style=\"font-weight:normal\" value=\"$vbphrase[show_default]\" tabindex=\"1\" onclick=\"js_show_default_item('$revertlink', $dolinks);\" />") . "--> <!--<input type=\"submit\" class=\"button\" style=\"font-weight:normal\" value=\" " . $vbphrase['save_css'] . " \" tabindex=\"1\" />--> ", 0, 2, 'tfoot" align="right'); echo "\n\n<!-- END $title CSS -->\n\n"; if ($restarttable) { print_table_break(' '); } }