function ¤t() { $temp = parent::current(); $temp['posticon'] = @$temp['posticon'] != '' ? iif(file_exists(FORUM_BASE_DIR . '/tmp/upload/posticons/' . @$temp['posticon']), @$temp['posticon'], 'clear.gif') : 'clear.gif'; if ($temp['poster_id'] > 0) { $user = $this->dba->getRow("SELECT " . $this->qp['user'] . $this->qp['userinfo'] . " FROM " . USERS . " u LEFT JOIN " . USERINFO . " ui ON u.id=ui.user_id WHERE u.id=" . intval($temp['poster_id'])); $group = get_user_max_group($user, $this->groups); $user['group_color'] = !isset($group['color']) || $group['color'] == '' ? '000000' : $group['color']; $user['group_nicename'] = $group['nicename']; $user['group_avatar'] = $group['avatar']; foreach ($user as $key => $val) { $temp['post_user_' . $key] = $val; } /* This array holds all of the userinfo for users that post to this topic */ $this->users[$user['id']] = $user; } /* Do we have any replies? */ $num_replies = @(($temp['row_right'] - $temp['row_left'] - 1) / 2); if ($num_replies > 0) { $temp['replies'] =& new RepliesReviewIterator($this->result, $this->qp, $this->dba, $this->users, $this->groups, $this->user); } $bbcode =& new BBCodex($this->user, $temp['body_text'], $temp['forum_id'], TRUE, TRUE, TRUE, TRUE); $temp['reverted_body_text'] = $bbcode->revert(); return $temp; }
function current() { $temp = parent::current(); $post = array(); $post['post_name'] = $temp->title; $post['post_link'] = $temp->link; $post['post_body_text'] = $temp->description; $post['post_forum'] = $temp->subject; $post['post_post_id'] = $temp->post_id; $post['post_poster_name'] = $temp->author_name; $post['post_poster_id'] = $temp->author_id; return $post; }
function ¤t() { $temp = parent::current(); $temp['posticon'] = @$temp['posticon'] != '' ? iif(file_exists(FORUM_BASE_DIR . '/tmp/upload/posticons/' . @$temp['posticon']), @$temp['posticon'], 'clear.gif') : 'clear.gif'; if ($temp['poster_id'] > 0) { $user = $this->dba->getRow("SELECT " . $this->qp['user'] . $this->qp['userinfo'] . " FROM " . USERS . " u LEFT JOIN " . USERINFO . " ui ON u.id=ui.user_id WHERE u.id=" . intval($temp['poster_id'])); $group = get_user_max_group($user, $this->groups); $user['group_color'] = !isset($group['color']) || $group['color'] == '' ? '000000' : $group['color']; $user['group_nicename'] = $group['nicename']; $user['group_avatar'] = $group['avatar']; $user['online'] = time() - ini_get('session.gc_maxlifetime') > $user['seen'] ? 'offline' : 'online'; foreach ($user as $key => $val) { $temp['post_user_' . $key] = $val; } $fields = array(); foreach ($this->fields as $field) { if ($field['display_topic'] == 1) { if (isset($temp['post_user_' . $field['name']]) && $temp['post_user_' . $field['name']] != '') { switch ($field['inputtype']) { default: case 'text': case 'textarea': case 'select': $field['value'] = $temp['post_user_' . $field['name']]; break; case 'multiselect': case 'radio': case 'check': $field['value'] = implode(", ", iif(!unserialize($temp['post_user_' . $field['name']]), array(), unserialize($temp['post_user_' . $field['name']]))); break; } $fields[] = $field; } } } $temp['profilefields'] =& new FAArrayIterator($fields); /* This array holds all of the userinfo for users that post to this topic */ $this->users[$user['id']] = $user; } /* Do we have any replies? */ $num_replies = @(($temp['row_right'] - $temp['row_left'] - 1) / 2); if ($this->sr && $num_replies > 0) { $this->result =& $this->dba->executeQuery("SELECT " . $this->qp['info'] . $this->qp['reply'] . " FROM " . REPLIES . " r LEFT JOIN " . INFO . " i ON i.id=r.reply_id WHERE r.topic_id = " . intval($temp['id']) . " AND i.created >= " . 3600 * 24 * intval($temp['daysprune']) . " ORDER BY i." . $temp['sortedby'] . " " . $temp['sortorder'] . " LIMIT " . intval($temp['start']) . ", " . intval($temp['postsperpage'])); $temp['replies'] =& new RepliesIterator($this->result, $this->qp, $this->dba, $this->users, $this->groups, $this->fields); } return $temp; }
function current() { $temp = parent::current(); // set the week the the data $temp['week'] = $this->week; // set a users iterator $temp['user_bdays'] = 0; if (isset($this->user_bdays[$temp['day']])) { $temp['users'] =& new FAArrayIterator($this->user_bdays[$temp['day']]); $temp['user_bdays'] = 1; } // increment the week number if ($this->iteration % 7 == 0) { $this->week++; } // increment something to keep track of how many days we have iterated over $this->iteration++; // urls $temp['U_CALENDARDAYURL'] = K4Url::getGenUrl('calendar', 'view=day&y=' . $temp['year'] . '&m=' . $temp['month'] . '&d=' . $temp['day'] . '&w=' . $temp['week']); $temp['U_CALENDARWEEKURL'] = K4Url::getGenUrl('calendar', 'view=week&y=' . $temp['year'] . '&m=' . $temp['month'] . '&w=' . $temp['week']); // Return the formatted info return $temp; }
function current() { $current = array(); $query = parent::current(); $query = preg_replace('~(\\s|\\b)(TEMPORARY|ALTER|CREATE|SELECT|SET|LEFT|RIGHT|ORDER|BY|GROUP|ASC|DESC|JOIN|ON|LIMIT|UPDATE|DELETE|COUNT|FROM|WHERE|AND|AS)(\\s|\\b)~i', '<strong class="debug_sql_method">\\1\\2\\3</strong>', $query); $result = $this->_results[$this->key()]; $current['query'] = $query; if (is_a($result, 'FAIterator')) { $current['results'] = $this->formatArray($result->current()); $current['num_rows'] = $this->_results[$this->key()]->numRows(); } else { $current['results'] = '--'; $current['num_rows'] = 0; } $current['file'] = basename($this->_files[$this->key()]); $current['line'] = $this->_lines[$this->key()]; return $current; }
function current() { $temp = parent::current(); $temp['posticon'] = @$temp['posticon'] != '' ? file_exists(BB_BASE_DIR . '/tmp/upload/posticons/' . @$temp['posticon']) ? @$temp['posticon'] : 'clear.gif' : 'clear.gif'; $temp['post_id'] = 't' . $temp['post_id']; if ($temp['poster_id'] > 0) { $temp['post_display_user_ddmenu'] = 1; if (!isset($this->users[$temp['poster_id']])) { $user = $this->dba->getRow("SELECT " . $this->qp['user'] . $this->qp['userinfo'] . " FROM " . K4USERS . " u LEFT JOIN " . K4USERINFO . " ui ON u.id=ui.user_id WHERE u.id=" . intval($temp['poster_id'])); if (is_array($user) && !empty($user)) { $group = get_user_max_group($user, $this->groups); $user['group_color'] = !isset($group['color']) || $group['color'] == '' ? '000000' : $group['color']; $user['group_nicename'] = isset($group['nicename']) ? $group['nicename'] : ''; $user['group_avatar'] = isset($group['avatar']) ? $group['avatar'] : ''; $user['online'] = time() - ini_get('session.gc_maxlifetime') > $user['seen'] ? 'offline' : 'online'; $this->users[$user['id']] = $user; } } else { $user = $this->users[$temp['poster_id']]; } if (is_array($user) && !empty($user)) { if ($user['flag_level'] > 0 && $_SESSION['user']->get('perms') >= MODERATOR) { $temp['post_user_background'] = 'background-color: #FFFF00;'; } foreach ($user as $key => $val) { $temp['post_user_' . $key] = $val; } $temp['profilefields'] =& new FAArrayIterator(get_profile_fields($this->fields, $temp)); $temp['post_user_title'] = $user['user_title']; $temp['post_user_user_title'] = get_user_title($user['user_title'], $user['num_posts']); } if (!isset($temp['post_user_online'])) { $temp['post_user_online'] = 'offline'; } /* This array holds all of the userinfo for users that post to this topic */ $this->users[$user['id']] = $user; } else { $temp['post_user_id'] = 0; $temp['post_user_name'] = $temp['poster_name']; } /* Deal with acronyms */ replace_acronyms($temp['body_text']); /* word censors */ replace_censors($temp['body_text']); replace_censors($temp['name']); /* Do any polls if they exist */ do_post_polls($temp, $this->dba); /* do we have any attachments? */ if (isset($temp['attachments']) && $temp['attachments'] > 0) { $temp['attachment_files'] = new K4AttachmentsIterator($this->dba, $this->user, $temp['post_id'], 0); } // url's $temp['U_TOPICURL'] = K4Url::getTopicUrl($temp['post_id']); $temp['U_POSTURL'] = K4Url::getPostUrl($temp['post_id']); $temp['U_MEMBERURL'] = K4Url::getMemberUrl($temp['poster_id']); if ($this->sr && $temp['num_replies'] > 0) { $this->result = $this->dba->executeQuery("SELECT * FROM " . K4POSTS . " WHERE parent_id = " . intval($temp['post_id']) . " AND row_type=" . REPLY . " " . ($this->post_id ? "AND post_id = " . $this->post_id : "") . " AND created >= " . 3600 * 24 * intval($temp['daysprune']) . " ORDER BY " . $temp['sortedby'] . " " . $temp['sortorder'] . " LIMIT " . intval($temp['start']) . "," . intval($temp['postsperpage'])); $temp['replies'] = new RepliesIterator($this->user, $this->dba, $this->result, $this->qp, $this->users, $this->groups, $this->fields); } return $temp; }
function current() { $temp = parent::current(); /* Cache this forum in the session */ cache_forum($temp); /* Set a nice representation of what level we're on */ $temp['indent_level'] = @str_repeat(' ', $temp['row_level'] - 1); /* Return the formatted forum info */ return $temp; }
function current() { $temp = parent::current(); $temp['level'] = str_repeat('<img src="Images/' . $this->image_dir . '/Icons/threaded_bit.gif" alt="" border="0" />', $temp['row_level'] - 1); return $temp; }
function ¤t() { $temp = parent::current(); /* Cache this forum in the session */ cache_forum($temp); /* Set a nice representation of what level we're on */ $temp['indent_level'] = @str_repeat(' ', $temp['row_level'] - 1); /* Should we free the result? */ if ($this->key == sizeof($this->data)) { $this->result->freeResult(); } /* Return the formatted forum info */ return $temp; }