public static function time($timestamp) { if (empty($timestamp)) { $timestamp = 0; } return vbdate(vB::getDatastore()->getOption('timeformat'), $timestamp); }
public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false) { $messageinfo =& $this->content['visitormessage'][$activity['contentid']]; $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true); $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']); $userinfo2 =& $this->content['user'][$messageinfo['userid']]; $messageinfo['preview'] = strip_quotes($messageinfo['pagetext']); $messageinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($messageinfo['preview'], false, true, true, true), vb::$vbulletin->options['as_snippet']))); $userinfo = $this->fetchUser($activity['userid'], $messageinfo['postusername']); if ($fetchphrase) { if ($userinfo['userid']) { $phrase = construct_phrase($this->vbphrase['x_created_a_visitormessage_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('member', $userinfo2, $linkinfo), $messageinfo['vmid'], fetch_seo_url('member', $userinfo2), $userinfo2['username']); } else { $phrase = construct_phrase($this->vbphrase['guest_x_created_a_visitormessage_y_in_z'], $userinfo['username'], fetch_seo_url('member', $userinfo2, $linkinfo), $messageinfo['vmid'], fetch_seo_url('member', $userinfo2), $userinfo2['username']); } return array('phrase' => $phrase, 'userinfo' => $userinfo, 'activity' => $activity); } else { $templater = vB_Template::create($templatename); $templater->register('userinfo', $userinfo); $templater->register('userinfo2', $userinfo2); $templater->register('linkinfo', array('vmid' => $messageinfo['vmid'])); $templater->register('linkinfo2', array('tab' => 'visitor_messaging')); $templater->register('activity', $activity); $templater->register('messageinfo', $messageinfo); return $templater->render(); } }
public static function create_array($ids) { global $vbulletin; $set = $vbulletin->db->query_read_slave(" SELECT announcementid, startdate, title, announcement.views, forumid, user.username, user.userid, user.usertitle, user.customtitle, user.usergroupid, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid FROM " . TABLE_PREFIX . "announcement AS announcement LEFT JOIN " . TABLE_PREFIX . "user AS user USING (userid) WHERE announcementid IN (" . implode(',', array_map('intval', $ids)) . ") "); $items = array(); while ($record = $vbulletin->db->fetch_array($set)) { fetch_musername($record); $record['title'] = fetch_censored_text($record['title']); $record['postdate'] = vbdate($vbulletin->options['dateformat'], $record['startdate']); $record['statusicon'] = 'new'; $record['views'] = vb_number_format($record['views']); $record['forumtitle'] = $vbulletin->forumcache["$record[forumid]"]['title']; $show['forumtitle'] = ($record['forumid'] == -1) ? false : true; $announcement = new vBForum_Search_Result_Announcement(); $announcement->record = $record; $items[$record['announcementid']] = $announcement; } return $items; }
public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false) { $commentinfo =& $this->content['album_picturecomment'][$activity['contentid']]; $albuminfo =& $this->content['album'][$commentinfo['albumid']]; $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true); $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']); $preview = strip_quotes($commentinfo['pagetext']); $commentinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($preview, false, true, true, true), vb::$vbulletin->options['as_snippet']))); $userinfo = $this->fetchUser($activity['userid'], $commentinfo['postusername']); $userinfo2 = $this->fetchUser($albuminfo['userid']); if ($fetchphrase) { if ($userinfo['userid']) { $phrase = construct_phrase($this->vbphrase['x_commented_on_a_photo_in_album_y'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('member', $userinfo2), $userinfo2['username'], vB::$vbulletin->session->vars['sessionurl'], $albuminfo['albumid'], $albuminfo['title']); } else { $phrase = construct_phrase($this->vbphrase['guest_x_commented_on_a_photo_in_album_y'], $userinfo['username'], fetch_seo_url('member', $userinfo2), $userinfo2['username'], vB::$vbulletin->session->vars['sessionurl'], $albuminfo['albumid'], $albuminfo['title']); } return array('phrase' => $phrase, 'userinfo' => $userinfo, 'activity' => $activity); } else { $templater = vB_Template::create($templatename); $templater->register('userinfo', $userinfo); $templater->register('userinfo2', $userinfo2); $templater->register('activity', $activity); $templater->register('commentinfo', $commentinfo); $templater->register('albuminfo', $albuminfo); return $templater->render(); } }
protected function addContentInfo($results) { $results = parent::addContentInfo($results); $checkvoted = array(); try { $checkvoted = $this->checkVotedMultiple(array_keys($results)); } catch (vB_Exception_Api $e) { // Ignore for guest user } //the key of for each node is the nodeid, fortunately foreach ($results as $key => &$record) { if (!empty($record['options']) and !is_array($record['options'])) { $record['options'] = @unserialize($record['options']); } // Check if the poll is timeout if (isset($record['timeout'])) { $record['istimeout'] = ($record['timeout'] and $record['timeout'] < vB::getRequest()->getTimeNow()); // For timeout input if ($record['timeout']) { $record['timeoutstr'] = vbdate("m/d/Y H:i", $record['timeout']); } else { $record['timeoutstr'] = ''; } } else { $record['timeoutstr'] = ''; $record['istimeout'] = false; } // Check if it's voted already // TODO: we need to improve this to consider voting permissions for guests. $record['voted'] = !empty($checkvoted[$key]) ? $checkvoted[$key] : false; } return $results; }
public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false) { $postinfo =& $this->content['cms_post'][$activity['contentid']]; $nodeinfo =& $this->content['cms_node'][$postinfo['nodeid']]; $articleinfo =& $this->content['cms_article'][$nodeinfo['contentid']]; $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true); $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']); $preview = strip_quotes($postinfo['pagetext']); $articleinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($preview, false, true, true, true), vb::$vbulletin->options['as_snippet']))); $articleinfo['fullurl'] = vB_Route::create('vBCms_Route_Content', $nodeinfo['nodeid'] . ($nodeinfo['url'] == '' ? '' : '-' . $nodeinfo['url']))->getCurrentURL(); $nodeinfo['parenturl'] = $this->fetchParentUrl($nodeinfo['parentnode']); $nodeinfo['parenttitle'] = $this->fetchParentTitle($nodeinfo['parentnode']); $userinfo = $this->fetchUser($activity['userid'], $postinfo['username']); if ($fetchphrase) { if ($userinfo['userid']) { $phrase = construct_phrase($this->vbphrase['x_commented_on_an_article_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], $articleinfo['fullurl'], $nodeinfo['title'], $nodeinfo['parenturl'], $nodeinfo['parenttitle']); } else { $phrase = construct_phrase($this->vbphrase['guest_x_commented_on_an_article_y_in_z'], $userinfo['username'], $articleinfo['fullurl'], $nodeinfo['title'], $nodeinfo['parenturl'], $nodeinfo['parenttitle']); } return array('phrase' => $phrase, 'userinfo' => $userinfo, 'activity' => $activity); } else { $templater = vB_Template::create($templatename); $templater->register('userinfo', $userinfo); $templater->register('postinfo', $postinfo); $templater->register('activity', $activity); $templater->register('nodeinfo', $nodeinfo); $templater->register('articleinfo', $articleinfo); return $templater->render(); } }
function fetch_event_date_time($info) { global $timerange, $vbulletin, $vbphrase, $months, $days, $day, $month, $year, $holiday, $eventdate; global $titlecolor, $date1, $date2, $time1, $time2, $recurcriteria, $allday, $show; require_once DIR . '/includes/functions_misc.php'; $daterange = ''; $recurcriteria = ''; $show['recuroption'] = false; $titlecolor = 'alt1'; $info['title'] = htmlspecialchars_uni($info['title']); if ($wordwrap != 0) { $info['title'] = fetch_word_wrapped_string($info['title']); } $info['event'] = iif(empty($info['event']), ' ', parse_calendar_bbcode($info['event'], $info['allowsmilies'])); if (!$info['recurring'] and !$info['singleday']) { $daystamp = gmmktime(0, 0, 0, $month, $day, $year); $eventfirstday = gmmktime(0, 0, 0, gmdate('n', $info['dateline_from_user']), gmdate('j', $info['dateline_from_user']), gmdate('Y', $info['dateline_from_user'])); $eventlastday = gmmktime(0, 0, 0, gmdate('n', $info['dateline_to_user']), gmdate('j', $info['dateline_to_user']), gmdate('Y', $info['dateline_to_user'])); if ($info['dateline_from'] == $daystamp) { if ($eventfirstday == $daystamp) { if ($eventfirstday != $eventlastday) { if (vbdate('g:ia', $info['dateline_from_user'], false, false) == '12:00am') { $allday = true; } else { $time2 = vbgmdate($vbulletin->options['timeformat'], gmmktime(0, 0, 0, $month, $day, $year)); } } } } else { if ($eventlastday == $daystamp) { $time1 = gmdate($vbulletin->options['timeformat'], gmmktime(0, 0, 0, $month, $day, $year)); $time1 = vbgmdate($vbulletin->options['timeformat'], gmmktime(0, 0, 0, $month, $day, $year)); } else { $allday = true; // Used in conditional } } } if ($info['holidayid']) { $eventdate = vbgmdate($vbulletin->options['dateformat'], gmmktime(0, 0, 0, $month, $day, $year)); } else { if ($info['singleday']) { $eventdate = vbgmdate($vbulletin->options['dateformat'], $info['dateline_from']); } else { $date1 = vbgmdate($vbulletin->options['dateformat'], $info['dateline_from_user']); $date2 = vbgmdate($vbulletin->options['dateformat'], $info['dateline_to_user']); $time1 = vbgmdate($vbulletin->options['timeformat'], $info['dateline_from_user']); $time2 = vbgmdate($vbulletin->options['timeformat'], $info['dateline_to_user']); if ($info['recurring']) { $recurcriteria = fetch_event_criteria($info); $show['recuroption'] = true; } else { $show['daterange'] = iif($date1 != $date2, true, false); $eventdate = vbgmdate($vbulletin->options['dateformat'], $info['dateline_from_user']); } } } return $info; }
/** * Prepares a picture array for thumbnail display. * * @param array Array of picture info * * @return array Array of picture info modified */ function prepare_pictureinfo_thumb($pictureinfo) { global $vbulletin; $pictureinfo['caption_preview'] = fetch_censored_text(fetch_trimmed_title($pictureinfo['caption'], $vbulletin->options['album_captionpreviewlen'])); $pictureinfo['dimensions'] = $pictureinfo['thumbnail_width'] ? "width=\"{$pictureinfo['thumbnail_width']}\" height=\"{$pictureinfo['thumbnail_height']}\"" : ''; $pictureinfo['date'] = vbdate($vbulletin->options['dateformat'], $pictureinfo['dateline'], true); $pictureinfo['time'] = vbdate($vbulletin->options['timeformat'], $pictureinfo['dateline']); return $pictureinfo; }
function construct_threaded_post_link($post, $imageString, $depth, $haschildren, $highlightpost = false) { global $vbulletin, $bgclass, $curpostid, $parent_postids, $morereplies, $threadedmode, $vbphrase, $postattach; global $threadinfo; // ugly static $lasttitle; //print_array($post); if ($threadedmode == 2 and $highlightpost) { $highlightpost = 1; } else { $highlightpost = 0; } $pageinfo = array('p' => $post['postid']); if ($vbulletin->GPC['highlight']) { $pageinfo['highlight'] = urlencode($vbulletin->GPC['highlight']); } // write 'more replies below' link if ($vbulletin->options['threaded_listdepth'] != 0 and $depth == $vbulletin->options['threaded_listdepth'] and $post['postid'] != $curpostid and $haschildren and ($vbulletin->options['threaded_listdepth'] != 0 and $depth == $vbulletin->options['threaded_listdepth'] and !strpos(' ,' . $curpostid . $parent_postids . ',', ',' . $post['postid'] . ','))) { $morereplies[$post['postid']] = 1; return "writeLink({$post['postid']}, " . fetch_statusicon_from_child_posts($post['postid']) . ", 0, 0, \"{$imageString}\", \"\", \"more\", \"\", {$highlightpost}, \"" . addslashes_js(fetch_seo_url('thread|js', $threadinfo, $pageinfo) . "#post{$post['postid']}") . "\");\n"; } // get time fields $post['date'] = vbdate($vbulletin->options['dateformat'], $post['dateline'], 1); $post['time'] = vbdate($vbulletin->options['timeformat'], $post['dateline']); // get status icon and paperclip $post['statusicon'] = iif($post['dateline'] > $threadinfo['threadview'], 1, 0); // get paperclip $post['paperclip'] = 0; if (is_array($postattach["{$post['postid']}"])) { foreach ($postattach["{$post['postid']}"] as $attachment) { if ($attachment['visible']) { $post['paperclip'] = 1; break; } } } // echo some text from the post if no title if ($post['isdeleted']) { $post['title'] = $vbphrase['post_deleted']; } else { if (empty($post['title'])) { $pagetext = htmlspecialchars_uni($post['pagetext']); $pagetext = strip_bbcode($pagetext, 1); if (trim($pagetext) == '') { $post['title'] = $vbphrase['reply_prefix'] . ' ' . fetch_trimmed_title($lasttitle, $vbulletin->options['threaded_trimtitle']); } else { $post['title'] = '<i>' . fetch_trimmed_title($pagetext, $vbulletin->options['threaded_trimtitle']) . '</i>'; } } else { $lasttitle = $post['title']; $post['title'] = fetch_trimmed_title($post['title'], $vbulletin->options['threaded_trimtitle']); } } ($hook = vBulletinHook::fetch_hook('showthread_threaded_construct_link')) ? eval($hook) : false; return "writeLink({$post['postid']}, {$post['statusicon']}, {$post['paperclip']}, " . intval($post['userid']) . ", \"{$imageString}\", \"" . addslashes_js($post['title'], '"') . "\", \"" . addslashes_js($post['date'], '"') . "\", \"" . addslashes_js($post['time'], '"') . "\", {$highlightpost}, \"" . addslashes_js(fetch_seo_url('thread|js', $threadinfo, $pageinfo) . "#post{$post['postid']}") . "\");\n"; }
/** * Prepares a picture array for thumbnail display. * * @param array Array of picture info * @param array Container info (either for a group or album); changes thumbnail URL * * @return array Array of picture info modified */ function prepare_pictureinfo_thumb($pictureinfo, $displaytypeinfo) { global $vbulletin; $pictureinfo['caption_preview'] = fetch_censored_text(fetch_trimmed_title($pictureinfo['caption'], $vbulletin->options['album_captionpreviewlen'])); $pictureinfo['thumburl'] = $pictureinfo['thumbnail_filesize'] ? fetch_picture_url($pictureinfo, $displaytypeinfo, true) : ''; $pictureinfo['dimensions'] = $pictureinfo['thumbnail_width'] ? "width=\"{$pictureinfo['thumbnail_width']}\" height=\"{$pictureinfo['thumbnail_height']}\"" : ''; $pictureinfo['date'] = vbdate($vbulletin->options['dateformat'], $pictureinfo['dateline'], true); $pictureinfo['time'] = vbdate($vbulletin->options['dateformat'], $pictureinfo['dateline']); ($hook = vBulletinHook::fetch_hook('album_prepare_thumb')) ? eval($hook) : false; return $pictureinfo; }
/** * 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; }
/** * Creates the milestone stats array (target date, total issues, progress). * Array contains formatted data. * * @param array Array of milestone info * @param array Array of raw count info * * @return array Formatted stats data */ function prepare_milestone_stats($milestone, $raw_counts) { global $vbulletin; $stats = array('total_issues' => vb_number_format($raw_counts['total_issues']), 'total_completed' => vb_number_format($raw_counts['total_completed']), 'total_active' => vb_number_format($raw_counts['total_active']), 'percent_completed' => vb_number_format($raw_counts['percent_completed'])); if ($milestone['completeddate']) { $stats['completed_date'] = vbdate($vbulletin->options['dateformat'], $milestone['completeddate']); $stats['milestone_overdue'] = false; } else { $stats['target_date'] = vbdate($vbulletin->options['dateformat'], $milestone['targetdate']); $stats['milestone_overdue'] = ($milestone['targetdate'] and $milestone['targetdate'] < TIMENOW); } return $stats; }
/** * Contructs a Post Tree * * @param string The template Name to use * @param integer The Thread ID * @param integer The "Root" post for which to work from * @param integer The current "Depth" within the tree * * @return string The Generated Tree * */ function &construct_post_tree($templatename, $threadid, $parentid = 0, $depth = 1) { global $vbulletin, $stylevar, $parentassoc, $show, $vbphrase, $threadedmode; static $postcache; if (!$threadedmode and $vbulletin->userinfo['postorder']) { $postorder = 'DESC'; } $depthnext = $depth + 2; if (!$postcache) { $posts = $vbulletin->db->query_read_slave("\n\t\t\tSELECT post.parentid, post.postid, post.userid, post.pagetext, post.dateline, IF(visible = 2, 1, 0) AS isdeleted,\n\t\t\t\tIF(user.username <> '', user.username, post.username) AS username\n\t\t\tFROM " . TABLE_PREFIX . "post AS post\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "user AS user ON user.userid = post.userid\n\t\t\tWHERE post.threadid = {$threadid}\n\t\t\tORDER BY dateline {$postorder}\n\t\t"); while ($post = $vbulletin->db->fetch_array($posts)) { if (!$threadedmode) { $post['parentid'] = 0; } $postcache[$post['parentid']][$post['postid']] = $post; } ksort($postcache); } $counter = 0; $postbits = ''; if (is_array($postcache["{$parentid}"])) { foreach ($postcache["{$parentid}"] as $post) { $parentassoc[$post['postid']] = $post['parentid']; if (($depth + 1) % 4 == 0) { // alternate colors when switching depths; depth gets incremented by 2 each time $post['backcolor'] = '{firstaltcolor}'; $post['bgclass'] = 'alt1'; } else { $post['backcolor'] = '{secondaltcolor}'; $post['bgclass'] = 'alt2'; } $post['postdate'] = vbdate($vbulletin->options['dateformat'], $post['dateline'], true); $post['posttime'] = vbdate($vbulletin->options['timeformat'], $post['dateline']); // cut page text short if too long if (vbstrlen($post['pagetext']) > 100) { $spacepos = strpos($post['pagetext'], ' ', 100); if ($spacepos != 0) { $post['pagetext'] = substr($post['pagetext'], 0, $spacepos) . '...'; } } $post['pagetext'] = nl2br(htmlspecialchars_uni($post['pagetext'])); ($hook = vBulletinHook::fetch_hook('threadmanage_construct_post_tree')) ? eval($hook) : false; eval('$postbits .= "' . fetch_template($templatename) . '";'); $ret =& construct_post_tree($templatename, $threadid, $post['postid'], $depthnext); $postbits .= $ret; } } return $postbits; }
function process_showgroups_userinfo($user) { global $vbulletin, $permissions, $stylevar, $show; $user = array_merge($user, convert_bits_to_array($user['options'], $vbulletin->bf_misc_useroptions)); $user = array_merge($user, convert_bits_to_array($user['adminoptions'], $vbulletin->bf_misc_adminoptions)); cache_permissions($user, false); fetch_online_status($user, true); if (!$user['invisible'] or $permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehidden']) { $user['lastonline'] = vbdate($vbulletin->options['dateformat'], $user['lastactivity'], 1); } else { $user['lastonline'] = ' '; } fetch_musername($user); return $user; }
function process_showgroups_userinfo($user) { global $vbulletin, $permissions, $stylevar, $show; $post =& $user; $datecut = TIMENOW - $vbulletin->options['cookietimeout']; require_once DIR . '/includes/functions_bigthree.php'; fetch_online_status($user, true); if (!$user['invisible'] or $permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehidden']) { $user['lastonline'] = vbdate($vbulletin->options['dateformat'], $user['lastactivity'], 1); } else { $user['lastonline'] = ' '; } fetch_musername($user); return $user; }
public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false) { $groupinfo =& $this->content['socialgroup'][$activity['contentid']]; $userinfo =& $this->content['user'][$activity['userid']]; $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true); $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']); if ($fetchphrase) { return array('phrase' => construct_phrase($this->vbphrase['x_created_a_group_y'], fetch_seo_url('member', $userinfo), $userinfo['username'], vB::$vbulletin->session->vars['sessionurl'], $groupinfo['groupid'], $groupinfo['name']), 'userinfo' => $userinfo, 'activity' => $activity); } else { $templater = vB_Template::create($templatename); $templater->register('userinfo', $userinfo); $templater->register('activity', $activity); $templater->register('groupinfo', $groupinfo); return $templater->render(); } }
function fetch_log_file_array($type = 'database') { global $vbulletin, $vbphrase; $filelist = array(); switch ($type) { case 'database': $option = 'errorlogdatabase'; $title = $vbphrase['vbulletin_database_errors']; break; case 'security': $option = 'errorlogsecurity'; $title = $vbphrase['admin_control_panel_failed_logins']; break; default: return $filelist; } if ($filebase = trim($vbulletin->options["{$option}"])) { $slashpos = strrpos($filebase, '/'); if ($slashpos === false) { $basedir = '.'; } else { $basedir = substr($filebase, 0, $slashpos); } if ($handle = @opendir($basedir)) { $filebase = substr($filebase, $slashpos + 1); $namelength = strlen($filebase); while ($file = readdir($handle)) { if (strpos($file, $filebase) === 0) { if ($unixdate = intval(substr($file, $namelength, -4))) { $date = vbdate($vbulletin->options['dateformat'] . ' ' . $vbulletin->options['timeformat'], $unixdate); } else { $date = '(Current Version)'; } $key = $type . '_' . $unixdate; $filelist["{$key}"] = "{$title} {$date}"; } } @closedir($handle); return $filelist; } else { echo '<p>' . $vbphrase['invalid_directory_specified'] . '</p>'; } } else { return false; } }
public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false) { $userinfo =& $this->content['user'][$activity['userid']]; $bloginfo =& $this->content['blog'][$activity['contentid']]; $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true); $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']); $preview = strip_quotes($bloginfo['pagetext']); $bloginfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($preview, false, true, true, true), vb::$vbulletin->options['as_snippet']))); if ($fetchphrase) { return array('phrase' => construct_phrase($this->vbphrase['x_created_a_blog_entry_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('entry', $bloginfo), $bloginfo['title'], fetch_seo_url('blog', $bloginfo), $bloginfo['blog_title']), 'userinfo' => $userinfo, 'activity' => $activity); } else { $templater = vB_Template::create($templatename); $templater->register('userinfo', $userinfo); $templater->register('activity', $activity); $templater->register('bloginfo', $bloginfo); return $templater->render(); } }
function latestvids() { global $vbulletin, $stylevar; $latestvids = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "anymedia ORDER BY " . TABLE_PREFIX . "anymedia.date DESC LIMIT 0,10"); while ($lv = $vbulletin->db->fetch_array($latestvids)) { $wtf = $lv; $lv['date'] = vbdate($vbulletin->options['dateformat'], $lv['date']); $lv['time'] = vbdate($vbulletin->options['timeformat'], $lv['date']); //$lv['body'] = cutOffString($lv['body'],500, '', DO_CLOSE_BBCODE); //require_once(DIR . '/includes/class_bbcode.php'); //$lv['body'] = strip_tags($lv['body']); //$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list()); //$lv['body'] = $parser->do_parse($lv['body'], false, true, true, false, true, false);\ //$vids .= "$lv[media_url]"; //$vid .= fetch_template('anymedia_vids') echo eval('$vid .= "' . fetch_template('anymedia_vids') . '";'); return $lv; } return $please; }
public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false) { global $show; $postinfo =& $this->content['post'][$activity['contentid']]; $threadinfo =& $this->content['thread'][$postinfo['threadid']]; $foruminfo =& vB::$vbulletin->forumcache[$threadinfo['forumid']]; $threadinfo['prefix_plain_html'] = htmlspecialchars_uni($this->vbphrase["prefix_{$threadinfo['prefixid']}_title_plain"]); $threadinfo['prefix_rich'] = $this->vbphrase["prefix_{$threadinfo['prefixid']}_title_rich"]; $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true); $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']); $preview = strip_quotes($postinfo['pagetext']); $postinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($preview, false, true, true, true), vb::$vbulletin->options['as_snippet']))); $forumperms = fetch_permissions($threadinfo['forumid']); $show['threadcontent'] = $forumperms & vB::$vbulletin->bf_ugp_forumpermissions['canviewthreads'] ? true : false; $userinfo = $this->fetchUser($activity['userid'], $postinfo['username']); if ($fetchphrase) { if ($threadinfo['pollid']) { if ($userinfo['userid']) { $phrase = construct_phrase($this->vbphrase['x_replied_to_a_poll_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']); } else { $phrase = construct_phrase($this->vbphrase['guest_x_replied_to_a_poll_y_in_z'], $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']); } } else { if ($userinfo['userid']) { $phrase = construct_phrase($this->vbphrase['x_replied_to_a_thread_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']); } else { $phrase = construct_phrase($this->vbphrase['guest_x_replied_to_a_thread_y_in_z'], $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']); } } return array('phrase' => $phrase, 'userinfo' => $userinfo, 'activity' => $activity); } else { $templater = vB_Template::create($templatename); $templater->register('userinfo', $userinfo); $templater->register('activity', $activity); $templater->register('threadinfo', $threadinfo); $templater->register('postinfo', $postinfo); $templater->register('pageinfo', array('p' => $postinfo['postid'])); $templater->register('foruminfo', $foruminfo); return $templater->render(); } }
} if ($limitlower <= 0) { $limitlower = 1; } // Get attachment info $attachments = $db->query_read_slave("\n\t\t\tSELECT thread.forumid, post.postid, post.threadid AS p_threadid, post.title AS p_title, post.dateline AS p_dateline, attachment.attachmentid,\n\t\t\t\tthread.title AS t_title, attachment.filename, attachment.counter, attachment.filesize AS size, IF(thumbnail_filesize > 0, 1, 0) AS hasthumbnail,\n\t\t\t\tthumbnail_filesize, user.username, thread.open, attachment.userid " . iif($userid == $vbulletin->userinfo['userid'], ", IF(attachment.postid = 0, 1, 0) AS inprogress") . ",\n\t\t\t\tattachment.dateline, attachment.thumbnail_dateline\n\t\t\tFROM " . TABLE_PREFIX . "attachment AS attachment\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = attachment.postid)\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "user AS user ON (attachment.userid = user.userid)\n\t\t\tWHERE attachment.userid = {$userid}\n\t\t\t\tAND ((forumid IN (0{$forumids}) AND thread.visible = 1 AND post.visible = 1) " . iif($userid == $vbulletin->userinfo['userid'], "OR attachment.postid = 0") . ")\n\t\t\tORDER BY attachment.attachmentid DESC\n\t\t\tLIMIT " . ($limitlower - 1) . ", {$perpage}\n\t\t"); $template['attachmentlistbits'] = ''; while ($post = $db->fetch_array($attachments)) { $post['filename'] = htmlspecialchars_uni($post['filename']); if (!$post['p_title']) { $post['p_title'] = '«' . $vbphrase['n_a'] . '»'; } $post['counter'] = vb_number_format($post['counter']); $post['size'] = vb_number_format($post['size'], 1, true); $post['postdate'] = vbdate($vbulletin->options['dateformat'], $post['p_dateline'], true); $post['posttime'] = vbdate($vbulletin->options['timeformat'], $post['p_dateline']); $post['attachmentextension'] = strtolower(file_extension($post['filename'])); $show['thumbnail'] = iif($post['hasthumbnail'] == 1 and $vbulletin->options['attachthumbs'] and $showthumbs, 1, 0); $show['inprogress'] = iif(!$post['postid'], true, false); $show['deletebox'] = false; if ($post['inprogress']) { $show['deletebox'] = true; } else { if ($post['open'] or $vbulletin->options['allowclosedattachdel'] or can_moderate($post['forumid'], 'canopenclose')) { if (can_moderate($post['forumid'], 'caneditposts')) { $show['deletebox'] = true; } else { $forumperms = fetch_permissions($post['forumid']); if ($forumperms & $vbulletin->bf_ugp_forumpermissions['caneditpost'] and $vbulletin->userinfo['userid'] == $post['userid']) { if ($vbulletin->options['allowattachdel'] or !$vbulletin->options['edittimelimit'] or $post['p_dateline'] >= TIMENOW - $vbulletin->options['edittimelimit'] * 60) { $show['deletebox'] = true;
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; } }
print_label_row(construct_link_code('Reset Admin Access', THIS_SCRIPT . '?do=user&type=access'), 'Reset admin access for a user'); print_table_break(); $randnumb = vbrand(0, 100000000); print_table_header('Other Tools'); print_column_style_code(array('width:30%')); print_label_row(construct_link_code($vbulletin->options['bbactive'] ? 'Turn Off Forum' : 'Turn On Forum', THIS_SCRIPT . '?do=bbactive'), 'Your forum is <b>' . ($vbulletin->options['bbactive'] ? 'On' : 'Off') . '</b>'); $childcount = $db->query_first("\n\t\tSELECT COUNT(*) AS count\n\t\tFROM " . TABLE_PREFIX . "forum\n\t\tWHERE childlist = ''\n\t"); if ($childcount['count']) { print_label_row(construct_link_code('Rebuild', THIS_SCRIPT . '?do=childlist'), 'You have forum with empty childlists, which is not good.'); } print_label_row(construct_link_code('Default Language', THIS_SCRIPT . '?do=language'), 'Reset board default language.'); print_table_break(); print_table_header('Time'); print_column_style_code(array('width:30%')); print_label_row('System Time', $systemdate = date('r T')); print_label_row('Your Time', $userdate = vbdate('r T')); print_table_footer(); } else { if ($_REQUEST['do'] == 'xml') { switch ($vbulletin->GPC['type']) { case 'style': require_once './includes/adminfunctions_template.php'; if (!($xml = file_read('./install/vbulletin-style.xml'))) { echo '<p>Uh oh, ./install/vbulletin-style.xml doesn\'t appear to exist! Upload it and refresh the page.</p>'; break; } echo '<p>Importing vbulletin-style.xml</p>'; xml_import_style($xml); // define those phrases that are used for the import $vbphrase['style'] = 'Style'; $vbphrase['please_wait'] = 'Please Wait';
/** * 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; }
function construct_banned_user_row($user) { global $vbulletin, $vbphrase; if ($user['liftdate'] == 0) { $user['banperiod'] = $vbphrase['permanent']; $user['banlift'] = $vbphrase['never']; $user['banremaining'] = $vbphrase['forever']; } else { $user['banlift'] = vbdate($vbulletin->options['dateformat'] . ', ~' . $vbulletin->options['timeformat'], $user['liftdate']); $user['banperiod'] = ceil(($user['liftdate'] - $user['bandate']) / 86400); if ($user['banperiod'] == 1) { $user['banperiod'] .= " $vbphrase[day]"; } else { $user['banperiod'] .= " $vbphrase[days]"; } $remain = $user['liftdate'] - TIMENOW; $remain_days = floor($remain / 86400); $remain_hours = ceil(($remain - ($remain_days * 86400)) / 3600); if ($remain_hours == 24) { $remain_days += 1; $remain_hours = 0; } if ($remain_days < 0) { $user['banremaining'] = "<i>$vbphrase[will_be_lifted_soon]</i>"; } else { if ($remain_days == 1) { $day_word = $vbphrase['day']; } else { $day_word = $vbphrase['days']; } if ($remain_hours == 1) { $hour_word = $vbphrase['hour']; } else { $hour_word = $vbphrase['hours']; } $user['banremaining'] = "$remain_days $day_word, $remain_hours $hour_word"; } } $cell = array("<a href=\"" . iif(($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']), '../' . $vbulletin->config['Misc']['admincpdir'] . '/') . 'user.php?' . $vbulletin->session->vars['sessionurl'] . "do=edit&u=$user[userid]\"><b>$user[username]</b></a>"); if ($user['bandate']) { $cell[] = iif($user['adminid'], "<a href=\"" . iif(($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']), '../' . $vbulletin->config['Misc']['admincpdir'] . '/') . 'user.php?' . $vbulletin->session->vars['sessionurl'] . "do=edit&u=$user[adminid]\">$user[adminname]</a>", $vbphrase['n_a']); $cell[] = vbdate($vbulletin->options['dateformat'], $user['bandate']); } else { $cell[] = $vbphrase['n_a']; $cell[] = $vbphrase['n_a']; } $cell[] = $user['banperiod']; $cell[] = $user['banlift']; $cell[] = $user['banremaining']; if (($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) OR can_moderate(0, 'canunbanusers')) { $cell[] = construct_link_code($vbphrase['lift_ban'], 'banning.php?' . $vbulletin->session->vars['sessionurl'] . "do=liftban&u=$user[userid]"); } $cell[] = construct_link_code(!empty($user['reason']) ? $user['reason'] : $vbphrase['n_a'], 'banning.php?' . $vbulletin->session->vars['sessionurl'] . "do=editreason&userid=" . $user['userid']); return $cell; }
break; case 1: // read $pm['statusicon'] = 'old'; break; case 2: // replied to $pm['statusicon'] = 'replied'; break; case 3: // forwarded $pm['statusicon'] = 'forwarded'; break; } $pm['senddate'] = vbdate($vbulletin->options['dateformat'], $pm['dateline']); $pm['sendtime'] = vbdate($vbulletin->options['timeformat'], $pm['dateline']); // get userbit if ($vbulletin->GPC['folderid'] == -1) { $users = unserialize($pm['touserarray']); $touser = array(); $tousers = array(); if (!empty($users)) { foreach ($users as $key => $item) { if (is_array($item)) { foreach ($item as $subkey => $subitem) { $touser["{$subkey}"] = $subitem; } } else { $touser["{$key}"] = $item; } }
$headings[] = $vbphrase['post']; $headings[] = $vbphrase['controls']; print_cells_row($headings, 1); while ($comment = $db->fetch_array($comments)) { $postlink = ''; if (!empty($comment['postid'])) { //deliberately don't use the title. We don't have it in our result set (or //in any of the tables in our result set) and we'll catch it on redirect. //Plus the admincp isn't a big SEO issue -- we just want to get the links //on the classes so that they work and centralize logic for future changes. $postlink = fetch_seo_url('thread|bburl', $comment, array('p' => $comment['postid'])) . "#post{$comment['postid']}"; } $cell = array(); $cell[] = "<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u={$comment['whoadded']}\"><b>{$comment['leftby_username']}</b></a>"; $cell[] = "<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u={$comment['userid']}\"><b>{$comment['leftfor_username']}</b></a>"; $cell[] = '<span class="smallfont">' . vbdate($vbulletin->options['logdateformat'], $comment['dateline']) . '</span>'; $cell[] = $comment['reputation']; $cell[] = !empty($comment['reason']) ? '<span class="smallfont">' . htmlspecialchars_uni($comment['reason']) . '</span>' : ''; $cell[] = $postlink ? construct_link_code(htmlspecialchars_uni($vbphrase['post']), $postlink, true, '', true) : ' '; $cell[] = construct_link_code($vbphrase['edit'], "adminreputation.php?" . $vbulletin->session->vars['sessionurl'] . "do=editreputation&reputationid={$comment['reputationid']}", false, '', true) . ' ' . construct_link_code($vbphrase['delete'], "adminreputation.php?" . $vbulletin->session->vars['sessionurl'] . "do=deletereputation&reputationid={$comment['reputationid']}", false, '', true); print_cells_row($cell); } print_table_footer(7, "{$firstpage} {$prevpage} {$nextpage} {$lastpage}"); } // ************************************************************************************************* if ($_REQUEST['do'] == 'editreputation') { $vbulletin->input->clean_array_gpc('r', array('reputationid' => TYPE_INT)); if ($repinfo = $db->query_first("\n\t\tSELECT rep.*, whoadded.username as whoadded_username, user.username, thread.title, thread.threadid\n\t\tFROM " . TABLE_PREFIX . "reputation AS rep\n\t\tLEFT JOIN " . TABLE_PREFIX . "user AS user ON (rep.userid = user.userid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "user AS whoadded ON (rep.whoadded = whoadded.userid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "post AS post ON (rep.postid = post.postid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (thread.threadid = post.threadid)\n\t\tWHERE reputationid = " . $vbulletin->GPC['reputationid'])) { print_form_header('adminreputation', 'doeditreputation'); print_table_header($vbphrase['edit_reputation']); print_label_row($vbphrase['thread'], $repinfo['title'] ? "<a href=\"" . fetch_seo_url('thread|bburl', $repinfo, array('p' => $repinfo['postid'])) . "#post{$repinfo['postid']}" . "\">{$repinfo['title']}</a>" : '');
function fetch_replacement($field, $item) { switch ($this->feedtype) { case 'atom': $handled_value = null; ($hook = vBulletinHook::fetch_hook('rssposter_parse_atom')) ? eval($hook) : false; if ($handled_value !== null) { return $handled_value; } switch ($field) { case 'link': if (empty($item['link'])) { if (!empty($item['guid'])) { return $item['guid']['value']; } return ''; } else { if (empty($item['link'][0])) { return $item['link']['href']; } else { foreach ($item['link'] as $link) { if ($link['rel'] == 'alternate' or empty($link['rel'])) { return $link['href']; } } } } break; case 'description': return get_item_value($item['summary']); break; case 'title': return get_item_value($item['title']); break; case 'id': return get_item_value($item['id']); break; case 'date': $timestamp = strtotime(get_item_value($item['updated'])); if ($timestamp > 0) { return vbdate($this->registry->options['dateformat'] . " " . $this->registry->options['timeformat'], $timestamp); } else { return get_item_value($item['updated']); } break; case 'enclosure_link': if (empty($item['link'][0])) { return ''; } else { foreach ($item['link'] as $link) { if ($link['rel'] == 'enclosure') { return $link['href']; } } } break; case 'content': case 'content:encoded': if (empty($item['content'][0])) { return get_item_value($item['content']); } else { $return = array(); foreach ($item['content'] as $contents) { if (is_array($contents)) { if ($contents['type'] == 'html' and !($return['type'] == 'xhtml')) { $return = $contents; } elseif ($contents['type'] == 'text' and !($return['type'] == 'html' or $return['type'] == 'xhtml')) { $return = $contents; } elseif ($contents['type'] == 'xhtml') { $return = $contents; } elseif ($contents['type'] != 'xhtml' or $contents['type'] != 'xhtml' or $contents['type'] != 'xhtml') { $return = $contents; } } else { if (empty($return['type'])) { $return['value'] = $contents; } } } return $return['value']; } break; case 'author': return get_item_value($item['author']['name']); break; default: if (is_array($item["{$field}"])) { if (is_string($item["{$field}"]['value'])) { return $item["{$field}"]['value']; } else { return ''; } } else { return $item["{$field}"]; } } case 'rss': $handled_value = null; ($hook = vBulletinHook::fetch_hook('rssposter_parse_rss')) ? eval($hook) : false; if ($handled_value !== null) { return $handled_value; } switch ($field) { case 'link': if (empty($item['link'])) { if (!empty($item['guid'])) { return $item['guid']['value']; } return ''; } else { if (is_array($item['link']) and isset($item['link']['href'])) { return $item['link']['href']; } else { return get_item_value($item['link']); } } break; case 'description': // this can be handled by the default case return get_item_value($item['description']); break; case 'title': // this can be handled by the default case return get_item_value($item['title']); break; case 'id': case 'guid': return get_item_value($item['guid']); break; case 'pubDate': case 'date': $timestamp = strtotime(get_item_value($item['pubDate'])); if ($timestamp > 0) { return vbdate($this->registry->options['dateformat'] . " " . $this->registry->options['timeformat'], $timestamp); } else { return $item['pubDate']; } break; case 'enclosure_link': case 'enclosure_href': if (is_array($item['enclosure'])) { return $item['enclosure']['url']; } else { return ''; } break; case 'content': case 'content:encoded': return get_item_value($item['content:encoded']); break; case 'author': case 'dc:creator': if (isset($item['dc:creator'])) { return get_item_value($item['dc:creator']); } else { return $item['author']; } break; default: if (is_array($item["{$field}"])) { if (is_string($item["{$field}"]['value'])) { return $item["{$field}"]['value']; } else { return ''; } } else { return $item["{$field}"]; } } } }
/** * Retrieve Activity Stream * */ public function fetchStream($sort = 'recent', $fetchphrase = false) { $this->setWhereFilter('ignoredusers'); $stop = false; $records = array(); /* Fetch more records when we * A. Have not set a 'maxdateline' filter (future request - new activity since page load) * B. Received less than 50% (valid results) of our perpage value * C. Have not requested more than 3 times already */ $iteration = 0; $totalcount = 0; $count = 0; $maxdateline = $mindateline = $minscore = 0; $maxid = $minid_score = $minid_dateline = array(); while (!$stop and $iteration < 4) { $result = $this->fetchRecords($sort); $records = array_merge($records, $result['records']); $totalcount += $result['total']; $count += count($result['records']); $iteration++; if (!$maxdateline) { $maxdateline = $result['maxdateline']; } if ($maxdateline == $result['maxdateline']) { $maxid = $result['maxid']; } if ($sort == 'popular') { if ($minscore != $result['minscore']) { $minid = array(); $minscore = $result['minscore']; } } else { if ($mindateline != $result['mindateline']) { $minid = array(); $mindateline = $result['mindateline']; } } $minid = $result['minid']; if ($count / $this->perpage > 0.5 or $result['total'] < $this->perpage or $this->setFilters['maxdateline']) { $stop = true; } else { if ($sort == 'popular') { $this->setWhereFilter('minscore', $result['minscore']); } else { $this->setWhereFilter('mindateline', $result['mindateline']); } $this->setWhereFilter('excludeid', implode(',', $result['minid'])); } $moreresults = $result['total'] == $this->perpage ? 1 : 0; } $bits = array(); $groupby = array(); $count = 0; foreach ($records as $activity) { $classname = 'vB_ActivityStream_View_Perm_' . ucfirst($activity['section']) . '_' . ucfirst($activity['type']); $class = $this->classes[$classname]; $count++; // Call templater! if ($this->groupBy) { switch ($this->groupBy) { case 'date': default: $foo = vB::$vbulletin->options['yestoday']; vB::$vbulletin->options['yestoday'] = 1; $date = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true); vB::$vbulletin->options['yestoday'] = $foo; $templatename = 'activitystream_' . $activity['type'] . '_' . $this->groupBy . '_bit'; $groupby[$date] .= $class->fetchTemplate($templatename, $activity, true); } } else { $templatename = 'activitystream_' . $activity['section'] . '_' . $activity['type']; if (!$fetchphrase) { $bits[] = $class->fetchTemplate($templatename, $activity, $sort == 'popular'); } else { $bits[] = $class->fetchPhrase($templatename, $activity, $sort == 'popular'); } } } if ($this->groupBy) { switch ($this->groupBy) { case 'date': default: foreach ($groupby as $date => $bit) { $templater = vB_Template::create('activitystream_' . $this->groupBy . '_group'); $templater->register('activitybits', $bit); $templater->register('date', $date); $bits[] = $templater->render(); } } } if (count($minid) == $this->perpage and vB::$vbulletin->GPC['minid'] and $ids = explode(',', vB::$vbulletin->GPC['minid'])) { $ids = array_map('intval', $ids); $minid = implode(',', array_merge($minid, $ids)); } else { $minid = implode(',', $minid); } $return = array('iteration' => $iteration, 'totalcount' => $totalcount, 'count' => $count, 'mindateline' => $mindateline, 'maxdateline' => $maxdateline, 'minid' => $minid, 'maxid' => implode(',', $maxid), 'moreresults' => $moreresults, 'perpage' => $this->perpage, 'bits' => $bits, 'minscore' => $minscore, 'refresh' => $this->refresh); return $return; }
case 1: $cell[] = $vbphrase['expired']; break; case 2: $cell[] = $vbphrase['reversed']; break; } } else { $cell[] = $vbphrase['warning']; $cell[] = $infraction['points']; switch ($infraction['action']) { case 0: if ($infraction['expires'] == 0) { $cell[] = $vbphrase['never']; } else { $cell[] = '<span class="smallfont">' . vbdate($vbulletin->options['logdateformat'], $infraction['expires']) . '</span>'; } break; case 1: $cell[] = $vbphrase['expired']; break; case 2: $cell[] = $vbphrase['reversed']; break; } } $cell[] = (!empty($infraction['postid']) and !$infraction['postdeleted']) ? construct_link_code(htmlspecialchars_uni($vbphrase['post']), "../showthread.php?" . $vbulletin->session->vars['sessionurl'] . "postid={$infraction['postid']}#post{$infraction['postid']}", true, '', true) : ' '; $cell[] = ($infraction['action'] != 2 ? construct_link_code($vbphrase['reverse'], "admininfraction.php?" . $vbulletin->session->vars['sessionurl'] . "do=reverse&infractionid={$infraction['infractionid']}" . $args . $vbulletin->GPC['orderby'], false, '', true) : '') . ' ' . construct_link_code($vbphrase['infraction_view'], "admininfraction.php?" . $vbulletin->session->vars['sessionurl'] . "do=details&infractionid={$infraction['infractionid']}", false, '', true) . ' ' . construct_link_code($vbphrase['delete'], "admininfraction.php?" . $vbulletin->session->vars['sessionurl'] . "do=deleteinfraction&infractionid={$infraction['infractionid']}" . $args . $vbulletin->GPC['orderby'], false, '', true); print_cells_row($cell); } print_table_footer(8, "{$firstpage} {$prevpage} {$nextpage} {$lastpage}");