/** * Returns the HTML to be displayed to the user for Human Verification * * @param string Passed to template * * @return string HTML to output * */ function output_token($var_prefix = 'humanverify') { global $vbphrase, $stylevar, $show; $vbulletin =& $this->registry; $humanverify = $this->generate_token(); eval('$output = "' . fetch_template('humanverify_image') . '";'); return $output; }
/** * Returns the HTML to be displayed to the user for Human Verification * * @param string Passed to template * * @return string HTML to output * */ function output_token($var_prefix = 'humanverify') { global $vbphrase, $stylevar, $show; $vbulletin =& $this->registry; $humanverify = $this->generate_token(); require_once DIR . '/includes/functions_misc.php'; $humanverify['question'] = fetch_phrase('question' . $humanverify['answer'], 'hvquestion', '', false, true, $this->registry->userinfo['languageid'], false); eval('$output = "' . fetch_template('humanverify_question') . '";'); return $output; }
/** * Generates HTML for the subscription form page * * @param string Hash used to indicate the transaction within vBulletin * @param string The cost of this payment * @param string The currency of this payment * @param array Information regarding the subscription that is being purchased * @param array Information about the user who is purchasing this subscription * @param array Array containing specific data about the cost and time for the specific subscription period * * @return array Compiled form information */ function generate_form_html($hash, $cost, $currency, $subinfo, $userinfo, $timeinfo) { global $vbphrase, $vbulletin, $stylevar, $show; $form['action'] = 'https://bill.ccbill.com/jpost/signup.cgi'; $form['method'] = 'post'; // load settings into array so the template system can access them $settings =& $this->settings; $settings['email'] = htmlspecialchars_uni($this->registry->userinfo['email']); $subinfo['ccbillsubid'] = $timeinfo['ccbillsubid']; eval('$form[\'hiddenfields\'] .= "' . fetch_template('subscription_payment_ccbill') . '";'); return $form; }
/** * Builds the history bit for a selected history point * * @param array Array of information for this histoy point * @param object BB code parser * * @return string History bit HTML */ function build_history_bit($history, &$bbcode) { global $vbulletin, $vbphrase, $show, $stylevar; $history['editdate'] = vbdate($vbulletin->options['dateformat'], $history['dateline'], true); $history['edittime'] = vbdate($vbulletin->options['timeformat'], $history['dateline']); $history['message'] = $bbcode->parse($history['pagetext'], 'pt'); if ($history['reason'] === '') { $history['reason'] = $vbphrase['n_a']; } ($hook = vBulletinHook::fetch_hook('project_historybit')) ? eval($hook) : false; eval('$edit_history = "' . fetch_template('pt_historybit') . '";'); return $edit_history; }
function print_users($usergroupid, $userarray) { global $bgclass, $vbphrase; $out = ''; uksort($userarray, 'strnatcasecmp'); // alphabetically sort usernames foreach ($userarray as $user) { exec_switch_bg(); $user = process_showgroups_userinfo($user); eval('$out .= "' . fetch_template('showgroups_adminbit') . '";'); } return $out; }
function doAction($action) { global $kbank, $vbulletin, $bbuserinfo, $permissions, $KBANK_HOOK_NAME; if ($action == 'enable') { $item = $this->data; eval('$tmp = "' . fetch_template('kbank_template_announce_enable') . '";'); eval(standard_error($tmp)); } if ($action == 'do_enable') { if ($this->ready2Enable()) { $vbulletin->input->clean_array_gpc('r', array('url' => TYPE_NOHTML, 'text' => TYPE_NOHTML)); if (strlen($vbulletin->GPC['text']) > $this->itemtypedata['options']['text_max']) { $vbulletin->GPC['text'] = substr($vbulletin->GPC['text'], 0, $this->itemtypedata['options']['text_max']) . '..'; } $url_cutoff = array('javascript:', 'ftp://'); $vbulletin->GPC['url'] = str_replace($url_cutoff, '', $vbulletin->GPC['url']); if (substr($vbulletin->GPC['url'], 0, 7) != 'http://') { $vbulletin->GPC['url'] = 'http://' . $vbulletin->GPC['url']; } $item_new = array('status' => KBANK_ITEM_ENABLED, 'expire_time' => iif(!$this->data['options']['enabled'], iif($this->data['options']['duration'] > 0, TIMENOW + $this->data['options']['duration'] * 24 * 60 * 60, -1), $this->data['expire_time']), 'options' => serialize(array('url' => $vbulletin->GPC['url'], 'text' => $vbulletin->GPC['text'], 'enabled' => 1))); $vbulletin->db->query_write(fetch_query_sql($item_new, 'kbank_items', "WHERE itemid = {$this->data['itemid']}")); //Update datastore updateAnnounceCache(); } } if ($this->data['status'] == KBANK_ITEM_ENABLED and ($action == 'sell' or $action == 'gift')) { //Update datastore updateAnnounceCache(); } if ($action == 'disable') { if ($this->ready2Disable()) { $item_new = array('status' => KBANK_ITEM_AVAILABLE); $vbulletin->db->query_write(fetch_query_sql($item_new, 'kbank_items', "WHERE itemid = {$this->data[itemid]}")); //Update datastore updateAnnounceCache(); } } if ($action == 'work_real' && $KBANK_HOOK_NAME == KBANK_GLOBAL_START) { global $kbank_announces; $kbank_announces[] = array('url' => $this->data['options']['url'], 'text' => $vbulletin->kbankBBCodeParser->parse_bbcode($this->data['options']['text'], true), 'owner' => getUsername($this->data)); } return parent::doAction($action); }
function construct_faq_item($faq, $find = '') { global $vbulletin, $stylevar, $ifaqcache, $faqbits, $faqlinks, $show, $vbphrase; $faq['text'] = trim($faq['text']); if (is_array($find) and !empty($find)) { $faq['title'] = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "process_highlight_faq('\\2', \$find, '\\1', '<u>\\\\1</u>')", $faq['title']); $faq['text'] = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "process_highlight_faq('\\2', \$find, '\\1', '<span class=\"highlight\">\\\\1</span>')", $faq['text']); } $faqsublinks = ''; if (is_array($ifaqcache["{$faq['faqname']}"])) { foreach ($ifaqcache["{$faq['faqname']}"] as $subfaq) { if ($subfaq['displayorder'] > 0) { eval('$faqsublinks .= "' . fetch_template('faqbit_link') . '";'); } } } $show['faqsublinks'] = iif($faqsublinks, true, false); $show['faqtext'] = iif($faq['text'], true, false); ($hook = vBulletinHook::fetch_hook('faq_item_display')) ? eval($hook) : false; eval('$faqbits .= "' . fetch_template('faqbit') . '";'); }
/** * Shows the new subscribed PT issues in the user CP * * @return string Printable issue bits */ function process_new_subscribed_issues() { global $vbulletin, $show, $stylevar, $vbphrase, $template_hook, $vbcollapse; if (!($vbulletin->userinfo['permissions']['ptpermissions'] & $vbulletin->bf_ugp_ptpermissions['canviewprojecttools'])) { return ''; } $perms_query = build_issue_permissions_query($vbulletin->userinfo); if (!$perms_query) { return ''; } $marking = ($vbulletin->options['threadmarking'] and $vbulletin->userinfo['userid']); if ($marking) { $issueview_sql = "IF(issueread IS NOT NULL, issueread, " . intval(TIMENOW - $vbulletin->options['markinglimit'] * 86400) . ")"; $issueview_sql2 = "IF(projectread IS NOT NULL, projectread, " . intval(TIMENOW - $vbulletin->options['markinglimit'] * 86400) . ")"; } else { $issueview = max(intval(fetch_bbarray_cookie('issue_lastview', $issue['issueid'])), intval(fetch_bbarray_cookie('issue_lastview', $issue['projectid'] . $issue['issuetypeid']))); if (!$issueview) { $issueview = $vbulletin->userinfo['lastvisit']; } $issueview_sql = intval($issueview); $issueview_sql2 = ''; } build_issue_private_lastpost_sql_all($vbulletin->userinfo, $private_lastpost_join, $private_lastpost_fields); $replycount_clause = fetch_private_replycount_clause($vbulletin->userinfo); $subscriptions = $vbulletin->db->query_read("\r\n\t\tSELECT issue.*, issuesubscribe.subscribetype,\r\n\t\t\tproject.title_clean\r\n\t\t\t" . ($marking ? ", issueread.readtime AS issueread, projectread.readtime AS projectread" : '') . "\r\n\t\t\t" . ($private_lastpost_fields ? ", {$private_lastpost_fields}" : '') . "\r\n\t\t\t" . ($replycount_clause ? ", {$replycount_clause} AS replycount" : '') . "\r\n\t\tFROM " . TABLE_PREFIX . "pt_issuesubscribe AS issuesubscribe\r\n\t\tINNER JOIN " . TABLE_PREFIX . "pt_issue AS issue ON (issue.issueid = issuesubscribe.issueid)\r\n\t\tINNER JOIN " . TABLE_PREFIX . "pt_project AS project ON (project.projectid = issue.projectid)\r\n\t\t" . ($marking ? "\r\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "pt_issueread AS issueread ON (issueread.issueid = issue.issueid AND issueread.userid = " . $vbulletin->userinfo['userid'] . ")\r\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "pt_projectread as projectread ON (projectread.projectid = issue.projectid AND projectread.userid = " . $vbulletin->userinfo['userid'] . " AND projectread.issuetypeid = issue.issuetypeid)\r\n\t\t" : '') . "\r\n\t\t{$private_lastpost_join}\r\n\t\tWHERE issuesubscribe.userid = " . $vbulletin->userinfo['userid'] . "\r\n\t\t\tAND (" . implode(' OR ', $perms_query) . ")\r\n\t\tHAVING lastpost > " . intval(TIMENOW - $vbulletin->options['markinglimit'] * 86400) . "\r\n\t\t\tAND lastpost > " . $issueview_sql . "\r\n\t\t\t" . (!empty($issueview_sql2) ? " AND lastpost > " . $issueview_sql2 : '') . "\r\n\t\tORDER BY lastpost DESC\r\n\t"); $show['issuebit_project_title'] = true; $subscriptionbits = ''; while ($issue = $vbulletin->db->fetch_array($subscriptions)) { $issue = prepare_issue($issue); eval('$subscriptionbits .= "' . fetch_template('pt_issuebit') . '";'); } if (!$subscriptionbits) { return ''; } eval('$return = "' . fetch_template('pt_usercp_subscriptions') . '";'); return $return; }
/** * Returns HTML of options/optgroups for direct display in a template for the * selected forum. * * @param integer Forum ID to show prefixes from * @param string Selected prefix ID * * @return string HTML to output */ function fetch_prefix_html($forumid, $selectedid = '') { global $vbulletin, $stylevar, $vbphrase; $prefix_options = ''; if ($prefixsets = fetch_prefix_array($forumid)) { foreach ($prefixsets as $prefixsetid => $prefixes) { $optgroup_options = ''; foreach ($prefixes as $prefixid) { $optionvalue = $prefixid; $optiontitle = htmlspecialchars_uni($vbphrase["prefix_{$prefixid}_title_plain"]); $optionselected = $prefixid == $selectedid ? ' selected="selected"' : ''; eval('$optgroup_options .= "' . fetch_template('option') . '";'); } // if there's only 1 prefix set available, we don't want to show the optgroup if (sizeof($prefixsets) > 1) { $optgroup_label = htmlspecialchars_uni($vbphrase["prefixset_{$prefixsetid}_title"]); eval('$prefix_options .= "' . fetch_template('optgroup') . '";'); } else { $prefix_options = $optgroup_options; } } } return $prefix_options; }
eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('custom_' . $template_name) . '");'); } $_REQUEST['do'] = 'showsmilies'; // ############################### start show smilies ############################### if ($_REQUEST['do'] == 'showsmilies') { $smiliebits = ''; ($hook = vBulletinHook::fetch_hook('misc_smilieslist_start')) ? eval($hook) : false; $smilies = $db->query_read_slave("\n\t\tSELECT smilietext,smiliepath,smilie.title,imagecategory.title AS category\n\t\tFROM " . TABLE_PREFIX . "smilie AS smilie\n\t\tLEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)\n\t\tORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder\n\t"); while ($smilie = $db->fetch_array($smilies)) { $smilie['title'] = htmlspecialchars_uni($smilie['title']); if ($smilie['category'] != $lastcat) { ($hook = vBulletinHook::fetch_hook('misc_smilieslist_category')) ? eval($hook) : false; eval('$smiliebits .= "' . fetch_template('help_smilies_category') . '";'); } exec_switch_bg(); ($hook = vBulletinHook::fetch_hook('misc_smilieslist_smilie')) ? eval($hook) : false; eval('$smiliebits .= "' . fetch_template('help_smilies_smilie') . '";'); $lastcat = $smilie['category']; } $navbits = construct_navbits(array('faq.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['faq'], '' => $vbphrase['smilie_list'])); eval('$navbar = "' . fetch_template('navbar') . '";'); ($hook = vBulletinHook::fetch_hook('misc_smilieslist_complete')) ? eval($hook) : false; eval('print_output("' . fetch_template('help_smilies') . '");'); } /*======================================================================*\ || #################################################################### || # Downloaded: 22:41, Fri Oct 10th 2008 || # CVS: $RCSfile$ - $Revision: 27128 $ || #################################################################### \*======================================================================*/
build_datastore('maxloggedin', serialize($vbulletin->maxloggedin), 1); } $recordusers = $vbulletin->maxloggedin['maxonline']; $recorddate = vbdate($vbulletin->options['dateformat'], $vbulletin->maxloggedin['maxonlinedate'], true); $recordtime = vbdate($vbulletin->options['timeformat'], $vbulletin->maxloggedin['maxonlinedate']); $currenttime = vbdate($vbulletin->options['timeformat']); $metarefresh = ''; $show['refresh'] = false; if ($vbulletin->options['WOLrefresh']) { $show['refresh'] = true; $refreshargs = ($vbulletin->GPC['who'] ? '&who=' . $vbulletin->GPC['who'] : '') . ($vbulletin->GPC['ua'] ? '&ua=1' : ''); $refreshargs_js = ($vbulletin->GPC['who'] ? '&who=' . $vbulletin->GPC['who'] : '') . ($vbulletin->GPC['ua'] ? '&ua=1' : ''); $refreshtime = $vbulletin->options['WOLrefresh'] * 10; } $frmjmpsel['wol'] = ' selected="selected" class="fjsel"'; construct_forum_jump(); $pagenav = construct_page_nav($pagenumber, $perpage, $totalonline, 'online.php?' . $vbulletin->session->vars['sessionurl'] . "sort={$sortfield}&order={$sortorder}&pp={$perpage}" . iif($vbulletin->GPC['who'], '&who=' . $vbulletin->GPC['who']) . iif($vbulletin->GPC['ua'], '&ua=1')); $numbervisible += $numberinvisible; $colspan = 2; $colspan = iif($show['ip'], $colspan + 1, $colspan); $colspan = iif($vbulletin->options['showimicons'], $colspan + 1, $colspan); ($hook = vBulletinHook::fetch_hook('online_complete')) ? eval($hook) : false; $navbits = construct_navbits(array('' => $vbphrase['whos_online'])); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('WHOSONLINE') . '");'); /*======================================================================*\ || #################################################################### || # Downloaded: 12:56, Sat Oct 11th 2008 || # CVS: $RCSfile$ - $Revision: 26760 $ || #################################################################### \*======================================================================*/
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="refresh" content="30" > <style type="text/css" media="all"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } object, embed { \twidth: 100%; \theight: 100%; } --> </style> </head> <center> {$footer_ad} </center> EOF; exit; $navbits = array(); $navbits[$parent] = 'ad_footerEnd Page'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('ad_footerEnd') . '");'); $footer_ad; ?>
/** * Fetches the HTML for the tag cloud. * * @param string Type of cloud. Supports search, usage * * @return string Tag cloud HTML (nothing if no cloud) */ function fetch_tagcloud($type = 'usage') { global $vbulletin, $stylevar, $vbphrase, $show, $template_hook; if ($vbulletin->options['tagcloud_usergroup'] > 0 and !isset($vbulletin->usergroupcache[$vbulletin->options['tagcloud_usergroup']])) { // handle a usergroup being deleted: default to live permission checking $vbulletin->options['tagcloud_usergroup'] = -1; } $cacheable = $vbulletin->options['tagcloud_usergroup'] != -1; if (!$cacheable) { $cloud = null; } else { switch ($type) { case 'search': $cloud = $vbulletin->searchcloud; break; case 'usage': default: $cloud = $vbulletin->tagcloud; break; } } if (!is_array($cloud) or $cloud['dateline'] < TIMENOW - 60 * $vbulletin->options['tagcloud_cachetime']) { if ($type == 'search') { $tags_result = $vbulletin->db->query_read_slave("\n\t\t\t\tSELECT tagsearch.tagid, tag.tagtext, COUNT(*) AS searchcount\n\t\t\t\tFROM " . TABLE_PREFIX . "tagsearch AS tagsearch\n\t\t\t\tINNER JOIN " . TABLE_PREFIX . "tag AS tag ON (tagsearch.tagid = tag.tagid)\n\t\t\t\t" . ($vbulletin->options['tagcloud_searchhistory'] ? "WHERE tagsearch.dateline > " . (TIMENOW - 60 * 60 * 24 * $vbulletin->options['tagcloud_searchhistory']) : '') . "\n\t\t\t\tGROUP BY tagsearch.tagid, tag.tagtext\n\t\t\t\tORDER BY searchcount DESC\n\t\t\t\tLIMIT " . $vbulletin->options['tagcloud_tags']); } else { if (!$vbulletin->options['tagcloud_usergroup']) { $perm_limit = false; } else { $forums = array(); $perm_limit = true; foreach ($vbulletin->forumcache as $forumid => $forum) { // -1 for live permission checking $perm_array = $vbulletin->options['tagcloud_usergroup'] == -1 ? $vbulletin->userinfo['forumpermissions']["{$forumid}"] : $forum['permissions'][$vbulletin->options['tagcloud_usergroup']]; if ($perm_array & $vbulletin->bf_ugp_forumpermissions['canview'] and $perm_array & $vbulletin->bf_ugp_forumpermissions['canviewthreads'] and $perm_array & $vbulletin->bf_ugp_forumpermissions['canviewothers']) { $forums[] = intval($forumid); } } } if (!$perm_limit or $forums) { $tags_result = $vbulletin->db->query_read_slave("\n\t\t\t\t\tSELECT tagthread.tagid, tag.tagtext, COUNT(*) AS searchcount\n\t\t\t\t\tFROM " . TABLE_PREFIX . "tagthread AS tagthread\n\t\t\t\t\tINNER JOIN " . TABLE_PREFIX . "tag AS tag ON (tagthread.tagid = tag.tagid)\n\t\t\t\t\tINNER JOIN " . TABLE_PREFIX . "thread AS thread ON (tagthread.threadid = thread.threadid)\n\t\t\t\t\tWHERE thread.open <> 10\n\t\t\t\t\t\tAND thread.visible = 1\n\t\t\t\t\t" . ($perm_limit ? "AND thread.forumid IN (" . implode(',', $forums) . ")" : '') . "\n\t\t\t\t\t" . ($vbulletin->options['tagcloud_usagehistory'] ? "AND tagthread.dateline > " . (TIMENOW - 60 * 60 * 24 * $vbulletin->options['tagcloud_usagehistory']) : '') . "\n\t\t\t\t\tGROUP BY tagthread.tagid, tag.tagtext\n\t\t\t\t\tORDER BY searchcount DESC\n\t\t\t\t\tLIMIT " . $vbulletin->options['tagcloud_tags']); } } $total = 0; $count = 0; if (!empty($tags_result)) { $count = $vbulletin->db->num_rows($tags_result); while ($currenttag = $vbulletin->db->fetch_array($tags_result)) { $tags["{$currenttag['tagtext']}"] = $currenttag; $total += $currenttag['searchcount']; } $vbulletin->db->free_result($tags_result); } $final_tags = array(); if ($count > 0) { // calculate the standard deviation $mean = $total / $count; $summation = 0; foreach ($tags as $tagtext => $tagvalue) { $summation += pow($tagvalue['searchcount'] - $mean, 2); } $sd = sqrt($summation / $count); uksort($tags, 'strnatcasecmp'); if ($sd) { $sdtags = array(); $lowestsds = 0; $highestsds = 0; // find the max and min standard deviations foreach ($tags as $tagtext => $currenttag) { $tags["{$tagtext}"]['deviation'] = $currenttag['searchcount'] - $mean; $tags["{$tagtext}"]['sds'] = $tags["{$tagtext}"]['deviation'] / $sd; $sdtags[] = $tags["{$tagtext}"]; if ($tags["{$tagtext}"]['sds'] < $lowestsds) { $lowestsds = $tags["{$tagtext}"]['sds']; } if ($tags["{$tagtext}"]['sds'] > $highestsds) { $highestsds = $tags["{$tagtext}"]['sds']; } } $levels = $vbulletin->options['tagcloud_levels']; foreach ($sdtags as $thistag) { // normalize the std devs to 0 - 1, then map back to 1 - #levls $thistag['level'] = round(($thistag['sds'] - $lowestsds) / ($highestsds - $lowestsds) * ($levels - 1)) + 1; $thistag['tagtext_url'] = urlencode(unhtmlspecialchars($thistag['tagtext'])); $final_tags[] = $thistag; } } else { foreach ($tags as $tagtext => $tagarr) { $final_tags[] = array('tagid' => $tagarr['tagid'], 'tagtext' => $tagtext, 'tagtext_url' => urlencode(unhtmlspecialchars($tagtext)), 'level' => round($vbulletin->options['tagcloud_levels'] / 2)); } } } $cloud = array('tags' => $final_tags, 'count' => sizeof($final_tags), 'dateline' => TIMENOW); if ($cacheable) { if ($type == 'search') { $vbulletin->searchcloud = $cloud; build_datastore('searchcloud', serialize($cloud), 1); } else { $vbulletin->tagcloud = $cloud; build_datastore('tagcloud', serialize($cloud), 1); } } } if (empty($cloud['tags'])) { return ''; } $cloud['links'] = ''; foreach ($cloud['tags'] as $thistag) { ($hook = vBulletinHook::fetch_hook('tag_cloud_bit')) ? eval($hook) : false; eval('$cloud[\'links\'] .= "' . fetch_template('tag_cloud_link') . '";'); } $cloud['count'] = vb_number_format($cloud['count']); if ($type == 'search') { eval('$cloud_html .= "' . fetch_template('tag_cloud_box_search') . '";'); } else { eval('$cloud_html .= "' . fetch_template('tag_cloud_box') . '";'); } return $cloud_html; }
if (!$attachmentinfo['visible'] and !can_moderate($attachmentinfo['forumid'], 'canmoderateattachments') and $attachmentinfo['userid'] != $vbulletin->userinfo['userid']) { eval(standard_error(fetch_error('invalidid', $idname, $vbulletin->options['contactuslink']))); } } // handle lightbox requests if ($_REQUEST['do'] == 'lightbox') { require_once DIR . '/includes/class_xml.php'; $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml'); if (in_array(strtolower($attachmentinfo['extension']), array('jpg', 'jpeg', 'jpe', 'gif', 'png'))) { $uniqueid = $vbulletin->GPC['uniqueid']; $imagelink = 'attachment.php?' . $vbulletin->session->vars['sessionurl'] . 'attachmentid=' . $attachmentinfo['attachmentid'] . '&d=' . $attachmentinfo['dateline']; $attachmentinfo['date_string'] = vbdate($vbulletin->options['dateformat'], $attachmentinfo['dateline']); $attachmentinfo['time_string'] = vbdate($vbulletin->options['timeformat'], $attachmentinfo['dateline']); $show['newwindow'] = $attachmentinfo['newwindow'] ? true : false; ($hook = vBulletinHook::fetch_hook('attachment_lightbox')) ? eval($hook) : false; eval('$html = "' . fetch_template('lightbox', 0, 0) . '";'); $xml->add_group('img'); $xml->add_tag('html', process_replacement_vars($html)); $xml->add_tag('link', $imagelink); $xml->add_tag('name', $attachmentinfo['filename']); $xml->add_tag('date', $attachmentinfo['date_string']); $xml->add_tag('time', $attachmentinfo['time_string']); $xml->close_group(); } else { $xml->add_group('errormessage'); $xml->add_tag('error', 'notimage'); $xml->add_tag('extension', $attachmentinfo['extension']); $xml->close_group(); } $xml->print_xml(); exit;
$profilefield['height'] = count($data); } foreach ($data as $key => $val) { if ($vbulletin->userinfo["{$profilefieldname}"] & pow(2, $key)) { $selected = 'selected="selected"'; } else { $selected = ''; } $key++; eval('$selectbits .= "' . fetch_template('userfield_select_option') . '";'); } eval('$custom_field_holder = "' . fetch_template('userfield_select_multiple') . '";'); } } } } } } if ($profilefield['required'] == 2) { // not required to be filled in but still show $profile_variable =& $customfields_other; } else { // required to be filled in if ($profilefield['form']) { $profile_variable =& $customfields_option; } else { $profile_variable =& $customfields_profile; } } eval('$profile_variable .= "' . fetch_template('userfield_wrapper') . '";'); }
function construct_online_bit($userinfo, $doall = 0) { global $vbulletin, $limitlower, $limitupper, $stylevar, $vbphrase, $ipclass, $show; global $wol_album, $wol_attachment, $wol_calendar, $wol_event, $wol_inf, $wol_pm, $wol_post, $wol_search, $wol_socialgroup, $wol_thread, $wol_user; static $count; $count++; $show['nopermission'] = false; $show['lockedout'] = false; $show['errormessage'] = false; if ($doall == 1 and ($count > $limitupper or $count < $limitlower)) { return ''; } if ($userinfo['attachmentid']) { $postid = $wol_attachment["{$userinfo['attachmentid']}"]; } else { $postid = $userinfo['postid']; } if ($postid) { $threadid = $wol_post["{$postid}"]; } else { $threadid = $userinfo['threadid']; } $forumid = $userinfo['forumid']; $calendarid = $userinfo['calendarid']; $eventid = $userinfo['eventid']; $searchid = $userinfo['searchid']; $groupid = $userinfo['socialgroupid']; $albumid = $userinfo['albumid']; if ($albumid) { require_once DIR . '/includes/functions_album.php'; $albumname = fetch_censored_text($wol_album["{$albumid}"]['title']); $canviewalbum = true; if ($wol_album["{$albumid}"]['state'] == 'profile' and !can_view_profile_albums($wol_album["{$albumid}"]['userid'])) { $canviewalbum = false; } else { if ($wol_album["{$albumid}"]['state'] == 'private' and !can_view_private_albums($wol_album["{$albumid}"]['userid'])) { $canviewalbum = false; } } } if ($groupid) { $groupname = fetch_censored_text($wol_socialgroup["{$groupid}"]['name']); $canviewgroup = true; } if ($searchid) { $searchquery = $wol_search["{$searchid}"]['query']; $searchuser = $wol_search["{$searchid}"]['searchuser']; $searchuserid = $wol_search["{$searchid}"]['userid']; } if (!$forumid and isset($wol_thread["{$threadid}"]['forumid'])) { $forumid = $wol_thread["{$threadid}"]['forumid']; } else { if (!$forumid and isset($wol_thread["{$wol_post[$postid]}"]['forumid'])) { $forumid = $wol_thread["{$wol_post[$postid]}"]['forumid']; } } $threadtitle = fetch_censored_text($wol_thread["{$threadid}"]['title']); $threadprefix = $wol_thread["{$threadid}"]['prefixid'] ? $vbphrase['prefix_' . $wol_thread["{$threadid}"]['prefixid'] . '_title_rich'] . ' ' : ''; $canview = $vbulletin->userinfo['forumpermissions']["{$forumid}"] & $vbulletin->bf_ugp_forumpermissions['canview']; $canviewothers = $vbulletin->userinfo['forumpermissions']["{$forumid}"] & $vbulletin->bf_ugp_forumpermissions['canviewothers']; $canviewthreads = $vbulletin->userinfo['forumpermissions']["{$forumid}"] & $vbulletin->bf_ugp_forumpermissions['canviewthreads']; $postuserid = $wol_thread["{$threadid}"]['postuserid']; $forumtitle = $vbulletin->forumcache["{$forumid}"]['title']; $threadpreview = $wol_thread["{$threadid}"]['preview']; if (!$calendarid and isset($wol_event["{$eventid}"]['calendarid'])) { $calendarid = $wol_event["{$eventid}"]['calendarid']; } $eventtitle = htmlspecialchars_uni($wol_event["{$eventid}"]['title']); $eventpostuserid = $wol_event["{$eventid}"]['postuserid']; $calendartitle = $wol_calendar["{$calendarid}"]; $canviewcalendar = $vbulletin->userinfo['calendarpermissions']["{$calendarid}"] & $vbulletin->bf_ugp_calendarpermissions['canviewcalendar']; $canviewothersevent = $vbulletin->userinfo['calendarpermissions']["{$calendarid}"] & $vbulletin->bf_ugp_calendarpermissions['canviewothersevent']; if (($wol_thread["{$threadid}"]['isdeleted'] or !$wol_thread["{$threadid}"]['visible']) and !can_moderate($forumid)) { $threadviewable = 0; } else { $threadviewable = 1; } if ($threadviewable and $threadtitle and $canview and ($canviewothers or $postuserid == $vbulletin->userinfo['userid']) and verify_forum_password($forumid, $vbulletin->forumcache["{$forumid}"]['password'], false)) { $seetitle = 1; } if ($forumtitle and ($canview or $vbulletin->forumcache["{$forumid}"]['showprivate'] > 1 or !$vbulletin->forumcache["{$forumid}"]['showprivate'] and $vbulletin->options['showprivateforums'])) { $seeforum = 1; } if ($eventtitle and $canviewcalendar and ($canviewothersevent or $eventpostuserid == $vbulletin->userinfo['userid'])) { $seeevent = 1; } if ($calendartitle and $canviewcalendar) { $seecalendar = 1; } if ($vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlinefull']) { if ($userinfo['pmid']) { $seeuserid = $wol_pm["{$userinfo['pmid']}"]; } else { if ($userinfo['searchid']) { $seeuserid = $wol_search["{$searchid}"]['targetuserid']; } else { if ($userinfo['infractionid']) { $seeuserid = $wol_inf["{$userinfo['infractionid']}"]['userid']; } else { $seeuserid = $userinfo['targetuserid']; } } } } switch ($userinfo['activity']) { case 'visitormessage_posting': $userinfo['action'] = $vbphrase['posting_visitor_message']; break; case 'visitormessage_delete': $userinfo['action'] = $vbphrase['deleting_visitor_message']; break; case 'viewingipaddress': $userinfo['action'] = '<b><i>' . $vbphrase['moderating'] . '</b></i>'; if (can_moderate()) { $userinfo['action'] = $vbphrase['viewing_ip_address']; } break; case 'visitormessage_reporting': $userinfo['action'] = $vbphrase['reporting_visitor_message']; break; case 'posthistory': $userinfo['action'] = $vbphrase['viewing_post_history']; if ($seetitle) { $userinfo['where'] = $threadprefix . '<a href="showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p={$postid}#post{$postid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; } break; case 'tags': $userinfo['action'] = $vbphrase['managing_tags']; break; case 'tag_list': $userinfo['action'] = $vbphrase['viewing_tag_list']; break; case 'socialgroups_join': $userinfo['action'] = $vbphrase['joining_social_group']; if ($canviewgroup) { $userinfo['where'] = '<a href="group.php?' . $vbulletin->session->vars['sessionurl'] . "do=view&groupid={$groupid}\">{$groupname}</a>"; } break; case 'socialgroups_leave': $userinfo['action'] = $vbphrase['leaving_social_group']; if ($canviewgroup) { $userinfo['where'] = '<a href="group.php?' . $vbulletin->session->vars['sessionurl'] . "do=view&groupid={$groupid}\">{$groupname}</a>"; } break; case 'socialgroups_edit': $userinfo['action'] = $vbphrase['editing_social_group']; if ($canviewgroup) { $userinfo['where'] = '<a href="group.php?' . $vbulletin->session->vars['sessionurl'] . "do=view&groupid={$groupid}\">{$groupname}</a>"; } break; case 'socialgroups_view': $userinfo['action'] = $vbphrase['viewing_social_group']; if ($canviewgroup) { $userinfo['where'] = '<a href="group.php?' . $vbulletin->session->vars['sessionurl'] . "do=view&groupid={$groupid}\">{$groupname}</a>"; } break; case 'socialgroups_memberlist': $userinfo['action'] = $vbphrase['viewing_social_group_memberlist']; if ($canviewgroup) { $userinfo['where'] = '<a href="group.php?' . $vbulletin->session->vars['sessionurl'] . "do=viewmembers&groupid={$groupid}\">{$groupname}</a>"; } break; case 'socialgroups_delete': $userinfo['action'] = $vbphrase['deleting_social_group']; if ($canviewgroup) { $userinfo['where'] = '<a href="group.php?' . $vbulletin->session->vars['sessionurl'] . "do=viewmembers&groupid={$groupid}\">{$groupname}</a>"; } break; case 'socialgroups_create': $userinfo['action'] = $vbphrase['creating_social_group']; break; case 'socialgroups_list': $userinfo['action'] = $vbphrase['viewing_social_group_list']; if ($canviewgroup) { $userinfo['where'] = '<a href="group.php?' . $vbulletin->session->vars['sessionurl'] . "do=view&groupid={$groupid}\">{$groupname}</a>"; } break; case 'group_inlinemod': $userinfo['action'] = '<b><i>' . $vbphrase['moderating'] . '</i></b>'; break; case 'showthread': $userinfo['action'] = $vbphrase['viewing_thread']; if ($seetitle) { $userinfo['where'] = $threadprefix . '<a href="showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; } break; case 'showpost': $userinfo['action'] = $vbphrase['viewing_thread']; if ($seetitle) { $userinfo['where'] = $threadprefix . '<a href="showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p={$postid}#post{$postid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; } break; case 'forumdisplay': $userinfo['action'] = $vbphrase['viewing_forum']; if ($seeforum) { if ($vbulletin->forumcache["{$forumid}"]['link']) { $userinfo['action'] = $vbphrase['followed_forum_link']; } $userinfo['where'] = '<a href="forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f={$forumid}\">{$forumtitle}</a>"; } break; case 'newthread': $userinfo['action'] = $vbphrase['creating_thread']; if ($seeforum) { $userinfo['where'] = '<a href="forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f={$forumid}\">{$forumtitle}</a>"; } break; case 'newreply': $userinfo['action'] = $vbphrase['replying_to_thread']; if ($seetitle) { $userinfo['where'] = $threadprefix . '<a href="showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; } break; case 'attachments': $userinfo['action'] = $vbphrase['viewing_attachments']; if ($seeuserid) { $userinfo['where'] = '<a href="misc.php?' . $vbulletin->session->vars['sessionurl'] . "do=attachments&u={$seeuserid}\">{$wol_user[$seeuserid]}</a>"; } break; case 'manageattachment': $userinfo['action'] = $vbphrase['managing_attachments']; break; case 'attachment': $userinfo['action'] = $vbphrase['viewing_attachment']; if ($seetitle) { $userinfo['where'] = $threadprefix . '<a href="showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p={$postid}#post{$postid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; } break; case 'index': $userinfo['action'] = $vbphrase['viewing_index']; $userinfo['where'] = '<a href="' . $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'] . '">' . $vbulletin->options['bbtitle'] . '</a>'; break; case 'online': $userinfo['action'] = $vbphrase['viewing_whos_online']; break; case 'searchnew': $userinfo['action'] = $vbphrase['viewing_new_posts']; $userinfo['where'] = '<a href="search.php?' . $vbulletin->session->vars['sessionurl'] . "do=getnew\">{$vbphrase['new_posts']}</a>"; break; case 'search': $userinfo['action'] = $vbphrase['searching_forums']; if ($searchid and $vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlinefull']) { if ($searchquery) { $userinfo['where'] = construct_phrase($vbphrase['query_x'], htmlspecialchars_uni($searchquery)); } if ($searchuser and $wol_search["{$searchid}"]['targetuserid']) { if ($searchquery) { $userinfo['where'] .= '<br />'; } $userinfo['where'] .= construct_phrase($vbphrase['user_x'], '<a href="member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$seeuserid}\">{$wol_user[$seeuserid]}</a>"); } } break; case 'mail': $userinfo['action'] = $vbphrase['emailing']; if ($seeuserid) { $userinfo['where'] = '<a href="member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$seeuserid}\">{$wol_user[$seeuserid]}</a>"; } break; case 'getinfo': $userinfo['action'] = $vbphrase['viewing_user_profile']; if ($seeuserid) { $userinfo['where'] = '<a href="member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$seeuserid}\">{$wol_user[$seeuserid]}</a>"; } break; case 'converse': $userinfo['action'] = $vbphrase['viewing_conversation']; if ($seeuserid and $wol_user["{$userinfo['guestuserid']}"]) { $userinfo['where'] = construct_phrase($vbphrase['x_and_y_converse'], '<a href="member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$seeuserid}\">{$wol_user[$seeuserid]}</a>", '<a href="member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$userinfo['guestuserid']}\">" . $wol_user["{$userinfo['guestuserid']}"] . "</a>"); } break; case 'editprofile': $userinfo['action'] = $vbphrase['modifying_profile']; break; case 'editoptions': $userinfo['action'] = $vbphrase['modifying_options']; break; case 'lostpw': case 'editpassword': $userinfo['action'] = $vbphrase['modifying_password']; break; case 'editavatar': $userinfo['action'] = $vbphrase['modifying_avatar']; break; case 'editprofilepic': $userinfo['action'] = $vbphrase['modifying_profilepic']; break; case 'editsignature': $userinfo['action'] = $vbphrase['modifying_signature']; break; case 'markread': $userinfo['where'] = $vbphrase['marking_forums_read']; break; case 'whoposted': if ($seetitle) { $userinfo['action'] = $vbphrase['viewing_who_posted']; $userinfo['where'] = $threadprefix . '<a href="showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; } else { $userinfo['action'] = $vbphrase['viewing_thread']; } break; case 'showattachments': if ($seetitle) { $userinfo['action'] = $vbphrase['viewing_attachment_list']; $userinfo['where'] = $threadprefix . '<a href="showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; } else { $userinfo['action'] = $vbphrase['viewing_thread']; } break; case 'showgroups': $userinfo['action'] = $vbphrase['viewing_forum_leaders']; break; case 'login': $userinfo['action'] = $vbphrase['logging_in']; break; case 'logout': if ($userinfo['badlocation']) { $userinfo['action'] = $vbphrase['logging_out']; } break; case 'archive': $userinfo['action'] = $vbphrase['viewing_archives']; if ($seetitle) { $userinfo['where'] = $threadprefix . "<a href=\"archive/index.php/t-{$threadid}.html\" title=\"{$threadpreview}\">{$threadtitle}</a>"; } else { if ($seeforum) { $userinfo['where'] = "<a href=\"archive/index.php/f-{$forumid}.html\">{$forumtitle}</a>"; } } break; case 'pm': $userinfo['action'] = $vbphrase['private_messaging']; if ($vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlinefull']) { if ($seeuserid) { $userinfo['where'] = '<a href="member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$seeuserid}\">{$wol_user[$seeuserid]}</a>"; } if ($userinfo['values']['do'] == 'newpm' or $userinfo['values']['do'] == 'insertpm' or $userinfo['values']['do'] == 'newmessage') { $userinfo['action'] = $vbphrase['creating_private_message']; } else { if ($userinfo['values']['do'] == 'editfolders' or $userinfo['action']['do'] == 'updatefolders') { $userinfo['action'] = $vbphrase['modifying_private_message_folders']; } else { if ($userinfo['values']['do'] == 'trackpm' or $userinfo['values']['do'] == 'deletepmreceipt') { $userinfo['action'] = $vbphrase['tracking_private_messages']; } else { if ($userinfo['values']['do'] == 'showpm') { $userinfo['action'] = $vbphrase['viewing_private_message']; } else { if ($userinfo['values']['do'] == 'downloadpm') { $userinfo['action'] = $vbphrase['downloading_private_messages']; } } } } } } break; case 'addbuddy': case 'addignore': case 'buddyignore': $userinfo['action'] = $vbphrase['modifying_contact_ignore_list']; break; case 'subfolders': $userinfo['action'] = $vbphrase['modifying_subscription_folders']; break; case 'subscription': $userinfo['action'] = $vbphrase['viewing_subscribed_threads']; break; case 'addsubforum': $userinfo['action'] = $vbphrase['subscribing_to_forum']; if ($seeforum) { $userinfo['where'] = '<a href="forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f={$forumid}\">{$forumtitle}</a>"; } break; case 'addsubthread': $userinfo['action'] = $vbphrase['subscribing_to_thread']; if ($seetitle) { $userinfo['where'] = $threadprefix . '<a href="showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; } break; case 'remsubthread': $userinfo['action'] = $vbphrase['deleting_subscribed_threads']; break; case 'remsubforum': $userinfo['action'] = $vbphrase['deleting_subscribed_forums']; break; case 'usercp': $userinfo['action'] = $vbphrase['viewing_user_control_panel']; break; case 'memberlistsearch': $userinfo['action'] = $vbphrase['searching_member_list']; break; case 'memberlist': $userinfo['action'] = $vbphrase['viewing_member_list']; break; case 'member_inlinemod': $userinfo['action'] = '<b><i>' . $vbphrase['moderating'] . '</i></b>'; if (can_moderate()) { if ($seeuserid) { $userinfo['where'] = '<a href="member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$seeuserid}\">{$wol_user[$seeuserid]}</a>"; } } break; case 'inlinemod': $userinfo['action'] = '<b><i>' . $vbphrase['moderating'] . '</i></b>'; if (can_moderate()) { $userinfo['where'] = $threadprefix . '<a href="showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; switch ($userinfo['values']['do']) { case 'open': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_opening_threads'] . '</i>'; break; case 'close': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_closing_threads'] . '</i>'; break; case 'stick': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_sticking_threads'] . '</i>'; break; case 'unstick': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_unsticking_threads'] . '</i>'; break; case 'deletethread': case 'dodeletethreads': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_deleting_threads'] . '</i>'; break; case 'undeletethread': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_undeleting_threads'] . '</i>'; break; case 'approvethread': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_approving_threads'] . '</i>'; break; case 'unapprovethread': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_unapproving_threads'] . '</i>'; break; case 'movethread': case 'domovethreads': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_moving_threads'] . '</i>'; break; case 'mergethread': case 'domergethreads': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_merging_threads'] . '</i>'; break; case 'deleteposts': case 'dodeleteposts': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_deleting_posts'] . '</i>'; break; case 'undeleteposts': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_undeleting_posts'] . '</i>'; break; case 'approveposts': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_approving_posts'] . '</i>'; break; case 'unapproveposts': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_unapproving_posts'] . '</i>'; break; case 'mergeposts': case 'domergeposts': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_merging_posts'] . '</i>'; break; case 'moveposts': case 'domoveposts': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_moving_posts'] . '</i>'; break; case 'clearthread': case 'clearpost': $userinfo['action'] = '<i>' . $vbphrase['inline_mod_clear'] . '</i>'; break; case 'spampost': case 'dodeletespam': case 'spamconfirm': $userinfo['action'] = '<i>' . $vbphrase['managing_spam'] . '</i>'; break; } } break; case 'postings': $userinfo['action'] = '<b><i>' . $vbphrase['moderating'] . '</b></i>'; if (can_moderate($forumid) and $threadtitle and $canview and ($canviewothers or $postuserid == $vbulletin->userinfo['userid'])) { $userinfo['where'] = $threadprefix . '<a href="showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; switch ($userinfo['values']['do']) { case 'editthread': case 'updatethread': $userinfo['action'] = '<i>' . $vbphrase['modifying_thread'] . '</i>'; break; case 'openclosethread': $userinfo['action'] = '<i>' . $vbphrase['open_close_thread'] . '</i>'; break; case 'movethread': $userinfo['action'] = '<i>' . $vbphrase['choosing_forum_to_move_thread_to'] . '</i>'; break; case 'domovethread': switch ($userinfo['values']['method']) { case 'copy': $userinfo['action'] = '<i>' . $vbphrase['copying_thread_to_forum'] . '</i>'; break; case 'move': $userinfo['action'] = '<i>' . $vbphrase['moving_thread_to_forum'] . '</i>'; break; case 'movered': $userinfo['action'] = '<i>' . $vbphrase['moving_thread_with_redirect_to_forum'] . '</i>'; break; } $userinfo['where'] = $threadprefix . '<a href="showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadid}\" title=\"{$threadpreview}\">{$threadtitle}</a><br />" . '<a href="forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f={$forumid}\">{$forumtitle}</a>"; break; case 'deletethread': case 'dodeletethread': $userinfo['action'] = '<i>' . $vbphrase['deleting_thread'] . '</i>'; break; case 'deleteposts': case 'dodeleteposts': $userinfo['where'] = '<i>' . $vbphrase['deleting_posts'] . '</i>'; break; case 'merge': case 'domergethread': $userinfo['where'] = '<i>' . $vbphrase['merging_threads'] . '</i>'; break; case 'stick': $userinfo['where'] = '<i>' . $vbphrase['stick_unstick_thread'] . '</i>'; break; case 'getip': $userinfo['where'] = '<i>' . $vbphrase['viewing_ip_address'] . '</i>'; break; case 'removeredirect': $userinfo['where'] = '<i>' . $vbphrase['deleting_redirect'] . '</i>'; break; } } break; case 'register': $userinfo['action'] = $vbphrase['registering']; break; case 'requestemail': $userinfo['action'] = $vbphrase['request_activation_code']; break; case 'activate': $userinfo['action'] = $vbphrase['activating_registration']; break; case 'announcement': $userinfo['action'] = $vbphrase['viewing_announcement']; if ($seeforum) { $userinfo['where'] = '<a href="announcement.php?' . $vbulletin->session->vars['sessionurl'] . "f={$forumid}\">{$forumtitle}</a>"; } break; case 'usergroup': $userinfo['action'] = $vbphrase['modifying_usergroups']; break; case 'polls': switch ($userinfo['values']['do']) { case 'showresults': $userinfo['action'] = $vbphrase['viewing_poll']; break; case '': case 'newpoll': case 'postpoll': $userinfo['action'] = $vbphrase['creating_poll']; if ($seeforum) { $userinfo['where'] = '<a href="forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f={$forumid}\">{$forumtitle}</a>"; } break; case 'polledit': case 'updatepoll': $userinfo['action'] = $vbphrase['modifying_poll']; break; case 'pollvote': $userinfo['action'] = $vbphrase['voting']; break; } break; case 'showsmilies': $userinfo['action'] = $vbphrase['viewing_smilies']; break; case 'showavatars': $userinfo['action'] = $vbphrase['viewing_avatars']; break; case 'bbcode': $userinfo['action'] = $vbphrase['viewing_bb_code']; break; case 'faq': $userinfo['action'] = $vbphrase['viewing_faq']; break; case 'edit': $userinfo['action'] = $vbphrase['modifying_post']; if ($vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlinefull'] and $seetitle) { $userinfo['where'] = $threadprefix . '<a href="showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p={$postid}#post{$postid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; } break; case 'sendto': $userinfo['action'] = $vbphrase['sending_thread_to_friend']; if ($seetitle) { $userinfo['where'] = $threadprefix . '<a href="printthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; } break; case 'contactus': $userinfo['action'] = $vbphrase['sending_forum_feedback']; break; case 'aim': $userinfo['action'] = $vbphrase['sending_aim_message']; if ($seeuserid) { $userinfo['where'] = '<a href="member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$seeuserid}\">{$wol_user[$seeuserid]}</a>"; } break; case 'msn': $userinfo['action'] = $vbphrase['sending_msn_message']; if ($seeuserid) { $userinfo['where'] = '<a href="member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$seeuserid}\">{$wol_user[$seeuserid]}</a>"; } break; case 'yahoo': $userinfo['action'] = $vbphrase['sending_yahoo_message']; if ($seeuserid) { $userinfo['where'] = '<a href="member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$seeuserid}\">{$wol_user[$seeuserid]}</a>"; } break; case 'icq': $userinfo['action'] = $vbphrase['sending_icq_message']; if ($seeuserid) { $userinfo['where'] = '<a href="member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$seeuserid}\">{$wol_user[$seeuserid]}</a>"; } break; case 'skype': $userinfo['action'] = $vbphrase['sending_skype_message']; if ($seeuserid) { $userinfo['where'] = '<a href="member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$seeuserid}\">{$wol_user[$seeuserid]}</a>"; } break; case 'report': if ($vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlinefull'] and $seetitle) { $userinfo['where'] = $threadprefix . '<a href="showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p={$postid}#post{$postid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; } $userinfo['action'] = $vbphrase['reporting_post']; break; case 'printthread': $userinfo['action'] = $vbphrase['viewing_printable_version']; if ($seetitle) { $userinfo['where'] = $threadprefix . '<a href="printthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; } break; case 'calendarweek': $userinfo['action'] = $vbphrase['viewing_calendar']; if ($seecalendar) { if ($userinfo['week']) { $week = "&week={$userinfo['week']}"; } $userinfo['where'] = '<a href="calendar.php?' . $vbulletin->session->vars['sessionurl'] . "do=displayweek&c={$calendarid}{$week}\">{$calendartitle}</a>"; } break; case 'calendarmonth': $userinfo['action'] = $vbphrase['viewing_calendar']; if ($seecalendar) { $userinfo['where'] = '<a href="calendar.php?' . $vbulletin->session->vars['sessionurl'] . "do=displaymonth&c={$calendarid}&month={$userinfo['month']}&year={$userinfo['year']}\">{$calendartitle}</a>"; } break; case 'calendaryear': $userinfo['action'] = $vbphrase['viewing_calendar']; if ($seecalendar) { if ($userinfo['year']) { $year = "&year={$userinfo['year']}"; } $userinfo['where'] = '<a href="calendar.php?' . $vbulletin->session->vars['sessionurl'] . "do=displayyear&c={$calendarid}{$year}\">{$calendartitle}</a>"; } break; case 'calendarday': $userinfo['action'] = $vbphrase['viewing_calendar']; if ($seecalendar) { $userinfo['where'] = '<a href="calendar.php?' . $vbulletin->session->vars['sessionurl'] . "do=getday&c={$calendarid}&day={$userinfo['day']}\">{$calendartitle}</a>"; } break; case 'calendarevent': $userinfo['action'] = $vbphrase['viewing_event']; if ($seeevent) { $userinfo['where'] = '<a href="calendar.php?' . $vbulletin->session->vars['sessionurl'] . "do=getinfo&e={$eventid}\">{$eventtitle}</a>"; } break; case 'calendaradd': case 'calendaraddrecur': $userinfo['action'] = $vbphrase['creating_event']; if ($seecalendar) { $userinfo['where'] = '<a href="calendar.php?' . $vbulletin->session->vars['sessionurl'] . "c={$calendarid}\">{$calendartitle}</a>"; } break; case 'calendaredit': $userinfo['action'] = $vbphrase['modifying_event']; if ($seeevent) { $userinfo['where'] = '<a href="calendar.php?' . $vbulletin->session->vars['sessionurl'] . "do=getinfo&e={$eventid}\">{$eventtitle}</a>"; } break; case 'calreminder': $userinfo['action'] = $vbphrase['managing_reminder']; if ($seeevent) { $userinfo['where'] = '<a href="calendar.php?' . $vbulletin->session->vars['sessionurl'] . "do=getinfo&e={$eventid}\">{$eventtitle}</a>"; } break; case 'newusernote': $userinfo['action'] = $vbphrase['creating_user_note']; if ($seeuserid) { $userinfo['where'] = '<a href="usernote.php?' . $vbulletin->session->vars['sessionurl'] . "do=viewuser&u={$seeuserid}\">{$wol_user[$seeuserid]}</a>"; } break; case 'usernote': $userinfo['action'] = $vbphrase['viewing_user_note']; if ($seeuserid) { $userinfo['where'] = '<a href="usernote.php?' . $vbulletin->session->vars['sessionurl'] . "do=viewuser&u={$seeuserid}\">{$wol_user[$seeuserid]}</a>"; } break; case 'reputation': $userinfo['action'] = $vbphrase['giving_reputation']; if ($vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlinefull'] and $seetitle) { $userinfo['where'] = $threadprefix . '<a href="showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; } break; case 'joinrequests': $userinfo['action'] = $vbphrase['processing_joinrequests']; if ($vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlinefull'] and $vbulletin->usergroupcache["{$userinfo['usergroupid']}"]['title']) { $userinfo['where'] = construct_phrase($vbphrase['viewing_x'], $vbulletin->usergroupcache["{$userinfo['usergroupid']}"]['title']); } break; case 'threadrate': $userinfo['action'] = $vbphrase['rating_thread']; if ($seetitle) { $userinfo['where'] = $threadprefix . '<a href="showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; } break; case 'infractionreport': if ($vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['cangiveinfraction'] or $vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_wolpermissions['canreverseinfraction']) { $userinfo['action'] = $vbphrase['giving_infraction']; if ($seeuserid) { $userinfo['where'] = '<a href="member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$seeuserid}\">{$wol_user[$seeuserid]}</a>"; } else { if ($seetitle) { $userinfo['where'] = $threadprefix . '<a href="showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p={$postid}#post{$postid}\" title=\"{$threadpreview}\">{$threadtitle}</a>"; } } } else { $userinfo['action'] = $vbphrase['viewing_index']; } break; case 'infractionreverse': if ($vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['cangiveinfraction'] or $vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_wolpermissions['canreverseinfraction']) { $userinfo['action'] = $vbphrase['reversing_infraction']; if ($seeuserid) { $userinfo['where'] = '<a href="infraction.php?' . $vbulletin->session->vars['sessionurl'] . "do=view&infractionid={$userinfo['infractionid']}\">{$wol_user[$seeuserid]}</a>"; } } else { $userinfo['action'] = $vbphrase['viewing_index']; } break; case 'infractionview': if ($vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['cangiveinfraction'] or $vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_wolpermissions['canreverseinfraction']) { $userinfo['action'] = $vbphrase['viewing_infraction']; if ($seeuserid) { $userinfo['where'] = '<a href="infraction.php?' . $vbulletin->session->vars['sessionurl'] . "do=view&infractionid={$userinfo['infractionid']}\">{$wol_user[$seeuserid]}</a>"; } } else { $userinfo['action'] = $vbphrase['viewing_index']; } break; case 'modcp_deletedthreads': if (can_moderate()) { $userinfo['action'] = $vbphrase['viewing_deleted_threads']; } else { $userinfo['action'] = $vbphrase['viewing_index']; } break; case 'modcp_deletedposts': if (can_moderate()) { $userinfo['action'] = $vbphrase['viewing_deleted_posts']; } else { $userinfo['action'] = $vbphrase['viewing_index']; } break; case 'modcp_deletedvms': if (can_moderate(0, 'canmoderatevisitormessages')) { $userinfo['action'] = $vbphrase['viewing_deleted_visitor_messages']; } else { $userinfo['action'] = $vbphrase['viewing_index']; } break; case 'modcp_deletedgms': if (can_moderate(0, 'canmoderategroupmessages')) { $userinfo['action'] = $vbphrase['viewing_deleted_social_group_messages']; } else { $userinfo['action'] = $vbphrase['viewing_index']; } break; case 'modcp_deletedpcs': if (can_moderate(0, 'canmoderatepicturecomments')) { $userinfo['action'] = $vbphrase['viewing_deleted_picture_comments']; } else { $userinfo['action'] = $vbphrase['viewing_index']; } break; case 'modcp_moderatedthreads': if (can_moderate(0, 'canmoderateposts')) { $userinfo['action'] = $vbphrase['viewing_moderated_threads']; } else { $userinfo['action'] = $vbphrase['viewing_index']; } break; case 'modcp_moderatedposts': if (can_moderate(0, 'canmoderateposts')) { $userinfo['action'] = $vbphrase['viewing_moderated_posts']; } else { $userinfo['action'] = $vbphrase['viewing_index']; } break; case 'modcp_moderatedvms': if (can_moderate(0, 'canmoderatevisitormessages')) { $userinfo['action'] = $vbphrase['viewing_moderated_visitor_messages']; } else { $userinfo['action'] = $vbphrase['viewing_index']; } break; case 'modcp_moderatedgms': if (can_moderate(0, 'canmoderategroupmessages')) { $userinfo['action'] = $vbphrase['viewing_moderated_social_group_messages']; } else { $userinfo['action'] = $vbphrase['viewing_index']; } break; case 'modcp_moderatedpcs': if (can_moderate(0, 'canmoderatepicturecomments')) { $userinfo['action'] = $vbphrase['viewing_moderated_picture_comments']; } else { $userinfo['action'] = $vbphrase['viewing_index']; } break; case 'modcp_moderatedpictures': if (can_moderate(0, 'canmoderatepictures')) { $userinfo['action'] = $vbphrase['viewing_moderated_pictures']; } else { $userinfo['action'] = $vbphrase['viewing_index']; } break; case 'payments': $userinfo['action'] = $vbphrase['viewing_paid_subscriptions']; break; case 'spider': $userinfo['action'] = $vbphrase['search_engine_spider']; break; case 'admincp': $userinfo['action'] = $vbphrase['admin_control_panel']; break; case 'admincplogin': $userinfo['action'] = $vbphrase['admin_control_panel_login']; break; case 'modcp': $userinfo['action'] = $vbphrase['moderator_control_panel']; break; case 'modcplogin': $userinfo['action'] = $vbphrase['moderator_control_panel_login']; break; case 'album_delete': $userinfo['action'] = $vbphrase['deleting_album']; break; case 'album_edit_album': $userinfo['action'] = $vbphrase['editing_album']; if ($canviewalbum) { $userinfo['where'] = '<a href="album.php?' . $vbulletin->session->vars['sessionurl'] . "albumid={$albumid}\">{$albumname}</a>"; } break; case 'album_new_album': $userinfo['action'] = $vbphrase['creating_album']; break; case 'album_edit_picture': $userinfo['action'] = $vbphrase['editing_pictures']; if ($canviewalbum) { if (!empty($userinfo['pictureid'])) { $userinfo['where'] = '<a href="album.php?' . $vbulletin->session->vars['sessionurl'] . "albumid={$albumid}&pictureid=" . $userinfo['pictureid'] . "\">{$albumname}</a>"; } else { $userinfo['where'] = '<a href="album.php?' . $vbulletin->session->vars['sessionurl'] . "albumid={$albumid}\">{$albumname}</a>"; } } break; case 'album_upload': $userinfo['action'] = $vbphrase['uploading_pictures']; if ($canviewalbum) { $userinfo['where'] = '<a href="album.php?' . $vbulletin->session->vars['sessionurl'] . "albumid={$albumid}\">{$albumname}</a>"; } break; case 'album_picture': $userinfo['action'] = $vbphrase['viewing_picture']; if ($canviewalbum) { if (!empty($userinfo['pictureid'])) { $userinfo['where'] = '<a href="album.php?' . $vbulletin->session->vars['sessionurl'] . "albumid={$albumid}&pictureid=" . $userinfo['pictureid'] . "\">{$albumname}</a>"; } else { $userinfo['where'] = '<a href="album.php?' . $vbulletin->session->vars['sessionurl'] . "albumid={$albumid}\">{$albumname}</a>"; } } break; case 'album_album': $userinfo['action'] = $vbphrase['viewing_album']; if ($canviewalbum) { $userinfo['where'] = '<a href="album.php?' . $vbulletin->session->vars['sessionurl'] . "albumid={$albumid}\">{$albumname}</a>"; } break; case 'album_user': $userinfo['action'] = $vbphrase['viewing_users_album']; if ($seeuserid) { $userinfo['where'] = '<a href="album.php?' . $vbulletin->session->vars['sessionurl'] . "userid={$seeuserid}\">{$wol_user[$seeuserid]}</a>"; } break; case 'album_unread_comments': $userinfo['action'] = $vbphrase['viewing_unread_picture_comments']; break; case 'album_moderated_comments': $userinfo['action'] = $vbphrase['viewing_picture_comments_awaiting_approval']; break; case 'picturecomment_posting': $userinfo['action'] = $vbphrase['posting_picture_comment']; break; case 'picturecomment_delete': $userinfo['action'] = $vbphrase['deleting_picture_comment']; break; case 'picturecomment_reporting': $userinfo['action'] = $vbphrase['reporting_picture_comment']; break; case 'picture_inlinemod': $userinfo['action'] = '<b><i>' . $vbphrase['moderating'] . '</i></b>'; break; default: $handled = false; ($hook = vBulletinHook::fetch_hook('online_location_unknown')) ? eval($hook) : false; if ($handled == false) { if ($vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlinebad']) { require_once DIR . '/includes/functions_login.php'; $userinfo['location'] = fetch_replaced_session_url(stripslashes($userinfo['location'])); $userinfo['where'] = "<a href=\"{$userinfo['location']}\">{$userinfo['location']}</a>"; $userinfo['action'] = '<b>' . $vbphrase['unknown_location'] . '</b>'; } else { // We were unable to parse the location $userinfo['action'] = $vbphrase['viewing_index']; $userinfo['where'] = '<a href="' . $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'] . '">' . $vbulletin->options['bbtitle'] . "</a>"; } } } if ($userinfo['badlocation'] == 1) { // User received 'no permissions screen' if ($vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlinebad'] or $userinfo['userid'] == $vbulletin->userinfo['userid']) { $show['nopermission'] = true; } else { $userinfo['action'] = $vbphrase['viewing_index']; $userinfo['where'] = '<a href="' . $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'] . '">' . $vbulletin->options['bbtitle'] . "</a>"; } } else { if ($userinfo['badlocation'] == 2) { // Forum is locked $show['lockedout'] = true; } else { if ($userinfo['badlocation'] == 3) { // User received error screen if ($vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlinebad'] or $userinfo['userid'] == $vbulletin->userinfo['userid']) { $show['errormessage'] = true; } else { $userinfo['action'] = $vbphrase['viewing_index']; $userinfo['where'] = '<a href="' . $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'] . '">' . $vbulletin->options['bbtitle'] . "</a>"; } } } } if (!($vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlinelocation'])) { unset($userinfo['location']); } $userinfo['host_encoded'] = urlencode($userinfo['host']); if ($vbulletin->options['yestoday'] == 2) { $userinfo['time'] = vbdate($vbulletin->options['dateformat'], $userinfo['lastactivity'], 1); } else { $userinfo['time'] = vbdate($vbulletin->options['timeformat'], $userinfo['lastactivity']); } $wol_post['userid'] = $userinfo['userid']; $wol_post['username'] = $userinfo['realname']; ($hook = vBulletinHook::fetch_hook('online_bit_complete')) ? eval($hook) : false; if ($doall) { $show['loggedinuser'] = iif($userinfo['userid'], true, false); $show['buddy'] = iif($userinfo['buddy'], true, false); if ($userinfo['spider']) { $show['spider'] = true; if (!$userinfo['spidertype'] or !($spidertype = construct_phrase($vbphrase["x_spider_{$userinfo['spidertype']}"], $userinfo['spider']))) { $spidertype = construct_phrase($vbphrase['x_spider_searchspider'], $userinfo['spider']); } } else { $show['spider'] = false; } $show['reallocation'] = iif($userinfo['location'], true, false); $show['subscribed'] = iif($wol_thread["{$threadid}"]['issubscribed'] and $seetitle, true, false); $show['where'] = iif($userinfo['where'], true, false); eval('$onlinebits = "' . fetch_template('whosonlinebit') . '";'); return $onlinebits; } else { return $userinfo; } }
} } $messagearray["{$message['gmid']}"] = $message; $grouplist["{$message['groupid']}"] = true; } if (empty($messagearray)) { standard_error(fetch_error('you_did_not_select_any_valid_messages')); } $messagecount = count($messagearray); $groupcount = count($grouplist); $url =& $vbulletin->url; $navbits = array('' => $vbphrase['delete_messages']); $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); ($hook = vBulletinHook::fetch_hook('group_inlinemod_delete')) ? eval($hook) : false; eval('print_output("' . fetch_template('socialgroups_deletemessages') . '");'); } if ($_POST['do'] == 'doinlinedelete') { $vbulletin->input->clean_array_gpc('p', array('deletetype' => TYPE_UINT, 'deletereason' => TYPE_NOHTMLCOND)); $physicaldel = $vbulletin->GPC['deletetype'] == 2 ? true : false; // Validate Messages $messages = $db->query_read_slave("\n\t\tSELECT gm.gmid, gm.state, gm.groupid, gm.dateline, gm.postuserid, gm.postusername\n\t\tFROM " . TABLE_PREFIX . "groupmessage AS gm\n\t\tWHERE gmid IN (" . implode(',', $messageids) . ")\n\t"); while ($message = $db->fetch_array($messages)) { $group = fetch_socialgroupinfo($message['groupid']); $message['is_group_owner'] = $group['creatoruserid'] == $vbulletin->userinfo['userid']; $canmoderatemessages = fetch_socialgroup_modperm('canmoderategroupmessages', $group); $candeletemessages = (fetch_socialgroup_modperm('candeletegroupmessages', $group) or $message['state'] == 'visible' and $message['postuserid'] == $vbulletin->userinfo['userid'] and $vbulletin->userinfo['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['canmanagemessages']); $canremovemessages = can_moderate(0, 'canremovegroupmessages'); if ($message['state'] == 'moderation' and !$canmoderatemessages) { standard_error(fetch_error('you_do_not_have_permission_to_manage_moderated_messages')); } else {
$photoplog['upload_box'] = "<span class=\"smallfont\">" . $vbphrase['photoplog_upload_file_from_url_link'] . "</span>"; $photoplog['upload_box'] .= "<br /><input class=\"bginput\" type=\"text\" name=\"userlink\" size=\"40\" />"; } } $photoplog_toolbartype = $do_bbcode ? is_wysiwyg_compatible(-1, 'fe') : 0; if ($photoplog_toolbartype != 2) { $photoplog['description'] = $photoplog_file_info['description']; } // special character and link stuff for the editors $photoplog['description'] = str_replace('src="images/smilies/', 'src="' . $vbulletin->options['bburl'] . '/images/smilies/', $photoplog['description']); $photoplog['description'] = htmlspecialchars_uni($photoplog['description']); // yep this is how to get the description in $messagearea = str_replace("</textarea>", $photoplog['description'] . "</textarea>", $messagearea); ($hook = vBulletinHook::fetch_hook('photoplog_edit_fields')) ? eval($hook) : false; eval('$photoplog_field_title = "' . fetch_template('photoplog_field_title') . '";'); eval('$photoplog_field_description = "' . fetch_template('photoplog_field_description') . '";'); $photoplog_custom_field = ''; photoplog_make_custom_fields($photoplog_file_catid, $photoplog_fielddata); $photoplog['catid'] = $photoplog_file_catid; photoplog_file_link($photoplog['userid'], $photoplog['fileid'], $photoplog['filename']); $photoplog_hslink1 = 'file_' . substr($vbulletin->options['photoplog_highslide_medium_thumb'], 0, 1) . 'link'; $photoplog_hslink2 = 'file_' . substr($vbulletin->options['photoplog_highslide_medium_thumb'], -1, 1) . 'link'; $photoplog['do_highslide'] = 0; if ($photoplog_hslink1 != 'file_nlink' && $photoplog_hslink2 != 'file_nlink') { $photoplog['do_highslide'] = 1; } $photoplog['hslink1'] = $photoplog['file_slink']; $photoplog['hslink2'] = $photoplog['file_llink']; if ($vbulletin->options['photoplog_highslide_active'] && $photoplog['do_highslide']) { $photoplog['hslink1'] = $photoplog[$photoplog_hslink1]; $photoplog['hslink2'] = $photoplog[$photoplog_hslink2];
/** * Generates HTML for the subscription form page * * @param string Hash used to indicate the transaction within vBulletin * @param string The cost of this payment * @param string The currency of this payment * @param array Information regarding the subscription that is being purchased * @param array Information about the user who is purchasing this subscription * @param array Array containing specific data about the cost and time for the specific subscription period * * @return array Compiled form information */ function generate_form_html($hash, $cost, $currency, $subinfo, $userinfo, $timeinfo) { global $vbphrase, $vbulletin, $stylevar, $show; $item = $hash; $form['action'] = 'https://www.2checkout.com/cgi-bin/sbuyers/cartpurchase.2c'; $form['method'] = 'get'; // load settings into array so the template system can access them $settings =& $this->settings; $subinfo['twocheckout_prodid'] = htmlspecialchars_uni($timeinfo['twocheckout_prodid']); eval('$form[\'hiddenfields\'] .= "' . fetch_template('subscription_payment_2checkout') . '";'); return $form; }
$parentlist = array_reverse(explode(',', $foruminfo['parentlist'])); foreach ($parentlist as $forumID) { $forumTitle = $vbulletin->forumcache["{$forumID}"]['title']; $navbits['forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f={$forumID}"] = $forumTitle; } $navbits['showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p={$postid}"] = $threadinfo['prefix_plain_html'] . ' ' . $threadinfo['title']; $navbits[''] = $vbphrase['report_bad_post']; $navbits = construct_navbits($navbits); require_once DIR . '/includes/functions_editor.php'; $textareacols = fetch_textarea_width(); eval('$usernamecode = "' . fetch_template('newpost_usernamecode') . '";'); eval('$navbar = "' . fetch_template('navbar') . '";'); ($hook = vBulletinHook::fetch_hook('report_form_start')) ? eval($hook) : false; $url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p={$postid}#post{$postid}"; $forminfo = $reportobj->set_forminfo($postinfo); eval('print_output("' . fetch_template('reportitem') . '");'); } if ($_POST['do'] == 'sendemail') { $vbulletin->input->clean_array_gpc('p', array('reason' => TYPE_STR)); if ($vbulletin->GPC['reason'] == '') { eval(standard_error(fetch_error('noreason'))); } if ($perform_floodcheck) { $reportobj->perform_floodcheck_commit(); } $reportobj->do_report($vbulletin->GPC['reason'], $postinfo); eval(print_standard_redirect('redirect_reportthanks')); } /*======================================================================*\ || #################################################################### || # Downloaded: 08:19, Wed Nov 5th 2008
} if ($vbulletin->GPC['folderid'] == -1) { $show['sentto'] = true; $show['movetofolder'] = false; } else { $show['sentto'] = false; $show['movetofolder'] = true; } $totalmessages = vb_number_format($totalmessages); $pmtotal = vb_number_format($vbulletin->userinfo['pmtotal']); $pmquota = vb_number_format($vbulletin->userinfo['permissions']['pmquota']); $templatename = 'pm_messagelist'; } // ############################################################################# if ($templatename != '') { // draw cp nav bar construct_usercp_nav($templatename); // build navbar $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); ($hook = vBulletinHook::fetch_hook('private_complete')) ? eval($hook) : false; // print page eval('$HTML = "' . fetch_template($templatename) . '";'); eval('print_output("' . fetch_template('USERCP_SHELL') . '");'); } /*======================================================================*\ || #################################################################### || # Downloaded: 22:41, Fri Oct 10th 2008 || # CVS: $RCSfile$ - $Revision: 27516 $ || #################################################################### \*======================================================================*/
function project_sidebar() { global $db, $con, $html, $config, $currency, $symbol, $area, $logger, $_GET, $phrase; if ($con->estrato == -1) { $min = 4; $max = 6; } else { $min = $con->estrato-1; $max = $con->estrato+1; if ($max > 6) { $min--; } if ($min < 0) { $max++; } } $project = $db->query_first("SELECT * FROM `project` WHERE `id`!=".$db->sql($_GET['id'])." AND `estrato`>=".$db->sql($min)." AND `estrato`<=".$db->sql($max)." AND `vende` > 0 ORDER BY RAND()"); if (!$project['id']) { $logger->log("Had to search for any old project to fill in the sidebar"); $project = $db->query_first("SELECT * FROM `project` WHERE `id`!=".$db->sql($_GET['id'])." ORDER BY RAND()"); } $project['price_min'] = convert_currency($project['price_min']); $project['price_max'] = convert_currency($project['price_max']); $project['area_min'] = convert_area($project['area_min']); $project['area_max'] = convert_area($project['area_max']); eval('$html["sidebars"] .= "'.fetch_template('sidebar_project').'";'); }
/** * Fetches and prepares posts for quoting. Returned text is BB code. * * @param array Array of post IDs to pull from * @param integer The ID of the thread that is being quoted into * @param integer Returns the number of posts that were unquoted because of the value of the next argument * @param array Returns the IDs of the posts that were actually quoted * @param string Controls what posts are successfully quoted: all, only (only the thread ID), other (only other thread IDs) * @param boolean Whether to undo the htmlspecialchars calls; useful when returning HTML to be entered via JS */ function fetch_quotable_posts($quote_postids, $threadid, &$unquoted_posts, &$quoted_post_ids, $limit_thread = 'only', $unhtmlspecialchars = false) { global $vbulletin; $unquoted_posts = 0; $quoted_post_ids = array(); $quote_postids = array_diff_assoc(array_unique(array_map('intval', $quote_postids)), array(0)); // limit to X number of posts if ($vbulletin->options['mqlimit'] > 0) { $quote_postids = array_slice($quote_postids, 0, $vbulletin->options['mqlimit']); } if (empty($quote_postids)) { // nothing to quote return ''; } $hook_query_fields = $hook_query_joins = ''; ($hook = vBulletinHook::fetch_hook('quotable_posts_query')) ? eval($hook) : false; $quote_post_data = $vbulletin->db->query_read_slave("\n\t\tSELECT post.postid, post.title, post.pagetext, post.dateline, post.userid, post.visible AS postvisible,\n\t\t\tIF(user.username <> '', user.username, post.username) AS username,\n\t\t\tthread.threadid, thread.title AS threadtitle, thread.postuserid, thread.visible AS threadvisible,\n\t\t\tforum.forumid, forum.password\n\t\t\t{$hook_query_fields}\n\t\tFROM " . TABLE_PREFIX . "post AS post\n\t\tLEFT JOIN " . TABLE_PREFIX . "user AS user ON (post.userid = user.userid)\n\t\tINNER JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)\n\t\tINNER JOIN " . TABLE_PREFIX . "forum AS forum ON (thread.forumid = forum.forumid)\n\t\t{$hook_query_joins}\n\t\tWHERE post.postid IN (" . implode(',', $quote_postids) . ")\n\t"); $quote_posts = array(); while ($quote_post = $vbulletin->db->fetch_array($quote_post_data)) { if ((!$quote_post['postvisible'] or $quote_post['postvisible'] == 2) and !can_moderate($quote_post['forumid']) or (!$quote_post['threadvisible'] or $quote_post['threadvisible'] == 2) and !can_moderate($quote_post['forumid'])) { // no permission to view this post continue; } $forumperms = fetch_permissions($quote_post['forumid']); if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) or !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) or !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) and ($quote_post['postuserid'] != $vbulletin->userinfo['userid'] or $vbulletin->userinfo['userid'] == 0) or !verify_forum_password($quote_post['forumid'], $quote_post['password'], false) or in_coventry($quote_post['postuserid']) and !can_moderate($quote_post['forumid']) or in_coventry($quote_post['userid']) and !can_moderate($quote_post['forumid'])) { // no permission to view this post continue; } if ($limit_thread == 'only' and $quote_post['threadid'] != $threadid or $limit_thread == 'other' and $quote_post['threadid'] == $threadid or $limit_thread == 'all') { $unquoted_posts++; continue; } $skip_post = false; ($hook = vBulletinHook::fetch_hook('quotable_posts_logic')) ? eval($hook) : false; if ($skip_post) { continue; } $quote_posts["{$quote_post['postid']}"] = $quote_post; } $message = ''; foreach ($quote_postids as $quote_postid) { if (!isset($quote_posts["{$quote_postid}"])) { continue; } $quote_post =& $quote_posts["{$quote_postid}"]; $originalposter = fetch_quote_username($quote_post['username'] . ";{$quote_post['postid']}"); $postdate = vbdate($vbulletin->options['dateformat'], $quote_post['dateline']); $posttime = vbdate($vbulletin->options['timeformat'], $quote_post['dateline']); $pagetext = htmlspecialchars_uni($quote_post['pagetext']); $pagetext = trim(strip_quotes($pagetext)); ($hook = vBulletinHook::fetch_hook('newreply_quote')) ? eval($hook) : false; eval('$message .= "' . fetch_template('newpost_quote', 0, false) . '\\n";'); $quoted_post_ids[] = $quote_postid; } if ($unhtmlspecialchars) { $message = unhtmlspecialchars($message); } return $message; }
/** * Returns the HTML to be displayed to the user for Human Verification * * @param string Passed to template * * @return string HTML to output * */ function output_token($var_prefix = 'humanverify') { global $vbphrase, $stylevar, $show; $vbulletin =& $this->registry; $humanverify = $this->generate_token(); if (REQ_PROTOCOL === 'https') { $show['recaptcha_ssl'] = true; } $public_key = $this->registry->options['hv_recaptcha_publickey'] ? $this->registry->options['hv_recaptcha_publickey'] : '6LfHsgMAAAAAAMVjkB1nC_nI5qfAjVk0qxz4VtPV'; $humanverify['publickey'] = $public_key; $humanverify['theme'] = $this->registry->options['hv_recaptcha_theme']; if (preg_match('#^([a-z]{2})-?#i', $stylevar['languagecode'], $matches)) { $humanverify['langcode'] = strtolower($matches[1]); } eval('$output = "' . fetch_template('humanverify_recaptcha') . '";'); return $output; }
function fetch_time_options($giAH, $use24hour = false, &$customtime) { global $vbulletin, $stylevar, $vbphrase; static $timearray; if (!is_array($timearray)) { $timearray = array(); if ($use24hour) { for ($hour = 0; $hour < 24; $hour++) { for ($mins = 0; $mins <= 30; $mins += 30) { $hh = str_pad($hour, 2, 0, STR_PAD_LEFT); $mm = str_pad($mins, 2, 0, STR_PAD_LEFT); $timearray["{$hour}_{$mm}"] = "{$hh}:{$mm}"; } } $timearray['0_00'] = $vbphrase['midnight']; $timearray['12_00'] = $vbphrase['midday']; } else { $ampm_array = array('AM' => 'am', 'PM' => 'pm'); $hour_array = array(12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); foreach ($ampm_array as $AMPM => $ampm) { foreach ($hour_array as $hour) { for ($mins = 0; $mins <= 30; $mins += 30) { $hh = str_pad($hour, 2, 0, STR_PAD_LEFT); $mm = str_pad($mins, 2, 0, STR_PAD_LEFT); $timearray["{$hour}_{$mm}_{$AMPM}"] = "{$hh}:{$mm} {$ampm}"; } } } $timearray['12_00_AM'] = $vbphrase['midnight']; $timearray['12_00_PM'] = $vbphrase['midday']; } } if (is_array($giAH)) { if ($giAH[1] != '00' and $giAH[1] != '30') { if ($use24hour) { $customtime = "{$giAH['3']}:{$giAH['1']}"; } else { $customtime = "{$giAH['0']}:{$giAH['1']} {$giAH['2']}"; } } else { if ($use24hour) { $selectedindex = intval($giAH[3]) . '_' . $giAH[1]; } else { $selectedindex = intval($giAH[0]) . '_' . $giAH[1] . '_' . $giAH[2]; } } } else { $selectedindex = false; } $output = ''; eval('$output .= "' . fetch_template('option') . '";'); foreach ($timearray as $optionvalue => $optiontitle) { $optionselected = iif($optionvalue == $selectedindex, 'selected="selected"', ''); eval('$output .= "' . fetch_template('option') . '";'); } return $output; }
/** * protected void associateAccount(array $user, int $vbnexus_userid) * Forces GFC users to choose a password (and a valid email too for * users of vbnexus3). The change is then flagged in the database with * field vbnexus_user.associated set to 2. * * @param array $user * @param int $vbnexus_userid * @return void */ protected function associateAccount($user, $vbnexus_userid) { global $vbulletin, $vboptions, $vbphrase, $stylevar, $vbnexus_loc; if (!intval($user['userid'])) { return false; } // If the user is submitting email and/or password, process it if (isset($_POST['vbnexus_gfc_fix'])) { // Validate input if (empty($_POST['email'])) { $vbnexus_error = "A valid email is required"; } elseif (empty($_POST['password'])) { $vbnexus_error = "A valid password is required"; } elseif (empty($_POST['password2']) || $_POST['password'] != $_POST['password2']) { $vbnexus_error = "Passwords do not match"; } else { $require_activation = $vbulletin->options['verifyemail'] && $user['email'] != $_POST['email']; $userdata =& datamanager_init('user', $vbulletin, ERRTYPE_SILENT); $userdata->set_existing(fetch_userinfo($user['userid'])); $userdata->set('password', $_POST['password']); // We can ignore validation of the email if it wasn't changed $user['email'] == $_POST['email'] || $userdata->set('email', $_POST['email']); if ($require_activation) { $userdata->set('usergroupid', 3); } if ($userdata->has_errors(false)) { $vbnexus_error = join('</li><li>', $userdata->errors); } elseif ($userdata->save()) { if ($require_activation) { // Email phrase 'activateaccount' expects vars called $userid, $username // and $activateid to be defined and meaningfull $userid = $user['userid']; $username = $user['username']; $activateid = build_user_activation_id($userid, $user['usergroupid'], 0); eval(fetch_email_phrases('activateaccount', $languageid)); // After eval'ing activateaccount we have vars $subject and $message set vbmail($_POST['email'], $subject, $message, true); } // The user was updated, there's now a valid password and email, so let's flag it $sql = "UPDATE `" . TABLE_PREFIX . "vbnexus_user`\r\n SET `associated` = 2\r\n WHERE `nonvbid` = '{$vbnexus_userid}'\r\n AND `service` = 'gfc'"; $vbulletin->db->query_write($sql); if ($vbulletin->db->query_write($sql)) { // Returning since we're done here and execution should go on normally return; } else { // This should never happen, it's mostly for debugging if something goes wrong $errmsg = "An error occurred trying to update your GFC information. Please try again." . " If the problem persists please report it to an admin."; return eval(standard_error($errmsg)); // Prints and exits } } else { // This should never happen, it's mostly for debugging if something goes wrong $errmsg = "An error occurred trying to update the account information. Please try again." . " If the problem persists please report it to an admin."; return eval(standard_error($errmsg)); // Prints and exits } } $user['email'] = $_POST['email']; } $vBNexusUser = $user; // No need to show mock emails from old vbnexus (< 3) if (empty($_POST['email']) && preg_match("/apps\\+|{$vbnexus_userid}[@\\.]/", $user['email'])) { $vBNexusUser['email'] = ''; } $vbnexus_loc = $_GET['loc']; // This will print a Message box (not really an error, but the actual form) and exit eval('$html = "' . fetch_template('vbnexus_3_gfc_invalid_email') . '";'); eval(standard_error($html)); }
function parse_bbcode_thanks($message, $thanks_required) { global $vbphrase, $stylevar; //prepair variables include_once DIR . '/kbank/award_functions.php'; //include kBank Award functions $thanks = fetchAwarded($this->vars['postid'], true, false, $this->registry->userinfo['userid']); if ($this->registry->kbank['hide']['thanksMax'] != 0) { //there is a limit for maximum required thank amount $thanks_required = min($thanks_required, $this->registry->kbank['hide']['thanksMax']); } //fix " issue $message = str_replace('\\"', '"', $message); //check permission $canview = false; if (!$this->settings['banned']) { if ($this->can_override()) { $canview = true; } else { if ($this->registry->userinfo['userid'] and is_numeric($thanks[$this->registry->userinfo['userid']]['points']) and $thanks[$this->registry->userinfo['userid']]['points'] >= $thanks_required) { $canview = true; } } } //build info message if ($thanks_required) { $info_message = construct_phrase($vbphrase['kbank_hide_thanks_required_with_amount'], $thanks_required, $this->registry->kbank['name']); } else { $info_message = construct_phrase($vbphrase['kbank_hide_thanks_required']); } //prepair output if ($this->settings['dohtml']) { eval('$message = "' . fetch_template('kbank_hide_replacement_thanks') . '";'); } else { $message = $canview ? $message : construct_phrase($vbphrase['kbank_hide_message_nohtml'], $info_message); } //Everything done! Return result return $message; }
$infractiongroups .= (!empty($infractiongroups) ? ', ' : '') . $vbulletin->usergroupcache["{$groupid}"]['title']; } $show['groups'] = true; } $firstgroup = $firstpoints = $moregroups = ''; $pgroups = $db->query_read_slave("\n\t\tSELECT orusergroupid, pointlevel\n\t\tFROM " . TABLE_PREFIX . "infractiongroup\n\t\tWHERE usergroupid IN (-1, {$userinfo['usergroupid']})\n\t\tORDER BY pointlevel\n\t"); while ($pgroup = $db->fetch_array($pgroups)) { if ($vbulletin->usergroupcache["{$pgroup['orusergroupid']}"]) { if ($firstgroup) { $show['moregroups'] = true; $grouptitle = $vbulletin->usergroupcache["{$pgroup['orusergroupid']}"]['title']; $points = $pgroup['pointlevel']; eval('$moregroups .= "' . fetch_template('userinfraction_groupbit') . '";'); } else { $firstgroup = $vbulletin->usergroupcache["{$pgroup['orusergroupid']}"]['title']; $firstpoints = $pgroup['pointlevel']; } $show['possiblegroups'] = true; } } eval('$navbar = "' . fetch_template('navbar') . '";'); ($hook = vBulletinHook::fetch_hook('infraction_report_complete')) ? eval($hook) : false; $url =& $vbulletin->url; eval('print_output("' . fetch_template('userinfraction') . '");'); } /*======================================================================*\ || #################################################################### || # Downloaded: 08:19, Wed Nov 5th 2008 || # CVS: $RCSfile$ - $Revision: 26399 $ || #################################################################### \*======================================================================*/
$show['albumselect'] = count($albums) == 1 ? false : true; $vbulletin->userinfo['cachedcss'] = $usercss->build_css($usercss->fetch_effective()); $vbulletin->userinfo['cachedcss'] = str_replace('/*sessionurl*/', $vbulletin->session->vars['sessionurl_js'], $vbulletin->userinfo['cachedcss']); if ($vbulletin->userinfo['cachedcss']) { $userinfo = $vbulletin->userinfo; eval('$usercss_string = "' . fetch_template('memberinfo_usercss') . '";'); } else { $usercss_string = ''; } eval('$headinclude .= "' . fetch_template('modifyusercss_headinclude') . '";'); $navbits[''] = $vbphrase['customize_profile']; construct_usercp_nav('customize'); $templatename = 'modifyusercss'; } // ############################################################################# // spit out final HTML if we have got this far if ($templatename != '') { // make navbar $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); ($hook = vBulletinHook::fetch_hook('profile_complete')) ? eval($hook) : false; // shell template eval('$HTML = "' . fetch_template($templatename) . '";'); eval('print_output("' . fetch_template($shelltemplatename) . '");'); } /*======================================================================*\ || #################################################################### || # Downloaded: 08:19, Wed Nov 5th 2008 || # CVS: $RCSfile$ - $Revision: 28139 $ || #################################################################### \*======================================================================*/
/** * Parse message content for preview * * @param array Message and disablesmilies options * * @return string Eval'd html for display as the preview message */ function process_visitor_message_preview($message) { global $vbulletin, $vbphrase, $stylevar, $show; require_once DIR . '/includes/class_bbcode.php'; $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list()); $previewhtml = ''; if ($previewmessage = $bbcode_parser->parse($message['message'], 'socialmessage', $message['disablesmilies'] ? 0 : 1)) { eval('$previewhtml = "' . fetch_template('visitormessage_preview') . '";'); } return $previewhtml; }