diff --git a/admin_bans.php b/admin_bans.php new file mode 100644 index 0000000..76e626c --- /dev/null +++ b/admin_bans.php @@ -0,0 +1,290 @@ +query('SELECT username, email FROM '.$db->prefix.'users WHERE id='.$ban_id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); + if ($db->num_rows($result)) + { + list($ban_user, $ban_email) = $db->fetch_row($result); + + $result = $db->query('SELECT poster_ip FROM '.$db->prefix.'posts WHERE poster_id='.$ban_id.' ORDER BY posted DESC LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error()); + if ($db->num_rows($result)) + $ban_ip = $db->result($result, 0); + } + else + message('No user by that ID registered.'); + } + else // Otherwise the username is in POST + { + $ban_user = trim($_POST['new_ban_user']); + + if ($ban_user != '') + { + $result = $db->query('SELECT id, username, email FROM '.$db->prefix.'users WHERE username=\''.escape(strtolower($ban_user)).'\'') or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); + if ($db->num_rows($result)) + { + list($ban_id, $ban_user, $ban_email) = $db->fetch_row($result); + + $result = $db->query('SELECT poster_ip FROM '.$db->prefix.'posts WHERE poster_id='.$ban_id.' ORDER BY posted DESC LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error()); + if ($db->num_rows($result)) + $ban_ip = $db->result($result, 0); + } + else + message('No user by that username registered. If you want to add a ban not tied to a specific username just leave the username blank.'); + } + } + + + $page_title = htmlspecialchars($options['board_title']).' / Admin / Bans'; + $form_name = 'bans2'; + $focus_element = 'new_ban_ip'; + require 'header.php'; + + if ($cur_user['status'] > 1) + admin_menu('bans'); + else + moderator_menu('bans'); + + +?> +
+ +Forum administation | +
+ Welcome to the PunBB administration control panel. From here you can control vital aspects of the forum. Depending on whether you are an administrator or a moderator you can + - organize categories and forums. + - set forum-wide options and preferences. + - control permissions for users and guests. + - view IP statistics for users. + - ban users. + - censor words. + - set up user ranks. + - prune old posts. + - handle post reports. + |
+
Statistics | +|
Current version | +
+ PunBB + Developed by Rickard Andersson + © Copyright 2002, 2003 Rickard Andersson + |
+
Unix load averages | +- users online | +
Environment | +
+ PHP + + Rows: + Size: + + |
+
10 last zapped reports | |||||
Forum | +Topic | +Message | +Reporter | +Zapped | +|
+ | + | ', htmlspecialchars($cur_report['message'])) ?> | ++ | + | There are no zapped reports. | '."\n"; + +?> +
IP address | +Hostname | +Last used | +Times found | +Action | +||||||
+ | + | + | + | Find more users for this ip | +There are currently no posts by that user in the forum. | '."\n"; + +?> + +
Username | +Title | +Registered | +Last post | +Posts | +Admin note | +Actions | +||||
'.htmlspecialchars($user_data['username']).'' ?> | ++ | + | + | + | + | + | + | |||
+ | + | Guest | ++ | + | + | + | + | The supplied IP address could not be found in the database. | '."\n"; + +?> + +
Username | +Title | +Registered | +Last post | +Posts | +Admin note | +Actions | +|
'.htmlspecialchars($user_data['username']).'' ?> | ++ | + | + | + | + | + | + | No match. | '."\n"; + +?> +
NOTE: If you are upgrading from 1.0 RC 2, skip to section 3.
+ +MySQL: Version 3.23 or later is recommended. PunBB will probably +work with older versions though.
+ +PostgreSQL: PunBB 1.0 has only been tested on version 7.3.3 of +PostgreSQL. It should work fine with any version greater than 7.0 +though. If the installer complains about not being able to create +an index, open up install.php and search for "PostgreSQL <7.3 +note".
+ +Copy/upload all files and directories and run install.php from +the forum root directory. Follow the instructions. If you get an +error when trying to upload avatar images, make sure that PHP has +write access to the directory where you store avatars (default is +img/avatars). Please report any problems you might encounter during +installation in the forums at http://forums.punbb.org/.
+ +Follow these instructions to update your current 1.0 RC 2 +installation to 1.0 final. It is recommended that the forum be put +into maintenance mode (Admin/Options) during the update +procedure.
+ +NOTE: Make a backup before proceeding! Use the tool mysqldump +for MySQL and pg_dump for PostgreSQL. Also backup any CSS and +template files that you have made changes to.
+ +You should now be running PunBB 1.0.
+ +Here are some recommendations for maximizing the performance of +PunBB. The recommendations are not directly related to PunBB +performance. They are very general and results may vary.
+ +Thank you for using PunBB.
+
+Rickard Andersson
+punbb@telia.com
+http://www.punbb.org/
+
+
|
+
+ | |||
+ |
+
+
+ + + |
+ ||
+ |
+
+
+ + [b][/b] + [u][/u] + [i][/i] + [color=#FF0000][/color] + |
+ ||
+ |
+
+
+ + [url=][/url] + [url][/url] + [email]myname@mydomain.com[/email] myname@mydomain.com + [email=myname@mydomain.com][/email] + + [img][/img] + |
+ ||
+ |
+
+
+ + [quote][/quote] + + + + [code][/code] + +
+ |
+ ||
+ |
+
+
+ + [b][u][/u][/b] + |
+ ||
+ |
+
+
+ + :) =) + :( =( + :D =D + ;) + :x + :rolleyes: + |
+
+ |
+ + . + |
+
An error was encountered | +
+File: '.$file.' '."\n\t\t\t".'Line: '.$line.' '."\n\t\t\t".'PunBB reported: '.$message."\n"; + + if ($db_error) + print "\t\t\t".' Database reported: '.htmlspecialchars($db_error['error']).' (Errno: '.$db_error['errno'].')'."\n"; + } + else + print "\t\t\t".'Error: '.$message.'.'."\n"; + +?> + |
+
'; + print_r($var1); + + if ($var2 != null) + { + print "\n\n"; + print_r($var2); + } + + print ''; + exit; +} diff --git a/include/commonadmin.php b/include/commonadmin.php new file mode 100644 index 0000000..60b23b5 --- /dev/null +++ b/include/commonadmin.php @@ -0,0 +1,119 @@ + +
Categories | +Forums | +Users | +Options | +Permissions | +Censoring | +Ranks | +Bans | +Prune | +Maintenance | +Reports | +
Users | +Censoring | +Bans | +Reports | +
', $message); + $message = str_replace('[/quote]', ' |
code:'.trim($inside[$i]).' |
+ {pun_title} + {pun_desc} + |
+
+ {pun_navlinks} + {pun_status} + |
+
{pun_maint_heading} | +
{pun_maint_message} | +
{pun_redir_heading} | +
+ {pun_redir_text} + | +
+ | + | + | + | + | + | |
+ | ||||||
+ | + + | ++ | + | + | + |
+
|
+
Instructions | +
Welcome to PunBB installation! You are about to install PunBB . Please make sure that the database that PunBB will be installed into is already created. If you are uncertain about what to enter in the fields below consult your server administrator. | +
Final instructions | +
To finalize the installation all you need to do is to copy and paste the text in the text box below into a file called config.php and then upload this file to the root directory of your PunBB installation. You can later edit config.php if you reconfigure your setup (i.e. install a new language pack or change the database password). | +
config.php | +|
File contents | ++ |
Info | +
+ Once you have created config.php with the contents above, PunBB is installed! + Go to forum index. + + |
+
+ |
+ |
+ | ||||||
+ | + |
+ |
+ |
+ |
KB). | +
+
|
+ |||
+ | + | ||
+ | + | ||
+ | + | ||
+ | + | ||
+ | + | ||
+ | + | ||
+ | + | ||
+ | + | ||
+ | + | ||
+ | + | ||
+ |
+
|
+ ||
+ | + | ||
+ | + | ||
+ | + |
'.$parsed_signature.' | '."\n\t\t\t\t\t".'
+ |
+ + + |
+
+ | + | + | + | + | + | |
+ |
+ : + : +
|
+ + | + | + | '.format_time($search_set[$i]['last_post']).' '.$lang_common['by'].' '.htmlspecialchars($search_set[$i]['last_poster']) ?> | +|
+ | + | + | + | + | '.format_time( $search_set[$i]['last_post']).' '.$lang_common['by'].' '.htmlspecialchars($search_set[$i]['last_poster']) ?> | +
+ |