function do_redirect($matches, $post_id, $user_id) { global $forum_db, $lang_redirect_links; if (count($matches) > 0) { foreach ($matches as $cur_url) { if (forum_hash(forum_htmlencode($cur_url), '') == $_POST['hash']) { // update counters, add if not exist $subquery = array(); if ($post_id) { $subquery[] = ' post_id=' . $post_id; } if ($user_id) { $subquery[] = ' user_id=' . $user_id; } $query = array('SELECT' => '*', 'FROM' => 'hcs_redirect_links', 'WHERE' => 'link=\'' . $forum_db->escape($cur_url) . '\' AND ' . implode(' AND ', $subquery)); $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); if (!$forum_db->num_rows($result)) { $query = array('INSERT' => 'link, counter, post_id, user_id', 'INTO' => 'hcs_redirect_links', 'VALUES' => '\'' . $forum_db->escape($cur_url) . '\', 1, \'' . $post_id . '\', \'' . $user_id . '\''); } else { $cur_redirect_link = $forum_db->fetch_assoc($result); $counter = $cur_redirect_link['counter'] + 1; $query = array('UPDATE' => 'hcs_redirect_links', 'SET' => 'counter = ' . $counter, 'WHERE' => 'link=\'' . $forum_db->escape($cur_url) . '\' AND ' . implode(' AND ', $subquery)); } $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); redirect($cur_url, $lang_redirect_links['Go redirect']); exit; } } } }
public function show_activity() { global $forum_db, $forum_user, $forum_config, $forum_page, $lang_fancy_user_activity, $user, $id; $out = ''; $query = array('SELECT' => 'a.activity_type, INET_NTOA(a.ip) AS ip, a.activity_time', 'FROM' => 'fancy_user_activity AS a', 'WHERE' => 'a.user_id=' . $id, 'ORDER BY' => 'a.id DESC', 'LIMIT' => '50'); $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); $acts = array(); while ($cur_act = $forum_db->fetch_assoc($result)) { $acts[] = $cur_act; } if (empty($acts)) { $out = '<div class="ct-box info-box"><p>' . $lang_fancy_user_activity['No activity'] . '</p></div>'; } else { foreach ($acts as $act) { $out .= '<tr> <td>' . $this->get_activity_name($act['activity_type']) . '</td> <td>' . $act['ip'] . '</td> <td>' . format_time($act['activity_time']) . '</td> </tr>'; } $summary = sprintf($forum_user['id'] == $id ? $lang_fancy_user_activity['Activity welcome'] : $lang_fancy_user_activity['Activity welcome user'], forum_htmlencode($user['username'])); $table = '<div class="ct-group"> <table cellpadding="0" summary="' . $summary . '"> <thead> <tr> <th class="tc0" scope="col">' . $lang_fancy_user_activity['Type'] . '</th> <th class="tc1" scope="col">' . $lang_fancy_user_activity['IP'] . '</th> <th class="tc2" scope="col">' . $lang_fancy_user_activity['Time'] . '</th> </tr> </thead> <tbody>%s</tbody> </table> </div>'; $out = sprintf($table, $out); } echo $out; }
public function show($just_return = false) { if (empty($this->message)) { return; } $message = sprintf(self::TEMPLATE_MSG, forum_htmlencode($this->message[1]), forum_htmlencode($this->message[0])); $m = sprintf(self::TEMPLATE_MSG_BLOCK, $message); if ($just_return) { $this->clear(); return $m; } echo $m; $this->clear(); }
function reputation_get_user_id($username, &$errors) { global $forum_db, $forum_user; $receiver_id = 'NULL'; if ($username != '') { $query = array('SELECT' => 'id', 'FROM' => 'users', 'WHERE' => 'username=\'' . $forum_db->escape($username) . '\''); $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); $row = $forum_db->fetch_assoc($result); if (!$row) { $errors[] = sprintf($lang_pun_pm['Non-existent username'], forum_htmlencode($username)); } else { $receiver_id = intval($row['id']); } if ($forum_user['id'] == $receiver_id) { $errors[] = $lang_pun_pm['Message to yourself']; } } return $receiver_id; }
/** * Hook vt_row_pre_display handler * Create block thanks info * * @param array $forum_page * @param array $cur_post */ public static function vt_row_pre_display(&$forum_page, $cur_post) { $bufer = array(); if (isset($forum_page['thanks_info'][$cur_post['id']])) { foreach ($forum_page['thanks_info'][$cur_post['id']] as $cur_thanks_info) { if ($cur_post['id'] == $cur_thanks_info['post_id'] && App::$forum_user['id'] == $cur_thanks_info['from_user_id']) { $forum_page['post_actions']['thanks'] = ''; } $bufer[] = '<a href="' . forum_link(App::$forum_url['user'], $cur_thanks_info['from_user_id']) . '">' . forum_htmlencode($cur_thanks_info['username']) . '</a>'; } if (!empty($bufer)) { $thanks = '<div class="thanks_sig"><span class="thanks_sig_head">' . App::$lang['Thanks assessed'] . '</span><span>' . implode(', ', $bufer) . '</span>'; if (!isset($forum_page['message']['signature'])) { $forum_page['message']['thanks_sig'] = '<div class="sig-content"><span class="sig-line"><!-- --></span>' . $thanks . '<span class="thanks">' . $cur_post['thanks'] . '</span></div></div>'; } else { $forum_page['message']['thanks_sig'] = '<div class="sig-content">' . $thanks . '<span class="thanks">' . $cur_post['thanks'] . '</span></div></div>'; } } } $forum_page['post_options']['actions'] = '<p class="post-actions">' . implode(' ', $forum_page['post_actions']) . '</p>'; }
echo App::$lang['First Post Category']; ?> </span></label><br /> <span class="fld-input"><select id="fld<?php echo App::$forum_page['fld_count']; ?> " name="cat_fp_id"> <?php $cur_category = 0; foreach ($forums as $cur_forum) { if ($cur_forum['cid'] != $cur_category) { if ($cur_category) { echo "\t\t\t" . '</optgroup>' . "\n"; } echo "\t\t\t" . '<optgroup label="' . forum_htmlencode($cur_forum['cat_name']) . '">' . "\n"; $cur_category = $cur_forum['cid']; } echo "\t\t\t\t\t\t\t\t" . '<option value="' . $cur_forum['fid'] . '">' . forum_htmlencode($cur_forum['forum_name']) . '</option>' . "\n"; } ?> </select></span> </div> </div> <div class="frm-buttons"> <span class="submit"><input type="submit" value="<?php echo App::$lang['First Post Submit']; ?> " name="fix_first_post"></span> </div> </form> </div>
<div class="mf-field text mf-field1"> <label for="fld<?php echo ++$forum_page['fld_count']; ?> "><span><?php echo $lang_admin_ranks['Rank title label']; ?> </span></label><br /> <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count']; ?> " name="rank[<?php echo $cur_rank['id']; ?> ]" value="<?php echo forum_htmlencode($cur_rank['rank']); ?> " size="24" maxlength="50" /></span> </div> <?php ($hook = get_hook('ark_pre_edit_cur_rank_min_posts')) ? eval($hook) : null; ?> <div class="mf-field text"> <label for="fld<?php echo ++$forum_page['fld_count']; ?> "><span class="fld-label"><?php echo $lang_admin_ranks['Min posts label']; ?> </span></label><br /> <span class="fld-input"><input type="text" id="fld<?php
?> "> <div class="sf-box text required"> <label for="fld<?php echo ++$forum_page['fld_count']; ?> "><span><?php echo $lang_login['Password']; ?> </span></label><br /> <span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count']; ?> " name="req_password" value="<?php if (isset($_POST['req_password'])) { echo forum_htmlencode($_POST['req_password']); } ?> " size="35" required /></span> </div> </div> <?php ($hook = get_hook('li_login_pre_remember_me_checkbox')) ? eval($hook) : null; ?> <div class="sf-set set<?php echo ++$forum_page['item_count']; ?> "> <div class="sf-box checkbox"> <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'];
$forum_page['ban_info'] = array(); $forum_page['ban_creator'] = $cur_ban['ban_creator_username'] != '' ? '<a href="' . forum_link($forum_url['user'], $cur_ban['ban_creator']) . '">' . forum_htmlencode($cur_ban['ban_creator_username']) . '</a>' : $lang_admin_common['Unknown']; if ($cur_ban['username'] != '') { $forum_page['ban_info']['username'] = '******' . $lang_admin_bans['Username'] . '</span> <strong>' . forum_htmlencode($cur_ban['username']) . '</strong></li>'; } if ($cur_ban['email'] != '') { $forum_page['ban_info']['email'] = '<li><span>' . $lang_admin_bans['E-mail'] . '</span> <strong>' . forum_htmlencode($cur_ban['email']) . '</strong></li>'; } if ($cur_ban['ip'] != '') { $forum_page['ban_info']['ip'] = '<li><span>' . $lang_admin_bans['IP-ranges'] . '</span> <strong>' . $cur_ban['ip'] . '</strong></li>'; } if ($cur_ban['expire'] != '') { $forum_page['ban_info']['expire'] = '<li><span>' . $lang_admin_bans['Expires'] . '</span> <strong>' . format_time($cur_ban['expire'], 1) . '</strong></li>'; } if ($cur_ban['message'] != '') { $forum_page['ban_info']['message'] = '<li><span>' . $lang_admin_bans['Message'] . '</span> <strong>' . forum_htmlencode($cur_ban['message']) . '</strong></li>'; } ($hook = get_hook('aba_view_ban_pre_display')) ? eval($hook) : null; ?> <div class="ct-set set<?php echo ++$forum_page['item_num']; ?> "> <div class="ct-box"> <div class="ct-legend"> <h3 class=""><span><?php printf($lang_admin_bans['Current ban head'], $forum_page['ban_creator']); ?> </span></h3> <p><?php printf($lang_admin_bans['Edit or remove'], '<a href="' . forum_link($forum_url['admin_bans']) . '?edit_ban=' . $cur_ban['id'] . '">' . $lang_admin_bans['Edit ban'] . '</a>', '<a href="' . forum_link($forum_url['admin_bans']) . '?del_ban=' . $cur_ban['id'] . '&csrf_token=' . generate_form_token('del_ban' . $cur_ban['id']) . '">' . $lang_admin_bans['Remove ban'] . '</a>');
<?php } else { $cur_panel['title'] = $lang_common['Login']; require_once FORUM_ROOT.'lang/'.$forum_user['language'].'/login.php'; $form_action = forum_link($forum_url['login']); $forum_page['redirect_url'] = 'https://flazy.us/index.php'; ?> <div class="blocks"> <form method="post" action="<?php echo $form_action ?>"> <input type="hidden" name="form_sent" value="1" /> <input type="hidden" name="redirect_url" value="<?php echo forum_htmlencode($forum_page['redirect_url']) ?>" /><?get_current_url()?> <input type="hidden" name="csrf_token" value="<?php echo generate_form_token($form_action) ?>" /> <div align="center" class="logform"> <ul class="reset"> <label for="login_name"><?php echo $lang_login['Username'] ?>:</label><br /><input type="text" name="req_username" id="login_name" size="23" /> <label for="login_password"><?php echo $lang_login['Password'] ?> (<a href="forum/login.php?action=forget">Forgoten password</a>)</label><br /><input type="password" name="req_password" id="login_password" size="23" /> <?php echo $lang_login['Remember me'] ?></span> <input type="checkbox" size="3" id="fld-remember-me" name="save_pass" value="1" /> <button class="fbutton" onclick="submit();" type="submit" title="Login"><span>Login</span></button> </ul> <input name="login" type="hidden" id="login" value="submit" /> </div> </form> <noindex></noindex> </div>
<div class="sf-box text"> <label for="fld<?php echo ++$forum_page['fld_count']; ?> "><span><?php echo $lang_om_warnings['Search for username']; ?> </span> <small><?php echo $lang_om_warnings['Username help']; ?> </small></label><br /> <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count']; ?> " name="username" value="<?php echo forum_htmlencode($forum_page['username']); ?> " size="35" maxlength="25" /></span> </div> </div> <?php ($hook = get_hook('om_warnings_list_pre_show_expired')) ? eval($hook) : null; ?> <div class="sf-set set<?php echo ++$forum_page['item_count']; ?> "> <div class="sf-box checkbox"> <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count']; ?>
<div class="main-subhead"> <h2 class="hn"><span><?php echo $lang_admin_reports['Read reports heading']; echo $forum_db->num_rows($result) ? '' : ' ' . $lang_admin_reports['No new reports']; ?> </span></h2> </div> <div class="main-content main-frm"> <?php while ($cur_report = $forum_db->fetch_assoc($result)) { $reporter = $cur_report['reporter'] != '' ? '<a href="' . forum_link($forum_url['user'], $cur_report['reported_by']) . '">' . forum_htmlencode($cur_report['reporter']) . '</a>' : $lang_admin_reports['Deleted user']; $forum = $cur_report['forum_name'] != '' ? '<a href="' . forum_link($forum_url['forum'], array($cur_report['forum_id'], sef_friendly($cur_report['forum_name']))) . '">' . forum_htmlencode($cur_report['forum_name']) . '</a>' : $lang_admin_reports['Deleted forum']; $topic = $cur_report['subject'] != '' ? '<a href="' . forum_link($forum_url['topic'], array($cur_report['topic_id'], sef_friendly($cur_report['subject']))) . '">' . forum_htmlencode($cur_report['subject']) . '</a>' : $lang_admin_reports['Deleted topic']; $message = str_replace("\n", '<br />', forum_htmlencode($cur_report['message'])); $post_id = $cur_report['pid'] != '' ? '<a href="' . forum_link($forum_url['post'], $cur_report['pid']) . '">Post #' . $cur_report['pid'] . '</a>' : $lang_admin_reports['Deleted post']; $zapped_by = $cur_report['zapped_by'] != '' ? '<a href="' . forum_link($forum_url['user'], $cur_report['zapped_by_id']) . '">' . forum_htmlencode($cur_report['zapped_by']) . '</a>' : $lang_admin_reports['Deleted user']; ($hook = get_hook('arp_report_pre_display')) ? eval($hook) : null; ?> <div class="ct-set report data-set set<?php echo ++$forum_page['item_count']; ?> "> <div class="ct-box data-box"> <h3 class="ct-legend hn"><strong><?php echo ++$forum_page['item_num']; ?> </strong> <cite class="username"><?php printf($lang_admin_reports['Reported by'], $reporter); ?> </cite> <span><?php echo format_time($cur_report['created']);
<div class="sf-box text"> <label for="fld<?php echo ++$forum_page['fld_count']; ?> "><span><?php echo $lang_admin_settings['SMTP password label']; ?> </span><small><?php echo $lang_admin_settings['SMTP password help']; ?> </small></label><br /> <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count']; ?> " name="form[smtp_pass]" size="35" maxlength="50" value="<?php echo forum_htmlencode($forum_config['o_smtp_pass']); ?> " /></span> </div> </div> <?php ($hook = get_hook('aop_email_pre_smtp_ssl')) ? eval($hook) : null; ?> <div class="sf-set set<?php echo ++$forum_page['item_count']; ?> "> <div class="sf-box checkbox"> <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count']; ?>
<?php /** * Make links redirectly * * hcs_redirect_links * @copyright (C) 2012 hcs hcs@mail.ru * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * * Extension for PunBB (C) 2008-2012 PunBB * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher */ // Make sure no one attempts to run this script "directly" defined('FORUM') or die; $forum_page['form_action'] = forum_link($forum_url['hcs_redirect_confirm']); $forum_page['hidden_fields'] = array('csrf_token' => '<input type="hidden" name="csrf_token" value="' . generate_form_token($forum_page['form_action']) . '" />', 'prev_url' => '<input type="hidden" name="prev_url" value="' . forum_htmlencode($forum_user['prev_url']) . '" />', 'pid' => '<input type="hidden" name="pid" value="' . $pid . '" />', 'uid' => '<input type="hidden" name="uid" value="' . $uid . '" />', 'profile_id' => '<input type="hidden" name="profile_id" value="' . $profile_id . '" />', 'hash' => '<input type="hidden" name="hash" value="' . forum_htmlencode($_GET['hash']) . '" />'); define('FORUM_ALLOW_INDEX', 0); $forum_head['robots'] = '<meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />'; define('FORUM_PAGE', 'redirect-links-form'); require FORUM_ROOT . 'header.php'; // START SUBST - <!-- forum_main --> ob_start(); ?> <div id="brd-main" class="main"> <div class="main-head"> <h2 class="hn"><span><?php echo $lang_common['Confirm action head']; ?> </span></h2> </div>
?> "><span><?php echo $lang_profile['Confirm e-mail']; ?> <em><?php echo $lang_common['Required']; ?> </em></span> <small><?php echo $lang_profile['Confirm e-mail help']; ?> </small></label><br /> <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count']; ?> " name="req_email2" value="<?php echo isset($_POST['req_email2']) ? forum_htmlencode($_POST['req_email2']) : ''; ?> " size="35" maxlength="80" /></span> </div> </div> <?php } $languages = array(); $d = dir(FORUM_ROOT . 'lang'); while (($entry = $d->read()) !== false) { if ($entry != '.' && $entry != '..' && is_dir(FORUM_ROOT . 'lang/' . $entry) && file_exists(FORUM_ROOT . 'lang/' . $entry . '/common.php')) { $languages[] = $entry; } } $d->close(); ($hook = get_hook('rg_register_pre_language')) ? eval($hook) : null;
function output_html($feed) { // Send the Content-type header in case the web server is setup to send something else header('Content-type: text/html; charset=utf-8'); header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); foreach ($feed['items'] as $item) { if (utf8_strlen($item['title']) > FORUM_EXTERN_MAX_SUBJECT_LENGTH) { $subject_truncated = forum_htmlencode(forum_trim(utf8_substr($item['title'], 0, FORUM_EXTERN_MAX_SUBJECT_LENGTH - 5))) . '…'; } else { $subject_truncated = forum_htmlencode($item['title']); } echo '<li><a href="' . $item['link'] . '" title="' . forum_htmlencode($item['title']) . '">' . $subject_truncated . '</a></li>' . "\n"; } }
<div class="entry-content"> <code>[url=<?php echo $base_url . '/'; ?> ]<?php echo forum_htmlencode($forum_config['o_board_title']); ?> [/url]</code> <span><?php echo $lang_help['produces']; ?> </span> <samp><a href="<?php echo $base_url . '/'; ?> "><?php echo forum_htmlencode($forum_config['o_board_title']); ?> </a></samp> </div> <div class="entry-content"> <code>[url]<?php echo $base_url . '/'; ?> [/url]</code> <span><?php echo $lang_help['produces']; ?> </span> <samp><a href="<?php echo $base_url; ?> "><?php
ob_start(); } } // Define standard date/time formats $forum_time_formats = array($forum_config['o_time_format'], 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'); $forum_date_formats = array($forum_config['o_date_format'], 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'); // Create forum_page array $forum_page = array(); // Login and fetch user info $forum_user = array(); cookie_login($forum_user); // Attempt to load the common language file if (file_exists(FORUM_ROOT . 'lang/' . $forum_user['language'] . '/common.php')) { include FORUM_ROOT . 'lang/' . $forum_user['language'] . '/common.php'; } else { error('There is no valid language pack \'' . forum_htmlencode($forum_user['language']) . '\' installed.<br />Please reinstall a language of that name.'); } // Setup the URL rewriting scheme if ($forum_config['o_sef'] != 'Default' && file_exists(FORUM_ROOT . 'include/url/' . $forum_config['o_sef'] . '/forum_urls.php')) { require FORUM_ROOT . 'include/url/' . $forum_config['o_sef'] . '/forum_urls.php'; } else { require FORUM_ROOT . 'include/url/Default/forum_urls.php'; } // A good place to modify the URL scheme ($hook = get_hook('co_modify_url_scheme')) ? eval($hook) : null; // Check if we are to display a maintenance message if ($forum_config['o_maintenance'] && $forum_user['g_id'] > FORUM_ADMIN && !defined('FORUM_TURN_OFF_MAINT')) { maintenance_message(); } // Load cached updates info if ($forum_user['g_id'] == FORUM_ADMIN) {
<div class="mf-field"> <label for="fld<?php echo ++$forum_page['fld_count']; ?> "><span><?php echo $lang_admin_censoring['Replacement label']; ?> </span></label><br /> <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count']; ?> " name="replace_with[<?php echo $cur_word['id']; ?> ]" value="<?php echo forum_htmlencode($cur_word['replace_with']); ?> " size="24" maxlength="60" /></span> </div> <?php ($hook = get_hook('acs_pre_edit_submit')) ? eval($hook) : null; ?> <div class="mf-field"> <span class="submit"><input type="submit" name="update[<?php echo $cur_word['id']; ?> ]" value="<?php echo $lang_admin_common['Update']; ?> " /> <input type="submit" name="remove[<?php echo $cur_word['id'];
</div> <?php ($hook = get_hook('vt_end')) ? eval($hook) : null; $tpl_temp = forum_trim(ob_get_contents()); $tpl_main = str_replace('<!-- forum_main -->', $tpl_temp, $tpl_main); ob_end_clean(); // END SUBST - <!-- forum_main --> // Display quick post if enabled if ($forum_config['o_quickpost'] == '1' && !$forum_user['is_guest'] && ($cur_topic['post_replies'] == '1' || $cur_topic['post_replies'] == '' && $forum_user['g_post_replies'] == '1') && ($cur_topic['closed'] == '0' || $forum_page['is_admmod'])) { // START SUBST - <!-- forum_qpost --> ob_start(); ($hook = get_hook('vt_qpost_output_start')) ? eval($hook) : null; // Setup form $forum_page['form_action'] = forum_link($forum_url['new_reply'], $id); $forum_page['form_attributes'] = array(); $forum_page['hidden_fields'] = array('form_sent' => '<input type="hidden" name="form_sent" value="1" />', 'form_user' => '<input type="hidden" name="form_user" value="' . (!$forum_user['is_guest'] ? forum_htmlencode($forum_user['username']) : 'Guest') . '" />', 'csrf_token' => '<input type="hidden" name="csrf_token" value="' . generate_form_token($forum_page['form_action']) . '" />'); if (!$forum_user['is_guest'] && $forum_config['o_subscriptions'] == '1' && ($forum_user['auto_notify'] == '1' || $cur_topic['is_subscribed'])) { $forum_page['hidden_fields']['subscribe'] = '<input type="hidden" name="subscribe" value="1" />'; } // Setup help $forum_page['main_head_options'] = array(); if ($forum_config['p_message_bbcode'] == '1') { $forum_page['text_options']['bbcode'] = '<span' . (empty($forum_page['text_options']) ? ' class="first-item"' : '') . '><a class="exthelp" href="' . forum_link($forum_url['help'], 'bbcode') . '" title="' . sprintf($lang_common['Help page'], $lang_common['BBCode']) . '">' . $lang_common['BBCode'] . '</a></span>'; } if ($forum_config['p_message_img_tag'] == '1') { $forum_page['text_options']['img'] = '<span' . (empty($forum_page['text_options']) ? ' class="first-item"' : '') . '><a class="exthelp" href="' . forum_link($forum_url['help'], 'img') . '" title="' . sprintf($lang_common['Help page'], $lang_common['Images']) . '">' . $lang_common['Images'] . '</a></span>'; } if ($forum_config['o_smilies'] == '1') { $forum_page['text_options']['smilies'] = '<span' . (empty($forum_page['text_options']) ? ' class="first-item"' : '') . '><a class="exthelp" href="' . forum_link($forum_url['help'], 'smilies') . '" title="' . sprintf($lang_common['Help page'], $lang_common['Smilies']) . '">' . $lang_common['Smilies'] . '</a></span>'; } ($hook = get_hook('vt_quickpost_pre_display')) ? eval($hook) : null;
$tpl_main = str_replace('<!-- forum_debug -->', $tpl_temp, $tpl_main); ob_end_clean(); } // END SUBST - <!-- forum_debug --> // START SUBST - <!-- forum_javascript --> $forum_javascript_commonjs_urls = ' if (typeof PUNBB === \'undefined\' || !PUNBB) { var PUNBB = {}; } PUNBB.env = { base_url: "' . forum_htmlencode($base_url) . '/", base_js_url: "' . forum_htmlencode($base_url) . '/include/js/", user_lang: "' . forum_htmlencode($forum_user['language']) . '", user_style: "' . forum_htmlencode($forum_user['style']) . '", user_is_guest: "' . forum_htmlencode($forum_user['is_guest'] == 1 ? "1" : "0") . '", page: "' . forum_htmlencode(defined("FORUM_PAGE") ? FORUM_PAGE : "unknown") . '" };'; $forum_loader->add_js($forum_javascript_commonjs_urls, array('type' => 'inline', 'weight' => 50, 'group' => FORUM_JS_GROUP_SYSTEM)); $forum_loader->add_js($base_url . '/include/js/min/punbb.common.min.js', array('weight' => 55, 'async' => false, 'group' => FORUM_JS_GROUP_SYSTEM)); ($hook = get_hook('ft_js_include')) ? eval($hook) : null; $tpl_main = str_replace('<!-- forum_javascript -->', $forum_loader->render_js(), $tpl_main); // END SUBST - <!-- forum_javascript --> // Last call! ($hook = get_hook('ft_end')) ? eval($hook) : null; // End the transaction $forum_db->end_transaction(); // Close the db connection (and free up any result data) $forum_db->close(); // Spit out the page exit($tpl_main);
<?php $installed_count = 0; $forum_page['ext_item'] = array(); foreach ($inst_exts as $id => $ext) { if (strpos($id, 'hotfix_') === 0) { continue; } $forum_page['ext_actions'] = array('flip' => '<span class="first-item"><a href="' . $base_url . '/admin/extensions.php?section=manage&flip=' . $id . '&csrf_token=' . generate_form_token('flip' . $id) . '">' . ($ext['disabled'] != '1' ? $lang_admin_ext['Disable'] : $lang_admin_ext['Enable']) . '</a></span>', 'uninstall' => '<span><a href="' . $base_url . '/admin/extensions.php?section=manage&uninstall=' . $id . '">' . $lang_admin_ext['Uninstall'] . '</a></span>'); if ($forum_config['o_check_for_versions'] == 1 && isset($forum_ext_last_versions[$id]) && version_compare($ext['version'], $forum_ext_last_versions[$id]['version'], '<')) { $forum_page['ext_actions']['latest_ver'] = '<span><a href="' . $forum_ext_last_versions[$id]['repo_url'] . '/' . $id . '/' . $id . '.zip">' . $lang_admin_ext['Download latest version'] . '</a></span>'; } ($hook = get_hook('aex_section_manage_pre_ext_actions')) ? eval($hook) : null; if ($ext['disabled'] == '1') { $forum_page['ext_item'][] = '<div class="ct-box info-box extension disabled">' . "\n\t\t" . '<h3 class="ct-legend hn">' . forum_htmlencode($ext['title']) . ' <em>' . $ext['version'] . '</em> (' . $lang_admin_ext['Extension disabled'] . ')</h3>' . "\n\t\t" . '<ul class="data-list">' . "\n\t\t\t" . '<li><span>' . sprintf($lang_admin_ext['Extension by'], forum_htmlencode($ext['author'])) . '</span></li>' . "\n\t\t\t" . ($ext['description'] != '' ? '<li><span>' . forum_htmlencode($ext['description']) . '</span></li>' : '') . "\n\t\t\t" . '</ul>' . "\n\t\t" . '<p class="options">' . implode(' ', $forum_page['ext_actions']) . '</p>' . "\n\t" . '</div>'; } else { $forum_page['ext_item'][] = '<div class="ct-box info-box extension enabled">' . "\n\t\t" . '<h3 class="ct-legend hn">' . forum_htmlencode($ext['title']) . ' <em>' . $ext['version'] . '</em></h3>' . "\n\t\t" . '<ul class="data-list">' . "\n\t\t\t" . '<li><span>' . sprintf($lang_admin_ext['Extension by'], forum_htmlencode($ext['author'])) . '</span></li>' . "\n\t\t\t" . ($ext['description'] != '' ? '<li><span>' . forum_htmlencode($ext['description']) . '</span></li>' : '') . "\n\t\t" . '</ul>' . "\n\t\t" . '<p class="options">' . implode(' ', $forum_page['ext_actions']) . '</p>' . "\n\t" . '</div>'; } $installed_count++; } if ($installed_count > 0) { echo "\t" . implode("\n\t", $forum_page['ext_item']) . "\n"; } else { ?> <div class="ct-box info-box"> <p><?php echo $lang_admin_ext['No installed extensions']; ?> </p> </div> <?php }
} ?> "> <div class="sf-box text required"> <label for="fld<?php echo ++$forum_page['fld_count']; ?> "><span><?php echo $lang_profile['Invitation']; ?> </span> <small><?php echo $lang_profile['You can get it from a user']; ?> </small></label><br /> <span class="fld-input"><input type="text" data-suggest-role="invite" id="req_invite" name="req_invite" value="<?php echo isset($_POST['req_invite']) ? forum_htmlencode($_POST['req_invite']) : ''; ?> " size="35" maxlength="99" spellcheck="false" /></span> </div> </div> <?php $bitcoin_status_url = 'http://blockchain.info/rawaddr/' . $my_bitcoin_address; //sprawdzenie salda przed wyslaniem formularza $_SESSION['balance'] = market_get_single_address_balance($my_bitcoin_address); $price_in_usd = 3.7; //$_SESSION['price'] = file_get_contents($blockchain_root . "tobtc?currency=USD&value=" . $price_in_usd); $_SESSION['price'] = round($price_in_usd / $forum_config['btc_price_usd'], 6); //$price_in_btc = file_get_contents($blockchain_root . "tobtc?currency=USD&value=" . $price_in_usd); ?> <div class="sf-set set<?php echo ++$forum_page['item_count'];
</tr> </thead> <tbody> <?php foreach ($records as $cur_rep) { $cur_rep['reason'] = parse_message($cur_rep['reason'], 0); ?> <tr> <td><?php echo $cur_rep['from_user_name'] ? '<a href="' . forum_link(App::$forum_url['reputation_view'], $cur_rep['from_user_id']) . '">' . forum_htmlencode($cur_rep['from_user_name']) . '</a>' : App::$lang['Profile deleted']; ?> </td> <td> <?php if ($cur_rep['read_forum'] == null || $cur_rep['read_forum'] == 1) { echo $cur_rep['subject'] ? '<a href="' . forum_link(App::$forum_url['post'], $cur_rep['post_id']) . '">' . forum_htmlencode($cur_rep['subject']) . '</a>' : App::$lang['Removed or deleted']; } else { echo App::$lang['Topic not readable']; } ?> </td> <td> <?php if ($cur_rep['read_forum'] == null || $cur_rep['read_forum'] == 1) { echo $cur_rep['reason']; if ($cur_rep['comment'] != '') { echo '<div class="ct-box info-box">' . parse_message($cur_rep['comment'], 0) . '</div>'; } else { if ($cur_rep['user_id'] == App::$forum_user['id']) { echo '<div class="ct-box info-box"><cite><a class="rep_info_link" href="' . forum_link(App::$forum_url['reputation_comment'], $cur_rep['id']) . '">' . App::$lang['Comment'] . '</a></cite></div>'; }
function generate_quickjump_cache($group_id = false) { global $forum_db, $lang_common, $forum_url, $forum_config, $forum_user, $base_url; $return = ($hook = get_hook('ch_fn_generate_quickjump_cache_start')) ? eval($hook) : null; if ($return != null) { return; } // If a group_id was supplied, we generate the quickjump cache for that group only if ($group_id !== false) { $groups[0] = $group_id; } else { // A group_id was not supplied, so we generate the quickjump cache for all groups $query = array('SELECT' => 'g.g_id', 'FROM' => 'groups AS g'); ($hook = get_hook('ch_fn_generate_quickjump_cache_qr_get_groups')) ? eval($hook) : null; $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); $num_groups = $forum_db->num_rows($result); for ($i = 0; $i < $num_groups; ++$i) { $groups[] = $forum_db->result($result, $i); } } // Loop through the groups in $groups and output the cache for each of them foreach ($groups as $group_id) { // Output quickjump as PHP code $fh = @fopen(FORUM_CACHE_DIR . 'cache_quickjump_' . $group_id . '.php', 'wb'); if (!$fh) { error('Unable to write quickjump cache file to cache directory. Please make sure PHP has write access to the directory \'cache\'.', __FILE__, __LINE__); } $output = '<?php' . "\n\n" . 'if (!defined(\'FORUM\')) exit;' . "\n" . 'define(\'FORUM_QJ_LOADED\', 1);' . "\n" . '$forum_id = isset($forum_id) ? $forum_id : 0;' . "\n\n" . '?>'; $output .= '<form id="qjump" method="get" accept-charset="utf-8" action="' . $base_url . '/viewforum.php">' . "\n\t" . '<div class="frm-fld frm-select">' . "\n\t\t" . '<label for="qjump-select"><span><?php echo $lang_common[\'Jump to\'] ?>' . '</span></label><br />' . "\n\t\t" . '<span class="frm-input"><select id="qjump-select" name="id">' . "\n"; // Get the list of categories and forums from the DB $query = array('SELECT' => 'c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.redirect_url', 'FROM' => 'categories AS c', 'JOINS' => array(array('INNER JOIN' => 'forums AS f', 'ON' => 'c.id=f.cat_id'), array('LEFT JOIN' => 'forum_perms AS fp', 'ON' => '(fp.forum_id=f.id AND fp.group_id=' . $group_id . ')')), 'WHERE' => 'fp.read_forum IS NULL OR fp.read_forum=1', 'ORDER BY' => 'c.disp_position, c.id, f.disp_position'); ($hook = get_hook('ch_fn_generate_quickjump_cache_qr_get_cats_and_forums')) ? eval($hook) : null; $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); $cur_category = 0; $forum_count = 0; $sef_friendly_names = array(); while ($cur_forum = $forum_db->fetch_assoc($result)) { ($hook = get_hook('ch_fn_generate_quickjump_cache_forum_loop_start')) ? eval($hook) : null; if ($cur_forum['cid'] != $cur_category) { if ($cur_category) { $output .= "\t\t\t" . '</optgroup>' . "\n"; } $output .= "\t\t\t" . '<optgroup label="' . forum_htmlencode($cur_forum['cat_name']) . '">' . "\n"; $cur_category = $cur_forum['cid']; } $sef_friendly_names[$cur_forum['fid']] = sef_friendly($cur_forum['forum_name']); $redirect_tag = $cur_forum['redirect_url'] != '' ? ' >>>' : ''; $output .= "\t\t\t\t" . '<option value="' . $cur_forum['fid'] . '"<?php echo ($forum_id == ' . $cur_forum['fid'] . ') ? \' selected="selected"\' : \'\' ?>>' . forum_htmlencode($cur_forum['forum_name']) . $redirect_tag . '</option>' . "\n"; $forum_count++; } $output .= "\t\t\t" . '</optgroup>' . "\n\t\t" . '</select>' . "\n\t\t" . '<input type="submit" value="<?php echo $lang_common[\'Go\'] ?>" onclick="return Forum.doQuickjumpRedirect(forum_quickjump_url, sef_friendly_url_array);" /></span>' . "\n\t" . '</div>' . "\n" . '</form>' . "\n"; $output .= '<script type="text/javascript">' . "\n\t\t" . 'var forum_quickjump_url = "' . forum_link($forum_url['forum']) . '";' . "\n\t\t" . 'var sef_friendly_url_array = new Array(' . $forum_db->num_rows($result) . ');'; foreach ($sef_friendly_names as $forum_id => $forum_name) { $output .= "\n\t" . 'sef_friendly_url_array[' . $forum_id . '] = "' . forum_htmlencode($forum_name) . '";'; } $output .= "\n" . '</script>' . "\n"; if ($forum_count < 2) { $output = '<?php' . "\n\n" . 'if (!defined(\'FORUM\')) exit;' . "\n" . 'define(\'FORUM_QJ_LOADED\', 1);'; } fwrite($fh, $output); fclose($fh); } }
function error() { global $forum_config, $lang_common; if (!headers_sent()) { // if no HTTP responce code is set we send 503 if (!defined('FORUM_HTTP_RESPONSE_CODE_SET')) { header('HTTP/1.1 503 Service Temporarily Unavailable'); } header('Content-type: text/html; charset=utf-8'); } /* Parse input parameters. Possible function signatures: error('Error message.'); error(__FILE__, __LINE__); error('Error message.', __FILE__, __LINE__); */ $num_args = func_num_args(); if ($num_args == 3) { $message = func_get_arg(0); $file = func_get_arg(1); $line = func_get_arg(2); } else { if ($num_args == 2) { $file = func_get_arg(0); $line = func_get_arg(1); } else { if ($num_args == 1) { $message = func_get_arg(0); } } } // Set a default title and gzip setting if the script failed before $forum_config could be populated if (empty($forum_config)) { $forum_config['o_board_title'] = 'PunBB'; $forum_config['o_gzip'] = '0'; } // Set a default error messages string if the script failed before $common_lang loaded if (empty($lang_common['Forum error header'])) { $lang_common['Forum error header'] = 'Sorry! The page could not be loaded.'; } if (empty($lang_common['Forum error description'])) { $lang_common['Forum error description'] = 'This is probably a temporary error. Just refresh the page and retry. If problem continues, please check back in 5-10 minutes.'; } if (empty($lang_common['Forum error location'])) { $lang_common['Forum error location'] = 'The error occurred on line %1$s in %2$s'; } if (empty($lang_common['Forum error db reported'])) { $lang_common['Forum error db reported'] = 'Database reported:'; } if (empty($lang_common['Forum error db query'])) { $lang_common['Forum error db query'] = 'Failed query:'; } // Empty all output buffers and stop buffering while (@ob_end_clean()) { } // "Restart" output buffering if we are using ob_gzhandler (since the gzip header is already sent) if (!empty($forum_config['o_gzip']) && extension_loaded('zlib') && !empty($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false || strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') !== false)) { ob_start('ob_gzhandler'); } ?> <!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8" /> <title>Error - <?php echo forum_htmlencode($forum_config['o_board_title']); ?> </title> <style> strong { font-weight: bold; } body { margin: 50px; font: 85%/150% verdana, arial, sans-serif; color: #222; max-width: 55em; } h1 { color: #a00000; font-weight: normal; font-size: 1.45em; } code { font-family: monospace, sans-serif; } .error_line { color: #999; font-size: .95em; } </style> </head> <body> <h1><?php echo forum_htmlencode($lang_common['Forum error header']); ?> </h1> <?php if (isset($message)) { echo '<p>' . $message . '</p>' . "\n"; } else { echo '<p>' . forum_htmlencode($lang_common['Forum error description']) . '</p>' . "\n"; } if ($num_args > 1) { if (defined('FORUM_DEBUG')) { $db_error = isset($GLOBALS['forum_db']) ? $GLOBALS['forum_db']->error() : array(); if (!empty($db_error['error_msg'])) { echo '<p><strong>' . forum_htmlencode($lang_common['Forum error db reported']) . '</strong> ' . forum_htmlencode($db_error['error_msg']) . ($db_error['error_no'] ? ' (Errno: ' . $db_error['error_no'] . ')' : '') . '.</p>' . "\n"; if ($db_error['error_sql'] != '') { echo '<p><strong>' . forum_htmlencode($lang_common['Forum error db query']) . '</strong> <code>' . forum_htmlencode($db_error['error_sql']) . '</code></p>' . "\n"; } } if (isset($file) && isset($line)) { echo '<p class="error_line">' . forum_htmlencode(sprintf($lang_common['Forum error location'], $line, $file)) . '</p>' . "\n"; } } } ?> </body> </html> <?php // If a database connection was established (before this error) we close it if (isset($GLOBALS['forum_db'])) { $GLOBALS['forum_db']->close(); } exit; }
function generate_search_crumbs($action = null) { global $forum_page, $lang_common, $lang_search, $forum_url, $forum_user, $num_hits, $search_set, $search_id, $show_as; $return = ($hook = get_hook('sf_fn_generate_search_crumbs_start')) ? eval($hook) : null; if ($return != null) { return; } switch ($action) { case 'show_new': $forum_page['crumbs'][] = $lang_search['Topics with new']; $forum_page['items_info'] = generate_items_info($lang_search['Topics found'], $forum_page['start_from'] + 1, $num_hits); $forum_page['main_head_options']['defined_search'] = '<span' . (empty($forum_page['main_head_options']) ? ' class="first-item"' : '') . '><a href="' . forum_link($forum_url['search']) . '">' . $lang_search['User defined search'] . '</a></span>'; $forum_page['main_foot_options']['mark_all'] = '<span' . (empty($forum_page['main_foot_options']) ? ' class="first-item"' : '') . '><a href="' . forum_link($forum_url['mark_read'], generate_form_token('markread' . $forum_user['id'])) . '">' . $lang_common['Mark all as read'] . '</a></span>'; // Add link for show all topics, not only new (updated) if ($search_id != -1) { $forum_page['main_head_options']['show_all'] = '<span' . (empty($forum_page['main_head_options']) ? ' class="first-item"' : '') . '><a href="' . forum_link($forum_url['forum'], $search_set[0]['forum_id']) . '">' . $lang_search['All Topics'] . '</a></span>'; } break; case 'show_recent': $forum_page['crumbs'][] = $lang_search['Recently active topics']; $forum_page['items_info'] = generate_items_info($lang_search['Topics found'], $forum_page['start_from'] + 1, $num_hits); $forum_page['main_head_options']['defined_search'] = '<span' . (empty($forum_page['main_head_options']) ? ' class="first-item"' : '') . '><a href="' . forum_link($forum_url['search']) . '">' . $lang_search['User defined search'] . '</a></span>'; break; case 'show_unanswered': $forum_page['crumbs'][] = $lang_search['Unanswered topics']; $forum_page['items_info'] = generate_items_info($lang_search['Topics found'], $forum_page['start_from'] + 1, $num_hits); $forum_page['main_head_options']['defined_search'] = '<span' . (empty($forum_page['main_head_options']) ? ' class="first-item"' : '') . '><a href="' . forum_link($forum_url['search']) . '">' . $lang_search['User defined search'] . '</a></span>'; break; case 'show_user_posts': $forum_page['crumbs'][] = sprintf($lang_search['Posts by'], $search_set[0]['pposter'], $forum_page['start_from'] + 1, $num_hits); $forum_page['items_info'] = generate_items_info($lang_search['Posts found'], $forum_page['start_from'] + 1, $num_hits); $forum_page['main_head_options']['user_topics'] = '<span' . (empty($forum_page['main_head_options']) ? ' class="first-item"' : '') . '><a href="' . forum_link($forum_url['search_user_topics'], $search_id) . '">' . sprintf($lang_search['Topics by'], forum_htmlencode($search_set[0]['pposter'])) . '</a></span>'; $forum_page['main_head_options']['defined_search'] = '<span' . (empty($forum_page['main_head_options']) ? ' class="first-item"' : '') . '><a href="' . forum_link($forum_url['search']) . '">' . $lang_search['User defined search'] . '</a></span>'; break; case 'show_user_topics': $forum_page['crumbs'][] = sprintf($lang_search['Topics by'], $search_set[0]['poster']); $forum_page['items_info'] = generate_items_info($lang_search['Topics found'], $forum_page['start_from'] + 1, $num_hits); $forum_page['main_head_options']['user_posts'] = '<span' . (empty($forum_page['main_head_options']) ? ' class="first-item"' : '') . '><a href="' . forum_link($forum_url['search_user_posts'], $search_id) . '">' . sprintf($lang_search['Posts by'], forum_htmlencode($search_set[0]['poster'])) . '</a></span>'; $forum_page['main_head_options']['defined_search'] = '<span' . (empty($forum_page['main_head_options']) ? ' class="first-item"' : '') . '><a href="' . forum_link($forum_url['search']) . '">' . $lang_search['User defined search'] . '</a></span>'; break; case 'show_subscriptions': $forum_page['crumbs'][] = $lang_search['Subscriptions']; $forum_page['items_info'] = generate_items_info($lang_search['Topics found'], $forum_page['start_from'] + 1, $num_hits); $forum_page['main_head_options']['defined_search'] = '<span' . (empty($forum_page['main_head_options']) ? ' class="first-item"' : '') . '><a href="' . forum_link($forum_url['search']) . '">' . $lang_search['User defined search'] . '</a></span>'; break; case 'show_forum_subscriptions': $forum_page['crumbs'][] = $lang_search['Forum subscriptions']; $forum_page['items_info'] = generate_items_info($lang_search['Forums found'], $forum_page['start_from'] + 1, $num_hits); $forum_page['main_head_options']['defined_search'] = '<span' . (empty($forum_page['main_head_options']) ? ' class="first-item"' : '') . '><a href="' . forum_link($forum_url['search']) . '">' . $lang_search['User defined search'] . '</a></span>'; break; default: $forum_page['crumbs'][] = $lang_search['Search results']; $forum_page['items_info'] = generate_items_info($show_as == 'topics' ? $lang_search['Topics found'] : $lang_search['Posts found'], $forum_page['start_from'] + 1, $num_hits); $forum_page['main_head_options']['new_search'] = '<span' . (empty($forum_page['main_head_options']) ? ' class="first-item"' : '') . '><a href="' . forum_link($forum_url['search']) . '">' . $lang_search['Perform new search'] . '</a></span>'; break; } }
$forums = array(); while ($cur_forum = $forum_db->fetch_assoc($result)) { $forums[] = $cur_forum; } if (!empty($forums)) { $cur_category = 0; foreach ($forums as $cur_forum) { ($hook = get_hook('se_forum_loop_start')) ? eval($hook) : null; if ($cur_forum['cid'] != $cur_category) { if ($cur_category) { echo "\t\t\t\t\t\t\t" . '</fieldset>' . "\n"; } echo "\t\t\t\t\t\t\t" . '<fieldset>' . "\n\t\t\t\t\t\t\t\t" . '<legend><span>' . forum_htmlencode($cur_forum['cat_name']) . ':</span></legend>' . "\n"; $cur_category = $cur_forum['cid']; } echo "\t\t\t\t\t\t\t\t" . '<div class="checklist-item"><span class="fld-input"><input type="checkbox" id="fld' . ++$forum_page['fld_count'] . '" name="forum[]" value="' . $cur_forum['fid'] . '" /></span> <label for="fld' . $forum_page['fld_count'] . '">' . forum_htmlencode($cur_forum['forum_name']) . '</label></div>' . "\n"; ($hook = get_hook('se_forum_loop_end')) ? eval($hook) : null; } echo "\t\t\t\t\t\t\t" . '</fieldset>' . "\n"; } ?> </div> </div> <?php ($hook = get_hook('se_pre_forum_fieldset_end')) ? eval($hook) : null; ?> </fieldset> <?php } ($hook = get_hook('se_forum_fieldset_end')) ? eval($hook) : null; ?>
</ul> </div> <?php ($hook = get_hook('in_stats_end')) ? eval($hook) : null; ($hook = get_hook('in_users_online_start')) ? eval($hook) : null; if ($forum_config['o_users_online'] == '1') { // Fetch users online info and generate strings for output $query = array('SELECT' => 'o.user_id, o.ident', 'FROM' => 'online AS o', 'WHERE' => 'o.idle=0', 'ORDER BY' => 'o.ident'); ($hook = get_hook('in_users_online_qr_get_online_info')) ? eval($hook) : null; $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); $forum_page['num_guests'] = $forum_page['num_users'] = 0; $users = array(); while ($forum_user_online = $forum_db->fetch_assoc($result)) { ($hook = get_hook('in_users_online_add_online_user_loop')) ? eval($hook) : null; if ($forum_user_online['user_id'] > 1) { $users[] = $forum_user['g_view_users'] == '1' ? '<a href="' . forum_link($forum_url['user'], $forum_user_online['user_id']) . '">' . forum_htmlencode($forum_user_online['ident']) . '</a>' : forum_htmlencode($forum_user_online['ident']); ++$forum_page['num_users']; } else { ++$forum_page['num_guests']; } } $forum_page['online_info'] = array(); $forum_page['online_info']['guests'] = $forum_page['num_guests'] == 0 ? $lang_index['Guests none'] : sprintf($forum_page['num_guests'] == 1 ? $lang_index['Guests single'] : $lang_index['Guests plural'], forum_number_format($forum_page['num_guests'])); $forum_page['online_info']['users'] = $forum_page['num_users'] == 0 ? $lang_index['Users none'] : sprintf($forum_page['num_users'] == 1 ? $lang_index['Users single'] : $lang_index['Users plural'], forum_number_format($forum_page['num_users'])); ($hook = get_hook('in_users_online_pre_online_info_output')) ? eval($hook) : null; ?> <div id="brd-online" class="gen-content"> <h3 class="hn"><span><?php printf($lang_index['Currently online'], implode($lang_index['Online stats separator'], $forum_page['online_info'])); ?> </span></h3>
} if (!empty($alert_items)) { $admod_links['alert'] = '<li id="alert"><a href="' . forum_link($forum_url['admin_index']) . '">' . $lang_common['New alerts'] . '</a></li>'; } ($hook = get_hook('hd_alert')) ? eval($hook) : null; } $tpl_main = str_replace('<!-- forum_admod -->', !empty($admod_links) ? '<ul id="brd-admod">' . implode(' ', $admod_links) . '</ul>' : '', $tpl_main); // END SUBST - <!-- forum_admod --> // MAIN SECTION INTERFACE ELEMENT SUBSTITUTION $main_elements = array(); // Top breadcrumbs $main_elements['<!-- forum_crumbs_top -->'] = FORUM_PAGE != 'index' ? '<div id="brd-crumbs-top" class="crumbs">' . "\n\t" . '<p>' . generate_crumbs(false) . '</p>' . "\n" . '</div>' : ''; // Bottom breadcrumbs $main_elements['<!-- forum_crumbs_end -->'] = FORUM_PAGE != 'index' ? '<div id="brd-crumbs-end" class="crumbs">' . "\n\t" . '<p>' . generate_crumbs(false) . '</p>' . "\n" . '</div>' : ''; // Main section heading $main_elements['<!-- forum_main_title -->'] = '<h1 class="main-title">' . (isset($forum_page['main_title']) ? $forum_page['main_title'] : forum_htmlencode(is_array($last_crumb = end($forum_page['crumbs'])) ? reset($last_crumb) : $last_crumb)) . (isset($forum_page['main_head_pages']) ? ' <small>' . $forum_page['main_head_pages'] . '</small>' : '') . '</h1>' . "\n"; // Top pagination and post links $main_elements['<!-- forum_main_pagepost_top -->'] = !empty($forum_page['page_post']) ? '<div id="brd-pagepost-top" class="main-pagepost gen-content">' . "\n\t" . implode("\n\t", $forum_page['page_post']) . "\n" . '</div>' : ''; // Bottom pagination and postlink $main_elements['<!-- forum_main_pagepost_end -->'] = !empty($forum_page['page_post']) ? '<div id="brd-pagepost-end" class="main-pagepost gen-content">' . "\n\t" . implode("\n\t", $forum_page['page_post']) . "\n" . '</div>' : ''; // Main section menu e.g. profile menu $main_elements['<!-- forum_main_menu -->'] = !empty($forum_page['main_menu']) ? '<div class="main-menu gen-content">' . "\n\t" . '<ul>' . "\n\t\t" . implode("\n\t\t", $forum_page['main_menu']) . "\n\t" . '</ul>' . "\n" . '</div>' : ''; // Main section menu e.g. profile menu if (substr(FORUM_PAGE, 0, 5) == 'admin' && FORUM_PAGE_TYPE != 'paged') { $main_elements['<!-- forum_admin_menu -->'] = '<div class="admin-menu gen-content">' . "\n\t" . '<ul>' . "\n\t\t" . generate_admin_menu(false) . "\n\t" . '</ul>' . "\n" . '</div>'; $forum_page['admin_sub'] = generate_admin_menu(true); $main_elements['<!-- forum_admin_submenu -->'] = $forum_page['admin_sub'] != '' ? '<div class="admin-submenu gen-content">' . "\n\t" . '<ul>' . "\n\t\t" . $forum_page['admin_sub'] . "\n\t" . '</ul>' . "\n" . '</div>' : ''; } ($hook = get_hook('hd_main_elements')) ? eval($hook) : null; $tpl_main = str_replace(array_keys($main_elements), array_values($main_elements), $tpl_main); unset($main_elements);