</tr> <tr> <th scope="row">Subscription Length</th> <td> <input type="text" name="form[length]" style="width:400px" tabindex="7" value="<?php echo pun_htmlspecialchars($pun_config['s_length']); ?> " /> <span>How long (in days) members should remain in this group for. This requires the crontab to be working correctly. Set at 0 to disable.</span> </td> </tr> <tr> <th scope="row">Subscription Description</th> <td> <textarea name="form[description]" style="width:400px;height:100px" tabindex="8" /><?php echo pun_htmlspecialchars($pun_config['s_description']); ?> </textarea> <span>A description to be shown on the subscribe page. This will not be parsed, and thus may contain html.</span> </td> </tr> </table> </div> </fieldset> <br /> <div style="text-align:center"><input type="submit" name="submit" value="Update Settings" tabindex="9" /></div> </div> </form> </div> </div> <?php
function parse_signature($text) { global $pun_config, $lang_common, $pun_user; if ($pun_config['o_censoring'] == '1') { $text = censor_words($text); } $text = pun_htmlspecialchars($text); if ($pun_config['o_make_links'] == '1') { $text = do_clickable($text); } if ($pun_config['o_smilies_sig'] == '1' && $pun_user['show_smilies'] != '0') { $text = do_smilies($text); } if ($pun_config['p_sig_bbcode'] == '1' && strpos($text, '[') !== false && strpos($text, ']') !== false) { $text = do_bbcode($text); if ($pun_config['p_sig_img_tag'] == '1') { // $text = preg_replace('#\[img\]((ht|f)tps?://)([^\s<"]*?)\.(jpg|jpeg|png|gif)\[/img\]#e', 'handle_img_tag(\'$1$3.$4\', true)', $text); $text = preg_replace('#\\[img\\]((ht|f)tps?://)([^\\s<"]*?)\\[/img\\]#e', 'handle_img_tag(\'$1$3\', true)', $text); } } // Deal with newlines, tabs and multiple spaces $pattern = array("\n", "\t", ' ', ' '); $replace = array('<br />', ' ', ' ', ' '); $text = str_replace($pattern, $replace, $text); return $text; }
} ?> " size="50" maxlength="80" /><br /></label> <?php if ($pun_config['o_regs_verify'] == '1') { ?> <label class="required"><strong><?php echo $lang->t('Confirm email'); ?> <span><?php echo $lang->t('Required'); ?> </span></strong><br /> <input type="text" name="req_email2" value="<?php if (isset($_POST['req_email2'])) { echo pun_htmlspecialchars($_POST['req_email2']); } ?> " size="50" maxlength="80" /><br /></label> <?php } ?> </div> </fieldset> </div> <div class="inform"> <fieldset> <legend><?php echo $lang->t('Localisation legend'); ?> </legend>
<th scope="row">Prune from forum</th> <td> <select name="prune_from" tabindex="3"> <option value="all">All forums</option> <?php $result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name FROM ' . $db->prefix . 'categories AS c INNER JOIN ' . $db->prefix . 'forums AS f ON c.id=f.cat_id WHERE f.redirect_url IS NULL ORDER BY c.disp_position, c.id, f.disp_position') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error()); $cur_category = 0; while ($forum = $db->fetch_assoc($result)) { if ($forum['cid'] != $cur_category) { if ($cur_category) { echo "\t\t\t\t\t\t\t\t\t\t\t" . '</optgroup>' . "\n"; } echo "\t\t\t\t\t\t\t\t\t\t\t" . '<optgroup label="' . pun_htmlspecialchars($forum['cat_name']) . '">' . "\n"; $cur_category = $forum['cid']; } echo "\t\t\t\t\t\t\t\t\t\t\t\t" . '<option value="' . $forum['fid'] . '">' . pun_htmlspecialchars($forum['forum_name']) . '</option>' . "\n"; } ?> </optgroup> </select> <span>The forum from which you want to prune posts.</span> </td> </tr> </table> <p class="topspace">Use this feature with caution. Pruned posts can <strong>never</strong> be recovered. For best performance you should put the forum in maintenance mode during pruning.</p> <div class="fsetsubmit"><input type="submit" name="prune" value="Prune" tabindex="5" /></div> </div> </fieldset> </div> </form> </div>
?> </a></p> </form> </div> </div> <?php require PUN_ROOT . 'footer.php'; } } } if (!$pun_user['is_guest']) { header('Location: index.php'); } // Try to determine if the data in HTTP_REFERER is valid (if not, we redirect to index.php after login) $redirect_url = isset($_SERVER['HTTP_REFERER']) && preg_match('#^' . preg_quote($pun_config['o_base_url']) . '/(.*?)\\.php#i', $_SERVER['HTTP_REFERER']) ? htmlspecialchars($_SERVER['HTTP_REFERER']) : 'index.php'; $page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / ' . $lang_common['Login']; $required_fields = array('req_username' => $lang_common['Username'], 'req_password' => $lang_common['Password']); $focus_element = array('login', 'req_username'); require PUN_ROOT . 'header.php'; ?> <div class="blockform"> <h2><span><?php echo $lang_common['Login']; ?> </span></h2> <div class="box"> <form id="login" method="post" action="login.php?action=in" onsubmit="return process_form(this)"> <div class="inform"> <fieldset> <legend><?php echo $lang_login['Login legend'];
?> <tr> <th>IP/IP-ranges</th> <td><?php echo $cur_ban['ip']; ?> </td> </tr> <?php } if ($cur_ban['message'] != '') { ?> <tr> <th>Reason</th> <td><?php echo pun_htmlspecialchars($cur_ban['message']); ?> </td> </tr> <?php } ?> </table> <p class="linkactions"><a href="admin_bans.php?edit_ban=<?php echo $cur_ban['id']; ?> ">Edit</a> - <a href="admin_bans.php?del_ban=<?php echo $cur_ban['id']; ?> ">Remove</a></p> </div>
// Only update values that have changed if (array_key_exists('file_' . $key, $pun_config) && $pun_config['file_' . $key] != $input) { if ($input || is_int($input)) { $value = '\'' . $db->escape($input) . '\''; } else { $value = 'NULL'; } $db->query('UPDATE ' . $db->prefix . 'config SET conf_value=' . $value . ' WHERE conf_name=\'file_' . $db->escape($key) . '\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error()); } } // Regenerate the config cache include_once PUN_ROOT . 'include/cache.php'; generate_config_cache(); redirect('admin_files.php', 'Options updated. Redirecting …'); } else { $page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / Admin / Files'; $focus_element = array('files', 'form[upload_path]'); require_once PUN_ROOT . 'header.php'; // Display the admin navigation menu generate_admin_menu('files'); if (isset($_POST['show_errors'])) { //confirm_referrer('admin_files.php'); $log = show_problems(); echo '<div id="imageupload" class="blockform"> <h2><span>Отчет об ошибках</span></h2> <div class="box"> <div class="inform"> <div class="infldset"> <table class="aligntop" cellspacing="0"> <tr> <td>';
<tbody>'; // Fetch messages $result = $db->query('SELECT * FROM ' . $db->prefix . 'messages WHERE owner=' . $pun_user['id'] . ' AND status=' . $box . ' ORDER BY posted DESC ' . $limit) or error('Unable to fetch messages list for forum', __FILE__, __LINE__, $db->error()); $new_messages = $messages_exist = false; // If there are messages in this folder. if ($all = $db->num_rows($result)) { $messages_exist = true; while ($cur_mess = $db->fetch_assoc($result)) { $icon_text = $lang_common['Normal icon']; $icon_type = 'icon'; if (!$cur_mess['showed']) { $icon_text .= ' ' . $lang_common['New icon']; $icon_type = 'icon inew'; } $new_messages == false && $cur_mess['showed'] == '0' ? $new_messages = true : null; $subject = '<a href="message_list.php?id=' . $cur_mess['id'] . '&p=' . $p . '&box=' . $box . '">' . pun_htmlspecialchars($cur_mess['subject']) . '</a>'; if (isset($_GET['id'])) { if ($cur_mess['id'] == $_GET['id']) { $subject = '<strong>' . $subject . '</strong>'; } } echo '<tr> <td class="tcl"> <div class="intd"> <div class="' . $icon_type . '"><div class="nosize">' . $icon_text . '</div></div> <div class="tclcon">' . $subject . '</div> </div> </td> <td class="tc2" style="white-space:nowrap; overflow:hidden;"><a href="profile.php?id=' . $cur_mess['sender_id'] . '">' . $cur_mess['sender'] . '</a></td> <td style="white-space:nowrap;">' . format_time($cur_mess['posted']) . '</td> <td style="text-align:center;"><input type="checkbox" name="delete_messages[]" value="' . $cur_mess['id'] . '"/></td>
along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ************************************************************************/ // Tell header.php to use the help template // because we don't want to edit header.php lets use the standard header template define('PUN_HELP', 1); define('PUN_ROOT', './'); require PUN_ROOT . 'include/common.php'; if ($pun_user['g_read_board'] == '0') { message($lang_common['No view']); } // Load the help.php language file require PUN_ROOT . 'lang/' . $pun_user['language'] . '/modern_bbcode.php'; $page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / Smilies'; require PUN_ROOT . 'header.php'; ?> <script type="text/javascript"> <!-- function insert_text(open, close) { var docOpener = window.opener.document; // msgfield = (docOpener.all) ? docOpener.all.req_message : docOpener.forms['post']['req_message']; msgfield = docOpener.getElementsByName("req_message").item(0); // IE support if (docOpener.selection && docOpener.selection.createRange)
++$num_guests; } } echo $lang_index['Guests online'] . ': ' . $num_guests . '<br />'; if ($_GET['action'] == 'online_full') { echo $lang_index['Users online'] . ': ' . implode(', ', $users) . '<br />'; } else { echo $lang_index['Users online'] . ': ' . $num_users . '<br />'; } return; } else { if ($_GET['action'] == 'stats') { // Load the index.php language file require PUN_ROOT . 'lang/' . $pun_config['o_default_lang'] . '/index.php'; // Collect some statistics from the database $result = $db->query('SELECT COUNT(id)-1 FROM ' . $db->prefix . 'users') or error('Unable to fetch total user count', __FILE__, __LINE__, $db->error()); $stats['total_users'] = $db->result($result); $result = $db->query('SELECT id, username FROM ' . $db->prefix . 'users ORDER BY registered DESC LIMIT 1') or error('Unable to fetch newest registered user', __FILE__, __LINE__, $db->error()); $stats['last_user'] = $db->fetch_assoc($result); $result = $db->query('SELECT SUM(num_topics), SUM(num_posts) FROM ' . $db->prefix . 'forums') or error('Unable to fetch topic/post count', __FILE__, __LINE__, $db->error()); list($stats['total_topics'], $stats['total_posts']) = $db->fetch_row($result); echo $lang_index['No of users'] . ': ' . $stats['total_users'] . '<br />'; echo $lang_index['Newest user'] . ': <a href="' . $pun_config['o_base_url'] . '/profile.php?id=' . $stats['last_user']['id'] . '">' . pun_htmlspecialchars($stats['last_user']['username']) . '</a><br />'; echo $lang_index['No of topics'] . ': ' . $stats['total_topics'] . '<br />'; echo $lang_index['No of posts'] . ': ' . $stats['total_posts']; return; } else { exit('Bad request'); } } }
if ($pun_config['o_report_method'] == 0 || $pun_config['o_report_method'] == 2) { $db->query('INSERT INTO ' . $db->prefix . 'reports (post_id, topic_id, forum_id, reported_by, created, message) VALUES(' . $post_id . ', ' . $topic_id . ', ' . $forum_id . ', ' . $pun_user['id'] . ', ' . time() . ', \'' . $db->escape($reason) . '\')') or error('Unable to create report', __FILE__, __LINE__, $db->error()); } // Should we e-mail the report? if ($pun_config['o_report_method'] == 1 || $pun_config['o_report_method'] == 2) { // We send it to the complete mailing-list in one swoop if ($pun_config['o_mailing_list'] != '') { $mail_subject = 'Report(' . $forum_id . ') - \'' . $subject . '\''; $mail_message = 'User \'' . $pun_user['username'] . '\' has reported the following message:' . "\n" . $pun_config['o_base_url'] . '/viewtopic.php?pid=' . $post_id . '#p' . $post_id . "\n\n" . 'Reason:' . "\n" . $reason; require PUN_ROOT . 'include/email.php'; pun_mail($pun_config['o_mailing_list'], $mail_subject, $mail_message); } } redirect('viewtopic.php?pid=' . $post_id . '#p' . $post_id, $lang_misc['Report redirect']); } $page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / ' . $lang_misc['Report post']; $required_fields = array('req_reason' => $lang_misc['Reason']); $focus_element = array('report', 'req_reason'); require PUN_ROOT . 'header.php'; ?> <div class="blockform"> <h2><span><?php echo $lang_misc['Report post']; ?> </span></h2> <div class="box"> <form id="report" method="post" action="misc.php?report=<?php echo $post_id; ?> " onsubmit="this.submit.disabled=true;if(process_form(this)){return true;}else{this.submit.disabled=false;return false;}"> <div class="inform">
<option value="registered">registered</option> </select> <select name="direction" tabindex="21"> <option value="ASC" selected="selected">ascending</option> <option value="DESC">descending</option> </select> </td> </tr> <tr> <th scope="row">User group</th> <td> <select name="user_group" tabindex="22"> <option value="all" selected="selected">All groups</option> <?php $result = $db->query('SELECT g_id, g_title FROM ' . $db->prefix . 'groups WHERE g_id!=' . PUN_GUEST . ' ORDER BY g_title') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error()); while ($cur_group = $db->fetch_assoc($result)) { echo "\t\t\t\t\t\t\t\t\t\t\t" . '<option value="' . $cur_group['g_id'] . '">' . pun_htmlspecialchars($cur_group['g_title']) . '</option>' . "\n"; } ?> </select> </td> </tr> </table> </div> </fieldset> </div> <p class="submitend"><input type="submit" name="find_user" value="Submit search" tabindex="23" /></p> </form> </div> <h2 class="block2"><span>IP search</span></h2> <div class="box">
function parse_message($text, $html = 'off') { if ($html != 'on') { // Convert applicable characters to HTML entities $text = pun_htmlspecialchars($text); } // If the message contains a code tag we have to split it up (text within [code][/code] shouldn't be touched) if (strpos($text, '[code]') !== false && strpos($text, '[/code]') !== false) { list($inside, $outside) = split_text($text, '[code]', '[/code]'); $outside = array_map('ltrim', $outside); $text = implode('<">', $outside); } $text = do_clickable($text); if (strpos($text, '[') !== false && strpos($text, ']') !== false) { $text = do_bbcode($text); $text = preg_replace('#\\[img\\]((ht|f)tps?://)([^\\s<"]*?)\\[/img\\]#e', 'handle_img_tag(\'$1$3\')', $text); } // Deal with newlines, tabs and multiple spaces $pattern = array("\n", "\t", ' ', ' '); $replace = array('<br />', ' ', ' ', ' '); $text = str_replace($pattern, $replace, $text); // If we split up the message before we have to concatenate it together again (code tags) if (isset($inside)) { $outside = explode('<">', $text); $text = ''; $num_tokens = count($outside); for ($i = 0; $i < $num_tokens; ++$i) { $text .= $outside[$i]; if (isset($inside[$i])) { $num_lines = (substr_count($inside[$i], "\n") + 3) * 1.5; $height_str = $num_lines > 35 ? '35em' : $num_lines . 'em'; $text .= '</p><div class="codebox"><div class="incqbox"><h4>Kod:</h4><div class="scrollbox" style="height: ' . $height_str . '"><pre>' . $inside[$i] . '</pre></div></div></div><p>'; } } } // Add paragraph tag around post, but make sure there are no empty paragraphs $text = str_replace('<p></p>', '', '<p class="IE_wrap">' . $text . '</p>'); $pattern = '/@([0-9a-zA-Z_\\-åäöÅÄÖ]+)@/'; $replacement = '<div style="font-weight: bold; font-style: italic;">Svarar till <a href="/traffa/quicksearch.php?username=$1">$1</a></div>'; $text = preg_replace($pattern, $replacement, $text); $pattern = '/@([0-9a-zA-Z_\\-åäöÅÄÖ]+):([0-9]+)@/'; function fix_postid($matches) { $query = 'SELECT timestamp FROM forum_posts, login WHERE forum_posts.id = ' . $matches[2] . ' AND login.username LIKE "' . $matches[1] . '" AND login.id = forum_posts.user'; $result = mysql_query($query); $data = mysql_fetch_assoc($result); if (mysql_num_rows($result) > 0) { $extra_text .= '<strong><i> <a href="javascript: void(0);" onclick="window.open(\'read_post_popup.php?id=' . $matches[2] . '\''; $extra_text .= ', \'_blank\', \'width=600, height=450, scrollbars=yes\');">'; $extra_text .= 'Svarar på inlägg skrivet av ' . $matches[1] . ', ' . date('Y-m-d H:i', $data['timestamp']) . '</a></strong></i>'; } return $extra_text; } $text = preg_replace_callback($pattern, "fix_postid", $text); return $text; }
<input type="hidden" name="req_subject" value="<?php echo $p_subject; ?> " /> <?php } ?> <label for="req_message"><strong><?php echo $lang_common['Message']; ?> </strong></label> <textarea name="req_message" id="req_message" rows="20" cols="95" tabindex="<?php echo $cur_index++; ?> "><?php echo $p_message != '' ? pun_htmlspecialchars($p_message) : ''; ?> </textarea> <?php /* Si vous utilisez la PunToolbar, décomentez la ligne suivante : */ //require PUN_ROOT.'include/puntoolbar.php'; ?> <ul class="bblinks"> <li><a href="help.php#bbcode" onclick="window.open(this.href); return false;"><?php echo $lang_common['BBCode']; ?> </a>: <?php echo $pun_config['p_message_bbcode'] == '1' ? $lang_common['on'] : $lang_common['off']; ?> </li> <li><a href="help.php#img" onclick="window.open(this.href); return false;"><?php
} } if ($checkboxes) { echo '</div><div class="inform"><fieldset><legend>' . $lang_common['Options'] . '</legend><div class="infldset"><div class="rbox">' . implode('<br /></label>', $checkboxes) . '<br /></label></div></div></fieldset><input type="hidden" name="form_t" value="' . $_SERVER['REQUEST_TIME'] . '" />'; } echo '</div><p><input type="submit" name="submit" value="' . $lang_common['Submit'] . '" accesskey="s" /><input type="submit" name="preview" value="' . $lang_post['Preview'] . '" accesskey="p" /><a href="javascript:history.go(-1)">' . $lang_common['Go back'] . '</a></p></form></div></div>'; // Check to see if the topic review is to be displayed. if ($tid && $pun_config['o_topic_review']) { include_once PUN_ROOT . 'include/parser.php'; $result = $db->query('SELECT id, poster, message, hide_smilies, posted FROM ' . $db->prefix . 'posts WHERE topic_id=' . $tid . ' ORDER BY id DESC LIMIT ' . $pun_config['o_topic_review']) or error('Unable to fetch topic review', __FILE__, __LINE__, $db->error()); echo '<div id="postreview" class="blockpost"><h2><span>' . $lang_post['Topic review'] . '</span></h2>'; //Set background switching on $bg_switch = true; $post_count = 0; while ($cur_post = $db->fetch_assoc($result)) { // Switch the background color for every message. $bg_switch = $bg_switch ? $bg_switch = false : ($bg_switch = true); $vtbg = $bg_switch ? ' roweven' : ' rowodd'; $post_count++; // QUICK QUOTE MOD BEGIN // MOD: QUICK QUOTE - 1 LINE FOLLOWING CODE ADDED $username = '******'' . pun_htmlspecialchars($cur_post['poster']) . '\');">' . pun_htmlspecialchars($cur_post['poster']) . '</a>'; // QUICK QUOTE MOD END $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); // MOD: QUICK QUOTE - 1 LINE FOLLOWING CODE MODIFIED echo '<div class="box' . $vtbg . '"><div class="inbox"><div class="postleft"><dl><dt><strong>' . $username . '</strong></dt><dd>' . format_time($cur_post['posted']) . '</dd></dl></div><div class="postright"><div class="postmsg">' . $cur_post['message'] . '</div></div><div class="clearer"></div><div class="postfootright"><ul><li class="postquote"><a href="javascript:pasteQ(\'' . $cur_post['id'] . '\',\'' . pun_htmlspecialchars($cur_post['poster']) . '\');">' . $lang_post['Quote'] . '</a></li></ul></div></div></div>'; // MOD: QUICK QUOTE - 1 LINE FOLLOWING CODE ADDED } echo '</div>'; } require_once PUN_ROOT . 'footer.php';
// // If the "Show text" button was clicked if (isset($_POST['show_text'])) { // Make sure something something was entered if (trim($_POST['text_to_show']) == '') { message('You didn\'t enter anything!'); } // Display the admin navigation menu generate_admin_menu($plugin); ?> <div class="block"> <h2><span>Example plugin</span></h2> <div class="box"> <div class="inbox"> <p>You said "<?php echo pun_htmlspecialchars($_POST['text_to_show']); ?> ". Great stuff.</p> <p><a href="javascript: history.go(-1)">Go back</a></p> </div> </div> </div> <?php } else { // Display the admin navigation menu generate_admin_menu($plugin); ?> <div id="exampleplugin" class="blockform"> <h2><span>Example plugin</span></h2> <div class="box"> <div class="inbox">
$mail_message = trim(substr($mail_tpl, $first_crlf)); $mail_subject = str_replace('<board_title>', $pun_config['o_board_title'], $mail_subject); $mail_message = str_replace('<base_url>', $pun_config['o_base_url'] . '/', $mail_message); $mail_message = str_replace('<username>', $username, $mail_message); $mail_message = str_replace('<password>', $password1, $mail_message); $mail_message = str_replace('<login_url>', $pun_config['o_base_url'] . '/login.php', $mail_message); $mail_message = str_replace('<board_mailer>', $pun_config['o_board_title'] . ' ' . $lang_common['Mailer'], $mail_message); pun_mail($email1, $mail_subject, $mail_message); message($lang_register['Reg e-mail'] . ' <a href="mailto:' . $pun_config['o_admin_email'] . '">' . $pun_config['o_admin_email'] . '</a>.', true); } pun_setcookie($new_uid, $password_hash, $save_pass != '0' ? $now + 31536000 : 0); redirect('index.php', $lang_register['Reg complete']); } } } $page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / ' . $lang_register['Register']; $required_fields = array('req_username' => $lang_common['Username'], 'req_password1' => $lang_common['Password'], 'req_password2' => $lang_prof_reg['Confirm pass'], 'req_email1' => $lang_common['E-mail'], 'req_email2' => $lang_common['E-mail'] . ' 2'); $focus_element = array('register', 'req_username'); require PUN_ROOT . 'header.php'; ?> <div class="blockform"> <h2><span><?php echo $lang_register['Register']; ?> </span></h2> <div class="box"> <!-- fix submit button will stay disabled until the page is reloaded --> <form id="register" method="post" action="register.php?action=register"> <!-- <form id="register" method="post" action="register.php?action=register" onsubmit="this.register.disabled=true;if(process_form(this)){return true;}else{this.register.disabled=false;return false;}"> --> <div class="inform"> <div class="forminfo">
" value="<?php echo pun_htmlspecialchars(isset($_POST['req_subject']) ? $_POST['req_subject'] : $cur_post['subject']); ?> " /><br /></label> <?php } ?> <label><?php echo $lang_common['Message']; ?> <br /> <textarea name="req_message" rows="20" cols="95" tabindex="<?php echo $cur_index++; ?> "><?php echo pun_htmlspecialchars(isset($_POST['req_message']) ? $message : $cur_post['message']); ?> </textarea><br /></label> <ul class="bblinks"> <li><a href="help.php#bbcode" onclick="window.open(this.href); return false;"><?php echo $lang_common['BBCode']; ?> </a>: <?php echo $pun_config['p_message_bbcode'] == '1' ? $lang_common['on'] : $lang_common['off']; ?> </li> <li><a href="help.php#img" onclick="window.open(this.href); return false;"><?php echo $lang_common['img tag']; ?> </a>: <?php echo $pun_config['p_message_img_tag'] == '1' ? $lang_common['on'] : $lang_common['off'];
echo $id; ?> "> <div class="inform"> <fieldset> <legend class="warntext"><?php echo $lang_delete['Warning']; ?> </legend> <div class="infldset"> <div class="postmsg"> <p><?php echo $lang_common['Author']; ?> : <strong><?php echo pun_htmlspecialchars($cur_post['poster']); ?> </strong></p> <?php echo $cur_post['message']; ?> </div> </div> </fieldset> </div> <p><input type="submit" name="delete" value="<?php echo $lang_delete['Delete']; ?> " /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back']; ?>
if (!defined('PUN_CONFIG_LOADED')) { include PUN_ROOT . 'include/cache.php'; generate_config_cache(); include PUN_ROOT . 'cache/cache_config.php'; } // Enable output buffering if (!defined('PUN_DISABLE_BUFFERING')) { @ob_start(); } // Check/update/set cookie and fetch user info $pun_user = array(); check_cookie($pun_user); // Attempt to load the common language file @(include PUN_ROOT . 'lang/' . $pun_user['language'] . '/common.php'); if (!isset($lang_common)) { exit('There is no valid language pack "' . pun_htmlspecialchars($pun_user['language']) . '" installed. Please reinstall a language of that name.'); } @iconv_set_encoding('internal_encoding', 'UTF-8'); @mb_internal_encoding('UTF-8'); // Check if we are to display a maintenance message if ($pun_config['o_maintenance'] && $pun_user['g_id'] > PUN_ADMIN && !defined('PUN_TURN_OFF_MAINT')) { maintenance_message(); } // Load cached bans @(include PUN_ROOT . 'cache/cache_bans.php'); if (!defined('PUN_BANS_LOADED')) { include_once PUN_ROOT . 'include/cache.php'; generate_bans_cache(); include PUN_ROOT . 'cache/cache_bans.php'; } // Check if current user is banned
echo $lang_admin_reports['Last 10 head']; ?> </span></h2> <div class="box"> <div class="fakeform"> <?php $result = $db->query('SELECT r.id, r.topic_id, r.forum_id, r.reported_by, r.message, r.zapped, r.zapped_by AS zapped_by_id, p.id AS pid, t.subject, f.forum_name, u.username AS reporter, u2.username AS zapped_by FROM ' . $db->prefix . 'reports AS r LEFT JOIN ' . $db->prefix . 'posts AS p ON r.post_id=p.id LEFT JOIN ' . $db->prefix . 'topics AS t ON r.topic_id=t.id LEFT JOIN ' . $db->prefix . 'forums AS f ON r.forum_id=f.id LEFT JOIN ' . $db->prefix . 'users AS u ON r.reported_by=u.id LEFT JOIN ' . $db->prefix . 'users AS u2 ON r.zapped_by=u2.id WHERE r.zapped IS NOT NULL ORDER BY zapped DESC LIMIT 10') or error('Unable to fetch report list', __FILE__, __LINE__, $db->error()); if ($db->num_rows($result)) { while ($cur_report = $db->fetch_assoc($result)) { $reporter = $cur_report['reporter'] != '' ? '<a href="profile.php?id=' . $cur_report['reported_by'] . '">' . pun_htmlspecialchars($cur_report['reporter']) . '</a>' : $lang_admin_reports['Deleted user']; $forum = $cur_report['forum_name'] != '' ? '<span><a href="viewforum.php?id=' . $cur_report['forum_id'] . '">' . pun_htmlspecialchars($cur_report['forum_name']) . '</a></span>' : '<span>' . $lang_admin_reports['Deleted'] . '</span>'; $topic = $cur_report['subject'] != '' ? '<span>» <a href="viewtopic.php?id=' . $cur_report['topic_id'] . '">' . pun_htmlspecialchars($cur_report['subject']) . '</a></span>' : '<span>» ' . $lang_admin_reports['Deleted'] . '</span>'; $post = str_replace("\n", '<br />', pun_htmlspecialchars($cur_report['message'])); $post_id = $cur_report['pid'] != '' ? '<span>» <a href="viewtopic.php?pid=' . $cur_report['pid'] . '#p' . $cur_report['pid'] . '">Post #' . $cur_report['pid'] . '</a></span>' : '<span>» ' . $lang_admin_reports['Deleted'] . '</span>'; $zapped_by = $cur_report['zapped_by'] != '' ? '<a href="profile.php?id=' . $cur_report['zapped_by_id'] . '">' . pun_htmlspecialchars($cur_report['zapped_by']) . '</a>' : $lang_admin_reports['NA']; $zapped_by = $cur_report['zapped_by'] != '' ? '<strong>' . pun_htmlspecialchars($cur_report['zapped_by']) . '</strong>' : $lang_admin_reports['NA']; $report_location = array($forum, $topic, $post_id); ?> <div class="inform"> <fieldset> <legend><?php printf($lang_admin_reports['Zapped subhead'], format_time($cur_report['zapped']), $zapped_by); ?> </legend> <div class="infldset"> <table class="aligntop" cellspacing="0"> <tr> <th scope="row"><?php printf($lang_admin_reports['Reported by'], $reporter); ?> </th>
<?php $result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.moderators FROM ' . $db->prefix . 'categories AS c INNER JOIN ' . $db->prefix . 'forums AS f ON c.id=f.cat_id WHERE f.redirect_url IS NULL ORDER BY c.disp_position, c.id, f.disp_position') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error()); $cur_category = 0; while ($cur_forum = $db->fetch_assoc($result)) { if ($cur_forum['cid'] != $cur_category) { if ($cur_category) { echo "\n\t\t\t\t\t\t\t\t" . '</div>'; } if ($cur_category != 0) { echo "\n\t\t\t\t\t\t\t" . '</div>' . "\n"; } echo "\t\t\t\t\t\t\t" . '<div class="conl">' . "\n\t\t\t\t\t\t\t\t" . '<p><strong>' . $cur_forum['cat_name'] . '</strong></p>' . "\n\t\t\t\t\t\t\t\t" . '<div class="rbox">'; $cur_category = $cur_forum['cid']; } $moderators = $cur_forum['moderators'] != '' ? unserialize($cur_forum['moderators']) : array(); echo "\n\t\t\t\t\t\t\t\t\t" . '<label><input type="checkbox" name="moderator_in[' . $cur_forum['fid'] . ']" value="1"' . (in_array($id, $moderators) ? ' checked="checked"' : '') . ' />' . pun_htmlspecialchars($cur_forum['forum_name']) . '<br /></label>' . "\n"; } ?> </div> </div> <br class="clearb" /><input type="submit" name="update_forums" value="<?php echo $lang_profile['Update forums']; ?> " /> </div> </fieldset> </div> <?php } } ?>
?foo=bar"> <div><input type="hidden" name="form_sent" value="1" /></div> <div class="inform"> <p>This script will update your database to work with the following modification:</p> <p><strong>Mod title:</strong> <?php echo pun_htmlspecialchars($mod_title) . ' ' . $mod_version; ?> </p> <p><strong>Author:</strong> <?php echo pun_htmlspecialchars($author); ?> (<a href="mailto:<?php echo pun_htmlspecialchars($author_email); ?> "><?php echo pun_htmlspecialchars($author_email); ?> </a>)</p> <p><strong>Disclaimer:</strong> Mods are not officially supported by PunBB. Mods generally can't be uninstalled without running SQL queries manually against the database. Make backups of all data you deem necessary before installing.</p> <?php if ($mod_restore) { ?> <p>If you've previously installed this mod and would like to uninstall it, you can click the restore button below to restore the database.</p> <?php } ?> </div> <p><input type="submit" name="install" value="Install" /><?php if ($mod_restore) { ?> <input type="submit" name="restore" value="Restore" /><?php
update_search_index('post', $cur_post[1], $cur_post[2]); } } // Check if there is more work to do $result = $db->query('SELECT id FROM ' . $db->prefix . 'topics WHERE id>' . $end_at) or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error()); $query_str = $db->num_rows($result) ? '?i_per_page=' . $per_page . '&i_start_at=' . $end_at : ''; $db->end_transaction(); $db->close(); exit('<script type="text/javascript">window.location="admin_maintenance.php' . $query_str . '"</script><br />JavaScript redirect unsuccessful. Click <a href="admin_maintenance.php' . $query_str . '">here</a> to continue.'); } // Get the first post ID from the db $result = $db->query('SELECT id FROM ' . $db->prefix . 'topics ORDER BY id LIMIT 1') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error()); if ($db->num_rows($result)) { $first_id = $db->result($result); } $page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / Admin / Maintenance'; require PUN_ROOT . 'header.php'; generate_admin_menu('maintenance'); ?> <div class="blockform"> <h2><span>Forum Maintenance</span></h2> <div class="box"> <form method="get" action="admin_maintenance.php"> <div class="inform"> <fieldset> <legend>Rebuild search index</legend> <div class="infldset"> <p>If you've added, edited or removed posts manually in the database or if you're having problems searching, you should rebuild the search index. For best performance you should put the forum in maintenance mode during rebuilding. <strong>Rebuilding the search index can take a long time and will increase server load during the rebuild process!</strong></p> <table class="aligntop" cellspacing="0"> <tr> <th scope="row">Topics per cycle</th>
echo pun_htmlspecialchars($cur_user['username']); ?> </legend> <div class="infldset"> <label class="required"><strong><?php echo $lang_update['New username']; ?> <span><?php echo $lang_update['Required']; ?> </span></strong><br /><input type="text" name="<?php echo 'dupe_users[' . $id . ']'; ?> " value="<?php if (isset($_POST['dupe_users'][$id])) { echo pun_htmlspecialchars($_POST['dupe_users'][$id]); } ?> " size="25" maxlength="25" /><br /></label> </div> </fieldset> <?php if (!empty($errors[$id])) { ?> <div class="forminfo error-info"> <h3><?php echo $lang_update['Correct errors']; ?> </h3> <ul class="error-list"> <?php
</div> <div class="blockform block2"> <h2><span>10 last zapped reports</span></h2> <div class="box"> <div class="fakeform"> <?php $result = $db->query('SELECT r.id, r.post_id, r.topic_id, r.forum_id, r.reported_by, r.message, r.zapped, r.zapped_by AS zapped_by_id, t.subject, f.forum_name, u.username AS reporter, u2.username AS zapped_by FROM ' . $db->prefix . 'reports AS r LEFT JOIN ' . $db->prefix . 'topics AS t ON r.topic_id=t.id LEFT JOIN ' . $db->prefix . 'forums AS f ON r.forum_id=f.id LEFT JOIN ' . $db->prefix . 'users AS u ON r.reported_by=u.id LEFT JOIN ' . $db->prefix . 'users AS u2 ON r.zapped_by=u2.id WHERE r.zapped IS NOT NULL ORDER BY zapped DESC LIMIT 10') or error('Unable to fetch report list', __FILE__, __LINE__, $db->error()); if ($db->num_rows($result)) { while ($cur_report = $db->fetch_assoc($result)) { $reporter = $cur_report['reporter'] != '' ? '<a href="profile.php?id=' . $cur_report['reported_by'] . '">' . pun_htmlspecialchars($cur_report['reporter']) . '</a>' : 'Deleted user'; $forum = $cur_report['forum_name'] != '' ? '<a href="viewforum.php?id=' . $cur_report['forum_id'] . '">' . pun_htmlspecialchars($cur_report['forum_name']) . '</a>' : 'Deleted'; $topic = $cur_report['subject'] != '' ? '<a href="viewtopic.php?id=' . $cur_report['topic_id'] . '">' . pun_htmlspecialchars($cur_report['subject']) . '</a>' : 'Deleted'; $post = $cur_report['post_id'] != '' ? str_replace("\n", '<br />', pun_htmlspecialchars($cur_report['message'])) : 'Post deleted'; $post_id = $cur_report['post_id'] != '' ? '<a href="viewtopic.php?pid=' . $cur_report['post_id'] . '#p' . $cur_report['post_id'] . '">Post #' . $cur_report['post_id'] . '</a>' : 'Deleted'; $zapped_by = $cur_report['zapped_by'] != '' ? '<a href="profile.php?id=' . $cur_report['zapped_by_id'] . '">' . pun_htmlspecialchars($cur_report['zapped_by']) . '</a>' : 'N/A'; ?> <div class="inform"> <fieldset> <legend>Zapped <?php echo format_time($cur_report['zapped']); ?> </legend> <div class="infldset"> <table> <tr> <th scope="row">Forum » Topic » Post</th> <td><?php echo $forum; ?> » <?php
<?php // If there are topics in this forum. if ($db->num_rows($result_topic)) { while ($cur_topic = $db->fetch_assoc($result_topic)) { ?> <tr> <td class="tc2"><input name="topic_to_move" value="<?php echo $cur_topic['id']; ?> " type="radio" /></td> <td><?php echo pun_htmlspecialchars($cur_topic['subject']); ?> </td> <td><?php echo pun_htmlspecialchars($cur_topic['poster']); ?> </td> <td><?php echo format_time($cur_topic['last_post']); ?> </td> <td class="tc2"><?php echo $cur_topic['num_replies']; ?> </td> </tr> <?php } } ?>
echo $lang_common['Registered']; ?> </th> </tr> </thead> <tbody> <?php // Grab the users $result = $db->query('SELECT u.id, u.username, u.title, u.num_posts, u.registered, g.g_id, g.g_user_title FROM ' . $db->prefix . 'users AS u LEFT JOIN ' . $db->prefix . 'groups AS g ON g.g_id=u.group_id WHERE u.id>1' . (!empty($where_sql) ? ' AND ' . implode(' AND ', $where_sql) : '') . ' ORDER BY ' . $sort_by . ' ' . $sort_dir . ', u.id ASC LIMIT ' . $start_from . ', 50') or error('Unable to fetch user list', __FILE__, __LINE__, $db->error()); if ($db->num_rows($result)) { while ($user_data = $db->fetch_assoc($result)) { $user_title_field = get_title($user_data); ?> <tr> <td class="tcl"><?php echo '<a href="profile.php?id=' . $user_data['id'] . '">' . pun_htmlspecialchars($user_data['username']) . '</a>'; ?> </td> <td class="tc2"><?php echo $user_title_field; ?> </td> <?php if ($show_post_count) { ?> <td class="tc3"><?php echo $user_data['num_posts']; ?> </td> <?php }
?> </td> <td class="tc3"><?php echo pun_htmlspecialchars($char['g_title']); ?> </td> <td class="tc3"><?php echo format_time($char['caught_time'], true); ?> </td> <td class="tc3"><?php echo pun_htmlspecialchars($char['caught_ip']); ?> </td> <td class="tcr"><?php echo pun_htmlspecialchars($char['details']) . '"'; ?> </td> </tr> <?php } } else { ?> <tr><td colspan="6">No characters</td></tr> <?php } ?> </tbody> </table> </div> </div>
</a></li> <li><span>» </span><strong><?php echo $lang_admin_bans['Results head']; ?> </strong></li> </ul> <div class="clearer"></div> </div> </div> <?php require PUN_ROOT . 'footer.php'; } } } } $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Bans']); $focus_element = array('bans', 'new_ban_user'); define('PUN_ACTIVE_PAGE', 'admin'); require PUN_ROOT . 'header.php'; generate_admin_menu('bans'); ?> <div class="blockform"> <h2><span><?php echo $lang_admin_bans['New ban head']; ?> </span></h2> <div class="box"> <form id="bans" method="post" action="admin_bans.php?action=more"> <div class="inform"> <fieldset> <legend><?php