No changes between revisions
/Forum/admin/admin_board.php
0,0 → 1,356
<?php
/***************************************************************************
* admin_board.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_board.php,v 1.51.2.15 2006/02/10 22:19:01 grahamje Exp $
*
*
***************************************************************************/
 
define('IN_PHPBB', 1);
 
if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['General']['Configuration'] = $file;
return;
}
 
//
// Let's set the root dir for phpBB
//
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
 
//
// Pull all config data
//
$sql = "SELECT *
FROM " . CONFIG_TABLE;
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not query config information in admin_board", "", __LINE__, __FILE__, $sql);
}
else
{
while( $row = $db->sql_fetchrow($result) )
{
$config_name = $row['config_name'];
$config_value = $row['config_value'];
$default_config[$config_name] = isset($HTTP_POST_VARS['submit']) ? str_replace("'", "\'", $config_value) : $config_value;
$new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name];
 
if ($config_name == 'cookie_name')
{
$new['cookie_name'] = str_replace('.', '_', $new['cookie_name']);
}
 
// Attempt to prevent a common mistake with this value,
// http:// is the protocol and not part of the server name
if ($config_name == 'server_name')
{
$new['server_name'] = str_replace('http://', '', $new['server_name']);
}
 
if( isset($HTTP_POST_VARS['submit']) )
{
$sql = "UPDATE " . CONFIG_TABLE . " SET
config_value = '" . str_replace("\'", "''", $new[$config_name]) . "'
WHERE config_name = '$config_name'";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql);
}
}
}
 
if( isset($HTTP_POST_VARS['submit']) )
{
$message = $lang['Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_config'], "<a href=\"" . append_sid("admin_board.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
}
}
 
$style_select = style_select($new['default_style'], 'default_style', "../templates");
$lang_select = language_select($new['default_lang'], 'default_lang', "language");
$timezone_select = tz_select($new['board_timezone'], 'board_timezone');
 
$disable_board_yes = ( $new['board_disable'] ) ? "checked=\"checked\"" : "";
$disable_board_no = ( !$new['board_disable'] ) ? "checked=\"checked\"" : "";
 
$cookie_secure_yes = ( $new['cookie_secure'] ) ? "checked=\"checked\"" : "";
$cookie_secure_no = ( !$new['cookie_secure'] ) ? "checked=\"checked\"" : "";
 
$html_tags = $new['allow_html_tags'];
 
$override_user_style_yes = ( $new['override_user_style'] ) ? "checked=\"checked\"" : "";
$override_user_style_no = ( !$new['override_user_style'] ) ? "checked=\"checked\"" : "";
 
$html_yes = ( $new['allow_html'] ) ? "checked=\"checked\"" : "";
$html_no = ( !$new['allow_html'] ) ? "checked=\"checked\"" : "";
 
$bbcode_yes = ( $new['allow_bbcode'] ) ? "checked=\"checked\"" : "";
$bbcode_no = ( !$new['allow_bbcode'] ) ? "checked=\"checked\"" : "";
 
$activation_none = ( $new['require_activation'] == USER_ACTIVATION_NONE ) ? "checked=\"checked\"" : "";
$activation_user = ( $new['require_activation'] == USER_ACTIVATION_SELF ) ? "checked=\"checked\"" : "";
$activation_admin = ( $new['require_activation'] == USER_ACTIVATION_ADMIN ) ? "checked=\"checked\"" : "";
 
$confirm_yes = ($new['enable_confirm']) ? 'checked="checked"' : '';
$confirm_no = (!$new['enable_confirm']) ? 'checked="checked"' : '';
 
$allow_autologin_yes = ($new['allow_autologin']) ? 'checked="checked"' : '';
$allow_autologin_no = (!$new['allow_autologin']) ? 'checked="checked"' : '';
 
$board_email_form_yes = ( $new['board_email_form'] ) ? "checked=\"checked\"" : "";
$board_email_form_no = ( !$new['board_email_form'] ) ? "checked=\"checked\"" : "";
 
$gzip_yes = ( $new['gzip_compress'] ) ? "checked=\"checked\"" : "";
$gzip_no = ( !$new['gzip_compress'] ) ? "checked=\"checked\"" : "";
 
$privmsg_on = ( !$new['privmsg_disable'] ) ? "checked=\"checked\"" : "";
$privmsg_off = ( $new['privmsg_disable'] ) ? "checked=\"checked\"" : "";
 
$prune_yes = ( $new['prune_enable'] ) ? "checked=\"checked\"" : "";
$prune_no = ( !$new['prune_enable'] ) ? "checked=\"checked\"" : "";
 
$smile_yes = ( $new['allow_smilies'] ) ? "checked=\"checked\"" : "";
$smile_no = ( !$new['allow_smilies'] ) ? "checked=\"checked\"" : "";
 
$sig_yes = ( $new['allow_sig'] ) ? "checked=\"checked\"" : "";
$sig_no = ( !$new['allow_sig'] ) ? "checked=\"checked\"" : "";
 
$namechange_yes = ( $new['allow_namechange'] ) ? "checked=\"checked\"" : "";
$namechange_no = ( !$new['allow_namechange'] ) ? "checked=\"checked\"" : "";
 
$avatars_local_yes = ( $new['allow_avatar_local'] ) ? "checked=\"checked\"" : "";
$avatars_local_no = ( !$new['allow_avatar_local'] ) ? "checked=\"checked\"" : "";
$avatars_remote_yes = ( $new['allow_avatar_remote'] ) ? "checked=\"checked\"" : "";
$avatars_remote_no = ( !$new['allow_avatar_remote'] ) ? "checked=\"checked\"" : "";
$avatars_upload_yes = ( $new['allow_avatar_upload'] ) ? "checked=\"checked\"" : "";
$avatars_upload_no = ( !$new['allow_avatar_upload'] ) ? "checked=\"checked\"" : "";
 
$smtp_yes = ( $new['smtp_delivery'] ) ? "checked=\"checked\"" : "";
$smtp_no = ( !$new['smtp_delivery'] ) ? "checked=\"checked\"" : "";
 
$template->set_filenames(array(
"body" => "admin/board_config_body.tpl")
);
 
//
// Escape any quotes in the site description for proper display in the text
// box on the admin page
//
$new['site_desc'] = str_replace('"', '&quot;', $new['site_desc']);
$new['sitename'] = str_replace('"', '&quot;', strip_tags($new['sitename']));
$template->assign_vars(array(
"S_CONFIG_ACTION" => append_sid("admin_board.$phpEx"),
 
"L_YES" => $lang['Yes'],
"L_NO" => $lang['No'],
"L_CONFIGURATION_TITLE" => $lang['General_Config'],
"L_CONFIGURATION_EXPLAIN" => $lang['Config_explain'],
"L_GENERAL_SETTINGS" => $lang['General_settings'],
"L_SERVER_NAME" => $lang['Server_name'],
"L_SERVER_NAME_EXPLAIN" => $lang['Server_name_explain'],
"L_SERVER_PORT" => $lang['Server_port'],
"L_SERVER_PORT_EXPLAIN" => $lang['Server_port_explain'],
"L_SCRIPT_PATH" => $lang['Script_path'],
"L_SCRIPT_PATH_EXPLAIN" => $lang['Script_path_explain'],
"L_SITE_NAME" => $lang['Site_name'],
"L_SITE_DESCRIPTION" => $lang['Site_desc'],
"L_DISABLE_BOARD" => $lang['Board_disable'],
"L_DISABLE_BOARD_EXPLAIN" => $lang['Board_disable_explain'],
"L_ACCT_ACTIVATION" => $lang['Acct_activation'],
"L_NONE" => $lang['Acc_None'],
"L_USER" => $lang['Acc_User'],
"L_ADMIN" => $lang['Acc_Admin'],
"L_VISUAL_CONFIRM" => $lang['Visual_confirm'],
"L_VISUAL_CONFIRM_EXPLAIN" => $lang['Visual_confirm_explain'],
"L_ALLOW_AUTOLOGIN" => $lang['Allow_autologin'],
"L_ALLOW_AUTOLOGIN_EXPLAIN" => $lang['Allow_autologin_explain'],
"L_AUTOLOGIN_TIME" => $lang['Autologin_time'],
"L_AUTOLOGIN_TIME_EXPLAIN" => $lang['Autologin_time_explain'],
"L_COOKIE_SETTINGS" => $lang['Cookie_settings'],
"L_COOKIE_SETTINGS_EXPLAIN" => $lang['Cookie_settings_explain'],
"L_COOKIE_DOMAIN" => $lang['Cookie_domain'],
"L_COOKIE_NAME" => $lang['Cookie_name'],
"L_COOKIE_PATH" => $lang['Cookie_path'],
"L_COOKIE_SECURE" => $lang['Cookie_secure'],
"L_COOKIE_SECURE_EXPLAIN" => $lang['Cookie_secure_explain'],
"L_SESSION_LENGTH" => $lang['Session_length'],
"L_PRIVATE_MESSAGING" => $lang['Private_Messaging'],
"L_INBOX_LIMIT" => $lang['Inbox_limits'],
"L_SENTBOX_LIMIT" => $lang['Sentbox_limits'],
"L_SAVEBOX_LIMIT" => $lang['Savebox_limits'],
"L_DISABLE_PRIVATE_MESSAGING" => $lang['Disable_privmsg'],
"L_ENABLED" => $lang['Enabled'],
"L_DISABLED" => $lang['Disabled'],
"L_ABILITIES_SETTINGS" => $lang['Abilities_settings'],
"L_MAX_POLL_OPTIONS" => $lang['Max_poll_options'],
"L_FLOOD_INTERVAL" => $lang['Flood_Interval'],
"L_FLOOD_INTERVAL_EXPLAIN" => $lang['Flood_Interval_explain'],
"L_SEARCH_FLOOD_INTERVAL" => $lang['Search_Flood_Interval'],
"L_SEARCH_FLOOD_INTERVAL_EXPLAIN" => $lang['Search_Flood_Interval_explain'],
 
'L_MAX_LOGIN_ATTEMPTS' => $lang['Max_login_attempts'],
'L_MAX_LOGIN_ATTEMPTS_EXPLAIN' => $lang['Max_login_attempts_explain'],
'L_LOGIN_RESET_TIME' => $lang['Login_reset_time'],
'L_LOGIN_RESET_TIME_EXPLAIN' => $lang['Login_reset_time_explain'],
'MAX_LOGIN_ATTEMPTS' => $new['max_login_attempts'],
'LOGIN_RESET_TIME' => $new['login_reset_time'],
 
"L_BOARD_EMAIL_FORM" => $lang['Board_email_form'],
"L_BOARD_EMAIL_FORM_EXPLAIN" => $lang['Board_email_form_explain'],
"L_TOPICS_PER_PAGE" => $lang['Topics_per_page'],
"L_POSTS_PER_PAGE" => $lang['Posts_per_page'],
"L_HOT_THRESHOLD" => $lang['Hot_threshold'],
"L_DEFAULT_STYLE" => $lang['Default_style'],
"L_OVERRIDE_STYLE" => $lang['Override_style'],
"L_OVERRIDE_STYLE_EXPLAIN" => $lang['Override_style_explain'],
"L_DEFAULT_LANGUAGE" => $lang['Default_language'],
"L_DATE_FORMAT" => $lang['Date_format'],
"L_SYSTEM_TIMEZONE" => $lang['System_timezone'],
"L_ENABLE_GZIP" => $lang['Enable_gzip'],
"L_ENABLE_PRUNE" => $lang['Enable_prune'],
"L_ALLOW_HTML" => $lang['Allow_HTML'],
"L_ALLOW_BBCODE" => $lang['Allow_BBCode'],
"L_ALLOWED_TAGS" => $lang['Allowed_tags'],
"L_ALLOWED_TAGS_EXPLAIN" => $lang['Allowed_tags_explain'],
"L_ALLOW_SMILIES" => $lang['Allow_smilies'],
"L_SMILIES_PATH" => $lang['Smilies_path'],
"L_SMILIES_PATH_EXPLAIN" => $lang['Smilies_path_explain'],
"L_ALLOW_SIG" => $lang['Allow_sig'],
"L_MAX_SIG_LENGTH" => $lang['Max_sig_length'],
"L_MAX_SIG_LENGTH_EXPLAIN" => $lang['Max_sig_length_explain'],
"L_ALLOW_NAME_CHANGE" => $lang['Allow_name_change'],
"L_AVATAR_SETTINGS" => $lang['Avatar_settings'],
"L_ALLOW_LOCAL" => $lang['Allow_local'],
"L_ALLOW_REMOTE" => $lang['Allow_remote'],
"L_ALLOW_REMOTE_EXPLAIN" => $lang['Allow_remote_explain'],
"L_ALLOW_UPLOAD" => $lang['Allow_upload'],
"L_MAX_FILESIZE" => $lang['Max_filesize'],
"L_MAX_FILESIZE_EXPLAIN" => $lang['Max_filesize_explain'],
"L_MAX_AVATAR_SIZE" => $lang['Max_avatar_size'],
"L_MAX_AVATAR_SIZE_EXPLAIN" => $lang['Max_avatar_size_explain'],
"L_AVATAR_STORAGE_PATH" => $lang['Avatar_storage_path'],
"L_AVATAR_STORAGE_PATH_EXPLAIN" => $lang['Avatar_storage_path_explain'],
"L_AVATAR_GALLERY_PATH" => $lang['Avatar_gallery_path'],
"L_AVATAR_GALLERY_PATH_EXPLAIN" => $lang['Avatar_gallery_path_explain'],
"L_COPPA_SETTINGS" => $lang['COPPA_settings'],
"L_COPPA_FAX" => $lang['COPPA_fax'],
"L_COPPA_MAIL" => $lang['COPPA_mail'],
"L_COPPA_MAIL_EXPLAIN" => $lang['COPPA_mail_explain'],
"L_EMAIL_SETTINGS" => $lang['Email_settings'],
"L_ADMIN_EMAIL" => $lang['Admin_email'],
"L_EMAIL_SIG" => $lang['Email_sig'],
"L_EMAIL_SIG_EXPLAIN" => $lang['Email_sig_explain'],
"L_USE_SMTP" => $lang['Use_SMTP'],
"L_USE_SMTP_EXPLAIN" => $lang['Use_SMTP_explain'],
"L_SMTP_SERVER" => $lang['SMTP_server'],
"L_SMTP_USERNAME" => $lang['SMTP_username'],
"L_SMTP_USERNAME_EXPLAIN" => $lang['SMTP_username_explain'],
"L_SMTP_PASSWORD" => $lang['SMTP_password'],
"L_SMTP_PASSWORD_EXPLAIN" => $lang['SMTP_password_explain'],
"L_SUBMIT" => $lang['Submit'],
"L_RESET" => $lang['Reset'],
"SERVER_NAME" => $new['server_name'],
"SCRIPT_PATH" => $new['script_path'],
"SERVER_PORT" => $new['server_port'],
"SITENAME" => $new['sitename'],
"SITE_DESCRIPTION" => $new['site_desc'],
"S_DISABLE_BOARD_YES" => $disable_board_yes,
"S_DISABLE_BOARD_NO" => $disable_board_no,
"ACTIVATION_NONE" => USER_ACTIVATION_NONE,
"ACTIVATION_NONE_CHECKED" => $activation_none,
"ACTIVATION_USER" => USER_ACTIVATION_SELF,
"ACTIVATION_USER_CHECKED" => $activation_user,
"ACTIVATION_ADMIN" => USER_ACTIVATION_ADMIN,
"ACTIVATION_ADMIN_CHECKED" => $activation_admin,
"CONFIRM_ENABLE" => $confirm_yes,
"CONFIRM_DISABLE" => $confirm_no,
'ALLOW_AUTOLOGIN_YES' => $allow_autologin_yes,
'ALLOW_AUTOLOGIN_NO' => $allow_autologin_no,
'AUTOLOGIN_TIME' => (int) $new['max_autologin_time'],
"BOARD_EMAIL_FORM_ENABLE" => $board_email_form_yes,
"BOARD_EMAIL_FORM_DISABLE" => $board_email_form_no,
"MAX_POLL_OPTIONS" => $new['max_poll_options'],
"FLOOD_INTERVAL" => $new['flood_interval'],
"SEARCH_FLOOD_INTERVAL" => $new['search_flood_interval'],
"TOPICS_PER_PAGE" => $new['topics_per_page'],
"POSTS_PER_PAGE" => $new['posts_per_page'],
"HOT_TOPIC" => $new['hot_threshold'],
"STYLE_SELECT" => $style_select,
"OVERRIDE_STYLE_YES" => $override_user_style_yes,
"OVERRIDE_STYLE_NO" => $override_user_style_no,
"LANG_SELECT" => $lang_select,
"L_DATE_FORMAT_EXPLAIN" => $lang['Date_format_explain'],
"DEFAULT_DATEFORMAT" => $new['default_dateformat'],
"TIMEZONE_SELECT" => $timezone_select,
"S_PRIVMSG_ENABLED" => $privmsg_on,
"S_PRIVMSG_DISABLED" => $privmsg_off,
"INBOX_LIMIT" => $new['max_inbox_privmsgs'],
"SENTBOX_LIMIT" => $new['max_sentbox_privmsgs'],
"SAVEBOX_LIMIT" => $new['max_savebox_privmsgs'],
"COOKIE_DOMAIN" => $new['cookie_domain'],
"COOKIE_NAME" => $new['cookie_name'],
"COOKIE_PATH" => $new['cookie_path'],
"SESSION_LENGTH" => $new['session_length'],
"S_COOKIE_SECURE_ENABLED" => $cookie_secure_yes,
"S_COOKIE_SECURE_DISABLED" => $cookie_secure_no,
"GZIP_YES" => $gzip_yes,
"GZIP_NO" => $gzip_no,
"PRUNE_YES" => $prune_yes,
"PRUNE_NO" => $prune_no,
"HTML_TAGS" => $html_tags,
"HTML_YES" => $html_yes,
"HTML_NO" => $html_no,
"BBCODE_YES" => $bbcode_yes,
"BBCODE_NO" => $bbcode_no,
"SMILE_YES" => $smile_yes,
"SMILE_NO" => $smile_no,
"SIG_YES" => $sig_yes,
"SIG_NO" => $sig_no,
"SIG_SIZE" => $new['max_sig_chars'],
"NAMECHANGE_YES" => $namechange_yes,
"NAMECHANGE_NO" => $namechange_no,
"AVATARS_LOCAL_YES" => $avatars_local_yes,
"AVATARS_LOCAL_NO" => $avatars_local_no,
"AVATARS_REMOTE_YES" => $avatars_remote_yes,
"AVATARS_REMOTE_NO" => $avatars_remote_no,
"AVATARS_UPLOAD_YES" => $avatars_upload_yes,
"AVATARS_UPLOAD_NO" => $avatars_upload_no,
"AVATAR_FILESIZE" => $new['avatar_filesize'],
"AVATAR_MAX_HEIGHT" => $new['avatar_max_height'],
"AVATAR_MAX_WIDTH" => $new['avatar_max_width'],
"AVATAR_PATH" => $new['avatar_path'],
"AVATAR_GALLERY_PATH" => $new['avatar_gallery_path'],
"SMILIES_PATH" => $new['smilies_path'],
"INBOX_PRIVMSGS" => $new['max_inbox_privmsgs'],
"SENTBOX_PRIVMSGS" => $new['max_sentbox_privmsgs'],
"SAVEBOX_PRIVMSGS" => $new['max_savebox_privmsgs'],
"EMAIL_FROM" => $new['board_email'],
"EMAIL_SIG" => $new['board_email_sig'],
"SMTP_YES" => $smtp_yes,
"SMTP_NO" => $smtp_no,
"SMTP_HOST" => $new['smtp_host'],
"SMTP_USERNAME" => $new['smtp_username'],
"SMTP_PASSWORD" => $new['smtp_password'],
"COPPA_MAIL" => $new['coppa_mail'],
"COPPA_FAX" => $new['coppa_fax'])
);
 
$template->pparse("body");
 
include('./page_footer_admin.'.$phpEx);
 
?>
/Forum/admin/admin_db_utilities.php
0,0 → 1,1008
<?php
/***************************************************************************
* admin_db_utilities.php
* -------------------
* begin : Thu May 31, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_db_utilities.php,v 1.42.2.14 2006/02/10 20:35:40 grahamje Exp $
*
****************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
/***************************************************************************
* We will attempt to create a file based backup of all of the data in the
* users phpBB database. The resulting file should be able to be imported by
* the db_restore.php function, or by using the mysql command_line
*
* Some functions are adapted from the upgrade_20.php script and others
* adapted from the unoficial phpMyAdmin 2.2.0.
***************************************************************************/
 
define('IN_PHPBB', 1);
 
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['General']['Backup_DB'] = $filename . "?perform=backup";
 
$file_uploads = (@phpversion() >= '4.0.0') ? @ini_get('file_uploads') : @get_cfg_var('file_uploads');
 
if( (empty($file_uploads) || $file_uploads != 0) && (strtolower($file_uploads) != 'off') && (@phpversion() != '4.0.4pl1') )
{
$module['General']['Restore_DB'] = $filename . "?perform=restore";
}
 
return;
}
 
//
// Load default header
//
$no_page_header = TRUE;
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/sql_parse.'.$phpEx);
 
//
// Set VERBOSE to 1 for debugging info..
//
define("VERBOSE", 0);
 
//
// Increase maximum execution time, but don't complain about it if it isn't
// allowed.
//
@set_time_limit(1200);
 
// -----------------------
// The following functions are adapted from phpMyAdmin and upgrade_20.php
//
function gzip_PrintFourChars($Val)
{
for ($i = 0; $i < 4; $i ++)
{
$return .= chr($Val % 256);
$Val = floor($Val / 256);
}
return $return;
}
 
 
 
//
// This function is used for grabbing the sequences for postgres...
//
function pg_get_sequences($crlf, $backup_type)
{
global $db;
 
$get_seq_sql = "SELECT relname FROM pg_class WHERE NOT relname ~ 'pg_.*'
AND relkind = 'S' ORDER BY relname";
 
$seq = $db->sql_query($get_seq_sql);
 
if( !$num_seq = $db->sql_numrows($seq) )
{
 
$return_val = "# No Sequences Found $crlf";
 
}
else
{
$return_val = "# Sequences $crlf";
$i_seq = 0;
 
while($i_seq < $num_seq)
{
$row = $db->sql_fetchrow($seq);
$sequence = $row['relname'];
 
$get_props_sql = "SELECT * FROM $sequence";
$seq_props = $db->sql_query($get_props_sql);
 
if($db->sql_numrows($seq_props) > 0)
{
$row1 = $db->sql_fetchrow($seq_props);
 
if($backup_type == 'structure')
{
$row['last_value'] = 1;
}
 
$return_val .= "CREATE SEQUENCE $sequence start " . $row['last_value'] . ' increment ' . $row['increment_by'] . ' maxvalue ' . $row['max_value'] . ' minvalue ' . $row['min_value'] . ' cache ' . $row['cache_value'] . "; $crlf";
 
} // End if numrows > 0
 
if(($row['last_value'] > 1) && ($backup_type != 'structure'))
{
$return_val .= "SELECT NEXTVALE('$sequence'); $crlf";
unset($row['last_value']);
}
 
$i_seq++;
 
} // End while..
 
} // End else...
 
return $returnval;
 
} // End function...
 
//
// The following functions will return the "CREATE TABLE syntax for the
// varying DBMS's
//
// This function returns, will return the table def's for postgres...
//
function get_table_def_postgresql($table, $crlf)
{
global $drop, $db;
 
$schema_create = "";
//
// Get a listing of the fields, with their associated types, etc.
//
 
$field_query = "SELECT a.attnum, a.attname AS field, t.typname as type, a.attlen AS length, a.atttypmod as lengthvar, a.attnotnull as notnull
FROM pg_class c, pg_attribute a, pg_type t
WHERE c.relname = '$table'
AND a.attnum > 0
AND a.attrelid = c.oid
AND a.atttypid = t.oid
ORDER BY a.attnum";
$result = $db->sql_query($field_query);
 
if(!$result)
{
message_die(GENERAL_ERROR, "Failed in get_table_def (show fields)", "", __LINE__, __FILE__, $field_query);
} // end if..
 
if ($drop == 1)
{
$schema_create .= "DROP TABLE $table;$crlf";
} // end if
 
//
// Ok now we actually start building the SQL statements to restore the tables
//
 
$schema_create .= "CREATE TABLE $table($crlf";
 
while ($row = $db->sql_fetchrow($result))
{
//
// Get the data from the table
//
$sql_get_default = "SELECT d.adsrc AS rowdefault
FROM pg_attrdef d, pg_class c
WHERE (c.relname = '$table')
AND (c.oid = d.adrelid)
AND d.adnum = " . $row['attnum'];
$def_res = $db->sql_query($sql_get_default);
 
if (!$def_res)
{
unset($row['rowdefault']);
}
else
{
$row['rowdefault'] = @pg_result($def_res, 0, 'rowdefault');
}
 
if ($row['type'] == 'bpchar')
{
// Internally stored as bpchar, but isn't accepted in a CREATE TABLE statement.
$row['type'] = 'char';
}
 
$schema_create .= ' ' . $row['field'] . ' ' . $row['type'];
 
if (eregi('char', $row['type']))
{
if ($row['lengthvar'] > 0)
{
$schema_create .= '(' . ($row['lengthvar'] -4) . ')';
}
}
 
if (eregi('numeric', $row['type']))
{
$schema_create .= '(';
$schema_create .= sprintf("%s,%s", (($row['lengthvar'] >> 16) & 0xffff), (($row['lengthvar'] - 4) & 0xffff));
$schema_create .= ')';
}
 
if (!empty($row['rowdefault']))
{
$schema_create .= ' DEFAULT ' . $row['rowdefault'];
}
 
if ($row['notnull'] == 't')
{
$schema_create .= ' NOT NULL';
}
 
$schema_create .= ",$crlf";
 
}
//
// Get the listing of primary keys.
//
 
$sql_pri_keys = "SELECT ic.relname AS index_name, bc.relname AS tab_name, ta.attname AS column_name, i.indisunique AS unique_key, i.indisprimary AS primary_key
FROM pg_class bc, pg_class ic, pg_index i, pg_attribute ta, pg_attribute ia
WHERE (bc.oid = i.indrelid)
AND (ic.oid = i.indexrelid)
AND (ia.attrelid = i.indexrelid)
AND (ta.attrelid = bc.oid)
AND (bc.relname = '$table')
AND (ta.attrelid = i.indrelid)
AND (ta.attnum = i.indkey[ia.attnum-1])
ORDER BY index_name, tab_name, column_name ";
$result = $db->sql_query($sql_pri_keys);
 
if(!$result)
{
message_die(GENERAL_ERROR, "Failed in get_table_def (show fields)", "", __LINE__, __FILE__, $sql_pri_keys);
}
 
while ( $row = $db->sql_fetchrow($result))
{
if ($row['primary_key'] == 't')
{
if (!empty($primary_key))
{
$primary_key .= ', ';
}
 
$primary_key .= $row['column_name'];
$primary_key_name = $row['index_name'];
 
}
else
{
//
// We have to store this all this info because it is possible to have a multi-column key...
// we can loop through it again and build the statement
//
$index_rows[$row['index_name']]['table'] = $table;
$index_rows[$row['index_name']]['unique'] = ($row['unique_key'] == 't') ? ' UNIQUE ' : '';
$index_rows[$row['index_name']]['column_names'] .= $row['column_name'] . ', ';
}
}
 
if (!empty($index_rows))
{
while(list($idx_name, $props) = each($index_rows))
{
$props['column_names'] = ereg_replace(", $", "" , $props['column_names']);
$index_create .= 'CREATE ' . $props['unique'] . " INDEX $idx_name ON $table (" . $props['column_names'] . ");$crlf";
}
}
 
if (!empty($primary_key))
{
$schema_create .= " CONSTRAINT $primary_key_name PRIMARY KEY ($primary_key),$crlf";
}
 
//
// Generate constraint clauses for CHECK constraints
//
$sql_checks = "SELECT rcname as index_name, rcsrc
FROM pg_relcheck, pg_class bc
WHERE rcrelid = bc.oid
AND bc.relname = '$table'
AND NOT EXISTS (
SELECT *
FROM pg_relcheck as c, pg_inherits as i
WHERE i.inhrelid = pg_relcheck.rcrelid
AND c.rcname = pg_relcheck.rcname
AND c.rcsrc = pg_relcheck.rcsrc
AND c.rcrelid = i.inhparent
)";
$result = $db->sql_query($sql_checks);
 
if (!$result)
{
message_die(GENERAL_ERROR, "Failed in get_table_def (show fields)", "", __LINE__, __FILE__, $sql_checks);
}
 
//
// Add the constraints to the sql file.
//
while ($row = $db->sql_fetchrow($result))
{
$schema_create .= ' CONSTRAINT ' . $row['index_name'] . ' CHECK ' . $row['rcsrc'] . ",$crlf";
}
 
$schema_create = ereg_replace(',' . $crlf . '$', '', $schema_create);
$index_create = ereg_replace(',' . $crlf . '$', '', $index_create);
 
$schema_create .= "$crlf);$crlf";
 
if (!empty($index_create))
{
$schema_create .= $index_create;
}
 
//
// Ok now we've built all the sql return it to the calling function.
//
return (stripslashes($schema_create));
 
}
 
//
// This function returns the "CREATE TABLE" syntax for mysql dbms...
//
function get_table_def_mysql($table, $crlf)
{
global $drop, $db;
 
$schema_create = "";
$field_query = "SHOW FIELDS FROM $table";
$key_query = "SHOW KEYS FROM $table";
 
//
// If the user has selected to drop existing tables when doing a restore.
// Then we add the statement to drop the tables....
//
if ($drop == 1)
{
$schema_create .= "DROP TABLE IF EXISTS $table;$crlf";
}
 
$schema_create .= "CREATE TABLE $table($crlf";
 
//
// Ok lets grab the fields...
//
$result = $db->sql_query($field_query);
if(!$result)
{
message_die(GENERAL_ERROR, "Failed in get_table_def (show fields)", "", __LINE__, __FILE__, $field_query);
}
 
while ($row = $db->sql_fetchrow($result))
{
$schema_create .= ' ' . $row['Field'] . ' ' . $row['Type'];
 
if(!empty($row['Default']))
{
$schema_create .= ' DEFAULT \'' . $row['Default'] . '\'';
}
 
if($row['Null'] != "YES")
{
$schema_create .= ' NOT NULL';
}
 
if($row['Extra'] != "")
{
$schema_create .= ' ' . $row['Extra'];
}
 
$schema_create .= ",$crlf";
}
//
// Drop the last ',$crlf' off ;)
//
$schema_create = ereg_replace(',' . $crlf . '$', "", $schema_create);
 
//
// Get any Indexed fields from the database...
//
$result = $db->sql_query($key_query);
if(!$result)
{
message_die(GENERAL_ERROR, "FAILED IN get_table_def (show keys)", "", __LINE__, __FILE__, $key_query);
}
 
while($row = $db->sql_fetchrow($result))
{
$kname = $row['Key_name'];
 
if(($kname != 'PRIMARY') && ($row['Non_unique'] == 0))
{
$kname = "UNIQUE|$kname";
}
 
if(!is_array($index[$kname]))
{
$index[$kname] = array();
}
 
$index[$kname][] = $row['Column_name'];
}
 
while(list($x, $columns) = @each($index))
{
$schema_create .= ", $crlf";
 
if($x == 'PRIMARY')
{
$schema_create .= ' PRIMARY KEY (' . implode($columns, ', ') . ')';
}
elseif (substr($x,0,6) == 'UNIQUE')
{
$schema_create .= ' UNIQUE ' . substr($x,7) . ' (' . implode($columns, ', ') . ')';
}
else
{
$schema_create .= " KEY $x (" . implode($columns, ', ') . ')';
}
}
 
$schema_create .= "$crlf);";
 
if(get_magic_quotes_runtime())
{
return(stripslashes($schema_create));
}
else
{
return($schema_create);
}
 
} // End get_table_def_mysql
 
 
//
// This fuction will return a tables create definition to be used as an sql
// statement.
//
//
// The following functions Get the data from the tables and format it as a
// series of INSERT statements, for each different DBMS...
// After every row a custom callback function $handler gets called.
// $handler must accept one parameter ($sql_insert);
//
//
// Here is the function for postgres...
//
function get_table_content_postgresql($table, $handler)
{
global $db;
 
//
// Grab all of the data from current table.
//
 
$result = $db->sql_query("SELECT * FROM $table");
 
if (!$result)
{
message_die(GENERAL_ERROR, "Failed in get_table_content (select *)", "", __LINE__, __FILE__, "SELECT * FROM $table");
}
 
$i_num_fields = $db->sql_numfields($result);
 
for ($i = 0; $i < $i_num_fields; $i++)
{
$aryType[] = $db->sql_fieldtype($i, $result);
$aryName[] = $db->sql_fieldname($i, $result);
}
 
$iRec = 0;
 
while($row = $db->sql_fetchrow($result))
{
$schema_vals = '';
$schema_fields = '';
$schema_insert = '';
//
// Build the SQL statement to recreate the data.
//
for($i = 0; $i < $i_num_fields; $i++)
{
$strVal = $row[$aryName[$i]];
if (eregi("char|text|bool", $aryType[$i]))
{
$strQuote = "'";
$strEmpty = "";
$strVal = addslashes($strVal);
}
elseif (eregi("date|timestamp", $aryType[$i]))
{
if (empty($strVal))
{
$strQuote = "";
}
else
{
$strQuote = "'";
}
}
else
{
$strQuote = "";
$strEmpty = "NULL";
}
 
if (empty($strVal) && $strVal != "0")
{
$strVal = $strEmpty;
}
 
$schema_vals .= " $strQuote$strVal$strQuote,";
$schema_fields .= " $aryName[$i],";
 
}
 
$schema_vals = ereg_replace(",$", "", $schema_vals);
$schema_vals = ereg_replace("^ ", "", $schema_vals);
$schema_fields = ereg_replace(",$", "", $schema_fields);
$schema_fields = ereg_replace("^ ", "", $schema_fields);
 
//
// Take the ordered fields and their associated data and build it
// into a valid sql statement to recreate that field in the data.
//
$schema_insert = "INSERT INTO $table ($schema_fields) VALUES($schema_vals);";
 
$handler(trim($schema_insert));
}
 
return(true);
 
}// end function get_table_content_postgres...
 
//
// This function is for getting the data from a mysql table.
//
 
function get_table_content_mysql($table, $handler)
{
global $db;
 
// Grab the data from the table.
if (!($result = $db->sql_query("SELECT * FROM $table")))
{
message_die(GENERAL_ERROR, "Failed in get_table_content (select *)", "", __LINE__, __FILE__, "SELECT * FROM $table");
}
 
// Loop through the resulting rows and build the sql statement.
if ($row = $db->sql_fetchrow($result))
{
$handler("\n#\n# Table Data for $table\n#\n");
$field_names = array();
 
// Grab the list of field names.
$num_fields = $db->sql_numfields($result);
$table_list = '(';
for ($j = 0; $j < $num_fields; $j++)
{
$field_names[$j] = $db->sql_fieldname($j, $result);
$table_list .= (($j > 0) ? ', ' : '') . $field_names[$j];
}
$table_list .= ')';
 
do
{
// Start building the SQL statement.
$schema_insert = "INSERT INTO $table $table_list VALUES(";
 
// Loop through the rows and fill in data for each column
for ($j = 0; $j < $num_fields; $j++)
{
$schema_insert .= ($j > 0) ? ', ' : '';
 
if(!isset($row[$field_names[$j]]))
{
//
// If there is no data for the column set it to null.
// There was a problem here with an extra space causing the
// sql file not to reimport if the last column was null in
// any table. Should be fixed now :) JLH
//
$schema_insert .= 'NULL';
}
elseif ($row[$field_names[$j]] != '')
{
$schema_insert .= '\'' . addslashes($row[$field_names[$j]]) . '\'';
}
else
{
$schema_insert .= '\'\'';
}
}
 
$schema_insert .= ');';
 
// Go ahead and send the insert statement to the handler function.
$handler(trim($schema_insert));
 
}
while ($row = $db->sql_fetchrow($result));
}
 
return(true);
}
 
function output_table_content($content)
{
global $tempfile;
 
//fwrite($tempfile, $content . "\n");
//$backup_sql .= $content . "\n";
echo $content ."\n";
return;
}
//
// End Functions
// -------------
 
 
//
// Begin program proper
//
if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
{
$perform = (isset($HTTP_POST_VARS['perform'])) ? $HTTP_POST_VARS['perform'] : $HTTP_GET_VARS['perform'];
 
switch($perform)
{
case 'backup':
 
$error = false;
switch(SQL_LAYER)
{
case 'oracle':
$error = true;
break;
case 'db2':
$error = true;
break;
case 'msaccess':
$error = true;
break;
case 'mssql':
case 'mssql-odbc':
$error = true;
break;
}
 
if ($error)
{
include('./page_header_admin.'.$phpEx);
 
$template->set_filenames(array(
"body" => "admin/admin_message_body.tpl")
);
 
$template->assign_vars(array(
"MESSAGE_TITLE" => $lang['Information'],
"MESSAGE_TEXT" => $lang['Backups_not_supported'])
);
 
$template->pparse("body");
 
include('./page_footer_admin.'.$phpEx);
}
 
$tables = array('auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words', 'confirm', 'sessions_keys');
 
$additional_tables = (isset($HTTP_POST_VARS['additional_tables'])) ? $HTTP_POST_VARS['additional_tables'] : ( (isset($HTTP_GET_VARS['additional_tables'])) ? $HTTP_GET_VARS['additional_tables'] : "" );
 
$backup_type = (isset($HTTP_POST_VARS['backup_type'])) ? $HTTP_POST_VARS['backup_type'] : ( (isset($HTTP_GET_VARS['backup_type'])) ? $HTTP_GET_VARS['backup_type'] : "" );
 
$gzipcompress = (!empty($HTTP_POST_VARS['gzipcompress'])) ? $HTTP_POST_VARS['gzipcompress'] : ( (!empty($HTTP_GET_VARS['gzipcompress'])) ? $HTTP_GET_VARS['gzipcompress'] : 0 );
 
$drop = (!empty($HTTP_POST_VARS['drop'])) ? intval($HTTP_POST_VARS['drop']) : ( (!empty($HTTP_GET_VARS['drop'])) ? intval($HTTP_GET_VARS['drop']) : 0 );
 
if(!empty($additional_tables))
{
if(ereg(",", $additional_tables))
{
$additional_tables = split(",", $additional_tables);
 
for($i = 0; $i < count($additional_tables); $i++)
{
$tables[] = trim($additional_tables[$i]);
}
 
}
else
{
$tables[] = trim($additional_tables);
}
}
 
if( !isset($HTTP_POST_VARS['backupstart']) && !isset($HTTP_GET_VARS['backupstart']))
{
include('./page_header_admin.'.$phpEx);
 
$template->set_filenames(array(
"body" => "admin/db_utils_backup_body.tpl")
);
$s_hidden_fields = "<input type=\"hidden\" name=\"perform\" value=\"backup\" /><input type=\"hidden\" name=\"drop\" value=\"1\" /><input type=\"hidden\" name=\"perform\" value=\"$perform\" />";
 
$template->assign_vars(array(
"L_DATABASE_BACKUP" => $lang['Database_Utilities'] . " : " . $lang['Backup'],
"L_BACKUP_EXPLAIN" => $lang['Backup_explain'],
"L_FULL_BACKUP" => $lang['Full_backup'],
"L_STRUCTURE_BACKUP" => $lang['Structure_backup'],
"L_DATA_BACKUP" => $lang['Data_backup'],
"L_ADDITIONAL_TABLES" => $lang['Additional_tables'],
"L_START_BACKUP" => $lang['Start_backup'],
"L_BACKUP_OPTIONS" => $lang['Backup_options'],
"L_GZIP_COMPRESS" => $lang['Gzip_compress'],
"L_NO" => $lang['No'],
"L_YES" => $lang['Yes'],
 
"S_HIDDEN_FIELDS" => $s_hidden_fields,
"S_DBUTILS_ACTION" => append_sid("admin_db_utilities.$phpEx"))
);
$template->pparse("body");
 
break;
 
}
else if( !isset($HTTP_POST_VARS['startdownload']) && !isset($HTTP_GET_VARS['startdownload']) )
{
if(is_array($additional_tables))
{
$additional_tables = implode(',', $additional_tables);
}
$template->set_filenames(array(
"body" => "admin/admin_message_body.tpl")
);
 
$template->assign_vars(array(
"META" => '<meta http-equiv="refresh" content="2;url=' . append_sid("admin_db_utilities.$phpEx?perform=backup&additional_tables=" . quotemeta($additional_tables) . "&backup_type=$backup_type&drop=1&amp;backupstart=1&gzipcompress=$gzipcompress&startdownload=1") . '">',
 
"MESSAGE_TITLE" => $lang['Database_Utilities'] . " : " . $lang['Backup'],
"MESSAGE_TEXT" => $lang['Backup_download'])
);
 
include('./page_header_admin.'.$phpEx);
 
$template->pparse("body");
 
include('./page_footer_admin.'.$phpEx);
 
}
header("Pragma: no-cache");
$do_gzip_compress = FALSE;
if( $gzipcompress )
{
$phpver = phpversion();
 
if($phpver >= "4.0")
{
if(extension_loaded("zlib"))
{
$do_gzip_compress = TRUE;
}
}
}
if($do_gzip_compress)
{
@ob_start();
@ob_implicit_flush(0);
header("Content-Type: application/x-gzip; name=\"phpbb_db_backup.sql.gz\"");
header("Content-disposition: attachment; filename=phpbb_db_backup.sql.gz");
}
else
{
header("Content-Type: text/x-delimtext; name=\"phpbb_db_backup.sql\"");
header("Content-disposition: attachment; filename=phpbb_db_backup.sql");
}
 
//
// Build the sql script file...
//
echo "#\n";
echo "# phpBB Backup Script\n";
echo "# Dump of tables for $dbname\n";
echo "#\n# DATE : " . gmdate("d-m-Y H:i:s", time()) . " GMT\n";
echo "#\n";
 
if(SQL_LAYER == 'postgresql')
{
echo "\n" . pg_get_sequences("\n", $backup_type);
}
for($i = 0; $i < count($tables); $i++)
{
$table_name = $tables[$i];
 
switch (SQL_LAYER)
{
case 'postgresql':
$table_def_function = "get_table_def_postgresql";
$table_content_function = "get_table_content_postgresql";
break;
 
case 'mysql':
case 'mysql4':
$table_def_function = "get_table_def_mysql";
$table_content_function = "get_table_content_mysql";
break;
}
 
if($backup_type != 'data')
{
echo "#\n# TABLE: " . $table_prefix . $table_name . "\n#\n";
echo $table_def_function($table_prefix . $table_name, "\n") . "\n";
}
 
if($backup_type != 'structure')
{
$table_content_function($table_prefix . $table_name, "output_table_content");
}
}
if($do_gzip_compress)
{
$Size = ob_get_length();
$Crc = crc32(ob_get_contents());
$contents = gzcompress(ob_get_contents());
ob_end_clean();
echo "\x1f\x8b\x08\x00\x00\x00\x00\x00".substr($contents, 0, strlen($contents) - 4).gzip_PrintFourChars($Crc).gzip_PrintFourChars($Size);
}
exit;
 
break;
 
case 'restore':
if(!isset($HTTP_POST_VARS['restore_start']))
{
//
// Define Template files...
//
include('./page_header_admin.'.$phpEx);
 
$template->set_filenames(array(
"body" => "admin/db_utils_restore_body.tpl")
);
 
$s_hidden_fields = "<input type=\"hidden\" name=\"perform\" value=\"restore\" /><input type=\"hidden\" name=\"perform\" value=\"$perform\" />";
 
$template->assign_vars(array(
"L_DATABASE_RESTORE" => $lang['Database_Utilities'] . " : " . $lang['Restore'],
"L_RESTORE_EXPLAIN" => $lang['Restore_explain'],
"L_SELECT_FILE" => $lang['Select_file'],
"L_START_RESTORE" => $lang['Start_Restore'],
 
"S_DBUTILS_ACTION" => append_sid("admin_db_utilities.$phpEx"),
"S_HIDDEN_FIELDS" => $s_hidden_fields)
);
$template->pparse("body");
 
break;
 
}
else
{
//
// Handle the file upload ....
// If no file was uploaded report an error...
//
$backup_file_name = (!empty($HTTP_POST_FILES['backup_file']['name'])) ? $HTTP_POST_FILES['backup_file']['name'] : "";
$backup_file_tmpname = ($HTTP_POST_FILES['backup_file']['tmp_name'] != "none") ? $HTTP_POST_FILES['backup_file']['tmp_name'] : "";
$backup_file_type = (!empty($HTTP_POST_FILES['backup_file']['type'])) ? $HTTP_POST_FILES['backup_file']['type'] : "";
 
if($backup_file_tmpname == "" || $backup_file_name == "")
{
message_die(GENERAL_MESSAGE, $lang['Restore_Error_no_file']);
}
//
// If I file was actually uploaded, check to make sure that we
// are actually passed the name of an uploaded file, and not
// a hackers attempt at getting us to process a local system
// file.
//
if( file_exists(phpbb_realpath($backup_file_tmpname)) )
{
if( preg_match("/^(text\/[a-zA-Z]+)|(application\/(x\-)?gzip(\-compressed)?)|(application\/octet-stream)$/is", $backup_file_type) )
{
if( preg_match("/\.gz$/is",$backup_file_name) )
{
$do_gzip_compress = FALSE;
$phpver = phpversion();
if($phpver >= "4.0")
{
if(extension_loaded("zlib"))
{
$do_gzip_compress = TRUE;
}
}
 
if($do_gzip_compress)
{
$gz_ptr = gzopen($backup_file_tmpname, 'rb');
$sql_query = "";
while( !gzeof($gz_ptr) )
{
$sql_query .= gzgets($gz_ptr, 100000);
}
}
else
{
message_die(GENERAL_ERROR, $lang['Restore_Error_decompress']);
}
}
else
{
$sql_query = fread(fopen($backup_file_tmpname, 'r'), filesize($backup_file_tmpname));
}
//
// Comment this line out to see if this fixes the stuff...
//
//$sql_query = stripslashes($sql_query);
}
else
{
message_die(GENERAL_ERROR, $lang['Restore_Error_filename'] ." $backup_file_type $backup_file_name");
}
}
else
{
message_die(GENERAL_ERROR, $lang['Restore_Error_uploading']);
}
 
if($sql_query != "")
{
// Strip out sql comments...
$sql_query = remove_remarks($sql_query);
$pieces = split_sql_file($sql_query, ";");
 
$sql_count = count($pieces);
for($i = 0; $i < $sql_count; $i++)
{
$sql = trim($pieces[$i]);
 
if(!empty($sql) and $sql[0] != "#")
{
if(VERBOSE == 1)
{
echo "Executing: $sql\n<br>";
flush();
}
 
$result = $db->sql_query($sql);
 
if(!$result && ( !(SQL_LAYER == 'postgresql' && eregi("drop table", $sql) ) ) )
{
message_die(GENERAL_ERROR, "Error importing backup file", "", __LINE__, __FILE__, $sql);
}
}
}
}
 
include('./page_header_admin.'.$phpEx);
 
$template->set_filenames(array(
"body" => "admin/admin_message_body.tpl")
);
 
$message = $lang['Restore_success'];
 
$template->assign_vars(array(
"MESSAGE_TITLE" => $lang['Database_Utilities'] . " : " . $lang['Restore'],
"MESSAGE_TEXT" => $message)
);
 
$template->pparse("body");
break;
}
break;
}
}
 
include('./page_footer_admin.'.$phpEx);
 
?>
/Forum/admin/admin_disallow.php
0,0 → 1,146
<?php
/***************************************************************************
* admin_disallow.php
* -------------------
* begin : Tuesday, Oct 05, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_disallow.php,v 1.9.2.4 2005/12/18 13:57:50 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', 1);
 
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Users']['Disallow'] = $filename;
 
return;
}
 
//
// Include required files, get $phpEx and check permissions
//
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
 
if( isset($HTTP_POST_VARS['add_name']) )
{
include($phpbb_root_path . 'includes/functions_validate.'.$phpEx);
 
$disallowed_user = ( isset($HTTP_POST_VARS['disallowed_user']) ) ? trim($HTTP_POST_VARS['disallowed_user']) : trim($HTTP_GET_VARS['disallowed_user']);
 
if ($disallowed_user == '')
{
message_die(GENERAL_MESSAGE, $lang['Fields_empty']);
}
if( !validate_username($disallowed_user) )
{
$message = $lang['Disallowed_already'];
}
else
{
$sql = "INSERT INTO " . DISALLOW_TABLE . " (disallow_username)
VALUES('" . str_replace("\'", "''", $disallowed_user) . "')";
$result = $db->sql_query( $sql );
if ( !$result )
{
message_die(GENERAL_ERROR, "Could not add disallowed user.", "",__LINE__, __FILE__, $sql);
}
$message = $lang['Disallow_successful'];
}
 
$message .= "<br /><br />" . sprintf($lang['Click_return_disallowadmin'], "<a href=\"" . append_sid("admin_disallow.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
}
else if( isset($HTTP_POST_VARS['delete_name']) )
{
$disallowed_id = ( isset($HTTP_POST_VARS['disallowed_id']) ) ? intval( $HTTP_POST_VARS['disallowed_id'] ) : intval( $HTTP_GET_VARS['disallowed_id'] );
$sql = "DELETE FROM " . DISALLOW_TABLE . "
WHERE disallow_id = $disallowed_id";
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't removed disallowed user.", "",__LINE__, __FILE__, $sql);
}
 
$message .= $lang['Disallowed_deleted'] . "<br /><br />" . sprintf($lang['Click_return_disallowadmin'], "<a href=\"" . append_sid("admin_disallow.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
 
}
 
//
// Grab the current list of disallowed usernames...
//
$sql = "SELECT *
FROM " . DISALLOW_TABLE;
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't get disallowed users.", "", __LINE__, __FILE__, $sql );
}
 
$disallowed = $db->sql_fetchrowset($result);
 
//
// Ok now generate the info for the template, which will be put out no matter
// what mode we are in.
//
$disallow_select = '<select name="disallowed_id">';
 
if( trim($disallowed) == "" )
{
$disallow_select .= '<option value="">' . $lang['no_disallowed'] . '</option>';
}
else
{
$user = array();
for( $i = 0; $i < count($disallowed); $i++ )
{
$disallow_select .= '<option value="' . $disallowed[$i]['disallow_id'] . '">' . $disallowed[$i]['disallow_username'] . '</option>';
}
}
 
$disallow_select .= '</select>';
 
$template->set_filenames(array(
"body" => "admin/disallow_body.tpl")
);
 
$template->assign_vars(array(
"S_DISALLOW_SELECT" => $disallow_select,
"S_FORM_ACTION" => append_sid("admin_disallow.$phpEx"),
 
"L_INFO" => $output_info,
"L_DISALLOW_TITLE" => $lang['Disallow_control'],
"L_DISALLOW_EXPLAIN" => $lang['Disallow_explain'],
"L_DELETE" => $lang['Delete_disallow'],
"L_DELETE_DISALLOW" => $lang['Delete_disallow_title'],
"L_DELETE_EXPLAIN" => $lang['Delete_disallow_explain'],
"L_ADD" => $lang['Add_disallow'],
"L_ADD_DISALLOW" => $lang['Add_disallow_title'],
"L_ADD_EXPLAIN" => $lang['Add_disallow_explain'],
"L_USERNAME" => $lang['Username'])
);
 
$template->pparse("body");
 
include('./page_footer_admin.'.$phpEx);
 
?>
/Forum/admin/admin_forum_prune.php
0,0 → 1,199
<?php
/***************************************************************************
* admin_forum_prune.php
* -------------------
* begin : Mon Jul 31, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_forum_prune.php,v 1.22.2.3 2002/12/18 14:14:07 psotfx Exp $
*
****************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', true);
 
if ( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Forums']['Prune'] = $filename;
 
return;
}
 
//
// Load default header
//
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
require($phpbb_root_path . 'includes/prune.'.$phpEx);
require($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
 
//
// Get the forum ID for pruning
//
if( isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL]) )
{
$forum_id = ( isset($HTTP_POST_VARS[POST_FORUM_URL]) ) ? $HTTP_POST_VARS[POST_FORUM_URL] : $HTTP_GET_VARS[POST_FORUM_URL];
 
if( $forum_id == -1 )
{
$forum_sql = '';
}
else
{
$forum_id = intval($forum_id);
$forum_sql = "AND forum_id = $forum_id";
}
}
else
{
$forum_id = '';
$forum_sql = '';
}
//
// Get a list of forum's or the data for the forum that we are pruning.
//
$sql = "SELECT f.*
FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c
WHERE c.cat_id = f.cat_id
$forum_sql
ORDER BY c.cat_order ASC, f.forum_order ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain list of forums for pruning', '', __LINE__, __FILE__, $sql);
}
 
$forum_rows = array();
while( $row = $db->sql_fetchrow($result) )
{
$forum_rows[] = $row;
}
 
//
// Check for submit to be equal to Prune. If so then proceed with the pruning.
//
if( isset($HTTP_POST_VARS['doprune']) )
{
$prunedays = ( isset($HTTP_POST_VARS['prunedays']) ) ? intval($HTTP_POST_VARS['prunedays']) : 0;
 
// Convert days to seconds for timestamp functions...
$prunedate = time() - ( $prunedays * 86400 );
 
$template->set_filenames(array(
'body' => 'admin/forum_prune_result_body.tpl')
);
 
for($i = 0; $i < count($forum_rows); $i++)
{
$p_result = prune($forum_rows[$i]['forum_id'], $prunedate);
sync('forum', $forum_rows[$i]['forum_id']);
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_block_vars('prune_results', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FORUM_NAME' => $forum_rows[$i]['forum_name'],
'FORUM_TOPICS' => $p_result['topics'],
'FORUM_POSTS' => $p_result['posts'])
);
}
 
$template->assign_vars(array(
'L_FORUM_PRUNE' => $lang['Forum_Prune'],
'L_FORUM' => $lang['Forum'],
'L_TOPICS_PRUNED' => $lang['Topics_pruned'],
'L_POSTS_PRUNED' => $lang['Posts_pruned'],
'L_PRUNE_RESULT' => $lang['Prune_success'])
);
}
else
{
//
// If they haven't selected a forum for pruning yet then
// display a select box to use for pruning.
//
if( empty($HTTP_POST_VARS[POST_FORUM_URL]) )
{
//
// Output a selection table if no forum id has been specified.
//
$template->set_filenames(array(
'body' => 'admin/forum_prune_select_body.tpl')
);
 
$select_list = '<select name="' . POST_FORUM_URL . '">';
$select_list .= '<option value="-1">' . $lang['All_Forums'] . '</option>';
 
for($i = 0; $i < count($forum_rows); $i++)
{
$select_list .= '<option value="' . $forum_rows[$i]['forum_id'] . '">' . $forum_rows[$i]['forum_name'] . '</option>';
}
$select_list .= '</select>';
 
//
// Assign the template variables.
//
$template->assign_vars(array(
'L_FORUM_PRUNE' => $lang['Forum_Prune'],
'L_SELECT_FORUM' => $lang['Select_a_Forum'],
'L_LOOK_UP' => $lang['Look_up_Forum'],
 
'S_FORUMPRUNE_ACTION' => append_sid("admin_forum_prune.$phpEx"),
'S_FORUMS_SELECT' => $select_list)
);
}
else
{
$forum_id = intval($HTTP_POST_VARS[POST_FORUM_URL]);
//
// Output the form to retrieve Prune information.
//
$template->set_filenames(array(
'body' => 'admin/forum_prune_body.tpl')
);
 
$forum_name = ( $forum_id == -1 ) ? $lang['All_Forums'] : $forum_rows[0]['forum_name'];
 
$prune_data = $lang['Prune_topics_not_posted'] . " ";
$prune_data .= '<input class="post" type="text" name="prunedays" size="4"> ' . $lang['Days'];
 
$hidden_input = '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
 
//
// Assign the template variables.
//
$template->assign_vars(array(
'FORUM_NAME' => $forum_name,
 
'L_FORUM' => $lang['Forum'],
'L_FORUM_PRUNE' => $lang['Forum_Prune'],
'L_FORUM_PRUNE_EXPLAIN' => $lang['Forum_Prune_explain'],
'L_DO_PRUNE' => $lang['Do_Prune'],
 
'S_FORUMPRUNE_ACTION' => append_sid("admin_forum_prune.$phpEx"),
'S_PRUNE_DATA' => $prune_data,
'S_HIDDEN_VARS' => $hidden_input)
);
}
}
//
// Actually output the page here.
//
$template->pparse('body');
 
include('./page_footer_admin.'.$phpEx);
 
?>
/Forum/admin/admin_forumauth.php
0,0 → 1,328
<?php
/***************************************************************************
* admin_forumauth.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_forumauth.php,v 1.23.2.5 2004/03/25 15:57:19 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', 1);
 
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Forums']['Permissions'] = $filename;
 
return;
}
 
//
// Load default header
//
$no_page_header = TRUE;
$phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
 
//
// Start program - define vars
//
// View Read Post Reply Edit Delete Sticky Announce Vote Poll
$simple_auth_ary = array(
0 => array(AUTH_ALL, AUTH_ALL, AUTH_ALL, AUTH_ALL, AUTH_REG, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_REG, AUTH_REG),
1 => array(AUTH_ALL, AUTH_ALL, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_REG, AUTH_REG),
2 => array(AUTH_REG, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_REG, AUTH_REG),
3 => array(AUTH_ALL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_MOD, AUTH_ACL, AUTH_ACL),
4 => array(AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_MOD, AUTH_ACL, AUTH_ACL),
5 => array(AUTH_ALL, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD),
6 => array(AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD),
);
 
$simple_auth_types = array($lang['Public'], $lang['Registered'], $lang['Registered'] . ' [' . $lang['Hidden'] . ']', $lang['Private'], $lang['Private'] . ' [' . $lang['Hidden'] . ']', $lang['Moderators'], $lang['Moderators'] . ' [' . $lang['Hidden'] . ']');
 
$forum_auth_fields = array('auth_view', 'auth_read', 'auth_post', 'auth_reply', 'auth_edit', 'auth_delete', 'auth_sticky', 'auth_announce', 'auth_vote', 'auth_pollcreate');
 
$field_names = array(
'auth_view' => $lang['View'],
'auth_read' => $lang['Read'],
'auth_post' => $lang['Post'],
'auth_reply' => $lang['Reply'],
'auth_edit' => $lang['Edit'],
'auth_delete' => $lang['Delete'],
'auth_sticky' => $lang['Sticky'],
'auth_announce' => $lang['Announce'],
'auth_vote' => $lang['Vote'],
'auth_pollcreate' => $lang['Pollcreate']);
 
$forum_auth_levels = array('ALL', 'REG', 'PRIVATE', 'MOD', 'ADMIN');
$forum_auth_const = array(AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN);
 
if(isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL]))
{
$forum_id = (isset($HTTP_POST_VARS[POST_FORUM_URL])) ? intval($HTTP_POST_VARS[POST_FORUM_URL]) : intval($HTTP_GET_VARS[POST_FORUM_URL]);
$forum_sql = "AND forum_id = $forum_id";
}
else
{
unset($forum_id);
$forum_sql = '';
}
 
if( isset($HTTP_GET_VARS['adv']) )
{
$adv = intval($HTTP_GET_VARS['adv']);
}
else
{
unset($adv);
}
 
//
// Start program proper
//
if( isset($HTTP_POST_VARS['submit']) )
{
$sql = '';
 
if(!empty($forum_id))
{
if(isset($HTTP_POST_VARS['simpleauth']))
{
$simple_ary = $simple_auth_ary[intval($HTTP_POST_VARS['simpleauth'])];
 
for($i = 0; $i < count($simple_ary); $i++)
{
$sql .= ( ( $sql != '' ) ? ', ' : '' ) . $forum_auth_fields[$i] . ' = ' . $simple_ary[$i];
}
 
if (is_array($simple_ary))
{
$sql = "UPDATE " . FORUMS_TABLE . " SET $sql WHERE forum_id = $forum_id";
}
}
else
{
for($i = 0; $i < count($forum_auth_fields); $i++)
{
$value = intval($HTTP_POST_VARS[$forum_auth_fields[$i]]);
 
if ( $forum_auth_fields[$i] == 'auth_vote' )
{
if ( $HTTP_POST_VARS['auth_vote'] == AUTH_ALL )
{
$value = AUTH_REG;
}
}
 
$sql .= ( ( $sql != '' ) ? ', ' : '' ) .$forum_auth_fields[$i] . ' = ' . $value;
}
 
$sql = "UPDATE " . FORUMS_TABLE . " SET $sql WHERE forum_id = $forum_id";
}
 
if ( $sql != '' )
{
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update auth table', '', __LINE__, __FILE__, $sql);
}
}
 
$forum_sql = '';
$adv = 0;
}
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_forumauth.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">')
);
$message = $lang['Forum_auth_updated'] . '<br /><br />' . sprintf($lang['Click_return_forumauth'], '<a href="' . append_sid("admin_forumauth.$phpEx") . '">', "</a>");
message_die(GENERAL_MESSAGE, $message);
 
} // End of submit
 
//
// Get required information, either all forums if
// no id was specified or just the requsted if it
// was
//
$sql = "SELECT f.*
FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c
WHERE c.cat_id = f.cat_id
$forum_sql
ORDER BY c.cat_order ASC, f.forum_order ASC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain forum list", "", __LINE__, __FILE__, $sql);
}
 
$forum_rows = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
 
if( empty($forum_id) )
{
//
// Output the selection table if no forum id was
// specified
//
$template->set_filenames(array(
'body' => 'admin/auth_select_body.tpl')
);
 
$select_list = '<select name="' . POST_FORUM_URL . '">';
for($i = 0; $i < count($forum_rows); $i++)
{
$select_list .= '<option value="' . $forum_rows[$i]['forum_id'] . '">' . $forum_rows[$i]['forum_name'] . '</option>';
}
$select_list .= '</select>';
 
$template->assign_vars(array(
'L_AUTH_TITLE' => $lang['Auth_Control_Forum'],
'L_AUTH_EXPLAIN' => $lang['Forum_auth_explain'],
'L_AUTH_SELECT' => $lang['Select_a_Forum'],
'L_LOOK_UP' => $lang['Look_up_Forum'],
 
'S_AUTH_ACTION' => append_sid("admin_forumauth.$phpEx"),
'S_AUTH_SELECT' => $select_list)
);
 
}
else
{
//
// Output the authorisation details if an id was
// specified
//
$template->set_filenames(array(
'body' => 'admin/auth_forum_body.tpl')
);
 
$forum_name = $forum_rows[0]['forum_name'];
 
@reset($simple_auth_ary);
while( list($key, $auth_levels) = each($simple_auth_ary))
{
$matched = 1;
for($k = 0; $k < count($auth_levels); $k++)
{
$matched_type = $key;
 
if ( $forum_rows[0][$forum_auth_fields[$k]] != $auth_levels[$k] )
{
$matched = 0;
}
}
 
if ( $matched )
{
break;
}
}
 
//
// If we didn't get a match above then we
// automatically switch into 'advanced' mode
//
if ( !isset($adv) && !$matched )
{
$adv = 1;
}
 
$s_column_span == 0;
 
if ( empty($adv) )
{
$simple_auth = '<select name="simpleauth">';
 
for($j = 0; $j < count($simple_auth_types); $j++)
{
$selected = ( $matched_type == $j ) ? ' selected="selected"' : '';
$simple_auth .= '<option value="' . $j . '"' . $selected . '>' . $simple_auth_types[$j] . '</option>';
}
 
$simple_auth .= '</select>';
 
$template->assign_block_vars('forum_auth_titles', array(
'CELL_TITLE' => $lang['Simple_mode'])
);
$template->assign_block_vars('forum_auth_data', array(
'S_AUTH_LEVELS_SELECT' => $simple_auth)
);
 
$s_column_span++;
}
else
{
//
// Output values of individual
// fields
//
for($j = 0; $j < count($forum_auth_fields); $j++)
{
$custom_auth[$j] = '&nbsp;<select name="' . $forum_auth_fields[$j] . '">';
 
for($k = 0; $k < count($forum_auth_levels); $k++)
{
$selected = ( $forum_rows[0][$forum_auth_fields[$j]] == $forum_auth_const[$k] ) ? ' selected="selected"' : '';
$custom_auth[$j] .= '<option value="' . $forum_auth_const[$k] . '"' . $selected . '>' . $lang['Forum_' . $forum_auth_levels[$k]] . '</option>';
}
$custom_auth[$j] .= '</select>&nbsp;';
 
$cell_title = $field_names[$forum_auth_fields[$j]];
 
$template->assign_block_vars('forum_auth_titles', array(
'CELL_TITLE' => $cell_title)
);
$template->assign_block_vars('forum_auth_data', array(
'S_AUTH_LEVELS_SELECT' => $custom_auth[$j])
);
 
$s_column_span++;
}
}
 
$adv_mode = ( empty($adv) ) ? '1' : '0';
$switch_mode = append_sid("admin_forumauth.$phpEx?" . POST_FORUM_URL . "=" . $forum_id . "&adv=". $adv_mode);
$switch_mode_text = ( empty($adv) ) ? $lang['Advanced_mode'] : $lang['Simple_mode'];
$u_switch_mode = '<a href="' . $switch_mode . '">' . $switch_mode_text . '</a>';
 
$s_hidden_fields = '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '">';
 
$template->assign_vars(array(
'FORUM_NAME' => $forum_name,
 
'L_FORUM' => $lang['Forum'],
'L_AUTH_TITLE' => $lang['Auth_Control_Forum'],
'L_AUTH_EXPLAIN' => $lang['Forum_auth_explain'],
'L_SUBMIT' => $lang['Submit'],
'L_RESET' => $lang['Reset'],
 
'U_SWITCH_MODE' => $u_switch_mode,
 
'S_FORUMAUTH_ACTION' => append_sid("admin_forumauth.$phpEx"),
'S_COLUMN_SPAN' => $s_column_span,
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
 
}
 
include('./page_header_admin.'.$phpEx);
 
$template->pparse('body');
 
include('./page_footer_admin.'.$phpEx);
 
?>
/Forum/admin/admin_forums.php
0,0 → 1,1028
<?php
/***************************************************************************
* admin_forums.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_forums.php,v 1.40.2.13 2006/03/09 21:55:09 grahamje Exp $
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', 1);
 
if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['Forums']['Manage'] = $file;
return;
}
 
//
// Load default header
//
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
 
$forum_auth_ary = array(
"auth_view" => AUTH_ALL,
"auth_read" => AUTH_ALL,
"auth_post" => AUTH_REG,
"auth_reply" => AUTH_REG,
"auth_edit" => AUTH_REG,
"auth_delete" => AUTH_REG,
"auth_sticky" => AUTH_MOD,
"auth_announce" => AUTH_MOD,
"auth_vote" => AUTH_REG,
"auth_pollcreate" => AUTH_REG
);
 
//
// Mode setting
//
if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
$mode = htmlspecialchars($mode);
}
else
{
$mode = "";
}
 
// ------------------
// Begin function block
//
function get_info($mode, $id)
{
global $db;
 
switch($mode)
{
case 'category':
$table = CATEGORIES_TABLE;
$idfield = 'cat_id';
$namefield = 'cat_title';
break;
 
case 'forum':
$table = FORUMS_TABLE;
$idfield = 'forum_id';
$namefield = 'forum_name';
break;
 
default:
message_die(GENERAL_ERROR, "Wrong mode for generating select list", "", __LINE__, __FILE__);
break;
}
$sql = "SELECT count(*) as total
FROM $table";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get Forum/Category information", "", __LINE__, __FILE__, $sql);
}
$count = $db->sql_fetchrow($result);
$count = $count['total'];
 
$sql = "SELECT *
FROM $table
WHERE $idfield = $id";
 
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get Forum/Category information", "", __LINE__, __FILE__, $sql);
}
 
if( $db->sql_numrows($result) != 1 )
{
message_die(GENERAL_ERROR, "Forum/Category doesn't exist or multiple forums/categories with ID $id", "", __LINE__, __FILE__);
}
 
$return = $db->sql_fetchrow($result);
$return['number'] = $count;
return $return;
}
 
function get_list($mode, $id, $select)
{
global $db;
 
switch($mode)
{
case 'category':
$table = CATEGORIES_TABLE;
$idfield = 'cat_id';
$namefield = 'cat_title';
break;
 
case 'forum':
$table = FORUMS_TABLE;
$idfield = 'forum_id';
$namefield = 'forum_name';
break;
 
default:
message_die(GENERAL_ERROR, "Wrong mode for generating select list", "", __LINE__, __FILE__);
break;
}
 
$sql = "SELECT *
FROM $table";
if( $select == 0 )
{
$sql .= " WHERE $idfield <> $id";
}
 
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get list of Categories/Forums", "", __LINE__, __FILE__, $sql);
}
 
$cat_list = "";
 
while( $row = $db->sql_fetchrow($result) )
{
$s = "";
if ($row[$idfield] == $id)
{
$s = " selected=\"selected\"";
}
$catlist .= "<option value=\"$row[$idfield]\"$s>" . $row[$namefield] . "</option>\n";
}
 
return($catlist);
}
 
function renumber_order($mode, $cat = 0)
{
global $db;
 
switch($mode)
{
case 'category':
$table = CATEGORIES_TABLE;
$idfield = 'cat_id';
$orderfield = 'cat_order';
$cat = 0;
break;
 
case 'forum':
$table = FORUMS_TABLE;
$idfield = 'forum_id';
$orderfield = 'forum_order';
$catfield = 'cat_id';
break;
 
default:
message_die(GENERAL_ERROR, "Wrong mode for generating select list", "", __LINE__, __FILE__);
break;
}
 
$sql = "SELECT * FROM $table";
if( $cat != 0)
{
$sql .= " WHERE $catfield = $cat";
}
$sql .= " ORDER BY $orderfield ASC";
 
 
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get list of Categories", "", __LINE__, __FILE__, $sql);
}
 
$i = 10;
$inc = 10;
 
while( $row = $db->sql_fetchrow($result) )
{
$sql = "UPDATE $table
SET $orderfield = $i
WHERE $idfield = " . $row[$idfield];
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update order fields", "", __LINE__, __FILE__, $sql);
}
$i += 10;
}
 
}
//
// End function block
// ------------------
 
//
// Begin program proper
//
if( isset($HTTP_POST_VARS['addforum']) || isset($HTTP_POST_VARS['addcategory']) )
{
$mode = ( isset($HTTP_POST_VARS['addforum']) ) ? "addforum" : "addcat";
 
if( $mode == "addforum" )
{
list($cat_id) = each($HTTP_POST_VARS['addforum']);
$cat_id = intval($cat_id);
//
// stripslashes needs to be run on this because slashes are added when the forum name is posted
//
$forumname = stripslashes($HTTP_POST_VARS['forumname'][$cat_id]);
}
}
 
if( !empty($mode) )
{
switch($mode)
{
case 'addforum':
case 'editforum':
//
// Show form to create/modify a forum
//
if ($mode == 'editforum')
{
// $newmode determines if we are going to INSERT or UPDATE after posting?
 
$l_title = $lang['Edit_forum'];
$newmode = 'modforum';
$buttonvalue = $lang['Update'];
 
$forum_id = intval($HTTP_GET_VARS[POST_FORUM_URL]);
 
$row = get_info('forum', $forum_id);
 
$cat_id = $row['cat_id'];
$forumname = $row['forum_name'];
$forumdesc = $row['forum_desc'];
$forumstatus = $row['forum_status'];
 
//
// start forum prune stuff.
//
if( $row['prune_enable'] )
{
$prune_enabled = "checked=\"checked\"";
$sql = "SELECT *
FROM " . PRUNE_TABLE . "
WHERE forum_id = $forum_id";
if(!$pr_result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Auto-Prune: Couldn't read auto_prune table.", __LINE__, __FILE__);
}
 
$pr_row = $db->sql_fetchrow($pr_result);
}
else
{
$prune_enabled = '';
}
}
else
{
$l_title = $lang['Create_forum'];
$newmode = 'createforum';
$buttonvalue = $lang['Create_forum'];
 
$forumdesc = '';
$forumstatus = FORUM_UNLOCKED;
$forum_id = '';
$prune_enabled = '';
}
 
$catlist = get_list('category', $cat_id, TRUE);
 
$forumstatus == ( FORUM_LOCKED ) ? $forumlocked = "selected=\"selected\"" : $forumunlocked = "selected=\"selected\"";
// These two options ($lang['Status_unlocked'] and $lang['Status_locked']) seem to be missing from
// the language files.
$lang['Status_unlocked'] = isset($lang['Status_unlocked']) ? $lang['Status_unlocked'] : 'Unlocked';
$lang['Status_locked'] = isset($lang['Status_locked']) ? $lang['Status_locked'] : 'Locked';
$statuslist = "<option value=\"" . FORUM_UNLOCKED . "\" $forumunlocked>" . $lang['Status_unlocked'] . "</option>\n";
$statuslist .= "<option value=\"" . FORUM_LOCKED . "\" $forumlocked>" . $lang['Status_locked'] . "</option>\n";
 
$template->set_filenames(array(
"body" => "admin/forum_edit_body.tpl")
);
 
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $newmode .'" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
 
$template->assign_vars(array(
'S_FORUM_ACTION' => append_sid("admin_forums.$phpEx"),
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_SUBMIT_VALUE' => $buttonvalue,
'S_CAT_LIST' => $catlist,
'S_STATUS_LIST' => $statuslist,
'S_PRUNE_ENABLED' => $prune_enabled,
 
'L_FORUM_TITLE' => $l_title,
'L_FORUM_EXPLAIN' => $lang['Forum_edit_delete_explain'],
'L_FORUM_SETTINGS' => $lang['Forum_settings'],
'L_FORUM_NAME' => $lang['Forum_name'],
'L_CATEGORY' => $lang['Category'],
'L_FORUM_DESCRIPTION' => $lang['Forum_desc'],
'L_FORUM_STATUS' => $lang['Forum_status'],
'L_AUTO_PRUNE' => $lang['Forum_pruning'],
'L_ENABLED' => $lang['Enabled'],
'L_PRUNE_DAYS' => $lang['prune_days'],
'L_PRUNE_FREQ' => $lang['prune_freq'],
'L_DAYS' => $lang['Days'],
 
'PRUNE_DAYS' => ( isset($pr_row['prune_days']) ) ? $pr_row['prune_days'] : 7,
'PRUNE_FREQ' => ( isset($pr_row['prune_freq']) ) ? $pr_row['prune_freq'] : 1,
'FORUM_NAME' => $forumname,
'DESCRIPTION' => $forumdesc)
);
$template->pparse("body");
break;
 
case 'createforum':
//
// Create a forum in the DB
//
if( trim($HTTP_POST_VARS['forumname']) == "" )
{
message_die(GENERAL_ERROR, "Can't create a forum without a name");
}
 
$sql = "SELECT MAX(forum_order) AS max_order
FROM " . FORUMS_TABLE . "
WHERE cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]);
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get order number from forums table", "", __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
 
$max_order = $row['max_order'];
$next_order = $max_order + 10;
$sql = "SELECT MAX(forum_id) AS max_id
FROM " . FORUMS_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get order number from forums table", "", __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
 
$max_id = $row['max_id'];
$next_id = $max_id + 1;
 
//
// Default permissions of public ::
//
$field_sql = "";
$value_sql = "";
while( list($field, $value) = each($forum_auth_ary) )
{
$field_sql .= ", $field";
$value_sql .= ", $value";
 
}
 
// There is no problem having duplicate forum names so we won't check for it.
$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert row in forums table", "", __LINE__, __FILE__, $sql);
}
 
if( $HTTP_POST_VARS['prune_enable'] )
{
 
if( $HTTP_POST_VARS['prune_days'] == "" || $HTTP_POST_VARS['prune_freq'] == "")
{
message_die(GENERAL_MESSAGE, $lang['Set_prune_data']);
}
 
$sql = "INSERT INTO " . PRUNE_TABLE . " (forum_id, prune_days, prune_freq)
VALUES('" . $next_id . "', " . intval($HTTP_POST_VARS['prune_days']) . ", " . intval($HTTP_POST_VARS['prune_freq']) . ")";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert row in prune table", "", __LINE__, __FILE__, $sql);
}
}
 
$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
 
break;
 
case 'modforum':
// Modify a forum in the DB
if( isset($HTTP_POST_VARS['prune_enable']))
{
if( $HTTP_POST_VARS['prune_enable'] != 1 )
{
$HTTP_POST_VARS['prune_enable'] = 0;
}
}
 
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update forum information", "", __LINE__, __FILE__, $sql);
}
 
if( $HTTP_POST_VARS['prune_enable'] == 1 )
{
if( $HTTP_POST_VARS['prune_days'] == "" || $HTTP_POST_VARS['prune_freq'] == "" )
{
message_die(GENERAL_MESSAGE, $lang['Set_prune_data']);
}
 
$sql = "SELECT *
FROM " . PRUNE_TABLE . "
WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get forum Prune Information","",__LINE__, __FILE__, $sql);
}
 
if( $db->sql_numrows($result) > 0 )
{
$sql = "UPDATE " . PRUNE_TABLE . "
SET prune_days = " . intval($HTTP_POST_VARS['prune_days']) . ", prune_freq = " . intval($HTTP_POST_VARS['prune_freq']) . "
WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
}
else
{
$sql = "INSERT INTO " . PRUNE_TABLE . " (forum_id, prune_days, prune_freq)
VALUES(" . intval($HTTP_POST_VARS[POST_FORUM_URL]) . ", " . intval($HTTP_POST_VARS['prune_days']) . ", " . intval($HTTP_POST_VARS['prune_freq']) . ")";
}
 
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't Update Forum Prune Information","",__LINE__, __FILE__, $sql);
}
}
 
$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
 
break;
case 'addcat':
// Create a category in the DB
if( trim($HTTP_POST_VARS['categoryname']) == '')
{
message_die(GENERAL_ERROR, "Can't create a category without a name");
}
 
$sql = "SELECT MAX(cat_order) AS max_order
FROM " . CATEGORIES_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get order number from categories table", "", __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
 
$max_order = $row['max_order'];
$next_order = $max_order + 10;
 
//
// There is no problem having duplicate forum names so we won't check for it.
//
$sql = "INSERT INTO " . CATEGORIES_TABLE . " (cat_title, cat_order)
VALUES ('" . str_replace("\'", "''", $HTTP_POST_VARS['categoryname']) . "', $next_order)";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert row in categories table", "", __LINE__, __FILE__, $sql);
}
 
$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
 
break;
case 'editcat':
//
// Show form to edit a category
//
$newmode = 'modcat';
$buttonvalue = $lang['Update'];
 
$cat_id = intval($HTTP_GET_VARS[POST_CAT_URL]);
 
$row = get_info('category', $cat_id);
$cat_title = $row['cat_title'];
 
$template->set_filenames(array(
"body" => "admin/category_edit_body.tpl")
);
 
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $newmode . '" /><input type="hidden" name="' . POST_CAT_URL . '" value="' . $cat_id . '" />';
 
$template->assign_vars(array(
'CAT_TITLE' => $cat_title,
 
'L_EDIT_CATEGORY' => $lang['Edit_Category'],
'L_EDIT_CATEGORY_EXPLAIN' => $lang['Edit_Category_explain'],
'L_CATEGORY' => $lang['Category'],
 
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_SUBMIT_VALUE' => $buttonvalue,
'S_FORUM_ACTION' => append_sid("admin_forums.$phpEx"))
);
 
$template->pparse("body");
break;
 
case 'modcat':
// Modify a category in the DB
$sql = "UPDATE " . CATEGORIES_TABLE . "
SET cat_title = '" . str_replace("\'", "''", $HTTP_POST_VARS['cat_title']) . "'
WHERE cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]);
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update forum information", "", __LINE__, __FILE__, $sql);
}
 
$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
 
break;
case 'deleteforum':
// Show form to delete a forum
$forum_id = intval($HTTP_GET_VARS[POST_FORUM_URL]);
 
$select_to = '<select name="to_id">';
$select_to .= "<option value=\"-1\"$s>" . $lang['Delete_all_posts'] . "</option>\n";
$select_to .= get_list('forum', $forum_id, 0);
$select_to .= '</select>';
 
$buttonvalue = $lang['Move_and_Delete'];
 
$newmode = 'movedelforum';
 
$foruminfo = get_info('forum', $forum_id);
$name = $foruminfo['forum_name'];
 
$template->set_filenames(array(
"body" => "admin/forum_delete_body.tpl")
);
 
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $newmode . '" /><input type="hidden" name="from_id" value="' . $forum_id . '" />';
 
$template->assign_vars(array(
'NAME' => $name,
 
'L_FORUM_DELETE' => $lang['Forum_delete'],
'L_FORUM_DELETE_EXPLAIN' => $lang['Forum_delete_explain'],
'L_MOVE_CONTENTS' => $lang['Move_contents'],
'L_FORUM_NAME' => $lang['Forum_name'],
 
"S_HIDDEN_FIELDS" => $s_hidden_fields,
'S_FORUM_ACTION' => append_sid("admin_forums.$phpEx"),
'S_SELECT_TO' => $select_to,
'S_SUBMIT_VALUE' => $buttonvalue)
);
 
$template->pparse("body");
break;
 
case 'movedelforum':
//
// Move or delete a forum in the DB
//
$from_id = intval($HTTP_POST_VARS['from_id']);
$to_id = intval($HTTP_POST_VARS['to_id']);
$delete_old = intval($HTTP_POST_VARS['delete_old']);
 
// Either delete or move all posts in a forum
if($to_id == -1)
{
// Delete polls in this forum
$sql = "SELECT v.vote_id
FROM " . VOTE_DESC_TABLE . " v, " . TOPICS_TABLE . " t
WHERE t.forum_id = $from_id
AND v.topic_id = t.topic_id";
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, "Couldn't obtain list of vote ids", "", __LINE__, __FILE__, $sql);
}
 
if ($row = $db->sql_fetchrow($result))
{
$vote_ids = '';
do
{
$vote_ids = (($vote_ids != '') ? ', ' : '') . $row['vote_id'];
}
while ($row = $db->sql_fetchrow($result));
 
$sql = "DELETE FROM " . VOTE_DESC_TABLE . "
WHERE vote_id IN ($vote_ids)";
$db->sql_query($sql);
 
$sql = "DELETE FROM " . VOTE_RESULTS_TABLE . "
WHERE vote_id IN ($vote_ids)";
$db->sql_query($sql);
 
$sql = "DELETE FROM " . VOTE_USERS_TABLE . "
WHERE vote_id IN ($vote_ids)";
$db->sql_query($sql);
}
$db->sql_freeresult($result);
include($phpbb_root_path . "includes/prune.$phpEx");
prune($from_id, 0, true); // Delete everything from forum
}
else
{
$sql = "SELECT *
FROM " . FORUMS_TABLE . "
WHERE forum_id IN ($from_id, $to_id)";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't verify existence of forums", "", __LINE__, __FILE__, $sql);
}
 
if($db->sql_numrows($result) != 2)
{
message_die(GENERAL_ERROR, "Ambiguous forum ID's", "", __LINE__, __FILE__);
}
$sql = "UPDATE " . TOPICS_TABLE . "
SET forum_id = $to_id
WHERE forum_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't move topics to other forum", "", __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . POSTS_TABLE . "
SET forum_id = $to_id
WHERE forum_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't move posts to other forum", "", __LINE__, __FILE__, $sql);
}
sync('forum', $to_id);
}
 
// Alter Mod level if appropriate - 2.0.4
$sql = "SELECT ug.user_id
FROM " . AUTH_ACCESS_TABLE . " a, " . USER_GROUP_TABLE . " ug
WHERE a.forum_id <> $from_id
AND a.auth_mod = 1
AND ug.group_id = a.group_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain moderator list", "", __LINE__, __FILE__, $sql);
}
 
if ($row = $db->sql_fetchrow($result))
{
$user_ids = '';
do
{
$user_ids .= (($user_ids != '') ? ', ' : '' ) . $row['user_id'];
}
while ($row = $db->sql_fetchrow($result));
 
$sql = "SELECT ug.user_id
FROM " . AUTH_ACCESS_TABLE . " a, " . USER_GROUP_TABLE . " ug
WHERE a.forum_id = $from_id
AND a.auth_mod = 1
AND ug.group_id = a.group_id
AND ug.user_id NOT IN ($user_ids)";
if( !$result2 = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain moderator list", "", __LINE__, __FILE__, $sql);
}
if ($row = $db->sql_fetchrow($result2))
{
$user_ids = '';
do
{
$user_ids .= (($user_ids != '') ? ', ' : '' ) . $row['user_id'];
}
while ($row = $db->sql_fetchrow($result2));
 
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . USER . "
WHERE user_id IN ($user_ids)
AND user_level <> " . ADMIN;
$db->sql_query($sql);
}
$db->sql_freeresult($result);
 
}
$db->sql_freeresult($result2);
 
$sql = "DELETE FROM " . FORUMS_TABLE . "
WHERE forum_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete forum", "", __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . AUTH_ACCESS_TABLE . "
WHERE forum_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete forum", "", __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . PRUNE_TABLE . "
WHERE forum_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete forum prune information!", "", __LINE__, __FILE__, $sql);
}
 
$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
 
break;
case 'deletecat':
//
// Show form to delete a category
//
$cat_id = intval($HTTP_GET_VARS[POST_CAT_URL]);
 
$buttonvalue = $lang['Move_and_Delete'];
$newmode = 'movedelcat';
$catinfo = get_info('category', $cat_id);
$name = $catinfo['cat_title'];
 
if ($catinfo['number'] == 1)
{
$sql = "SELECT count(*) as total
FROM ". FORUMS_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get Forum count", "", __LINE__, __FILE__, $sql);
}
$count = $db->sql_fetchrow($result);
$count = $count['total'];
 
if ($count > 0)
{
message_die(GENERAL_ERROR, $lang['Must_delete_forums']);
}
else
{
$select_to = $lang['Nowhere_to_move'];
}
}
else
{
$select_to = '<select name="to_id">';
$select_to .= get_list('category', $cat_id, 0);
$select_to .= '</select>';
}
 
$template->set_filenames(array(
"body" => "admin/forum_delete_body.tpl")
);
 
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $newmode . '" /><input type="hidden" name="from_id" value="' . $cat_id . '" />';
 
$template->assign_vars(array(
'NAME' => $name,
 
'L_FORUM_DELETE' => $lang['Forum_delete'],
'L_FORUM_DELETE_EXPLAIN' => $lang['Forum_delete_explain'],
'L_MOVE_CONTENTS' => $lang['Move_contents'],
'L_FORUM_NAME' => $lang['Forum_name'],
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_FORUM_ACTION' => append_sid("admin_forums.$phpEx"),
'S_SELECT_TO' => $select_to,
'S_SUBMIT_VALUE' => $buttonvalue)
);
 
$template->pparse("body");
break;
 
case 'movedelcat':
//
// Move or delete a category in the DB
//
$from_id = intval($HTTP_POST_VARS['from_id']);
$to_id = intval($HTTP_POST_VARS['to_id']);
 
if (!empty($to_id))
{
$sql = "SELECT *
FROM " . CATEGORIES_TABLE . "
WHERE cat_id IN ($from_id, $to_id)";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't verify existence of categories", "", __LINE__, __FILE__, $sql);
}
if($db->sql_numrows($result) != 2)
{
message_die(GENERAL_ERROR, "Ambiguous category ID's", "", __LINE__, __FILE__);
}
 
$sql = "UPDATE " . FORUMS_TABLE . "
SET cat_id = $to_id
WHERE cat_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't move forums to other category", "", __LINE__, __FILE__, $sql);
}
}
 
$sql = "DELETE FROM " . CATEGORIES_TABLE ."
WHERE cat_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete category", "", __LINE__, __FILE__, $sql);
}
 
$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
 
break;
 
case 'forum_order':
//
// Change order of forums in the DB
//
$move = intval($HTTP_GET_VARS['move']);
$forum_id = intval($HTTP_GET_VARS[POST_FORUM_URL]);
 
$forum_info = get_info('forum', $forum_id);
 
$cat_id = $forum_info['cat_id'];
 
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_order = forum_order + $move
WHERE forum_id = $forum_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't change category order", "", __LINE__, __FILE__, $sql);
}
 
renumber_order('forum', $forum_info['cat_id']);
$show_index = TRUE;
 
break;
case 'cat_order':
//
// Change order of categories in the DB
//
$move = intval($HTTP_GET_VARS['move']);
$cat_id = intval($HTTP_GET_VARS[POST_CAT_URL]);
 
$sql = "UPDATE " . CATEGORIES_TABLE . "
SET cat_order = cat_order + $move
WHERE cat_id = $cat_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't change category order", "", __LINE__, __FILE__, $sql);
}
 
renumber_order('category');
$show_index = TRUE;
 
break;
 
case 'forum_sync':
sync('forum', intval($HTTP_GET_VARS[POST_FORUM_URL]));
$show_index = TRUE;
 
break;
 
default:
message_die(GENERAL_MESSAGE, $lang['No_mode']);
break;
}
 
if ($show_index != TRUE)
{
include('./page_footer_admin.'.$phpEx);
exit;
}
}
 
//
// Start page proper
//
$template->set_filenames(array(
"body" => "admin/forum_admin_body.tpl")
);
 
$template->assign_vars(array(
'S_FORUM_ACTION' => append_sid("admin_forums.$phpEx"),
'L_FORUM_TITLE' => $lang['Forum_admin'],
'L_FORUM_EXPLAIN' => $lang['Forum_admin_explain'],
'L_CREATE_FORUM' => $lang['Create_forum'],
'L_CREATE_CATEGORY' => $lang['Create_category'],
'L_EDIT' => $lang['Edit'],
'L_DELETE' => $lang['Delete'],
'L_MOVE_UP' => $lang['Move_up'],
'L_MOVE_DOWN' => $lang['Move_down'],
'L_RESYNC' => $lang['Resync'])
);
 
$sql = "SELECT cat_id, cat_title, cat_order
FROM " . CATEGORIES_TABLE . "
ORDER BY cat_order";
if( !$q_categories = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not query categories list", "", __LINE__, __FILE__, $sql);
}
 
if( $total_categories = $db->sql_numrows($q_categories) )
{
$category_rows = $db->sql_fetchrowset($q_categories);
 
$sql = "SELECT *
FROM " . FORUMS_TABLE . "
ORDER BY cat_id, forum_order";
if(!$q_forums = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not query forums information", "", __LINE__, __FILE__, $sql);
}
 
if( $total_forums = $db->sql_numrows($q_forums) )
{
$forum_rows = $db->sql_fetchrowset($q_forums);
}
 
//
// Okay, let's build the index
//
$gen_cat = array();
 
for($i = 0; $i < $total_categories; $i++)
{
$cat_id = $category_rows[$i]['cat_id'];
 
$template->assign_block_vars("catrow", array(
'S_ADD_FORUM_SUBMIT' => "addforum[$cat_id]",
'S_ADD_FORUM_NAME' => "forumname[$cat_id]",
 
'CAT_ID' => $cat_id,
'CAT_DESC' => $category_rows[$i]['cat_title'],
 
'U_CAT_EDIT' => append_sid("admin_forums.$phpEx?mode=editcat&amp;" . POST_CAT_URL . "=$cat_id"),
'U_CAT_DELETE' => append_sid("admin_forums.$phpEx?mode=deletecat&amp;" . POST_CAT_URL . "=$cat_id"),
'U_CAT_MOVE_UP' => append_sid("admin_forums.$phpEx?mode=cat_order&amp;move=-15&amp;" . POST_CAT_URL . "=$cat_id"),
'U_CAT_MOVE_DOWN' => append_sid("admin_forums.$phpEx?mode=cat_order&amp;move=15&amp;" . POST_CAT_URL . "=$cat_id"),
'U_VIEWCAT' => append_sid($phpbb_root_path."index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
);
 
for($j = 0; $j < $total_forums; $j++)
{
$forum_id = $forum_rows[$j]['forum_id'];
if ($forum_rows[$j]['cat_id'] == $cat_id)
{
 
$template->assign_block_vars("catrow.forumrow", array(
'FORUM_NAME' => $forum_rows[$j]['forum_name'],
'FORUM_DESC' => $forum_rows[$j]['forum_desc'],
'ROW_COLOR' => $row_color,
'NUM_TOPICS' => $forum_rows[$j]['forum_topics'],
'NUM_POSTS' => $forum_rows[$j]['forum_posts'],
 
'U_VIEWFORUM' => append_sid($phpbb_root_path."viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"),
'U_FORUM_EDIT' => append_sid("admin_forums.$phpEx?mode=editforum&amp;" . POST_FORUM_URL . "=$forum_id"),
'U_FORUM_DELETE' => append_sid("admin_forums.$phpEx?mode=deleteforum&amp;" . POST_FORUM_URL . "=$forum_id"),
'U_FORUM_MOVE_UP' => append_sid("admin_forums.$phpEx?mode=forum_order&amp;move=-15&amp;" . POST_FORUM_URL . "=$forum_id"),
'U_FORUM_MOVE_DOWN' => append_sid("admin_forums.$phpEx?mode=forum_order&amp;move=15&amp;" . POST_FORUM_URL . "=$forum_id"),
'U_FORUM_RESYNC' => append_sid("admin_forums.$phpEx?mode=forum_sync&amp;" . POST_FORUM_URL . "=$forum_id"))
);
 
}// if ... forumid == catid
} // for ... forums
 
} // for ... categories
 
}// if ... total_categories
 
$template->pparse("body");
 
include('./page_footer_admin.'.$phpEx);
 
?>
/Forum/admin/admin_groups.php
0,0 → 1,417
<?php
/***************************************************************************
* admin_groups.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_groups.php,v 1.25.2.13 2006/03/09 19:42:41 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', 1);
 
if ( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Groups']['Manage'] = $filename;
 
return;
}
 
//
// Load default header
//
$phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
 
if ( isset($HTTP_POST_VARS[POST_GROUPS_URL]) || isset($HTTP_GET_VARS[POST_GROUPS_URL]) )
{
$group_id = ( isset($HTTP_POST_VARS[POST_GROUPS_URL]) ) ? intval($HTTP_POST_VARS[POST_GROUPS_URL]) : intval($HTTP_GET_VARS[POST_GROUPS_URL]);
}
else
{
$group_id = 0;
}
 
if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
$mode = htmlspecialchars($mode);
}
else
{
$mode = '';
}
 
if ( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) )
{
//
// Ok they are editing a group or creating a new group
//
$template->set_filenames(array(
'body' => 'admin/group_edit_body.tpl')
);
 
if ( isset($HTTP_POST_VARS['edit']) )
{
//
// They're editing. Grab the vars.
//
$sql = "SELECT *
FROM " . GROUPS_TABLE . "
WHERE group_single_user <> " . TRUE . "
AND group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error getting group information', '', __LINE__, __FILE__, $sql);
}
 
if ( !($group_info = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_MESSAGE, $lang['Group_not_exist']);
}
 
$mode = 'editgroup';
$template->assign_block_vars('group_edit', array());
 
}
else if ( isset($HTTP_POST_VARS['new']) )
{
$group_info = array (
'group_name' => '',
'group_description' => '',
'group_moderator' => '',
'group_type' => GROUP_OPEN);
$group_open = ' checked="checked"';
 
$mode = 'newgroup';
 
}
 
//
// Ok, now we know everything about them, let's show the page.
//
if ($group_info['group_moderator'] != '')
{
$sql = "SELECT user_id, username
FROM " . USERS_TABLE . "
WHERE user_id = " . $group_info['group_moderator'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user info for moderator list', '', __LINE__, __FILE__, $sql);
}
 
if ( !($row = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user info for moderator list', '', __LINE__, __FILE__, $sql);
}
 
$group_moderator = $row['username'];
}
else
{
$group_moderator = '';
}
 
$group_open = ( $group_info['group_type'] == GROUP_OPEN ) ? ' checked="checked"' : '';
$group_closed = ( $group_info['group_type'] == GROUP_CLOSED ) ? ' checked="checked"' : '';
$group_hidden = ( $group_info['group_type'] == GROUP_HIDDEN ) ? ' checked="checked"' : '';
 
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />';
 
$template->assign_vars(array(
'GROUP_NAME' => $group_info['group_name'],
'GROUP_DESCRIPTION' => $group_info['group_description'],
'GROUP_MODERATOR' => $group_moderator,
 
'L_GROUP_TITLE' => $lang['Group_administration'],
'L_GROUP_EDIT_DELETE' => ( isset($HTTP_POST_VARS['new']) ) ? $lang['New_group'] : $lang['Edit_group'],
'L_GROUP_NAME' => $lang['group_name'],
'L_GROUP_DESCRIPTION' => $lang['group_description'],
'L_GROUP_MODERATOR' => $lang['group_moderator'],
'L_FIND_USERNAME' => $lang['Find_username'],
'L_GROUP_STATUS' => $lang['group_status'],
'L_GROUP_OPEN' => $lang['group_open'],
'L_GROUP_CLOSED' => $lang['group_closed'],
'L_GROUP_HIDDEN' => $lang['group_hidden'],
'L_GROUP_DELETE' => $lang['group_delete'],
'L_GROUP_DELETE_CHECK' => $lang['group_delete_check'],
'L_SUBMIT' => $lang['Submit'],
'L_RESET' => $lang['Reset'],
'L_DELETE_MODERATOR' => $lang['delete_group_moderator'],
'L_DELETE_MODERATOR_EXPLAIN' => $lang['delete_moderator_explain'],
'L_YES' => $lang['Yes'],
 
'U_SEARCH_USER' => append_sid("../search.$phpEx?mode=searchuser"),
 
'S_GROUP_OPEN_TYPE' => GROUP_OPEN,
'S_GROUP_CLOSED_TYPE' => GROUP_CLOSED,
'S_GROUP_HIDDEN_TYPE' => GROUP_HIDDEN,
'S_GROUP_OPEN_CHECKED' => $group_open,
'S_GROUP_CLOSED_CHECKED' => $group_closed,
'S_GROUP_HIDDEN_CHECKED' => $group_hidden,
'S_GROUP_ACTION' => append_sid("admin_groups.$phpEx"),
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
 
$template->pparse('body');
 
}
else if ( isset($HTTP_POST_VARS['group_update']) )
{
//
// Ok, they are submitting a group, let's save the data based on if it's new or editing
//
if ( isset($HTTP_POST_VARS['group_delete']) )
{
//
// Reset User Moderator Level
//
 
// Is Group moderating a forum ?
$sql = "SELECT auth_mod FROM " . AUTH_ACCESS_TABLE . "
WHERE group_id = " . $group_id;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select auth_access', '', __LINE__, __FILE__, $sql);
}
 
$row = $db->sql_fetchrow($result);
if (intval($row['auth_mod']) == 1)
{
// Yes, get the assigned users and update their Permission if they are no longer moderator of one of the forums
$sql = "SELECT user_id FROM " . USER_GROUP_TABLE . "
WHERE group_id = " . $group_id;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select user_group', '', __LINE__, __FILE__, $sql);
}
 
$rows = $db->sql_fetchrowset($result);
for ($i = 0; $i < count($rows); $i++)
{
$sql = "SELECT g.group_id FROM " . AUTH_ACCESS_TABLE . " a, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug
WHERE (a.auth_mod = 1) AND (g.group_id = a.group_id) AND (a.group_id = ug.group_id) AND (g.group_id = ug.group_id)
AND (ug.user_id = " . intval($rows[$i]['user_id']) . ") AND (ug.group_id <> " . $group_id . ")";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain moderator permissions', '', __LINE__, __FILE__, $sql);
}
 
if ($db->sql_numrows($result) == 0)
{
$sql = "UPDATE " . USERS_TABLE . " SET user_level = " . USER . "
WHERE user_level = " . MOD . " AND user_id = " . intval($rows[$i]['user_id']);
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update moderator permissions', '', __LINE__, __FILE__, $sql);
}
}
}
}
 
//
// Delete Group
//
$sql = "DELETE FROM " . GROUPS_TABLE . "
WHERE group_id = " . $group_id;
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update group', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE FROM " . USER_GROUP_TABLE . "
WHERE group_id = " . $group_id;
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update user_group', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE FROM " . AUTH_ACCESS_TABLE . "
WHERE group_id = " . $group_id;
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update auth_access', '', __LINE__, __FILE__, $sql);
}
 
$message = $lang['Deleted_group'] . '<br /><br />' . sprintf($lang['Click_return_groupsadmin'], '<a href="' . append_sid("admin_groups.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
}
else
{
$group_type = isset($HTTP_POST_VARS['group_type']) ? intval($HTTP_POST_VARS['group_type']) : GROUP_OPEN;
$group_name = isset($HTTP_POST_VARS['group_name']) ? htmlspecialchars(trim($HTTP_POST_VARS['group_name'])) : '';
$group_description = isset($HTTP_POST_VARS['group_description']) ? trim($HTTP_POST_VARS['group_description']) : '';
$group_moderator = isset($HTTP_POST_VARS['username']) ? $HTTP_POST_VARS['username'] : '';
$delete_old_moderator = isset($HTTP_POST_VARS['delete_old_moderator']) ? true : false;
 
if ( $group_name == '' )
{
message_die(GENERAL_MESSAGE, $lang['No_group_name']);
}
else if ( $group_moderator == '' )
{
message_die(GENERAL_MESSAGE, $lang['No_group_moderator']);
}
$this_userdata = get_userdata($group_moderator, true);
$group_moderator = $this_userdata['user_id'];
 
if ( !$group_moderator )
{
message_die(GENERAL_MESSAGE, $lang['No_group_moderator']);
}
if( $mode == "editgroup" )
{
$sql = "SELECT *
FROM " . GROUPS_TABLE . "
WHERE group_single_user <> " . TRUE . "
AND group_id = " . $group_id;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error getting group information', '', __LINE__, __FILE__, $sql);
}
 
if( !($group_info = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_MESSAGE, $lang['Group_not_exist']);
}
if ( $group_info['group_moderator'] != $group_moderator )
{
if ( $delete_old_moderator )
{
$sql = "DELETE FROM " . USER_GROUP_TABLE . "
WHERE user_id = " . $group_info['group_moderator'] . "
AND group_id = " . $group_id;
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update group moderator', '', __LINE__, __FILE__, $sql);
}
}
 
$sql = "SELECT user_id
FROM " . USER_GROUP_TABLE . "
WHERE user_id = $group_moderator
AND group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Failed to obtain current group moderator info', '', __LINE__, __FILE__, $sql);
}
 
if ( !($row = $db->sql_fetchrow($result)) )
{
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending)
VALUES (" . $group_id . ", " . $group_moderator . ", 0)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update group moderator', '', __LINE__, __FILE__, $sql);
}
}
}
 
$sql = "UPDATE " . GROUPS_TABLE . "
SET group_type = $group_type, group_name = '" . str_replace("\'", "''", $group_name) . "', group_description = '" . str_replace("\'", "''", $group_description) . "', group_moderator = $group_moderator
WHERE group_id = $group_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update group', '', __LINE__, __FILE__, $sql);
}
$message = $lang['Updated_group'] . '<br /><br />' . sprintf($lang['Click_return_groupsadmin'], '<a href="' . append_sid("admin_groups.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');;
 
message_die(GENERAL_MESSAGE, $message);
}
else if( $mode == 'newgroup' )
{
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_type, group_name, group_description, group_moderator, group_single_user)
VALUES ($group_type, '" . str_replace("\'", "''", $group_name) . "', '" . str_replace("\'", "''", $group_description) . "', $group_moderator, '0')";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert new group', '', __LINE__, __FILE__, $sql);
}
$new_group_id = $db->sql_nextid();
 
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending)
VALUES ($new_group_id, $group_moderator, 0)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert new user-group info', '', __LINE__, __FILE__, $sql);
}
$message = $lang['Added_new_group'] . '<br /><br />' . sprintf($lang['Click_return_groupsadmin'], '<a href="' . append_sid("admin_groups.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');;
 
message_die(GENERAL_MESSAGE, $message);
 
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_group_action']);
}
}
}
else
{
$sql = "SELECT group_id, group_name
FROM " . GROUPS_TABLE . "
WHERE group_single_user <> " . TRUE . "
ORDER BY group_name";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain group list', '', __LINE__, __FILE__, $sql);
}
 
$select_list = '';
if ( $row = $db->sql_fetchrow($result) )
{
$select_list .= '<select name="' . POST_GROUPS_URL . '">';
do
{
$select_list .= '<option value="' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
}
while ( $row = $db->sql_fetchrow($result) );
$select_list .= '</select>';
}
 
$template->set_filenames(array(
'body' => 'admin/group_select_body.tpl')
);
 
$template->assign_vars(array(
'L_GROUP_TITLE' => $lang['Group_administration'],
'L_GROUP_EXPLAIN' => $lang['Group_admin_explain'],
'L_GROUP_SELECT' => $lang['Select_group'],
'L_LOOK_UP' => $lang['Look_up_group'],
'L_CREATE_NEW_GROUP' => $lang['New_group'],
 
'S_GROUP_ACTION' => append_sid("admin_groups.$phpEx"),
'S_GROUP_SELECT' => $select_list)
);
 
if ( $select_list != '' )
{
$template->assign_block_vars('select_box', array());
}
 
$template->pparse('body');
}
 
include('./page_footer_admin.'.$phpEx);
 
?>
/Forum/admin/admin_mass_email.php
0,0 → 1,213
<?php
/***************************************************************************
* admin_mass_email.php
* -------------------
* begin : Thu May 31, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_mass_email.php,v 1.15.2.7 2003/05/03 23:24:01 acydburn Exp $
*
****************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', 1);
 
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['General']['Mass_Email'] = $filename;
return;
}
 
//
// Load default header
//
$no_page_header = TRUE;
$phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
 
//
// Increase maximum execution time in case of a lot of users, but don't complain about it if it isn't
// allowed.
//
@set_time_limit(1200);
 
$message = '';
$subject = '';
 
//
// Do the job ...
//
if ( isset($HTTP_POST_VARS['submit']) )
{
$subject = stripslashes(trim($HTTP_POST_VARS['subject']));
$message = stripslashes(trim($HTTP_POST_VARS['message']));
$error = FALSE;
$error_msg = '';
 
if ( empty($subject) )
{
$error = true;
$error_msg .= ( !empty($error_msg) ) ? '<br />' . $lang['Empty_subject'] : $lang['Empty_subject'];
}
 
if ( empty($message) )
{
$error = true;
$error_msg .= ( !empty($error_msg) ) ? '<br />' . $lang['Empty_message'] : $lang['Empty_message'];
}
 
$group_id = intval($HTTP_POST_VARS[POST_GROUPS_URL]);
 
$sql = ( $group_id != -1 ) ? "SELECT u.user_email FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug WHERE ug.group_id = $group_id AND ug.user_pending <> " . TRUE . " AND u.user_id = ug.user_id" : "SELECT user_email FROM " . USERS_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select group members', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
$bcc_list = array();
do
{
$bcc_list[] = $row['user_email'];
}
while ( $row = $db->sql_fetchrow($result) );
 
$db->sql_freeresult($result);
}
else
{
$message = ( $group_id != -1 ) ? $lang['Group_not_exist'] : $lang['No_such_user'];
 
$error = true;
$error_msg .= ( !empty($error_msg) ) ? '<br />' . $message : $message;
}
 
if ( !$error )
{
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
 
//
// Let's do some checking to make sure that mass mail functions
// are working in win32 versions of php.
//
if ( preg_match('/[c-z]:\\\.*/i', getenv('PATH')) && !$board_config['smtp_delivery'])
{
$ini_val = ( @phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var';
 
// We are running on windows, force delivery to use our smtp functions
// since php's are broken by default
$board_config['smtp_delivery'] = 1;
$board_config['smtp_host'] = @$ini_val('SMTP');
}
 
$emailer = new emailer($board_config['smtp_delivery']);
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
 
for ($i = 0; $i < count($bcc_list); $i++)
{
$emailer->bcc($bcc_list[$i]);
}
 
$email_headers = 'X-AntiAbuse: Board servername - ' . $board_config['server_name'] . "\n";
$email_headers .= 'X-AntiAbuse: User_id - ' . $userdata['user_id'] . "\n";
$email_headers .= 'X-AntiAbuse: Username - ' . $userdata['username'] . "\n";
$email_headers .= 'X-AntiAbuse: User IP - ' . decode_ip($user_ip) . "\n";
 
$emailer->use_template('admin_send_email');
$emailer->email_address($board_config['board_email']);
$emailer->set_subject($subject);
$emailer->extra_headers($email_headers);
 
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'BOARD_EMAIL' => $board_config['board_email'],
'MESSAGE' => $message)
);
$emailer->send();
$emailer->reset();
 
message_die(GENERAL_MESSAGE, $lang['Email_sent'] . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>'));
}
}
 
if ( $error )
{
$template->set_filenames(array(
'reg_header' => 'error_body.tpl')
);
$template->assign_vars(array(
'ERROR_MESSAGE' => $error_msg)
);
$template->assign_var_from_handle('ERROR_BOX', 'reg_header');
}
 
//
// Initial selection
//
 
$sql = "SELECT group_id, group_name
FROM ".GROUPS_TABLE . "
WHERE group_single_user <> 1";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain list of groups', '', __LINE__, __FILE__, $sql);
}
 
$select_list = '<select name = "' . POST_GROUPS_URL . '"><option value = "-1">' . $lang['All_users'] . '</option>';
if ( $row = $db->sql_fetchrow($result) )
{
do
{
$select_list .= '<option value = "' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
}
while ( $row = $db->sql_fetchrow($result) );
}
$select_list .= '</select>';
 
//
// Generate page
//
include('./page_header_admin.'.$phpEx);
 
$template->set_filenames(array(
'body' => 'admin/user_email_body.tpl')
);
 
$template->assign_vars(array(
'MESSAGE' => $message,
'SUBJECT' => $subject,
 
'L_EMAIL_TITLE' => $lang['Email'],
'L_EMAIL_EXPLAIN' => $lang['Mass_email_explain'],
'L_COMPOSE' => $lang['Compose'],
'L_RECIPIENTS' => $lang['Recipients'],
'L_EMAIL_SUBJECT' => $lang['Subject'],
'L_EMAIL_MSG' => $lang['Message'],
'L_EMAIL' => $lang['Email'],
'L_NOTICE' => $notice,
 
'S_USER_ACTION' => append_sid('admin_mass_email.'.$phpEx),
'S_GROUP_SELECT' => $select_list)
);
 
$template->pparse('body');
 
include('./page_footer_admin.'.$phpEx);
 
?>
/Forum/admin/admin_ranks.php
0,0 → 1,349
<?php
/***************************************************************************
* admin_ranks.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_ranks.php,v 1.13.2.8 2006/04/13 09:56:48 grahamje Exp $
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['Users']['Ranks'] = $file;
return;
}
 
define('IN_PHPBB', 1);
 
//
// Let's set the root dir for phpBB
//
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
 
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? true : false;
$no_page_header = $cancel;
 
require('./pagestart.' . $phpEx);
 
if ($cancel)
{
redirect('admin/' . append_sid("admin_ranks.$phpEx", true));
}
 
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = (isset($HTTP_GET_VARS['mode'])) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
$mode = htmlspecialchars($mode);
}
else
{
//
// These could be entered via a form button
//
if( isset($HTTP_POST_VARS['add']) )
{
$mode = "add";
}
else if( isset($HTTP_POST_VARS['save']) )
{
$mode = "save";
}
else
{
$mode = "";
}
}
 
// Restrict mode input to valid options
$mode = ( in_array($mode, array('add', 'edit', 'save', 'delete')) ) ? $mode : '';
 
if( $mode != "" )
{
if( $mode == "edit" || $mode == "add" )
{
//
// They want to add a new rank, show the form.
//
$rank_id = ( isset($HTTP_GET_VARS['id']) ) ? intval($HTTP_GET_VARS['id']) : 0;
$s_hidden_fields = "";
if( $mode == "edit" )
{
if( empty($rank_id) )
{
message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);
}
 
$sql = "SELECT * FROM " . RANKS_TABLE . "
WHERE rank_id = $rank_id";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain rank data", "", __LINE__, __FILE__, $sql);
}
$rank_info = $db->sql_fetchrow($result);
$s_hidden_fields .= '<input type="hidden" name="id" value="' . $rank_id . '" />';
 
}
else
{
$rank_info['rank_special'] = 0;
}
 
$s_hidden_fields .= '<input type="hidden" name="mode" value="save" />';
 
$rank_is_special = ( $rank_info['rank_special'] ) ? "checked=\"checked\"" : "";
$rank_is_not_special = ( !$rank_info['rank_special'] ) ? "checked=\"checked\"" : "";
$template->set_filenames(array(
"body" => "admin/ranks_edit_body.tpl")
);
 
$template->assign_vars(array(
"RANK" => $rank_info['rank_title'],
"SPECIAL_RANK" => $rank_is_special,
"NOT_SPECIAL_RANK" => $rank_is_not_special,
"MINIMUM" => ( $rank_is_special ) ? "" : $rank_info['rank_min'],
"IMAGE" => ( $rank_info['rank_image'] != "" ) ? $rank_info['rank_image'] : "",
"IMAGE_DISPLAY" => ( $rank_info['rank_image'] != "" ) ? '<img src="../' . $rank_info['rank_image'] . '" />' : "",
"L_RANKS_TITLE" => $lang['Ranks_title'],
"L_RANKS_TEXT" => $lang['Ranks_explain'],
"L_RANK_TITLE" => $lang['Rank_title'],
"L_RANK_SPECIAL" => $lang['Rank_special'],
"L_RANK_MINIMUM" => $lang['Rank_minimum'],
"L_RANK_IMAGE" => $lang['Rank_image'],
"L_RANK_IMAGE_EXPLAIN" => $lang['Rank_image_explain'],
"L_SUBMIT" => $lang['Submit'],
"L_RESET" => $lang['Reset'],
"L_YES" => $lang['Yes'],
"L_NO" => $lang['No'],
"S_RANK_ACTION" => append_sid("admin_ranks.$phpEx"),
"S_HIDDEN_FIELDS" => $s_hidden_fields)
);
}
else if( $mode == "save" )
{
//
// Ok, they sent us our info, let's update it.
//
$rank_id = ( isset($HTTP_POST_VARS['id']) ) ? intval($HTTP_POST_VARS['id']) : 0;
$rank_title = ( isset($HTTP_POST_VARS['title']) ) ? trim($HTTP_POST_VARS['title']) : "";
$special_rank = ( $HTTP_POST_VARS['special_rank'] == 1 ) ? TRUE : 0;
$min_posts = ( isset($HTTP_POST_VARS['min_posts']) ) ? intval($HTTP_POST_VARS['min_posts']) : -1;
$rank_image = ( (isset($HTTP_POST_VARS['rank_image'])) ) ? trim($HTTP_POST_VARS['rank_image']) : "";
 
if( $rank_title == "" )
{
message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);
}
 
if( $special_rank == 1 )
{
$max_posts = -1;
$min_posts = -1;
}
 
//
// The rank image has to be a jpg, gif or png
//
if($rank_image != "")
{
if ( !preg_match("/(\.gif|\.png|\.jpg)$/is", $rank_image))
{
$rank_image = "";
}
}
 
if ($rank_id)
{
if (!$special_rank)
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_rank = 0
WHERE user_rank = $rank_id";
 
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, $lang['No_update_ranks'], "", __LINE__, __FILE__, $sql);
}
}
$sql = "UPDATE " . RANKS_TABLE . "
SET rank_title = '" . str_replace("\'", "''", $rank_title) . "', rank_special = $special_rank, rank_min = $min_posts, rank_image = '" . str_replace("\'", "''", $rank_image) . "'
WHERE rank_id = $rank_id";
 
$message = $lang['Rank_updated'];
}
else
{
$sql = "INSERT INTO " . RANKS_TABLE . " (rank_title, rank_special, rank_min, rank_image)
VALUES ('" . str_replace("\'", "''", $rank_title) . "', $special_rank, $min_posts, '" . str_replace("\'", "''", $rank_image) . "')";
 
$message = $lang['Rank_added'];
}
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update/insert into ranks table", "", __LINE__, __FILE__, $sql);
}
 
$message .= "<br /><br />" . sprintf($lang['Click_return_rankadmin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
 
}
else if( $mode == "delete" )
{
//
// Ok, they want to delete their rank
//
if( isset($HTTP_POST_VARS['id']) || isset($HTTP_GET_VARS['id']) )
{
$rank_id = ( isset($HTTP_POST_VARS['id']) ) ? intval($HTTP_POST_VARS['id']) : intval($HTTP_GET_VARS['id']);
}
else
{
$rank_id = 0;
}
 
$confirm = isset($HTTP_POST_VARS['confirm']);
if( $rank_id && $confirm )
{
$sql = "DELETE FROM " . RANKS_TABLE . "
WHERE rank_id = $rank_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete rank data", "", __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . USERS_TABLE . "
SET user_rank = 0
WHERE user_rank = $rank_id";
 
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, $lang['No_update_ranks'], "", __LINE__, __FILE__, $sql);
}
 
$message = $lang['Rank_removed'] . "<br /><br />" . sprintf($lang['Click_return_rankadmin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
 
}
elseif( $rank_id && !$confirm)
{
// Present the confirmation screen to the user
$template->set_filenames(array(
'body' => 'admin/confirm_body.tpl')
);
 
$hidden_fields = '<input type="hidden" name="mode" value="delete" /><input type="hidden" name="id" value="' . $rank_id . '" />';
 
$template->assign_vars(array(
'MESSAGE_TITLE' => $lang['Confirm'],
'MESSAGE_TEXT' => $lang['Confirm_delete_rank'],
 
'L_YES' => $lang['Yes'],
'L_NO' => $lang['No'],
 
'S_CONFIRM_ACTION' => append_sid("admin_ranks.$phpEx"),
'S_HIDDEN_FIELDS' => $hidden_fields)
);
}
else
{
message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);
}
}
 
$template->pparse("body");
 
include('./page_footer_admin.'.$phpEx);
}
 
//
// Show the default page
//
$template->set_filenames(array(
"body" => "admin/ranks_list_body.tpl")
);
 
$sql = "SELECT * FROM " . RANKS_TABLE . "
ORDER BY rank_min ASC, rank_special ASC";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain ranks data", "", __LINE__, __FILE__, $sql);
}
$rank_count = $db->sql_numrows($result);
 
$rank_rows = $db->sql_fetchrowset($result);
 
$template->assign_vars(array(
"L_RANKS_TITLE" => $lang['Ranks_title'],
"L_RANKS_TEXT" => $lang['Ranks_explain'],
"L_RANK" => $lang['Rank_title'],
"L_RANK_MINIMUM" => $lang['Rank_minimum'],
"L_SPECIAL_RANK" => $lang['Rank_special'],
"L_EDIT" => $lang['Edit'],
"L_DELETE" => $lang['Delete'],
"L_ADD_RANK" => $lang['Add_new_rank'],
"L_ACTION" => $lang['Action'],
"S_RANKS_ACTION" => append_sid("admin_ranks.$phpEx"))
);
 
for($i = 0; $i < $rank_count; $i++)
{
$rank = $rank_rows[$i]['rank_title'];
$special_rank = $rank_rows[$i]['rank_special'];
$rank_id = $rank_rows[$i]['rank_id'];
$rank_min = $rank_rows[$i]['rank_min'];
if( $special_rank == 1 )
{
$rank_min = $rank_max = "-";
}
 
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
$rank_is_special = ( $special_rank ) ? $lang['Yes'] : $lang['No'];
$template->assign_block_vars("ranks", array(
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
"RANK" => $rank,
"SPECIAL_RANK" => $rank_is_special,
"RANK_MIN" => $rank_min,
 
"U_RANK_EDIT" => append_sid("admin_ranks.$phpEx?mode=edit&amp;id=$rank_id"),
"U_RANK_DELETE" => append_sid("admin_ranks.$phpEx?mode=delete&amp;id=$rank_id"))
);
}
 
$template->pparse("body");
 
include('./page_footer_admin.'.$phpEx);
 
?>
/Forum/admin/admin_smilies.php
0,0 → 1,597
<?php
/***************************************************************************
* admin_smilies.php
* -------------------
* begin : Thu May 31, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_smilies.php,v 1.22.2.18 2006/04/13 09:56:48 grahamje Exp $
*
****************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
/**************************************************************************
* This file will be used for modifying the smiley settings for a board.
**************************************************************************/
 
define('IN_PHPBB', 1);
 
//
// First we do the setmodules stuff for the admin cp.
//
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['General']['Smilies'] = $filename;
 
return;
}
 
//
// Load default header
//
if( isset($HTTP_GET_VARS['export_pack']) )
{
if ( $HTTP_GET_VARS['export_pack'] == "send" )
{
$no_page_header = true;
}
}
 
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
 
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? true : false;
$no_page_header = $cancel;
 
require('./pagestart.' . $phpEx);
 
if ($cancel)
{
redirect('admin/' . append_sid("admin_smilies.$phpEx", true));
}
 
//
// Check to see what mode we should operate in.
//
if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
$mode = htmlspecialchars($mode);
}
else
{
$mode = "";
}
 
$delimeter = '=+:';
 
//
// Read a listing of uploaded smilies for use in the add or edit smliey code...
//
$dir = @opendir($phpbb_root_path . $board_config['smilies_path']);
 
while($file = @readdir($dir))
{
if( !@is_dir(phpbb_realpath($phpbb_root_path . $board_config['smilies_path'] . '/' . $file)) )
{
$img_size = @getimagesize($phpbb_root_path . $board_config['smilies_path'] . '/' . $file);
 
if( $img_size[0] && $img_size[1] )
{
$smiley_images[] = $file;
}
else if( eregi('.pak$', $file) )
{
$smiley_paks[] = $file;
}
}
}
 
@closedir($dir);
 
//
// Select main mode
//
if( isset($HTTP_GET_VARS['import_pack']) || isset($HTTP_POST_VARS['import_pack']) )
{
//
// Import a list a "Smiley Pack"
//
$smile_pak = ( isset($HTTP_POST_VARS['smile_pak']) ) ? $HTTP_POST_VARS['smile_pak'] : $HTTP_GET_VARS['smile_pak'];
$clear_current = ( isset($HTTP_POST_VARS['clear_current']) ) ? $HTTP_POST_VARS['clear_current'] : $HTTP_GET_VARS['clear_current'];
$replace_existing = ( isset($HTTP_POST_VARS['replace']) ) ? $HTTP_POST_VARS['replace'] : $HTTP_GET_VARS['replace'];
 
if ( !empty($smile_pak) )
{
//
// The user has already selected a smile_pak file.. Import it.
//
if( !empty($clear_current) )
{
$sql = "DELETE
FROM " . SMILIES_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete current smilies", "", __LINE__, __FILE__, $sql);
}
}
else
{
$sql = "SELECT code
FROM ". SMILIES_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get current smilies", "", __LINE__, __FILE__, $sql);
}
 
$cur_smilies = $db->sql_fetchrowset($result);
 
for( $i = 0; $i < count($cur_smilies); $i++ )
{
$k = $cur_smilies[$i]['code'];
$smiles[$k] = 1;
}
}
 
$fcontents = @file($phpbb_root_path . $board_config['smilies_path'] . '/'. $smile_pak);
 
if( empty($fcontents) )
{
message_die(GENERAL_ERROR, "Couldn't read smiley pak file", "", __LINE__, __FILE__, $sql);
}
 
for( $i = 0; $i < count($fcontents); $i++ )
{
$smile_data = explode($delimeter, trim(addslashes($fcontents[$i])));
 
for( $j = 2; $j < count($smile_data); $j++)
{
//
// Replace > and < with the proper html_entities for matching.
//
$smile_data[$j] = str_replace("<", "&lt;", $smile_data[$j]);
$smile_data[$j] = str_replace(">", "&gt;", $smile_data[$j]);
$k = $smile_data[$j];
 
if( $smiles[$k] == 1 )
{
if( !empty($replace_existing) )
{
$sql = "UPDATE " . SMILIES_TABLE . "
SET smile_url = '" . str_replace("\'", "''", $smile_data[0]) . "', emoticon = '" . str_replace("\'", "''", $smile_data[1]) . "'
WHERE code = '" . str_replace("\'", "''", $smile_data[$j]) . "'";
}
else
{
$sql = '';
}
}
else
{
$sql = "INSERT INTO " . SMILIES_TABLE . " (code, smile_url, emoticon)
VALUES('" . str_replace("\'", "''", $smile_data[$j]) . "', '" . str_replace("\'", "''", $smile_data[0]) . "', '" . str_replace("\'", "''", $smile_data[1]) . "')";
}
 
if( $sql != '' )
{
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't update smilies!", "", __LINE__, __FILE__, $sql);
}
}
}
}
 
$message = $lang['smiley_import_success'] . "<br /><br />" . sprintf($lang['Click_return_smileadmin'], "<a href=\"" . append_sid("admin_smilies.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
}
else
{
//
// Display the script to get the smile_pak cfg file...
//
$smile_paks_select = "<select name='smile_pak'><option value=''>" . $lang['Select_pak'] . "</option>";
while( list($key, $value) = @each($smiley_paks) )
{
if ( !empty($value) )
{
$smile_paks_select .= "<option>" . $value . "</option>";
}
}
$smile_paks_select .= "</select>";
 
$hidden_vars = "<input type='hidden' name='mode' value='import'>";
 
$template->set_filenames(array(
"body" => "admin/smile_import_body.tpl")
);
 
$template->assign_vars(array(
"L_SMILEY_TITLE" => $lang['smiley_title'],
"L_SMILEY_EXPLAIN" => $lang['smiley_import_inst'],
"L_SMILEY_IMPORT" => $lang['smiley_import'],
"L_SELECT_LBL" => $lang['choose_smile_pak'],
"L_IMPORT" => $lang['import'],
"L_CONFLICTS" => $lang['smile_conflicts'],
"L_DEL_EXISTING" => $lang['del_existing_smileys'],
"L_REPLACE_EXISTING" => $lang['replace_existing'],
"L_KEEP_EXISTING" => $lang['keep_existing'],
 
"S_SMILEY_ACTION" => append_sid("admin_smilies.$phpEx"),
"S_SMILE_SELECT" => $smile_paks_select,
"S_HIDDEN_FIELDS" => $hidden_vars)
);
 
$template->pparse("body");
}
}
else if( isset($HTTP_POST_VARS['export_pack']) || isset($HTTP_GET_VARS['export_pack']) )
{
//
// Export our smiley config as a smiley pak...
//
if ( $HTTP_GET_VARS['export_pack'] == "send" )
{
$sql = "SELECT *
FROM " . SMILIES_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not get smiley list", "", __LINE__, __FILE__, $sql);
}
 
$resultset = $db->sql_fetchrowset($result);
 
$smile_pak = "";
for($i = 0; $i < count($resultset); $i++ )
{
$smile_pak .= $resultset[$i]['smile_url'] . $delimeter;
$smile_pak .= $resultset[$i]['emoticon'] . $delimeter;
$smile_pak .= $resultset[$i]['code'] . "\n";
}
 
header("Content-Type: text/x-delimtext; name=\"smiles.pak\"");
header("Content-disposition: attachment; filename=smiles.pak");
 
echo $smile_pak;
 
exit;
}
 
$message = sprintf($lang['export_smiles'], "<a href=\"" . append_sid("admin_smilies.$phpEx?export_pack=send", true) . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_smileadmin'], "<a href=\"" . append_sid("admin_smilies.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
 
}
else if( isset($HTTP_POST_VARS['add']) || isset($HTTP_GET_VARS['add']) )
{
//
// Admin has selected to add a smiley.
//
 
$template->set_filenames(array(
"body" => "admin/smile_edit_body.tpl")
);
 
$filename_list = "";
for( $i = 0; $i < count($smiley_images); $i++ )
{
$filename_list .= '<option value="' . $smiley_images[$i] . '">' . $smiley_images[$i] . '</option>';
}
 
$s_hidden_fields = '<input type="hidden" name="mode" value="savenew" />';
 
$template->assign_vars(array(
"L_SMILEY_TITLE" => $lang['smiley_title'],
"L_SMILEY_CONFIG" => $lang['smiley_config'],
"L_SMILEY_EXPLAIN" => $lang['smile_desc'],
"L_SMILEY_CODE" => $lang['smiley_code'],
"L_SMILEY_URL" => $lang['smiley_url'],
"L_SMILEY_EMOTION" => $lang['smiley_emot'],
"L_SUBMIT" => $lang['Submit'],
"L_RESET" => $lang['Reset'],
 
"SMILEY_IMG" => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smiley_images[0],
 
"S_SMILEY_ACTION" => append_sid("admin_smilies.$phpEx"),
"S_HIDDEN_FIELDS" => $s_hidden_fields,
"S_FILENAME_OPTIONS" => $filename_list,
"S_SMILEY_BASEDIR" => $phpbb_root_path . $board_config['smilies_path'])
);
 
$template->pparse("body");
}
else if ( $mode != "" )
{
switch( $mode )
{
case 'delete':
//
// Admin has selected to delete a smiley.
//
 
$smiley_id = ( !empty($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id'];
$smiley_id = intval($smiley_id);
 
$confirm = isset($HTTP_POST_VARS['confirm']);
 
if( $confirm )
{
$sql = "DELETE FROM " . SMILIES_TABLE . "
WHERE smilies_id = " . $smiley_id;
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't delete smiley", "", __LINE__, __FILE__, $sql);
}
 
$message = $lang['smiley_del_success'] . "<br /><br />" . sprintf($lang['Click_return_smileadmin'], "<a href=\"" . append_sid("admin_smilies.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
}
else
{
// Present the confirmation screen to the user
$template->set_filenames(array(
'body' => 'admin/confirm_body.tpl')
);
 
$hidden_fields = '<input type="hidden" name="mode" value="delete" /><input type="hidden" name="id" value="' . $smiley_id . '" />';
 
$template->assign_vars(array(
'MESSAGE_TITLE' => $lang['Confirm'],
'MESSAGE_TEXT' => $lang['Confirm_delete_smiley'],
 
'L_YES' => $lang['Yes'],
'L_NO' => $lang['No'],
 
'S_CONFIRM_ACTION' => append_sid("admin_smilies.$phpEx"),
'S_HIDDEN_FIELDS' => $hidden_fields)
);
$template->pparse('body');
}
break;
 
case 'edit':
//
// Admin has selected to edit a smiley.
//
 
$smiley_id = ( !empty($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id'];
$smiley_id = intval($smiley_id);
 
$sql = "SELECT *
FROM " . SMILIES_TABLE . "
WHERE smilies_id = " . $smiley_id;
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, 'Could not obtain emoticon information', "", __LINE__, __FILE__, $sql);
}
$smile_data = $db->sql_fetchrow($result);
 
$filename_list = "";
for( $i = 0; $i < count($smiley_images); $i++ )
{
if( $smiley_images[$i] == $smile_data['smile_url'] )
{
$smiley_selected = "selected=\"selected\"";
$smiley_edit_img = $smiley_images[$i];
}
else
{
$smiley_selected = "";
}
 
$filename_list .= '<option value="' . $smiley_images[$i] . '"' . $smiley_selected . '>' . $smiley_images[$i] . '</option>';
}
 
$template->set_filenames(array(
"body" => "admin/smile_edit_body.tpl")
);
 
$s_hidden_fields = '<input type="hidden" name="mode" value="save" /><input type="hidden" name="smile_id" value="' . $smile_data['smilies_id'] . '" />';
 
$template->assign_vars(array(
"SMILEY_CODE" => $smile_data['code'],
"SMILEY_EMOTICON" => $smile_data['emoticon'],
 
"L_SMILEY_TITLE" => $lang['smiley_title'],
"L_SMILEY_CONFIG" => $lang['smiley_config'],
"L_SMILEY_EXPLAIN" => $lang['smile_desc'],
"L_SMILEY_CODE" => $lang['smiley_code'],
"L_SMILEY_URL" => $lang['smiley_url'],
"L_SMILEY_EMOTION" => $lang['smiley_emot'],
"L_SUBMIT" => $lang['Submit'],
"L_RESET" => $lang['Reset'],
 
"SMILEY_IMG" => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smiley_edit_img,
 
"S_SMILEY_ACTION" => append_sid("admin_smilies.$phpEx"),
"S_HIDDEN_FIELDS" => $s_hidden_fields,
"S_FILENAME_OPTIONS" => $filename_list,
"S_SMILEY_BASEDIR" => $phpbb_root_path . $board_config['smilies_path'])
);
 
$template->pparse("body");
break;
 
case "save":
//
// Admin has submitted changes while editing a smiley.
//
 
//
// Get the submitted data, being careful to ensure that we only
// accept the data we are looking for.
//
$smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? trim($HTTP_POST_VARS['smile_code']) : '';
$smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? trim($HTTP_POST_VARS['smile_url']) : '';
$smile_url = phpbb_ltrim(basename($smile_url), "'");
$smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? htmlspecialchars(trim($HTTP_POST_VARS['smile_emotion'])) : '';
$smile_id = ( isset($HTTP_POST_VARS['smile_id']) ) ? intval($HTTP_POST_VARS['smile_id']) : 0;
$smile_code = trim($smile_code);
$smile_url = trim($smile_url);
 
// If no code was entered complain ...
if ($smile_code == '' || $smile_url == '')
{
message_die(GENERAL_MESSAGE, $lang['Fields_empty']);
}
 
//
// Convert < and > to proper htmlentities for parsing.
//
$smile_code = str_replace('<', '&lt;', $smile_code);
$smile_code = str_replace('>', '&gt;', $smile_code);
 
//
// Proceed with updating the smiley table.
//
$sql = "UPDATE " . SMILIES_TABLE . "
SET code = '" . str_replace("\'", "''", $smile_code) . "', smile_url = '" . str_replace("\'", "''", $smile_url) . "', emoticon = '" . str_replace("\'", "''", $smile_emotion) . "'
WHERE smilies_id = $smile_id";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't update smilies info", "", __LINE__, __FILE__, $sql);
}
 
$message = $lang['smiley_edit_success'] . "<br /><br />" . sprintf($lang['Click_return_smileadmin'], "<a href=\"" . append_sid("admin_smilies.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
break;
 
case "savenew":
//
// Admin has submitted changes while adding a new smiley.
//
 
//
// Get the submitted data being careful to ensure the the data
// we recieve and process is only the data we are looking for.
//
$smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? $HTTP_POST_VARS['smile_code'] : '';
$smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? $HTTP_POST_VARS['smile_url'] : '';
$smile_url = phpbb_ltrim(basename($smile_url), "'");
$smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? htmlspecialchars(trim($HTTP_POST_VARS['smile_emotion'])) : '';
$smile_code = trim($smile_code);
$smile_url = trim($smile_url);
 
// If no code was entered complain ...
if ($smile_code == '' || $smile_url == '')
{
message_die(GENERAL_MESSAGE, $lang['Fields_empty']);
}
 
//
// Convert < and > to proper htmlentities for parsing.
//
$smile_code = str_replace('<', '&lt;', $smile_code);
$smile_code = str_replace('>', '&gt;', $smile_code);
 
//
// Save the data to the smiley table.
//
$sql = "INSERT INTO " . SMILIES_TABLE . " (code, smile_url, emoticon)
VALUES ('" . str_replace("\'", "''", $smile_code) . "', '" . str_replace("\'", "''", $smile_url) . "', '" . str_replace("\'", "''", $smile_emotion) . "')";
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't insert new smiley", "", __LINE__, __FILE__, $sql);
}
 
$message = $lang['smiley_add_success'] . "<br /><br />" . sprintf($lang['Click_return_smileadmin'], "<a href=\"" . append_sid("admin_smilies.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
break;
}
}
else
{
 
//
// This is the main display of the page before the admin has selected
// any options.
//
$sql = "SELECT *
FROM " . SMILIES_TABLE;
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't obtain smileys from database", "", __LINE__, __FILE__, $sql);
}
 
$smilies = $db->sql_fetchrowset($result);
 
$template->set_filenames(array(
"body" => "admin/smile_list_body.tpl")
);
 
$template->assign_vars(array(
"L_ACTION" => $lang['Action'],
"L_SMILEY_TITLE" => $lang['smiley_title'],
"L_SMILEY_TEXT" => $lang['smile_desc'],
"L_DELETE" => $lang['Delete'],
"L_EDIT" => $lang['Edit'],
"L_SMILEY_ADD" => $lang['smile_add'],
"L_CODE" => $lang['Code'],
"L_EMOT" => $lang['Emotion'],
"L_SMILE" => $lang['Smile'],
"L_IMPORT_PACK" => $lang['import_smile_pack'],
"L_EXPORT_PACK" => $lang['export_smile_pack'],
"S_HIDDEN_FIELDS" => $s_hidden_fields,
"S_SMILEY_ACTION" => append_sid("admin_smilies.$phpEx"))
);
 
//
// Loop throuh the rows of smilies setting block vars for the template.
//
for($i = 0; $i < count($smilies); $i++)
{
//
// Replace htmlentites for < and > with actual character.
//
$smilies[$i]['code'] = str_replace('&lt;', '<', $smilies[$i]['code']);
$smilies[$i]['code'] = str_replace('&gt;', '>', $smilies[$i]['code']);
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
$template->assign_block_vars("smiles", array(
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
"SMILEY_IMG" => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'],
"CODE" => $smilies[$i]['code'],
"EMOT" => $smilies[$i]['emoticon'],
"U_SMILEY_EDIT" => append_sid("admin_smilies.$phpEx?mode=edit&amp;id=" . $smilies[$i]['smilies_id']),
"U_SMILEY_DELETE" => append_sid("admin_smilies.$phpEx?mode=delete&amp;id=" . $smilies[$i]['smilies_id']))
);
}
 
//
// Spit out the page.
//
$template->pparse("body");
}
 
//
// Page Footer
//
include('./page_footer_admin.'.$phpEx);
 
?>
/Forum/admin/admin_styles.php
0,0 → 1,941
<?php
/***************************************************************************
* admin_styles.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_styles.php,v 1.27.2.17 2006/04/20 13:34:15 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', 1);
 
if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['Styles']['Add_new'] = "$file?mode=addnew";
$module['Styles']['Create_new'] = "$file?mode=create";
$module['Styles']['Manage'] = $file;
$module['Styles']['Export'] = "$file?mode=export";
return;
}
 
//
// Load default header
//
//
// Check if the user has cancled a confirmation message.
//
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
 
$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE;
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE;
 
$no_page_header = (!empty($HTTP_POST_VARS['send_file']) || $cancel) ? TRUE : FALSE;
 
require('./pagestart.' . $phpEx);
 
$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE;
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE;
 
if ($cancel)
{
redirect('admin/' . append_sid("admin_styles.$phpEx", true));
}
 
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
$mode = htmlspecialchars($mode);
}
else
{
$mode = "";
}
 
switch( $mode )
{
case "addnew":
$install_to = ( isset($HTTP_GET_VARS['install_to']) ) ? urldecode($HTTP_GET_VARS['install_to']) : $HTTP_POST_VARS['install_to'];
$style_name = ( isset($HTTP_GET_VARS['style']) ) ? urldecode($HTTP_GET_VARS['style']) : $HTTP_POST_VARS['style'];
if( isset($install_to) )
{
 
include($phpbb_root_path. "templates/" . basename($install_to) . "/theme_info.cfg");
 
$template_name = $$install_to;
$found = FALSE;
for($i = 0; $i < count($template_name) && !$found; $i++)
{
if( $template_name[$i]['style_name'] == $style_name )
{
while(list($key, $val) = each($template_name[$i]))
{
$db_fields[] = $key;
$db_values[] = str_replace("\'", "''" , $val);
}
}
}
$sql = "INSERT INTO " . THEMES_TABLE . " (";
 
for($i = 0; $i < count($db_fields); $i++)
{
$sql .= $db_fields[$i];
if($i != (count($db_fields) - 1))
{
$sql .= ", ";
}
}
 
$sql .= ") VALUES (";
 
for($i = 0; $i < count($db_values); $i++)
{
$sql .= "'" . $db_values[$i] . "'";
if($i != (count($db_values) - 1))
{
$sql .= ", ";
}
}
$sql .= ")";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not insert theme data!", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Theme_installed'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
}
else
{
$installable_themes = array();
if( $dir = @opendir($phpbb_root_path. "templates/") )
{
while( $sub_dir = @readdir($dir) )
{
if( !is_file(phpbb_realpath($phpbb_root_path . 'templates/' .$sub_dir)) && !is_link(phpbb_realpath($phpbb_root_path . 'templates/' .$sub_dir)) && $sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS" )
{
if( @file_exists(@phpbb_realpath($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg")) )
{
include($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg");
for($i = 0; $i < count($$sub_dir); $i++)
{
$working_data = $$sub_dir;
$style_name = $working_data[$i]['style_name'];
$sql = "SELECT themes_id
FROM " . THEMES_TABLE . "
WHERE style_name = '" . str_replace("\'", "''", $style_name) . "'";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not query themes table!", "", __LINE__, __FILE__, $sql);
}
 
if(!$db->sql_numrows($result))
{
$installable_themes[] = $working_data[$i];
}
}
}
}
}
$template->set_filenames(array(
"body" => "admin/styles_addnew_body.tpl")
);
$template->assign_vars(array(
"L_STYLES_TITLE" => $lang['Styles_admin'],
"L_STYLES_ADD_TEXT" => $lang['Styles_addnew_explain'],
"L_STYLE" => $lang['Style'],
"L_TEMPLATE" => $lang['Template'],
"L_INSTALL" => $lang['Install'],
"L_ACTION" => $lang['Action'])
);
for($i = 0; $i < count($installable_themes); $i++)
{
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_block_vars("styles", array(
"ROW_CLASS" => $row_class,
"ROW_COLOR" => "#" . $row_color,
"STYLE_NAME" => $installable_themes[$i]['style_name'],
"TEMPLATE_NAME" => $installable_themes[$i]['template_name'],
 
"U_STYLES_INSTALL" => append_sid("admin_styles.$phpEx?mode=addnew&amp;style=" . urlencode($installable_themes[$i]['style_name']) . "&amp;install_to=" . urlencode($installable_themes[$i]['template_name'])))
);
}
$template->pparse("body");
}
closedir($dir);
}
break;
case "create":
case "edit":
$submit = ( isset($HTTP_POST_VARS['submit']) ) ? TRUE : 0;
if( $submit )
{
//
// DAMN! Thats alot of data to validate...
//
$updated['style_name'] = $HTTP_POST_VARS['style_name'];
$updated['template_name'] = $HTTP_POST_VARS['template_name'];
$updated['head_stylesheet'] = $HTTP_POST_VARS['head_stylesheet'];
$updated['body_background'] = $HTTP_POST_VARS['body_background'];
$updated['body_bgcolor'] = $HTTP_POST_VARS['body_bgcolor'];
$updated['body_text'] = $HTTP_POST_VARS['body_text'];
$updated['body_link'] = $HTTP_POST_VARS['body_link'];
$updated['body_vlink'] = $HTTP_POST_VARS['body_vlink'];
$updated['body_alink'] = $HTTP_POST_VARS['body_alink'];
$updated['body_hlink'] = $HTTP_POST_VARS['body_hlink'];
$updated['tr_color1'] = $HTTP_POST_VARS['tr_color1'];
$updated_name['tr_color1_name'] = $HTTP_POST_VARS['tr_color1_name'];
$updated['tr_color2'] = $HTTP_POST_VARS['tr_color2'];
$updated_name['tr_color2_name'] = $HTTP_POST_VARS['tr_color2_name'];
$updated['tr_color3'] = $HTTP_POST_VARS['tr_color3'];
$updated_name['tr_color3_name'] = $HTTP_POST_VARS['tr_color3_name'];
$updated['tr_class1'] = $HTTP_POST_VARS['tr_class1'];
$updated_name['tr_class1_name'] = $HTTP_POST_VARS['tr_class1_name'];
$updated['tr_class2'] = $HTTP_POST_VARS['tr_class2'];
$updated_name['tr_class2_name'] = $HTTP_POST_VARS['tr_class2_name'];
$updated['tr_class3'] = $HTTP_POST_VARS['tr_class3'];
$updated_name['tr_class3_name'] = $HTTP_POST_VARS['tr_class3_name'];
$updated['th_color1'] = $HTTP_POST_VARS['th_color1'];
$updated_name['th_color1_name'] = $HTTP_POST_VARS['th_color1_name'];
$updated['th_color2'] = $HTTP_POST_VARS['th_color2'];
$updated_name['th_color2_name'] = $HTTP_POST_VARS['th_color2_name'];
$updated['th_color3'] = $HTTP_POST_VARS['th_color3'];
$updated_name['th_color3_name'] = $HTTP_POST_VARS['th_color3_name'];
$updated['th_class1'] = $HTTP_POST_VARS['th_class1'];
$updated_name['th_class1_name'] = $HTTP_POST_VARS['th_class1_name'];
$updated['th_class2'] = $HTTP_POST_VARS['th_class2'];
$updated_name['th_class2_name'] = $HTTP_POST_VARS['th_class2_name'];
$updated['th_class3'] = $HTTP_POST_VARS['th_class3'];
$updated_name['th_class3_name'] = $HTTP_POST_VARS['th_class3_name'];
$updated['td_color1'] = $HTTP_POST_VARS['td_color1'];
$updated_name['td_color1_name'] = $HTTP_POST_VARS['td_color1_name'];
$updated['td_color2'] = $HTTP_POST_VARS['td_color2'];
$updated_name['td_color2_name'] = $HTTP_POST_VARS['td_color2_name'];
$updated['td_color3'] = $HTTP_POST_VARS['td_color3'];
$updated_name['td_color3_name'] = $HTTP_POST_VARS['td_color3_name'];
$updated['td_class1'] = $HTTP_POST_VARS['td_class1'];
$updated_name['td_class1_name'] = $HTTP_POST_VARS['td_class1_name'];
$updated['td_class2'] = $HTTP_POST_VARS['td_class2'];
$updated_name['td_class2_name'] = $HTTP_POST_VARS['td_class2_name'];
$updated['td_class3'] = $HTTP_POST_VARS['td_class3'];
$updated_name['td_class3_name'] = $HTTP_POST_VARS['td_class3_name'];
$updated['fontface1'] = $HTTP_POST_VARS['fontface1'];
$updated_name['fontface1_name'] = $HTTP_POST_VARS['fontface1_name'];
$updated['fontface2'] = $HTTP_POST_VARS['fontface2'];
$updated_name['fontface2_name'] = $HTTP_POST_VARS['fontface2_name'];
$updated['fontface3'] = $HTTP_POST_VARS['fontface3'];
$updated_name['fontface3_name'] = $HTTP_POST_VARS['fontface3_name'];
$updated['fontsize1'] = intval($HTTP_POST_VARS['fontsize1']);
$updated_name['fontsize1_name'] = $HTTP_POST_VARS['fontsize1_name'];
$updated['fontsize2'] = intval($HTTP_POST_VARS['fontsize2']);
$updated_name['fontsize2_name'] = $HTTP_POST_VARS['fontsize2_name'];
$updated['fontsize3'] = intval($HTTP_POST_VARS['fontsize3']);
$updated_name['fontsize3_name'] = $HTTP_POST_VARS['fontsize3_name'];
$updated['fontcolor1'] = $HTTP_POST_VARS['fontcolor1'];
$updated_name['fontcolor1_name'] = $HTTP_POST_VARS['fontcolor1_name'];
$updated['fontcolor2'] = $HTTP_POST_VARS['fontcolor2'];
$updated_name['fontcolor2_name'] = $HTTP_POST_VARS['fontcolor2_name'];
$updated['fontcolor3'] = $HTTP_POST_VARS['fontcolor3'];
$updated_name['fontcolor3_name'] = $HTTP_POST_VARS['fontcolor3_name'];
$updated['span_class1'] = $HTTP_POST_VARS['span_class1'];
$updated_name['span_class1_name'] = $HTTP_POST_VARS['span_class1_name'];
$updated['span_class2'] = $HTTP_POST_VARS['span_class2'];
$updated_name['span_class2_name'] = $HTTP_POST_VARS['span_class2_name'];
$updated['span_class3'] = $HTTP_POST_VARS['span_class3'];
$updated_name['span_class3_name'] = $HTTP_POST_VARS['span_class3_name'];
$style_id = intval($HTTP_POST_VARS['style_id']);
//
// Wheeeew! Thank heavens for copy and paste and search and replace :D
//
if($mode == "edit")
{
$sql = "UPDATE " . THEMES_TABLE . " SET ";
$count = 0;
 
while(list($key, $val) = each($updated))
{
if($count != 0)
{
$sql .= ", ";
}
 
//
// I don't like this but it'll keep MSSQL from throwing
// an error and save me alot of typing
//
$sql .= ( stristr($key, "fontsize") ) ? "$key = $val" : "$key = '" . str_replace("\'", "''", $val) . "'";
 
$count++;
}
$sql .= " WHERE themes_id = $style_id";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not update themes table!", "", __LINE__, __FILE__, $sql);
}
//
// Check if there's a names table entry for this style
//
$sql = "SELECT themes_id
FROM " . THEMES_NAME_TABLE . "
WHERE themes_id = $style_id";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not get data from themes_name table", "", __LINE__, __FILE__, $sql);
}
if($db->sql_numrows($result) > 0)
{
$sql = "UPDATE " . THEMES_NAME_TABLE . "
SET ";
$count = 0;
while(list($key, $val) = each($updated_name))
{
if($count != 0)
{
$sql .= ", ";
}
$sql .= "$key = '$val'";
$count++;
}
$sql .= " WHERE themes_id = $style_id";
}
else
{
//
// Nope, no names entry so we create a new one.
//
$sql = "INSERT INTO " . THEMES_NAME_TABLE . " (themes_id, ";
while(list($key, $val) = each($updated_name))
{
$fields[] = $key;
$vals[] = str_replace("\'", "''", $val);
}
 
for($i = 0; $i < count($fields); $i++)
{
if($i > 0)
{
$sql .= ", ";
}
$sql .= $fields[$i];
}
$sql .= ") VALUES ($style_id, ";
for($i = 0; $i < count($vals); $i++)
{
if($i > 0)
{
$sql .= ", ";
}
$sql .= "'" . $vals[$i] . "'";
}
$sql .= ")";
}
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not update themes name table!", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Theme_updated'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
}
else
{
//
// First, check if we already have a style by this name
//
$sql = "SELECT themes_id
FROM " . THEMES_TABLE . "
WHERE style_name = '" . str_replace("\'", "''", $updated['style_name']) . "'";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not query themes table", "", __LINE__, __FILE__, $sql);
}
if($db->sql_numrows($result))
{
message_die(GENERAL_ERROR, $lang['Style_exists'], $lang['Error']);
}
while(list($key, $val) = each($updated))
{
$field_names[] = $key;
 
if(stristr($key, "fontsize"))
{
$values[] = "$val";
}
else
{
$values[] = "'" . str_replace("\'", "''", $val) . "'";
}
}
$sql = "INSERT
INTO " . THEMES_TABLE . " (";
for($i = 0; $i < count($field_names); $i++)
{
if($i != 0)
{
$sql .= ", ";
}
$sql .= $field_names[$i];
}
$sql .= ") VALUES (";
for($i = 0; $i < count($values); $i++)
{
if($i != 0)
{
$sql .= ", ";
}
$sql .= $values[$i];
}
$sql .= ")";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not update themes table!", "", __LINE__, __FILE__, $sql);
}
$style_id = $db->sql_nextid();
//
// Insert names data
//
$sql = "INSERT INTO " . THEMES_NAME_TABLE . " (themes_id, ";
while(list($key, $val) = each($updated_name))
{
$fields[] = $key;
$vals[] = $val;
}
 
for($i = 0; $i < count($fields); $i++)
{
if($i > 0)
{
$sql .= ", ";
}
$sql .= $fields[$i];
}
$sql .= ") VALUES ($style_id, ";
for($i = 0; $i < count($vals); $i++)
{
if($i > 0)
{
$sql .= ", ";
}
$sql .= "'" . $vals[$i] . "'";
}
$sql .= ")";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not insert themes name table!", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Theme_created'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
}
}
else
{
if($mode == "edit")
{
$themes_title = $lang['Edit_theme'];
$themes_explain = $lang['Edit_theme_explain'];
$style_id = intval($HTTP_GET_VARS['style_id']);
$selected_names = array();
$selected_values = array();
//
// Fetch the Theme Info from the db
//
$sql = "SELECT *
FROM " . THEMES_TABLE . "
WHERE themes_id = $style_id";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not get data from themes table", "", __LINE__, __FILE__, $sql);
}
if ( $selected_values = $db->sql_fetchrow($result) )
{
while(list($key, $val) = @each($selected_values))
{
$selected[$key] = $val;
}
}
//
// Fetch the Themes Name data
//
$sql = "SELECT *
FROM " . THEMES_NAME_TABLE . "
WHERE themes_id = $style_id";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not get data from themes name table", "", __LINE__, __FILE__, $sql);
}
if ( $selected_names = $db->sql_fetchrow($result) )
{
while(list($key, $val) = @each($selected_names))
{
$selected[$key] = $val;
}
}
 
$s_hidden_fields = '<input type="hidden" name="style_id" value="' . $style_id . '" />';
}
else
{
$themes_title = $lang['Create_theme'];
$themes_explain = $lang['Create_theme_explain'];
}
$template->set_filenames(array(
"body" => "admin/styles_edit_body.tpl")
);
if( $dir = @opendir($phpbb_root_path . 'templates/') )
{
$s_template_select = '<select name="template_name">';
while( $file = @readdir($dir) )
{
if( !is_file(phpbb_realpath($phpbb_root_path . 'templates/' . $file)) && !is_link(phpbb_realpath($phpbb_root_path . 'templates/' . $file)) && $file != "." && $file != ".." && $file != "CVS" )
{
if($file == $selected['template_name'])
{
$s_template_select .= '<option value="' . $file . '" selected="selected">' . $file . "</option>\n";
}
else
{
$s_template_select .= '<option value="' . $file . '">' . $file . "</option>\n";
}
}
}
$s_template_select .= '</select>';
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_template_dir']);
}
 
$s_hidden_fields .= '<input type="hidden" name="mode" value="' . $mode . '" />';
 
$template->assign_vars(array(
"L_THEMES_TITLE" => $themes_title,
"L_THEMES_EXPLAIN" => $themes_explain,
"L_THEME_NAME" => $lang['Theme_name'],
"L_TEMPLATE" => $lang['Template'],
"L_THEME_SETTINGS" => $lang['Theme_settings'],
"L_THEME_ELEMENT" => $lang['Theme_element'],
"L_SIMPLE_NAME" => $lang['Simple_name'],
"L_VALUE" => $lang['Value'],
"L_STYLESHEET" => $lang['Stylesheet'],
"L_STYLESHEET_EXPLAIN" => $lang['Stylesheet_explain'],
"L_BACKGROUND_IMAGE" => $lang['Background_image'],
"L_BACKGROUND_COLOR" => $lang['Background_color'],
"L_BODY_TEXT_COLOR" => $lang['Text_color'],
"L_BODY_LINK_COLOR" => $lang['Link_color'],
"L_BODY_VLINK_COLOR" => $lang['VLink_color'],
"L_BODY_ALINK_COLOR" => $lang['ALink_color'],
"L_BODY_HLINK_COLOR" => $lang['HLink_color'],
"L_TR_COLOR1" => $lang['Tr_color1'],
"L_TR_COLOR2" => $lang['Tr_color2'],
"L_TR_COLOR3" => $lang['Tr_color3'],
"L_TR_CLASS1" => $lang['Tr_class1'],
"L_TR_CLASS2" => $lang['Tr_class2'],
"L_TR_CLASS3" => $lang['Tr_class3'],
"L_TH_COLOR1" => $lang['Th_color1'],
"L_TH_COLOR2" => $lang['Th_color2'],
"L_TH_COLOR3" => $lang['Th_color3'],
"L_TH_CLASS1" => $lang['Th_class1'],
"L_TH_CLASS2" => $lang['Th_class2'],
"L_TH_CLASS3" => $lang['Th_class3'],
"L_TD_COLOR1" => $lang['Td_color1'],
"L_TD_COLOR2" => $lang['Td_color2'],
"L_TD_COLOR3" => $lang['Td_color3'],
"L_TD_CLASS1" => $lang['Td_class1'],
"L_TD_CLASS2" => $lang['Td_class2'],
"L_TD_CLASS3" => $lang['Td_class3'],
"L_FONTFACE_1" => $lang['fontface1'],
"L_FONTFACE_2" => $lang['fontface2'],
"L_FONTFACE_3" => $lang['fontface3'],
"L_FONTSIZE_1" => $lang['fontsize1'],
"L_FONTSIZE_2" => $lang['fontsize2'],
"L_FONTSIZE_3" => $lang['fontsize3'],
"L_FONTCOLOR_1" => $lang['fontcolor1'],
"L_FONTCOLOR_2" => $lang['fontcolor2'],
"L_FONTCOLOR_3" => $lang['fontcolor3'],
"L_SPAN_CLASS_1" => $lang['span_class1'],
"L_SPAN_CLASS_2" => $lang['span_class2'],
"L_SPAN_CLASS_3" => $lang['span_class3'],
"L_SAVE_SETTINGS" => $lang['Save_Settings'],
"THEME_NAME" => $selected['style_name'],
"HEAD_STYLESHEET" => $selected['head_stylesheet'],
"BODY_BACKGROUND" => $selected['body_background'],
"BODY_BGCOLOR" => $selected['body_bgcolor'],
"BODY_TEXT_COLOR" => $selected['body_text'],
"BODY_LINK_COLOR" => $selected['body_link'],
"BODY_VLINK_COLOR" => $selected['body_vlink'],
"BODY_ALINK_COLOR" => $selected['body_alink'],
"BODY_HLINK_COLOR" => $selected['body_hlink'],
"TR_COLOR1" => $selected['tr_color1'],
"TR_COLOR2" => $selected['tr_color2'],
"TR_COLOR3" => $selected['tr_color3'],
"TR_CLASS1" => $selected['tr_class1'],
"TR_CLASS2" => $selected['tr_class2'],
"TR_CLASS3" => $selected['tr_class3'],
"TH_COLOR1" => $selected['th_color1'],
"TH_COLOR2" => $selected['th_color2'],
"TH_COLOR3" => $selected['th_color3'],
"TH_CLASS1" => $selected['th_class1'],
"TH_CLASS2" => $selected['th_class2'],
"TH_CLASS3" => $selected['th_class3'],
"TD_COLOR1" => $selected['td_color1'],
"TD_COLOR2" => $selected['td_color2'],
"TD_COLOR3" => $selected['td_color3'],
"TD_CLASS1" => $selected['td_class1'],
"TD_CLASS2" => $selected['td_class2'],
"TD_CLASS3" => $selected['td_class3'],
"FONTFACE1" => $selected['fontface1'],
"FONTFACE2" => $selected['fontface2'],
"FONTFACE3" => $selected['fontface3'],
"FONTSIZE1" => $selected['fontsize1'],
"FONTSIZE2" => $selected['fontsize2'],
"FONTSIZE3" => $selected['fontsize3'],
"FONTCOLOR1" => $selected['fontcolor1'],
"FONTCOLOR2" => $selected['fontcolor2'],
"FONTCOLOR3" => $selected['fontcolor3'],
"SPAN_CLASS1" => $selected['span_class1'],
"SPAN_CLASS2" => $selected['span_class2'],
"SPAN_CLASS3" => $selected['span_class3'],
 
"TR_COLOR1_NAME" => $selected['tr_color1_name'],
"TR_COLOR2_NAME" => $selected['tr_color2_name'],
"TR_COLOR3_NAME" => $selected['tr_color3_name'],
"TR_CLASS1_NAME" => $selected['tr_class1_name'],
"TR_CLASS2_NAME" => $selected['tr_class2_name'],
"TR_CLASS3_NAME" => $selected['tr_class3_name'],
"TH_COLOR1_NAME" => $selected['th_color1_name'],
"TH_COLOR2_NAME" => $selected['th_color2_name'],
"TH_COLOR3_NAME" => $selected['th_color3_name'],
"TH_CLASS1_NAME" => $selected['th_class1_name'],
"TH_CLASS2_NAME" => $selected['th_class2_name'],
"TH_CLASS3_NAME" => $selected['th_class3_name'],
"TD_COLOR1_NAME" => $selected['td_color1_name'],
"TD_COLOR2_NAME" => $selected['td_color2_name'],
"TD_COLOR3_NAME" => $selected['td_color3_name'],
"TD_CLASS1_NAME" => $selected['td_class1_name'],
"TD_CLASS2_NAME" => $selected['td_class2_name'],
"TD_CLASS3_NAME" => $selected['td_class3_name'],
"FONTFACE1_NAME" => $selected['fontface1_name'],
"FONTFACE2_NAME" => $selected['fontface2_name'],
"FONTFACE3_NAME" => $selected['fontface3_name'],
"FONTSIZE1_NAME" => $selected['fontsize1_name'],
"FONTSIZE2_NAME" => $selected['fontsize2_name'],
"FONTSIZE3_NAME" => $selected['fontsize3_name'],
"FONTCOLOR1_NAME" => $selected['fontcolor1_name'],
"FONTCOLOR2_NAME" => $selected['fontcolor2_name'],
"FONTCOLOR3_NAME" => $selected['fontcolor3_name'],
"SPAN_CLASS1_NAME" => $selected['span_class1_name'],
"SPAN_CLASS2_NAME" => $selected['span_class2_name'],
"SPAN_CLASS3_NAME" => $selected['span_class3_name'],
"S_THEME_ACTION" => append_sid("admin_styles.$phpEx"),
"S_TEMPLATE_SELECT" => $s_template_select,
"S_HIDDEN_FIELDS" => $s_hidden_fields)
);
$template->pparse("body");
}
break;
 
case "export";
if($HTTP_POST_VARS['export_template'])
{
$template_name = $HTTP_POST_VARS['export_template'];
 
$sql = "SELECT *
FROM " . THEMES_TABLE . "
WHERE template_name = '" . str_replace("\'", "''", $template_name) . "'";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not get theme data for selected template", "", __LINE__, __FILE__, $sql);
}
$theme_rowset = $db->sql_fetchrowset($result);
if( count($theme_rowset) == 0 )
{
message_die(GENERAL_MESSAGE, $lang['No_themes']);
}
$theme_data = '<?php'."\n\n";
$theme_data .= "//\n// phpBB 2.x auto-generated theme config file for $template_name\n// Do not change anything in this file!\n//\n\n";
 
for($i = 0; $i < count($theme_rowset); $i++)
{
while(list($key, $val) = each($theme_rowset[$i]))
{
if(!intval($key) && $key != "0" && $key != "themes_id")
{
$theme_data .= '$' . $template_name . "[$i]['$key'] = \"" . addslashes($val) . "\";\n";
}
}
$theme_data .= "\n";
}
$theme_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused!
@umask(0111);
 
$fp = @fopen($phpbb_root_path . 'templates/' . basename($template_name) . '/theme_info.cfg', 'w');
 
if( !$fp )
{
//
// Unable to open the file writeable do something here as an attempt
// to get around that...
//
$s_hidden_fields = '<input type="hidden" name="theme_info" value="' . htmlspecialchars($theme_data) . '" />';
$s_hidden_fields .= '<input type="hidden" name="send_file" value="1" /><input type="hidden" name="mode" value="export" />';
$download_form = '<form action="' . append_sid("admin_styles.$phpEx") . '" method="post"><input class="mainoption" type="submit" name="submit" value="' . $lang['Download'] . '" />' . $s_hidden_fields;
 
$template->set_filenames(array(
"body" => "message_body.tpl")
);
 
$template->assign_vars(array(
"MESSAGE_TITLE" => $lang['Export_themes'],
"MESSAGE_TEXT" => $lang['Download_theme_cfg'] . "<br /><br />" . $download_form)
);
 
$template->pparse('body');
exit();
}
 
$result = @fputs($fp, $theme_data, strlen($theme_data));
fclose($fp);
$message = $lang['Theme_info_saved'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
 
}
else if($HTTP_POST_VARS['send_file'])
{
header("Content-Type: text/x-delimtext; name=\"theme_info.cfg\"");
header("Content-disposition: attachment; filename=theme_info.cfg");
 
echo stripslashes($HTTP_POST_VARS['theme_info']);
}
else
{
$template->set_filenames(array(
"body" => "admin/styles_exporter.tpl")
);
if( $dir = @opendir($phpbb_root_path . 'templates/') )
{
$s_template_select = '<select name="export_template">';
while( $file = @readdir($dir) )
{
if( !is_file(phpbb_realpath($phpbb_root_path . 'templates/' . $file)) && !is_link(phpbb_realpath($phpbb_root_path . 'templates/' .$file)) && $file != "." && $file != ".." && $file != "CVS" )
{
$s_template_select .= '<option value="' . $file . '">' . $file . "</option>\n";
}
}
$s_template_select .= '</select>';
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_template_dir']);
}
$template->assign_vars(array(
"L_STYLE_EXPORTER" => $lang['Export_themes'],
"L_EXPORTER_EXPLAIN" => $lang['Export_explain'],
"L_TEMPLATE_SELECT" => $lang['Select_template'],
"L_SUBMIT" => $lang['Submit'],
 
"S_EXPORTER_ACTION" => append_sid("admin_styles.$phpEx?mode=export"),
"S_TEMPLATE_SELECT" => $s_template_select)
);
$template->pparse("body");
}
break;
 
case "delete":
$style_id = ( isset($HTTP_GET_VARS['style_id']) ) ? intval($HTTP_GET_VARS['style_id']) : intval($HTTP_POST_VARS['style_id']);
if( !$confirm )
{
if($style_id == $board_config['default_style'])
{
message_die(GENERAL_MESSAGE, $lang['Cannot_remove_style']);
}
$hidden_fields = '<input type="hidden" name="mode" value="'.$mode.'" /><input type="hidden" name="style_id" value="'.$style_id.'" />';
//
// Set template files
//
$template->set_filenames(array(
"confirm" => "admin/confirm_body.tpl")
);
 
$template->assign_vars(array(
"MESSAGE_TITLE" => $lang['Confirm'],
"MESSAGE_TEXT" => $lang['Confirm_delete_style'],
 
"L_YES" => $lang['Yes'],
"L_NO" => $lang['No'],
 
"S_CONFIRM_ACTION" => append_sid("admin_styles.$phpEx"),
"S_HIDDEN_FIELDS" => $hidden_fields)
);
 
$template->pparse("confirm");
 
}
else
{
//
// The user has confirmed the delete. Remove the style, the style element
// names and update any users who might be using this style
//
$sql = "DELETE FROM " . THEMES_TABLE . "
WHERE themes_id = $style_id";
if(!$result = $db->sql_query($sql, BEGIN_TRANSACTION))
{
message_die(GENERAL_ERROR, "Could not remove style data!", "", __LINE__, __FILE__, $sql);
}
//
// There may not be any theme name data so don't throw an error
// if the SQL dosan't work
//
$sql = "DELETE FROM " . THEMES_NAME_TABLE . "
WHERE themes_id = $style_id";
$db->sql_query($sql);
 
$sql = "UPDATE " . USERS_TABLE . "
SET user_style = " . $board_config['default_style'] . "
WHERE user_style = $style_id";
if(!$result = $db->sql_query($sql, END_TRANSACTION))
{
message_die(GENERAL_ERROR, "Could not update user style information", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Style_removed'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
}
break;
 
default:
$sql = "SELECT themes_id, template_name, style_name
FROM " . THEMES_TABLE . "
ORDER BY template_name";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not get style information!", "", __LINE__, __FILE__, $sql);
}
$style_rowset = $db->sql_fetchrowset($result);
$template->set_filenames(array(
"body" => "admin/styles_list_body.tpl")
);
 
$template->assign_vars(array(
"L_STYLES_TITLE" => $lang['Styles_admin'],
"L_STYLES_TEXT" => $lang['Styles_explain'],
"L_STYLE" => $lang['Style'],
"L_TEMPLATE" => $lang['Template'],
"L_EDIT" => $lang['Edit'],
"L_DELETE" => $lang['Delete'])
);
for($i = 0; $i < count($style_rowset); $i++)
{
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
$template->assign_block_vars("styles", array(
"ROW_CLASS" => $row_class,
"ROW_COLOR" => $row_color,
"STYLE_NAME" => $style_rowset[$i]['style_name'],
"TEMPLATE_NAME" => $style_rowset[$i]['template_name'],
 
"U_STYLES_EDIT" => append_sid("admin_styles.$phpEx?mode=edit&amp;style_id=" . $style_rowset[$i]['themes_id']),
"U_STYLES_DELETE" => append_sid("admin_styles.$phpEx?mode=delete&amp;style_id=" . $style_rowset[$i]['themes_id']))
);
}
$template->pparse("body");
break;
}
 
if (empty($HTTP_POST_VARS['send_file']))
{
include('./page_footer_admin.'.$phpEx);
}
 
?>
/Forum/admin/admin_ug_auth.php
0,0 → 1,999
<?php
/***************************************************************************
* admin_ug_auth.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_ug_auth.php,v 1.13.2.10 2005/09/14 18:14:29 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', 1);
 
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Users']['Permissions'] = $filename . "?mode=user";
$module['Groups']['Permissions'] = $filename . "?mode=group";
 
return;
}
 
//
// Load default header
//
$no_page_header = TRUE;
 
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
 
$params = array('mode' => 'mode', 'user_id' => POST_USERS_URL, 'group_id' => POST_GROUPS_URL, 'adv' => 'adv');
 
while( list($var, $param) = @each($params) )
{
if ( !empty($HTTP_POST_VARS[$param]) || !empty($HTTP_GET_VARS[$param]) )
{
$$var = ( !empty($HTTP_POST_VARS[$param]) ) ? $HTTP_POST_VARS[$param] : $HTTP_GET_VARS[$param];
}
else
{
$$var = "";
}
}
 
$user_id = intval($user_id);
$group_id = intval($group_id);
$adv = intval($adv);
$mode = htmlspecialchars($mode);
 
//
// Start program - define vars
//
$forum_auth_fields = array('auth_view', 'auth_read', 'auth_post', 'auth_reply', 'auth_edit', 'auth_delete', 'auth_sticky', 'auth_announce', 'auth_vote', 'auth_pollcreate');
 
$auth_field_match = array(
'auth_view' => AUTH_VIEW,
'auth_read' => AUTH_READ,
'auth_post' => AUTH_POST,
'auth_reply' => AUTH_REPLY,
'auth_edit' => AUTH_EDIT,
'auth_delete' => AUTH_DELETE,
'auth_sticky' => AUTH_STICKY,
'auth_announce' => AUTH_ANNOUNCE,
'auth_vote' => AUTH_VOTE,
'auth_pollcreate' => AUTH_POLLCREATE);
 
$field_names = array(
'auth_view' => $lang['View'],
'auth_read' => $lang['Read'],
'auth_post' => $lang['Post'],
'auth_reply' => $lang['Reply'],
'auth_edit' => $lang['Edit'],
'auth_delete' => $lang['Delete'],
'auth_sticky' => $lang['Sticky'],
'auth_announce' => $lang['Announce'],
'auth_vote' => $lang['Vote'],
'auth_pollcreate' => $lang['Pollcreate']);
 
// ---------------
// Start Functions
//
function check_auth($type, $key, $u_access, $is_admin)
{
$auth_user = 0;
 
if( count($u_access) )
{
for($j = 0; $j < count($u_access); $j++)
{
$result = 0;
switch($type)
{
case AUTH_ACL:
$result = $u_access[$j][$key];
 
case AUTH_MOD:
$result = $result || $u_access[$j]['auth_mod'];
 
case AUTH_ADMIN:
$result = $result || $is_admin;
break;
}
 
$auth_user = $auth_user || $result;
}
}
else
{
$auth_user = $is_admin;
}
 
return $auth_user;
}
//
// End Functions
// -------------
 
if ( isset($HTTP_POST_VARS['submit']) && ( ( $mode == 'user' && $user_id ) || ( $mode == 'group' && $group_id ) ) )
{
$user_level = '';
if ( $mode == 'user' )
{
//
// Get group_id for this user_id
//
$sql = "SELECT g.group_id, u.user_level
FROM " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u, " . GROUPS_TABLE . " g
WHERE u.user_id = $user_id
AND ug.user_id = u.user_id
AND g.group_id = ug.group_id
AND g.group_single_user = " . TRUE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select info from user/user_group table', '', __LINE__, __FILE__, $sql);
}
 
$row = $db->sql_fetchrow($result);
 
$group_id = $row['group_id'];
$user_level = $row['user_level'];
 
$db->sql_freeresult($result);
}
 
//
// Carry out requests
//
if ( $mode == 'user' && $HTTP_POST_VARS['userlevel'] == 'admin' && $user_level != ADMIN )
{
//
// Make user an admin (if already user)
//
if ( $userdata['user_id'] != $user_id )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . ADMIN . "
WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE FROM " . AUTH_ACCESS_TABLE . "
WHERE group_id = $group_id
AND auth_mod = 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't delete auth access info", "", __LINE__, __FILE__, $sql);
}
 
//
// Delete any entries in auth_access, they are not required if user is becoming an
// admin
//
$sql = "UPDATE " . AUTH_ACCESS_TABLE . "
SET auth_view = 0, auth_read = 0, auth_post = 0, auth_reply = 0, auth_edit = 0, auth_delete = 0, auth_sticky = 0, auth_announce = 0
WHERE group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't update auth access", "", __LINE__, __FILE__, $sql);
}
}
 
$message = $lang['Auth_updated'] . '<br /><br />' . sprintf($lang['Click_return_userauth'], '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$mode") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
else
{
if ( $mode == 'user' && $HTTP_POST_VARS['userlevel'] == 'user' && $user_level == ADMIN )
{
//
// Make admin a user (if already admin) ... ignore if you're trying
// to change yourself from an admin to user!
//
if ( $userdata['user_id'] != $user_id )
{
$sql = "UPDATE " . AUTH_ACCESS_TABLE . "
SET auth_view = 0, auth_read = 0, auth_post = 0, auth_reply = 0, auth_edit = 0, auth_delete = 0, auth_sticky = 0, auth_announce = 0
WHERE group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update auth access', '', __LINE__, __FILE__, $sql);
}
 
//
// Update users level, reset to USER
//
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . USER . "
WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql);
}
}
 
$message = $lang['Auth_updated'] . '<br /><br />' . sprintf($lang['Click_return_userauth'], '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$mode") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');
}
else
{
$change_mod_list = ( isset($HTTP_POST_VARS['moderator']) ) ? $HTTP_POST_VARS['moderator'] : false;
 
if ( empty($adv) )
{
$change_acl_list = ( isset($HTTP_POST_VARS['private']) ) ? $HTTP_POST_VARS['private'] : false;
}
else
{
$change_acl_list = array();
for($j = 0; $j < count($forum_auth_fields); $j++)
{
$auth_field = $forum_auth_fields[$j];
 
while( list($forum_id, $value) = @each($HTTP_POST_VARS['private_' . $auth_field]) )
{
$change_acl_list[$forum_id][$auth_field] = $value;
}
}
}
 
$sql = 'SELECT f.*
FROM ' . FORUMS_TABLE . ' f, ' . CATEGORIES_TABLE . ' c
WHERE f.cat_id = c.cat_id
ORDER BY c.cat_order, f.forum_order';
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain forum information", "", __LINE__, __FILE__, $sql);
}
 
$forum_access = array();
while( $row = $db->sql_fetchrow($result) )
{
$forum_access[] = $row;
}
$db->sql_freeresult($result);
 
$sql = ( $mode == 'user' ) ? "SELECT aa.* FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE. " g WHERE ug.user_id = $user_id AND g.group_id = ug.group_id AND aa.group_id = ug.group_id AND g.group_single_user = " . TRUE : "SELECT * FROM " . AUTH_ACCESS_TABLE . " WHERE group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain user/group permissions", "", __LINE__, __FILE__, $sql);
}
 
$auth_access = array();
while( $row = $db->sql_fetchrow($result) )
{
$auth_access[$row['forum_id']] = $row;
}
$db->sql_freeresult($result);
 
$forum_auth_action = array();
$update_acl_status = array();
$update_mod_status = array();
 
for($i = 0; $i < count($forum_access); $i++)
{
$forum_id = $forum_access[$i]['forum_id'];
 
if (
( isset($auth_access[$forum_id]['auth_mod']) && $change_mod_list[$forum_id]['auth_mod'] != $auth_access[$forum_id]['auth_mod'] ) ||
( !isset($auth_access[$forum_id]['auth_mod']) && !empty($change_mod_list[$forum_id]['auth_mod']) )
)
{
$update_mod_status[$forum_id] = $change_mod_list[$forum_id]['auth_mod'];
 
if ( !$update_mod_status[$forum_id] )
{
$forum_auth_action[$forum_id] = 'delete';
}
else if ( !isset($auth_access[$forum_id]['auth_mod']) )
{
$forum_auth_action[$forum_id] = 'insert';
}
else
{
$forum_auth_action[$forum_id] = 'update';
}
}
 
for($j = 0; $j < count($forum_auth_fields); $j++)
{
$auth_field = $forum_auth_fields[$j];
 
if( $forum_access[$i][$auth_field] == AUTH_ACL && isset($change_acl_list[$forum_id][$auth_field]) )
{
if ( ( empty($auth_access[$forum_id]['auth_mod']) &&
( isset($auth_access[$forum_id][$auth_field]) && $change_acl_list[$forum_id][$auth_field] != $auth_access[$forum_id][$auth_field] ) ||
( !isset($auth_access[$forum_id][$auth_field]) && !empty($change_acl_list[$forum_id][$auth_field]) ) ) ||
!empty($update_mod_status[$forum_id])
)
{
$update_acl_status[$forum_id][$auth_field] = ( !empty($update_mod_status[$forum_id]) ) ? 0 : $change_acl_list[$forum_id][$auth_field];
 
if ( isset($auth_access[$forum_id][$auth_field]) && empty($update_acl_status[$forum_id][$auth_field]) && $forum_auth_action[$forum_id] != 'insert' && $forum_auth_action[$forum_id] != 'update' )
{
$forum_auth_action[$forum_id] = 'delete';
}
else if ( !isset($auth_access[$forum_id][$auth_field]) && !( $forum_auth_action[$forum_id] == 'delete' && empty($update_acl_status[$forum_id][$auth_field]) ) )
{
$forum_auth_action[$forum_id] = 'insert';
}
else if ( isset($auth_access[$forum_id][$auth_field]) && !empty($update_acl_status[$forum_id][$auth_field]) )
{
$forum_auth_action[$forum_id] = 'update';
}
}
else if ( ( empty($auth_access[$forum_id]['auth_mod']) &&
( isset($auth_access[$forum_id][$auth_field]) && $change_acl_list[$forum_id][$auth_field] == $auth_access[$forum_id][$auth_field] ) ) && $forum_auth_action[$forum_id] == 'delete' )
{
$forum_auth_action[$forum_id] = 'update';
}
}
}
}
 
//
// Checks complete, make updates to DB
//
$delete_sql = '';
while( list($forum_id, $action) = @each($forum_auth_action) )
{
if ( $action == 'delete' )
{
$delete_sql .= ( ( $delete_sql != '' ) ? ', ' : '' ) . $forum_id;
}
else
{
if ( $action == 'insert' )
{
$sql_field = '';
$sql_value = '';
while ( list($auth_type, $value) = @each($update_acl_status[$forum_id]) )
{
$sql_field .= ( ( $sql_field != '' ) ? ', ' : '' ) . $auth_type;
$sql_value .= ( ( $sql_value != '' ) ? ', ' : '' ) . $value;
}
$sql_field .= ( ( $sql_field != '' ) ? ', ' : '' ) . 'auth_mod';
$sql_value .= ( ( $sql_value != '' ) ? ', ' : '' ) . ( ( !isset($update_mod_status[$forum_id]) ) ? 0 : $update_mod_status[$forum_id]);
 
$sql = "INSERT INTO " . AUTH_ACCESS_TABLE . " (forum_id, group_id, $sql_field)
VALUES ($forum_id, $group_id, $sql_value)";
}
else
{
$sql_values = '';
while ( list($auth_type, $value) = @each($update_acl_status[$forum_id]) )
{
$sql_values .= ( ( $sql_values != '' ) ? ', ' : '' ) . $auth_type . ' = ' . $value;
}
$sql_values .= ( ( $sql_values != '' ) ? ', ' : '' ) . 'auth_mod = ' . ( ( !isset($update_mod_status[$forum_id]) ) ? 0 : $update_mod_status[$forum_id]);
 
$sql = "UPDATE " . AUTH_ACCESS_TABLE . "
SET $sql_values
WHERE group_id = $group_id
AND forum_id = $forum_id";
}
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't update private forum permissions", "", __LINE__, __FILE__, $sql);
}
}
}
 
if ( $delete_sql != '' )
{
$sql = "DELETE FROM " . AUTH_ACCESS_TABLE . "
WHERE group_id = $group_id
AND forum_id IN ($delete_sql)";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't delete permission entries", "", __LINE__, __FILE__, $sql);
}
}
 
$l_auth_return = ( $mode == 'user' ) ? $lang['Click_return_userauth'] : $lang['Click_return_groupauth'];
$message = $lang['Auth_updated'] . '<br /><br />' . sprintf($l_auth_return, '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$mode") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');
}
 
//
// Update user level to mod for appropriate users
//
$sql = "SELECT u.user_id
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u
WHERE ug.group_id = aa.group_id
AND u.user_id = ug.user_id
AND ug.user_pending = 0
AND u.user_level NOT IN (" . MOD . ", " . ADMIN . ")
GROUP BY u.user_id
HAVING SUM(aa.auth_mod) > 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain user/group permissions", "", __LINE__, __FILE__, $sql);
}
 
$set_mod = '';
while( $row = $db->sql_fetchrow($result) )
{
$set_mod .= ( ( $set_mod != '' ) ? ', ' : '' ) . $row['user_id'];
}
$db->sql_freeresult($result);
 
//
// Update user level to user for appropriate users
//
switch ( SQL_LAYER )
{
case 'postgresql':
$sql = "SELECT u.user_id
FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa
WHERE ug.user_id = u.user_id
AND aa.group_id = ug.group_id
AND u.user_level NOT IN (" . USER . ", " . ADMIN . ")
GROUP BY u.user_id
HAVING SUM(aa.auth_mod) = 0
UNION (
SELECT u.user_id
FROM " . USERS_TABLE . " u
WHERE NOT EXISTS (
SELECT aa.auth_mod
FROM " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa
WHERE ug.user_id = u.user_id
AND aa.group_id = ug.group_id
)
AND u.user_level NOT IN (" . USER . ", " . ADMIN . ")
GROUP BY u.user_id
)";
break;
case 'oracle':
$sql = "SELECT u.user_id
FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa
WHERE ug.user_id = u.user_id(+)
AND aa.group_id = ug.group_id(+)
AND u.user_level NOT IN (" . USER . ", " . ADMIN . ")
GROUP BY u.user_id
HAVING SUM(aa.auth_mod) = 0";
break;
default:
$sql = "SELECT u.user_id
FROM ( ( " . USERS_TABLE . " u
LEFT JOIN " . USER_GROUP_TABLE . " ug ON ug.user_id = u.user_id )
LEFT JOIN " . AUTH_ACCESS_TABLE . " aa ON aa.group_id = ug.group_id )
WHERE u.user_level NOT IN (" . USER . ", " . ADMIN . ")
GROUP BY u.user_id
HAVING SUM(aa.auth_mod) = 0";
break;
}
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain user/group permissions", "", __LINE__, __FILE__, $sql);
}
 
$unset_mod = "";
while( $row = $db->sql_fetchrow($result) )
{
$unset_mod .= ( ( $unset_mod != '' ) ? ', ' : '' ) . $row['user_id'];
}
$db->sql_freeresult($result);
 
if ( $set_mod != '' )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . MOD . "
WHERE user_id IN ($set_mod)";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't update user level", "", __LINE__, __FILE__, $sql);
}
}
 
if ( $unset_mod != '' )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . USER . "
WHERE user_id IN ($unset_mod)";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't update user level", "", __LINE__, __FILE__, $sql);
}
}
 
$sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . "
WHERE group_id = $group_id";
$result = $db->sql_query($sql);
 
$group_user = array();
while ($row = $db->sql_fetchrow($result))
{
$group_user[$row['user_id']] = $row['user_id'];
}
$db->sql_freeresult($result);
 
$sql = "SELECT ug.user_id, COUNT(auth_mod) AS is_auth_mod
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug
WHERE ug.user_id IN (" . implode(', ', $group_user) . ")
AND aa.group_id = ug.group_id
AND aa.auth_mod = 1
GROUP BY ug.user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain moderator status', '', __LINE__, __FILE__, $sql);
}
 
while ($row = $db->sql_fetchrow($result))
{
if ($row['is_auth_mod'])
{
unset($group_user[$row['user_id']]);
}
}
$db->sql_freeresult($result);
 
if (sizeof($group_user))
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . USER . "
WHERE user_id IN (" . implode(', ', $group_user) . ") AND user_level = " . MOD;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql);
}
}
 
message_die(GENERAL_MESSAGE, $message);
}
}
else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id ) ) || ( $mode == 'group' && $group_id ) )
{
if ( isset($HTTP_POST_VARS['username']) )
{
$this_userdata = get_userdata($HTTP_POST_VARS['username'], true);
if ( !is_array($this_userdata) )
{
message_die(GENERAL_MESSAGE, $lang['No_such_user']);
}
$user_id = $this_userdata['user_id'];
}
 
//
// Front end
//
$sql = "SELECT f.*
FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c
WHERE f.cat_id = c.cat_id
ORDER BY c.cat_order, f.forum_order ASC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain forum information", "", __LINE__, __FILE__, $sql);
}
 
$forum_access = array();
while( $row = $db->sql_fetchrow($result) )
{
$forum_access[] = $row;
}
$db->sql_freeresult($result);
 
if( empty($adv) )
{
for($i = 0; $i < count($forum_access); $i++)
{
$forum_id = $forum_access[$i]['forum_id'];
 
$forum_auth_level[$forum_id] = AUTH_ALL;
 
for($j = 0; $j < count($forum_auth_fields); $j++)
{
$forum_access[$i][$forum_auth_fields[$j]] . ' :: ';
if ( $forum_access[$i][$forum_auth_fields[$j]] == AUTH_ACL )
{
$forum_auth_level[$forum_id] = AUTH_ACL;
$forum_auth_level_fields[$forum_id][] = $forum_auth_fields[$j];
}
}
}
}
 
$sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user, ug.user_pending FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE ";
$sql .= ( $mode == 'user' ) ? "u.user_id = $user_id AND ug.user_id = u.user_id AND g.group_id = ug.group_id" : "g.group_id = $group_id AND ug.group_id = g.group_id AND u.user_id = ug.user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain user/group information", "", __LINE__, __FILE__, $sql);
}
$ug_info = array();
while( $row = $db->sql_fetchrow($result) )
{
$ug_info[] = $row;
}
$db->sql_freeresult($result);
 
$sql = ( $mode == 'user' ) ? "SELECT aa.*, g.group_single_user FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE. " g WHERE ug.user_id = $user_id AND g.group_id = ug.group_id AND aa.group_id = ug.group_id AND g.group_single_user = 1" : "SELECT * FROM " . AUTH_ACCESS_TABLE . " WHERE group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain user/group permissions", "", __LINE__, __FILE__, $sql);
}
 
$auth_access = array();
$auth_access_count = array();
while( $row = $db->sql_fetchrow($result) )
{
$auth_access[$row['forum_id']][] = $row;
$auth_access_count[$row['forum_id']]++;
}
$db->sql_freeresult($result);
 
$is_admin = ( $mode == 'user' ) ? ( ( $ug_info[0]['user_level'] == ADMIN && $ug_info[0]['user_id'] != ANONYMOUS ) ? 1 : 0 ) : 0;
 
for($i = 0; $i < count($forum_access); $i++)
{
$forum_id = $forum_access[$i]['forum_id'];
 
unset($prev_acl_setting);
for($j = 0; $j < count($forum_auth_fields); $j++)
{
$key = $forum_auth_fields[$j];
$value = $forum_access[$i][$key];
 
switch( $value )
{
case AUTH_ALL:
case AUTH_REG:
$auth_ug[$forum_id][$key] = 1;
break;
 
case AUTH_ACL:
$auth_ug[$forum_id][$key] = ( !empty($auth_access_count[$forum_id]) ) ? check_auth(AUTH_ACL, $key, $auth_access[$forum_id], $is_admin) : 0;
$auth_field_acl[$forum_id][$key] = $auth_ug[$forum_id][$key];
 
if ( isset($prev_acl_setting) )
{
if ( $prev_acl_setting != $auth_ug[$forum_id][$key] && empty($adv) )
{
$adv = 1;
}
}
 
$prev_acl_setting = $auth_ug[$forum_id][$key];
 
break;
 
case AUTH_MOD:
$auth_ug[$forum_id][$key] = ( !empty($auth_access_count[$forum_id]) ) ? check_auth(AUTH_MOD, $key, $auth_access[$forum_id], $is_admin) : 0;
break;
 
case AUTH_ADMIN:
$auth_ug[$forum_id][$key] = $is_admin;
break;
 
default:
$auth_ug[$forum_id][$key] = 0;
break;
}
}
 
//
// Is user a moderator?
//
$auth_ug[$forum_id]['auth_mod'] = ( !empty($auth_access_count[$forum_id]) ) ? check_auth(AUTH_MOD, 'auth_mod', $auth_access[$forum_id], 0) : 0;
}
$i = 0;
@reset($auth_ug);
while( list($forum_id, $user_ary) = @each($auth_ug) )
{
if ( empty($adv) )
{
if ( $forum_auth_level[$forum_id] == AUTH_ACL )
{
$allowed = 1;
 
for($j = 0; $j < count($forum_auth_level_fields[$forum_id]); $j++)
{
if ( !$auth_ug[$forum_id][$forum_auth_level_fields[$forum_id][$j]] )
{
$allowed = 0;
}
}
 
$optionlist_acl = '<select name="private[' . $forum_id . ']">';
 
if ( $is_admin || $user_ary['auth_mod'] )
{
$optionlist_acl .= '<option value="1">' . $lang['Allowed_Access'] . '</option>';
}
else if ( $allowed )
{
$optionlist_acl .= '<option value="1" selected="selected">' . $lang['Allowed_Access'] . '</option><option value="0">'. $lang['Disallowed_Access'] . '</option>';
}
else
{
$optionlist_acl .= '<option value="1">' . $lang['Allowed_Access'] . '</option><option value="0" selected="selected">' . $lang['Disallowed_Access'] . '</option>';
}
 
$optionlist_acl .= '</select>';
}
else
{
$optionlist_acl = '&nbsp;';
}
}
else
{
for($j = 0; $j < count($forum_access); $j++)
{
if ( $forum_access[$j]['forum_id'] == $forum_id )
{
for($k = 0; $k < count($forum_auth_fields); $k++)
{
$field_name = $forum_auth_fields[$k];
 
if( $forum_access[$j][$field_name] == AUTH_ACL )
{
$optionlist_acl_adv[$forum_id][$k] = '<select name="private_' . $field_name . '[' . $forum_id . ']">';
 
if( isset($auth_field_acl[$forum_id][$field_name]) && !($is_admin || $user_ary['auth_mod']) )
{
if( !$auth_field_acl[$forum_id][$field_name] )
{
$optionlist_acl_adv[$forum_id][$k] .= '<option value="1">' . $lang['ON'] . '</option><option value="0" selected="selected">' . $lang['OFF'] . '</option>';
}
else
{
$optionlist_acl_adv[$forum_id][$k] .= '<option value="1" selected="selected">' . $lang['ON'] . '</option><option value="0">' . $lang['OFF'] . '</option>';
}
}
else
{
if( $is_admin || $user_ary['auth_mod'] )
{
$optionlist_acl_adv[$forum_id][$k] .= '<option value="1">' . $lang['ON'] . '</option>';
}
else
{
$optionlist_acl_adv[$forum_id][$k] .= '<option value="1">' . $lang['ON'] . '</option><option value="0" selected="selected">' . $lang['OFF'] . '</option>';
}
}
 
$optionlist_acl_adv[$forum_id][$k] .= '</select>';
 
}
}
}
}
}
 
$optionlist_mod = '<select name="moderator[' . $forum_id . ']">';
$optionlist_mod .= ( $user_ary['auth_mod'] ) ? '<option value="1" selected="selected">' . $lang['Is_Moderator'] . '</option><option value="0">' . $lang['Not_Moderator'] . '</option>' : '<option value="1">' . $lang['Is_Moderator'] . '</option><option value="0" selected="selected">' . $lang['Not_Moderator'] . '</option>';
$optionlist_mod .= '</select>';
 
$row_class = ( !( $i % 2 ) ) ? 'row2' : 'row1';
$row_color = ( !( $i % 2 ) ) ? $theme['td_color1'] : $theme['td_color2'];
 
$template->assign_block_vars('forums', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FORUM_NAME' => $forum_access[$i]['forum_name'],
 
'U_FORUM_AUTH' => append_sid("admin_forumauth.$phpEx?f=" . $forum_access[$i]['forum_id']),
 
'S_MOD_SELECT' => $optionlist_mod)
);
 
if( !$adv )
{
$template->assign_block_vars('forums.aclvalues', array(
'S_ACL_SELECT' => $optionlist_acl)
);
}
else
{
for($j = 0; $j < count($forum_auth_fields); $j++)
{
$template->assign_block_vars('forums.aclvalues', array(
'S_ACL_SELECT' => $optionlist_acl_adv[$forum_id][$j])
);
}
}
 
$i++;
}
// @reset($auth_user);
if ( $mode == 'user' )
{
$t_username = $ug_info[0]['username'];
$s_user_type = ( $is_admin ) ? '<select name="userlevel"><option value="admin" selected="selected">' . $lang['Auth_Admin'] . '</option><option value="user">' . $lang['Auth_User'] . '</option></select>' : '<select name="userlevel"><option value="admin">' . $lang['Auth_Admin'] . '</option><option value="user" selected="selected">' . $lang['Auth_User'] . '</option></select>';
}
else
{
$t_groupname = $ug_info[0]['group_name'];
}
 
$name = array();
$id = array();
for($i = 0; $i < count($ug_info); $i++)
{
if( ( $mode == 'user' && !$ug_info[$i]['group_single_user'] ) || $mode == 'group' )
{
$name[] = ( $mode == 'user' ) ? $ug_info[$i]['group_name'] : $ug_info[$i]['username'];
$id[] = ( $mode == 'user' ) ? intval($ug_info[$i]['group_id']) : intval($ug_info[$i]['user_id']);
}
}
 
$t_usergroup_list = $t_pending_list = '';
if( count($name) )
{
for($i = 0; $i < count($ug_info); $i++)
{
$ug = ( $mode == 'user' ) ? 'group&amp;' . POST_GROUPS_URL : 'user&amp;' . POST_USERS_URL;
 
if (!$ug_info[$i]['user_pending'])
{
$t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>';
}
else
{
$t_pending_list .= ( ( $t_pending_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>';
}
}
}
 
$t_usergroup_list = ($t_usergroup_list == '') ? $lang['None'] : $t_usergroup_list;
$t_pending_list = ($t_pending_list == '') ? $lang['None'] : $t_pending_list;
 
$s_column_span = 2; // Two columns always present
if( !$adv )
{
$template->assign_block_vars('acltype', array(
'L_UG_ACL_TYPE' => $lang['Simple_Permission'])
);
$s_column_span++;
}
else
{
for($i = 0; $i < count($forum_auth_fields); $i++)
{
$cell_title = $field_names[$forum_auth_fields[$i]];
 
$template->assign_block_vars('acltype', array(
'L_UG_ACL_TYPE' => $cell_title)
);
$s_column_span++;
}
}
 
//
// Dump in the page header ...
//
include('./page_header_admin.'.$phpEx);
 
$template->set_filenames(array(
"body" => 'admin/auth_ug_body.tpl')
);
 
$adv_switch = ( empty($adv) ) ? 1 : 0;
$u_ug_switch = ( $mode == 'user' ) ? POST_USERS_URL . "=" . $user_id : POST_GROUPS_URL . "=" . $group_id;
$switch_mode = append_sid("admin_ug_auth.$phpEx?mode=$mode&amp;" . $u_ug_switch . "&amp;adv=$adv_switch");
$switch_mode_text = ( empty($adv) ) ? $lang['Advanced_mode'] : $lang['Simple_mode'];
$u_switch_mode = '<a href="' . $switch_mode . '">' . $switch_mode_text . '</a>';
 
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="adv" value="' . $adv . '" />';
$s_hidden_fields .= ( $mode == 'user' ) ? '<input type="hidden" name="' . POST_USERS_URL . '" value="' . $user_id . '" />' : '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />';
 
if ( $mode == 'user' )
{
$template->assign_block_vars('switch_user_auth', array());
 
$template->assign_vars(array(
'USERNAME' => $t_username,
'USER_LEVEL' => $lang['User_Level'] . " : " . $s_user_type,
'USER_GROUP_MEMBERSHIPS' => $lang['Group_memberships'] . ' : ' . $t_usergroup_list)
);
}
else
{
$template->assign_block_vars("switch_group_auth", array());
 
$template->assign_vars(array(
'USERNAME' => $t_groupname,
'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list . '<br />' . $lang['Pending_members'] . ' : ' . $t_pending_list)
);
}
 
$template->assign_vars(array(
'L_USER_OR_GROUPNAME' => ( $mode == 'user' ) ? $lang['Username'] : $lang['Group_name'],
 
'L_AUTH_TITLE' => ( $mode == 'user' ) ? $lang['Auth_Control_User'] : $lang['Auth_Control_Group'],
'L_AUTH_EXPLAIN' => ( $mode == 'user' ) ? $lang['User_auth_explain'] : $lang['Group_auth_explain'],
'L_MODERATOR_STATUS' => $lang['Moderator_status'],
'L_PERMISSIONS' => $lang['Permissions'],
'L_SUBMIT' => $lang['Submit'],
'L_RESET' => $lang['Reset'],
'L_FORUM' => $lang['Forum'],
 
'U_USER_OR_GROUP' => append_sid("admin_ug_auth.$phpEx"),
'U_SWITCH_MODE' => $u_switch_mode,
 
'S_COLUMN_SPAN' => $s_column_span,
'S_AUTH_ACTION' => append_sid("admin_ug_auth.$phpEx"),
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
}
else
{
//
// Select a user/group
//
include('./page_header_admin.'.$phpEx);
 
$template->set_filenames(array(
'body' => ( $mode == 'user' ) ? 'admin/user_select_body.tpl' : 'admin/auth_select_body.tpl')
);
 
if ( $mode == 'user' )
{
$template->assign_vars(array(
'L_FIND_USERNAME' => $lang['Find_username'],
 
'U_SEARCH_USER' => append_sid("../search.$phpEx?mode=searchuser"))
);
}
else
{
$sql = "SELECT group_id, group_name
FROM " . GROUPS_TABLE . "
WHERE group_single_user <> " . TRUE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't get group list", "", __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
$select_list = '<select name="' . POST_GROUPS_URL . '">';
do
{
$select_list .= '<option value="' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
}
while ( $row = $db->sql_fetchrow($result) );
$select_list .= '</select>';
}
 
$template->assign_vars(array(
'S_AUTH_SELECT' => $select_list)
);
}
 
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
 
$l_type = ( $mode == 'user' ) ? 'USER' : 'AUTH';
 
$template->assign_vars(array(
'L_' . $l_type . '_TITLE' => ( $mode == 'user' ) ? $lang['Auth_Control_User'] : $lang['Auth_Control_Group'],
'L_' . $l_type . '_EXPLAIN' => ( $mode == 'user' ) ? $lang['User_auth_explain'] : $lang['Group_auth_explain'],
'L_' . $l_type . '_SELECT' => ( $mode == 'user' ) ? $lang['Select_a_User'] : $lang['Select_a_Group'],
'L_LOOK_UP' => ( $mode == 'user' ) ? $lang['Look_up_User'] : $lang['Look_up_Group'],
 
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_' . $l_type . '_ACTION' => append_sid("admin_ug_auth.$phpEx"))
);
 
}
 
$template->pparse('body');
 
include('./page_footer_admin.'.$phpEx);
 
?>
/Forum/admin/admin_user_ban.php
0,0 → 1,452
<?php
/***************************************************************************
* admin_user_ban.php
* -------------------
* begin : Tuesday, Jul 31, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_user_ban.php,v 1.21.2.6 2005/10/30 15:17:13 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', 1);
 
if ( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Users']['Ban_Management'] = $filename;
 
return;
}
 
//
// Load default header
//
$phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
 
//
// Start program
//
if ( isset($HTTP_POST_VARS['submit']) )
{
$user_bansql = '';
$email_bansql = '';
$ip_bansql = '';
 
$user_list = array();
if ( !empty($HTTP_POST_VARS['username']) )
{
$this_userdata = get_userdata($HTTP_POST_VARS['username'], true);
if( !$this_userdata )
{
message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] );
}
 
$user_list[] = $this_userdata['user_id'];
}
 
$ip_list = array();
if ( isset($HTTP_POST_VARS['ban_ip']) )
{
$ip_list_temp = explode(',', $HTTP_POST_VARS['ban_ip']);
 
for($i = 0; $i < count($ip_list_temp); $i++)
{
if ( preg_match('/^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})[ ]*\-[ ]*([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/', trim($ip_list_temp[$i]), $ip_range_explode) )
{
//
// Don't ask about all this, just don't ask ... !
//
$ip_1_counter = $ip_range_explode[1];
$ip_1_end = $ip_range_explode[5];
 
while ( $ip_1_counter <= $ip_1_end )
{
$ip_2_counter = ( $ip_1_counter == $ip_range_explode[1] ) ? $ip_range_explode[2] : 0;
$ip_2_end = ( $ip_1_counter < $ip_1_end ) ? 254 : $ip_range_explode[6];
 
if ( $ip_2_counter == 0 && $ip_2_end == 254 )
{
$ip_2_counter = 255;
$ip_2_fragment = 255;
 
$ip_list[] = encode_ip("$ip_1_counter.255.255.255");
}
 
while ( $ip_2_counter <= $ip_2_end )
{
$ip_3_counter = ( $ip_2_counter == $ip_range_explode[2] && $ip_1_counter == $ip_range_explode[1] ) ? $ip_range_explode[3] : 0;
$ip_3_end = ( $ip_2_counter < $ip_2_end || $ip_1_counter < $ip_1_end ) ? 254 : $ip_range_explode[7];
 
if ( $ip_3_counter == 0 && $ip_3_end == 254 )
{
$ip_3_counter = 255;
$ip_3_fragment = 255;
 
$ip_list[] = encode_ip("$ip_1_counter.$ip_2_counter.255.255");
}
 
while ( $ip_3_counter <= $ip_3_end )
{
$ip_4_counter = ( $ip_3_counter == $ip_range_explode[3] && $ip_2_counter == $ip_range_explode[2] && $ip_1_counter == $ip_range_explode[1] ) ? $ip_range_explode[4] : 0;
$ip_4_end = ( $ip_3_counter < $ip_3_end || $ip_2_counter < $ip_2_end ) ? 254 : $ip_range_explode[8];
 
if ( $ip_4_counter == 0 && $ip_4_end == 254 )
{
$ip_4_counter = 255;
$ip_4_fragment = 255;
 
$ip_list[] = encode_ip("$ip_1_counter.$ip_2_counter.$ip_3_counter.255");
}
 
while ( $ip_4_counter <= $ip_4_end )
{
$ip_list[] = encode_ip("$ip_1_counter.$ip_2_counter.$ip_3_counter.$ip_4_counter");
$ip_4_counter++;
}
$ip_3_counter++;
}
$ip_2_counter++;
}
$ip_1_counter++;
}
}
else if ( preg_match('/^([\w\-_]\.?){2,}$/is', trim($ip_list_temp[$i])) )
{
$ip = gethostbynamel(trim($ip_list_temp[$i]));
 
for($j = 0; $j < count($ip); $j++)
{
if ( !empty($ip[$j]) )
{
$ip_list[] = encode_ip($ip[$j]);
}
}
}
else if ( preg_match('/^([0-9]{1,3})\.([0-9\*]{1,3})\.([0-9\*]{1,3})\.([0-9\*]{1,3})$/', trim($ip_list_temp[$i])) )
{
$ip_list[] = encode_ip(str_replace('*', '255', trim($ip_list_temp[$i])));
}
}
}
 
$email_list = array();
if ( isset($HTTP_POST_VARS['ban_email']) )
{
$email_list_temp = explode(',', $HTTP_POST_VARS['ban_email']);
 
for($i = 0; $i < count($email_list_temp); $i++)
{
//
// This ereg match is based on one by php@unreelpro.com
// contained in the annotated php manual at php.com (ereg
// section)
//
if (preg_match('/^(([a-z0-9&\'\.\-_\+])|(\*))+@(([a-z0-9\-])|(\*))+\.([a-z0-9\-]+\.)*?[a-z]+$/is', trim($email_list_temp[$i])))
{
$email_list[] = trim($email_list_temp[$i]);
}
}
}
 
$sql = "SELECT *
FROM " . BANLIST_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain banlist information", "", __LINE__, __FILE__, $sql);
}
 
$current_banlist = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
 
$kill_session_sql = '';
for($i = 0; $i < count($user_list); $i++)
{
$in_banlist = false;
for($j = 0; $j < count($current_banlist); $j++)
{
if ( $user_list[$i] == $current_banlist[$j]['ban_userid'] )
{
$in_banlist = true;
}
}
 
if ( !$in_banlist )
{
$kill_session_sql .= ( ( $kill_session_sql != '' ) ? ' OR ' : '' ) . "session_user_id = " . $user_list[$i];
 
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_userid)
VALUES (" . $user_list[$i] . ")";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert ban_userid info into database", "", __LINE__, __FILE__, $sql);
}
}
}
 
for($i = 0; $i < count($ip_list); $i++)
{
$in_banlist = false;
for($j = 0; $j < count($current_banlist); $j++)
{
if ( $ip_list[$i] == $current_banlist[$j]['ban_ip'] )
{
$in_banlist = true;
}
}
 
if ( !$in_banlist )
{
if ( preg_match('/(ff\.)|(\.ff)/is', chunk_split($ip_list[$i], 2, '.')) )
{
$kill_ip_sql = "session_ip LIKE '" . str_replace('.', '', preg_replace('/(ff\.)|(\.ff)/is', '%', chunk_split($ip_list[$i], 2, "."))) . "'";
}
else
{
$kill_ip_sql = "session_ip = '" . $ip_list[$i] . "'";
}
 
$kill_session_sql .= ( ( $kill_session_sql != '' ) ? ' OR ' : '' ) . $kill_ip_sql;
 
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_ip)
VALUES ('" . $ip_list[$i] . "')";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert ban_ip info into database", "", __LINE__, __FILE__, $sql);
}
}
}
 
//
// Now we'll delete all entries from the session table with any of the banned
// user or IP info just entered into the ban table ... this will force a session
// initialisation resulting in an instant ban
//
if ( $kill_session_sql != '' )
{
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE $kill_session_sql";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete banned sessions from database", "", __LINE__, __FILE__, $sql);
}
}
 
for($i = 0; $i < count($email_list); $i++)
{
$in_banlist = false;
for($j = 0; $j < count($current_banlist); $j++)
{
if ( $email_list[$i] == $current_banlist[$j]['ban_email'] )
{
$in_banlist = true;
}
}
 
if ( !$in_banlist )
{
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_email)
VALUES ('" . str_replace("\'", "''", $email_list[$i]) . "')";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert ban_email info into database", "", __LINE__, __FILE__, $sql);
}
}
}
 
$where_sql = '';
 
if ( isset($HTTP_POST_VARS['unban_user']) )
{
$user_list = $HTTP_POST_VARS['unban_user'];
 
for($i = 0; $i < count($user_list); $i++)
{
if ( $user_list[$i] != -1 )
{
$where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . intval($user_list[$i]);
}
}
}
 
if ( isset($HTTP_POST_VARS['unban_ip']) )
{
$ip_list = $HTTP_POST_VARS['unban_ip'];
 
for($i = 0; $i < count($ip_list); $i++)
{
if ( $ip_list[$i] != -1 )
{
$where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . str_replace("\'", "''", $ip_list[$i]);
}
}
}
 
if ( isset($HTTP_POST_VARS['unban_email']) )
{
$email_list = $HTTP_POST_VARS['unban_email'];
 
for($i = 0; $i < count($email_list); $i++)
{
if ( $email_list[$i] != -1 )
{
$where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . str_replace("\'", "''", $email_list[$i]);
}
}
}
 
if ( $where_sql != '' )
{
$sql = "DELETE FROM " . BANLIST_TABLE . "
WHERE ban_id IN ($where_sql)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete ban info from database", "", __LINE__, __FILE__, $sql);
}
}
 
$message = $lang['Ban_update_sucessful'] . '<br /><br />' . sprintf($lang['Click_return_banadmin'], '<a href="' . append_sid("admin_user_ban.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
 
}
else
{
$template->set_filenames(array(
'body' => 'admin/user_ban_body.tpl')
);
 
$template->assign_vars(array(
'L_BAN_TITLE' => $lang['Ban_control'],
'L_BAN_EXPLAIN' => $lang['Ban_explain'],
'L_BAN_EXPLAIN_WARN' => $lang['Ban_explain_warn'],
'L_IP_OR_HOSTNAME' => $lang['IP_hostname'],
'L_EMAIL_ADDRESS' => $lang['Email_address'],
'L_SUBMIT' => $lang['Submit'],
'L_RESET' => $lang['Reset'],
 
'S_BANLIST_ACTION' => append_sid("admin_user_ban.$phpEx"))
);
 
$template->assign_vars(array(
'L_BAN_USER' => $lang['Ban_username'],
'L_BAN_USER_EXPLAIN' => $lang['Ban_username_explain'],
'L_BAN_IP' => $lang['Ban_IP'],
'L_BAN_IP_EXPLAIN' => $lang['Ban_IP_explain'],
'L_BAN_EMAIL' => $lang['Ban_email'],
'L_BAN_EMAIL_EXPLAIN' => $lang['Ban_email_explain'])
);
 
$userban_count = 0;
$ipban_count = 0;
$emailban_count = 0;
 
$sql = "SELECT b.ban_id, u.user_id, u.username
FROM " . BANLIST_TABLE . " b, " . USERS_TABLE . " u
WHERE u.user_id = b.ban_userid
AND b.ban_userid <> 0
AND u.user_id <> " . ANONYMOUS . "
ORDER BY u.user_id ASC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select current user_id ban list', '', __LINE__, __FILE__, $sql);
}
 
$user_list = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
 
$select_userlist = '';
for($i = 0; $i < count($user_list); $i++)
{
$select_userlist .= '<option value="' . $user_list[$i]['ban_id'] . '">' . $user_list[$i]['username'] . '</option>';
$userban_count++;
}
 
if( $select_userlist == '' )
{
$select_userlist = '<option value="-1">' . $lang['No_banned_users'] . '</option>';
}
 
$select_userlist = '<select name="unban_user[]" multiple="multiple" size="5">' . $select_userlist . '</select>';
 
$sql = "SELECT ban_id, ban_ip, ban_email
FROM " . BANLIST_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select current ip ban list', '', __LINE__, __FILE__, $sql);
}
 
$banlist = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
 
$select_iplist = '';
$select_emaillist = '';
 
for($i = 0; $i < count($banlist); $i++)
{
$ban_id = $banlist[$i]['ban_id'];
 
if ( !empty($banlist[$i]['ban_ip']) )
{
$ban_ip = str_replace('255', '*', decode_ip($banlist[$i]['ban_ip']));
$select_iplist .= '<option value="' . $ban_id . '">' . $ban_ip . '</option>';
$ipban_count++;
}
else if ( !empty($banlist[$i]['ban_email']) )
{
$ban_email = $banlist[$i]['ban_email'];
$select_emaillist .= '<option value="' . $ban_id . '">' . $ban_email . '</option>';
$emailban_count++;
}
}
 
if ( $select_iplist == '' )
{
$select_iplist = '<option value="-1">' . $lang['No_banned_ip'] . '</option>';
}
 
if ( $select_emaillist == '' )
{
$select_emaillist = '<option value="-1">' . $lang['No_banned_email'] . '</option>';
}
 
$select_iplist = '<select name="unban_ip[]" multiple="multiple" size="5">' . $select_iplist . '</select>';
$select_emaillist = '<select name="unban_email[]" multiple="multiple" size="5">' . $select_emaillist . '</select>';
 
$template->assign_vars(array(
'L_UNBAN_USER' => $lang['Unban_username'],
'L_UNBAN_USER_EXPLAIN' => $lang['Unban_username_explain'],
'L_UNBAN_IP' => $lang['Unban_IP'],
'L_UNBAN_IP_EXPLAIN' => $lang['Unban_IP_explain'],
'L_UNBAN_EMAIL' => $lang['Unban_email'],
'L_UNBAN_EMAIL_EXPLAIN' => $lang['Unban_email_explain'],
'L_USERNAME' => $lang['Username'],
'L_LOOK_UP' => $lang['Look_up_User'],
'L_FIND_USERNAME' => $lang['Find_username'],
 
'U_SEARCH_USER' => append_sid("./../search.$phpEx?mode=searchuser"),
'S_UNBAN_USERLIST_SELECT' => $select_userlist,
'S_UNBAN_IPLIST_SELECT' => $select_iplist,
'S_UNBAN_EMAILLIST_SELECT' => $select_emaillist,
'S_BAN_ACTION' => append_sid("admin_user_ban.$phpEx"))
);
}
 
$template->pparse('body');
 
include('./page_footer_admin.'.$phpEx);
 
?>
/Forum/admin/admin_users.php
0,0 → 1,1173
<?php
/***************************************************************************
* admin_users.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_users.php,v 1.57.2.35 2006/03/26 14:43:24 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', 1);
 
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Users']['Manage'] = $filename;
 
return;
}
 
$phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
require($phpbb_root_path . 'includes/bbcode.'.$phpEx);
require($phpbb_root_path . 'includes/functions_post.'.$phpEx);
require($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
require($phpbb_root_path . 'includes/functions_validate.'.$phpEx);
 
$html_entities_match = array('#<#', '#>#');
$html_entities_replace = array('&lt;', '&gt;');
 
//
// Set mode
//
if( isset( $HTTP_POST_VARS['mode'] ) || isset( $HTTP_GET_VARS['mode'] ) )
{
$mode = ( isset( $HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
$mode = htmlspecialchars($mode);
}
else
{
$mode = '';
}
 
//
// Begin program
//
if ( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_GET_VARS[POST_USERS_URL]) || isset( $HTTP_POST_VARS[POST_USERS_URL]) ) )
{
//
// Ok, the profile has been modified and submitted, let's update
//
if ( ( $mode == 'save' && isset( $HTTP_POST_VARS['submit'] ) ) || isset( $HTTP_POST_VARS['avatargallery'] ) || isset( $HTTP_POST_VARS['submitavatar'] ) || isset( $HTTP_POST_VARS['cancelavatar'] ) )
{
$user_id = intval($HTTP_POST_VARS['id']);
 
if (!($this_userdata = get_userdata($user_id)))
{
message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] );
}
 
if( $HTTP_POST_VARS['deleteuser'] && ( $userdata['user_id'] != $user_id ) )
{
$sql = "SELECT g.group_id
FROM " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
WHERE ug.user_id = $user_id
AND g.group_id = ug.group_id
AND g.group_single_user = 1";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain group information for this user', '', __LINE__, __FILE__, $sql);
}
 
$row = $db->sql_fetchrow($result);
$sql = "UPDATE " . POSTS_TABLE . "
SET poster_id = " . DELETED . ", post_username = '" . str_replace("\\'", "''", addslashes($this_userdata['username'])) . "'
WHERE poster_id = $user_id";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update posts for this user', '', __LINE__, __FILE__, $sql);
}
 
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_poster = " . DELETED . "
WHERE topic_poster = $user_id";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update topics for this user', '', __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . VOTE_USERS_TABLE . "
SET vote_user_id = " . DELETED . "
WHERE vote_user_id = $user_id";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update votes for this user', '', __LINE__, __FILE__, $sql);
}
$sql = "SELECT group_id
FROM " . GROUPS_TABLE . "
WHERE group_moderator = $user_id";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select groups where user was moderator', '', __LINE__, __FILE__, $sql);
}
while ( $row_group = $db->sql_fetchrow($result) )
{
$group_moderator[] = $row_group['group_id'];
}
if ( count($group_moderator) )
{
$update_moderator_id = implode(', ', $group_moderator);
$sql = "UPDATE " . GROUPS_TABLE . "
SET group_moderator = " . $userdata['user_id'] . "
WHERE group_moderator IN ($update_moderator_id)";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update group moderators', '', __LINE__, __FILE__, $sql);
}
}
 
$sql = "DELETE FROM " . USERS_TABLE . "
WHERE user_id = $user_id";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete user', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE FROM " . USER_GROUP_TABLE . "
WHERE user_id = $user_id";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete user from user_group table', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE FROM " . GROUPS_TABLE . "
WHERE group_id = " . $row['group_id'];
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete group for this user', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE FROM " . AUTH_ACCESS_TABLE . "
WHERE group_id = " . $row['group_id'];
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete group for this user', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
WHERE user_id = $user_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete user from topic watch table', '', __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . BANLIST_TABLE . "
WHERE ban_userid = $user_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete user from banlist table', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_user_id = $user_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete sessions for this user', '', __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . SESSIONS_KEYS_TABLE . "
WHERE user_id = $user_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete auto-login keys for this user', '', __LINE__, __FILE__, $sql);
}
 
$sql = "SELECT privmsgs_id
FROM " . PRIVMSGS_TABLE . "
WHERE privmsgs_from_userid = $user_id
OR privmsgs_to_userid = $user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select all users private messages', '', __LINE__, __FILE__, $sql);
}
 
// This little bit of code directly from the private messaging section.
while ( $row_privmsgs = $db->sql_fetchrow($result) )
{
$mark_list[] = $row_privmsgs['privmsgs_id'];
}
if ( count($mark_list) )
{
$delete_sql_id = implode(', ', $mark_list);
$delete_text_sql = "DELETE FROM " . PRIVMSGS_TEXT_TABLE . "
WHERE privmsgs_text_id IN ($delete_sql_id)";
$delete_sql = "DELETE FROM " . PRIVMSGS_TABLE . "
WHERE privmsgs_id IN ($delete_sql_id)";
if ( !$db->sql_query($delete_sql) )
{
message_die(GENERAL_ERROR, 'Could not delete private message info', '', __LINE__, __FILE__, $delete_sql);
}
if ( !$db->sql_query($delete_text_sql) )
{
message_die(GENERAL_ERROR, 'Could not delete private message text', '', __LINE__, __FILE__, $delete_text_sql);
}
}
 
$message = $lang['User_deleted'] . '<br /><br />' . sprintf($lang['Click_return_useradmin'], '<a href="' . append_sid("admin_users.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
}
 
$username = ( !empty($HTTP_POST_VARS['username']) ) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
$email = ( !empty($HTTP_POST_VARS['email']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['email'] ) )) : '';
 
$password = ( !empty($HTTP_POST_VARS['password']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['password'] ) )) : '';
$password_confirm = ( !empty($HTTP_POST_VARS['password_confirm']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['password_confirm'] ) )) : '';
 
$icq = ( !empty($HTTP_POST_VARS['icq']) ) ? trim(strip_tags( $HTTP_POST_VARS['icq'] ) ) : '';
$aim = ( !empty($HTTP_POST_VARS['aim']) ) ? trim(strip_tags( $HTTP_POST_VARS['aim'] ) ) : '';
$msn = ( !empty($HTTP_POST_VARS['msn']) ) ? trim(strip_tags( $HTTP_POST_VARS['msn'] ) ) : '';
$yim = ( !empty($HTTP_POST_VARS['yim']) ) ? trim(strip_tags( $HTTP_POST_VARS['yim'] ) ) : '';
 
$website = ( !empty($HTTP_POST_VARS['website']) ) ? trim(strip_tags( $HTTP_POST_VARS['website'] ) ) : '';
$location = ( !empty($HTTP_POST_VARS['location']) ) ? trim(strip_tags( $HTTP_POST_VARS['location'] ) ) : '';
$occupation = ( !empty($HTTP_POST_VARS['occupation']) ) ? trim(strip_tags( $HTTP_POST_VARS['occupation'] ) ) : '';
$interests = ( !empty($HTTP_POST_VARS['interests']) ) ? trim(strip_tags( $HTTP_POST_VARS['interests'] ) ) : '';
$signature = ( !empty($HTTP_POST_VARS['signature']) ) ? trim(str_replace('<br />', "\n", $HTTP_POST_VARS['signature'] ) ) : '';
 
validate_optional_fields($icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature);
 
$viewemail = ( isset( $HTTP_POST_VARS['viewemail']) ) ? ( ( $HTTP_POST_VARS['viewemail'] ) ? TRUE : 0 ) : 0;
$allowviewonline = ( isset( $HTTP_POST_VARS['hideonline']) ) ? ( ( $HTTP_POST_VARS['hideonline'] ) ? 0 : TRUE ) : TRUE;
$notifyreply = ( isset( $HTTP_POST_VARS['notifyreply']) ) ? ( ( $HTTP_POST_VARS['notifyreply'] ) ? TRUE : 0 ) : 0;
$notifypm = ( isset( $HTTP_POST_VARS['notifypm']) ) ? ( ( $HTTP_POST_VARS['notifypm'] ) ? TRUE : 0 ) : TRUE;
$popuppm = ( isset( $HTTP_POST_VARS['popup_pm']) ) ? ( ( $HTTP_POST_VARS['popup_pm'] ) ? TRUE : 0 ) : TRUE;
$attachsig = ( isset( $HTTP_POST_VARS['attachsig']) ) ? ( ( $HTTP_POST_VARS['attachsig'] ) ? TRUE : 0 ) : 0;
 
$allowhtml = ( isset( $HTTP_POST_VARS['allowhtml']) ) ? intval( $HTTP_POST_VARS['allowhtml'] ) : $board_config['allow_html'];
$allowbbcode = ( isset( $HTTP_POST_VARS['allowbbcode']) ) ? intval( $HTTP_POST_VARS['allowbbcode'] ) : $board_config['allow_bbcode'];
$allowsmilies = ( isset( $HTTP_POST_VARS['allowsmilies']) ) ? intval( $HTTP_POST_VARS['allowsmilies'] ) : $board_config['allow_smilies'];
 
$user_style = ( isset( $HTTP_POST_VARS['style'] ) ) ? intval( $HTTP_POST_VARS['style'] ) : $board_config['default_style'];
$user_lang = ( $HTTP_POST_VARS['language'] ) ? $HTTP_POST_VARS['language'] : $board_config['default_lang'];
$user_timezone = ( isset( $HTTP_POST_VARS['timezone']) ) ? doubleval( $HTTP_POST_VARS['timezone'] ) : $board_config['board_timezone'];
$user_dateformat = ( $HTTP_POST_VARS['dateformat'] ) ? trim( $HTTP_POST_VARS['dateformat'] ) : $board_config['default_dateformat'];
 
$user_avatar_local = ( isset( $HTTP_POST_VARS['avatarselect'] ) && !empty($HTTP_POST_VARS['submitavatar'] ) && $board_config['allow_avatar_local'] ) ? $HTTP_POST_VARS['avatarselect'] : ( ( isset( $HTTP_POST_VARS['avatarlocal'] ) ) ? $HTTP_POST_VARS['avatarlocal'] : '' );
$user_avatar_category = ( isset($HTTP_POST_VARS['avatarcatname']) && $board_config['allow_avatar_local'] ) ? htmlspecialchars($HTTP_POST_VARS['avatarcatname']) : '' ;
 
$user_avatar_remoteurl = ( !empty($HTTP_POST_VARS['avatarremoteurl']) ) ? trim( $HTTP_POST_VARS['avatarremoteurl'] ) : '';
$user_avatar_url = ( !empty($HTTP_POST_VARS['avatarurl']) ) ? trim( $HTTP_POST_VARS['avatarurl'] ) : '';
$user_avatar_loc = ( $HTTP_POST_FILES['avatar']['tmp_name'] != "none") ? $HTTP_POST_FILES['avatar']['tmp_name'] : '';
$user_avatar_name = ( !empty($HTTP_POST_FILES['avatar']['name']) ) ? $HTTP_POST_FILES['avatar']['name'] : '';
$user_avatar_size = ( !empty($HTTP_POST_FILES['avatar']['size']) ) ? $HTTP_POST_FILES['avatar']['size'] : 0;
$user_avatar_filetype = ( !empty($HTTP_POST_FILES['avatar']['type']) ) ? $HTTP_POST_FILES['avatar']['type'] : '';
 
$user_avatar = ( empty($user_avatar_loc) ) ? $this_userdata['user_avatar'] : '';
$user_avatar_type = ( empty($user_avatar_loc) ) ? $this_userdata['user_avatar_type'] : '';
 
$user_status = ( !empty($HTTP_POST_VARS['user_status']) ) ? intval( $HTTP_POST_VARS['user_status'] ) : 0;
$user_allowpm = ( !empty($HTTP_POST_VARS['user_allowpm']) ) ? intval( $HTTP_POST_VARS['user_allowpm'] ) : 0;
$user_rank = ( !empty($HTTP_POST_VARS['user_rank']) ) ? intval( $HTTP_POST_VARS['user_rank'] ) : 0;
$user_allowavatar = ( !empty($HTTP_POST_VARS['user_allowavatar']) ) ? intval( $HTTP_POST_VARS['user_allowavatar'] ) : 0;
 
if( isset( $HTTP_POST_VARS['avatargallery'] ) || isset( $HTTP_POST_VARS['submitavatar'] ) || isset( $HTTP_POST_VARS['cancelavatar'] ) )
{
$username = stripslashes($username);
$email = stripslashes($email);
$password = '';
$password_confirm = '';
 
$icq = stripslashes($icq);
$aim = htmlspecialchars(stripslashes($aim));
$msn = htmlspecialchars(stripslashes($msn));
$yim = htmlspecialchars(stripslashes($yim));
 
$website = htmlspecialchars(stripslashes($website));
$location = htmlspecialchars(stripslashes($location));
$occupation = htmlspecialchars(stripslashes($occupation));
$interests = htmlspecialchars(stripslashes($interests));
$signature = htmlspecialchars(stripslashes($signature));
 
$user_lang = stripslashes($user_lang);
$user_dateformat = htmlspecialchars(stripslashes($user_dateformat));
 
if ( !isset($HTTP_POST_VARS['cancelavatar']))
{
$user_avatar = $user_avatar_category . '/' . $user_avatar_local;
$user_avatar_type = USER_AVATAR_GALLERY;
}
}
}
 
if( isset( $HTTP_POST_VARS['submit'] ) )
{
include($phpbb_root_path . 'includes/usercp_avatar.'.$phpEx);
 
$error = FALSE;
 
if (stripslashes($username) != $this_userdata['username'])
{
unset($rename_user);
 
if ( stripslashes(strtolower($username)) != strtolower($this_userdata['username']) )
{
$result = validate_username($username);
if ( $result['error'] )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $result['error_msg'];
}
else if ( strtolower(str_replace("\\'", "''", $username)) == strtolower($userdata['username']) )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Username_taken'];
}
}
 
if (!$error)
{
$username_sql = "username = '" . str_replace("\\'", "''", $username) . "', ";
$rename_user = $username; // Used for renaming usergroup
}
}
 
$passwd_sql = '';
if( !empty($password) && !empty($password_confirm) )
{
//
// Awww, the user wants to change their password, isn't that cute..
//
if($password != $password_confirm)
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
}
else
{
$password = md5($password);
$passwd_sql = "user_password = '$password', ";
}
}
else if( $password && !$password_confirm )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
}
else if( !$password && $password_confirm )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
}
 
if ($signature != '')
{
$sig_length_check = preg_replace('/(\[.*?)(=.*?)\]/is', '\\1]', stripslashes($signature));
if ( $allowhtml )
{
$sig_length_check = preg_replace('/(\<.*?)(=.*?)( .*?=.*?)?([ \/]?\>)/is', '\\1\\3\\4', $sig_length_check);
}
 
// Only create a new bbcode_uid when there was no uid yet.
if ( $signature_bbcode_uid == '' )
{
$signature_bbcode_uid = ( $allowbbcode ) ? make_bbcode_uid() : '';
}
$signature = prepare_message($signature, $allowhtml, $allowbbcode, $allowsmilies, $signature_bbcode_uid);
 
if ( strlen($sig_length_check) > $board_config['max_sig_chars'] )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Signature_too_long'];
}
}
 
//
// Avatar stuff
//
$avatar_sql = "";
if( isset($HTTP_POST_VARS['avatardel']) )
{
if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "" )
{
if( @file_exists(@phpbb_realpath('./../' . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar'])) )
{
@unlink('./../' . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar']);
}
}
$avatar_sql = ", user_avatar = '', user_avatar_type = " . USER_AVATAR_NONE;
}
else if( ( $user_avatar_loc != "" || !empty($user_avatar_url) ) && !$error )
{
//
// Only allow one type of upload, either a
// filename or a URL
//
if( !empty($user_avatar_loc) && !empty($user_avatar_url) )
{
$error = TRUE;
if( isset($error_msg) )
{
$error_msg .= "<br />";
}
$error_msg .= $lang['Only_one_avatar'];
}
 
if( $user_avatar_loc != "" )
{
if( file_exists(@phpbb_realpath($user_avatar_loc)) && ereg(".jpg$|.gif$|.png$", $user_avatar_name) )
{
if( $user_avatar_size <= $board_config['avatar_filesize'] && $user_avatar_size > 0)
{
$error_type = false;
 
//
// Opera appends the image name after the type, not big, not clever!
//
preg_match("'image\/[x\-]*([a-z]+)'", $user_avatar_filetype, $user_avatar_filetype);
$user_avatar_filetype = $user_avatar_filetype[1];
 
switch( $user_avatar_filetype )
{
case "jpeg":
case "pjpeg":
case "jpg":
$imgtype = '.jpg';
break;
case "gif":
$imgtype = '.gif';
break;
case "png":
$imgtype = '.png';
break;
default:
$error = true;
$error_msg = (!empty($error_msg)) ? $error_msg . "<br />" . $lang['Avatar_filetype'] : $lang['Avatar_filetype'];
break;
}
 
if( !$error )
{
list($width, $height) = @getimagesize($user_avatar_loc);
 
if( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
{
$user_id = $this_userdata['user_id'];
 
$avatar_filename = $user_id . $imgtype;
 
if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "" )
{
if( @file_exists(@phpbb_realpath("./../" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar'])) )
{
@unlink("./../" . $board_config['avatar_path'] . "/". $this_userdata['user_avatar']);
}
}
@copy($user_avatar_loc, "./../" . $board_config['avatar_path'] . "/$avatar_filename");
 
$avatar_sql = ", user_avatar = '$avatar_filename', user_avatar_type = " . USER_AVATAR_UPLOAD;
}
else
{
$l_avatar_size = sprintf($lang['Avatar_imagesize'], $board_config['avatar_max_width'], $board_config['avatar_max_height']);
 
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $l_avatar_size : $l_avatar_size;
}
}
}
else
{
$l_avatar_size = sprintf($lang['Avatar_filesize'], round($board_config['avatar_filesize'] / 1024));
 
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $l_avatar_size : $l_avatar_size;
}
}
else
{
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $lang['Avatar_filetype'] : $lang['Avatar_filetype'];
}
}
else if( !empty($user_avatar_url) )
{
//
// First check what port we should connect
// to, look for a :[xxxx]/ or, if that doesn't
// exist assume port 80 (http)
//
preg_match("/^(http:\/\/)?([\w\-\.]+)\:?([0-9]*)\/(.*)$/", $user_avatar_url, $url_ary);
 
if( !empty($url_ary[4]) )
{
$port = (!empty($url_ary[3])) ? $url_ary[3] : 80;
 
$fsock = @fsockopen($url_ary[2], $port, $errno, $errstr);
if( $fsock )
{
$base_get = "/" . $url_ary[4];
 
//
// Uses HTTP 1.1, could use HTTP 1.0 ...
//
@fputs($fsock, "GET $base_get HTTP/1.1\r\n");
@fputs($fsock, "HOST: " . $url_ary[2] . "\r\n");
@fputs($fsock, "Connection: close\r\n\r\n");
 
unset($avatar_data);
while( !@feof($fsock) )
{
$avatar_data .= @fread($fsock, $board_config['avatar_filesize']);
}
@fclose($fsock);
 
if( preg_match("/Content-Length\: ([0-9]+)[^\/ ][\s]+/i", $avatar_data, $file_data1) && preg_match("/Content-Type\: image\/[x\-]*([a-z]+)[\s]+/i", $avatar_data, $file_data2) )
{
$file_size = $file_data1[1];
$file_type = $file_data2[1];
 
switch( $file_type )
{
case "jpeg":
case "pjpeg":
case "jpg":
$imgtype = '.jpg';
break;
case "gif":
$imgtype = '.gif';
break;
case "png":
$imgtype = '.png';
break;
default:
$error = true;
$error_msg = (!empty($error_msg)) ? $error_msg . "<br />" . $lang['Avatar_filetype'] : $lang['Avatar_filetype'];
break;
}
 
if( !$error && $file_size > 0 && $file_size < $board_config['avatar_filesize'] )
{
$avatar_data = substr($avatar_data, strlen($avatar_data) - $file_size, $file_size);
 
$tmp_filename = tempnam ("/tmp", $this_userdata['user_id'] . "-");
$fptr = @fopen($tmp_filename, "wb");
$bytes_written = @fwrite($fptr, $avatar_data, $file_size);
@fclose($fptr);
 
if( $bytes_written == $file_size )
{
list($width, $height) = @getimagesize($tmp_filename);
 
if( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
{
$user_id = $this_userdata['user_id'];
 
$avatar_filename = $user_id . $imgtype;
 
if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "")
{
if( file_exists(@phpbb_realpath("./../" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar'])) )
{
@unlink("./../" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar']);
}
}
@copy($tmp_filename, "./../" . $board_config['avatar_path'] . "/$avatar_filename");
@unlink($tmp_filename);
 
$avatar_sql = ", user_avatar = '$avatar_filename', user_avatar_type = " . USER_AVATAR_UPLOAD;
}
else
{
$l_avatar_size = sprintf($lang['Avatar_imagesize'], $board_config['avatar_max_width'], $board_config['avatar_max_height']);
 
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $l_avatar_size : $l_avatar_size;
}
}
else
{
//
// Error writing file
//
@unlink($tmp_filename);
message_die(GENERAL_ERROR, "Could not write avatar file to local storage. Please contact the board administrator with this message", "", __LINE__, __FILE__);
}
}
}
else
{
//
// No data
//
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $lang['File_no_data'] : $lang['File_no_data'];
}
}
else
{
//
// No connection
//
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $lang['No_connection_URL'] : $lang['No_connection_URL'];
}
}
else
{
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $lang['Incomplete_URL'] : $lang['Incomplete_URL'];
}
}
else if( !empty($user_avatar_name) )
{
$l_avatar_size = sprintf($lang['Avatar_filesize'], round($board_config['avatar_filesize'] / 1024));
 
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $l_avatar_size : $l_avatar_size;
}
}
else if( $user_avatar_remoteurl != "" && $avatar_sql == "" && !$error )
{
if( !preg_match("#^http:\/\/#i", $user_avatar_remoteurl) )
{
$user_avatar_remoteurl = "http://" . $user_avatar_remoteurl;
}
 
if( preg_match("#^(http:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+\/.*?\.(gif|jpg|png)$)#is", $user_avatar_remoteurl) )
{
$avatar_sql = ", user_avatar = '" . str_replace("\'", "''", $user_avatar_remoteurl) . "', user_avatar_type = " . USER_AVATAR_REMOTE;
}
else
{
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $lang['Wrong_remote_avatar_format'] : $lang['Wrong_remote_avatar_format'];
}
}
else if( $user_avatar_local != "" && $avatar_sql == "" && !$error )
{
$avatar_sql = ", user_avatar = '" . str_replace("\'", "''", phpbb_ltrim(basename($user_avatar_category), "'") . '/' . phpbb_ltrim(basename($user_avatar_local), "'")) . "', user_avatar_type = " . USER_AVATAR_GALLERY;
}
//
// Update entry in DB
//
if( !$error )
{
$sql = "UPDATE " . USERS_TABLE . "
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank" . $avatar_sql . "
WHERE user_id = $user_id";
 
if( $result = $db->sql_query($sql) )
{
if( isset($rename_user) )
{
$sql = "UPDATE " . GROUPS_TABLE . "
SET group_name = '".str_replace("\'", "''", $rename_user)."'
WHERE group_name = '".str_replace("'", "''", $this_userdata['username'] )."'";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not rename users group', '', __LINE__, __FILE__, $sql);
}
}
// Delete user session, to prevent the user navigating the forum (if logged in) when disabled
if (!$user_status)
{
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_user_id = " . $user_id;
 
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Error removing user session', '', __LINE__, __FILE__, $sql);
}
}
 
// We remove all stored login keys since the password has been updated
// and change the current one (if applicable)
if ( !empty($passwd_sql) )
{
session_reset_keys($user_id, $user_ip);
}
$message .= $lang['Admin_user_updated'];
}
else
{
message_die(GENERAL_ERROR, 'Admin_user_fail', '', __LINE__, __FILE__, $sql);
}
 
$message .= '<br /><br />' . sprintf($lang['Click_return_useradmin'], '<a href="' . append_sid("admin_users.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
}
else
{
$template->set_filenames(array(
'reg_header' => 'error_body.tpl')
);
 
$template->assign_vars(array(
'ERROR_MESSAGE' => $error_msg)
);
 
$template->assign_var_from_handle('ERROR_BOX', 'reg_header');
 
$username = htmlspecialchars(stripslashes($username));
$email = stripslashes($email);
$password = '';
$password_confirm = '';
 
$icq = stripslashes($icq);
$aim = htmlspecialchars(str_replace('+', ' ', stripslashes($aim)));
$msn = htmlspecialchars(stripslashes($msn));
$yim = htmlspecialchars(stripslashes($yim));
 
$website = htmlspecialchars(stripslashes($website));
$location = htmlspecialchars(stripslashes($location));
$occupation = htmlspecialchars(stripslashes($occupation));
$interests = htmlspecialchars(stripslashes($interests));
$signature = htmlspecialchars(stripslashes($signature));
 
$user_lang = stripslashes($user_lang);
$user_dateformat = htmlspecialchars(stripslashes($user_dateformat));
}
}
else if( !isset( $HTTP_POST_VARS['submit'] ) && $mode != 'save' && !isset( $HTTP_POST_VARS['avatargallery'] ) && !isset( $HTTP_POST_VARS['submitavatar'] ) && !isset( $HTTP_POST_VARS['cancelavatar'] ) )
{
if( isset( $HTTP_GET_VARS[POST_USERS_URL]) || isset( $HTTP_POST_VARS[POST_USERS_URL]) )
{
$user_id = ( isset( $HTTP_POST_VARS[POST_USERS_URL]) ) ? intval( $HTTP_POST_VARS[POST_USERS_URL]) : intval( $HTTP_GET_VARS[POST_USERS_URL]);
$this_userdata = get_userdata($user_id);
if( !$this_userdata )
{
message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] );
}
}
else
{
$this_userdata = get_userdata($HTTP_POST_VARS['username'], true);
if( !$this_userdata )
{
message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] );
}
}
 
//
// Now parse and display it as a template
//
$user_id = $this_userdata['user_id'];
$username = $this_userdata['username'];
$email = $this_userdata['user_email'];
$password = '';
$password_confirm = '';
 
$icq = $this_userdata['user_icq'];
$aim = htmlspecialchars(str_replace('+', ' ', $this_userdata['user_aim'] ));
$msn = htmlspecialchars($this_userdata['user_msnm']);
$yim = htmlspecialchars($this_userdata['user_yim']);
 
$website = htmlspecialchars($this_userdata['user_website']);
$location = htmlspecialchars($this_userdata['user_from']);
$occupation = htmlspecialchars($this_userdata['user_occ']);
$interests = htmlspecialchars($this_userdata['user_interests']);
 
$signature = ($this_userdata['user_sig_bbcode_uid'] != '') ? preg_replace('#:' . $this_userdata['user_sig_bbcode_uid'] . '#si', '', $this_userdata['user_sig']) : $this_userdata['user_sig'];
$signature = preg_replace($html_entities_match, $html_entities_replace, $signature);
 
$viewemail = $this_userdata['user_viewemail'];
$notifypm = $this_userdata['user_notify_pm'];
$popuppm = $this_userdata['user_popup_pm'];
$notifyreply = $this_userdata['user_notify'];
$attachsig = $this_userdata['user_attachsig'];
$allowhtml = $this_userdata['user_allowhtml'];
$allowbbcode = $this_userdata['user_allowbbcode'];
$allowsmilies = $this_userdata['user_allowsmile'];
$allowviewonline = $this_userdata['user_allow_viewonline'];
 
$user_avatar = $this_userdata['user_avatar'];
$user_avatar_type = $this_userdata['user_avatar_type'];
$user_style = $this_userdata['user_style'];
$user_lang = $this_userdata['user_lang'];
$user_timezone = $this_userdata['user_timezone'];
$user_dateformat = htmlspecialchars($this_userdata['user_dateformat']);
$user_status = $this_userdata['user_active'];
$user_allowavatar = $this_userdata['user_allowavatar'];
$user_allowpm = $this_userdata['user_allow_pm'];
$COPPA = false;
 
$html_status = ($this_userdata['user_allowhtml'] ) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF'];
$bbcode_status = ($this_userdata['user_allowbbcode'] ) ? $lang['BBCode_is_ON'] : $lang['BBCode_is_OFF'];
$smilies_status = ($this_userdata['user_allowsmile'] ) ? $lang['Smilies_are_ON'] : $lang['Smilies_are_OFF'];
}
 
if( isset($HTTP_POST_VARS['avatargallery']) && !$error )
{
if( !$error )
{
$user_id = intval($HTTP_POST_VARS['id']);
 
$template->set_filenames(array(
"body" => "admin/user_avatar_gallery.tpl")
);
 
$dir = @opendir("../" . $board_config['avatar_gallery_path']);
 
$avatar_images = array();
while( $file = @readdir($dir) )
{
if( $file != "." && $file != ".." && !is_file(phpbb_realpath("./../" . $board_config['avatar_gallery_path'] . "/" . $file)) && !is_link(phpbb_realpath("./../" . $board_config['avatar_gallery_path'] . "/" . $file)) )
{
$sub_dir = @opendir("../" . $board_config['avatar_gallery_path'] . "/" . $file);
 
$avatar_row_count = 0;
$avatar_col_count = 0;
 
while( $sub_file = @readdir($sub_dir) )
{
if( preg_match("/(\.gif$|\.png$|\.jpg)$/is", $sub_file) )
{
$avatar_images[$file][$avatar_row_count][$avatar_col_count] = $sub_file;
 
$avatar_col_count++;
if( $avatar_col_count == 5 )
{
$avatar_row_count++;
$avatar_col_count = 0;
}
}
}
}
}
@closedir($dir);
 
if( isset($HTTP_POST_VARS['avatarcategory']) )
{
$category = htmlspecialchars($HTTP_POST_VARS['avatarcategory']);
}
else
{
list($category, ) = each($avatar_images);
}
@reset($avatar_images);
 
$s_categories = "";
while( list($key) = each($avatar_images) )
{
$selected = ( $key == $category ) ? "selected=\"selected\"" : "";
if( count($avatar_images[$key]) )
{
$s_categories .= '<option value="' . $key . '"' . $selected . '>' . ucfirst($key) . '</option>';
}
}
 
$s_colspan = 0;
for($i = 0; $i < count($avatar_images[$category]); $i++)
{
$template->assign_block_vars("avatar_row", array());
 
$s_colspan = max($s_colspan, count($avatar_images[$category][$i]));
 
for($j = 0; $j < count($avatar_images[$category][$i]); $j++)
{
$template->assign_block_vars("avatar_row.avatar_column", array(
"AVATAR_IMAGE" => "../" . $board_config['avatar_gallery_path'] . '/' . $category . '/' . $avatar_images[$category][$i][$j])
);
 
$template->assign_block_vars("avatar_row.avatar_option_column", array(
"S_OPTIONS_AVATAR" => $avatar_images[$category][$i][$j])
);
}
}
 
$coppa = ( ( !$HTTP_POST_VARS['coppa'] && !$HTTP_GET_VARS['coppa'] ) || $mode == "register") ? 0 : TRUE;
 
$s_hidden_fields = '<input type="hidden" name="mode" value="edit" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" /><input type="hidden" name="avatarcatname" value="' . $category . '" />';
$s_hidden_fields .= '<input type="hidden" name="id" value="' . $user_id . '" />';
 
$s_hidden_fields .= '<input type="hidden" name="username" value="' . str_replace("\"", "&quot;", $username) . '" />';
$s_hidden_fields .= '<input type="hidden" name="email" value="' . str_replace("\"", "&quot;", $email) . '" />';
$s_hidden_fields .= '<input type="hidden" name="icq" value="' . str_replace("\"", "&quot;", $icq) . '" />';
$s_hidden_fields .= '<input type="hidden" name="aim" value="' . str_replace("\"", "&quot;", $aim) . '" />';
$s_hidden_fields .= '<input type="hidden" name="msn" value="' . str_replace("\"", "&quot;", $msn) . '" />';
$s_hidden_fields .= '<input type="hidden" name="yim" value="' . str_replace("\"", "&quot;", $yim) . '" />';
$s_hidden_fields .= '<input type="hidden" name="website" value="' . str_replace("\"", "&quot;", $website) . '" />';
$s_hidden_fields .= '<input type="hidden" name="location" value="' . str_replace("\"", "&quot;", $location) . '" />';
$s_hidden_fields .= '<input type="hidden" name="occupation" value="' . str_replace("\"", "&quot;", $occupation) . '" />';
$s_hidden_fields .= '<input type="hidden" name="interests" value="' . str_replace("\"", "&quot;", $interests) . '" />';
$s_hidden_fields .= '<input type="hidden" name="signature" value="' . str_replace("\"", "&quot;", $signature) . '" />';
$s_hidden_fields .= '<input type="hidden" name="viewemail" value="' . $viewemail . '" />';
$s_hidden_fields .= '<input type="hidden" name="notifypm" value="' . $notifypm . '" />';
$s_hidden_fields .= '<input type="hidden" name="popup_pm" value="' . $popuppm . '" />';
$s_hidden_fields .= '<input type="hidden" name="notifyreply" value="' . $notifyreply . '" />';
$s_hidden_fields .= '<input type="hidden" name="attachsig" value="' . $attachsig . '" />';
$s_hidden_fields .= '<input type="hidden" name="allowhtml" value="' . $allowhtml . '" />';
$s_hidden_fields .= '<input type="hidden" name="allowbbcode" value="' . $allowbbcode . '" />';
$s_hidden_fields .= '<input type="hidden" name="allowsmilies" value="' . $allowsmilies . '" />';
$s_hidden_fields .= '<input type="hidden" name="hideonline" value="' . !$allowviewonline . '" />';
$s_hidden_fields .= '<input type="hidden" name="style" value="' . $user_style . '" />';
$s_hidden_fields .= '<input type="hidden" name="language" value="' . $user_lang . '" />';
$s_hidden_fields .= '<input type="hidden" name="timezone" value="' . $user_timezone . '" />';
$s_hidden_fields .= '<input type="hidden" name="dateformat" value="' . str_replace("\"", "&quot;", $user_dateformat) . '" />';
 
$s_hidden_fields .= '<input type="hidden" name="user_status" value="' . $user_status . '" />';
$s_hidden_fields .= '<input type="hidden" name="user_allowpm" value="' . $user_allowpm . '" />';
$s_hidden_fields .= '<input type="hidden" name="user_allowavatar" value="' . $user_allowavatar . '" />';
$s_hidden_fields .= '<input type="hidden" name="user_rank" value="' . $user_rank . '" />';
 
$template->assign_vars(array(
"L_USER_TITLE" => $lang['User_admin'],
"L_USER_EXPLAIN" => $lang['User_admin_explain'],
"L_AVATAR_GALLERY" => $lang['Avatar_gallery'],
"L_SELECT_AVATAR" => $lang['Select_avatar'],
"L_RETURN_PROFILE" => $lang['Return_profile'],
"L_CATEGORY" => $lang['Select_category'],
"L_GO" => $lang['Go'],
 
"S_OPTIONS_CATEGORIES" => $s_categories,
"S_COLSPAN" => $s_colspan,
"S_PROFILE_ACTION" => append_sid("admin_users.$phpEx?mode=$mode"),
"S_HIDDEN_FIELDS" => $s_hidden_fields)
);
}
}
else
{
$s_hidden_fields = '<input type="hidden" name="mode" value="save" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
$s_hidden_fields .= '<input type="hidden" name="id" value="' . $this_userdata['user_id'] . '" />';
 
if( !empty($user_avatar_local) )
{
$s_hidden_fields .= '<input type="hidden" name="avatarlocal" value="' . $user_avatar_local . '" /><input type="hidden" name="avatarcatname" value="' . $user_avatar_category . '" />';
}
 
if( $user_avatar_type )
{
switch( $user_avatar_type )
{
case USER_AVATAR_UPLOAD:
$avatar = '<img src="../' . $board_config['avatar_path'] . '/' . $user_avatar . '" alt="" />';
break;
case USER_AVATAR_REMOTE:
$avatar = '<img src="' . $user_avatar . '" alt="" />';
break;
case USER_AVATAR_GALLERY:
$avatar = '<img src="../' . $board_config['avatar_gallery_path'] . '/' . $user_avatar . '" alt="" />';
break;
}
}
else
{
$avatar = "";
}
 
$sql = "SELECT * FROM " . RANKS_TABLE . "
WHERE rank_special = 1
ORDER BY rank_title";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain ranks data', '', __LINE__, __FILE__, $sql);
}
 
$rank_select_box = '<option value="0">' . $lang['No_assigned_rank'] . '</option>';
while( $row = $db->sql_fetchrow($result) )
{
$rank = $row['rank_title'];
$rank_id = $row['rank_id'];
$selected = ( $this_userdata['user_rank'] == $rank_id ) ? ' selected="selected"' : '';
$rank_select_box .= '<option value="' . $rank_id . '"' . $selected . '>' . $rank . '</option>';
}
 
$template->set_filenames(array(
"body" => "admin/user_edit_body.tpl")
);
//
// Let's do an overall check for settings/versions which would prevent
// us from doing file uploads....
//
$ini_val = ( phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var';
$form_enctype = ( !@$ini_val('file_uploads') || phpversion() == '4.0.4pl1' || !$board_config['allow_avatar_upload'] || ( phpversion() < '4.0.3' && @$ini_val('open_basedir') != '' ) ) ? '' : 'enctype="multipart/form-data"';
 
$template->assign_vars(array(
'USERNAME' => $username,
'EMAIL' => $email,
'YIM' => $yim,
'ICQ' => $icq,
'MSN' => $msn,
'AIM' => $aim,
'OCCUPATION' => $occupation,
'INTERESTS' => $interests,
'LOCATION' => $location,
'WEBSITE' => $website,
'SIGNATURE' => str_replace('<br />', "\n", $signature),
'VIEW_EMAIL_YES' => ($viewemail) ? 'checked="checked"' : '',
'VIEW_EMAIL_NO' => (!$viewemail) ? 'checked="checked"' : '',
'HIDE_USER_YES' => (!$allowviewonline) ? 'checked="checked"' : '',
'HIDE_USER_NO' => ($allowviewonline) ? 'checked="checked"' : '',
'NOTIFY_PM_YES' => ($notifypm) ? 'checked="checked"' : '',
'NOTIFY_PM_NO' => (!$notifypm) ? 'checked="checked"' : '',
'POPUP_PM_YES' => ($popuppm) ? 'checked="checked"' : '',
'POPUP_PM_NO' => (!$popuppm) ? 'checked="checked"' : '',
'ALWAYS_ADD_SIGNATURE_YES' => ($attachsig) ? 'checked="checked"' : '',
'ALWAYS_ADD_SIGNATURE_NO' => (!$attachsig) ? 'checked="checked"' : '',
'NOTIFY_REPLY_YES' => ( $notifyreply ) ? 'checked="checked"' : '',
'NOTIFY_REPLY_NO' => ( !$notifyreply ) ? 'checked="checked"' : '',
'ALWAYS_ALLOW_BBCODE_YES' => ($allowbbcode) ? 'checked="checked"' : '',
'ALWAYS_ALLOW_BBCODE_NO' => (!$allowbbcode) ? 'checked="checked"' : '',
'ALWAYS_ALLOW_HTML_YES' => ($allowhtml) ? 'checked="checked"' : '',
'ALWAYS_ALLOW_HTML_NO' => (!$allowhtml) ? 'checked="checked"' : '',
'ALWAYS_ALLOW_SMILIES_YES' => ($allowsmilies) ? 'checked="checked"' : '',
'ALWAYS_ALLOW_SMILIES_NO' => (!$allowsmilies) ? 'checked="checked"' : '',
'AVATAR' => $avatar,
'LANGUAGE_SELECT' => language_select($user_lang),
'TIMEZONE_SELECT' => tz_select($user_timezone),
'STYLE_SELECT' => style_select($user_style, 'style'),
'DATE_FORMAT' => $user_dateformat,
'ALLOW_PM_YES' => ($user_allowpm) ? 'checked="checked"' : '',
'ALLOW_PM_NO' => (!$user_allowpm) ? 'checked="checked"' : '',
'ALLOW_AVATAR_YES' => ($user_allowavatar) ? 'checked="checked"' : '',
'ALLOW_AVATAR_NO' => (!$user_allowavatar) ? 'checked="checked"' : '',
'USER_ACTIVE_YES' => ($user_status) ? 'checked="checked"' : '',
'USER_ACTIVE_NO' => (!$user_status) ? 'checked="checked"' : '',
'RANK_SELECT_BOX' => $rank_select_box,
 
'L_USERNAME' => $lang['Username'],
'L_USER_TITLE' => $lang['User_admin'],
'L_USER_EXPLAIN' => $lang['User_admin_explain'],
'L_NEW_PASSWORD' => $lang['New_password'],
'L_PASSWORD_IF_CHANGED' => $lang['password_if_changed'],
'L_CONFIRM_PASSWORD' => $lang['Confirm_password'],
'L_PASSWORD_CONFIRM_IF_CHANGED' => $lang['password_confirm_if_changed'],
'L_SUBMIT' => $lang['Submit'],
'L_RESET' => $lang['Reset'],
'L_ICQ_NUMBER' => $lang['ICQ'],
'L_MESSENGER' => $lang['MSNM'],
'L_YAHOO' => $lang['YIM'],
'L_WEBSITE' => $lang['Website'],
'L_AIM' => $lang['AIM'],
'L_LOCATION' => $lang['Location'],
'L_OCCUPATION' => $lang['Occupation'],
'L_BOARD_LANGUAGE' => $lang['Board_lang'],
'L_BOARD_STYLE' => $lang['Board_style'],
'L_TIMEZONE' => $lang['Timezone'],
'L_DATE_FORMAT' => $lang['Date_format'],
'L_DATE_FORMAT_EXPLAIN' => $lang['Date_format_explain'],
'L_YES' => $lang['Yes'],
'L_NO' => $lang['No'],
'L_INTERESTS' => $lang['Interests'],
'L_ALWAYS_ALLOW_SMILIES' => $lang['Always_smile'],
'L_ALWAYS_ALLOW_BBCODE' => $lang['Always_bbcode'],
'L_ALWAYS_ALLOW_HTML' => $lang['Always_html'],
'L_HIDE_USER' => $lang['Hide_user'],
'L_ALWAYS_ADD_SIGNATURE' => $lang['Always_add_sig'],
'L_SPECIAL' => $lang['User_special'],
'L_SPECIAL_EXPLAIN' => $lang['User_special_explain'],
'L_USER_ACTIVE' => $lang['User_status'],
'L_ALLOW_PM' => $lang['User_allowpm'],
'L_ALLOW_AVATAR' => $lang['User_allowavatar'],
'L_AVATAR_PANEL' => $lang['Avatar_panel'],
'L_AVATAR_EXPLAIN' => $lang['Admin_avatar_explain'],
'L_DELETE_AVATAR' => $lang['Delete_Image'],
'L_CURRENT_IMAGE' => $lang['Current_Image'],
'L_UPLOAD_AVATAR_FILE' => $lang['Upload_Avatar_file'],
'L_UPLOAD_AVATAR_URL' => $lang['Upload_Avatar_URL'],
'L_AVATAR_GALLERY' => $lang['Select_from_gallery'],
'L_SHOW_GALLERY' => $lang['View_avatar_gallery'],
'L_LINK_REMOTE_AVATAR' => $lang['Link_remote_Avatar'],
 
'L_SIGNATURE' => $lang['Signature'],
'L_SIGNATURE_EXPLAIN' => sprintf($lang['Signature_explain'], $board_config['max_sig_chars'] ),
'L_NOTIFY_ON_PRIVMSG' => $lang['Notify_on_privmsg'],
'L_NOTIFY_ON_REPLY' => $lang['Always_notify'],
'L_POPUP_ON_PRIVMSG' => $lang['Popup_on_privmsg'],
'L_PREFERENCES' => $lang['Preferences'],
'L_PUBLIC_VIEW_EMAIL' => $lang['Public_view_email'],
'L_ITEMS_REQUIRED' => $lang['Items_required'],
'L_REGISTRATION_INFO' => $lang['Registration_info'],
'L_PROFILE_INFO' => $lang['Profile_info'],
'L_PROFILE_INFO_NOTICE' => $lang['Profile_info_warn'],
'L_EMAIL_ADDRESS' => $lang['Email_address'],
'S_FORM_ENCTYPE' => $form_enctype,
 
'HTML_STATUS' => $html_status,
'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="../' . append_sid("faq.$phpEx?mode=bbcode") . '" target="_phpbbcode">', '</a>'),
'SMILIES_STATUS' => $smilies_status,
 
'L_DELETE_USER' => $lang['User_delete'],
'L_DELETE_USER_EXPLAIN' => $lang['User_delete_explain'],
'L_SELECT_RANK' => $lang['Rank_title'],
 
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_PROFILE_ACTION' => append_sid("admin_users.$phpEx"))
);
 
if( file_exists(@phpbb_realpath('./../' . $board_config['avatar_path'])) && ($board_config['allow_avatar_upload'] == TRUE) )
{
if ( $form_enctype != '' )
{
$template->assign_block_vars('avatar_local_upload', array() );
}
$template->assign_block_vars('avatar_remote_upload', array() );
}
 
if( file_exists(@phpbb_realpath('./../' . $board_config['avatar_gallery_path'])) && ($board_config['allow_avatar_local'] == TRUE) )
{
$template->assign_block_vars('avatar_local_gallery', array() );
}
if( $board_config['allow_avatar_remote'] == TRUE )
{
$template->assign_block_vars('avatar_remote_link', array() );
}
}
 
$template->pparse('body');
}
else
{
//
// Default user selection box
//
$template->set_filenames(array(
'body' => 'admin/user_select_body.tpl')
);
 
$template->assign_vars(array(
'L_USER_TITLE' => $lang['User_admin'],
'L_USER_EXPLAIN' => $lang['User_admin_explain'],
'L_USER_SELECT' => $lang['Select_a_User'],
'L_LOOK_UP' => $lang['Look_up_user'],
'L_FIND_USERNAME' => $lang['Find_username'],
 
'U_SEARCH_USER' => append_sid("./../search.$phpEx?mode=searchuser"),
 
'S_USER_ACTION' => append_sid("admin_users.$phpEx"),
'S_USER_SELECT' => $select_list)
);
$template->pparse('body');
 
}
 
include('./page_footer_admin.'.$phpEx);
 
?>
/Forum/admin/admin_words.php
0,0 → 1,273
<?php
/***************************************************************************
* admin_words.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_words.php,v 1.10.2.6 2006/04/13 09:56:48 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['General']['Word_Censor'] = $file;
return;
}
 
define('IN_PHPBB', 1);
 
//
// Load default header
//
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
 
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? true : false;
$no_page_header = $cancel;
 
require('./pagestart.' . $phpEx);
 
if ($cancel)
{
redirect('admin/' . append_sid("admin_words.$phpEx", true));
}
 
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = (isset($HTTP_GET_VARS['mode'])) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
$mode = htmlspecialchars($mode);
}
else
{
//
// These could be entered via a form button
//
if( isset($HTTP_POST_VARS['add']) )
{
$mode = "add";
}
else if( isset($HTTP_POST_VARS['save']) )
{
$mode = "save";
}
else
{
$mode = "";
}
}
 
// Restrict mode input to valid options
$mode = ( in_array($mode, array('add', 'edit', 'save', 'delete')) ) ? $mode : '';
 
if( $mode != "" )
{
if( $mode == "edit" || $mode == "add" )
{
$word_id = ( isset($HTTP_GET_VARS['id']) ) ? intval($HTTP_GET_VARS['id']) : 0;
 
$template->set_filenames(array(
"body" => "admin/words_edit_body.tpl")
);
 
$word_info = array('word' => '', 'replacement' => '');
$s_hidden_fields = '';
 
if( $mode == "edit" )
{
if( $word_id )
{
$sql = "SELECT *
FROM " . WORDS_TABLE . "
WHERE word_id = $word_id";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not query words table", "Error", __LINE__, __FILE__, $sql);
}
 
$word_info = $db->sql_fetchrow($result);
$s_hidden_fields .= '<input type="hidden" name="id" value="' . $word_id . '" />';
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_word_selected']);
}
}
 
$template->assign_vars(array(
"WORD" => $word_info['word'],
"REPLACEMENT" => $word_info['replacement'],
 
"L_WORDS_TITLE" => $lang['Words_title'],
"L_WORDS_TEXT" => $lang['Words_explain'],
"L_WORD_CENSOR" => $lang['Edit_word_censor'],
"L_WORD" => $lang['Word'],
"L_REPLACEMENT" => $lang['Replacement'],
"L_SUBMIT" => $lang['Submit'],
 
"S_WORDS_ACTION" => append_sid("admin_words.$phpEx"),
"S_HIDDEN_FIELDS" => $s_hidden_fields)
);
 
$template->pparse("body");
 
include('./page_footer_admin.'.$phpEx);
}
else if( $mode == "save" )
{
$word_id = ( isset($HTTP_POST_VARS['id']) ) ? intval($HTTP_POST_VARS['id']) : 0;
$word = ( isset($HTTP_POST_VARS['word']) ) ? trim($HTTP_POST_VARS['word']) : "";
$replacement = ( isset($HTTP_POST_VARS['replacement']) ) ? trim($HTTP_POST_VARS['replacement']) : "";
 
if($word == "" || $replacement == "")
{
message_die(GENERAL_MESSAGE, $lang['Must_enter_word']);
}
 
if( $word_id )
{
$sql = "UPDATE " . WORDS_TABLE . "
SET word = '" . str_replace("\'", "''", $word) . "', replacement = '" . str_replace("\'", "''", $replacement) . "'
WHERE word_id = $word_id";
$message = $lang['Word_updated'];
}
else
{
$sql = "INSERT INTO " . WORDS_TABLE . " (word, replacement)
VALUES ('" . str_replace("\'", "''", $word) . "', '" . str_replace("\'", "''", $replacement) . "')";
$message = $lang['Word_added'];
}
 
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not insert data into words table", $lang['Error'], __LINE__, __FILE__, $sql);
}
 
$message .= "<br /><br />" . sprintf($lang['Click_return_wordadmin'], "<a href=\"" . append_sid("admin_words.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
}
else if( $mode == "delete" )
{
if( isset($HTTP_POST_VARS['id']) || isset($HTTP_GET_VARS['id']) )
{
$word_id = ( isset($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id'];
$word_id = intval($word_id);
}
else
{
$word_id = 0;
}
 
$confirm = isset($HTTP_POST_VARS['confirm']);
 
if( $word_id && $confirm )
{
$sql = "DELETE FROM " . WORDS_TABLE . "
WHERE word_id = $word_id";
 
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not remove data from words table", $lang['Error'], __LINE__, __FILE__, $sql);
}
 
$message = $lang['Word_removed'] . "<br /><br />" . sprintf($lang['Click_return_wordadmin'], "<a href=\"" . append_sid("admin_words.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
}
elseif( $word_id && !$confirm)
{
// Present the confirmation screen to the user
$template->set_filenames(array(
'body' => 'admin/confirm_body.tpl')
);
 
$hidden_fields = '<input type="hidden" name="mode" value="delete" /><input type="hidden" name="id" value="' . $word_id . '" />';
 
$template->assign_vars(array(
'MESSAGE_TITLE' => $lang['Confirm'],
'MESSAGE_TEXT' => $lang['Confirm_delete_word'],
 
'L_YES' => $lang['Yes'],
'L_NO' => $lang['No'],
 
'S_CONFIRM_ACTION' => append_sid("admin_words.$phpEx"),
'S_HIDDEN_FIELDS' => $hidden_fields)
);
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_word_selected']);
}
}
}
else
{
$template->set_filenames(array(
"body" => "admin/words_list_body.tpl")
);
 
$sql = "SELECT *
FROM " . WORDS_TABLE . "
ORDER BY word";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not query words table", $lang['Error'], __LINE__, __FILE__, $sql);
}
 
$word_rows = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$word_count = count($word_rows);
 
$template->assign_vars(array(
"L_WORDS_TITLE" => $lang['Words_title'],
"L_WORDS_TEXT" => $lang['Words_explain'],
"L_WORD" => $lang['Word'],
"L_REPLACEMENT" => $lang['Replacement'],
"L_EDIT" => $lang['Edit'],
"L_DELETE" => $lang['Delete'],
"L_ADD_WORD" => $lang['Add_new_word'],
"L_ACTION" => $lang['Action'],
 
"S_WORDS_ACTION" => append_sid("admin_words.$phpEx"),
"S_HIDDEN_FIELDS" => '')
);
 
for($i = 0; $i < $word_count; $i++)
{
$word = $word_rows[$i]['word'];
$replacement = $word_rows[$i]['replacement'];
$word_id = $word_rows[$i]['word_id'];
 
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
$template->assign_block_vars("words", array(
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
"WORD" => $word,
"REPLACEMENT" => $replacement,
 
"U_WORD_EDIT" => append_sid("admin_words.$phpEx?mode=edit&amp;id=$word_id"),
"U_WORD_DELETE" => append_sid("admin_words.$phpEx?mode=delete&amp;id=$word_id"))
);
}
}
 
$template->pparse("body");
 
include('./page_footer_admin.'.$phpEx);
 
?>
/Forum/admin/index.php
0,0 → 1,657
<?php
/***************************************************************************
* (admin) index.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: index.php,v 1.40.2.10 2005/12/04 12:55:28 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', 1);
 
//
// Load default header
//
$no_page_header = TRUE;
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
 
// ---------------
// Begin functions
//
function inarray($needle, $haystack)
{
for($i = 0; $i < sizeof($haystack); $i++ )
{
if( $haystack[$i] == $needle )
{
return true;
}
}
return false;
}
//
// End functions
// -------------
 
//
// Generate relevant output
//
if( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'left' )
{
$dir = @opendir(".");
 
$setmodules = 1;
while( $file = @readdir($dir) )
{
if( preg_match("/^admin_.*?\." . $phpEx . "$/", $file) )
{
include('./' . $file);
}
}
 
@closedir($dir);
 
unset($setmodules);
 
include('./page_header_admin.'.$phpEx);
 
$template->set_filenames(array(
"body" => "admin/index_navigate.tpl")
);
 
$template->assign_vars(array(
"U_FORUM_INDEX" => append_sid("../index.$phpEx"),
"U_ADMIN_INDEX" => append_sid("index.$phpEx?pane=right"),
 
"L_FORUM_INDEX" => $lang['Main_index'],
"L_ADMIN_INDEX" => $lang['Admin_Index'],
"L_PREVIEW_FORUM" => $lang['Preview_forum'])
);
 
ksort($module);
 
while( list($cat, $action_array) = each($module) )
{
$cat = ( !empty($lang[$cat]) ) ? $lang[$cat] : preg_replace("/_/", " ", $cat);
 
$template->assign_block_vars("catrow", array(
"ADMIN_CATEGORY" => $cat)
);
 
ksort($action_array);
 
$row_count = 0;
while( list($action, $file) = each($action_array) )
{
$row_color = ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
$action = ( !empty($lang[$action]) ) ? $lang[$action] : preg_replace("/_/", " ", $action);
 
$template->assign_block_vars("catrow.modulerow", array(
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
 
"ADMIN_MODULE" => $action,
"U_ADMIN_MODULE" => append_sid($file))
);
$row_count++;
}
}
 
$template->pparse("body");
 
include('./page_footer_admin.'.$phpEx);
}
elseif( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' )
{
 
include('./page_header_admin.'.$phpEx);
 
$template->set_filenames(array(
"body" => "admin/index_body.tpl")
);
 
$template->assign_vars(array(
"L_WELCOME" => $lang['Welcome_phpBB'],
"L_ADMIN_INTRO" => $lang['Admin_intro'],
"L_FORUM_STATS" => $lang['Forum_stats'],
"L_WHO_IS_ONLINE" => $lang['Who_is_Online'],
"L_USERNAME" => $lang['Username'],
"L_LOCATION" => $lang['Location'],
"L_LAST_UPDATE" => $lang['Last_updated'],
"L_IP_ADDRESS" => $lang['IP_Address'],
"L_STATISTIC" => $lang['Statistic'],
"L_VALUE" => $lang['Value'],
"L_NUMBER_POSTS" => $lang['Number_posts'],
"L_POSTS_PER_DAY" => $lang['Posts_per_day'],
"L_NUMBER_TOPICS" => $lang['Number_topics'],
"L_TOPICS_PER_DAY" => $lang['Topics_per_day'],
"L_NUMBER_USERS" => $lang['Number_users'],
"L_USERS_PER_DAY" => $lang['Users_per_day'],
"L_BOARD_STARTED" => $lang['Board_started'],
"L_AVATAR_DIR_SIZE" => $lang['Avatar_dir_size'],
"L_DB_SIZE" => $lang['Database_size'],
"L_FORUM_LOCATION" => $lang['Forum_Location'],
"L_STARTED" => $lang['Login'],
"L_GZIP_COMPRESSION" => $lang['Gzip_compression'])
);
 
//
// Get forum statistics
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$total_topics = get_db_stat('topiccount');
 
$start_date = create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']);
 
$boarddays = ( time() - $board_config['board_startdate'] ) / 86400;
 
$posts_per_day = sprintf("%.2f", $total_posts / $boarddays);
$topics_per_day = sprintf("%.2f", $total_topics / $boarddays);
$users_per_day = sprintf("%.2f", $total_users / $boarddays);
 
$avatar_dir_size = 0;
 
if ($avatar_dir = @opendir($phpbb_root_path . $board_config['avatar_path']))
{
while( $file = @readdir($avatar_dir) )
{
if( $file != "." && $file != ".." )
{
$avatar_dir_size += @filesize($phpbb_root_path . $board_config['avatar_path'] . "/" . $file);
}
}
@closedir($avatar_dir);
 
//
// This bit of code translates the avatar directory size into human readable format
// Borrowed the code from the PHP.net annoted manual, origanally written by:
// Jesse (jesse@jess.on.ca)
//
if($avatar_dir_size >= 1048576)
{
$avatar_dir_size = round($avatar_dir_size / 1048576 * 100) / 100 . " MB";
}
else if($avatar_dir_size >= 1024)
{
$avatar_dir_size = round($avatar_dir_size / 1024 * 100) / 100 . " KB";
}
else
{
$avatar_dir_size = $avatar_dir_size . " Bytes";
}
 
}
else
{
// Couldn't open Avatar dir.
$avatar_dir_size = $lang['Not_available'];
}
 
if($posts_per_day > $total_posts)
{
$posts_per_day = $total_posts;
}
 
if($topics_per_day > $total_topics)
{
$topics_per_day = $total_topics;
}
 
if($users_per_day > $total_users)
{
$users_per_day = $total_users;
}
 
//
// DB size ... MySQL only
//
// This code is heavily influenced by a similar routine
// in phpMyAdmin 2.2.0
//
if( preg_match("/^mysql/", SQL_LAYER) )
{
$sql = "SELECT VERSION() AS mysql_version";
if($result = $db->sql_query($sql))
{
$row = $db->sql_fetchrow($result);
$version = $row['mysql_version'];
 
if( preg_match("/^(3\.23|4\.|5\.)/", $version) )
{
$db_name = ( preg_match("/^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)|(5\.)/", $version) ) ? "`$dbname`" : $dbname;
 
$sql = "SHOW TABLE STATUS
FROM " . $db_name;
if($result = $db->sql_query($sql))
{
$tabledata_ary = $db->sql_fetchrowset($result);
 
$dbsize = 0;
for($i = 0; $i < count($tabledata_ary); $i++)
{
if( $tabledata_ary[$i]['Type'] != "MRG_MyISAM" )
{
if( $table_prefix != "" )
{
if( strstr($tabledata_ary[$i]['Name'], $table_prefix) )
{
$dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length'];
}
}
else
{
$dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length'];
}
}
}
} // Else we couldn't get the table status.
}
else
{
$dbsize = $lang['Not_available'];
}
}
else
{
$dbsize = $lang['Not_available'];
}
}
else if( preg_match("/^mssql/", SQL_LAYER) )
{
$sql = "SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize
FROM sysfiles";
if( $result = $db->sql_query($sql) )
{
$dbsize = ( $row = $db->sql_fetchrow($result) ) ? intval($row['dbsize']) : $lang['Not_available'];
}
else
{
$dbsize = $lang['Not_available'];
}
}
else
{
$dbsize = $lang['Not_available'];
}
 
if ( is_integer($dbsize) )
{
if( $dbsize >= 1048576 )
{
$dbsize = sprintf("%.2f MB", ( $dbsize / 1048576 ));
}
else if( $dbsize >= 1024 )
{
$dbsize = sprintf("%.2f KB", ( $dbsize / 1024 ));
}
else
{
$dbsize = sprintf("%.2f Bytes", $dbsize);
}
}
 
$template->assign_vars(array(
"NUMBER_OF_POSTS" => $total_posts,
"NUMBER_OF_TOPICS" => $total_topics,
"NUMBER_OF_USERS" => $total_users,
"START_DATE" => $start_date,
"POSTS_PER_DAY" => $posts_per_day,
"TOPICS_PER_DAY" => $topics_per_day,
"USERS_PER_DAY" => $users_per_day,
"AVATAR_DIR_SIZE" => $avatar_dir_size,
"DB_SIZE" => $dbsize,
"GZIP_COMPRESSION" => ( $board_config['gzip_compress'] ) ? $lang['ON'] : $lang['OFF'])
);
//
// End forum statistics
//
 
//
// Get users online information.
//
$sql = "SELECT u.user_id, u.username, u.user_session_time, u.user_session_page, s.session_logged_in, s.session_ip, s.session_start
FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s
WHERE s.session_logged_in = " . TRUE . "
AND u.user_id = s.session_user_id
AND u.user_id <> " . ANONYMOUS . "
AND s.session_time >= " . ( time() - 300 ) . "
ORDER BY u.user_session_time DESC";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain regd user/online information.", "", __LINE__, __FILE__, $sql);
}
$onlinerow_reg = $db->sql_fetchrowset($result);
 
$sql = "SELECT session_page, session_logged_in, session_time, session_ip, session_start
FROM " . SESSIONS_TABLE . "
WHERE session_logged_in = 0
AND session_time >= " . ( time() - 300 ) . "
ORDER BY session_time DESC";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain guest user/online information.", "", __LINE__, __FILE__, $sql);
}
$onlinerow_guest = $db->sql_fetchrowset($result);
 
$sql = "SELECT forum_name, forum_id
FROM " . FORUMS_TABLE;
if($forums_result = $db->sql_query($sql))
{
while($forumsrow = $db->sql_fetchrow($forums_result))
{
$forum_data[$forumsrow['forum_id']] = $forumsrow['forum_name'];
}
}
else
{
message_die(GENERAL_ERROR, "Couldn't obtain user/online forums information.", "", __LINE__, __FILE__, $sql);
}
 
$reg_userid_ary = array();
 
if( count($onlinerow_reg) )
{
$registered_users = 0;
 
for($i = 0; $i < count($onlinerow_reg); $i++)
{
if( !inarray($onlinerow_reg[$i]['user_id'], $reg_userid_ary) )
{
$reg_userid_ary[] = $onlinerow_reg[$i]['user_id'];
 
$username = $onlinerow_reg[$i]['username'];
 
if( $onlinerow_reg[$i]['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
$registered_users++;
$hidden = FALSE;
}
else
{
$hidden_users++;
$hidden = TRUE;
}
 
if( $onlinerow_reg[$i]['user_session_page'] < 1 )
{
switch($onlinerow_reg[$i]['user_session_page'])
{
case PAGE_INDEX:
$location = $lang['Forum_index'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_POSTING:
$location = $lang['Posting_message'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_LOGIN:
$location = $lang['Logging_on'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_SEARCH:
$location = $lang['Searching_forums'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_PROFILE:
$location = $lang['Viewing_profile'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_VIEWONLINE:
$location = $lang['Viewing_online'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_VIEWMEMBERS:
$location = $lang['Viewing_member_list'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_PRIVMSGS:
$location = $lang['Viewing_priv_msgs'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "index.$phpEx?pane=right";
break;
default:
$location = $lang['Forum_index'];
$location_url = "index.$phpEx?pane=right";
}
}
else
{
$location_url = append_sid("admin_forums.$phpEx?mode=editforum&amp;" . POST_FORUM_URL . "=" . $onlinerow_reg[$i]['user_session_page']);
$location = $forum_data[$onlinerow_reg[$i]['user_session_page']];
}
 
$row_color = ( $registered_users % 2 ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( $registered_users % 2 ) ? $theme['td_class1'] : $theme['td_class2'];
 
$reg_ip = decode_ip($onlinerow_reg[$i]['session_ip']);
 
$template->assign_block_vars("reg_user_row", array(
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
"USERNAME" => $username,
"STARTED" => create_date($board_config['default_dateformat'], $onlinerow_reg[$i]['session_start'], $board_config['board_timezone']),
"LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow_reg[$i]['user_session_time'], $board_config['board_timezone']),
"FORUM_LOCATION" => $location,
"IP_ADDRESS" => $reg_ip,
 
"U_WHOIS_IP" => "http://network-tools.com/default.asp?host=$reg_ip",
"U_USER_PROFILE" => append_sid("admin_users.$phpEx?mode=edit&amp;" . POST_USERS_URL . "=" . $onlinerow_reg[$i]['user_id']),
"U_FORUM_LOCATION" => append_sid($location_url))
);
}
}
 
}
else
{
$template->assign_vars(array(
"L_NO_REGISTERED_USERS_BROWSING" => $lang['No_users_browsing'])
);
}
 
//
// Guest users
//
if( count($onlinerow_guest) )
{
$guest_users = 0;
 
for($i = 0; $i < count($onlinerow_guest); $i++)
{
$guest_userip_ary[] = $onlinerow_guest[$i]['session_ip'];
$guest_users++;
 
if( $onlinerow_guest[$i]['session_page'] < 1 )
{
switch( $onlinerow_guest[$i]['session_page'] )
{
case PAGE_INDEX:
$location = $lang['Forum_index'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_POSTING:
$location = $lang['Posting_message'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_LOGIN:
$location = $lang['Logging_on'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_SEARCH:
$location = $lang['Searching_forums'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_PROFILE:
$location = $lang['Viewing_profile'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_VIEWONLINE:
$location = $lang['Viewing_online'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_VIEWMEMBERS:
$location = $lang['Viewing_member_list'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_PRIVMSGS:
$location = $lang['Viewing_priv_msgs'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "index.$phpEx?pane=right";
break;
default:
$location = $lang['Forum_index'];
$location_url = "index.$phpEx?pane=right";
}
}
else
{
$location_url = append_sid("admin_forums.$phpEx?mode=editforum&amp;" . POST_FORUM_URL . "=" . $onlinerow_guest[$i]['session_page']);
$location = $forum_data[$onlinerow_guest[$i]['session_page']];
}
 
$row_color = ( $guest_users % 2 ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( $guest_users % 2 ) ? $theme['td_class1'] : $theme['td_class2'];
 
$guest_ip = decode_ip($onlinerow_guest[$i]['session_ip']);
 
$template->assign_block_vars("guest_user_row", array(
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
"USERNAME" => $lang['Guest'],
"STARTED" => create_date($board_config['default_dateformat'], $onlinerow_guest[$i]['session_start'], $board_config['board_timezone']),
"LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow_guest[$i]['session_time'], $board_config['board_timezone']),
"FORUM_LOCATION" => $location,
"IP_ADDRESS" => $guest_ip,
 
"U_WHOIS_IP" => "http://network-tools.com/default.asp?host=$guest_ip",
"U_FORUM_LOCATION" => append_sid($location_url))
);
}
 
}
else
{
$template->assign_vars(array(
"L_NO_GUESTS_BROWSING" => $lang['No_users_browsing'])
);
}
 
// Check for new version
$current_version = explode('.', '2' . $board_config['version']);
$minor_revision = (int) $current_version[2];
 
$errno = 0;
$errstr = $version_info = '';
 
if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr, 10))
{
@fputs($fsock, "GET /updatecheck/20x.txt HTTP/1.1\r\n");
@fputs($fsock, "HOST: www.phpbb.com\r\n");
@fputs($fsock, "Connection: close\r\n\r\n");
 
$get_info = false;
while (!@feof($fsock))
{
if ($get_info)
{
$version_info .= @fread($fsock, 1024);
}
else
{
if (@fgets($fsock, 1024) == "\r\n")
{
$get_info = true;
}
}
}
@fclose($fsock);
 
$version_info = explode("\n", $version_info);
$latest_head_revision = (int) $version_info[0];
$latest_minor_revision = (int) $version_info[2];
$latest_version = (int) $version_info[0] . '.' . (int) $version_info[1] . '.' . (int) $version_info[2];
 
if ($latest_head_revision == 2 && $minor_revision == $latest_minor_revision)
{
$version_info = '<p style="color:green">' . $lang['Version_up_to_date'] . '</p>';
}
else
{
$version_info = '<p style="color:red">' . $lang['Version_not_up_to_date'];
$version_info .= '<br />' . sprintf($lang['Latest_version_info'], $latest_version) . ' ' . sprintf($lang['Current_version_info'], '2' . $board_config['version']) . '</p>';
}
}
else
{
if ($errstr)
{
$version_info = '<p style="color:red">' . sprintf($lang['Connect_socket_error'], $errstr) . '</p>';
}
else
{
$version_info = '<p>' . $lang['Socket_functions_disabled'] . '</p>';
}
}
$version_info .= '<p>' . $lang['Mailing_list_subscribe_reminder'] . '</p>';
 
$template->assign_vars(array(
'VERSION_INFO' => $version_info,
'L_VERSION_INFORMATION' => $lang['Version_information'])
);
 
$template->pparse("body");
 
include('./page_footer_admin.'.$phpEx);
 
}
else
{
//
// Generate frameset
//
$template->set_filenames(array(
"body" => "admin/index_frameset.tpl")
);
 
$template->assign_vars(array(
"S_FRAME_NAV" => append_sid("index.$phpEx?pane=left"),
"S_FRAME_MAIN" => append_sid("index.$phpEx?pane=right"))
);
 
header ("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
 
$template->pparse("body");
 
$db->sql_close();
exit;
 
}
 
?>
/Forum/admin/page_footer_admin.php
0,0 → 1,75
<?php
/***************************************************************************
* page_footer_admin.php
* -------------------
* begin : Saturday, Jul 14, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: page_footer_admin.php,v 1.9.2.5 2005/09/19 20:49:06 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
 
global $do_gzip_compress;
 
//
// Show the overall footer.
//
$template->set_filenames(array(
'page_footer' => 'admin/page_footer.tpl')
);
 
$template->assign_vars(array(
'PHPBB_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? '2' . $board_config['version'] : '',
'TRANSLATION_INFO' => (isset($lang['TRANSLATION_INFO'])) ? $lang['TRANSLATION_INFO'] : ((isset($lang['TRANSLATION'])) ? $lang['TRANSLATION'] : ''))
);
 
$template->pparse('page_footer');
 
//
// Close our DB connection.
//
$db->sql_close();
 
//
// Compress buffered output if required
// and send to browser
//
if( $do_gzip_compress )
{
//
// Borrowed from php.net!
//
$gzip_contents = ob_get_contents();
ob_end_clean();
 
$gzip_size = strlen($gzip_contents);
$gzip_crc = crc32($gzip_contents);
 
$gzip_contents = gzcompress($gzip_contents, 9);
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
 
echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents;
echo pack('V', $gzip_crc);
echo pack('V', $gzip_size);
}
 
exit;
 
?>
/Forum/admin/page_header_admin.php
0,0 → 1,150
<?php
/***************************************************************************
* page_header_admin.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: page_header_admin.php,v 1.12.2.7 2006/01/29 21:19:02 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
 
define('HEADER_INC', true);
 
//
// gzip_compression
//
$do_gzip_compress = FALSE;
if ( $board_config['gzip_compress'] )
{
$phpver = phpversion();
 
$useragent = (isset($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) ? $HTTP_SERVER_VARS['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT');
 
if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
{
if ( extension_loaded('zlib') )
{
ob_start('ob_gzhandler');
}
}
else if ( $phpver > '4.0' )
{
if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') )
{
if ( extension_loaded('zlib') )
{
$do_gzip_compress = TRUE;
ob_start();
ob_implicit_flush(0);
 
header('Content-Encoding: gzip');
}
}
}
}
 
$template->set_filenames(array(
'header' => 'admin/page_header.tpl')
);
 
// Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility
$l_timezone = explode('.', $board_config['board_timezone']);
$l_timezone = (count($l_timezone) > 1 && $l_timezone[count($l_timezone)-1] != 0) ? $lang[sprintf('%.1f', $board_config['board_timezone'])] : $lang[number_format($board_config['board_timezone'])];
 
//
// The following assigns all _common_ variables that may be used at any point
// in a template. Note that all URL's should be wrapped in append_sid, as
// should all S_x_ACTIONS for forms.
//
$template->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'PAGE_TITLE' => $page_title,
 
'L_ADMIN' => $lang['Admin'],
'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']),
'L_FAQ' => $lang['FAQ'],
 
'U_INDEX' => append_sid('../index.'.$phpEx),
 
'S_TIMEZONE' => sprintf($lang['All_times'], $l_timezone),
'S_LOGIN_ACTION' => append_sid('../login.'.$phpEx),
'S_JUMPBOX_ACTION' => append_sid('../viewforum.'.$phpEx),
'S_CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])),
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
'S_CONTENT_ENCODING' => $lang['ENCODING'],
'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
 
'T_HEAD_STYLESHEET' => $theme['head_stylesheet'],
'T_BODY_BACKGROUND' => $theme['body_background'],
'T_BODY_BGCOLOR' => '#'.$theme['body_bgcolor'],
'T_BODY_TEXT' => '#'.$theme['body_text'],
'T_BODY_LINK' => '#'.$theme['body_link'],
'T_BODY_VLINK' => '#'.$theme['body_vlink'],
'T_BODY_ALINK' => '#'.$theme['body_alink'],
'T_BODY_HLINK' => '#'.$theme['body_hlink'],
'T_TR_COLOR1' => '#'.$theme['tr_color1'],
'T_TR_COLOR2' => '#'.$theme['tr_color2'],
'T_TR_COLOR3' => '#'.$theme['tr_color3'],
'T_TR_CLASS1' => $theme['tr_class1'],
'T_TR_CLASS2' => $theme['tr_class2'],
'T_TR_CLASS3' => $theme['tr_class3'],
'T_TH_COLOR1' => '#'.$theme['th_color1'],
'T_TH_COLOR2' => '#'.$theme['th_color2'],
'T_TH_COLOR3' => '#'.$theme['th_color3'],
'T_TH_CLASS1' => $theme['th_class1'],
'T_TH_CLASS2' => $theme['th_class2'],
'T_TH_CLASS3' => $theme['th_class3'],
'T_TD_COLOR1' => '#'.$theme['td_color1'],
'T_TD_COLOR2' => '#'.$theme['td_color2'],
'T_TD_COLOR3' => '#'.$theme['td_color3'],
'T_TD_CLASS1' => $theme['td_class1'],
'T_TD_CLASS2' => $theme['td_class2'],
'T_TD_CLASS3' => $theme['td_class3'],
'T_FONTFACE1' => $theme['fontface1'],
'T_FONTFACE2' => $theme['fontface2'],
'T_FONTFACE3' => $theme['fontface3'],
'T_FONTSIZE1' => $theme['fontsize1'],
'T_FONTSIZE2' => $theme['fontsize2'],
'T_FONTSIZE3' => $theme['fontsize3'],
'T_FONTCOLOR1' => '#'.$theme['fontcolor1'],
'T_FONTCOLOR2' => '#'.$theme['fontcolor2'],
'T_FONTCOLOR3' => '#'.$theme['fontcolor3'],
'T_SPAN_CLASS1' => $theme['span_class1'],
'T_SPAN_CLASS2' => $theme['span_class2'],
'T_SPAN_CLASS3' => $theme['span_class3'])
);
 
// Work around for "current" Apache 2 + PHP module which seems to not
// cope with private cache control setting
if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2'))
{
header ('Cache-Control: no-cache, pre-check=0, post-check=0');
}
else
{
header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
}
header ('Expires: 0');
header ('Pragma: no-cache');
 
$template->pparse('header');
 
?>
/Forum/admin/pagestart.php
0,0 → 1,67
<?php
/***************************************************************************
* pagestart.php
* -------------------
* begin : Thursday, Aug 2, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: pagestart.php,v 1.1.2.10 2006/01/22 17:11:09 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if (!defined('IN_PHPBB'))
{
die("Hacking attempt");
}
 
define('IN_ADMIN', true);
// Include files
include($phpbb_root_path . 'common.'.$phpEx);
 
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
 
if (!$userdata['session_logged_in'])
{
redirect(append_sid("login.$phpEx?redirect=admin/index.$phpEx", true));
}
else if ($userdata['user_level'] != ADMIN)
{
message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}
 
if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
{
redirect("index.$phpEx?sid=" . $userdata['session_id']);
}
 
if (!$userdata['session_admin'])
{
redirect(append_sid("login.$phpEx?redirect=admin/index.$phpEx&admin=1", true));
}
 
if (empty($no_page_header))
{
// Not including the pageheader can be neccesarry if META tags are
// needed in the calling script.
include('./page_header_admin.'.$phpEx);
}
 
?>
/Forum/cache/.htaccess
0,0 → 1,4
<Limit GET POST PUT>
Order Allow,Deny
Deny from All
</Limit>
/Forum/cache/index.htm
0,0 → 1,10
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
 
</body>
</html>
/Forum/common.php
0,0 → 1,236
<?php
/***************************************************************************
* common.php
* -------------------
* begin : Saturday, Feb 23, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: common.php,v 1.74.2.25 2006/05/26 17:46:59 grahamje Exp $
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
 
//
error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime
 
// The following code (unsetting globals)
// Thanks to Matt Kavanagh and Stefan Esser for providing feedback as well as patch files
 
// PHP5 with register_long_arrays off?
if (@phpversion() >= '5.0.0' && (!@ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off'))
{
$HTTP_POST_VARS = $_POST;
$HTTP_GET_VARS = $_GET;
$HTTP_SERVER_VARS = $_SERVER;
$HTTP_COOKIE_VARS = $_COOKIE;
$HTTP_ENV_VARS = $_ENV;
$HTTP_POST_FILES = $_FILES;
 
// _SESSION is the only superglobal which is conditionally set
if (isset($_SESSION))
{
$HTTP_SESSION_VARS = $_SESSION;
}
}
 
// Protect against GLOBALS tricks
if (isset($HTTP_POST_VARS['GLOBALS']) || isset($HTTP_POST_FILES['GLOBALS']) || isset($HTTP_GET_VARS['GLOBALS']) || isset($HTTP_COOKIE_VARS['GLOBALS']))
{
die("Hacking attempt");
}
 
// Protect against HTTP_SESSION_VARS tricks
if (isset($HTTP_SESSION_VARS) && !is_array($HTTP_SESSION_VARS))
{
die("Hacking attempt");
}
 
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
{
// PHP4+ path
$not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path');
 
// Not only will array_merge give a warning if a parameter
// is not an array, it will actually fail. So we check if
// HTTP_SESSION_VARS has been initialised.
if (!isset($HTTP_SESSION_VARS) || !is_array($HTTP_SESSION_VARS))
{
$HTTP_SESSION_VARS = array();
}
 
// Merge all into one extremely huge array; unset
// this later
$input = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES);
 
unset($input['input']);
unset($input['not_unset']);
 
while (list($var,) = @each($input))
{
if (in_array($var, $not_unset))
{
die('Hacking attempt!');
}
unset($$var);
}
 
unset($input);
}
 
//
// addslashes to vars if magic_quotes_gpc is off
// this is a security precaution to prevent someone
// trying to break out of a SQL statement.
//
if( !get_magic_quotes_gpc() )
{
if( is_array($HTTP_GET_VARS) )
{
while( list($k, $v) = each($HTTP_GET_VARS) )
{
if( is_array($HTTP_GET_VARS[$k]) )
{
while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) )
{
$HTTP_GET_VARS[$k][$k2] = addslashes($v2);
}
@reset($HTTP_GET_VARS[$k]);
}
else
{
$HTTP_GET_VARS[$k] = addslashes($v);
}
}
@reset($HTTP_GET_VARS);
}
 
if( is_array($HTTP_POST_VARS) )
{
while( list($k, $v) = each($HTTP_POST_VARS) )
{
if( is_array($HTTP_POST_VARS[$k]) )
{
while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) )
{
$HTTP_POST_VARS[$k][$k2] = addslashes($v2);
}
@reset($HTTP_POST_VARS[$k]);
}
else
{
$HTTP_POST_VARS[$k] = addslashes($v);
}
}
@reset($HTTP_POST_VARS);
}
 
if( is_array($HTTP_COOKIE_VARS) )
{
while( list($k, $v) = each($HTTP_COOKIE_VARS) )
{
if( is_array($HTTP_COOKIE_VARS[$k]) )
{
while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) )
{
$HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2);
}
@reset($HTTP_COOKIE_VARS[$k]);
}
else
{
$HTTP_COOKIE_VARS[$k] = addslashes($v);
}
}
@reset($HTTP_COOKIE_VARS);
}
}
 
//
// Define some basic configuration arrays this also prevents
// malicious rewriting of language and otherarray values via
// URI params
//
$board_config = array();
$userdata = array();
$theme = array();
$images = array();
$lang = array();
$nav_links = array();
$dss_seeded = false;
$gen_simple_header = FALSE;
 
include($phpbb_root_path . 'config.'.$phpEx);
 
if( !defined("PHPBB_INSTALLED") )
{
header('Location: ' . $phpbb_root_path . 'install/install.' . $phpEx);
exit;
}
 
include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/template.'.$phpEx);
include($phpbb_root_path . 'includes/sessions.'.$phpEx);
include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
 
// We do not need this any longer, unset for safety purposes
unset($dbpasswd);
 
//
// Obtain and encode users IP
//
// I'm removing HTTP_X_FORWARDED_FOR ... this may well cause other problems such as
// private range IP's appearing instead of the guilty routable IP, tough, don't
// even bother complaining ... go scream and shout at the idiots out there who feel
// "clever" is doing harm rather than good ... karma is a great thing ... :)
//
$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : getenv('REMOTE_ADDR') );
$user_ip = encode_ip($client_ip);
 
//
// Setup forum wide options, if this fails
// then we output a CRITICAL_ERROR since
// basic forum information is not available
//
$sql = "SELECT *
FROM " . CONFIG_TABLE;
if( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}
 
while ( $row = $db->sql_fetchrow($result) )
{
$board_config[$row['config_name']] = $row['config_value'];
}
 
if (file_exists('install') || file_exists('contrib'))
{
message_die(GENERAL_MESSAGE, 'Please_remove_install_contrib');
}
 
//
// Show 'Board is disabled' message if needed.
//
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
}
 
?>
/Forum/config.php
0,0 → 1,18
<?php
 
 
// phpBB 2.x auto-generated config file
// Do not change anything in this file!
 
$dbms = 'mysql4';
 
$dbhost = 'localhost';
$dbname = 'forum';
$dbuser = 'forumer';
$dbpasswd = 'aaaaaa';
 
$table_prefix = 'phpbb_';
 
define('PHPBB_INSTALLED', true);
 
?>
/Forum/db/db2.php
0,0 → 1,421
<?php
/***************************************************************************
* db2.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: db2.php,v 1.2 2002/01/28 17:24:45 psotfx Exp $
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if(!defined("SQL_LAYER"))
{
 
define("SQL_LAYER","db2");
 
class sql_db
{
 
var $db_connect_id;
var $query_result;
var $query_resultset;
var $query_numrows;
var $next_id;
var $row = array();
var $rowset = array();
var $row_index;
var $num_queries = 0;
 
//
// Constructor
//
function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
{
$this->persistency = $persistency;
$this->user = $sqluser;
$this->password = $sqlpassword;
$this->dbname = $database;
 
$this->server = $sqlserver;
 
if($this->persistency)
{
$this->db_connect_id = odbc_pconnect($this->server, "", "");
}
else
{
$this->db_connect_id = odbc_connect($this->server, "", "");
}
 
if($this->db_connect_id)
{
@odbc_autocommit($this->db_connect_id, off);
 
return $this->db_connect_id;
}
else
{
return false;
}
}
//
// Other base methods
//
function sql_close()
{
if($this->db_connect_id)
{
if($this->query_result)
{
@odbc_free_result($this->query_result);
}
$result = @odbc_close($this->db_connect_id);
return $result;
}
else
{
return false;
}
}
 
 
//
// Query method
//
function sql_query($query = "", $transaction = FALSE)
{
//
// Remove any pre-existing queries
//
unset($this->query_result);
unset($this->row);
if($query != "")
{
$this->num_queries++;
 
if(!eregi("^INSERT ",$query))
{
if(eregi("LIMIT", $query))
{
preg_match("/^(.*)LIMIT ([0-9]+)[, ]*([0-9]+)*/s", $query, $limits);
 
$query = $limits[1];
if($limits[3])
{
$row_offset = $limits[2];
$num_rows = $limits[3];
}
else
{
$row_offset = 0;
$num_rows = $limits[2];
}
 
$query .= " FETCH FIRST ".($row_offset+$num_rows)." ROWS ONLY OPTIMIZE FOR ".($row_offset+$num_rows)." ROWS";
 
$this->query_result = odbc_exec($this->db_connect_id, $query);
 
$query_limit_offset = $row_offset;
$this->result_numrows[$this->query_result] = $num_rows;
}
else
{
$this->query_result = odbc_exec($this->db_connect_id, $query);
 
$row_offset = 0;
$this->result_numrows[$this->query_result] = 5E6;
}
 
$result_id = $this->query_result;
if($this->query_result && eregi("^SELECT", $query))
{
 
for($i = 1; $i < odbc_num_fields($result_id)+1; $i++)
{
$this->result_field_names[$result_id][] = odbc_field_name($result_id, $i);
}
 
$i = $row_offset + 1;
$k = 0;
while(odbc_fetch_row($result_id, $i) && $k < $this->result_numrows[$result_id])
{
 
for($j = 1; $j < count($this->result_field_names[$result_id])+1; $j++)
{
$this->result_rowset[$result_id][$k][$this->result_field_names[$result_id][$j-1]] = odbc_result($result_id, $j);
}
$i++;
$k++;
}
 
$this->result_numrows[$result_id] = $k;
$this->row_index[$result_id] = 0;
}
else
{
$this->result_numrows[$result_id] = @odbc_num_rows($result_id);
$this->row_index[$result_id] = 0;
}
}
else
{
if(eregi("^(INSERT|UPDATE) ", $query))
{
$query = preg_replace("/\\\'/s", "''", $query);
}
 
$this->query_result = odbc_exec($this->db_connect_id, $query);
 
if($this->query_result)
{
$sql_id = "VALUES(IDENTITY_VAL_LOCAL())";
 
$id_result = odbc_exec($this->db_connect_id, $sql_id);
if($id_result)
{
$row_result = odbc_fetch_row($id_result);
if($row_result)
{
$this->next_id[$this->query_result] = odbc_result($id_result, 1);
}
}
}
 
odbc_commit($this->db_connect_id);
 
$this->query_limit_offset[$this->query_result] = 0;
$this->result_numrows[$this->query_result] = 0;
}
 
return $this->query_result;
}
else
{
return false;
}
}
 
//
// Other query methods
//
function sql_numrows($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
return $this->result_numrows[$query_id];
}
else
{
return false;
}
}
function sql_affectedrows($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
return $this->result_numrows[$query_id];
}
else
{
return false;
}
}
function sql_numfields($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = count($this->result_field_names[$query_id]);
return $result;
}
else
{
return false;
}
}
function sql_fieldname($offset, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = $this->result_field_names[$query_id][$offset];
return $result;
}
else
{
return false;
}
}
function sql_fieldtype($offset, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @odbc_field_type($query_id, $offset);
return $result;
}
else
{
return false;
}
}
function sql_fetchrow($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
if($this->row_index[$query_id] < $this->result_numrows[$query_id])
{
$result = $this->result_rowset[$query_id][$this->row_index[$query_id]];
$this->row_index[$query_id]++;
return $result;
}
else
{
return false;
}
}
else
{
return false;
}
}
function sql_fetchrowset($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$this->row_index[$query_id] = $this->result_numrows[$query_id];
return $this->result_rowset[$query_id];
}
else
{
return false;
}
}
function sql_fetchfield($field, $row = -1, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
if($row < $this->result_numrows[$query_id])
{
if($row == -1)
{
$getrow = $this->row_index[$query_id]-1;
}
else
{
$getrow = $row;
}
 
return $this->result_rowset[$query_id][$getrow][$this->result_field_names[$query_id][$field]];
 
}
else
{
return false;
}
}
else
{
return false;
}
}
function sql_rowseek($offset, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$this->row_index[$query_id] = 0;
return true;
}
else
{
return false;
}
}
function sql_nextid($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
return $this->next_id[$query_id];
}
else
{
return false;
}
}
function sql_freeresult($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @odbc_free_result($query_id);
return $result;
}
else
{
return false;
}
}
function sql_error($query_id = 0)
{
// $result['code'] = @odbc_error($this->db_connect_id);
// $result['message'] = @odbc_errormsg($this->db_connect_id);
 
return "";
}
 
} // class sql_db
 
} // if ... define
 
?>
/Forum/db/index.htm
0,0 → 1,10
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
 
</body>
</html>
/Forum/db/msaccess.php
0,0 → 1,389
<?php
/***************************************************************************
* msaccess.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: msaccess.php,v 1.8.2.2 2002/09/28 12:50:59 psotfx Exp $
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if(!defined("SQL_LAYER"))
{
 
define("SQL_LAYER","msaccess");
 
class sql_db
{
 
var $db_connect_id;
var $result_ids = array();
var $result;
 
var $next_id;
 
var $num_rows = array();
var $current_row = array();
var $field_names = array();
var $field_types = array();
var $result_rowset = array();
 
var $num_queries = 0;
 
//
// Constructor
//
function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
{
$this->persistency = $persistency;
$this->server = $sqlserver;
$this->user = $sqluser;
$this->password = $sqlpassword;
$this->dbname = $database;
 
$this->db_connect_id = ($this->persistency) ? odbc_pconnect($this->server, $this->user, $this->password) : odbc_connect($this->server, $this->user, $this->password);
 
return ( $this->db_connect_id ) ? $this->db_connect_id : false;
}
//
// Other base methods
//
function sql_close()
{
if($this->db_connect_id)
{
if( $this->in_transaction )
{
@odbc_commit($this->db_connect_id);
}
 
if( count($this->result_rowset) )
{
unset($this->result_rowset);
unset($this->field_names);
unset($this->field_types);
unset($this->num_rows);
unset($this->current_row);
}
 
return @odbc_close($this->db_connect_id);
}
else
{
return false;
}
}
 
//
// Query method
//
function sql_query($query = "", $transaction = FALSE)
{
if( $query != "" )
{
$this->num_queries++;
 
if( $transaction == BEGIN_TRANSACTION && !$this->in_transaction )
{
if( !odbc_autocommit($this->db_connect_id, false) )
{
return false;
}
$this->in_transaction = TRUE;
}
 
$query = str_replace("LOWER(", "LCASE(", $query);
 
if( preg_match("/^SELECT(.*?)(LIMIT ([0-9]+)[, ]*([0-9]+)*)?$/s", $query, $limits) )
{
$query = $limits[1];
 
if( !empty($limits[2]) )
{
$row_offset = ( $limits[4] ) ? $limits[3] : "";
$num_rows = ( $limits[4] ) ? $limits[4] : $limits[3];
 
$query = "TOP " . ( $row_offset + $num_rows ) . $query;
}
 
$this->result = odbc_exec($this->db_connect_id, "SELECT $query");
 
if( $this->result )
{
if( empty($this->field_names[$this->result]) )
{
for($i = 1; $i < odbc_num_fields($this->result) + 1; $i++)
{
$this->field_names[$this->result][] = odbc_field_name($this->result, $i);
$this->field_types[$this->result][] = odbc_field_type($this->result, $i);
}
}
 
$this->current_row[$this->result] = 0;
$this->result_rowset[$this->result] = array();
 
$row_outer = ( isset($row_offset) ) ? $row_offset + 1 : 1;
$row_outer_max = ( isset($num_rows) ) ? $row_offset + $num_rows + 1 : 1E9;
$row_inner = 0;
 
while( odbc_fetch_row($this->result, $row_outer) && $row_outer < $row_outer_max )
{
for($j = 0; $j < count($this->field_names[$this->result]); $j++)
{
$this->result_rowset[$this->result][$row_inner][$this->field_names[$this->result][$j]] = stripslashes(odbc_result($this->result, $j + 1));
}
 
$row_outer++;
$row_inner++;
}
 
$this->num_rows[$this->result] = count($this->result_rowset[$this->result]);
 
odbc_free_result($this->result);
}
 
}
else if( eregi("^INSERT ", $query) )
{
$this->result = odbc_exec($this->db_connect_id, $query);
 
if( $this->result )
{
$result_id = odbc_exec($this->db_connect_id, "SELECT @@IDENTITY");
if( $result_id )
{
if( odbc_fetch_row($result_id) )
{
$this->next_id[$this->db_connect_id] = odbc_result($result_id, 1);
$this->affected_rows[$this->db_connect_id] = odbc_num_rows($this->result);
}
}
}
}
else
{
$this->result = odbc_exec($this->db_connect_id, $query);
 
if( $this->result )
{
$this->affected_rows[$this->db_connect_id] = odbc_num_rows($this->result);
}
}
 
if( !$this->result )
{
if( $this->in_transaction )
{
odbc_rollback($this->db_connect_id);
odbc_autocommit($this->db_connect_id, true);
$this->in_transaction = FALSE;
}
 
return false;
}
 
if( $transaction == END_TRANSACTION && $this->in_transaction )
{
$this->in_transaction = FALSE;
 
if ( !@odbc_commit($this->db_connect_id) )
{
odbc_rollback($this->db_connect_id);
odbc_autocommit($this->db_connect_id, true);
return false;
}
odbc_autocommit($this->db_connect_id, true);
}
 
return $this->result;
}
else
{
if( $transaction == END_TRANSACTION && $this->in_transaction )
{
$this->in_transaction = FALSE;
 
if ( !@odbc_commit($this->db_connect_id) )
{
odbc_rollback($this->db_connect_id);
odbc_autocommit($this->db_connect_id, true);
return false;
}
odbc_autocommit($this->db_connect_id, true);
}
 
return true;
}
}
 
//
// Other query methods
//
function sql_numrows($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
return ( $query_id ) ? $this->num_rows[$query_id] : false;
}
 
function sql_numfields($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
return ( $query_id ) ? count($this->field_names[$query_id]) : false;
}
 
function sql_fieldname($offset, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
return ( $query_id ) ? $this->field_names[$query_id][$offset] : false;
}
 
function sql_fieldtype($offset, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
return ( $query_id ) ? $this->field_types[$query_id][$offset] : false;
}
 
function sql_fetchrow($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
if( $query_id )
{
return ( $this->num_rows[$query_id] && $this->current_row[$query_id] < $this->num_rows[$query_id] ) ? $this->result_rowset[$query_id][$this->current_row[$query_id]++] : false;
}
else
{
return false;
}
}
 
function sql_fetchrowset($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
if( $query_id )
{
return ( $this->num_rows[$query_id] ) ? $this->result_rowset[$query_id] : false;
}
else
{
return false;
}
}
 
function sql_fetchfield($field, $row = -1, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
if( $query_id )
{
if( $row < $this->num_rows[$query_id] )
{
$getrow = ($row == -1) ? $this->current_row[$query_id] - 1 : $row;
 
return $this->result_rowset[$query_id][$getrow][$this->field_names[$query_id][$field]];
}
else
{
return false;
}
}
else
{
return false;
}
}
 
function sql_rowseek($offset, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
if( $query_id )
{
$this->current_row[$query_id] = $offset - 1;
return true;
}
else
{
return false;
}
}
 
function sql_nextid()
{
return ( $this->next_id[$this->db_connect_id] ) ? $this->next_id[$this->db_connect_id] : false;
}
 
function sql_affectedrows()
{
return ( $this->affected_rows[$this->db_connect_id] ) ? $this->affected_rows[$this->db_connect_id] : false;
}
 
function sql_freeresult($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
unset($this->num_rows[$query_id]);
unset($this->current_row[$query_id]);
unset($this->result_rowset[$query_id]);
unset($this->field_names[$query_id]);
unset($this->field_types[$query_id]);
 
return true;
}
 
function sql_error()
{
$error['code'] = "";//odbc_error($this->db_connect_id);
$error['message'] = "Error";//odbc_errormsg($this->db_connect_id);
 
return $error;
}
 
} // class sql_db
 
} // if ... define
 
?>
/Forum/db/mssql-odbc.php
0,0 → 1,387
<?php
/***************************************************************************
* mssql-odbc.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: mssql-odbc.php,v 1.7 2002/03/20 17:48:30 psotfx Exp $
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if(!defined("SQL_LAYER"))
{
 
define("SQL_LAYER","mssql-odbc");
 
class sql_db
{
 
var $db_connect_id;
var $result;
 
var $next_id;
 
var $num_rows = array();
var $current_row = array();
var $field_names = array();
var $field_types = array();
var $result_rowset = array();
 
var $num_queries = 0;
 
//
// Constructor
//
function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
{
$this->persistency = $persistency;
$this->server = $sqlserver;
$this->user = $sqluser;
$this->password = $sqlpassword;
$this->dbname = $database;
 
$this->db_connect_id = ($this->persistency) ? odbc_pconnect($this->server, $this->user, $this->password) : odbc_connect($this->server, $this->user, $this->password);
 
return ( $this->db_connect_id ) ? $this->db_connect_id : false;
}
//
// Other base methods
//
function sql_close()
{
if($this->db_connect_id)
{
if( $this->in_transaction )
{
@odbc_commit($this->db_connect_id);
}
 
if( count($this->result_rowset) )
{
unset($this->result_rowset);
unset($this->field_names);
unset($this->field_types);
unset($this->num_rows);
unset($this->current_row);
}
 
return @odbc_close($this->db_connect_id);
}
else
{
return false;
}
}
 
//
// Query method
//
function sql_query($query = "", $transaction = FALSE)
{
if( $query != "" )
{
$this->num_queries++;
 
if( $transaction == BEGIN_TRANSACTION && !$this->in_transaction )
{
if( !odbc_autocommit($this->db_connect_id, false) )
{
return false;
}
$this->in_transaction = TRUE;
}
 
if( preg_match("/^SELECT(.*?)(LIMIT ([0-9]+)[, ]*([0-9]+)*)?$/s", $query, $limits) )
{
$query = $limits[1];
 
if( !empty($limits[2]) )
{
$row_offset = ( $limits[4] ) ? $limits[3] : "";
$num_rows = ( $limits[4] ) ? $limits[4] : $limits[3];
 
$query = "TOP " . ( $row_offset + $num_rows ) . $query;
}
 
$this->result = odbc_exec($this->db_connect_id, "SELECT $query");
 
if( $this->result )
{
if( empty($this->field_names[$this->result]) )
{
for($i = 1; $i < odbc_num_fields($this->result) + 1; $i++)
{
$this->field_names[$this->result][] = odbc_field_name($this->result, $i);
$this->field_types[$this->result][] = odbc_field_type($this->result, $i);
}
}
 
$this->current_row[$this->result] = 0;
$this->result_rowset[$this->result] = array();
 
$row_outer = ( isset($row_offset) ) ? $row_offset + 1 : 1;
$row_outer_max = ( isset($num_rows) ) ? $row_offset + $num_rows + 1 : 1E9;
$row_inner = 0;
 
while( odbc_fetch_row($this->result, $row_outer) && $row_outer < $row_outer_max )
{
for($j = 0; $j < count($this->field_names[$this->result]); $j++)
{
$this->result_rowset[$this->result][$row_inner][$this->field_names[$this->result][$j]] = stripslashes(odbc_result($this->result, $j + 1));
}
 
$row_outer++;
$row_inner++;
}
 
$this->num_rows[$this->result] = count($this->result_rowset[$this->result]);
}
 
}
else if( eregi("^INSERT ", $query) )
{
$this->result = odbc_exec($this->db_connect_id, $query);
 
if( $this->result )
{
$result_id = odbc_exec($this->db_connect_id, "SELECT @@IDENTITY");
if( $result_id )
{
if( odbc_fetch_row($result_id) )
{
$this->next_id[$this->db_connect_id] = odbc_result($result_id, 1);
$this->affected_rows[$this->db_connect_id] = odbc_num_rows($this->result);
}
}
}
}
else
{
$this->result = odbc_exec($this->db_connect_id, $query);
 
if( $this->result )
{
$this->affected_rows[$this->db_connect_id] = odbc_num_rows($this->result);
}
}
 
if( !$this->result )
{
if( $this->in_transaction )
{
odbc_rollback($this->db_connect_id);
odbc_autocommit($this->db_connect_id, true);
$this->in_transaction = FALSE;
}
 
return false;
}
 
if( $transaction == END_TRANSACTION && $this->in_transaction )
{
$this->in_transaction = FALSE;
 
if ( !odbc_commit($this->db_connect_id) )
{
odbc_rollback($this->db_connect_id);
odbc_autocommit($this->db_connect_id, true);
return false;
}
odbc_autocommit($this->db_connect_id, true);
}
 
odbc_free_result($this->result);
 
return $this->result;
}
else
{
if( $transaction == END_TRANSACTION && $this->in_transaction )
{
$this->in_transaction = FALSE;
 
if ( !@odbc_commit($this->db_connect_id) )
{
odbc_rollback($this->db_connect_id);
odbc_autocommit($this->db_connect_id, true);
return false;
}
odbc_autocommit($this->db_connect_id, true);
}
 
return true;
}
}
 
//
// Other query methods
//
function sql_numrows($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
return ( $query_id ) ? $this->num_rows[$query_id] : false;
}
 
function sql_numfields($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
return ( $query_id ) ? count($this->field_names[$query_id]) : false;
}
 
function sql_fieldname($offset, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
return ( $query_id ) ? $this->field_names[$query_id][$offset] : false;
}
 
function sql_fieldtype($offset, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
return ( $query_id ) ? $this->field_types[$query_id][$offset] : false;
}
 
function sql_fetchrow($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
if( $query_id )
{
return ( $this->num_rows[$query_id] && $this->current_row[$query_id] < $this->num_rows[$query_id] ) ? $this->result_rowset[$query_id][$this->current_row[$query_id]++] : false;
}
else
{
return false;
}
}
 
function sql_fetchrowset($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
if( $query_id )
{
return ( $this->num_rows[$query_id] ) ? $this->result_rowset[$query_id] : false;
}
else
{
return false;
}
}
 
function sql_fetchfield($field, $row = -1, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
if( $query_id )
{
if( $row < $this->num_rows[$query_id] )
{
$getrow = ( $row == -1 ) ? $this->current_row[$query_id] - 1 : $row;
 
return $this->result_rowset[$query_id][$getrow][$this->field_names[$query_id][$field]];
 
}
else
{
return false;
}
}
else
{
return false;
}
}
 
function sql_rowseek($offset, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
if( $query_id )
{
$this->current_row[$query_id] = $offset - 1;
return true;
}
else
{
return false;
}
}
 
function sql_nextid()
{
return ( $this->next_id[$this->db_connect_id] ) ? $this->next_id[$this->db_connect_id] : false;
}
 
function sql_affectedrows()
{
return ( $this->affected_rows[$this->db_connect_id] ) ? $this->affected_rows[$this->db_connect_id] : false;
}
 
function sql_freeresult($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
unset($this->num_rows[$query_id]);
unset($this->current_row[$query_id]);
unset($this->result_rowset[$query_id]);
unset($this->field_names[$query_id]);
unset($this->field_types[$query_id]);
 
return true;
}
 
function sql_error()
{
$error['code'] = odbc_error($this->db_connect_id);
$error['message'] = odbc_errormsg($this->db_connect_id);
 
return $error;
}
 
} // class sql_db
 
} // if ... define
 
?>
/Forum/db/mssql.php
0,0 → 1,418
<?php
/***************************************************************************
* mssql.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : supportphpbb.com
*
* $Id: mssql.php,v 1.22.2.4 2006/03/09 19:57:37 grahamje Exp $
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if(!defined("SQL_LAYER"))
{
 
define("SQL_LAYER","mssql");
 
class sql_db
{
 
var $db_connect_id;
var $result;
 
var $next_id;
var $in_transaction = 0;
 
var $row = array();
var $rowset = array();
var $limit_offset;
var $query_limit_success;
 
var $num_queries = 0;
 
//
// Constructor
//
function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
{
$this->persistency = $persistency;
$this->user = $sqluser;
$this->password = $sqlpassword;
$this->server = $sqlserver;
$this->dbname = $database;
 
$this->db_connect_id = ( $this->persistency ) ? @mssql_pconnect($this->server, $this->user, $this->password) : @mssql_connect($this->server, $this->user, $this->password);
 
if( $this->db_connect_id && $this->dbname != "" )
{
if( !mssql_select_db($this->dbname, $this->db_connect_id) )
{
mssql_close($this->db_connect_id);
return false;
}
}
 
return $this->db_connect_id;
}
 
//
// Other base methods
//
function sql_close()
{
if($this->db_connect_id)
{
//
// Commit any remaining transactions
//
if( $this->in_transaction )
{
@mssql_query("COMMIT", $this->db_connect_id);
}
 
return @mssql_close($this->db_connect_id);
}
else
{
return false;
}
}
 
 
//
// Query method
//
function sql_query($query = '', $transaction = FALSE)
{
//
// Remove any pre-existing queries
//
unset($this->result);
unset($this->row);
 
if ( $query != '' )
{
$this->num_queries++;
 
if ( $transaction == BEGIN_TRANSACTION && !$this->in_transaction )
{
if ( !@mssql_query('BEGIN TRANSACTION', $this->db_connect_id) )
{
return false;
}
$this->in_transaction = TRUE;
}
 
//
// Does query contain any LIMIT code? If so pull out relevant start and num_results
// This isn't terribly easy with MSSQL, whatever you do will potentially impact
// performance compared to an 'in-built' limit
//
// Another issue is the 'lack' of a returned true value when a query is valid but has
// no result set (as with all the other DB interfaces). It seems though that it's
// 'fair' to say that if a query returns a false result (ie. no resource id) then the
// SQL was valid but had no result set. If the query returns nothing but the rowcount
// returns something then there's a problem. This may well be a false assumption though
// ... needs checking under Windows itself.
//
if( preg_match('#^SELECT(.*?)(LIMIT ([0-9]+)[, ]*([0-9]+)*)?$#s', $query, $limits) )
{
$query = $limits[1];
 
if( !empty($limits[2]) )
{
$row_offset = ( $limits[4] ) ? $limits[3] : "";
$num_rows = ( $limits[4] ) ? $limits[4] : $limits[3];
 
$query = 'TOP ' . ( $row_offset + $num_rows ) . $query;
}
 
$this->result = @mssql_query("SELECT $query", $this->db_connect_id);
 
if( $this->result )
{
$this->limit_offset[$this->result] = ( !empty($row_offset) ) ? $row_offset : 0;
 
if( $row_offset > 0 )
{
@mssql_data_seek($this->result, $row_offset);
}
}
}
else if( preg_match('#^INSERT #i', $query) )
{
if( @mssql_query($query, $this->db_connect_id) )
{
$this->result = time() + microtime();
 
$result_id = @mssql_query('SELECT @@IDENTITY AS id, @@ROWCOUNT as affected', $this->db_connect_id);
if( $result_id )
{
if( $row = @mssql_fetch_array($result_id) )
{
$this->next_id[$this->db_connect_id] = $row['id'];
$this->affected_rows[$this->db_connect_id] = $row['affected'];
}
}
}
}
else
{
if( @mssql_query($query, $this->db_connect_id) )
{
$this->result = time() + microtime();
 
$result_id = @mssql_query('SELECT @@ROWCOUNT as affected', $this->db_connect_id);
if( $result_id )
{
if( $row = @mssql_fetch_array($result_id) )
{
$this->affected_rows[$this->db_connect_id] = $row['affected'];
}
}
}
}
 
if( !$this->result )
{
if( $this->in_transaction )
{
@mssql_query('ROLLBACK', $this->db_connect_id);
$this->in_transaction = FALSE;
}
 
return false;
}
 
if( $transaction == END_TRANSACTION && $this->in_transaction )
{
$this->in_transaction = FALSE;
 
if( !@mssql_query('COMMIT', $this->db_connect_id) )
{
@mssql_query("ROLLBACK", $this->db_connect_id);
return false;
}
}
 
return $this->result;
}
else
{
if( $transaction == END_TRANSACTION && $this->in_transaction )
{
$this->in_transaction = FALSE;
 
if( !@mssql_query('COMMIT', $this->db_connect_id) )
{
@mssql_query('ROLLBACK', $this->db_connect_id);
return false;
}
}
 
return true;
}
}
 
//
// Other query methods
//
function sql_numrows($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
if( $query_id )
{
return ( !empty($this->limit_offset[$query_id]) ) ? @mssql_num_rows($query_id) - $this->limit_offset[$query_id] : @mssql_num_rows($query_id);
}
else
{
return false;
}
}
 
function sql_numfields($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
return ( $query_id ) ? @mssql_num_fields($query_id) : false;
}
 
function sql_fieldname($offset, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
return ( $query_id ) ? @mssql_field_name($query_id, $offset) : false;
}
 
function sql_fieldtype($offset, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->result;
}
 
return ( $query_id ) ? @mssql_field_type($query_id, $offset) : false;
}
 
function sql_fetchrow($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
if( $query_id )
{
empty($row);
 
$row = @mssql_fetch_array($query_id);
 
while( list($key, $value) = @each($row) )
{
$row[$key] = ($value === ' ') ? '' : stripslashes($value);
}
@reset($row);
 
return $row;
}
else
{
return false;
}
}
 
function sql_fetchrowset($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
if( $query_id )
{
$i = 0;
empty($rowset);
 
while( $row = @mssql_fetch_array($query_id))
{
while( list($key, $value) = @each($row) )
{
$rowset[$i][$key] = ($value === ' ') ? '' : stripslashes($value);
}
$i++;
}
@reset($rowset);
 
return $rowset;
}
else
{
return false;
}
}
 
function sql_fetchfield($field, $row = -1, $query_id)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
if( $query_id )
{
if( $row != -1 )
{
if( $this->limit_offset[$query_id] > 0 )
{
$result = ( !empty($this->limit_offset[$query_id]) ) ? @mssql_result($this->result, ($this->limit_offset[$query_id] + $row), $field) : false;
}
else
{
$result = @mssql_result($this->result, $row, $field);
}
}
else
{
if( empty($this->row[$query_id]) )
{
$this->row[$query_id] = @mssql_fetch_array($query_id);
$result = ($this->row[$query_id][$field] === ' ') ? '' : stripslashes($this->row[$query_id][$field]);
}
}
 
return $result;
}
else
{
return false;
}
}
 
function sql_rowseek($rownum, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
if( $query_id )
{
return ( !empty($this->limit_offset[$query_id]) ) ? @mssql_data_seek($query_id, ($this->limit_offset[$query_id] + $rownum)) : @mssql_data_seek($query_id, $rownum);
}
else
{
return false;
}
}
 
function sql_nextid()
{
return ( $this->next_id[$this->db_connect_id] ) ? $this->next_id[$this->db_connect_id] : false;
}
 
function sql_affectedrows()
{
return ( $this->affected_rows[$this->db_connect_id] ) ? $this->affected_rows[$this->db_connect_id] : false;
}
 
function sql_freeresult($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->result;
}
 
return ( $query_id ) ? @mssql_free_result($query_id) : false;
}
 
function sql_error($query_id = 0)
{
$result['message'] = @mssql_get_last_message();
return $result;
}
 
} // class sql_db
 
} // if ... define
 
?>
/Forum/db/mysql.php
0,0 → 1,335
<?php
/***************************************************************************
* mysql.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: mysql.php,v 1.16.2.1 2005/09/18 16:17:20 acydburn Exp $
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if(!defined("SQL_LAYER"))
{
 
define("SQL_LAYER","mysql");
 
class sql_db
{
 
var $db_connect_id;
var $query_result;
var $row = array();
var $rowset = array();
var $num_queries = 0;
 
//
// Constructor
//
function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
{
 
$this->persistency = $persistency;
$this->user = $sqluser;
$this->password = $sqlpassword;
$this->server = $sqlserver;
$this->dbname = $database;
 
if($this->persistency)
{
$this->db_connect_id = @mysql_pconnect($this->server, $this->user, $this->password);
}
else
{
$this->db_connect_id = @mysql_connect($this->server, $this->user, $this->password);
}
if($this->db_connect_id)
{
if($database != "")
{
$this->dbname = $database;
$dbselect = @mysql_select_db($this->dbname);
if(!$dbselect)
{
@mysql_close($this->db_connect_id);
$this->db_connect_id = $dbselect;
}
}
return $this->db_connect_id;
}
else
{
return false;
}
}
 
//
// Other base methods
//
function sql_close()
{
if($this->db_connect_id)
{
if($this->query_result)
{
@mysql_free_result($this->query_result);
}
$result = @mysql_close($this->db_connect_id);
return $result;
}
else
{
return false;
}
}
 
//
// Base query method
//
function sql_query($query = "", $transaction = FALSE)
{
// Remove any pre-existing queries
unset($this->query_result);
if($query != "")
{
$this->num_queries++;
 
$this->query_result = @mysql_query($query, $this->db_connect_id);
}
if($this->query_result)
{
unset($this->row[$this->query_result]);
unset($this->rowset[$this->query_result]);
return $this->query_result;
}
else
{
return ( $transaction == END_TRANSACTION ) ? true : false;
}
}
 
//
// Other query methods
//
function sql_numrows($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @mysql_num_rows($query_id);
return $result;
}
else
{
return false;
}
}
function sql_affectedrows()
{
if($this->db_connect_id)
{
$result = @mysql_affected_rows($this->db_connect_id);
return $result;
}
else
{
return false;
}
}
function sql_numfields($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @mysql_num_fields($query_id);
return $result;
}
else
{
return false;
}
}
function sql_fieldname($offset, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @mysql_field_name($query_id, $offset);
return $result;
}
else
{
return false;
}
}
function sql_fieldtype($offset, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @mysql_field_type($query_id, $offset);
return $result;
}
else
{
return false;
}
}
function sql_fetchrow($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$this->row[$query_id] = @mysql_fetch_array($query_id);
return $this->row[$query_id];
}
else
{
return false;
}
}
function sql_fetchrowset($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
unset($this->rowset[$query_id]);
unset($this->row[$query_id]);
while($this->rowset[$query_id] = @mysql_fetch_array($query_id))
{
$result[] = $this->rowset[$query_id];
}
return $result;
}
else
{
return false;
}
}
function sql_fetchfield($field, $rownum = -1, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
if($rownum > -1)
{
$result = @mysql_result($query_id, $rownum, $field);
}
else
{
if(empty($this->row[$query_id]) && empty($this->rowset[$query_id]))
{
if($this->sql_fetchrow())
{
$result = $this->row[$query_id][$field];
}
}
else
{
if($this->rowset[$query_id])
{
$result = $this->rowset[$query_id][0][$field];
}
else if($this->row[$query_id])
{
$result = $this->row[$query_id][$field];
}
}
}
return $result;
}
else
{
return false;
}
}
function sql_rowseek($rownum, $query_id = 0){
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @mysql_data_seek($query_id, $rownum);
return $result;
}
else
{
return false;
}
}
function sql_nextid(){
if($this->db_connect_id)
{
$result = @mysql_insert_id($this->db_connect_id);
return $result;
}
else
{
return false;
}
}
function sql_freeresult($query_id = 0){
if(!$query_id)
{
$query_id = $this->query_result;
}
 
if ( $query_id )
{
unset($this->row[$query_id]);
unset($this->rowset[$query_id]);
 
@mysql_free_result($query_id);
 
return true;
}
else
{
return false;
}
}
function sql_error($query_id = 0)
{
$result["message"] = @mysql_error($this->db_connect_id);
$result["code"] = @mysql_errno($this->db_connect_id);
 
return $result;
}
 
} // class sql_db
 
} // if ... define
 
?>
/Forum/db/mysql4.php
0,0 → 1,340
<?php
/***************************************************************************
* mysql4.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : supportphpbb.com
*
* $Id: mysql4.php,v 1.5.2.1 2005/09/18 16:17:20 acydburn Exp $
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if(!defined("SQL_LAYER"))
{
 
define("SQL_LAYER","mysql4");
 
class sql_db
{
 
var $db_connect_id;
var $query_result;
var $row = array();
var $rowset = array();
var $num_queries = 0;
var $in_transaction = 0;
 
//
// Constructor
//
function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
{
$this->persistency = $persistency;
$this->user = $sqluser;
$this->password = $sqlpassword;
$this->server = $sqlserver;
$this->dbname = $database;
 
$this->db_connect_id = ($this->persistency) ? mysql_pconnect($this->server, $this->user, $this->password) : mysql_connect($this->server, $this->user, $this->password);
 
if( $this->db_connect_id )
{
if( $database != "" )
{
$this->dbname = $database;
$dbselect = mysql_select_db($this->dbname);
 
if( !$dbselect )
{
mysql_close($this->db_connect_id);
$this->db_connect_id = $dbselect;
}
}
 
return $this->db_connect_id;
}
else
{
return false;
}
}
 
//
// Other base methods
//
function sql_close()
{
if( $this->db_connect_id )
{
//
// Commit any remaining transactions
//
if( $this->in_transaction )
{
mysql_query("COMMIT", $this->db_connect_id);
}
 
return mysql_close($this->db_connect_id);
}
else
{
return false;
}
}
 
//
// Base query method
//
function sql_query($query = "", $transaction = FALSE)
{
//
// Remove any pre-existing queries
//
unset($this->query_result);
 
if( $query != "" )
{
$this->num_queries++;
if( $transaction == BEGIN_TRANSACTION && !$this->in_transaction )
{
$result = mysql_query("BEGIN", $this->db_connect_id);
if(!$result)
{
return false;
}
$this->in_transaction = TRUE;
}
 
$this->query_result = mysql_query($query, $this->db_connect_id);
}
else
{
if( $transaction == END_TRANSACTION && $this->in_transaction )
{
$result = mysql_query("COMMIT", $this->db_connect_id);
}
}
 
if( $this->query_result )
{
unset($this->row[$this->query_result]);
unset($this->rowset[$this->query_result]);
 
if( $transaction == END_TRANSACTION && $this->in_transaction )
{
$this->in_transaction = FALSE;
 
if ( !mysql_query("COMMIT", $this->db_connect_id) )
{
mysql_query("ROLLBACK", $this->db_connect_id);
return false;
}
}
return $this->query_result;
}
else
{
if( $this->in_transaction )
{
mysql_query("ROLLBACK", $this->db_connect_id);
$this->in_transaction = FALSE;
}
return false;
}
}
 
//
// Other query methods
//
function sql_numrows($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
return ( $query_id ) ? mysql_num_rows($query_id) : false;
}
 
function sql_affectedrows()
{
return ( $this->db_connect_id ) ? mysql_affected_rows($this->db_connect_id) : false;
}
 
function sql_numfields($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
return ( $query_id ) ? mysql_num_fields($query_id) : false;
}
 
function sql_fieldname($offset, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
return ( $query_id ) ? mysql_field_name($query_id, $offset) : false;
}
 
function sql_fieldtype($offset, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
return ( $query_id ) ? mysql_field_type($query_id, $offset) : false;
}
 
function sql_fetchrow($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
if( $query_id )
{
$this->row[$query_id] = mysql_fetch_array($query_id, MYSQL_ASSOC);
return $this->row[$query_id];
}
else
{
return false;
}
}
 
function sql_fetchrowset($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
if( $query_id )
{
unset($this->rowset[$query_id]);
unset($this->row[$query_id]);
 
while($this->rowset[$query_id] = mysql_fetch_array($query_id, MYSQL_ASSOC))
{
$result[] = $this->rowset[$query_id];
}
 
return $result;
}
else
{
return false;
}
}
 
function sql_fetchfield($field, $rownum = -1, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
if( $query_id )
{
if( $rownum > -1 )
{
$result = mysql_result($query_id, $rownum, $field);
}
else
{
if( empty($this->row[$query_id]) && empty($this->rowset[$query_id]) )
{
if( $this->sql_fetchrow() )
{
$result = $this->row[$query_id][$field];
}
}
else
{
if( $this->rowset[$query_id] )
{
$result = $this->rowset[$query_id][0][$field];
}
else if( $this->row[$query_id] )
{
$result = $this->row[$query_id][$field];
}
}
}
 
return $result;
}
else
{
return false;
}
}
 
function sql_rowseek($rownum, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
return ( $query_id ) ? mysql_data_seek($query_id, $rownum) : false;
}
 
function sql_nextid()
{
return ( $this->db_connect_id ) ? mysql_insert_id($this->db_connect_id) : false;
}
 
function sql_freeresult($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
if ( $query_id )
{
unset($this->row[$query_id]);
unset($this->rowset[$query_id]);
 
mysql_free_result($query_id);
 
return true;
}
else
{
return false;
}
}
 
function sql_error()
{
$result['message'] = mysql_error($this->db_connect_id);
$result['code'] = mysql_errno($this->db_connect_id);
 
return $result;
}
 
} // class sql_db
 
} // if ... define
 
?>
/Forum/db/postgres7.php
0,0 → 1,397
<?php
/***************************************************************************
* postgres7.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : supportphpbb.com
*
* $Id: postgres7.php,v 1.19.2.3 2005/05/06 20:50:10 acydburn Exp $
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if(!defined("SQL_LAYER"))
{
 
define("SQL_LAYER","postgresql");
 
class sql_db
{
 
var $db_connect_id;
var $query_result;
var $in_transaction = 0;
var $row = array();
var $rowset = array();
var $rownum = array();
var $num_queries = 0;
 
//
// Constructor
//
function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
{
$this->connect_string = "";
 
if( $sqluser )
{
$this->connect_string .= "user=$sqluser ";
}
 
if( $sqlpassword )
{
$this->connect_string .= "password=$sqlpassword ";
}
 
if( $sqlserver )
{
if( ereg(":", $sqlserver) )
{
list($sqlserver, $sqlport) = split(":", $sqlserver);
$this->connect_string .= "host=$sqlserver port=$sqlport ";
}
else
{
if( $sqlserver != "localhost" )
{
$this->connect_string .= "host=$sqlserver ";
}
}
}
 
if( $database )
{
$this->dbname = $database;
$this->connect_string .= "dbname=$database";
}
 
$this->persistency = $persistency;
 
$this->db_connect_id = ( $this->persistency ) ? pg_pconnect($this->connect_string) : pg_connect($this->connect_string);
 
return ( $this->db_connect_id ) ? $this->db_connect_id : false;
}
 
//
// Other base methods
//
function sql_close()
{
if( $this->db_connect_id )
{
//
// Commit any remaining transactions
//
if( $this->in_transaction )
{
@pg_exec($this->db_connect_id, "COMMIT");
}
 
if( $this->query_result )
{
@pg_freeresult($this->query_result);
}
 
return @pg_close($this->db_connect_id);
}
else
{
return false;
}
}
 
//
// Query method
//
function sql_query($query = "", $transaction = false)
{
//
// Remove any pre-existing queries
//
unset($this->query_result);
if( $query != "" )
{
$this->num_queries++;
 
$query = preg_replace("/LIMIT ([0-9]+),([ 0-9]+)/", "LIMIT \\2 OFFSET \\1", $query);
 
if( $transaction == BEGIN_TRANSACTION && !$this->in_transaction )
{
$this->in_transaction = TRUE;
 
if( !@pg_exec($this->db_connect_id, "BEGIN") )
{
return false;
}
}
 
$this->query_result = @pg_exec($this->db_connect_id, $query);
if( $this->query_result )
{
if( $transaction == END_TRANSACTION )
{
$this->in_transaction = FALSE;
 
if( !@pg_exec($this->db_connect_id, "COMMIT") )
{
@pg_exec($this->db_connect_id, "ROLLBACK");
return false;
}
}
 
$this->last_query_text[$this->query_result] = $query;
$this->rownum[$this->query_result] = 0;
 
unset($this->row[$this->query_result]);
unset($this->rowset[$this->query_result]);
 
return $this->query_result;
}
else
{
if( $this->in_transaction )
{
@pg_exec($this->db_connect_id, "ROLLBACK");
}
$this->in_transaction = FALSE;
 
return false;
}
}
else
{
if( $transaction == END_TRANSACTION && $this->in_transaction )
{
$this->in_transaction = FALSE;
 
if( !@pg_exec($this->db_connect_id, "COMMIT") )
{
@pg_exec($this->db_connect_id, "ROLLBACK");
return false;
}
}
 
return true;
}
}
 
//
// Other query methods
//
function sql_numrows($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
return ( $query_id ) ? @pg_numrows($query_id) : false;
}
 
function sql_numfields($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
return ( $query_id ) ? @pg_numfields($query_id) : false;
}
 
function sql_fieldname($offset, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
return ( $query_id ) ? @pg_fieldname($query_id, $offset) : false;
}
 
function sql_fieldtype($offset, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
return ( $query_id ) ? @pg_fieldtype($query_id, $offset) : false;
}
 
function sql_fetchrow($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
if($query_id)
{
$this->row = @pg_fetch_array($query_id, $this->rownum[$query_id]);
 
if( $this->row )
{
$this->rownum[$query_id]++;
return $this->row;
}
}
 
return false;
}
 
function sql_fetchrowset($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
if( $query_id )
{
unset($this->rowset[$query_id]);
unset($this->row[$query_id]);
$this->rownum[$query_id] = 0;
 
while( $this->rowset = @pg_fetch_array($query_id, $this->rownum[$query_id], PGSQL_ASSOC) )
{
$result[] = $this->rowset;
$this->rownum[$query_id]++;
}
 
return $result;
}
 
return false;
}
 
function sql_fetchfield($field, $row_offset=-1, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
if( $query_id )
{
if( $row_offset != -1 )
{
$this->row = @pg_fetch_array($query_id, $row_offset, PGSQL_ASSOC);
}
else
{
if( $this->rownum[$query_id] )
{
$this->row = @pg_fetch_array($query_id, $this->rownum[$query_id]-1, PGSQL_ASSOC);
}
else
{
$this->row = @pg_fetch_array($query_id, $this->rownum[$query_id], PGSQL_ASSOC);
 
if( $this->row )
{
$this->rownum[$query_id]++;
}
}
}
 
return $this->row[$field];
}
 
return false;
}
 
function sql_rowseek($offset, $query_id = 0)
{
 
if(!$query_id)
{
$query_id = $this->query_result;
}
 
if( $query_id )
{
if( $offset > -1 )
{
$this->rownum[$query_id] = $offset;
return true;
}
else
{
return false;
}
}
 
return false;
}
 
function sql_nextid()
{
$query_id = $this->query_result;
 
if($query_id && $this->last_query_text[$query_id] != "")
{
if( preg_match("/^INSERT[\t\n ]+INTO[\t\n ]+([a-z0-9\_\-]+)/is", $this->last_query_text[$query_id], $tablename) )
{
$query = "SELECT currval('" . $tablename[1] . "_id_seq') AS last_value";
$temp_q_id = @pg_exec($this->db_connect_id, $query);
if( !$temp_q_id )
{
return false;
}
 
$temp_result = @pg_fetch_array($temp_q_id, 0, PGSQL_ASSOC);
 
return ( $temp_result ) ? $temp_result['last_value'] : false;
}
}
 
return false;
}
 
function sql_affectedrows($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
return ( $query_id ) ? @pg_cmdtuples($query_id) : false;
}
 
function sql_freeresult($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
return ( $query_id ) ? @pg_freeresult($query_id) : false;
}
 
function sql_error($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
 
$result['message'] = @pg_errormessage($this->db_connect_id);
$result['code'] = -1;
 
return $result;
}
 
} // class ... db_sql
 
} // if ... defined
 
?>
/Forum/docs/AUTHORS
0,0 → 1,6
Please see: http://www.phpbb.com/about.php for a list of all the people involved in phpBB.
Please see: http://www.phpbb.com/about.php for a list of people involved within the security audit of phpBB (since phpBB 2.0.17).
 
[September 2005]
Our special thanks goes to our former developer and manager psoTFX (Paul S. Owen) for being a wonderful teammate and talented programer.
He was a driving force in the project for over 3 years and helped a lot in making phpBB what it is now.
/Forum/docs/CHANGELOG.html
0,0 → 1,819
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>phpBB 2.0.x :: Changelog</title>
<link rel="stylesheet" href="../templates/subSilver/subSilver.css" type="text/css" />
<style type="text/css">
<!--
p,ul,td {font-size:10pt;}
.h2 {font-size:15pt;font-weight:bold;color:red}
.h3 {font-size:12pt;color:blue}
//-->
</style>
</head>
<body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#006699">
 
<table width="100%" border="0" cellspacing="0" cellpadding="10" align="center">
<tr>
<td class="bodyline"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
 
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../templates/subSilver/images/logo_phpBB.gif" border="0" alt="phpBB 2 : Creating Communities" vspace="1" /></a></td>
<td align="center" width="100%" valign="middle"><span class="maintitle">phpBB 2.0.x CHANGELOG</span></td>
</tr>
</table>
 
<!-- BEGIN DOCUMENT -->
<ol>
<li><a href="#changelog">Changelog</a></li>
<ol type="i">
<li><a href="#2020">Changes since 2.0.20</a></li>
<li><a href="#2019">Changes since 2.0.19</a></li>
<li><a href="#2018">Changes since 2.0.18</a></li>
<li><a href="#2017">Changes since 2.0.17</a></li>
<li><a href="#2016">Changes since 2.0.16</a></li>
<li><a href="#2015">Changes since 2.0.15</a></li>
<li><a href="#2014">Changes since 2.0.14</a></li>
<li><a href="#2013">Changes since 2.0.13</a></li>
<li><a href="#2012">Changes since 2.0.12</a></li>
<li><a href="#2011">Changes since 2.0.11</a></li>
<li><a href="#2010">Changes since 2.0.10</a></li>
<li><a href="#209">Changes since 2.0.9</a></li>
<li><a href="#208">Changes since 2.0.8</a></li>
<li><a href="#207">Changes since 2.0.7</a></li>
<li><a href="#206">Changes since 2.0.6</a></li>
<li><a href="#205">Changes since 2.0.5</a></li>
<li><a href="#204">Changes since 2.0.4</a></li>
<li><a href="#203">Changes since 2.0.3</a></li>
<li><a href="#202">Changes since 2.0.2</a></li>
<li><a href="#201">Changes since 2.0.1</a></li>
<li><a href="#200">Changes since 2.0.0</a></li>
<li><a href="#final">Changes since RC-4</a></li>
<li><a href="#rc4">Changes since RC-3</a></li>
<li><a href="#rc3">Changes since RC-2</a></li>
<li><a href="#rc2">Changes since RC-1</a></li>
<li><a href="#rc1">Changes since RC-1 (pre)</a></li>
</ol>
<li><a href="#disclaimer">Disclaimer</a></li>
</ol>
 
<a name="changelog"></a><h2 class="h2"><u>1. Changelog</u></h2>
 
<p>This is a non-exhaustive (but still near complete) changelog for phpBB 2.0.x including beta and release candidate versions. Our thanks to all those people who've contributed bug reports and code fixes.</p>
 
<a name="2020"></a><h3 class="h3">l.i. Changes since 2.0.20</h3>
 
<ul>
<li>[Fix] Changes to random number generator code to explicitly truncate the length of the string</li>
<li>[Fix] Quoting on boards with HTML enabled</li>
<li>[Fix] Special characters on boards with HTML enabled</li>
<li>[Fix] Redirect to list if cancelling deletion of ranks, smilies or word censors</li>
<li>[Fix] Missing error message if an inactive user tried to login (Bug #1598)</li>
<li>[Fix] Do not alter post counts when just removing a poll (Bug #1602)</li>
<li>[Fix] Correct error in removal of old session keys</li>
<li>[Fix] Changed filtering of short search terms</li>
<li>[Sec] Improved filtering on language selection (also addresses a number of bug reports related to missing languages)</li>
<li>[Change] Backported more efficient highlighting code from Olympus</li>
<li>[Change] Backported zlib emulation code so that there is only a single confirmation image even if zlib is not available</li>
</ul>
 
 
<a name="2019"></a><h3 class="h3">l.ii. Changes since 2.0.19</h3>
 
<ul>
<li>[Fix] Prevent login attempts from incrementing for inactive users</li>
<li>[Fix] Do not check maximum login attempts on re-authentication to the admin panel - tomknight</li>
<li>[Fix] Regenerate session keys on password change</li>
<li>[Fix] retrieving category rows in index.php (Bug #90)</li>
<li>[Fix] improved index performance by determining the permissions before iterating through all forums (Bug #91)</li>
<li>[Fix] Better handling of short usernames within the search (bug #105)</li>
<li>[Fix] Send a no-cache header on admin pages as well as normal board pages (Bug #149)</li>
<li>[Fix] Apply word censors to the message when quoting it (Bug #405)</li>
<li>[Fix] Improved performance of query in admin_groups (Bug #753)</li>
<li>[Fix] Workaround for an issue in either PHP or MSSQL resulting in a space being returned instead of an empty string (bug #830)</li>
<li>[Fix] Correct use of default_style config value (Bug #861)</li>
<li>[Fix] Replace unneeded unset calls in admin_db_utilities.php - vanderaj</li>
<li>[Fix] Improved error handling in modcp.php</li>
<li>[Fix] Improved handling of forums to which the user does not have any explicit permissions - vanderaj</li>
<li>[Fix] Assorted fixes and cleanup of admin_ranks.php, now requires confirmation of deletions</li>
<li>[Fix] Assorted fixes and cleanup of admin_words.php, now requires confirmation of deletions</li>
<li>[Fix] Addition and editing of smilies can no longer be performed via GET, now requires confirmation of deletions</li>
<li>[Fix] Escape group names in admin_groups.php</li>
<li>[Sec] Replace strip_tags with htmlspecialchars in private message subject</li>
<li>[Sec] Some changes to HTML handling if enabled</li>
<li>[Sec] Escape any special characters in reverse dns - Anthrax101</li>
<li>[Sec] Typecast poll id values - Anthrax101</li>
<li>[Sec] Added configurable search flood control to reduce the effect of DoS style attacks</li>
<li>[Sec] Changed the way we create "random" values for use as keys - chinchilla/Anthrax101</li>
<li>[Change] Changed handling of the case where a selected style doesn't exist in the database</li>
<li>[Change] Changed handling of topic pruning to improve performance</li>
<li>[Change] Changed default forum permissions to only allow registered users to post in new forums</li>
</ul>
 
 
<a name="2018"></a><h3 class="h3">l.iii. Changes since 2.0.18</h3>
 
<ul>
<li>[Fix] corrected index on session keys table under MS SQL</li>
<li>[Fix] added session keys table to backup</li>
<li>[Fix] delete session keys entries when deleting user</li>
<li>[Fix] changes to support MySQL 5.0</li>
<li>[Fix] changes to some of the admin files to improve efficiency and remove a potential error condition when building the menu</li>
<li>[Fix] change truncation of username length in usercp_register.php - BFUK</li>
<li>[Fix] incorrect path to avatars in admin_users.php (Bug #667)</li>
<li>[Fix] fixed get_userdata to support correct sql escaping (non-mysql dbs) - jarnaez</li>
<li>[Fix] fixed captcha for those not having the zlib extension enabled</li>
<li>[Change] Placed version information above who is online in admin panel for better visual presence</li>
<li>[Sec] fixed XSS issue (only valid for Internet Explorer) within the url bbcode</li>
<li>[Sec] fixed XSS issue if html tags are allowed and enabled</li>
<li>[Sec] added configurable maximum login attempts to prevent dictionary attacks</li>
</ul>
 
 
<a name="2017"></a><h3 class="h3">l.iv. Changes since 2.0.17</h3>
 
<ul>
<li>[Fix] incorrect handling of password resets if admin activation is enabled (Bug #88)</li>
<li>[Fix] wrong topic redirection after login redirect (Bug #94)</li>
<li>[Fix] improved handling of username lists in admin_ug_auth.php (Bug #98)</li>
<li>[Fix] incorrect removal of bbcode_uid values if bbcode has been turned off (Bug #100)</li>
<li>[Fix] correctly preview signature if editing other users posts (Bug #101)</li>
<li>[Fix] incorrect alt tag on generated search images in groupcp.php, viewtopic.php and usercp_viewprofile.php (Bug #102)</li>
<li>[Fix] consistent forum ordering in all dropdown boxes (Bug #106)</li>
<li>[Fix] correctly get compression status in page_tail.php and page_footer_admin.php (Bug #117)</li>
<li>[Fix] set page title on summary page of groupcp.php (bug #125)</li>
<li>[Fix] correctly test style and avatar in usercp_register.php (bug #129 and #317)</li>
<li>[Fix] handling of reactivation notifications if admin activation is enabled (Bug #145)</li>
<li>[Fix] handling of both forms of translation information used in language packs (Bug #159)</li>
<li>[Fix] key length for activation keys fixed in usercp_sendpassword.php (Bug #171)</li>
<li>[Fix] use GENERAL_MESSAGE constant in message_die instead of MESSAGE (Bug #176)</li>
<li>[Fix] incorrect handling of move stubs (Bug #179)</li>
<li>[Fix] wrong mode_type in memberlist (Bug #187)</li>
<li>[Fix] SQL errors when setting maximum PMs to 0 (Bug #188)</li>
<li>[Fix] removed unused variable from topic_notify email template (Bug #210)</li>
<li>[Fix] removed unset variable from smilies popup window title (Bug #224)</li>
<li>[Fix] removed duplicate template assignment from admin_board.php (Bug #226)</li>
<li>[Fix] incorrect search link for guest posts in modcp.php (Bug #254)</li>
<li>[Fix] all users removed from topics watch table on special occassions (Bug #271)</li>
<li>[Fix] correctly check returned value from strpos in append_sid function (Bug #275)</li>
<li>[Fix] correctly display username in private message notification (Bug #278)</li>
<li>[Fix] fixed "var-by-ref" errors (Bug #322)</li>
<li>[Fix] changed redirection to installation (Bug #325)</li>
<li>[Fix] added timout of 10 seconds to version check (Bug #348)</li>
<li>[Fix] fixed user_level default in postgresql schema file (Bug #444)</li>
<li>[Fix] multiple minor HTML issues with subSilver</li>
<li>[Change] deprecated the use of some PHP 3 compatability functions in favour of the native equivalents</li>
<li>[Change] added 60 days limit for grabbing unread topics in index.php</li>
 
<li>[Sec] backport of session keys system from olympus</li>
<li>[Sec] fixed email bans to use the same pattern as email validation and allow wildcard domain bans</li>
<li>[Sec] fixed validation of topic type when posting</li>
<li>[Sec] unset database password once it is no longer needed</li>
<li>[Sec] fixed potential to select images outside the specified path as avatars or smilies</li>
<li>[Sec] fix globals de-registration code for PHP5 - (Stefan Esser/Matt Kavanagh)</li>
<li>[Sec] changed avatar gallery code sections to prevent possible injection points (AnthraX101)</li>
<li>[Sec] signature field is not properly sanitised for user input when an error occurs while accessing the avatar gallery (AnthraX101)</li>
<li>[Sec] check to_username and ownership when editing a PM (AnthraX101)</li>
<li>[Sec] fixed ability to edit PM's you did not send (depablo84)</li>
<li>[Sec] compare imagetype on avatar uploading to match the file extension from uploaded file</li>
</ul>
 
<a name="2016"></a><h3 class="h3">l.v. Changes since 2.0.16</h3>
 
<ul>
<li>Added extra checks to the deletion code in privmsg.php - reported by party_fan</li>
<li>Fixed XSS issue in IE using the url BBCode</li>
<li>Fixed admin activation so that you must have administrator rights to activate accounts in this mode - reported by ieure</li>
<li>Fixed get_username returning wrong row for usernames beginning with numerics - reported by Ptirhiik</li>
<li>Pass username through phpbb_clean_username within validate_username function - AnthraX101</li>
<li>Fixed PHP error in message_die function</li>
<li>Fixed incorrect generation of {postrow.SEARCH_IMG} tag in viewtopic.php - reported by Double_J</li>
<li>Also fixed above issue in usercp_viewprofile.php</li>
<li>Fixed incorrect setting of user_level on pending members if a group is granted moderator rights - reported by halochat</li>
<li>Fixed ordering of forums on admin_ug_auth.php to be consistant with other pages</li>
<li>Correctly set username on posts when deleting a user from the admin panel</li>
</ul>
 
<a name="2015"></a><h3 class="h3">l.vi. Changes since 2.0.15</h3>
 
<ul>
<li>Fixed critical issue with highlighting - <b>Discovered and fix provided by Ron van Daal</b></li>
<li>Url descriptions able to be wrapped over more than one line again</li>
<li>Fixed bug with eAccelerator in admin_ug_auth.php</li>
<li>Check new_forum_id for existence in modcp.php - <b>alessnet</b></li>
<li>Prevent uploading avatars with no dimensions - <b>Xpert</b></li>
<li>Fixed bug in usercp_register.php, forcing avatar file removal without updating avatar informations within the database - <b>HenkPoley</b></li>
<li>Fixed bug in admin re-authentication redirect for servers not having index.php as one of their default files set</li>
</ul>
 
<a name="2014"></a><h3 class="h3">l.vii. Changes since 2.0.14</h3>
 
<ul>
<li>Fixed moderator status removal in groupcp.php</li>
<li>Removed newlines after ?&gt; on some files - <b>Thoul</b></li>
<li>Added admin re-authentication (admin needs to login seperatly to access the ACP) - backported from Olympus</li>
<li>Fixed vulnerability in url/bbcode handling functions - <b>PapaDos and Paul/Zhen-Xjell from CastleCops</b></li>
<li>Fixed issue in admin/admin_forums.php</li>
<li>Suppressed warning message for fsockopen in /includes/smtp.php - <b>Thoul</b></li>
<li>Fixed bug in admin/admin_smilies.php (admin is able to add empty smilies) - <b>Exy</b></li>
<li>Adjusted documents to reflect the urgent need to update the files too (not only running the database update script)</li>
<li>Updated the readme file</li>
<li>Added one new language variable</li>
<li>Added general error if accessing profile for a non-existent user</li>
<li>Changed session id generation to be more unique - <b>Henno Joosep</b></li>
<li>Fixed bug in highlight code to escape characters correctly</li>
<li>Reversed the 2.0.14 fix for postgresql because it produced more problems than it solves.</li>
<li>Added reference to article written by R45 about case-sensitivity in postgreSQL to the readme file</li>
<li>Fixed bypassing of validate_username on registration - Yen</li>
<li>Empty url/img bbcodes no longer get parsed</li>
</ul>
 
<a name="2013"></a><h3 class="h3">l.viii. Changes since 2.0.13</h3>
 
<ul>
<li>Hardened author and keyword search a bit to not allow very server intensive searches</li>
<li>Fixed full path disclosure in bad word parsing</li>
<li>Resetting complete userdata array in session code if authentication fails</li>
<li>Fixed bug in moderator control panel where certain parameters could lead to an "error creating new session" sql error</li>
<li>Fixed bug in session code where empty page ids could lead to an "error creating new session" sql error</li>
<li>Fixed html handling in signatures if html is turned off globally</li>
<li>Fixed install.php problem with PHP5 register_long_arrays option turned off</li>
<li>Fixed potential issues with styling system</li>
<li>Added correct class to login_body template file</li>
<li>Removed file db/oracle.php from package</li>
<li>Removed version number from message body page in /admin (if user is not an admin) - <b>mikelbeck</b></li>
<li>Fixed case-sensitivity issues in postgres7.php - <b>R45</b></li>
</ul>
 
<a name="2012"></a><h3 class="h3">l.ix. Changes since 2.0.12</h3>
 
<ul>
<li>Ommitted preg_replace warning in viewtopic due to improper working of preg_quote in PHP - originally reported by matrix_killer, fix submitted by another party</li>
<li>Fixed high severity issue in session handling allowing everyone gaining administrator rights. Please update as soon as possible.</li>
<li>Minimum requirements raised to PHP 4.0.3 or above due to fixing vulnerability issues breaking PHP3 compatibility.</li>
</ul>
 
<a name="2011"></a><h3 class="h3">l.x. Changes since 2.0.11</h3>
 
<ul>
<li>Added confirm table to admin_db_utilities.php</li>
<li>Prevented full path display on critical messages</li>
<li>Fixed full path disclosure in username handling caused by a PHP 4.3.10 bug - <b>AnthraX101</b></li>
<li>Added exclude list to unsetting globals (if register_globals is on) - <b>SpoofedExistence</b></li>
<li>Fixed arbitrary file disclosure vulnerability in avatar handling functions - <b>AnthraX101</b></li>
<li>Fixed arbitrary file unlink vulnerability in avatar handling functions - <b>AnthraX101</b></li>
<li>Removed version number from powered by line</li>
<li>Merged database update files to update_to_latest.php file</li>
<li>Fixed path disclosure bug in search.php caused by a PHP 4.3.10 bug (related to AnthraX101's discovery)</li>
<li>Fixed path disclosure bug in viewtopic.php caused by a PHP 4.3.10 bug - <b>matrix_killer</b></li>
</ul>
 
<a name="2010"></a><h3 class="h3">l.xi. Changes since 2.0.10</h3>
 
<ul>
<li>Fixed vulnerability in highlighting code (<b>very high severity, please update your installation as soon as possible</b>)</li>
<li>Fixed unsetting global vars - <b>Matt Kavanagh</b></li>
<li>Fixed XSS vulnerability in username handling - <b>AnthraX101</b></li>
<li>Fixed not confirmed sql injection in username handling - <b>warmth</b></li>
<li>Added check for empty topic id in topic_review function</li>
<li>Added visual confirmation mod to code base</li>
</ul>
 
<a name="209"></a><h3 class="h3">l.xii. Changes since 2.0.9</h3>
 
<ul>
<li>Fixed deleting of styles in admin_styles.php</li>
<li>Fixed wrong unsetting of variables introduced in phpBB 2.0.9, making the board non-functional for users with specific php.ini settings</li>
<li>Added code to let phpBB work with PHP5 for those having register_long_arrays set to off (default settings) - running phpBB 2.0.x with PHP5 is not supported at http://www.phpbb.com.</li>
<li>Fixed bug in admin_board.php for board settings having single quotes in it</li>
<li>Fixed "search by author" in search.php. Now it is possible to search for users with special chars in their name too</li>
<li>Fixed forum jumpbox propagating session id in moderator control pages</li>
<li>Added check for newlines at redirecting pages, to prevent http response splitting attacks - <b>Ory Segal and Amit Klein</b></li>
<li>Fixed visual confirmation code. The image was not created due to a wrong regular expression.</li>
</ul>
 
<a name="208"></a><h3 class="h3">l.xiii. Changes since 2.0.8</h3>
 
<ul>
<li>Fixed one vulnerability in admin_board.php - <b>Xore</b></li>
<li>Added checking for proper session id characters to sessions and viewtopic to prevent injections - <b>Bartlomiej Korupczynski</b></li>
<li>Fixed injection vulnerabilities possible with linked avatars</li>
<li>Implemented unsetting globalised variables</li>
<li>Limited confirm switch to POST variable in posting</li>
<li>Changed IP code in common.php to prevent IP spoofing, which might introduce some problems with private IP Ranges showing up. - <b>Wang Products</b></li>
<li>Updated visual confirmation mod [pre-edited files]</li>
<li>Moved obtaining word censors in modcp out of topic generation loop [increased performance/lower query count] - spotted by <b>R45</b></li>
<li>Added the ability to link to https/ftps sites using the img bbcode tag</li>
<li>Fixed user online information in admin/index.php</li>
<li>Fixed getting group moderator in groupcp.php if running oracle backend - spotted by <b>pakman</b></li>
<li>Fixed use of non-existing result variable in modcp (poster_id instead of user_id)</li>
<li>Fixed several vulnerabilities (XSS, SQL Injection and path disclosure) only possible with register_globals enabled - <b>Matthew C. Kavanagh, Janek Vind</b></li>
<li>Fixed problem with SID not delivered to next page in groupcp.php</li>
</ul>
 
<a name="207"></a><h3 class="h3">l.xiv. Changes since 2.0.7</h3>
 
<ul>
<li>Fixed several vulnerabilities in admin pages</li>
<li>Fixed sid checking code in admin/pagestart.php</li>
<li>Fixed injection vulnerabilities possible with the img bbcode tag</li>
<li>Limited allowed images in img bbcode tag to jpg, jpeg, gif and png</li>
<li>Fixed redirect problems - 2.0.7a</li>
<li>Fixed sql injection vulnerability in search - 2.0.7a</li>
<li>Fixed sql injection vulnerability in privmsg - 2.0.8a</li>
</ul>
 
<a name="206"></a><h3 class="h3">1.xv. Changes since 2.0.6</h3>
 
<ul>
<li>Fixed several vulnerabilities in modcp - <b>Robert Lavierck</b></li>
<li>Changed whois lookup address within admin index</li>
<li>Fixed potential vulnerability in viewtopic postorder - 2.0.6d</li>
<li>Updates to cope with Zend Optimizer 2.5 problems - 2.0.6d - <b>jetset</b></li>
<li>Force specialcharing of redirect variable in login - <b>Pit</b></li>
<li>Fixed potential vulnerability in viewtopic postdays - <b>GulfTech Security Research</b></li>
<li>Fixed potential vulnerability in viewforum topicdays - <b>GulfTech Security Research</b></li>
<li>Fixed potential vulnerability in modcp</li>
<li>Fixed potential vulnerability in avatar gallery</li>
</ul>
 
<a name="205"></a><h3 class="h3">1.xvi. Changes since 2.0.5</h3>
 
<ul>
<li>Fixed various email issues</li>
<li>Fixed registration email bug with Administrator Confirmation used</li>
<li>Fixed mass emailer</li>
<li>Fixed long post time issue</li>
<li>Fixed bug with usernames containing single quotes</li>
<li>Fixed word list bug - Word boundaries were not considered</li>
<li>Fixed vulnerability in style admin</li>
<li>Fixed sql injection vulnerability in viewtopic</li>
<li>Fixed vulnerability allowing server side variable access in search - <b>tendor</b></li>
<li>Fixed potential vulnerability in 2.0.5 login username entry - <b>throw away/eomer</b></li>
<li>Fixed sql injection with reset date format field in profile - <b>tendor</b></li>
</ul>
 
<a name="204"></a><h3 class="h3">1.xvii. Changes since 2.0.4</h3>
 
<ul>
<li>Removed user facing session_id checks</li>
<li>Fixed user self-activation after deactivation</li>
<li>Fixed incorrect functioning of phpbb_realpath</li>
<li>Fixed wrong path to database schema files within the upgrade script</li>
<li>Fixed double quote problem with username validation</li>
<li>Allow & within email addresses</li>
<li>Fixed email validation for banned email addresses</li>
<li>Removed underline from email domain validation</li>
<li>Fixed redirection for sentbox folder, installation and email</li>
<li>Fixed poll deletion</li>
<li>Fixed Mozilla navigation bar</li>
<li>Fixed URL bbcode parsing</li>
<li>Fixed database timeouts while searching the forums</li>
<li>Fixed wrong email return path in admin mass mailing - <b>netclectic</b></li>
<li>Fixed MS-SQL failures within the update script</li>
<li>Fixed memberlist sort order</li>
<li>Fixed not showing leading spaces within Code BBCode</li>
<li>Fixed problem with adding double quotes to subject titles</li>
<li>Remove username input field from profile when user cannot change name</li>
<li>Fixed pagination error with highlighting</li>
<li>Fixed errors if no smilies are installed</li>
<li>Fixed CSS issues with IE 5.2 on MacOS X</li>
<li>Fixed missing sid propagation problem within the Moderator Control Panel</li>
<li>Fixed language variables within Authentication error output</li>
<li>Removed doubled CSS class definitions within input fields</li>
<li>Fixed username change within the Administration Panel</li>
<li>Added missing &lt;tr&gt; tags to index_body.tpl</li>
<li>Added missing username language variable to admin index page</li>
<li>Fixed moderator status update if a usergroup got deleted</li>
<li>Fixed poll handling upon post edit</li>
<li>Fixed remove common words from search table if post get pruned - <b>Nuttzy99</b></li>
<li>Fixed behaviour on splitting topics if no checkbox is selected</li>
<li>Anonymous is no longer displayed within Username dropdown boxes</li>
<li>Fixed viewprofile redirection if an invalid mode was specified</li>
<li>Fixed fraction settings within determining common words - <b>Novan</b></li>
<li>Prevent admin change usernames to his own within the ACP</li>
<li>Activation email is sent to all admins</li>
<li>Fixed conversion of &amp; to &amp;amp; in appropriate cases</li>
<li>Fixed display of "greater than topics per page" announcements preventing display of normal posts</li>
<li>Added variable checks to database backup and restore screen</li>
<li>Prevented pm popup window from resetting after visiting avatar gallery</li>
<li>Fixed special character handling with word censor</li>
<li>Added SID to jumpbox</li>
<li>Fixed problems with usernames using html special chars</li>
<li>Added GMT + 13 to English lang_main, all translators are encouraged to do likewise</li>
<li>Deleted doubled 'U_MEMBERLIST' assignment from page_header.php</li>
<li>Fixed wrong display of Signature Checkbox while editing Private Message</li>
<li>Fixed disappearing post text if emoticon was inserted directly after pressing a BBCode button</li>
<li>Display correct alt-tag for smilies within postings</li>
<li>Prevented the ability to apply BBCode to website contents</li>
<li>Fixed maxlength issue with password field in login_body.tpl</li>
<li>Fixed possible username duplication issue with validation and username length</li>
<li>Fixed split words function to handle additional foreign characters</li>
<li>Changed empty email To Field to use a non-disclosure delimiter</li>
<li>Fixed wrong language var in install.php - FTP Config screen</li>
<li>Fixed alt tag for locked topic images in viewforum_body.tpl</li>
<li>Fixed typo in groupcp.php - $lang['Unsub_success'] instead of $lang['Usub_success']</li>
<li>Fixed timezone display</li>
<li>Fixed wrong display of author quote tag within profile - <b>Cl1mh4224rd</b></li>
<li>Added deletion of sessions of users whose account is deactivated</li>
<li>Added mail header X-MimeOLE to the emailer class</li>
<li>Prevent registration if user is logged in or user trying to register again</li>
<li>Prevent usage of char(255) in usernames</li>
<li>Added check for additional FORWARDED_FOR IP's - <b>cosmos</b></li>
<li>Fixed handling of non-selection of option when voting</li>
<li>Fixed potential xss issue with memberslist mode</li>
<li>Default English support for visual confirmation - translators are encouraged to support this</li>
</ul>
 
<a name="203"></a><h3 class="h3">1.xviii. Changes since 2.0.3</h3>
 
<ul>
<li>Fixed cross-browser scripting issue with highlight param</li>
<li>Back-ported highlighting code from phpBB 2.2</li>
<li>Add session id validation to posting, profile, email, voting - <b>Edwin van Vliet</b></li>
<li>Added {S_HIDDEN_FIELDS} template var to profile_send_email.tpl</li>
<li>Added "intval" fix for flood check, may resolve some issues</li>
<li>Added missing index to post_id for search_wordmatch</li>
<li>Fixed spelling error in search add words preventing use of stopword list</li>
<li>Fixed issue with search common words not being run</li>
<li>Introduce viewtopic resync patch by Ashe</li>
<li>Replace a for n in templating code</li>
<li>Fixed ordering in memberslist</li>
<li>Fixed group_id sequence issues with pgsql and msaccess</li>
<li>Fixed assumption of word censors in user notification</li>
<li>Fixed incorrect display of quotes in user management fields</li>
<li>Fixed entry of special chars in all profile fields - note this may cause temporary issues</li>
<li>Fixed incorrect display of quotes when using avatar gallery</li>
<li>Fixed missing username in email sent to users when admin activated</li>
<li>Added check for non-empty smiley code and url in smiley admin</li>
<li>Prevent display of -- sig seperator in emails when no board sig exists</li>
<li>Fixed URL propagated sid issues with jumpbox</li>
<li>Fixed wrong mode name check (polldelete) in functions_post</li>
<li>Added missing root path to l10n image path check</li>
<li>Remove validation of fields when deleting a user</li>
<li>Fixed sort mode select box in memberslist to default to current mode</li>
<li>Deny inline topic review listing to users without auth_read permissions</li>
<li>Prevent display of topic notification checkbox if user cannot read forum</li>
<li>Remove incorrect pre-pending of IP to uploaded avatars</li>
<li>Fixed deletion of uploaded avatars when changing to remote/gallery</li>
<li>Added check for non-blank line during install schema/basic sql ops</li>
<li>Added sort ordering to Top Ten poster listing by request</li>
<li>Fixed incorrect error report when altering case of username</li>
<li>Added jumpbox output to modcp {JUMPBOX} will now work</li>
<li>Fixed non-updating of users with MOD levels when deleting a forum</li>
<li>Remove email to group moderator when approving new members</li>
<li>Fixed non-handling of HTML in poll options</li>
<li>Fixed non-deletion of polls when deleting forum and its posts</li>
<li>Fixed moved shadow topic from being bumped upon reply</li>
<li>Changed field size of timezone to decimal(5,2) where applicable</li>
<li>Fixed missing sid append to URL when redirecting to newest reply</li>
<li>Fixed missing slashes in private IP preg check</li>
<li>Fixed session not setting userdata['user_id'] to ANON as appropriate</li>
<li>Added check for non-empty name in disallow admin</li>
<li>Fixed validation of SSL website addresses in profile</li>
<li>Fixed inability of admins to upload avatars via user admin panel</li>
<li>Fixed non-deletion of private message text upon full box overwrite</li>
<li>Fixed incorrect error message in smiley admin</li>
<li>Fixed incorrect alt-text for "Stop Watching Topic" image</li>
<li>Temporary fix for missing lang strings in forum admin - translators should update their packages if not done already</li>
<li>Use selected localisation during later stages of installation</li>
<li>Fixed non-check of permissions when deleting a topic via Moderator Control Panel</li>
<li>Fixed non-update of banlist upon user deletion</li>
<li>Check approved users boxes by default in usergroup approve form</li>
<li>Fixed non-appending of sid to backup meta refresh</li>
<li>Fixed non-notification of no support for certain databases in backup/restore</li>
<li>Added $images var to message die global declaration</li>
<li>Fixed wrong string, Private_message in Private Messaging</li>
<li>Add mail send result to error output</li>
<li>Fixed non-appending of sid to Mozilla nav bar menu items</li>
<li>Fixed incorrect profile linking from MSNM url in private messaging</li>
<li>Grammatical errors in English lang_main fixed - <b>Cluster</b></li>
<li>Allow deletion of avatar and simultaneous upload/linking/gallery selection</li>
<li>Fixed non-updating of user rank when changing from special to normal rank in rank admin</li>
<li>Changed user topic notification default in schemas to 0 (off)</li>
<li>Fixed non-XHTML compliant img tags in privmsg.php</li>
<li>Fixed non-deletion of announcements and polls when removing forum contents in forum admin</li>
<li>Fixed non-pruning of watched topics table when pruning related topics</li>
<li>Enable GET redirect on logout</li>
<li>Added check for IE6.x to viewtopic ICQ indicator javascript</li>
<li>Fixed empty username quoting with MS-SQL</li>
<li>Fixed BBCode url, magic url and img tags to allow most chars beyond domain names</li>
<li>Prevent parsing of -ve size values in BBCode size tag</li>
<li>Back ported HTML handler from 2.2, this may impact some boards which allow complex HTML - existing parser remains but commented out</li>
<li>Fixed parsing of word censors to not censor words within &lt; and &gt; tag delimiters</li>
<li>Fixed database utilities failing to backup data with MySQL</li>
<li>Fixed signature parsing in User Admin</li>
<li>Fixed missing class="post" tags in subSilver Admin templates</li>
<li>Fixes for paths under Apache2</li>
<li>Added wrap text with tag support for posting in Mozilla 1.1+</li>
<li>Fixed use of missing CSS classes in modcp_split, group_info_body, error_body and agreement</li>
<li>Fixed ability of users to edit polls even after they have received votes</li>
<li>Fixed header Location to be absolute URL as per HTTP 1.1 spec - noted by <b>PhilippK</b></li>
<li>Added additional session_id checks to MCP, topic subscription, PM and similar items</li>
<li>Fixed colour select box in posting_body to reset to Default colour after selection</li>
<li>Altered PM icon to show new image until messages have been read</li>
<li>Fixed incomplete deletion of PMs when removing the associated user</li>
<li>Fixed unread and new PM user counters to decrement appropriately in all situations</li>
<li>Fixed possible cross-site scripting issue with username search</li>
<li>Fixed some problems with gzip in combination with newer PHP versions and Mozilla</li>
<li>Fixed wrong maxlength in modcp_split.tpl subject field</li>
<li>Fixed inability to edit username of guest poster - <b>vHiker</b></li>
<li>Fixed ability for guests to post with certain registered usernames</li>
<li>Fixed various HTML issues to improve XHTML compliance - <b>Daz</b></li>
<li>Fixed missing template var {L_PM} for memberslist - <b>Daz</b></li>
<li>Fixed wrong key name for $images['Topic_un_watch'] - <b>Daz</b></li>
<li>Fixed missing template var {S_WATCH_TOPIC_IMG} for viewtopic - <b>Daz</b></li>
<li>Fixed missing default constraints for post table under MSSQL</li>
<li>Fixed incorrect field size for forum pruning - preventing days > 256</li>
<li>Fixed continuing redirect issues for broken web servers, e.g. IIS+CGI PHP</li>
<li>Fixed inability to use ftp as a protocol for the [img] tag</li>
<li>Fixed incorrect handling of [img] tags containing %20 encoded spaces</li>
<li>Added check for . within cookie_name, change to _ if present</li>
<li>Added SHOW_ONLINE constant to limit "users online" code operation to index and viewforum</li>
<li>Added "temporary" workaround for Apache2 + PHP module ignoring "private" cache header</li>
<li>Added workaround for modcp IP lookup and links to Anonymous user profile</li>
<li>Fixed broken bbcode parsing of quotes containing bbcode in the "username"</li>
<li>Fixed excess slashes in [quote=""] first pass encoding</li>
<li>Fixed rendering issue with quote button under Mozilla - <b>Daz</b></li>
<li>Grammatical errors in remaining core lang files fixed - <b>Cluster</b></li>
<li>Fixed bbcode quote breaking when username contained ] before [</li>
<li>Fixed duplicate group_id error during upgrade of users from phpBB 1.x</li>
<li>Fixed stripslashes() problem with the conversion of the config table from phpBB 1.x</li>
<li>Rejiggled validation code, may eliminate "Username disallowed" issues</li>
<li>Fixed differing initial "public" setting of forum permissions between different files</li>
<li>Added check for invalid (non-compliant) email addresses to upgrade script</li>
<li>Further redirect workarounds for broken servers, please direct further issues to the vendors</li>
<li>Added GMT + 13 to English lang_main, all translators are encouraged to do likewise</li>
<li>Added switch to default_lang email template if user lang template no longer exists</li>
<li>Fixed javascript error when selecting smiley containing a single quote</li>
<li>Update users watched topic if a post they made is split into a new topic</li>
<li>Fixed situations where email templates contain incorrect or missing subject lines</li>
<li>Fixed error when searching for posts and no forums exist</li>
<li>Fixed potential SQL vulnerability with marking of private messages - <b>Ulf Harnhammar</b></li>
</ul>
 
<a name="202"></a><h3 class="h3">1.xix. Changes since 2.0.2</h3>
 
<ul>
<li>Fixed potential cross-site scripting vulnerability with avatars - <b>Showscout</b></li>
<li>Fixed potential SQL rewrite issue in page header - <b>missing contrib</b></li>
<li>Fixed potential CSS/HTML rewrite on viewing in login - <b>Marc Rees</b></li>
<li>Fixed (hopefully) issue with MS Access and multiple pages</li>
</ul>
 
<a name="201"></a><h3 class="h3">1.xx. Changes since 2.0.1</h3>
 
<ul>
<li>Fixed missing "username" lang variable in user admin template</li>
<li>Session work around for users behind rotating IPs - <b>vHiker</b></li>
<li>Fixed potential session user_id re-write - <b>Ashe</b></li>
<li>Fixed potential cross-browser scripting issue with BBCode URLs</li>
<li>Fixed potential gallery avatar exploit - <b>Ashe</b></li>
<li>Fix sorting of smileys on each function call - <b>Ashe/psoTFX</b></li>
<li>Clear topic_mod text output in viewtopic - <b>Lars</b></li>
<li>Fix regex for avatar remote urls</li>
<li>Fix non-updating of user post counts when deleting whole topics</li>
<li>Increase time limit when sending topic reply notifications</li>
<li>Set default forum when splitting topics</li>
<li>Fix non-deletion of uploaded avatars when switching to gallery</li>
<li>Removed various closing newlines from included files</li>
<li>Add MAX_ROWS to HEAP table alter in install/upgrade - <b>Ashe</b></li>
<li>Update username maxlength for subSilver templates</li>
<li>Allow <b>(</b> and <b>)</b> in BBCode [url] tags</li>
<li>Fix non-quoting of <b>#</b> in username validation regexs</li>
<li>Fix overlooked global var in private messaging</li>
<li>Possible fix for \r\n email templates issues</li>
<li>Fix missing str_replace for category title forum admin SQL</li>
<li>Fix trailing <b>,</b> when sending emails via smtp</li>
<li>Fix avatar issues in user admin</li>
<li>Fix improper checking of email address ban in sessions</li>
<li>Fix use of hard coded language strings in forum admin</li>
<li>Fix missing closing <b>)</b> in smilies admin</li>
<li>Fix missing Username label in user admin</li>
<li>Fix upgrade.php bug where conversion would not complete (and updated other scripts to match the changes)</li>
<li>Fix problem with redirect and login.php</li>
<li>Fix typo that could cause problems with sorting in the memberlist</li>
<li>Fix emailer to allow sending emails with language-specific character sets</li>
</ul>
 
<a name="200"></a><h3 class="h3">1.xxi. Changes since 2.0.0</h3>
 
<ul>
<li>Fixed delete image bug for normal users</li>
<li>Fixed group control panel image links</li>
<li>Fixed missing L_POST variable in group control panel</li>
<li>Fixed missing user id when redirecting to email form after login</li>
<li>Fixed (a)ppend_sid function name error in group control panel</li>
<li>Fixed reset of post type when previewing a post</li>
<li>Fixed mass emailer include path error</li>
<li>Fixed potential SQL exploit</li>
<li>Fixed several minor subSilver issues</li>
<li>Fixed [quote] breaking HTML problem</li>
<li>Fixed problem with unclosed nested quotes</li>
<li>Fixed bad handling of automagic links at end of quotes</li>
<li>Fixed potential BBCode and avatar remote exploit</li>
<li>Altered email validation check to allow + in username as per RFC</li>
<li>Fixed incorrect behaviour with wildcards in disallowed usernames</li>
<li>Added missing append_sid for search view results as posts</li>
<li>Fixed incorrect clearing of current sessions for logged in users</li>
<li>Fixed user_timezone (cannot update user profile) problem</li>
<li>Added correct setting of moderator status for users during upgrade</li>
<li>Fixed handling of uploaded avatars if gallery avatar currently used</li>
<li>Fixed use of existing username for uploaded avatars</li>
<li>Fixed updating of topic reply stats when post is deleted</li>
<li>Fixed irrelevant error message when activating already active account</li>
<li>Fixed gzip compression problems with Netscape and some PHP versions</li>
<li>Fixed MS Access layer errors when using latest PHP versions</li>
<li>Fixed styles admin editing problems with MSSQL Server</li>
<li>Fixed logout issue when cancelling certain actions</li>
<li>Fixed missing text in certain admin links</li>
<li>Fixed opening of frame within frame when logging into admin</li>
<li>Fixed incorrect ordering of search results by time</li>
<li>Fixed fulltext searching failure with MS Access</li>
<li>Hopefully fixed fulltext search with non-latin single byte charsets</li>
<li>Enabled work-around support for some multi-byte charsets - <b>OOHOO</b></li>
<li>Re-enabled search indexing of all-numeric character sequences</li>
<li>Updated email banning to properly implement wildcards</li>
<li>Fixed missing extension in links from groupcp</li>
<li>Fixed lack of re-validation when changing email address</li>
<li>Added additional IP check when using HTTP_X_FORWARDED_FOR</li>
<li>Fixed non-display of delete icon when on second or greater topic page</li>
<li>Fixed problems with users/groups assigned multiple permissions</li>
<li>Fixed problem with - and + in search words - <b>Matthijs</b></li>
<li>Fixed improper handling for deletion of words from search table</li>
<li>Fixed support for <b>,</b> in automagic URLs as per RFC</li>
<li>Fixed circular reference SQL errors when deleting posts under MS Access</li>
<li>Fixed nested [code] problems</li>
<li>Added charset encoding headers for emails - <b>romutis</b></li>
<li>Fixed "Copy to self" emails to use correct language</li>
<li>Fixed pagination error when limiting previous days for viewforum</li>
<li>Decreased minimum search word size to 3 chars</li>
<li>Fixed deletion of one or more options from all polls when editing just one</li>
<li>Fixed checking of group memberships when promoting/demoting group moderators</li>
<li>Added database closure to admin frameset page</li>
</ul>
 
<a name="final"></a><h3 class="h3">1.xxii. Changes since RC-4</h3>
 
<ul>
<li>Fixed improper report of general error when posting messages containing errors</li>
<li>Fixed post text being doubled up if it contained one or more &lt; without closing &gt;</li>
<li>Fixed pruning errors due to search function name change</li>
<li>Hopefully fixed various issues which led to incorrect reply and excess page counts</li>
<li>Fixed groupcp not displaying all email buttons to group moderator or admin</li>
<li>Fixed failure to display error notice when uploading oversized avatars</li>
<li>Hopefully corrected problem with viewonline displaying too few/many users online</li>
<li>Partially addressed issue with activation URLs >76 chars</li>
<li>Fixed additional search facilities failing to work or working incorrectly</li>
<li>Fixed search syntax highlighting</li>
<li>Addressed various webservers handling of page redirects</li>
<li>Fixed word censor not replacing first or last words</li>
<li>Fixed avatar height and width check for locally uploaded images</li>
<li>Hopefully fixed cache control header</li>
<li>Added check for PM box size limit of 0 to prevent div0 error</li>
<li>Fixed failure to fully delete PMs in outbox</li>
<li>Fixed display problem with polls</li>
<li>Fixed problem with guest username not being displayed for topic results in search</li>
<li>Fixed problem with quotes in various profile fields</li>
<li>Fixed schema problem with user_timezone</li>
<li>Fixed page display issue with MS Access</li>
<li>Fixed user level issue when altering user from user to admin and vice versa</li>
<li>Fixed incorrect parseing of some email templates</li>
<li>Reduced size of MS Access primer</li>
<li>Fixed various remaining usergroup display issues</li>
</ul>
 
<a name="rc4"></a><h3 class="h3">1.xxiii. Changes since RC-3</h3>
 
<ul>
<li>Addressed serious security issue with included files</li>
<li>Fixed non-use of database table prefix name during upgrade</li>
<li>Split functions and profile into separate modules</li>
<li>Fixed (hopefully) remaining issues with colourisation of moderator usernames</li>
<li>Updated install to include entry of additional, required, information</li>
<li>Fixed (hopefully) AOL incompatibilities</li>
<li>Fixed non-display of moderators in index/viewforum</li>
<li>Fixed group control panel 'no groups exist' problems</li>
<li>Fix HTTP_X_FORWARDED_FOR spoofing possibility</li>
<li>Fix ignoring of private range IP's in HTTP_X_FORWARDED_FOR</li>
<li>Enable multiple wildcard email banning, eg. *name*@somewhere.tld</li>
<li>Fix problems with posts being truncated if containing &lt; and &gt; characters</li>
<li>Prevent URL, BBCode and most smiley parseing in [code][/code]</li>
<li>Fix problems with use of certain reserved chars in word censor list</li>
<li>Fix default search useage to be as described (was doing AND by default)</li>
<li>Fix various avatar issues with profile, gallery and viewtopic</li>
<li>Enable safe mode support for uploading avatars</li>
<li>Fix broken modcp IP view issue</li>
<li>Fix potential session_id re-write vulnerability</li>
<li>Finish localisation of days and months (AM/PM are not and will not be localised in 2.0)</li>
<li>Remove link to external subSilver stylesheet from default subSilver templates</li>
<li>Handle TRANSACTIONS correctly in MySQL 3.x (by returning correct responses)</li>
<li>Fix checkbox resetting problem while previewing posts</li>
<li>Fix a login redirect issue</li>
<li>Remove some additional unused fields during upgrade</li>
<li>Fix (hopefully) remaining ICQ overlay issue with view profile in subSilver</li>
</ul>
 
<a name="rc3"></a><h3 class="h3">1.xxiv. Changes since RC-2</h3>
 
<ul>
<li>Fixed infamous install parse error</li>
<li>Major update of posting and related search functions (fixing various issues and increasing speed)</li>
<li>Fixed display of author and last poster names when both are different guest users</li>
<li>Fixed upgrade stall issues (hopefully!) and improved output</li>
<li>Fixed highlighting code for viewtopic and search</li>
<li>Reduced size of several files and functions</li>
<li>Moved localised images to sub-directories</li>
<li>Improved user feedback of disallowed usernames</li>
<li>Fixed various MSSQL bugs</li>
<li>Fixed installation of MSSQL/MSSQL-ODBC</li>
<li>Fixed security issue with upgrade.php</li>
<li>Finished implemention of various additional features</li>
<li>Fixed various user, group and forum permissions problems</li>
<li>Fixed issues with BBCode [ and ] (hopefully!)</li>
<li>Fixed autologin problems with MS IIS</li>
<li>Hopefully fixed problems with URIs in emails on some server configs</li>
<li>Fixed 'blank' profile and DB utilities problems on submit</li>
<li>Fixed incorrect language being used in email subjects</li>
<li>Fixed issues with incorrect private message new/unread counts</li>
<li>Fixed various PostgreSQL related errors</li>
<li>Automatically forward users to login screen in more situations</li>
<li>AEnabled (coloured) online indication of moderators and admins</li>
<li>Enabled maximum online user count</li>
<li>Altered online user count to ignore duplicate IPs (will now underestimate rather than overestimate)</li>
<li>Enabled viewing of users browsing each forum</li>
<li>Fixed (hopefully) display of overlayed ICQ icon in Netscape using subSilver</li>
<li>Fixed display of guest usernames for last post and author</li>
<li>Hidden usergroups are now completely hidden from view</li>
</ul>
 
<a name="rc2"></a><h3 class="h3">1.xxv. Changes since RC-1</h3>
 
<ul>
<li>Fixed numerous PostgreSQL related issues</li>
<li>Significant updates and additions to the upgrade script</li>
<li>Various (missed) hard coded language strings fixed</li>
<li>Fixed viewforum error when no forum id specified</li>
<li>Fixed old constant name useage in search system</li>
<li>Fixed display of moved posts when viewing unanswered posts</li>
<li>Fixed failure of search for user and keyword when displaying as posts</li>
<li>Fixed PM popup notification</li>
<li>Fixed view more emoticon session page problem</li>
<li>Fixed view profile email links</li>
<li>Fixed display of websites in profile</li>
<li>Fixed backup database failure</li>
<li>Fixed MS Access schema error when posting topics</li>
<li>Fixed problem with hypenated/dotted DB names in MySQL 3.23.6+</li>
<li>Various other fixes and updates</li>
</ul>
 
<a name="rc1"></a><h3 class="h3">1.xxvi. Changes since RC-1 (pre)</h3>
 
<ul>
<li>Upgrade script completed for initial fully functional release</li>
<li>Sessions code updated</li>
<li>Mark read code updated and hopefully fixed</li>
<li>Significant changes to properly deal with \' for non-MySQL boards</li>
<li>mssql, msaccess and mssql-odbc DB classes re-written</li>
<li>Avatar issues addressed and fixed</li>
<li>Search (INSERT) bug using MySQL fixed</li>
<li>Search highlighting issues addressed</li>
<li>Search own/other users posts fixed</li>
<li>BBCode fixes for magic URIs and other issues</li>
<li>Template updates for subSilver</li>
<li>User and group permissions problems fixed</li>
<li>Forum management problems (deletion of forum causing category not to display) fixed</li>
<li>Pagination problem with groupcp fixed</li>
<li>Backslash issues with posting and profile fixed</li>
<li>Backslash issues with emails fixed</li>
<li>preg_quote problems fixed</li>
<li>User management updated with full avatar control and missing fields</li>
<li>Private messaging box limits fixed</li>
<li>Private messaging ?folder= strangeness fixed</li>
<li>Forum pruning code updated to cope with search system</li>
<li>Emoticon system in posting updated</li>
<li>BBCode FAQ link added to posting form</li>
<li>Language file updates to address concerns of translators</li>
<li>Various other bug fixes and updates</li>
</ul>
 
<p>Note that a full list of fixed bugs can be found at the bug tracker (see section on bug reporting <a href="README.html#bugs">here</a>)</p>
 
<a name="disclaimer"></a><h2 class="h2"><u>2. Copyright and disclaimer</u></h2>
 
<p>This application is opensource software released under the <a href="http://www.gnu.org/licenses/gpl.html" target="_new">GPL</a>. Please see source code and the Docs directory for more details. This package and its contents are Copyright © 2002 <a href="http://www.phpbb.com/" target="_new">phpBB Group</a>, All Rights Reserved.</p>
 
<!-- END DOCUMENT -->
</td>
</tr>
</table></td>
</tr>
</table>
 
</body>
</html>
/Forum/docs/COPYING
0,0 → 1,281
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
 
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
 
Preamble
 
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
 
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
 
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
 
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
 
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
 
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
 
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
 
The precise terms and conditions for copying, distribution and
modification follow.
 
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
 
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
 
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
 
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
 
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
 
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
 
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
 
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
 
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
 
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
 
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
 
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
 
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
 
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
 
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
 
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
 
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
 
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
 
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
 
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
 
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
 
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
 
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
 
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
 
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
 
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
 
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
 
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
 
NO WARRANTY
 
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
 
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
 
END OF TERMS AND CONDITIONS
 
/Forum/docs/FAQ.html
0,0 → 1,208
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>phpBB 2.0.x :: FAQ</title>
<link rel="stylesheet" href="../templates/subSilver/subSilver.css" type="text/css" />
<style type="text/css">
<!--
p,ul,td {font-size:10pt;}
h2 {font-size:15pt;font-weight:bold;}
h3 {font-size:12pt;}
//-->
</style>
</head>
<body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#006699">
 
<table width="100%" border="0" cellspacing="0" cellpadding="10" align="center">
<tr>
<td class="bodyline"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
 
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../templates/subSilver/images/logo_phpBB.gif" border="0" alt="phpBB 2 : Creating Communities" vspace="1" /></a></td>
<td align="center" width="100%" valign="middle"><span class="maintitle">phpBB 2.0.x FAQ</span></td>
</tr>
</table>
 
<!-- BEGIN DOCUMENT -->
<p>This is a very basic Frequently Asked Questions (FAQ) page which attempts to answer some of the more commonly asked questions. It is by no means exhaustive and should be used in combination with the 'built-in' User FAQ within phpBB2, the community forums (particularly the Tutorials forum) and our IRC channel (see <a href="README.html">README</a> for details).</p>
 
<ol>
 
<li><b>I cannot install this it is too difficult! Will you do it?</b></li>
 
<p>Simple answer, no we will not. We are not being difficult when we say this we are actually trying to help you. phpBB has a reputation for being easy to install, that reputation is we believe well deserved. It is a simple process of unarchiving a single file, uploading the resulting directory/files to their intended location and entering some data in a web based form. The sequence of events, what to type where, etc. is covered in detail in the accompanying <a href="INSTALL.html">INSTALL.html</a> documentation. If you cannot install phpBB 2.0.x the chances are you will be unable to administer or update it.</p>
 
<p>There are people, companies (unrelated to your hosting provider), etc. that will install your forum, either for free or for a payment. We do not recommend you make use of these offers. Unless the service is provided by your hosting company you will have to divulge passwords and other sensitive details. If you did not know how to use an ATM would you give a passer-by your bank card and PIN and ask them to show you what to do? No, probably not! The same applies to your hosting account details!</p>
 
<p>We think a better solution is for you to carefully read the enclosed documentation, read our tutorials forum at www.phpbb.com and if necessary ask for help on any thing you get stuck on. However, the decision is yours but please note we may not offer support if we believe you have had the board installed by a third party. In such cases you should direct your questions to that company or person/s.</p>
 
<li><b>How do I install this board on Lycos/coolfreepages/other free host?</b></li>
 
<p>The old addage "You get what you pay for" is particularly true for hosting services! However if you must use a free service (and recognise its limitations) you will find details on common pitfalls in our tutorials forum at <a href="http://www.phpbb.com/phpBB/">http://www.phpbb.com/phpBB/</a>.</p>
 
<li><b>I am having problems with the admin at a certain board, help!</b></li>
<li><b>A board has ripped off my graphics/software/etc., stop them!</b></li>
<li><b>A board is dealing in warez/porn/etc., you need to prevent them doing this!</b></li>
 
<p>We provide the software, we have absolutely nothing to do with any board that runs it (beyond phpbb.com of course!). The GPL grants the user an unlimited right of use subject to their adherence of that licence. Therefore we cannot prevent, dictate, control or otherwise limit the use of phpBB 2 software. So please do not contact us for such matters.</p>
 
<p>If you have a problem with a given board please take it up with them, not us. We are not and cannot be held legally responsible for any third party use of this software (much like Microsoft et al cannot be held responsible for the use of Windows in illegal activities, etc.). Additionally we do <b>not</b> track the use of phpBB software in any way. So please do not ask us for details on a "given" board we will not be able to help you. If any law firms or lawyers out there send us writs, Cease and Desist orders, etc. for third party website use of this software we reserve the right to charge for time wasted dealing with such issues ...</p>
 
<li><b>According to viewonline a user is doing/reading something they should not be able to!</b></li>
 
<p>No, they probably are not. phpBB uses sessions to keep track of users as they move between pages. The session information tells us who this user is. Therefore in order to determine what a user can do on a page we first need the session details. Once this data is available we can check whether the user is permitted to do whatever it is they are trying to do. This can result in it appearing as if a user is reading a topic in a forum they should not be able to access. Or perhaps viewing private messages when they are only guests, etc. In practice the user is not doing these things, they are viewing a "You are not permitted to do this" type message. The session data has simply been updated before we were able to determine what the user could or could not do.</p>
 
<p>Of course this only applies where permissions have been set correctly!</p>
 
<li><b>I keep getting Mail sending errors when I (or my users) post/send PM's/etc.!</b></li>
 
<p>This error will occur if phpBB cannot send mail. phpBB can send email two ways; using the PHP mail() function or directly via SMTP. Some hosting providers limit the mail() function to prevent its use in spamming, others may rename it or limit its functionality. In either case you may need to make use of SMTP. This requires that you have access to such a facility, e.g. your hosting provider may provide one (perhaps requiring specific written authorisation), etc. Note that if your provider requires authorisation we only support the simple AUTH method using plaintext username/password. We do not support secure sockets layer (SSL), POP3 send or any other method. Please see <a href="http://www.phpbb.com/phpBB/" target="_blank">http://www.phpbb.com/phpBB/</a> for additional help on this matter.</p>
 
<p>If you do require SMTP services please do not ask (on our forums or elsewhere) for someone to provide you with one. Open relays are now things of the past thanks to the unthinking spammers out there. Therefore you are unlikely to find someone willing to offer you (free) services.</p>
 
<li><b>My users are complaining that emails are not in their selected language!</b></li>
 
<p>You must have deleted a language pack or the language pack is incomplete. phpBB will try to send emails in the users selected language. If it cannot find a suitable email template it will switch to the boards default language.</p>
 
<li><b>The first four letters of my text disappeared when I hit submit!</b></li>
 
<p>Some forms in phpBB make use of arrays to "post" or submit data, e.g. polls, forum management, etc. A bug exists in PHP 4.2.3 (and perhaps older versions) which can cause such data to lose the first four characters of text. This bug is related to the presence of the mbstring module and certain compile time parameters (the problem exists for both compiled in and modular version of mbstring). Please see: <a href="http://bugs.php.net/bug.php?id=19460" target="_blank">http://bugs.php.net/bug.php?id=19460</a> for more details. Note the bug is fixed in PHP CVS and thus future versions should be immune. Remember, this is <b>not</b> a bug in phpBB 2.</p>
 
<li><b>My AOL based users keep getting logged out!</b></li>
 
<p>phpBB2 uses sessions to keep track of users as they browse the board. These sessions use a combination of a unique session id and the users IP to identify each user. We make use of the IP as an extra safe-guard to help prevent sessions being hijacked (by discovering the unique session id).</p>
 
<p>Unfortunately this only works when the users IP is constant as they browse the board. For most users this will be the case. However certain providers route their users via a cluster of proxys. In some cases, particularly AOL this results in different IPs being forwarded as the user moves between pages. We take account of this by not checking the entire IP but only the first "three quads". Again in most cases this will be fine. However again AOL uses IPs which can vary so much that checking only the first two quads results in a fairly static IP being available for session validation.</p>
 
<p>If you are experiencing problems related to this you can make a small change to the code. Please note that reducing the IP validation length does potentially increase the risk of sessions being hijacked (this is something for you to consider, phpBB Group takes no responsibility should anything happen!). The change requires you to open the file sessions.php in the includes/ directory of the distribution. Find line 250, it contains the following <pre>$ip_check_s = substr($userdata['session_ip'], 0, 6);</pre>change this to: <pre>$ip_check_s = substr($userdata['session_ip'], 0, <b>4</b>);</pre>You need to make exactly the same change to the number 6 in the next line. Save the file (and upload it if required). This should reduce or eliminate the problem noted.</p></li>
 
<li><b>I selected X for my timezone but the time is not correct!</b></li>
 
<p>I suspect the time is correct but that you may have switched (locally) to daylight savings time. At present we do not support daylight savings only standard local times. Therefore during summer months (depending on whether your nation/state switches to daylight savings) the board times may appear to be <b>one hour</b> behind the <i>real</i> local time. The solution is to either put up with it (just let your users know) or to move the timezone of everyone who is affected (remember that not all your users may be from nations who have switched to daylight savings) on one hour, eg. GMT becomes GMT+1. This requires running some SQL and you should search our forums for information.</p>
 
<p>If this is not the case then I suspect your servers time is at fault. phpBB 2 stores all times in the form of a unix timestamp. This is a 32bit integer value containing the number of seconds since the unix epoch event, 1st January 1970 00:00:00 GMT. This value is global in nature and will be the same wherever you are in the world. So, if your time is incorrect and you have selected the appropriate timezone chances are your server time is off.</p></li>
 
<li><b>I am seeing &amp;#nnnn; sequences output instead of what I typed!</b></li>
 
<p>To enable compliance with HTML and XHTML specifications as well as enabling browsers to automatically support a users selected language we enable a <i>charset</i> tag to be output to the browser. This identifies the primary character set the user has selected, eg. iso-8859-1 for Western European languages (English, German, French, etc.), windows-1251 for Cyrillic alphabets (Russian, Bulgarian, etc.) and so on. The downside to doing this is that most modern browsers (such as Internet Explorer) convert any character not present in that character set into what are termed <i>Numerical Character References</i> or NCR's. These take the form of &amp;#nnnn; where nnnn is the hexadecimal number of that characters UNICODE reference.</p>
 
<p>Unfortunately PHP (which effectively supports only iso-8859-1 at this time) does not appear to attempt to process this data back into normal characters. Therefore phpBB treats them as text the user has entered and wishes to <i>see</i>. phpBB enables this by turning the &amp; into &amp;amp;. This results in the characters appearing as they do. Although we could ignore &amp;#nnnn; (there are pro's and of course con's to doing so) at present we don't.</p>
 
<p>If you are finding this to be problem the solution is to remove the <pre>charset={S_CONTENT_ENCODING}</pre> text from <b>all</b> the _header.tpl template files in all templates. The downside to this is a users browser will not automatically switch its charset to that selected by the user (however this is unlikely to be a big problem since users typically run their browser by default in the language they wish to use). Alternatively you can modify the $lang['ENCODING'] entry in the appropriate language file. Until PHP (and all browsers!) trully support UNICODE these problems will persist across all boards.</p></li>
 
<li><b>I cannot search for certain words!</b>
 
<p>phpBB 2 uses a Fulltext search system, this has both advantages and disadvantages. The advantage is that on large or busy forums it has far less impact on server load than <i>standard</i> search methods as used by many alternative forums (including phpBB 1.x). The disadvantage is that to reduce the size of the database (every post is examined and unique words stored in a table) we have to limit the size and type of words we store. By default words must contain at least three characters but no more than 25, they must be either alpha or combinations of alpha and numerals (numbers alone are not stored). In addition all non-alphanumeric characters are removed, eg. _, +, -, etc. This is standard practice for fulltext search solutions.</p>
 
<p>A further downside is that non-latin alphabets, eg. Cyrillic, Greek, etc. require proper locale support to be compiled in and available on the server your board is running on. If this is not the case it is quite likely that words will not be properly indexed for storage. In many cases this can be recified by altering the setlocale(LC_ALL, '[LOCALE_HERE]'); statement in the appropriate language file. If you are experiencing problems you should change whatever is currently in place of [LOCALE_HERE] with the locale as available on your server. If you do not know this please ask your hosting provider. Some examples may be ru_RU.WIN_CP_1251 for the codepage used for the Russian translation, ko.KOI8 for Korean, etc.</p>
 
<p>Please note that support for multibyte character sets remains very limited in PHP4 and therefore Japanese, Chinese, etc. may have difficulty getting the fulltext search working correctly at all.</p>
 
<li><b>My screen is filled with errors when I try to view the forum!</b>
 
<p>Are they errors? Are you sure they are not warnings? They probably are ... What you're seeing is PHP warn you about unset variables. Great care has been taken with phpBB 2.0 to ensure it is secure. Unset variables while being a potential security risk really shouldn't be in 2.0. Unfortunately some hosting providers have decided that any unset variables equal security problems and force PHP to output these warnings even though phpBB 2.0 is set to ignore them.</p>
 
<p>We have worked some way toward checking and/or setting all variables before use but this will take time to complete (if it can be). Therefore I am afraid for the time being you will have to manually modify the code or ask your hosting provider to be more realistic with their setup.</p></li>
 
<li><b>How do I use the avatar settings?</b>
 
<p>There are three types of avatar; upload, remote and local.</p>
<p><ul>
<li>Upload types require you to create a directory (the default is images/avatars) and to set this to public read/write (ie. chmod a+rw), users can then upload avatars (subject to width, height and size limits definable by you).</li>
<li>Remote avatars allow the user to supply a URI pointing to an image available on the internet, <b>PLEASE NOTE</b> that size limits do not apply to remote avatars!</li>
<li>Local avatars allow you to upload your own avatars to a set directory, users can then pick from this avatar gallery. The default location for this is images/avatars/gallery. PLEASE NOTE that avatars are categorised according to sub-folders in this location! ie. you <b>MUST</b> place your avatars in subdirectories, eg. images/avatars/gallery/cartoons, images/avatars/gallery/real-life, etc.</li>
</ul></p></li>
 
<li><b>No matter what I set the uploadable avatars to I cannot upload one from my computer!</b>
 
<p>There are two possibilities here, the first is you have not created the directory you specified as the storage location for avatars, ie. as specified in the Admin->General Configuration->Avatars section. If the directory does not exist uploadeable avatars are automatically disabled. You should create the required directory (ensuring it has global write access or other appropriate permissions to allow the webserver to write files to it).</p>
 
<p>The second possibility is that your provider has disabled file_upload support, possibly because of a recently found serious security issue with PHP before version 4.1.2. You should contact your provider and ask them if this is the case. It may be unrelated to the security issue and your provider has simply decided to disable such things in general. In either case I'm afraid there is not a lot you can do, there are still three other avatar settings left to choose from including uploading via a URL which will work fine</p></li>
 
<li><b>I just cannot get gallery avatars to appear!</b>
 
<p>Chances are you have not followed our instructions above. phpBB 2 categorises gallery avatars and it does this by reading through folders contained in the location you specified as being the gallery path. For example, if you set the gallery path to "images/avatars/gallery" phpBB 2 will expect to find a series of folders within that path, eg. "images/avatars/gallery/moviestars", "images/avatars/gallery/cartoons", "images/avatars/gallery/misc", etc. Placing images directly in "images/avatars/gallery/" will result in nothing being listed in your gallery.</p></li>
 
<li><b>How do I set forum permissions?</b>
 
<p>You set forum permissions from the administration control panel -> Forums -> Permissions. This system has two modes of operation; Simple and Advanced. Simple uses a set of pre-defined authorisation levels, these set each type of authorisation setting to a specific level. Advanced settings allow you to specify individual levels for each operation in each forum. Experiment!</p></li>
 
<li><b>How do I set user and group permissions?</b>
 
<p>These are set from Admin -> Users (Groups) -> Permissions. The system may appear strange but it's very powerful. When you look up a user or group it will give you basic information (at the top of the page) followed by the available forum listing and current settings for this user. You can assign moderator status to users and groups and if you have PRIVATE forums (or forums with any of their individual operations set to PRIVATE) you can also assign access.</p></li>
 
<li><b>How do I set a user (group) as moderator?</b>
 
<p>See above</p></li>
 
<li><b>Why are there no entries in the user (group) permission "Allow Access" column?</b>
 
<p>You can only allow (or deny) users access to PRIVATE forums, or forums which have one or more operations set to PRIVATE</p></li>
 
<li><b>How come I cannot set "Vote" to ALL?</b></li>
 
<p>phpBB does not by default allow guest voting. This was done to prevent guest users (who cannot be reliably tracked) from voting time and time again in the same poll. There is a Mod available if you really need this feature, please see our Mod forums at <a href="http://www.phpbb.com/phpBB/">http://www.phpbb.com/phpBB/</a>.</p>
 
<li><b>I (or my users) cannot stay logged in to the forum!</b>
 
<p>If you (or your users) are, after attempting a login, being returned to the index (or other page) without appearing to be logged in the most likely problem is incorrect cookie settings. phpBB 2 uses cookies to store a session id and a small amount of user data. For this data to be stored correctly the cookie domain, path and secure settings must be correct. You can check this in Admin->General Configuration->Cookie settings. Typically the cookie domain can be left blank and the cookie path set to / (a single forward slash). Do <b>not</b> set the cookie as being secure unless your board is running over a secure sockets layer connection, ie. https://</p>
 
<p>If you still have problems try setting the cookie domain to your full domain name, eg. www.mysystem.tld, www.something.mydomain.tld. You <b>must</b> ensure the domain name contains at least two dots or browsers will be unlikely to recognise the cookie, eg. .mydomain.com, mydomain.com. Do <b>not</b> add http:// or anything else to the domain name!</p></li>
 
<li><b>My users are complaining about being logged out too quickly!</b>
 
<p>You can increase the default length of sessions (ie. how long before a users session is considered 'dead') in Admin->General->Configuration->Cookie Settings->Session Length. Set it to whatever value your users feel comfortable with, remember that security issues may affect your decision (ie. having too long a session may allow non-users to abuse your board should a user forget to logout or otherwise leave a current session on a public workstation).</p></li>
 
<li><b>I am having problems with HTML!</b>
 
<p>If you want to allow your users to make use of HTML in posts you need to do two things. Firstly enable HTML in Admin -> General -> Configuration. Secondly to need to make sure that the tags your users will post are in the Allowed HTML Tags field (again Admin -> General -> Configuration). If users post using tags not on this list they won't be displayed as HTML! eg. to enable someone to post Flash you could add the embed tag to this field. Be careful which tags you allow, it is very easy to break the boards own output if the wrong tags are used in posts. </p></p></li>
 
<li><b>Can I suggest a feature for phpBB 3.0?</b>
 
<p>No, the feature list for phpBB 3.0 is now frozen and no new features will be added to that list. At the moment we do not accept new feature requests.</p>
<!--
You may however add requests for the next release after that, 3.2, in our feature tracker:</p>
 
<p><a href="http://sourceforge.net/tracker/?atid=580201&group_id=7885&func=browse" target="_new">http://sourceforge.net/tracker/?atid=580201&group_id=7885&func=browse</a></p>
 
<p>Before submitting your idea please <b>ensure</b> you have read through the entries in that list. If your idea is similar to an existing one please feel free to add a comment to it. Please <b>do not</b> submit duplicate suggestions!</p>
 
<p>We make no promises to the inclusion of features but we will endeavour to introduce the most requested or most interesting ones.</p></li>
//-->
<p>If you wish to follow the progress of phpBB 3.0 you may like to visit our development forum to see how things are progressing:</p>
 
<p><a href="http://area51.phpbb.com/phpBB/" target="_new">http://area51.phpbb.com/phpBB/</a></p>
 
<p>Please note that this forum should <b>NOT</b> be used to obtain support for or ask questions about phpBB 2.0.x, the main community forums are the place for this. Any such posts will be locked and go unanswered.</p>
 
<li><b>Why is phpBB 1.x faster than phpBB 2.0?</b>
 
<p>The original phpBB 1.0 saw a very large decrease in page generation times from version 1.0/1.2 to 1.4. This was achieved by rewriting many of the SQL queries and splitting the database. These changes came about from work on phpBB 2.0. With phpBB 2.0 we have introduced numerous additional functions and features, not least of which is full templating (the separation of page design from code). This results in a slowdown from phpBB 1.4, we suspect though that the new features will outweigh the small difference in page generation times.</p></p></li>
 
 
<li><b>My question isn't answered here!</b>
 
Feel free to search our community forum for the information you require. <b>PLEASE DO NOT</b> post your question without having first used search, chances are someone has already asked and answered your question. You can find our board here:</p>
 
<p><a href="http://www.phpbb.com/phpBB/" target="_new">http://www.phpbb.com/phpBB/</a></p></li>
 
</ol>
 
<h2><u>Copyright and disclaimer</u></h2>
 
<p>This application is opensource software released under the <a href="http://www.gnu.org/licenses/gpl.html" target="_new">GPL</a>. Please see source code and the Docs directory for more details. This package and its contents are Copyright © 2002 <a href="http://www.phpbb.com/" target="_new">phpBB Group</a>, All Rights Reserved.</p>
<!-- END DOCUMENT -->
 
</td>
</tr>
</table></td>
</tr>
</table>
 
</body>
</html>
/Forum/docs/INSTALL.html
0,0 → 1,259
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>phpBB 2.0.x :: Install</title>
<link rel="stylesheet" href="../templates/subSilver/subSilver.css" type="text/css">
<style type="text/css">
<!--
p,ul,td {font-size:10pt;}
.h2 {font-size:15pt;font-weight:bold;color:red}
.h3 {font-size:12pt;color:blue}
//-->
</style>
</head>
<body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#006699">
 
<table width="100%" border="0" cellspacing="0" cellpadding="10" align="center">
<tr>
<td class="bodyline"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
 
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../templates/subSilver/images/logo_phpBB.gif" border="0" alt="phpBB 2 : Creating Communities" vspace="1" /></a></td>
<td align="center" width="100%" valign="middle"><span class="maintitle">phpBB 2.0.x INSTALL</span></td>
</tr>
</table>
 
<!-- BEGIN DOCUMENT -->
<p align="center"><b>Please read this document completely before proceeding with installation.</b></p>
 
<p>Please note these instructions are not fully comprehensive, a more thorough userguide will be available on the phpBB website in the near future. However, this document will walk you through the basics on installing the forum software.</p>
 
<p>A basic overview of running phpBB 2.0.x can be found in the accompanying <a href="README.html">README</a> documentation. Please ensure you read that document in addition to this! For more detailed information on using phpBB 2 you should read <a href="http://www.phpbb.com/support/guide/" target="_new">Userguide</a> now available online.</p>
 
<ol>
<li><a href="#quickinstall">Quick Install</a></li>
<li><a href="#require">Requirements</a></li>
<li><a href="#install">New Installations</a></li>
<ol type="i">
<li><a href="#fileext">Changing the file extension</a></li>
<li><a href="#phpBB1x">Replacing an old phpBB 1.x install</a></li>
<li><a href="#nonaccess">Installing on MySQL 3 and 4, PostgreSQL 7.x, MS SQL 7/2000 (inc. via ODBC)</a></li>
<li><a href="#access">Installing on MS Access 2000/XP</a></li>
<li><a href="#requireddata">Entering required data</a></li>
<li><a href="#completeinstall">Completing installation</a></li>
</ol>
<li><a href="#upgrade1.x">Upgrade from phpBB 1.4.x</a></li>
<li><a href="#upgradeb1">Upgrade from phpBB 2.0 beta-1</a></li>
<li><a href="#upgradeRC">Upgrade from previous Release Candidate versions of phpBB 2</a></li>
<ol type="i">
<li><a href="#langtempchanges">Changes in language pack format and templates</a></li>
</ol>
<li><a href="#upgradeSTABLE">Upgrade from stable releases of phpBB 2.0.x</a></li>
<ol>
<li><a href="#upgradeSTABLE_full">Full package</a></li>
<li><a href="#upgradeSTABLE_files">Changed files only</a></li>
<li><a href="#upgradeSTABLE_patch">Patch file</a></li>
<li><a href="#upgradeSTABLE_all">All package types</a></li>
</ol>
<li><a href="#postinstall">Important (security related) post-Install tasks for all installation methods</a></li>
<ol type="i">
<li><a href="#avatars">Uploadable avatars</a></li>
<li><a href="#safemode">Safe Mode</a></li>
<li><a href="#extras">Optional extras</a></li>
</ol>
<li><a href="#disclaimer">Disclaimer</a></li>
</ol>
 
<a name="quickinstall"></a><h2 class="h2"><u>1. Quick Install</u></h2>
 
<p>If you have basic knowledge of using FTP and are sure your hosting service or server will run phpBB 2 you can use these steps to quickly get started. For a more detailed explanation you should skip this and go to <a href="#require">section 2</a> below.</p>
 
<ol>
<li>Decompress the phpBB 2 archive to a local directory on your system.</li>
<li>Upload all the files contained in this archive (retaining the directory structure) to a web accessible directory on your server or hosting account.
<li>Change the permissions on config.php to be writeable by all (666 or -rw-rw-rw- within your FTP Client)</li>
<li>Using your web browser visit the location you placed phpBB 2 with the addition of install/install.php, e.g. http://www.mydomain.com/phpBB2/install/install.php, http://www.mydomain.com/forum/install/install.php etc.
<li>Fill out all the requested information and hit <i>Submit</i></li>
<li>Change the permissions on config.php to be writeable only by yourself (644 or -rw-r--r-- within your FTP Client)</li>
<li>Click the <i>Complete Installation</i> button or revisit the location you entered above.</li>
<li>phpBB 2 should now be available, please <b>MAKE SURE</b> you read at least <a href="#postinstall">Section 8</a> below for important, security related post-installation instructions.</li>
</ol>
 
<p>If you experienced problems or do not know how to proceed with any of the steps above please read the rest of this document.</p>
 
<a name="require"></a><h2 class="h2"><u>2. Requirements</u></h2>
 
<p>Installation of phpBB2 requires the following:</p>
<ul>
<li>A webserver or web hosting account running on any major Operating System</li>
<li>A SQL database system, <b>one of</b>:
<ul>
<li>MySQL (3.22 or higher)</li>
<li>PostgreSQL 7.0.3 or higher (preferably 7.1.x or 7.2.x)</li>
<li>MS SQL Server (7 or 2000) directly or via ODBC</li>
<li>MS Access (2000 or XP) via ODBC</li>
</ul>
</li>
<li>PHP (4.0.3 and above) with support for the database you intend to use above</li>
</ul>
 
<p>If your server or hosting account does not meet the requirements above I am afraid phpBB 2.0 is not for you.</p>
 
<a name="install"></a><h2 class="h2"><u>3. New Installations</u></h2>
 
<p>Installation of phpBB 2 will vary according to your server and database. If you have <i>shell access</i> to your account (via telnet or ssh for example) you may want to upload the entire phpBB 2 archive (in binary mode!) to a directory on your host and unarchive it there.</p>
 
<p>If you do not have shell access or do not wish to use it you will need to decompress the phpBB 2 archive to a local directory on your system using your favourite compression program, e.g. winzip, rar, zip, etc. From there you must FTP <b>ALL</b> the files it contains (being sure to retain the directory structure and filenames) to your host. Please ensure that the cases of filenames are retained, do <b>NOT</b> force filenames to all lower or upper case doing so will cause errors later.</p>
 
<p>All .php, .inc, .sql, .cfg and .htm files should be uploaded in <b>ASCII</b> mode, while all graphics should be uploaded in <b>BINARY</b> mode. If you are unfamiliar with what this means please refer to your FTP client documentation. In most cases this is all handled transparantly by your ftp client but if you encounter problems later you should be sure the files where uploaded correctly as described here.</p>
 
<p>phpBB2 comes supplied with English as its standard language. However a number of seperate packs for different languages are available. If you are not a native English speaker you may wish to install one or more of these packages before continuing. The installation process below will allow you to select a default language from those available (you can of course change this default at a later stage). For more details of language packs, where to obtain them and how to install them please see the <a href="README.html#i18n">README</a>.</p>
 
<p>Once all the files have been uploaded to your site you should point your browser at this location with the addition of install/install.php (please note that if you changed the extension from php, see <a href="#fileext">Section 3.i</a> below, you should alter install.php appropriately). For example if your domain name is <i>www.mydomain.tld</i> and you placed phpBB 2 in a directory /phpBB2 off your web root you would enter <i>http://www.mydomain.tld/phpBB2/install/install.php</i> into your browser. When you have done this you should see the phpBB 2 Installation screen appear.</p>
 
<a name="fileext"></a><h3 class="h3">3.i. Changing the file extension</h3>
 
<p>If the file extension used to execute PHP scripts on your server is <b>NOT</b> .php but for example .php3 or .phtml you should first rename <b>ALL</b> files ending in .php and change the value of $phpEx in <u>extension.inc</u>. In the vast majority of cases this step will be unncessary.</p>
 
<a name="phpBB1x"></a><h3 class="h3">3.ii. Replacing an old phpBB 1.x install</h3>
 
<p><b>NOTE</b>, you should <b>NOT</b> place phpBB 2 files into the same directory as any previous installation of phpBB 1.x! Create a new directory (or move your old phpBB 1.x out of the way), failure to do this will result in runtime errors.</p>
 
<a name="nonaccess"></a><h3 class="h3">3.iii. Installing on MySQL 3 and 4, PostgreSQL 7.x, MS SQL 7/2000 (inc. via ODBC)</h3>
 
<p><b>Before proceeding</b> with installation you should ensure you have a database available. Most good hosting accounts now come with at least one database as part of the basic package although it may need to be setup before first use. Ask your provider for details if you are unsure whether you do or not. If you are running your own server and are unsure how to create a database you should refer to your SQL servers documentation or website, e.g. <a href="http://www.mysql.com/doc/" target="_new">http://www.mysql.com/doc/</a>, <a href="http://www.postgresql.org/users-lounge/" target="_new">http://www.postgresql.org/users-lounge/</a>, etc.</p>
 
<p>If your database server is MySQL <b>PLEASE</b> ensure you select the appropriate version from the dropdown box. Do <b>NOT</b> select MySQL 4.x if you have MySQL 3.x (the most common type) installed, if in doubt select MySQL 3.x.</p>
 
<a name="access"></a><h3 class="h3">3.iv. Installing on MS Access 2000/XP</h3>
 
<p>Before you install phpBB 2 you need to create a <b>Data Source Name</b> or <b>DSN</b>. The exact way to do this will depend on your hosting provider, if you are unsure you should check with them before proceeding. In general though you should create a System DSN which points to the location where you have stored an unarchived copy of the ms_access_primer.mdb file (this is contained in the ms_access_primer.zip which can be found in <u>install/schemas/</u>). The name you give this DSN will be used during installation. Do not proceed until this step is complete!</p>
 
<p>Please note that MS Access support is not designed for busy boards. If you anticipate more than one or two users being online at any given time you should upgrade to a more robust server solution.</p>
 
<a name="requireddata"></a><h3 class="h3">3.v. Entering required data</h3>
 
<p>Once you have reached the installation page you need to fill out several fields. Be sure to select the right <u>database type</u>! If you do not have or do not know the <u>database name</u>, <u>database server</u>, etc. please check with your hosting provider. For <b>non-ODBC</b> databases the database server is typically localhost but this is <b>NOT</b> universal! If you are using an ODBC based database (such as MS Access or MSSQL via ODBC) you should enter the DSN here (see 2.iv.).</p>
 
<p>The <u>database prefix</u> allows you to enter a few characters, short name, etc. which all tables used by this installation will be prefixed with. The default (phpbb_) will usually be fine. However if you have more than one copy of phpBB 2 using the same database be sure to alter it or you will receive errors during installation.</p>
 
<p>The remaining information is personal to you and your site. You will need to enter a <u>username</u> and <u>password</u> for the initial administration account (more administrators can be created later). The <u>server name</u>, <u>server port</u> and <u>script path</u> are essential because all emails containing URLs will use these values. The installer will guess initial values, however they may not be correct so be sure to check them!</p>
 
<p>Remember that a domain (or server) name does <b>NOT</b> include http://! Enter just the domain name, eg. <i>www.mydomain.tld</i> and <b>NOT</b> <i>http://www.mydomain.tld/</i>. The server port can, in the great majority of cases be left as 80, this is the standard http port. However if your web server listens to a different port because for example port 80 is blocked then alter this appropriately. The script path is the relative path from your webroot where phpBB 2 is installed, e.g. if you install phpBB 2 into phpBB 2/ in your webroot then enter phpBB 2 (or /phpBB 2/) as the script path.</p>
 
<a name="completeinstall"></a><h3 class="h3">3.vi. Completing installation</h3>
 
<p>Once you have checked all the data press submit. The installation script will create and populate all the necessary tables. It will then attempt to write to the <u>config.php</u> file which will contain the basic configuration data used to run phpBB 2. If the installer cannot write <u>config.php</u> directly you will be given the option of either downloading the file or even FTPing it to the correct location. If you choose to download you should then re-upload the file to your server, overwriting the existing <u>config.php</u> in the process. If you attempt to FTP via the install script you should supply the requested information. Should FTP fail you will be able to download the file and then re-upload as described earlier.</p>
 
<p>During the installation procedure phpBB 2 will check to ensure the relevant PHP database module is available and will not proceed if it cannot be found. Should this happen be sure to check you have selected the correct database and/or ask your hosting provider for advice.</p>
 
<p><b>Do not</b> proceed untill the installation is completed and (if necessary) you have uploaded the <u>config.php</u> file.</p>
 
<a name="upgrade1.x"></a><h2 class="h2"><u>4. Upgrade from phpBB 1.4.x</u></h2>
 
<p>Before upgrading we heavily recommend you do a <u>full backup of your database</u>! If you are unsure how to achieve this please ask your hosting provider for advice. One you have backed up your database you should follow the basic instructions given for <a href="#install">New Installations</a> above. <b>However</b> instead of selecting <u>Install</u> as the <i>Installation Method</i> you should select <u>Upgrade</u>.</p>
 
<p>As with install the upgrade is automated. The config.php will be written automatically (if possible, else you will be able to download a copy as with New Installation above). Once the config.php is in place everything should proceed without error. Please note that this upgrading process may take quite some time and depending on your hosting provider this may result in it failing (due to web server or other timeout issues). If this is the case you should ask your provider if they are willing to allow the upgrade script to temporarily exceed their limits (be nice and they will probably be quite helpful).</p>
 
<p>Once completed your board should be immediately available. If you encountered errors you should restore your original database and report the problems to our bug tracker or seek help via our forums (see <a href="README.html">README</a> for details).</p>
 
<a name="upgradeb1"></a><h2 class="h2"><u>5. Upgrade from phpBB 2.0 beta-1</u></h2>
 
<p>Sorry but no direct upgrade is available from beta-1 (we did warn you!). If you are reasonably confident with the use of SQL, etc. you may be able to make the required changes to the database manually. You will need to examine the CVS check-ins to determine what needs changing where.</p>
 
<a name="upgradeRC"></a><h2 class="h2"><u>6. Upgrade from previous Release Candidate versions of phpBB 2</u></h2>
 
<p>Upgrading from these versions is generally quite easy. First you should make a copy of your existing <u>config.php</u>, keep it in a safe place! Next delete all the existing phpBB 2 files, do not leave any in place otherwise you may encounter errors later. You can leave alternative templates in-place but you should note they may not function correctly with the final release. It is therefore recommended you switch back to subSilver if you are currently using a different style. With this complete you can upload the new phpBB 2.0.0 files (see <a href="#install">New Installations</a> for details if necessary). Once complete copy back your saved <u>config.php</u>, replacing the new one.</p>
 
<p>You should now run <b>install/update_to_latest.php</b> which, depending on your previous version, will make a number of database changes. You may receive <u>FAILURES</u> during this procedure, they should not be a cause for concern unless you see an actual <u>ERROR</u>, in which case the script will stop (in this case you should seek help via our forums or bug tracker).</p>
 
<p><b>RC-2 and below MSSQL users</b>, please note that during the update procedure your existing forums table will be dropped and re-created. All data in standard fields will be retained. However if you have modified the forums table and added additional fields or altered existing ones these changes <b>WILL</b> be lost. If this is a significant issue for you we advise you comment out the "DROP FORUM TABLE" section in update_to_latest.php and instead, manually alter the forum_id column to remove the IDENTITY setting (if it exists).</p>
 
<p>Once the update_to_latest.php has completed you <b>MUST</b> proceed to the Administration General Configuration panel and check all the values in General Configuration. This is essential if you were running any version before RC-3 since extra information needs to be entered to enable correct URLs to be output in emails.</p>
 
<a name="langtempchanges"></a><h3 class="h3">6.i. Changes in language pack format and templates</h3>
 
<p>Please note that changes have been made to the format of language, image localisations and templates from previous RC's to FINAL. If you were running a release candidate prior to RC-3 you will <b>need</b> to download new language and image localisation packs. You can safely delete any existing <u>*_lang.gif</u> files in the subSilver/images directory since these are no longer utilised. If you are using or have installed any 3rd party template set you must either remove it or update it. Changes have been made to a number of template variables which will result in these not working unless they have been updated to meet phpBB 2.0.x standards.</p>
 
<a name="upgradeSTABLE"></a><h2 class="h2"><u>7. Upgrade from previous stable (released) versions of phpBB 2</u></h2>
 
<p>If you are currently using a stable release of phpBB 2 updating to this version is straightforward. You would have downloaded one of three packages and your choice determines what you need to do. <b>Please Note</b>: That before upgrading we heavily recommend you do a <u>full backup of your database and existing phpBB2 source files</u>! If you are unsure how to achieve this please ask your hosting provider for advice.</p>
 
<p><b>MySQL Users Please Note</b>: Changes introduced in 2.0.4 may increase the size of your database, more specifically the search_wordmatch table. There are other changes in that release which are designed to reduce the database size. However these additional changes may not apply to all types of forum (particularly non-English boards). While any increases will be relatively small compared to the overall database size it may be an issue for some users. In particular users on hosting plans which limit database size and where the database is near that limit.</p>
 
<p><b>Please make sure you update your phpBB2 source files too, even if you run the update_to_latest.php file.</b></p>
 
<a name="upgradeSTABLE_full"></a><h3 class="h3">7.i. Full package</h3>
 
<p>If you have downloaded the full package you should follow the same general upgrade path as for "<a href="#upgradeRC">Upgrade from previous Release Candidate versions of phpBB 2</a>". The exception to this being the need to switch or update styles. In addition there is generally little need to visit the admin panel (though it is adviseable).</p>
 
<a name="upgradeSTABLE_files"></a><h3 class="h3">7.ii. Changed files only</h3>
 
<p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have 2.0.20 you should select the phpBB-2.0.20_to_2.0.21.zip/tar.gz file.</p>
 
<p>The directory structure has been preserved enabling you (if you wish) to simply upload the contents of the archive to the appropriate location on your server, i.e. simply overwrite the existing files with the new versions. Do not forget that if you have installed any Mods these files will overwrite the originals possibly destroying them in the process. You will need to re-add Mods to any affected file before uploading.</p>
 
<p>As for the other upgrade procedures you should run <b>install/update_to_latest.php</b> after you have finished updating the files. This will update your database schema and increment the version number.</p>
 
<a name="upgradeSTABLE_patch"></a><h3 class="h3">7.iii. Patch file</h3>
 
<p>The patch file is probably the best solution for those with many Mods or other changes who do not want to re-add them back to all the changed files. To use this you will need command line access to a standard UNIX type <b>patch</b> application.</p>
 
<p>A number of patch files are provided to allow you to upgrade from previous stable releases. Select the correct patch, e.g. if your current version is 2.0.20 you need the phpBB-2.0.20_to_2.0.21.patch. Place the correct patch in the parent directory containing the phpBB 2 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <b>patch -cl -d [PHPBB DIRECTORY] -p1 &lt; [PATCH NAME]</b> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB2, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
 
<p>If you do get failures you should look at using the <a href="#upgradeSTABLE_files">Changed files only</a> package to replace the files which failed to patch, please note that you will need to manually re-add any Mods to these particular files. Alternatively if you know how you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.</p>
 
<p>You should of course delete the patch file (or files) after use. As for the other upgrade procedures you should run <b>install/update_to_latest.php</b> after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number.</p>
 
<a name="upgradeSTABLE_all"></a><h3 class="h3">7.iv. All package types</h3>
 
<p>If you have non-English language packs installed you may want to see if a new version has been made available. A number of missing strings have been added which, though not essential, may be beneficial to users. Please note that at this time not all language packs have been updated so you should be prepared to periodically check for updates.</p>
 
<a name="postinstall"></a><h2 class="h2"><u>8. Important (security related) post-Install tasks for all installation methods</u></h2>
 
<p>Once you have succssfully installed phpBB 2.0.x you <b>MUST</b> ensure you remove the entire install/ and contrib/ directories. Leaving these in place is a <u>very serious potential security issue</u> which may lead to deletion or alteration of files, etc. Please note that until these directories are remove phpBB2 will not operate and a warning message will be displayed. Beyond these <b>essential</b> deletions you may also wish to delete the docs/ directories if you wish.</p>
 
<p>With these directories deleted you should proceed to the administration panel. Depending on how the installation completed you may have been directed there automatically. If not, login as the administrator you specified during install/upgrade and click the "<b>Administration Panel</b>" link at the bottom of any page. Ensure that details specified in General -> Configuration are correct!</p>
 
<a name="avatars"></a><h3 class="h3">8.i. Uploadable avatars</h3>
 
<p>phpBB 2 supports several methods for allowing users to select their own <i>avatar</i> (an avatar is a small image generally unique to a user and displayed just below their username in posts).</p>
 
<p>Two of these options allow users to upload an avatar from their machine or a remote location (via a URL). If you wish to enable this function you should first ensure the correct paths for uploadeable avatars is set in Admin -> General -> Configuration -> Avatars. By default this is <u>images/avatars</u> but you can set it to whatever you like, just ensure the configuration setting is updated. You must also ensure this directory can be written to by the webserver. Usually this means you have to alter its permissions to allow anyone to read and write to. Exactly how you should do this depends on your ftp client or server operating system.</p>
 
<p>On UNIX systems for example you set the directory to a+rwx (or ugo+rwx or even 777). This can be done from a command line on your server using chmod or via your FTP client (using the Change Permissions, chmod or other Permissions dialoge box, see your FTP clients documentation for help). Most FTP clients list permissions in the form of User (Read, Write, Execute), Group (Read, Write, Execute) and Other (Read, Write, Execute). You need to tick all of these boxes to set correct permissions.</p>
 
<p>On Windows system you need to ensure the directory is not write-protected and that it has global write permissions (see your servers documentation or contact your hosting provider if you are unsure on how to achieve this).</p>
 
<p>Please be aware that setting a directories permissions to global write access is a potential security issue. While it is unlikely that anything nasty will occur (such as all the avatars being deleted) there are always people out there out to cause trouble. Therefore you should monitor this directory and if possible make regular backups.</p>
 
<a name="safemode"></a><h3 class="h3">8.ii. Safe Mode</h3>
 
<p>phpBB 2.0.x includes support for using uploadable avatars on systems running PHP in safe mode. If this applies to your hosting service you will need to create a sub-directory called <u>tmp</u> in the directory you specified for storage of uploaded avatars (by default this is images/avatars as explained above). Give it the same access rights as for uploadable avatars above.</p>
 
<p>This safe mode support includes compatibility with various directory restrictions your host may impose (assuming they are not too restrictive and that the PHP installed is version 4.0.3 or later). There is generally no need for any manual setup for safe mode support it is typically handled transparantly.</p>
 
<a name="extras"></a><h3 class="h3">8.iii. Optional extras</h3>
 
<p>Included with this package are two extra (optional) files, you will find them in the <u>contrib/</u> directory. These extras, <i>template_file_cache.php</i> and <i>template_db_cache.php</i> address concerns over server load and page generation times on slower or heavily loaded systems. These updated template modules compile each template and uses this rather than compiling each file everytime it is viewed. Tests seem to indicate a noticeable decrease in page generation times and more importantly a significant decrease in overall server load in virtual hosting environments.</p>
 
<p>You should see the <a href="../contrib/README.html">README</a> contained within the contrib directory for more details.</p>
 
<a name="disclaimer"></a><h2 class="h2"><u>9. Copyright and disclaimer</u></h2>
 
<p>This application is opensource software released under the <a href="http://www.gnu.org/licenses/gpl.html" target="_new">GPL</a>. Please see source code and the Docs directory for more details. This package and its contents are Copyright © 2002 <a href="http://www.phpbb.com/" target="_new">phpBB Group</a>, All Rights Reserved.</p>
<!-- END DOCUMENT -->
 
</td>
</tr>
</table></td>
</tr>
</table>
 
</body>
</html>
/Forum/docs/README.html
0,0 → 1,224
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>phpBB 2.0.x :: Readme</title>
<link rel="stylesheet" href="../templates/subSilver/subSilver.css" type="text/css" />
<style type="text/css">
<!--
p,ul,td {font-size:10pt;}
.h2 {font-size:15pt;font-weight:bold;color:red}
.h3 {font-size:12pt;color:blue}
//-->
</style>
</head>
<body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#006699">
 
<table width="100%" border="0" cellspacing="0" cellpadding="10" align="center">
<tr>
<td class="bodyline"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
 
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../templates/subSilver/images/logo_phpBB.gif" border="0" alt="phpBB 2 : Creating Communities" vspace="1" /></a></td>
<td align="center" width="100%" valign="middle"><span class="maintitle">phpBB 2.0.x README</span></td>
</tr>
</table>
 
<!-- BEGIN DOCUMENT -->
<p>Thank you for downloading phpBB 2, the long awaited re-write of the popular phpBB 1.x online community forum. This README will guide through the basics of installation and operation of phpBB 2. Please ensure you read this and the accompanying documentation fully <b>before</b> proceeding with the installation.</p>
 
<ol>
<li><a href="#install">Installing phpBB 2</a></li>
<li><a href="#run">Running phpBB 2</a></li>
<ol type="i">
<li><a href="#i18n">Internationalisation (i18n)</a></li>
<li><a href="#styles">Styles</a></li>
<li><a href="#mods">Mods</a></li>
</ol>
<li><a href="#help">Getting help with phpBB 2</a></li>
<ol type="i">
<li><a href="#userguide">Userguide</a></li>
<li><a href="#website">Community Forums</a></li>
<li><a href="#irc">Internet Relay Chat</a></li>
</ol>
<li><a href="#status">Status of this version</a></li>
<li><a href="#bugs">Reporting Bugs</a></li>
<ol>
<li><a href="#securitybugs">Security related bugs</a></li>
</ol>
<li><a href="#curbugs">Overview of current bug list</a></li>
<li><a href="#php">PHP compatibility issues</a></li>
<ol type="i">
<li><a href="#phpsec">Notice on PHP security issues</a></li>
</ol>
<li><a href="#disclaimer">Disclaimer</a></li>
</ol>
 
<a name="install"></a><h2 class="h2"><u>1. Installing phpBB 2</u></h2>
 
<p>Installation and upgrade instructions can be found in the <a href="INSTALL.html">INSTALL</a> document contained in this distribution. If you are intending to upgrade from a previous phpBB 1.4.x installation we highly recommend you backup any existing data before proceeding!</p>
 
<p><b>Please note</b> that users of Release Candidate (RC) versions of phpBB 2 should run the update_to_latest.php script <b>BEFORE</b> attempting to access your board. Failing to do so may result in errors and unexpected behaviour! While these won't do any damage they will prevent you using your board.</p>
 
<p>If you are using RC-1 (pre) you may find some other DB changes have occured and should examine the schemas to see if your installation requires any modifications (note that most of these have already been discussed on the phpBB 2 forums and are handled by the update script). If you are uncomfortable doing any of this we recommend you re-install (you may backup your existing data if you wish, re-install phpBB 2 and then insert your backup).</p>
 
<p>Users of phpBB 2.0 Beta-1 cannot directly upgrade to phpBB 2.0 RC-2, 3 or 4, sorry.</p>
 
<a name="run"></a><h2 class="h2"><u>2. Running phpBB 2</u></h2>
 
<p>Once installed phpBB 2.0 is easily managed by both admin and moderator control panels. If you need help or advice with phpBB 2 please see <a href="#help">Section 3</a> below.</p>
 
<a name="i18n"></a><h3 class="h3">2.i. Internationalisation, i18n</h3>
 
<p>A number of language packs and subSilver localisations are now available. You can find them on our official download page:</p>
 
<p><a href="http://www.phpbb.com/downloads.php#lang" target="_new">http://www.phpbb.com/downloads.php</a></p>
 
<p>This is the <i>Official</i> location for all support language sets. If you download a package from a 3rd party site you do so with the understanding that we cannot offer support. So please, do not ask for help in these cases!</p>
 
<p>Installation of these packages is straightforward, simply download the required language pack and unarchive it into the languages/ folder. Please ensure you retain the directory structure when doing this! To install the subSilver image packs you should unarchive the file/s into the templates/subSilver/images directory, again you must retain the directory structure. Once installed the languages will become immediately available.</p>
 
<p>If your language is not available please visit our forums where you will find a topic listing translations currently available or in preparation. This topic also gives you information should you wish to volunteer to translate a language not currently listed</p>
 
<p><b>Please note</b> that users who have upgraded to the latest version from versions prior to RC-3 should will <b>need</b> to download new versions of the language/subSilver image packs. Any package downloaded prior to the availability of RC-3 will <b>not</b> function correctly with this version of phpBB 2.</p>
 
<p>If you have upgraded from 2.0.0 and make use of non-English language packs you will benefit from downloading updated versions which will become available shortly. These introduce a number of strings which went missing from the first version plus a few updates and additions.</p>
 
<a name="styles"></a><h3 class="h3">2.ii. Styles</h3>
 
<p>Although phpBB Group are rather proud of the subSilver style (which has influenced many of our competitors boards <i>updated</i> designs!) we realise that it may not be to everyones tastes. Therefore phpBB 2 allows styles to be switched with relative ease. Firstly you need to locate and download a style you like. We maintain such a site at</p>
 
<p><a href="http://www.phpbb.com/styles/" target="_new">http://www.phpbb.com/styles/</a></p>
 
<p><b>Please note</b> that 3rd party styles downloaded for versions of phpBB 2 prior to its final (2.0.x) release will <b>not</b> function correctly. You should either remove these styles or (if available) update them to meet changes in 2.0.x.</p>
 
<p>Once you have downloaded a style the usual next step is to unarchive (or upload the unarchived contents of) the package into your templates/ directory. You then need to visit Administration -> Styles -> Add, you should see the new style available, click add and it will become available for all your users.</p>
 
<a name="mods"></a><h3 class="h3">2.iii. Mods</h3>
 
<p>Although not officially supported by phpBB Group, phpBB 2 has a thriving mod (formerly known as <i>hacks</i>) scene. These third party modifications to the standard phpBB 2 extend its capabilities still further and can be found at:</p>
 
<p><a href="http://www.phpbb.com/mods" target="_new">http://www.phpbb.com/mods</a></p>
 
<p><b>Please remember</b> that any bugs or other issues that occur after you have added any modification should <b>NOT</b> be reported to the bug tracker (see below). First remove the modification and see if the problem is resolved.</p>
 
<p>Also remember that any modifications which modify the database in any way may render upgrading your forum to future versions more difficult unless we state otherwise. With all this said many users have and continue to utilise many of the mods already available with great success</p>
 
<a name="help"></a><h2 class="h2"><u>3. Getting help with phpBB 2</u></h2>
 
<p>phpBB 2 can seem a little daunting to new users in places, particularly with regard the permission system. The first thing you should do is check the <a href="FAQ.html">FAQ</a> which covers a few basic getting started questions. If you need additional help there are several places you should look.</p>
 
<a name="userguide"></a><h3 class="h3">3.i. phpBB 2 Userguide</h3>
 
<p>A comprehensive userguide is now available online and can be accessed from the following location:</p>
 
<p><a href="http://www.phpbb.com/support/guide/" target="_new">http://www.phpbb.com/support/guide/</a></p>
 
<p>This covers everything from installation through setting permissions and managing users.</p>
 
<a name="website"></a><h3 class="h3">3.ii. Community Forums</h3>
 
<p>phpBB Group maintains a thriving community where a number of people have generously decided to donate their time to help support users. This site can be found at:</p>
 
<p><a href="http://www.phpbb.com/" target="_new">http://www.phpbb.com/</a></p>
 
<p>If you do seek help via our forums please be sure to do a Search before posting. This may well save both you and us time and allow the developer, moderator and support groups to spend more time responding to people with unknown issues and problems. Please also remember that phpBB is an entirely volunteer effort, no one receives any compensation for the time they give, this includes moderators as well as developers. So please be respectful and mindful when awaiting responses.</p>
 
<a name="irc"></a><h3 class="h3">3.iii Internet Relay Chat</h3>
 
<p>Another place you may find help is our IRC channel. This operates on the Freenode IRC network, <b>irc.freenode.net</b> and the channel is <b>#phpbb</b> and can be accessed by any good IRC client such as mIRC, XChat, etc. Again, please do not abuse this service and be respectful of other users.</p>
 
<a name="status"></a><h2 class="h2"><u>4. Status of this version</u></h2>
 
<p>This is the second stable release of phpBB 2. The 2.0.x line is essentially feature frozen, point releases will see only bugs and such like fixed. Our next major release will be phpBB 3.0 and work is progressing on this (the unstable development version is 2.1). Please do not post questions asking when 3.0 will be available, no release date has been set. phpBB 3.0 is now feature frozen, please feel free to suggest new features for phpBB 3.2 using our feature request tracker. We do not guarantee that all these will appear in 3.2 but we will do our best!:</p>
 
<p><a href="http://sourceforge.net/tracker/?atid=580201&group_id=7885&func=browse" target="_new">http://sourceforge.net/tracker/?atid=580201&group_id=7885&func=browse</a></p>
 
<p>Before submitting your idea please <b>ensure</b> you have read through the entries in that list. If your idea is similar to an existing one please feel free to add a comment to it. Please <b>do not</b> submit duplicate suggestions!</p>
 
<p>For some suggestions we may ask for your feedback via our forums. For those interested in the development of phpBB 3.0 you should keep an eye on the community forums (particularly the Feature Discussion forum) where you may be able to influence the direction we take with certain new features. Finally you may like to visit our development forum to see how things are progressing:</p>
 
<p><a href="http://area51.phpbb.com/phpBB/" target="_new">http://area51.phpbb.com/phpBB/</a></p>
 
<p>Please note that this forum should <b>NOT</b> be used to obtain support for or ask questions about phpBB 2.0.x, the main community forums are the place for this. Any such posts will be locked and go unanswered.</p>
 
<a name="bugs"></a><h2 class="h2"><u>5. Reporting Bugs</u></h2>
 
<p>The phpBB Group uses a bug tracking system to store, list and manage all reported bugs, it can be found at the location listed below. Please <b>DO NOT</b> post bug reports to our forums, they will be locked. In addition please <b>DO NOT</b> use the bug tracker for support requests. Posting such a request will only see you directed to the support forums (while taking time away from working on real bugs).</p>
 
<p><a href="http://www.phpbb.com/bugs/" target="_new">http://www.phpbb.com/bugs/</a></p>
 
<p>While we very much appreciate receiving bug reports (the more reports the more stable phpBB 2 will be) we ask you carry out a few steps before adding new entries:</p>
<ul>
<li>Firstly determine if your bug is reproduceable, how to determine this depends on the bug in question. Only if the bug is reproduceable is it likely to be a problem with phpBB 2.0 (or in some way connected). If something cannot be reproduced it may turn out to have been your hosting provider working on something, a user doing something silly, etc. Bug reports for non-reproduceable events can slow down our attempts to fix real, reproduceable issues<br /><br /></li>
<li>Next please read or search through the existing bug reports (remember to check open <b>AND</b> closed reports!) to see if <i>your</i> bug (or one very similar to it) is already listed. If it is please add to that existing bug rather than creating a new duplicate entry (all this does is slow us down).<br /><br /></li>
<li>Check the forums (use search!) to see if people have discussed anything that sounds similar to what you are seeing. However, as noted above please <b>DO NOT</b> post your particular bug to the forum unless it's non-reproduceable or you are sure it's related to something you have done rather phpBB 2.0<br /><br /></li>
<li>If no existing bug exists then please feel free to add it</li>
</ul>
 
<p>If you do post a new bug (i.e. one that isn't already listed in the bug tracker) firstly make sure you have logged in (your username and password are the same as for the community forums) then please include the following details:</p>
<ul>
<li>Your server type/version, eg. Apache 1.2.22, IIS 4, Sambar, etc.</li>
<li>PHP version and mode of operation, eg. PHP 4.1.1 as a module, PHP 4.0.1 running as CGI, etc.</li>
<li>DB type/version, eg. MySQL 3.23.32, PostgreSQL 7.1.2, MSSQL Server 2000 SP1, etc.</li>
</ul>
 
<p>Please also be as detailed as you can in your report, if possible list the steps required to duplicate the problem. If you have a fix which you are <b>VERY SURE</b> works (and is consistent with our coding guidelines) and does not introduce further problems or incompatibilities please let us know. However only include it in the bug report if you really must, if we need it we'll ask you for it.</p>
 
<p>Once a bug has been submitted you will be emailed any follow up comments added to it. <b>Please</b> if you are requested to supply additional information, <b>do so</b>! It is <u>extremely frustrating</u> for us to receive bug reports, ask for additional information but get nothing. In these cases we have a policy of <u>closing the bug</u>, which may leave a very real problem in place. Obviously we would rather not have this situation arise.</p>
 
<a name="securitybugs"></a><h3 class="h3">5.i. Security related bugs</h3>
 
<p>If you find a potential security related vulnerability in phpBB 2 please <b>DO NOT</b> post it to the bug tracker, public forums, mailing lists, etc.! Doing so may allow unscrupulous users to take advantage of it before we have time to put a fix in place. All security related bugs should be sent to our security tracker:</p>
 
<p><a href="http://www.phpbb.com/security/" target="_new">http://www.phpbb.com/security/</a></p>
 
<a name="curbugs"></a><h2 class="h2"><u>6. Overview of current bug list</u></h2>
 
<p>This list is not complete (see above link for full list) but does represent those bugs which may effect users on a wider scale. Other bugs listed in the tracker have typically been shown to be limited to certain setups or methods of installation/upgrade.</p>
 
<ul>
<li>First four characters of some posted content disappears - this is an issue with PHP not phpBB</li>
<li>Cannot post very large messages when using PostgreSQL 7.0.x (limitation of Postgresql 7.0.x)</li>
<li>By default cannot post very large messages with MSSQL (this can be configured within MSSQL)</li>
<li>Use of non-latin charsets with MSSQL may result in post data being cropped unexpectedly</li>
<li>Upgrade may fail to complete on large boards under some hosts</li>
<li>Case-sensitivity on usernames and emails with PostgreSQL 7.x. A fix is provided by a user <a href="http://www.phpbb.com/kb/article.php?article_id=201" target="_new">within our knowledge base</a></li>
</ul>
 
<a name="php"></a><h2 class="h2"><u>7. PHP compatibility issues</u></h2>
 
<p>phpBB is no longer supported on PHP3 due to several compatibility issues and we recommend that you upgrade to the latest stable release of PHP4 to run phpBB.</p>
 
<p>Please remember that running any application on a developmental version of PHP can lead to strange/unexpected results which may appear to be bugs in the application (which may not be true). Therefore we recommend you upgrade to the newest stable version of PHP before running phpBB 2. If you are running a developmental version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
 
<p>This board has been developed and tested under Linux and Windows (amongst others) running IIS and Apache using MySQL 3.23 and 4.0.0, MSSQL Server 2000, MS Access 2000 and XP and PostgreSQL 7.x. Versions of PHP used range from 4.0.6 to 4.3.8 without problem. There may be unconfirmed issues with PHP 4.0.1 including patch level releases. If you experience problems with phpBB and have this PHP version installed it is recommended you upgrade it before posting bug reports.</p>
 
<p>With the recent release of the official version of PHP 5, people and hosts may be switching to the latest PHP version. At this moment, the phpBB Team does not officially support running phpBB on PHP 5, as phpBB2.0.x was not written with PHP 5 in mind. However, many users have reported using it sucessfully on PHP 5 having made a configuration change in PHP to enable support for the deprecated HTTP_*_VARS arrays which is turned off by default in new PHP 5 installations. The relevant configuration option is register_long_arrays and it is decribed in the PHP Manual. phpBB 2.0.x makes use of these arrays in order to maintain backwards compatibility with early versions of PHP 4.x which is part of the original specification.<br />
For this reason we do not support PHP 5 as platform for phpBB. It has been reported working, so you can try it. It's a risk you will be taking though.</p>
 
<a name="phpsec"></a><h3 class="h3">7.i. Notice on PHP security issues</h3>
 
<p>At the end of February 2002 a <a href="http://security.e-matters.de/advisories/012002.html" target="_new">major security issue</a> was found with PHP 3 and 4 which has resulted in many hosting providers disabling file uploads (although patches fixing the security issues are available and new versions of PHP 4 have been released).</p>
 
<p>Because of this, and to cope with situations where hosts didn't allow such uploads anyway we have implemented various checks in phpBB 2. These checks prevent you from enabling or making use of functions which will not operate correctly on PHP as installed on your server. At this time this includes locally uploaded avatars and DB restore.</p>
 
<p>Third party mods may also be effected but these are outside our control, you should contact the mod writer for more information.</p>
 
<a name="disclaimer"></a><h2 class="h2"><u>8. Copyright and disclaimer</u></h2>
 
<p>This application is opensource software released under the <a href="http://www.gnu.org/licenses/gpl.html" target="_new">GPL</a>. Please see source code and the Docs directory for more details. This package and its contents are Copyright © 2002 <a href="http://www.phpbb.com/" target="_new">phpBB Group</a>, All Rights Reserved.</p>
<!-- END DOCUMENT -->
 
</td>
</tr>
</table></td>
</tr>
</table>
 
</body>
</html>
/Forum/docs/coding-guidelines.txt
0,0 → 1,26
CODING GUIDELINES : Initials by psoTFX (July 2001)
-----------------
 
* The coding style is defined in the codingstandards.html file, all attempts should be made to follow it as closely as possible
 
* All SQL should be cross-DB compatible, if DB specific SQL is used alternatives must be provided which work on all supported DB's (MySQL, MSSQL (7.0 and 2000), PostgreSQL (7.0+), Oracle8, ODBC (generalised if possible, otherwise MS Access, DB2))
 
* All SQL commands should utilise the DataBase Abstraction Layer (DBAL)
 
* All URL's (and form actions) _must_ be wrapped in append_sid, this ensures the session_id is propagated when cookies aren't available
 
* The minimum amount of data should be passed via GET or POST, checking should occur within individual scripts (to prevent spoofing of information)
 
* The auth function should be used for all authorisation checking
 
* Sessions should be initiated on each page, as near the top as possible using the session_pagestart function (userdata should be obtained by calling the init_userprefs immediately after session initialisation)
 
* Login checks should be forwarded to the login page (supplying a page to forward onto once check is complete if required)
 
* All template variables should be named appropriately (using underscores for spaces), language entries should be prefixed with L_, system data with S_, urls with U_, all other variables should be presented 'as is'.
 
* Functions used by more than page should be placed in functions.php, functions specific to one page should be placed on that page (at the top to maintain compatibility with PHP3) surrounded by comments indicating the start and end of the function block
 
* All messages/errors should be output by the message_die function using the appropriate message type (see function for details)
 
* No attempt should be made to remove any copyright information (either contained within the source or displayed interactively when the source is run/compiled), neither should the copyright information be altered in any way (it may be added to)
/Forum/docs/codingstandards.htm
0,0 → 1,327
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0044) -->
<HTML><HEAD><TITLE>phpBB Coding Standard Guidelines</TITLE>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<META content="MSHTML 5.00.2920.0" name=GENERATOR></HEAD>
<BODY aLink=#cccccc bgColor=#ffffff link=#0000ff text=#000000
vLink=#0000ff><FONT face=verdana,arial,tahoma size=-1><A name=top></A>
<H2>phpBB Coding Standard Guidelines</H2>Comments or suggestions? email <A
href="mailto:nate@phpbb.com">nate@phpbb.com</A><BR><BR><A
href="#editor">Editor
Settings</A><BR><A
href="#naming">Naming
Conventions</A><BR><A
href="#layout">Code Layout</A><BR><A
href="#general">General
Guidelines</A><BR><BR><BR><A name=editor></A><A
href="#top">top</A>
<H3>Editor Settings</H3>
<P><B>Tabs vs Spaces:</B> In order to make this as simple as possible, we will
be using tabs, not spaces. Feel free to set how many spaces your editor uses
when it <B>displays</B> tabs, but make sure that when you <B>save</B> the file,
it's saving tabs and not spaces. This way, we can each have the code be
displayed the way we like it, without breaking the layout of the actual files.
</P>
<P><B>Linefeeds:</B> Ensure that your editor is saving files in the UNIX format.
This means lines are terminated with a newline, not with a CR/LF combo as they
are on Win32, or whatever the Mac uses. Any decent Win32 editor should be able
to do this, but it might not always be the default. Know your editor. If you
want advice on Windows text editors, just ask one of the developers. Some of
them do their editing on Win32. </P><BR><BR><A name=naming></A><A
href="#top">top</A>
<H3>Naming Conventions</H3>
<P>We will not be using any form of hungarian notation in our naming
conventions. Many of us believe that hungarian naming is one of the primary code
obfuscation techniques currently in use. </P>
<P><B>Variable Names:</B> Variable names should be in all lowercase, with words
separated by an underscore. <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;Example: <CODE><FONT
size=+1>$current_user</FONT></CODE> is right, but <CODE><FONT
size=+1>$currentuser</FONT></CODE> and <CODE><FONT
size=+1>$currentUser</FONT></CODE> are not. <BR><BR>Names should be descriptive,
but concise. We don't want huge sentences as our variable names, but typing an
extra couple of characters is always better than wondering what exactly a
certain variable is for. </P>
<P><B>Loop Indices:</B> The <I>only</I> situation where a one-character variable
name is allowed is when it's the index for some looping construct. In this case,
the index of the outer loop should always be $i. If there's a loop inside that
loop, its index should be $j, followed by $k, and so on. If the loop is being
indexed by some already-existing variable with a meaningful name, this guideline
does not apply. <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;Example: <PRE><FONT size=+1>
for ($i = 0; $i &lt; $outer_size; $i++)
{
for ($j = 0; $j &lt; $inner_size; $j++)
{
foo($i, $j);
}
} </FONT></PRE>
<P></P>
<P><B>Function Names:</B> Functions should also be named descriptively. We're
not programming in C here, we don't want to write functions called things like
"stristr()". Again, all lower-case names with words separated by a single
underscore character. Function names should preferably have a verb in them
somewhere. Good function names are <CODE><FONT
size=+1>print_login_status()</FONT></CODE>, <CODE><FONT
size=+1>get_user_data()</FONT></CODE>, etc.. </P>
<P><B>Function Arguments:</B> Arguments are subject to the same guidelines as
variable names. We don't want a bunch of functions like: <CODE><FONT
size=+1>do_stuff($a, $b, $c)</FONT></CODE>. In most cases, we'd like to be able
to tell how to use a function by just looking at its declaration. </P>
<P><B>Summary:</B> The basic philosophy here is to not hurt code clarity for the
sake of laziness. This has to be balanced by a little bit of common sense,
though; <CODE><FONT size=+1>print_login_status_for_a_given_user()</FONT></CODE>
goes too far, for example -- that function would be better named <CODE><FONT
size=+1>print_user_login_status()</FONT></CODE> , or just <CODE><FONT
size=+1>print_login_status()</FONT></CODE>. </P><BR><BR><A name=layout></A><A
href="#top">top</A>
<H3>Code Layout</H3>
<P><B>Standard header for new files:</B> Here a template of the header that must
be included at the start of all phpBB files: <PRE><FONT size=+1>
/***************************************************************************
filename.php
-------------------
begin : Sat June 17 2000
copyright : (C) 2000 The phpBB Group
email : support@phpBB.com
$Id: codingstandards.htm,v 1.3 2001/06/09 21:00:12 natec Exp $
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
</FONT></PRE>
<P></P>
<P><B>Always include the braces:</B> This is another case of being too lazy to
type 2 extra characters causing problems with code clarity. Even if the body of
some construct is only one line long, do <I>not</I> drop the braces. Just don't.
<BR><BR>&nbsp;&nbsp;&nbsp;Examples:<PRE><FONT size=+1>
/* These are all wrong. */
if (condition) do_stuff();
if (condition)
do_stuff();
while (condition)
do_stuff();
for ($i = 0; $i &lt; size; $i++)
do_stuff($i);
/* These are right. */
if (condition)
{
do_stuff();
}
while (condition)
{
do_stuff();
}
for ($i = 0; $i &lt; size; $i++)
{
do_stuff();
}
</FONT></PRE>
<P></P>
<P><B>Where to put the braces:</B> This one is a bit of a holy war, but we're
going to use a style that can be summed up in one sentence: Braces always go on
their own line. The closing brace should also always be at the same column as
the corresponding opening brace. <BR><BR>&nbsp;&nbsp;&nbsp;Examples:<PRE><FONT size=+1>
if (condition)
{
while (condition2)
{
...
}
}
else
{
...
}
 
for ($i = 0; $i &lt; $size; $i++)
{
...
}
while (condition)
{
...
}
function do_stuff()
{
...
}
</FONT></PRE>
<P></P>
<P><B>Use spaces between tokens:</B> This is another simple, easy step that
helps keep code readable without much effort. Whenever you write an assignment,
expression, etc.. Always leave <I>one</I> space between the tokens. Basically,
write code as if it was English. Put spaces between variable names and
operators. Don't put spaces just after an opening bracket or before a closing
bracket. Don't put spaces just before a comma or a semicolon. This is best shown
with a few examples. <BR><BR>&nbsp;&nbsp;&nbsp;Examples:<PRE><FONT size=+1>
/* Each pair shows the wrong way followed by the right way. */
$i=0;
$i = 0;
if($i&lt;7) ...
if ($i &lt; 7) ...
if ( ($i &lt; 7)&amp;&amp;($j &gt; 8) ) ...
if (($i &lt; 7) &amp;&amp; ($j &gt; 8)) ...
do_stuff( $i, "foo", $b );
do_stuff($i, "foo", $b);
for($i=0; $i&lt;$size; $i++) ...
for($i = 0; $i &lt; $size; $i++) ...
$i=($j &lt; $size)?0:1;
$i = ($j &lt; $size) ? 0 : 1;
</FONT></PRE>
<P></P>
<P><B>Operator precedence:</B> Do you know the exact precedence of all the
operators in PHP? Neither do I. Don't guess. Always make it obvious by using
brackets to force the precedence of an equation so you know what it does.
<BR><BR>&nbsp;&nbsp;&nbsp;Examples:<PRE><FONT size=+1>
/* what's the result? who knows. */
$bool = ($i &lt; 7 &amp;&amp; $j &gt; 8 || $k == 4);
/* now you can be certain what I'm doing here. */
$bool = (($i &lt; 7) &amp;&amp; (($j &lt; 8) || ($k == 4)))
</FONT></PRE>
<P></P>
<P><B>SQL code layout:</B> Since we'll all be using different editor settings,
don't try to do anything complex like aligning columns in SQL code. Do, however,
break statements onto their own lines. Here's a sample of how SQL code should
look. Note where the lines break, the capitalization, and the use of brackets.
<BR><BR>&nbsp;&nbsp;&nbsp;Examples:<PRE><FONT size=+1>
SELECT field1 AS something, field2, field3
FROM table a, table b
WHERE (this = that) AND (this2 = that2)
</FONT></PRE>
<P></P>
<P><B>SQL insert statements:</B> SQL INSERT statements can be written in two
different ways. Either you specify explicitly the columns being inserted, or
you rely on knowing the order of the columns in the database and do not
specify them. We want to use the former approach, where it is explicitly
stated whcih columns are being inserted. This means our application-level code
will not depend on the order of the fields in the database, and will not be broken
if we add additional fields (unless they're specified as NOT NULL, of course).
<BR><BR>&nbsp;&nbsp;&nbsp;Examples:<PRE><FONT size=+1>
# This is not what we want.
INSERT INTO mytable
VALUES ('something', 1, 'else')
# This is correct.
INSERT INTO mytable (column1, column2, column3)
VALUES ('something', 1, 'else')
</FONT></PRE>
<P></P><BR><BR><A name=general></A><A
href="#top">top</A>
<H3>General Guidelines</H3>
<P><B>Quoting strings:</B> There are two different ways to quote strings in PHP
- either with single quotes or with double quotes. The main difference is that
the parser does variable interpolation in double-quoted strings, but not in
single quoted strings. Because of this, you should <I>always</I> use single
quotes <I>unless</I> you specifically need variable interpolation to be done on
that string. This way, we can save the parser the trouble of parsing a bunch of
strings where no interpolation needs to be done. Also, if you are using a string
variable as part of a function call, you do not need to enclose that variable in
quotes. Again, this will just make unnecessary work for the parser. Note,
however, that nearly all of the escape sequences that exist for double-quoted
strings will not work with single-quoted strings. Be careful, and feel free to
break this guideline if it's making your code harder to read.
<BR><BR>&nbsp;&nbsp;&nbsp;Examples:<PRE><FONT size=+1>
/* wrong */
$str = "This is a really long string with no variables for the parser to find.";
do_stuff("$str");
/* right */
$str = 'This is a really long string with no variables for the parser to find.';
do_stuff($str);
</FONT></PRE>
<P></P>
<P><B>Associative array keys:</B> In PHP, it's legal to use a literal string as
a key to an associative array without quoting that string. We don't want to do
this -- the string should always be quoted to avoid confusion. Note that this is
only when we're using a literal, not when we're using a variable.
<BR><BR>&nbsp;&nbsp;&nbsp;Examples:<PRE><FONT size=+1>
/* wrong */
$foo = $assoc_array[blah];
/* right */
$foo = $assoc_array['blah'];
</FONT></PRE>
<P></P>
<P><B>Comments:</B> Each function should be preceded by a comment that tells a
programmer everything they need to know to use that function. The meaning of
every parameter, the expected input, and the output are required as a minimal
comment. The function's behaviour in error conditions (and what those error
conditions are) should also be present. Nobody should have to look at the actual
source of a function in order to be able to call it with confidence in their own
code. <BR><BR>In addition, commenting any tricky, obscure, or otherwise
not-immediately-obvious code is clearly something we should be doing. Especially
important to document are any assumptions your code makes, or preconditions for
its proper operation. Any one of the developers should be able to look at any
part of the application and figure out what's going on in a reasonable amount of
time. </P>
<P><B>Magic numbers:</B> Don't use them. Use named constants for any literal
value other than obvious special cases. Basically, it's OK to check if an array
has 0 elements by using the literal 0. It's not OK to assign some special
meaning to a number and then use it everywhere as a literal. This hurts
readability AND maintainability. Included in this guideline is that we should be
using the constants TRUE and FALSE in place of the literals 1 and 0 -- even
though they have the same values, it's more obvious what the actual logic is
when you use the named constants. </P>
<P><B>Shortcut operators:</B> The only shortcut operators that cause readability
problems are the shortcut increment ($i++) and decrement ($j--) operators. These
operators should not be used as part of an expression. They can, however, be
used on their own line. Using them in expressions is just not worth the
headaches when debugging. <BR><BR>&nbsp;&nbsp;&nbsp;Examples:<PRE><FONT size=+1>
/* wrong */
$array[++$i] = $j;
$array[$i++] = $k;
/* right */
$i++;
$array[$i] = $j;
$array[$i] = $k;
$i++;
</FONT></PRE>
<P></P>
<P><B>Inline conditionals:</B> Inline conditionals should only be used to do
very simple things. Preferably, they will only be used to do assignments, and
not for function calls or anything complex at all. They can be harmful to
readability if used incorrectly, so don't fall in love with saving typing by
using them. <BR><BR>&nbsp;&nbsp;&nbsp;Examples:<PRE><FONT size=+1>
/* Bad place to use them */
(($i &lt; $size) &amp;&amp; ($j &gt; $size)) ? do_stuff($foo) : do_stuff($bar);
/* OK place to use them */
$min = ($i &lt; $j) ? $i : $j;
</FONT></PRE>
<P></P>
<P><B>Don't use uninitialized variables.</B> for phpBB 2, we intend to use a
higher level of run-time error reporting. This will mean that the use of an
uninitialized variable will be reported as an error. This will come up most
often when checking which HTML form variables were passed. These errors can be
avoided by using the built-in isset() function to check whether a variable has
been set. <BR><BR>&nbsp;&nbsp;&nbsp;Examples:<PRE><FONT size=+1>
/* Old way */
if ($forum) ...
/* New way */
if (isset($forum)) ...
</FONT></PRE>
<P></P><BR><BR><A href="#top">Return
to top</A> </FONT></BODY></HTML>
/Forum/extension.inc
0,0 → 1,26
<?php
/***************************************************************************
* extension.inc
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: extension.inc,v 1.5 2002/04/04 11:52:50 psotfx Exp $
*
*
***************************************************************************/
 
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
 
//
// Change this if your extension is not .php!
//
$phpEx = "php";
 
$starttime = 0;
 
?>
/Forum/faq.php
0,0 → 1,150
<?php
/***************************************************************************
* faq.php
* -------------------
* begin : Sunday, Jul 8, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: faq.php,v 1.14.2.2 2004/07/11 16:46:15 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
 
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_FAQ);
init_userprefs($userdata);
//
// End session management
//
 
// Set vars to prevent naughtiness
$faq = array();
 
//
// Load the appropriate faq file
//
if( isset($HTTP_GET_VARS['mode']) )
{
switch( $HTTP_GET_VARS['mode'] )
{
case 'bbcode':
$lang_file = 'lang_bbcode';
$l_title = $lang['BBCode_guide'];
break;
default:
$lang_file = 'lang_faq';
$l_title = $lang['FAQ'];
break;
}
}
else
{
$lang_file = 'lang_faq';
$l_title = $lang['FAQ'];
}
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx);
 
//
// Pull the array data from the lang pack
//
$j = 0;
$counter = 0;
$counter_2 = 0;
$faq_block = array();
$faq_block_titles = array();
 
for($i = 0; $i < count($faq); $i++)
{
if( $faq[$i][0] != '--' )
{
$faq_block[$j][$counter]['id'] = $counter_2;
$faq_block[$j][$counter]['question'] = $faq[$i][0];
$faq_block[$j][$counter]['answer'] = $faq[$i][1];
 
$counter++;
$counter_2++;
}
else
{
$j = ( $counter != 0 ) ? $j + 1 : 0;
 
$faq_block_titles[$j] = $faq[$i][1];
 
$counter = 0;
}
}
 
//
// Lets build a page ...
//
$page_title = $l_title;
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'body' => 'faq_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
 
$template->assign_vars(array(
'L_FAQ_TITLE' => $l_title,
'L_BACK_TO_TOP' => $lang['Back_to_top'])
);
 
for($i = 0; $i < count($faq_block); $i++)
{
if( count($faq_block[$i]) )
{
$template->assign_block_vars('faq_block', array(
'BLOCK_TITLE' => $faq_block_titles[$i])
);
$template->assign_block_vars('faq_block_link', array(
'BLOCK_TITLE' => $faq_block_titles[$i])
);
 
for($j = 0; $j < count($faq_block[$i]); $j++)
{
$row_color = ( !($j % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($j % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
$template->assign_block_vars('faq_block.faq_row', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FAQ_QUESTION' => $faq_block[$i][$j]['question'],
'FAQ_ANSWER' => $faq_block[$i][$j]['answer'],
 
'U_FAQ_ID' => $faq_block[$i][$j]['id'])
);
 
$template->assign_block_vars('faq_block_link.faq_row_link', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FAQ_LINK' => $faq_block[$i][$j]['question'],
 
'U_FAQ_LINK' => '#' . $faq_block[$i][$j]['id'])
);
}
}
}
 
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
?>
/Forum/groupcp.php
0,0 → 1,1280
<?php
/***************************************************************************
* groupcp.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: groupcp.php,v 1.58.2.25 2005/09/17 18:36:48 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
 
// -------------------------
//
function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$joined, &$poster_avatar, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www, &$icq_status_img, &$icq_img, &$icq, &$aim_img, &$aim, &$msn_img, &$msn, &$yim_img, &$yim)
{
global $lang, $images, $board_config, $phpEx;
 
$from = ( !empty($row['user_from']) ) ? $row['user_from'] : '&nbsp;';
$joined = create_date($date_format, $row['user_regdate'], $board_config['board_timezone']);
$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;
 
$poster_avatar = '';
if ( $row['user_avatar_type'] && $row['user_id'] != ANONYMOUS && $row['user_allowavatar'] )
{
switch( $row['user_avatar_type'] )
{
case USER_AVATAR_UPLOAD:
$poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_REMOTE:
$poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $row['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_GALLERY:
$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : '';
break;
}
}
 
if ( !empty($row['user_viewemail']) || $group_mod )
{
$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL .'=' . $row['user_id']) : 'mailto:' . $row['user_email'];
 
$email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
$email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
}
else
{
$email_img = '&nbsp;';
$email = '&nbsp;';
}
 
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row['user_id']);
$profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>';
$profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
 
$temp_url = append_sid("privmsg.$phpEx?mode=post&amp;" . POST_USERS_URL . "=" . $row['user_id']);
$pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
 
$www_img = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : '';
$www = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
 
if ( !empty($row['user_icq']) )
{
$icq_status_img = '<a href="http://wwp.icq.com/' . $row['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
$icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
$icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $lang['ICQ'] . '</a>';
}
else
{
$icq_status_img = '';
$icq_img = '';
$icq = '';
}
 
$aim_img = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&amp;message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '';
$aim = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&amp;message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : '';
 
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row['user_id']);
$msn_img = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '"><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : '';
$msn = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : '';
 
$yim_img = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&amp;.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
$yim = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&amp;.src=pg">' . $lang['YIM'] . '</a>' : '';
 
$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($row['username']) . "&amp;showresults=posts");
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $row['username']) . '" title="' . sprintf($lang['Search_user_posts'], $row['username']) . '" border="0" /></a>';
$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $row['username']) . '</a>';
 
return;
}
//
// --------------------------
 
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_GROUPCP);
init_userprefs($userdata);
//
// End session management
//
 
$script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path']));
$script_name = ( $script_name != '' ) ? $script_name . '/groupcp.'.$phpEx : 'groupcp.'.$phpEx;
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
 
$server_url = $server_protocol . $server_name . $server_port . $script_name;
 
if ( isset($HTTP_GET_VARS[POST_GROUPS_URL]) || isset($HTTP_POST_VARS[POST_GROUPS_URL]) )
{
$group_id = ( isset($HTTP_POST_VARS[POST_GROUPS_URL]) ) ? intval($HTTP_POST_VARS[POST_GROUPS_URL]) : intval($HTTP_GET_VARS[POST_GROUPS_URL]);
}
else
{
$group_id = '';
}
 
if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
$mode = htmlspecialchars($mode);
}
else
{
$mode = '';
}
 
$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : 0;
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : 0;
 
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
 
//
// Default var values
//
$is_moderator = FALSE;
 
if ( isset($HTTP_POST_VARS['groupstatus']) && $group_id )
{
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
}
 
$sql = "SELECT group_moderator
FROM " . GROUPS_TABLE . "
WHERE group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user and group information', '', __LINE__, __FILE__, $sql);
}
 
$row = $db->sql_fetchrow($result);
 
if ( $row['group_moderator'] != $userdata['user_id'] && $userdata['user_level'] != ADMIN )
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">')
);
 
$message = $lang['Not_group_moderator'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
}
 
$sql = "UPDATE " . GROUPS_TABLE . "
SET group_type = " . intval($HTTP_POST_VARS['group_type']) . "
WHERE group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user and group information', '', __LINE__, __FILE__, $sql);
}
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">')
);
 
$message = $lang['Group_type_updated'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
 
}
else if ( isset($HTTP_POST_VARS['joingroup']) && $group_id )
{
//
// First, joining a group
// If the user isn't logged in redirect them to login
//
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
}
 
$sql = "SELECT ug.user_id, g.group_type
FROM " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
WHERE g.group_id = $group_id
AND g.group_type <> " . GROUP_HIDDEN . "
AND ug.group_id = g.group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user and group information', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
if ( $row['group_type'] == GROUP_OPEN )
{
do
{
if ( $userdata['user_id'] == $row['user_id'] )
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">')
);
 
$message = $lang['Already_member_group'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
}
} while ( $row = $db->sql_fetchrow($result) );
}
else
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">')
);
 
$message = $lang['This_closed_group'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
}
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_groups_exist']);
}
 
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending)
VALUES ($group_id, " . $userdata['user_id'] . ", 1)";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Error inserting user group subscription", "", __LINE__, __FILE__, $sql);
}
 
$sql = "SELECT u.user_email, u.username, u.user_lang, g.group_name
FROM ".USERS_TABLE . " u, " . GROUPS_TABLE . " g
WHERE u.user_id = g.group_moderator
AND g.group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Error getting group moderator data", "", __LINE__, __FILE__, $sql);
}
 
$moderator = $db->sql_fetchrow($result);
 
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
 
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
 
$emailer->use_template('group_request', $moderator['user_lang']);
$emailer->email_address($moderator['user_email']);
$emailer->set_subject($lang['Group_request']);
 
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'GROUP_MODERATOR' => $moderator['username'],
'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',
 
'U_GROUPCP' => $server_url . '?' . POST_GROUPS_URL . "=$group_id&validate=true")
);
$emailer->send();
$emailer->reset();
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">')
);
 
$message = $lang['Group_joined'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
}
else if ( isset($HTTP_POST_VARS['unsub']) || isset($HTTP_POST_VARS['unsubpending']) && $group_id )
{
//
// Second, unsubscribing from a group
// Check for confirmation of unsub.
//
if ( $cancel )
{
redirect(append_sid("groupcp.$phpEx", true));
}
elseif ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
}
 
if ( $confirm )
{
$sql = "DELETE FROM " . USER_GROUP_TABLE . "
WHERE user_id = " . $userdata['user_id'] . "
AND group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not delete group memebership data', '', __LINE__, __FILE__, $sql);
}
 
if ( $userdata['user_level'] != ADMIN && $userdata['user_level'] == MOD )
{
$sql = "SELECT COUNT(auth_mod) AS is_auth_mod
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug
WHERE ug.user_id = " . $userdata['user_id'] . "
AND aa.group_id = ug.group_id
AND aa.auth_mod = 1";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain moderator status', '', __LINE__, __FILE__, $sql);
}
 
if ( !($row = $db->sql_fetchrow($result)) || $row['is_auth_mod'] == 0 )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . USER . "
WHERE user_id = " . $userdata['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql);
}
}
}
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">')
);
 
$message = $lang['Unsub_success'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
}
else
{
$unsub_msg = ( isset($HTTP_POST_VARS['unsub']) ) ? $lang['Confirm_unsub'] : $lang['Confirm_unsub_pending'];
 
$s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" /><input type="hidden" name="unsub" value="1" />';
 
$page_title = $lang['Group_Control_Panel'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'confirm' => 'confirm_body.tpl')
);
 
$template->assign_vars(array(
'MESSAGE_TITLE' => $lang['Confirm'],
'MESSAGE_TEXT' => $unsub_msg,
'L_YES' => $lang['Yes'],
'L_NO' => $lang['No'],
'S_CONFIRM_ACTION' => append_sid("groupcp.$phpEx"),
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
 
$template->pparse('confirm');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
 
}
else if ( $group_id )
{
//
// Did the group moderator get here through an email?
// If so, check to see if they are logged in.
//
if ( isset($HTTP_GET_VARS['validate']) )
{
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
}
}
 
//
// For security, get the ID of the group moderator.
//
switch(SQL_LAYER)
{
case 'postgresql':
$sql = "SELECT g.group_moderator, g.group_type, aa.auth_mod
FROM " . GROUPS_TABLE . " g, " . AUTH_ACCESS_TABLE . " aa
WHERE g.group_id = $group_id
AND aa.group_id = g.group_id
UNION (
SELECT g.group_moderator, g.group_type, NULL
FROM " . GROUPS_TABLE . " g
WHERE g.group_id = $group_id
AND NOT EXISTS (
SELECT aa.group_id
FROM " . AUTH_ACCESS_TABLE . " aa
WHERE aa.group_id = g.group_id
)
)";
break;
 
case 'oracle':
$sql = "SELECT g.group_moderator, g.group_type, aa.auth_mod
FROM " . GROUPS_TABLE . " g, " . AUTH_ACCESS_TABLE . " aa
WHERE g.group_id = $group_id
AND aa.group_id (+) = g.group_id";
break;
 
default:
$sql = "SELECT g.group_moderator, g.group_type, aa.auth_mod
FROM ( " . GROUPS_TABLE . " g
LEFT JOIN " . AUTH_ACCESS_TABLE . " aa ON aa.group_id = g.group_id )
WHERE g.group_id = $group_id";
break;
}
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get moderator information', '', __LINE__, __FILE__, $sql);
}
 
if ( $group_info = $db->sql_fetchrow($result) )
{
$group_moderator = $group_info['group_moderator'];
if ( $group_moderator == $userdata['user_id'] || $userdata['user_level'] == ADMIN )
{
$is_moderator = TRUE;
}
//
// Handle Additions, removals, approvals and denials
//
if ( !empty($HTTP_POST_VARS['add']) || !empty($HTTP_POST_VARS['remove']) || isset($HTTP_POST_VARS['approve']) || isset($HTTP_POST_VARS['deny']) )
{
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
}
 
if ( !$is_moderator )
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">')
);
 
$message = $lang['Not_group_moderator'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
}
 
if ( isset($HTTP_POST_VARS['add']) )
{
$username = ( isset($HTTP_POST_VARS['username']) ) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
$sql = "SELECT user_id, user_email, user_lang, user_level
FROM " . USERS_TABLE . "
WHERE username = '" . str_replace("\'", "''", $username) . "'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not get user information", $lang['Error'], __LINE__, __FILE__, $sql);
}
 
if ( !($row = $db->sql_fetchrow($result)) )
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">')
);
 
$message = $lang['Could_not_add_user'] . "<br /><br />" . sprintf($lang['Click_return_group'], "<a href=\"" . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_index'], "<a href=\"" . append_sid("index.$phpEx") . "\">", "</a>");
 
message_die(GENERAL_MESSAGE, $message);
}
 
if ( $row['user_id'] == ANONYMOUS )
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">')
);
 
$message = $lang['Could_not_anon_user'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
}
$sql = "SELECT ug.user_id, u.user_level
FROM " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u
WHERE u.user_id = " . $row['user_id'] . "
AND ug.user_id = u.user_id
AND ug.group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get user information', '', __LINE__, __FILE__, $sql);
}
 
if ( !($db->sql_fetchrow($result)) )
{
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending)
VALUES (" . $row['user_id'] . ", $group_id, 0)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not add user to group', '', __LINE__, __FILE__, $sql);
}
if ( $row['user_level'] != ADMIN && $row['user_level'] != MOD && $group_info['auth_mod'] )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . MOD . "
WHERE user_id = " . $row['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql);
}
}
 
//
// Get the group name
// Email the user and tell them they're in the group
//
$group_sql = "SELECT group_name
FROM " . GROUPS_TABLE . "
WHERE group_id = $group_id";
if ( !($result = $db->sql_query($group_sql)) )
{
message_die(GENERAL_ERROR, 'Could not get group information', '', __LINE__, __FILE__, $group_sql);
}
 
$group_name_row = $db->sql_fetchrow($result);
 
$group_name = $group_name_row['group_name'];
 
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
 
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
 
$emailer->use_template('group_added', $row['user_lang']);
$emailer->email_address($row['user_email']);
$emailer->set_subject($lang['Group_added']);
 
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'GROUP_NAME' => $group_name,
'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',
 
'U_GROUPCP' => $server_url . '?' . POST_GROUPS_URL . "=$group_id")
);
$emailer->send();
$emailer->reset();
}
else
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">')
);
 
$message = $lang['User_is_member_group'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
}
}
else
{
if ( ( ( isset($HTTP_POST_VARS['approve']) || isset($HTTP_POST_VARS['deny']) ) && isset($HTTP_POST_VARS['pending_members']) ) || ( isset($HTTP_POST_VARS['remove']) && isset($HTTP_POST_VARS['members']) ) )
{
 
$members = ( isset($HTTP_POST_VARS['approve']) || isset($HTTP_POST_VARS['deny']) ) ? $HTTP_POST_VARS['pending_members'] : $HTTP_POST_VARS['members'];
 
$sql_in = '';
for($i = 0; $i < count($members); $i++)
{
$sql_in .= ( ( $sql_in != '' ) ? ', ' : '' ) . intval($members[$i]);
}
 
if ( isset($HTTP_POST_VARS['approve']) )
{
if ( $group_info['auth_mod'] )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . MOD . "
WHERE user_id IN ($sql_in)
AND user_level NOT IN (" . MOD . ", " . ADMIN . ")";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql);
}
}
 
$sql = "UPDATE " . USER_GROUP_TABLE . "
SET user_pending = 0
WHERE user_id IN ($sql_in)
AND group_id = $group_id";
$sql_select = "SELECT user_email
FROM ". USERS_TABLE . "
WHERE user_id IN ($sql_in)";
}
else if ( isset($HTTP_POST_VARS['deny']) || isset($HTTP_POST_VARS['remove']) )
{
if ( $group_info['auth_mod'] )
{
$sql = "SELECT ug.user_id, ug.group_id
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug
WHERE ug.user_id IN ($sql_in)
AND aa.group_id = ug.group_id
AND aa.auth_mod = 1
GROUP BY ug.user_id, ug.group_id
ORDER BY ug.user_id, ug.group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain moderator status', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
$group_check = array();
$remove_mod_sql = '';
 
do
{
$group_check[$row['user_id']][] = $row['group_id'];
}
while ( $row = $db->sql_fetchrow($result) );
 
while( list($user_id, $group_list) = @each($group_check) )
{
if ( count($group_list) == 1 )
{
$remove_mod_sql .= ( ( $remove_mod_sql != '' ) ? ', ' : '' ) . $user_id;
}
}
 
if ( $remove_mod_sql != '' )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . USER . "
WHERE user_id IN ($remove_mod_sql)
AND user_level NOT IN (" . ADMIN . ")";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql);
}
}
}
}
 
$sql = "DELETE FROM " . USER_GROUP_TABLE . "
WHERE user_id IN ($sql_in)
AND group_id = $group_id";
}
 
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update user group table', '', __LINE__, __FILE__, $sql);
}
 
//
// Email users when they are approved
//
if ( isset($HTTP_POST_VARS['approve']) )
{
if ( !($result = $db->sql_query($sql_select)) )
{
message_die(GENERAL_ERROR, 'Could not get user email information', '', __LINE__, __FILE__, $sql);
}
 
$bcc_list = array();
while ($row = $db->sql_fetchrow($result))
{
$bcc_list[] = $row['user_email'];
}
 
//
// Get the group name
//
$group_sql = "SELECT group_name
FROM " . GROUPS_TABLE . "
WHERE group_id = $group_id";
if ( !($result = $db->sql_query($group_sql)) )
{
message_die(GENERAL_ERROR, 'Could not get group information', '', __LINE__, __FILE__, $group_sql);
}
 
$group_name_row = $db->sql_fetchrow($result);
$group_name = $group_name_row['group_name'];
 
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
 
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
 
for ($i = 0; $i < count($bcc_list); $i++)
{
$emailer->bcc($bcc_list[$i]);
}
 
$emailer->use_template('group_approved');
$emailer->set_subject($lang['Group_approved']);
 
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'GROUP_NAME' => $group_name,
'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',
 
'U_GROUPCP' => $server_url . '?' . POST_GROUPS_URL . "=$group_id")
);
$emailer->send();
$emailer->reset();
}
}
}
}
//
// END approve or deny
//
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_groups_exist']);
}
 
//
// Get group details
//
$sql = "SELECT *
FROM " . GROUPS_TABLE . "
WHERE group_id = $group_id
AND group_single_user = 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error getting group information', '', __LINE__, __FILE__, $sql);
}
 
if ( !($group_info = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_MESSAGE, $lang['Group_not_exist']);
}
 
//
// Get moderator details for this group
//
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm
FROM " . USERS_TABLE . "
WHERE user_id = " . $group_info['group_moderator'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error getting user list for group', '', __LINE__, __FILE__, $sql);
}
 
$group_moderator = $db->sql_fetchrow($result);
 
//
// Get user information for this group
//
$sql = "SELECT u.username, u.user_id, u.user_viewemail, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_msnm, ug.user_pending
FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug
WHERE ug.group_id = $group_id
AND u.user_id = ug.user_id
AND ug.user_pending = 0
AND ug.user_id <> " . $group_moderator['user_id'] . "
ORDER BY u.username";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error getting user list for group', '', __LINE__, __FILE__, $sql);
}
 
$group_members = $db->sql_fetchrowset($result);
$members_count = count($group_members);
$db->sql_freeresult($result);
 
$sql = "SELECT u.username, u.user_id, u.user_viewemail, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_msnm
FROM " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u
WHERE ug.group_id = $group_id
AND g.group_id = ug.group_id
AND ug.user_pending = 1
AND u.user_id = ug.user_id
ORDER BY u.username";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error getting user pending information', '', __LINE__, __FILE__, $sql);
}
 
$modgroup_pending_list = $db->sql_fetchrowset($result);
$modgroup_pending_count = count($modgroup_pending_list);
$db->sql_freeresult($result);
 
$is_group_member = 0;
if ( $members_count )
{
for($i = 0; $i < $members_count; $i++)
{
if ( $group_members[$i]['user_id'] == $userdata['user_id'] && $userdata['session_logged_in'] )
{
$is_group_member = TRUE;
}
}
}
 
$is_group_pending_member = 0;
if ( $modgroup_pending_count )
{
for($i = 0; $i < $modgroup_pending_count; $i++)
{
if ( $modgroup_pending_list[$i]['user_id'] == $userdata['user_id'] && $userdata['session_logged_in'] )
{
$is_group_pending_member = TRUE;
}
}
}
 
if ( $userdata['user_level'] == ADMIN )
{
$is_moderator = TRUE;
}
 
if ( $userdata['user_id'] == $group_info['group_moderator'] )
{
$is_moderator = TRUE;
 
$group_details = $lang['Are_group_moderator'];
 
$s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />';
}
else if ( $is_group_member || $is_group_pending_member )
{
$template->assign_block_vars('switch_unsubscribe_group_input', array());
 
$group_details = ( $is_group_pending_member ) ? $lang['Pending_this_group'] : $lang['Member_this_group'];
 
$s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />';
}
else if ( $userdata['user_id'] == ANONYMOUS )
{
$group_details = $lang['Login_to_join'];
$s_hidden_fields = '';
}
else
{
if ( $group_info['group_type'] == GROUP_OPEN )
{
$template->assign_block_vars('switch_subscribe_group_input', array());
 
$group_details = $lang['This_open_group'];
$s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />';
}
else if ( $group_info['group_type'] == GROUP_CLOSED )
{
$group_details = $lang['This_closed_group'];
$s_hidden_fields = '';
}
else if ( $group_info['group_type'] == GROUP_HIDDEN )
{
$group_details = $lang['This_hidden_group'];
$s_hidden_fields = '';
}
}
 
$page_title = $lang['Group_Control_Panel'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
//
// Load templates
//
$template->set_filenames(array(
'info' => 'groupcp_info_body.tpl',
'pendinginfo' => 'groupcp_pending_info.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
 
//
// Add the moderator
//
$username = $group_moderator['username'];
$user_id = $group_moderator['user_id'];
 
generate_user_info($group_moderator, $board_config['default_dateformat'], $is_moderator, $from, $posts, $joined, $poster_avatar, $profile_img, $profile, $search_img, $search, $pm_img, $pm, $email_img, $email, $www_img, $www, $icq_status_img, $icq_img, $icq, $aim_img, $aim, $msn_img, $msn, $yim_img, $yim);
 
$s_hidden_fields .= '';
 
$template->assign_vars(array(
'L_GROUP_INFORMATION' => $lang['Group_Information'],
'L_GROUP_NAME' => $lang['Group_name'],
'L_GROUP_DESC' => $lang['Group_description'],
'L_GROUP_TYPE' => $lang['Group_type'],
'L_GROUP_MEMBERSHIP' => $lang['Group_membership'],
'L_SUBSCRIBE' => $lang['Subscribe'],
'L_UNSUBSCRIBE' => $lang['Unsubscribe'],
'L_JOIN_GROUP' => $lang['Join_group'],
'L_UNSUBSCRIBE_GROUP' => $lang['Unsubscribe'],
'L_GROUP_OPEN' => $lang['Group_open'],
'L_GROUP_CLOSED' => $lang['Group_closed'],
'L_GROUP_HIDDEN' => $lang['Group_hidden'],
'L_UPDATE' => $lang['Update'],
'L_GROUP_MODERATOR' => $lang['Group_Moderator'],
'L_GROUP_MEMBERS' => $lang['Group_Members'],
'L_PENDING_MEMBERS' => $lang['Pending_members'],
'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'],
'L_PM' => $lang['Private_Message'],
'L_EMAIL' => $lang['Email'],
'L_POSTS' => $lang['Posts'],
'L_WEBSITE' => $lang['Website'],
'L_FROM' => $lang['Location'],
'L_ORDER' => $lang['Order'],
'L_SORT' => $lang['Sort'],
'L_SUBMIT' => $lang['Sort'],
'L_AIM' => $lang['AIM'],
'L_YIM' => $lang['YIM'],
'L_MSNM' => $lang['MSNM'],
'L_ICQ' => $lang['ICQ'],
'L_SELECT' => $lang['Select'],
'L_REMOVE_SELECTED' => $lang['Remove_selected'],
'L_ADD_MEMBER' => $lang['Add_member'],
'L_FIND_USERNAME' => $lang['Find_username'],
 
'GROUP_NAME' => $group_info['group_name'],
'GROUP_DESC' => $group_info['group_description'],
'GROUP_DETAILS' => $group_details,
'MOD_ROW_COLOR' => '#' . $theme['td_color1'],
'MOD_ROW_CLASS' => $theme['td_class1'],
'MOD_USERNAME' => $username,
'MOD_FROM' => $from,
'MOD_JOINED' => $joined,
'MOD_POSTS' => $posts,
'MOD_AVATAR_IMG' => $poster_avatar,
'MOD_PROFILE_IMG' => $profile_img,
'MOD_PROFILE' => $profile,
'MOD_SEARCH_IMG' => $search_img,
'MOD_SEARCH' => $search,
'MOD_PM_IMG' => $pm_img,
'MOD_PM' => $pm,
'MOD_EMAIL_IMG' => $email_img,
'MOD_EMAIL' => $email,
'MOD_WWW_IMG' => $www_img,
'MOD_WWW' => $www,
'MOD_ICQ_STATUS_IMG' => $icq_status_img,
'MOD_ICQ_IMG' => $icq_img,
'MOD_ICQ' => $icq,
'MOD_AIM_IMG' => $aim_img,
'MOD_AIM' => $aim,
'MOD_MSN_IMG' => $msn_img,
'MOD_MSN' => $msn,
'MOD_YIM_IMG' => $yim_img,
'MOD_YIM' => $yim,
 
'U_MOD_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$user_id"),
'U_SEARCH_USER' => append_sid("search.$phpEx?mode=searchuser"),
 
'S_GROUP_OPEN_TYPE' => GROUP_OPEN,
'S_GROUP_CLOSED_TYPE' => GROUP_CLOSED,
'S_GROUP_HIDDEN_TYPE' => GROUP_HIDDEN,
'S_GROUP_OPEN_CHECKED' => ( $group_info['group_type'] == GROUP_OPEN ) ? ' checked="checked"' : '',
'S_GROUP_CLOSED_CHECKED' => ( $group_info['group_type'] == GROUP_CLOSED ) ? ' checked="checked"' : '',
'S_GROUP_HIDDEN_CHECKED' => ( $group_info['group_type'] == GROUP_HIDDEN ) ? ' checked="checked"' : '',
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_MODE_SELECT' => $select_sort_mode,
'S_ORDER_SELECT' => $select_sort_order,
'S_GROUPCP_ACTION' => append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id"))
);
 
//
// Dump out the remaining users
//
for($i = $start; $i < min($board_config['topics_per_page'] + $start, $members_count); $i++)
{
$username = $group_members[$i]['username'];
$user_id = $group_members[$i]['user_id'];
 
generate_user_info($group_members[$i], $board_config['default_dateformat'], $is_moderator, $from, $posts, $joined, $poster_avatar, $profile_img, $profile, $search_img, $search, $pm_img, $pm, $email_img, $email, $www_img, $www, $icq_status_img, $icq_img, $icq, $aim_img, $aim, $msn_img, $msn, $yim_img, $yim);
 
if ( $group_info['group_type'] != GROUP_HIDDEN || $is_group_member || $is_moderator )
{
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
$template->assign_block_vars('member_row', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'USERNAME' => $username,
'FROM' => $from,
'JOINED' => $joined,
'POSTS' => $posts,
'USER_ID' => $user_id,
'AVATAR_IMG' => $poster_avatar,
'PROFILE_IMG' => $profile_img,
'PROFILE' => $profile,
'SEARCH_IMG' => $search_img,
'SEARCH' => $search,
'PM_IMG' => $pm_img,
'PM' => $pm,
'EMAIL_IMG' => $email_img,
'EMAIL' => $email,
'WWW_IMG' => $www_img,
'WWW' => $www,
'ICQ_STATUS_IMG' => $icq_status_img,
'ICQ_IMG' => $icq_img,
'ICQ' => $icq,
'AIM_IMG' => $aim_img,
'AIM' => $aim,
'MSN_IMG' => $msn_img,
'MSN' => $msn,
'YIM_IMG' => $yim_img,
'YIM' => $yim,
'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$user_id"))
);
 
if ( $is_moderator )
{
$template->assign_block_vars('member_row.switch_mod_option', array());
}
}
}
 
if ( !$members_count )
{
//
// No group members
//
$template->assign_block_vars('switch_no_members', array());
$template->assign_vars(array(
'L_NO_MEMBERS' => $lang['No_group_members'])
);
}
 
$current_page = ( !$members_count ) ? 1 : ceil( $members_count / $board_config['topics_per_page'] );
 
$template->assign_vars(array(
'PAGINATION' => generate_pagination("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id", $members_count, $board_config['topics_per_page'], $start),
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), $current_page ),
 
'L_GOTO_PAGE' => $lang['Goto_page'])
);
 
if ( $group_info['group_type'] == GROUP_HIDDEN && !$is_group_member && !$is_moderator )
{
//
// No group members
//
$template->assign_block_vars('switch_hidden_group', array());
$template->assign_vars(array(
'L_HIDDEN_MEMBERS' => $lang['Group_hidden_members'])
);
}
 
//
// We've displayed the members who belong to the group, now we
// do that pending memebers...
//
if ( $is_moderator )
{
//
// Users pending in ONLY THIS GROUP (which is moderated by this user)
//
if ( $modgroup_pending_count )
{
for($i = 0; $i < $modgroup_pending_count; $i++)
{
$username = $modgroup_pending_list[$i]['username'];
$user_id = $modgroup_pending_list[$i]['user_id'];
 
generate_user_info($modgroup_pending_list[$i], $board_config['default_dateformat'], $is_moderator, $from, $posts, $joined, $poster_avatar, $profile_img, $profile, $search_img, $search, $pm_img, $pm, $email_img, $email, $www_img, $www, $icq_status_img, $icq_img, $icq, $aim_img, $aim, $msn_img, $msn, $yim_img, $yim);
 
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
$user_select = '<input type="checkbox" name="member[]" value="' . $user_id . '">';
 
$template->assign_block_vars('pending_members_row', array(
'ROW_CLASS' => $row_class,
'ROW_COLOR' => '#' . $row_color,
'USERNAME' => $username,
'FROM' => $from,
'JOINED' => $joined,
'POSTS' => $posts,
'USER_ID' => $user_id,
'AVATAR_IMG' => $poster_avatar,
'PROFILE_IMG' => $profile_img,
'PROFILE' => $profile,
'SEARCH_IMG' => $search_img,
'SEARCH' => $search,
'PM_IMG' => $pm_img,
'PM' => $pm,
'EMAIL_IMG' => $email_img,
'EMAIL' => $email,
'WWW_IMG' => $www_img,
'WWW' => $www,
'ICQ_STATUS_IMG' => $icq_status_img,
'ICQ_IMG' => $icq_img,
'ICQ' => $icq,
'AIM_IMG' => $aim_img,
'AIM' => $aim,
'MSN_IMG' => $msn_img,
'MSN' => $msn,
'YIM_IMG' => $yim_img,
'YIM' => $yim,
'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$user_id"))
);
}
 
$template->assign_block_vars('switch_pending_members', array() );
 
$template->assign_vars(array(
'L_SELECT' => $lang['Select'],
'L_APPROVE_SELECTED' => $lang['Approve_selected'],
'L_DENY_SELECTED' => $lang['Deny_selected'])
);
 
$template->assign_var_from_handle('PENDING_USER_BOX', 'pendinginfo');
}
}
 
if ( $is_moderator )
{
$template->assign_block_vars('switch_mod_option', array());
$template->assign_block_vars('switch_add_member', array());
}
 
$template->pparse('info');
}
else
{
//
// Show the main groupcp.php screen where the user can select a group.
//
// Select all group that the user is a member of or where the user has
// a pending membership.
//
$in_group = array();
if ( $userdata['session_logged_in'] )
{
$sql = "SELECT g.group_id, g.group_name, g.group_type, ug.user_pending
FROM " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug
WHERE ug.user_id = " . $userdata['user_id'] . "
AND ug.group_id = g.group_id
AND g.group_single_user <> " . TRUE . "
ORDER BY g.group_name, ug.user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error getting group information', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
$in_group = array();
$s_member_groups_opt = '';
$s_pending_groups_opt = '';
 
do
{
$in_group[] = $row['group_id'];
if ( $row['user_pending'] )
{
$s_pending_groups_opt .= '<option value="' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
}
else
{
$s_member_groups_opt .= '<option value="' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
}
}
while( $row = $db->sql_fetchrow($result) );
 
$s_pending_groups = '<select name="' . POST_GROUPS_URL . '">' . $s_pending_groups_opt . "</select>";
$s_member_groups = '<select name="' . POST_GROUPS_URL . '">' . $s_member_groups_opt . "</select>";
}
}
 
//
// Select all other groups i.e. groups that this user is not a member of
//
$ignore_group_sql = ( count($in_group) ) ? "AND group_id NOT IN (" . implode(', ', $in_group) . ")" : '';
$sql = "SELECT group_id, group_name, group_type
FROM " . GROUPS_TABLE . " g
WHERE group_single_user <> " . TRUE . "
$ignore_group_sql
ORDER BY g.group_name";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error getting group information', '', __LINE__, __FILE__, $sql);
}
 
$s_group_list_opt = '';
while( $row = $db->sql_fetchrow($result) )
{
if ( $row['group_type'] != GROUP_HIDDEN || $userdata['user_level'] == ADMIN )
{
$s_group_list_opt .='<option value="' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
}
}
$s_group_list = '<select name="' . POST_GROUPS_URL . '">' . $s_group_list_opt . '</select>';
 
if ( $s_group_list_opt != '' || $s_pending_groups_opt != '' || $s_member_groups_opt != '' )
{
//
// Load and process templates
//
$page_title = $lang['Group_Control_Panel'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'user' => 'groupcp_user_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
 
if ( $s_pending_groups_opt != '' || $s_member_groups_opt != '' )
{
$template->assign_block_vars('switch_groups_joined', array() );
}
 
if ( $s_member_groups_opt != '' )
{
$template->assign_block_vars('switch_groups_joined.switch_groups_member', array() );
}
 
if ( $s_pending_groups_opt != '' )
{
$template->assign_block_vars('switch_groups_joined.switch_groups_pending', array() );
}
 
if ( $s_group_list_opt != '' )
{
$template->assign_block_vars('switch_groups_remaining', array() );
}
 
$s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
 
$template->assign_vars(array(
'L_GROUP_MEMBERSHIP_DETAILS' => $lang['Group_member_details'],
'L_JOIN_A_GROUP' => $lang['Group_member_join'],
'L_YOU_BELONG_GROUPS' => $lang['Current_memberships'],
'L_SELECT_A_GROUP' => $lang['Non_member_groups'],
'L_PENDING_GROUPS' => $lang['Memberships_pending'],
'L_SUBSCRIBE' => $lang['Subscribe'],
'L_UNSUBSCRIBE' => $lang['Unsubscribe'],
'L_VIEW_INFORMATION' => $lang['View_Information'],
 
'S_USERGROUP_ACTION' => append_sid("groupcp.$phpEx"),
'S_HIDDEN_FIELDS' => $s_hidden_fields,
 
'GROUP_LIST_SELECT' => $s_group_list,
'GROUP_PENDING_SELECT' => $s_pending_groups,
'GROUP_MEMBER_SELECT' => $s_member_groups)
);
 
$template->pparse('user');
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_groups_exist']);
}
 
}
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
?>
/Forum/images/avatars/gallery/index.htm
0,0 → 1,10
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
 
</body>
</html>
/Forum/images/avatars/index.htm
0,0 → 1,10
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
 
</body>
</html>
/Forum/images/index.htm
0,0 → 1,10
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
 
</body>
</html>
/Forum/images/smiles/icon_arrow.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_biggrin.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_confused.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_cool.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_cry.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_eek.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_evil.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_exclaim.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_frown.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_idea.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_lol.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_mad.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_mrgreen.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_neutral.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_question.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_razz.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_redface.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_rolleyes.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_sad.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_smile.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_surprised.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_twisted.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/smiles/icon_wink.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/images/spacer.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/includes/auth.php
0,0 → 1,328
<?php
/***************************************************************************
* auth.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: auth.php,v 1.37.2.7 2006/03/06 17:28:51 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
/*
$type's accepted (pre-pend with AUTH_):
VIEW, READ, POST, REPLY, EDIT, DELETE, STICKY, ANNOUNCE, VOTE, POLLCREATE
 
Possible options ($type/forum_id combinations):
 
* If you include a type and forum_id then a specific lookup will be done and
the single result returned
 
* If you set type to AUTH_ALL and specify a forum_id an array of all auth types
will be returned
 
* If you provide a forum_id a specific lookup on that forum will be done
 
* If you set forum_id to AUTH_LIST_ALL and specify a type an array listing the
results for all forums will be returned
 
* If you set forum_id to AUTH_LIST_ALL and type to AUTH_ALL a multidimensional
array containing the auth permissions for all types and all forums for that
user is returned
 
All results are returned as associative arrays, even when a single auth type is
specified.
 
If available you can send an array (either one or two dimensional) containing the
forum auth levels, this will prevent the auth function having to do its own
lookup
*/
function auth($type, $forum_id, $userdata, $f_access = '')
{
global $db, $lang;
 
switch( $type )
{
case AUTH_ALL:
$a_sql = 'a.auth_view, a.auth_read, a.auth_post, a.auth_reply, a.auth_edit, a.auth_delete, a.auth_sticky, a.auth_announce, a.auth_vote, a.auth_pollcreate';
$auth_fields = array('auth_view', 'auth_read', 'auth_post', 'auth_reply', 'auth_edit', 'auth_delete', 'auth_sticky', 'auth_announce', 'auth_vote', 'auth_pollcreate');
break;
 
case AUTH_VIEW:
$a_sql = 'a.auth_view';
$auth_fields = array('auth_view');
break;
 
case AUTH_READ:
$a_sql = 'a.auth_read';
$auth_fields = array('auth_read');
break;
case AUTH_POST:
$a_sql = 'a.auth_post';
$auth_fields = array('auth_post');
break;
case AUTH_REPLY:
$a_sql = 'a.auth_reply';
$auth_fields = array('auth_reply');
break;
case AUTH_EDIT:
$a_sql = 'a.auth_edit';
$auth_fields = array('auth_edit');
break;
case AUTH_DELETE:
$a_sql = 'a.auth_delete';
$auth_fields = array('auth_delete');
break;
 
case AUTH_ANNOUNCE:
$a_sql = 'a.auth_announce';
$auth_fields = array('auth_announce');
break;
case AUTH_STICKY:
$a_sql = 'a.auth_sticky';
$auth_fields = array('auth_sticky');
break;
 
case AUTH_POLLCREATE:
$a_sql = 'a.auth_pollcreate';
$auth_fields = array('auth_pollcreate');
break;
case AUTH_VOTE:
$a_sql = 'a.auth_vote';
$auth_fields = array('auth_vote');
break;
case AUTH_ATTACH:
break;
 
default:
break;
}
 
//
// If f_access has been passed, or auth is needed to return an array of forums
// then we need to pull the auth information on the given forum (or all forums)
//
if ( empty($f_access) )
{
$forum_match_sql = ( $forum_id != AUTH_LIST_ALL ) ? "WHERE a.forum_id = $forum_id" : '';
 
$sql = "SELECT a.forum_id, $a_sql
FROM " . FORUMS_TABLE . " a
$forum_match_sql";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Failed obtaining forum access control lists', '', __LINE__, __FILE__, $sql);
}
 
$sql_fetchrow = ( $forum_id != AUTH_LIST_ALL ) ? 'sql_fetchrow' : 'sql_fetchrowset';
 
if ( !($f_access = $db->$sql_fetchrow($result)) )
{
$db->sql_freeresult($result);
return array();
}
$db->sql_freeresult($result);
}
 
//
// If the user isn't logged on then all we need do is check if the forum
// has the type set to ALL, if yes they are good to go, if not then they
// are denied access
//
$u_access = array();
if ( $userdata['session_logged_in'] )
{
$forum_match_sql = ( $forum_id != AUTH_LIST_ALL ) ? "AND a.forum_id = $forum_id" : '';
 
$sql = "SELECT a.forum_id, $a_sql, a.auth_mod
FROM " . AUTH_ACCESS_TABLE . " a, " . USER_GROUP_TABLE . " ug
WHERE ug.user_id = ".$userdata['user_id']. "
AND ug.user_pending = 0
AND a.group_id = ug.group_id
$forum_match_sql";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Failed obtaining forum access control lists', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
do
{
if ( $forum_id != AUTH_LIST_ALL)
{
$u_access[] = $row;
}
else
{
$u_access[$row['forum_id']][] = $row;
}
}
while( $row = $db->sql_fetchrow($result) );
}
$db->sql_freeresult($result);
}
 
$is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? TRUE : 0;
 
$auth_user = array();
for($i = 0; $i < count($auth_fields); $i++)
{
$key = $auth_fields[$i];
 
//
// If the user is logged on and the forum type is either ALL or REG then the user has access
//
// If the type if ACL, MOD or ADMIN then we need to see if the user has specific permissions
// to do whatever it is they want to do ... to do this we pull relevant information for the
// user (and any groups they belong to)
//
// Now we compare the users access level against the forums. We assume here that a moderator
// and admin automatically have access to an ACL forum, similarly we assume admins meet an
// auth requirement of MOD
//
if ( $forum_id != AUTH_LIST_ALL )
{
$value = $f_access[$key];
 
switch( $value )
{
case AUTH_ALL:
$auth_user[$key] = TRUE;
$auth_user[$key . '_type'] = $lang['Auth_Anonymous_Users'];
break;
 
case AUTH_REG:
$auth_user[$key] = ( $userdata['session_logged_in'] ) ? TRUE : 0;
$auth_user[$key . '_type'] = $lang['Auth_Registered_Users'];
break;
 
case AUTH_ACL:
$auth_user[$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_ACL, $key, $u_access, $is_admin) : 0;
$auth_user[$key . '_type'] = $lang['Auth_Users_granted_access'];
break;
 
case AUTH_MOD:
$auth_user[$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access, $is_admin) : 0;
$auth_user[$key . '_type'] = $lang['Auth_Moderators'];
break;
 
case AUTH_ADMIN:
$auth_user[$key] = $is_admin;
$auth_user[$key . '_type'] = $lang['Auth_Administrators'];
break;
 
default:
$auth_user[$key] = 0;
break;
}
}
else
{
for($k = 0; $k < count($f_access); $k++)
{
$value = $f_access[$k][$key];
$f_forum_id = $f_access[$k]['forum_id'];
$u_access[$f_forum_id] = isset($u_access[$f_forum_id]) ? $u_access[$f_forum_id] : array();
 
switch( $value )
{
case AUTH_ALL:
$auth_user[$f_forum_id][$key] = TRUE;
$auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Anonymous_Users'];
break;
 
case AUTH_REG:
$auth_user[$f_forum_id][$key] = ( $userdata['session_logged_in'] ) ? TRUE : 0;
$auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Registered_Users'];
break;
 
case AUTH_ACL:
$auth_user[$f_forum_id][$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_ACL, $key, $u_access[$f_forum_id], $is_admin) : 0;
$auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Users_granted_access'];
break;
 
case AUTH_MOD:
$auth_user[$f_forum_id][$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access[$f_forum_id], $is_admin) : 0;
$auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Moderators'];
break;
 
case AUTH_ADMIN:
$auth_user[$f_forum_id][$key] = $is_admin;
$auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Administrators'];
break;
 
default:
$auth_user[$f_forum_id][$key] = 0;
break;
}
}
}
}
 
//
// Is user a moderator?
//
if ( $forum_id != AUTH_LIST_ALL )
{
$auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access, $is_admin) : 0;
}
else
{
for($k = 0; $k < count($f_access); $k++)
{
$f_forum_id = $f_access[$k]['forum_id'];
$u_access[$f_forum_id] = isset($u_access[$f_forum_id]) ? $u_access[$f_forum_id] : array();
 
$auth_user[$f_forum_id]['auth_mod'] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access[$f_forum_id], $is_admin) : 0;
}
}
 
return $auth_user;
}
 
function auth_check_user($type, $key, $u_access, $is_admin)
{
$auth_user = 0;
 
if ( count($u_access) )
{
for($j = 0; $j < count($u_access); $j++)
{
$result = 0;
switch($type)
{
case AUTH_ACL:
$result = $u_access[$j][$key];
 
case AUTH_MOD:
$result = $result || $u_access[$j]['auth_mod'];
 
case AUTH_ADMIN:
$result = $result || $is_admin;
break;
}
 
$auth_user = $auth_user || $result;
}
}
else
{
$auth_user = $is_admin;
}
 
return $auth_user;
}
 
?>
/Forum/includes/bbcode.php
0,0 → 1,790
<?php
/***************************************************************************
* bbcode.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: bbcode.php,v 1.36.2.41 2006/02/26 17:34:50 grahamje Exp $
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
 
define("BBCODE_UID_LEN", 10);
 
// global that holds loaded-and-prepared bbcode templates, so we only have to do
// that stuff once.
 
$bbcode_tpl = null;
 
/**
* Loads bbcode templates from the bbcode.tpl file of the current template set.
* Creates an array, keys are bbcode names like "b_open" or "url", values
* are the associated template.
* Probably pukes all over the place if there's something really screwed
* with the bbcode.tpl file.
*
* Nathan Codding, Sept 26 2001.
*/
function load_bbcode_template()
{
global $template;
$tpl_filename = $template->make_filename('bbcode.tpl');
$tpl = fread(fopen($tpl_filename, 'r'), filesize($tpl_filename));
 
// replace \ with \\ and then ' with \'.
$tpl = str_replace('\\', '\\\\', $tpl);
$tpl = str_replace('\'', '\\\'', $tpl);
 
// strip newlines.
$tpl = str_replace("\n", '', $tpl);
 
// Turn template blocks into PHP assignment statements for the values of $bbcode_tpls..
$tpl = preg_replace('#<!-- BEGIN (.*?) -->(.*?)<!-- END (.*?) -->#', "\n" . '$bbcode_tpls[\'\\1\'] = \'\\2\';', $tpl);
 
$bbcode_tpls = array();
 
eval($tpl);
 
return $bbcode_tpls;
}
 
 
/**
* Prepares the loaded bbcode templates for insertion into preg_replace()
* or str_replace() calls in the bbencode_second_pass functions. This
* means replacing template placeholders with the appropriate preg backrefs
* or with language vars. NOTE: If you change how the regexps work in
* bbencode_second_pass(), you MUST change this function.
*
* Nathan Codding, Sept 26 2001
*
*/
function prepare_bbcode_template($bbcode_tpl)
{
global $lang;
 
$bbcode_tpl['olist_open'] = str_replace('{LIST_TYPE}', '\\1', $bbcode_tpl['olist_open']);
 
$bbcode_tpl['color_open'] = str_replace('{COLOR}', '\\1', $bbcode_tpl['color_open']);
 
$bbcode_tpl['size_open'] = str_replace('{SIZE}', '\\1', $bbcode_tpl['size_open']);
 
$bbcode_tpl['quote_open'] = str_replace('{L_QUOTE}', $lang['Quote'], $bbcode_tpl['quote_open']);
 
$bbcode_tpl['quote_username_open'] = str_replace('{L_QUOTE}', $lang['Quote'], $bbcode_tpl['quote_username_open']);
$bbcode_tpl['quote_username_open'] = str_replace('{L_WROTE}', $lang['wrote'], $bbcode_tpl['quote_username_open']);
$bbcode_tpl['quote_username_open'] = str_replace('{USERNAME}', '\\1', $bbcode_tpl['quote_username_open']);
 
$bbcode_tpl['code_open'] = str_replace('{L_CODE}', $lang['Code'], $bbcode_tpl['code_open']);
 
$bbcode_tpl['img'] = str_replace('{URL}', '\\1', $bbcode_tpl['img']);
 
// We do URLs in several different ways..
$bbcode_tpl['url1'] = str_replace('{URL}', '\\1', $bbcode_tpl['url']);
$bbcode_tpl['url1'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url1']);
 
$bbcode_tpl['url2'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']);
$bbcode_tpl['url2'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url2']);
 
$bbcode_tpl['url3'] = str_replace('{URL}', '\\1', $bbcode_tpl['url']);
$bbcode_tpl['url3'] = str_replace('{DESCRIPTION}', '\\2', $bbcode_tpl['url3']);
 
$bbcode_tpl['url4'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']);
$bbcode_tpl['url4'] = str_replace('{DESCRIPTION}', '\\3', $bbcode_tpl['url4']);
 
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
 
define("BBCODE_TPL_READY", true);
 
return $bbcode_tpl;
}
 
 
/**
* Does second-pass bbencoding. This should be used before displaying the message in
* a thread. Assumes the message is already first-pass encoded, and we are given the
* correct UID as used in first-pass encoding.
*/
function bbencode_second_pass($text, $uid)
{
global $lang, $bbcode_tpl;
 
$text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1&#058;", $text);
 
// pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0).
// This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it.
$text = " " . $text;
 
// First: If there isn't a "[" and a "]" in the message, don't bother.
if (! (strpos($text, "[") && strpos($text, "]")) )
{
// Remove padding, return.
$text = substr($text, 1);
return $text;
}
 
// Only load the templates ONCE..
if (!defined("BBCODE_TPL_READY"))
{
// load templates from file into array.
$bbcode_tpl = load_bbcode_template();
 
// prepare array for use in regexps.
$bbcode_tpl = prepare_bbcode_template($bbcode_tpl);
}
 
// [CODE] and [/CODE] for posting code (HTML, PHP, C etc etc) in your posts.
$text = bbencode_second_pass_code($text, $uid, $bbcode_tpl);
 
// [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff.
$text = str_replace("[quote:$uid]", $bbcode_tpl['quote_open'], $text);
$text = str_replace("[/quote:$uid]", $bbcode_tpl['quote_close'], $text);
 
// New one liner to deal with opening quotes with usernames...
// replaces the two line version that I had here before..
$text = preg_replace("/\[quote:$uid=\"(.*?)\"\]/si", $bbcode_tpl['quote_username_open'], $text);
 
// [list] and [list=x] for (un)ordered lists.
// unordered lists
$text = str_replace("[list:$uid]", $bbcode_tpl['ulist_open'], $text);
// li tags
$text = str_replace("[*:$uid]", $bbcode_tpl['listitem'], $text);
// ending tags
$text = str_replace("[/list:u:$uid]", $bbcode_tpl['ulist_close'], $text);
$text = str_replace("[/list:o:$uid]", $bbcode_tpl['olist_close'], $text);
// Ordered lists
$text = preg_replace("/\[list=([a1]):$uid\]/si", $bbcode_tpl['olist_open'], $text);
 
// colours
$text = preg_replace("/\[color=(\#[0-9A-F]{6}|[a-z]+):$uid\]/si", $bbcode_tpl['color_open'], $text);
$text = str_replace("[/color:$uid]", $bbcode_tpl['color_close'], $text);
 
// size
$text = preg_replace("/\[size=([1-2]?[0-9]):$uid\]/si", $bbcode_tpl['size_open'], $text);
$text = str_replace("[/size:$uid]", $bbcode_tpl['size_close'], $text);
 
// [b] and [/b] for bolding text.
$text = str_replace("[b:$uid]", $bbcode_tpl['b_open'], $text);
$text = str_replace("[/b:$uid]", $bbcode_tpl['b_close'], $text);
 
// [u] and [/u] for underlining text.
$text = str_replace("[u:$uid]", $bbcode_tpl['u_open'], $text);
$text = str_replace("[/u:$uid]", $bbcode_tpl['u_close'], $text);
 
// [i] and [/i] for italicizing text.
$text = str_replace("[i:$uid]", $bbcode_tpl['i_open'], $text);
$text = str_replace("[/i:$uid]", $bbcode_tpl['i_close'], $text);
 
// Patterns and replacements for URL and email tags..
$patterns = array();
$replacements = array();
 
// [img]image_url_here[/img] code..
// This one gets first-passed..
$patterns[] = "#\[img:$uid\]([^?](?:[^\[]+|\[(?!url))*?)\[/img:$uid\]#i";
$replacements[] = $bbcode_tpl['img'];
 
// matches a [url]xxxx://www.phpbb.com[/url] code..
$patterns[] = "#\[url\]([\w]+?://([\w\#$%&~/.\-;:=,?@\]+]+|\[(?!url=))*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url1'];
 
// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url\]((www|ftp)\.([\w\#$%&~/.\-;:=,?@\]+]+|\[(?!url=))*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url2'];
 
// [url=xxxx://www.phpbb.com]phpBB[/url] code..
$patterns[] = "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url3'];
 
// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url4'];
 
// [email]user@domain.tld[/email] code..
$patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
$replacements[] = $bbcode_tpl['email'];
 
$text = preg_replace($patterns, $replacements, $text);
 
// Remove our padding from the string..
$text = substr($text, 1);
 
return $text;
 
} // bbencode_second_pass()
 
// Need to initialize the random numbers only ONCE
mt_srand( (double) microtime() * 1000000);
 
function make_bbcode_uid()
{
// Unique ID for this message..
 
$uid = dss_rand();
$uid = substr($uid, 0, BBCODE_UID_LEN);
 
return $uid;
}
 
function bbencode_first_pass($text, $uid)
{
// pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0).
// This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it.
$text = " " . $text;
 
// [CODE] and [/CODE] for posting code (HTML, PHP, C etc etc) in your posts.
$text = bbencode_first_pass_pda($text, $uid, '[code]', '[/code]', '', true, '');
 
// [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff.
$text = bbencode_first_pass_pda($text, $uid, '[quote]', '[/quote]', '', false, '');
$text = bbencode_first_pass_pda($text, $uid, '/\[quote=\\\\&quot;(.*?)\\\\&quot;\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\"\\1\\\"]");
 
// [list] and [list=x] for (un)ordered lists.
$open_tag = array();
$open_tag[0] = "[list]";
 
// unordered..
$text = bbencode_first_pass_pda($text, $uid, $open_tag, "[/list]", "[/list:u]", false, 'replace_listitems');
 
$open_tag[0] = "[list=1]";
$open_tag[1] = "[list=a]";
 
// ordered.
$text = bbencode_first_pass_pda($text, $uid, $open_tag, "[/list]", "[/list:o]", false, 'replace_listitems');
 
// [color] and [/color] for setting text color
$text = preg_replace("#\[color=(\#[0-9A-F]{6}|[a-z\-]+)\](.*?)\[/color\]#si", "[color=\\1:$uid]\\2[/color:$uid]", $text);
 
// [size] and [/size] for setting text size
$text = preg_replace("#\[size=([1-2]?[0-9])\](.*?)\[/size\]#si", "[size=\\1:$uid]\\2[/size:$uid]", $text);
 
// [b] and [/b] for bolding text.
$text = preg_replace("#\[b\](.*?)\[/b\]#si", "[b:$uid]\\1[/b:$uid]", $text);
 
// [u] and [/u] for underlining text.
$text = preg_replace("#\[u\](.*?)\[/u\]#si", "[u:$uid]\\1[/u:$uid]", $text);
 
// [i] and [/i] for italicizing text.
$text = preg_replace("#\[i\](.*?)\[/i\]#si", "[i:$uid]\\1[/i:$uid]", $text);
 
// [img]image_url_here[/img] code..
$text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
 
// Remove our padding from the string..
return substr($text, 1);;
 
} // bbencode_first_pass()
 
/**
* $text - The text to operate on.
* $uid - The UID to add to matching tags.
* $open_tag - The opening tag to match. Can be an array of opening tags.
* $close_tag - The closing tag to match.
* $close_tag_new - The closing tag to replace with.
* $mark_lowest_level - boolean - should we specially mark the tags that occur
* at the lowest level of nesting? (useful for [code], because
* we need to match these tags first and transform HTML tags
* in their contents..
* $func - This variable should contain a string that is the name of a function.
* That function will be called when a match is found, and passed 2
* parameters: ($text, $uid). The function should return a string.
* This is used when some transformation needs to be applied to the
* text INSIDE a pair of matching tags. If this variable is FALSE or the
* empty string, it will not be executed.
* If open_tag is an array, then the pda will try to match pairs consisting of
* any element of open_tag followed by close_tag. This allows us to match things
* like [list=A]...[/list] and [list=1]...[/list] in one pass of the PDA.
*
* NOTES: - this function assumes the first character of $text is a space.
* - every opening tag and closing tag must be of the [...] format.
*/
function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_new, $mark_lowest_level, $func, $open_regexp_replace = false)
{
$open_tag_count = 0;
 
if (!$close_tag_new || ($close_tag_new == ''))
{
$close_tag_new = $close_tag;
}
 
$close_tag_length = strlen($close_tag);
$close_tag_new_length = strlen($close_tag_new);
$uid_length = strlen($uid);
 
$use_function_pointer = ($func && ($func != ''));
 
$stack = array();
 
if (is_array($open_tag))
{
if (0 == count($open_tag))
{
// No opening tags to match, so return.
return $text;
}
$open_tag_count = count($open_tag);
}
else
{
// only one opening tag. make it into a 1-element array.
$open_tag_temp = $open_tag;
$open_tag = array();
$open_tag[0] = $open_tag_temp;
$open_tag_count = 1;
}
 
$open_is_regexp = false;
 
if ($open_regexp_replace)
{
$open_is_regexp = true;
if (!is_array($open_regexp_replace))
{
$open_regexp_temp = $open_regexp_replace;
$open_regexp_replace = array();
$open_regexp_replace[0] = $open_regexp_temp;
}
}
 
if ($mark_lowest_level && $open_is_regexp)
{
message_die(GENERAL_ERROR, "Unsupported operation for bbcode_first_pass_pda().");
}
 
// Start at the 2nd char of the string, looking for opening tags.
$curr_pos = 1;
while ($curr_pos && ($curr_pos < strlen($text)))
{
$curr_pos = strpos($text, "[", $curr_pos);
 
// If not found, $curr_pos will be 0, and the loop will end.
if ($curr_pos)
{
// We found a [. It starts at $curr_pos.
// check if it's a starting or ending tag.
$found_start = false;
$which_start_tag = "";
$start_tag_index = -1;
 
for ($i = 0; $i < $open_tag_count; $i++)
{
// Grab everything until the first "]"...
$possible_start = substr($text, $curr_pos, strpos($text, ']', $curr_pos + 1) - $curr_pos + 1);
 
//
// We're going to try and catch usernames with "[' characters.
//
if( preg_match('#\[quote=\\\&quot;#si', $possible_start, $match) && !preg_match('#\[quote=\\\&quot;(.*?)\\\&quot;\]#si', $possible_start) )
{
// OK we are in a quote tag that probably contains a ] bracket.
// Grab a bit more of the string to hopefully get all of it..
if ($close_pos = strpos($text, '&quot;]', $curr_pos + 14))
{
if (strpos(substr($text, $curr_pos + 14, $close_pos - ($curr_pos + 14)), '[quote') === false)
{
$possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 7);
}
}
}
 
// Now compare, either using regexp or not.
if ($open_is_regexp)
{
$match_result = array();
if (preg_match($open_tag[$i], $possible_start, $match_result))
{
$found_start = true;
$which_start_tag = $match_result[0];
$start_tag_index = $i;
break;
}
}
else
{
// straightforward string comparison.
if (0 == strcasecmp($open_tag[$i], $possible_start))
{
$found_start = true;
$which_start_tag = $open_tag[$i];
$start_tag_index = $i;
break;
}
}
}
 
if ($found_start)
{
// We have an opening tag.
// Push its position, the text we matched, and its index in the open_tag array on to the stack, and then keep going to the right.
$match = array("pos" => $curr_pos, "tag" => $which_start_tag, "index" => $start_tag_index);
array_push($stack, $match);
//
// Rather than just increment $curr_pos
// Set it to the ending of the tag we just found
// Keeps error in nested tag from breaking out
// of table structure..
//
$curr_pos += strlen($possible_start);
}
else
{
// check for a closing tag..
$possible_end = substr($text, $curr_pos, $close_tag_length);
if (0 == strcasecmp($close_tag, $possible_end))
{
// We have an ending tag.
// Check if we've already found a matching starting tag.
if (sizeof($stack) > 0)
{
// There exists a starting tag.
$curr_nesting_depth = sizeof($stack);
// We need to do 2 replacements now.
$match = array_pop($stack);
$start_index = $match['pos'];
$start_tag = $match['tag'];
$start_length = strlen($start_tag);
$start_tag_index = $match['index'];
 
if ($open_is_regexp)
{
$start_tag = preg_replace($open_tag[$start_tag_index], $open_regexp_replace[$start_tag_index], $start_tag);
}
 
// everything before the opening tag.
$before_start_tag = substr($text, 0, $start_index);
 
// everything after the opening tag, but before the closing tag.
$between_tags = substr($text, $start_index + $start_length, $curr_pos - $start_index - $start_length);
 
// Run the given function on the text between the tags..
if ($use_function_pointer)
{
$between_tags = $func($between_tags, $uid);
}
 
// everything after the closing tag.
$after_end_tag = substr($text, $curr_pos + $close_tag_length);
 
// Mark the lowest nesting level if needed.
if ($mark_lowest_level && ($curr_nesting_depth == 1))
{
if ($open_tag[0] == '[code]')
{
$code_entities_match = array('#<#', '#>#', '#"#', '#:#', '#\[#', '#\]#', '#\(#', '#\)#', '#\{#', '#\}#');
$code_entities_replace = array('&lt;', '&gt;', '&quot;', '&#58;', '&#91;', '&#93;', '&#40;', '&#41;', '&#123;', '&#125;');
$between_tags = preg_replace($code_entities_match, $code_entities_replace, $between_tags);
}
$text = $before_start_tag . substr($start_tag, 0, $start_length - 1) . ":$curr_nesting_depth:$uid]";
$text .= $between_tags . substr($close_tag_new, 0, $close_tag_new_length - 1) . ":$curr_nesting_depth:$uid]";
}
else
{
if ($open_tag[0] == '[code]')
{
$text = $before_start_tag . '&#91;code&#93;';
$text .= $between_tags . '&#91;/code&#93;';
}
else
{
if ($open_is_regexp)
{
$text = $before_start_tag . $start_tag;
}
else
{
$text = $before_start_tag . substr($start_tag, 0, $start_length - 1) . ":$uid]";
}
$text .= $between_tags . substr($close_tag_new, 0, $close_tag_new_length - 1) . ":$uid]";
}
}
 
$text .= $after_end_tag;
 
// Now.. we've screwed up the indices by changing the length of the string.
// So, if there's anything in the stack, we want to resume searching just after it.
// otherwise, we go back to the start.
if (sizeof($stack) > 0)
{
$match = array_pop($stack);
$curr_pos = $match['pos'];
// bbcode_array_push($stack, $match);
// ++$curr_pos;
}
else
{
$curr_pos = 1;
}
}
else
{
// No matching start tag found. Increment pos, keep going.
++$curr_pos;
}
}
else
{
// No starting tag or ending tag.. Increment pos, keep looping.,
++$curr_pos;
}
}
}
} // while
 
return $text;
 
} // bbencode_first_pass_pda()
 
/**
* Does second-pass bbencoding of the [code] tags. This includes
* running htmlspecialchars() over the text contained between
* any pair of [code] tags that are at the first level of
* nesting. Tags at the first level of nesting are indicated
* by this format: [code:1:$uid] ... [/code:1:$uid]
* Other tags are in this format: [code:$uid] ... [/code:$uid]
*/
function bbencode_second_pass_code($text, $uid, $bbcode_tpl)
{
global $lang;
 
$code_start_html = $bbcode_tpl['code_open'];
$code_end_html = $bbcode_tpl['code_close'];
 
// First, do all the 1st-level matches. These need an htmlspecialchars() run,
// so they have to be handled differently.
$match_count = preg_match_all("#\[code:1:$uid\](.*?)\[/code:1:$uid\]#si", $text, $matches);
 
for ($i = 0; $i < $match_count; $i++)
{
$before_replace = $matches[1][$i];
$after_replace = $matches[1][$i];
 
// Replace 2 spaces with "&nbsp; " so non-tabbed code indents without making huge long lines.
$after_replace = str_replace(" ", "&nbsp; ", $after_replace);
// now Replace 2 spaces with " &nbsp;" to catch odd #s of spaces.
$after_replace = str_replace(" ", " &nbsp;", $after_replace);
 
// Replace tabs with "&nbsp; &nbsp;" so tabbed code indents sorta right without making huge long lines.
$after_replace = str_replace("\t", "&nbsp; &nbsp;", $after_replace);
 
// now Replace space occurring at the beginning of a line
$after_replace = preg_replace("/^ {1}/m", '&nbsp;', $after_replace);
 
$str_to_match = "[code:1:$uid]" . $before_replace . "[/code:1:$uid]";
 
$replacement = $code_start_html;
$replacement .= $after_replace;
$replacement .= $code_end_html;
 
$text = str_replace($str_to_match, $replacement, $text);
}
 
// Now, do all the non-first-level matches. These are simple.
$text = str_replace("[code:$uid]", $code_start_html, $text);
$text = str_replace("[/code:$uid]", $code_end_html, $text);
 
return $text;
 
} // bbencode_second_pass_code()
 
/**
* Rewritten by Nathan Codding - Feb 6, 2001.
* - Goes through the given string, and replaces xxxx://yyyy with an HTML <a> tag linking
* to that URL
* - Goes through the given string, and replaces www.xxxx.yyyy[zzzz] with an HTML <a> tag linking
* to http://www.xxxx.yyyy[/zzzz]
* - Goes through the given string, and replaces xxxx@yyyy with an HTML mailto: tag linking
* to that email address
* - Only matches these 2 patterns either after a space, or at the beginning of a line
*
* Notes: the email one might get annoying - it's easy to make it more restrictive, though.. maybe
* have it require something like xxxx@yyyy.zzzz or such. We'll see.
*/
function make_clickable($text)
{
$text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1&#058;", $text);
 
// pad it with a space so we can match things at the start of the 1st line.
$ret = ' ' . $text;
 
// matches an "xxxx://yyyy" URL at the start of a line, or after a space.
// xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, comma, double quote or <
$ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
 
// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// zzzz is optional.. will contain everything up to the first space, newline,
// comma, double quote or <.
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
 
// matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
$ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret);
 
// Remove our padding..
$ret = substr($ret, 1);
 
return($ret);
}
 
/**
* Nathan Codding - Feb 6, 2001
* Reverses the effects of make_clickable(), for use in editpost.
* - Does not distinguish between "www.xxxx.yyyy" and "http://aaaa.bbbb" type URLs.
*
*/
function undo_make_clickable($text)
{
$text = preg_replace("#<!-- BBCode auto-link start --><a href=\"(.*?)\" target=\"_blank\">.*?</a><!-- BBCode auto-link end -->#i", "\\1", $text);
$text = preg_replace("#<!-- BBcode auto-mailto start --><a href=\"mailto:(.*?)\">.*?</a><!-- BBCode auto-mailto end -->#i", "\\1", $text);
 
return $text;
 
}
 
/**
* Nathan Codding - August 24, 2000.
* Takes a string, and does the reverse of the PHP standard function
* htmlspecialchars().
*/
function undo_htmlspecialchars($input)
{
$input = preg_replace("/&gt;/i", ">", $input);
$input = preg_replace("/&lt;/i", "<", $input);
$input = preg_replace("/&quot;/i", "\"", $input);
$input = preg_replace("/&amp;/i", "&", $input);
 
return $input;
}
 
/**
* This is used to change a [*] tag into a [*:$uid] tag as part
* of the first-pass bbencoding of [list] tags. It fits the
* standard required in order to be passed as a variable
* function into bbencode_first_pass_pda().
*/
function replace_listitems($text, $uid)
{
$text = str_replace("[*]", "[*:$uid]", $text);
 
return $text;
}
 
/**
* Escapes the "/" character with "\/". This is useful when you need
* to stick a runtime string into a PREG regexp that is being delimited
* with slashes.
*/
function escape_slashes($input)
{
$output = str_replace('/', '\/', $input);
return $output;
}
 
/**
* This function does exactly what the PHP4 function array_push() does
* however, to keep phpBB compatable with PHP 3 we had to come up with our own
* method of doing it.
* This function was deprecated in phpBB 2.0.18
*/
function bbcode_array_push(&$stack, $value)
{
$stack[] = $value;
return(sizeof($stack));
}
 
/**
* This function does exactly what the PHP4 function array_pop() does
* however, to keep phpBB compatable with PHP 3 we had to come up with our own
* method of doing it.
* This function was deprecated in phpBB 2.0.18
*/
function bbcode_array_pop(&$stack)
{
$arrSize = count($stack);
$x = 1;
 
while(list($key, $val) = each($stack))
{
if($x < count($stack))
{
$tmpArr[] = $val;
}
else
{
$return_val = $val;
}
$x++;
}
$stack = $tmpArr;
 
return($return_val);
}
 
//
// Smilies code ... would this be better tagged on to the end of bbcode.php?
// Probably so and I'll move it before B2
//
function smilies_pass($message)
{
static $orig, $repl;
 
if (!isset($orig))
{
global $db, $board_config;
$orig = $repl = array();
 
$sql = 'SELECT * FROM ' . SMILIES_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain smilies data", "", __LINE__, __FILE__, $sql);
}
$smilies = $db->sql_fetchrowset($result);
 
if (count($smilies))
{
usort($smilies, 'smiley_sort');
}
 
for ($i = 0; $i < count($smilies); $i++)
{
$orig[] = "/(?<=.\W|\W.|^\W)" . preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
$repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" border="0" />';
}
}
 
if (count($orig))
{
$message = preg_replace($orig, $repl, ' ' . $message . ' ');
$message = substr($message, 1, -1);
}
return $message;
}
 
function smiley_sort($a, $b)
{
if ( strlen($a['code']) == strlen($b['code']) )
{
return 0;
}
 
return ( strlen($a['code']) > strlen($b['code']) ) ? -1 : 1;
}
 
?>
/Forum/includes/constants.php
0,0 → 1,183
<?php
/***************************************************************************
* constants.php
* -------------------
* begin : Saturday', Feb 13', 2001
* copyright : ('C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: constants.php,v 1.47.2.6 2005/10/30 15:17:14 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License', or
* ('at your option) any later version.
*
***************************************************************************/
 
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
 
// Debug Level
//define('DEBUG', 1); // Debugging on
define('DEBUG', 1); // Debugging off
 
 
// User Levels <- Do not change the values of USER or ADMIN
define('DELETED', -1);
define('ANONYMOUS', -1);
 
define('USER', 0);
define('ADMIN', 1);
define('MOD', 2);
 
 
// User related
define('USER_ACTIVATION_NONE', 0);
define('USER_ACTIVATION_SELF', 1);
define('USER_ACTIVATION_ADMIN', 2);
 
define('USER_AVATAR_NONE', 0);
define('USER_AVATAR_UPLOAD', 1);
define('USER_AVATAR_REMOTE', 2);
define('USER_AVATAR_GALLERY', 3);
 
 
// Group settings
define('GROUP_OPEN', 0);
define('GROUP_CLOSED', 1);
define('GROUP_HIDDEN', 2);
 
 
// Forum state
define('FORUM_UNLOCKED', 0);
define('FORUM_LOCKED', 1);
 
 
// Topic status
define('TOPIC_UNLOCKED', 0);
define('TOPIC_LOCKED', 1);
define('TOPIC_MOVED', 2);
define('TOPIC_WATCH_NOTIFIED', 1);
define('TOPIC_WATCH_UN_NOTIFIED', 0);
 
 
// Topic types
define('POST_NORMAL', 0);
define('POST_STICKY', 1);
define('POST_ANNOUNCE', 2);
define('POST_GLOBAL_ANNOUNCE', 3);
 
 
// SQL codes
define('BEGIN_TRANSACTION', 1);
define('END_TRANSACTION', 2);
 
 
// Error codes
define('GENERAL_MESSAGE', 200);
define('GENERAL_ERROR', 202);
define('CRITICAL_MESSAGE', 203);
define('CRITICAL_ERROR', 204);
 
 
// Private messaging
define('PRIVMSGS_READ_MAIL', 0);
define('PRIVMSGS_NEW_MAIL', 1);
define('PRIVMSGS_SENT_MAIL', 2);
define('PRIVMSGS_SAVED_IN_MAIL', 3);
define('PRIVMSGS_SAVED_OUT_MAIL', 4);
define('PRIVMSGS_UNREAD_MAIL', 5);
 
 
// URL PARAMETERS
define('POST_TOPIC_URL', 't');
define('POST_CAT_URL', 'c');
define('POST_FORUM_URL', 'f');
define('POST_USERS_URL', 'u');
define('POST_POST_URL', 'p');
define('POST_GROUPS_URL', 'g');
 
// Session parameters
define('SESSION_METHOD_COOKIE', 100);
define('SESSION_METHOD_GET', 101);
 
 
// Page numbers for session handling
define('PAGE_INDEX', 0);
define('PAGE_LOGIN', -1);
define('PAGE_SEARCH', -2);
define('PAGE_REGISTER', -3);
define('PAGE_PROFILE', -4);
define('PAGE_VIEWONLINE', -6);
define('PAGE_VIEWMEMBERS', -7);
define('PAGE_FAQ', -8);
define('PAGE_POSTING', -9);
define('PAGE_PRIVMSGS', -10);
define('PAGE_GROUPCP', -11);
define('PAGE_TOPIC_OFFSET', 5000);
 
 
// Auth settings
define('AUTH_LIST_ALL', 0);
define('AUTH_ALL', 0);
 
define('AUTH_REG', 1);
define('AUTH_ACL', 2);
define('AUTH_MOD', 3);
define('AUTH_ADMIN', 5);
 
define('AUTH_VIEW', 1);
define('AUTH_READ', 2);
define('AUTH_POST', 3);
define('AUTH_REPLY', 4);
define('AUTH_EDIT', 5);
define('AUTH_DELETE', 6);
define('AUTH_ANNOUNCE', 7);
define('AUTH_STICKY', 8);
define('AUTH_POLLCREATE', 9);
define('AUTH_VOTE', 10);
define('AUTH_ATTACH', 11);
 
 
// Table names
define('CONFIRM_TABLE', $table_prefix.'confirm');
define('AUTH_ACCESS_TABLE', $table_prefix.'auth_access');
define('BANLIST_TABLE', $table_prefix.'banlist');
define('CATEGORIES_TABLE', $table_prefix.'categories');
define('CONFIG_TABLE', $table_prefix.'config');
define('DISALLOW_TABLE', $table_prefix.'disallow');
define('FORUMS_TABLE', $table_prefix.'forums');
define('GROUPS_TABLE', $table_prefix.'groups');
define('POSTS_TABLE', $table_prefix.'posts');
define('POSTS_TEXT_TABLE', $table_prefix.'posts_text');
define('PRIVMSGS_TABLE', $table_prefix.'privmsgs');
define('PRIVMSGS_TEXT_TABLE', $table_prefix.'privmsgs_text');
define('PRIVMSGS_IGNORE_TABLE', $table_prefix.'privmsgs_ignore');
define('PRUNE_TABLE', $table_prefix.'forum_prune');
define('RANKS_TABLE', $table_prefix.'ranks');
define('SEARCH_TABLE', $table_prefix.'search_results');
define('SEARCH_WORD_TABLE', $table_prefix.'search_wordlist');
define('SEARCH_MATCH_TABLE', $table_prefix.'search_wordmatch');
define('SESSIONS_TABLE', $table_prefix.'sessions');
define('SESSIONS_KEYS_TABLE', $table_prefix.'sessions_keys');
define('SMILIES_TABLE', $table_prefix.'smilies');
define('THEMES_TABLE', $table_prefix.'themes');
define('THEMES_NAME_TABLE', $table_prefix.'themes_name');
define('TOPICS_TABLE', $table_prefix.'topics');
define('TOPICS_WATCH_TABLE', $table_prefix.'topics_watch');
define('USER_GROUP_TABLE', $table_prefix.'user_group');
define('USERS_TABLE', $table_prefix.'users');
define('WORDS_TABLE', $table_prefix.'words');
define('VOTE_DESC_TABLE', $table_prefix.'vote_desc');
define('VOTE_RESULTS_TABLE', $table_prefix.'vote_results');
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');
 
?>
/Forum/includes/db.php
0,0 → 1,66
<?php
/***************************************************************************
* db.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: db.php,v 1.10.2.3 2005/10/30 15:17:14 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
 
switch($dbms)
{
case 'mysql':
include($phpbb_root_path . 'db/mysql.'.$phpEx);
break;
 
case 'mysql4':
include($phpbb_root_path . 'db/mysql4.'.$phpEx);
break;
 
case 'postgres':
include($phpbb_root_path . 'db/postgres7.'.$phpEx);
break;
 
case 'mssql':
include($phpbb_root_path . 'db/mssql.'.$phpEx);
break;
 
case 'oracle':
include($phpbb_root_path . 'db/oracle.'.$phpEx);
break;
 
case 'msaccess':
include($phpbb_root_path . 'db/msaccess.'.$phpEx);
break;
 
case 'mssql-odbc':
include($phpbb_root_path . 'db/mssql-odbc.'.$phpEx);
break;
}
 
// Make the database connection.
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false);
if(!$db->db_connect_id)
{
message_die(CRITICAL_ERROR, "Could not connect to the database");
}
 
?>
/Forum/includes/emailer.php
0,0 → 1,373
<?php
/***************************************************************************
emailer.php
-------------------
begin : Sunday Aug. 12, 2001
copyright : (C) 2001 The phpBB Group
email : support@phpbb.com
 
$Id: emailer.php,v 1.15.2.35 2005/10/05 17:42:04 grahamje Exp $
 
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
//
// The emailer class has support for attaching files, that isn't implemented
// in the 2.0 release but we can probable find some way of using it in a future
// release
//
class emailer
{
var $msg, $subject, $extra_headers;
var $addresses, $reply_to, $from;
var $use_smtp;
 
var $tpl_msg = array();
 
function emailer($use_smtp)
{
$this->reset();
$this->use_smtp = $use_smtp;
$this->reply_to = $this->from = '';
}
 
// Resets all the data (address, template file, etc etc to default
function reset()
{
$this->addresses = array();
$this->vars = $this->msg = $this->extra_headers = '';
}
 
// Sets an email address to send to
function email_address($address)
{
$this->addresses['to'] = trim($address);
}
 
function cc($address)
{
$this->addresses['cc'][] = trim($address);
}
 
function bcc($address)
{
$this->addresses['bcc'][] = trim($address);
}
 
function replyto($address)
{
$this->reply_to = trim($address);
}
 
function from($address)
{
$this->from = trim($address);
}
 
// set up subject for mail
function set_subject($subject = '')
{
$this->subject = trim(preg_replace('#[\n\r]+#s', '', $subject));
}
 
// set up extra mail headers
function extra_headers($headers)
{
$this->extra_headers .= trim($headers) . "\n";
}
 
function use_template($template_file, $template_lang = '')
{
global $board_config, $phpbb_root_path;
 
if (trim($template_file) == '')
{
message_die(GENERAL_ERROR, 'No template file set', '', __LINE__, __FILE__);
}
 
if (trim($template_lang) == '')
{
$template_lang = $board_config['default_lang'];
}
 
if (empty($this->tpl_msg[$template_lang . $template_file]))
{
$tpl_file = $phpbb_root_path . 'language/lang_' . $template_lang . '/email/' . $template_file . '.tpl';
 
if (!@file_exists(@phpbb_realpath($tpl_file)))
{
$tpl_file = $phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/email/' . $template_file . '.tpl';
 
if (!@file_exists(@phpbb_realpath($tpl_file)))
{
message_die(GENERAL_ERROR, 'Could not find email template file :: ' . $template_file, '', __LINE__, __FILE__);
}
}
 
if (!($fd = @fopen($tpl_file, 'r')))
{
message_die(GENERAL_ERROR, 'Failed opening template file :: ' . $tpl_file, '', __LINE__, __FILE__);
}
 
$this->tpl_msg[$template_lang . $template_file] = fread($fd, filesize($tpl_file));
fclose($fd);
}
 
$this->msg = $this->tpl_msg[$template_lang . $template_file];
 
return true;
}
 
// assign variables
function assign_vars($vars)
{
$this->vars = (empty($this->vars)) ? $vars : $this->vars . $vars;
}
 
// Send the mail out to the recipients set previously in var $this->address
function send()
{
global $board_config, $lang, $phpEx, $phpbb_root_path, $db;
 
// Escape all quotes, else the eval will fail.
$this->msg = str_replace ("'", "\'", $this->msg);
$this->msg = preg_replace('#\{([a-z0-9\-_]*?)\}#is', "' . $\\1 . '", $this->msg);
 
// Set vars
reset ($this->vars);
while (list($key, $val) = each($this->vars))
{
$$key = $val;
}
 
eval("\$this->msg = '$this->msg';");
 
// Clear vars
reset ($this->vars);
while (list($key, $val) = each($this->vars))
{
unset($$key);
}
 
// We now try and pull a subject from the email body ... if it exists,
// do this here because the subject may contain a variable
$drop_header = '';
$match = array();
if (preg_match('#^(Subject:(.*?))$#m', $this->msg, $match))
{
$this->subject = (trim($match[2]) != '') ? trim($match[2]) : (($this->subject != '') ? $this->subject : 'No Subject');
$drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
}
else
{
$this->subject = (($this->subject != '') ? $this->subject : 'No Subject');
}
 
if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match))
{
$this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($lang['ENCODING']);
$drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
}
else
{
$this->encoding = trim($lang['ENCODING']);
}
 
if ($drop_header != '')
{
$this->msg = trim(preg_replace('#' . $drop_header . '#s', '', $this->msg));
}
 
$to = $this->addresses['to'];
 
$cc = (count($this->addresses['cc'])) ? implode(', ', $this->addresses['cc']) : '';
$bcc = (count($this->addresses['bcc'])) ? implode(', ', $this->addresses['bcc']) : '';
 
// Build header
$this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $board_config['board_email'] . "\n") . "Return-Path: " . $board_config['board_email'] . "\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '') . (($bcc != '') ? "Bcc: $bcc\n" : '');
 
// Send message ... removed $this->encode() from subject for time being
if ( $this->use_smtp )
{
if ( !defined('SMTP_INCLUDED') )
{
include($phpbb_root_path . 'includes/smtp.' . $phpEx);
}
 
$result = smtpmail($to, $this->subject, $this->msg, $this->extra_headers);
}
else
{
$empty_to_header = ($to == '') ? TRUE : FALSE;
$to = ($to == '') ? (($board_config['sendmail_fix']) ? ' ' : 'Undisclosed-recipients:;') : $to;
$result = @mail($to, $this->subject, preg_replace("#(?<!\r)\n#s", "\n", $this->msg), $this->extra_headers);
if (!$result && !$board_config['sendmail_fix'] && $empty_to_header)
{
$to = ' ';
 
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '1'
WHERE config_name = 'sendmail_fix'";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Unable to update config table', '', __LINE__, __FILE__, $sql);
}
 
$board_config['sendmail_fix'] = 1;
$result = @mail($to, $this->subject, preg_replace("#(?<!\r)\n#s", "\n", $this->msg), $this->extra_headers);
}
}
 
// Did it work?
if (!$result)
{
message_die(GENERAL_ERROR, 'Failed sending email :: ' . (($this->use_smtp) ? 'SMTP' : 'PHP') . ' :: ' . $result, '', __LINE__, __FILE__);
}
 
return true;
}
 
// Encodes the given string for proper display for this encoding ... nabbed
// from php.net and modified. There is an alternative encoding method which
// may produce lesd output but it's questionable as to its worth in this
// scenario IMO
function encode($str)
{
if ($this->encoding == '')
{
return $str;
}
 
// define start delimimter, end delimiter and spacer
$end = "?=";
$start = "=?$this->encoding?B?";
$spacer = "$end\r\n $start";
 
// determine length of encoded text within chunks and ensure length is even
$length = 75 - strlen($start) - strlen($end);
$length = floor($length / 2) * 2;
 
// encode the string and split it into chunks with spacers after each chunk
$str = chunk_split(base64_encode($str), $length, $spacer);
 
// remove trailing spacer and add start and end delimiters
$str = preg_replace('#' . preg_quote($spacer, '#') . '$#', '', $str);
 
return $start . $str . $end;
}
 
//
// Attach files via MIME.
//
function attachFile($filename, $mimetype = "application/octet-stream", $szFromAddress, $szFilenameToDisplay)
{
global $lang;
$mime_boundary = "--==================_846811060==_";
 
$this->msg = '--' . $mime_boundary . "\nContent-Type: text/plain;\n\tcharset=\"" . $lang['ENCODING'] . "\"\n\n" . $this->msg;
 
if ($mime_filename)
{
$filename = $mime_filename;
$encoded = $this->encode_file($filename);
}
 
$fd = fopen($filename, "r");
$contents = fread($fd, filesize($filename));
 
$this->mimeOut = "--" . $mime_boundary . "\n";
$this->mimeOut .= "Content-Type: " . $mimetype . ";\n\tname=\"$szFilenameToDisplay\"\n";
$this->mimeOut .= "Content-Transfer-Encoding: quoted-printable\n";
$this->mimeOut .= "Content-Disposition: attachment;\n\tfilename=\"$szFilenameToDisplay\"\n\n";
 
if ( $mimetype == "message/rfc822" )
{
$this->mimeOut .= "From: ".$szFromAddress."\n";
$this->mimeOut .= "To: ".$this->emailAddress."\n";
$this->mimeOut .= "Date: ".date("D, d M Y H:i:s") . " UT\n";
$this->mimeOut .= "Reply-To:".$szFromAddress."\n";
$this->mimeOut .= "Subject: ".$this->mailSubject."\n";
$this->mimeOut .= "X-Mailer: PHP/".phpversion()."\n";
$this->mimeOut .= "MIME-Version: 1.0\n";
}
 
$this->mimeOut .= $contents."\n";
$this->mimeOut .= "--" . $mime_boundary . "--" . "\n";
 
return $out;
// added -- to notify email client attachment is done
}
 
function getMimeHeaders($filename, $mime_filename="")
{
$mime_boundary = "--==================_846811060==_";
 
if ($mime_filename)
{
$filename = $mime_filename;
}
 
$out = "MIME-Version: 1.0\n";
$out .= "Content-Type: multipart/mixed;\n\tboundary=\"$mime_boundary\"\n\n";
$out .= "This message is in MIME format. Since your mail reader does not understand\n";
$out .= "this format, some or all of this message may not be legible.";
 
return $out;
}
 
//
// Split string by RFC 2045 semantics (76 chars per line, end with \r\n).
//
function myChunkSplit($str)
{
$stmp = $str;
$len = strlen($stmp);
$out = "";
 
while ($len > 0)
{
if ($len >= 76)
{
$out .= substr($stmp, 0, 76) . "\r\n";
$stmp = substr($stmp, 76);
$len = $len - 76;
}
else
{
$out .= $stmp . "\r\n";
$stmp = "";
$len = 0;
}
}
return $out;
}
 
//
// Split the specified file up into a string and return it
//
function encode_file($sourcefile)
{
if (is_readable(phpbb_realpath($sourcefile)))
{
$fd = fopen($sourcefile, "r");
$contents = fread($fd, filesize($sourcefile));
$encoded = $this->myChunkSplit(base64_encode($contents));
fclose($fd);
}
 
return $encoded;
}
 
} // class emailer
 
?>
/Forum/includes/functions.php
0,0 → 1,945
<?php
/***************************************************************************
* functions.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: functions.php,v 1.133.2.47 2006/06/08 21:11:04 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
 
function get_db_stat($mode)
{
global $db;
 
switch( $mode )
{
case 'usercount':
$sql = "SELECT COUNT(user_id) AS total
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS;
break;
 
case 'newestuser':
$sql = "SELECT user_id, username
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
ORDER BY user_id DESC
LIMIT 1";
break;
 
case 'postcount':
case 'topiccount':
$sql = "SELECT SUM(forum_topics) AS topic_total, SUM(forum_posts) AS post_total
FROM " . FORUMS_TABLE;
break;
}
 
if ( !($result = $db->sql_query($sql)) )
{
return false;
}
 
$row = $db->sql_fetchrow($result);
 
switch ( $mode )
{
case 'usercount':
return $row['total'];
break;
case 'newestuser':
return $row;
break;
case 'postcount':
return $row['post_total'];
break;
case 'topiccount':
return $row['topic_total'];
break;
}
 
return false;
}
 
// added at phpBB 2.0.11 to properly format the username
function phpbb_clean_username($username)
{
$username = substr(htmlspecialchars(str_replace("\'", "'", trim($username))), 0, 25);
$username = phpbb_rtrim($username, "\\");
$username = str_replace("'", "\'", $username);
 
return $username;
}
 
/**
* This function is a wrapper for ltrim, as charlist is only supported in php >= 4.1.0
* Added in phpBB 2.0.18
*/
function phpbb_ltrim($str, $charlist = false)
{
if ($charlist === false)
{
return ltrim($str);
}
$php_version = explode('.', PHP_VERSION);
 
// php version < 4.1.0
if ((int) $php_version[0] < 4 || ((int) $php_version[0] == 4 && (int) $php_version[1] < 1))
{
while ($str{0} == $charlist)
{
$str = substr($str, 1);
}
}
else
{
$str = ltrim($str, $charlist);
}
 
return $str;
}
 
// added at phpBB 2.0.12 to fix a bug in PHP 4.3.10 (only supporting charlist in php >= 4.1.0)
function phpbb_rtrim($str, $charlist = false)
{
if ($charlist === false)
{
return rtrim($str);
}
$php_version = explode('.', PHP_VERSION);
 
// php version < 4.1.0
if ((int) $php_version[0] < 4 || ((int) $php_version[0] == 4 && (int) $php_version[1] < 1))
{
while ($str{strlen($str)-1} == $charlist)
{
$str = substr($str, 0, strlen($str)-1);
}
}
else
{
$str = rtrim($str, $charlist);
}
 
return $str;
}
 
/**
* Our own generator of random values
* This uses a constantly changing value as the base for generating the values
* The board wide setting is updated once per page if this code is called
* With thanks to Anthrax101 for the inspiration on this one
* Added in phpBB 2.0.20
*/
function dss_rand()
{
global $db, $board_config, $dss_seeded;
 
$val = $board_config['rand_seed'] . microtime();
$val = md5($val);
$board_config['rand_seed'] = md5($board_config['rand_seed'] . $val . 'a');
if($dss_seeded !== true)
{
$sql = "UPDATE " . CONFIG_TABLE . " SET
config_value = '" . $board_config['rand_seed'] . "'
WHERE config_name = 'rand_seed'";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Unable to reseed PRNG", "", __LINE__, __FILE__, $sql);
}
 
$dss_seeded = true;
}
 
return substr($val, 4, 16);
}
//
// Get Userdata, $user can be username or user_id. If force_str is true, the username will be forced.
//
function get_userdata($user, $force_str = false)
{
global $db;
 
if (!is_numeric($user) || $force_str)
{
$user = phpbb_clean_username($user);
}
else
{
$user = intval($user);
}
 
$sql = "SELECT *
FROM " . USERS_TABLE . "
WHERE ";
$sql .= ( ( is_integer($user) ) ? "user_id = $user" : "username = '" . str_replace("\'", "''", $user) . "'" ) . " AND user_id <> " . ANONYMOUS;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Tried obtaining data for a non-existent user', '', __LINE__, __FILE__, $sql);
}
 
return ( $row = $db->sql_fetchrow($result) ) ? $row : false;
}
 
function make_jumpbox($action, $match_forum_id = 0)
{
global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID;
 
// $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata);
 
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f
WHERE f.cat_id = c.cat_id
GROUP BY c.cat_id, c.cat_title, c.cat_order
ORDER BY c.cat_order";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain category list.", "", __LINE__, __FILE__, $sql);
}
$category_rows = array();
while ( $row = $db->sql_fetchrow($result) )
{
$category_rows[] = $row;
}
 
if ( $total_categories = count($category_rows) )
{
$sql = "SELECT *
FROM " . FORUMS_TABLE . "
ORDER BY cat_id, forum_order";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
}
 
$boxstring = '<select name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"><option value="-1">' . $lang['Select_forum'] . '</option>';
 
$forum_rows = array();
while ( $row = $db->sql_fetchrow($result) )
{
$forum_rows[] = $row;
}
 
if ( $total_forums = count($forum_rows) )
{
for($i = 0; $i < $total_categories; $i++)
{
$boxstring_forums = '';
for($j = 0; $j < $total_forums; $j++)
{
if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG )
{
 
// if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$j]['forum_id']]['auth_view'] )
// {
$selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? 'selected="selected"' : '';
$boxstring_forums .= '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>';
 
//
// Add an array to $nav_links for the Mozilla navigation bar.
// 'chapter' and 'forum' can create multiple items, therefore we are using a nested array.
//
$nav_links['chapter forum'][$forum_rows[$j]['forum_id']] = array (
'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id']),
'title' => $forum_rows[$j]['forum_name']
);
}
}
 
if ( $boxstring_forums != '' )
{
$boxstring .= '<option value="-1">&nbsp;</option>';
$boxstring .= '<option value="-1">' . $category_rows[$i]['cat_title'] . '</option>';
$boxstring .= '<option value="-1">----------------</option>';
$boxstring .= $boxstring_forums;
}
}
}
 
$boxstring .= '</select>';
}
else
{
$boxstring .= '<select name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"></select>';
}
 
// Let the jumpbox work again in sites having additional session id checks.
// if ( !empty($SID) )
// {
$boxstring .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
// }
 
$template->set_filenames(array(
'jumpbox' => 'jumpbox.tpl')
);
$template->assign_vars(array(
'L_GO' => $lang['Go'],
'L_JUMP_TO' => $lang['Jump_to'],
'L_SELECT_FORUM' => $lang['Select_forum'],
 
'S_JUMPBOX_SELECT' => $boxstring,
'S_JUMPBOX_ACTION' => append_sid($action))
);
$template->assign_var_from_handle('JUMPBOX', 'jumpbox');
 
return;
}
 
//
// Initialise user settings on page load
function init_userprefs($userdata)
{
global $board_config, $theme, $images;
global $template, $lang, $phpEx, $phpbb_root_path, $db;
global $nav_links;
 
if ( $userdata['user_id'] != ANONYMOUS )
{
if ( !empty($userdata['user_lang']))
{
$default_lang = phpbb_ltrim(basename(phpbb_rtrim($userdata['user_lang'])), "'");
}
 
if ( !empty($userdata['user_dateformat']) )
{
$board_config['default_dateformat'] = $userdata['user_dateformat'];
}
 
if ( isset($userdata['user_timezone']) )
{
$board_config['board_timezone'] = $userdata['user_timezone'];
}
}
else
{
$default_lang = phpbb_ltrim(basename(phpbb_rtrim($board_config['default_lang'])), "'");
}
 
if ( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx)) )
{
if ( $userdata['user_id'] != ANONYMOUS )
{
// For logged in users, try the board default language next
$default_lang = phpbb_ltrim(basename(phpbb_rtrim($board_config['default_lang'])), "'");
}
else
{
// For guests it means the default language is not present, try english
// This is a long shot since it means serious errors in the setup to reach here,
// but english is part of a new install so it's worth us trying
$default_lang = 'english';
}
 
if ( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx)) )
{
message_die(CRITICAL_ERROR, 'Could not locate valid language pack');
}
}
 
// If we've had to change the value in any way then let's write it back to the database
// before we go any further since it means there is something wrong with it
if ( $userdata['user_id'] != ANONYMOUS && $userdata['user_lang'] !== $default_lang )
{
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_lang = '" . $default_lang . "'
WHERE user_lang = '" . $userdata['user_lang'] . "'";
 
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not update user language info');
}
 
$userdata['user_lang'] = $default_lang;
}
elseif ( $userdata['user_id'] === ANONYMOUS && $board_config['default_lang'] !== $default_lang )
{
$sql = 'UPDATE ' . CONFIG_TABLE . "
SET config_value = '" . $default_lang . "'
WHERE config_name = 'default_lang'";
 
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not update user language info');
}
}
 
$board_config['default_lang'] = $default_lang;
 
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);
 
if ( defined('IN_ADMIN') )
{
if( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.'.$phpEx)) )
{
$board_config['default_lang'] = 'english';
}
 
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx);
}
 
//
// Set up style
//
if ( !$board_config['override_user_style'] )
{
if ( $userdata['user_id'] != ANONYMOUS && $userdata['user_style'] > 0 )
{
if ( $theme = setup_style($userdata['user_style']) )
{
return;
}
}
}
 
$theme = setup_style($board_config['default_style']);
 
//
// Mozilla navigation bar
// Default items that should be valid on all pages.
// Defined here to correctly assign the Language Variables
// and be able to change the variables within code.
//
$nav_links['top'] = array (
'url' => append_sid($phpbb_root_path . 'index.' . $phpEx),
'title' => sprintf($lang['Forum_Index'], $board_config['sitename'])
);
$nav_links['search'] = array (
'url' => append_sid($phpbb_root_path . 'search.' . $phpEx),
'title' => $lang['Search']
);
$nav_links['help'] = array (
'url' => append_sid($phpbb_root_path . 'faq.' . $phpEx),
'title' => $lang['FAQ']
);
$nav_links['author'] = array (
'url' => append_sid($phpbb_root_path . 'memberlist.' . $phpEx),
'title' => $lang['Memberlist']
);
 
return;
}
 
function setup_style($style)
{
global $db, $board_config, $template, $images, $phpbb_root_path;
 
$sql = 'SELECT *
FROM ' . THEMES_TABLE . '
WHERE themes_id = ' . (int) $style;
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not query database for theme info');
}
 
if ( !($row = $db->sql_fetchrow($result)) )
{
// We are trying to setup a style which does not exist in the database
// Try to fallback to the board default (if the user had a custom style)
// and then any users using this style to the default if it succeeds
if ( $style != $board_config['default_style'])
{
$sql = 'SELECT *
FROM ' . THEMES_TABLE . '
WHERE themes_id = ' . (int) $board_config['default_style'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not query database for theme info');
}
 
if ( $row = $db->sql_fetchrow($result) )
{
$db->sql_freeresult($result);
 
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_style = ' . (int) $board_config['default_style'] . "
WHERE user_style = $style";
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not update user theme info');
}
}
else
{
message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]");
}
}
else
{
message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]");
}
}
 
$template_path = 'templates/' ;
$template_name = $row['template_name'] ;
 
$template = new Template($phpbb_root_path . $template_path . $template_name);
 
if ( $template )
{
$current_template_path = $template_path . $template_name;
@include($phpbb_root_path . $template_path . $template_name . '/' . $template_name . '.cfg');
 
if ( !defined('TEMPLATE_CONFIG') )
{
message_die(CRITICAL_ERROR, "Could not open $template_name template config file", '', __LINE__, __FILE__);
}
 
$img_lang = ( file_exists(@phpbb_realpath($phpbb_root_path . $current_template_path . '/images/lang_' . $board_config['default_lang'])) ) ? $board_config['default_lang'] : 'english';
 
while( list($key, $value) = @each($images) )
{
if ( !is_array($value) )
{
$images[$key] = str_replace('{LANG}', 'lang_' . $img_lang, $value);
}
}
}
 
return $row;
}
 
function encode_ip($dotquad_ip)
{
$ip_sep = explode('.', $dotquad_ip);
return sprintf('%02x%02x%02x%02x', $ip_sep[0], $ip_sep[1], $ip_sep[2], $ip_sep[3]);
}
 
function decode_ip($int_ip)
{
$hexipbang = explode('.', chunk_split($int_ip, 2, '.'));
return hexdec($hexipbang[0]). '.' . hexdec($hexipbang[1]) . '.' . hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]);
}
 
//
// Create date/time from format and timezone
//
function create_date($format, $gmepoch, $tz)
{
global $board_config, $lang;
static $translate;
 
if ( empty($translate) && $board_config['default_lang'] != 'english' )
{
@reset($lang['datetime']);
while ( list($match, $replace) = @each($lang['datetime']) )
{
$translate[$match] = $replace;
}
}
 
return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz)), $translate) : @gmdate($format, $gmepoch + (3600 * $tz));
}
 
//
// Pagination routine, generates
// page number sequence
//
function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = TRUE)
{
global $lang;
 
$total_pages = ceil($num_items/$per_page);
 
if ( $total_pages == 1 )
{
return '';
}
 
$on_page = floor($start_item / $per_page) + 1;
 
$page_string = '';
if ( $total_pages > 10 )
{
$init_page_max = ( $total_pages > 3 ) ? 3 : $total_pages;
 
for($i = 1; $i < $init_page_max + 1; $i++)
{
$page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . append_sid($base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';
if ( $i < $init_page_max )
{
$page_string .= ", ";
}
}
 
if ( $total_pages > 3 )
{
if ( $on_page > 1 && $on_page < $total_pages )
{
$page_string .= ( $on_page > 5 ) ? ' ... ' : ', ';
 
$init_page_min = ( $on_page > 4 ) ? $on_page : 5;
$init_page_max = ( $on_page < $total_pages - 4 ) ? $on_page : $total_pages - 4;
 
for($i = $init_page_min - 1; $i < $init_page_max + 2; $i++)
{
$page_string .= ($i == $on_page) ? '<b>' . $i . '</b>' : '<a href="' . append_sid($base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';
if ( $i < $init_page_max + 1 )
{
$page_string .= ', ';
}
}
 
$page_string .= ( $on_page < $total_pages - 4 ) ? ' ... ' : ', ';
}
else
{
$page_string .= ' ... ';
}
 
for($i = $total_pages - 2; $i < $total_pages + 1; $i++)
{
$page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . append_sid($base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';
if( $i < $total_pages )
{
$page_string .= ", ";
}
}
}
}
else
{
for($i = 1; $i < $total_pages + 1; $i++)
{
$page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . append_sid($base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';
if ( $i < $total_pages )
{
$page_string .= ', ';
}
}
}
 
if ( $add_prevnext_text )
{
if ( $on_page > 1 )
{
$page_string = ' <a href="' . append_sid($base_url . "&amp;start=" . ( ( $on_page - 2 ) * $per_page ) ) . '">' . $lang['Previous'] . '</a>&nbsp;&nbsp;' . $page_string;
}
 
if ( $on_page < $total_pages )
{
$page_string .= '&nbsp;&nbsp;<a href="' . append_sid($base_url . "&amp;start=" . ( $on_page * $per_page ) ) . '">' . $lang['Next'] . '</a>';
}
 
}
 
$page_string = $lang['Goto_page'] . ' ' . $page_string;
 
return $page_string;
}
 
//
// This does exactly what preg_quote() does in PHP 4-ish
// If you just need the 1-parameter preg_quote call, then don't bother using this.
//
function phpbb_preg_quote($str, $delimiter)
{
$text = preg_quote($str);
$text = str_replace($delimiter, '\\' . $delimiter, $text);
return $text;
}
 
//
// Obtain list of naughty words and build preg style replacement arrays for use by the
// calling script, note that the vars are passed as references this just makes it easier
// to return both sets of arrays
//
function obtain_word_list(&$orig_word, &$replacement_word)
{
global $db;
 
//
// Define censored word matches
//
$sql = "SELECT word, replacement
FROM " . WORDS_TABLE;
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get censored words from database', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
do
{
$orig_word[] = '#\b(' . str_replace('\*', '\w*?', preg_quote($row['word'], '#')) . ')\b#i';
$replacement_word[] = $row['replacement'];
}
while ( $row = $db->sql_fetchrow($result) );
}
 
return true;
}
 
//
// This is general replacement for die(), allows templated
// output in users (or default) language, etc.
//
// $msg_code can be one of these constants:
//
// GENERAL_MESSAGE : Use for any simple text message, eg. results
// of an operation, authorisation failures, etc.
//
// GENERAL ERROR : Use for any error which occurs _AFTER_ the
// common.php include and session code, ie. most errors in
// pages/functions
//
// CRITICAL_MESSAGE : Used when basic config data is available but
// a session may not exist, eg. banned users
//
// CRITICAL_ERROR : Used when config data cannot be obtained, eg
// no database connection. Should _not_ be used in 99.5% of cases
//
function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '')
{
global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $nav_links, $gen_simple_header, $images;
global $userdata, $user_ip, $session_length;
global $starttime;
 
if(defined('HAS_DIED'))
{
die("message_die() was called multiple times. This isn't supposed to happen. Was message_die() used in page_tail.php?");
}
define('HAS_DIED', 1);
 
$sql_store = $sql;
//
// Get SQL error if we are debugging. Do this as soon as possible to prevent
// subsequent queries from overwriting the status of sql_error()
//
if ( DEBUG && ( $msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR ) )
{
$sql_error = $db->sql_error();
 
$debug_text = '';
 
if ( $sql_error['message'] != '' )
{
$debug_text .= '<br /><br />SQL Error : ' . $sql_error['code'] . ' ' . $sql_error['message'];
}
 
if ( $sql_store != '' )
{
$debug_text .= "<br /><br />$sql_store";
}
 
if ( $err_line != '' && $err_file != '' )
{
$debug_text .= '<br /><br />Line : ' . $err_line . '<br />File : ' . basename($err_file);
}
}
 
if( empty($userdata) && ( $msg_code == GENERAL_MESSAGE || $msg_code == GENERAL_ERROR ) )
{
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
}
 
//
// If the header hasn't been output then do it
//
if ( !defined('HEADER_INC') && $msg_code != CRITICAL_ERROR )
{
if ( empty($lang) )
{
if ( !empty($board_config['default_lang']) )
{
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx);
}
else
{
include($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx);
}
}
 
if ( empty($template) || empty($theme) )
{
$theme = setup_style($board_config['default_style']);
}
 
//
// Load the Page Header
//
if ( !defined('IN_ADMIN') )
{
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
}
else
{
include($phpbb_root_path . 'admin/page_header_admin.'.$phpEx);
}
}
 
switch($msg_code)
{
case GENERAL_MESSAGE:
if ( $msg_title == '' )
{
$msg_title = $lang['Information'];
}
break;
 
case CRITICAL_MESSAGE:
if ( $msg_title == '' )
{
$msg_title = $lang['Critical_Information'];
}
break;
 
case GENERAL_ERROR:
if ( $msg_text == '' )
{
$msg_text = $lang['An_error_occured'];
}
 
if ( $msg_title == '' )
{
$msg_title = $lang['General_Error'];
}
break;
 
case CRITICAL_ERROR:
//
// Critical errors mean we cannot rely on _ANY_ DB information being
// available so we're going to dump out a simple echo'd statement
//
include($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx);
 
if ( $msg_text == '' )
{
$msg_text = $lang['A_critical_error'];
}
 
if ( $msg_title == '' )
{
$msg_title = 'phpBB : <b>' . $lang['Critical_Error'] . '</b>';
}
break;
}
 
//
// Add on DEBUG info if we've enabled debug mode and this is an error. This
// prevents debug info being output for general messages should DEBUG be
// set TRUE by accident (preventing confusion for the end user!)
//
if ( DEBUG && ( $msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR ) )
{
if ( $debug_text != '' )
{
$msg_text = $msg_text . '<br /><br /><b><u>DEBUG MODE</u></b>' . $debug_text;
}
}
 
if ( $msg_code != CRITICAL_ERROR )
{
if ( !empty($lang[$msg_text]) )
{
$msg_text = $lang[$msg_text];
}
 
if ( !defined('IN_ADMIN') )
{
$template->set_filenames(array(
'message_body' => 'message_body.tpl')
);
}
else
{
$template->set_filenames(array(
'message_body' => 'admin/admin_message_body.tpl')
);
}
 
$template->assign_vars(array(
'MESSAGE_TITLE' => $msg_title,
'MESSAGE_TEXT' => $msg_text)
);
$template->pparse('message_body');
 
if ( !defined('IN_ADMIN') )
{
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
else
{
include($phpbb_root_path . 'admin/page_footer_admin.'.$phpEx);
}
}
else
{
echo "<html>\n<body>\n" . $msg_title . "\n<br /><br />\n" . $msg_text . "</body>\n</html>";
}
 
exit;
}
 
//
// This function is for compatibility with PHP 4.x's realpath()
// function. In later versions of PHP, it needs to be called
// to do checks with some functions. Older versions of PHP don't
// seem to need this, so we'll just return the original value.
// dougk_ff7 <October 5, 2002>
function phpbb_realpath($path)
{
global $phpbb_root_path, $phpEx;
 
return (!@function_exists('realpath') || !@realpath($phpbb_root_path . 'includes/functions.'.$phpEx)) ? $path : @realpath($path);
}
 
function redirect($url)
{
global $db, $board_config;
 
if (!empty($db))
{
$db->sql_close();
}
 
if (strstr(urldecode($url), "\n") || strstr(urldecode($url), "\r"))
{
message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.');
}
 
$server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://';
$server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name']));
$server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : '';
$script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path']));
$script_name = ($script_name == '') ? $script_name : '/' . $script_name;
$url = preg_replace('#^\/?(.*?)\/?$#', '/\1', trim($url));
 
// Redirect via an HTML form for PITA webservers
if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')))
{
header('Refresh: 0; URL=' . $server_protocol . $server_name . $server_port . $script_name . $url);
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="refresh" content="0; url=' . $server_protocol . $server_name . $server_port . $script_name . $url . '"><title>Redirect</title></head><body><div align="center">If your browser does not support meta redirection please click <a href="' . $server_protocol . $server_name . $server_port . $script_name . $url . '">HERE</a> to be redirected</div></body></html>';
exit;
}
 
// Behave as per HTTP/1.1 spec for others
header('Location: ' . $server_protocol . $server_name . $server_port . $script_name . $url);
exit;
}
 
?>
/Forum/includes/functions_admin.php
0,0 → 1,191
<?php
/***************************************************************************
* functions_admin.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: functions_admin.php,v 1.5.2.5 2005/09/14 19:16:21 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
 
//
// Simple version of jumpbox, just lists authed forums
//
function make_forum_select($box_name, $ignore_forum = false, $select_forum = '')
{
global $db, $userdata;
 
$is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);
 
$sql = 'SELECT f.forum_id, f.forum_name
FROM ' . CATEGORIES_TABLE . ' c, ' . FORUMS_TABLE . ' f
WHERE f.cat_id = c.cat_id
ORDER BY c.cat_order, f.forum_order';
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Couldn not obtain forums information', '', __LINE__, __FILE__, $sql);
}
 
$forum_list = '';
while( $row = $db->sql_fetchrow($result) )
{
if ( $is_auth_ary[$row['forum_id']]['auth_read'] && $ignore_forum != $row['forum_id'] )
{
$selected = ( $select_forum == $row['forum_id'] ) ? ' selected="selected"' : '';
$forum_list .= '<option value="' . $row['forum_id'] . '"' . $selected .'>' . $row['forum_name'] . '</option>';
}
}
 
$forum_list = ( $forum_list == '' ) ? '<option value="-1">-- ! No Forums ! --</option>' : '<select name="' . $box_name . '">' . $forum_list . '</select>';
 
return $forum_list;
}
 
//
// Synchronise functions for forums/topics
//
function sync($type, $id = false)
{
global $db;
 
switch($type)
{
case 'all forums':
$sql = "SELECT forum_id
FROM " . FORUMS_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get forum IDs', '', __LINE__, __FILE__, $sql);
}
 
while( $row = $db->sql_fetchrow($result) )
{
sync('forum', $row['forum_id']);
}
break;
 
case 'all topics':
$sql = "SELECT topic_id
FROM " . TOPICS_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get topic ID', '', __LINE__, __FILE__, $sql);
}
 
while( $row = $db->sql_fetchrow($result) )
{
sync('topic', $row['topic_id']);
}
break;
 
case 'forum':
$sql = "SELECT MAX(post_id) AS last_post, COUNT(post_id) AS total
FROM " . POSTS_TABLE . "
WHERE forum_id = $id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get post ID', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
$last_post = ( $row['last_post'] ) ? $row['last_post'] : 0;
$total_posts = ($row['total']) ? $row['total'] : 0;
}
else
{
$last_post = 0;
$total_posts = 0;
}
 
$sql = "SELECT COUNT(topic_id) AS total
FROM " . TOPICS_TABLE . "
WHERE forum_id = $id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get topic count', '', __LINE__, __FILE__, $sql);
}
 
$total_topics = ( $row = $db->sql_fetchrow($result) ) ? ( ( $row['total'] ) ? $row['total'] : 0 ) : 0;
 
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_last_post_id = $last_post, forum_posts = $total_posts, forum_topics = $total_topics
WHERE forum_id = $id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update forum', '', __LINE__, __FILE__, $sql);
}
break;
 
case 'topic':
$sql = "SELECT MAX(post_id) AS last_post, MIN(post_id) AS first_post, COUNT(post_id) AS total_posts
FROM " . POSTS_TABLE . "
WHERE topic_id = $id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get post ID', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
if ($row['total_posts'])
{
// Correct the details of this topic
$sql = 'UPDATE ' . TOPICS_TABLE . '
SET topic_replies = ' . ($row['total_posts'] - 1) . ', topic_first_post_id = ' . $row['first_post'] . ', topic_last_post_id = ' . $row['last_post'] . "
WHERE topic_id = $id";
 
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not update topic', '', __LINE__, __FILE__, $sql);
}
}
else
{
// There are no replies to this topic
// Check if it is a move stub
$sql = 'SELECT topic_moved_id
FROM ' . TOPICS_TABLE . "
WHERE topic_id = $id";
 
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not get topic ID', '', __LINE__, __FILE__, $sql);
}
 
if ($row = $db->sql_fetchrow($result))
{
if (!$row['topic_moved_id'])
{
$sql = 'DELETE FROM ' . TOPICS_TABLE . " WHERE topic_id = $id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not remove topic', '', __LINE__, __FILE__, $sql);
}
}
}
 
$db->sql_freeresult($result);
}
}
break;
}
return true;
}
 
?>
/Forum/includes/functions_post.php
0,0 → 1,887
<?php
/***************************************************************************
* functions_post.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: functions_post.php,v 1.9.2.52 2006/05/06 13:38:55 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if (!defined('IN_PHPBB'))
{
die('Hacking attempt');
}
 
$html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#');
$html_entities_replace = array('&amp;', '&lt;', '&gt;', '&quot;');
 
$unhtml_specialchars_match = array('#&gt;#', '#&lt;#', '#&quot;#', '#&amp;#');
$unhtml_specialchars_replace = array('>', '<', '"', '&');
 
//
// This function will prepare a posted message for
// entry into the database.
//
function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid = 0)
{
global $board_config, $html_entities_match, $html_entities_replace;
 
//
// Clean up the message
//
$message = trim($message);
 
if ($html_on)
{
// If HTML is on, we try to make it safe
// This approach is quite agressive and anything that does not look like a valid tag
// is going to get converted to HTML entities
$message = stripslashes($message);
$html_match = '#<[^\w<]*(\w+)((?:"[^"]*"|\'[^\']*\'|[^<>\'"])+)?>#';
$matches = array();
 
$message_split = preg_split($html_match, $message);
preg_match_all($html_match, $message, $matches);
 
$message = '';
 
foreach ($message_split as $part)
{
$tag = array(array_shift($matches[0]), array_shift($matches[1]), array_shift($matches[2]));
$message .= preg_replace($html_entities_match, $html_entities_replace, $part) . clean_html($tag);
}
 
$message = addslashes($message);
$message = str_replace('&quot;', '\&quot;', $message);
}
else
{
$message = preg_replace($html_entities_match, $html_entities_replace, $message);
}
 
if($bbcode_on && $bbcode_uid != '')
{
$message = bbencode_first_pass($message, $bbcode_uid);
}
 
return $message;
}
 
function unprepare_message($message)
{
global $unhtml_specialchars_match, $unhtml_specialchars_replace;
 
return preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, $message);
}
 
//
// Prepare a message for posting
//
function prepare_post(&$mode, &$post_data, &$bbcode_on, &$html_on, &$smilies_on, &$error_msg, &$username, &$bbcode_uid, &$subject, &$message, &$poll_title, &$poll_options, &$poll_length)
{
global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path;
 
// Check username
if (!empty($username))
{
$username = phpbb_clean_username($username);
 
if (!$userdata['session_logged_in'] || ($userdata['session_logged_in'] && $username != $userdata['username']))
{
include($phpbb_root_path . 'includes/functions_validate.'.$phpEx);
 
$result = validate_username($username);
if ($result['error'])
{
$error_msg .= (!empty($error_msg)) ? '<br />' . $result['error_msg'] : $result['error_msg'];
}
}
else
{
$username = '';
}
}
 
// Check subject
if (!empty($subject))
{
$subject = htmlspecialchars(trim($subject));
}
else if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post']))
{
$error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Empty_subject'] : $lang['Empty_subject'];
}
 
// Check message
if (!empty($message))
{
$bbcode_uid = ($bbcode_on) ? make_bbcode_uid() : '';
$message = prepare_message(trim($message), $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
}
else if ($mode != 'delete' && $mode != 'poll_delete')
{
$error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Empty_message'] : $lang['Empty_message'];
}
 
//
// Handle poll stuff
//
if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post']))
{
$poll_length = (isset($poll_length)) ? max(0, intval($poll_length)) : 0;
 
if (!empty($poll_title))
{
$poll_title = htmlspecialchars(trim($poll_title));
}
 
if(!empty($poll_options))
{
$temp_option_text = array();
while(list($option_id, $option_text) = @each($poll_options))
{
$option_text = trim($option_text);
if (!empty($option_text))
{
$temp_option_text[intval($option_id)] = htmlspecialchars($option_text);
}
}
$option_text = $temp_option_text;
 
if (count($poll_options) < 2)
{
$error_msg .= (!empty($error_msg)) ? '<br />' . $lang['To_few_poll_options'] : $lang['To_few_poll_options'];
}
else if (count($poll_options) > $board_config['max_poll_options'])
{
$error_msg .= (!empty($error_msg)) ? '<br />' . $lang['To_many_poll_options'] : $lang['To_many_poll_options'];
}
else if ($poll_title == '')
{
$error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Empty_poll_title'] : $lang['Empty_poll_title'];
}
}
}
 
return;
}
 
//
// Post a new topic/reply/poll or edit existing post/poll
//
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, $post_username, $post_subject, $post_message, $poll_title, &$poll_options, &$poll_length)
{
global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
global $userdata, $user_ip;
 
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
 
$current_time = time();
 
if ($mode == 'newtopic' || $mode == 'reply' || $mode == 'editpost')
{
//
// Flood control
//
$where_sql = ($userdata['user_id'] == ANONYMOUS) ? "poster_ip = '$user_ip'" : 'poster_id = ' . $userdata['user_id'];
$sql = "SELECT MAX(post_time) AS last_post_time
FROM " . POSTS_TABLE . "
WHERE $where_sql";
if ($result = $db->sql_query($sql))
{
if ($row = $db->sql_fetchrow($result))
{
if (intval($row['last_post_time']) > 0 && ($current_time - intval($row['last_post_time'])) < intval($board_config['flood_interval']))
{
message_die(GENERAL_MESSAGE, $lang['Flood_Error']);
}
}
}
}
 
if ($mode == 'editpost')
{
remove_search_post($post_id);
}
 
if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post']))
{
$topic_vote = (!empty($poll_title) && count($poll_options) >= 2) ? 1 : 0;
 
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
 
if ($mode == 'newtopic')
{
$topic_id = $db->sql_nextid();
}
}
 
$edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
$sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";
if (!$db->sql_query($sql, BEGIN_TRANSACTION))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
 
if ($mode != 'editpost')
{
$post_id = $db->sql_nextid();
}
 
$sql = ($mode != 'editpost') ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message', bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
 
add_search_words('single', $post_id, stripslashes($post_message), stripslashes($post_subject));
 
//
// Add poll
//
if (($mode == 'newtopic' || ($mode == 'editpost' && $post_data['edit_poll'])) && !empty($poll_title) && count($poll_options) >= 2)
{
$sql = (!$post_data['has_poll']) ? "INSERT INTO " . VOTE_DESC_TABLE . " (topic_id, vote_text, vote_start, vote_length) VALUES ($topic_id, '$poll_title', $current_time, " . ($poll_length * 86400) . ")" : "UPDATE " . VOTE_DESC_TABLE . " SET vote_text = '$poll_title', vote_length = " . ($poll_length * 86400) . " WHERE topic_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
 
$delete_option_sql = '';
$old_poll_result = array();
if ($mode == 'editpost' && $post_data['has_poll'])
{
$sql = "SELECT vote_option_id, vote_result
FROM " . VOTE_RESULTS_TABLE . "
WHERE vote_id = $poll_id
ORDER BY vote_option_id ASC";
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not obtain vote data results for this topic', '', __LINE__, __FILE__, $sql);
}
 
while ($row = $db->sql_fetchrow($result))
{
$old_poll_result[$row['vote_option_id']] = $row['vote_result'];
 
if (!isset($poll_options[$row['vote_option_id']]))
{
$delete_option_sql .= ($delete_option_sql != '') ? ', ' . $row['vote_option_id'] : $row['vote_option_id'];
}
}
}
else
{
$poll_id = $db->sql_nextid();
}
 
@reset($poll_options);
 
$poll_option_id = 1;
while (list($option_id, $option_text) = each($poll_options))
{
if (!empty($option_text))
{
$option_text = str_replace("\'", "''", htmlspecialchars($option_text));
$poll_result = ($mode == "editpost" && isset($old_poll_result[$option_id])) ? $old_poll_result[$option_id] : 0;
 
$sql = ($mode != "editpost" || !isset($old_poll_result[$option_id])) ? "INSERT INTO " . VOTE_RESULTS_TABLE . " (vote_id, vote_option_id, vote_option_text, vote_result) VALUES ($poll_id, $poll_option_id, '$option_text', $poll_result)" : "UPDATE " . VOTE_RESULTS_TABLE . " SET vote_option_text = '$option_text', vote_result = $poll_result WHERE vote_option_id = $option_id AND vote_id = $poll_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
$poll_option_id++;
}
}
 
if ($delete_option_sql != '')
{
$sql = "DELETE FROM " . VOTE_RESULTS_TABLE . "
WHERE vote_option_id IN ($delete_option_sql)
AND vote_id = $poll_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error deleting pruned poll options', '', __LINE__, __FILE__, $sql);
}
}
}
 
$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">';
$message = $lang['Stored'] . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
 
return false;
}
 
//
// Update post stats and details
//
function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_id, &$user_id)
{
global $db;
 
$sign = ($mode == 'delete') ? '- 1' : '+ 1';
$forum_update_sql = "forum_posts = forum_posts $sign";
$topic_update_sql = '';
 
if ($mode == 'delete')
{
if ($post_data['last_post'])
{
if ($post_data['first_post'])
{
$forum_update_sql .= ', forum_topics = forum_topics - 1';
}
else
{
 
$topic_update_sql .= 'topic_replies = topic_replies - 1';
 
$sql = "SELECT MAX(post_id) AS last_post_id
FROM " . POSTS_TABLE . "
WHERE topic_id = $topic_id";
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
 
if ($row = $db->sql_fetchrow($result))
{
$topic_update_sql .= ', topic_last_post_id = ' . $row['last_post_id'];
}
}
 
if ($post_data['last_topic'])
{
$sql = "SELECT MAX(post_id) AS last_post_id
FROM " . POSTS_TABLE . "
WHERE forum_id = $forum_id";
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
 
if ($row = $db->sql_fetchrow($result))
{
$forum_update_sql .= ($row['last_post_id']) ? ', forum_last_post_id = ' . $row['last_post_id'] : ', forum_last_post_id = 0';
}
}
}
else if ($post_data['first_post'])
{
$sql = "SELECT MIN(post_id) AS first_post_id
FROM " . POSTS_TABLE . "
WHERE topic_id = $topic_id";
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
 
if ($row = $db->sql_fetchrow($result))
{
$topic_update_sql .= 'topic_replies = topic_replies - 1, topic_first_post_id = ' . $row['first_post_id'];
}
}
else
{
$topic_update_sql .= 'topic_replies = topic_replies - 1';
}
}
else if ($mode != 'poll_delete')
{
$forum_update_sql .= ", forum_last_post_id = $post_id" . (($mode == 'newtopic') ? ", forum_topics = forum_topics $sign" : "");
$topic_update_sql = "topic_last_post_id = $post_id" . (($mode == 'reply') ? ", topic_replies = topic_replies $sign" : ", topic_first_post_id = $post_id");
}
else
{
$topic_update_sql .= 'topic_vote = 0';
}
 
if ($mode != 'poll_delete')
{
$sql = "UPDATE " . FORUMS_TABLE . " SET
$forum_update_sql
WHERE forum_id = $forum_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
}
 
if ($topic_update_sql != '')
{
$sql = "UPDATE " . TOPICS_TABLE . " SET
$topic_update_sql
WHERE topic_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
}
 
if ($mode != 'poll_delete')
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_posts = user_posts $sign
WHERE user_id = $user_id";
if (!$db->sql_query($sql, END_TRANSACTION))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
}
 
return;
}
 
//
// Delete a post/poll
//
function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id)
{
global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
global $userdata, $user_ip;
 
if ($mode != 'poll_delete')
{
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
 
$sql = "DELETE FROM " . POSTS_TABLE . "
WHERE post_id = $post_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE FROM " . POSTS_TEXT_TABLE . "
WHERE post_id = $post_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
 
if ($post_data['last_post'])
{
if ($post_data['first_post'])
{
$forum_update_sql .= ', forum_topics = forum_topics - 1';
$sql = "DELETE FROM " . TOPICS_TABLE . "
WHERE topic_id = $topic_id
OR topic_moved_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
WHERE topic_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
}
}
 
remove_search_post($post_id);
}
 
if ($mode == 'poll_delete' || ($mode == 'delete' && $post_data['first_post'] && $post_data['last_post']) && $post_data['has_poll'] && $post_data['edit_poll'])
{
$sql = "DELETE FROM " . VOTE_DESC_TABLE . "
WHERE topic_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE FROM " . VOTE_RESULTS_TABLE . "
WHERE vote_id = $poll_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE FROM " . VOTE_USERS_TABLE . "
WHERE vote_id = $poll_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
}
}
 
if ($mode == 'delete' && $post_data['first_post'] && $post_data['last_post'])
{
$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $forum_id) . '">';
$message = $lang['Deleted'];
}
else
{
$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $topic_id) . '">';
$message = (($mode == 'poll_delete') ? $lang['Poll_delete'] : $lang['Deleted']) . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">', '</a>');
}
 
$message .= '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
 
return;
}
 
//
// Handle user notification on new post
//
function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topic_id, &$post_id, &$notify_user)
{
global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
global $userdata, $user_ip;
 
$current_time = time();
 
if ($mode != 'delete')
{
if ($mode == 'reply')
{
$sql = "SELECT ban_userid
FROM " . BANLIST_TABLE;
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not obtain banlist', '', __LINE__, __FILE__, $sql);
}
 
$user_id_sql = '';
while ($row = $db->sql_fetchrow($result))
{
if (isset($row['ban_userid']) && !empty($row['ban_userid']))
{
$user_id_sql .= ', ' . $row['ban_userid'];
}
}
 
$sql = "SELECT u.user_id, u.user_email, u.user_lang
FROM " . TOPICS_WATCH_TABLE . " tw, " . USERS_TABLE . " u
WHERE tw.topic_id = $topic_id
AND tw.user_id NOT IN (" . $userdata['user_id'] . ", " . ANONYMOUS . $user_id_sql . ")
AND tw.notify_status = " . TOPIC_WATCH_UN_NOTIFIED . "
AND u.user_id = tw.user_id";
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not obtain list of topic watchers', '', __LINE__, __FILE__, $sql);
}
 
$update_watched_sql = '';
$bcc_list_ary = array();
if ($row = $db->sql_fetchrow($result))
{
// Sixty second limit
@set_time_limit(60);
 
do
{
if ($row['user_email'] != '')
{
$bcc_list_ary[$row['user_lang']][] = $row['user_email'];
}
$update_watched_sql .= ($update_watched_sql != '') ? ', ' . $row['user_id'] : $row['user_id'];
}
while ($row = $db->sql_fetchrow($result));
 
//
// Let's do some checking to make sure that mass mail functions
// are working in win32 versions of php.
//
if (preg_match('/[c-z]:\\\.*/i', getenv('PATH')) && !$board_config['smtp_delivery'])
{
$ini_val = (@phpversion() >= '4.0.0') ? 'ini_get' : 'get_cfg_var';
 
// We are running on windows, force delivery to use our smtp functions
// since php's are broken by default
$board_config['smtp_delivery'] = 1;
$board_config['smtp_host'] = @$ini_val('SMTP');
}
 
if (sizeof($bcc_list_ary))
{
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
 
$script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
$script_name = ($script_name != '') ? $script_name . '/viewtopic.'.$phpEx : 'viewtopic.'.$phpEx;
$server_name = trim($board_config['server_name']);
$server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://';
$server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) . '/' : '/';
 
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
 
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
 
$topic_title = (count($orig_word)) ? preg_replace($orig_word, $replacement_word, unprepare_message($topic_title)) : unprepare_message($topic_title);
 
@reset($bcc_list_ary);
while (list($user_lang, $bcc_list) = each($bcc_list_ary))
{
$emailer->use_template('topic_notify', $user_lang);
for ($i = 0; $i < count($bcc_list); $i++)
{
$emailer->bcc($bcc_list[$i]);
}
 
// The Topic_reply_notification lang string below will be used
// if for some reason the mail template subject cannot be read
// ... note it will not necessarily be in the posters own language!
$emailer->set_subject($lang['Topic_reply_notification']);
// This is a nasty kludge to remove the username var ... till (if?)
// translators update their templates
$emailer->msg = preg_replace('#[ ]?{USERNAME}#', '', $emailer->msg);
 
$emailer->assign_vars(array(
'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',
'SITENAME' => $board_config['sitename'],
'TOPIC_TITLE' => $topic_title,
 
'U_TOPIC' => $server_protocol . $server_name . $server_port . $script_name . '?' . POST_POST_URL . "=$post_id#$post_id",
'U_STOP_WATCHING_TOPIC' => $server_protocol . $server_name . $server_port . $script_name . '?' . POST_TOPIC_URL . "=$topic_id&unwatch=topic")
);
 
$emailer->send();
$emailer->reset();
}
}
}
$db->sql_freeresult($result);
 
if ($update_watched_sql != '')
{
$sql = "UPDATE " . TOPICS_WATCH_TABLE . "
SET notify_status = " . TOPIC_WATCH_NOTIFIED . "
WHERE topic_id = $topic_id
AND user_id IN ($update_watched_sql)";
$db->sql_query($sql);
}
}
 
$sql = "SELECT topic_id
FROM " . TOPICS_WATCH_TABLE . "
WHERE topic_id = $topic_id
AND user_id = " . $userdata['user_id'];
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not obtain topic watch information', '', __LINE__, __FILE__, $sql);
}
 
$row = $db->sql_fetchrow($result);
 
if (!$notify_user && !empty($row['topic_id']))
{
$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
WHERE topic_id = $topic_id
AND user_id = " . $userdata['user_id'];
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not delete topic watch information', '', __LINE__, __FILE__, $sql);
}
}
else if ($notify_user && empty($row['topic_id']))
{
$sql = "INSERT INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id, notify_status)
VALUES (" . $userdata['user_id'] . ", $topic_id, 0)";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not insert topic watch information', '', __LINE__, __FILE__, $sql);
}
}
}
}
 
//
// Fill smiley templates (or just the variables) with smileys
// Either in a window or inline
//
function generate_smilies($mode, $page_id)
{
global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path;
global $user_ip, $session_length, $starttime;
global $userdata;
 
$inline_columns = 4;
$inline_rows = 5;
$window_columns = 8;
 
if ($mode == 'window')
{
$userdata = session_pagestart($user_ip, $page_id);
init_userprefs($userdata);
 
$gen_simple_header = TRUE;
 
$page_title = $lang['Emoticons'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'smiliesbody' => 'posting_smilies.tpl')
);
}
 
$sql = "SELECT emoticon, code, smile_url
FROM " . SMILIES_TABLE . "
ORDER BY smilies_id";
if ($result = $db->sql_query($sql))
{
$num_smilies = 0;
$rowset = array();
while ($row = $db->sql_fetchrow($result))
{
if (empty($rowset[$row['smile_url']]))
{
$rowset[$row['smile_url']]['code'] = str_replace("'", "\\'", str_replace('\\', '\\\\', $row['code']));
$rowset[$row['smile_url']]['emoticon'] = $row['emoticon'];
$num_smilies++;
}
}
 
if ($num_smilies)
{
$smilies_count = ($mode == 'inline') ? min(19, $num_smilies) : $num_smilies;
$smilies_split_row = ($mode == 'inline') ? $inline_columns - 1 : $window_columns - 1;
 
$s_colspan = 0;
$row = 0;
$col = 0;
 
while (list($smile_url, $data) = @each($rowset))
{
if (!$col)
{
$template->assign_block_vars('smilies_row', array());
}
 
$template->assign_block_vars('smilies_row.smilies_col', array(
'SMILEY_CODE' => $data['code'],
'SMILEY_IMG' => $board_config['smilies_path'] . '/' . $smile_url,
'SMILEY_DESC' => $data['emoticon'])
);
 
$s_colspan = max($s_colspan, $col + 1);
 
if ($col == $smilies_split_row)
{
if ($mode == 'inline' && $row == $inline_rows - 1)
{
break;
}
$col = 0;
$row++;
}
else
{
$col++;
}
}
 
if ($mode == 'inline' && $num_smilies > $inline_rows * $inline_columns)
{
$template->assign_block_vars('switch_smilies_extra', array());
 
$template->assign_vars(array(
'L_MORE_SMILIES' => $lang['More_emoticons'],
'U_MORE_SMILIES' => append_sid("posting.$phpEx?mode=smilies"))
);
}
 
$template->assign_vars(array(
'L_EMOTICONS' => $lang['Emoticons'],
'L_CLOSE_WINDOW' => $lang['Close_window'],
'S_SMILIES_COLSPAN' => $s_colspan)
);
}
}
 
if ($mode == 'window')
{
$template->pparse('smiliesbody');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
}
 
/**
* Called from within prepare_message to clean included HTML tags if HTML is
* turned on for that post
* @param array $tag Matching text from the message to parse
*/
function clean_html($tag)
{
global $board_config;
 
if (empty($tag[0]))
{
return '';
}
 
$allowed_html_tags = preg_split('/, */', strtolower($board_config['allow_html_tags']));
$disallowed_attributes = '/^(?:style|on)/i';
 
// Check if this is an end tag
preg_match('/<[^\w\/]*\/[\W]*(\w+)/', $tag[0], $matches);
if (sizeof($matches))
{
if (in_array(strtolower($matches[1]), $allowed_html_tags))
{
return '</' . $matches[1] . '>';
}
else
{
return htmlspecialchars('</' . $matches[1] . '>');
}
}
 
// Check if this is an allowed tag
if (in_array(strtolower($tag[1]), $allowed_html_tags))
{
$attributes = '';
if (!empty($tag[2]))
{
preg_match_all('/[\W]*?(\w+)[\W]*?=[\W]*?(["\'])((?:(?!\2).)*)\2/', $tag[2], $test);
for ($i = 0; $i < sizeof($test[0]); $i++)
{
if (preg_match($disallowed_attributes, $test[1][$i]))
{
continue;
}
$attributes .= ' ' . $test[1][$i] . '=' . $test[2][$i] . str_replace(array('[', ']'), array('&#91;', '&#93;'), htmlspecialchars($test[3][$i])) . $test[2][$i];
}
}
if (in_array(strtolower($tag[1]), $allowed_html_tags))
{
return '<' . $tag[1] . $attributes . '>';
}
else
{
return htmlspecialchars('<' . $tag[1] . $attributes . '>');
}
}
// Finally, this is not an allowed tag so strip all the attibutes and escape it
else
{
return htmlspecialchars('<' . $tag[1] . '>');
}
}
?>
/Forum/includes/functions_search.php
0,0 → 1,498
<?php
/***************************************************************************
* functions_search.php
* -------------------
* begin : Wed Sep 05 2001
* copyright : (C) 2002 The phpBB Group
* email : support@phpbb.com
*
* $Id: functions_search.php,v 1.8.2.20 2005/09/14 18:14:30 acydburn Exp $
*
****************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
{
static $drop_char_match = array('^', '$', '&', '(', ')', '<', '>', '`', '\'', '"', '|', ',', '@', '_', '?', '%', '-', '~', '+', '.', '[', ']', '{', '}', ':', '\\', '/', '=', '#', '\'', ';', '!');
static $drop_char_replace = array(' ', ' ', ' ', ' ', ' ', ' ', ' ', '', '', ' ', ' ', ' ', ' ', '', ' ', ' ', '', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' , ' ', ' ', ' ', ' ', ' ', ' ');
 
$entry = ' ' . strip_tags(strtolower($entry)) . ' ';
 
if ( $mode == 'post' )
{
// Replace line endings by a space
$entry = preg_replace('/[\n\r]/is', ' ', $entry);
// HTML entities like &nbsp;
$entry = preg_replace('/\b&[a-z]+;\b/', ' ', $entry);
// Remove URL's
$entry = preg_replace('/\b[a-z0-9]+:\/\/[a-z0-9\.\-]+(\/[a-z0-9\?\.%_\-\+=&\/]+)?/', ' ', $entry);
// Quickly remove BBcode.
$entry = preg_replace('/\[img:[a-z0-9]{10,}\].*?\[\/img:[a-z0-9]{10,}\]/', ' ', $entry);
$entry = preg_replace('/\[\/?url(=.*?)?\]/', ' ', $entry);
$entry = preg_replace('/\[\/?[a-z\*=\+\-]+(\:?[0-9a-z]+)?:[a-z0-9]{10,}(\:[a-z0-9]+)?=?.*?\]/', ' ', $entry);
}
else if ( $mode == 'search' )
{
$entry = str_replace(' +', ' and ', $entry);
$entry = str_replace(' -', ' not ', $entry);
}
 
//
// Filter out strange characters like ^, $, &, change "it's" to "its"
//
for($i = 0; $i < count($drop_char_match); $i++)
{
$entry = str_replace($drop_char_match[$i], $drop_char_replace[$i], $entry);
}
 
if ( $mode == 'post' )
{
$entry = str_replace('*', ' ', $entry);
 
// 'words' that consist of <3 or >20 characters are removed.
$entry = preg_replace('/[ ]([\S]{1,2}|[\S]{21,})[ ]/',' ', $entry);
}
 
if ( !empty($stopword_list) )
{
for ($j = 0; $j < count($stopword_list); $j++)
{
$stopword = trim($stopword_list[$j]);
 
if ( $mode == 'post' || ( $stopword != 'not' && $stopword != 'and' && $stopword != 'or' ) )
{
$entry = str_replace(' ' . trim($stopword) . ' ', ' ', $entry);
}
}
}
 
if ( !empty($synonym_list) )
{
for ($j = 0; $j < count($synonym_list); $j++)
{
list($replace_synonym, $match_synonym) = split(' ', trim(strtolower($synonym_list[$j])));
if ( $mode == 'post' || ( $match_synonym != 'not' && $match_synonym != 'and' && $match_synonym != 'or' ) )
{
$entry = str_replace(' ' . trim($match_synonym) . ' ', ' ' . trim($replace_synonym) . ' ', $entry);
}
}
}
 
return $entry;
}
 
function split_words($entry, $mode = 'post')
{
// If you experience problems with the new method, uncomment this block.
/*
$rex = ( $mode == 'post' ) ? "/\b([\w±µ-ÿ][\w±µ-ÿ']*[\w±µ-ÿ]+|[\w±µ-ÿ]+?)\b/" : '/(\*?[a-z0-9±µ-ÿ]+\*?)|\b([a-z0-9±µ-ÿ]+)\b/';
preg_match_all($rex, $entry, $split_entries);
 
return $split_entries[1];
*/
// Trim 1+ spaces to one space and split this trimmed string into words.
return explode(' ', trim(preg_replace('#\s+#', ' ', $entry)));
}
 
function add_search_words($mode, $post_id, $post_text, $post_title = '')
{
global $db, $phpbb_root_path, $board_config, $lang;
 
$stopword_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_stopwords.txt");
$synonym_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_synonyms.txt");
 
$search_raw_words = array();
$search_raw_words['text'] = split_words(clean_words('post', $post_text, $stopword_array, $synonym_array));
$search_raw_words['title'] = split_words(clean_words('post', $post_title, $stopword_array, $synonym_array));
 
@set_time_limit(0);
 
$word = array();
$word_insert_sql = array();
while ( list($word_in, $search_matches) = @each($search_raw_words) )
{
$word_insert_sql[$word_in] = '';
if ( !empty($search_matches) )
{
for ($i = 0; $i < count($search_matches); $i++)
{
$search_matches[$i] = trim($search_matches[$i]);
 
if( $search_matches[$i] != '' )
{
$word[] = $search_matches[$i];
if ( !strstr($word_insert_sql[$word_in], "'" . $search_matches[$i] . "'") )
{
$word_insert_sql[$word_in] .= ( $word_insert_sql[$word_in] != "" ) ? ", '" . $search_matches[$i] . "'" : "'" . $search_matches[$i] . "'";
}
}
}
}
}
 
if ( count($word) )
{
sort($word);
 
$prev_word = '';
$word_text_sql = '';
$temp_word = array();
for($i = 0; $i < count($word); $i++)
{
if ( $word[$i] != $prev_word )
{
$temp_word[] = $word[$i];
$word_text_sql .= ( ( $word_text_sql != '' ) ? ', ' : '' ) . "'" . $word[$i] . "'";
}
$prev_word = $word[$i];
}
$word = $temp_word;
 
$check_words = array();
switch( SQL_LAYER )
{
case 'postgresql':
case 'msaccess':
case 'mssql-odbc':
case 'oracle':
case 'db2':
$sql = "SELECT word_id, word_text
FROM " . SEARCH_WORD_TABLE . "
WHERE word_text IN ($word_text_sql)";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select words', '', __LINE__, __FILE__, $sql);
}
 
while ( $row = $db->sql_fetchrow($result) )
{
$check_words[$row['word_text']] = $row['word_id'];
}
break;
}
 
$value_sql = '';
$match_word = array();
for ($i = 0; $i < count($word); $i++)
{
$new_match = true;
if ( isset($check_words[$word[$i]]) )
{
$new_match = false;
}
 
if ( $new_match )
{
switch( SQL_LAYER )
{
case 'mysql':
case 'mysql4':
$value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . '(\'' . $word[$i] . '\', 0)';
break;
case 'mssql':
case 'mssql-odbc':
$value_sql .= ( ( $value_sql != '' ) ? ' UNION ALL ' : '' ) . "SELECT '" . $word[$i] . "', 0";
break;
default:
$sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text, word_common)
VALUES ('" . $word[$i] . "', 0)";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql);
}
break;
}
}
}
 
if ( $value_sql != '' )
{
switch ( SQL_LAYER )
{
case 'mysql':
case 'mysql4':
$sql = "INSERT IGNORE INTO " . SEARCH_WORD_TABLE . " (word_text, word_common)
VALUES $value_sql";
break;
case 'mssql':
case 'mssql-odbc':
$sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text, word_common)
$value_sql";
break;
}
 
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql);
}
}
}
 
while( list($word_in, $match_sql) = @each($word_insert_sql) )
{
$title_match = ( $word_in == 'title' ) ? 1 : 0;
 
if ( $match_sql != '' )
{
$sql = "INSERT INTO " . SEARCH_MATCH_TABLE . " (post_id, word_id, title_match)
SELECT $post_id, word_id, $title_match
FROM " . SEARCH_WORD_TABLE . "
WHERE word_text IN ($match_sql)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert new word matches', '', __LINE__, __FILE__, $sql);
}
}
}
 
if ($mode == 'single')
{
remove_common('single', 4/10, $word);
}
 
return;
}
 
//
// Check if specified words are too common now
//
function remove_common($mode, $fraction, $word_id_list = array())
{
global $db;
 
$sql = "SELECT COUNT(post_id) AS total_posts
FROM " . POSTS_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain post count', '', __LINE__, __FILE__, $sql);
}
 
$row = $db->sql_fetchrow($result);
 
if ( $row['total_posts'] >= 100 )
{
$common_threshold = floor($row['total_posts'] * $fraction);
 
if ( $mode == 'single' && count($word_id_list) )
{
$word_id_sql = '';
for($i = 0; $i < count($word_id_list); $i++)
{
$word_id_sql .= ( ( $word_id_sql != '' ) ? ', ' : '' ) . "'" . $word_id_list[$i] . "'";
}
 
$sql = "SELECT m.word_id
FROM " . SEARCH_MATCH_TABLE . " m, " . SEARCH_WORD_TABLE . " w
WHERE w.word_text IN ($word_id_sql)
AND m.word_id = w.word_id
GROUP BY m.word_id
HAVING COUNT(m.word_id) > $common_threshold";
}
else
{
$sql = "SELECT word_id
FROM " . SEARCH_MATCH_TABLE . "
GROUP BY word_id
HAVING COUNT(word_id) > $common_threshold";
}
 
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain common word list', '', __LINE__, __FILE__, $sql);
}
 
$common_word_id = '';
while ( $row = $db->sql_fetchrow($result) )
{
$common_word_id .= ( ( $common_word_id != '' ) ? ', ' : '' ) . $row['word_id'];
}
$db->sql_freeresult($result);
 
if ( $common_word_id != '' )
{
$sql = "UPDATE " . SEARCH_WORD_TABLE . "
SET word_common = " . TRUE . "
WHERE word_id IN ($common_word_id)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
WHERE word_id IN ($common_word_id)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete word match entry', '', __LINE__, __FILE__, $sql);
}
}
}
 
return;
}
 
function remove_search_post($post_id_sql)
{
global $db;
 
$words_removed = false;
 
switch ( SQL_LAYER )
{
case 'mysql':
case 'mysql4':
$sql = "SELECT word_id
FROM " . SEARCH_MATCH_TABLE . "
WHERE post_id IN ($post_id_sql)
GROUP BY word_id";
if ( $result = $db->sql_query($sql) )
{
$word_id_sql = '';
while ( $row = $db->sql_fetchrow($result) )
{
$word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id'];
}
 
$sql = "SELECT word_id
FROM " . SEARCH_MATCH_TABLE . "
WHERE word_id IN ($word_id_sql)
GROUP BY word_id
HAVING COUNT(word_id) = 1";
if ( $result = $db->sql_query($sql) )
{
$word_id_sql = '';
while ( $row = $db->sql_fetchrow($result) )
{
$word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id'];
}
 
if ( $word_id_sql != '' )
{
$sql = "DELETE FROM " . SEARCH_WORD_TABLE . "
WHERE word_id IN ($word_id_sql)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql);
}
 
$words_removed = $db->sql_affectedrows();
}
}
}
break;
 
default:
$sql = "DELETE FROM " . SEARCH_WORD_TABLE . "
WHERE word_id IN (
SELECT word_id
FROM " . SEARCH_MATCH_TABLE . "
WHERE word_id IN (
SELECT word_id
FROM " . SEARCH_MATCH_TABLE . "
WHERE post_id IN ($post_id_sql)
GROUP BY word_id
)
GROUP BY word_id
HAVING COUNT(word_id) = 1
)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete old words from word table', '', __LINE__, __FILE__, $sql);
}
 
$words_removed = $db->sql_affectedrows();
 
break;
}
 
$sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
WHERE post_id IN ($post_id_sql)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
 
return $words_removed;
}
 
//
// Username search
//
function username_search($search_match)
{
global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path;
global $starttime, $gen_simple_header;
$gen_simple_header = TRUE;
 
$username_list = '';
if ( !empty($search_match) )
{
$username_search = preg_replace('/\*/', '%', phpbb_clean_username($search_match));
 
$sql = "SELECT username
FROM " . USERS_TABLE . "
WHERE username LIKE '" . str_replace("\'", "''", $username_search) . "' AND user_id <> " . ANONYMOUS . "
ORDER BY username";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain search results', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
do
{
$username_list .= '<option value="' . $row['username'] . '">' . $row['username'] . '</option>';
}
while ( $row = $db->sql_fetchrow($result) );
}
else
{
$username_list .= '<option>' . $lang['No_match']. '</option>';
}
$db->sql_freeresult($result);
}
 
$page_title = $lang['Search'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'search_user_body' => 'search_username.tpl')
);
 
$template->assign_vars(array(
'USERNAME' => (!empty($search_match)) ? phpbb_clean_username($search_match) : '',
 
'L_CLOSE_WINDOW' => $lang['Close_window'],
'L_SEARCH_USERNAME' => $lang['Find_username'],
'L_UPDATE_USERNAME' => $lang['Select_username'],
'L_SELECT' => $lang['Select'],
'L_SEARCH' => $lang['Search'],
'L_SEARCH_EXPLAIN' => $lang['Search_author_explain'],
'L_CLOSE_WINDOW' => $lang['Close_window'],
 
'S_USERNAME_OPTIONS' => $username_list,
'S_SEARCH_ACTION' => append_sid("search.$phpEx?mode=searchuser"))
);
 
if ( $username_list != '' )
{
$template->assign_block_vars('switch_select_name', array());
}
 
$template->pparse('search_user_body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
return;
}
 
?>
/Forum/includes/functions_selects.php
0,0 → 1,111
<?php
/***************************************************************************
* function_selects.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: functions_selects.php,v 1.3.2.5 2005/05/06 20:50:11 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
 
//
// Pick a language, any language ...
//
function language_select($default, $select_name = "language", $dirname="language")
{
global $phpEx, $phpbb_root_path;
 
$dir = opendir($phpbb_root_path . $dirname);
 
$lang = array();
while ( $file = readdir($dir) )
{
if (preg_match('#^lang_#i', $file) && !is_file(@phpbb_realpath($phpbb_root_path . $dirname . '/' . $file)) && !is_link(@phpbb_realpath($phpbb_root_path . $dirname . '/' . $file)))
{
$filename = trim(str_replace("lang_", "", $file));
$displayname = preg_replace("/^(.*?)_(.*)$/", "\\1 [ \\2 ]", $filename);
$displayname = preg_replace("/\[(.*?)_(.*)\]/", "[ \\1 - \\2 ]", $displayname);
$lang[$displayname] = $filename;
}
}
 
closedir($dir);
 
@asort($lang);
@reset($lang);
 
$lang_select = '<select name="' . $select_name . '">';
while ( list($displayname, $filename) = @each($lang) )
{
$selected = ( strtolower($default) == strtolower($filename) ) ? ' selected="selected"' : '';
$lang_select .= '<option value="' . $filename . '"' . $selected . '>' . ucwords($displayname) . '</option>';
}
$lang_select .= '</select>';
 
return $lang_select;
}
 
//
// Pick a template/theme combo,
//
function style_select($default_style, $select_name = "style", $dirname = "templates")
{
global $db;
 
$sql = "SELECT themes_id, style_name
FROM " . THEMES_TABLE . "
ORDER BY template_name, themes_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't query themes table", "", __LINE__, __FILE__, $sql);
}
 
$style_select = '<select name="' . $select_name . '">';
while ( $row = $db->sql_fetchrow($result) )
{
$selected = ( $row['themes_id'] == $default_style ) ? ' selected="selected"' : '';
 
$style_select .= '<option value="' . $row['themes_id'] . '"' . $selected . '>' . $row['style_name'] . '</option>';
}
$style_select .= "</select>";
 
return $style_select;
}
 
//
// Pick a timezone
//
function tz_select($default, $select_name = 'timezone')
{
global $sys_timezone, $lang;
 
if ( !isset($default) )
{
$default == $sys_timezone;
}
$tz_select = '<select name="' . $select_name . '">';
 
while( list($offset, $zone) = @each($lang['tz']) )
{
$selected = ( $offset == $default ) ? ' selected="selected"' : '';
$tz_select .= '<option value="' . $offset . '"' . $selected . '>' . $zone . '</option>';
}
$tz_select .= '</select>';
 
return $tz_select;
}
 
?>
/Forum/includes/functions_validate.php
0,0 → 1,205
<?php
/***************************************************************************
* functions_validate.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: functions_validate.php,v 1.6.2.15 2005/10/30 15:17:14 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
//
// Check to see if the username has been taken, or if it is disallowed.
// Also checks if it includes the " character, which we don't allow in usernames.
// Used for registering, changing names, and posting anonymously with a username
//
function validate_username($username)
{
global $db, $lang, $userdata;
 
// Remove doubled up spaces
$username = preg_replace('#\s+#', ' ', trim($username));
$username = phpbb_clean_username($username);
 
$sql = "SELECT username
FROM " . USERS_TABLE . "
WHERE LOWER(username) = '" . strtolower($username) . "'";
if ($result = $db->sql_query($sql))
{
while ($row = $db->sql_fetchrow($result))
{
if (($userdata['session_logged_in'] && $row['username'] != $userdata['username']) || !$userdata['session_logged_in'])
{
$db->sql_freeresult($result);
return array('error' => true, 'error_msg' => $lang['Username_taken']);
}
}
}
$db->sql_freeresult($result);
 
$sql = "SELECT group_name
FROM " . GROUPS_TABLE . "
WHERE LOWER(group_name) = '" . strtolower($username) . "'";
if ($result = $db->sql_query($sql))
{
if ($row = $db->sql_fetchrow($result))
{
$db->sql_freeresult($result);
return array('error' => true, 'error_msg' => $lang['Username_taken']);
}
}
$db->sql_freeresult($result);
 
$sql = "SELECT disallow_username
FROM " . DISALLOW_TABLE;
if ($result = $db->sql_query($sql))
{
if ($row = $db->sql_fetchrow($result))
{
do
{
if (preg_match("#\b(" . str_replace("\*", ".*?", preg_quote($row['disallow_username'], '#')) . ")\b#i", $username))
{
$db->sql_freeresult($result);
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
}
}
while($row = $db->sql_fetchrow($result));
}
}
$db->sql_freeresult($result);
 
$sql = "SELECT word
FROM " . WORDS_TABLE;
if ($result = $db->sql_query($sql))
{
if ($row = $db->sql_fetchrow($result))
{
do
{
if (preg_match("#\b(" . str_replace("\*", ".*?", preg_quote($row['word'], '#')) . ")\b#i", $username))
{
$db->sql_freeresult($result);
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
}
}
while ($row = $db->sql_fetchrow($result));
}
}
$db->sql_freeresult($result);
 
// Don't allow " and ALT-255 in username.
if (strstr($username, '"') || strstr($username, '&quot;') || strstr($username, chr(160)))
{
return array('error' => true, 'error_msg' => $lang['Username_invalid']);
}
 
return array('error' => false, 'error_msg' => '');
}
 
//
// Check to see if email address is banned
// or already present in the DB
//
function validate_email($email)
{
global $db, $lang;
 
if ($email != '')
{
if (preg_match('/^[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*?[a-z]+$/is', $email))
{
$sql = "SELECT ban_email
FROM " . BANLIST_TABLE;
if ($result = $db->sql_query($sql))
{
if ($row = $db->sql_fetchrow($result))
{
do
{
$match_email = str_replace('*', '.*?', $row['ban_email']);
if (preg_match('/^' . $match_email . '$/is', $email))
{
$db->sql_freeresult($result);
return array('error' => true, 'error_msg' => $lang['Email_banned']);
}
}
while($row = $db->sql_fetchrow($result));
}
}
$db->sql_freeresult($result);
 
$sql = "SELECT user_email
FROM " . USERS_TABLE . "
WHERE user_email = '" . str_replace("\'", "''", $email) . "'";
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, "Couldn't obtain user email information.", "", __LINE__, __FILE__, $sql);
}
if ($row = $db->sql_fetchrow($result))
{
return array('error' => true, 'error_msg' => $lang['Email_taken']);
}
$db->sql_freeresult($result);
 
return array('error' => false, 'error_msg' => '');
}
}
 
return array('error' => true, 'error_msg' => $lang['Email_invalid']);
}
 
//
// Does supplementary validation of optional profile fields. This expects common stuff like trim() and strip_tags()
// to have already been run. Params are passed by-ref, so we can set them to the empty string if they fail.
//
function validate_optional_fields(&$icq, &$aim, &$msnm, &$yim, &$website, &$location, &$occupation, &$interests, &$sig)
{
$check_var_length = array('aim', 'msnm', 'yim', 'location', 'occupation', 'interests', 'sig');
 
for($i = 0; $i < count($check_var_length); $i++)
{
if (strlen($$check_var_length[$i]) < 2)
{
$$check_var_length[$i] = '';
}
}
 
// ICQ number has to be only numbers.
if (!preg_match('/^[0-9]+$/', $icq))
{
$icq = '';
}
// website has to start with http://, followed by something with length at least 3 that
// contains at least one dot.
if ($website != "")
{
if (!preg_match('#^http[s]?:\/\/#i', $website))
{
$website = 'http://' . $website;
}
 
if (!preg_match('#^http[s]?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $website))
{
$website = '';
}
}
 
return;
}
 
?>
/Forum/includes/index.htm
0,0 → 1,10
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
 
</body>
</html>
/Forum/includes/page_header.php
0,0 → 1,490
<?php
/***************************************************************************
* page_header.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: page_header.php,v 1.106.2.25 2005/10/30 15:17:14 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
 
define('HEADER_INC', TRUE);
 
//
// gzip_compression
//
$do_gzip_compress = FALSE;
if ( $board_config['gzip_compress'] )
{
$phpver = phpversion();
 
$useragent = (isset($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) ? $HTTP_SERVER_VARS['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT');
 
if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
{
if ( extension_loaded('zlib') )
{
ob_start('ob_gzhandler');
}
}
else if ( $phpver > '4.0' )
{
if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') )
{
if ( extension_loaded('zlib') )
{
$do_gzip_compress = TRUE;
ob_start();
ob_implicit_flush(0);
 
header('Content-Encoding: gzip');
}
}
}
}
 
//
// Parse and show the overall header.
//
$template->set_filenames(array(
'overall_header' => ( empty($gen_simple_header) ) ? 'overall_header.tpl' : 'simple_header.tpl')
);
 
//
// Generate logged in/logged out status
//
if ( $userdata['session_logged_in'] )
{
$u_login_logout = 'login.'.$phpEx.'?logout=true&amp;sid=' . $userdata['session_id'];
$l_login_logout = $lang['Logout'] . ' [ ' . $userdata['username'] . ' ]';
}
else
{
$u_login_logout = 'login.'.$phpEx;
$l_login_logout = $lang['Login'];
}
 
$s_last_visit = ( $userdata['session_logged_in'] ) ? create_date($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone']) : '';
 
//
// Get basic (usernames + totals) online
// situation
//
$logged_visible_online = 0;
$logged_hidden_online = 0;
$guests_online = 0;
$online_userlist = '';
$l_online_users = '';
 
if (defined('SHOW_ONLINE'))
{
 
$user_forum_sql = ( !empty($forum_id) ) ? "AND s.session_page = " . intval($forum_id) : '';
$sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_ip
FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s
WHERE u.user_id = s.session_user_id
AND s.session_time >= ".( time() - 300 ) . "
$user_forum_sql
ORDER BY u.username ASC, s.session_ip ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql);
}
 
$userlist_ary = array();
$userlist_visible = array();
 
$prev_user_id = 0;
$prev_user_ip = $prev_session_ip = '';
 
while( $row = $db->sql_fetchrow($result) )
{
// User is logged in and therefor not a guest
if ( $row['session_logged_in'] )
{
// Skip multiple sessions for one user
if ( $row['user_id'] != $prev_user_id )
{
$style_color = '';
if ( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
else if ( $row['user_level'] == MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
}
 
if ( $row['user_allow_viewonline'] )
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
$logged_visible_online++;
}
else
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
$logged_hidden_online++;
}
 
if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
$online_userlist .= ( $online_userlist != '' ) ? ', ' . $user_online_link : $user_online_link;
}
}
 
$prev_user_id = $row['user_id'];
}
else
{
// Skip multiple sessions for one user
if ( $row['session_ip'] != $prev_session_ip )
{
$guests_online++;
}
}
 
$prev_session_ip = $row['session_ip'];
}
$db->sql_freeresult($result);
 
if ( empty($online_userlist) )
{
$online_userlist = $lang['None'];
}
$online_userlist = ( ( isset($forum_id) ) ? $lang['Browsing_forum'] : $lang['Registered_users'] ) . ' ' . $online_userlist;
 
$total_online_users = $logged_visible_online + $logged_hidden_online + $guests_online;
 
if ( $total_online_users > $board_config['record_online_users'])
{
$board_config['record_online_users'] = $total_online_users;
$board_config['record_online_date'] = time();
 
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '$total_online_users'
WHERE config_name = 'record_online_users'";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update online user record (nr of users)', '', __LINE__, __FILE__, $sql);
}
 
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '" . $board_config['record_online_date'] . "'
WHERE config_name = 'record_online_date'";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update online user record (date)', '', __LINE__, __FILE__, $sql);
}
}
 
if ( $total_online_users == 0 )
{
$l_t_user_s = $lang['Online_users_zero_total'];
}
else if ( $total_online_users == 1 )
{
$l_t_user_s = $lang['Online_user_total'];
}
else
{
$l_t_user_s = $lang['Online_users_total'];
}
 
if ( $logged_visible_online == 0 )
{
$l_r_user_s = $lang['Reg_users_zero_total'];
}
else if ( $logged_visible_online == 1 )
{
$l_r_user_s = $lang['Reg_user_total'];
}
else
{
$l_r_user_s = $lang['Reg_users_total'];
}
 
if ( $logged_hidden_online == 0 )
{
$l_h_user_s = $lang['Hidden_users_zero_total'];
}
else if ( $logged_hidden_online == 1 )
{
$l_h_user_s = $lang['Hidden_user_total'];
}
else
{
$l_h_user_s = $lang['Hidden_users_total'];
}
 
if ( $guests_online == 0 )
{
$l_g_user_s = $lang['Guest_users_zero_total'];
}
else if ( $guests_online == 1 )
{
$l_g_user_s = $lang['Guest_user_total'];
}
else
{
$l_g_user_s = $lang['Guest_users_total'];
}
 
$l_online_users = sprintf($l_t_user_s, $total_online_users);
$l_online_users .= sprintf($l_r_user_s, $logged_visible_online);
$l_online_users .= sprintf($l_h_user_s, $logged_hidden_online);
$l_online_users .= sprintf($l_g_user_s, $guests_online);
}
 
//
// Obtain number of new private messages
// if user is logged in
//
if ( ($userdata['session_logged_in']) && (empty($gen_simple_header)) )
{
if ( $userdata['user_new_privmsg'] )
{
$l_message_new = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms'];
$l_privmsgs_text = sprintf($l_message_new, $userdata['user_new_privmsg']);
 
if ( $userdata['user_last_privmsg'] > $userdata['user_lastvisit'] )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_last_privmsg = " . $userdata['user_lastvisit'] . "
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update private message new/read time for user', '', __LINE__, __FILE__, $sql);
}
 
$s_privmsg_new = 1;
$icon_pm = $images['pm_new_msg'];
}
else
{
$s_privmsg_new = 0;
$icon_pm = $images['pm_new_msg'];
}
}
else
{
$l_privmsgs_text = $lang['No_new_pm'];
 
$s_privmsg_new = 0;
$icon_pm = $images['pm_no_new_msg'];
}
 
if ( $userdata['user_unread_privmsg'] )
{
$l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms'];
$l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']);
}
else
{
$l_privmsgs_text_unread = $lang['No_unread_pm'];
}
}
else
{
$icon_pm = $images['pm_no_new_msg'];
$l_privmsgs_text = $lang['Login_check_pm'];
$l_privmsgs_text_unread = '';
$s_privmsg_new = 0;
}
 
//
// Generate HTML required for Mozilla Navigation bar
//
if (!isset($nav_links))
{
$nav_links = array();
}
 
$nav_links_html = '';
$nav_link_proto = '<link rel="%s" href="%s" title="%s" />' . "\n";
while( list($nav_item, $nav_array) = @each($nav_links) )
{
if ( !empty($nav_array['url']) )
{
$nav_links_html .= sprintf($nav_link_proto, $nav_item, append_sid($nav_array['url']), $nav_array['title']);
}
else
{
// We have a nested array, used for items like <link rel='chapter'> that can occur more than once.
while( list(,$nested_array) = each($nav_array) )
{
$nav_links_html .= sprintf($nav_link_proto, $nav_item, $nested_array['url'], $nested_array['title']);
}
}
}
 
// Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility
$l_timezone = explode('.', $board_config['board_timezone']);
$l_timezone = (count($l_timezone) > 1 && $l_timezone[count($l_timezone)-1] != 0) ? $lang[sprintf('%.1f', $board_config['board_timezone'])] : $lang[number_format($board_config['board_timezone'])];
//
// The following assigns all _common_ variables that may be used at any point
// in a template.
//
$template->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'SITE_DESCRIPTION' => $board_config['site_desc'],
'PAGE_TITLE' => $page_title,
'LAST_VISIT_DATE' => sprintf($lang['You_last_visit'], $s_last_visit),
'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])),
'TOTAL_USERS_ONLINE' => $l_online_users,
'LOGGED_IN_USER_LIST' => $online_userlist,
'RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])),
'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text,
'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread,
'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new,
 
'PRIVMSG_IMG' => $icon_pm,
 
'L_USERNAME' => $lang['Username'],
'L_PASSWORD' => $lang['Password'],
'L_LOGIN_LOGOUT' => $l_login_logout,
'L_LOGIN' => $lang['Login'],
'L_LOG_ME_IN' => $lang['Log_me_in'],
'L_AUTO_LOGIN' => $lang['Log_me_in'],
'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']),
'L_REGISTER' => $lang['Register'],
'L_PROFILE' => $lang['Profile'],
'L_SEARCH' => $lang['Search'],
'L_PRIVATEMSGS' => $lang['Private_Messages'],
'L_WHO_IS_ONLINE' => $lang['Who_is_Online'],
'L_MEMBERLIST' => $lang['Memberlist'],
'L_FAQ' => $lang['FAQ'],
'L_USERGROUPS' => $lang['Usergroups'],
'L_SEARCH_NEW' => $lang['Search_new'],
'L_SEARCH_UNANSWERED' => $lang['Search_unanswered'],
'L_SEARCH_SELF' => $lang['Search_your_posts'],
'L_WHOSONLINE_ADMIN' => sprintf($lang['Admin_online_color'], '<span style="color:#' . $theme['fontcolor3'] . '">', '</span>'),
'L_WHOSONLINE_MOD' => sprintf($lang['Mod_online_color'], '<span style="color:#' . $theme['fontcolor2'] . '">', '</span>'),
 
'U_SEARCH_UNANSWERED' => append_sid('search.'.$phpEx.'?search_id=unanswered'),
'U_SEARCH_SELF' => append_sid('search.'.$phpEx.'?search_id=egosearch'),
'U_SEARCH_NEW' => append_sid('search.'.$phpEx.'?search_id=newposts'),
'U_INDEX' => append_sid('index.'.$phpEx),
'U_REGISTER' => append_sid('profile.'.$phpEx.'?mode=register'),
'U_PROFILE' => append_sid('profile.'.$phpEx.'?mode=editprofile'),
'U_PRIVATEMSGS' => append_sid('privmsg.'.$phpEx.'?folder=inbox'),
'U_PRIVATEMSGS_POPUP' => append_sid('privmsg.'.$phpEx.'?mode=newpm'),
'U_SEARCH' => append_sid('search.'.$phpEx),
'U_MEMBERLIST' => append_sid('memberlist.'.$phpEx),
'U_MODCP' => append_sid('modcp.'.$phpEx),
'U_FAQ' => append_sid('faq.'.$phpEx),
'U_VIEWONLINE' => append_sid('viewonline.'.$phpEx),
'U_LOGIN_LOGOUT' => append_sid($u_login_logout),
'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),
 
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
'S_CONTENT_ENCODING' => $lang['ENCODING'],
'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
'S_TIMEZONE' => sprintf($lang['All_times'], $l_timezone),
'S_LOGIN_ACTION' => append_sid('login.'.$phpEx),
 
'T_HEAD_STYLESHEET' => $theme['head_stylesheet'],
'T_BODY_BACKGROUND' => $theme['body_background'],
'T_BODY_BGCOLOR' => '#'.$theme['body_bgcolor'],
'T_BODY_TEXT' => '#'.$theme['body_text'],
'T_BODY_LINK' => '#'.$theme['body_link'],
'T_BODY_VLINK' => '#'.$theme['body_vlink'],
'T_BODY_ALINK' => '#'.$theme['body_alink'],
'T_BODY_HLINK' => '#'.$theme['body_hlink'],
'T_TR_COLOR1' => '#'.$theme['tr_color1'],
'T_TR_COLOR2' => '#'.$theme['tr_color2'],
'T_TR_COLOR3' => '#'.$theme['tr_color3'],
'T_TR_CLASS1' => $theme['tr_class1'],
'T_TR_CLASS2' => $theme['tr_class2'],
'T_TR_CLASS3' => $theme['tr_class3'],
'T_TH_COLOR1' => '#'.$theme['th_color1'],
'T_TH_COLOR2' => '#'.$theme['th_color2'],
'T_TH_COLOR3' => '#'.$theme['th_color3'],
'T_TH_CLASS1' => $theme['th_class1'],
'T_TH_CLASS2' => $theme['th_class2'],
'T_TH_CLASS3' => $theme['th_class3'],
'T_TD_COLOR1' => '#'.$theme['td_color1'],
'T_TD_COLOR2' => '#'.$theme['td_color2'],
'T_TD_COLOR3' => '#'.$theme['td_color3'],
'T_TD_CLASS1' => $theme['td_class1'],
'T_TD_CLASS2' => $theme['td_class2'],
'T_TD_CLASS3' => $theme['td_class3'],
'T_FONTFACE1' => $theme['fontface1'],
'T_FONTFACE2' => $theme['fontface2'],
'T_FONTFACE3' => $theme['fontface3'],
'T_FONTSIZE1' => $theme['fontsize1'],
'T_FONTSIZE2' => $theme['fontsize2'],
'T_FONTSIZE3' => $theme['fontsize3'],
'T_FONTCOLOR1' => '#'.$theme['fontcolor1'],
'T_FONTCOLOR2' => '#'.$theme['fontcolor2'],
'T_FONTCOLOR3' => '#'.$theme['fontcolor3'],
'T_SPAN_CLASS1' => $theme['span_class1'],
'T_SPAN_CLASS2' => $theme['span_class2'],
'T_SPAN_CLASS3' => $theme['span_class3'],
 
'NAV_LINKS' => $nav_links_html)
);
 
//
// Login box?
//
if ( !$userdata['session_logged_in'] )
{
$template->assign_block_vars('switch_user_logged_out', array());
//
// Allow autologin?
//
if (!isset($board_config['allow_autologin']) || $board_config['allow_autologin'] )
{
$template->assign_block_vars('switch_allow_autologin', array());
$template->assign_block_vars('switch_user_logged_out.switch_allow_autologin', array());
}
}
else
{
$template->assign_block_vars('switch_user_logged_in', array());
 
if ( !empty($userdata['user_popup_pm']) )
{
$template->assign_block_vars('switch_enable_pm_popup', array());
}
}
 
// Add no-cache control for cookies if they are set
//$c_no_cache = (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_data'])) ? 'no-cache="set-cookie", ' : '';
 
// Work around for "current" Apache 2 + PHP module which seems to not
// cope with private cache control setting
if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2'))
{
header ('Cache-Control: no-cache, pre-check=0, post-check=0');
}
else
{
header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
}
header ('Expires: 0');
header ('Pragma: no-cache');
 
$template->pparse('overall_header');
 
?>
/Forum/includes/page_tail.php
0,0 → 1,76
<?php
/***************************************************************************
* page_tail.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: page_tail.php,v 1.27.2.4 2005/09/14 18:14:30 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if ( !defined('IN_PHPBB') )
{
die('Hacking attempt');
}
 
global $do_gzip_compress;
 
//
// Show the overall footer.
//
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
 
$template->set_filenames(array(
'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
);
 
$template->assign_vars(array(
'TRANSLATION_INFO' => (isset($lang['TRANSLATION_INFO'])) ? $lang['TRANSLATION_INFO'] : ((isset($lang['TRANSLATION'])) ? $lang['TRANSLATION'] : ''),
'ADMIN_LINK' => $admin_link)
);
 
$template->pparse('overall_footer');
 
//
// Close our DB connection.
//
$db->sql_close();
 
//
// Compress buffered output if required and send to browser
//
if ( $do_gzip_compress )
{
//
// Borrowed from php.net!
//
$gzip_contents = ob_get_contents();
ob_end_clean();
 
$gzip_size = strlen($gzip_contents);
$gzip_crc = crc32($gzip_contents);
 
$gzip_contents = gzcompress($gzip_contents, 9);
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
 
echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents;
echo pack('V', $gzip_crc);
echo pack('V', $gzip_size);
}
 
exit;
 
?>
/Forum/includes/prune.php
0,0 → 1,175
<?php
/***************************************************************************
* prune.php
* -------------------
* begin : Thursday, June 14, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: prune.php,v 1.19.2.7 2006/01/29 17:31:16 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
 
require($phpbb_root_path . 'includes/functions_search.'.$phpEx);
 
function prune($forum_id, $prune_date, $prune_all = false)
{
global $db, $lang;
 
// Before pruning, lets try to clean up the invalid topic entries
$sql = 'SELECT topic_id FROM ' . TOPICS_TABLE . '
WHERE topic_last_post_id = 0';
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain lists of topics to sync', '', __LINE__, __FILE__, $sql);
}
 
while( $row = $db->sql_fetchrow($result) )
{
sync('topic', $row['topic_id']);
}
 
$db->sql_freeresult($result);
 
$prune_all = ($prune_all) ? '' : 'AND t.topic_vote = 0 AND t.topic_type <> ' . POST_ANNOUNCE;
//
// Those without polls and announcements ... unless told otherwise!
//
$sql = "SELECT t.topic_id
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
WHERE t.forum_id = $forum_id
$prune_all
AND p.post_id = t.topic_last_post_id";
if ( $prune_date != '' )
{
$sql .= " AND p.post_time < $prune_date";
}
 
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain lists of topics to prune', '', __LINE__, __FILE__, $sql);
}
 
$sql_topics = '';
while( $row = $db->sql_fetchrow($result) )
{
$sql_topics .= ( ( $sql_topics != '' ) ? ', ' : '' ) . $row['topic_id'];
}
$db->sql_freeresult($result);
if( $sql_topics != '' )
{
$sql = "SELECT post_id
FROM " . POSTS_TABLE . "
WHERE forum_id = $forum_id
AND topic_id IN ($sql_topics)";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain list of posts to prune', '', __LINE__, __FILE__, $sql);
}
 
$sql_post = '';
while ( $row = $db->sql_fetchrow($result) )
{
$sql_post .= ( ( $sql_post != '' ) ? ', ' : '' ) . $row['post_id'];
}
$db->sql_freeresult($result);
 
if ( $sql_post != '' )
{
$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
WHERE topic_id IN ($sql_topics)";
if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )
{
message_die(GENERAL_ERROR, 'Could not delete watched topics during prune', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE FROM " . TOPICS_TABLE . "
WHERE topic_id IN ($sql_topics)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete topics during prune', '', __LINE__, __FILE__, $sql);
}
 
$pruned_topics = $db->sql_affectedrows();
 
$sql = "DELETE FROM " . POSTS_TABLE . "
WHERE post_id IN ($sql_post)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete post_text during prune', '', __LINE__, __FILE__, $sql);
}
 
$pruned_posts = $db->sql_affectedrows();
 
$sql = "DELETE FROM " . POSTS_TEXT_TABLE . "
WHERE post_id IN ($sql_post)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete post during prune', '', __LINE__, __FILE__, $sql);
}
 
remove_search_post($sql_post);
 
return array ('topics' => $pruned_topics, 'posts' => $pruned_posts);
}
}
 
return array('topics' => 0, 'posts' => 0);
}
 
//
// Function auto_prune(), this function will read the configuration data from
// the auto_prune table and call the prune function with the necessary info.
//
function auto_prune($forum_id = 0)
{
global $db, $lang;
 
$sql = "SELECT *
FROM " . PRUNE_TABLE . "
WHERE forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not read auto_prune table', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
if ( $row['prune_freq'] && $row['prune_days'] )
{
$prune_date = time() - ( $row['prune_days'] * 86400 );
$next_prune = time() + ( $row['prune_freq'] * 86400 );
 
prune($forum_id, $prune_date);
sync('forum', $forum_id);
 
$sql = "UPDATE " . FORUMS_TABLE . "
SET prune_next = $next_prune
WHERE forum_id = $forum_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update forum table', '', __LINE__, __FILE__, $sql);
}
}
}
 
return;
}
 
?>
/Forum/includes/sessions.php
0,0 → 1,578
<?php
/***************************************************************************
* sessions.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: sessions.php,v 1.58.2.25 2006/05/18 19:23:07 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
//
// Adds/updates a new session to the database for the given userid.
// Returns the new session ID on success.
//
function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_autologin = 0, $admin = 0)
{
global $db, $board_config;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
 
$cookiename = $board_config['cookie_name'];
$cookiepath = $board_config['cookie_path'];
$cookiedomain = $board_config['cookie_domain'];
$cookiesecure = $board_config['cookie_secure'];
 
if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) )
{
$session_id = isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : '';
$sessiondata = isset($HTTP_COOKIE_VARS[$cookiename . '_data']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : array();
$sessionmethod = SESSION_METHOD_COOKIE;
}
else
{
$sessiondata = array();
$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
$sessionmethod = SESSION_METHOD_GET;
}
 
//
if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))
{
$session_id = '';
}
 
$page_id = (int) $page_id;
 
$last_visit = 0;
$current_time = time();
 
//
// Are auto-logins allowed?
// If allow_autologin is not set or is true then they are
// (same behaviour as old 2.0.x session code)
//
if (isset($board_config['allow_autologin']) && !$board_config['allow_autologin'])
{
$enable_autologin = $sessiondata['autologinid'] = false;
}
 
//
// First off attempt to join with the autologin value if we have one
// If not, just use the user_id value
//
$userdata = array();
 
if ($user_id != ANONYMOUS)
{
if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '' && $user_id)
{
$sql = 'SELECT u.*
FROM ' . USERS_TABLE . ' u, ' . SESSIONS_KEYS_TABLE . ' k
WHERE u.user_id = ' . (int) $user_id . "
AND u.user_active = 1
AND k.user_id = u.user_id
AND k.key_id = '" . md5($sessiondata['autologinid']) . "'";
if (!($result = $db->sql_query($sql)))
{
message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);
}
 
$userdata = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$enable_autologin = $login = 1;
}
else if (!$auto_create)
{
$sessiondata['autologinid'] = '';
$sessiondata['userid'] = $user_id;
 
$sql = 'SELECT *
FROM ' . USERS_TABLE . '
WHERE user_id = ' . (int) $user_id . '
AND user_active = 1';
if (!($result = $db->sql_query($sql)))
{
message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);
}
 
$userdata = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
 
$login = 1;
}
}
 
//
// At this point either $userdata should be populated or
// one of the below is true
// * Key didn't match one in the DB
// * User does not exist
// * User is inactive
//
if (!sizeof($userdata) || !is_array($userdata) || !$userdata)
{
$sessiondata['autologinid'] = '';
$sessiondata['userid'] = $user_id = ANONYMOUS;
$enable_autologin = $login = 0;
 
$sql = 'SELECT *
FROM ' . USERS_TABLE . '
WHERE user_id = ' . (int) $user_id;
if (!($result = $db->sql_query($sql)))
{
message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);
}
 
$userdata = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
}
 
 
//
// Initial ban check against user id, IP and email address
//
preg_match('/(..)(..)(..)(..)/', $user_ip, $user_ip_parts);
 
$sql = "SELECT ban_ip, ban_userid, ban_email
FROM " . BANLIST_TABLE . "
WHERE ban_ip IN ('" . $user_ip_parts[1] . $user_ip_parts[2] . $user_ip_parts[3] . $user_ip_parts[4] . "', '" . $user_ip_parts[1] . $user_ip_parts[2] . $user_ip_parts[3] . "ff', '" . $user_ip_parts[1] . $user_ip_parts[2] . "ffff', '" . $user_ip_parts[1] . "ffffff')
OR ban_userid = $user_id";
if ( $user_id != ANONYMOUS )
{
$sql .= " OR ban_email LIKE '" . str_replace("\'", "''", $userdata['user_email']) . "'
OR ban_email LIKE '" . substr(str_replace("\'", "''", $userdata['user_email']), strpos(str_replace("\'", "''", $userdata['user_email']), "@")) . "'";
}
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not obtain ban information', '', __LINE__, __FILE__, $sql);
}
 
if ( $ban_info = $db->sql_fetchrow($result) )
{
if ( $ban_info['ban_ip'] || $ban_info['ban_userid'] || $ban_info['ban_email'] )
{
message_die(CRITICAL_MESSAGE, 'You_been_banned');
}
}
 
//
// Create or update the session
//
$sql = "UPDATE " . SESSIONS_TABLE . "
SET session_user_id = $user_id, session_start = $current_time, session_time = $current_time, session_page = $page_id, session_logged_in = $login, session_admin = $admin
WHERE session_id = '" . $session_id . "'
AND session_ip = '$user_ip'";
if ( !$db->sql_query($sql) || !$db->sql_affectedrows() )
{
$session_id = md5(dss_rand());
 
$sql = "INSERT INTO " . SESSIONS_TABLE . "
(session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin)
VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login, $admin)";
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);
}
}
 
if ( $user_id != ANONYMOUS )
{
$last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;
 
if (!$admin)
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_session_time = $current_time, user_session_page = $page_id, user_lastvisit = $last_visit
WHERE user_id = $user_id";
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error updating last visit time', '', __LINE__, __FILE__, $sql);
}
}
 
$userdata['user_lastvisit'] = $last_visit;
 
//
// Regenerate the auto-login key
//
if ($enable_autologin)
{
$auto_login_key = dss_rand() . dss_rand();
if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '')
{
$sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . "
SET last_ip = '$user_ip', key_id = '" . md5($auto_login_key) . "', last_login = $current_time
WHERE key_id = '" . md5($sessiondata['autologinid']) . "'";
}
else
{
$sql = 'INSERT INTO ' . SESSIONS_KEYS_TABLE . "(key_id, user_id, last_ip, last_login)
VALUES ('" . md5($auto_login_key) . "', $user_id, '$user_ip', $current_time)";
}
 
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error updating session key', '', __LINE__, __FILE__, $sql);
}
$sessiondata['autologinid'] = $auto_login_key;
unset($auto_login_key);
}
else
{
$sessiondata['autologinid'] = '';
}
 
// $sessiondata['autologinid'] = (!$admin) ? (( $enable_autologin && $sessionmethod == SESSION_METHOD_COOKIE ) ? $auto_login_key : '') : $sessiondata['autologinid'];
$sessiondata['userid'] = $user_id;
}
 
$userdata['session_id'] = $session_id;
$userdata['session_ip'] = $user_ip;
$userdata['session_user_id'] = $user_id;
$userdata['session_logged_in'] = $login;
$userdata['session_page'] = $page_id;
$userdata['session_start'] = $current_time;
$userdata['session_time'] = $current_time;
$userdata['session_admin'] = $admin;
$userdata['session_key'] = $sessiondata['autologinid'];
 
setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
 
$SID = 'sid=' . $session_id;
 
return $userdata;
}
 
//
// Checks for a given user session, tidies session table and updates user
// sessions at each page refresh
//
function session_pagestart($user_ip, $thispage_id)
{
global $db, $lang, $board_config;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
 
$cookiename = $board_config['cookie_name'];
$cookiepath = $board_config['cookie_path'];
$cookiedomain = $board_config['cookie_domain'];
$cookiesecure = $board_config['cookie_secure'];
 
$current_time = time();
unset($userdata);
 
if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) )
{
$sessiondata = isset( $HTTP_COOKIE_VARS[$cookiename . '_data'] ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : array();
$session_id = isset( $HTTP_COOKIE_VARS[$cookiename . '_sid'] ) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : '';
$sessionmethod = SESSION_METHOD_COOKIE;
}
else
{
$sessiondata = array();
$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
$sessionmethod = SESSION_METHOD_GET;
}
 
//
if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))
{
$session_id = '';
}
 
$thispage_id = (int) $thispage_id;
 
//
// Does a session exist?
//
if ( !empty($session_id) )
{
//
// session_id exists so go ahead and attempt to grab all
// data in preparation
//
$sql = "SELECT u.*, s.*
FROM " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u
WHERE s.session_id = '$session_id'
AND u.user_id = s.session_user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);
}
 
$userdata = $db->sql_fetchrow($result);
 
//
// Did the session exist in the DB?
//
if ( isset($userdata['user_id']) )
{
//
// Do not check IP assuming equivalence, if IPv4 we'll check only first 24
// bits ... I've been told (by vHiker) this should alleviate problems with
// load balanced et al proxies while retaining some reliance on IP security.
//
$ip_check_s = substr($userdata['session_ip'], 0, 6);
$ip_check_u = substr($user_ip, 0, 6);
 
if ($ip_check_s == $ip_check_u)
{
$SID = ($sessionmethod == SESSION_METHOD_GET || defined('IN_ADMIN')) ? 'sid=' . $session_id : '';
 
//
// Only update session DB a minute or so after last update
//
if ( $current_time - $userdata['session_time'] > 60 )
{
// A little trick to reset session_admin on session re-usage
$update_admin = (!defined('IN_ADMIN') && $current_time - $userdata['session_time'] > ($board_config['session_length']+60)) ? ', session_admin = 0' : '';
 
$sql = "UPDATE " . SESSIONS_TABLE . "
SET session_time = $current_time, session_page = $thispage_id$update_admin
WHERE session_id = '" . $userdata['session_id'] . "'";
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error updating sessions table', '', __LINE__, __FILE__, $sql);
}
 
if ( $userdata['user_id'] != ANONYMOUS )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_session_time = $current_time, user_session_page = $thispage_id
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error updating sessions table', '', __LINE__, __FILE__, $sql);
}
}
 
session_clean($userdata['session_id']);
 
setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
}
 
// Add the session_key to the userdata array if it is set
if ( isset($sessiondata['autologinid']) && $sessiondata['autologinid'] != '' )
{
$userdata['session_key'] = $sessiondata['autologinid'];
}
 
return $userdata;
}
}
}
 
//
// If we reach here then no (valid) session exists. So we'll create a new one,
// using the cookie user_id if available to pull basic user prefs.
//
$user_id = ( isset($sessiondata['userid']) ) ? intval($sessiondata['userid']) : ANONYMOUS;
 
if ( !($userdata = session_begin($user_id, $user_ip, $thispage_id, TRUE)) )
{
message_die(CRITICAL_ERROR, 'Error creating user session', '', __LINE__, __FILE__, $sql);
}
 
return $userdata;
 
}
 
/**
* Terminates the specified session
* It will delete the entry in the sessions table for this session,
* remove the corresponding auto-login key and reset the cookies
*/
function session_end($session_id, $user_id)
{
global $db, $lang, $board_config, $userdata;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
 
$cookiename = $board_config['cookie_name'];
$cookiepath = $board_config['cookie_path'];
$cookiedomain = $board_config['cookie_domain'];
$cookiesecure = $board_config['cookie_secure'];
 
$current_time = time();
 
if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))
{
return;
}
//
// Delete existing session
//
$sql = 'DELETE FROM ' . SESSIONS_TABLE . "
WHERE session_id = '$session_id'
AND session_user_id = $user_id";
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error removing user session', '', __LINE__, __FILE__, $sql);
}
 
//
// Remove this auto-login entry (if applicable)
//
if ( isset($userdata['session_key']) && $userdata['session_key'] != '' )
{
$autologin_key = md5($userdata['session_key']);
$sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '
WHERE user_id = ' . (int) $user_id . "
AND key_id = '$autologin_key'";
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error removing auto-login key', '', __LINE__, __FILE__, $sql);
}
}
 
//
// We expect that message_die will be called after this function,
// but just in case it isn't, reset $userdata to the details for a guest
//
$sql = 'SELECT *
FROM ' . USERS_TABLE . '
WHERE user_id = ' . ANONYMOUS;
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Error obtaining user details', '', __LINE__, __FILE__, $sql);
}
if ( !($userdata = $db->sql_fetchrow($result)) )
{
message_die(CRITICAL_ERROR, 'Error obtaining user details', '', __LINE__, __FILE__, $sql);
}
$db->sql_freeresult($result);
 
 
setcookie($cookiename . '_data', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_sid', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);
 
return true;
}
 
/**
* Removes expired sessions and auto-login keys from the database
*/
function session_clean($session_id)
{
global $board_config, $db;
 
//
// Delete expired sessions
//
$sql = 'DELETE FROM ' . SESSIONS_TABLE . '
WHERE session_time < ' . (time() - (int) $board_config['session_length']) . "
AND session_id <> '$session_id'";
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error clearing sessions table', '', __LINE__, __FILE__, $sql);
}
 
//
// Delete expired auto-login keys
// If max_autologin_time is not set then keys will never be deleted
// (same behaviour as old 2.0.x session code)
//
if (!empty($board_config['max_autologin_time']) && $board_config['max_autologin_time'] > 0)
{
$sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '
WHERE last_login < ' . (time() - (86400 * (int) $board_config['max_autologin_time']));
$db->sql_query($sql);
}
 
return true;
}
 
/**
* Reset all login keys for the specified user
* Called on password changes
*/
function session_reset_keys($user_id, $user_ip)
{
global $db, $userdata, $board_config;
 
$key_sql = ($user_id == $userdata['user_id'] && !empty($userdata['session_key'])) ? "AND key_id != '" . md5($userdata['session_key']) . "'" : '';
 
$sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '
WHERE user_id = ' . (int) $user_id . "
$key_sql";
 
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error removing auto-login keys', '', __LINE__, __FILE__, $sql);
}
 
$where_sql = 'session_user_id = ' . (int) $user_id;
$where_sql .= ($user_id == $userdata['user_id']) ? " AND session_id <> '" . $userdata['session_id'] . "'" : '';
$sql = 'DELETE FROM ' . SESSIONS_TABLE . "
WHERE $where_sql";
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error removing user session(s)', '', __LINE__, __FILE__, $sql);
}
 
if ( !empty($key_sql) )
{
$auto_login_key = dss_rand() . dss_rand();
 
$current_time = time();
$sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . "
SET last_ip = '$user_ip', key_id = '" . md5($auto_login_key) . "', last_login = $current_time
WHERE key_id = '" . md5($userdata['session_key']) . "'";
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error updating session key', '', __LINE__, __FILE__, $sql);
}
 
// And now rebuild the cookie
$sessiondata['userid'] = $user_id;
$sessiondata['autologinid'] = $auto_login_key;
$cookiename = $board_config['cookie_name'];
$cookiepath = $board_config['cookie_path'];
$cookiedomain = $board_config['cookie_domain'];
$cookiesecure = $board_config['cookie_secure'];
 
setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);
$userdata['session_key'] = $auto_login_key;
unset($sessiondata);
unset($auto_login_key);
}
}
 
//
// Append $SID to a url. Borrowed from phplib and modified. This is an
// extra routine utilised by the session code above and acts as a wrapper
// around every single URL and form action. If you replace the session
// code you must include this routine, even if it's empty.
//
function append_sid($url, $non_html_amp = false)
{
global $SID;
 
if ( !empty($SID) && !preg_match('#sid=#', $url) )
{
$url .= ( ( strpos($url, '?') !== false ) ? ( ( $non_html_amp ) ? '&' : '&amp;' ) : '?' ) . $SID;
}
 
return $url;
}
 
?>
/Forum/includes/smtp.php
0,0 → 1,210
<?php
/***************************************************************************
* smtp.php
* -------------------
* begin : Wed May 09 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: smtp.php,v 1.16.2.11 2005/09/27 20:24:35 grahamje Exp $
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('SMTP_INCLUDED', 1);
 
//
// This function has been modified as provided
// by SirSir to allow multiline responses when
// using SMTP Extensions
//
function server_parse($socket, $response, $line = __LINE__)
{
$server_response = '';
while (substr($server_response, 3, 1) != ' ')
{
if (!($server_response = fgets($socket, 256)))
{
message_die(GENERAL_ERROR, "Couldn't get mail server response codes", "", $line, __FILE__);
}
}
 
if (!(substr($server_response, 0, 3) == $response))
{
message_die(GENERAL_ERROR, "Ran into problems sending Mail. Response: $server_response", "", $line, __FILE__);
}
}
 
// Replacement or substitute for PHP's mail command
function smtpmail($mail_to, $subject, $message, $headers = '')
{
global $board_config;
 
// Fix any bare linefeeds in the message to make it RFC821 Compliant.
$message = preg_replace("#(?<!\r)\n#si", "\r\n", $message);
 
if ($headers != '')
{
if (is_array($headers))
{
if (sizeof($headers) > 1)
{
$headers = join("\n", $headers);
}
else
{
$headers = $headers[0];
}
}
$headers = chop($headers);
 
// Make sure there are no bare linefeeds in the headers
$headers = preg_replace('#(?<!\r)\n#si', "\r\n", $headers);
 
// Ok this is rather confusing all things considered,
// but we have to grab bcc and cc headers and treat them differently
// Something we really didn't take into consideration originally
$header_array = explode("\r\n", $headers);
@reset($header_array);
 
$headers = '';
while(list(, $header) = each($header_array))
{
if (preg_match('#^cc:#si', $header))
{
$cc = preg_replace('#^cc:(.*)#si', '\1', $header);
}
else if (preg_match('#^bcc:#si', $header))
{
$bcc = preg_replace('#^bcc:(.*)#si', '\1', $header);
$header = '';
}
$headers .= ($header != '') ? $header . "\r\n" : '';
}
 
$headers = chop($headers);
$cc = explode(', ', $cc);
$bcc = explode(', ', $bcc);
}
 
if (trim($subject) == '')
{
message_die(GENERAL_ERROR, "No email Subject specified", "", __LINE__, __FILE__);
}
 
if (trim($message) == '')
{
message_die(GENERAL_ERROR, "Email message was blank", "", __LINE__, __FILE__);
}
 
// Ok we have error checked as much as we can to this point let's get on
// it already.
if( !$socket = @fsockopen($board_config['smtp_host'], 25, $errno, $errstr, 20) )
{
message_die(GENERAL_ERROR, "Could not connect to smtp host : $errno : $errstr", "", __LINE__, __FILE__);
}
 
// Wait for reply
server_parse($socket, "220", __LINE__);
 
// Do we want to use AUTH?, send RFC2554 EHLO, else send RFC821 HELO
// This improved as provided by SirSir to accomodate
if( !empty($board_config['smtp_username']) && !empty($board_config['smtp_password']) )
{
fputs($socket, "EHLO " . $board_config['smtp_host'] . "\r\n");
server_parse($socket, "250", __LINE__);
 
fputs($socket, "AUTH LOGIN\r\n");
server_parse($socket, "334", __LINE__);
 
fputs($socket, base64_encode($board_config['smtp_username']) . "\r\n");
server_parse($socket, "334", __LINE__);
 
fputs($socket, base64_encode($board_config['smtp_password']) . "\r\n");
server_parse($socket, "235", __LINE__);
}
else
{
fputs($socket, "HELO " . $board_config['smtp_host'] . "\r\n");
server_parse($socket, "250", __LINE__);
}
 
// From this point onward most server response codes should be 250
// Specify who the mail is from....
fputs($socket, "MAIL FROM: <" . $board_config['board_email'] . ">\r\n");
server_parse($socket, "250", __LINE__);
 
// Specify each user to send to and build to header.
$to_header = '';
 
// Add an additional bit of error checking to the To field.
$mail_to = (trim($mail_to) == '') ? 'Undisclosed-recipients:;' : trim($mail_to);
if (preg_match('#[^ ]+\@[^ ]+#', $mail_to))
{
fputs($socket, "RCPT TO: <$mail_to>\r\n");
server_parse($socket, "250", __LINE__);
}
 
// Ok now do the CC and BCC fields...
@reset($bcc);
while(list(, $bcc_address) = each($bcc))
{
// Add an additional bit of error checking to bcc header...
$bcc_address = trim($bcc_address);
if (preg_match('#[^ ]+\@[^ ]+#', $bcc_address))
{
fputs($socket, "RCPT TO: <$bcc_address>\r\n");
server_parse($socket, "250", __LINE__);
}
}
 
@reset($cc);
while(list(, $cc_address) = each($cc))
{
// Add an additional bit of error checking to cc header
$cc_address = trim($cc_address);
if (preg_match('#[^ ]+\@[^ ]+#', $cc_address))
{
fputs($socket, "RCPT TO: <$cc_address>\r\n");
server_parse($socket, "250", __LINE__);
}
}
 
// Ok now we tell the server we are ready to start sending data
fputs($socket, "DATA\r\n");
 
// This is the last response code we look for until the end of the message.
server_parse($socket, "354", __LINE__);
 
// Send the Subject Line...
fputs($socket, "Subject: $subject\r\n");
 
// Now the To Header.
fputs($socket, "To: $mail_to\r\n");
 
// Now any custom headers....
fputs($socket, "$headers\r\n\r\n");
 
// Ok now we are ready for the message...
fputs($socket, "$message\r\n");
 
// Ok the all the ingredients are mixed in let's cook this puppy...
fputs($socket, ".\r\n");
server_parse($socket, "250", __LINE__);
 
// Now tell the server we are done and close the socket...
fputs($socket, "QUIT\r\n");
fclose($socket);
 
return TRUE;
}
 
?>
/Forum/includes/sql_parse.php
0,0 → 1,192
<?php
/***************************************************************************
* sql_parse.php
* -------------------
* begin : Thu May 31, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: sql_parse.php,v 1.8 2002/03/18 23:53:12 psotfx Exp $
*
****************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
/***************************************************************************
*
* These functions are mainly for use in the db_utilities under the admin
* however in order to make these functions available elsewhere, specifically
* in the installation phase of phpBB I have seperated out a couple of
* functions into this file. JLH
*
\***************************************************************************/
 
//
// remove_comments will strip the sql comment lines out of an uploaded sql file
// specifically for mssql and postgres type files in the install....
//
function remove_comments(&$output)
{
$lines = explode("\n", $output);
$output = "";
 
// try to keep mem. use down
$linecount = count($lines);
 
$in_comment = false;
for($i = 0; $i < $linecount; $i++)
{
if( preg_match("/^\/\*/", preg_quote($lines[$i])) )
{
$in_comment = true;
}
 
if( !$in_comment )
{
$output .= $lines[$i] . "\n";
}
 
if( preg_match("/\*\/$/", preg_quote($lines[$i])) )
{
$in_comment = false;
}
}
 
unset($lines);
return $output;
}
 
//
// remove_remarks will strip the sql comment lines out of an uploaded sql file
//
function remove_remarks($sql)
{
$lines = explode("\n", $sql);
// try to keep mem. use down
$sql = "";
$linecount = count($lines);
$output = "";
 
for ($i = 0; $i < $linecount; $i++)
{
if (($i != ($linecount - 1)) || (strlen($lines[$i]) > 0))
{
if ($lines[$i][0] != "#")
{
$output .= $lines[$i] . "\n";
}
else
{
$output .= "\n";
}
// Trading a bit of speed for lower mem. use here.
$lines[$i] = "";
}
}
return $output;
}
 
//
// split_sql_file will split an uploaded sql file into single sql statements.
// Note: expects trim() to have already been run on $sql.
//
function split_sql_file($sql, $delimiter)
{
// Split up our string into "possible" SQL statements.
$tokens = explode($delimiter, $sql);
 
// try to save mem.
$sql = "";
$output = array();
// we don't actually care about the matches preg gives us.
$matches = array();
// this is faster than calling count($oktens) every time thru the loop.
$token_count = count($tokens);
for ($i = 0; $i < $token_count; $i++)
{
// Don't wanna add an empty string as the last thing in the array.
if (($i != ($token_count - 1)) || (strlen($tokens[$i] > 0)))
{
// This is the total number of single quotes in the token.
$total_quotes = preg_match_all("/'/", $tokens[$i], $matches);
// Counts single quotes that are preceded by an odd number of backslashes,
// which means they're escaped quotes.
$escaped_quotes = preg_match_all("/(?<!\\\\)(\\\\\\\\)*\\\\'/", $tokens[$i], $matches);
$unescaped_quotes = $total_quotes - $escaped_quotes;
// If the number of unescaped quotes is even, then the delimiter did NOT occur inside a string literal.
if (($unescaped_quotes % 2) == 0)
{
// It's a complete sql statement.
$output[] = $tokens[$i];
// save memory.
$tokens[$i] = "";
}
else
{
// incomplete sql statement. keep adding tokens until we have a complete one.
// $temp will hold what we have so far.
$temp = $tokens[$i] . $delimiter;
// save memory..
$tokens[$i] = "";
// Do we have a complete statement yet?
$complete_stmt = false;
for ($j = $i + 1; (!$complete_stmt && ($j < $token_count)); $j++)
{
// This is the total number of single quotes in the token.
$total_quotes = preg_match_all("/'/", $tokens[$j], $matches);
// Counts single quotes that are preceded by an odd number of backslashes,
// which means they're escaped quotes.
$escaped_quotes = preg_match_all("/(?<!\\\\)(\\\\\\\\)*\\\\'/", $tokens[$j], $matches);
$unescaped_quotes = $total_quotes - $escaped_quotes;
if (($unescaped_quotes % 2) == 1)
{
// odd number of unescaped quotes. In combination with the previous incomplete
// statement(s), we now have a complete statement. (2 odds always make an even)
$output[] = $temp . $tokens[$j];
 
// save memory.
$tokens[$j] = "";
$temp = "";
// exit the loop.
$complete_stmt = true;
// make sure the outer loop continues at the right point.
$i = $j;
}
else
{
// even number of unescaped quotes. We still don't have a complete statement.
// (1 odd and 1 even always make an odd)
$temp .= $tokens[$j] . $delimiter;
// save memory.
$tokens[$j] = "";
}
} // for..
} // else
}
}
 
return $output;
}
 
?>
/Forum/includes/template.php
0,0 → 1,478
<?php
/***************************************************************************
* template.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: template.php,v 1.10.2.5 2005/05/06 20:50:11 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
/**
* Template class. By Nathan Codding of the phpBB group.
* The interface was originally inspired by PHPLib templates,
* and the template file formats are quite similar.
*
*/
 
class Template {
var $classname = "Template";
 
// variable that holds all the data we'll be substituting into
// the compiled templates.
// ...
// This will end up being a multi-dimensional array like this:
// $this->_tpldata[block.][iteration#][child.][iteration#][child2.][iteration#][variablename] == value
// if it's a root-level variable, it'll be like this:
// $this->_tpldata[.][0][varname] == value
var $_tpldata = array();
 
// Hash of filenames for each template handle.
var $files = array();
 
// Root template directory.
var $root = "";
 
// this will hash handle names to the compiled code for that handle.
var $compiled_code = array();
 
// This will hold the uncompiled code for that handle.
var $uncompiled_code = array();
 
/**
* Constructor. Simply sets the root dir.
*
*/
function Template($root = ".")
{
$this->set_rootdir($root);
}
 
/**
* Destroys this template object. Should be called when you're done with it, in order
* to clear out the template data so you can load/parse a new template set.
*/
function destroy()
{
$this->_tpldata = array();
}
 
/**
* Sets the template root directory for this Template object.
*/
function set_rootdir($dir)
{
if (!is_dir($dir))
{
return false;
}
 
$this->root = $dir;
return true;
}
 
/**
* Sets the template filenames for handles. $filename_array
* should be a hash of handle => filename pairs.
*/
function set_filenames($filename_array)
{
if (!is_array($filename_array))
{
return false;
}
 
reset($filename_array);
while(list($handle, $filename) = each($filename_array))
{
$this->files[$handle] = $this->make_filename($filename);
}
 
return true;
}
 
 
/**
* Load the file for the handle, compile the file,
* and run the compiled code. This will print out
* the results of executing the template.
*/
function pparse($handle)
{
if (!$this->loadfile($handle))
{
die("Template->pparse(): Couldn't load template file for handle $handle");
}
 
// actually compile the template now.
if (!isset($this->compiled_code[$handle]) || empty($this->compiled_code[$handle]))
{
// Actually compile the code now.
$this->compiled_code[$handle] = $this->compile($this->uncompiled_code[$handle]);
}
 
// Run the compiled code.
eval($this->compiled_code[$handle]);
return true;
}
 
/**
* Inserts the uncompiled code for $handle as the
* value of $varname in the root-level. This can be used
* to effectively include a template in the middle of another
* template.
* Note that all desired assignments to the variables in $handle should be done
* BEFORE calling this function.
*/
function assign_var_from_handle($varname, $handle)
{
if (!$this->loadfile($handle))
{
die("Template->assign_var_from_handle(): Couldn't load template file for handle $handle");
}
 
// Compile it, with the "no echo statements" option on.
$_str = "";
$code = $this->compile($this->uncompiled_code[$handle], true, '_str');
 
// evaluate the variable assignment.
eval($code);
// assign the value of the generated variable to the given varname.
$this->assign_var($varname, $_str);
 
return true;
}
 
/**
* Block-level variable assignment. Adds a new block iteration with the given
* variable assignments. Note that this should only be called once per block
* iteration.
*/
function assign_block_vars($blockname, $vararray)
{
if (strstr($blockname, '.'))
{
// Nested block.
$blocks = explode('.', $blockname);
$blockcount = sizeof($blocks) - 1;
$str = '$this->_tpldata';
for ($i = 0; $i < $blockcount; $i++)
{
$str .= '[\'' . $blocks[$i] . '.\']';
eval('$lastiteration = sizeof(' . $str . ') - 1;');
$str .= '[' . $lastiteration . ']';
}
// Now we add the block that we're actually assigning to.
// We're adding a new iteration to this block with the given
// variable assignments.
$str .= '[\'' . $blocks[$blockcount] . '.\'][] = $vararray;';
 
// Now we evaluate this assignment we've built up.
eval($str);
}
else
{
// Top-level block.
// Add a new iteration to this block with the variable assignments
// we were given.
$this->_tpldata[$blockname . '.'][] = $vararray;
}
 
return true;
}
 
/**
* Root-level variable assignment. Adds to current assignments, overriding
* any existing variable assignment with the same name.
*/
function assign_vars($vararray)
{
reset ($vararray);
while (list($key, $val) = each($vararray))
{
$this->_tpldata['.'][0][$key] = $val;
}
 
return true;
}
 
/**
* Root-level variable assignment. Adds to current assignments, overriding
* any existing variable assignment with the same name.
*/
function assign_var($varname, $varval)
{
$this->_tpldata['.'][0][$varname] = $varval;
 
return true;
}
 
 
/**
* Generates a full path+filename for the given filename, which can either
* be an absolute name, or a name relative to the rootdir for this Template
* object.
*/
function make_filename($filename)
{
// Check if it's an absolute or relative path.
if (substr($filename, 0, 1) != '/')
{
$filename = ($rp_filename = phpbb_realpath($this->root . '/' . $filename)) ? $rp_filename : $filename;
}
 
if (!file_exists($filename))
{
die("Template->make_filename(): Error - file $filename does not exist");
}
 
return $filename;
}
 
 
/**
* If not already done, load the file for the given handle and populate
* the uncompiled_code[] hash with its code. Do not compile.
*/
function loadfile($handle)
{
// If the file for this handle is already loaded and compiled, do nothing.
if (isset($this->uncompiled_code[$handle]) && !empty($this->uncompiled_code[$handle]))
{
return true;
}
 
// If we don't have a file assigned to this handle, die.
if (!isset($this->files[$handle]))
{
die("Template->loadfile(): No file specified for handle $handle");
}
 
$filename = $this->files[$handle];
 
$str = implode("", @file($filename));
if (empty($str))
{
die("Template->loadfile(): File $filename for handle $handle is empty");
}
 
$this->uncompiled_code[$handle] = $str;
 
return true;
}
 
 
 
/**
* Compiles the given string of code, and returns
* the result in a string.
* If "do_not_echo" is true, the returned code will not be directly
* executable, but can be used as part of a variable assignment
* for use in assign_code_from_handle().
*/
function compile($code, $do_not_echo = false, $retvar = '')
{
// replace \ with \\ and then ' with \'.
$code = str_replace('\\', '\\\\', $code);
$code = str_replace('\'', '\\\'', $code);
 
// change template varrefs into PHP varrefs
 
// This one will handle varrefs WITH namespaces
$varrefs = array();
preg_match_all('#\{(([a-z0-9\-_]+?\.)+?)([a-z0-9\-_]+?)\}#is', $code, $varrefs);
$varcount = sizeof($varrefs[1]);
for ($i = 0; $i < $varcount; $i++)
{
$namespace = $varrefs[1][$i];
$varname = $varrefs[3][$i];
$new = $this->generate_block_varref($namespace, $varname);
 
$code = str_replace($varrefs[0][$i], $new, $code);
}
 
// This will handle the remaining root-level varrefs
$code = preg_replace('#\{([a-z0-9\-_]*?)\}#is', '\' . ( ( isset($this->_tpldata[\'.\'][0][\'\1\']) ) ? $this->_tpldata[\'.\'][0][\'\1\'] : \'\' ) . \'', $code);
 
// Break it up into lines.
$code_lines = explode("\n", $code);
 
$block_nesting_level = 0;
$block_names = array();
$block_names[0] = ".";
 
// Second: prepend echo ', append ' . "\n"; to each line.
$line_count = sizeof($code_lines);
for ($i = 0; $i < $line_count; $i++)
{
$code_lines[$i] = chop($code_lines[$i]);
if (preg_match('#<!-- BEGIN (.*?) -->#', $code_lines[$i], $m))
{
$n[0] = $m[0];
$n[1] = $m[1];
 
// Added: dougk_ff7-Keeps templates from bombing if begin is on the same line as end.. I think. :)
if ( preg_match('#<!-- END (.*?) -->#', $code_lines[$i], $n) )
{
$block_nesting_level++;
$block_names[$block_nesting_level] = $m[1];
if ($block_nesting_level < 2)
{
// Block is not nested.
$code_lines[$i] = '$_' . $n[1] . '_count = ( isset($this->_tpldata[\'' . $n[1] . '.\']) ) ? sizeof($this->_tpldata[\'' . $n[1] . '.\']) : 0;';
$code_lines[$i] .= "\n" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)';
$code_lines[$i] .= "\n" . '{';
}
else
{
// This block is nested.
 
// Generate a namespace string for this block.
$namespace = implode('.', $block_names);
// strip leading period from root level..
$namespace = substr($namespace, 2);
// Get a reference to the data array for this block that depends on the
// current indices of all parent blocks.
$varref = $this->generate_block_data_ref($namespace, false);
// Create the for loop code to iterate over this block.
$code_lines[$i] = '$_' . $n[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;';
$code_lines[$i] .= "\n" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)';
$code_lines[$i] .= "\n" . '{';
}
 
// We have the end of a block.
unset($block_names[$block_nesting_level]);
$block_nesting_level--;
$code_lines[$i] .= '} // END ' . $n[1];
$m[0] = $n[0];
$m[1] = $n[1];
}
else
{
// We have the start of a block.
$block_nesting_level++;
$block_names[$block_nesting_level] = $m[1];
if ($block_nesting_level < 2)
{
// Block is not nested.
$code_lines[$i] = '$_' . $m[1] . '_count = ( isset($this->_tpldata[\'' . $m[1] . '.\']) ) ? sizeof($this->_tpldata[\'' . $m[1] . '.\']) : 0;';
$code_lines[$i] .= "\n" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1] . '_count; $_' . $m[1] . '_i++)';
$code_lines[$i] .= "\n" . '{';
}
else
{
// This block is nested.
 
// Generate a namespace string for this block.
$namespace = implode('.', $block_names);
// strip leading period from root level..
$namespace = substr($namespace, 2);
// Get a reference to the data array for this block that depends on the
// current indices of all parent blocks.
$varref = $this->generate_block_data_ref($namespace, false);
// Create the for loop code to iterate over this block.
$code_lines[$i] = '$_' . $m[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;';
$code_lines[$i] .= "\n" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1] . '_count; $_' . $m[1] . '_i++)';
$code_lines[$i] .= "\n" . '{';
}
}
}
else if (preg_match('#<!-- END (.*?) -->#', $code_lines[$i], $m))
{
// We have the end of a block.
unset($block_names[$block_nesting_level]);
$block_nesting_level--;
$code_lines[$i] = '} // END ' . $m[1];
}
else
{
// We have an ordinary line of code.
if (!$do_not_echo)
{
$code_lines[$i] = 'echo \'' . $code_lines[$i] . '\' . "\\n";';
}
else
{
$code_lines[$i] = '$' . $retvar . '.= \'' . $code_lines[$i] . '\' . "\\n";';
}
}
}
 
// Bring it back into a single string of lines of code.
$code = implode("\n", $code_lines);
return $code ;
 
}
 
 
/**
* Generates a reference to the given variable inside the given (possibly nested)
* block namespace. This is a string of the form:
* ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . '
* It's ready to be inserted into an "echo" line in one of the templates.
* NOTE: expects a trailing "." on the namespace.
*/
function generate_block_varref($namespace, $varname)
{
// Strip the trailing period.
$namespace = substr($namespace, 0, strlen($namespace) - 1);
 
// Get a reference to the data block for this namespace.
$varref = $this->generate_block_data_ref($namespace, true);
// Prepend the necessary code to stick this in an echo line.
 
// Append the variable reference.
$varref .= '[\'' . $varname . '\']';
 
$varref = '\' . ( ( isset(' . $varref . ') ) ? ' . $varref . ' : \'\' ) . \'';
 
return $varref;
 
}
 
 
/**
* Generates a reference to the array of data values for the given
* (possibly nested) block namespace. This is a string of the form:
* $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN']
*
* If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above.
* NOTE: does not expect a trailing "." on the blockname.
*/
function generate_block_data_ref($blockname, $include_last_iterator)
{
// Get an array of the blocks involved.
$blocks = explode(".", $blockname);
$blockcount = sizeof($blocks) - 1;
$varref = '$this->_tpldata';
// Build up the string with everything but the last child.
for ($i = 0; $i < $blockcount; $i++)
{
$varref .= '[\'' . $blocks[$i] . '.\'][$_' . $blocks[$i] . '_i]';
}
// Add the block reference for the last child.
$varref .= '[\'' . $blocks[$blockcount] . '.\']';
// Add the iterator for the last child if requried.
if ($include_last_iterator)
{
$varref .= '[$_' . $blocks[$blockcount] . '_i]';
}
 
return $varref;
}
 
}
 
?>
/Forum/includes/topic_review.php
0,0 → 1,228
<?php
/***************************************************************************
* topic_review.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: topic_review.php,v 1.5.2.4 2005/05/06 20:50:12 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
 
function topic_review($topic_id, $is_inline_review)
{
global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path;
global $userdata, $user_ip;
global $orig_word, $replacement_word;
global $starttime;
 
if ( !$is_inline_review )
{
if ( !isset($topic_id) || !$topic_id)
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}
 
//
// Get topic info ...
//
$sql = "SELECT t.topic_title, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f
WHERE t.topic_id = $topic_id
AND f.forum_id = t.forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
 
if ( !($forum_row = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}
$db->sql_freeresult($result);
 
$forum_id = $forum_row['forum_id'];
$topic_title = $forum_row['topic_title'];
//
// Start session management
//
$userdata = session_pagestart($user_ip, $forum_id);
init_userprefs($userdata);
//
// End session management
//
 
$is_auth = array();
$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_row);
 
if ( !$is_auth['auth_read'] )
{
message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_auth_read'], $is_auth['auth_read_type']));
}
}
 
//
// Define censored word matches
//
if ( empty($orig_word) && empty($replacement_word) )
{
$orig_word = array();
$replacement_word = array();
 
obtain_word_list($orig_word, $replacement_word);
}
 
//
// Dump out the page header and load viewtopic body template
//
if ( !$is_inline_review )
{
$gen_simple_header = TRUE;
 
$page_title = $lang['Topic_review'] . ' - ' . $topic_title;
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'reviewbody' => 'posting_topic_review.tpl')
);
}
 
//
// Go ahead and pull all data for this topic
//
$sql = "SELECT u.username, u.user_id, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
WHERE p.topic_id = $topic_id
AND p.poster_id = u.user_id
AND p.post_id = pt.post_id
ORDER BY p.post_time DESC
LIMIT " . $board_config['posts_per_page'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain post/user information', '', __LINE__, __FILE__, $sql);
}
 
//
// Okay, let's do the loop, yeah come on baby let's do the loop
// and it goes like this ...
//
if ( $row = $db->sql_fetchrow($result) )
{
$mini_post_img = $images['icon_minipost'];
$mini_post_alt = $lang['Post'];
 
$i = 0;
do
{
$poster_id = $row['user_id'];
$poster = $row['username'];
 
$post_date = create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone']);
 
//
// Handle anon users posting with usernames
//
if( $poster_id == ANONYMOUS && $row['post_username'] != '' )
{
$poster = $row['post_username'];
$poster_rank = $lang['Guest'];
}
elseif ( $poster_id == ANONYMOUS )
{
$poster = $lang['Guest'];
$poster_rank = '';
}
 
$post_subject = ( $row['post_subject'] != '' ) ? $row['post_subject'] : '';
 
$message = $row['post_text'];
$bbcode_uid = $row['bbcode_uid'];
 
//
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
//
if ( !$board_config['allow_html'] && $row['enable_html'] )
{
$message = preg_replace('#(<)([\/]?.*?)(>)#is', '&lt;\2&gt;', $message);
}
 
if ( $bbcode_uid != "" )
{
$message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message);
}
 
$message = make_clickable($message);
 
if ( count($orig_word) )
{
$post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
$message = preg_replace($orig_word, $replacement_word, $message);
}
 
if ( $board_config['allow_smilies'] && $row['enable_smilies'] )
{
$message = smilies_pass($message);
}
 
$message = str_replace("\n", '<br />', $message);
 
//
// Again this will be handled by the templating
// code at some point
//
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
$template->assign_block_vars('postrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
 
'MINI_POST_IMG' => $mini_post_img,
'POSTER_NAME' => $poster,
'POST_DATE' => $post_date,
'POST_SUBJECT' => $post_subject,
'MESSAGE' => $message,
'L_MINI_POST_ALT' => $mini_post_alt)
);
 
$i++;
}
while ( $row = $db->sql_fetchrow($result) );
}
else
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist', '', __LINE__, __FILE__, $sql);
}
$db->sql_freeresult($result);
 
$template->assign_vars(array(
'L_AUTHOR' => $lang['Author'],
'L_MESSAGE' => $lang['Message'],
'L_POSTED' => $lang['Posted'],
'L_POST_SUBJECT' => $lang['Post_subject'],
'L_TOPIC_REVIEW' => $lang['Topic_review'])
);
 
if ( !$is_inline_review )
{
$template->pparse('reviewbody');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
}
 
?>
/Forum/includes/usercp_activate.php
0,0 → 1,119
<?php
/***************************************************************************
* usercp_activate.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: usercp_activate.php,v 1.6.2.9 2005/09/14 18:14:30 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
 
if ( !defined('IN_PHPBB') )
{
die('Hacking attempt');
exit;
}
 
$sql = "SELECT user_active, user_id, username, user_email, user_newpasswd, user_lang, user_actkey
FROM " . USERS_TABLE . "
WHERE user_id = " . intval($HTTP_GET_VARS[POST_USERS_URL]);
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
if ( $row['user_active'] && trim($row['user_actkey']) == '' )
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="10;url=' . append_sid("index.$phpEx") . '">')
);
 
message_die(GENERAL_MESSAGE, $lang['Already_activated']);
}
else if ((trim($row['user_actkey']) == trim($HTTP_GET_VARS['act_key'])) && (trim($row['user_actkey']) != ''))
{
if (intval($board_config['require_activation']) == USER_ACTIVATION_ADMIN && $row['user_newpasswd'] == '')
{
if (!$userdata['session_logged_in'])
{
redirect(append_sid('login.' . $phpEx . '?redirect=profile.' . $phpEx . '&mode=activate&' . POST_USERS_URL . '=' . $row['user_id'] . '&act_key=' . trim($HTTP_GET_VARS['act_key'])));
}
else if ($userdata['user_level'] != ADMIN)
{
message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
}
}
 
$sql_update_pass = ( $row['user_newpasswd'] != '' ) ? ", user_password = '" . str_replace("\'", "''", $row['user_newpasswd']) . "', user_newpasswd = ''" : '';
 
$sql = "UPDATE " . USERS_TABLE . "
SET user_active = 1, user_actkey = ''" . $sql_update_pass . "
WHERE user_id = " . $row['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql_update);
}
 
if ( intval($board_config['require_activation']) == USER_ACTIVATION_ADMIN && $sql_update_pass == '' )
{
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
 
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
 
$emailer->use_template('admin_welcome_activated', $row['user_lang']);
$emailer->email_address($row['user_email']);
$emailer->set_subject($lang['Account_activated_subject']);
 
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'USERNAME' => $row['username'],
'PASSWORD' => $password_confirm,
'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '')
);
$emailer->send();
$emailer->reset();
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="10;url=' . append_sid("index.$phpEx") . '">')
);
 
message_die(GENERAL_MESSAGE, $lang['Account_active_admin']);
}
else
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="10;url=' . append_sid("index.$phpEx") . '">')
);
 
$message = ( $sql_update_pass == '' ) ? $lang['Account_active'] : $lang['Password_activated'];
message_die(GENERAL_MESSAGE, $message);
}
}
else
{
message_die(GENERAL_MESSAGE, $lang['Wrong_activation']);
}
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_such_user']);
}
 
?>
/Forum/includes/usercp_avatar.php
0,0 → 1,406
<?php
/***************************************************************************
* usercp_avatar.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: usercp_avatar.php,v 1.8.2.24 2006/05/23 21:09:27 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
 
function check_image_type(&$type, &$error, &$error_msg)
{
global $lang;
 
switch( $type )
{
case 'jpeg':
case 'pjpeg':
case 'jpg':
return '.jpg';
break;
case 'gif':
return '.gif';
break;
case 'png':
return '.png';
break;
default:
$error = true;
$error_msg = (!empty($error_msg)) ? $error_msg . '<br />' . $lang['Avatar_filetype'] : $lang['Avatar_filetype'];
break;
}
 
return false;
}
 
function user_avatar_delete($avatar_type, $avatar_file)
{
global $board_config, $userdata;
 
$avatar_file = basename($avatar_file);
if ( $avatar_type == USER_AVATAR_UPLOAD && $avatar_file != '' )
{
if ( @file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $avatar_file)) )
{
@unlink('./' . $board_config['avatar_path'] . '/' . $avatar_file);
}
}
 
return ", user_avatar = '', user_avatar_type = " . USER_AVATAR_NONE;
}
 
function user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename, $avatar_category)
{
global $board_config;
 
$avatar_filename = phpbb_ltrim(basename($avatar_filename), "'");
$avatar_category = phpbb_ltrim(basename($avatar_category), "'");
if(!preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $avatar_filename))
{
return '';
}
 
if ($avatar_filename == "" || $avatar_category == "")
{
return '';
}
 
if ( file_exists(@phpbb_realpath($board_config['avatar_gallery_path'] . '/' . $avatar_category . '/' . $avatar_filename)) && ($mode == 'editprofile') )
{
$return = ", user_avatar = '" . str_replace("\'", "''", $avatar_category . '/' . $avatar_filename) . "', user_avatar_type = " . USER_AVATAR_GALLERY;
}
else
{
$return = '';
}
return $return;
}
 
function user_avatar_url($mode, &$error, &$error_msg, $avatar_filename)
{
global $lang;
 
if ( !preg_match('#^(http)|(ftp):\/\/#i', $avatar_filename) )
{
$avatar_filename = 'http://' . $avatar_filename;
}
 
$avatar_filename = substr($avatar_filename, 0, 100);
 
if ( !preg_match("#^((ht|f)tp://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png))$)#is", $avatar_filename) )
{
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $lang['Wrong_remote_avatar_format'] : $lang['Wrong_remote_avatar_format'];
return;
}
 
return ( $mode == 'editprofile' ) ? ", user_avatar = '" . str_replace("\'", "''", $avatar_filename) . "', user_avatar_type = " . USER_AVATAR_REMOTE : '';
 
}
 
function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_type, &$error, &$error_msg, $avatar_filename, $avatar_realname, $avatar_filesize, $avatar_filetype)
{
global $board_config, $db, $lang;
 
$ini_val = ( @phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var';
 
$width = $height = 0;
$type = '';
 
if ( $avatar_mode == 'remote' && preg_match('/^(http:\/\/)?([\w\-\.]+)\:?([0-9]*)\/([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))$/', $avatar_filename, $url_ary) )
{
if ( empty($url_ary[4]) )
{
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $lang['Incomplete_URL'] : $lang['Incomplete_URL'];
return;
}
 
$base_get = '/' . $url_ary[4];
$port = ( !empty($url_ary[3]) ) ? $url_ary[3] : 80;
 
if ( !($fsock = @fsockopen($url_ary[2], $port, $errno, $errstr)) )
{
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $lang['No_connection_URL'] : $lang['No_connection_URL'];
return;
}
 
@fputs($fsock, "GET $base_get HTTP/1.1\r\n");
@fputs($fsock, "HOST: " . $url_ary[2] . "\r\n");
@fputs($fsock, "Connection: close\r\n\r\n");
 
unset($avatar_data);
while( !@feof($fsock) )
{
$avatar_data .= @fread($fsock, $board_config['avatar_filesize']);
}
@fclose($fsock);
 
if (!preg_match('#Content-Length\: ([0-9]+)[^ /][\s]+#i', $avatar_data, $file_data1) || !preg_match('#Content-Type\: image/[x\-]*([a-z]+)[\s]+#i', $avatar_data, $file_data2))
{
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $lang['File_no_data'] : $lang['File_no_data'];
return;
}
 
$avatar_filesize = $file_data1[1];
$avatar_filetype = $file_data2[1];
 
if ( !$error && $avatar_filesize > 0 && $avatar_filesize < $board_config['avatar_filesize'] )
{
$avatar_data = substr($avatar_data, strlen($avatar_data) - $avatar_filesize, $avatar_filesize);
 
$tmp_path = ( !@$ini_val('safe_mode') ) ? '/tmp' : './' . $board_config['avatar_path'] . '/tmp';
$tmp_filename = tempnam($tmp_path, uniqid(rand()) . '-');
 
$fptr = @fopen($tmp_filename, 'wb');
$bytes_written = @fwrite($fptr, $avatar_data, $avatar_filesize);
@fclose($fptr);
 
if ( $bytes_written != $avatar_filesize )
{
@unlink($tmp_filename);
message_die(GENERAL_ERROR, 'Could not write avatar file to local storage. Please contact the board administrator with this message', '', __LINE__, __FILE__);
}
 
list($width, $height, $type) = @getimagesize($tmp_filename);
}
else
{
$l_avatar_size = sprintf($lang['Avatar_filesize'], round($board_config['avatar_filesize'] / 1024));
 
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $l_avatar_size : $l_avatar_size;
}
}
else if ( ( file_exists(@phpbb_realpath($avatar_filename)) ) && preg_match('/\.(jpg|jpeg|gif|png)$/i', $avatar_realname) )
{
if ( $avatar_filesize <= $board_config['avatar_filesize'] && $avatar_filesize > 0 )
{
preg_match('#image\/[x\-]*([a-z]+)#', $avatar_filetype, $avatar_filetype);
$avatar_filetype = $avatar_filetype[1];
}
else
{
$l_avatar_size = sprintf($lang['Avatar_filesize'], round($board_config['avatar_filesize'] / 1024));
 
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $l_avatar_size : $l_avatar_size;
return;
}
 
list($width, $height, $type) = @getimagesize($avatar_filename);
}
 
if ( !($imgtype = check_image_type($avatar_filetype, $error, $error_msg)) )
{
return;
}
 
switch ($type)
{
// GIF
case 1:
if ($imgtype != '.gif')
{
@unlink($tmp_filename);
message_die(GENERAL_ERROR, 'Unable to upload file', '', __LINE__, __FILE__);
}
break;
 
// JPG, JPC, JP2, JPX, JB2
case 2:
case 9:
case 10:
case 11:
case 12:
if ($imgtype != '.jpg' && $imgtype != '.jpeg')
{
@unlink($tmp_filename);
message_die(GENERAL_ERROR, 'Unable to upload file', '', __LINE__, __FILE__);
}
break;
 
// PNG
case 3:
if ($imgtype != '.png')
{
@unlink($tmp_filename);
message_die(GENERAL_ERROR, 'Unable to upload file', '', __LINE__, __FILE__);
}
break;
 
default:
@unlink($tmp_filename);
message_die(GENERAL_ERROR, 'Unable to upload file', '', __LINE__, __FILE__);
}
 
if ( $width > 0 && $height > 0 && $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
{
$new_filename = uniqid(rand()) . $imgtype;
 
if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' )
{
user_avatar_delete($current_type, $current_avatar);
}
 
if( $avatar_mode == 'remote' )
{
@copy($tmp_filename, './' . $board_config['avatar_path'] . "/$new_filename");
@unlink($tmp_filename);
}
else
{
if ( @$ini_val('open_basedir') != '' )
{
if ( @phpversion() < '4.0.3' )
{
message_die(GENERAL_ERROR, 'open_basedir is set and your PHP version does not allow move_uploaded_file', '', __LINE__, __FILE__);
}
 
$move_file = 'move_uploaded_file';
}
else
{
$move_file = 'copy';
}
 
if (!is_uploaded_file($avatar_filename))
{
message_die(GENERAL_ERROR, 'Unable to upload file', '', __LINE__, __FILE__);
}
$move_file($avatar_filename, './' . $board_config['avatar_path'] . "/$new_filename");
}
 
@chmod('./' . $board_config['avatar_path'] . "/$new_filename", 0777);
 
$avatar_sql = ( $mode == 'editprofile' ) ? ", user_avatar = '$new_filename', user_avatar_type = " . USER_AVATAR_UPLOAD : "'$new_filename', " . USER_AVATAR_UPLOAD;
}
else
{
$l_avatar_size = sprintf($lang['Avatar_imagesize'], $board_config['avatar_max_width'], $board_config['avatar_max_height']);
 
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $l_avatar_size : $l_avatar_size;
}
 
return $avatar_sql;
}
 
function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, &$new_password, &$cur_password, &$password_confirm, &$icq, &$aim, &$msn, &$yim, &$website, &$location, &$occupation, &$interests, &$signature, &$viewemail, &$notifypm, &$popup_pm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat, &$session_id)
{
global $board_config, $db, $template, $lang, $images, $theme;
global $phpbb_root_path, $phpEx;
 
$dir = @opendir($board_config['avatar_gallery_path']);
 
$avatar_images = array();
while( $file = @readdir($dir) )
{
if( $file != '.' && $file != '..' && !is_file($board_config['avatar_gallery_path'] . '/' . $file) && !is_link($board_config['avatar_gallery_path'] . '/' . $file) )
{
$sub_dir = @opendir($board_config['avatar_gallery_path'] . '/' . $file);
 
$avatar_row_count = 0;
$avatar_col_count = 0;
while( $sub_file = @readdir($sub_dir) )
{
if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $sub_file) )
{
$avatar_images[$file][$avatar_row_count][$avatar_col_count] = $sub_file;
$avatar_name[$file][$avatar_row_count][$avatar_col_count] = ucfirst(str_replace("_", " ", preg_replace('/^(.*)\..*$/', '\1', $sub_file)));
 
$avatar_col_count++;
if( $avatar_col_count == 5 )
{
$avatar_row_count++;
$avatar_col_count = 0;
}
}
}
}
}
 
@closedir($dir);
 
@ksort($avatar_images);
@reset($avatar_images);
 
if( empty($category) )
{
list($category, ) = each($avatar_images);
}
@reset($avatar_images);
 
$s_categories = '<select name="avatarcategory">';
while( list($key) = each($avatar_images) )
{
$selected = ( $key == $category ) ? ' selected="selected"' : '';
if( count($avatar_images[$key]) )
{
$s_categories .= '<option value="' . $key . '"' . $selected . '>' . ucfirst($key) . '</option>';
}
}
$s_categories .= '</select>';
 
$s_colspan = 0;
for($i = 0; $i < count($avatar_images[$category]); $i++)
{
$template->assign_block_vars("avatar_row", array());
 
$s_colspan = max($s_colspan, count($avatar_images[$category][$i]));
 
for($j = 0; $j < count($avatar_images[$category][$i]); $j++)
{
$template->assign_block_vars('avatar_row.avatar_column', array(
"AVATAR_IMAGE" => $board_config['avatar_gallery_path'] . '/' . $category . '/' . $avatar_images[$category][$i][$j],
"AVATAR_NAME" => $avatar_name[$category][$i][$j])
);
 
$template->assign_block_vars('avatar_row.avatar_option_column', array(
"S_OPTIONS_AVATAR" => $avatar_images[$category][$i][$j])
);
}
}
 
$params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popup_pm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');
 
$s_hidden_vars = '<input type="hidden" name="sid" value="' . $session_id . '" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="avatarcatname" value="' . $category . '" />';
 
for($i = 0; $i < count($params); $i++)
{
$s_hidden_vars .= '<input type="hidden" name="' . $params[$i] . '" value="' . str_replace('"', '&quot;', $$params[$i]) . '" />';
}
$template->assign_vars(array(
'L_AVATAR_GALLERY' => $lang['Avatar_gallery'],
'L_SELECT_AVATAR' => $lang['Select_avatar'],
'L_RETURN_PROFILE' => $lang['Return_profile'],
'L_CATEGORY' => $lang['Select_category'],
 
'S_CATEGORY_SELECT' => $s_categories,
'S_COLSPAN' => $s_colspan,
'S_PROFILE_ACTION' => append_sid("profile.$phpEx?mode=$mode"),
'S_HIDDEN_FIELDS' => $s_hidden_vars)
);
 
return;
}
 
?>
/Forum/includes/usercp_confirm.php
0,0 → 1,460
<?php
/***************************************************************************
* usercp_confirm.php
* -------------------
* begin : Saturday, Jan 15, 2003
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: usercp_confirm.php,v 1.1.2.4 2006/05/30 19:29:43 grahamje Exp $
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
if ( !defined('IN_PHPBB') )
{
die('Hacking attempt');
exit;
}
 
// Note to potential users of this code ...
//
// Remember this is released under the _GPL_ and is subject
// to that licence. Do not incorporate this within software
// released or distributed in any way under a licence other
// than the GPL. We will be watching ... ;)
 
// Do we have an id? No, then just exit
if (empty($HTTP_GET_VARS['id']))
{
exit;
}
 
$confirm_id = htmlspecialchars($HTTP_GET_VARS['id']);
 
// Define available charset
$chars = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9');
 
if (!preg_match('/^[A-Za-z0-9]+$/', $confirm_id))
{
$confirm_id = '';
}
 
// Try and grab code for this id and session
$sql = 'SELECT code
FROM ' . CONFIRM_TABLE . "
WHERE session_id = '" . $userdata['session_id'] . "'
AND confirm_id = '$confirm_id'";
$result = $db->sql_query($sql);
 
// If we have a row then grab data else create a new id
if ($row = $db->sql_fetchrow($result))
{
$db->sql_freeresult($result);
$code = $row['code'];
}
else
{
exit;
}
 
// We can we will generate a single filtered png
// Thanks to DavidMJ for emulating zlib within the code :)
$_png = define_filtered_pngs();
 
$total_width = 320;
$total_height = 50;
$img_height = 40;
$img_width = 0;
$l = 0;
 
list($usec, $sec) = explode(' ', microtime());
mt_srand($sec * $usec);
 
$char_widths = array();
for ($i = 0; $i < strlen($code); $i++)
{
$char = $code{$i};
 
$width = mt_rand(0, 4);
$char_widths[] = $width;
$img_width += $_png[$char]['width'] - $width;
}
 
$offset_x = mt_rand(0, $total_width - $img_width);
$offset_y = mt_rand(0, $total_height - $img_height);
 
$image = '';
$hold_chars = array();
for ($i = 0; $i < $total_height; $i++)
{
$image .= chr(0);
 
if ($i > $offset_y && $i < $offset_y + $img_height)
{
$j = 0;
 
for ($k = 0; $k < $offset_x; $k++)
{
$image .= chr(mt_rand(140, 255));
}
 
for ($k = 0; $k < strlen($code); $k++)
{
$char = $code{$k};
 
if (empty($hold_chars[$char]))
{
$hold_chars[$char] = explode("\n", chunk_split(base64_decode($_png[$char]['data']), $_png[$char]['width'] + 1, "\n"));
}
$image .= randomise(substr($hold_chars[$char][$l], 1), $char_widths[$j]);
$j++;
}
 
for ($k = $offset_x + $img_width; $k < $total_width; $k++)
{
$image .= chr(mt_rand(140, 255));
}
 
$l++;
}
else
{
for ($k = 0; $k < $total_width; $k++)
{
$image .= chr(mt_rand(140, 255));
}
}
 
}
unset($hold);
 
$image = create_png($image, $total_width, $total_height);
 
// Output image
header('Content-Type: image/png');
header('Cache-control: no-cache, no-store');
echo $image;
 
unset($image);
unset($_png);
exit;
 
 
// This is designed to randomise the pixels of the image data within
// certain limits so as to keep it readable. It also varies the image
// width a little
function randomise($scanline, $width)
{
$new_line = '';
$start = floor($width/2);
$end = strlen($scanline) - ceil($width/2);
 
for ($i = $start; $i < $end; $i++)
{
$pixel = ord($scanline{$i});
 
if ($pixel < 190)
{
$new_line .= chr(mt_rand(0, 205));
}
else if ($pixel > 190)
{
$new_line .= chr(mt_rand(145, 255));
}
else
{
$new_line .= $scanline{$i};
}
}
 
return $new_line;
}
 
// This creates a chunk of the given type, with the given data
// of the given length adding the relevant crc
function png_chunk($length, $type, $data)
{
$raw = $type;
$raw .= $data;
$crc = crc32($raw);
$raw .= pack('C4', $crc >> 24, $crc >> 16, $crc >> 8, $crc);
 
return pack('C4', $length >> 24, $length >> 16, $length >> 8, $length) . $raw;
}
 
// Creates greyscale 8bit png - The PNG spec can be found at
// http://www.libpng.org/pub/png/spec/PNG-Contents.html we use
// png because it's a fully recognised open standard and supported
// by practically all modern browsers and OSs
function create_png($raw_image, $width, $height)
{
// SIG
$image = pack('C8', 137, 80, 78, 71, 13, 10, 26, 10);
// IHDR
$raw = pack('C4', $width >> 24, $width >> 16, $width >> 8, $width);
$raw .= pack('C4', $height >> 24, $height >> 16, $height >> 8, $height);
$raw .= pack('C5', 8, 0, 0, 0, 0);
$image .= png_chunk(13, 'IHDR', $raw);
 
if (@extension_loaded('zlib'))
{
$raw_image = gzcompress($raw_image);
$length = strlen($raw_image);
}
else
{
// The total length of this image, uncompressed, is just a calculation of pixels
$length = ($width + 1) * $height;
 
// Adler-32 hash generation
// Optimized Adler-32 loop ported from the GNU Classpath project
$temp_length = $length;
$s1 = 1;
$s2 = $index = 0;
 
while ($temp_length > 0)
{
// We can defer the modulo operation:
// s1 maximally grows from 65521 to 65521 + 255 * 3800
// s2 maximally grows by 3800 * median(s1) = 2090079800 < 2^31
$substract_value = ($temp_length < 3800) ? $temp_length : 3800;
$temp_length -= $substract_value;
 
while (--$substract_value >= 0)
{
$s1 += ord($raw_image[$index]);
$s2 += $s1;
 
$index++;
}
 
$s1 %= 65521;
$s2 %= 65521;
}
$adler_hash = pack('N', ($s2 << 16) | $s1);
 
// This is the same thing as gzcompress($raw_image, 0) but does not need zlib
$raw_image = pack('C3v2', 0x78, 0x01, 0x01, $length, ~$length) . $raw_image . $adler_hash;
 
// The Zlib header + Adler hash make us add on 11
$length += 11;
}
 
// IDAT
$image .= png_chunk($length, 'IDAT', $raw_image);
// IEND
$image .= png_chunk(0, 'IEND', '');
 
return $image;
}
 
// Each 'data' element is base64_encoded uncompressed IDAT
// png image data
function define_filtered_pngs()
{
$_png = array(
'0' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A///////////////////olFAkBAAAGDyA4P///M31/////////////wD////////////////0dAgAAAAAAAAAAAAEcPipFGHn////////////AP//////////////6DAAAAAAAAAAAAAAAAAALSEAN+T///////////8A//////////////xAAAAAAAAAAAAAAAAAAAAAACPA/////////////wD/////////////oAAAAAAAAAAAAAAAAAAAAAAAev//////////////AP////////////8oAAAAAAAAPNj/zDAAAAAAAABD//////////////8A////////////1AAAAAAAABjw////5BAAAAAAAADo/////////////wD///////////+QAAAAAAAAbP//////QgAAAAAAAKj/////////////AP///////////1wAAAAAAACs/////8AXAAAAAAAAcP////////////8A////////////OAAAAAAAAND////dNwAAAAAAAABI/////////////wD///////////8gAAAAAAAA4P//7koACwAAAAAAACT/////////////AP///////////wgAAAAAAAD///VqAwaPAAAAAAAAEP////////////8A////////////AAAAAAAAAP/8kQYDavUAAAAAAAAA/////////////wD///////////8AAAAAAAAA/6kNAEru/wAAAAAAAAD/////////////AP///////////wAAAAAAAADAIwA33f//AAAAAAAAAP////////////8A////////////FAAAAAAAADYAI8D///8AAAAAAAAQ/////////////wD///////////8kAAAAAAAAAA2p////5AAAAAAAACD/////////////AP///////////0gAAAAAAAAFkfz////UAAAAAAAAQP////////////8A////////////cAAAAAAAAET1/////7AAAAAAAABo/////////////wD///////////+oAAAAAAAAXfX/////sAAAAAAAAGj/////////////AAAAALgAAAAAAAAwAAAAAAAAAAAAAAD////////////oAAAAAAAACOT////oEAAAAAAAAOD/////////////AP////////////8+AAAAAAAAKMz/zDQAAAAAAAA0//////////////8A////////////7jgAAAAAAAAAAAAAAAAAAAAAAKT//////////////wD///////////VqAwIAAAAAAAAAAAAAAAAAAAA8////////////////AP//////////rQcDaVEAAAAAAAAAAAAAAAAAKOj///////////////8A///////////nblnu/IAIAAAAAAAAAAAAAFzw/////////////////wD////////////79////+iITCAAAAAgSITg////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////w==',
'width' => 40
),
'1' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////8BAAAAAAAP//////////////////AP////////////////////////9sAAAAAAAA//////////////////8A////////////////////////pAAAAAAAAAD//////////////////wD//////////////////////6wEAAAAAAAAAP//////////////////AP////////////////////h4AAAAAAAAAAAA//////////////////8A//////////////////ygJAAAAAAAAAAAAAD//////////////////wD//////////////9x8HAAAAAAAAAAAAAAAAP//////////////////AP//////////////AAAAAAAAAAAAAAAAAAAA//////////////////8A//////////////8AAAAAAAAAAAAAAAAAAAD//////////////////wD//////////////wAAAAAAAAR4AAAAAAAAAP//////////////////AP//////////////AAAAAAA4zP8AAAAAAAAA//////////////////8A//////////////8AAAA4sP///wAAAAAAAAD//////////////////wD//////////////yR80P//////AAAAAAAAAP//////////////////AP////////////////////////8AAAAAAAAA//////////////////8A/////////////////////////wAAAAAAAAD//////////////////wD/////////////////////////AAAAAAAAAP//////////////////AP////////////////////////8AAAAAAAAA//////////////////8A/////////////////////////wAAAAAAAAD//////////////////wD/////////////////////////AAAAAAAAAP//////////////////AP////////////////////////8AAAAAAAAA//////////////////8A/////////////////////////wAAAAAAAAD//////////////////wD/////////////////////////AAAAAAAAAP//////////////////AP////////////////////////8AAAAAAAAA//////////////////8A/////////////////////////wAAAAAAAAD//////////////////wD/////////////////////////AAAAAAAAAP//////////////////AP////////////////////////8AAAAAAAAA//////////////////8A/////////////////////////wAAAAAAAAD//////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'2' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP/////////////////okFAkCAAABCBIfNT///////////////////8A///////////////8hAgAAAAAAAAAAAAAAFTo/////////////////wD//////////////1QAAAAAAAAAAAAAAAAAACjo////////////////AP////////////+MAAAAAAAAAAAAAAAAAAAAADj///////////////8A////////////9BAAAAAAAAAAAAAAAAAAAAAAALD//////////////wD///////////+gAAAAAAAAAHjs+KwMAAAAAAAAVP//////////////AP///////////1gAAAAAAABM/////6QAAAAAAAAU//////////////8A////////////KAAAAAAAALj/////+AAAAAAAAAD//////////////wD///////////+MfGBMOCAI8P/////wAAAAAAAACP//////////////AP///////////////////////////5wAAAAAAAAw//////////////8A///////////////////////////oFAAAAAAAAHz//////////////wD/////////////////////////6CgAAAAAAAAE3P//////////////AP///////////////////////9ggAAAAAAAAAHT///////////////8A//////////////////////+0DAAAAAAAAAA8+P///////////////wD/////////////////////gAAAAAAAAAAAKOj/////////////////AP//////////////////9FAAAAAAAAAAADzw//////////////////8A/////////////////+g4AAAAAAAAAABk/P///////////////////wD////////////////oKAAAAAAAAAAMqP//////////////////////AP//////////////6CgAAAAAAAAAMNz///////////////////////8A//////////////g4AAAAAAAAAFT0/////////////////////////wD/////////////bAAAAAAAAABU/P//////////////////////////AP///////////8wAAAAAAAAAAAAAAAAAAAAAAAAA//////////////8A////////////SAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////wD//////////9wAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////AP//////////hAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////8A//////////9AAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////wD//////////xAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'3' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD////////////////8sGg0FAAAACA4cLz8////////////////////AP//////////////rBgAAAAAAAAAAAAAACTA//////////////////8A/////////////3QAAAAAAAAAAAAAAAAAAASs/////////////////wD///////////+YAAAAAAAAAAAAAAAAAAAAAAjc////////////////AP//////////6AwAAAAAAAAAAAAAAAAAAAAAAGT///////////////8A//////////94AAAAAAAABJDw/8g4AAAAAAAAHP///////////////wD//////////yAAAAAAAACE/////9gAAAAAAAAA////////////////AP///////////NSwiGQ4FOT//////AAAAAAAABD///////////////8A//////////////////////////+YAAAAAAAAVP///////////////wD//////////////////////P/ggAQAAAAAAATM////////////////AP////////////////////9gAAAAAAAAAAAElP////////////////8A/////////////////////0AAAAAAAAAAHLj//////////////////wD/////////////////////OAAAAAAAAAAwkPj/////////////////AP////////////////////8gAAAAAAAAAAAAINj///////////////8A/////////////////////xAAAAAAAAAAAAAAIPD//////////////wD/////////////////////uOz/4HgEAAAAAAAAhP//////////////AP///////////////////////////3wAAAAAAAAw//////////////8A////////////////////////////6AAAAAAAAAj//////////////wD/////////////////////////////AAAAAAAAAP//////////////AP//////////tJh8YEQoDNz//////+AAAAAAAAAY//////////////8A//////////88AAAAAAAAaP//////dAAAAAAAAEz//////////////wD//////////6QAAAAAAAAAdOD/5HQAAAAAAAAApP//////////////AP///////////CgAAAAAAAAAAAAAAAAAAAAAACD4//////////////8A////////////yAQAAAAAAAAAAAAAAAAAAAAEuP///////////////wD/////////////rAQAAAAAAAAAAAAAAAAABJD/////////////////AP//////////////zDQAAAAAAAAAAAAAACTA//////////////////8A/////////////////8BwOCAAAAAUNGi0/P///////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'4' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP//////////////////////////nAAAAAAAAAD///////////////8A/////////////////////////8AEAAAAAAAAAP///////////////wD////////////////////////gGAAAAAAAAAAA////////////////AP//////////////////////9DAAAAAAAAAAAAD///////////////8A//////////////////////9UAAAAAAAAAAAAAP///////////////wD/////////////////////hAAAAAAAAAAAAAAA////////////////AP///////////////////7QAAAAAAAAAAAAAAAD///////////////8A///////////////////UDAAAAAAUAAAAAAAAAP///////////////wD/////////////////7CQAAAAABMAAAAAAAAAA////////////////AP////////////////xEAAAAAACU/wAAAAAAAAD///////////////8A////////////////cAAAAAAAZP//AAAAAAAAAP///////////////wD//////////////6AAAAAAADz8//8AAAAAAAAA////////////////AP/////////////IBAAAAAAc6P///wAAAAAAAAD///////////////8A////////////5BgAAAAADMz/////AAAAAAAAAP///////////////wD///////////g0AAAAAACk//////8AAAAAAAAA////////////////AP//////////XAAAAAAAfP///////wAAAAAAAAD///////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////8A////////////////////////////AAAAAAAAAP///////////////wD///////////////////////////8AAAAAAAAA////////////////AP///////////////////////////wAAAAAAAAD///////////////8A////////////////////////////AAAAAAAAAP///////////////wD///////////////////////////8AAAAAAAAA////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'5' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP//////////////8AAAAAAAAAAAAAAAAAAAAAAA//////////////8A///////////////MAAAAAAAAAAAAAAAAAAAAAAD//////////////wD//////////////6wAAAAAAAAAAAAAAAAAAAAAAP//////////////AP//////////////iAAAAAAAAAAAAAAAAAAAAAAA//////////////8A//////////////9kAAAAAAAAAAAAAAAAAAAAAAD//////////////wD//////////////0QAAAAAAAAAAAAAAAAAAAAAAP//////////////AP//////////////IAAAAAAAYP////////////////////////////8A//////////////wAAAAAAAB8/////////////////////////////wD/////////////3AAAAAAAAIj/////////////////////////////AP////////////+4AAAAAAAAoLRYHAAEKGTE//////////////////8A/////////////5QAAAAAAAAQAAAAAAAAAABY9P///////////////wD/////////////dAAAAAAAAAAAAAAAAAAAAAA89P//////////////AP////////////9QAAAAAAAAAAAAAAAAAAAAAABg//////////////8A/////////////zAAAAAAAAAAAAAAAAAAAAAAAADQ/////////////wD/////////////IAAAAAAAAGjY/+h4BAAAAAAAAGz/////////////AP//////////////9NS0lHSc//////90AAAAAAAALP////////////8A/////////////////////////////9QAAAAAAAAE/////////////wD//////////////////////////////wAAAAAAAAD/////////////AP/////////////////////////////8AAAAAAAAEP////////////8A////////////pIRwWEAgDOD//////8wAAAAAAAA8/////////////wD///////////9EAAAAAAAAaP//////ZAAAAAAAAHz/////////////AP///////////6QAAAAAAAAAaOD/4GQAAAAAAAAE4P////////////8A/////////////CQAAAAAAAAAAAAAAAAAAAAAAGD//////////////wD/////////////yAQAAAAAAAAAAAAAAAAAAAAc7P//////////////AP//////////////rAwAAAAAAAAAAAAAAAAAGNj///////////////8A////////////////0EAAAAAAAAAAAAAAAFTo/////////////////wD//////////////////8h4QCAAAAAcQHzU////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'6' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD///////////////////+0ZCwMAAAUNGjI////////////////////AP/////////////////EMAAAAAAAAAAAAABM6P////////////////8A////////////////lAQAAAAAAAAAAAAAAAAo6P///////////////wD//////////////6wAAAAAAAAAAAAAAAAAAABI////////////////AP/////////////oEAAAAAAAAAAAAAAAAAAAAACw//////////////8A/////////////3AAAAAAAAAoxP/YPAAAAAAAAEj//////////////wD////////////4EAAAAAAACOD////YDCBAVGiAoP//////////////AP///////////7gAAAAAAABY//////////////////////////////8A////////////eAAAAAAAAJT//////////////////////////////wD///////////9MAAAAAAAAvP/IXBgABCx03P//////////////////AP///////////ygAAAAAAADcdAAAAAAAAAAEiP////////////////8A////////////FAAAAAAAAFAAAAAAAAAAAAAAcP///////////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAlP//////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAAAAAQ8P////////////8A////////////AAAAAAAAAABAyP/kZAAAAAAAAACQ/////////////wD///////////8MAAAAAAAALPj/////WAAAAAAAAET/////////////AP///////////yQAAAAAAACY///////MAAAAAAAAFP////////////8A////////////SAAAAAAAAMD///////wAAAAAAAAA/////////////wD///////////9wAAAAAAAAvP///////wAAAAAAAAD/////////////AP///////////7QAAAAAAACI///////UAAAAAAAAJP////////////8A////////////+AwAAAAAACDw/////2wAAAAAAABY/////////////wD/////////////cAAAAAAAADC8/Ox4AAAAAAAAAKj/////////////AP/////////////oEAAAAAAAAAAAAAAAAAAAAAAk/P////////////8A//////////////+oAAAAAAAAAAAAAAAAAAAABLj//////////////wD///////////////+QAAAAAAAAAAAAAAAAAACQ////////////////AP////////////////+0JAAAAAAAAAAAAAAkuP////////////////8A///////////////////8sGg0FAAADCxgqPz//////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'7' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAAAAAABP////////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAAAAy4/////////////wD//////////////////////////+QUAAAAAAAEuP//////////////AP/////////////////////////8QAAAAAAAAKT///////////////8A/////////////////////////4wAAAAAAAB0/////////////////wD////////////////////////cCAAAAAAANPz/////////////////AP///////////////////////0QAAAAAAATY//////////////////8A//////////////////////+0AAAAAAAAeP///////////////////wD//////////////////////CQAAAAAABTw////////////////////AP////////////////////+gAAAAAAAAkP////////////////////8A/////////////////////ywAAAAAABDw/////////////////////wD///////////////////+4AAAAAAAAbP//////////////////////AP///////////////////1wAAAAAAADQ//////////////////////8A///////////////////4DAAAAAAAMP///////////////////////wD//////////////////7QAAAAAAAB8////////////////////////AP//////////////////aAAAAAAAAMj///////////////////////8A//////////////////8oAAAAAAAM/P///////////////////////wD/////////////////8AAAAAAAAET/////////////////////////AP////////////////+0AAAAAAAAcP////////////////////////8A/////////////////4wAAAAAAACY/////////////////////////wD/////////////////WAAAAAAAAMD/////////////////////////AP////////////////80AAAAAAAA4P////////////////////////8A/////////////////xAAAAAAAAD4/////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'8' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD////////////////////IdDQUAAAEIEiA1P//////////////////AP/////////////////gRAAAAAAAAAAAAAAAROD///////////////8A////////////////0BgAAAAAAAAAAAAAAAAAEMj//////////////wD///////////////AcAAAAAAAAAAAAAAAAAAAAHPD/////////////AP//////////////hAAAAAAAAAAAAAAAAAAAAAAAhP////////////8A//////////////8sAAAAAAAAKMz/zCgAAAAAAAAs/////////////wD//////////////wAAAAAAAADM////zAAAAAAAAAD/////////////AP//////////////BAAAAAAAAP//////AAAAAAAABP////////////8A//////////////8sAAAAAAAAzP///9QAAAAAAAAw/////////////wD//////////////3wAAAAAAAAoyP/YNAAAAAAAAIT/////////////AP//////////////7BgAAAAAAAAAAAAAAAAAAAAc8P////////////8A////////////////xBgAAAAAAAAAAAAAAAAAGNj//////////////wD/////////////////tAQAAAAAAAAAAAAAAACo////////////////AP///////////////HAAAAAAAAAAAAAAAAAAAAB8//////////////8A//////////////9gAAAAAAAAAAAAAAAAAAAAAAB8/////////////wD/////////////wAAAAAAAAABk4P/UWAAAAAAAAATQ////////////AP////////////9UAAAAAAAAaP//////XAAAAAAAAGT///////////8A/////////////xgAAAAAAADg///////cAAAAAAAAJP///////////wD/////////////AAAAAAAAAP////////8AAAAAAAAA////////////AP////////////8AAAAAAAAA4P//////3AAAAAAAAAT///////////8A/////////////ygAAAAAAABg//////9cAAAAAAAALP///////////wD/////////////ZAAAAAAAAABY1P/cXAAAAAAAAABw////////////AP/////////////QAAAAAAAAAAAAAAAAAAAAAAAABNz///////////8A//////////////9gAAAAAAAAAAAAAAAAAAAAAAB0/////////////wD///////////////Q8AAAAAAAAAAAAAAAAAAAAUPz/////////////AP////////////////x4CAAAAAAAAAAAAAAAEIT8//////////////8A///////////////////smFQwGAAAABg0ZKT0/////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'9' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD///////////////////ysYCwMAAAUNGiw/P//////////////////AP////////////////+4JAAAAAAAAAAAAAAkuP////////////////8A////////////////lAQAAAAAAAAAAAAAAAAAkP///////////////wD//////////////8AEAAAAAAAAAAAAAAAAAAAAqP//////////////AP/////////////8JAAAAAAAAAAAAAAAAAAAAAAQ7P////////////8A/////////////6wAAAAAAAAAfOz8vCwAAAAAAABw/////////////wD/////////////WAAAAAAAAHD/////7BgAAAAAAAz4////////////AP////////////8kAAAAAAAA1P//////hAAAAAAAALT///////////8A/////////////wAAAAAAAAD///////+4AAAAAAAAcP///////////wD/////////////AAAAAAAAAPz//////8AAAAAAAABI////////////AP////////////8UAAAAAAAAzP//////lAAAAAAAACT///////////8A/////////////0QAAAAAAABY//////gsAAAAAAAADP///////////wD/////////////kAAAAAAAAABw5P/IPAAAAAAAAAAA////////////AP/////////////wEAAAAAAAAAAAAAAAAAAAAAAAAAD///////////8A//////////////+UAAAAAAAAAAAAAAAAAAAAAAAAAP///////////wD///////////////9wAAAAAAAAAAAAAFAAAAAAAAAU////////////AP////////////////+IBAAAAAAAAABw3AAAAAAAACj///////////8A///////////////////cdCwEABhcxP+8AAAAAAAATP///////////wD//////////////////////////////5AAAAAAAAB4////////////AP//////////////////////////////UAAAAAAAALj///////////8A//////////////+kgGxUQCAM2P///+AIAAAAAAAQ+P///////////wD//////////////0gAAAAAAAA42P/EKAAAAAAAAHD/////////////AP//////////////sAAAAAAAAAAAAAAAAAAAAAAQ6P////////////8A////////////////TAAAAAAAAAAAAAAAAAAAAKz//////////////wD////////////////oKAAAAAAAAAAAAAAAAASU////////////////AP/////////////////sUAAAAAAAAAAAAAAwxP////////////////8A////////////////////yHA0FAAADCxktP///////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'A' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD//////////////////+QAAAAAAAAAAAAAAOT/////////////////AP//////////////////kAAAAAAAAAAAAAAAkP////////////////8A//////////////////88AAAAAAAAAAAAAAA8/////////////////wD/////////////////5AAAAAAAAAAAAAAAAADk////////////////AP////////////////+QAAAAAAAAAAAAAAAAAJD///////////////8A/////////////////zwAAAAAAAAAAAAAAAAAPP///////////////wD////////////////kAAAAAAAAAAgAAAAAAAAA5P//////////////AP///////////////5AAAAAAAAAAgAAAAAAAAACQ//////////////8A////////////////PAAAAAAAAAz8HAAAAAAAADz//////////////wD//////////////+QAAAAAAAAAWP9kAAAAAAAAANz/////////////AP//////////////kAAAAAAAAACk/7wAAAAAAAAAhP////////////8A//////////////88AAAAAAAABOz//BQAAAAAAAAw/////////////wD/////////////4AAAAAAAAAA8////ZAAAAAAAAADc////////////AP////////////+EAAAAAAAAAIj///+8AAAAAAAAAIT///////////8A/////////////zAAAAAAAAAA2P////wQAAAAAAAAMP///////////wD////////////cAAAAAAAAACT//////1wAAAAAAAAA3P//////////AP///////////4QAAAAAAAAAAAAAAAAAAAAAAAAAAACE//////////8A////////////MAAAAAAAAAAAAAAAAAAAAAAAAAAAADD//////////wD//////////9wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANz/////////AP//////////hAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhP////////8A//////////8wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAw/////////wD/////////3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADc////////AP////////+EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIT///////8A/////////zAAAAAAAAAAhP///////////2QAAAAAAAAAMP///////wD////////cAAAAAAAAAADM////////////vAAAAAAAAAAA3P//////AP///////4QAAAAAAAAAHP/////////////4DAAAAAAAAACE//////8A////////MAAAAAAAAABk//////////////9cAAAAAAAAADD//////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'B' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAEDh83P///////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAEhP//////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAeP////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAxP///////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAABY////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAABT///////////8A//////////8AAAAAAAAAAP/////4zEwAAAAAAAAAAP///////////wD//////////wAAAAAAAAAA////////7AAAAAAAAAAQ////////////AP//////////AAAAAAAAAAD////////sAAAAAAAAAEj///////////8A//////////8AAAAAAAAAAP/////4zEQAAAAAAAAAtP///////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAFz/////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAiA/P////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAIjPj//////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAGKz/////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAJT///////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAABNz//////////wD//////////wAAAAAAAAAA///////sqCAAAAAAAAAAbP//////////AP//////////AAAAAAAAAAD/////////yAAAAAAAAAAs//////////8A//////////8AAAAAAAAAAP//////////AAAAAAAAAAT//////////wD//////////wAAAAAAAAAA/////////7wAAAAAAAAAAP//////////AP//////////AAAAAAAAAAD//////+ikGAAAAAAAAAAY//////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFT//////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsP//////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAADj///////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAc6P///////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAATOj/////////////AP//////////AAAAAAAAAAAAAAAAAAAEIEBkkNj///////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'C' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP//////////////////5JRULBAAAAgkTIDQ//////////////////8A////////////////1FAAAAAAAAAAAAAAAABAyP///////////////wD//////////////4gEAAAAAAAAAAAAAAAAAAAElP//////////////AP////////////9wAAAAAAAAAAAAAAAAAAAAAAAAlP////////////8A////////////kAAAAAAAAAAAAAAAAAAAAAAAAAAEyP///////////wD//////////9wIAAAAAAAAAAAAAAAAAAAAAAAAAAAw////////////AP//////////WAAAAAAAAAAAWMz/8JwQAAAAAAAAAACw//////////8A/////////+wEAAAAAAAAAID//////9QMAAAAAAAAAET//////////wD/////////nAAAAAAAAAAo/P///////3wAAAAABDBspP//////////AP////////9gAAAAAAAAAIz/////////3BxQjMT0//////////////8A/////////zQAAAAAAAAAzP///////////////////////////////wD/////////GAAAAAAAAADo////////////////////////////////AP////////8AAAAAAAAAAP////////////////////////////////8A/////////wAAAAAAAAAA/////////////////////////////////wD/////////AAAAAAAAAAD/////////////////////////////////AP////////8cAAAAAAAAAOj///////////////////////////////8A/////////zgAAAAAAAAA0P/////////kIGio7P///////////////wD/////////bAAAAAAAAACg/////////5wAAAAAMHS49P//////////AP////////+oAAAAAAAAAEz/////////PAAAAAAAAAAc//////////8A//////////QIAAAAAAAAALz//////6QAAAAAAAAAAGT//////////wD//////////3AAAAAAAAAADIzo/+SEBAAAAAAAAAAAyP//////////AP//////////7BAAAAAAAAAAAAAAAAAAAAAAAAAAAED///////////8A////////////rAAAAAAAAAAAAAAAAAAAAAAAAAAE0P///////////wD/////////////fAAAAAAAAAAAAAAAAAAAAAAAAJz/////////////AP//////////////iAQAAAAAAAAAAAAAAAAAAASY//////////////8A////////////////yEAAAAAAAAAAAAAAAAA8yP///////////////wD//////////////////9yIUCwQAAAAIEB4yP//////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'D' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD///////////8AAAAAAAAAAAAAAAAADChQkOT/////////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAABGjw//////////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAAACDY/////////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAABjk////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAED///////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAKj//////////wD///////////8AAAAAAAAAAP///+isSAAAAAAAAAAANP//////////AP///////////wAAAAAAAAAA////////hAAAAAAAAAAA2P////////8A////////////AAAAAAAAAAD/////////MAAAAAAAAACQ/////////wD///////////8AAAAAAAAAAP////////+MAAAAAAAAAFj/////////AP///////////wAAAAAAAAAA/////////8gAAAAAAAAAMP////////8A////////////AAAAAAAAAAD/////////5AAAAAAAAAAY/////////wD///////////8AAAAAAAAAAP//////////AAAAAAAAAAD/////////AP///////////wAAAAAAAAAA//////////8AAAAAAAAAAP////////8A////////////AAAAAAAAAAD//////////wAAAAAAAAAA/////////wD///////////8AAAAAAAAAAP/////////wAAAAAAAAABD/////////AP///////////wAAAAAAAAAA/////////9QAAAAAAAAAJP////////8A////////////AAAAAAAAAAD/////////qAAAAAAAAABI/////////wD///////////8AAAAAAAAAAP////////9QAAAAAAAAAHj/////////AP///////////wAAAAAAAAAA////////uAAAAAAAAAAAvP////////8A////////////AAAAAAAAAAD////w0HwEAAAAAAAAACT8/////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAoP//////////AP///////////wAAAAAAAAAAAAAAAAAAAAAAAAAAADz8//////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAY6P///////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAKNz/////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAACHT0//////////////8A////////////AAAAAAAAAAAAAAAAABg4bKj0/////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'E' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP//////////AAAAAAAAAAD///////////////////////////////8A//////////8AAAAAAAAAAP///////////////////////////////wD//////////wAAAAAAAAAA////////////////////////////////AP//////////AAAAAAAAAAD///////////////////////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////8A//////////8AAAAAAAAAAP///////////////////////////////wD//////////wAAAAAAAAAA////////////////////////////////AP//////////AAAAAAAAAAD///////////////////////////////8A//////////8AAAAAAAAAAP///////////////////////////////wD//////////wAAAAAAAAAA////////////////////////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'F' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAA////////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAP///////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAA////////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAP///////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'G' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD//////////////////MB8TCgQAAAACCA4YJzs////////////////AP///////////////JQcAAAAAAAAAAAAAAAAAAhw8P////////////8A/////////////9gwAAAAAAAAAAAAAAAAAAAAAAAk2P///////////wD////////////EDAAAAAAAAAAAAAAAAAAAAAAAAAAc7P//////////AP//////////2AwAAAAAAAAAAAAAAAAAAAAAAAAAAABY//////////8A//////////wwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQ/////////wD/////////kAAAAAAAAAAAEHzQ/P/gmCAAAAAAAAAAAFz/////////AP////////wcAAAAAAAAACjg////////8CwAAAAAAAAgWP////////8A////////vAAAAAAAAAAI2P//////////yBRAcJjI8P///////////wD///////94AAAAAAAAAGD/////////////////////////////////AP///////0AAAAAAAAAAsP////////////////////////////////8A////////IAAAAAAAAADc/////////////////////////////////wD///////8AAAAAAAAAAP///////wAAAAAAAAAAAAAAAAD/////////AP///////wAAAAAAAAAA////////AAAAAAAAAAAAAAAAAP////////8A////////AAAAAAAAAAD///////8AAAAAAAAAAAAAAAAA/////////wD///////8gAAAAAAAAAOD//////wAAAAAAAAAAAAAAAAD/////////AP///////0AAAAAAAAAAtP//////AAAAAAAAAAAAAAAAAP////////8A////////cAAAAAAAAABw//////8AAAAAAAAAAAAAAAAA/////////wD///////+8AAAAAAAAABDs////////////AAAAAAAAAAD/////////AP////////wYAAAAAAAAADz0//////////AAAAAAAAAAAP////////8A/////////5AAAAAAAAAAACCY4P//3KhcCAAAAAAAAAAA/////////wD/////////+CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////AP//////////xAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIP////////8A////////////rAQAAAAAAAAAAAAAAAAAAAAAAAAAAGTw/////////wD/////////////vBQAAAAAAAAAAAAAAAAAAAAAADjI////////////AP//////////////8HAQAAAAAAAAAAAAAAAAAEiw//////////////8A//////////////////iwcEAgBAAABCA4aKDk/////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'H' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////8A/////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////8A/////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'I' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAA////////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAP///////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAA////////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAP///////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAA////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAP///////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAA////////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAP///////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAA////////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'J' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP///////////////////////////wAAAAAAAAAA//////////////8A////////////////////////////AAAAAAAAAAD//////////////wD///////////////////////////8AAAAAAAAAAP//////////////AP///////////////////////////wAAAAAAAAAA//////////////8A////////////////////////////AAAAAAAAAAD//////////////wD///////////////////////////8AAAAAAAAAAP//////////////AP///////////////////////////wAAAAAAAAAA//////////////8A////////////////////////////AAAAAAAAAAD//////////////wD///////////////////////////8AAAAAAAAAAP//////////////AP///////////////////////////wAAAAAAAAAA//////////////8A////////////////////////////AAAAAAAAAAD//////////////wD///////////////////////////8AAAAAAAAAAP//////////////AP///////////////////////////wAAAAAAAAAA//////////////8A////////////////////////////AAAAAAAAAAD//////////////wD///////////////////////////8AAAAAAAAAAP//////////////AP///////////////////////////wAAAAAAAAAA//////////////8A////////////////////////////AAAAAAAAAAj//////////////wD//////////+zMrIxwUDAQ//////wAAAAAAAAAIP//////////////AP//////////DAAAAAAAAADo////2AAAAAAAAAA0//////////////8A//////////8wAAAAAAAAAKj///+YAAAAAAAAAFj//////////////wD//////////2gAAAAAAAAAIND/yBgAAAAAAAAAkP//////////////AP//////////vAAAAAAAAAAAAAAAAAAAAAAAAADc//////////////8A////////////MAAAAAAAAAAAAAAAAAAAAAAAUP///////////////wD////////////EBAAAAAAAAAAAAAAAAAAAABjk////////////////AP////////////+sBAAAAAAAAAAAAAAAAAAY2P////////////////8A///////////////EMAAAAAAAAAAAAAAAVOj//////////////////wD/////////////////vHBAIAAAABg8fNT/////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'K' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD///////8AAAAAAAAAAP//////////wAQAAAAAAAAAAABw////////AP///////wAAAAAAAAAA/////////9AMAAAAAAAAAAAAcP////////8A////////AAAAAAAAAAD////////cGAAAAAAAAAAAAHD//////////wD///////8AAAAAAAAAAP//////6CgAAAAAAAAAAABs////////////AP///////wAAAAAAAAAA//////Q0AAAAAAAAAAAAVPz///////////8A////////AAAAAAAAAAD////8RAAAAAAAAAAAAFT8/////////////wD///////8AAAAAAAAAAP///1gAAAAAAAAAAABU/P//////////////AP///////wAAAAAAAAAA//9wAAAAAAAAAAAASPz///////////////8A////////AAAAAAAAAAD/jAAAAAAAAAAAADz0/////////////////wD///////8AAAAAAAAAAKQAAAAAAAAAAAA89P//////////////////AP///////wAAAAAAAAAABAAAAAAAAAAAFPT///////////////////8A////////AAAAAAAAAAAAAAAAAAAAAAAApP///////////////////wD///////8AAAAAAAAAAAAAAAAAAAAAAAAU8P//////////////////AP///////wAAAAAAAAAAAAAAAAAAAAAAAABk//////////////////8A////////AAAAAAAAAAAAAAAAAAAAAAAAAADE/////////////////wD///////8AAAAAAAAAAAAAAAAoEAAAAAAAACz8////////////////AP///////wAAAAAAAAAAAAAAGNiAAAAAAAAAAIj///////////////8A////////AAAAAAAAAAAAABjY//gYAAAAAAAACOD//////////////wD///////8AAAAAAAAAAAAY2P///5wAAAAAAAAASP//////////////AP///////wAAAAAAAAAAGNj//////CgAAAAAAAAAqP////////////8A////////AAAAAAAAAADI////////sAAAAAAAAAAc8P///////////wD///////8AAAAAAAAAAP//////////QAAAAAAAAABs////////////AP///////wAAAAAAAAAA///////////IAAAAAAAAAATI//////////8A////////AAAAAAAAAAD///////////9YAAAAAAAAADD8/////////wD///////8AAAAAAAAAAP///////////9wEAAAAAAAAAJD/////////AP///////wAAAAAAAAAA/////////////3AAAAAAAAAADOT///////8A////////AAAAAAAAAAD/////////////7BAAAAAAAAAAUP///////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'L' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'M' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A//////8AAAAAAAAAAAAAAHz//////3wAAAAAAAAAAAAAAP///////wD//////wAAAAAAAAAAAAAATP//////UAAAAAAAAAAAAAAA////////AP//////AAAAAAAAAAAAAAAc//////8cAAAAAAAAAAAAAAD///////8A//////8AAAAAAAAAAAAAAADw////8AAAAAAAAAAAAAAAAP///////wD//////wAAAAAAAAAAAAAAALz////AAAAAAAAAAAAAAAAA////////AP//////AAAAAAAAAAAAAAAAkP///5AAAAAAAAAAAAAAAAD///////8A//////8AAAAAAAAAAAAAAABc////ZAAAAAAAAAAAAAAAAP///////wD//////wAAAAAAAAAoAAAAADD///8wAAAAACQAAAAAAAAA////////AP//////AAAAAAAAAFwAAAAABPz//AgAAAAAXAAAAAAAAAD///////8A//////8AAAAAAAAAkAAAAAAA0P/UAAAAAACQAAAAAAAAAP///////wD//////wAAAAAAAADMAAAAAACg/6gAAAAAAMQAAAAAAAAA////////AP//////AAAAAAAAAPgEAAAAAHD/dAAAAAAE+AAAAAAAAAD///////8A//////8AAAAAAAAA/zQAAAAAQP9IAAAAADD/AAAAAAAAAP///////wD//////wAAAAAAAAD/bAAAAAAQ/xQAAAAAaP8AAAAAAAAA////////AP//////AAAAAAAAAP+gAAAAAADQAAAAAACc/wAAAAAAAAD///////8A//////8AAAAAAAAA/9QAAAAAAGgAAAAAAND/AAAAAAAAAP///////wD//////wAAAAAAAAD//wwAAAAAFAAAAAAM/P8AAAAAAAAA////////AP//////AAAAAAAAAP//RAAAAAAAAAAAADz//wAAAAAAAAD///////8A//////8AAAAAAAAA//94AAAAAAAAAAAAcP//AAAAAAAAAP///////wD//////wAAAAAAAAD//7AAAAAAAAAAAACo//8AAAAAAAAA////////AP//////AAAAAAAAAP//5AAAAAAAAAAAANz//wAAAAAAAAD///////8A//////8AAAAAAAAA////HAAAAAAAAAAQ////AAAAAAAAAP///////wD//////wAAAAAAAAD///9QAAAAAAAAAEz///8AAAAAAAAA////////AP//////AAAAAAAAAP///4gAAAAAAAAAfP///wAAAAAAAAD///////8A//////8AAAAAAAAA////vAAAAAAAAACw////AAAAAAAAAP///////wD//////wAAAAAAAAD////wAAAAAAAAAOz///8AAAAAAAAA////////AP//////AAAAAAAAAP////8sAAAAAAAc/////wAAAAAAAAD///////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'N' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////AAAAAAAAALD/////////////AAAAAAAAAP//////////AP////////8AAAAAAAAAFOj///////////8AAAAAAAAA//////////8A/////////wAAAAAAAAAASP///////////wAAAAAAAAD//////////wD/////////AAAAAAAAAAAAkP//////////AAAAAAAAAP//////////AP////////8AAAAAAAAAAAAI1P////////8AAAAAAAAA//////////8A/////////wAAAAAAAAAAAAAw+P///////wAAAAAAAAD//////////wD/////////AAAAAAAAAAAAAABw////////AAAAAAAAAP//////////AP////////8AAAAAAAAAAAAAAAC8//////8AAAAAAAAA//////////8A/////////wAAAAAAAAAAAAAAABzs/////wAAAAAAAAD//////////wD/////////AAAAAAAAAAAAAAAAAFD/////AAAAAAAAAP//////////AP////////8AAAAAAAAAAAAAAAAAAJz///8AAAAAAAAA//////////8A/////////wAAAAAAAAAUAAAAAAAADNz//wAAAAAAAAD//////////wD/////////AAAAAAAAALQAAAAAAAAANPz/AAAAAAAAAP//////////AP////////8AAAAAAAAA/2wAAAAAAAAAfP8AAAAAAAAA//////////8A/////////wAAAAAAAAD/+CwAAAAAAAAExAAAAAAAAAD//////////wD/////////AAAAAAAAAP//0AQAAAAAAAAgAAAAAAAAAP//////////AP////////8AAAAAAAAA////jAAAAAAAAAAAAAAAAAAA//////////8A/////////wAAAAAAAAD/////RAAAAAAAAAAAAAAAAAD//////////wD/////////AAAAAAAAAP/////kFAAAAAAAAAAAAAAAAP//////////AP////////8AAAAAAAAA//////+sAAAAAAAAAAAAAAAA//////////8A/////////wAAAAAAAAD///////9kAAAAAAAAAAAAAAD//////////wD/////////AAAAAAAAAP////////QkAAAAAAAAAAAAAP//////////AP////////8AAAAAAAAA/////////8wEAAAAAAAAAAAA//////////8A/////////wAAAAAAAAD//////////4QAAAAAAAAAAAD//////////wD/////////AAAAAAAAAP///////////DwAAAAAAAAAAP//////////AP////////8AAAAAAAAA////////////4BAAAAAAAAAA//////////8A/////////wAAAAAAAAD/////////////qAAAAAAAAAD//////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'O' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A///////////////////0qGw4HAAAABw4aKT0/////////////////wD////////////////wcAwAAAAAAAAAAAAAAAho6P//////////////AP//////////////uBQAAAAAAAAAAAAAAAAAAAAMoP////////////8A/////////////6AEAAAAAAAAAAAAAAAAAAAAAAAAkP///////////wD///////////+4BAAAAAAAAAAAAAAAAAAAAAAAAAAAoP//////////AP//////////8BQAAAAAAAAAAAAAAAAAAAAAAAAAAAAM5P////////8A//////////9wAAAAAAAAAAAsrPD/7KQsAAAAAAAAAABg/////////wD/////////+BAAAAAAAAAAUPj///////hQAAAAAAAAAAjs////////AP////////+sAAAAAAAAABDw//////////AYAAAAAAAAAKD///////8A/////////2wAAAAAAAAAdP///////////3wAAAAAAAAAYP///////wD/////////OAAAAAAAAAC4////////////xAAAAAAAAAAw////////AP////////8cAAAAAAAAAOD////////////oAAAAAAAAABT///////8A/////////wAAAAAAAAAA//////////////8AAAAAAAAAAP///////wD/////////AAAAAAAAAAD//////////////wAAAAAAAAAA////////AP////////8AAAAAAAAAAP/////////////8AAAAAAAAAAD///////8A/////////xwAAAAAAAAA5P///////////+AAAAAAAAAAHP///////wD/////////NAAAAAAAAAC8////////////uAAAAAAAAAA4////////AP////////9oAAAAAAAAAHj///////////98AAAAAAAAAGT///////8A/////////6gAAAAAAAAAGPD/////////+BgAAAAAAAAApP///////wD/////////9AwAAAAAAAAAUPz///////xcAAAAAAAAAAjs////////AP//////////cAAAAAAAAAAALKjs//CwOAAAAAAAAAAAYP////////8A///////////wFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzk/////////wD///////////+4BAAAAAAAAAAAAAAAAAAAAAAAAAAAoP//////////AP////////////+QAAAAAAAAAAAAAAAAAAAAAAAAAJD///////////8A//////////////+sEAAAAAAAAAAAAAAAAAAAAAyg/////////////wD////////////////oZAgAAAAAAAAAAAAAAARg4P//////////////AP//////////////////9KhsOCAAAAAUMFyc7P////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'P' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP///////////wAAAAAAAAAAAAAAAAAACCxguP////////////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAAOOD//////////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAGOD/////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAAAAAARP////////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAxP///////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAAABo////////////AP///////////wAAAAAAAAAA////6JwMAAAAAAAAADD///////////8A////////////AAAAAAAAAAD//////6AAAAAAAAAADP///////////wD///////////8AAAAAAAAAAP//////9AAAAAAAAAAA////////////AP///////////wAAAAAAAAAA///////0AAAAAAAAAAD///////////8A////////////AAAAAAAAAAD//////5gAAAAAAAAAHP///////////wD///////////8AAAAAAAAAAP///9iICAAAAAAAAABI////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAJD///////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAI6P///////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAAIT/////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAAAABU/P////////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAIhPz//////////////wD///////////8AAAAAAAAAAAAAAAAABCRMkOz/////////////////AP///////////wAAAAAAAAAA//////////////////////////////8A////////////AAAAAAAAAAD//////////////////////////////wD///////////8AAAAAAAAAAP//////////////////////////////AP///////////wAAAAAAAAAA//////////////////////////////8A////////////AAAAAAAAAAD//////////////////////////////wD///////////8AAAAAAAAAAP//////////////////////////////AP///////////wAAAAAAAAAA//////////////////////////////8A////////////AAAAAAAAAAD//////////////////////////////wD///////////8AAAAAAAAAAP//////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'Q' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////SoaDQcAAAAHDhoqPT///////////////////8A//////////////BwDAAAAAAAAAAAAAAACHDo/////////////////wD///////////+4FAAAAAAAAAAAAAAAAAAAABCo////////////////AP//////////nAQAAAAAAAAAAAAAAAAAAAAAAACQ//////////////8A/////////7gEAAAAAAAAAAAAAAAAAAAAAAAAAACg/////////////wD////////wFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzo////////////AP///////3AAAAAAAAAAACyo8P/sqCwAAAAAAAAAAGT///////////8A///////4EAAAAAAAAABM+P///////FQAAAAAAAAACPT//////////wD//////7AAAAAAAAAAFPD/////////9BgAAAAAAAAApP//////////AP//////bAAAAAAAAAB4////////////fAAAAAAAAABk//////////8A//////84AAAAAAAAALz///////////+8AAAAAAAAADT//////////wD//////xwAAAAAAAAA6P///////////+QAAAAAAAAAHP//////////AP//////AAAAAAAAAAD//////////////wAAAAAAAAAA//////////8A//////8AAAAAAAAAAP//////////////AAAAAAAAAAD//////////wD//////wAAAAAAAAAA/P////////////8AAAAAAAAAAP//////////AP//////GAAAAAAAAADg////////////4AAAAAAAAAAc//////////8A//////84AAAAAAAAALT////MJHTo//+8AAAAAAAAADT//////////wD//////2wAAAAAAAAAdP///2AAABCg/3wAAAAAAAAAZP//////////AP//////rAAAAAAAAAAY9P/sCAAAAABMGAAAAAAAAACk//////////8A///////4EAAAAAAAAABU/P+0OAAAAAAAAAAAAAAACPT//////////wD///////94AAAAAAAAAAA4sPD/gAAAAAAAAAAAAABk////////////AP////////AcAAAAAAAAAAAAAAAAAAAAAAAAAAAADOT///////////8A/////////7wEAAAAAAAAAAAAAAAAAAAAAAAAAACQ/////////////wD//////////6wEAAAAAAAAAAAAAAAAAAAAAAAAABSs////////////AP///////////7gUAAAAAAAAAAAAAAAAAAAAAAAAAABAwP////////8A//////////////BwDAAAAAAAAAAAAAAABAgAAAAAAAA8/////////wD////////////////0qGg0GAAAABgwXJjkxBgAAAAAALD/////////AP//////////////////////////////////5DQAAAAk/P////////8A////////////////////////////////////+GwAAJD//////////wD//////////////////////////////////////8A49P//////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'R' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////wAAAAAAAAAAAAAAAAAAAAQgOGSk+P///////////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAcuP//////////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAEsP////////////8A/////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ6P///////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8////////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAADD///////////8A/////////wAAAAAAAAAA///////svDgAAAAAAAAACP///////////wD/////////AAAAAAAAAAD/////////7AAAAAAAAAAA////////////AP////////8AAAAAAAAAAP/////////cAAAAAAAAABD///////////8A/////////wAAAAAAAAAA//////DQoCQAAAAAAAAAQP///////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAACU////////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAIPj///////////8A/////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAzU/////////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAA02P//////////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAxctPz///////////////8A/////////wAAAAAAAAAAAAAAAAAAAAAAAEDY/////////////////wD/////////AAAAAAAAAAD/9LAsAAAAAAAAAAzc////////////////AP////////8AAAAAAAAAAP///+wkAAAAAAAAADD8//////////////8A/////////wAAAAAAAAAA/////8QAAAAAAAAAAJD//////////////wD/////////AAAAAAAAAAD//////1QAAAAAAAAAFPD/////////////AP////////8AAAAAAAAAAP//////3AQAAAAAAAAAgP////////////8A/////////wAAAAAAAAAA////////aAAAAAAAAAAM6P///////////wD/////////AAAAAAAAAAD////////oCAAAAAAAAABs////////////AP////////8AAAAAAAAAAP////////+AAAAAAAAAAATc//////////8A/////////wAAAAAAAAAA//////////AUAAAAAAAAAFj//////////wD/////////AAAAAAAAAAD//////////5AAAAAAAAAAAND/////////AP////////8AAAAAAAAAAP//////////+CQAAAAAAAAAQP////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'S' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP/////////////////8vHBEIAgAAAQgQHC8/P////////////////8A////////////////pCQAAAAAAAAAAAAAAAAcoP///////////////wD//////////////FwAAAAAAAAAAAAAAAAAAAAAXP//////////////AP////////////9oAAAAAAAAAAAAAAAAAAAAAAAAhP////////////8A////////////zAAAAAAAAAAAAAAAAAAAAAAAAAAI6P///////////wD///////////9cAAAAAAAAAAAAAAAAAAAAAAAAAACA////////////AP///////////xgAAAAAAAAAUOD/8KwkAAAAAAAAADj///////////8A////////////AAAAAAAAAAD0/////8wABCAgICxASP///////////wD///////////8MAAAAAAAAAMz/////////////////////////////AP///////////0AAAAAAAAAACFiQxPT///////////////////////8A////////////oAAAAAAAAAAAAAAAADBwtPT//////////////////wD////////////8QAAAAAAAAAAAAAAAAAAACFTA////////////////AP/////////////oOAAAAAAAAAAAAAAAAAAAAABM6P////////////8A///////////////4fAgAAAAAAAAAAAAAAAAAAAAY2P///////////wD/////////////////7IwwAAAAAAAAAAAAAAAAAAAo+P//////////AP/////////////////////koGw0BAAAAAAAAAAAAACU//////////8A///////////////////////////4uFgAAAAAAAAAADz//////////wD//////////2BgSEA0IBwA6P///////5QAAAAAAAAADP//////////AP//////////JAAAAAAAAACc/////////AAAAAAAAAAA//////////8A//////////9YAAAAAAAAACDo///////AAAAAAAAAABT//////////wD//////////6QAAAAAAAAAACCk7P/snBQAAAAAAAAAUP//////////AP//////////+BAAAAAAAAAAAAAAAAAAAAAAAAAAAACs//////////8A////////////kAAAAAAAAAAAAAAAAAAAAAAAAAAAOP///////////wD////////////8RAAAAAAAAAAAAAAAAAAAAAAAABjc////////////AP/////////////0PAAAAAAAAAAAAAAAAAAAAAAg2P////////////8A///////////////8hBQAAAAAAAAAAAAAAAAMdPT//////////////wD/////////////////+LRwSCAMAAAAHDhoqPT/////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'T' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////8A/////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////8A/////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'U' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////JAAAAAAAAADk/////////+gAAAAAAAAAHP//////////AP////////9MAAAAAAAAAJz/////////nAAAAAAAAABE//////////8A/////////4gAAAAAAAAAHOj//////+ggAAAAAAAAAHz//////////wD/////////0AAAAAAAAAAAIJzs/+ykIAAAAAAAAAAA0P//////////AP//////////QAAAAAAAAAAAAAAAAAAAAAAAAAAAAED///////////8A///////////IBAAAAAAAAAAAAAAAAAAAAAAAAAAE0P///////////wD///////////+YAAAAAAAAAAAAAAAAAAAAAAAAAJj/////////////AP////////////+UBAAAAAAAAAAAAAAAAAAAAASU//////////////8A///////////////IPAAAAAAAAAAAAAAAAAAwyP///////////////wD/////////////////0IxYOCAIAAAEIEiAyP//////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'V' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD//////zAAAAAAAAAAYP//////////////ZAAAAAAAAAAw////////AP//////kAAAAAAAAAAU/P////////////8UAAAAAAAAAJD///////8A///////oBAAAAAAAAADE////////////xAAAAAAAAAAE7P///////wD///////9MAAAAAAAAAHD///////////94AAAAAAAAAEz/////////AP///////6gAAAAAAAAAJP///////////yQAAAAAAAAArP////////8A////////+BAAAAAAAAAA1P/////////YAAAAAAAAABT4/////////wD/////////aAAAAAAAAACE/////////4QAAAAAAAAAbP//////////AP/////////EAAAAAAAAADT/////////OAAAAAAAAADM//////////8A//////////8kAAAAAAAAAOT//////+QAAAAAAAAAKP///////////wD//////////4QAAAAAAAAAmP//////nAAAAAAAAACI////////////AP//////////5AAAAAAAAABE//////9EAAAAAAAABOT///////////8A////////////QAAAAAAAAAT0////9AgAAAAAAABI/////////////wD///////////+gAAAAAAAAAKT///+kAAAAAAAAAKj/////////////AP////////////QIAAAAAAAAXP///1wAAAAAAAAM+P////////////8A/////////////1wAAAAAAAAM+P/8DAAAAAAAAGT//////////////wD/////////////vAAAAAAAAAC8/7wAAAAAAAAAxP//////////////AP//////////////HAAAAAAAAGj/aAAAAAAAACT///////////////8A//////////////94AAAAAAAAHP8cAAAAAAAAhP///////////////wD//////////////9gAAAAAAAAAkAAAAAAAAADk////////////////AP///////////////zgAAAAAAAAQAAAAAAAAQP////////////////8A////////////////lAAAAAAAAAAAAAAAAACg/////////////////wD////////////////sCAAAAAAAAAAAAAAADPT/////////////////AP////////////////9QAAAAAAAAAAAAAABg//////////////////8A/////////////////7AAAAAAAAAAAAAAAMD//////////////////wD//////////////////BQAAAAAAAAAAAAc////////////////////AP//////////////////cAAAAAAAAAAAAHz///////////////////8A///////////////////MAAAAAAAAAAAA3P///////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'W' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A//8cAAAAAAAAALz/////4AAAAAAAAAAA6P////+8AAAAAAAAABz//wD//1QAAAAAAAAAjP////+gAAAAAAAAAACo/////4wAAAAAAAAAUP//AP//jAAAAAAAAABU/////2AAAAAAAAAAAGj/////VAAAAAAAAACM//8A///EAAAAAAAAACT/////IAAAAAAAAAAAKP////8kAAAAAAAAAMT//wD///gEAAAAAAAAAPD//+AAAAAAAAAAAAAA6P//8AAAAAAAAAAE9P//AP///zAAAAAAAAAAvP//oAAAAAAAAAAAAACo//+8AAAAAAAAADD///8A////bAAAAAAAAACM//9gAAAAAAAAAAAAAGT//4wAAAAAAAAAaP///wD///+kAAAAAAAAAFT//yAAAAAAAAAAAAAAIP//VAAAAAAAAACc////AP///9gAAAAAAAAAJP/gAAAAAAAAAAAAAAAA4P8kAAAAAAAAANT///8A/////xAAAAAAAAAA8KAAAAAAAAAAAAAAAACg8AAAAAAAAAAQ/////wD/////TAAAAAAAAAC8YAAAAAAAAAAAAAAAAGC8AAAAAAAAAET/////AP////+AAAAAAAAAAIwgAAAAAAAAAAAAAAAAIIwAAAAAAAAAfP////8A/////7gAAAAAAAAANAAAAAAAACwwAAAAAAAANAAAAAAAAACw/////wD/////8AAAAAAAAAAAAAAAAAAAdHgAAAAAAAAAAAAAAAAAAOz/////AP//////KAAAAAAAAAAAAAAAAAC4vAAAAAAAAAAAAAAAAAAg//////8A//////9gAAAAAAAAAAAAAAAACPj4CAAAAAAAAAAAAAAAAFj//////wD//////5QAAAAAAAAAAAAAAABE//9IAAAAAAAAAAAAAAAAkP//////AP//////0AAAAAAAAAAAAAAAAIj//4wAAAAAAAAAAAAAAADI//////8A///////8DAAAAAAAAAAAAAAAzP//1AAAAAAAAAAAAAAABPj//////wD///////88AAAAAAAAAAAAABT/////GAAAAAAAAAAAAAA0////////AP///////3QAAAAAAAAAAAAAWP////9gAAAAAAAAAAAAAHD///////8A////////sAAAAAAAAAAAAACg/////6QAAAAAAAAAAAAApP///////wD////////kAAAAAAAAAAAAAOT/////6AAAAAAAAAAAAADc////////AP////////8cAAAAAAAAAAAo////////MAAAAAAAAAAAEP////////8A/////////1QAAAAAAAAAAHD///////94AAAAAAAAAABM/////////wD/////////jAAAAAAAAAAAtP///////7wAAAAAAAAAAID/////////AP/////////EAAAAAAAAAAT0////////+AgAAAAAAAAAuP////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'X' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD///////9UAAAAAAAAAKz///////////+sAAAAAAAAAFD/////////AP///////+QQAAAAAAAAFOT/////////8BwAAAAAAAAM5P////////8A/////////5gAAAAAAAAATP////////9kAAAAAAAAAJD//////////wD//////////0AAAAAAAAAAoP//////wAAAAAAAAAA0/P//////////AP//////////2AgAAAAAAAAQ4P////gkAAAAAAAABMz///////////8A////////////iAAAAAAAAABA////dAAAAAAAAABw/////////////wD////////////8MAAAAAAAAACU/9AEAAAAAAAAHPD/////////////AP/////////////IBAAAAAAAAAzYMAAAAAAAAACs//////////////8A//////////////90AAAAAAAAABAAAAAAAAAATP///////////////wD///////////////QgAAAAAAAAAAAAAAAAAAzg////////////////AP///////////////7wAAAAAAAAAAAAAAAAAjP////////////////8A/////////////////2AAAAAAAAAAAAAAADD8/////////////////wD/////////////////7BQAAAAAAAAAAAAEyP//////////////////AP/////////////////gDAAAAAAAAAAAAAjY//////////////////8A/////////////////0AAAAAAAAAAAAAAADj8/////////////////wD///////////////+UAAAAAAAAAAAAAAAAAJD/////////////////AP//////////////4AwAAAAAAAAAAAAAAAAADOD///////////////8A//////////////9AAAAAAAAAAAAAAAAAAAAAQP///////////////wD/////////////nAAAAAAAAAAAWAAAAAAAAAAAlP//////////////AP///////////+QQAAAAAAAAAGD/YAAAAAAAAAAM4P////////////8A////////////TAAAAAAAAAAs9P/0LAAAAAAAAABM/////////////wD//////////6AAAAAAAAAADNT////UDAAAAAAAAACg////////////AP/////////kEAAAAAAAAACg//////+gAAAAAAAAABDk//////////8A/////////0wAAAAAAAAAYP////////9gAAAAAAAAAEz//////////wD///////+oAAAAAAAAACz0//////////QsAAAAAAAAAKT/////////AP//////7BQAAAAAAAAM1P///////////9QMAAAAAAAAFOz///////8A//////9UAAAAAAAAAKD//////////////6AAAAAAAAAAVP///////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'Y' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP///////1QAAAAAAAAAAGj//////////2gAAAAAAAAAAFT///////8A////////5BAAAAAAAAAAAMT////////EAAAAAAAAAAAQ5P///////wD/////////mAAAAAAAAAAAKPj/////+CgAAAAAAAAAAJj/////////AP//////////PAAAAAAAAAAAgP////+AAAAAAAAAAAA8//////////8A///////////YCAAAAAAAAAAE2P//2AQAAAAAAAAACNj//////////wD///////////+AAAAAAAAAAAA4//84AAAAAAAAAACA////////////AP////////////woAAAAAAAAAACUlAAAAAAAAAAAKPz///////////8A/////////////8gAAAAAAAAAABAQAAAAAAAAAADI/////////////wD//////////////2wAAAAAAAAAAAAAAAAAAAAAbP//////////////AP//////////////8BwAAAAAAAAAAAAAAAAAABzw//////////////8A////////////////tAAAAAAAAAAAAAAAAAAAtP///////////////wD/////////////////VAAAAAAAAAAAAAAAAFT/////////////////AP/////////////////oEAAAAAAAAAAAAAAQ6P////////////////8A//////////////////+cAAAAAAAAAAAAAJz//////////////////wD///////////////////9AAAAAAAAAAABA////////////////////AP///////////////////9gAAAAAAAAAANj///////////////////8A/////////////////////wAAAAAAAAAA/////////////////////wD/////////////////////AAAAAAAAAAD/////////////////////AP////////////////////8AAAAAAAAAAP////////////////////8A/////////////////////wAAAAAAAAAA/////////////////////wD/////////////////////AAAAAAAAAAD/////////////////////AP////////////////////8AAAAAAAAAAP////////////////////8A/////////////////////wAAAAAAAAAA/////////////////////wD/////////////////////AAAAAAAAAAD/////////////////////AP////////////////////8AAAAAAAAAAP////////////////////8A/////////////////////wAAAAAAAAAA/////////////////////wD/////////////////////AAAAAAAAAAD/////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
'Z' => array(
'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAQ//////////////8A/////////////////////////1AAAAAAAAAABLz//////////////wD///////////////////////98AAAAAAAAAACY////////////////AP//////////////////////pAAAAAAAAAAAaP////////////////8A/////////////////////8QIAAAAAAAAAET8/////////////////wD////////////////////gGAAAAAAAAAAo9P//////////////////AP//////////////////9CwAAAAAAAAAFNz///////////////////8A//////////////////xMAAAAAAAAAATA/////////////////////wD/////////////////eAAAAAAAAAAAnP//////////////////////AP///////////////5wAAAAAAAAAAHT///////////////////////8A///////////////ABAAAAAAAAABM/P///////////////////////wD/////////////3BQAAAAAAAAALPT/////////////////////////AP////////////QoAAAAAAAAABjg//////////////////////////8A///////////8SAAAAAAAAAAExP///////////////////////////wD//////////2wAAAAAAAAAAKD/////////////////////////////AP////////+YAAAAAAAAAAB8//////////////////////////////8A/////////wQAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A/////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
'width' => 40
),
);
 
return $_png;
}
 
// These define base64_encoded raw png image data used
// when we cannot generate our own single png image
function define_raw_pngs()
{
$_png = array(
'0' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QKCNGXKO6AAAAB3RJTUUH0wUOEDQ6EUG1VwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAXNJREFUeNpj/M9AHGAiUt2wVvhyaqAqKyOjpG3jQwaGv+e+IUn9RwJfSjjg4iwFP1aKJD6HyyErfGGAYrquIoP5E2wK/zigu0v5wH9sChdgeKDqP1aFGhBZmxv/z0Dd4IxV4RWIpMQHIPuJAITzAqEQETx7IFQIP5CQNoJwDmALxzMQCuyjg1chnBPYwtECwr8AZN41h0p6YHOjAkTuwf//77wYuCEcFWwKOWA2fM1iZuuHcASwKYQ55c9ENuasrxgRjKlwJS+D17v/hBUeUGYwv/sfn0IRiJQZJIbxuFEFagjvSlDUQNgK2GIGqpC1JRhIfoAqxBYz0DRhn8IMJO+giKEqhMaMJBeI3AHhIKdkRPqG8DlAifqFADyasKRHO6h1Z/6fMYEwTbCmx3cWGCl8CTaFwBhGz+M2/7EpXMvOnBmIok7jBVaFz/Mi3/1pQORrhpgPyOr+M8IL0j9/gKpeLjhy5QEwoDVsYuRR3cE4IktcAJNx8cJaZBeQAAAAAElFTkSuQmCC',
'1' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QMi//xxVKAAAAB3RJTUUH0wUOEDYLcqnX7wAAAAlwSFlzAAALEgAACxIB0t1+/AAAAHpJREFUeNpj/M9AHGAiUh1WhR8FGUGAsMKaD9iM/I8BlmCVwVS4hoUohT8qcNiFyv2zQIWBCIV3amRwu54RKcDRAgQ1KigIcJYK7CqR3QsCFmf+Y8qgeQakbANMAz6FKjUXECbj8zWa76nm61GFw1UhI10KqVGFNFQIADdK9Zj7PsV9AAAAAElFTkSuQmCC',
'2' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QMwPUBEjoAAAAB3RJTUUH0wUOEDUqFe2UcgAAAAlwSFlzAAALEgAACxIB0t1+/AAAAQxJREFUeNpj/M9AHGAiUt2owkGrkAWF93LFgStPfjCwyGiYRGijqfyPAH9aOJAkQl78RwbICkNQjdB4gUNhD7qzLLAr/CKA4YENSAoRvl7zAUJXvPmxhgfCXILVMxEQvg+IDVUhgtVqDYjkDhD7B2aQIMIx5cOTN29evLAAsaEKObBajQzmQOQMcIQjHLwQgSisIaDwBdS5LHfwK7yhAHVVyX+8CrdAA5HB5gdehQ3Yoxpd4ZcAmDqbD//xKISEIjhU//zHoxDmXQaeFRhOZ8CmzuDOf3wKf8DsDfnyH6/CHJi6P//xKjyDJethVehBpMI7DPgVwrPCCgb8AK5wDwGFcNMF8EkCASOx1QcAGUxu1untnFIAAAAASUVORK5CYII=',
'3' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QMxBQugk2AAAAB3RJTUUH0wUOEDU3duv4qwAAAAlwSFlzAAALEgAACxIB0t1+/AAAATdJREFUeNpj/M9AHGAiUt0IVciCzPm7ZceZB28YGBQkLHwcmNFU/keANRJI4ioH/qMAJIUlaHatwaFwBrqrOO5gVfiCB8P9KVgVVkAtnPDh/wkLCFsGq0IFiGQLiH0D06P/GWHJ7O+NOzfuXLlzQRrEhgSawHscwYPurxAcwQMBf/4/aIAYyHIGr8IEeDhO+Y9XoQNUncwOVHGMRPEDSovc+IkzrpGDCQgUbuC1WgBhhsIHfAp3vPn/oIIFKfRxKQSDGohCA4IKX0DTD7YoRAWMUJ9iyQpbn4DBBWUQ5yFEDDnFw622gXAzwBxoYvfB5sYlUI0lD/4/gWWKJdgU/tHAcKjCD6y+PsGCpo4FJbaRgmcNqkqWCThTzxkTJHXo+Ro1HA9uOPHiATDlKJj4eKCVFIzDqWgGAK7GW/haPS+zAAAAAElFTkSuQmCC',
'4' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QMyqWttCEAAAAB3RJTUUH0wUOEDUxn4hdngAAAAlwSFlzAAALEgAACxIB0t1+/AAAAKBJREFUeNpj/M9AHGAiUh2FCucyQgCK4H9McIAFixwWhQ8kGIhS+MWAgTiFIQzEKWxhIE7hFgbiFF7hASkQIajwjQpInuUAIYV/XMDyU/4TUlgAlk75T0jhArCszR9CCk+AY07mxX8CCp+AY47nzH8CCn+YgOWW/CekMAYsVfMfl0JGmCBq4kNEDp2zAn0UMmItABjRvDykPTO43DgyFQIANP6pTFLWAdoAAAAASUVORK5CYII=',
'5' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QMzPy3XhEAAAAB3RJTUUH0wUOEDUk8lW5dQAAAAlwSFlzAAALEgAACxIB0t1+/AAAAQpJREFUeNpj/M9AHGAiUt2oQuIVfmREBzgU3iHWxAfEKiTaRFpZnfAfAbAr/AsxUYagiVCbeQgqhPpFYmukLCOrZupRNJUIB02BCAjAZCK+/Ed2LoJZgm6bzRfsCgMw3JWAXaEBpg8uIGSRPPMBQmXc+P+iggXCnoOQZUQK1K8PgEAjGcQs7QGL6FzG5mtkcAUiyYIQYcRRUkDTLEIWR1b4ixamQMPhrKUP3rx48eDNFXmwdyFiOthixgXqaTAnBcKpwRaOS6A6Mx78fwBVx/IAm8I/KsTGzAkWNHUyb7Ar/L8GNSlK3MCRev7/v+CApC7kBUoUoAX4yQ0nHjwAWqpiE6GNFgNDoAwHAKC2Q2lMNcCmAAAAAElFTkSuQmCC',
'6' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QNAObRd4vAAAAB3RJTUUH0wUOEDUc2lcB6wAAAAlwSFlzAAALEgAACxIB0t1+/AAAATtJREFUeNpj/M9AHGAiUh2Gwq2puryMjKKmmSfRVf5HBkcMEBI+L1CkUBROYUE2QuMFLoVr0CzzwKHwhQC6szZgV1gAtfHI/xs2mEYywsPxp8QHEMVxQ56B4aaJiIKIiIRCPDZf74DwI/5jB4hwPAChbAgG+BWoExlOxkoysuqW3sUV4BoQ/p0SqARLB44AF4HIByDMKMCuEIu7phCrUOADNl/DgMOJ/09SIMwPC7B5hgfC1/kB4kRAOC7YrFaByM0Ac85AOCLYrFaBhSMIQNPlG2wBDg3HP2CSGU/MuEAoiKVXUWxB9cwPiG8UwEGSg5FCMNOjwZ4/byqgpqwgMoWr/MGeZ1agqWPZgSNz/Z+AqnDCf1wK/29B8qbKDhQpRtTE8HfLjjMP3jDwKJh4hKCGJSPNC6lRhTRWCABWpdoxd/bZ4QAAAABJRU5ErkJggg==',
'7' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QNA18/fMoAAAAB3RJTUUH0wUOEDUVo4u5TwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAM9JREFUeNpj/M9AHGAiUt2oQnorZIGzGLFJIyJ40HqGhUiFPFuQ/YUFPBGBmLcDSQybwj8OEDOW/CegsAeiruQ/AYV3OMDqTP4QUugCceCN/wQUQn1a8Z+Awj8qYHUiHwgpXAAxcMJ/Qgp1wOoEPhBSuANiYM5/QgpjIAovEFL4gweszgAz0NASxZ4vYMqHYDKDBiIWhWhWa0CS1x9CVn+8AaYsmAlZfQRC6RDMChADGTQIKjxDrMI7EEoBi0JGlMJe8AOY+sFOSCEeQHQBAABCZ7xyT9fJhwAAAABJRU5ErkJggg==',
'8' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QNBeBnwpSAAAAB3RJTUUH0wUOEDUOKe5wowAAAAlwSFlzAAALEgAACxIB0t1+/AAAATVJREFUeNpj/M9AHGAiUt1AKmRB459cc+DBGwYWGQ2LEG1Umf/I4IELkozLA2QpFIUXJFDMEDiBQ+EHGTR3yHzArrAFwwct2BXqQGQ1zvw/owFh6mBXCDXmDJB5BsOrjEhxzfoHIgkiGCGB9xtrgEPtOwvEV6FWY4+ZAAgVc5LhZgKEGYI9wN+gBiPu4Pl/BFWlxA1cMfN/C0rUr8AVhX8K0KyuwaEwASNmarAqPACVTXnw/0oENBFewKYQGhYZYE4MVBM2hVAvQ1LhHQhHBVsUMjIgYhCdhy3PPASTd6GOxBYz0KhOQHajDjY3pkC1Rlz5fweqjqEAm8ILGK5gYLlDZICXYI+ZLzZo6gL+4EgUfyo4kJQJtCCpQ8kKQPB2zZ47L14AU5iMgUMAN7IM43AqHwdQIQAhMPz6Gz5V/wAAAABJRU5ErkJggg==',
'9' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QNCQ+T2tEAAAAB3RJTUUH0wUOEDUHUDLIBwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAUZJREFUeNpj/M9AHGAiUh26wr9rE3V5GRlFTTM3/kVT+R8Z7FBBSKjsQJFCUTiFBcWMCbgUHmBBs20FdoV/VNDUMQi8wapwDVS65s2fPToQZgFWhRFIkm8kwGyeH9gUQm2+Aua0QDhb4LJI4XgHQmmDSRMIZw+emIEENAeEcwObQhEIdQHiABRbUGPGBSIQAWL/gHqbB5tnJkC1Fjz5f8IGwxwkhR8EsCQarFE4hViF/wsQCgKgHsSu8H8HLFkUQL2rgUPh/zslOiwMEjFH/kND2geXQvQgqMAWhSjgAIRygAswIuXCpXfevHjz4M0ZdQaGhxo/wAnyBTuWmPnvARGxuPH/iAa+9Ph/A7r9Ai+wK/zvg6ZwzX8cCl9oICtjmfIfl8L/bwIQ6gyO/Met8P//EwUmwHTJo5OyBU2CkdaF1KhCWisEAM/sJxmZkdWnAAAAAElFTkSuQmCC',
'A' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QFwy1U7TfAAAAB3RJTUUH0wUOEC0ZKCZtPQAAAAlwSFlzAAALEgAACxIB0t1+/AAAAO1JREFUeNrt1LERwiAUBuAHZ2GRwsIypQMwQEZwgBQpM4QDZBSLFI7gCA5gQWGRdA5gkTuMSh48eMTUnq96wH98B+QiDCwruTD3D76qF676ueAp0Y9lSBXeSkFWaLAje3T+kkzK4SgpBzZw8pqxJWcdOJuRsyGPbWDk0tS20zw9SXsobdfytJVXdzNsP61i6Zt3K7Ht0UeUgbPdjsrOXMd+2IS2C2qb271HVWi7YANcNXFQsUEVBTXwNdl46jYRxPl52dnwRUZbhkLSDmS8DnxFRWiULxg8UxvobefuRR8ZQYDKtffVVcQWv/RrfgJC4bd0upw4MQAAAABJRU5ErkJggg==',
'B' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QGAusrz2zAAAAB3RJTUUH0wUOEC01Gv4B3gAAAAlwSFlzAAALEgAACxIB0t1+/AAAANJJREFUeNpj/M9AHGAiUh0tFTKiAUHL2rsoKv9DARZDWFr+IwA+hQwMFcQqZDhCrMIIYhWK4FYIYv8444PuV+wK//9/A+UJwBUSCHAL3OEIsdoFyttCpGdiiAtHjoY/RCnk6PlBbBRKrCE6CqcQq5DlDs5whIT3CgUI788EvOEIBCegXB2YPCNMBSNMISqf5TeUjysK90LpP/itfrFEAhZCMHkWdKMYUbk2MAah7BqD02pUYEFkgMu8IE6hD0IdpmegwSejoKLjoY7syaFU7A0HhQA2e4cJytImvAAAAABJRU5ErkJggg==',
'C' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QGBbPqVFqAAAAB3RJTUUH0wUOEC4BEGemqAAAAAlwSFlzAAALEgAACxIB0t1+/AAAASlJREFUeNpj/M9AHGAiUt2owkGrkAWV+3TDgRtPPjBwyGiYBOijSv1HAlcCkGUcTiDLISvsQDOeZQp2hQWYDpuCTeEEbD44ganwDgc2vxpgKoyAyUWc+f9hjgCMtwFd4RuYRxog/ueBcl3QFc6BSmj8gfBrwE40yFmCrjABqrAH5mSZgJ4jX7AEjwlU4Zn/OAAsrp9AaRlccc0IzdeMsBilOPWQrBDmtpfEKnwBpZ8qZq58i6IS6vscKHcBcgQYlOz4gh6OK6AKfaB8G5hN6Aq/wBLPHjB3CczCFIzUA0u2PD0v/j9pgaf1ExgK3wgwYAEOWFL4GizqWC5gyzM1mArnEJkLZ2DPhf//n3BAVmeDkq8ZUZPL3TUn7gBLCgYFBYsAcxQZRmKrDwABNsv9SJSDwwAAAABJRU5ErkJggg==',
'D' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QGC1+orhOAAAAB3RJTUUH0wUOEC4yr7fHvgAAAAlwSFlzAAALEgAACxIB0t1+/AAAAM9JREFUeNpj/M9AHGAiUt1AKmSBsxiRhXlkNBxCpFFU/ocBTDMyPvxHADwKGRgUbhCpkEHiCZEKGRyIVciwArdCIPPFGg8YzwSvQiBogXFvEFD43wDKnQDl44yZGCh9glAU2sCsJqRQBkq/gMUw3G2wuP6PnU/H9PgRSgsQUvgESosQUngFSqsQUrgCSsNiCFcU7oBx9+CL6w8XamB5SeUPkelxAZEJ1+YPcQolXhCXFTTuEJULOUq+IOVrFgasQELBxMaHG1mEcTiVjwOoEADAIkCnGpmJKgAAAABJRU5ErkJggg==',
'E' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QGDeDwEE0AAAAB3RJTUUH0wUOEC8CkHXGUwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAD5JREFUeNpj/M9AHGAiUt2owkGrkAXGYMQqjUgJQ8EzpPsa05+D140oMYTk4KEQ4MMqZqgUhcM1czESW30AABfqB1XDnLzcAAAAAElFTkSuQmCC',
'F' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QGQe8AkDZAAAAB3RJTUUH0wUOEC8JB6cf2wAAAAlwSFlzAAALEgAACxIB0t1+/AAAADlJREFUeNpj/M9AHGAiUt3wUsiCYDJikUYE3lDwDDm+xvTp4HUjIoaQXTsUAnxYxcyoQryAcUSWuAAW/gZTg/yEMAAAAABJRU5ErkJggg==',
'G' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QGRFI1vWIAAAAB3RJTUUH0wUOEC8QY8y3GwAAAAlwSFlzAAALEgAACxIB0t1+/AAAASZJREFUeNpj/M9AHGAiUt0IVciCwvt7ZM+FOy8+MDBwSEho2AQII8v9R4A/U2RQtHEUfEBIIim8YYBhn8oNLAqP8GBxmcwbDIU3sKljYIhAV/jHgAE7uICmcAJMQqDmwp//D2YowPgxqAr/wPyr8QAi8EEHwleIQFW4BxYicG+eEHEomHECET5QhRVQhQn/cQFoFJ6AKgwgFNcPoFwdnAoZIXmGERahKDwkIdqlR1j4PiRW4RVCCmExvQenQrSYEXiDiAoUBfC4loAK23yBSnzArhCRehRmAJPFnRUxHDgU/lDA7zZECj/Cgl2dAkaeWYNVZcoHDIX/94hgKLM4gS27/v9QIICizGMDkiQjSon7c8eBCw+e/GFgkZEwsHCRRpZiHE5FMwCa2YE+WcAOUwAAAABJRU5ErkJggg==',
'H' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QGRw2Z4k1AAAAB3RJTUUH0wUOEC8agxleBQAAAAlwSFlzAAALEgAACxIB0t1+/AAAAD1JREFUeNpj/M9AHGAiUt2oQvyABUozQml4+KMLDAXPDAWFLGh8RlwKh4JnaB88GOlxELhxVCFewDgEynAAN2sFVHAvevkAAAAASUVORK5CYII=',
'I' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QGSlg1E0WAAAAB3RJTUUH0wUOEC86uHd+zQAAAAlwSFlzAAALEgAACxIB0t1+/AAAAD5JREFUeNpj/M9AHGAiUt1AKmRBMBkxJJE9OhQ8Q32FjGhxDQsjjCQwFDwzqnCwKkRKZqO5EBMwDqcSl2iFAMMeB0s/kLo2AAAAAElFTkSuQmCC',
'J' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QGywiiNsbAAAAB3RJTUUH0wUOEDAFw0tdbgAAAAlwSFlzAAALEgAACxIB0t1+/AAAAKdJREFUeNpj/M9AHGAiUh3xClmwijJCaSR3Ud/qUYWjCklTyIHEhifctw8ePHgCxO+B7L9QMQlsChW+QOiX4gwMd6BiItisVoHSB6AYWQwM/kNBBszkC/9PwKyc8B8B4Ar3YPHMHWwK/xtgqAv4j1XhEfScK/EEu8L/a1BVStz4j0Ph/yPItoe8QFH3nxGlkNq75cKDB0DDVBwitNEcwjhwpdmoQrwAAN6ioiFapgUdAAAAAElFTkSuQmCC',
'K' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QHAEoFhGpAAAAB3RJTUUH0wUOEDANzZDVXAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAPZJREFUeNpj/M9AHGAiUt2owgFSyAgFMOGDrDARxkKo0H8wYEDh/b/AAzepACqEVeEdCQx1WBW+0ICry/mPR+EXE7i6kD94FP5xwaYOi8IIrOowFRbA1Xkgq8NQ2ANXZ/PlPx6FS3CpQ1fIAmOIoKn7jxbXf2CMNxvQIxvVRAQQ+YDXaiSQQqxChiOEFGoIQGidP/gVStxogLI68CqUuPH/BzSVcTzAoxCo7v//ObBIxK0QrO7/H1iCXIFT4QkIFxbaMh9wKYQJO0D5OYQUnoDF/QkCCuHJ1+APAYV3YOloAgGF8JTO84SAwjfQiGQIgPAZqV4rAACnKSarzdlc4gAAAABJRU5ErkJggg==',
'L' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QHA64qQw4AAAAB3RJTUUH0wUOEDAXMPIsJgAAAAlwSFlzAAALEgAACxIB0t1+/AAAADlJREFUeNpj/M9AHGAiUt2QUMiCYDJCaezhMBQ8M6pwVCEdFLJgCjEisRH5Zyh4hvoKGUdkQUq0QgARaARRV9jUFQAAAABJRU5ErkJggg==',
'M' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QHBhMfblpAAAAB3RJTUUH0wUOEDAqaJpgNwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAPNJREFUeNrdlK0OgzAUhS8bCQYxMYmcmEAgEAgejQfZQyG2pAIxOYlATkAu691o2tvSYia2iv7lyzn3NG0jhG1tt5H7Aggom7ZuaKPhBFqKV+pFWDGjjcxStEAYXuvBkrKtoVX+gdRiK9i6sxjgeVGUMJzWwZLACaZOTqoAOAronmrlBuvPkQsIgHn8BqnE2AMmhaaYJ57jqTRFMwsDyW249XaJLhAujizm7UFM5XCUXTqiTvBLQYWRc7H3WWt+3NmlyGbOGh9q/45mjQxUb+CA6A2jSqu5MweX0ooQWLJxLYx6fz0GwmBOsww5GP3At/dX4Ayb7qpFI9y5ygAAAABJRU5ErkJggg==',
'N' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QHC6DxyzwAAAAB3RJTUUH0wUOEDAye/b4YQAAAAlwSFlzAAALEgAACxIB0t1+/AAAALRJREFUeNpj/M9AHGAiUt0IV8gIARsRMlAROP8/BEB5Ii/+/0cVgXNRhRk8iFXIMIFYhRxXiFTIYPCDSIUMBcQqZNhDrEKZN0QqZAggViHDHIIKRSAUzx1CCrdAaZM/BBT+z4Eyaggp/KEDYbAcIaDw/wUWCEuBkML/PagBgFvhfxdiFT4RIVLh/zXEKvyfQqzCLypEKvx/hoVIhf9biFX4x4ZIhf8fCBCp8P8KNBHG4VQ0AwDEOyeZhO5p1AAAAABJRU5ErkJggg==',
'O' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QHQExDSDoAAAAB3RJTUUH0wUOEDA4myMRfwAAAAlwSFlzAAALEgAACxIB0t1+/AAAATtJREFUeNpj/M9AHGAiUt3wUsiCyv265ciZJ08YGGRkDGwCuFGk/iOBDwU8SDIcGS+Q5JAV7hBBs45nAVaFC1gwXTYBi8IdWNQxMCzAUPhBBJs6Bp4n6AoLYFI6az78f7NEB8ZNQFP4QwAqEfADwg+A+f0NqsI1UHGBDzCnSKC6EhYzB6B0Cj+UwZ+CKgNTeAZKu8C94QGlL6DGjAyU+wAeXC+gIiIQLiM0KzDC9CFCBlWICsnsL3aFMDc+hcs8QZWBKYSF2g24whvYFZpA6T1whUegNCwyoYGxAmYyLGZ+wOxYghqFX2BpO+APmP8nBspHj2uk1LPizf8PGyxgXPTUQ3x6JDqF//8/AYs6bHkGmCYF0O3FnguBCSaFA0kZS8IDJDlG1IIUVFK8eABMWzI6DgHCyDKMI7LEBQCD5YgI9wbKGgAAAABJRU5ErkJggg==',
'P' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QHQvR2Mn2AAAAB3RJTUUH0wUOEDEDMzPJGgAAAAlwSFlzAAALEgAACxIB0t1+/AAAAKVJREFUeNpj/M9AHGAiUh05ChlRAKdu4k5Ulf9hANMQiwf/EQCfQgaJB0QqZHAhViHDEbg0AV8vwRM8QN0v5vBAOSfw+BrMWQDl8MClGeEKGGEKQcRXHmQemTGD1RMy+N14o4MDyvGAS7NgGMaIzPHAYyIy4HhBZMy0EBmFIX+IUsjRgqQOi2fAgEVBwyVGGEUEQw2O3EbLzDWSFDIOhtJsVCEWAAC/Yt2X+2PYcgAAAABJRU5ErkJggg==',
'Q' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QHRxSC0wxAAAAB3RJTUUH0wUOEDEKSu9xvgAAAAlwSFlzAAALEgAACxIB0t1+/AAAAW1JREFUeNpj/M9AHGAiUt2QUMiCzPm65cCZF08YGGRkDBx8uNFU/oeDDwU8SOIcBS/+IwOEwh0iaEYIrMCqcA4LprsmYFG4A4s6BoYFGAo/iGBTx8DzAl1hAUxKZ8WH/29W6MC4KWgKfwhAJXx+gPl/QmB+/4KqcANUXOQDVPiLBFRkCUwhJGb2wGzihzK4U6CMA6hReAbKc4F7wwFKX0CNGRkoB+HJJ1ARGZgAIziFM8J0IUIGXYjMZPaXkEJYYDyBiz+EuRFVoQKUdwWIz6qWvmRguAMVkUBVaIIUalPu9GgshIefAWrwrIHp//L/DQc4KjFiBi2uQ/7832KB5AX0uP5fAZOx2PDhfwNCIXrq+f9BhgEb4HmCkcL3YE3hSHkBnmfWYFMpsoaYXAgGDgcwFKLlaxYOCG2DqRCYrldkmIACUMIgZsaTI5Cg3IBNISp4AoovlT+EFf7/kYPkb3wK//8/YAGPGcYhUIYDAHBC9Yak1w7iAAAAAElFTkSuQmCC',
'R' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QHSkEuIgSAAAAB3RJTUUH0wUOEDEUsOBM3QAAAAlwSFlzAAALEgAACxIB0t1+/AAAAOZJREFUeNpj/M9AHGAiUh0NFLJAaUY0YRkJHYcQdmSh/xCAzRCZHf8RAJ9CBpYNRCpkEHgBV4jfMx+mEOVGIDDAaTWY82aPBZTLgV8hUCkaH6cbP8B8gxHgyODjgwstMDfiVIgWQyFE+lrhB3EBznOFuJgxuUFMXPPEbPmDpA53FH55osKMIoAe4F826MDMvPMfj9WgWFGBBeIf/Ar/H4FxJhBQ+B8WzCIfCCi8A4uvBgIK/2fA/POCgMIXHFBuDqH02ABLM3cIKPwgAuVHEFD4fwJM4AIBhT9goe4AFWAcAsXesFIIAEvJyZHTCSiTAAAAAElFTkSuQmCC',
'S' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QHTRnvuTLAAAAB3RJTUUH0wUOEDEbIF9RTAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAVZJREFUeNpj/M9AHGAiUt2oQvyABYX398CWK3de/GBgkVEw8HFgRpH7jwSWqCDLyCxAlkNS+CcG3boY7AozMB3Wgk3hGSw+4HgBl0b4egIWhT9mYPGMBFQg4MH/D2tgvrKASzPC0yMjlP7CDSTOmrDIMDDwiHBsxzSRBypw5j9WgFDoAPNAxIQjX/ApXIDsC4OCLV9wKfzjwIACOEIO4IiZFxbooePzAqvC/z9qONBUStzAqvD//zc9BqgqNX5gVwgETxbkmCClvSk4FYLdsCMCptAGI2YSGV78+PLmz5MX4mDu1ByIMM9n9JiBxe4caGChy8MZMMsUIEFyAMoVwVC4BGaEwpI3/9/MEYGlJQyFPwQYsIE1mL7GlnCR0iNSXLtgqpO4gy1mvtigq1NAxCBKgP9pEUFWxlOCnNIYUYrmn3v23Ljx5gsw88sYOPhwI0sxDoEyHAABtSc836a1EQAAAABJRU5ErkJggg==',
'T' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QHgUdTbcyAAAAB3RJTUUH0wUOEDEgkVS4aAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADdJREFUeNpj/M9AHGAiUt0IVcgCpRlxyMODeSh4hmiFjGipB+Z7jEQ1FDwzqnBU4WBSyDicimYAb/AFTaJpyH8AAAAASUVORK5CYII=',
'U' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QHhEHl2NPAAAAB3RJTUUH0wUOEDEon48wWgAAAAlwSFlzAAALEgAACxIB0t1+/AAAAKlJREFUeNpj/M9AHGAiUh3xClmgNCOUhrsEXYD6Vo8qHFVIuUIVKP0USr+E0jLoCjWg9A4ovQVNHJjUIaADZsILMPeFApRfA5X/D1N4AaZRYc6b/2+WwNQxXEBX+N8Bqxcc/mMoPMGCRR3LBUyF/2dgUTjjPxaF/6egm8ky5T9Whf9P2KCoMziBJPefEaWQurjnzIMXL34wsMhoWHiYo2hjHLjSbFQhXgAAKzejCLAOcVMAAAAASUVORK5CYII=',
'V' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QHh/gL05IAAAAB3RJTUUH0wUOEDEuduyVbwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAVNJREFUeNpj/M9AHGAiUt2owoFRaMgIAYlIMqlQMUMo/z8ITIByRP78hwMRqNgECBei8AULVPQIXN0RqAjLGwgfYrW4B1R4DdzmLVDaQxjZ6v8roDwVuIkqMK3/ka3+/0MAKn4FKn4D5uof/5GtZmCPgEpsQHNDBDsDitVwt5tA+RZQ/pn/qFYj3PQEzHsC5WnA3QyPmQQU3+5AE0VYDTfDBcxzgQbik/8YVv93gMp9AbK/cEAD8T+m1TBb/oD8veEHhs0IE2GmxADZMRAmz4//WKxGkv3DA2Gm/MeqcA/Ujj1w1hHsCv/LQKQz/megRzyawgqIvAxMRwsuhbCEAEvGT3AphEUwNCU5IEv9R8lcUH9/wAxE5HAEgjccSBI8X3CbKOyBxAnhxm3i/w1IEgdQZFA98/+PCFydDKo6VKsZmGPQ0wgOq/+fgYvfQTORkeq1AgCIAvD7+THsDgAAAABJRU5ErkJggg==',
'W' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QFhZRKnzkAAAAB3RJTUUH0wUOEDIR66frkQAAAAlwSFlzAAALEgAACxIB0t1+/AAAAXNJREFUeNrtlK1ywkAUhZdMZsJMKyIqKhAIBAKBiEBEVCDyCJV9iIo+Do9QGRERgUBEVCAqKhAIREVERURnTvfn3t27xSA6g+kOQ/ZkP/aec5NlBHXZSC7k/sE/AhUwoVkDPQ58/2RUQ2IC6B1XpN7MV8tg62/pUdjSDO7OwR2J0pbekpqZYlMG50bNSGwBDQ4pyV5YtCZ7mqZf1mO2IN2Jynba0XRx49pThjQCbEKWFfVRpIlBzlK4PuLdpxEWlTr4LHvYMEDOaTYS3HCW3DAJt8mmaSXYchZbOfEzkyYGZRbrEbX8qe7GMpLqFeyxV9F4fon1pwcxjxbqJpJTBPBJLoyHYSz1I3xq78aOMssepHZZHFjKhbX9/AZd6e9bsdABeyHTQXiE2PLO6PugCwiP/r1QVLYSlpXwKE1Wno7b7jY+hoWj0aegPyA9+jPrzgqwZJ0j8hhMVtElmDoD19FFPAvamc+sOXBm+KdYEzC63p/9D7Tr72kj/8qjAAAAAElFTkSuQmCC',
'X' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QHi/G9n7kAAAAB3RJTUUH0wUOEDIXAsROpAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAT9JREFUeNpj/M9AHGAiUt3IVhjKCAFr4RJroSKBMIH/YPBEAMITeQLh//8gAxHggQlAFf6fAdXnA+WnQPkT/qMp/O8AlVkA5h2A8kz+YCi8wQGREngA5PxQgXBYzvzHUPi/A2qIA5BdAmUX/Mei8I8BVHbK/wssEJbMB2wK/5+ASvPcgGlZ8x+rQriFAmghgKHwiwJKXPA8wKXw/x4UhT3/cSr8n4CkzuAPHoVvRODqWE6gyPxHTT1ffiAUCjCgAhRtDkgSFnisnoJixAScCh/wEBk8DmiucsChcA5MQQSMMQWrQlgiZ0iAByey5QiFPlBZnS//v+hgxjZc4QKYKVeAnCswby3AUAi3eAGKNoEn6Ap94A5EjXUfNIUrEA6EALgzl6AohCUGsAMhAOZMkTfICkMw3I5wZgiEyzicimYAFRFkVwgDfJ0AAAAASUVORK5CYII=',
'Y' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QHjkyIsu1AAAAB3RJTUUH0wUOEDIkvRQvsgAAAAlwSFlzAAALEgAACxIB0t1+/AAAANJJREFUeNrt1L0NgzAQBWAcUVB6AAZgBAoKhmAICoZgCAoKxmAECkbwABSUlBRILwF8duwYhFJEihJ37+6T5T9g8K6N20X3FdDDNjKKOeTIqZLtWcKBU73bCx1lPhgQNTWieY1zRLmGCZFQp1xTSSmBDUUgW754BF+GQLxAPUkMxMb0FlzUsqpKLXhxQPRqo+oIerggCvuMC7jhFJounA4gWhO2OIL6Jp/uzglHrh0fTyAaDRucQaTkUpxDQVBYDWZ/hYze6bsv/A8/DNlP/kgvwzuer4kCMGPZDgAAAABJRU5ErkJggg==',
'Z' => 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAAAAACpleexAAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfTBQ4QHwfqWOdfAAAAB3RJTUUH0wUOEDIrLasyIwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAL5JREFUeNrl1C0OwkAQBWCWQIJEVPQIFT0GAlHBMRBIBKIHqahAIDlERY9R0UOs3ORh5qVLunmp5GfUZvczbzKzDqtltV7ofgtueHCp16h33xBGwn0KYqoTO/J868Csaj418e0cPujOkLDfmTsECcfcXOGhoC/NZQMUDBUDd5DwxiAtJGzprpCw48xVQcIhM1d6KOgLc/kIBcORgXtIeGGQOyRs6Oq0g7P92YbkRE7bRZhcwhh+6nLF5f7yx30B8Z7FgxzMWtEAAAAASUVORK5CYII=',
);
 
return $_png;
}
 
?>
/Forum/includes/usercp_email.php
0,0 → 1,210
<?php
/***************************************************************************
* usercp_email.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: usercp_email.php,v 1.7.2.13 2003/06/06 18:02:15 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
 
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
exit;
}
 
// Is send through board enabled? No, return to index
if (!$board_config['board_email_form'])
{
redirect(append_sid("index.$phpEx", true));
}
 
if ( !empty($HTTP_GET_VARS[POST_USERS_URL]) || !empty($HTTP_POST_VARS[POST_USERS_URL]) )
{
$user_id = ( !empty($HTTP_GET_VARS[POST_USERS_URL]) ) ? intval($HTTP_GET_VARS[POST_USERS_URL]) : intval($HTTP_POST_VARS[POST_USERS_URL]);
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_user_specified']);
}
 
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=email&" . POST_USERS_URL . "=$user_id", true));
}
 
$sql = "SELECT username, user_email, user_viewemail, user_lang
FROM " . USERS_TABLE . "
WHERE user_id = $user_id";
if ( $result = $db->sql_query($sql) )
{
$row = $db->sql_fetchrow($result);
 
$username = $row['username'];
$user_email = $row['user_email'];
$user_lang = $row['user_lang'];
 
if ( $row['user_viewemail'] || $userdata['user_level'] == ADMIN )
{
if ( time() - $userdata['user_emailtime'] < $board_config['flood_interval'] )
{
message_die(GENERAL_MESSAGE, $lang['Flood_email_limit']);
}
 
if ( isset($HTTP_POST_VARS['submit']) )
{
$error = FALSE;
 
if ( !empty($HTTP_POST_VARS['subject']) )
{
$subject = trim(stripslashes($HTTP_POST_VARS['subject']));
}
else
{
$error = TRUE;
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $lang['Empty_subject_email'] : $lang['Empty_subject_email'];
}
 
if ( !empty($HTTP_POST_VARS['message']) )
{
$message = trim(stripslashes($HTTP_POST_VARS['message']));
}
else
{
$error = TRUE;
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $lang['Empty_message_email'] : $lang['Empty_message_email'];
}
 
if ( !$error )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_emailtime = " . time() . "
WHERE user_id = " . $userdata['user_id'];
if ( $result = $db->sql_query($sql) )
{
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
 
$emailer->from($userdata['user_email']);
$emailer->replyto($userdata['user_email']);
 
$email_headers = 'X-AntiAbuse: Board servername - ' . $server_name . "\n";
$email_headers .= 'X-AntiAbuse: User_id - ' . $userdata['user_id'] . "\n";
$email_headers .= 'X-AntiAbuse: Username - ' . $userdata['username'] . "\n";
$email_headers .= 'X-AntiAbuse: User IP - ' . decode_ip($user_ip) . "\n";
 
$emailer->use_template('profile_send_email', $user_lang);
$emailer->email_address($user_email);
$emailer->set_subject($subject);
$emailer->extra_headers($email_headers);
 
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'BOARD_EMAIL' => $board_config['board_email'],
'FROM_USERNAME' => $userdata['username'],
'TO_USERNAME' => $username,
'MESSAGE' => $message)
);
$emailer->send();
$emailer->reset();
 
if ( !empty($HTTP_POST_VARS['cc_email']) )
{
$emailer->from($userdata['user_email']);
$emailer->replyto($userdata['user_email']);
$emailer->use_template('profile_send_email');
$emailer->email_address($userdata['user_email']);
$emailer->set_subject($subject);
 
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'BOARD_EMAIL' => $board_config['board_email'],
'FROM_USERNAME' => $userdata['username'],
'TO_USERNAME' => $username,
'MESSAGE' => $message)
);
$emailer->send();
$emailer->reset();
}
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="5;url=' . append_sid("index.$phpEx") . '">')
);
 
$message = $lang['Email_sent'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
}
else
{
message_die(GENERAL_ERROR, 'Could not update last email time', '', __LINE__, __FILE__, $sql);
}
}
}
 
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'body' => 'profile_send_email.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
 
if ( $error )
{
$template->set_filenames(array(
'reg_header' => 'error_body.tpl')
);
$template->assign_vars(array(
'ERROR_MESSAGE' => $error_msg)
);
$template->assign_var_from_handle('ERROR_BOX', 'reg_header');
}
 
$template->assign_vars(array(
'USERNAME' => $username,
 
'S_HIDDEN_FIELDS' => '',
'S_POST_ACTION' => append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL . "=$user_id"),
 
'L_SEND_EMAIL_MSG' => $lang['Send_email_msg'],
'L_RECIPIENT' => $lang['Recipient'],
'L_SUBJECT' => $lang['Subject'],
'L_MESSAGE_BODY' => $lang['Message_body'],
'L_MESSAGE_BODY_DESC' => $lang['Email_message_desc'],
'L_EMPTY_SUBJECT_EMAIL' => $lang['Empty_subject_email'],
'L_EMPTY_MESSAGE_EMAIL' => $lang['Empty_message_email'],
'L_OPTIONS' => $lang['Options'],
'L_CC_EMAIL' => $lang['CC_email'],
'L_SPELLCHECK' => $lang['Spellcheck'],
'L_SEND_EMAIL' => $lang['Send_email'])
);
 
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
else
{
message_die(GENERAL_MESSAGE, $lang['User_prevent_email']);
}
}
else
{
message_die(GENERAL_MESSAGE, $lang['User_not_exist']);
}
 
?>
/Forum/includes/usercp_register.php
0,0 → 1,1171
<?php
/***************************************************************************
* usercp_register.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: usercp_register.php,v 1.20.2.76 2006/05/30 19:29:43 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
 
/*
 
This code has been modified from its original form by psoTFX @ phpbb.com
Changes introduce the back-ported phpBB 2.2 visual confirmation code.
 
NOTE: Anyone using the modified code contained within this script MUST include
a relevant message such as this in usercp_register.php ... failure to do so
will affect a breach of Section 2a of the GPL and our copyright
 
png visual confirmation system : (c) phpBB Group, 2003 : All Rights Reserved
 
*/
 
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
exit;
}
 
$unhtml_specialchars_match = array('#&gt;#', '#&lt;#', '#&quot;#', '#&amp;#');
$unhtml_specialchars_replace = array('>', '<', '"', '&');
 
// ---------------------------------------
// Load agreement template since user has not yet
// agreed to registration conditions/coppa
//
function show_coppa()
{
global $userdata, $template, $lang, $phpbb_root_path, $phpEx;
 
$template->set_filenames(array(
'body' => 'agreement.tpl')
);
 
$template->assign_vars(array(
'REGISTRATION' => $lang['Registration'],
'AGREEMENT' => $lang['Reg_agreement'],
"AGREE_OVER_13" => $lang['Agree_over_13'],
"AGREE_UNDER_13" => $lang['Agree_under_13'],
'DO_NOT_AGREE' => $lang['Agree_not'],
 
"U_AGREE_OVER13" => append_sid("profile.$phpEx?mode=register&amp;agreed=true"),
"U_AGREE_UNDER13" => append_sid("profile.$phpEx?mode=register&amp;agreed=true&amp;coppa=true"))
);
 
$template->pparse('body');
 
}
//
// ---------------------------------------
 
$error = FALSE;
$error_msg = '';
$page_title = ( $mode == 'editprofile' ) ? $lang['Edit_profile'] : $lang['Register'];
 
if ( $mode == 'register' && !isset($HTTP_POST_VARS['agreed']) && !isset($HTTP_GET_VARS['agreed']) )
{
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
show_coppa();
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
 
$coppa = ( empty($HTTP_POST_VARS['coppa']) && empty($HTTP_GET_VARS['coppa']) ) ? 0 : TRUE;
 
//
// Check and initialize some variables if needed
//
if (
isset($HTTP_POST_VARS['submit']) ||
isset($HTTP_POST_VARS['avatargallery']) ||
isset($HTTP_POST_VARS['submitavatar']) ||
isset($HTTP_POST_VARS['cancelavatar']) ||
$mode == 'register' )
{
include($phpbb_root_path . 'includes/functions_validate.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);
 
if ( $mode == 'editprofile' )
{
$user_id = intval($HTTP_POST_VARS['user_id']);
$current_email = trim(htmlspecialchars($HTTP_POST_VARS['current_email']));
}
 
$strip_var_list = array('email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests', 'confirm_code' => 'confirm_code');
 
// Strip all tags from data ... may p**s some people off, bah, strip_tags is
// doing the job but can still break HTML output ... have no choice, have
// to use htmlspecialchars ... be prepared to be moaned at.
while( list($var, $param) = @each($strip_var_list) )
{
if ( !empty($HTTP_POST_VARS[$param]) )
{
$$var = trim(htmlspecialchars($HTTP_POST_VARS[$param]));
}
}
 
$username = ( !empty($HTTP_POST_VARS['username']) ) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
 
$trim_var_list = array('cur_password' => 'cur_password', 'new_password' => 'new_password', 'password_confirm' => 'password_confirm', 'signature' => 'signature');
 
while( list($var, $param) = @each($trim_var_list) )
{
if ( !empty($HTTP_POST_VARS[$param]) )
{
$$var = trim($HTTP_POST_VARS[$param]);
}
}
 
$signature = (isset($signature)) ? str_replace('<br />', "\n", $signature) : '';
$signature_bbcode_uid = '';
 
// Run some validation on the optional fields. These are pass-by-ref, so they'll be changed to
// empty strings if they fail.
validate_optional_fields($icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature);
 
$viewemail = ( isset($HTTP_POST_VARS['viewemail']) ) ? ( ($HTTP_POST_VARS['viewemail']) ? TRUE : 0 ) : 0;
$allowviewonline = ( isset($HTTP_POST_VARS['hideonline']) ) ? ( ($HTTP_POST_VARS['hideonline']) ? 0 : TRUE ) : TRUE;
$notifyreply = ( isset($HTTP_POST_VARS['notifyreply']) ) ? ( ($HTTP_POST_VARS['notifyreply']) ? TRUE : 0 ) : 0;
$notifypm = ( isset($HTTP_POST_VARS['notifypm']) ) ? ( ($HTTP_POST_VARS['notifypm']) ? TRUE : 0 ) : TRUE;
$popup_pm = ( isset($HTTP_POST_VARS['popup_pm']) ) ? ( ($HTTP_POST_VARS['popup_pm']) ? TRUE : 0 ) : TRUE;
 
if ( $mode == 'register' )
{
$attachsig = ( isset($HTTP_POST_VARS['attachsig']) ) ? ( ($HTTP_POST_VARS['attachsig']) ? TRUE : 0 ) : $board_config['allow_sig'];
 
$allowhtml = ( isset($HTTP_POST_VARS['allowhtml']) ) ? ( ($HTTP_POST_VARS['allowhtml']) ? TRUE : 0 ) : $board_config['allow_html'];
$allowbbcode = ( isset($HTTP_POST_VARS['allowbbcode']) ) ? ( ($HTTP_POST_VARS['allowbbcode']) ? TRUE : 0 ) : $board_config['allow_bbcode'];
$allowsmilies = ( isset($HTTP_POST_VARS['allowsmilies']) ) ? ( ($HTTP_POST_VARS['allowsmilies']) ? TRUE : 0 ) : $board_config['allow_smilies'];
}
else
{
$attachsig = ( isset($HTTP_POST_VARS['attachsig']) ) ? ( ($HTTP_POST_VARS['attachsig']) ? TRUE : 0 ) : $userdata['user_attachsig'];
 
$allowhtml = ( isset($HTTP_POST_VARS['allowhtml']) ) ? ( ($HTTP_POST_VARS['allowhtml']) ? TRUE : 0 ) : $userdata['user_allowhtml'];
$allowbbcode = ( isset($HTTP_POST_VARS['allowbbcode']) ) ? ( ($HTTP_POST_VARS['allowbbcode']) ? TRUE : 0 ) : $userdata['user_allowbbcode'];
$allowsmilies = ( isset($HTTP_POST_VARS['allowsmilies']) ) ? ( ($HTTP_POST_VARS['allowsmilies']) ? TRUE : 0 ) : $userdata['user_allowsmile'];
}
 
$user_style = ( isset($HTTP_POST_VARS['style']) ) ? intval($HTTP_POST_VARS['style']) : $board_config['default_style'];
 
if ( !empty($HTTP_POST_VARS['language']) )
{
if ( preg_match('/^[a-z_]+$/i', $HTTP_POST_VARS['language']) )
{
$user_lang = htmlspecialchars($HTTP_POST_VARS['language']);
}
else
{
$error = true;
$error_msg = $lang['Fields_empty'];
}
}
else
{
$user_lang = $board_config['default_lang'];
}
 
$user_timezone = ( isset($HTTP_POST_VARS['timezone']) ) ? doubleval($HTTP_POST_VARS['timezone']) : $board_config['board_timezone'];
 
$sql = "SELECT config_value
FROM " . CONFIG_TABLE . "
WHERE config_name = 'default_dateformat'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select default dateformat', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$board_config['default_dateformat'] = $row['config_value'];
$user_dateformat = ( !empty($HTTP_POST_VARS['dateformat']) ) ? trim(htmlspecialchars($HTTP_POST_VARS['dateformat'])) : $board_config['default_dateformat'];
 
$user_avatar_local = ( isset($HTTP_POST_VARS['avatarselect']) && !empty($HTTP_POST_VARS['submitavatar']) && $board_config['allow_avatar_local'] ) ? htmlspecialchars($HTTP_POST_VARS['avatarselect']) : ( ( isset($HTTP_POST_VARS['avatarlocal']) ) ? htmlspecialchars($HTTP_POST_VARS['avatarlocal']) : '' );
$user_avatar_category = ( isset($HTTP_POST_VARS['avatarcatname']) && $board_config['allow_avatar_local'] ) ? htmlspecialchars($HTTP_POST_VARS['avatarcatname']) : '' ;
 
$user_avatar_remoteurl = ( !empty($HTTP_POST_VARS['avatarremoteurl']) ) ? trim(htmlspecialchars($HTTP_POST_VARS['avatarremoteurl'])) : '';
$user_avatar_upload = ( !empty($HTTP_POST_VARS['avatarurl']) ) ? trim($HTTP_POST_VARS['avatarurl']) : ( ( $HTTP_POST_FILES['avatar']['tmp_name'] != "none") ? $HTTP_POST_FILES['avatar']['tmp_name'] : '' );
$user_avatar_name = ( !empty($HTTP_POST_FILES['avatar']['name']) ) ? $HTTP_POST_FILES['avatar']['name'] : '';
$user_avatar_size = ( !empty($HTTP_POST_FILES['avatar']['size']) ) ? $HTTP_POST_FILES['avatar']['size'] : 0;
$user_avatar_filetype = ( !empty($HTTP_POST_FILES['avatar']['type']) ) ? $HTTP_POST_FILES['avatar']['type'] : '';
 
$user_avatar = ( empty($user_avatar_local) && $mode == 'editprofile' ) ? $userdata['user_avatar'] : '';
$user_avatar_type = ( empty($user_avatar_local) && $mode == 'editprofile' ) ? $userdata['user_avatar_type'] : '';
 
if ( (isset($HTTP_POST_VARS['avatargallery']) || isset($HTTP_POST_VARS['submitavatar']) || isset($HTTP_POST_VARS['cancelavatar'])) && (!isset($HTTP_POST_VARS['submit'])) )
{
$username = stripslashes($username);
$email = stripslashes($email);
$cur_password = htmlspecialchars(stripslashes($cur_password));
$new_password = htmlspecialchars(stripslashes($new_password));
$password_confirm = htmlspecialchars(stripslashes($password_confirm));
 
$icq = stripslashes($icq);
$aim = stripslashes($aim);
$msn = stripslashes($msn);
$yim = stripslashes($yim);
 
$website = stripslashes($website);
$location = stripslashes($location);
$occupation = stripslashes($occupation);
$interests = stripslashes($interests);
$signature = htmlspecialchars(stripslashes($signature));
 
$user_lang = stripslashes($user_lang);
$user_dateformat = stripslashes($user_dateformat);
 
if ( !isset($HTTP_POST_VARS['cancelavatar']))
{
$user_avatar = $user_avatar_category . '/' . $user_avatar_local;
$user_avatar_type = USER_AVATAR_GALLERY;
}
}
}
 
//
// Let's make sure the user isn't logged in while registering,
// and ensure that they were trying to register a second time
// (Prevents double registrations)
//
if ($mode == 'register' && ($userdata['session_logged_in'] || $username == $userdata['username']))
{
message_die(GENERAL_MESSAGE, $lang['Username_taken'], '', __LINE__, __FILE__);
}
 
//
// Did the user submit? In this case build a query to update the users profile in the DB
//
if ( isset($HTTP_POST_VARS['submit']) )
{
include($phpbb_root_path . 'includes/usercp_avatar.'.$phpEx);
 
$passwd_sql = '';
if ( $mode == 'editprofile' )
{
if ( $user_id != $userdata['user_id'] )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Wrong_Profile'];
}
}
else if ( $mode == 'register' )
{
if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email) )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
}
}
 
if ($board_config['enable_confirm'] && $mode == 'register')
{
if (empty($HTTP_POST_VARS['confirm_id']))
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
}
else
{
$confirm_id = htmlspecialchars($HTTP_POST_VARS['confirm_id']);
if (!preg_match('/^[A-Za-z0-9]+$/', $confirm_id))
{
$confirm_id = '';
}
$sql = 'SELECT code
FROM ' . CONFIRM_TABLE . "
WHERE confirm_id = '$confirm_id'
AND session_id = '" . $userdata['session_id'] . "'";
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not obtain confirmation code', __LINE__, __FILE__, $sql);
}
 
if ($row = $db->sql_fetchrow($result))
{
if ($row['code'] != $confirm_code)
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
}
else
{
$sql = 'DELETE FROM ' . CONFIRM_TABLE . "
WHERE confirm_id = '$confirm_id'
AND session_id = '" . $userdata['session_id'] . "'";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not delete confirmation code', __LINE__, __FILE__, $sql);
}
}
}
else
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
}
$db->sql_freeresult($result);
}
}
 
$passwd_sql = '';
if ( !empty($new_password) && !empty($password_confirm) )
{
if ( $new_password != $password_confirm )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
}
else if ( strlen($new_password) > 32 )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_long'];
}
else
{
if ( $mode == 'editprofile' )
{
$sql = "SELECT user_password
FROM " . USERS_TABLE . "
WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user_password information', '', __LINE__, __FILE__, $sql);
}
 
$row = $db->sql_fetchrow($result);
 
if ( $row['user_password'] != md5($cur_password) )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Current_password_mismatch'];
}
}
 
if ( !$error )
{
$new_password = md5($new_password);
$passwd_sql = "user_password = '$new_password', ";
}
}
}
else if ( ( empty($new_password) && !empty($password_confirm) ) || ( !empty($new_password) && empty($password_confirm) ) )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
}
 
//
// Do a ban check on this email address
//
if ( $email != $userdata['user_email'] || $mode == 'register' )
{
$result = validate_email($email);
if ( $result['error'] )
{
$email = $userdata['user_email'];
 
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $result['error_msg'];
}
 
if ( $mode == 'editprofile' )
{
$sql = "SELECT user_password
FROM " . USERS_TABLE . "
WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user_password information', '', __LINE__, __FILE__, $sql);
}
 
$row = $db->sql_fetchrow($result);
 
if ( $row['user_password'] != md5($cur_password) )
{
$email = $userdata['user_email'];
 
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Current_password_mismatch'];
}
}
}
 
$username_sql = '';
if ( $board_config['allow_namechange'] || $mode == 'register' )
{
if ( empty($username) )
{
// Error is already triggered, since one field is empty.
$error = TRUE;
}
else if ( $username != $userdata['username'] || $mode == 'register')
{
if (strtolower($username) != strtolower($userdata['username']) || $mode == 'register')
{
$result = validate_username($username);
if ( $result['error'] )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $result['error_msg'];
}
}
 
if (!$error)
{
$username_sql = "username = '" . str_replace("\'", "''", $username) . "', ";
}
}
}
 
if ( $signature != '' )
{
if ( strlen($signature) > $board_config['max_sig_chars'] )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Signature_too_long'];
}
 
if ( !isset($signature_bbcode_uid) || $signature_bbcode_uid == '' )
{
$signature_bbcode_uid = ( $allowbbcode ) ? make_bbcode_uid() : '';
}
$signature = prepare_message($signature, $allowhtml, $allowbbcode, $allowsmilies, $signature_bbcode_uid);
}
 
if ( $website != '' )
{
rawurlencode($website);
}
 
$avatar_sql = '';
 
if ( isset($HTTP_POST_VARS['avatardel']) && $mode == 'editprofile' )
{
$avatar_sql = user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']);
}
else
if ( ( !empty($user_avatar_upload) || !empty($user_avatar_name) ) && $board_config['allow_avatar_upload'] )
{
if ( !empty($user_avatar_upload) )
{
$avatar_mode = (empty($user_avatar_name)) ? 'remote' : 'local';
$avatar_sql = user_avatar_upload($mode, $avatar_mode, $userdata['user_avatar'], $userdata['user_avatar_type'], $error, $error_msg, $user_avatar_upload, $user_avatar_name, $user_avatar_size, $user_avatar_filetype);
}
else if ( !empty($user_avatar_name) )
{
$l_avatar_size = sprintf($lang['Avatar_filesize'], round($board_config['avatar_filesize'] / 1024));
 
$error = true;
$error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $l_avatar_size;
}
}
else if ( $user_avatar_remoteurl != '' && $board_config['allow_avatar_remote'] )
{
user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']);
$avatar_sql = user_avatar_url($mode, $error, $error_msg, $user_avatar_remoteurl);
}
else if ( $user_avatar_local != '' && $board_config['allow_avatar_local'] )
{
user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']);
$avatar_sql = user_avatar_gallery($mode, $error, $error_msg, $user_avatar_local, $user_avatar_category);
}
 
if ( !$error )
{
if ( $avatar_sql == '' )
{
$avatar_sql = ( $mode == 'editprofile' ) ? '' : "'', " . USER_AVATAR_NONE;
}
 
if ( $mode == 'editprofile' )
{
if ( $email != $userdata['user_email'] && $board_config['require_activation'] != USER_ACTIVATION_NONE && $userdata['user_level'] != ADMIN )
{
$user_active = 0;
 
$user_actkey = gen_rand_string(true);
$key_len = 54 - ( strlen($server_url) );
$key_len = ( $key_len > 6 ) ? $key_len : 6;
$user_actkey = substr($user_actkey, 0, $key_len);
 
if ( $userdata['session_logged_in'] )
{
session_end($userdata['session_id'], $userdata['user_id']);
}
}
else
{
$user_active = 1;
$user_actkey = '';
}
 
$sql = "UPDATE " . USERS_TABLE . "
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popup_pm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "
WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);
}
 
// We remove all stored login keys since the password has been updated
// and change the current one (if applicable)
if ( !empty($passwd_sql) )
{
session_reset_keys($user_id, $user_ip);
}
 
if ( !$user_active )
{
//
// The users account has been deactivated, send them an email with a new activation key
//
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
 
if ( $board_config['require_activation'] != USER_ACTIVATION_ADMIN )
{
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
$emailer->use_template('user_activate', stripslashes($user_lang));
$emailer->email_address($email);
$emailer->set_subject($lang['Reactivate']);
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)),
'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',
'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
);
$emailer->send();
$emailer->reset();
}
else if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN )
{
$sql = 'SELECT user_email, user_lang
FROM ' . USERS_TABLE . '
WHERE user_level = ' . ADMIN;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select Administrators', '', __LINE__, __FILE__, $sql);
}
while ($row = $db->sql_fetchrow($result))
{
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
$emailer->email_address(trim($row['user_email']));
$emailer->use_template("admin_activate", $row['user_lang']);
$emailer->set_subject($lang['Reactivate']);
$emailer->assign_vars(array(
'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)),
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
);
$emailer->send();
$emailer->reset();
}
$db->sql_freeresult($result);
}
 
$message = $lang['Profile_updated_inactive'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
}
else
{
$message = $lang['Profile_updated'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
}
 
$template->assign_vars(array(
"META" => '<meta http-equiv="refresh" content="5;url=' . append_sid("index.$phpEx") . '">')
);
 
message_die(GENERAL_MESSAGE, $message);
}
else
{
$sql = "SELECT MAX(user_id) AS total
FROM " . USERS_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain next user_id information', '', __LINE__, __FILE__, $sql);
}
 
if ( !($row = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_ERROR, 'Could not obtain next user_id information', '', __LINE__, __FILE__, $sql);
}
$user_id = $row['total'] + 1;
 
//
// Get current date
//
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
if ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa )
{
$user_actkey = gen_rand_string(true);
$key_len = 54 - (strlen($server_url));
$key_len = ( $key_len > 6 ) ? $key_len : 6;
$user_actkey = substr($user_actkey, 0, $key_len);
$sql .= "0, '" . str_replace("\'", "''", $user_actkey) . "')";
}
else
{
$sql .= "1, '')";
}
 
if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
{
message_die(GENERAL_ERROR, 'Could not insert data into users table', '', __LINE__, __FILE__, $sql);
}
 
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_name, group_description, group_single_user, group_moderator)
VALUES ('', 'Personal User', 1, 0)";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert data into groups table', '', __LINE__, __FILE__, $sql);
}
 
$group_id = $db->sql_nextid();
 
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending)
VALUES ($user_id, $group_id, 0)";
if( !($result = $db->sql_query($sql, END_TRANSACTION)) )
{
message_die(GENERAL_ERROR, 'Could not insert data into user_group table', '', __LINE__, __FILE__, $sql);
}
 
if ( $coppa )
{
$message = $lang['COPPA'];
$email_template = 'coppa_welcome_inactive';
}
else if ( $board_config['require_activation'] == USER_ACTIVATION_SELF )
{
$message = $lang['Account_inactive'];
$email_template = 'user_welcome_inactive';
}
else if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN )
{
$message = $lang['Account_inactive_admin'];
$email_template = 'admin_welcome_inactive';
}
else
{
$message = $lang['Account_added'];
$email_template = 'user_welcome';
}
 
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
 
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
 
$emailer->use_template($email_template, stripslashes($user_lang));
$emailer->email_address($email);
$emailer->set_subject(sprintf($lang['Welcome_subject'], $board_config['sitename']));
 
if( $coppa )
{
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'WELCOME_MSG' => sprintf($lang['Welcome_subject'], $board_config['sitename']),
'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)),
'PASSWORD' => $password_confirm,
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
 
'FAX_INFO' => $board_config['coppa_fax'],
'MAIL_INFO' => $board_config['coppa_mail'],
'EMAIL_ADDRESS' => $email,
'ICQ' => $icq,
'AIM' => $aim,
'YIM' => $yim,
'MSN' => $msn,
'WEB_SITE' => $website,
'FROM' => $location,
'OCC' => $occupation,
'INTERESTS' => $interests,
'SITENAME' => $board_config['sitename']));
}
else
{
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'WELCOME_MSG' => sprintf($lang['Welcome_subject'], $board_config['sitename']),
'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)),
'PASSWORD' => $password_confirm,
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
 
'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
);
}
 
$emailer->send();
$emailer->reset();
 
if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN )
{
$sql = "SELECT user_email, user_lang
FROM " . USERS_TABLE . "
WHERE user_level = " . ADMIN;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select Administrators', '', __LINE__, __FILE__, $sql);
}
while ($row = $db->sql_fetchrow($result))
{
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
$emailer->email_address(trim($row['user_email']));
$emailer->use_template("admin_activate", $row['user_lang']);
$emailer->set_subject($lang['New_account_subject']);
 
$emailer->assign_vars(array(
'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)),
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
 
'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
);
$emailer->send();
$emailer->reset();
}
$db->sql_freeresult($result);
}
 
$message = $message . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
} // if mode == register
}
} // End of submit
 
 
if ( $error )
{
//
// If an error occured we need to stripslashes on returned data
//
$username = stripslashes($username);
$email = stripslashes($email);
$cur_password = '';
$new_password = '';
$password_confirm = '';
 
$icq = stripslashes($icq);
$aim = str_replace('+', ' ', stripslashes($aim));
$msn = stripslashes($msn);
$yim = stripslashes($yim);
 
$website = stripslashes($website);
$location = stripslashes($location);
$occupation = stripslashes($occupation);
$interests = stripslashes($interests);
$signature = stripslashes($signature);
$signature = ($signature_bbcode_uid != '') ? preg_replace("/:(([a-z0-9]+:)?)$signature_bbcode_uid(=|\])/si", '\\3', $signature) : $signature;
 
$user_lang = stripslashes($user_lang);
$user_dateformat = stripslashes($user_dateformat);
 
}
else if ( $mode == 'editprofile' && !isset($HTTP_POST_VARS['avatargallery']) && !isset($HTTP_POST_VARS['submitavatar']) && !isset($HTTP_POST_VARS['cancelavatar']) )
{
$user_id = $userdata['user_id'];
$username = $userdata['username'];
$email = $userdata['user_email'];
$cur_password = '';
$new_password = '';
$password_confirm = '';
 
$icq = $userdata['user_icq'];
$aim = str_replace('+', ' ', $userdata['user_aim']);
$msn = $userdata['user_msnm'];
$yim = $userdata['user_yim'];
 
$website = $userdata['user_website'];
$location = $userdata['user_from'];
$occupation = $userdata['user_occ'];
$interests = $userdata['user_interests'];
$signature_bbcode_uid = $userdata['user_sig_bbcode_uid'];
$signature = ($signature_bbcode_uid != '') ? preg_replace("/:(([a-z0-9]+:)?)$signature_bbcode_uid(=|\])/si", '\\3', $userdata['user_sig']) : $userdata['user_sig'];
 
$viewemail = $userdata['user_viewemail'];
$notifypm = $userdata['user_notify_pm'];
$popup_pm = $userdata['user_popup_pm'];
$notifyreply = $userdata['user_notify'];
$attachsig = $userdata['user_attachsig'];
$allowhtml = $userdata['user_allowhtml'];
$allowbbcode = $userdata['user_allowbbcode'];
$allowsmilies = $userdata['user_allowsmile'];
$allowviewonline = $userdata['user_allow_viewonline'];
 
$user_avatar = ( $userdata['user_allowavatar'] ) ? $userdata['user_avatar'] : '';
$user_avatar_type = ( $userdata['user_allowavatar'] ) ? $userdata['user_avatar_type'] : USER_AVATAR_NONE;
 
$user_style = $userdata['user_style'];
$user_lang = $userdata['user_lang'];
$user_timezone = $userdata['user_timezone'];
$user_dateformat = $userdata['user_dateformat'];
}
 
//
// Default pages
//
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
make_jumpbox('viewforum.'.$phpEx);
 
if ( $mode == 'editprofile' )
{
if ( $user_id != $userdata['user_id'] )
{
$error = TRUE;
$error_msg = $lang['Wrong_Profile'];
}
}
 
if( isset($HTTP_POST_VARS['avatargallery']) && !$error )
{
include($phpbb_root_path . 'includes/usercp_avatar.'.$phpEx);
 
$avatar_category = ( !empty($HTTP_POST_VARS['avatarcategory']) ) ? htmlspecialchars($HTTP_POST_VARS['avatarcategory']) : '';
 
$template->set_filenames(array(
'body' => 'profile_avatar_gallery.tpl')
);
 
$allowviewonline = !$allowviewonline;
 
display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, $new_password, $cur_password, $password_confirm, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popup_pm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']);
}
else
{
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
 
if ( !isset($coppa) )
{
$coppa = FALSE;
}
 
if ( !isset($user_style) )
{
$user_style = $board_config['default_style'];
}
 
$avatar_img = '';
if ( $user_avatar_type )
{
switch( $user_avatar_type )
{
case USER_AVATAR_UPLOAD:
$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $user_avatar . '" alt="" />' : '';
break;
case USER_AVATAR_REMOTE:
$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $user_avatar . '" alt="" />' : '';
break;
case USER_AVATAR_GALLERY:
$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $user_avatar . '" alt="" />' : '';
break;
}
}
 
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
if( $mode == 'editprofile' )
{
$s_hidden_fields .= '<input type="hidden" name="user_id" value="' . $userdata['user_id'] . '" />';
//
// Send the users current email address. If they change it, and account activation is turned on
// the user account will be disabled and the user will have to reactivate their account.
//
$s_hidden_fields .= '<input type="hidden" name="current_email" value="' . $userdata['user_email'] . '" />';
}
 
if ( !empty($user_avatar_local) )
{
$s_hidden_fields .= '<input type="hidden" name="avatarlocal" value="' . $user_avatar_local . '" /><input type="hidden" name="avatarcatname" value="' . $user_avatar_category . '" />';
}
 
$html_status = ( $userdata['user_allowhtml'] && $board_config['allow_html'] ) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF'];
$bbcode_status = ( $userdata['user_allowbbcode'] && $board_config['allow_bbcode'] ) ? $lang['BBCode_is_ON'] : $lang['BBCode_is_OFF'];
$smilies_status = ( $userdata['user_allowsmile'] && $board_config['allow_smilies'] ) ? $lang['Smilies_are_ON'] : $lang['Smilies_are_OFF'];
 
if ( $error )
{
$template->set_filenames(array(
'reg_header' => 'error_body.tpl')
);
$template->assign_vars(array(
'ERROR_MESSAGE' => $error_msg)
);
$template->assign_var_from_handle('ERROR_BOX', 'reg_header');
}
 
$template->set_filenames(array(
'body' => 'profile_add_body.tpl')
);
 
if ( $mode == 'editprofile' )
{
$template->assign_block_vars('switch_edit_profile', array());
}
 
if ( ($mode == 'register') || ($board_config['allow_namechange']) )
{
$template->assign_block_vars('switch_namechange_allowed', array());
}
else
{
$template->assign_block_vars('switch_namechange_disallowed', array());
}
 
 
// Visual Confirmation
$confirm_image = '';
if (!empty($board_config['enable_confirm']) && $mode == 'register')
{
$sql = 'SELECT session_id
FROM ' . SESSIONS_TABLE;
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not select session data', '', __LINE__, __FILE__, $sql);
}
 
if ($row = $db->sql_fetchrow($result))
{
$confirm_sql = '';
do
{
$confirm_sql .= (($confirm_sql != '') ? ', ' : '') . "'" . $row['session_id'] . "'";
}
while ($row = $db->sql_fetchrow($result));
$sql = 'DELETE FROM ' . CONFIRM_TABLE . "
WHERE session_id NOT IN ($confirm_sql)";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not delete stale confirm data', '', __LINE__, __FILE__, $sql);
}
}
$db->sql_freeresult($result);
 
$sql = 'SELECT COUNT(session_id) AS attempts
FROM ' . CONFIRM_TABLE . "
WHERE session_id = '" . $userdata['session_id'] . "'";
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not obtain confirm code count', '', __LINE__, __FILE__, $sql);
}
 
if ($row = $db->sql_fetchrow($result))
{
if ($row['attempts'] > 3)
{
message_die(GENERAL_MESSAGE, $lang['Too_many_registers']);
}
}
$db->sql_freeresult($result);
// Generate the required confirmation code
// NB 0 (zero) could get confused with O (the letter) so we make change it
$code = dss_rand();
$code = substr(str_replace('0', 'Z', strtoupper(base_convert($code, 16, 35))), 2, 6);
 
$confirm_id = md5(uniqid($user_ip));
 
$sql = 'INSERT INTO ' . CONFIRM_TABLE . " (confirm_id, session_id, code)
VALUES ('$confirm_id', '". $userdata['session_id'] . "', '$code')";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not insert new confirm code information', '', __LINE__, __FILE__, $sql);
}
 
unset($code);
$confirm_image = '<img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id") . '" alt="" title="" />';
$s_hidden_fields .= '<input type="hidden" name="confirm_id" value="' . $confirm_id . '" />';
 
$template->assign_block_vars('switch_confirm', array());
}
 
 
//
// Let's do an overall check for settings/versions which would prevent
// us from doing file uploads....
//
$ini_val = ( phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var';
$form_enctype = ( @$ini_val('file_uploads') == '0' || strtolower(@$ini_val('file_uploads') == 'off') || phpversion() == '4.0.4pl1' || !$board_config['allow_avatar_upload'] || ( phpversion() < '4.0.3' && @$ini_val('open_basedir') != '' ) ) ? '' : 'enctype="multipart/form-data"';
 
$template->assign_vars(array(
'USERNAME' => isset($username) ? $username : '',
'CUR_PASSWORD' => isset($cur_password) ? $cur_password : '',
'NEW_PASSWORD' => isset($new_password) ? $new_password : '',
'PASSWORD_CONFIRM' => isset($password_confirm) ? $password_confirm : '',
'EMAIL' => isset($email) ? $email : '',
'CONFIRM_IMG' => $confirm_image,
'YIM' => $yim,
'ICQ' => $icq,
'MSN' => $msn,
'AIM' => $aim,
'OCCUPATION' => $occupation,
'INTERESTS' => $interests,
'LOCATION' => $location,
'WEBSITE' => $website,
'SIGNATURE' => str_replace('<br />', "\n", $signature),
'VIEW_EMAIL_YES' => ( $viewemail ) ? 'checked="checked"' : '',
'VIEW_EMAIL_NO' => ( !$viewemail ) ? 'checked="checked"' : '',
'HIDE_USER_YES' => ( !$allowviewonline ) ? 'checked="checked"' : '',
'HIDE_USER_NO' => ( $allowviewonline ) ? 'checked="checked"' : '',
'NOTIFY_PM_YES' => ( $notifypm ) ? 'checked="checked"' : '',
'NOTIFY_PM_NO' => ( !$notifypm ) ? 'checked="checked"' : '',
'POPUP_PM_YES' => ( $popup_pm ) ? 'checked="checked"' : '',
'POPUP_PM_NO' => ( !$popup_pm ) ? 'checked="checked"' : '',
'ALWAYS_ADD_SIGNATURE_YES' => ( $attachsig ) ? 'checked="checked"' : '',
'ALWAYS_ADD_SIGNATURE_NO' => ( !$attachsig ) ? 'checked="checked"' : '',
'NOTIFY_REPLY_YES' => ( $notifyreply ) ? 'checked="checked"' : '',
'NOTIFY_REPLY_NO' => ( !$notifyreply ) ? 'checked="checked"' : '',
'ALWAYS_ALLOW_BBCODE_YES' => ( $allowbbcode ) ? 'checked="checked"' : '',
'ALWAYS_ALLOW_BBCODE_NO' => ( !$allowbbcode ) ? 'checked="checked"' : '',
'ALWAYS_ALLOW_HTML_YES' => ( $allowhtml ) ? 'checked="checked"' : '',
'ALWAYS_ALLOW_HTML_NO' => ( !$allowhtml ) ? 'checked="checked"' : '',
'ALWAYS_ALLOW_SMILIES_YES' => ( $allowsmilies ) ? 'checked="checked"' : '',
'ALWAYS_ALLOW_SMILIES_NO' => ( !$allowsmilies ) ? 'checked="checked"' : '',
'ALLOW_AVATAR' => $board_config['allow_avatar_upload'],
'AVATAR' => $avatar_img,
'AVATAR_SIZE' => $board_config['avatar_filesize'],
'LANGUAGE_SELECT' => language_select($user_lang, 'language'),
'STYLE_SELECT' => style_select($user_style, 'style'),
'TIMEZONE_SELECT' => tz_select($user_timezone, 'timezone'),
'DATE_FORMAT' => $user_dateformat,
'HTML_STATUS' => $html_status,
'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="' . append_sid("faq.$phpEx?mode=bbcode") . '" target="_phpbbcode">', '</a>'),
'SMILIES_STATUS' => $smilies_status,
 
'L_CURRENT_PASSWORD' => $lang['Current_password'],
'L_NEW_PASSWORD' => ( $mode == 'register' ) ? $lang['Password'] : $lang['New_password'],
'L_CONFIRM_PASSWORD' => $lang['Confirm_password'],
'L_CONFIRM_PASSWORD_EXPLAIN' => ( $mode == 'editprofile' ) ? $lang['Confirm_password_explain'] : '',
'L_PASSWORD_IF_CHANGED' => ( $mode == 'editprofile' ) ? $lang['password_if_changed'] : '',
'L_PASSWORD_CONFIRM_IF_CHANGED' => ( $mode == 'editprofile' ) ? $lang['password_confirm_if_changed'] : '',
'L_SUBMIT' => $lang['Submit'],
'L_RESET' => $lang['Reset'],
'L_ICQ_NUMBER' => $lang['ICQ'],
'L_MESSENGER' => $lang['MSNM'],
'L_YAHOO' => $lang['YIM'],
'L_WEBSITE' => $lang['Website'],
'L_AIM' => $lang['AIM'],
'L_LOCATION' => $lang['Location'],
'L_OCCUPATION' => $lang['Occupation'],
'L_BOARD_LANGUAGE' => $lang['Board_lang'],
'L_BOARD_STYLE' => $lang['Board_style'],
'L_TIMEZONE' => $lang['Timezone'],
'L_DATE_FORMAT' => $lang['Date_format'],
'L_DATE_FORMAT_EXPLAIN' => $lang['Date_format_explain'],
'L_YES' => $lang['Yes'],
'L_NO' => $lang['No'],
'L_INTERESTS' => $lang['Interests'],
'L_ALWAYS_ALLOW_SMILIES' => $lang['Always_smile'],
'L_ALWAYS_ALLOW_BBCODE' => $lang['Always_bbcode'],
'L_ALWAYS_ALLOW_HTML' => $lang['Always_html'],
'L_HIDE_USER' => $lang['Hide_user'],
'L_ALWAYS_ADD_SIGNATURE' => $lang['Always_add_sig'],
 
'L_AVATAR_PANEL' => $lang['Avatar_panel'],
'L_AVATAR_EXPLAIN' => sprintf($lang['Avatar_explain'], $board_config['avatar_max_width'], $board_config['avatar_max_height'], (round($board_config['avatar_filesize'] / 1024))),
'L_UPLOAD_AVATAR_FILE' => $lang['Upload_Avatar_file'],
'L_UPLOAD_AVATAR_URL' => $lang['Upload_Avatar_URL'],
'L_UPLOAD_AVATAR_URL_EXPLAIN' => $lang['Upload_Avatar_URL_explain'],
'L_AVATAR_GALLERY' => $lang['Select_from_gallery'],
'L_SHOW_GALLERY' => $lang['View_avatar_gallery'],
'L_LINK_REMOTE_AVATAR' => $lang['Link_remote_Avatar'],
'L_LINK_REMOTE_AVATAR_EXPLAIN' => $lang['Link_remote_Avatar_explain'],
'L_DELETE_AVATAR' => $lang['Delete_Image'],
'L_CURRENT_IMAGE' => $lang['Current_Image'],
 
'L_SIGNATURE' => $lang['Signature'],
'L_SIGNATURE_EXPLAIN' => sprintf($lang['Signature_explain'], $board_config['max_sig_chars']),
'L_NOTIFY_ON_REPLY' => $lang['Always_notify'],
'L_NOTIFY_ON_REPLY_EXPLAIN' => $lang['Always_notify_explain'],
'L_NOTIFY_ON_PRIVMSG' => $lang['Notify_on_privmsg'],
'L_POPUP_ON_PRIVMSG' => $lang['Popup_on_privmsg'],
'L_POPUP_ON_PRIVMSG_EXPLAIN' => $lang['Popup_on_privmsg_explain'],
'L_PREFERENCES' => $lang['Preferences'],
'L_PUBLIC_VIEW_EMAIL' => $lang['Public_view_email'],
'L_ITEMS_REQUIRED' => $lang['Items_required'],
'L_REGISTRATION_INFO' => $lang['Registration_info'],
'L_PROFILE_INFO' => $lang['Profile_info'],
'L_PROFILE_INFO_NOTICE' => $lang['Profile_info_warn'],
'L_EMAIL_ADDRESS' => $lang['Email_address'],
 
'L_CONFIRM_CODE_IMPAIRED' => sprintf($lang['Confirm_code_impaired'], '<a href="mailto:' . $board_config['board_email'] . '">', '</a>'),
'L_CONFIRM_CODE' => $lang['Confirm_code'],
'L_CONFIRM_CODE_EXPLAIN' => $lang['Confirm_code_explain'],
 
'S_ALLOW_AVATAR_UPLOAD' => $board_config['allow_avatar_upload'],
'S_ALLOW_AVATAR_LOCAL' => $board_config['allow_avatar_local'],
'S_ALLOW_AVATAR_REMOTE' => $board_config['allow_avatar_remote'],
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_FORM_ENCTYPE' => $form_enctype,
'S_PROFILE_ACTION' => append_sid("profile.$phpEx"))
);
 
//
// This is another cheat using the block_var capability
// of the templates to 'fake' an IF...ELSE...ENDIF solution
// it works well :)
//
if ( $mode != 'register' )
{
if ( $userdata['user_allowavatar'] && ( $board_config['allow_avatar_upload'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] ) )
{
$template->assign_block_vars('switch_avatar_block', array() );
 
if ( $board_config['allow_avatar_upload'] && file_exists(@phpbb_realpath('./' . $board_config['avatar_path'])) )
{
if ( $form_enctype != '' )
{
$template->assign_block_vars('switch_avatar_block.switch_avatar_local_upload', array() );
}
$template->assign_block_vars('switch_avatar_block.switch_avatar_remote_upload', array() );
}
 
if ( $board_config['allow_avatar_remote'] )
{
$template->assign_block_vars('switch_avatar_block.switch_avatar_remote_link', array() );
}
 
if ( $board_config['allow_avatar_local'] && file_exists(@phpbb_realpath('./' . $board_config['avatar_gallery_path'])) )
{
$template->assign_block_vars('switch_avatar_block.switch_avatar_local_gallery', array() );
}
}
}
}
 
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
?>
/Forum/includes/usercp_sendpasswd.php
0,0 → 1,138
<?php
/***************************************************************************
* usercp_sendpasswd.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: usercp_sendpasswd.php,v 1.6.2.13 2005/09/14 18:14:30 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
 
if ( !defined('IN_PHPBB') )
{
die('Hacking attempt');
exit;
}
 
if ( isset($HTTP_POST_VARS['submit']) )
{
$username = ( !empty($HTTP_POST_VARS['username']) ) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
$email = ( !empty($HTTP_POST_VARS['email']) ) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['email']))) : '';
 
$sql = "SELECT user_id, username, user_email, user_active, user_lang
FROM " . USERS_TABLE . "
WHERE user_email = '" . str_replace("\'", "''", $email) . "'
AND username = '" . str_replace("\'", "''", $username) . "'";
if ( $result = $db->sql_query($sql) )
{
if ( $row = $db->sql_fetchrow($result) )
{
if ( !$row['user_active'] )
{
message_die(GENERAL_MESSAGE, $lang['No_send_account_inactive']);
}
 
$username = $row['username'];
$user_id = $row['user_id'];
 
$user_actkey = gen_rand_string(true);
$key_len = 54 - strlen($server_url);
$key_len = ($key_len > 6) ? $key_len : 6;
$user_actkey = substr($user_actkey, 0, $key_len);
$user_password = gen_rand_string(false);
$sql = "UPDATE " . USERS_TABLE . "
SET user_newpasswd = '" . md5($user_password) . "', user_actkey = '$user_actkey'
WHERE user_id = " . $row['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update new password information', '', __LINE__, __FILE__, $sql);
}
 
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
 
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
 
$emailer->use_template('user_activate_passwd', $row['user_lang']);
$emailer->email_address($row['user_email']);
$emailer->set_subject($lang['New_password_activation']);
 
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'USERNAME' => $username,
'PASSWORD' => $user_password,
'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',
 
'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
);
$emailer->send();
$emailer->reset();
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="15;url=' . append_sid("index.$phpEx") . '">')
);
 
$message = $lang['Password_updated'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_email_match']);
}
}
else
{
message_die(GENERAL_ERROR, 'Could not obtain user information for sendpassword', '', __LINE__, __FILE__, $sql);
}
}
else
{
$username = '';
$email = '';
}
 
//
// Output basic page
//
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'body' => 'profile_send_pass.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
 
$template->assign_vars(array(
'USERNAME' => $username,
'EMAIL' => $email,
 
'L_SEND_PASSWORD' => $lang['Send_password'],
'L_ITEMS_REQUIRED' => $lang['Items_required'],
'L_EMAIL_ADDRESS' => $lang['Email_address'],
'L_SUBMIT' => $lang['Submit'],
'L_RESET' => $lang['Reset'],
'S_HIDDEN_FIELDS' => '',
'S_PROFILE_ACTION' => append_sid("profile.$phpEx?mode=sendpassword"))
);
 
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
?>
/Forum/includes/usercp_viewprofile.php
0,0 → 1,249
<?php
/***************************************************************************
* usercp_viewprofile.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: usercp_viewprofile.php,v 1.5.2.6 2005/09/14 18:14:30 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
 
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
exit;
}
 
if ( empty($HTTP_GET_VARS[POST_USERS_URL]) || $HTTP_GET_VARS[POST_USERS_URL] == ANONYMOUS )
{
message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
}
$profiledata = get_userdata($HTTP_GET_VARS[POST_USERS_URL]);
 
if (!$profiledata)
{
message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
}
 
$sql = "SELECT *
FROM " . RANKS_TABLE . "
ORDER BY rank_special, rank_min";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain ranks information', '', __LINE__, __FILE__, $sql);
}
 
$ranksrow = array();
while ( $row = $db->sql_fetchrow($result) )
{
$ranksrow[] = $row;
}
$db->sql_freeresult($result);
 
//
// Output page header and profile_view template
//
$template->set_filenames(array(
'body' => 'profile_view_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
 
//
// Calculate the number of days this user has been a member ($memberdays)
// Then calculate their posts per day
//
$regdate = $profiledata['user_regdate'];
$memberdays = max(1, round( ( time() - $regdate ) / 86400 ));
$posts_per_day = $profiledata['user_posts'] / $memberdays;
 
// Get the users percentage of total posts
if ( $profiledata['user_posts'] != 0 )
{
$total_posts = get_db_stat('postcount');
$percentage = ( $total_posts ) ? min(100, ($profiledata['user_posts'] / $total_posts) * 100) : 0;
}
else
{
$percentage = 0;
}
 
$avatar_img = '';
if ( $profiledata['user_avatar_type'] && $profiledata['user_allowavatar'] )
{
switch( $profiledata['user_avatar_type'] )
{
case USER_AVATAR_UPLOAD:
$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_REMOTE:
$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_GALLERY:
$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
break;
}
}
 
$poster_rank = '';
$rank_image = '';
if ( $profiledata['user_rank'] )
{
for($i = 0; $i < count($ranksrow); $i++)
{
if ( $profiledata['user_rank'] == $ranksrow[$i]['rank_id'] && $ranksrow[$i]['rank_special'] )
{
$poster_rank = $ranksrow[$i]['rank_title'];
$rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
}
}
}
else
{
for($i = 0; $i < count($ranksrow); $i++)
{
if ( $profiledata['user_posts'] >= $ranksrow[$i]['rank_min'] && !$ranksrow[$i]['rank_special'] )
{
$poster_rank = $ranksrow[$i]['rank_title'];
$rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
}
}
}
 
$temp_url = append_sid("privmsg.$phpEx?mode=post&amp;" . POST_USERS_URL . "=" . $profiledata['user_id']);
$pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
 
if ( !empty($profiledata['user_viewemail']) || $userdata['user_level'] == ADMIN )
{
$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL .'=' . $profiledata['user_id']) : 'mailto:' . $profiledata['user_email'];
 
$email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
$email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
}
else
{
$email_img = '&nbsp;';
$email = '&nbsp;';
}
 
$www_img = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : '&nbsp;';
$www = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '" target="_userwww">' . $profiledata['user_website'] . '</a>' : '&nbsp;';
 
if ( !empty($profiledata['user_icq']) )
{
$icq_status_img = '<a href="http://wwp.icq.com/' . $profiledata['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $profiledata['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
$icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $profiledata['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
$icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $profiledata['user_icq'] . '">' . $lang['ICQ'] . '</a>';
}
else
{
$icq_status_img = '&nbsp;';
$icq_img = '&nbsp;';
$icq = '&nbsp;';
}
 
$aim_img = ( $profiledata['user_aim'] ) ? '<a href="aim:goim?screenname=' . $profiledata['user_aim'] . '&amp;message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '&nbsp;';
$aim = ( $profiledata['user_aim'] ) ? '<a href="aim:goim?screenname=' . $profiledata['user_aim'] . '&amp;message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : '&nbsp;';
 
$msn_img = ( $profiledata['user_msnm'] ) ? $profiledata['user_msnm'] : '&nbsp;';
$msn = $msn_img;
 
$yim_img = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&amp;.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
$yim = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&amp;.src=pg">' . $lang['YIM'] . '</a>' : '';
 
$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username']) . "&amp;showresults=posts");
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '" title="' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '" border="0" /></a>';
$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '</a>';
 
//
// Generate page
//
$page_title = $lang['Viewing_profile'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
if (function_exists('get_html_translation_table'))
{
$u_search_author = urlencode(strtr($profiledata['username'], array_flip(get_html_translation_table(HTML_ENTITIES))));
}
else
{
$u_search_author = urlencode(str_replace(array('&amp;', '&#039;', '&quot;', '&lt;', '&gt;'), array('&', "'", '"', '<', '>'), $profiledata['username']));
}
 
$template->assign_vars(array(
'USERNAME' => $profiledata['username'],
'JOINED' => create_date($lang['DATE_FORMAT'], $profiledata['user_regdate'], $board_config['board_timezone']),
'POSTER_RANK' => $poster_rank,
'RANK_IMAGE' => $rank_image,
'POSTS_PER_DAY' => $posts_per_day,
'POSTS' => $profiledata['user_posts'],
'PERCENTAGE' => $percentage . '%',
'POST_DAY_STATS' => sprintf($lang['User_post_day_stats'], $posts_per_day),
'POST_PERCENT_STATS' => sprintf($lang['User_post_pct_stats'], $percentage),
 
'SEARCH_IMG' => $search_img,
'SEARCH' => $search,
'PM_IMG' => $pm_img,
'PM' => $pm,
'EMAIL_IMG' => $email_img,
'EMAIL' => $email,
'WWW_IMG' => $www_img,
'WWW' => $www,
'ICQ_STATUS_IMG' => $icq_status_img,
'ICQ_IMG' => $icq_img,
'ICQ' => $icq,
'AIM_IMG' => $aim_img,
'AIM' => $aim,
'MSN_IMG' => $msn_img,
'MSN' => $msn,
'YIM_IMG' => $yim_img,
'YIM' => $yim,
 
'LOCATION' => ( $profiledata['user_from'] ) ? $profiledata['user_from'] : '&nbsp;',
'OCCUPATION' => ( $profiledata['user_occ'] ) ? $profiledata['user_occ'] : '&nbsp;',
'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : '&nbsp;',
'AVATAR_IMG' => $avatar_img,
 
'L_VIEWING_PROFILE' => sprintf($lang['Viewing_user_profile'], $profiledata['username']),
'L_ABOUT_USER' => sprintf($lang['About_user'], $profiledata['username']),
'L_AVATAR' => $lang['Avatar'],
'L_POSTER_RANK' => $lang['Poster_rank'],
'L_JOINED' => $lang['Joined'],
'L_TOTAL_POSTS' => $lang['Total_posts'],
'L_SEARCH_USER_POSTS' => sprintf($lang['Search_user_posts'], $profiledata['username']),
'L_CONTACT' => $lang['Contact'],
'L_EMAIL_ADDRESS' => $lang['Email_address'],
'L_EMAIL' => $lang['Email'],
'L_PM' => $lang['Private_Message'],
'L_ICQ_NUMBER' => $lang['ICQ'],
'L_YAHOO' => $lang['YIM'],
'L_AIM' => $lang['AIM'],
'L_MESSENGER' => $lang['MSNM'],
'L_WEBSITE' => $lang['Website'],
'L_LOCATION' => $lang['Location'],
'L_OCCUPATION' => $lang['Occupation'],
'L_INTERESTS' => $lang['Interests'],
 
'U_SEARCH_USER' => append_sid("search.$phpEx?search_author=" . $u_search_author),
 
'S_PROFILE_ACTION' => append_sid("profile.$phpEx"))
);
 
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
?>
/Forum/index.php
0,0 → 1,470
<?php
/***************************************************************************
* index.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: index.php,v 1.99.2.7 2006/01/28 11:13:39 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
 
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
 
$viewcat = ( !empty($HTTP_GET_VARS[POST_CAT_URL]) ) ? $HTTP_GET_VARS[POST_CAT_URL] : -1;
 
if( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
{
$mark_read = ( isset($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : $HTTP_GET_VARS['mark'];
}
else
{
$mark_read = '';
}
 
//
// Handle marking posts
//
if( $mark_read == 'forums' )
{
if( $userdata['session_logged_in'] )
{
setcookie($board_config['cookie_name'] . '_f_all', time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}
 
$template->assign_vars(array(
"META" => '<meta http-equiv="refresh" content="3;url=' .append_sid("index.$phpEx") . '">')
);
 
$message = $lang['Forums_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a> ');
 
message_die(GENERAL_MESSAGE, $message);
}
//
// End handle marking posts
//
 
$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array();
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array();
 
//
// If you don't use these stats on your index you may want to consider
// removing them
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];
 
if( $total_posts == 0 )
{
$l_total_post_s = $lang['Posted_articles_zero_total'];
}
else if( $total_posts == 1 )
{
$l_total_post_s = $lang['Posted_article_total'];
}
else
{
$l_total_post_s = $lang['Posted_articles_total'];
}
 
if( $total_users == 0 )
{
$l_total_user_s = $lang['Registered_users_zero_total'];
}
else if( $total_users == 1 )
{
$l_total_user_s = $lang['Registered_user_total'];
}
else
{
$l_total_user_s = $lang['Registered_users_total'];
}
 
 
//
// Start page proper
//
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
FROM " . CATEGORIES_TABLE . " c
ORDER BY c.cat_order";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
}
 
$category_rows = array();
while ($row = $db->sql_fetchrow($result))
{
$category_rows[] = $row;
}
$db->sql_freeresult($result);
 
if( ( $total_categories = count($category_rows) ) )
{
//
// Define appropriate SQL
//
switch(SQL_LAYER)
{
case 'postgresql':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id
AND u.user_id = p.poster_id
UNION (
SELECT f.*, NULL, NULL, NULL, NULL
FROM " . FORUMS_TABLE . " f
WHERE NOT EXISTS (
SELECT p.post_time
FROM " . POSTS_TABLE . " p
WHERE p.post_id = f.forum_last_post_id
)
)
ORDER BY cat_id, forum_order";
break;
 
case 'oracle':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id(+)
AND u.user_id = p.poster_id(+)
ORDER BY f.cat_id, f.forum_order";
break;
 
default:
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM (( " . FORUMS_TABLE . " f
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
ORDER BY f.cat_id, f.forum_order";
break;
}
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
}
 
$forum_data = array();
while( $row = $db->sql_fetchrow($result) )
{
$forum_data[] = $row;
}
$db->sql_freeresult($result);
 
if ( !($total_forums = count($forum_data)) )
{
message_die(GENERAL_MESSAGE, $lang['No_forums']);
}
 
//
// Obtain a list of topic ids which contain
// posts made since user last visited
//
if ($userdata['session_logged_in'])
{
// 60 days limit
if ($userdata['user_lastvisit'] < (time() - 5184000))
{
$userdata['user_lastvisit'] = time() - 5184000;
}
 
$sql = "SELECT t.forum_id, t.topic_id, p.post_time
FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
WHERE p.post_id = t.topic_last_post_id
AND p.post_time > " . $userdata['user_lastvisit'] . "
AND t.topic_moved_id = 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query new topic information', '', __LINE__, __FILE__, $sql);
}
 
$new_topic_data = array();
while( $topic_data = $db->sql_fetchrow($result) )
{
$new_topic_data[$topic_data['forum_id']][$topic_data['topic_id']] = $topic_data['post_time'];
}
$db->sql_freeresult($result);
}
 
//
// Obtain list of moderators of each forum
// First users, then groups ... broken into two queries
//
$sql = "SELECT aa.forum_id, u.user_id, u.username
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g, " . USERS_TABLE . " u
WHERE aa.auth_mod = " . TRUE . "
AND g.group_single_user = 1
AND ug.group_id = aa.group_id
AND g.group_id = aa.group_id
AND u.user_id = ug.user_id
GROUP BY u.user_id, u.username, aa.forum_id
ORDER BY aa.forum_id, u.user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
}
 
$forum_moderators = array();
while( $row = $db->sql_fetchrow($result) )
{
$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>';
}
$db->sql_freeresult($result);
 
$sql = "SELECT aa.forum_id, g.group_id, g.group_name
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
WHERE aa.auth_mod = " . TRUE . "
AND g.group_single_user = 0
AND g.group_type <> " . GROUP_HIDDEN . "
AND ug.group_id = aa.group_id
AND g.group_id = aa.group_id
GROUP BY g.group_id, g.group_name, aa.forum_id
ORDER BY aa.forum_id, g.group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
}
 
while( $row = $db->sql_fetchrow($result) )
{
$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>';
}
$db->sql_freeresult($result);
 
//
// Find which forums are visible for this user
//
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);
 
//
// Start output of page
//
define('SHOW_ONLINE', true);
$page_title = $lang['Index'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'body' => 'index_body.tpl')
);
 
$template->assign_vars(array(
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),
 
'FORUM_IMG' => $images['forum'],
'FORUM_NEW_IMG' => $images['forum_new'],
'FORUM_LOCKED_IMG' => $images['forum_locked'],
 
'L_FORUM' => $lang['Forum'],
'L_TOPICS' => $lang['Topics'],
'L_REPLIES' => $lang['Replies'],
'L_VIEWS' => $lang['Views'],
'L_POSTS' => $lang['Posts'],
'L_LASTPOST' => $lang['Last_Post'],
'L_NO_NEW_POSTS' => $lang['No_new_posts'],
'L_NEW_POSTS' => $lang['New_posts'],
'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'],
'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'],
'L_ONLINE_EXPLAIN' => $lang['Online_explain'],
 
'L_MODERATOR' => $lang['Moderators'],
'L_FORUM_LOCKED' => $lang['Forum_is_locked'],
'L_MARK_FORUMS_READ' => $lang['Mark_all_forums'],
 
'U_MARK_READ' => append_sid("index.$phpEx?mark=forums"))
);
 
//
// Let's decide which categories we should display
//
$display_categories = array();
 
for ($i = 0; $i < $total_forums; $i++ )
{
if ($is_auth_ary[$forum_data[$i]['forum_id']]['auth_view'])
{
$display_categories[$forum_data[$i]['cat_id']] = true;
}
}
 
//
// Okay, let's build the index
//
for($i = 0; $i < $total_categories; $i++)
{
$cat_id = $category_rows[$i]['cat_id'];
 
//
// Yes, we should, so first dump out the category
// title, then, if appropriate the forum list
//
if (isset($display_categories[$cat_id]) && $display_categories[$cat_id])
{
$template->assign_block_vars('catrow', array(
'CAT_ID' => $cat_id,
'CAT_DESC' => $category_rows[$i]['cat_title'],
'U_VIEWCAT' => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
);
 
if ( $viewcat == $cat_id || $viewcat == -1 )
{
for($j = 0; $j < $total_forums; $j++)
{
if ( $forum_data[$j]['cat_id'] == $cat_id )
{
$forum_id = $forum_data[$j]['forum_id'];
 
if ( $is_auth_ary[$forum_id]['auth_view'] )
{
if ( $forum_data[$j]['forum_status'] == FORUM_LOCKED )
{
$folder_image = $images['forum_locked'];
$folder_alt = $lang['Forum_locked'];
}
else
{
$unread_topics = false;
if ( $userdata['session_logged_in'] )
{
if ( !empty($new_topic_data[$forum_id]) )
{
$forum_last_post_time = 0;
 
while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_id]) )
{
if ( empty($tracking_topics[$check_topic_id]) )
{
$unread_topics = true;
$forum_last_post_time = max($check_post_time, $forum_last_post_time);
 
}
else
{
if ( $tracking_topics[$check_topic_id] < $check_post_time )
{
$unread_topics = true;
$forum_last_post_time = max($check_post_time, $forum_last_post_time);
}
}
}
 
if ( !empty($tracking_forums[$forum_id]) )
{
if ( $tracking_forums[$forum_id] > $forum_last_post_time )
{
$unread_topics = false;
}
}
 
if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
{
if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time )
{
$unread_topics = false;
}
}
 
}
}
 
$folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum'];
$folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts'];
}
 
$posts = $forum_data[$j]['forum_posts'];
$topics = $forum_data[$j]['forum_topics'];
 
if ( $forum_data[$j]['forum_last_post_id'] )
{
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
 
$last_post = $last_post_time . '<br />';
 
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';
$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
}
else
{
$last_post = $lang['No_Posts'];
}
 
if ( count($forum_moderators[$forum_id]) > 0 )
{
$l_moderators = ( count($forum_moderators[$forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
$moderator_list = implode(', ', $forum_moderators[$forum_id]);
}
else
{
$l_moderators = '&nbsp;';
$moderator_list = '&nbsp;';
}
 
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
$template->assign_block_vars('catrow.forumrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FORUM_FOLDER_IMG' => $folder_image,
'FORUM_NAME' => $forum_data[$j]['forum_name'],
'FORUM_DESC' => $forum_data[$j]['forum_desc'],
'POSTS' => $forum_data[$j]['forum_posts'],
'TOPICS' => $forum_data[$j]['forum_topics'],
'LAST_POST' => $last_post,
'MODERATORS' => $moderator_list,
 
'L_MODERATOR' => $l_moderators,
'L_FORUM_FOLDER_ALT' => $folder_alt,
 
'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
);
}
}
}
}
}
} // for ... categories
 
}// if ... total_categories
else
{
message_die(GENERAL_MESSAGE, $lang['No_forums']);
}
 
//
// Generate the page
//
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
?>
/Forum/language/index.htm
0,0 → 1,10
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
 
</body>
</html>
/Forum/language/lang_czech/email/admin_activate.tpl
0,0 → 1,10
Subject: Nový uživatelský účet
Charset: UTF-8
 
Dobrý den,
 
Účet uživatele "{USERNAME}" byl deaktivován nebo nově vytvořen, měl byste zkontrolovat detaily tohoto uživatele (je-li to potřeba) a aktivovat účet pomocí následujícího odkazu:
 
{U_ACTIVATE}
 
{EMAIL_SIG}
/Forum/language/lang_czech/email/admin_send_email.tpl
0,0 → 1,12
Charset: UTF-8
 
Tento e-mail vám byl zaslaný administrátorem "{SITENAME}". Pokud je tato zpráva spam, obsahuje hrubé výrazy nebo jiné poznámky, které shledáváte urážlivými, prosím kontaktujte administrátora fóra na následující adrese:
 
{BOARD_EMAIL}
 
Připojte tento e-mail (obzvláště hlavičky).
 
Následuje zpráva pro vás:
~~~~~~~~~~~~~~~~~~~~~~~~~
 
{MESSAGE}
/Forum/language/lang_czech/email/admin_welcome_activated.tpl
0,0 → 1,8
Subject: Účet aktivován
Charset: UTF-8
 
Dobrý den {USERNAME},
 
váš účet na "{SITENAME}" byl aktivován, můžete se přihlásit pomocí uživatelského jména a hesla, které jste obdržel(a) v předchozím e-mailu.
 
{EMAIL_SIG}
/Forum/language/lang_czech/email/admin_welcome_inactive.tpl
0,0 → 1,19
Subject: Vítejte ve fóru {SITENAME}
Charset: UTF-8
 
{WELCOME_MSG}
 
Prosím schovejte si tento e-mail. Přihlašovací údaje k vašemu účtu jsou následující:
 
----------------------------
Uživatelské jméno: {USERNAME}
Heslo: {PASSWORD}
----------------------------
 
Váš účet je momentálně neaktivní, administrátor jej musí nejprve aktivovat, než se budete moci přihlásit. Až bude účet aktivován, obdržíte upozornění e-mailem.
 
Nezapomeňte své heslo, protože bylo zakódováno v naší databázi a my bychom vám jej nemohli znovu poslat. Jestliže zapomenete heslo, můžete požádat o nové, které bude aktivováno stejným způsobem jako váš účet.
 
Děkujeme za registraci.
 
{EMAIL_SIG}
/Forum/language/lang_czech/email/coppa_welcome_inactive.tpl
0,0 → 1,54
Subject: Vítejte ve fóru {SITENAME}
Charset: UTF-8
 
{WELCOME_MSG}
 
V souladu s ustanoveními COPPA je váš účet momentálně neaktivní.
 
Prosím vytiskněte tuto zprávu a nechejte ji podepsat vašimi rodiči, nebo opatrovníky. Poté ji odešlete faxem na:
 
{FAX_INFO}
 
nebo poštou:
 
{MAIL_INFO}
 
--------------------------- ZDE ODSTŘIHNĚTE ---------------------------
Povolení pro členství v {SITENAME}
 
Uživatelské jméno: {USERNAME}
Heslo: {PASSWORD}
E-mail: {EMAIL_ADDRESS}
 
ICQ: {ICQ}
AIM: {AIM}
MSN Messenger: {MSN}
Yahoo Messenger: {YIM}
WWW stránka: {WEB_SITE}
Bydliště: {FROM}
Povolání: {OCC}
Zájmy: {INTERESTS}
 
PO PROSTUDOVÁNÍ INFORMACÍ POSKYTNUTÝCH MÝM DÍTĚTEM TÍMTO UDĚLUJI SVOLENÍ SERVERU {SITENAME} K UCHOVÁVÁNÍ TĚCHTO INFORMACÍ.
BERU NA VĚDOMÍ, ŽE TYTO INFORMACE MOHOU BÝT KDYKOLI ZMĚNĚNY PO ZADÁNÍ HESLA.
BERU NA VĚDOMÍ, ŽE MOHU KDYKOLI POŽÁDAT O ODSTRANĚNÍ TĚCHTO INFORMACÍ Z DATABÁZE {SITENAME}.
 
 
Rodič, nebo opatrovník
(zde napište své jméno): _____________________
 
(podpis zde): __________________
 
Datum: _______________
 
--------------------------- ZDE ODSTŘIHNĚTE ---------------------------
 
 
Po obdržení vyplněného formuláře vám administrátor aktivuje váš účet.
 
 
Nezapomeňte své heslo, protože bylo zakódováno v naší databázi a my bychom vám jej nemohli znovu poslat. Jestliže zapomenete heslo, můžete požádat o nové, které bude aktivováno stejným způsobem jako váš účet.
 
Děkujeme za registraci.
 
{EMAIL_SIG}
/Forum/language/lang_czech/email/group_added.tpl
0,0 → 1,12
Subject: Byl jste přijat(a) do skupiny
Charset: UTF-8
 
Gratulujeme,
 
byl(a) jste přijat(a) do skupiny "{GROUP_NAME}" na webu {SITENAME}.
Toto bylo provedeno moderátorem skupiny nebo administrátorem serveru. Pro více informací kontaktujte je.
 
Informace o vaší skupině můžete zjistit zde:
{U_GROUPCP}
 
{EMAIL_SIG}
/Forum/language/lang_czech/email/group_approved.tpl
0,0 → 1,11
Subject: Vaše žádost byla přijata
Charset: UTF-8
 
Gratulujeme,
 
vaše žádost o členství ve skupině "{GROUP_NAME}" na webu {SITENAME} byla přijata.
Kliknutím na následující odkaz zjistíte detaily vašeho členství.
 
{U_GROUPCP}
 
{EMAIL_SIG}
/Forum/language/lang_czech/email/group_request.tpl
0,0 → 1,11
Subject: Žádost o přijetí do vaší skupiny
Charset: UTF-8
 
Vážený {GROUP_MODERATOR},
 
uživatel požádal o vstup do skupiny, kterou moderujete na webu {SITENAME}.
Pro potvrzení, nebo zamítnutí této žádostí navštivte prosím následující odkaz:
 
{U_GROUPCP}
 
{EMAIL_SIG}
/Forum/language/lang_czech/email/index.htm
0,0 → 1,10
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
 
</body>
</html>
/Forum/language/lang_czech/email/privmsg_notify.tpl
0,0 → 1,12
Subject: Nová soukromá zpráva
Charset: UTF-8
 
Dobrý den {USERNAME},
 
obdržel(a) jste novou soukromou zprávu na webu "{SITENAME}" a současně máte nastaveno upozorňování na tuto skutečnost. Novou zprávu si můžete přečíst kliknutím na následující odkaz:
 
{U_INBOX}
 
V nastavení vašeho profilu si můžete vybrat možnost být, či nebýt upozorňován(a) e-mailem na přijetí nových soukromých zpráv.
 
{EMAIL_SIG}
/Forum/language/lang_czech/email/profile_send_email.tpl
0,0 → 1,14
Charset: UTF-8
 
Dobrý den {TO_USERNAME},
 
toto je e-mail zaslaný {FROM_USERNAME} prostřednictvím vašeho účtu na {SITENAME}. Pokud je tato zpráva spam, obsahuje hrubé výrazy nebo jiné poznámky které shledáváte urážlivými, prosím kontaktujte administrátora fóra na následující adrese:
 
{BOARD_EMAIL}
 
Připojte tento e-mail (včetně hlaviček). Prosím vezměte na vědomí, že adresa, ze které tento e-mail přišel, je adresou uživatele {FROM_USERNAME}.
 
Následuje zpráva pro vás:
~~~~~~~~~~~~~~~~~~~~~~~~~
 
{MESSAGE}
/Forum/language/lang_czech/email/topic_notify.tpl
0,0 → 1,14
Subject: Upozornění na odpověď v tématu - {TOPIC_TITLE}
Charset: UTF-8
 
Dobrý den,
 
tento e-mail jste obdržel(a) jelikož sledujete téma "{TOPIC_TITLE}" na {SITENAME}. Toto téma zaznamenalo od vaší poslední návštěvy nový příspěvek. Následující odkaz můžete použít k zobrazení nových příspěvků. Žádné další upozornění vám nebude zasláno do doby než navštívíte toto téma.
 
{U_TOPIC}
 
Pokud si již nepřejete sledovat toto téma, můžete sledování ukončit buď kliknutím na odkaz "Ukončit sledování tohoto tématu" nacházející se ve spodní části tématu, nebo kliknutím na následující odkaz:
 
{U_STOP_WATCHING_TOPIC}
 
{EMAIL_SIG}
/Forum/language/lang_czech/email/user_activate.tpl
0,0 → 1,10
Subject: Reaktivujte svůj účet
Charset: UTF-8
 
Dobrý den {USERNAME},
 
váš účet na "{SITENAME}" byl deaktivován, pravděpodobně v důsledku změn provedených ve vašem profilu. Pokud chcete reaktivovat váš účet, musíte kliknout na následující odkaz:
 
{U_ACTIVATE}
 
{EMAIL_SIG}
/Forum/language/lang_czech/email/user_activate_passwd.tpl
0,0 → 1,18
Subject: Aktivace nového hesla
Charset: UTF-8
 
Dobrý den {USERNAME},
 
dostáváte tento e-mail proto, že vy (nebo někdo, kdo se za vás vydává) požadoval zaslání nového hesla pro váš účet na {SITENAME}. Pokud jste toto nepožadoval, pak tento e-mail prosím ignorujte. Pokud tento e-mail znovu přijde, kontaktujte prosím administrátora fóra.
 
Abyste mohl(a) nové heslo používat, musíte jej aktivovat kliknutím na následující odkaz:
 
{U_ACTIVATE}
 
Pokud je vše v pořádku, můžete se přihlásit za použití následujícího hesla:
 
Heslo: {PASSWORD}
 
Toto heslo můžete samozřejmě kdykoliv změnit ve svém profilu. Jestliže budete mít s aktivací problémy kontaktujte administrátora fóra.
 
{EMAIL_SIG}
/Forum/language/lang_czech/email/user_welcome.tpl
0,0 → 1,17
Subject: Vítejte v diskusním fóru {SITENAME}
Charset: UTF-8
 
{WELCOME_MSG}
 
Prosím schovejte si tento e-mail. Údaje o vašem účtu jsou následující:
 
----------------------------
Uživatelské jméno: {USERNAME}
Heslo: {PASSWORD}
----------------------------
 
Nezapomeňte své heslo, protože bylo zakódováno v naší databázi a my bychom vám jej nemohli znovu poslat. Jestliže zapomenete heslo, můžete požádat o nové, které bude aktivováno stejným způsobem jako váš účet.
 
Děkujeme za registraci.
 
{EMAIL_SIG}
/Forum/language/lang_czech/email/user_welcome_inactive.tpl
0,0 → 1,21
Subject: Vítejte v diskuzním fóru {SITENAME}
Charset: UTF-8
 
{WELCOME_MSG}
 
Prosím schovejte si tento e-mail. Údaje o vašem účtu jsou následující:
 
----------------------------
Uživatelské jméno: {USERNAME}
Heslo: {PASSWORD}
----------------------------
 
Váš účet není momentálně aktivní. Nemůžete jej používat do té doby, než navštívíte následující odkaz:
 
{U_ACTIVATE}
 
Nezapomeňte své heslo, protože bylo zakódováno v naší databázi a my bychom vám jej nemohli znovu poslat. Jestliže zapomenete heslo, můžete požádat o nové, které bude aktivováno stejným způsobem jako váš účet.
 
Děkujeme za registraci.
 
{EMAIL_SIG}
/Forum/language/lang_czech/index.htm
0,0 → 1,10
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
 
</body>
</html>
/Forum/language/lang_czech/lang_admin.php
0,0 → 1,761
<?php
/***************************************************************************
* lang_admin.php [Czech]
* ----------------------
* characterset : UTF-8
* phpBB version : 2.0.20
* copyright : © 2005 The phpBB CZ Group
* www : http://www.phpbbcz.com
* last modified : 08. 04. 2006
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
 
//
// Format is same as lang_main
//
 
 
//
// Modules, this replaces the keys used
// in the modules[][] arrays in each module file
//
$lang['General'] = 'Obecné';
$lang['Users'] = 'Uživatelé';
$lang['Groups'] = 'Skupiny';
$lang['Forums'] = 'Fórum';
$lang['Styles'] = 'Styly';
 
$lang['Configuration'] = 'Konfigurace';
$lang['Permissions'] = 'Oprávnění';
$lang['Manage'] = 'Administrace';
$lang['Disallow'] = 'Nepovolená jména';
$lang['Prune'] = 'Pročištění';
$lang['Mass_Email'] = 'Hromadný e-mail';
$lang['Ranks'] = 'Hodnocení';
$lang['Smilies'] = 'Smajlíky (emotikony)';
$lang['Ban_Management'] = 'Zakázání vstupu';
$lang['Word_Censor'] = 'Cenzura slov';
$lang['Export'] = 'Exportovat';
$lang['Create_new'] = 'Vytvořit';
$lang['Add_new'] = 'Přidat';
$lang['Backup_DB'] = 'Zálohovat databázi';
$lang['Restore_DB'] = 'Obnovit databázi';
 
 
//
// Index
//
$lang['Admin'] = 'Administrace';
$lang['Not_admin'] = 'Nemáte oprávnění k administraci tohoto fóra.';
$lang['Welcome_phpBB'] = 'Vítejte na phpBB';
$lang['Admin_intro'] = 'Děkujeme, že jste si zvolil(a) phpBB jako řešení pro vaše fórum. Tato stránka slouží k rychlému zobrazení různých statistik vašeho fóra. Pokud se budete chtít vrátit zpět na tuto stránku klikněte na odkaz <u>Obsah administrace</u> v levém panelu. Pro návrat na obsah vašeho fóra, klikněte na logo fóra umístěném též na levém panelu. Ostatní odkazy na levém panelu této stránky vás dovedou k jednotlivým položkám možného nastavení fóra dle vašich požadavků, každá stránka obsahuje návod jak použít danou funkci.';
$lang['Main_index'] = 'Obsah fóra';
$lang['Forum_stats'] = 'Statistiky fóra';
$lang['Admin_Index'] = 'Obsah administrace';
$lang['Preview_forum'] = 'Náhled na fórum';
 
$lang['Click_return_admin_index'] = 'Klikněte %szde%s pro návrat na obsah administrace.';
 
$lang['Statistic'] = 'Statistiky';
$lang['Value'] = 'Hodnota';
$lang['Number_posts'] = 'Počet příspěvků';
$lang['Posts_per_day'] = 'Příspěvků za den';
$lang['Number_topics'] = 'Počet témat';
$lang['Topics_per_day'] = 'Témat za den';
$lang['Number_users'] = 'Počet uživatelů';
$lang['Users_per_day'] = 'Uživatelů za den';
$lang['Board_started'] = 'Fórum spuštěno';
$lang['Avatar_dir_size'] = 'Velikost adresáře s obrázky postaviček';
$lang['Database_size'] = 'Velikost databáze';
$lang['Gzip_compression'] ='GZIP komprese';
$lang['Not_available'] = 'Nedostupné';
 
$lang['ON'] = 'Ano'; // This is for GZip compression
$lang['OFF'] = 'Ne';
 
 
//
// DB Utils
//
$lang['Database_Utilities'] = 'Databázové nástroje';
 
$lang['Restore'] = 'Obnovení';
$lang['Backup'] = 'Zálohování';
$lang['Restore_explain'] = 'Tato funkce je určena k úplnému obnovení všech databázových tabulek phpBB fóra z uložených souborů. Jestliže to váš server podporuje, můžete použít GZIP komprimované textové soubory a ty pak budou automaticky dekomprimovány. <b>POZOR</b> Tímto budou přepsána veškerá existující data. Obnovení potřebuje delší čas na zpracování, proto prosím neopouštějte tuto stránku dokud nebude vše dokončeno.';
$lang['Backup_explain'] = 'Tato funkce je určena ke kompletní záloze dat phpBB fóra. Jestliže používáte některé další tabulky společně s phpBB databází, doporučujeme je též zálohovat, zadejte proto prosím názvy tabulek a oddělte je oddělovačem (,). Jestliže to váš server podporuje, můžete použít GZIP kompresy dat pro zmenšení velikosti souborů před jejich stažením do vašeho počítače.';
 
$lang['Backup_options'] = 'Nastavení zálohy';
$lang['Start_backup'] = 'Spustit zálohování';
$lang['Full_backup'] = 'Kompletní záloha';
$lang['Structure_backup'] = 'Zálohovat pouze strukturu';
$lang['Data_backup'] = 'Zálohovat pouze data';
$lang['Additional_tables'] = 'Další tabulky';
$lang['Gzip_compress'] = 'GZIP komprese souborů';
$lang['Select_file'] = 'Zvolit soubor';
$lang['Start_Restore'] = 'Spustit obnovení';
 
$lang['Restore_success'] = 'Databáze byla úspěšně obnovena.<br><br>Vaše fórum by nyní mělo být ve stavu před provedením zálohy.';
$lang['Backup_download'] = 'Prosím vyčkejte začátku stahování.';
$lang['Backups_not_supported'] = 'Lituji, ale zálohování databáze není v současné době ve vešem databázovém systému podporováno.';
 
$lang['Restore_Error_uploading'] = 'Vyskytla se chyba při nahrávání souboru zálohy.';
$lang['Restore_Error_filename'] = 'Vyskytl se problém s názvem souboru, zkuste jiný.';
$lang['Restore_Error_decompress'] = 'Nebylo možné dekomprimovat GZIP soubor, použijte textový soubor.';
$lang['Restore_Error_no_file'] = 'Nebyl nahrán žádný soubor.';
 
 
//
// Auth pages
//
$lang['Select_a_User'] = 'Zvolit uživatele';
$lang['Select_a_Group'] = 'Zvolit skupinu';
$lang['Select_a_Forum'] = 'Zvolit fórum';
$lang['Auth_Control_User'] = 'Uživatelská oprávnění';
$lang['Auth_Control_Group'] = 'Oprávnění skupiny';
$lang['Auth_Control_Forum'] = 'Oprávnění fóra';
$lang['Look_up_User'] = 'Zvolit uživatele';
$lang['Look_up_Group'] = 'Zvolit skupinu';
$lang['Look_up_Forum'] = 'Zvolit fórum';
 
$lang['Group_auth_explain'] = 'Zde můžete měnit oprávnění a přiřadit moderování skupině uživatelů. Nezapomeňte, že individuální oprávnění uživatele mohou stále dovolovat uživateli akce, které jste skupině zakázali (vstup uživatele na fórum apod.). Pokud tento případ nastane, budete varováni.';
$lang['User_auth_explain'] = 'Zde můžete měnit oprávnění a přiřadit moderování zvolenému uživateli. Nezapomeňte, že oprávnění skupiny může stále dovolovat uživateli akce, které jste uživateli zakázali (vstup uživatele na fórum apod.). Pokud tento případ nastane, budete varováni.';
$lang['Forum_auth_explain'] = 'Zde můžete nastavit úroveň zabezpečení fóra. Můžete zvolit základní nebo rozšířený mód pro tuto činnost. Rozšířený mód nabízí mnohem větší škálu možností pro nastavení fóra. Pamatujte, že před změnou zabezpečení fóra by se na fóru neměly provádět jiné operace.';
 
$lang['Simple_mode'] = 'Základní režim';
$lang['Advanced_mode'] = 'Rozšířený režim';
$lang['Moderator_status'] = 'Moderátor';
 
$lang['Allowed_Access'] = 'Přístup povolen';
$lang['Disallowed_Access'] = 'Přístup zamítnut';
$lang['Is_Moderator'] = 'Je moderátorem';
$lang['Not_Moderator'] = 'Není moderátorem';
 
$lang['Conflict_warning'] = 'Varování, autorizační konflikt';
$lang['Conflict_access_userauth'] = 'Tento uživatel má požadovaná přístupová práva k tomuto fóru přes členství ve skupině. Můžete povolit oprávnění skupině nebo odstranit tohoto uživatele ze skupiny pro úplné zabránění požadovaných přístupových práv.';
$lang['Conflict_mod_userauth'] = 'Tento moderátor má požadovaná práva pro toto fórum přes členství ve skupině. Můžete povolit oprávnění skupině nebo odstranit tohoto uživatele ze skupiny pro úplné zabránění požadovaných přístupových práv.';
$lang['Conflict_access_groupauth'] = 'Následující uživatel (uživatelé) mají požadovaná práva pro toto fórum přes jejich nastavené oprávnění. Můžete povolit oprávnění skupině nebo odstranit tohoto uživatele ze skupiny pro úplné zabránění požadovaných přístupových práv.';
$lang['Conflict_mod_groupauth'] = 'Následující uživatel (uživatelé) mají požadovaná práva pro toto fórum přes jejich nastavené oprávnění. Můžete povolit oprávnění skupině nebo odstranit tohoto uživatele ze skupiny pro úplné zabránění požadovaných přístupových práv.';
 
$lang['Public'] = 'Veřejný';
$lang['Private'] = 'Soukromý';
$lang['Registered'] = 'Registrovaný';
$lang['Administrators'] = 'Administrátor';
$lang['Hidden'] = 'skrytý';
 
// These are displayed in the drop down boxes for advanced
// mode forum auth, try and keep them short!
$lang['Forum_ALL'] = 'Všichni';
$lang['Forum_REG'] = 'Registrovaný';
$lang['Forum_PRIVATE'] = 'Soukromý';
$lang['Forum_MOD'] = 'Moderátor';
$lang['Forum_ADMIN'] = 'Administrátor';
 
$lang['View'] = 'Zobrazit';
$lang['Read'] = 'Číst';
$lang['Post'] = 'Odeslat';
$lang['Reply'] = 'Odpovědět';
$lang['Edit'] = 'Upravit';
$lang['Delete'] = 'Odstranit';
$lang['Sticky'] = 'Důležité';
$lang['Announce'] = 'Oznámení';
$lang['Vote'] = 'Hlasování';
$lang['Pollcreate'] = 'Hlas přidán';
 
$lang['Permissions'] = 'Oprávnění';
$lang['Simple_Permission'] = 'Základní oprávnění';
 
$lang['User_Level'] = 'Uživatelská úroveň';
$lang['Auth_User'] = 'Uživatel';
$lang['Auth_Admin'] = 'Administrátor';
$lang['Group_memberships'] = 'Členství uživatelské skupiny';
$lang['Usergroup_members'] = 'Tato skupina má následující členy';
 
$lang['Forum_auth_updated'] = 'Oprávnění fóra bylo aktualizováno.';
$lang['User_auth_updated'] = 'Uživatelské oprávnění bylo aktualizováno.';
$lang['Group_auth_updated'] = 'Oprávnění skupiny bylo aktualizováno.';
 
$lang['Auth_updated'] = 'Oprávnění bylo aktualizováno.';
$lang['Click_return_userauth'] = 'Klikněte %szde%s pro návrat do uživatelského oprávnění.';
$lang['Click_return_groupauth'] = 'Klikněte %szde%s pro návrat do oprávnění skupiny.';
$lang['Click_return_forumauth'] = 'Klikněte %szde%s pro návrat na oprávnění fóra.';
 
 
//
// Banning
//
$lang['Ban_control'] = 'Zakázání vstupu';
$lang['Ban_explain'] = 'Zde můžete zakázat vstup zvoleným uživatelům. Můžete zakázat konkrétního uživatele nebo rozsah IP adres nebo jméno počítače. Touto metodou ochráníte vaše fórum proti vstupu nežádoucích uživatelů na stránky fóra. Proti registraci uživatele pod jiným jménem můžete zakázat jeho e-mailovou adresu.';
$lang['Ban_explain_warn'] = 'Dávejte si prosím pozor při zadávání rozsahu IP adres zda jsou všechny adresy od začátku do konce v seznamu. Doporučuje se, aby byl seznam uložených IP adres v databázi co nejmenší, proto se pokuste raději použít znaku "*" pro specifikaci namísto zadávání rozsahu IP adres. Pokud je přesto nutno zadat rozsah IP adres, pokuste se, aby byl seznam co nejkratší.';
 
$lang['Select_username'] = 'Zvolte uživatele';
$lang['Select_ip'] = 'Zvolte IP';
$lang['Select_email'] = 'Zvolte e-mailovou adresu';
 
$lang['Ban_username'] = 'Zakázání vstupu zadaným uživatelům';
$lang['Ban_username_explain'] = 'Chcete-li přidat do zakázaných některého uživatele, zadejte zde jeho jméno, případně jej vyhledejte ze seznamu registrovaných uživatelů.';
 
$lang['Ban_IP'] = 'Zakázání vstupu dle IP adresy nebo jména počítače';
$lang['IP_hostname'] = 'IP adresa nebo jméno počítače';
$lang['Ban_IP_explain'] = 'Zde můžete zadat název počítače, či IP adresy, kterým chcete zakázat vstup. Jednotlivé adresy či jména od sebe oddělte oddělovčem. Chcete-li zadat rozsah IP adres, oddělte je od sebe znakem "-". Můžete použít i znak "*" pro nahrazení části řetězce.';
 
$lang['Ban_email'] = 'Zakázání vstupu dle e-mailových adres';
$lang['Ban_email_explain'] = 'Zde můžete zadat seznam e-mailových adres, kterým chcete zamezit vstup, jednotlivé adresy od sebe oddělte oddělovačem. Můžete použít i znak "*" pro nahrazení části adresy, např. *@hotmail.com';
 
$lang['Unban_username'] = 'Vyjmutí uživatelů ze seznamu zakázaných';
$lang['Unban_username_explain'] = 'Jestliže chcete vyjmout některé uživatele z tohoto seznamu, označte je pomocí myši či klávesnice a potvrďte odesláním.';
 
$lang['Unban_IP'] = 'Vyjmutí IP adres ze seznamu zakázaných';
$lang['Unban_IP_explain'] = 'Jestliže chcete vyjmout některé IP adresy z tohoto seznamu, označte je pomocí myši či klávesnice a potvrďte odesláním.';
 
$lang['Unban_email'] = 'Vyjmutí e-mailových adres ze seznamu zakázaných';
$lang['Unban_email_explain'] = 'Jestliže chcete vyjmout některé e-mailové adresy z tohoto seznamu, označte je pomocí myši či klávesnice a potvrďte odesláním.';
 
$lang['No_banned_users'] = 'Žádní zakázaní uživatelé';
$lang['No_banned_ip'] = 'Žádné zakázané IP adresy';
$lang['No_banned_email'] = 'Žádné zakázané e-mailové adresy';
 
$lang['Ban_update_sucessful'] = 'Seznam zakázaných uživatelů byl úspěšně aktualizován.';
$lang['Click_return_banadmin'] = 'Klikněte %szde%s pro návrat do ovládacího panelu zakázaní vstupu.';
 
 
//
// Configuration
//
$lang['General_Config'] = 'Konfigurace';
$lang['Config_explain'] = 'Níže uvedené položky vám umožní nastavit fórum dle vašich požadavků. Pro nastavení uživatelů a fóra používejte odkazy v levé části stránky.';
 
$lang['Click_return_config'] = 'Klikněte %szde%s pro návrat do konfigurace.';
 
$lang['General_settings'] = 'Obecné nastavení fóra';
$lang['Server_name'] = 'Jméno domény';
$lang['Server_name_explain'] = 'Doménové jméno tohoto fóra běží na';
$lang['Script_path'] = 'Cesta ke skriptům';
$lang['Script_path_explain'] = 'Cesta ke skriptům phpBB, relativní umístění v doméně';
$lang['Server_port'] = 'Port serveru';
$lang['Server_port_explain'] = 'Port na kterém běží váš server, standardně 80';
$lang['Site_name'] = 'Jméno fóra';
$lang['Site_desc'] = 'Popis fóra';
$lang['Board_disable'] = 'Uzavřít fórum';
$lang['Board_disable_explain'] = 'Tímto znepřístupníte fórum pro uživatele. Neodhlašujte se pokud jste znepřístupnil fórum, jinak se nebudete moci přihlásit zpět!';
$lang['Acct_activation'] = 'Způsob aktivace účtu';
$lang['Acc_None'] = 'Žádný'; // These three entries are the type of activation
$lang['Acc_User'] = 'Uživatelem';
$lang['Acc_Admin'] = 'Administrátorem';
 
$lang['Abilities_settings'] = 'Základní nastavení pro uživatele a fórum';
$lang['Max_poll_options'] = 'Maximální počet možnosti pro hlasování';
$lang['Flood_Interval'] = 'Ochranný interval';
$lang['Flood_Interval_explain'] = 'Počet vteřin, po které musí uživatel počkat mezi příspěvky';
$lang['Board_email_form'] = 'Zasílat e-maily přes toto fórum';
$lang['Board_email_form_explain'] = 'Umožňuje zasílání e-mailů jiným uživatelům přes toto fórum (není přímo vidět e-mailová adresa příjemce)';
$lang['Topics_per_page'] = 'Témat na stránku';
$lang['Posts_per_page'] = 'Příspěvků na stránku';
$lang['Hot_threshold'] = 'Příspěvky do přípustné hranice';
$lang['Default_style'] = 'Výchozí vzhled';
$lang['Override_style'] = 'Ignorovat uživatelovo nastavení vzhledu';
$lang['Override_style_explain'] = 'Použije výchozí vzhled namísto zvoleného uživatelem';
$lang['Default_language'] = 'Výchozí jazyk';
$lang['Date_format'] = 'Formát data';
$lang['System_timezone'] = 'Časové pásmo fóra';
$lang['Enable_gzip'] = 'Povolit GZIP kompresi';
$lang['Enable_prune'] = 'Povolit pročištění fóra';
$lang['Allow_HTML'] = 'Povolit HTML';
$lang['Allow_BBCode'] = 'Povolit značky';
$lang['Allowed_tags'] = 'Povolené HTML značky';
$lang['Allowed_tags_explain'] = 'oddělte značky oddělovačem (,)';
$lang['Allow_smilies'] = 'Povolit smajlíky (emotikony)';
$lang['Smilies_path'] = 'Cesta k umístění smajlíků';
$lang['Smilies_path_explain'] = 'Cesta mimo váš phpBB kořenový adresář, př.: images/smilies';
$lang['Allow_sig'] = 'Povolit podpisy';
$lang['Max_sig_length'] = 'Maximální délka podpisu';
$lang['Max_sig_length_explain'] = 'Maximální počet znaků uživatelova podpisu';
$lang['Allow_name_change'] = 'Povolit změnu uživatelského jména';
 
$lang['Avatar_settings'] = 'Nastavení obrázků postaviček';
$lang['Allow_local'] = 'Povolit galerii postaviček';
$lang['Allow_remote'] = 'Povolit pouze odkazy na obrázky postaviček';
$lang['Allow_remote_explain'] = 'Obrázek postavičky je stahován z jiného serveru';
$lang['Allow_upload'] = 'Povolit přihrávání obrázků postaviček na server';
$lang['Max_filesize'] = 'Maximální velikost souboru s obrázkem postavičky';
$lang['Max_filesize_explain'] = 'Pro přihrávání souborů obrázků postaviček';
$lang['Max_avatar_size'] = 'Maximální rozměry obrázku postavičky';
$lang['Max_avatar_size_explain'] = '(výška × šířka v bodech)';
$lang['Avatar_storage_path'] = 'Cesta k ukládání obrázků postaviček';
$lang['Avatar_storage_path_explain'] = 'Cesta mimo váš phpBB kořenový adresář, př.: images/avatars';
$lang['Avatar_gallery_path'] = 'Cesta ke galerii obrázků postaviček';
$lang['Avatar_gallery_path_explain'] = 'Cesta mimo váš phpBB kořenový adresář pro přednastavené obrázky, př.: images/avatars/gallery';
 
$lang['COPPA_settings'] = 'COPPA nastavení';
$lang['COPPA_fax'] = 'COPPA faxové číslo';
$lang['COPPA_mail'] = 'COPPA e-mailové adresy';
$lang['COPPA_mail_explain'] = 'Toto je seznam adres na které budou rodiče zasílat COPPA registrační formulář';
 
$lang['Email_settings'] = 'Nastavení e-mailů';
$lang['Admin_email'] = 'Administrátorova e-mailová adresa:';
$lang['Email_sig'] = 'Podpis e-mailu';
$lang['Email_sig_explain'] = 'Tento text bude připojen ke všem e-mailům odeslaným z tohoto fóra';
$lang['Use_SMTP'] = 'Použít SMTP server pro e-mail';
$lang['Use_SMTP_explain'] = 'Zvolte Ano, jestliže chcete odesílat e-maily přes jméno serveru namísto lokální mail funkce.';
$lang['SMTP_server'] = 'Adresa SMTP serveru';
$lang['SMTP_username'] = 'SMTP účet';
$lang['SMTP_username_explain'] = 'Zadejte pouze v případě, že to váš SMTP server vyžaduje';
$lang['SMTP_password'] = 'SMTP heslo';
$lang['SMTP_password_explain'] = 'Zadejte pouze v případě, že to váš SMTP server vyžaduje';
 
$lang['Disable_privmsg'] = 'Soukromé zprávy';
$lang['Inbox_limits'] = 'Max. počet příspěvků ve složce doručené';
$lang['Sentbox_limits'] = 'Max. počet příspěvků ve složce odeslané';
$lang['Savebox_limits'] = 'Max. počet příspěvků ve složce uložené';
 
$lang['Cookie_settings'] = 'Nastavení cookies';
$lang['Cookie_settings_explain'] = 'Toto detailní nastavení definuje jak budou zasílány cookies ve vašem prohlížeči. Doporučujeme ponechat výchozí hodnoty nastavení cookie, ale je možno změnit hodnoty dle vašich požadavků. Nastavení se projeví po příštím přihlášení.';
$lang['Cookie_domain'] = 'Doména cookie';
$lang['Cookie_name'] = 'Jméno cookie';
$lang['Cookie_path'] = 'Cesta k cookie';
$lang['Cookie_secure'] = 'Zabezpečení cookie';
$lang['Cookie_secure_explain'] = 'Jestliže váš server běží přes SSL, nastavte na povoleno, jesliže ne tak nastavte zakázáno';
$lang['Session_length'] = 'Délka platnosti session (sezení) [ vteřin ]';
 
 
// Visual Confirmation
$lang['Visual_confirm'] = 'Vyžadovat vizuální ověření';
$lang['Visual_confirm_explain'] = 'Vyžaduje přepsání kódu, který se zobrazí v obrázku při registraci nového uživatele.';
 
// Autologin Keys - added 2.0.18
$lang['Allow_autologin'] = 'Povolit automatické přihlašování';
$lang['Allow_autologin_explain'] = 'Umožňuje povolit nebo zakázat možnost automatického přihlašovaní na fórum.';
$lang['Autologin_time'] = 'Doba platnosti automatického přihlášení';
$lang['Autologin_time_explain'] = 'Zde můžete nastavit, kolik dní je platný klíč pro automatické přihlášení. Napište nulu pro neomezenou platnost.';
 
// Search Flood Control - added 2.0.20
$lang['Search_Flood_Interval'] = 'Ochranný interval pro hledání';
$lang['Search_Flood_Interval_explain'] = 'Počet vteřin, po které uživatel musí čekat na další hledání';
 
//
// Forum Management
//
$lang['Forum_admin'] = 'Administrace fóra';
$lang['Forum_admin_explain'] = 'Z tohoto panelu můžete přidávat, odstraňovat, upravovat, třídit a synchronizovat kategorie a fóra';
$lang['Edit_forum'] = 'Úprava fóra';
$lang['Create_forum'] = 'Vytvořit nové fórum';
$lang['Create_category'] = 'Vytvořit novou kategorii';
$lang['Remove'] = 'Vyjmout';
$lang['Action'] = 'Akce';
$lang['Update_order'] = 'Aktualizovat instrukce';
$lang['Config_updated'] = 'Změna konfigurace fóra byla úspěšně provedena.';
$lang['Edit'] = 'Upravit';
$lang['Delete'] = 'Odstranit';
$lang['Move_up'] = 'přesunout nahoru';
$lang['Move_down'] = 'přesunout dolu';
$lang['Resync'] = 'Synchronizovat';
$lang['No_mode'] = 'Mód nebyl přiřazen';
$lang['Forum_edit_delete_explain'] = 'Níže uvedený formulář vám umožní úpravy obecného nastavení fóra. Pro nastavení uživatelů a fóra používejte odkazy v levé části stránky.';
 
$lang['Move_contents'] = 'Přesunout veškerý obsah';
$lang['Forum_delete'] = 'Odstranit fórum';
$lang['Forum_delete_explain'] = 'Níže uvedený formulář vám umožní odstranit fóra či kategorie a rozhodnout kam chcete dát všechna témata která jsou v něm obsaženy.';
 
$lang['Status_locked'] = 'Zamknuto';
$lang['Status_unlocked'] = 'Odemknuto';
$lang['Forum_settings'] = 'Obecné nastavení fóra';
$lang['Forum_name'] = 'Jméno fóra';
$lang['Forum_desc'] = 'Popis';
$lang['Forum_status'] = 'Stav fóra';
$lang['Forum_pruning'] = 'Automatické pročištění';
 
$lang['prune_freq'] = 'Kontrolovat starší témata každých';
$lang['prune_days'] = 'Odstranit témata, která jsou starší';
$lang['Set_prune_data'] = 'Chcete nastavit povolení automatického pročištění tohoto fóra, ale nemáte nastavenu četnost nebo počet dní. Vraťte se prosím zpět a zadejte požadované hodnoty.';
 
$lang['Move_and_Delete'] = 'Přesunout a odstranit';
 
$lang['Delete_all_posts'] = 'Odstranit všechny příspěvky';
$lang['Nowhere_to_move'] = 'Sem to nelze přesunout';
 
$lang['Edit_Category'] = 'Úprava kategorie';
$lang['Edit_Category_explain'] = 'Použijte tento formulář pro úpravu jména kategorie.';
 
$lang['Forums_updated'] = 'Fórum a informace o skupině byly aktualizovány.';
 
$lang['Must_delete_forums'] = 'Musíte odstranit všechna fóra ještě před odstraněním této kategorie.';
 
$lang['Click_return_forumadmin'] = 'Klikněte %szde%s pro návrat do administrace fóra.';
 
 
//
// Smiley Management
//
$lang['smiley_title'] = 'Úprava smajlíků (emotikonů)';
$lang['smile_desc'] = 'Na této stránce můžete přidávat, odebírat a upravovat smajlíky (emotikony), které mohou Vaši uživatelé používat v příspěvcích a soukromých zprávách.';
 
$lang['smiley_config'] = 'Nastavení smajlíku';
$lang['smiley_code'] = 'Kód smajlíku';
$lang['smiley_url'] = 'Grafický soubor smajlíku';
$lang['smiley_emot'] = 'Výraz smajlíku';
$lang['smile_add'] = 'Přidej nový smajlík';
$lang['Smile'] = 'Smajlík';
$lang['Emotion'] = 'Výraz';
 
$lang['Select_pak'] = 'Vyberte (.pak) soubor';
$lang['replace_existing'] = 'Nahradit dosavadní smajlík';
$lang['keep_existing'] = 'Zachovat již existující smajlík';
$lang['smiley_import_inst'] = 'Rozbalte kolekci smajlíků a nahrajte všechny soubory do příslušného adresáře smajlíků pro instalaci. Pak vyberte správnou informaci v tomto formuláři k importování kolekce smajlíků.';
$lang['smiley_import'] = 'Import kolekce smajlíků';
$lang['choose_smile_pak'] = 'Vyberte soubor smajlíků (.pak)';
$lang['import'] = 'Importuj smajlíky';
$lang['smile_conflicts'] = 'Co udělat v případě shody již přítomného a nově importovaného smajlíku?';
$lang['del_existing_smileys'] = 'Před importováním smazat dosavadní smajlíky';
$lang['import_smile_pack'] = 'Importovat kolekci smajlíků';
$lang['export_smile_pack'] = 'Vytvořit kolekci smajlíků';
$lang['export_smiles'] = 'Pokud chcete vytvořit kolekci smajlíků z dosud užívaných smajlíků, klikněte %szde%s a stáhněte soubor smiles.pak. Pojmenujte tento příslušný soubor, ale nezapomeňte zachovat příponu (.pak). Pak vytvořte komprimovaný soubor všech vašich smajlíků i s vaším souborem nastavení .pak';
 
$lang['smiley_add_success'] = 'Smajlík byl úspěšně přidán.';
$lang['smiley_edit_success'] = 'Smajlík byl úspěšně změněn.';
$lang['smiley_import_success'] = 'Soubor smajlíků byl úspěšně importován.';
$lang['smiley_del_success'] = 'Smajlík byl úspěšně odstraněn.';
$lang['Click_return_smileadmin'] = 'Klikněte %szde%s k návratu na administraci smajlíků.';
$lang['Confirm_delete_smiley'] = 'Opravdu chcete odstranit tohoto smajlíka?';
 
//
// User Management
//
$lang['User_admin'] = 'Uživatelská administrace';
$lang['User_admin_explain'] = 'Zde můžete změnit informaci o uživateli a některá specifická nastavení. K úpravě práv použijte uživatele a skupinový povolovací systém.';
 
$lang['Look_up_user'] = 'Zvolit uživatele';
 
$lang['Admin_user_fail'] = 'Nelze změnit nastavení uživatele.';
$lang['Admin_user_updated'] = 'Změna nastavení uživatele proběhla úspěšně.';
$lang['Click_return_useradmin'] = 'Klikněte %szde%s k návratu do Uživatelské administrace.';
 
$lang['User_delete'] = 'Odstranit tohoto uživatele';
$lang['User_delete_explain'] = 'Zde smažete tohoto uživatele. POZOR Tato akce nelze vrátit zpět!';
$lang['User_deleted'] = 'Uživatel byl úspěšně odstraněn.';
 
$lang['User_status'] = 'Uživatel je aktivní';
$lang['User_allowpm'] = 'Může posílat soukromé zprávy';
$lang['User_allowavatar'] = 'Může zobrazovat postavičky';
 
$lang['Admin_avatar_explain'] = 'Zde můžete vidět a odstranit současnou uživatelovu postavičku.';
 
$lang['User_special'] = 'Zvláštní oblasti administrátorských nastavení';
$lang['User_special_explain'] = 'Tyto oblasti nemůžou být upravovány uživateli. Zde můžete nastavit jejich zařazení a další oblasti, které nejsou uživatelům přiřazeny.';
 
 
//
// Group Management
//
$lang['Group_administration'] = 'Skupinová administrace';
$lang['Group_admin_explain'] = 'Z tohoto panelu můžete spravovat všechny uživatelské skupiny, můžete odstranit, vytvořit a změnit současné skupiny. Můžete vybírat moderátory, zamykat otevřené/uzavřené skupiny a nastavovat jméno a popis skupiny';
$lang['Error_updating_groups'] = 'Při nahrávání skupin došlo k chybě!';
$lang['Updated_group'] = 'Skupina byla úspěšně nahrána.';
$lang['Added_new_group'] = 'Nová skupina byla úspěšně vytvořena.';
$lang['Deleted_group'] = 'Skupina byla úspěšně odstraněna.';
$lang['New_group'] = 'Vytvořit novou skupinu';
$lang['Edit_group'] = 'Změnit skupinu';
$lang['group_name'] = 'Jméno skupiny';
$lang['group_description'] = 'Popis skupiny';
$lang['group_moderator'] = 'Moderátor skupiny';
$lang['group_status'] = 'Nastavení skupiny';
$lang['group_open'] = 'Otevřená skupina';
$lang['group_closed'] = 'Uzavřená skupina';
$lang['group_hidden'] = 'Skrytá skupina';
$lang['group_delete'] = 'Odstranit skupinu';
$lang['group_delete_check'] = 'Odstranit tuto skupinu';
$lang['submit_group_changes'] = 'Odeslat změny';
$lang['reset_group_changes'] = 'Obnovit změny';
$lang['No_group_name'] = 'Musíte zadat jméno pro tuto skupinu.';
$lang['No_group_moderator'] = 'Musíte zadat moderátora pro tuto skupinu.';
$lang['No_group_mode'] = 'Musíte zadat nastavení této skupiny, otevřená nebo uzavřená.';
$lang['No_group_action'] = 'Nebyla vybrána žádná akce';
$lang['delete_group_moderator'] = 'Odstranit moderátora původní skupiny?';
$lang['delete_moderator_explain'] = 'Pokud chcete změnit moderátora skupiny, zatrhněte toto políčko k odstranění původního moderátora z této skupiny. V opačném případě se tento uživatel stane běžným členem této skupiny.';
$lang['Click_return_groupsadmin'] = 'Klikněte %szde%s k návratu do Skupinové administrace.';
$lang['Select_group'] = 'Vyberte skupinu';
$lang['Look_up_group'] = 'Vyhledejte skupinu';
 
 
//
// Prune Administration
//
$lang['Forum_Prune'] = 'Pročištění fóra';
$lang['Forum_Prune_explain'] = 'Tato funkce odstraní všechna témata, ke kterým nebyly přidány příspěvky za Vámi zadaný počet dní. Pokud nezadáte počet dní, pak budou odstraněna všechna témata. Nebudou odstraněna témata, v nichž běží hlasování a stejně tak se neodstraní oznámení. Tato témata budete muset odstranit ručně.';
$lang['Do_Prune'] = 'Pročistit';
$lang['All_Forums'] = 'Všechna fóra';
$lang['Prune_topics_not_posted'] = 'Pročistit témata bez odpovědi starší';
$lang['Topics_pruned'] = 'Témata pročištěna';
$lang['Posts_pruned'] = 'Příspěvky pročištěny';
$lang['Prune_success'] = 'Pročištění fór proběhlo úspěšně.';
 
 
//
// Word censor
//
$lang['Words_title'] = 'Slovní cenzura';
$lang['Words_explain'] = 'Z tohoto kontrolního panelu můžete přidat, změnit a odstranit slova, která budou automaticky cenzurována na vašich fórech. Stejně tak nebude možné zaregistrovat uživatelská jména obsahující tyto výrazy. Hvězdičku (*) lze použít za část slova, takže např. výraz *test* vyhledá výraz \'protestovat\', test* potom \'testovat\' a *test slovo \'protest\'.';
$lang['Word'] = 'Slovo';
$lang['Edit_word_censor'] = 'Změňte slovní cenzuru';
$lang['Replacement'] = 'Náhrada';
$lang['Add_new_word'] = 'Přidejte nové slovo';
$lang['Update_word'] = 'Nahrajte slovní cenzuru';
 
$lang['Must_enter_word'] = 'Musíte vložit slovo a jeho náhradu';
$lang['No_word_selected'] = 'K úpravě nebylo vybráno žádné slovo';
 
$lang['Word_updated'] = 'Vybraná slovo bylo úspěšně nahráno do cenzury.';
$lang['Word_added'] = 'Slovo bylo úspěšně přidáno do cenzury.';
$lang['Word_removed'] = 'Cenzurované slovo bylo úspěšně odstraněno.';
 
$lang['Click_return_wordadmin'] = 'Klikněte %szde%s k návratu do Administrace slovní cenzury.';
 
$lang['Confirm_delete_word'] = 'Opravdu chcete odstranit toto cenzurované slovo?';
 
//
// Mass Email
//
$lang['Mass_email_explain'] = 'Odtud můžete zaslat vzkaz jakémukoliv uživateli nebo všem z vybrané skupiny. Stane se tak zasláním e-mailu na zadanou administrátorskou adresu, přičemž uživatelům bude zaslána skrytá kopie. Pokud zasíláte vzkaz větší skupině, prosím, mějte chvilku strpení a nezastavujte akci, když se provádí. Je zcela běžné, že hromadná korespondence trvá delší dobu a budete upozorněni, když se akce dokončí';
$lang['Compose'] = 'Napsat';
 
$lang['Recipients'] = 'Příjemci';
$lang['All_users'] = 'Všichni uživatelé';
 
$lang['Email_successfull'] = 'Vaše zpráva byla odeslána';
$lang['Click_return_massemail'] = 'Klikněte %szde%s k návratu na formulář Hromadné korespondence.';
 
 
//
// Ranks admin
//
$lang['Ranks_title'] = 'Administrace hodnocení';
$lang['Ranks_explain'] = 'Tímto formulářem přidáváte, měníte, prohlížíte a mažete hodnocení. Můžete rovněž vytvořit vlastní nastavení hodnocení, která mohou být přiřazena přes funkci nastavení uživatele.';
 
$lang['Add_new_rank'] = 'Přidat nové hodnocení';
 
$lang['Rank_title'] = 'Název hodnocení';
$lang['Rank_special'] = 'Nastavit jako zvláštní hodnocení';
$lang['Rank_minimum'] = 'Minimální počet příspěvků';
$lang['Rank_maximum'] = 'Maximální počet příspěvků';
$lang['Rank_image'] = 'Obrázek hodnocení';
$lang['Rank_image_explain'] = 'Použijte tuto funkci k definování malého obrázku spojeného s daným hodnocením. Cesta mimo váš phpBB kořenový adresář a název souboru, např.: images/ranks/image1.png';
 
$lang['Must_select_rank'] = 'Musíte vybrat hodnocení';
$lang['No_assigned_rank'] = 'Nebylo zadáno žádné zvláštní hodnocení';
 
$lang['Rank_updated'] = 'Hodnocení bylo úspěšně změněno.';
$lang['Rank_added'] = 'Hodnocení bylo úspěšně přidáno.';
$lang['Rank_removed'] = 'Hodnocení bylo úspěšně zrušeno.';
$lang['No_update_ranks'] = 'Hodnocení byla úspěšně odstraněno, ovšem uživatelské účty s tímto hodnocením se nezměnily. Bude zapotřebí tato hodnocení upravit ručně.';
 
$lang['Click_return_rankadmin'] = 'Klikněte %szde%s pro návrat do Administrace hodnocení.';
 
$lang['Confirm_delete_rank'] = 'Opravdu chcete odstranit toto hodnocení?';
 
//
// Disallow Username Admin
//
$lang['Disallow_control'] = 'Správa nepovolených uživatelských jmen';
$lang['Disallow_explain'] = 'Zde můžete spravovat uživatelská jména, která nebudou povolena k použití. Nepovolená uživatelská jména mohou obsahovat \*\. Upozorňujeme, že nebudete moci určit již registrované uživatelské jméno. Nejdříve ho musíte odstranit a následně jej nepovolit.';
 
$lang['Delete_disallow'] = 'Odstranit';
$lang['Delete_disallow_title'] = 'Odstranit nepovolené uživatelské jméno';
$lang['Delete_disallow_explain'] = 'Můžete odstranit nepovolené uživatelské jméno tak, že jej vyberete ze seznamu a zmáčknete tlačítko Odstranit.';
 
$lang['Add_disallow'] = 'Přidat';
$lang['Add_disallow_title'] = 'Přidat nepovolené uživatelské jméno';
$lang['Add_disallow_explain'] = 'Můžete zakázat některá nepovolená uživatelská jména. Tato jména si nebude moci žádný uživatel zaregistrovat. Můžete použít i znak "*" pro nahrazení části jména';
 
$lang['No_disallowed'] = 'Žádná nepovolená uživatelská jména';
 
$lang['Disallowed_deleted'] = 'Nepovolené uživatelské jméno bylo úspěšně odstraněno.';
$lang['Disallow_successful'] = 'Nepovolené uživatelské jméno bylo úspěšně přidáno.';
$lang['Disallowed_already'] = 'Jméno, které jste zadali, nemůže být zakázáno. Buď se již vyskytuje v tomto seznamu nebo v seznamu cenzurovaných slov, nebo existuje totožné uživatelské jméno.';
 
$lang['Click_return_disallowadmin'] = 'Klikněte %szde%s pro návrat do Administrace nastavení nepovolených uživatelských jmen.';
 
 
//
// Styles Admin
//
$lang['Styles_admin'] = 'Administrace stylů';
$lang['Styles_explain'] = 'Zde můžete přidávat, odebírat a spravovat styly (vzory a motivy) dostupné pro vaše uživatele';
$lang['Styles_addnew_explain'] = 'Tento seznam obsahuje všechny motivy, které jsou dostupné pro vzory, které nyní máte. Části na tomto seznamu ještě nebyly nainstalovány do odpovídající databáze phpBB. Pro nainstalování klikněte na instalační odkaz vedle zadání';
 
$lang['Select_template'] = 'Vybrat vzor';
 
$lang['Style'] = 'Styl';
$lang['Template'] = 'Vzor';
$lang['Install'] = 'Nainstalovat';
$lang['Download'] = 'Stáhnout';
 
$lang['Edit_theme'] = 'Upravit motiv';
$lang['Edit_theme_explain'] = 'Ve spodním formuláři můžete upravovat nastavení pro zvolený vzor';
 
$lang['Create_theme'] = 'Vytvořit motiv';
$lang['Create_theme_explain'] = 'Ve spodním formuláři můžete vytvořit nový motiv. Při zadávání barev (pro které použijete hexadecimální hodnoty) neuvádějte znak #, tzn. hodnota CCCCCC je platná, #CCCCCC nikoliv';
 
$lang['Export_themes'] = 'Exportovat motivy';
$lang['Export_explain'] = 'V tomto panelu můžete exportovat zadání motivu pro zvolený vzor. Vyberte vzor ze spodního výběru a skript vytvoří konfigurační soubor motiv a bude jej chtít uložit do vybraného adresáře vzorů. Pokud se mu to nepodaří, nabídne vám možnost soubor stáhnout na disk. Aby se mohl soubor uložit, je nutné, aby byl povolen přístup pro zápis do příslušného adresáře. Pro více informací se podívejte na uživatelský manuál k phpBB 2.';
 
$lang['Theme_installed'] = 'Vybraný motiv byl úspěšně nainstalován.';
$lang['Style_removed'] = 'Vybraný styl byl odstraněn z databáze. K plnému odstranění tohoto stylu ze systému musíte odstranit příslušný styl z adresáře vzorů.';
$lang['Theme_info_saved'] = 'Informace ke zvolenému vzoru byly uloženy. Teď nastavte povolení na theme_info.cfg (a také vybraného adresáři vzorů) na \'jen ke čtení\'.';
$lang['Theme_updated'] = 'Vybraný motiv byl změněn. Vyexportujte nyní nastavení nového motivu.';
$lang['Theme_created'] = 'Motiv vytvořen. Vyexportujte nyní nový motiv do konfiguračního souboru kvůli bezpečnému uložení nebo použití pro jiné případy.';
 
$lang['Confirm_delete_style'] = 'Jste si jisti, že chcete odstranit tento styl?';
 
$lang['Download_theme_cfg'] = 'Nelze zapsat informaci do konfiguračního souboru. Klikněte na spodní tlačítko ke stažení souboru vaším prohlížečem. Až jej stáhnete, můžete jej přesunout do adresáře obsahujícího soubory vzorů. Pak můžete zabalit soubory pro distribuci nebo použít jinde, pakliže chcete.';
$lang['No_themes'] = 'Ke vzoru, který jste vybrali, se nevážou žádné motivy. Nový motiv vytvoříte kliknutím na \'Vytvořit nové\' na levé straně panelu.';
$lang['No_template_dir'] = 'Nelze otevřít adresář se vzory. Možná, že nemáte právo pro čtení nebo adresář neexistuje.';
$lang['Cannot_remove_style'] = 'Nelze odstranit vybraný styl, je-li stanoven jako výchozí. Změňte, prosím, původní styl a zkuste to znovu.';
$lang['Style_exists'] = 'Jméno stylu již existuje. Prosím vraťte se a zvolte jiné jméno.';
 
$lang['Click_return_styleadmin'] = 'Klikněte %szde%s k návratu do Administrace stylů.';
 
$lang['Theme_settings'] = 'Nastavení motivu';
$lang['Theme_element'] = 'Součást vzoru';
$lang['Simple_name'] = 'Jednoduchý název';
$lang['Value'] = 'Hodnota';
$lang['Save_Settings'] = 'Ulož nastavení';
 
$lang['Stylesheet'] = 'CSS styl';
$lang['Stylesheet_explain'] = 'Název CSS souboru používaného tímto stylem.';
 
$lang['Background_image'] = 'Obrázek pozadí';
$lang['Background_color'] = 'Barva pozadí';
$lang['Theme_name'] = 'Jméno motivu';
$lang['Link_color'] = 'Barva odkazu';
$lang['Text_color'] = 'Barva textu';
$lang['VLink_color'] = 'Barva navštíveného odkazu';
$lang['ALink_color'] = 'Barva odkazu';
$lang['HLink_color'] = 'Barva aktivního odkazu';
$lang['Tr_color1'] = 'Barva řádku tabulky 1';
$lang['Tr_color2'] = 'Barva řádku tabulky 2';
$lang['Tr_color3'] = 'Barva řádku tabulky 3';
$lang['Tr_class1'] = 'Třída řádku tabulky 1';
$lang['Tr_class2'] = 'Třída řádku tabulky 2';
$lang['Tr_class3'] = 'Třída řádku tabulky 3';
$lang['Th_color1'] = 'Barva titulu tabulky 1';
$lang['Th_color2'] = 'Barva titulu tabulky 2';
$lang['Th_color3'] = 'Barva titulu tabulky 3';
$lang['Th_class1'] = 'Table Header Class 1';
$lang['Th_class2'] = 'Table Header Class 2';
$lang['Th_class3'] = 'Table Header Class 3';
$lang['Td_color1'] = 'Barva buňky tabulky 1';
$lang['Td_color2'] = 'Barva buňky tabulky 2';
$lang['Td_color3'] = 'Barva buňky tabulky 3';
$lang['Td_class1'] = 'Třída buňky tabulky 1';
$lang['Td_class2'] = 'Třída buňky tabulky 2';
$lang['Td_class3'] = 'Třída buňky tabulky 3';
$lang['fontface1'] = 'Vzhled písma 1';
$lang['fontface2'] = 'Vzhled písma 2';
$lang['fontface3'] = 'Vzhled písma 3';
$lang['fontsize1'] = 'Velikost písma 1';
$lang['fontsize2'] = 'Velikost písma 2';
$lang['fontsize3'] = 'Velikost písma 3';
$lang['fontcolor1'] = 'Barva písma 1';
$lang['fontcolor2'] = 'Barva písma 2';
$lang['fontcolor3'] = 'Barva písma 3';
$lang['span_class1'] = 'Třída SPAN 1';
$lang['span_class2'] = 'Třída SPAN 2';
$lang['span_class3'] = 'Třída SPAN 3';
$lang['img_poll_size'] = 'Velikost obrázku pro hlasování [v pixelech]';
$lang['img_pm_size'] = 'Velikost obrázku pro soukromou zprávu [v pixelech]';
 
 
//
// Install Process
//
$lang['Welcome_install'] = 'Vítejte v instalaci phpBB 2';
$lang['Initial_config'] = 'Základní nastavení';
$lang['DB_config'] = 'Nastavení databáze';
$lang['Admin_config'] = 'Administrátorské nastavení';
$lang['continue_upgrade'] = 'Poté, co jste si stáhli konfigurační soubor na váš disk můžete spodním tlačítkem \'Pokračovat v instalaci novější verze\'. Počkejte s nahráním konfiguračního souboru dokud není ukončena instalace novější verze.';
$lang['upgrade_submit'] = 'Pokračujte v instalování novější verze';
 
$lang['Installer_Error'] = 'Během instalace se objevila chyba!';
$lang['Previous_Install'] = 'Byla nalezena předešlá instalace.';
$lang['Install_db_error'] = 'Během nahrávání novější instalace databáze se objevila chyba.';
 
$lang['Re_install'] = 'Vaše předešlá instalace je stále aktivní.<br /><br />Pokud si přejete přeinstalovat phpBB 2, pokračujte tlačítkem \'Ano\'. Uvědomte si, prosím, že v tomto případě se zničí veškerá data; nedojde k zálohování. Administrátorské uživatelské jméno a heslo, které jste používali k přihlašování budou po reinstalaci přepsány novými, žádná další nastavení nebudou zachována.<br /><br />Zamyslete se pozorně před zmáčknutím tlačítka \'Ano\'!';
 
$lang['Inst_Step_0'] = 'Děkujeme Vám, že jste si zvolili phpBB 2 fórum. Pro úspěšnou instalaci vyplňte všechny požadované položky. Databáze, do které chcete fórum instalovat, musí existovat. Jestliže používáte databázi přes ODBC ovladače, vytvořte nejprve DSN záznam.';
 
$lang['Start_Install'] = 'Začít instalaci';
$lang['Finish_Install'] = 'Dokončit instalaci';
 
$lang['Default_lang'] = 'Výchozí jazyk boardu';
$lang['DB_Host'] = 'Adresa databázového serveru / DSN';
$lang['DB_Name'] = 'Název vaší databáze';
$lang['DB_Username'] = 'Uživatelské jméno databáze';
$lang['DB_Password'] = 'Heslo databáze';
$lang['Database'] = 'Vaše databáze';
$lang['Install_lang'] = 'Vyberte jazyk pro instalaci';
$lang['dbms'] = 'Typ databáze';
$lang['Table_Prefix'] = 'Předpona pro tabulky v databázi';
$lang['Admin_Username'] = 'Administrátorské uživ. jméno';
$lang['Admin_Password'] = 'Administrátorské heslo';
$lang['Admin_Password_confirm'] = 'Administrátorské heslo [ Potvrdit ]';
 
$lang['Inst_Step_2'] = 'Vaše uživatelské jméno bylo vytvořeno. V této chvíli je základní instalace u konce. Nyní budete přeneseni na další část, která vám umožní další správu nové instalace. Zkontrolujte, prosím, detaily Obecných preferencí a udělejte nezbytné změny. Děkujeme, že jste si vybrali phpBB 2.';
 
$lang['Unwriteable_config'] = 'Na váš konfigurační soubor nelze nyní zapisovat. Kopie tohoto souboru bude stažena, když kliknete tlačítko dole. Posléze nahrajte tento soubor do adresáře phpBB 2. Poté se přihlašte jako administrátor s heslem, které jste zadali v předchozím formuláři a navštivte administrátorské centrum (odkaz se objeví ve spodní části každé stránky poté, co se přihlásíte) a zkontrolujte obecnou konfiguraci. Děkujeme, že jste si vybrali phpBB 2.';
$lang['Download_config'] = 'Stáhnout konfigurační soubor';
 
$lang['ftp_choose'] = 'Vyberte si způsob stáhnutí';
$lang['ftp_option'] = '<br />Vzhledem k tomu, že je v této verzi umožněn rozšířený přenos php, může vám být dán prostor nejdříve přenést váš konfigurační soubor automaticky.';
$lang['ftp_instructs'] = 'Vybrali jste automatickou volbu přenosu. Zadejte, prosím, informace k uskutečnění tohoto procesu. Prosím, pamatujte na to, že cesta přenosu má být přesně taková, jakou byste zadávali cestu přes jakéhokoliv běžného klienta.';
$lang['ftp_info'] = 'Zadejte vaše informace přenosu FTP';
$lang['Attempt_ftp'] = 'Pokus o přenos konfiguračního souboru na místo';
$lang['Send_file'] = 'Pošlete mi soubor a já jej přenesu sám';
$lang['ftp_path'] = 'Cesta FTP na phpBB';
$lang['ftp_username'] = 'Vaše uživatelské jméno FTP';
$lang['ftp_password'] = 'Vaše heslo FTP';
$lang['Transfer_config'] = 'Začít přenos';
$lang['NoFTP_config'] = 'Pokus přenést soubor na místo selhal. Prosím, stáhněte a pak nahrajte konfigurační soubor sami.';
 
$lang['Install'] = 'Instalovat';
$lang['Upgrade'] = 'Inovovat verzi';
 
$lang['Install_Method'] = 'Vyberte druh instalace';
 
$lang['Install_No_Ext'] = 'Nastavení php na vašem serveru nepodporuje databázi, kterou jste zvolili';
 
$lang['Install_No_PCRE'] = 'phpBB2 požaduje the Perl-Compatible Regular Expressions Module pro php, což vaše konfigurace php zřejmě nepodporuje!';
 
 
//
// Version Check
//
$lang['Version_up_to_date'] = 'Vaše instalace je aktuální, nejsou dostupné žádné aktualizace pro tuto verzi phpBB.';
$lang['Version_not_up_to_date'] = 'Vaše instalace <b>není</b> aktuální. Aktualizace pro tuto verzi phpBB je dostupná na stránkách <a href="http://www.phpbb.com/downloads.php" target="_blank">http://www.phpbb.com/downloads.php</a>.';
$lang['Latest_version_info'] = 'Poslední dostupná verze <b>phpBB je %s</b>.';
$lang['Current_version_info'] = 'Používáte <b>phpBB %s</b>.';
$lang['Connect_socket_error'] = 'Není možné navázat spojení s phpBB serverem, chybová hláška je:<br />%s';
$lang['Socket_functions_disabled'] = 'Není možno použít funkci socket.';
$lang['Mailing_list_subscribe_reminder'] = 'Pro nejnovější informace o aktualizacích phpBB je možno se přihlásit pro <a href="http://www.phpbb.com/support/" target="_blank">zásílání novinek na váš e-mail</a>.';
$lang['Version_information'] = 'Informace o verzi';
 
 
//
// Login attempts configuration
//
$lang['Max_login_attempts'] = 'Pokusů pro přihlášení';
$lang['Max_login_attempts_explain'] = 'Maximální počet pokusů pro přihlášení na fórum.';
$lang['Login_reset_time'] = 'Doba trvání zákazu přihlášení';
$lang['Login_reset_time_explain'] = 'Počet minut po které bude trvat zákaz přihlášení v případě překročení maximálního počtu pokusů o přihlášení na fórum.';
 
//
// That's all Folks!
// -------------------------------------------------
?>
/Forum/language/lang_czech/lang_bbcode.php
0,0 → 1,70
<?php
/***************************************************************************
* lang_bbcode.php [Czech]
* -----------------------
* characterset : UTF-8
* phpBB version : 2.0.19
* copyright : © 2005 The phpBB CZ Group
* www : http://www.phpbbcz.com
* last modified : 30. 12. 2005
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
 
//
// To add an entry to your BBCode guide simply add a line to this file in this format:
// $faq[] = array('question', 'answer');
// If you want to separate a section enter $faq[] = array('--','Block heading goes here if wanted');
// Links will be created automatically
//
// DO NOT forget the ; at the end of the line.
// Do NOT put single quotes (') in your BBCode guide entries, if you absolutely must then escape them ie. \'something\'
//
// The BBCode guide items will appear on the BBCode guide page in the same order they are listed in this file
//
// If just translating this file please do not alter the actual HTML unless absolutely necessary, thanks :)
//
// In addition please do not translate the colours referenced in relation to BBCode any section, if you do
// users browsing in your language may be confused to find they're BBCode doesn't work :D You can change
// references which are 'in-line' within the text though.
//
 
$faq[] = array('--','Úvod');
$faq[] = array('Co je BBCode (značky)?', 'Značky jsou zvláštní příkazy vkládané do příspěvku. Možnost používat značky ve vašich příspěvcích povoluje administrátor. Můžete si dodatečně zakázat používání značek v jednotlivých příspěvcích ve formuláři k zaslání příspěvku. Značky jsou velmi podobné stylu HTML, příkazy jsou zapsány ve složených závorkách [] a uzavírají vždy nějaký text, který se následně chová dle těchto příkazů. Značky vám umožní rychlé formátovaní psaného textu. Sami se tedy můžete rozhodnout zda budete chtít používat tyto značky, které jsou zahrnuty ve formuláři pro odeslání příspěvku či budete používat HTML (pokud je HTML na tomto boardu povoleno).');
 
$faq[] = array('--','Formátování textu');
$faq[] = array('Jak vytvořit text psaný tučně, kurzívou či podtrženě?', 'Značky obsahují příkazy pro rychlou změnu stylu vašeho textu. Můžete se podívat jak můžete snadno dosáhnout požadovaného výsledku.<ul><li>Pro vytvoření tučně psaného textu, obklopte text mezi <b>[b][/b]</b>.<br /><br />příklad: <b>[b]</b>Ahoj<b>[/b]</b><br />Výsledkem je: <b>Ahoj</b><br /><br /><br /></li><li>Pro podtržení textu obklopte text mezi <b>[u][/u]</b>.<br /><br />příklad: <b>[u]</b>Dobrý den<b>[/u]</b><br />Výsledkem je: <u>Dobrý den</u><br /><br /><br /></li><li>Pro text psaný kurzívou obklopte text mezi <b>[i][/i]</b>.<br />příklad: Toto je <b>[i]</b>ukázka<b>[/i]</b><br />Výsledkem je: Toto je <i>ukázka</i></li></ul>');
$faq[] = array('Jak změnit barvu a velikost písma?', 'Pro změnu barvy nebo velikosti textu je určeno několik příkazů. Dejte si pozor na to, jak bude výstup zobrazen v závislosti na vašem prohlížeči a systému:<ul><li>Pro změnu barvy textu, obklopte požadovaný text mezi <b>[color=][/color]</b>. Můžete použít buď názvy barev (např. red, blue, yellow, atd.) nebo odpovídající hexadecimální kód barvy, např. #FFFFFF, #000000. Na příkladu si ukážeme, jak vytvořit červený text:<br /><br /><b>[color=red]</b>Ahoj!<b>[/color]</b><br />nebo<br /><b>[color=#FF0000]</b>Ahoj!<b>[/color]</b><br />Výsledkem bude: <span style="color:red">Ahoj!</span><br /><br /><br /></li><li>Změnu velikosti textu provedeme obdobně použitím <b>[size=][/size]</b>. Tento příkaz má předdefinované číselné hodnoty, které mají přiřazenu odpovídající velikosti písma v pixelech, počínaje 1 (velice malé písmo, nejmenší viditelné) až po 29 (velmi velké). Pro ukázku:<br /><br /><b>[size=9]</b>MALÉ<b>[/size]</b><br />Výsledkem je <span style="font-size:9px">MALÉ</span><br /><br />zatímco <b>[size=24]</b>VELKÉ<b>[/size]</b><br />zobrazí <span style="font-size:24px">VELKÉ</span></li></ul>');
$faq[] = array('Je možno spojovat formátovací značky?', 'Ano, toto je možné, na následujícím příkladu si ukážeme jak správně tyto značky zapsat. Je velice důležité dodržet i jejich sled.<br /><br />Například: <b>[size=18][color=red][b]</b>Podívej se<b>[/b][/color][/size]</b><br />Výsledkem je: <span style="color:red;font-size:18px"><b>Podívej se</b></span><br /><br />Pokud nedodržíte sled ukončení značek v pořadí v jakém byly vkládány, může být text zobrazen chybně! Vždy je zapotřebí uzavírat značky ve sledu v jakém byly zadány. Podívejte se na následující ukázku kde jsou značky nekorektně uzavřeny: <b>[b][u]</b>Toto je špatně<b>[/b][/u]</b>.');
 
$faq[] = array('--','Citace a pevná šířka textu při odeslání');
$faq[] = array('Jak vytvořit citaci?', 'Jsou dva způsoby zadání citovaného textu, s uvedením autora a bez něj.<ul><li>Když je to vhodné, můžete použít citát k příspěvku, který přidá poznámku o autorovi a text do zvláštního boxu v příspěvku. Text citace uzavřete mezi <b>[quote=""][/quote]</b>. Tento způsob přidá k citaci poznámku koho citujete. V následujícím příkladu si ukážeme jak zadáme text, který vyslovil Karel Novák:<br /><b>[quote="Karel Novák"]</b>Toto je text, který vyslovil tento pán.<b>[/quote]</b><br /> Výsledkem bude automatické přidání textu <i>Karel Novák napsal:</i> a text citace. Pokud chcete zadat text jako svůj vlastní citát případně nikoho neurčovat, zadáte jen závorky "". Tato volba není povinná.<br /><br /></li><li>Druhým způsobem je citovat pouze text. Požadovaný text, který chcete citovat uzavřete mezi <b>[quote][/quote]</b>. Když si zobrazíte výsledek takovéto zprávy, bude zde jen <i>napsal:</i> a text citátu.</li></ul>');
$faq[] = array('Výstup kódu nebo pevná šířka dat', 'Jestliže chcete vložit kus kódu nebo cokoliv co vyžaduje pevnou šířku (font typu Courier), obklopte text mezi <b>[code][/code]</b>.<br /><br />například: <b>[code]</b>echo "Toto je kód";<b>[/code]</b>');
 
$faq[] = array('--','Generování seznamu');
$faq[] = array('Vytváření jednoduchého seznamu', 'Značky obsahují i příkazy pro vytváření seznamů. Podporovány jsou dva druhy seznamů, jednoduchý a strukturovaný. Jednoduchý seznam zobrazí jednotlivé položky seznamu postupně pod sebou oddělené puntíkem. Pro vytvoření seznamu použijte <b>[list][/list]</b> a definujte jednotlivé položky pomocí <b>[*]</b>. Podívejte se na následující ukázku jednoduchého seznamu:<br /><br /><b>[list]</b><br /><b>[*]</b>červená<br /><b>[*]</b>modrá<br /><b>[*]</b>zelená<br /><b>[/list]</b><br /><br />Výsledkem by bylo:<ul><li>červená</li><li>modrá</li><li>zelená</li></ul>');
$faq[] = array('Vytváření strukturovaného seznamu', 'Druhým způsobem je vytváření strukturovaných seznamů. Od předchozího typu se liší znakem před textem jednotlivých položek, namísto tečky je zde použit některý ze dvou způsobů vzestupného označení položek seznamu. Pro vytvoření číslovaného seznamu použijte <b>[list=1][/list]</b> a pro abecední seznam <b>[list=a][/list]</b>. Jednotlivé položky seznamu definujete pomocí <b>[*]</b>. Podívejte se na následující ukázku:<br /><br /><b>[list=1]</b><br /><b>[*]</b>červená<br /><b>[*]</b>modrá<br /><b>[*]</b>zelená<br /><b>[/list]</b><br /><br />Výsledkem bude:<ol type="1"><li>červená</li><li>modrá</li><li>zelená</li></ol><br />Pro vytvoření abecedního seznamu použijte:<br /><br /><b>[list=a]</b><br /><b>[*]</b>první možná odpověď<br /><b>[*]</b>druhá možná odpověď<br /><b>[*]</b>třetí možná odpověď<br /><b>[/list]</b><br /><br />Výsledek:<ol type="a"><li>první možná odpověď</li><li>druhá možná odpověď</li><li>třetí možná odpověď</li></ol>');
 
$faq[] = array('--', 'Vytvoření odkazu');
$faq[] = array('Odkaz na jiné webové stránky', 'phpBB značky podporují vytvoření URL odkazů odkazujících se na jiné internetové stránky či e-mailové adresy.<ul><li>Prvním způsobem je použít <b>[url=][/url]</b> značky, za znak = pak doplníte URL adresu na kterou chcete odkazovat. Text mezi oběma značkama bude zvýrazněn a sloužit jako odkaz na uvedenou URL adresu. Podívejte se na následující přiklad odkazující na server phpbb.com:<br /><b>[url=http://www.phpbb.com/]</b>Stránky phpBB<b>[/url]</b><br />Tímto se vygeneruje odkaz <a href="http://www.phpbb.com/" target="_blank">Stránky phpBB</a>. Pokud kliknete na tento vytvořený odkaz, otevře se vám v novém okně prohlížeče odkaz na který směřujete.<br /><br /></li><li>Jestliže chcete zobrazit URL přímo jako odkaz použijte následující postup:<br /><b>[url]</b>http://www.phpbb.com/<b>[/url]</b><br />Tímto se vygeneruje odkaz <a href="http://www.phpbb.com/" target="_blank">http://www.phpbb.com/</a>.<br /><br /></li><li>V případě zadání syntakticky správného URL i bez počátečního http:// do textu příspěvky automaticky odkaz na zadanou URL adresu. Pro ukázku si můžete zkusit napsat do příspěvku www.phpbb.com a uvidíte, že se vám text ve výsledku zobrazí automaticky jako odkaz <a href="http://www.phpbb.com/" target="_blank">www.phpbb.com</a>.<br /><br /></li><li>Obdobným způsobem se dají vytvářet i odkazy na e-mailové adresy, zadejte požadovanou e-mailovou adresu dle příkladu:<br /><b>[email]</b>no.one@domain.adr<b>[/email]</b><br />Výsledkem pak bude <a href="mailto:no.one@domain.adr">no.one@domain.adr</a> nebo můžete zadat v textu příspěvku no.one@domain.adr a adresa se opět automaticky přemění na odkaz.</li></ul>URL odkaz můžete zadat mezi kterékoliv další značky: Uzavřete-li URL mezi <b>[img][/img]</b> (viz následující kapitola) může být odkazem i obrázek. Pouze opět nezapomeňte na správnou posloupnost uzavírání značek.<br /><br />URL adresa nesmí obsahovat mezeru, proto pokud máte takovou adresu, musíte všechny mezery nahradit znaky \'%20\' (bez uvozovek).');
 
$faq[] = array('--', 'Zobrazení obrázků v příspěvcích');
$faq[] = array('Přidání obrázku do příspěvku', 'phpBB značky dále umožňují vkládání obrázků do textu příspěvku či zprávy. Toto je velice užitečná vlastnost, díky níž nemusíte odkazovat na soubory obrázků o kterých například píšete, ale všichni uživatelé je ihned vidí ve vašem příspěvku. Jak bylo uvedeno výše, můžete využít obrázku k vytvoření URL odkazu na váš server nebo například pro zvětšeninu malého obrázku zde v příspěvku. Obrázek se musí ovšem vždy nacházet na internetu a být tak dostupný pro všechny uživatele, nelze se tedy odkazovat na soubory které máte například na lokálním disku vašeho počítače, jelikož k nim by uživatelé internetu neměli přístup. Pro zobrazení obrázku musíte uzavřít URL obrázku mezi <b>[img][/img]</b>.<br /><br />příklad: <b>[img]</b>http://www.phpbb.com/images/phplogo.gif<b>[/img]</b><br /><br />Jestliže zadáte URL adresu obrázku mezi <b>[url][/url]</b>, může být odkazem obrázek.<br /><br />příklad: <b>[url=http://www.phpbb.com/][img]</b>http://www.phpbb.com/images/phplogo.gif<b>[/img][/url]</b><br />Výsledkem bude:<br /><br /><a href="http://www.phpbb.com/" target="_blank"><img src="./templates/subSilver/images/logo_phpBB_med.gif" border="0" alt="" /></a><br /><br /><br />Prosíme, používejte obrázky přiměřené velikosti, aby vás uživatelé se slabším připojením nebo menším monitorem neproklínali.');
 
$faq[] = array('--', 'Další záležitosti');
$faq[] = array('Můžu si přidat své vlastní tagy?', 'Ne, zatím to v phpBB 2 nelze. Chystáme se nabídnout možnost přidání vlastních tagů v další verzi phpBB.');
 
//
// This ends the BBCode guide entries
//
 
?>
/Forum/language/lang_czech/lang_faq.php
0,0 → 1,97
<?php
/***************************************************************************
* lang_faq.php [Czech]
* --------------------
* characterset : UTF-8
* phpBB version : 2.0.19
* copyright : © 2005 The phpBB CZ Group
* www : http://www.phpbbcz.com
* last modified : 30. 12. 2005
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
 
//
// To add an entry to your FAQ simply add a line to this file in this format:
// $faq[] = array('question', 'answer');
// If you want to separate a section enter $faq[] = array('--','Block heading goes here if wanted');
// Links will be created automatically
//
// DO NOT forget the ; at the end of the line.
// Do NOT put single quotes (') in your FAQ entries, if you absolutely must then escape them ie. \'something\'
//
// The FAQ items will appear on the FAQ page in the same order they are listed in this file
//
 
 
$faq[] = array('--','Registrace a přihlášení');
$faq[] = array('Proč se nemohu přihlásit?', 'Už jste se zaregistrovali? Před přihlášením je nutné se nejdříve registrovat. Byla vám na fóru zakázána činnost (v takovém případě se tato skutečnost zobrazí)? Pokud ano, kontaktujte administrátora a ptejte se na důvody. Pokud jste se registrovali, nebyli jste z fóra vyloučeni a stále se nemůžete přihlásit, znovu zkontrolujte přihlašovací jméno a heslo. Obvykle toto bývá ten problém a pokud není, kontaktujte administrátora, možná má chybné nastavení fóra.');
$faq[] = array('Je vůbec potřeba se registrovat?', 'Nemusíte. Vše je na administrátorovi fóra, zda je potřeba se registrovat ke vkládání příspěvků. Samozřejmě, že registrace vám dá přístup k ostatním službám nedostupným anonymním uživatelům, jako např. postavičky, soukromé zprávy, posílání e-mailů uživatelům, přihlášení do skupin, atd. Vřele vám tedy registraci doporučujeme. Zabere to jen pár chvil.');
$faq[] = array('Proč jsem automaticky odhlášen?', 'Pokud nezaškrtnete tlačítko <i>Přihlásit automaticky při příští návštěvě</i>, budete přihlášeni jen po dobu práce na fóru. Toto má zabránit zneužití vašeho účtu někým jiným. Abyste zůstali přihlášeni, zaškrtněte toto políčko, když se přihlašujete. Toto ovšem nedoporučujeme, když se přihlašujete z veřejného počítače, např. v knihovně, internetové kavárně, univerzitě atd.');
$faq[] = array('Jak zabráním, aby se moje uživatelské jméno objevilo v seznamu právě přihlášených?', 'Ve vašem nastavení najděte možnost <i>Skrýt vaši přítomnost ve fóru</i>, pokud tuto možnost <i>zvolíte</i> budete viditelní jen pro administrátory nebo sami sobě. Budete počítáni jako skrytý uživatel.');
$faq[] = array('Zapomněl jsem heslo!', 'Nepanikařte! Vaše heslo můžeme obnovit. V tomto případě zmáčkněte na přihlašovací stránce tlačítko <i>Zapomněl jsem svoje heslo</i>, pokračujte dle instrukcí a téměř ihned budete přihlášeni');
$faq[] = array('Zaregistroval jsem se, ale nemohu se přihlásit!', 'Nejprve zkontrolujte, že zadáváte správné uživatelské jméno a heslo. Pokud jsou v pořádku, pak se mohla odehrát jedna z následujících dvou věcí. Pokud je umožněna podpora COPPA a klikli jste při registraci na odkaz <i>... a je mi méně než 13 let</i>, budete muset následovat zaslané instrukce. Pokud toto není ten případ, pak váš účet musí být aktivován. Některé boardy vyžadují aktivaci všech nových registrací, buď Vámi, nebo administrátorem před tím, než se budete moci přihlásit. Když jste se registrovali, byli byste k tomuto vyzváni. Pokud vám byl zaslán e-mail, následujte instrukce v něm obsažené, pokud jste tento email neobdrželi, ujistěte se, že vámi zadaná emailová adresa je platná. Jedním důvodem, proč se aktivace používá, je zmenšit možnost výskytu <i>nežádoucích</i> uživatelů, kteří se snaží pouze obtěžovat. Pokud si jste jisti, že e-mailová adresa, kterou jste použili je platná, kontaktujte administrátora boardu.');
$faq[] = array('V minulosti jsem se zaregistroval, ovšem nyní se nemohu přihlásit?!', 'Nejpravděpodobnější důvody: zadali jste chybné uživatelské jméno nebo heslo (zkontrolujte e-mail, který jste obdrželi při registraci) nebo administrátor z nějakého důvodu smazal váš účet. Pokud je to ten druhý případ, pak jste možná nevložili žádný příspěvek. Je to obvyklé, že se pravidelně odstraňují uživatelé, kteří ničím nepřispěli, aby se zmenšila velikost databáze. Zkuste se zaregistrovat znovu a zapojte se do diskuzí.');
 
$faq[] = array('--','Uživatelská nastavení');
$faq[] = array('Jak změním svoje nastavení?', 'Všechna vaše nastavení (pokud jste registrováni) jsou uložena v databázi. Ke změně stačí kliknout na odkaz <i>Profil</i> (obvykle se nachází v horní části stránky, ale nemusí to být pravidlem). Takto si můžete změnit veškerá svá nastavení.');
$faq[] = array('Časy jsou špatně!', 'Časy jsou téměř vždy v pořádku, ovšem to, co vidíte jsou časy zobrazené v jiném časovém pásmu než v tom, ve kterém se nacházíte. Pokud je to tak, změňte si časové pásmo v profilu. Berte na vědomí, že změnou časového pásma a podobná nastavení mohou měnit jen registrovaní uživatelé. Takže pokud nejste registrováni, toto je dobrý důvod tak učinit!');
$faq[] = array('Změnil jsem časové pásmo, ale je to stále špatně!', 'Jste si jisti, že jste zadali časové pásmo správně, a přesto se liší od toho správného, pak tou nejpravděpodobnější odpovědí je, že se jedná o letní čas. Fórum není stavěno na uplatňování rozdílu mezi standardním a letním časem, takže se může jednat o 1 hodinový rozdíl. Řešením může být posunutí časového pásma o jednu hodinu po dobu trvání letního času.');
$faq[] = array('Můj jazyk není na seznamu!', 'Zřejmě administrátor nenainstaloval tento jazyk, neboť jej nikdo do tohoto jazyka zatím nepřeložil. Kontaktujte administrátora, případně si překlad vytvořte sami. Pro více informací se podívejte na stránky <a href="http://www.phpbb.com" target="_blank">phpBB Group</a>.');
$faq[] = array('Jak zobrazím obrázek pod uživatelským jménem?', 'Možná, že jste zaregistrovali při prohlížení příspěvků dva obrázky pod uživatelským jménem. Ten první je obrázek spojený s vaší úrovní, obvykle ve tvaru hvězdiček nebo kostiček ukazující, kolik příspěvků jste již přidali nebo vaší pozici ve fóru. Pod ním se může nacházet větší obrázek, známý jako "postavička" (avatar), což je vlastně unikátní obrázek každého uživatele. Záleží na administrátorovi, zda postavičky povolí či jak s nimi naloží (v jaké podobě se zobrazí). Pokud nemůžete využívat postavičky, pak právě tehdy toto administrátoři zakázali, a vy byste se měli zeptat na důvody (věříme, že se hodí).');
$faq[] = array('Jak změní svoje zařazení?', 'Obecně vzato, svoje zařazení přímo změnit nemůžete (úrovně se objevují pod vaším uživatelským jménem v tématech a na vašem profilu, což záleží na použitém vzhledu). Většina boardů používají hodnocení úrovní k rozlišení počtu vámi přidaných příspěvků a k identifikaci určitých uživatelů, např. označení moderátorů a administrátorů může mít zvláštní vzhled. Prosím, nezatěžujte board zbytečným přispíváním jen, abyste dosáhli vyšší úrovně. Moderátor nebo administrátor pak může počet vašich příspěvků snížit.');
$faq[] = array('Když kliknu na e-mailový odkaz uživatele, jsem vyzván k přihlášení!', 'Pouze registrovaní uživatelé mohou posílat e-mail lidem přes nastavený e-mailový formulář (pokud administrátor tuto možnost povolil). Toto opatření umožňuje zbavit se otravných anonymních vzkazů a robotů, které sbírají e-mailové adresy.');
 
$faq[] = array('--','Vkládání příspěvků');
$faq[] = array('Jak vložím téma do fóra?', 'Jednouše. Klikněte na příslušné tlačítko na obrazovce fóra nebo tématu. Možná bude nutné se registrovat, než budete moci přispět do diskuze. To, co vám je povoleno můžete vidět na spodní části fóra nebo tématu (Např. <i>Můžete přidat nová téma do tohoto fóra, Můžete hlasovat v tomto fóru, atd.</i>).');
$faq[] = array('Jak změním nebo smažu příspěvek?', 'V případě, že nejste moderátor nebo administrátor, tak můžete upravovat nebo mazat jen svoje příspěvky. Můžete upravit zprávu (někdy jen do omezeného času po přispění) kliknutím na tlačítko <i>upravit</i>. Pokud již někdo odpověděl na váš příspěvek a vy ho upravíte, objeví se vám malinký dodatek u příspěvku, který ukazuje, kolikrát jste tento příspěvek upravovali. Tento dodatek se neobjeví, pokud zatím nikdo neodpověděl nebo pokud moderátor či administrátor změnili příspěvek (ti by měli sami zanechat vzkaz proč jej změnili). Normální uživatelé nemohou příspěvek smazat, pokud na něj již někdo odpověděl.');
$faq[] = array('Jak přidám podpis k mému příspěvku?', 'Přidat podpis znamená, že si musíte nejdřív nějaký vytvořit. To uděláte přes stránku <i>Profil</i>. Podpis můžete přidat k právě psanému příspěvku zatržením položky <i>Připojit podpis</i>. Můžete rovněž přidat stejný podpis pro všechny vaše příspěvky zaškrtnutím příslušného políčka v nastavení profilu (je možné nepřidávat podpis k vybraným příspěvkům odstraněním tohoto zaškrtnutí).');
$faq[] = array('Jak vytvořím hlasování?', 'Vytvoření hlasování je jednoduché. Když přidáte nový příspěvek (nebo upravujete první příspěvek, pokud můžete) měli byste vidět tlačítko <i>Přidat hlasování</i> pod hlavním oknem na přidávání příspěvků (pokud to nevidíte, zřejmě nemáte oprávnění vytvářet ankety). Měli byste zadat název ankety a pak alespoň dvě možnosti (nastavte napsáním název otázky a klikněte na <i>Přidat odpověď</i>. Můžete také přidat časový limit pro anketu, kde 0 znamená neomezenou volbu. Počet odpovědí, které můžete zadat, určuje administrátor boardu.');
$faq[] = array('Jak změním nebo smažu hlasování?', 'Je to stejné jako s příspěvky, hlasování mohou být upravována původním autorem, moderátorem nebo administrátorem. Úpravu zahájíte kliknutím na první příspěvek v tématu (toto je vždy s hlasováním spojeno). Pokud nikdo zatím nehlasoval, pak uživatelé mohou vymazat nebo změnit položku v hlasování, v případě již uskutečněné volby to tak může učinit jen moderátor nebo administrátor. Tímto opatřením se snažíme zabránit manipulaci s výsledky hlasování.');
$faq[] = array('Proč se nemohu dostat k fóru?', 'Některá fóra mohou být znepřístupněna určitým lidem či skupinám. Ke čtení, prohlížení, přispívání atd. potřebujete zvláštní autorizaci, kterou může poskytnout jen moderátor a administrátor, takže kontaktujte je.');
$faq[] = array('Proč nemohu hlasovat v anketě?', 'Hlasovat mohou jen registrovaní uživatelé (aby nebyly zkresleny výsledky). Pokud jste registrováni a stále nemůžete volit, zřejmě nemáte oprávněný přístup nebo je hlasování již ukončeno.');
 
$faq[] = array('--','Formátování a typy příspěvků');
$faq[] = array('Co je BBCode?', 'BBCode je zvláštní implementace HTML. O jeho použití rozhoduje administrátor (můžete toto nepovolit pro jednotlivé příspěvky). BBCode sám o sobě je podobný stylu HTML, tagy jsou uzavřeny v hranatých závorkách [ a ] a nabízí větší kontrolu nad tím, co a jak se zobrazí. Pro více informací o BBCode si prohlédněte <a href="./faq.php?mode=bbcode">průvodce</a>.');
$faq[] = array('Můžu používat HTML?', 'To závisí na tom, zda vám to administrátor povolí. Pokud to máte povoleno, zjistíte, že jen některé tagy fungují, což je <i>bezpečnostní</i> funkce, která zamezí zneužití nebo zničení vzhledu či způsobení jiných problémů. Pokud je HTML povoleno, můžete zase příspěvek od příspěvku tuto volbu zakázat.');
$faq[] = array('Co to jsou smajlíky?', 'Smajlíky, neboli emotikony jsou malé grafické obrázky, které se používají k vyjádření výrazu emocí za použití malého kódu, např. :) znamená šťastný, :( znamená smutný. Kompletní seznam smajlíků si můžete prohlédnout přes příspěvkový formulář. Prosím, snažte se tyto smajlíky nepřeužívat, aby se příspěvek nestal nečitelným. Moderátor může také případně váš příspěvek v tomto směru změnit.');
$faq[] = array('Mohu přidávat obrázky?', 'Obrázky se mohou zobrazovat ve vašich příspěvcích, ačkoliv v současné době neexistuje žádná funkce k nahrání obrázků přímo na board. Z tohoto důvodu musíte uvést na takový obrázek odkaz, např. http://www.nekde-na-internetu.cz/muj-obrazek.png. Nemůžete vytvářet odkazy na obrázky umístěné na vlastním PC (pokud to není veřejně přístupná stanice) nebo obrázky za prověřujícími mechanismy, např. schránky hotmail nebo yahoo, zaheslované odkazy, atd. K zobrazení obrázku použijte buď BBCode [img] tag nebo příslušné HTML (je-li povoleno).');
$faq[] = array('Co to jsou oznámení?', 'Oznámení často přinášejí důležité informace a měli byste je číst co nejdříve. Oznámení se objevují na horní části každé stránky fóra, kde jsou uvedeny. Zda můžete či nemůžete přidávat oznámení do fóra, záleží na tom, zdali vám to administrátor umožnil.');
$faq[] = array('Co to jsou důležitá témata?', 'Důležitá témata se objevují na fóru hned pod oznámeními, ale pouze na první stránce. Jsou často velmi důležitá, takže si je přečtěte tam, kde jsou. Stejně jako u oznámení rozhoduje administrátor, kteří uživatelé mají právo přidávat důležitá témata.');
$faq[] = array('Co to jsou uzamčená témata?', 'Témata mohou být uzamčena moderátorem nebo administrátorem. Nemůžete odpovídat na zamčená témata ani upravovat své příspěvky. Každé hlasování je automaticky ukončeno. Témata mohou být uzamčena z mnoha různých důvodů.');
 
$faq[] = array('--','Uživatelské úrovně a skupiny');
$faq[] = array('Kdo jsou administrátoři?', 'Administrátoři jsou lidé pověření nejvyšší kontrolou nad celým fórem. Tito lidé mohou kontrolovat veškerý chod boardu včetně povolování, zakazování uživatelů, vytváření uživatelských skupin nebo moderátorů, atd. Mají také všechny pravomoci moderátorů na celém boardu.');
$faq[] = array('Kdo jsou moderátoři?', 'Moderátoři jsou jednotlivci (nebo skupiny jednotlivců), jejichž práce je starat se o chod fóra každý den. Mají právo upravovat nebo mazat příspěvky, zamykat/odemykat, přesouvat, mazat a rozdělovat témata, která spravují. Obecně řečeno, moderátoři jsou od toho, aby lidé nepřispívali <i>mimo téma</i> nebo nepřidávali otravný materiál.');
$faq[] = array('Co jsou uživatelské skupiny?', 'Uživatelské skupiny jsou cestou, kterou administrátoři mohou seskupovat uživatele. Každý uživatel může patřit do několika skupin a každé skupině může být definován individuální přístup. To umožňuje administrátorům snáze nastavit několik uživatelů jako moderátory fóra nebo jim dát přístup na soukromé fórum, atd.');
$faq[] = array('Jak se mohu zapojit do uživatelské skupiny?', 'Připojit se do uživatelské skupiny stačí kliknout na odkaz <i>Uživatelské skupiny</i> (většinou se nachází v horní části stránky, ale nemusí to být pravidlem) a pak si můžete prohlédnout všechny skupiny. Ne všechny skupiny mají <i>otevřený přístup</i>, některé jsou uzavřené a některé mají utajené členství. Pokud je skupina otevřená, můžete zažádat o zařazení kliknutím na příslušné tlačítko. Moderátor uživatelské skupiny musí vaši žádost schválit a může se vás zeptat na důvody, proč chcete do skupiny vstoupit. Prosím, nenadávejte moderátorovi, pokud vaší žádosti nevyhoví. Má svůj důvod.');
$faq[] = array('Jak se stanu moderátorem uživatelské skupiny?', 'Uživatelské skupiny jsou původně vytvořeny administrátorem a mohou také ustanovit moderátora. Máte-li zájem vytvořit uživatelskou skupinu, pak jako prvního kontaktujte administrátora soukromou zprávou.');
 
$faq[] = array('--','Soukromé zprávy');
$faq[] = array('Nemůžu posílat soukromé zprávy!', 'Pro toto existují tři hlavní důvody. Nejste registrovaní nebo nejste přihlášení, administrátor zakázal posílání soukromých zpráv pro celý board nebo to administrátor zakázal přímo vám. Pokud je toto ten důvod, zeptejte se administrátora, proč to tomu tak je.');
$faq[] = array('Dostávám nechtěné soukromé zprávy!', 'Plánujeme přidání seznamu ignorovaných uživatelů v systému zasílání soukromých zpráv. Nyní, pokud dostáváte takové zprávy, kontaktujte svého administrátora, který má tu moc takovému uživateli zasílání zpráv zakázat.');
$faq[] = array('Dostal jsem spamový a obtížný e-mail od někoho z fóra!', 'To je nám líto. Příspěvkové formuláře obsahují obranné mechanismy, kterými se snažíme vystopovat takového uživatele. Měli byste napsat administrátorovi a zaslat kopii e-mailu, který jste obdrželi, což je velmi důležité (kvůli hlavičce, která potřebné informace obsahuje). Oni pak mohou konat.');
 
 
//
// These entries should remain in all languages and for all modifications
//
$faq[] = array('--','Záležitosti okolo phpBB 2');
$faq[] = array('Kdo napsal tento program?', 'Tento software (v její nemodifikované formě) je vytvořen, zveřejněn a chráněn autorskými právy <a href="http://www.phpbb.com/" target="_blank">phpBB Group</a>. Je dostupný pod the GNU General Public Licence a může být volně distribuován. Pro více informací klikněte <a href="http://www.phpbb.com/" target="_blank">zde</a>.');
$faq[] = array('Proč není k dispozici funkce X?', 'Tento software byl napsán a licencován přes phpBB Group. Máte-li dojem, že je potřeba přidat nějakou funkci, navštivte stránku <a href="http://www.phpbb.com/" target="_blank">http://www.phpbb.com</a> a ověřte si, co phpBB Group řekne. Prosím, nevkládejte tyto požadavky na fórum phpbb.com, phpBB Group používá sourceforge ke zkoušení nových možností. Prosím, pročtěte si fóra a ověřte si, zda už se něco takového nezkoušelo a následujte příslušné instrukce.');
$faq[] = array('Koho mám kontaktovat ohledně obtížných e-mailů nebo právních záležitostí boardu?', 'Měli byste kontaktovat administrátora tohoto boardu. Jestliže ho nemůžete najít, zkuste nejprve kontaktovat moderátora fóra a přeptejte se na kontakt. Pokud se nic neděje, kontaktujte majitele domény (zkuste vyhledat na "whois") nebo, pokud tato služba běží na freeserveru (např. yahoo, free.fr, webzdarma, atd.), management nebo oddělení stížností tohoto provozovatele. Berte na vědomí, že phpBB Group nemá vůbec žádnou moc a nemůže nijak ovlivnit to jak, kdo a kde spravuje board. Je tedy absolutně bezpředmětné kontaktovat phpBB Group v jakékoliv právní záležitosti (nactiutrhání, pomluvy, atd.) nepřímo spojený s phpbb.com nebo se samotným software phpBB. Pokud zašlete e-mail phpBB Group o použití softwaru třetí stranou, neočekávejte žádnou odpověď.');
 
 
//
// This ends the FAQ entries
//
?>
/Forum/language/lang_czech/lang_main.php
0,0 → 1,1028
<?php
/***************************************************************************
* lang_main.php [Czech]
* ---------------------
* characterset : UTF-8
* phpBB version : 2.0.20
* copyright : © 2005 The phpBB CZ Group
* www : http://www.phpbbcz.com
* last modified : 08. 04. 2006
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
 
//
// Add your details here if wanted, e.g. Name, username, email address, website
//
 
//
// The format of this file is ---> $lang['message'] = 'text';
//
// You should also try to set a locale and a character encoding (plus direction). The encoding and direction
// will be sent to the template. The locale may or may not work, it's dependent on OS support and the syntax
// varies ... give it your best guess!
//
 
 
$lang['ENCODING'] = 'UTF-8';
$lang['DIRECTION'] = 'ltr';
$lang['LEFT'] = 'left';
$lang['RIGHT'] = 'right';
$lang['DATE_FORMAT'] = 'j.n.Y'; // This should be changed to the default date format for your language, php date() format // j.n.Y == 23.5.1985
 
 
// This is optional, if you would like a _SHORT_ message output
// along with our copyright message indicating you are the translator
// please add it here.
// $lang['TRANSLATION'] = '';
 
 
//
// Common, these terms are used
// extensively on several pages
//
$lang['Forum'] = 'Fórum';
$lang['Category'] = 'Kategorie';
$lang['Topic'] = 'Téma';
$lang['Topics'] = 'Témata';
$lang['Replies'] = 'Odpovědi';
$lang['Views'] = 'Zhlédnuto';
$lang['Post'] = 'Příspěvek';
$lang['Posts'] = 'Příspěvky';
$lang['Posted'] = 'Zaslal';
$lang['Username'] = 'Uživatel';
$lang['Password'] = 'Heslo';
$lang['Email'] = 'E-mail';
$lang['Poster'] = 'Odesílatel';
$lang['Author'] = 'Autor';
$lang['Time'] = 'Čas';
$lang['Hours'] = 'Hodin';
$lang['Message'] = 'Zpráva';
 
$lang['1_Day'] = '1 den';
$lang['7_Days'] = '1 týden';
$lang['2_Weeks'] = '2 týdny';
$lang['1_Month'] = '1 měsíc';
$lang['3_Months'] = '3 měsíce';
$lang['6_Months'] = '6 měsíců';
$lang['1_Year'] = '1 rok';
 
$lang['Go'] = 'jdi';
$lang['Jump_to'] = 'Přejdi na';
$lang['Submit'] = 'Odeslat';
$lang['Reset'] = 'Původní hodnoty';
$lang['Cancel'] = 'Storno';
$lang['Preview'] = 'Náhled';
$lang['Confirm'] = 'Potvrdit';
$lang['Spellcheck'] = 'Kontrola pravopisu';
$lang['Yes'] = 'Ano';
$lang['No'] = 'Ne';
$lang['Enabled'] = 'Povoleno';
$lang['Disabled'] = 'Zakázáno';
$lang['Error'] = 'Chyba';
 
$lang['Next'] = 'Další';
$lang['Previous'] = 'Předchozí';
$lang['Goto_page'] = 'Jdi na stránku';
$lang['Joined'] = 'Založen';
$lang['IP_Address'] = 'IP adresa';
 
$lang['Select_forum'] = 'Zvolte fórum';
$lang['View_latest_post'] = 'Zobrazit poslední příspěvek';
$lang['View_newest_post'] = 'Zobraz nejnovější příspěvky';
$lang['Page_of'] = 'Strana <b>%d</b> z <b>%d</b>'; // Replaces with: Page 1 of 2 for example
 
$lang['ICQ'] = 'ICQ';
$lang['AIM'] = 'AOL Instant Messenger';
$lang['MSNM'] = 'MSN Messenger';
$lang['YIM'] = 'Yahoo Messenger';
 
$lang['Forum_Index'] = 'Obsah fóra %s'; // eg. sitename Forum Index, %s can be removed if you prefer
 
$lang['Post_new_topic'] = 'Přidat nové téma';
$lang['Reply_to_topic'] = 'Zaslat odpověď';
$lang['Reply_with_quote'] = 'Citovat';
 
$lang['Click_return_topic'] = 'Klikněte %szde%s pro návrat do tématu.'; // %s's here are for uris, do not remove!
$lang['Click_return_login'] = 'Klikněte %szde%s pro opakování volby.';
$lang['Click_return_forum'] = 'Klikněte %szde%s pro návrat na obsah fóra.';
$lang['Click_view_message'] = 'Klikněte %szde%s pro zobrazení vaší zprávy.';
$lang['Click_return_modcp'] = 'Klikněte %szde%s pro návrat do moderátorského ovládacího panelu.';
$lang['Click_return_group'] = 'Klikněte %szde%s pro návrat do informací o skupinách.';
 
$lang['Admin_panel'] = 'Administrace fóra';
 
$lang['Board_disable'] = 'Promiňte, ale toto fórum je momentálně nedostupné. Zkuste opakovat volbu později.';
 
 
//
// Global Header strings
//
$lang['Registered_users'] = 'Registrovaní uživatelé:';
$lang['Browsing_forum'] = 'Uživatelé prohlížející toto fórum:';
$lang['Online_users_zero_total'] = 'Celkem je zde přítomno <b>0</b> uživatelů: ';
$lang['Online_users_total'] = 'Celkem je zde přítomno <b>%d</b> uživatelů: ';
$lang['Online_user_total'] = 'Celkem je zde přítomen <b>%d</b> uživatel: ';
$lang['Reg_users_zero_total'] = '0 registrovaných, ';
$lang['Reg_users_total'] = '%d registrovaných, ';
$lang['Reg_user_total'] = '%d registrovaný, ';
$lang['Hidden_users_zero_total'] = '0 skrytých a ';
$lang['Hidden_user_total'] = '%d skrytý a ';
$lang['Hidden_users_total'] = '%d skrytých a ';
$lang['Guest_users_zero_total'] = '0 anonymních.';
$lang['Guest_users_total'] = '%d anonymních.';
$lang['Guest_user_total'] = '%d anonymní.';
$lang['Record_online_users'] = 'Nejvíce zde bylo současně přítomno <b>%s</b> uživatelů dne %s.'; // first %s = number of users, second %s is the date.
 
$lang['Admin_online_color'] = '%sadministrátoři%s';
$lang['Mod_online_color'] = '%smoderátoři%s';
 
$lang['You_last_visit'] = 'Naposledy jste zde byl %s'; // %s replaced by date/time
$lang['Current_time'] = 'Právě je %s'; // %s replaced by time
 
$lang['Search_new'] = 'Zobrazit nové příspěvky od poslední návštěvy';
$lang['Search_your_posts'] = 'Zobrazit vaše příspěvky';
$lang['Search_unanswered'] = 'Zobrazit příspěvky bez odpovědí';
 
$lang['Register'] = 'Registrace';
$lang['Profile'] = 'Profil';
$lang['Edit_profile'] = 'Změna nastavení';
$lang['Search'] = 'Hledat';
$lang['Memberlist'] = 'Seznam uživatelů';
$lang['FAQ'] = 'FAQ';
$lang['BBCode_guide'] = 'Průvodce značkami';
$lang['Usergroups'] = 'Uživatelské skupiny';
$lang['Last_Post'] = 'Poslední příspěvek';
$lang['Moderator'] = 'Moderátor';
$lang['Moderators'] = 'Moderátoři';
 
 
//
// Stats block text
//
$lang['Posted_articles_zero_total'] = 'Uživatelé zaslali celkem <b>0</b> příspěvků.'; // Number of posts
$lang['Posted_articles_total'] = 'Uživatelé zaslali celkem <b>%d</b> příspěvků.'; // Number of posts
$lang['Posted_article_total'] = 'Uživatelé zaslali celkem <b>%d</b> příspěvek.'; // Number of posts
$lang['Registered_users_zero_total'] = 'Je zde <b>0</b> registrovaných uživatelů.'; // # registered users
$lang['Registered_users_total'] = 'Je zde <b>%d</b> registrovaných uživatelů.'; // # registered users
$lang['Registered_user_total'] = 'Je zde <b>%d</b> registrovaný uživatel.'; // # registered users
$lang['Newest_user'] = 'Nejnovějším registrovaným uživatelem je <b>%s%s%s</b>.'; // a href, username, /a
 
$lang['No_new_posts_last_visit'] = 'Žádné nové příspěvky od vaší poslední návštěvy';
$lang['No_new_posts'] = 'Žádné nové příspěvky';
$lang['New_posts'] = 'Nové příspěvky';
$lang['New_post'] = 'Nový příspěvek';
$lang['No_new_posts_hot'] = 'Žádné nové příspěvky [oblíbené]';
$lang['New_posts_hot'] = 'Nové příspěvky [oblíbené]';
$lang['No_new_posts_locked'] = 'Žádné nové příspěvky [zamknuto]';
$lang['New_posts_locked'] = 'Nové příspěvky [zamknuto]';
$lang['Forum_is_locked'] = 'Fórum je zamknuto';
 
 
//
// Login
//
$lang['Enter_password'] = 'Zadejte prosím vaše uživatelské jméno a heslo';
$lang['Login'] = 'Přihlášení';
$lang['Logout'] = 'Odhlášení';
 
$lang['Forgotten_password'] = 'Zapomněli jste svoje heslo?';
 
$lang['Log_me_in'] = 'Přihlásit automaticky při příští návštěvě';
 
$lang['Error_login'] = 'Bylo zadáno neplatné uživatelské jméno nebo heslo.';
 
 
//
// Index page
//
$lang['Index'] = 'Fórum';
$lang['No_Posts'] = 'Žádné příspěvky';
$lang['No_forums'] = 'Žádná fóra';
 
$lang['Private_Message'] = 'Soukromá zpráva';
$lang['Private_Messages'] = 'Soukromé zprávy';
$lang['Who_is_Online'] = 'Kdo je přítomen';
 
$lang['Mark_all_forums'] = 'Označit všechna fóra jako přečtená';
$lang['Forums_marked_read'] = 'Všechna fóra byla označena jako přečtená.';
 
 
//
// Viewforum
//
$lang['View_forum'] = 'Zobrazit fórum';
 
$lang['Forum_not_exist'] = 'Zvolené fórum neexistuje.';
$lang['Reached_on_error'] = 'Došlo k chybě na této stránce.';
 
$lang['Display_topics'] = 'Zobrazit témata za předchozí';
$lang['All_Topics'] = 'Všechna témata';
 
$lang['Topic_Announcement'] = '<b>Oznámení:</b>';
$lang['Topic_Sticky'] = '<b>Důležité:</b>';
$lang['Topic_Moved'] = '<b>Přesunuto:</b>';
$lang['Topic_Poll'] = '<b>[Hlasování]</b>';
 
$lang['Mark_all_topics'] = 'Označit všechna témata jako přečtená';
$lang['Topics_marked_read'] = 'Témata tohoto fóra byla označena jako přečtená.';
 
$lang['Rules_post_can'] = '<b>Můžete</b> přidat nové téma do tohoto fóra.';
$lang['Rules_post_cannot'] = '<b>Nemůžete</b> odesílat nové téma do tohoto fóra.';
$lang['Rules_reply_can'] = '<b>Můžete</b> odpovídat na témata v tomto fóru.';
$lang['Rules_reply_cannot'] = '<b>Nemůžete</b> odpovídat na témata v tomto fóru.';
$lang['Rules_edit_can'] = '<b>Můžete</b> upravovat své příspěvky v tomto fóru.';
$lang['Rules_edit_cannot'] = '<b>Nemůžete</b> upravovat své příspěvky v tomto fóru.';
$lang['Rules_delete_can'] = '<b>Můžete</b> mazat své příspěvky v tomto fóru.';
$lang['Rules_delete_cannot'] = '<b>Nemůžete</b> mazat své příspěvky v tomto fóru.';
$lang['Rules_vote_can'] = '<b>Můžete</b> hlasovat v tomto fóru.';
$lang['Rules_vote_cannot'] = '<b>Nemůžete</b> hlasovat v tomto fóru.';
$lang['Rules_moderate'] = '<b>Můžete</b> %smoderovat toto fórum%s.'; // %s replaced by a href links, do not remove!
 
$lang['No_topics_post_one'] = 'Toto fórum neobsahuje žádná témata.<br />Klikněte na odkaz <b>Nové téma</b> pro přidání nového tématu.';
 
 
//
// Viewtopic
//
$lang['View_topic'] = 'Zobrazit téma';
 
$lang['Guest'] = 'Anonymní';
$lang['Post_subject'] = 'Předmět';
$lang['View_next_topic'] = 'Zobrazit následující téma';
$lang['View_previous_topic'] = 'Zobrazit předchozí téma';
$lang['Submit_vote'] = 'Odeslat hlas';
$lang['View_results'] = 'Zobrazit výsledek';
 
$lang['No_newer_topics'] = 'V tomto fóru nejsou žádná novější témata.';
$lang['No_older_topics'] = 'V tomto fóru nejsou žádná starší témata.';
$lang['Topic_post_not_exist'] = 'Téma nebo příspěvek který požadujete nebyl nalezen.';
$lang['No_posts_topic'] = 'Pro toto téma neexistují žádné příspěvky.';
 
$lang['Display_posts'] = 'Zobrazit příspěvky z předchozích';
$lang['All_Posts'] = 'Všechny příspěvky';
$lang['Newest_First'] = 'Nejdříve nejnovější';
$lang['Oldest_First'] = 'Nejdříve nejstarší';
 
$lang['Back_to_top'] = 'Návrat nahoru';
 
$lang['Read_profile'] = 'Zobrazit informace o autorovi';
$lang['Visit_website'] = 'Zobrazit autorovy WWW stránky';
$lang['ICQ_status'] = 'ICQ stav';
$lang['Edit_delete_post'] = 'Upravit/Odstranit tento příspěvek';
$lang['View_IP'] = 'Zobrazit IP adresu odesilatele';
$lang['Delete_post'] = 'Odstranit tento příspěvek';
 
$lang['wrote'] = 'napsal'; // proceeds the username and is followed by the quoted text
$lang['Quote'] = 'citace'; // comes before bbcode quote output.
$lang['Code'] = 'kód'; // comes before bbcode code output.
 
$lang['Edited_time_total'] = 'Naposledy upravil %s dne %s, celkově upraveno %d krát.'; // Last edited by me on 12 Oct 2001, edited 1 time in total
$lang['Edited_times_total'] = 'Naposledy upravil %s dne %s, celkově upraveno %d krát.'; // Last edited by me on 12 Oct 2001, edited 2 times in total
 
$lang['Lock_topic'] = 'Zamknout toto téma';
$lang['Unlock_topic'] = 'Odemknout toto téma';
$lang['Move_topic'] = 'Přesunout toto téma';
$lang['Delete_topic'] = 'Odstranit toto téma';
$lang['Split_topic'] = 'Rozdělit toto téma';
 
$lang['Stop_watching_topic'] = 'Ukončit sledování tohoto tématu';
$lang['Start_watching_topic'] = 'Sledovat odpovědi na toto téma';
$lang['No_longer_watching'] = 'Přestal(a) jste sledovat odpovědi na toto téma.';
$lang['You_are_watching'] = 'Začal(a) jste sledovat odpovědi na toto téma.';
 
$lang['Total_votes'] = 'Celkem hlasů';
 
 
//
// Posting/Replying (Not private messaging!)
//
$lang['Message_body'] = 'Tělo zprávy';
$lang['Topic_review'] = 'Přehled tématu';
 
$lang['No_post_mode'] = 'Nebyl zvolen typ odeslání!'; // If posting.php is called without a mode (newtopic/reply/delete/etc, shouldn't be shown normaly)
 
$lang['Post_a_new_topic'] = 'Přidat nové téma';
$lang['Post_a_reply'] = 'Odeslat odpověď';
$lang['Post_topic_as'] = 'Odeslat téma jako';
$lang['Edit_Post'] = 'Upravit příspěvek';
$lang['Options'] = 'Předvolby';
 
$lang['Post_Announcement'] = 'Oznámení';
$lang['Post_Sticky'] = 'Důležité';
$lang['Post_Normal'] = 'Normální';
 
$lang['Confirm_delete'] = 'Opravdu chcete odstranit tento příspěvek?';
$lang['Confirm_delete_poll'] = 'Opravdu chcete odstranit toto hlasování?';
 
$lang['Flood_Error'] = 'Nemůžete odeslat nový příspěvek takto brzy po předchozím příspěvku, chvíli vyčkejte a zkuste to znovu.';
$lang['Empty_subject'] = 'Musíte zadat text předmětu!';
$lang['Empty_message'] = 'Musíte zadat text příspěvku!';
$lang['Forum_locked'] = 'Toto fórum je zamknuto, nemůžete zde psát ani upravovat příspěvky!';
$lang['Topic_locked'] = 'Toto téma je zamknuto, nemůžete zde přidávat odpovědi ani upravovat své příspěvky!';
$lang['No_post_id'] = 'Musíte zvolit příspěvek, který chcete upravovat!';
$lang['No_topic_id'] = 'Musíte zvolit téma na které chcete odpovědět!';
$lang['No_valid_mode'] = 'Můžete jen odesílat, upravovat nebo citovat příspěvky, vraťte se zpět a zkuste to znovu.';
$lang['No_such_post'] = 'Takovýto příspěvek neexistuje, vraťte se zpět a zkuste to znovu.';
$lang['Edit_own_posts'] = 'Promiňte, ale můžete upravovat jen své příspěvky!';
$lang['Delete_own_posts'] = 'Promiňte, ale můžete mazat jen své příspěvky!';
$lang['Cannot_delete_replied'] = 'Promiňte, ale nemůžete mazat příspěvky, na které již bylo odpovězeno!';
$lang['Cannot_delete_poll'] = 'Promiňte, ale nemůžete vymazat aktivní hlasování!';
$lang['Empty_poll_title'] = 'Musíte napsat hlasovací otázku!';
$lang['To_few_poll_options'] = 'Musíte napsat alespoň dvě hlasovací možnosti!';
$lang['To_many_poll_options'] = 'Pokoušíte se napsat příliš mnoho hlasovacích možností.';
$lang['Post_has_no_poll'] = 'Tento příspěvek nemá hlasování.';
$lang['Already_voted'] = 'V tomto hlasování jste již hlasoval(a).';
$lang['No_vote_option'] = 'Při hlasování musíte zvolit některou z možností.';
 
$lang['Add_poll'] = 'Přidat hlasování';
$lang['Add_poll_explain'] = 'Jestliže nechcete přidat možnost hlasování k tomuto tématu, nechte pole prázdná.';
$lang['Poll_question'] = 'Hlasovací otázka';
$lang['Poll_option'] = 'Možné odpovědi';
$lang['Add_option'] = 'Přidat odpověď';
$lang['Update'] = 'Aktualizovat';
$lang['Delete'] = 'Odstranit';
$lang['Poll_for'] = 'Délka trvání';
$lang['Days'] = 'dní'; // This is used for the Run poll for ... Days + in admin_forums for pruning
$lang['Poll_for_explain'] = '(zadejte 0 nebo nevyplňujte pro neomezenou dobu hlasování)';
$lang['Delete_poll'] = 'Smazat hlasování';
 
$lang['Disable_HTML_post'] = 'Zakázat HTML v tomto příspěvku';
$lang['Disable_BBCode_post'] = 'Zakázat značky v tomto příspěvku';
$lang['Disable_Smilies_post'] = 'Zakázat smajlíky v tomto příspěvku';
 
$lang['HTML_is_ON'] = 'HTML: <u>POVOLENO</u>';
$lang['HTML_is_OFF'] = 'HTML: <u>VYPNUTO</u>';
$lang['BBCode_is_ON'] = '%sZnačky%s: <u>POVOLENY</u>'; // %s are replaced with URI pointing to FAQ
$lang['BBCode_is_OFF'] = '%sZnačky%s: <u>VYPNUTY</u>';
$lang['Smilies_are_ON'] = 'Smajlíky: <u>POVOLENY</u>';
$lang['Smilies_are_OFF'] = 'Smajlíky: <u>VYPNUTY</u>';
 
$lang['Attach_signature'] = 'Připojit podpis (podpis můžete změnit ve vašem nastavení)';
$lang['Notify'] = 'Upozornit mne, přijde-li odpověď';
 
$lang['Stored'] = 'Vaše zpráva byla úspěšně odeslána.';
$lang['Deleted'] = 'Vaše zpráva byla úspěšně odstraněna.';
$lang['Poll_delete'] = 'Hlasování bylo úspěšně odstraněno.';
$lang['Vote_cast'] = 'Váš hlas byl přijat.';
 
$lang['Topic_reply_notification'] = 'Upozornění na odpověď';
 
$lang['bbcode_b_help'] = 'Tučné: [b]text[/b] (alt+b)';
$lang['bbcode_i_help'] = 'Kurzíva: [i]text[/i] (alt+i)';
$lang['bbcode_u_help'] = 'Podtržené: [u]text[/u] (alt+u)';
$lang['bbcode_q_help'] = 'Citace: [quote]text[/quote] (alt+q)';
$lang['bbcode_c_help'] = 'Zobrazení kódu: [code]code[/code] (alt+c)';
$lang['bbcode_l_help'] = 'Seznam: [list]text[/list] (alt+l)';
$lang['bbcode_o_help'] = 'Uspořádaný seznam: [list=]text[/list] (alt+o)';
$lang['bbcode_p_help'] = 'Vložit obrázek: [img]http://image_url[/img] (alt+p)';
$lang['bbcode_w_help'] = 'Vložit URL: [url]http://url[/url] or [url=http://url]URL text[/url] (alt+w)';
$lang['bbcode_a_help'] = 'Zavře všechny otevřené značky';
$lang['bbcode_s_help'] = 'Barva písma: [color=red]text[/color] Tip: můžete použít také color=#FF0000';
$lang['bbcode_f_help'] = 'Velikost písma: [size=x-small]malý text[/size]';
 
$lang['Emoticons'] = 'Smajlíky (emotikony)';
$lang['More_emoticons'] = 'Zobrazit další smajlíky (emotikony)';
 
$lang['Font_color'] = 'Barva písma';
$lang['color_default'] = 'Výchozí';
$lang['color_dark_red'] = 'Kaštanová';
$lang['color_red'] = 'Červená';
$lang['color_orange'] = 'Oranžová';
$lang['color_brown'] = 'Hnědá';
$lang['color_yellow'] = 'Žlutá';
$lang['color_green'] = 'Zelená';
$lang['color_olive'] = 'Olivová';
$lang['color_cyan'] = 'Azurová';
$lang['color_blue'] = 'Modrá';
$lang['color_dark_blue'] = 'Tmavě modrá';
$lang['color_indigo'] = 'Fialová';
$lang['color_violet'] = 'Fuchsiová';
$lang['color_white'] = 'Bílá';
$lang['color_black'] = 'Černá';
 
$lang['Font_size'] = 'Velikost písma';
$lang['font_tiny'] = 'Drobné';
$lang['font_small'] = 'Malé';
$lang['font_normal'] = 'Výchozí';
$lang['font_large'] = 'Velké';
$lang['font_huge'] = 'Obrovské';
 
$lang['Close_Tags'] = 'zavřít značky';
$lang['Styles_tip'] = 'Tip: Styl můžete aplikovat rychleji na označeném textu.';
 
 
//
// Private Messaging
//
$lang['Private_Messaging'] = 'Soukromé zprávy';
$lang['Login_check_pm'] = 'Soukromé zprávy';
$lang['New_pms'] = 'Soukromé zprávy (%d nové)'; // You have 2 new messages
$lang['New_pm'] = 'Soukromé zprávy (%d nová)'; // You have 1 new message
$lang['No_new_pm'] = 'Soukromé zprávy';
$lang['Unread_pms'] = 'Máte %d nepřečtené zprávy';
$lang['Unread_pm'] = 'Máte %d nepřečtenou zprávu';
$lang['No_unread_pm'] = 'Nemáte žádné nepřečtené zprávy';
$lang['You_new_pm'] = 'Nová soukromá zpráva čeká na přečtení v doručených zprávách.';
$lang['You_new_pms'] = 'Nové soukromé zprávy čekají na přečtení v doručených zprávách.';
$lang['You_no_new_pm'] = 'Žádné nové soukromé zprávy nečekají na přečtení.';
$lang['Unread_message'] = 'Nepřečtená zpráva';
$lang['Read_message'] = 'Číst zprávu';
 
$lang['Read_pm'] = 'Číst zprávu';
$lang['Post_new_pm'] = 'Poslat zprávu';
$lang['Post_reply_pm'] = 'Odpovědět na zprávu';
$lang['Post_quote_pm'] = 'Citovat zprávu';
$lang['Edit_pm'] = 'Upravit zprávu';
 
$lang['Inbox'] = 'Doručené';
$lang['Outbox'] = 'Nedoručené';
$lang['Savebox'] = 'Uložené';
$lang['Sentbox'] = 'Odeslané';
$lang['Flag'] = 'Příznak';
$lang['Subject'] = 'Předmět';
$lang['From'] = 'Od';
$lang['To'] = 'Komu';
$lang['Date'] = 'Datum';
$lang['Mark'] = 'Označit';
$lang['Sent'] = 'Zasláno';
$lang['Saved'] = 'Uloženo';
$lang['Delete_marked'] = 'Odstranit označené';
$lang['Delete_all'] = 'Odstranit vše';
$lang['Save_marked'] = 'Uložit označené';
$lang['Save_message'] = 'Uložit zprávu';
$lang['Delete_message'] = 'Odstranit zprávu';
 
$lang['Display_messages'] = 'Zobrazit zprávy za předchozí'; // Followed by number of days/weeks/months
$lang['All_Messages'] = 'Všechny zprávy';
 
$lang['No_messages_folder'] = 'Nemáte žádné zprávy v této složce.';
 
$lang['PM_disabled'] = 'Posílání soukromých zpráv bylo na tomto boardu zakázáno.';
$lang['Cannot_send_privmsg'] = 'Promiňte, ale administrátor vám neumožnil zasílání soukromých zpráv.';
$lang['No_to_user'] = 'Musíte zadat uživatelské jméno aby bylo možné odeslat tuto zprávu.';
$lang['No_such_user'] = 'Tento uživatel není registrován.';
 
$lang['Disable_HTML_pm'] = 'Zakázat HTML v této zprávě';
$lang['Disable_BBCode_pm'] = 'Zakázat značky v této zprávě';
$lang['Disable_Smilies_pm'] = 'Zakázat smajlíky v této zprávě';
 
$lang['Message_sent'] = 'Vaše zpráva byla odeslána.';
 
$lang['Click_return_inbox'] = 'Klikněte %szde%s pro návrat do doručených.';
$lang['Click_return_index'] = 'Klikněte %szde%s pro návrat na obsah.';
 
$lang['Send_a_new_message'] = 'Odeslat novou soukromou zprávu';
$lang['Send_a_reply'] = 'Odpovědět na soukromou zprávu';
$lang['Edit_message'] = 'Upravit soukromou zprávu';
 
$lang['Notification_subject'] = 'Přišla nová soukromá zpráva';
 
$lang['Find_username'] = 'Hledat uživatele';
$lang['Find'] = 'Hledat';
$lang['No_match'] = 'Žádný výsledek';
 
$lang['No_post_id'] = 'Nebylo zvoleno ID zprávy.';
$lang['No_such_folder'] = 'Požadovaná složka neexistuje.';
$lang['No_folder'] = 'Nebyla zvolena složka.';
 
$lang['Mark_all'] = 'Označit vše';
$lang['Unmark_all'] = 'Odznačit vše';
 
$lang['Confirm_delete_pm'] = 'Opravdu chcete odstranit tuto zprávu?';
$lang['Confirm_delete_pms'] = 'Opravdu chcete odstranit tyto zprávy?';
 
$lang['Inbox_size'] = 'Schránka je zaplněna z %d%%.'; // eg. Your Inbox is 50% full
$lang['Sentbox_size'] = 'Schránka je zaplněna z %d%%.';
$lang['Savebox_size'] = 'Schránka je zaplněna z %d%%.';
 
$lang['Click_view_privmsg'] = 'Klikněte %szde%s pro zobrazení obsahu příchozích zpráv';
 
 
//
// Profiles/Registration
//
$lang['Viewing_user_profile'] = 'Informace o uživateli: %s'; // %s is username
$lang['About_user'] = 'Vše o uživateli %s'; // %s is username
 
$lang['Preferences'] = 'Možnosti';
$lang['Items_required'] = 'Pole označená "*" jsou povinná a musí být vyplněna';
$lang['Registration_info'] = 'Registrační údaje';
$lang['Profile_info'] = 'Osobní údaje';
$lang['Profile_info_warn'] = 'Tyto informace budou veřejně zobrazitelné';
$lang['Avatar_panel'] = 'Nastavení postaviček';
$lang['Avatar_gallery'] = 'Galerie postaviček';
 
$lang['Website'] = 'WWW';
$lang['Location'] = 'Bydliště';
$lang['Contact'] = 'Kontakt';
$lang['Email_address'] = 'E-mailová adresa';
$lang['Send_private_message'] = 'Odeslat soukromou zprávu';
$lang['Hidden_email'] = '[ skrytý ]';
$lang['Interests'] = 'Zájmy';
$lang['Occupation'] = 'Povolání';
$lang['Poster_rank'] = 'Odesilatelovo hodnocení';
 
$lang['Total_posts'] = 'Příspěvků';
$lang['User_post_pct_stats'] = '%.2f%% ze všech příspěvků'; // 1.25% of total
$lang['User_post_day_stats'] = '%.2f příspěvků za den'; // 1.5 posts per day
$lang['Search_user_posts'] = 'Hledat všechny příspěvky od uživatele %s'; // Find all posts by username
 
$lang['No_user_id_specified'] = 'Promiňte, ale tento uživatel neexistuje.';
$lang['Wrong_Profile'] = 'Nemůžete modifikovat toto nastavení, jelikož nejste jeho vlastníkem.';
 
$lang['Only_one_avatar'] = 'Může být zvolen pouze jeden obrázek postavičky.';
$lang['File_no_data'] = 'Soubor na zadané URL adrese neobsahuje žádná data.';
$lang['No_connection_URL'] = 'Nelze navázat spojení se zadanou URL adresou.';
$lang['Incomplete_URL'] = 'Vámi zadaná URL adresa není kompletní.';
$lang['Wrong_remote_avatar_format'] = 'URL adresa vzdáleného obrázku postavičky není dostupná.';
$lang['No_send_account_inactive'] = 'Promiňte, ale vaše heslo nemůže být nalezeno, protože je váš účet momentálně neaktivní. Pro více informací kontaktujte administrátora tohoto boardu.';
 
$lang['Always_smile'] = 'Vždy povolit smajlíky';
$lang['Always_html'] = 'Vždy povolit HTML';
$lang['Always_bbcode'] = 'Vždy povolit značky';
$lang['Always_add_sig'] = 'Vždy připojit můj podpis';
$lang['Always_notify'] = 'Vždy mně upozornit na odpovědi';
$lang['Always_notify_explain'] = 'Pošle e-mail když někdo odpoví na vámi poslané téma. Toto může být změněno kdykoli před odesláním nového tématu.';
 
$lang['Board_style'] = 'Vzhled fóra';
$lang['Board_lang'] = 'Jazyk fóra';
$lang['No_themes'] = 'Vzhled není v databázi';
$lang['Timezone'] = 'Časové pásmo';
$lang['Date_format'] = 'Formát data a času';
$lang['Date_format_explain'] = 'Použitá syntaxe je shodná s PHP funkcí <a href="http://www.php.net/date" target="_other">date()</a>';
$lang['Signature'] = 'Podpis';
$lang['Signature_explain'] = 'Text, který může být přidáván do vašich příspěvků<br />Maximálně %d znaků';
$lang['Public_view_email'] = 'Vždy zobrazovat mou e-mailovou adresu';
 
$lang['Current_password'] = 'Aktuální heslo';
$lang['New_password'] = 'Nové heslo';
$lang['Confirm_password'] = 'Potvrzení hesla';
$lang['Confirm_password_explain'] = 'Pokud chcete změnit heslo nebo upravit e-mailovou adresu musíte zadat vaše aktuální heslo.';
$lang['password_if_changed'] = 'Vyplňte pokud chcete změnit aktuální heslo.';
$lang['password_confirm_if_changed'] = 'Vyplňte pro potvrzení, pokud chcete změnit vaše aktuální heslo.';
 
$lang['Avatar'] = 'Obrázek postavičky';
$lang['Avatar_explain'] = 'Zobrazit malý obrázek postavičky pod podrobnostmi v příspěvcích. Pouze jeden obrázek postavičky bude zobrazen, jeho šířka by neměla být větší než %d bodů a výška %d bodů a velikost souboru by neměla přesahovat %dkB.';
$lang['Upload_Avatar_file'] = 'Nahraj obrázek postavičky ze svého počítače na server';
$lang['Upload_Avatar_URL'] = 'Přihrát obrázek postavičky z URL';
$lang['Upload_Avatar_URL_explain'] = 'Zadejte URL umístění obrázku postavičky, pro zkopírování na tento server.';
$lang['Pick_local_Avatar'] = 'Zvolte obrázek postavičky z galerie';
$lang['Link_remote_Avatar'] = 'Odkaz na vzdálený obrázek postavičky';
$lang['Link_remote_Avatar_explain'] = 'Zadejte URL umístění obrázku postavičky, na který chcete odkázat.';
$lang['Avatar_URL'] = 'URL adresa obrázku s postavičkou';
$lang['Select_from_gallery'] = 'Zvolte obrázek postavičky z galerie';
$lang['View_avatar_gallery'] = 'Zobrazit galerii postaviček';
 
$lang['Select_avatar'] = 'Zvolte obrázek postavičky';
$lang['Return_profile'] = 'Návrat do nastavení';
$lang['Select_category'] = 'Volba kategorie';
 
$lang['Delete_Image'] = 'Odstranit obrázek';
$lang['Current_Image'] = 'Aktuální obrázek';
 
$lang['Notify_on_privmsg'] = 'Upozornit na příchod nové soukromé zprávy';
$lang['Popup_on_privmsg'] = 'Otevřít nové okno při příchodu nové soukromé zprávy';
$lang['Popup_on_privmsg_explain'] = 'Některé šablony mohou otevřít nové okno, aby vás informovaly o nově příchozí soukromé zprávě.';
$lang['Hide_user'] = 'Skrýt vaší přítomnost ve fóru';
 
$lang['Profile_updated'] = 'Vaše nastavení bylo aktualizováno.';
$lang['Profile_updated_inactive'] = 'Vaše nastavení bylo aktualizováno, ale jelikož jste změnil(a) důležité informace je nyní váš účet neaktivní. Zkontrolujte váš e-mail pro informace jak jej znovu aktivovat nebo pokud je nutná administrátorská aktivace počkejte až administrátor váš účet znovu aktivuje.';
 
$lang['Password_mismatch'] = 'Zadaná hesla se neshodují.';
$lang['Current_password_mismatch'] = 'Vámi zadané aktuální heslo není správné.';
$lang['Password_long'] = 'Vaše heslo nesmí přesahovat 32 znaků.';
$lang['Username_taken'] = 'Promiňte, ale tento uživatel je již registrován.';
$lang['Username_invalid'] = 'Promiňte, ale toto uživatelské jméno obsahuje nepovolené znaky.';
$lang['Username_disallowed'] = 'Promiňte, ale toto uživatelské jméno je zakázáno.';
$lang['Email_taken'] = 'Promiňte, ale tuto e-mailovou adresu má již registrována některý uživatel.';
$lang['Email_banned'] = 'Promiňte, ale tato e-mailová adresa byla zakázána.';
$lang['Email_invalid'] = 'Promiňte, tato e-mailová adresa není platná.';
$lang['Signature_too_long'] = 'Váš podpis je příliš dlouhý.';
$lang['Fields_empty'] = 'Musíte zadat požadované údaje!';
$lang['Avatar_filetype'] = 'Obrázek postavičky musí být typu .jpg, .gif nebo .png.';
$lang['Avatar_filesize'] = 'Soubor obrázku postavičky musí být menší než %d kB.'; // The avatar image file size must be less than 6 kB
$lang['Avatar_imagesize'] = 'Obrázek postavičky musí mít šířku maximálně %d bodů a výšku %d bodů.';
 
$lang['Welcome_subject'] = 'Vítejte na %s fóru'; // Welcome to my.com forums
$lang['New_account_subject'] = 'Nový uživatelský účet';
$lang['Account_activated_subject'] = 'Účet aktivován';
 
$lang['Account_added'] = 'Děkujeme za registraci, váš účet byl vytvořen. Nyní se můžete přihlásit pod svým jménem a heslem.';
$lang['Account_inactive'] = 'Váš uživatelský účet byl vytvořen. Ovšem tento board vyžaduje aktivaci účtu. Aktivační klíč vám byl zaslán na vámi poskytnutou e-mailovou adresu, kde se dozvíte bližší informace.';
$lang['Account_inactive_admin'] = 'Váš uživatelský účet byl vytvořen. Ovšem tento board vyžaduje aktivaci účtu administrátorem. Po aktivaci administrátorem budete vyrozuměn(a) na vaší e-mailové adrese.';
$lang['Account_active'] = 'Váš účet byl aktivován. Děkujeme za registraci.';
$lang['Account_active_admin'] = 'Účet byl aktivován.';
$lang['Reactivate'] = 'Reaktivujte si svůj účet!';
$lang['Already_activated'] = 'Váš účet jste již aktivoval.';
$lang['COPPA'] = 'Váš účet byl vytvořen ale nemusí být ještě akceptován. Pro potvrzení si přečtěte bližší informace v zaslaném e-mailu.';
 
$lang['Registration'] = 'Registrační podmínky';
$lang['Reg_agreement'] = 'Ačkoliv se administrátoři a moderátoři tohoto fóra pokusí odstranit nebo upravit jakýkoliv všeobecně nežádoucí materiál tak rychle, jak je to jen možné, je nemožné prohlédnout každý příspěvek. Proto musíte vzít na vědomí, že všechny příspěvky v tomto fóru vyjadřují pohledy a názory autora příspěvku a ne administrátorů, moderátorů a webmastera (mimo příspěvků od těchto lidí), a proto za ně nemohou být zodpovědní.<br /><br />Souhlasíte s tím, že nebudete posílat žádné hanlivé, neslušné, vulgární, nenávistné, zastrašující, sexuálně orientované nebo jiné materiály, které mohou porušovat zákony. Posílání takových materiálů vám může přivodit okamžité a permanentní vyhoštění z fóra (a váš ISP bude o vaší činnosti informován). IP adresa všech příspěvků je zaznamenávána pro případ potřeby vynucení těchto podmínek. Souhlasíte, že webmaster, administrátor a moderátoři tohoto fóra mají právo odstranit, upravit, přesunout nebo ukončit jakékoliv téma, kdykoliv zjistí, že odporuje těmto podmínkám. Jako uživatel souhlasíte, že jakékoliv informace, které vložíte, budou uloženy v databázi. Dokud nebudou tyto informace prozrazeny třetí straně bez vašeho svolení, nemohou být webmaster, administrátor a moderátoři činěni zodpovědnými za jakékoliv hackerské pokusy, které mohou vést k tomu, že data budou kompromitována.<br /><br />Systém tohoto fóra používá cookies k ukládání informací na vašem počítači. Tato cookies neobsahují žádné informace, které jste vložil, slouží jen ke zvýšení vašeho pohodlí při prohlížení. E-mailová adresa je používána jen pro potvrzení vašich registračních detailů a hesla (a pro posláni nového hesla, pokud jste zapomněl aktuální).<br /><br />Kliknutím na Registraci níže souhlasíte být vázaný těmito podmínkami.';
 
$lang['Agree_under_13'] = 'Souhlasím s těmito podmínkami a je mi <b>méně</b> než 13 let.';
$lang['Agree_over_13'] = 'Souhlasím s těmito podmínkami a je mi <b>více</b> než 13 let.';
$lang['Agree_not'] = 'Nesouhlasím s těmito podmínkami.';
 
$lang['Wrong_activation'] = 'Vámi poskytnutý aktivační klíč se neshoduje s žádným z databáze.';
$lang['Send_password'] = 'Zašlete mi nové heslo';
$lang['Password_updated'] = 'Nové heslo bylo vytvořeno, očekávejte e-mail s informacemi jak jej aktivovat.';
$lang['No_email_match'] = 'E-mailová adresa nesouhlasí s adresou přiřazenou k vašemu uživatelskému jménu.';
$lang['New_password_activation'] = 'Aktivace nového hesla';
$lang['Password_activated'] = 'Váš účet byl reaktivován. Pro přihlášení použijte heslo, která vám bylo zasláno e-mailem.';
 
$lang['Send_email_msg'] = 'Odeslat e-mail';
$lang['No_user_specified'] = 'Nebyl zvolen žádný uživatel';
$lang['User_prevent_email'] = 'Tento uživatel si nepřeje přijímat odpovědi e-mailem. Zkuste mu zaslat soukromou zprávu.';
$lang['User_not_exist'] = 'Tento uživatel neexistuje.';
$lang['CC_email'] = 'Odeslat kopii tohoto e-mailu sobě.';
$lang['Email_message_desc'] = 'Tato zpráva bude zaslána jako prostý text, nebude obsahovat žádné HTML ani značky. Adresa pro odpověď na tuto zprávu bude nastavena na vaši e-mailovou adresu.';
$lang['Flood_email_limit'] = 'Nemůžete nyní odeslat další e-mail, zkuste opakovat později.';
$lang['Recipient'] = 'Příjemce';
$lang['Email_sent'] = 'E-mail byl odeslán.';
$lang['Send_email'] = 'Odeslat e-mail';
$lang['Empty_subject_email'] = 'Musíte zadat předmět e-mailu!';
$lang['Empty_message_email'] = 'Musíte zadat text zprávy!';
 
 
//
// Visual confirmation system strings
//
$lang['Confirm_code_wrong'] = 'Vámi zadaný ověřovací kód není správný!';
$lang['Too_many_registers'] = 'Překročil jste maximální množství pokusů o registraci. Prosím, zkuste to znovu později.';
$lang['Confirm_code_impaired'] = 'Pokud si nejste jistý nebo je tento kód nečitelný, kontaktujte %sadministrátora%s, který vám rád pomůže.';
$lang['Confirm_code'] = 'Ověřovací kód';
$lang['Confirm_code_explain'] = 'Zapište kód přesně tak, jak ho vidíte. Je citlivý na malá a velká písmena a nulu poznáte podle přeškrtnutí.';
 
 
//
// Memberslist
//
$lang['Select_sort_method'] = 'Setřídit dle';
$lang['Sort'] = 'Setřídit';
$lang['Sort_Top_Ten'] = 'Nejčastější přispěvatelé';
$lang['Sort_Joined'] = 'Data registrace';
$lang['Sort_Username'] = 'Jména uživatele';
$lang['Sort_Location'] = 'Bydliště';
$lang['Sort_Posts'] = 'Počtu příspěvků';
$lang['Sort_Email'] = 'E-mailu';
$lang['Sort_Website'] = 'WWW stránky';
$lang['Sort_Ascending'] = 'Vzestupně';
$lang['Sort_Descending'] = 'Sestupně';
$lang['Order'] = 'Dle pořadí';
 
 
//
// Group control panel
//
$lang['Group_Control_Panel'] = 'Skupina - Ovládací panel';
$lang['Group_member_details'] = 'Detaily členství ve skupině';
$lang['Group_member_join'] = 'Vstoupit do skupiny';
 
$lang['Group_Information'] = 'Informace o skupině';
$lang['Group_name'] = 'Jméno skupiny';
$lang['Group_description'] = 'Popis skupiny';
$lang['Group_membership'] = 'Vaše členství';
$lang['Group_Members'] = 'Členové Skupiny';
$lang['Group_Moderator'] = 'Moderátor skupiny';
$lang['Pending_members'] = 'Čekající členové';
 
$lang['Group_type'] = 'Typ skupiny';
$lang['Group_open'] = 'Otevřená skupina';
$lang['Group_closed'] = 'Uzavřená skupina';
$lang['Group_hidden'] = 'Skrytá skupina';
 
$lang['Current_memberships'] = 'Aktuální členství';
$lang['Non_member_groups'] = 'Skupiny bez členů';
$lang['Memberships_pending'] = 'Čekací členství';
 
$lang['No_groups_exist'] = 'Neexistuje žádná skupina.';
$lang['Group_not_exist'] = 'Tato skupina neexistuje.';
 
$lang['Join_group'] = 'Přihlásit se do skupiny';
$lang['No_group_members'] = 'Tato skupina nemá žádné členy.';
$lang['Group_hidden_members'] = 'Tato skupina je skrytá, nemůžete vidět seznam jejích členů.';
$lang['No_pending_group_members'] = 'Tato skupina nemá čekající členy.';
$lang['Group_joined'] = 'Úspěšně jste vstoupil do této skupiny<br />Budete informován až bude váš vstup moderátorem této skupiny odsouhlasen.';
$lang['Group_request'] = 'Vaše žádost o vstup do skupiny byla odeslána.';
$lang['Group_approved'] = 'Vaše žádost byla odsouhlasena.';
$lang['Group_added'] = 'Byl jste přijat do této skupiny.';
$lang['Already_member_group'] = 'Již jste členem této skupiny.';
$lang['User_is_member_group'] = 'Uživatel již je členem této skupiny.';
$lang['Group_type_updated'] = 'Typ skupiny byl úspěšně aktualizován.';
 
$lang['Could_not_add_user'] = 'Zvolený uživatel neexistuje.';
$lang['Could_not_anon_user'] = 'Anonymní uživatel nemůže být členem skupiny.';
 
$lang['Confirm_unsub'] = 'Opravdu chcete ukončit členství v této skupině?';
$lang['Confirm_unsub_pending'] = 'Vaše členství v této skupině zatím nebylo odsouhlaseno, opravdu je chcete ukončit?';
 
$lang['Unsub_success'] = 'Přestal jste být členem této skupiny.';
 
$lang['Approve_selected'] = 'Akceptovat zvolené';
$lang['Deny_selected'] = 'Zamítnout zvolené';
$lang['Not_logged_in'] = ' Pro vstup do skupiny musíte být přihlášen.';
$lang['Remove_selected'] = 'Odstranit zvolené';
$lang['Add_member'] = 'Přidat člena';
$lang['Not_group_moderator'] = 'Nejste moderátorem této skupiny, proto nemůžete provést tuto akci.';
 
$lang['Login_to_join'] = 'Přihlásit pro vstup do skupiny nebo úpravy členství.';
$lang['This_open_group'] = 'Toto je otevřená skupina, klikněte pro požádání o členství.';
$lang['This_closed_group'] = 'Toto je uzavřená skupina, žádní další uživatelé nejsou příjímáni.';
$lang['This_hidden_group'] = 'Toto je skrytá skupina, automatické přidávání uživatelů není dovoleno.';
$lang['Member_this_group'] = 'Jste členem této skupiny.';
$lang['Pending_this_group'] = 'Vaše členství v této skupině čeká na odsouhlasení.';
$lang['Are_group_moderator'] = 'Jste moderátorem skupiny.';
$lang['None'] = 'nikdo není přítomen';
 
$lang['Subscribe'] = 'Požádat o členství';
$lang['Unsubscribe'] = 'Ukončit členství';
$lang['View_Information'] = 'Zobrazit informace';
 
 
//
// Search
//
$lang['Search_query'] = 'Hledaný řetězec';
$lang['Search_options'] = 'Možnosti hledání';
 
$lang['Search_keywords'] = 'Klíčová slova';
$lang['Search_keywords_explain'] = 'Můžete použít <u>AND</u> pro slova, která musí být ve výsledcích, <u>OR</u> pro taková, která tam mohou náležet a <u>NOT</u> pro taková, která by ve výsledcích neměla být. Znak "*" nahradí část řetězce při vyhledávání.';
$lang['Search_author'] = 'Autora';
$lang['Search_author_explain'] = 'Znak "*" nahradí část řetězce při vyhledávání.';
 
$lang['Search_for_any'] = 'Hledej kterékoliv slovo nebo výraz jak je zadaný';
$lang['Search_for_all'] = 'Hledej všechna slova';
$lang['Search_title_msg'] = 'Hledej název tématu a text zprávy';
$lang['Search_msg_only'] = 'Hledat jen text zprávy';
 
$lang['Return_first'] = 'Zobraz prvních'; // followed by xxx characters in a select box
$lang['characters_posts'] = 'znaků z příspěvku';
 
$lang['Search_previous'] = 'Prohledej předchozí'; // followed by days, weeks, months, year, all in a select box
 
$lang['Sort_by'] = 'Setřídit dle';
$lang['Sort_Time'] = 'Čas odeslání';
$lang['Sort_Post_Subject'] = 'Předmětu';
$lang['Sort_Topic_Title'] = 'Hlavičky tématu';
$lang['Sort_Author'] = 'Autora';
$lang['Sort_Forum'] = 'Fóra';
 
$lang['Display_results'] = 'Zobrazit výsledek jako';
$lang['All_available'] = 'Všechny dostupné';
$lang['No_searchable_forums'] = 'Pokud nechcete povolit vyhledávání v libovolných fórech tohoto serveru';
 
$lang['No_search_match'] = 'Žádné téma nebo příspěvek nebyl nalezen dle zvolených kritérií.';
$lang['Found_search_match'] = 'Byl nalezen %d výsledek hledání.'; // eg. Search found 1 match
$lang['Found_search_matches'] = 'Bylo nalezeno %d výsledků hledání.'; // eg. Search found 24 matches
 
$lang['Search_Flood_Error'] = 'Nemůžete provést další hledání takto brzy po předchozím hledání, chvíli vyčkejte a zkuste to znovu.';
 
$lang['Close_window'] = 'Zavřít okno';
 
 
//
// Auth related entries
//
// Note the %s will be replaced with one of the following 'user' arrays
$lang['Sorry_auth_announce'] = 'Promiňte, ale jen %s mohou posílat oznámení do tohoto fóra.';
$lang['Sorry_auth_sticky'] = 'Promiňte, ale jen %s mohou posílat důležité zprávy do tohoto fóra.';
$lang['Sorry_auth_read'] = 'Promiňte, ale jen %s mohou číst témata v tomto fóru.';
$lang['Sorry_auth_post'] = 'Promiňte, ale jen %s mohou posílat témata do tohoto fóra.';
$lang['Sorry_auth_reply'] = 'Promiňte, ale jen %s mohou odpovídat na příspěvky v tomto fóru.';
$lang['Sorry_auth_edit'] = 'Promiňte, ale jen %s mohou upravovat příspěvky v tomto fóru.';
$lang['Sorry_auth_delete'] = 'Promiňte, ale jen %s mohou mazat příspěvky v tomto fóru.';
$lang['Sorry_auth_vote'] = 'Promiňte, ale jen %s mohou hlasovat v hlasování tohoto fóra.';
 
// These replace the %s in the above strings
$lang['Auth_Anonymous_Users'] = '<b>anonymní uživatelé</b>';
$lang['Auth_Registered_Users'] = '<b>registrovaní uživatelé</b>';
$lang['Auth_Users_granted_access'] = '<b>uživatelé se zvláštním oprávněním</b>';
$lang['Auth_Moderators'] = '<b>moderátoři</b>';
$lang['Auth_Administrators'] = '<b>administrátoři</b>';
 
$lang['Not_Moderator'] = 'Nejste moderátorem tohoto fóra.';
$lang['Not_Authorised'] = 'Neautorizovaný';
 
$lang['You_been_banned'] = 'Byl jste vykázán z tohoto fóra<br />Prosím kontaktujte webmastera nebo administrátora tohoto fóra pro získání bližších informací.';
 
 
//
// Viewonline
//
$lang['Reg_users_zero_online'] = 'Je zde 0 registrovaných uživatelů a '; // There ae 5 Registered and
$lang['Reg_users_online'] = 'Je zde %d registrovaných uživatelů a '; // There ae 5 Registered and
$lang['Reg_user_online'] = 'Je zde %d registrovaný uživatel a '; // There ae 5 Registered and
$lang['Hidden_users_zero_online'] = '0 skrytých uživatelů.'; // 6 Hidden users online
$lang['Hidden_users_online'] = '%d skrytých uživatelů.'; // 6 Hidden users online
$lang['Hidden_user_online'] = '%d skrytý uživatel.'; // 6 Hidden users online
$lang['Guest_users_online'] = 'Je zde %d anonymních uživatelů.'; // There are 10 Guest users online
$lang['Guest_users_zero_online'] = 'Je zde 0 anonymních uživatelů.'; // There are 10 Guest users online
$lang['Guest_user_online'] = 'Je zde %d anonymní uživatel.'; // There is 1 Guest user online
$lang['No_users_browsing'] = 'Momentálně zde nejsou žádní uživatelé.';
 
$lang['Online_explain'] = 'Tato data jsou založena na aktivitě uživatelů během posledních 5 minut.';
 
$lang['Forum_Location'] = 'Nachází se';
$lang['Last_updated'] = 'Poslední aktualizace';
 
$lang['Forum_index'] = 'Obsah fóra';
$lang['Logging_on'] = 'Přihlašuje se';
$lang['Posting_message'] = 'Odesílá zprávu';
$lang['Searching_forums'] = 'Prohledává fóra';
$lang['Viewing_profile'] = 'Prohlíží nastavení';
$lang['Viewing_online'] = 'Prohlíží seznam přítomných uživatelů';
$lang['Viewing_member_list'] = 'Prohlíží seznam uživatelů';
$lang['Viewing_priv_msgs'] = 'Prohlíží soukromé zprávy';
$lang['Viewing_FAQ'] = 'prohlíží FAQ';
 
 
//
// Moderator Control Panel
//
$lang['Mod_CP'] = 'Moderátor - Ovládací panel';
$lang['Mod_CP_explain'] = 'Pomocí následujícího formuláře můžete provádět hromadné zásahy do tohoto fóra. Můžete zamykat, odemykat, přesouvat a mazat jakýkoliv počet témat.';
 
$lang['Select'] = 'Zvolit';
$lang['Delete'] = 'Odstranit';
$lang['Move'] = 'Přesunout';
$lang['Lock'] = 'Zamknout';
$lang['Unlock'] = 'Odemknout';
 
$lang['Topics_Removed'] = 'Zvolená témata byla úspěšně odstraněna z databáze.';
$lang['Topics_Locked'] = 'Zvolená témata byla uzamknuta.';
$lang['Topics_Moved'] = 'Zvolená témata byla přesunuta.';
$lang['Topics_Unlocked'] = 'Zvolená témata byla odemknuta.';
$lang['No_Topics_Moved'] = 'Žádná témata nebyla přesunuta.';
 
$lang['Confirm_delete_topic'] = 'Opravdu chcete odstranit zvolená témata?';
$lang['Confirm_lock_topic'] = 'Opravdu chcete zamknout zvolená témata?';
$lang['Confirm_unlock_topic'] = 'Opravdu chcete odemknout zvolená témata?';
$lang['Confirm_move_topic'] = 'Opravdu chcete přesunout zvolená témata?';
 
$lang['Move_to_forum'] = 'Přesunout do fóra';
$lang['Leave_shadow_topic'] = 'Ponechat stínové téma ve starém fóru?';
 
$lang['Split_Topic'] = 'Rozdělení tématu - Ovládací panel';
$lang['Split_Topic_explain'] = 'Pomocí následujícího formuláře můžete téma rozdělit na dvě, buď vybráním příspěvků jednotlivě, nebo rozdělením od vybraného příspěvku.';
$lang['Split_title'] = 'Titulek nového tématu';
$lang['Split_forum'] = 'Forum pro nové téma';
$lang['Split_posts'] = 'Rozdělit vybrané příspěvky';
$lang['Split_after'] = 'Rozdělit od vybraného příspěvku';
$lang['Topic_split'] = 'Vybrané téma bylo úspěšně rozděleno';
 
$lang['Too_many_error'] = 'Vybral(a) jste příliš mnoho příspěvků. Můžete vybrat pouze jeden příspěvek, od kterého chcete téma rozdělit!';
 
$lang['None_selected'] = 'Nebylo vybrání žádné téma pro vykonání této operace. Proveďte návrat zpět a zvolte alespoň jedno téma!';
$lang['New_forum'] = 'Nové fórum';
 
$lang['This_posts_IP'] = 'IP adresa příspěvku';
$lang['Other_IP_this_user'] = 'Další IP adresy ze kterých uživatel odesílal příspěvky';
$lang['Users_this_IP'] = 'Uživatelé zasílající příspěvek z této IP adresy';
$lang['IP_info'] = 'Informace o IP adrese';
$lang['Lookup_IP'] = 'Hledat IP adresu';
 
 
//
// Timezones ... for display on each page
//
$lang['All_times'] = 'Časy uváděny v %s'; // eg. All times are GMT - 12 Hours (times from next block)
 
$lang['-12'] = 'GMT - 12 hodin';
$lang['-11'] = 'GMT - 11 hodin';
$lang['-10'] = 'GMT - 10 hodin';
$lang['-9'] = 'GMT - 9 hodin';
$lang['-8'] = 'GMT - 8 hodin';
$lang['-7'] = 'GMT - 7 hodin';
$lang['-6'] = 'GMT - 6 hodin';
$lang['-5'] = 'GMT - 5 hodin';
$lang['-4'] = 'GMT - 4 hodiny';
$lang['-3.5'] = 'GMT - 3.5 hodiny';
$lang['-3'] = 'GMT - 3 hodiny';
$lang['-2'] = 'GMT - 2 hodiny';
$lang['-1'] = 'GMT - 1 hodina';
$lang['0'] = 'GMT';
$lang['1'] = 'GMT + 1 hodina';
$lang['2'] = 'GMT + 2 hodiny';
$lang['3'] = 'GMT + 3 hodiny';
$lang['3.5'] = 'GMT + 3.5 hodiny';
$lang['4'] = 'GMT + 4 hodiny';
$lang['4.5'] = 'GMT + 4.5 hodiny';
$lang['5'] = 'GMT + 5 hodin';
$lang['5.5'] = 'GMT + 5.5 hodiny';
$lang['6'] = 'GMT + 6 hodin';
$lang['6.5'] = 'GMT + 6.5 hodiny';
$lang['7'] = 'GMT + 7 hodin';
$lang['8'] = 'GMT + 8 hodin';
$lang['9'] = 'GMT + 9 hodin';
$lang['9.5'] = 'GMT + 9.5 hodin';
$lang['10'] = 'GMT + 10 hodin';
$lang['11'] = 'GMT + 11 hodin';
$lang['12'] = 'GMT + 12 hodin';
$lang['13'] = 'GMT + 13 hodin';
 
// These are displayed in the timezone select box
$lang['tz']['-12'] = '(GMT -12:00 hodin) Eniwetok, Kwajalein';
$lang['tz']['-11'] = '(GMT -11:00 hodin) Midway Island, Samoa';
$lang['tz']['-10'] = '(GMT -10:00 hodin) Hawaii';
$lang['tz']['-9'] = '(GMT -9:00 hodin) Alaska';
$lang['tz']['-8'] = '(GMT -8:00 hodin) Pacific Time (US &amp; Canada), Tijuana';
$lang['tz']['-7'] = '(GMT -7:00 hodin) Mountain Time (US &amp; Canada), Arizona';
$lang['tz']['-6'] = '(GMT -6:00 hodin) Central Time (US &amp; Canada), Mexico City';
$lang['tz']['-5'] = '(GMT -5:00 hodin) Eastern Time (US &amp; Canada), Bogota, Lima, Quito';
$lang['tz']['-4'] = '(GMT -4:00 hodiny) Atlantic Time (Canada), Caracas, La Paz';
$lang['tz']['-3.5'] = '(GMT -3.5 hodiny) Newfoundland';
$lang['tz']['-3'] = '(GMT -3:00 hodiny) Brassila, Buenos Aires, Georgetown, Falkland Is';
$lang['tz']['-2'] = '(GMT -2:00 hodiny) Mid-Atlantic, Ascension Is., St. Helena';
$lang['tz']['-1'] = '(GMT -1:00 hodina) Azores, Cape Verde Islands';
$lang['tz']['0'] = '(GMT) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia';
$lang['tz']['1'] = '(GMT +1:00 hodina) Prague, Amsterdam, Berlin, Brussels, Madrid, Paris';
$lang['tz']['2'] = '(GMT +2:00 hodiny) Cairo, Helsinki, Kaliningrad, South Africa';
$lang['tz']['3'] = '(GMT +3:00 hodiny) Baghdad, Riyadh, Moscow, Nairobi';
$lang['tz']['3.5'] = '(GMT +3.5 hodiny) Tehran';
$lang['tz']['4'] = '(GMT +4:00 hodiny) Abu Dhabi, Baku, Muscat, Tbilisi';
$lang['tz']['4.5'] = '(GMT +4.5 hodiny) Kabul';
$lang['tz']['5'] = '(GMT +5:00 hodin) Ekaterinburg, Islamabad, Karachi, Tashkent';
$lang['tz']['5.5'] = '(GMT +5.5 hodiny) Bombay, Calcutta, Madras, New Delhi';
$lang['tz']['6'] = '(GMT +6:00 hodin) Almaty, Colombo, Dhaka, Novosibirsk';
$lang['tz']['6.5'] = '(GMT +6.5 hodiny) Rangoon';
$lang['tz']['7'] = '(GMT +7:00 hodin) Bangkok, Hanoi, Jakarta';
$lang['tz']['8'] = '(GMT +8:00 hodin) Beijing, Hong Kong, Perth, Singapore, Taipei';
$lang['tz']['9'] = '(GMT +9:00 hodin) Osaka, Sapporo, Seoul, Tokyo, Yakutsk';
$lang['tz']['9.5'] = '(GMT +9.5 hodiny) Adelaide, Darwin';
$lang['tz']['10'] = '(GMT +10:00 hodin) Canberra, Guam, Melbourne, Sydney, Vladivostok';
$lang['tz']['11'] = '(GMT +11:00 hodin) Magadan, New Caledonia, Solomon Islands';
$lang['tz']['12'] = '(GMT +12:00 hodin) Auckland, Wellington, Fiji, Marshall Island';
$lang['tz']['13'] = '(GMT +13:00 hodin) Nuku\'alofa';
 
$lang['datetime']['Sunday'] = 'neděle';
$lang['datetime']['Monday'] = 'pondělí';
$lang['datetime']['Tuesday'] = 'úterý';
$lang['datetime']['Wednesday'] = 'středa';
$lang['datetime']['Thursday'] = 'čtvrtek';
$lang['datetime']['Friday'] = 'pátek';
$lang['datetime']['Saturday'] = 'sobota';
$lang['datetime']['Sun'] = 'ne';
$lang['datetime']['Mon'] = 'po';
$lang['datetime']['Tue'] = 'út';
$lang['datetime']['Wed'] = 'st';
$lang['datetime']['Thu'] = 'čt';
$lang['datetime']['Fri'] = 'pá';
$lang['datetime']['Sat'] = 'so';
$lang['datetime']['January'] = 'leden';
$lang['datetime']['February'] = 'únor';
$lang['datetime']['March'] = 'březen';
$lang['datetime']['April'] = 'duben';
$lang['datetime']['May'] = 'květen';
$lang['datetime']['June'] = 'červen';
$lang['datetime']['July'] = 'červenec';
$lang['datetime']['August'] = 'srpen';
$lang['datetime']['September'] = 'září';
$lang['datetime']['October'] = 'říjen';
$lang['datetime']['November'] = 'listopad';
$lang['datetime']['December'] = 'prosinec';
$lang['datetime']['Jan'] = 'leden';
$lang['datetime']['Feb'] = 'únor';
$lang['datetime']['Mar'] = 'březen';
$lang['datetime']['Apr'] = 'duben';
$lang['datetime']['May'] = 'květen';
$lang['datetime']['Jun'] = 'červen';
$lang['datetime']['Jul'] = 'červenec';
$lang['datetime']['Aug'] = 'srpen';
$lang['datetime']['Sep'] = 'září';
$lang['datetime']['Oct'] = 'říjen';
$lang['datetime']['Nov'] = 'listopad';
$lang['datetime']['Dec'] = 'prosinec';
 
$lang['TRANSLATION_INFO'] = 'Český překlad <a href="http://www.phpbbcz.com" target="_blank">phpBB Czech - www.phpbbcz.com</a>';
 
//
// Errors (not related to a
// specific failure on a page)
//
$lang['Information'] = 'Informace';
$lang['Critical_Information'] = 'Kritická informace';
 
$lang['General_Error'] = 'Všeobecná chyba';
$lang['Critical_Error'] = 'Kritická chyba';
$lang['An_error_occured'] = 'Objevila se chyba';
$lang['A_critical_error'] = 'Objevila se kritická chyba';
 
$lang['Admin_reauthenticate'] = 'Pro vstup do administrátorské sekce se musíte znovu přihlásit';
 
$lang['Login_attempts_exceeded'] = 'Byl překročen maximální počet pokusů o přihlášení (%s). Následujících %s minut nebudete mít povoleno se přihlásit.';
$lang['Please_remove_install_contrib'] = 'Zkontrolujte zda jsou odstraněny složky install/ a contrib/.';
 
//
// That's all Folks!
// -------------------------------------------------
?>
/Forum/language/lang_english/email/admin_activate.tpl
0,0 → 1,10
Subject: New user account
Charset: iso-8859-1
 
Hello,
 
The account owned by "{USERNAME}" has been deactivated or newly created, you should check the details of this user (if required) and activate it using the following link:
 
{U_ACTIVATE}
 
{EMAIL_SIG}
/Forum/language/lang_english/email/admin_send_email.tpl
0,0 → 1,12
Charset: iso-8859-1
 
The following is an email sent to you by an administrator of "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address:
 
{BOARD_EMAIL}
 
Include this full email (particularly the headers).
 
Message sent to you follows:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
{MESSAGE}
/Forum/language/lang_english/email/admin_welcome_activated.tpl
0,0 → 1,8
Subject: Account Activated
Charset: iso-8859-1
 
Hello {USERNAME},
 
Your account on "{SITENAME}" has now been activated, you may login using the username and password you received in a previous email.
 
{EMAIL_SIG}
/Forum/language/lang_english/email/admin_welcome_inactive.tpl
0,0 → 1,19
Subject: Welcome to {SITENAME} Forums
Charset: iso-8859-1
 
{WELCOME_MSG}
 
Please keep this email for your records. Your account information is as follows:
 
----------------------------
Username: {USERNAME}
Password: {PASSWORD}
----------------------------
 
Your account is currently inactive, the administrator of the board will need to activate it before you can log in. You will receive another email when this has occured.
 
Please do not forget your password as it has been encrypted in our database and we cannot retrieve it for you. However, should you forget your password you can request a new one which will be activated in the same way as this account.
 
Thank you for registering.
 
{EMAIL_SIG}
/Forum/language/lang_english/email/coppa_welcome_inactive.tpl
0,0 → 1,53
Subject: Welcome to {SITENAME} Forums
Charset: iso-8859-1
 
{WELCOME_MSG}
 
In compliance with the COPPA act your account is currently inactive.
 
Please print this message out and have your parent or guardian sign and date it. Then fax it to:
 
{FAX_INFO}
 
OR mail it to:
 
{MAIL_INFO}
 
------------------------------ CUT HERE ------------------------------
Permission to Participate at {SITENAME}
 
Username: {USERNAME}
Password: {PASSWORD}
Email: {EMAIL_ADDRESS}
 
ICQ Number: {ICQ}
AIM Address: {AIM}
MSN Messenger: {MSN}
Yahoo Messenger: {YIM}
Web Site: {WEB_SITE}
From: {FROM}
Occupation: {OCC}
Interests: {INTERESTS}
 
I HAVE REVIEWED THE INFORMATION PROVIDED BY MY CHILD AND HEREBY GRANT PERMISSION TO {SITENAME} TO STORE THIS INFORMATION.
I UNDERSTAND THIS INFORMATION CAN BE CHANGED AT ANY TIME BY ENTERING A PASSWORD.
I UNDERSTAND THAT I MAY REQUEST FOR THIS INFORMATION TO BE REMOVED FROM {SITENAME} AT ANY TIME.
 
 
Parent or Guardian
(print your name here): _____________________
 
(sign here): __________________
 
Date: _______________
 
------------------------------ CUT HERE ------------------------------
 
 
Once the administrator has received the above form via fax or regular mail your account will be activated.
 
Please do not forget your password as it has been encrypted in our database and we cannot retrieve it for you. However, should you forget your password you can request a new one which will be activated in the same way as this account.
 
Thank you for registering.
 
{EMAIL_SIG}
/Forum/language/lang_english/email/group_added.tpl
0,0 → 1,12
Subject: You have been added to this usergroup
Charset: iso-8859-1
 
Congratulations,
 
You have been added to the "{GROUP_NAME}" group on {SITENAME}.
This action was done by the group moderator or the site administrator, contact them for more information.
 
You can view your groups information here:
{U_GROUPCP}
 
{EMAIL_SIG}
/Forum/language/lang_english/email/group_approved.tpl
0,0 → 1,11
Subject: Your request has been approved
Charset: iso-8859-1
 
Congratulations,
 
Your request to join the "{GROUP_NAME}" group on {SITENAME} has been approved.
Click on the following link to see your group membership.
 
{U_GROUPCP}
 
{EMAIL_SIG}
/Forum/language/lang_english/email/group_request.tpl
0,0 → 1,11
Subject: A request to join your group has been made
Charset: iso-8859-1
 
Dear {GROUP_MODERATOR},
 
A user has requested to join a group you moderate on {SITENAME}.
To approve or deny this request for group membership please visit the following link:
 
{U_GROUPCP}
 
{EMAIL_SIG}
/Forum/language/lang_english/email/index.htm
0,0 → 1,10
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
 
</body>
</html>
/Forum/language/lang_english/email/privmsg_notify.tpl
0,0 → 1,12
Subject: New Private Message has arrived
Charset: iso-8859-1
 
Hello {USERNAME},
 
You have received a new private message to your account on "{SITENAME}" and you have requested that you be notified on this event. You can view your new message by clicking on the following link:
 
{U_INBOX}
 
Remember that you can always choose not to be notified of new messages by changing the appropriate setting in your profile.
 
{EMAIL_SIG}
/Forum/language/lang_english/email/profile_send_email.tpl
0,0 → 1,14
Charset: iso-8859-1
 
Hello {TO_USERNAME},
 
The following is an email sent to you by {FROM_USERNAME} via your account on {SITENAME}. If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address:
 
{BOARD_EMAIL}
 
Include this full email (particularly the headers). Please note that the reply address to this email has been set to that of {FROM_USERNAME}.
 
Message sent to you follows
~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
{MESSAGE}
/Forum/language/lang_english/email/topic_notify.tpl
0,0 → 1,14
Subject: Topic Reply Notification - {TOPIC_TITLE}
Charset: iso-8859-1
 
Hello,
 
You are receiving this email because you are watching the topic, "{TOPIC_TITLE}" at {SITENAME}. This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.
 
{U_TOPIC}
 
If you no longer wish to watch this topic you can either click the "Stop watching this topic link" found at the bottom of the topic above, or by clicking the following link:
 
{U_STOP_WATCHING_TOPIC}
 
{EMAIL_SIG}
/Forum/language/lang_english/email/user_activate.tpl
0,0 → 1,10
Subject: Reactivate your account
Charset: iso-8859-1
 
Hello {USERNAME},
 
Your account on "{SITENAME}" has been deactivated, most likely due to changes made to your profile. In order to reactivate your account you must click on the link below:
 
{U_ACTIVATE}
 
{EMAIL_SIG}
/Forum/language/lang_english/email/user_activate_passwd.tpl
0,0 → 1,18
Subject: New password activation
Charset: iso-8859-1
 
Hello {USERNAME}
 
You are receiving this email because you have (or someone pretending to be you has) requested a new password be sent for your account on {SITENAME}. If you did not request this email then please ignore it, if you keep receiving it please contact the board administrator.
 
To use the new password you need to activate it. To do this click the link provided below.
 
{U_ACTIVATE}
 
If successful you will be able to login using the following password:
 
Password: {PASSWORD}
 
You can of course change this password yourself via the profile page. If you have any difficulties please contact the board administrator.
 
{EMAIL_SIG}
/Forum/language/lang_english/email/user_welcome.tpl
0,0 → 1,17
Subject: Welcome to {SITENAME} Forums
Charset: iso-8859-1
 
{WELCOME_MSG}
 
Please keep this email for your records. Your account information is as follows:
 
----------------------------
Username: {USERNAME}
Password: {PASSWORD}
----------------------------
 
Please do not forget your password as it has been encrypted in our database and we cannot retrieve it for you. However, should you forget your password you can request a new one which will be activated in the same way as this account.
 
Thank you for registering.
 
{EMAIL_SIG}
/Forum/language/lang_english/email/user_welcome_inactive.tpl
0,0 → 1,21
Subject: Welcome to {SITENAME} Forums
Charset: iso-8859-1
 
{WELCOME_MSG}
 
Please keep this email for your records. Your account information is as follows:
 
----------------------------
Username: {USERNAME}
Password: {PASSWORD}
----------------------------
 
Your account is currently inactive. You cannot use it until you visit the following link:
 
{U_ACTIVATE}
 
Please do not forget your password as it has been encrypted in our database and we cannot retrieve it for you. However, should you forget your password you can request a new one which will be activated in the same way as this account.
 
Thank you for registering.
 
{EMAIL_SIG}
/Forum/language/lang_english/index.htm
0,0 → 1,10
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
 
</body>
</html>
/Forum/language/lang_english/lang_admin.php
0,0 → 1,766
<?php
 
/***************************************************************************
* lang_admin.php [English]
* -------------------
* begin : Sat Dec 16 2000
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: lang_admin.php,v 1.35.2.17 2006/02/05 15:59:48 grahamje Exp $
*
****************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
/* CONTRIBUTORS
2002-12-15 Philip M. White (pwhite@mailhaven.com)
Fixed many minor grammatical mistakes
*/
 
//
// Format is same as lang_main
//
 
//
// Modules, this replaces the keys used
// in the modules[][] arrays in each module file
//
$lang['General'] = 'General Admin';
$lang['Users'] = 'User Admin';
$lang['Groups'] = 'Group Admin';
$lang['Forums'] = 'Forum Admin';
$lang['Styles'] = 'Styles Admin';
 
$lang['Configuration'] = 'Configuration';
$lang['Permissions'] = 'Permissions';
$lang['Manage'] = 'Management';
$lang['Disallow'] = 'Disallow names';
$lang['Prune'] = 'Pruning';
$lang['Mass_Email'] = 'Mass Email';
$lang['Ranks'] = 'Ranks';
$lang['Smilies'] = 'Smilies';
$lang['Ban_Management'] = 'Ban Control';
$lang['Word_Censor'] = 'Word Censors';
$lang['Export'] = 'Export';
$lang['Create_new'] = 'Create';
$lang['Add_new'] = 'Add';
$lang['Backup_DB'] = 'Backup Database';
$lang['Restore_DB'] = 'Restore Database';
 
 
//
// Index
//
$lang['Admin'] = 'Administration';
$lang['Not_admin'] = 'You are not authorised to administer this board';
$lang['Welcome_phpBB'] = 'Welcome to phpBB';
$lang['Admin_intro'] = 'Thank you for choosing phpBB as your forum solution. This screen will give you a quick overview of all the various statistics of your board. You can get back to this page by clicking on the <u>Admin Index</u> link in the left pane. To return to the index of your board, click the phpBB logo also in the left pane. The other links on the left hand side of this screen will allow you to control every aspect of your forum experience. Each screen will have instructions on how to use the tools.';
$lang['Main_index'] = 'Forum Index';
$lang['Forum_stats'] = 'Forum Statistics';
$lang['Admin_Index'] = 'Admin Index';
$lang['Preview_forum'] = 'Preview Forum';
 
$lang['Click_return_admin_index'] = 'Click %sHere%s to return to the Admin Index';
 
$lang['Statistic'] = 'Statistic';
$lang['Value'] = 'Value';
$lang['Number_posts'] = 'Number of posts';
$lang['Posts_per_day'] = 'Posts per day';
$lang['Number_topics'] = 'Number of topics';
$lang['Topics_per_day'] = 'Topics per day';
$lang['Number_users'] = 'Number of users';
$lang['Users_per_day'] = 'Users per day';
$lang['Board_started'] = 'Board started';
$lang['Avatar_dir_size'] = 'Avatar directory size';
$lang['Database_size'] = 'Database size';
$lang['Gzip_compression'] ='Gzip compression';
$lang['Not_available'] = 'Not available';
 
$lang['ON'] = 'ON'; // This is for GZip compression
$lang['OFF'] = 'OFF';
 
 
//
// DB Utils
//
$lang['Database_Utilities'] = 'Database Utilities';
 
$lang['Restore'] = 'Restore';
$lang['Backup'] = 'Backup';
$lang['Restore_explain'] = 'This will perform a full restore of all phpBB tables from a saved file. If your server supports it, you may upload a gzip-compressed text file and it will automatically be decompressed. <b>WARNING</b>: This will overwrite any existing data. The restore may take a long time to process, so please do not move from this page until it is complete.';
$lang['Backup_explain'] = 'Here you can back up all your phpBB-related data. If you have any additional custom tables in the same database with phpBB that you would like to back up as well, please enter their names, separated by commas, in the Additional Tables textbox below. If your server supports it you may also gzip-compress the file to reduce its size before download.';
 
$lang['Backup_options'] = 'Backup options';
$lang['Start_backup'] = 'Start Backup';
$lang['Full_backup'] = 'Full backup';
$lang['Structure_backup'] = 'Structure-Only backup';
$lang['Data_backup'] = 'Data only backup';
$lang['Additional_tables'] = 'Additional tables';
$lang['Gzip_compress'] = 'Gzip compress file';
$lang['Select_file'] = 'Select a file';
$lang['Start_Restore'] = 'Start Restore';
 
$lang['Restore_success'] = 'The Database has been successfully restored.<br /><br />Your board should be back to the state it was when the backup was made.';
$lang['Backup_download'] = 'Your download will start shortly; please wait until it begins.';
$lang['Backups_not_supported'] = 'Sorry, but database backups are not currently supported for your database system.';
 
$lang['Restore_Error_uploading'] = 'Error in uploading the backup file';
$lang['Restore_Error_filename'] = 'Filename problem; please try an alternative file';
$lang['Restore_Error_decompress'] = 'Cannot decompress a gzip file; please upload a plain text version';
$lang['Restore_Error_no_file'] = 'No file was uploaded';
 
 
//
// Auth pages
//
$lang['Select_a_User'] = 'Select a User';
$lang['Select_a_Group'] = 'Select a Group';
$lang['Select_a_Forum'] = 'Select a Forum';
$lang['Auth_Control_User'] = 'User Permissions Control';
$lang['Auth_Control_Group'] = 'Group Permissions Control';
$lang['Auth_Control_Forum'] = 'Forum Permissions Control';
$lang['Look_up_User'] = 'Look up User';
$lang['Look_up_Group'] = 'Look up Group';
$lang['Look_up_Forum'] = 'Look up Forum';
 
$lang['Group_auth_explain'] = 'Here you can alter the permissions and moderator status assigned to each user group. Do not forget when changing group permissions that individual user permissions may still allow the user entry to forums, etc. You will be warned if this is the case.';
$lang['User_auth_explain'] = 'Here you can alter the permissions and moderator status assigned to each individual user. Do not forget when changing user permissions that group permissions may still allow the user entry to forums, etc. You will be warned if this is the case.';
$lang['Forum_auth_explain'] = 'Here you can alter the authorisation levels of each forum. You will have both a simple and advanced method for doing this, where advanced offers greater control of each forum operation. Remember that changing the permission level of forums will affect which users can carry out the various operations within them.';
 
$lang['Simple_mode'] = 'Simple Mode';
$lang['Advanced_mode'] = 'Advanced Mode';
$lang['Moderator_status'] = 'Moderator status';
 
$lang['Allowed_Access'] = 'Allowed Access';
$lang['Disallowed_Access'] = 'Disallowed Access';
$lang['Is_Moderator'] = 'Is Moderator';
$lang['Not_Moderator'] = 'Not Moderator';
 
$lang['Conflict_warning'] = 'Authorisation Conflict Warning';
$lang['Conflict_access_userauth'] = 'This user still has access rights to this forum via group membership. You may want to alter the group permissions or remove this user the group to fully prevent them having access rights. The groups granting rights (and the forums involved) are noted below.';
$lang['Conflict_mod_userauth'] = 'This user still has moderator rights to this forum via group membership. You may want to alter the group permissions or remove this user the group to fully prevent them having moderator rights. The groups granting rights (and the forums involved) are noted below.';
 
$lang['Conflict_access_groupauth'] = 'The following user (or users) still have access rights to this forum via their user permission settings. You may want to alter the user permissions to fully prevent them having access rights. The users granted rights (and the forums involved) are noted below.';
$lang['Conflict_mod_groupauth'] = 'The following user (or users) still have moderator rights to this forum via their user permissions settings. You may want to alter the user permissions to fully prevent them having moderator rights. The users granted rights (and the forums involved) are noted below.';
 
$lang['Public'] = 'Public';
$lang['Private'] = 'Private';
$lang['Registered'] = 'Registered';
$lang['Administrators'] = 'Administrators';
$lang['Hidden'] = 'Hidden';
 
// These are displayed in the drop down boxes for advanced
// mode forum auth, try and keep them short!
$lang['Forum_ALL'] = 'ALL';
$lang['Forum_REG'] = 'REG';
$lang['Forum_PRIVATE'] = 'PRIVATE';
$lang['Forum_MOD'] = 'MOD';
$lang['Forum_ADMIN'] = 'ADMIN';
 
$lang['View'] = 'View';
$lang['Read'] = 'Read';
$lang['Post'] = 'Post';
$lang['Reply'] = 'Reply';
$lang['Edit'] = 'Edit';
$lang['Delete'] = 'Delete';
$lang['Sticky'] = 'Sticky';
$lang['Announce'] = 'Announce';
$lang['Vote'] = 'Vote';
$lang['Pollcreate'] = 'Poll create';
 
$lang['Permissions'] = 'Permissions';
$lang['Simple_Permission'] = 'Simple Permissions';
 
$lang['User_Level'] = 'User Level';
$lang['Auth_User'] = 'User';
$lang['Auth_Admin'] = 'Administrator';
$lang['Group_memberships'] = 'Usergroup memberships';
$lang['Usergroup_members'] = 'This group has the following members';
 
$lang['Forum_auth_updated'] = 'Forum permissions updated';
$lang['User_auth_updated'] = 'User permissions updated';
$lang['Group_auth_updated'] = 'Group permissions updated';
 
$lang['Auth_updated'] = 'Permissions have been updated';
$lang['Click_return_userauth'] = 'Click %sHere%s to return to User Permissions';
$lang['Click_return_groupauth'] = 'Click %sHere%s to return to Group Permissions';
$lang['Click_return_forumauth'] = 'Click %sHere%s to return to Forum Permissions';
 
 
//
// Banning
//
$lang['Ban_control'] = 'Ban Control';
$lang['Ban_explain'] = 'Here you can control the banning of users. You can achieve this by banning either or both of a specific user or an individual or range of IP addresses or hostnames. These methods prevent a user from even reaching the index page of your board. To prevent a user from registering under a different username you can also specify a banned email address. Please note that banning an email address alone will not prevent that user from being able to log on or post to your board. You should use one of the first two methods to achieve this.';
$lang['Ban_explain_warn'] = 'Please note that entering a range of IP addresses results in all the addresses between the start and end being added to the banlist. Attempts will be made to minimise the number of addresses added to the database by introducing wildcards automatically where appropriate. If you really must enter a range, try to keep it small or better yet state specific addresses.';
 
$lang['Select_username'] = 'Select a Username';
$lang['Select_ip'] = 'Select an IP address';
$lang['Select_email'] = 'Select an Email address';
 
$lang['Ban_username'] = 'Ban one or more specific users';
$lang['Ban_username_explain'] = 'You can ban multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser';
 
$lang['Ban_IP'] = 'Ban one or more IP addresses or hostnames';
$lang['IP_hostname'] = 'IP addresses or hostnames';
$lang['Ban_IP_explain'] = 'To specify several different IP addresses or hostnames separate them with commas. To specify a range of IP addresses, separate the start and end with a hyphen (-); to specify a wildcard, use an asterisk (*).';
 
$lang['Ban_email'] = 'Ban one or more email addresses';
$lang['Ban_email_explain'] = 'To specify more than one email address, separate them with commas. To specify a wildcard username, use * like *@hotmail.com';
 
$lang['Unban_username'] = 'Un-ban one more specific users';
$lang['Unban_username_explain'] = 'You can unban multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser';
 
$lang['Unban_IP'] = 'Un-ban one or more IP addresses';
$lang['Unban_IP_explain'] = 'You can unban multiple IP addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser';
 
$lang['Unban_email'] = 'Un-ban one or more email addresses';
$lang['Unban_email_explain'] = 'You can unban multiple email addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser';
 
$lang['No_banned_users'] = 'No banned usernames';
$lang['No_banned_ip'] = 'No banned IP addresses';
$lang['No_banned_email'] = 'No banned email addresses';
 
$lang['Ban_update_sucessful'] = 'The banlist has been updated successfully';
$lang['Click_return_banadmin'] = 'Click %sHere%s to return to Ban Control';
 
 
//
// Configuration
//
$lang['General_Config'] = 'General Configuration';
$lang['Config_explain'] = 'The form below will allow you to customize all the general board options. For User and Forum configurations use the related links on the left hand side.';
 
$lang['Click_return_config'] = 'Click %sHere%s to return to General Configuration';
 
$lang['General_settings'] = 'General Board Settings';
$lang['Server_name'] = 'Domain Name';
$lang['Server_name_explain'] = 'The domain name from which this board runs';
$lang['Script_path'] = 'Script path';
$lang['Script_path_explain'] = 'The path where phpBB2 is located relative to the domain name';
$lang['Server_port'] = 'Server Port';
$lang['Server_port_explain'] = 'The port your server is running on, usually 80. Only change if different';
$lang['Site_name'] = 'Site name';
$lang['Site_desc'] = 'Site description';
$lang['Board_disable'] = 'Disable board';
$lang['Board_disable_explain'] = 'This will make the board unavailable to users. Administrators are able to access the Administration Panel while the board is disabled.';
$lang['Acct_activation'] = 'Enable account activation';
$lang['Acc_None'] = 'None'; // These three entries are the type of activation
$lang['Acc_User'] = 'User';
$lang['Acc_Admin'] = 'Admin';
 
$lang['Abilities_settings'] = 'User and Forum Basic Settings';
$lang['Max_poll_options'] = 'Max number of poll options';
$lang['Flood_Interval'] = 'Flood Interval';
$lang['Flood_Interval_explain'] = 'Number of seconds a user must wait between posts';
$lang['Board_email_form'] = 'User email via board';
$lang['Board_email_form_explain'] = 'Users send email to each other via this board';
$lang['Topics_per_page'] = 'Topics Per Page';
$lang['Posts_per_page'] = 'Posts Per Page';
$lang['Hot_threshold'] = 'Posts for Popular Threshold';
$lang['Default_style'] = 'Default Style';
$lang['Override_style'] = 'Override user style';
$lang['Override_style_explain'] = 'Replaces users style with the default';
$lang['Default_language'] = 'Default Language';
$lang['Date_format'] = 'Date Format';
$lang['System_timezone'] = 'System Timezone';
$lang['Enable_gzip'] = 'Enable GZip Compression';
$lang['Enable_prune'] = 'Enable Forum Pruning';
$lang['Allow_HTML'] = 'Allow HTML';
$lang['Allow_BBCode'] = 'Allow BBCode';
$lang['Allowed_tags'] = 'Allowed HTML tags';
$lang['Allowed_tags_explain'] = 'Separate tags with commas';
$lang['Allow_smilies'] = 'Allow Smilies';
$lang['Smilies_path'] = 'Smilies Storage Path';
$lang['Smilies_path_explain'] = 'Path under your phpBB root dir, e.g. images/smiles';
$lang['Allow_sig'] = 'Allow Signatures';
$lang['Max_sig_length'] = 'Maximum signature length';
$lang['Max_sig_length_explain'] = 'Maximum number of characters in user signatures';
$lang['Allow_name_change'] = 'Allow Username changes';
 
$lang['Avatar_settings'] = 'Avatar Settings';
$lang['Allow_local'] = 'Enable gallery avatars';
$lang['Allow_remote'] = 'Enable remote avatars';
$lang['Allow_remote_explain'] = 'Avatars linked to from another website';
$lang['Allow_upload'] = 'Enable avatar uploading';
$lang['Max_filesize'] = 'Maximum Avatar File Size';
$lang['Max_filesize_explain'] = 'For uploaded avatar files';
$lang['Max_avatar_size'] = 'Maximum Avatar Dimensions';
$lang['Max_avatar_size_explain'] = '(Height x Width in pixels)';
$lang['Avatar_storage_path'] = 'Avatar Storage Path';
$lang['Avatar_storage_path_explain'] = 'Path under your phpBB root dir, e.g. images/avatars';
$lang['Avatar_gallery_path'] = 'Avatar Gallery Path';
$lang['Avatar_gallery_path_explain'] = 'Path under your phpBB root dir for pre-loaded images, e.g. images/avatars/gallery';
 
$lang['COPPA_settings'] = 'COPPA Settings';
$lang['COPPA_fax'] = 'COPPA Fax Number';
$lang['COPPA_mail'] = 'COPPA Mailing Address';
$lang['COPPA_mail_explain'] = 'This is the mailing address to which parents will send COPPA registration forms';
 
$lang['Email_settings'] = 'Email Settings';
$lang['Admin_email'] = 'Admin Email Address';
$lang['Email_sig'] = 'Email Signature';
$lang['Email_sig_explain'] = 'This text will be attached to all emails the board sends';
$lang['Use_SMTP'] = 'Use SMTP Server for email';
$lang['Use_SMTP_explain'] = 'Say yes if you want or have to send email via a named server instead of the local mail function';
$lang['SMTP_server'] = 'SMTP Server Address';
$lang['SMTP_username'] = 'SMTP Username';
$lang['SMTP_username_explain'] = 'Only enter a username if your SMTP server requires it';
$lang['SMTP_password'] = 'SMTP Password';
$lang['SMTP_password_explain'] = 'Only enter a password if your SMTP server requires it';
 
$lang['Disable_privmsg'] = 'Private Messaging';
$lang['Inbox_limits'] = 'Max posts in Inbox';
$lang['Sentbox_limits'] = 'Max posts in Sentbox';
$lang['Savebox_limits'] = 'Max posts in Savebox';
 
$lang['Cookie_settings'] = 'Cookie settings';
$lang['Cookie_settings_explain'] = 'These details define how cookies are sent to your users\' browsers. In most cases the default values for the cookie settings should be sufficient, but if you need to change them do so with care -- incorrect settings can prevent users from logging in';
$lang['Cookie_domain'] = 'Cookie domain';
$lang['Cookie_name'] = 'Cookie name';
$lang['Cookie_path'] = 'Cookie path';
$lang['Cookie_secure'] = 'Cookie secure';
$lang['Cookie_secure_explain'] = 'If your server is running via SSL, set this to enabled, else leave as disabled';
$lang['Session_length'] = 'Session length [ seconds ]';
 
// Visual Confirmation
$lang['Visual_confirm'] = 'Enable Visual Confirmation';
$lang['Visual_confirm_explain'] = 'Requires users enter a code defined by an image when registering.';
 
// Autologin Keys - added 2.0.18
$lang['Allow_autologin'] = 'Allow automatic logins';
$lang['Allow_autologin_explain'] = 'Determines whether users are allowed to select to be automatically logged in when visiting the forum';
$lang['Autologin_time'] = 'Automatic login key expiry';
$lang['Autologin_time_explain'] = 'How long a autologin key is valid for in days if the user does not visit the board. Set to zero to disable expiry.';
 
// Search Flood Control - added 2.0.20
$lang['Search_Flood_Interval'] = 'Search Flood Interval';
$lang['Search_Flood_Interval_explain'] = 'Number of seconds a user must wait between search requests';
 
//
// Forum Management
//
$lang['Forum_admin'] = 'Forum Administration';
$lang['Forum_admin_explain'] = 'From this panel you can add, delete, edit, re-order and re-synchronise categories and forums';
$lang['Edit_forum'] = 'Edit forum';
$lang['Create_forum'] = 'Create new forum';
$lang['Create_category'] = 'Create new category';
$lang['Remove'] = 'Remove';
$lang['Action'] = 'Action';
$lang['Update_order'] = 'Update Order';
$lang['Config_updated'] = 'Forum Configuration Updated Successfully';
$lang['Edit'] = 'Edit';
$lang['Delete'] = 'Delete';
$lang['Move_up'] = 'Move up';
$lang['Move_down'] = 'Move down';
$lang['Resync'] = 'Resync';
$lang['No_mode'] = 'No mode was set';
$lang['Forum_edit_delete_explain'] = 'The form below will allow you to customize all the general board options. For User and Forum configurations use the related links on the left hand side';
 
$lang['Move_contents'] = 'Move all contents';
$lang['Forum_delete'] = 'Delete Forum';
$lang['Forum_delete_explain'] = 'The form below will allow you to delete a forum (or category) and decide where you want to put all topics (or forums) it contained.';
 
$lang['Status_locked'] = 'Locked';
$lang['Status_unlocked'] = 'Unlocked';
$lang['Forum_settings'] = 'General Forum Settings';
$lang['Forum_name'] = 'Forum name';
$lang['Forum_desc'] = 'Description';
$lang['Forum_status'] = 'Forum status';
$lang['Forum_pruning'] = 'Auto-pruning';
 
$lang['prune_freq'] = 'Check for topic age every';
$lang['prune_days'] = 'Remove topics that have not been posted to in';
$lang['Set_prune_data'] = 'You have turned on auto-prune for this forum but did not set a frequency or number of days to prune. Please go back and do so.';
 
$lang['Move_and_Delete'] = 'Move and Delete';
 
$lang['Delete_all_posts'] = 'Delete all posts';
$lang['Nowhere_to_move'] = 'Nowhere to move to';
 
$lang['Edit_Category'] = 'Edit Category';
$lang['Edit_Category_explain'] = 'Use this form to modify a category\'s name.';
 
$lang['Forums_updated'] = 'Forum and Category information updated successfully';
 
$lang['Must_delete_forums'] = 'You need to delete all forums before you can delete this category';
 
$lang['Click_return_forumadmin'] = 'Click %sHere%s to return to Forum Administration';
 
 
//
// Smiley Management
//
$lang['smiley_title'] = 'Smiles Editing Utility';
$lang['smile_desc'] = 'From this page you can add, remove and edit the emoticons or smileys that your users can use in their posts and private messages.';
 
$lang['smiley_config'] = 'Smiley Configuration';
$lang['smiley_code'] = 'Smiley Code';
$lang['smiley_url'] = 'Smiley Image File';
$lang['smiley_emot'] = 'Smiley Emotion';
$lang['smile_add'] = 'Add a new Smiley';
$lang['Smile'] = 'Smile';
$lang['Emotion'] = 'Emotion';
 
$lang['Select_pak'] = 'Select Pack (.pak) File';
$lang['replace_existing'] = 'Replace Existing Smiley';
$lang['keep_existing'] = 'Keep Existing Smiley';
$lang['smiley_import_inst'] = 'You should unzip the smiley package and upload all files to the appropriate Smiley directory for your installation. Then select the correct information in this form to import the smiley pack.';
$lang['smiley_import'] = 'Smiley Pack Import';
$lang['choose_smile_pak'] = 'Choose a Smile Pack .pak file';
$lang['import'] = 'Import Smileys';
$lang['smile_conflicts'] = 'What should be done in case of conflicts';
$lang['del_existing_smileys'] = 'Delete existing smileys before import';
$lang['import_smile_pack'] = 'Import Smiley Pack';
$lang['export_smile_pack'] = 'Create Smiley Pack';
$lang['export_smiles'] = 'To create a smiley pack from your currently installed smileys, click %sHere%s to download the smiles.pak file. Name this file appropriately making sure to keep the .pak file extension. Then create a zip file containing all of your smiley images plus this .pak configuration file.';
 
$lang['smiley_add_success'] = 'The Smiley was successfully added';
$lang['smiley_edit_success'] = 'The Smiley was successfully updated';
$lang['smiley_import_success'] = 'The Smiley Pack was imported successfully!';
$lang['smiley_del_success'] = 'The Smiley was successfully removed';
$lang['Click_return_smileadmin'] = 'Click %sHere%s to return to Smiley Administration';
 
$lang['Confirm_delete_smiley'] = 'Are you sure you want to delete this Smiley?';
 
//
// User Management
//
$lang['User_admin'] = 'User Administration';
$lang['User_admin_explain'] = 'Here you can change your users\' information and certain options. To modify the users\' permissions, please use the user and group permissions system.';
 
$lang['Look_up_user'] = 'Look up user';
 
$lang['Admin_user_fail'] = 'Couldn\'t update the user\'s profile.';
$lang['Admin_user_updated'] = 'The user\'s profile was successfully updated.';
$lang['Click_return_useradmin'] = 'Click %sHere%s to return to User Administration';
 
$lang['User_delete'] = 'Delete this user';
$lang['User_delete_explain'] = 'Click here to delete this user; this cannot be undone.';
$lang['User_deleted'] = 'User was successfully deleted.';
 
$lang['User_status'] = 'User is active';
$lang['User_allowpm'] = 'Can send Private Messages';
$lang['User_allowavatar'] = 'Can display avatar';
 
$lang['Admin_avatar_explain'] = 'Here you can see and delete the user\'s current avatar.';
 
$lang['User_special'] = 'Special admin-only fields';
$lang['User_special_explain'] = 'These fields are not able to be modified by the users. Here you can set their status and other options that are not given to users.';
 
 
//
// Group Management
//
$lang['Group_administration'] = 'Group Administration';
$lang['Group_admin_explain'] = 'From this panel you can administer all your usergroups. You can delete, create and edit existing groups. You may choose moderators, toggle open/closed group status and set the group name and description';
$lang['Error_updating_groups'] = 'There was an error while updating the groups';
$lang['Updated_group'] = 'The group was successfully updated';
$lang['Added_new_group'] = 'The new group was successfully created';
$lang['Deleted_group'] = 'The group was successfully deleted';
$lang['New_group'] = 'Create new group';
$lang['Edit_group'] = 'Edit group';
$lang['group_name'] = 'Group name';
$lang['group_description'] = 'Group description';
$lang['group_moderator'] = 'Group moderator';
$lang['group_status'] = 'Group status';
$lang['group_open'] = 'Open group';
$lang['group_closed'] = 'Closed group';
$lang['group_hidden'] = 'Hidden group';
$lang['group_delete'] = 'Delete group';
$lang['group_delete_check'] = 'Delete this group';
$lang['submit_group_changes'] = 'Submit Changes';
$lang['reset_group_changes'] = 'Reset Changes';
$lang['No_group_name'] = 'You must specify a name for this group';
$lang['No_group_moderator'] = 'You must specify a moderator for this group';
$lang['No_group_mode'] = 'You must specify a mode for this group, open or closed';
$lang['No_group_action'] = 'No action was specified';
$lang['delete_group_moderator'] = 'Delete the old group moderator?';
$lang['delete_moderator_explain'] = 'If you\'re changing the group moderator, check this box to remove the old moderator from the group. Otherwise, do not check it, and the user will become a regular member of the group.';
$lang['Click_return_groupsadmin'] = 'Click %sHere%s to return to Group Administration.';
$lang['Select_group'] = 'Select a group';
$lang['Look_up_group'] = 'Look up group';
 
 
//
// Prune Administration
//
$lang['Forum_Prune'] = 'Forum Prune';
$lang['Forum_Prune_explain'] = 'This will delete any topic which has not been posted to within the number of days you select. If you do not enter a number then all topics will be deleted. It will not remove topics in which polls are still running nor will it remove announcements. You will need to remove those topics manually.';
$lang['Do_Prune'] = 'Do Prune';
$lang['All_Forums'] = 'All Forums';
$lang['Prune_topics_not_posted'] = 'Prune topics with no replies in this many days';
$lang['Topics_pruned'] = 'Topics pruned';
$lang['Posts_pruned'] = 'Posts pruned';
$lang['Prune_success'] = 'Pruning of forums was successful';
 
 
//
// Word censor
//
$lang['Words_title'] = 'Word Censoring';
$lang['Words_explain'] = 'From this control panel you can add, edit, and remove words that will be automatically censored on your forums. In addition people will not be allowed to register with usernames containing these words. Wildcards (*) are accepted in the word field. For example, *test* will match detestable, test* would match testing, *test would match detest.';
$lang['Word'] = 'Word';
$lang['Edit_word_censor'] = 'Edit word censor';
$lang['Replacement'] = 'Replacement';
$lang['Add_new_word'] = 'Add new word';
$lang['Update_word'] = 'Update word censor';
 
$lang['Must_enter_word'] = 'You must enter a word and its replacement';
$lang['No_word_selected'] = 'No word selected for editing';
 
$lang['Word_updated'] = 'The selected word censor has been successfully updated';
$lang['Word_added'] = 'The word censor has been successfully added';
$lang['Word_removed'] = 'The selected word censor has been successfully removed';
 
$lang['Click_return_wordadmin'] = 'Click %sHere%s to return to Word Censor Administration';
 
$lang['Confirm_delete_word'] = 'Are you sure you want to delete this word censor?';
 
 
//
// Mass Email
//
$lang['Mass_email_explain'] = 'Here you can email a message to either all of your users or all users of a specific group. To do this, an email will be sent out to the administrative email address supplied, with a blind carbon copy sent to all recipients. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time and you will be notified when the script has completed';
$lang['Compose'] = 'Compose';
 
$lang['Recipients'] = 'Recipients';
$lang['All_users'] = 'All Users';
 
$lang['Email_successfull'] = 'Your message has been sent';
$lang['Click_return_massemail'] = 'Click %sHere%s to return to the Mass Email form';
 
 
//
// Ranks admin
//
$lang['Ranks_title'] = 'Rank Administration';
$lang['Ranks_explain'] = 'Using this form you can add, edit, view and delete ranks. You can also create custom ranks which can be applied to a user via the user management facility';
 
$lang['Add_new_rank'] = 'Add new rank';
 
$lang['Rank_title'] = 'Rank Title';
$lang['Rank_special'] = 'Set as Special Rank';
$lang['Rank_minimum'] = 'Minimum Posts';
$lang['Rank_maximum'] = 'Maximum Posts';
$lang['Rank_image'] = 'Rank Image (Relative to phpBB2 root path)';
$lang['Rank_image_explain'] = 'Use this to define a small image associated with the rank';
 
$lang['Must_select_rank'] = 'You must select a rank';
$lang['No_assigned_rank'] = 'No special rank assigned';
 
$lang['Rank_updated'] = 'The rank was successfully updated';
$lang['Rank_added'] = 'The rank was successfully added';
$lang['Rank_removed'] = 'The rank was successfully deleted';
$lang['No_update_ranks'] = 'The rank was successfully deleted. However, user accounts using this rank were not updated. You will need to manually reset the rank on these accounts';
 
$lang['Click_return_rankadmin'] = 'Click %sHere%s to return to Rank Administration';
 
$lang['Confirm_delete_rank'] = 'Are you sure you want to delete this rank?';
 
//
// Disallow Username Admin
//
$lang['Disallow_control'] = 'Username Disallow Control';
$lang['Disallow_explain'] = 'Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of *. Please note that you will not be allowed to specify any username that has already been registered. You must first delete that name then disallow it.';
 
$lang['Delete_disallow'] = 'Delete';
$lang['Delete_disallow_title'] = 'Remove a Disallowed Username';
$lang['Delete_disallow_explain'] = 'You can remove a disallowed username by selecting the username from this list and clicking submit';
 
$lang['Add_disallow'] = 'Add';
$lang['Add_disallow_title'] = 'Add a disallowed username';
$lang['Add_disallow_explain'] = 'You can disallow a username using the wildcard character * to match any character';
 
$lang['No_disallowed'] = 'No Disallowed Usernames';
 
$lang['Disallowed_deleted'] = 'The disallowed username has been successfully removed';
$lang['Disallow_successful'] = 'The disallowed username has been successfully added';
$lang['Disallowed_already'] = 'The name you entered could not be disallowed. It either already exists in the list, exists in the word censor list, or a matching username is present.';
 
$lang['Click_return_disallowadmin'] = 'Click %sHere%s to return to Disallow Username Administration';
 
 
//
// Styles Admin
//
$lang['Styles_admin'] = 'Styles Administration';
$lang['Styles_explain'] = 'Using this facility you can add, remove and manage styles (templates and themes) available to your users';
$lang['Styles_addnew_explain'] = 'The following list contains all the themes that are available for the templates you currently have. The items on this list have not yet been installed into the phpBB database. To install a theme, simply click the install link beside an entry.';
 
$lang['Select_template'] = 'Select a Template';
 
$lang['Style'] = 'Style';
$lang['Template'] = 'Template';
$lang['Install'] = 'Install';
$lang['Download'] = 'Download';
 
$lang['Edit_theme'] = 'Edit Theme';
$lang['Edit_theme_explain'] = 'In the form below you can edit the settings for the selected theme';
 
$lang['Create_theme'] = 'Create Theme';
$lang['Create_theme_explain'] = 'Use the form below to create a new theme for a selected template. When entering colours (for which you should use hexadecimal notation) you must not include the initial #, i.e.. CCCCCC is valid, #CCCCCC is not';
 
$lang['Export_themes'] = 'Export Themes';
$lang['Export_explain'] = 'In this panel you will be able to export the theme data for a selected template. Select the template from the list below and the script will create the theme configuration file and attempt to save it to the selected template directory. If it cannot save the file itself it will give you the option to download it. In order for the script to save the file you must give write access to the webserver for the selected template dir. For more information on this see the phpBB 2 users guide.';
 
$lang['Theme_installed'] = 'The selected theme has been installed successfully';
$lang['Style_removed'] = 'The selected style has been removed from the database. To fully remove this style from your system you must delete the appropriate style from your templates directory.';
$lang['Theme_info_saved'] = 'The theme information for the selected template has been saved. You should now return the permissions on the theme_info.cfg (and if applicable the selected template directory) to read-only';
$lang['Theme_updated'] = 'The selected theme has been updated. You should now export the new theme settings';
$lang['Theme_created'] = 'Theme created. You should now export the theme to the theme configuration file for safe keeping or use elsewhere';
 
$lang['Confirm_delete_style'] = 'Are you sure you want to delete this style?';
 
$lang['Download_theme_cfg'] = 'The exporter could not write the theme information file. Click the button below to download this file with your browser. Once you have downloaded it you can transfer it to the directory containing the template files. You can then package the files for distribution or use elsewhere if you desire';
$lang['No_themes'] = 'The template you selected has no themes attached to it. To create a new theme click the Create New link on the left hand panel';
$lang['No_template_dir'] = 'Could not open the template directory. It may be unreadable by the webserver or may not exist';
$lang['Cannot_remove_style'] = 'You cannot remove the style selected since it is currently the forum default. Please change the default style and try again.';
$lang['Style_exists'] = 'The style name to selected already exists, please go back and choose a different name.';
 
$lang['Click_return_styleadmin'] = 'Click %sHere%s to return to Style Administration';
 
$lang['Theme_settings'] = 'Theme Settings';
$lang['Theme_element'] = 'Theme Element';
$lang['Simple_name'] = 'Simple Name';
$lang['Value'] = 'Value';
$lang['Save_Settings'] = 'Save Settings';
 
$lang['Stylesheet'] = 'CSS Stylesheet';
$lang['Stylesheet_explain'] = 'Filename for CSS stylesheet to use for this theme.';
$lang['Background_image'] = 'Background Image';
$lang['Background_color'] = 'Background Colour';
$lang['Theme_name'] = 'Theme Name';
$lang['Link_color'] = 'Link Colour';
$lang['Text_color'] = 'Text Colour';
$lang['VLink_color'] = 'Visited Link Colour';
$lang['ALink_color'] = 'Active Link Colour';
$lang['HLink_color'] = 'Hover Link Colour';
$lang['Tr_color1'] = 'Table Row Colour 1';
$lang['Tr_color2'] = 'Table Row Colour 2';
$lang['Tr_color3'] = 'Table Row Colour 3';
$lang['Tr_class1'] = 'Table Row Class 1';
$lang['Tr_class2'] = 'Table Row Class 2';
$lang['Tr_class3'] = 'Table Row Class 3';
$lang['Th_color1'] = 'Table Header Colour 1';
$lang['Th_color2'] = 'Table Header Colour 2';
$lang['Th_color3'] = 'Table Header Colour 3';
$lang['Th_class1'] = 'Table Header Class 1';
$lang['Th_class2'] = 'Table Header Class 2';
$lang['Th_class3'] = 'Table Header Class 3';
$lang['Td_color1'] = 'Table Cell Colour 1';
$lang['Td_color2'] = 'Table Cell Colour 2';
$lang['Td_color3'] = 'Table Cell Colour 3';
$lang['Td_class1'] = 'Table Cell Class 1';
$lang['Td_class2'] = 'Table Cell Class 2';
$lang['Td_class3'] = 'Table Cell Class 3';
$lang['fontface1'] = 'Font Face 1';
$lang['fontface2'] = 'Font Face 2';
$lang['fontface3'] = 'Font Face 3';
$lang['fontsize1'] = 'Font Size 1';
$lang['fontsize2'] = 'Font Size 2';
$lang['fontsize3'] = 'Font Size 3';
$lang['fontcolor1'] = 'Font Colour 1';
$lang['fontcolor2'] = 'Font Colour 2';
$lang['fontcolor3'] = 'Font Colour 3';
$lang['span_class1'] = 'Span Class 1';
$lang['span_class2'] = 'Span Class 2';
$lang['span_class3'] = 'Span Class 3';
$lang['img_poll_size'] = 'Polling Image Size [px]';
$lang['img_pm_size'] = 'Private Message Status size [px]';
 
 
//
// Install Process
//
$lang['Welcome_install'] = 'Welcome to phpBB 2 Installation';
$lang['Initial_config'] = 'Basic Configuration';
$lang['DB_config'] = 'Database Configuration';
$lang['Admin_config'] = 'Admin Configuration';
$lang['continue_upgrade'] = 'Once you have downloaded your config file to your local machine you may\'Continue Upgrade\' button below to move forward with the upgrade process. Please wait to upload the config file until the upgrade process is complete.';
$lang['upgrade_submit'] = 'Continue Upgrade';
 
$lang['Installer_Error'] = 'An error has occurred during installation';
$lang['Previous_Install'] = 'A previous installation has been detected';
$lang['Install_db_error'] = 'An error occurred trying to update the database';
 
$lang['Re_install'] = 'Your previous installation is still active.<br /><br />If you would like to re-install phpBB 2 you should click the Yes button below. Please be aware that doing so will destroy all existing data and no backups will be made! The administrator username and password you have used to login in to the board will be re-created after the re-installation and no other settings will be retained.<br /><br />Think carefully before pressing Yes!';
 
$lang['Inst_Step_0'] = 'Thank you for choosing phpBB 2. In order to complete this install please fill out the details requested below. Please note that the database you install into should already exist. If you are installing to a database that uses ODBC, e.g. MS Access you should first create a DSN for it before proceeding.';
 
$lang['Start_Install'] = 'Start Install';
$lang['Finish_Install'] = 'Finish Installation';
 
$lang['Default_lang'] = 'Default board language';
$lang['DB_Host'] = 'Database Server Hostname / DSN';
$lang['DB_Name'] = 'Your Database Name';
$lang['DB_Username'] = 'Database Username';
$lang['DB_Password'] = 'Database Password';
$lang['Database'] = 'Your Database';
$lang['Install_lang'] = 'Choose Language for Installation';
$lang['dbms'] = 'Database Type';
$lang['Table_Prefix'] = 'Prefix for tables in database';
$lang['Admin_Username'] = 'Administrator Username';
$lang['Admin_Password'] = 'Administrator Password';
$lang['Admin_Password_confirm'] = 'Administrator Password [ Confirm ]';
 
$lang['Inst_Step_2'] = 'Your admin username has been created. At this point your basic installation is complete. You will now be taken to a screen which will allow you to administer your new installation. Please be sure to check the General Configuration details and make any required changes. Thank you for choosing phpBB 2.';
 
$lang['Unwriteable_config'] = 'Your config file is un-writeable at present. A copy of the config file will be downloaded to your computer when you click the button below. You should upload this file to the same directory as phpBB 2. Once this is done you should log in using the administrator name and password you provided on the previous form and visit the admin control center (a link will appear at the bottom of each screen once logged in) to check the general configuration. Thank you for choosing phpBB 2.';
$lang['Download_config'] = 'Download Config';
 
$lang['ftp_choose'] = 'Choose Download Method';
$lang['ftp_option'] = '<br />Since FTP extensions are enabled in this version of PHP you may also be given the option of first trying to automatically FTP the config file into place.';
$lang['ftp_instructs'] = 'You have chosen to FTP the file to the account containing phpBB 2 automatically. Please enter the information below to facilitate this process. Note that the FTP path should be the exact path via FTP to your phpBB2 installation as if you were FTPing to it using any normal client.';
$lang['ftp_info'] = 'Enter Your FTP Information';
$lang['Attempt_ftp'] = 'Attempt to FTP config file into place';
$lang['Send_file'] = 'Just send the file to me and I\'ll FTP it manually';
$lang['ftp_path'] = 'FTP path to phpBB 2';
$lang['ftp_username'] = 'Your FTP Username';
$lang['ftp_password'] = 'Your FTP Password';
$lang['Transfer_config'] = 'Start Transfer';
$lang['NoFTP_config'] = 'The attempt to FTP the config file into place failed. Please download the config file and FTP it into place manually.';
 
$lang['Install'] = 'Install';
$lang['Upgrade'] = 'Upgrade';
 
 
$lang['Install_Method'] = 'Choose your installation method';
 
$lang['Install_No_Ext'] = 'The PHP configuration on your server doesn\'t support the database type that you chose';
 
$lang['Install_No_PCRE'] = 'phpBB2 Requires the Perl-Compatible Regular Expressions Module for PHP which your PHP configuration doesn\'t appear to support!';
 
//
// Version Check
//
$lang['Version_up_to_date'] = 'Your installation is up to date, no updates are available for your version of phpBB.';
$lang['Version_not_up_to_date'] = 'Your installation does <b>not</b> seem to be up to date. Updates are available for your version of phpBB, please visit <a href="http://www.phpbb.com/downloads.php" target="_new">http://www.phpbb.com/downloads.php</a> to obtain the latest version.';
$lang['Latest_version_info'] = 'The latest available version is <b>phpBB %s</b>.';
$lang['Current_version_info'] = 'You are running <b>phpBB %s</b>.';
$lang['Connect_socket_error'] = 'Unable to open connection to phpBB Server, reported error is:<br />%s';
$lang['Socket_functions_disabled'] = 'Unable to use socket functions.';
$lang['Mailing_list_subscribe_reminder'] = 'For the latest information on updates to phpBB, why not <a href="http://www.phpbb.com/support/" target="_new">subscribe to our mailing list</a>.';
$lang['Version_information'] = 'Version Information';
 
//
// Login attempts configuration
//
$lang['Max_login_attempts'] = 'Allowed login attempts';
$lang['Max_login_attempts_explain'] = 'The number of allowed board login attempts.';
$lang['Login_reset_time'] = 'Login lock time';
$lang['Login_reset_time_explain'] = 'Time in minutes the user have to wait until he is allowed to login again after exceeding the number of allowed login attempts.';
 
//
// That's all Folks!
// -------------------------------------------------
 
?>
/Forum/language/lang_english/lang_bbcode.php
0,0 → 1,75
<?php
/***************************************************************************
* lang_bbcode.php [english]
* -------------------
* begin : Wednesday Oct 3, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: lang_bbcode.php,v 1.3.2.2 2002/12/18 15:40:20 psotfx Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
/* CONTRIBUTORS
2002-12-15 Philip M. White (pwhite@mailhaven.com)
Fixed many minor grammatical problems.
*/
//
// To add an entry to your BBCode guide simply add a line to this file in this format:
// $faq[] = array("question", "answer");
// If you want to separate a section enter $faq[] = array("--","Block heading goes here if wanted");
// Links will be created automatically
//
// DO NOT forget the ; at the end of the line.
// Do NOT put double quotes (") in your BBCode guide entries, if you absolutely must then escape them ie. \"something\"
//
// The BBCode guide items will appear on the BBCode guide page in the same order they are listed in this file
//
// If just translating this file please do not alter the actual HTML unless absolutely necessary, thanks :)
//
// In addition please do not translate the colours referenced in relation to BBCode any section, if you do
// users browsing in your language may be confused to find they're BBCode doesn't work :D You can change
// references which are 'in-line' within the text though.
//
$faq[] = array("--","Introduction");
$faq[] = array("What is BBCode?", "BBCode is a special implementation of HTML. Whether you can actually use BBCode in your posts on the forum is determined by the administrator. In addition, you can disable BBCode on a per post basis via the posting form. BBCode itself is similar in style to HTML: tags are enclosed in square braces [ and ] rather than &lt; and &gt; and it offers greater control over what and how something is displayed. Depending on the template you are using you may find adding BBCode to your posts is made much easier through a clickable interface above the message area on the posting form. Even with this you may find the following guide useful.");
 
$faq[] = array("--","Text Formatting");
$faq[] = array("How to create bold, italic and underlined text", "BBCode includes tags to allow you to quickly change the basic style of your text. This is achieved in the following ways: <ul><li>To make a piece of text bold enclose it in <b>[b][/b]</b>, eg. <br /><br /><b>[b]</b>Hello<b>[/b]</b><br /><br />will become <b>Hello</b></li><li>For underlining use <b>[u][/u]</b>, for example:<br /><br /><b>[u]</b>Good Morning<b>[/u]</b><br /><br />becomes <u>Good Morning</u></li><li>To italicise text use <b>[i][/i]</b>, eg.<br /><br />This is <b>[i]</b>Great!<b>[/i]</b><br /><br />would give This is <i>Great!</i></li></ul>");
$faq[] = array("How to change the text colour or size", "To alter the color or size of your text the following tags can be used. Keep in mind that how the output appears will depend on the viewers browser and system: <ul><li>Changing the colour of text is achieved by wrapping it in <b>[color=][/color]</b>. You can specify either a recognised colour name (eg. red, blue, yellow, etc.) or the hexadecimal triplet alternative, eg. #FFFFFF, #000000. For example, to create red text you could use:<br /><br /><b>[color=red]</b>Hello!<b>[/color]</b><br /><br />or<br /><br /><b>[color=#FF0000]</b>Hello!<b>[/color]</b><br /><br />will both output <span style=\"color:red\">Hello!</span></li><li>Changing the text size is achieved in a similar way using <b>[size=][/size]</b>. This tag is dependent on the template you are using but the recommended format is a numerical value representing the text size in pixels, starting at 1 (so tiny you will not see it) through to 29 (very large). For example:<br /><br /><b>[size=9]</b>SMALL<b>[/size]</b><br /><br />will generally be <span style=\"font-size:9px\">SMALL</span><br /><br />whereas:<br /><br /><b>[size=24]</b>HUGE!<b>[/size]</b><br /><br />will be <span style=\"font-size:24px\">HUGE!</span></li></ul>");
$faq[] = array("Can I combine formatting tags?", "Yes, of course you can; for example to get someones attention you may write:<br /><br /><b>[size=18][color=red][b]</b>LOOK AT ME!<b>[/b][/color][/size]</b><br /><br />this would output <span style=\"color:red;font-size:18px\"><b>LOOK AT ME!</b></span><br /><br />We don't recommend you output lots of text that looks like this, though! Remember that it is up to you, the poster, to ensure that tags are closed correctly. For example, the following is incorrect:<br /><br /><b>[b][u]</b>This is wrong<b>[/b][/u]</b>");
 
$faq[] = array("--","Quoting and outputting fixed-width text");
$faq[] = array("Quoting text in replies", "There are two ways you can quote text: with a reference or without.<ul><li>When you utilise the Quote function to reply to a post on the board you should notice that the post text is added to the message window enclosed in a <b>[quote=\"\"][/quote]</b> block. This method allows you to quote with a reference to a person or whatever else you choose to put. For example, to quote a piece of text Mr. Blobby wrote, you would enter:<br /><br /><b>[quote=\"Mr. Blobby\"]</b>The text Mr. Blobby wrote would go here<b>[/quote]</b><br /><br />The resulting output will automatically add: Mr. Blobby wrote: before the actual text. Remember that you <b>must</b> include the quotation marks \"\" around the name you are quoting -- they are not optional.</li><li>The second method allows you to blindly quote something. To utilise this enclose the text in <b>[quote][/quote]</b> tags. When you view the message it will simply show: Quote: before the text itself.</li></ul>");
$faq[] = array("Outputting code or fixed width data", "If you want to output a piece of code or in fact anything that requires a fixed width with a Courier-type font, you should enclose the text in <b>[code][/code]</b> tags, eg.<br /><br /><b>[code]</b>echo \"This is some code\";<b>[/code]</b><br /><br />All formatting used within <b>[code][/code]</b> tags is retained when you later view it.");
 
$faq[] = array("--","Generating lists");
$faq[] = array("Creating an Un-ordered list", "BBCode supports two types of lists, unordered and ordered. They are essentially the same as their HTML equivalents. An unordered list ouputs each item in your list sequentially one after the other indenting each with a bullet character. To create an unordered list you use <b>[list][/list]</b> and define each item within the list using <b>[*]</b>. For example, to list your favorite colours you could use:<br /><br /><b>[list]</b><br /><b>[*]</b>Red<br /><b>[*]</b>Blue<br /><b>[*]</b>Yellow<br /><b>[/list]</b><br /><br />This would generate the following list:<ul><li>Red</li><li>Blue</li><li>Yellow</li></ul>");
$faq[] = array("Creating an Ordered list", "The second type of list, an ordered list gives you control over what is output before each item. To create an ordered list you use <b>[list=1][/list]</b> to create a numbered list or alternatively <b>[list=a][/list]</b> for an alphabetical list. As with the unordered list items are specified using <b>[*]</b>. For example:<br /><br /><b>[list=1]</b><br /><b>[*]</b>Go to the shops<br /><b>[*]</b>Buy a new computer<br /><b>[*]</b>Swear at computer when it crashes<br /><b>[/list]</b><br /><br />will generate the following:<ol type=\"1\"><li>Go to the shops</li><li>Buy a new computer</li><li>Swear at computer when it crashes</li></ol>Whereas for an alphabetical list you would use:<br /><br /><b>[list=a]</b><br /><b>[*]</b>The first possible answer<br /><b>[*]</b>The second possible answer<br /><b>[*]</b>The third possible answer<br /><b>[/list]</b><br /><br />giving<ol type=\"a\"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol>");
 
$faq[] = array("--", "Creating Links");
$faq[] = array("Linking to another site", "phpBB BBCode supports a number of ways of creating URIs, Uniform Resource Indicators better known as URLs.<ul><li>The first of these uses the <b>[url=][/url]</b> tag; whatever you type after the = sign will cause the contents of that tag to act as a URL. For example, to link to phpBB.com you could use:<br /><br /><b>[url=http://www.phpbb.com/]</b>Visit phpBB!<b>[/url]</b><br /><br />This would generate the following link, <a href=\"http://www.phpbb.com/\" target=\"_blank\">Visit phpBB!</a> You will notice the link opens in a new window so the user can continue browsing the forums if they wish.</li><li>If you want the URL itself displayed as the link you can do this by simply using:<br /><br /><b>[url]</b>http://www.phpbb.com/<b>[/url]</b><br /><br />This would generate the following link: <a href=\"http://www.phpbb.com/\" target=\"_blank\">http://www.phpbb.com/</a></li><li>Additionally phpBB features something called <i>Magic Links</i>which will turn any syntatically correct URL into a link without you needing to specify any tags or even the leading http://. For example typing www.phpbb.com into your message will automatically lead to <a href=\"http://www.phpbb.com/\" target=\"_blank\">www.phpbb.com</a> being output when you view the message.</li><li>The same thing applies equally to email addresses; you can either specify an address explicitly, like:<br /><br /><b>[email]</b>no.one@domain.adr<b>[/email]</b><br /><br />which will output <a href=\"emailto:no.one@domain.adr\">no.one@domain.adr</a> or you can just type no.one@domain.adr into your message and it will be automatically converted when you view.</li></ul>As with all the BBCode tags you can wrap URLs around any of the other tags such as <b>[img][/img]</b> (see next entry), <b>[b][/b]</b>, etc. As with the formatting tags it is up to you to ensure the correct open and close order is following. For example:<br /><br /><b>[url=http://www.phpbb.com/][img]</b>http://www.phpbb.com/images/phplogo.gif<b>[/url][/img]</b><br /><br />is <u>not</u> correct which may lead to your post being deleted so take care.");
 
$faq[] = array("--", "Showing images in posts");
$faq[] = array("Adding an image to a post", "phpBB BBCode incorporates a tag for including images in your posts. Two very important things to remember when using this tag are: many users do not appreciate lots of images being shown in posts and second, the image you display must already be available on the Internet (it cannot exist only on your computer, for example, unless you run a webserver!). There is currently no way of storing images locally with phpBB (all these issues are expected to be addressed in the next release of phpBB). To display an image, you must surround the URL pointing to the image with <b>[img][/img]</b> tags. For example:<br /><br /><b>[img]</b>http://www.phpbb.com/images/phplogo.gif<b>[/img]</b><br /><br />As noted in the URL section above you can wrap an image in a <b>[url][/url]</b> tag if you wish, eg.<br /><br /><b>[url=http://www.phpbb.com/][img]</b>http://www.phpbb.com/images/phplogo.gif<b>[/img][/url]</b><br /><br />would generate:<br /><br /><a href=\"http://www.phpbb.com/\" target=\"_blank\"><img src=\"templates/subSilver/images/logo_phpBB_med.gif\" border=\"0\" alt=\"\" /></a><br />");
 
$faq[] = array("--", "Other matters");
$faq[] = array("Can I add my own tags?", "No, I am afraid not directly in phpBB 2.0. We are looking at offering customisable BBCode tags for the next major version.");
 
//
// This ends the BBCode guide entries
//
 
?>
/Forum/language/lang_english/lang_faq.php
0,0 → 1,106
<?php
/***************************************************************************
* lang_faq.php [english]
* -------------------
* begin : Wednesday Oct 3, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: lang_faq.php,v 1.4.2.3 2002/12/18 15:40:20 psotfx Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
/* CONTRIBUTORS:
2002-12-15 Philip M. White (pwhite@mailhaven.com)
Fixed many minor grammatical problems.
*/
//
// To add an entry to your FAQ simply add a line to this file in this format:
// $faq[] = array("question", "answer");
// If you want to separate a section enter $faq[] = array("--","Block heading goes here if wanted");
// Links will be created automatically
//
// DO NOT forget the ; at the end of the line.
// Do NOT put double quotes (") in your FAQ entries, if you absolutely must then escape them ie. \"something\"
//
// The FAQ items will appear on the FAQ page in the same order they are listed in this file
//
$faq[] = array("--","Login and Registration Issues");
$faq[] = array("Why can't I log in?", "Have you registered? Seriously, you must register in order to log in. Have you been banned from the board? (A message will be displayed if you have.) If so, you should contact the webmaster or board administrator to find out why. If you have registered and are not banned and you still cannot log in then check and double-check your username and password. Usually this is the problem; if not, contact the board administrator -- they may have incorrect configuration settings for the board.");
$faq[] = array("Why do I need to register at all?", "You may not have to -- it is up to the administrator of the board as to whether you need to register in order to post messages. However, registration will give you access to additional features not available to guest users such as definable avatar images, private messaging, emailing to fellow users, usergroup subscription, etc. It only takes a few minutes to register so it is recommended you do so.");
$faq[] = array("Why do I get logged off automatically?", "If you do not check the <i>Log me in automatically</i> box when you log in, the board will only keep you logged in for a preset time. This prevents misuse of your account by anyone else. To stay logged in, check the box during login. This is not recommended if you access the board from a shared computer, e.g. library, internet cafe, university cluster, etc.");
$faq[] = array("How do I prevent my username from appearing in the online user listings?", "In your profile you will find an option <i>Hide your online status</i>; if you switch this <i>on</i> you'll only appear to board administrators or to yourself. You will be counted as a hidden user.");
$faq[] = array("I've lost my password!", "Don't panic! While your password cannot be retrieved it can be reset. To do this go to the login page and click <u>I've forgotten my password</u>. Follow the instructions and you should be back online in no time.");
$faq[] = array("I registered but cannot log in!", "First check that you are entering the correct username and password. If they are okay then one of two things may have happened: if COPPA support is enabled and you clicked the <u>I am under 13 years old</u> link while registering then you will have to follow the instructions you received. If this is not the case then maybe your account need activating. Some boards will require all new registrations be activated, either by yourself or by the administrator before you can log on. When you registered it would have told you whether activation was required. If you were sent an email then follow the instructions; if you did not receive the email then check that your email address is valid. One reason activation is used is to reduce the possibility of <i>rogue</i> users abusing the board anonymously. If you are sure the email address you used is valid then try contacting the board administrator.");
$faq[] = array("I registered in the past but cannot log in anymore!", "The most likely reasons for this are: you entered an incorrect username or password (check the email you were sent when you first registered) or the administrator has deleted your account for some reason. If it is the latter case then perhaps you did not post anything? It is usual for boards to periodically remove users who have not posted anything so as to reduce the size of the database. Try registering again and get involved in discussions.");
 
 
$faq[] = array("--","User Preferences and settings");
$faq[] = array("How do I change my settings?", "All your settings (if you are registered) are stored in the database. To alter them click the <u>Profile</u> link (generally shown at the top of pages but this may not be the case). This will allow you to change all your settings.");
$faq[] = array("The times are not correct!", "The times are almost certainly correct; however, what you may be seeing are times displayed in a timezone different from the one you are in. If this is the case, you should change your profile setting for the timezone to match your particular area, e.g. London, Paris, New York, Sydney, etc. Please note that changing the timezone, like most settings, can only be done by registered users. So if you are not registered, this is a good time to do so, if you pardon the pun!");
$faq[] = array("I changed the timezone and the time is still wrong!", "If you are sure you have set the timezone correctly and the time is still different, the most likely answer is daylight savings time (or summer time as it is known in the UK and other places). The board is not designed to handle the changeovers between standard and daylight time so during summer months the time may be an hour different from the real local time.");
$faq[] = array("My language is not in the list!", "The most likely reasons for this are either the administrator did not install your language or someone has not translated this board into your language. Try asking the board administrator if they can install the language pack you need or if it does not exist, please feel free to create a new translation. More information can be found at the phpBB Group website (see link at bottom of pages)");
$faq[] = array("How do I show an image below my username?", "There may be two images below a username when viewing posts. The first is an image associated with your rank; generally these take the form of stars or blocks indicating how many posts you have made or your status on the forums. Below this may be a larger image known as an avatar; this is generally unique or personal to each user. It is up to the board administrator to enable avatars and they have a choice over the way in which avatars can be made available. If you are unable to use avatars then this is the decision of the board admin and you should ask them their reasons (we're sure they'll be good!)");
$faq[] = array("How do I change my rank?", "In general you cannot directly change the wording of any rank (ranks appear below your username in topics and on your profile depending on the style used). Most boards use ranks to indicate the number of posts you have made and to identify certain users. For example, moderators and administrators may have a special rank. Please do not abuse the board by posting unnecessarily just to increase your rank -- you will probably find the moderator or administrator will simply lower your post count.");
$faq[] = array("When I click the email link for a user it asks me to log in.", "Sorry, but only registered users can send email to people via the built-in email form (if the admin has enabled this feature). This is to prevent malicious use of the email system by anonymous users.");
 
 
$faq[] = array("--","Posting Issues");
$faq[] = array("How do I post a topic in a forum?", "Easy -- click the relevant button on either the forum or topic screens. You may need to register before you can post a message. The facilities available to you are listed at the bottom of the forum and topic screens (the <i>You can post new topics, You can vote in polls, etc.</i> list)");
$faq[] = array("How do I edit or delete a post?", "Unless you are the board admin or forum moderator you can only edit or delete your own posts. You can edit a post (sometimes for only a limited time after it was made) by clicking the <i>edit</i> button for the relevant post. If someone has already replied to the post, you will find a small piece of text output below the post when you return to the topic that lists the number of times you edited it. This will only appear if no one has replied; it also will not appear if moderators or administrators edit the post (they should leave a message saying what they altered and why). Please note that normal users cannot delete a post once someone has replied.");
$faq[] = array("How do I add a signature to my post?", "To add a signature to a post you must first create one; this is done via your profile. Once created you can check the <i>Add Signature</i> box on the posting form to add your signature. You can also add a signature by default to all your posts by checking the appropriate radio box in your profile. You can still prevent a signature being added to individual posts by un-checking the add signature box on the posting form.");
$faq[] = array("How do I create a poll?", "Creating a poll is easy -- when you post a new topic (or edit the first post of a topic, if you have permission) you should see a <i>Add Poll</i> form below the main posting box. If you cannot see this then you probably do not have rights to create polls. You should enter a title for the poll and then at least two options -- to set an option type in the poll question and click the <i>Add option</i> button. You can also set a time limit for the poll, 0 being an infinite amount. There will be a limit to the number of options you can list, which is set by the board administrator");
$faq[] = array("How do I edit or delete a poll?", "As with posts, polls can only be edited by the original poster, a moderator, or board administrator. To edit a poll, click the first post in the topic, which always has the poll associated with it. If no one has cast a vote then users can delete the poll or edit any poll option. However, if people have already placed votes only moderators or administrators can edit or delete it; this is to prevent people rigging polls by changing options mid-way through a poll");
$faq[] = array("Why can't I access a forum?", "Some forums may be limited to certain users or groups. To view, read, post, etc. you may need special authorization which only the forum moderator and board administrator can grant, so you should contact them.");
$faq[] = array("Why can't I vote in polls?", "Only registered users can vote in polls so as to prevent spoofing of results. If you have registered and still cannot vote then you probably do not have appropriate access rights.");
 
 
$faq[] = array("--","Formatting and Topic Types");
$faq[] = array("What is BBCode?", "BBCode is a special implementation of HTML. Whether you can use BBCode is determined by the administrator. You can also disable it on a per post basis from the posting form. BBCode itself is similar in style to HTML: tags are enclosed in square braces [ and ] rather than &lt; and &gt; and it offers greater control over what and how something is displayed. For more information on BBCode see the guide which can be accessed from the posting page.");
$faq[] = array("Can I use HTML?", "That depends on whether the administrator allows you to; they have complete control over it. If you are allowed to use it, you will probably find only certain tags work. This is a <i>safety</i> feature to prevent people from abusing the board by using tags which may destroy the layout or cause other problems. If HTML is enabled you can disable it on a per post basis from the posting form.");
$faq[] = array("What are Smileys?", "Smileys, or Emoticons, are small graphical images which can be used to express some feeling using a short code, e.g. :) means happy, :( means sad. The full list of emoticons can be seen via the posting form. Try not to overuse smileys, though, as they can quickly render a post unreadable and a moderator may decide to edit them out or remove the post altogether.");
$faq[] = array("Can I post Images?", "Images can indeed be shown in your posts. However, there is no facility at present for uploading images directly to this board. Therefore you must link to an image stored on a publicly accessible web server, e.g. http://www.some-unknown-place.net/my-picture.gif. You cannot link to pictures stored on your own PC (unless it is a publicly accessible server) nor to images stored behind authentication mechanisms such as Hotmail or Yahoo mailboxes, password-protected sites, etc. To display the image use either the BBCode [img] tag or appropriate HTML (if allowed).");
$faq[] = array("What are Announcements?", "Announcements often contain important information and you should read them as soon as possible. Announcements appear at the top of every page in the forum to which they are posted. Whether or not you can post an announcement depends on the permissions required, which are set by the administrator.");
$faq[] = array("What are Sticky topics?", "Sticky topics appear below any announcements in viewforum and only on the first page. They are often quite important so you should read them where possible. As with announcements the board administrator determines what permissions are required to post sticky topics in each forum.");
$faq[] = array("What are Locked topics?", "Locked topics are set this way by either the forum moderator or board administrator. You cannot reply to locked topics and any poll contained inside is automatically ended. Topics may be locked for many reasons.");
 
 
$faq[] = array("--","User Levels and Groups");
$faq[] = array("What are Administrators?", "Administrators are people assigned the highest level of control over the entire board. These people can control all facets of board operation which include setting permissions, banning users, creating usergroups or moderators, etc. They also have full moderator capabilities in all the forums.");
$faq[] = array("What are Moderators?", "Moderators are individuals (or groups of individuals) whose job it is to look after the running of the forums from day to day. They have the power to edit or delete posts and lock, unlock, move, delete and split topics in the forum they moderate. Generally moderators are there to prevent people going <i>off-topic</i> or posting abusive or offensive material.");
$faq[] = array("What are Usergroups?", "Usergroups are a way in which board administrators can group users. Each user can belong to several groups (this differs from most other boards) and each group can be assigned individual access rights. This makes it easy for administrators to set up several users as moderators of a forum, or to give them access to a private forum, etc.");
$faq[] = array("How do I join a Usergroup?", "To join a usergroup click the usergroup link on the page header (dependent on template design) and you can then view all usergroups. Not all groups are <i>open access</i> -- some are closed and some may even have hidden memberships. If the board is open then you can request to join it by clicking the appropriate button. The user group moderator will need to approve your request; they may ask why you want to join the group. Please do not pester a group moderator if they turn your request down -- they will have their reasons.");
$faq[] = array("How do I become a Usergroup Moderator?", "Usergroups are initially created by the board administrator who also assigns a board moderator. If you are interested in creating a usergroup then your first point of contact should be the administrator, so try dropping them a private message.");
 
 
$faq[] = array("--","Private Messaging");
$faq[] = array("I cannot send private messages!", "There are three reasons for this; you are not registered and/or not logged on, the board administrator has disabled private messaging for the entire board, or the board administrator has prevented you individually from sending messages. If it is the latter case you should try asking the administrator why.");
$faq[] = array("I keep getting unwanted private messages!", "In the future we will be adding an ignore list to the private messaging system. For now, though, if you keep receiving unwanted private messages from someone, inform the board administrator -- they have the power to prevent a user from sending private messages at all.");
$faq[] = array("I have received a spamming or abusive email from someone on this board!", "We are sorry to hear that. The email form feature of this board includes safeguards to try to track users who send such posts. You should email the board administrator with a full copy of the email you received and it is very important this include the headers (these list details of the user that sent the email). They can then take action.");
 
//
// These entries should remain in all languages and for all modifications
//
$faq[] = array("--","phpBB 2 Issues");
$faq[] = array("Who wrote this bulletin board?", "This software (in its unmodified form) is produced, released and is copyrighted <a href=\"http://www.phpbb.com/\" target=\"_blank\">phpBB Group</a>. It is made available under the GNU General Public License and may be freely distributed; see link for more details");
$faq[] = array("Why isn't X feature available?", "This software was written by and licensed through phpBB Group. If you believe a feature needs to be added then please visit the phpbb.com website and see what the phpBB Group has to say. Please do not post feature requests to the board at phpbb.com, as the Group uses sourceforge to handle tasking of new features. Please read through the forums and see what, if any, our position may already be for features and then follow the procedure given there.");
$faq[] = array("Whom do I contact about abusive and/or legal matters related to this board?", "You should contact the administrator of this board. If you cannot find who that is, you should first contact one of the forum moderators and ask them who you should in turn contact. If still get no response you should contact the owner of the domain (do a whois lookup) or, if this is running on a free service (e.g. yahoo, free.fr, f2s.com, etc.), the management or abuse department of that service. Please note that phpBB Group has absolutely no control and cannot in any way be held liable over how, where or by whom this board is used. It is absolutely pointless contacting phpBB Group in relation to any legal (cease and desist, liable, defamatory comment, etc.) matter not directly related to the phpbb.com website or the discrete software of phpBB itself. If you do email phpBB Group about any third party use of this software then you should expect a terse response or no response at all.");
 
//
// This ends the FAQ entries
//
 
?>
/Forum/language/lang_english/lang_main.php
0,0 → 1,1025
<?php
/***************************************************************************
* lang_main.php [English]
* -------------------
* begin : Sat Dec 16 2000
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: lang_main.php,v 1.85.2.21 2006/02/05 15:59:48 grahamje Exp $
*
****************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
//
// CONTRIBUTORS:
// Add your details here if wanted, e.g. Name, username, email address, website
// 2002-08-27 Philip M. White - fixed many grammar problems
//
 
//
// The format of this file is ---> $lang['message'] = 'text';
//
// You should also try to set a locale and a character encoding (plus direction). The encoding and direction
// will be sent to the template. The locale may or may not work, it's dependent on OS support and the syntax
// varies ... give it your best guess!
//
 
$lang['ENCODING'] = 'iso-8859-1';
$lang['DIRECTION'] = 'ltr';
$lang['LEFT'] = 'left';
$lang['RIGHT'] = 'right';
$lang['DATE_FORMAT'] = 'd M Y'; // This should be changed to the default date format for your language, php date() format
 
// This is optional, if you would like a _SHORT_ message output
// along with our copyright message indicating you are the translator
// please add it here.
// $lang['TRANSLATION'] = '';
 
//
// Common, these terms are used
// extensively on several pages
//
$lang['Forum'] = 'Forum';
$lang['Category'] = 'Category';
$lang['Topic'] = 'Topic';
$lang['Topics'] = 'Topics';
$lang['Replies'] = 'Replies';
$lang['Views'] = 'Views';
$lang['Post'] = 'Post';
$lang['Posts'] = 'Posts';
$lang['Posted'] = 'Posted';
$lang['Username'] = 'Username';
$lang['Password'] = 'Password';
$lang['Email'] = 'Email';
$lang['Poster'] = 'Poster';
$lang['Author'] = 'Author';
$lang['Time'] = 'Time';
$lang['Hours'] = 'Hours';
$lang['Message'] = 'Message';
 
$lang['1_Day'] = '1 Day';
$lang['7_Days'] = '7 Days';
$lang['2_Weeks'] = '2 Weeks';
$lang['1_Month'] = '1 Month';
$lang['3_Months'] = '3 Months';
$lang['6_Months'] = '6 Months';
$lang['1_Year'] = '1 Year';
 
$lang['Go'] = 'Go';
$lang['Jump_to'] = 'Jump to';
$lang['Submit'] = 'Submit';
$lang['Reset'] = 'Reset';
$lang['Cancel'] = 'Cancel';
$lang['Preview'] = 'Preview';
$lang['Confirm'] = 'Confirm';
$lang['Spellcheck'] = 'Spellcheck';
$lang['Yes'] = 'Yes';
$lang['No'] = 'No';
$lang['Enabled'] = 'Enabled';
$lang['Disabled'] = 'Disabled';
$lang['Error'] = 'Error';
 
$lang['Next'] = 'Next';
$lang['Previous'] = 'Previous';
$lang['Goto_page'] = 'Goto page';
$lang['Joined'] = 'Joined';
$lang['IP_Address'] = 'IP Address';
 
$lang['Select_forum'] = 'Select a forum';
$lang['View_latest_post'] = 'View latest post';
$lang['View_newest_post'] = 'View newest post';
$lang['Page_of'] = 'Page <b>%d</b> of <b>%d</b>'; // Replaces with: Page 1 of 2 for example
 
$lang['ICQ'] = 'ICQ Number';
$lang['AIM'] = 'AIM Address';
$lang['MSNM'] = 'MSN Messenger';
$lang['YIM'] = 'Yahoo Messenger';
 
$lang['Forum_Index'] = '%s Forum Index'; // eg. sitename Forum Index, %s can be removed if you prefer
 
$lang['Post_new_topic'] = 'Post new topic';
$lang['Reply_to_topic'] = 'Reply to topic';
$lang['Reply_with_quote'] = 'Reply with quote';
 
$lang['Click_return_topic'] = 'Click %sHere%s to return to the topic'; // %s's here are for uris, do not remove!
$lang['Click_return_login'] = 'Click %sHere%s to try again';
$lang['Click_return_forum'] = 'Click %sHere%s to return to the forum';
$lang['Click_view_message'] = 'Click %sHere%s to view your message';
$lang['Click_return_modcp'] = 'Click %sHere%s to return to the Moderator Control Panel';
$lang['Click_return_group'] = 'Click %sHere%s to return to group information';
 
$lang['Admin_panel'] = 'Go to Administration Panel';
 
$lang['Board_disable'] = 'Sorry, but this board is currently unavailable. Please try again later.';
 
 
//
// Global Header strings
//
$lang['Registered_users'] = 'Registered Users:';
$lang['Browsing_forum'] = 'Users browsing this forum:';
$lang['Online_users_zero_total'] = 'In total there are <b>0</b> users online :: ';
$lang['Online_users_total'] = 'In total there are <b>%d</b> users online :: ';
$lang['Online_user_total'] = 'In total there is <b>%d</b> user online :: ';
$lang['Reg_users_zero_total'] = '0 Registered, ';
$lang['Reg_users_total'] = '%d Registered, ';
$lang['Reg_user_total'] = '%d Registered, ';
$lang['Hidden_users_zero_total'] = '0 Hidden and ';
$lang['Hidden_user_total'] = '%d Hidden and ';
$lang['Hidden_users_total'] = '%d Hidden and ';
$lang['Guest_users_zero_total'] = '0 Guests';
$lang['Guest_users_total'] = '%d Guests';
$lang['Guest_user_total'] = '%d Guest';
$lang['Record_online_users'] = 'Most users ever online was <b>%s</b> on %s'; // first %s = number of users, second %s is the date.
 
$lang['Admin_online_color'] = '%sAdministrator%s';
$lang['Mod_online_color'] = '%sModerator%s';
 
$lang['You_last_visit'] = 'You last visited on %s'; // %s replaced by date/time
$lang['Current_time'] = 'The time now is %s'; // %s replaced by time
 
$lang['Search_new'] = 'View posts since last visit';
$lang['Search_your_posts'] = 'View your posts';
$lang['Search_unanswered'] = 'View unanswered posts';
 
$lang['Register'] = 'Register';
$lang['Profile'] = 'Profile';
$lang['Edit_profile'] = 'Edit your profile';
$lang['Search'] = 'Search';
$lang['Memberlist'] = 'Memberlist';
$lang['FAQ'] = 'FAQ';
$lang['BBCode_guide'] = 'BBCode Guide';
$lang['Usergroups'] = 'Usergroups';
$lang['Last_Post'] = 'Last Post';
$lang['Moderator'] = 'Moderator';
$lang['Moderators'] = 'Moderators';
 
 
//
// Stats block text
//
$lang['Posted_articles_zero_total'] = 'Our users have posted a total of <b>0</b> articles'; // Number of posts
$lang['Posted_articles_total'] = 'Our users have posted a total of <b>%d</b> articles'; // Number of posts
$lang['Posted_article_total'] = 'Our users have posted a total of <b>%d</b> article'; // Number of posts
$lang['Registered_users_zero_total'] = 'We have <b>0</b> registered users'; // # registered users
$lang['Registered_users_total'] = 'We have <b>%d</b> registered users'; // # registered users
$lang['Registered_user_total'] = 'We have <b>%d</b> registered user'; // # registered users
$lang['Newest_user'] = 'The newest registered user is <b>%s%s%s</b>'; // a href, username, /a
 
$lang['No_new_posts_last_visit'] = 'No new posts since your last visit';
$lang['No_new_posts'] = 'No new posts';
$lang['New_posts'] = 'New posts';
$lang['New_post'] = 'New post';
$lang['No_new_posts_hot'] = 'No new posts [ Popular ]';
$lang['New_posts_hot'] = 'New posts [ Popular ]';
$lang['No_new_posts_locked'] = 'No new posts [ Locked ]';
$lang['New_posts_locked'] = 'New posts [ Locked ]';
$lang['Forum_is_locked'] = 'Forum is locked';
 
 
//
// Login
//
$lang['Enter_password'] = 'Please enter your username and password to log in.';
$lang['Login'] = 'Log in';
$lang['Logout'] = 'Log out';
 
$lang['Forgotten_password'] = 'I forgot my password';
 
$lang['Log_me_in'] = 'Log me on automatically each visit';
 
$lang['Error_login'] = 'You have specified an incorrect or inactive username, or an invalid password.';
 
 
//
// Index page
//
$lang['Index'] = 'Index';
$lang['No_Posts'] = 'No Posts';
$lang['No_forums'] = 'This board has no forums';
 
$lang['Private_Message'] = 'Private Message';
$lang['Private_Messages'] = 'Private Messages';
$lang['Who_is_Online'] = 'Who is Online';
 
$lang['Mark_all_forums'] = 'Mark all forums read';
$lang['Forums_marked_read'] = 'All forums have been marked read';
 
 
//
// Viewforum
//
$lang['View_forum'] = 'View Forum';
 
$lang['Forum_not_exist'] = 'The forum you selected does not exist.';
$lang['Reached_on_error'] = 'You have reached this page in error.';
 
$lang['Display_topics'] = 'Display topics from previous';
$lang['All_Topics'] = 'All Topics';
 
$lang['Topic_Announcement'] = '<b>Announcement:</b>';
$lang['Topic_Sticky'] = '<b>Sticky:</b>';
$lang['Topic_Moved'] = '<b>Moved:</b>';
$lang['Topic_Poll'] = '<b>[ Poll ]</b>';
 
$lang['Mark_all_topics'] = 'Mark all topics read';
$lang['Topics_marked_read'] = 'The topics for this forum have now been marked read';
 
$lang['Rules_post_can'] = 'You <b>can</b> post new topics in this forum';
$lang['Rules_post_cannot'] = 'You <b>cannot</b> post new topics in this forum';
$lang['Rules_reply_can'] = 'You <b>can</b> reply to topics in this forum';
$lang['Rules_reply_cannot'] = 'You <b>cannot</b> reply to topics in this forum';
$lang['Rules_edit_can'] = 'You <b>can</b> edit your posts in this forum';
$lang['Rules_edit_cannot'] = 'You <b>cannot</b> edit your posts in this forum';
$lang['Rules_delete_can'] = 'You <b>can</b> delete your posts in this forum';
$lang['Rules_delete_cannot'] = 'You <b>cannot</b> delete your posts in this forum';
$lang['Rules_vote_can'] = 'You <b>can</b> vote in polls in this forum';
$lang['Rules_vote_cannot'] = 'You <b>cannot</b> vote in polls in this forum';
$lang['Rules_moderate'] = 'You <b>can</b> %smoderate this forum%s'; // %s replaced by a href links, do not remove!
 
$lang['No_topics_post_one'] = 'There are no posts in this forum.<br />Click on the <b>Post New Topic</b> link on this page to post one.';
 
 
//
// Viewtopic
//
$lang['View_topic'] = 'View topic';
 
$lang['Guest'] = 'Guest';
$lang['Post_subject'] = 'Post subject';
$lang['View_next_topic'] = 'View next topic';
$lang['View_previous_topic'] = 'View previous topic';
$lang['Submit_vote'] = 'Submit Vote';
$lang['View_results'] = 'View Results';
 
$lang['No_newer_topics'] = 'There are no newer topics in this forum';
$lang['No_older_topics'] = 'There are no older topics in this forum';
$lang['Topic_post_not_exist'] = 'The topic or post you requested does not exist';
$lang['No_posts_topic'] = 'No posts exist for this topic';
 
$lang['Display_posts'] = 'Display posts from previous';
$lang['All_Posts'] = 'All Posts';
$lang['Newest_First'] = 'Newest First';
$lang['Oldest_First'] = 'Oldest First';
 
$lang['Back_to_top'] = 'Back to top';
 
$lang['Read_profile'] = 'View user\'s profile';
$lang['Visit_website'] = 'Visit poster\'s website';
$lang['ICQ_status'] = 'ICQ Status';
$lang['Edit_delete_post'] = 'Edit/Delete this post';
$lang['View_IP'] = 'View IP address of poster';
$lang['Delete_post'] = 'Delete this post';
 
$lang['wrote'] = 'wrote'; // proceeds the username and is followed by the quoted text
$lang['Quote'] = 'Quote'; // comes before bbcode quote output.
$lang['Code'] = 'Code'; // comes before bbcode code output.
 
$lang['Edited_time_total'] = 'Last edited by %s on %s; edited %d time in total'; // Last edited by me on 12 Oct 2001; edited 1 time in total
$lang['Edited_times_total'] = 'Last edited by %s on %s; edited %d times in total'; // Last edited by me on 12 Oct 2001; edited 2 times in total
 
$lang['Lock_topic'] = 'Lock this topic';
$lang['Unlock_topic'] = 'Unlock this topic';
$lang['Move_topic'] = 'Move this topic';
$lang['Delete_topic'] = 'Delete this topic';
$lang['Split_topic'] = 'Split this topic';
 
$lang['Stop_watching_topic'] = 'Stop watching this topic';
$lang['Start_watching_topic'] = 'Watch this topic for replies';
$lang['No_longer_watching'] = 'You are no longer watching this topic';
$lang['You_are_watching'] = 'You are now watching this topic';
 
$lang['Total_votes'] = 'Total Votes';
 
//
// Posting/Replying (Not private messaging!)
//
$lang['Message_body'] = 'Message body';
$lang['Topic_review'] = 'Topic review';
 
$lang['No_post_mode'] = 'No post mode specified'; // If posting.php is called without a mode (newtopic/reply/delete/etc, shouldn't be shown normaly)
 
$lang['Post_a_new_topic'] = 'Post a new topic';
$lang['Post_a_reply'] = 'Post a reply';
$lang['Post_topic_as'] = 'Post topic as';
$lang['Edit_Post'] = 'Edit post';
$lang['Options'] = 'Options';
 
$lang['Post_Announcement'] = 'Announcement';
$lang['Post_Sticky'] = 'Sticky';
$lang['Post_Normal'] = 'Normal';
 
$lang['Confirm_delete'] = 'Are you sure you want to delete this post?';
$lang['Confirm_delete_poll'] = 'Are you sure you want to delete this poll?';
 
$lang['Flood_Error'] = 'You cannot make another post so soon after your last; please try again in a short while.';
$lang['Empty_subject'] = 'You must specify a subject when posting a new topic.';
$lang['Empty_message'] = 'You must enter a message when posting.';
$lang['Forum_locked'] = 'This forum is locked: you cannot post, reply to, or edit topics.';
$lang['Topic_locked'] = 'This topic is locked: you cannot edit posts or make replies.';
$lang['No_post_id'] = 'You must select a post to edit';
$lang['No_topic_id'] = 'You must select a topic to reply to';
$lang['No_valid_mode'] = 'You can only post, reply, edit, or quote messages. Please return and try again.';
$lang['No_such_post'] = 'There is no such post. Please return and try again.';
$lang['Edit_own_posts'] = 'Sorry, but you can only edit your own posts.';
$lang['Delete_own_posts'] = 'Sorry, but you can only delete your own posts.';
$lang['Cannot_delete_replied'] = 'Sorry, but you may not delete posts that have been replied to.';
$lang['Cannot_delete_poll'] = 'Sorry, but you cannot delete an active poll.';
$lang['Empty_poll_title'] = 'You must enter a title for your poll.';
$lang['To_few_poll_options'] = 'You must enter at least two poll options.';
$lang['To_many_poll_options'] = 'You have tried to enter too many poll options.';
$lang['Post_has_no_poll'] = 'This post has no poll.';
$lang['Already_voted'] = 'You have already voted in this poll.';
$lang['No_vote_option'] = 'You must specify an option when voting.';
 
$lang['Add_poll'] = 'Add a Poll';
$lang['Add_poll_explain'] = 'If you do not want to add a poll to your topic, leave the fields blank.';
$lang['Poll_question'] = 'Poll question';
$lang['Poll_option'] = 'Poll option';
$lang['Add_option'] = 'Add option';
$lang['Update'] = 'Update';
$lang['Delete'] = 'Delete';
$lang['Poll_for'] = 'Run poll for';
$lang['Days'] = 'Days'; // This is used for the Run poll for ... Days + in admin_forums for pruning
$lang['Poll_for_explain'] = '[ Enter 0 or leave blank for a never-ending poll ]';
$lang['Delete_poll'] = 'Delete Poll';
 
$lang['Disable_HTML_post'] = 'Disable HTML in this post';
$lang['Disable_BBCode_post'] = 'Disable BBCode in this post';
$lang['Disable_Smilies_post'] = 'Disable Smilies in this post';
 
$lang['HTML_is_ON'] = 'HTML is <u>ON</u>';
$lang['HTML_is_OFF'] = 'HTML is <u>OFF</u>';
$lang['BBCode_is_ON'] = '%sBBCode%s is <u>ON</u>'; // %s are replaced with URI pointing to FAQ
$lang['BBCode_is_OFF'] = '%sBBCode%s is <u>OFF</u>';
$lang['Smilies_are_ON'] = 'Smilies are <u>ON</u>';
$lang['Smilies_are_OFF'] = 'Smilies are <u>OFF</u>';
 
$lang['Attach_signature'] = 'Attach signature (signatures can be changed in profile)';
$lang['Notify'] = 'Notify me when a reply is posted';
 
$lang['Stored'] = 'Your message has been entered successfully.';
$lang['Deleted'] = 'Your message has been deleted successfully.';
$lang['Poll_delete'] = 'Your poll has been deleted successfully.';
$lang['Vote_cast'] = 'Your vote has been cast.';
 
$lang['Topic_reply_notification'] = 'Topic Reply Notification';
 
$lang['bbcode_b_help'] = 'Bold text: [b]text[/b] (alt+b)';
$lang['bbcode_i_help'] = 'Italic text: [i]text[/i] (alt+i)';
$lang['bbcode_u_help'] = 'Underline text: [u]text[/u] (alt+u)';
$lang['bbcode_q_help'] = 'Quote text: [quote]text[/quote] (alt+q)';
$lang['bbcode_c_help'] = 'Code display: [code]code[/code] (alt+c)';
$lang['bbcode_l_help'] = 'List: [list]text[/list] (alt+l)';
$lang['bbcode_o_help'] = 'Ordered list: [list=]text[/list] (alt+o)';
$lang['bbcode_p_help'] = 'Insert image: [img]http://image_url[/img] (alt+p)';
$lang['bbcode_w_help'] = 'Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url] (alt+w)';
$lang['bbcode_a_help'] = 'Close all open bbCode tags';
$lang['bbcode_s_help'] = 'Font color: [color=red]text[/color] Tip: you can also use color=#FF0000';
$lang['bbcode_f_help'] = 'Font size: [size=x-small]small text[/size]';
 
$lang['Emoticons'] = 'Emoticons';
$lang['More_emoticons'] = 'View more Emoticons';
 
$lang['Font_color'] = 'Font colour';
$lang['color_default'] = 'Default';
$lang['color_dark_red'] = 'Dark Red';
$lang['color_red'] = 'Red';
$lang['color_orange'] = 'Orange';
$lang['color_brown'] = 'Brown';
$lang['color_yellow'] = 'Yellow';
$lang['color_green'] = 'Green';
$lang['color_olive'] = 'Olive';
$lang['color_cyan'] = 'Cyan';
$lang['color_blue'] = 'Blue';
$lang['color_dark_blue'] = 'Dark Blue';
$lang['color_indigo'] = 'Indigo';
$lang['color_violet'] = 'Violet';
$lang['color_white'] = 'White';
$lang['color_black'] = 'Black';
 
$lang['Font_size'] = 'Font size';
$lang['font_tiny'] = 'Tiny';
$lang['font_small'] = 'Small';
$lang['font_normal'] = 'Normal';
$lang['font_large'] = 'Large';
$lang['font_huge'] = 'Huge';
 
$lang['Close_Tags'] = 'Close Tags';
$lang['Styles_tip'] = 'Tip: Styles can be applied quickly to selected text.';
 
 
//
// Private Messaging
//
$lang['Private_Messaging'] = 'Private Messaging';
 
$lang['Login_check_pm'] = 'Log in to check your private messages';
$lang['New_pms'] = 'You have %d new messages'; // You have 2 new messages
$lang['New_pm'] = 'You have %d new message'; // You have 1 new message
$lang['No_new_pm'] = 'You have no new messages';
$lang['Unread_pms'] = 'You have %d unread messages';
$lang['Unread_pm'] = 'You have %d unread message';
$lang['No_unread_pm'] = 'You have no unread messages';
$lang['You_new_pm'] = 'A new private message is waiting for you in your Inbox';
$lang['You_new_pms'] = 'New private messages are waiting for you in your Inbox';
$lang['You_no_new_pm'] = 'No new private messages are waiting for you';
 
$lang['Unread_message'] = 'Unread message';
$lang['Read_message'] = 'Read message';
 
$lang['Read_pm'] = 'Read message';
$lang['Post_new_pm'] = 'Post message';
$lang['Post_reply_pm'] = 'Reply to message';
$lang['Post_quote_pm'] = 'Quote message';
$lang['Edit_pm'] = 'Edit message';
 
$lang['Inbox'] = 'Inbox';
$lang['Outbox'] = 'Outbox';
$lang['Savebox'] = 'Savebox';
$lang['Sentbox'] = 'Sentbox';
$lang['Flag'] = 'Flag';
$lang['Subject'] = 'Subject';
$lang['From'] = 'From';
$lang['To'] = 'To';
$lang['Date'] = 'Date';
$lang['Mark'] = 'Mark';
$lang['Sent'] = 'Sent';
$lang['Saved'] = 'Saved';
$lang['Delete_marked'] = 'Delete Marked';
$lang['Delete_all'] = 'Delete All';
$lang['Save_marked'] = 'Save Marked';
$lang['Save_message'] = 'Save Message';
$lang['Delete_message'] = 'Delete Message';
 
$lang['Display_messages'] = 'Display messages from previous'; // Followed by number of days/weeks/months
$lang['All_Messages'] = 'All Messages';
 
$lang['No_messages_folder'] = 'You have no messages in this folder';
 
$lang['PM_disabled'] = 'Private messaging has been disabled on this board.';
$lang['Cannot_send_privmsg'] = 'Sorry, but the administrator has prevented you from sending private messages.';
$lang['No_to_user'] = 'You must specify a username to whom to send this message.';
$lang['No_such_user'] = 'Sorry, but no such user exists.';
 
$lang['Disable_HTML_pm'] = 'Disable HTML in this message';
$lang['Disable_BBCode_pm'] = 'Disable BBCode in this message';
$lang['Disable_Smilies_pm'] = 'Disable Smilies in this message';
 
$lang['Message_sent'] = 'Your message has been sent.';
 
$lang['Click_return_inbox'] = 'Click %sHere%s to return to your Inbox';
$lang['Click_return_index'] = 'Click %sHere%s to return to the Index';
 
$lang['Send_a_new_message'] = 'Send a new private message';
$lang['Send_a_reply'] = 'Reply to a private message';
$lang['Edit_message'] = 'Edit private message';
 
$lang['Notification_subject'] = 'New Private Message has arrived!';
 
$lang['Find_username'] = 'Find a username';
$lang['Find'] = 'Find';
$lang['No_match'] = 'No matches found.';
 
$lang['No_post_id'] = 'No post ID was specified';
$lang['No_such_folder'] = 'No such folder exists';
$lang['No_folder'] = 'No folder specified';
 
$lang['Mark_all'] = 'Mark all';
$lang['Unmark_all'] = 'Unmark all';
 
$lang['Confirm_delete_pm'] = 'Are you sure you want to delete this message?';
$lang['Confirm_delete_pms'] = 'Are you sure you want to delete these messages?';
 
$lang['Inbox_size'] = 'Your Inbox is %d%% full'; // eg. Your Inbox is 50% full
$lang['Sentbox_size'] = 'Your Sentbox is %d%% full';
$lang['Savebox_size'] = 'Your Savebox is %d%% full';
 
$lang['Click_view_privmsg'] = 'Click %sHere%s to visit your Inbox';
 
 
//
// Profiles/Registration
//
$lang['Viewing_user_profile'] = 'Viewing profile :: %s'; // %s is username
$lang['About_user'] = 'All about %s'; // %s is username
 
$lang['Preferences'] = 'Preferences';
$lang['Items_required'] = 'Items marked with a * are required unless stated otherwise.';
$lang['Registration_info'] = 'Registration Information';
$lang['Profile_info'] = 'Profile Information';
$lang['Profile_info_warn'] = 'This information will be publicly viewable';
$lang['Avatar_panel'] = 'Avatar control panel';
$lang['Avatar_gallery'] = 'Avatar gallery';
 
$lang['Website'] = 'Website';
$lang['Location'] = 'Location';
$lang['Contact'] = 'Contact';
$lang['Email_address'] = 'E-mail address';
$lang['Send_private_message'] = 'Send private message';
$lang['Hidden_email'] = '[ Hidden ]';
$lang['Interests'] = 'Interests';
$lang['Occupation'] = 'Occupation';
$lang['Poster_rank'] = 'Poster rank';
 
$lang['Total_posts'] = 'Total posts';
$lang['User_post_pct_stats'] = '%.2f%% of total'; // 1.25% of total
$lang['User_post_day_stats'] = '%.2f posts per day'; // 1.5 posts per day
$lang['Search_user_posts'] = 'Find all posts by %s'; // Find all posts by username
 
$lang['No_user_id_specified'] = 'Sorry, but that user does not exist.';
$lang['Wrong_Profile'] = 'You cannot modify a profile that is not your own.';
 
$lang['Only_one_avatar'] = 'Only one type of avatar can be specified';
$lang['File_no_data'] = 'The file at the URL you gave contains no data';
$lang['No_connection_URL'] = 'A connection could not be made to the URL you gave';
$lang['Incomplete_URL'] = 'The URL you entered is incomplete';
$lang['Wrong_remote_avatar_format'] = 'The URL of the remote avatar is not valid';
$lang['No_send_account_inactive'] = 'Sorry, but your password cannot be retrieved because your account is currently inactive. Please contact the forum administrator for more information.';
 
$lang['Always_smile'] = 'Always enable Smilies';
$lang['Always_html'] = 'Always allow HTML';
$lang['Always_bbcode'] = 'Always allow BBCode';
$lang['Always_add_sig'] = 'Always attach my signature';
$lang['Always_notify'] = 'Always notify me of replies';
$lang['Always_notify_explain'] = 'Sends an e-mail when someone replies to a topic you have posted in. This can be changed whenever you post.';
 
$lang['Board_style'] = 'Board Style';
$lang['Board_lang'] = 'Board Language';
$lang['No_themes'] = 'No Themes In database';
$lang['Timezone'] = 'Timezone';
$lang['Date_format'] = 'Date format';
$lang['Date_format_explain'] = 'The syntax used is identical to the PHP <a href=\'http://www.php.net/date\' target=\'_other\'>date()</a> function.';
$lang['Signature'] = 'Signature';
$lang['Signature_explain'] = 'This is a block of text that can be added to posts you make. There is a %d character limit';
$lang['Public_view_email'] = 'Always show my e-mail address';
 
$lang['Current_password'] = 'Current password';
$lang['New_password'] = 'New password';
$lang['Confirm_password'] = 'Confirm password';
$lang['Confirm_password_explain'] = 'You must confirm your current password if you wish to change it or alter your e-mail address';
$lang['password_if_changed'] = 'You only need to supply a password if you want to change it';
$lang['password_confirm_if_changed'] = 'You only need to confirm your password if you changed it above';
 
$lang['Avatar'] = 'Avatar';
$lang['Avatar_explain'] = 'Displays a small graphic image below your details in posts. Only one image can be displayed at a time, its width can be no greater than %d pixels, the height no greater than %d pixels, and the file size no more than %d KB.';
$lang['Upload_Avatar_file'] = 'Upload Avatar from your machine';
$lang['Upload_Avatar_URL'] = 'Upload Avatar from a URL';
$lang['Upload_Avatar_URL_explain'] = 'Enter the URL of the location containing the Avatar image, it will be copied to this site.';
$lang['Pick_local_Avatar'] = 'Select Avatar from the gallery';
$lang['Link_remote_Avatar'] = 'Link to off-site Avatar';
$lang['Link_remote_Avatar_explain'] = 'Enter the URL of the location containing the Avatar image you wish to link to.';
$lang['Avatar_URL'] = 'URL of Avatar Image';
$lang['Select_from_gallery'] = 'Select Avatar from gallery';
$lang['View_avatar_gallery'] = 'Show gallery';
 
$lang['Select_avatar'] = 'Select avatar';
$lang['Return_profile'] = 'Cancel avatar';
$lang['Select_category'] = 'Select category';
 
$lang['Delete_Image'] = 'Delete Image';
$lang['Current_Image'] = 'Current Image';
 
$lang['Notify_on_privmsg'] = 'Notify on new Private Message';
$lang['Popup_on_privmsg'] = 'Pop up window on new Private Message';
$lang['Popup_on_privmsg_explain'] = 'Some templates may open a new window to inform you when new private messages arrive.';
$lang['Hide_user'] = 'Hide your online status';
 
$lang['Profile_updated'] = 'Your profile has been updated';
$lang['Profile_updated_inactive'] = 'Your profile has been updated. However, you have changed vital details, thus your account is now inactive. Check your e-mail to find out how to reactivate your account, or if admin activation is required, wait for the administrator to reactivate it.';
 
$lang['Password_mismatch'] = 'The passwords you entered did not match.';
$lang['Current_password_mismatch'] = 'The current password you supplied does not match that stored in the database.';
$lang['Password_long'] = 'Your password must be no more than 32 characters.';
$lang['Username_taken'] = 'Sorry, but this username has already been taken.';
$lang['Username_invalid'] = 'Sorry, but this username contains an invalid character such as \'.';
$lang['Username_disallowed'] = 'Sorry, but this username has been disallowed.';
$lang['Email_taken'] = 'Sorry, but that e-mail address is already registered to a user.';
$lang['Email_banned'] = 'Sorry, but this e-mail address has been banned.';
$lang['Email_invalid'] = 'Sorry, but this e-mail address is invalid.';
$lang['Signature_too_long'] = 'Your signature is too long.';
$lang['Fields_empty'] = 'You must fill in the required fields.';
$lang['Avatar_filetype'] = 'The avatar filetype must be .jpg, .gif or .png';
$lang['Avatar_filesize'] = 'The avatar image file size must be less than %d KB'; // The avatar image file size must be less than 6 KB
$lang['Avatar_imagesize'] = 'The avatar must be less than %d pixels wide and %d pixels high';
 
$lang['Welcome_subject'] = 'Welcome to %s Forums'; // Welcome to my.com forums
$lang['New_account_subject'] = 'New user account';
$lang['Account_activated_subject'] = 'Account Activated';
 
$lang['Account_added'] = 'Thank you for registering. Your account has been created. You may now log in with your username and password';
$lang['Account_inactive'] = 'Your account has been created. However, this forum requires account activation. An activation key has been sent to the e-mail address you provided. Please check your e-mail for further information';
$lang['Account_inactive_admin'] = 'Your account has been created. However, this forum requires account activation by the administrator. An e-mail has been sent to them and you will be informed when your account has been activated';
$lang['Account_active'] = 'Your account has now been activated. Thank you for registering';
$lang['Account_active_admin'] = 'The account has now been activated';
$lang['Reactivate'] = 'Reactivate your account!';
$lang['Already_activated'] = 'You have already activated your account';
$lang['COPPA'] = 'Your account has been created but has to be approved. Please check your e-mail for details.';
 
$lang['Registration'] = 'Registration Agreement Terms';
$lang['Reg_agreement'] = 'While the administrators and moderators of this forum will attempt to remove or edit any generally objectionable material as quickly as possible, it is impossible to review every message. Therefore you acknowledge that all posts made to these forums express the views and opinions of the author and not the administrators, moderators or webmaster (except for posts by these people) and hence will not be held liable.<br /><br />You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-oriented or any other material that may violate any applicable laws. Doing so may lead to you being immediately and permanently banned (and your service provider being informed). The IP address of all posts is recorded to aid in enforcing these conditions. You agree that the webmaster, administrator and moderators of this forum have the right to remove, edit, move or close any topic at any time should they see fit. As a user you agree to any information you have entered above being stored in a database. While this information will not be disclosed to any third party without your consent the webmaster, administrator and moderators cannot be held responsible for any hacking attempt that may lead to the data being compromised.<br /><br />This forum system uses cookies to store information on your local computer. These cookies do not contain any of the information you have entered above; they serve only to improve your viewing pleasure. The e-mail address is used only for confirming your registration details and password (and for sending new passwords should you forget your current one).<br /><br />By clicking Register below you agree to be bound by these conditions.';
 
$lang['Agree_under_13'] = 'I Agree to these terms and am <b>under</b> 13 years of age';
$lang['Agree_over_13'] = 'I Agree to these terms and am <b>over</b> or <b>exactly</b> 13 years of age';
$lang['Agree_not'] = 'I do not agree to these terms';
 
$lang['Wrong_activation'] = 'The activation key you supplied does not match any in the database.';
$lang['Send_password'] = 'Send me a new password';
$lang['Password_updated'] = 'A new password has been created; please check your e-mail for details on how to activate it.';
$lang['No_email_match'] = 'The e-mail address you supplied does not match the one listed for that username.';
$lang['New_password_activation'] = 'New password activation';
$lang['Password_activated'] = 'Your account has been re-activated. To log in, please use the password supplied in the e-mail you received.';
 
$lang['Send_email_msg'] = 'Send an e-mail message';
$lang['No_user_specified'] = 'No user was specified';
$lang['User_prevent_email'] = 'This user does not wish to receive e-mail. Try sending them a private message.';
$lang['User_not_exist'] = 'That user does not exist';
$lang['CC_email'] = 'Send a copy of this e-mail to yourself';
$lang['Email_message_desc'] = 'This message will be sent as plain text, so do not include any HTML or BBCode. The return address for this message will be set to your e-mail address.';
$lang['Flood_email_limit'] = 'You cannot send another e-mail at this time. Try again later.';
$lang['Recipient'] = 'Recipient';
$lang['Email_sent'] = 'The e-mail has been sent.';
$lang['Send_email'] = 'Send e-mail';
$lang['Empty_subject_email'] = 'You must specify a subject for the e-mail.';
$lang['Empty_message_email'] = 'You must enter a message to be e-mailed.';
 
 
//
// Visual confirmation system strings
//
$lang['Confirm_code_wrong'] = 'The confirmation code you entered was incorrect';
$lang['Too_many_registers'] = 'You have exceeded the number of registration attempts for this session. Please try again later.';
$lang['Confirm_code_impaired'] = 'If you are visually impaired or cannot otherwise read this code please contact the %sAdministrator%s for help.';
$lang['Confirm_code'] = 'Confirmation code';
$lang['Confirm_code_explain'] = 'Enter the code exactly as you see it. The code is case sensitive and zero has a diagonal line through it.';
 
 
 
//
// Memberslist
//
$lang['Select_sort_method'] = 'Select sort method';
$lang['Sort'] = 'Sort';
$lang['Sort_Top_Ten'] = 'Top Ten Posters';
$lang['Sort_Joined'] = 'Joined Date';
$lang['Sort_Username'] = 'Username';
$lang['Sort_Location'] = 'Location';
$lang['Sort_Posts'] = 'Total posts';
$lang['Sort_Email'] = 'Email';
$lang['Sort_Website'] = 'Website';
$lang['Sort_Ascending'] = 'Ascending';
$lang['Sort_Descending'] = 'Descending';
$lang['Order'] = 'Order';
 
 
//
// Group control panel
//
$lang['Group_Control_Panel'] = 'Group Control Panel';
$lang['Group_member_details'] = 'Group Membership Details';
$lang['Group_member_join'] = 'Join a Group';
 
$lang['Group_Information'] = 'Group Information';
$lang['Group_name'] = 'Group name';
$lang['Group_description'] = 'Group description';
$lang['Group_membership'] = 'Group membership';
$lang['Group_Members'] = 'Group Members';
$lang['Group_Moderator'] = 'Group Moderator';
$lang['Pending_members'] = 'Pending Members';
 
$lang['Group_type'] = 'Group type';
$lang['Group_open'] = 'Open group';
$lang['Group_closed'] = 'Closed group';
$lang['Group_hidden'] = 'Hidden group';
 
$lang['Current_memberships'] = 'Current memberships';
$lang['Non_member_groups'] = 'Non-member groups';
$lang['Memberships_pending'] = 'Memberships pending';
 
$lang['No_groups_exist'] = 'No Groups Exist';
$lang['Group_not_exist'] = 'That user group does not exist';
 
$lang['Join_group'] = 'Join Group';
$lang['No_group_members'] = 'This group has no members';
$lang['Group_hidden_members'] = 'This group is hidden; you cannot view its membership';
$lang['No_pending_group_members'] = 'This group has no pending members';
$lang['Group_joined'] = 'You have successfully subscribed to this group.<br />You will be notified when your subscription is approved by the group moderator.';
$lang['Group_request'] = 'A request to join your group has been made.';
$lang['Group_approved'] = 'Your request has been approved.';
$lang['Group_added'] = 'You have been added to this usergroup.';
$lang['Already_member_group'] = 'You are already a member of this group';
$lang['User_is_member_group'] = 'User is already a member of this group';
$lang['Group_type_updated'] = 'Successfully updated group type.';
 
$lang['Could_not_add_user'] = 'The user you selected does not exist.';
$lang['Could_not_anon_user'] = 'You cannot make Anonymous a group member.';
 
$lang['Confirm_unsub'] = 'Are you sure you want to unsubscribe from this group?';
$lang['Confirm_unsub_pending'] = 'Your subscription to this group has not yet been approved; are you sure you want to unsubscribe?';
 
$lang['Unsub_success'] = 'You have been un-subscribed from this group.';
 
$lang['Approve_selected'] = 'Approve Selected';
$lang['Deny_selected'] = 'Deny Selected';
$lang['Not_logged_in'] = 'You must be logged in to join a group.';
$lang['Remove_selected'] = 'Remove Selected';
$lang['Add_member'] = 'Add Member';
$lang['Not_group_moderator'] = 'You are not this group\'s moderator, therefore you cannot perform that action.';
 
$lang['Login_to_join'] = 'Log in to join or manage group memberships';
$lang['This_open_group'] = 'This is an open group: click to request membership';
$lang['This_closed_group'] = 'This is a closed group: no more users accepted';
$lang['This_hidden_group'] = 'This is a hidden group: automatic user addition is not allowed';
$lang['Member_this_group'] = 'You are a member of this group';
$lang['Pending_this_group'] = 'Your membership of this group is pending';
$lang['Are_group_moderator'] = 'You are the group moderator';
$lang['None'] = 'None';
 
$lang['Subscribe'] = 'Subscribe';
$lang['Unsubscribe'] = 'Unsubscribe';
$lang['View_Information'] = 'View Information';
 
 
//
// Search
//
$lang['Search_query'] = 'Search Query';
$lang['Search_options'] = 'Search Options';
 
$lang['Search_keywords'] = 'Search for Keywords';
$lang['Search_keywords_explain'] = 'You can use <u>AND</u> to define words which must be in the results, <u>OR</u> to define words which may be in the result and <u>NOT</u> to define words which should not be in the result. Use * as a wildcard for partial matches';
$lang['Search_author'] = 'Search for Author';
$lang['Search_author_explain'] = 'Use * as a wildcard for partial matches';
 
$lang['Search_for_any'] = 'Search for any terms or use query as entered';
$lang['Search_for_all'] = 'Search for all terms';
$lang['Search_title_msg'] = 'Search topic title and message text';
$lang['Search_msg_only'] = 'Search message text only';
 
$lang['Return_first'] = 'Return first'; // followed by xxx characters in a select box
$lang['characters_posts'] = 'characters of posts';
 
$lang['Search_previous'] = 'Search previous'; // followed by days, weeks, months, year, all in a select box
 
$lang['Sort_by'] = 'Sort by';
$lang['Sort_Time'] = 'Post Time';
$lang['Sort_Post_Subject'] = 'Post Subject';
$lang['Sort_Topic_Title'] = 'Topic Title';
$lang['Sort_Author'] = 'Author';
$lang['Sort_Forum'] = 'Forum';
 
$lang['Display_results'] = 'Display results as';
$lang['All_available'] = 'All available';
$lang['No_searchable_forums'] = 'You do not have permissions to search any forum on this site.';
 
$lang['No_search_match'] = 'No topics or posts met your search criteria';
$lang['Found_search_match'] = 'Search found %d match'; // eg. Search found 1 match
$lang['Found_search_matches'] = 'Search found %d matches'; // eg. Search found 24 matches
$lang['Search_Flood_Error'] = 'You cannot make another search so soon after your last; please try again in a short while.';
 
$lang['Close_window'] = 'Close Window';
 
 
//
// Auth related entries
//
// Note the %s will be replaced with one of the following 'user' arrays
$lang['Sorry_auth_announce'] = 'Sorry, but only %s can post announcements in this forum.';
$lang['Sorry_auth_sticky'] = 'Sorry, but only %s can post sticky messages in this forum.';
$lang['Sorry_auth_read'] = 'Sorry, but only %s can read topics in this forum.';
$lang['Sorry_auth_post'] = 'Sorry, but only %s can post topics in this forum.';
$lang['Sorry_auth_reply'] = 'Sorry, but only %s can reply to posts in this forum.';
$lang['Sorry_auth_edit'] = 'Sorry, but only %s can edit posts in this forum.';
$lang['Sorry_auth_delete'] = 'Sorry, but only %s can delete posts in this forum.';
$lang['Sorry_auth_vote'] = 'Sorry, but only %s can vote in polls in this forum.';
 
// These replace the %s in the above strings
$lang['Auth_Anonymous_Users'] = '<b>anonymous users</b>';
$lang['Auth_Registered_Users'] = '<b>registered users</b>';
$lang['Auth_Users_granted_access'] = '<b>users granted special access</b>';
$lang['Auth_Moderators'] = '<b>moderators</b>';
$lang['Auth_Administrators'] = '<b>administrators</b>';
 
$lang['Not_Moderator'] = 'You are not a moderator of this forum.';
$lang['Not_Authorised'] = 'Not Authorised';
 
$lang['You_been_banned'] = 'You have been banned from this forum.<br />Please contact the webmaster or board administrator for more information.';
 
 
//
// Viewonline
//
$lang['Reg_users_zero_online'] = 'There are 0 Registered users and '; // There are 5 Registered and
$lang['Reg_users_online'] = 'There are %d Registered users and '; // There are 5 Registered and
$lang['Reg_user_online'] = 'There is %d Registered user and '; // There is 1 Registered and
$lang['Hidden_users_zero_online'] = '0 Hidden users online'; // 6 Hidden users online
$lang['Hidden_users_online'] = '%d Hidden users online'; // 6 Hidden users online
$lang['Hidden_user_online'] = '%d Hidden user online'; // 6 Hidden users online
$lang['Guest_users_online'] = 'There are %d Guest users online'; // There are 10 Guest users online
$lang['Guest_users_zero_online'] = 'There are 0 Guest users online'; // There are 10 Guest users online
$lang['Guest_user_online'] = 'There is %d Guest user online'; // There is 1 Guest user online
$lang['No_users_browsing'] = 'There are no users currently browsing this forum';
 
$lang['Online_explain'] = 'This data is based on users active over the past five minutes';
 
$lang['Forum_Location'] = 'Forum Location';
$lang['Last_updated'] = 'Last Updated';
 
$lang['Forum_index'] = 'Forum index';
$lang['Logging_on'] = 'Logging on';
$lang['Posting_message'] = 'Posting a message';
$lang['Searching_forums'] = 'Searching forums';
$lang['Viewing_profile'] = 'Viewing profile';
$lang['Viewing_online'] = 'Viewing who is online';
$lang['Viewing_member_list'] = 'Viewing member list';
$lang['Viewing_priv_msgs'] = 'Viewing Private Messages';
$lang['Viewing_FAQ'] = 'Viewing FAQ';
 
 
//
// Moderator Control Panel
//
$lang['Mod_CP'] = 'Moderator Control Panel';
$lang['Mod_CP_explain'] = 'Using the form below you can perform mass moderation operations on this forum. You can lock, unlock, move or delete any number of topics.';
 
$lang['Select'] = 'Select';
$lang['Delete'] = 'Delete';
$lang['Move'] = 'Move';
$lang['Lock'] = 'Lock';
$lang['Unlock'] = 'Unlock';
 
$lang['Topics_Removed'] = 'The selected topics have been successfully removed from the database.';
$lang['Topics_Locked'] = 'The selected topics have been locked.';
$lang['Topics_Moved'] = 'The selected topics have been moved.';
$lang['Topics_Unlocked'] = 'The selected topics have been unlocked.';
$lang['No_Topics_Moved'] = 'No topics were moved.';
 
$lang['Confirm_delete_topic'] = 'Are you sure you want to remove the selected topic/s?';
$lang['Confirm_lock_topic'] = 'Are you sure you want to lock the selected topic/s?';
$lang['Confirm_unlock_topic'] = 'Are you sure you want to unlock the selected topic/s?';
$lang['Confirm_move_topic'] = 'Are you sure you want to move the selected topic/s?';
 
$lang['Move_to_forum'] = 'Move to forum';
$lang['Leave_shadow_topic'] = 'Leave shadow topic in old forum.';
 
$lang['Split_Topic'] = 'Split Topic Control Panel';
$lang['Split_Topic_explain'] = 'Using the form below you can split a topic in two, either by selecting the posts individually or by splitting at a selected post';
$lang['Split_title'] = 'New topic title';
$lang['Split_forum'] = 'Forum for new topic';
$lang['Split_posts'] = 'Split selected posts';
$lang['Split_after'] = 'Split from selected post';
$lang['Topic_split'] = 'The selected topic has been split successfully';
 
$lang['Too_many_error'] = 'You have selected too many posts. You can only select one post to split a topic after!';
 
$lang['None_selected'] = 'You have not selected any topics to perform this operation on. Please go back and select at least one.';
$lang['New_forum'] = 'New forum';
 
$lang['This_posts_IP'] = 'IP address for this post';
$lang['Other_IP_this_user'] = 'Other IP addresses this user has posted from';
$lang['Users_this_IP'] = 'Users posting from this IP address';
$lang['IP_info'] = 'IP Information';
$lang['Lookup_IP'] = 'Look up IP address';
 
 
//
// Timezones ... for display on each page
//
$lang['All_times'] = 'All times are %s'; // eg. All times are GMT - 12 Hours (times from next block)
 
$lang['-12'] = 'GMT - 12 Hours';
$lang['-11'] = 'GMT - 11 Hours';
$lang['-10'] = 'GMT - 10 Hours';
$lang['-9'] = 'GMT - 9 Hours';
$lang['-8'] = 'GMT - 8 Hours';
$lang['-7'] = 'GMT - 7 Hours';
$lang['-6'] = 'GMT - 6 Hours';
$lang['-5'] = 'GMT - 5 Hours';
$lang['-4'] = 'GMT - 4 Hours';
$lang['-3.5'] = 'GMT - 3.5 Hours';
$lang['-3'] = 'GMT - 3 Hours';
$lang['-2'] = 'GMT - 2 Hours';
$lang['-1'] = 'GMT - 1 Hours';
$lang['0'] = 'GMT';
$lang['1'] = 'GMT + 1 Hour';
$lang['2'] = 'GMT + 2 Hours';
$lang['3'] = 'GMT + 3 Hours';
$lang['3.5'] = 'GMT + 3.5 Hours';
$lang['4'] = 'GMT + 4 Hours';
$lang['4.5'] = 'GMT + 4.5 Hours';
$lang['5'] = 'GMT + 5 Hours';
$lang['5.5'] = 'GMT + 5.5 Hours';
$lang['6'] = 'GMT + 6 Hours';
$lang['6.5'] = 'GMT + 6.5 Hours';
$lang['7'] = 'GMT + 7 Hours';
$lang['8'] = 'GMT + 8 Hours';
$lang['9'] = 'GMT + 9 Hours';
$lang['9.5'] = 'GMT + 9.5 Hours';
$lang['10'] = 'GMT + 10 Hours';
$lang['11'] = 'GMT + 11 Hours';
$lang['12'] = 'GMT + 12 Hours';
$lang['13'] = 'GMT + 13 Hours';
 
// These are displayed in the timezone select box
$lang['tz']['-12'] = 'GMT - 12 Hours';
$lang['tz']['-11'] = 'GMT - 11 Hours';
$lang['tz']['-10'] = 'GMT - 10 Hours';
$lang['tz']['-9'] = 'GMT - 9 Hours';
$lang['tz']['-8'] = 'GMT - 8 Hours';
$lang['tz']['-7'] = 'GMT - 7 Hours';
$lang['tz']['-6'] = 'GMT - 6 Hours';
$lang['tz']['-5'] = 'GMT - 5 Hours';
$lang['tz']['-4'] = 'GMT - 4 Hours';
$lang['tz']['-3.5'] = 'GMT - 3.5 Hours';
$lang['tz']['-3'] = 'GMT - 3 Hours';
$lang['tz']['-2'] = 'GMT - 2 Hours';
$lang['tz']['-1'] = 'GMT - 1 Hours';
$lang['tz']['0'] = 'GMT';
$lang['tz']['1'] = 'GMT + 1 Hour';
$lang['tz']['2'] = 'GMT + 2 Hours';
$lang['tz']['3'] = 'GMT + 3 Hours';
$lang['tz']['3.5'] = 'GMT + 3.5 Hours';
$lang['tz']['4'] = 'GMT + 4 Hours';
$lang['tz']['4.5'] = 'GMT + 4.5 Hours';
$lang['tz']['5'] = 'GMT + 5 Hours';
$lang['tz']['5.5'] = 'GMT + 5.5 Hours';
$lang['tz']['6'] = 'GMT + 6 Hours';
$lang['tz']['6.5'] = 'GMT + 6.5 Hours';
$lang['tz']['7'] = 'GMT + 7 Hours';
$lang['tz']['8'] = 'GMT + 8 Hours';
$lang['tz']['9'] = 'GMT + 9 Hours';
$lang['tz']['9.5'] = 'GMT + 9.5 Hours';
$lang['tz']['10'] = 'GMT + 10 Hours';
$lang['tz']['11'] = 'GMT + 11 Hours';
$lang['tz']['12'] = 'GMT + 12 Hours';
$lang['tz']['13'] = 'GMT + 13 Hours';
 
$lang['datetime']['Sunday'] = 'Sunday';
$lang['datetime']['Monday'] = 'Monday';
$lang['datetime']['Tuesday'] = 'Tuesday';
$lang['datetime']['Wednesday'] = 'Wednesday';
$lang['datetime']['Thursday'] = 'Thursday';
$lang['datetime']['Friday'] = 'Friday';
$lang['datetime']['Saturday'] = 'Saturday';
$lang['datetime']['Sun'] = 'Sun';
$lang['datetime']['Mon'] = 'Mon';
$lang['datetime']['Tue'] = 'Tue';
$lang['datetime']['Wed'] = 'Wed';
$lang['datetime']['Thu'] = 'Thu';
$lang['datetime']['Fri'] = 'Fri';
$lang['datetime']['Sat'] = 'Sat';
$lang['datetime']['January'] = 'January';
$lang['datetime']['February'] = 'February';
$lang['datetime']['March'] = 'March';
$lang['datetime']['April'] = 'April';
$lang['datetime']['May'] = 'May';
$lang['datetime']['June'] = 'June';
$lang['datetime']['July'] = 'July';
$lang['datetime']['August'] = 'August';
$lang['datetime']['September'] = 'September';
$lang['datetime']['October'] = 'October';
$lang['datetime']['November'] = 'November';
$lang['datetime']['December'] = 'December';
$lang['datetime']['Jan'] = 'Jan';
$lang['datetime']['Feb'] = 'Feb';
$lang['datetime']['Mar'] = 'Mar';
$lang['datetime']['Apr'] = 'Apr';
$lang['datetime']['May'] = 'May';
$lang['datetime']['Jun'] = 'Jun';
$lang['datetime']['Jul'] = 'Jul';
$lang['datetime']['Aug'] = 'Aug';
$lang['datetime']['Sep'] = 'Sep';
$lang['datetime']['Oct'] = 'Oct';
$lang['datetime']['Nov'] = 'Nov';
$lang['datetime']['Dec'] = 'Dec';
 
//
// Errors (not related to a
// specific failure on a page)
//
$lang['Information'] = 'Information';
$lang['Critical_Information'] = 'Critical Information';
 
$lang['General_Error'] = 'General Error';
$lang['Critical_Error'] = 'Critical Error';
$lang['An_error_occured'] = 'An Error Occurred';
$lang['A_critical_error'] = 'A Critical Error Occurred';
 
$lang['Admin_reauthenticate'] = 'To administer the board you must re-authenticate yourself.';
$lang['Login_attempts_exceeded'] = 'The maximum number of %s login attempts has been exceeded. You are not allowed to login for the next %s minutes.';
$lang['Please_remove_install_contrib'] = 'Please ensure both the install/ and contrib/ directories are deleted';
 
//
// That's all, Folks!
// -------------------------------------------------
 
?>
/Forum/language/lang_english/search_stopwords.txt
0,0 → 1,251
a
about
after
ago
all
almost
along
alot
also
am
an
and
answer
any
anybody
anybodys
anywhere
are
arent
around
as
ask
askd
at
bad
be
because
been
before
being
best
better
between
big
btw
but
by
can
cant
come
could
couldnt
day
days
days
did
didnt
do
does
doesnt
dont
down
each
etc
either
else
even
ever
every
everybody
everybodys
everyone
far
find
for
found
from
get
go
going
gone
good
got
gotten
had
has
have
havent
having
her
here
hers
him
his
home
how
hows
href
I
Ive
if
in
ini
into
is
isnt
it
its
its
just
know
large
less
like
liked
little
looking
look
looked
looking
lot
maybe
many
me
more
most
much
must
mustnt
my
near
need
never
new
news
no
none
not
nothing
now
of
off
often
old
on
once
only
oops
or
other
our
ours
out
over
page
please
put
question
questions
questioned
quote
rather
really
recent
said
saw
say
says
she
see
sees
should
sites
small
so
some
something
sometime
somewhere
soon
take
than
true
thank
that
thatd
thats
the
their
theirs
theres
theirs
them
then
there
these
they
theyll
theyd
theyre
this
those
though
through
thus
time
times
to
too
under
until
untrue
up
upon
use
users
version
very
via
want
was
way
we
well
went
were
werent
what
when
where
which
who
whom
whose
why
wide
will
with
within
without
wont
world
worse
worst
would
wrote
www
yes
yet
you
youd
youll
your
youre
yours
AFAIK
IIRC
LOL
ROTF
ROTFLMAO
YMMV
/Forum/language/lang_english/search_synonyms.txt
0,0 → 1,149
abcense absence
abridgement abridgment
accomodate accommodate
acknowledgment acknowledgement
airplane aeroplane
allright alright
andy andrew
anemia anaemia
anemic anaemic
anesthesia anaesthesia
appologize appologise
archean archaean
archeology archaeology
archeozoic archaeozoic
armor armour
artic arctic
attachment attachement
attendence attendance
barbecue barbeque
behavior behaviour
biassed biased
biol biology
buletin bulletin
calender calendar
canceled cancelled
car automobile
catalog catalogue
cenozoic caenozoic
center centre
check cheque
color colour
comission commission
comittee committee
commitee committee
conceed concede
creating createing
curiculum curriculum
defense defence
develope develop
discription description
dulness dullness
encyclopedia encyclopaedia
enroll enrol
esthetic aesthetic
etiology aetiology
exhorbitant exorbitant
exhuberant exuberant
existance existence
favorite favourite
fetus foetus
ficticious fictitious
flavor flavour
flourescent fluorescent
foriegn foreign
fourty forty
gage guage
geneology genealogy
grammer grammar
gray grey
guerilla guerrilla
gynecology gynaecology
harbor harbour
heighth height
hemaglobin haemaglobin
hematin haematin
hematite haematite
hematology haematology
honor honour
innoculate inoculate
installment instalment
irrelevent irrelevant
irrevelant irrelevant
jeweler jeweller
judgement judgment
labeled labelled
labor labour
laborer labourer
laborers labourers
laboring labouring
licence license
liesure leisure
liquify liquefy
maintainance maintenance
maintenence maintenance
medieval mediaeval
meter metre
milage mileage
millipede millepede
miscelaneous miscellaneous
morgage mortgage
noticable noticeable
occurence occurrence
offense offence
ommision omission
ommission omission
optimize optimize
organise organize
pajamas pyjamas
paleography palaeography
paleolithic palaeolithic
paleontological palaeontological
paleontologist palaeontologist
paleontology palaeontology
paleozoic palaeozoic
pamplet pamphlet
paralell parallel
parl parliament
parlt parliament
pediatric paediatric
pediatrician paediatrician
pediatrics paediatrics
pedodontia paedodontia
pedodontics paedodontics
personel personnel
practise practice
program programme
psych psychology
questionaire questionnaire
rarify rarefy
reccomend recommend
recieve receive
resistence resistance
restaraunt restaurant
savior saviour
sep september
seperate separate
sept september
sieze seize
summarize summarise
summerize summarise
superceed supercede
superintendant superintendent
supersede supercede
suprise surprise
surprize surprise
synchronise synchronize
temperary temporary
theater theatre
threshhold threshold
transfered transferred
truely truly
truley truly
useable usable
valor valour
vigor vigour
vol volume
whack wack
withold withhold
yeild yield
/Forum/login.php
0,0 → 1,265
<?php
/***************************************************************************
* login.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: login.php,v 1.47.2.24 2006/04/22 20:28:42 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
//
// Allow people to reach login page if
// board is shut down
//
define("IN_LOGIN", true);
 
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
 
//
// Set page ID for session management
//
$userdata = session_pagestart($user_ip, PAGE_LOGIN);
init_userprefs($userdata);
//
// End session management
//
 
// session id check
if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid']))
{
$sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid'];
}
else
{
$sid = '';
}
 
if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($HTTP_POST_VARS['logout']) || isset($HTTP_GET_VARS['logout']) )
{
if( ( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) ) && (!$userdata['session_logged_in'] || isset($HTTP_POST_VARS['admin'])) )
{
$username = isset($HTTP_POST_VARS['username']) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
$password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : '';
 
$sql = "SELECT user_id, username, user_password, user_active, user_level, user_login_tries, user_last_login_try
FROM " . USERS_TABLE . "
WHERE username = '" . str_replace("\\'", "''", $username) . "'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error in obtaining userdata', '', __LINE__, __FILE__, $sql);
}
 
if( $row = $db->sql_fetchrow($result) )
{
if( $row['user_level'] != ADMIN && $board_config['board_disable'] )
{
redirect(append_sid("index.$phpEx", true));
}
else
{
// If the last login is more than x minutes ago, then reset the login tries/time
if ($row['user_last_login_try'] && $board_config['login_reset_time'] && $row['user_last_login_try'] < (time() - ($board_config['login_reset_time'] * 60)))
{
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_login_tries = 0, user_last_login_try = 0 WHERE user_id = ' . $row['user_id']);
$row['user_last_login_try'] = $row['user_login_tries'] = 0;
}
// Check to see if user is allowed to login again... if his tries are exceeded
if ($row['user_last_login_try'] && $board_config['login_reset_time'] && $board_config['max_login_attempts'] &&
$row['user_last_login_try'] >= (time() - ($board_config['login_reset_time'] * 60)) && $row['user_login_tries'] >= $board_config['max_login_attempts'] && $userdata['user_level'] != ADMIN)
{
message_die(GENERAL_MESSAGE, sprintf($lang['Login_attempts_exceeded'], $board_config['max_login_attempts'], $board_config['login_reset_time']));
}
 
if( md5($password) == $row['user_password'] && $row['user_active'] )
{
$autologin = ( isset($HTTP_POST_VARS['autologin']) ) ? TRUE : 0;
 
$admin = (isset($HTTP_POST_VARS['admin'])) ? 1 : 0;
$session_id = session_begin($row['user_id'], $user_ip, PAGE_INDEX, FALSE, $autologin, $admin);
 
// Reset login tries
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_login_tries = 0, user_last_login_try = 0 WHERE user_id = ' . $row['user_id']);
 
if( $session_id )
{
$url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&amp;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx";
redirect(append_sid($url, true));
}
else
{
message_die(CRITICAL_ERROR, "Couldn't start session : login", "", __LINE__, __FILE__);
}
}
// Only store a failed login attempt for an active user - inactive users can't login even with a correct password
elseif( $row['user_active'] )
{
// Save login tries and last login
if ($row['user_id'] != ANONYMOUS)
{
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_login_tries = user_login_tries + 1, user_last_login_try = ' . time() . '
WHERE user_id = ' . $row['user_id'];
$db->sql_query($sql);
}
}
 
$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&amp;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : '';
$redirect = str_replace('?', '&', $redirect);
 
if (strstr(urldecode($redirect), "\n") || strstr(urldecode($redirect), "\r"))
{
message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.');
}
 
$template->assign_vars(array(
'META' => "<meta http-equiv=\"refresh\" content=\"3;url=login.$phpEx?redirect=$redirect\">")
);
 
$message = $lang['Error_login'] . '<br /><br />' . sprintf($lang['Click_return_login'], "<a href=\"login.$phpEx?redirect=$redirect\">", '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
}
}
else
{
$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&amp;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "";
$redirect = str_replace("?", "&", $redirect);
 
if (strstr(urldecode($redirect), "\n") || strstr(urldecode($redirect), "\r"))
{
message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.');
}
 
$template->assign_vars(array(
'META' => "<meta http-equiv=\"refresh\" content=\"3;url=login.$phpEx?redirect=$redirect\">")
);
 
$message = $lang['Error_login'] . '<br /><br />' . sprintf($lang['Click_return_login'], "<a href=\"login.$phpEx?redirect=$redirect\">", '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
}
}
else if( ( isset($HTTP_GET_VARS['logout']) || isset($HTTP_POST_VARS['logout']) ) && $userdata['session_logged_in'] )
{
// session id check
if ($sid == '' || $sid != $userdata['session_id'])
{
message_die(GENERAL_ERROR, 'Invalid_session');
}
 
if( $userdata['session_logged_in'] )
{
session_end($userdata['session_id'], $userdata['user_id']);
}
 
if (!empty($HTTP_POST_VARS['redirect']) || !empty($HTTP_GET_VARS['redirect']))
{
$url = (!empty($HTTP_POST_VARS['redirect'])) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : htmlspecialchars($HTTP_GET_VARS['redirect']);
$url = str_replace('&amp;', '&', $url);
redirect(append_sid($url, true));
}
else
{
redirect(append_sid("index.$phpEx", true));
}
}
else
{
$url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&amp;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx";
redirect(append_sid($url, true));
}
}
else
{
//
// Do a full login page dohickey if
// user not already logged in
//
if( !$userdata['session_logged_in'] || (isset($HTTP_GET_VARS['admin']) && $userdata['session_logged_in'] && $userdata['user_level'] == ADMIN))
{
$page_title = $lang['Login'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'body' => 'login_body.tpl')
);
 
$forward_page = '';
 
if( isset($HTTP_POST_VARS['redirect']) || isset($HTTP_GET_VARS['redirect']) )
{
$forward_to = $HTTP_SERVER_VARS['QUERY_STRING'];
 
if( preg_match("/^redirect=([a-z0-9\.#\/\?&=\+\-_]+)/si", $forward_to, $forward_matches) )
{
$forward_to = ( !empty($forward_matches[3]) ) ? $forward_matches[3] : $forward_matches[1];
$forward_match = explode('&', $forward_to);
 
if(count($forward_match) > 1)
{
for($i = 1; $i < count($forward_match); $i++)
{
if( !ereg("sid=", $forward_match[$i]) )
{
if( $forward_page != '' )
{
$forward_page .= '&';
}
$forward_page .= $forward_match[$i];
}
}
$forward_page = $forward_match[0] . '?' . $forward_page;
}
else
{
$forward_page = $forward_match[0];
}
}
}
 
$username = ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : '';
 
$s_hidden_fields = '<input type="hidden" name="redirect" value="' . $forward_page . '" />';
$s_hidden_fields .= (isset($HTTP_GET_VARS['admin'])) ? '<input type="hidden" name="admin" value="1" />' : '';
 
make_jumpbox('viewforum.'.$phpEx);
$template->assign_vars(array(
'USERNAME' => $username,
 
'L_ENTER_PASSWORD' => (isset($HTTP_GET_VARS['admin'])) ? $lang['Admin_reauthenticate'] : $lang['Enter_password'],
'L_SEND_PASSWORD' => $lang['Forgotten_password'],
 
'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),
 
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
 
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
else
{
redirect(append_sid("index.$phpEx", true));
}
 
}
 
?>
/Forum/memberlist.php
0,0 → 1,311
<?php
/***************************************************************************
* memberlist.php
* -------------------
* begin : Friday, May 11, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: memberlist.php,v 1.36.2.12 2006/02/07 20:42:51 grahamje Exp $
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
 
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_VIEWMEMBERS);
init_userprefs($userdata);
//
// End session management
//
 
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
 
if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? htmlspecialchars($HTTP_POST_VARS['mode']) : htmlspecialchars($HTTP_GET_VARS['mode']);
}
else
{
$mode = 'joined';
}
 
if(isset($HTTP_POST_VARS['order']))
{
$sort_order = ($HTTP_POST_VARS['order'] == 'ASC') ? 'ASC' : 'DESC';
}
else if(isset($HTTP_GET_VARS['order']))
{
$sort_order = ($HTTP_GET_VARS['order'] == 'ASC') ? 'ASC' : 'DESC';
}
else
{
$sort_order = 'ASC';
}
 
//
// Memberlist sorting
//
$mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'], $lang['Sort_Website'], $lang['Sort_Top_Ten']);
$mode_types = array('joined', 'username', 'location', 'posts', 'email', 'website', 'topten');
 
$select_sort_mode = '<select name="mode">';
for($i = 0; $i < count($mode_types_text); $i++)
{
$selected = ( $mode == $mode_types[$i] ) ? ' selected="selected"' : '';
$select_sort_mode .= '<option value="' . $mode_types[$i] . '"' . $selected . '>' . $mode_types_text[$i] . '</option>';
}
$select_sort_mode .= '</select>';
 
$select_sort_order = '<select name="order">';
if($sort_order == 'ASC')
{
$select_sort_order .= '<option value="ASC" selected="selected">' . $lang['Sort_Ascending'] . '</option><option value="DESC">' . $lang['Sort_Descending'] . '</option>';
}
else
{
$select_sort_order .= '<option value="ASC">' . $lang['Sort_Ascending'] . '</option><option value="DESC" selected="selected">' . $lang['Sort_Descending'] . '</option>';
}
$select_sort_order .= '</select>';
 
//
// Generate page
//
$page_title = $lang['Memberlist'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'body' => 'memberlist_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
 
$template->assign_vars(array(
'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'],
'L_EMAIL' => $lang['Email'],
'L_WEBSITE' => $lang['Website'],
'L_FROM' => $lang['Location'],
'L_ORDER' => $lang['Order'],
'L_SORT' => $lang['Sort'],
'L_SUBMIT' => $lang['Sort'],
'L_AIM' => $lang['AIM'],
'L_YIM' => $lang['YIM'],
'L_MSNM' => $lang['MSNM'],
'L_ICQ' => $lang['ICQ'],
'L_JOINED' => $lang['Joined'],
'L_POSTS' => $lang['Posts'],
'L_PM' => $lang['Private_Message'],
 
'S_MODE_SELECT' => $select_sort_mode,
'S_ORDER_SELECT' => $select_sort_order,
'S_MODE_ACTION' => append_sid("memberlist.$phpEx"))
);
 
switch( $mode )
{
case 'joined':
$order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'username':
$order_by = "username $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'location':
$order_by = "user_from $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'posts':
$order_by = "user_posts $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'email':
$order_by = "user_email $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'website':
$order_by = "user_website $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'topten':
$order_by = "user_posts $sort_order LIMIT 10";
break;
default:
$order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
}
 
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
ORDER BY $order_by";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
$i = 0;
do
{
$username = $row['username'];
$user_id = $row['user_id'];
 
$from = ( !empty($row['user_from']) ) ? $row['user_from'] : '&nbsp;';
$joined = create_date($lang['DATE_FORMAT'], $row['user_regdate'], $board_config['board_timezone']);
$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;
 
$poster_avatar = '';
if ( $row['user_avatar_type'] && $user_id != ANONYMOUS && $row['user_allowavatar'] )
{
switch( $row['user_avatar_type'] )
{
case USER_AVATAR_UPLOAD:
$poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_REMOTE:
$poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $row['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_GALLERY:
$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : '';
break;
}
}
 
if ( !empty($row['user_viewemail']) || $userdata['user_level'] == ADMIN )
{
$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL .'=' . $user_id) : 'mailto:' . $row['user_email'];
 
$email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
$email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
}
else
{
$email_img = '&nbsp;';
$email = '&nbsp;';
}
 
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$user_id");
$profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>';
$profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
 
$temp_url = append_sid("privmsg.$phpEx?mode=post&amp;" . POST_USERS_URL . "=$user_id");
$pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
 
$www_img = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : '';
$www = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
 
if ( !empty($row['user_icq']) )
{
$icq_status_img = '<a href="http://wwp.icq.com/' . $row['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
$icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
$icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $lang['ICQ'] . '</a>';
}
else
{
$icq_status_img = '';
$icq_img = '';
$icq = '';
}
 
$aim_img = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&amp;message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '';
$aim = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&amp;message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : '';
 
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$user_id");
$msn_img = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '"><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : '';
$msn = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : '';
 
$yim_img = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&amp;.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
$yim = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&amp;.src=pg">' . $lang['YIM'] . '</a>' : '';
 
$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($username) . "&amp;showresults=posts");
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $username) . '" title="' . sprintf($lang['Search_user_posts'], $username) . '" border="0" /></a>';
$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $username) . '</a>';
 
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
$template->assign_block_vars('memberrow', array(
'ROW_NUMBER' => $i + ( $start + 1 ),
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'USERNAME' => $username,
'FROM' => $from,
'JOINED' => $joined,
'POSTS' => $posts,
'AVATAR_IMG' => $poster_avatar,
'PROFILE_IMG' => $profile_img,
'PROFILE' => $profile,
'SEARCH_IMG' => $search_img,
'SEARCH' => $search,
'PM_IMG' => $pm_img,
'PM' => $pm,
'EMAIL_IMG' => $email_img,
'EMAIL' => $email,
'WWW_IMG' => $www_img,
'WWW' => $www,
'ICQ_STATUS_IMG' => $icq_status_img,
'ICQ_IMG' => $icq_img,
'ICQ' => $icq,
'AIM_IMG' => $aim_img,
'AIM' => $aim,
'MSN_IMG' => $msn_img,
'MSN' => $msn,
'YIM_IMG' => $yim_img,
'YIM' => $yim,
'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$user_id"))
);
 
$i++;
}
while ( $row = $db->sql_fetchrow($result) );
$db->sql_freeresult($result);
}
 
if ( $mode != 'topten' || $board_config['topics_per_page'] < 10 )
{
$sql = "SELECT count(*) AS total
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS;
 
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error getting total users', '', __LINE__, __FILE__, $sql);
}
 
if ( $total = $db->sql_fetchrow($result) )
{
$total_members = $total['total'];
 
$pagination = generate_pagination("memberlist.$phpEx?mode=$mode&amp;order=$sort_order", $total_members, $board_config['topics_per_page'], $start). '&nbsp;';
}
$db->sql_freeresult($result);
}
else
{
$pagination = '&nbsp;';
$total_members = 10;
}
 
$template->assign_vars(array(
'PAGINATION' => $pagination,
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $total_members / $board_config['topics_per_page'] )),
 
'L_GOTO_PAGE' => $lang['Goto_page'])
);
 
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
?>
/Forum/modcp.php
0,0 → 1,1255
<?php
/***************************************************************************
* modcp.php
* -------------------
* begin : July 4, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: modcp.php,v 1.71.2.28 2006/01/20 19:50:27 grahamje Exp $
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
/**
* Moderator Control Panel
*
* From this 'Control Panel' the moderator of a forum will be able to do
* mass topic operations (locking/unlocking/moving/deleteing), and it will
* provide an interface to do quick locking/unlocking/moving/deleting of
* topics via the moderator operations buttons on all of the viewtopic pages.
*/
 
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
 
//
// Obtain initial var settings
//
if ( isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL]) )
{
$forum_id = (isset($HTTP_POST_VARS[POST_FORUM_URL])) ? intval($HTTP_POST_VARS[POST_FORUM_URL]) : intval($HTTP_GET_VARS[POST_FORUM_URL]);
}
else
{
$forum_id = '';
}
 
if ( isset($HTTP_GET_VARS[POST_POST_URL]) || isset($HTTP_POST_VARS[POST_POST_URL]) )
{
$post_id = (isset($HTTP_POST_VARS[POST_POST_URL])) ? intval($HTTP_POST_VARS[POST_POST_URL]) : intval($HTTP_GET_VARS[POST_POST_URL]);
}
else
{
$post_id = '';
}
 
if ( isset($HTTP_GET_VARS[POST_TOPIC_URL]) || isset($HTTP_POST_VARS[POST_TOPIC_URL]) )
{
$topic_id = (isset($HTTP_POST_VARS[POST_TOPIC_URL])) ? intval($HTTP_POST_VARS[POST_TOPIC_URL]) : intval($HTTP_GET_VARS[POST_TOPIC_URL]);
}
else
{
$topic_id = '';
}
 
$confirm = ( $HTTP_POST_VARS['confirm'] ) ? TRUE : 0;
 
//
// Continue var definitions
//
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
 
$delete = ( isset($HTTP_POST_VARS['delete']) ) ? TRUE : FALSE;
$move = ( isset($HTTP_POST_VARS['move']) ) ? TRUE : FALSE;
$lock = ( isset($HTTP_POST_VARS['lock']) ) ? TRUE : FALSE;
$unlock = ( isset($HTTP_POST_VARS['unlock']) ) ? TRUE : FALSE;
 
if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
$mode = htmlspecialchars($mode);
}
else
{
if ( $delete )
{
$mode = 'delete';
}
else if ( $move )
{
$mode = 'move';
}
else if ( $lock )
{
$mode = 'lock';
}
else if ( $unlock )
{
$mode = 'unlock';
}
else
{
$mode = '';
}
}
 
// session id check
if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid']))
{
$sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid'];
}
else
{
$sid = '';
}
 
//
// Obtain relevant data
//
if ( !empty($topic_id) )
{
$sql = "SELECT f.forum_id, f.forum_name, f.forum_topics
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f
WHERE t.topic_id = " . $topic_id . "
AND f.forum_id = t.forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}
$topic_row = $db->sql_fetchrow($result);
 
if (!$topic_row)
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}
 
$forum_topics = ( $topic_row['forum_topics'] == 0 ) ? 1 : $topic_row['forum_topics'];
$forum_id = $topic_row['forum_id'];
$forum_name = $topic_row['forum_name'];
}
else if ( !empty($forum_id) )
{
$sql = "SELECT forum_name, forum_topics
FROM " . FORUMS_TABLE . "
WHERE forum_id = " . $forum_id;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_MESSAGE, 'Forum_not_exist');
}
$topic_row = $db->sql_fetchrow($result);
 
if (!$topic_row)
{
message_die(GENERAL_MESSAGE, 'Forum_not_exist');
}
 
$forum_topics = ( $topic_row['forum_topics'] == 0 ) ? 1 : $topic_row['forum_topics'];
$forum_name = $topic_row['forum_name'];
}
else
{
message_die(GENERAL_MESSAGE, 'Forum_not_exist');
}
 
//
// Start session management
//
$userdata = session_pagestart($user_ip, $forum_id);
init_userprefs($userdata);
//
// End session management
//
 
// session id check
if ($sid == '' || $sid != $userdata['session_id'])
{
message_die(GENERAL_ERROR, 'Invalid_session');
}
 
//
// Check if user did or did not confirm
// If they did not, forward them to the last page they were on
//
if ( isset($HTTP_POST_VARS['cancel']) )
{
if ( $topic_id )
{
$redirect = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id";
}
else if ( $forum_id )
{
$redirect = "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id";
}
else
{
$redirect = "index.$phpEx";
}
 
redirect(append_sid($redirect, true));
}
 
//
// Start auth check
//
$is_auth = auth(AUTH_ALL, $forum_id, $userdata);
 
if ( !$is_auth['auth_mod'] )
{
message_die(GENERAL_MESSAGE, $lang['Not_Moderator'], $lang['Not_Authorised']);
}
//
// End Auth Check
//
 
//
// Do major work ...
//
switch( $mode )
{
case 'delete':
if (!$is_auth['auth_delete'])
{
message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_auth_delete'], $is_auth['auth_delete_type']));
}
 
$page_title = $lang['Mod_CP'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
if ( $confirm )
{
if ( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
{
message_die(GENERAL_MESSAGE, $lang['None_selected']);
}
 
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
 
$topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id);
 
$topic_id_sql = '';
for($i = 0; $i < count($topics); $i++)
{
$topic_id_sql .= ( ( $topic_id_sql != '' ) ? ', ' : '' ) . intval($topics[$i]);
}
 
$sql = "SELECT topic_id
FROM " . TOPICS_TABLE . "
WHERE topic_id IN ($topic_id_sql)
AND forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get topic id information', '', __LINE__, __FILE__, $sql);
}
$topic_id_sql = '';
while ($row = $db->sql_fetchrow($result))
{
$topic_id_sql .= (($topic_id_sql != '') ? ', ' : '') . intval($row['topic_id']);
}
$db->sql_freeresult($result);
 
if ( $topic_id_sql == '')
{
message_die(GENERAL_MESSAGE, $lang['None_selected']);
}
 
$sql = "SELECT poster_id, COUNT(post_id) AS posts
FROM " . POSTS_TABLE . "
WHERE topic_id IN ($topic_id_sql)
GROUP BY poster_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get poster id information', '', __LINE__, __FILE__, $sql);
}
 
$count_sql = array();
while ( $row = $db->sql_fetchrow($result) )
{
$count_sql[] = "UPDATE " . USERS_TABLE . "
SET user_posts = user_posts - " . $row['posts'] . "
WHERE user_id = " . $row['poster_id'];
}
$db->sql_freeresult($result);
 
if ( sizeof($count_sql) )
{
for($i = 0; $i < sizeof($count_sql); $i++)
{
if ( !$db->sql_query($count_sql[$i]) )
{
message_die(GENERAL_ERROR, 'Could not update user post count information', '', __LINE__, __FILE__, $sql);
}
}
}
$sql = "SELECT post_id
FROM " . POSTS_TABLE . "
WHERE topic_id IN ($topic_id_sql)";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get post id information', '', __LINE__, __FILE__, $sql);
}
 
$post_id_sql = '';
while ( $row = $db->sql_fetchrow($result) )
{
$post_id_sql .= ( ( $post_id_sql != '' ) ? ', ' : '' ) . intval($row['post_id']);
}
$db->sql_freeresult($result);
 
$sql = "SELECT vote_id
FROM " . VOTE_DESC_TABLE . "
WHERE topic_id IN ($topic_id_sql)";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get vote id information', '', __LINE__, __FILE__, $sql);
}
 
$vote_id_sql = '';
while ( $row = $db->sql_fetchrow($result) )
{
$vote_id_sql .= ( ( $vote_id_sql != '' ) ? ', ' : '' ) . $row['vote_id'];
}
$db->sql_freeresult($result);
 
//
// Got all required info so go ahead and start deleting everything
//
$sql = "DELETE
FROM " . TOPICS_TABLE . "
WHERE topic_id IN ($topic_id_sql)
OR topic_moved_id IN ($topic_id_sql)";
if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )
{
message_die(GENERAL_ERROR, 'Could not delete topics', '', __LINE__, __FILE__, $sql);
}
 
if ( $post_id_sql != '' )
{
$sql = "DELETE
FROM " . POSTS_TABLE . "
WHERE post_id IN ($post_id_sql)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete posts', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE
FROM " . POSTS_TEXT_TABLE . "
WHERE post_id IN ($post_id_sql)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete posts text', '', __LINE__, __FILE__, $sql);
}
 
remove_search_post($post_id_sql);
}
 
if ( $vote_id_sql != '' )
{
$sql = "DELETE
FROM " . VOTE_DESC_TABLE . "
WHERE vote_id IN ($vote_id_sql)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete vote descriptions', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE
FROM " . VOTE_RESULTS_TABLE . "
WHERE vote_id IN ($vote_id_sql)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete vote results', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE
FROM " . VOTE_USERS_TABLE . "
WHERE vote_id IN ($vote_id_sql)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete vote users', '', __LINE__, __FILE__, $sql);
}
}
 
$sql = "DELETE
FROM " . TOPICS_WATCH_TABLE . "
WHERE topic_id IN ($topic_id_sql)";
if ( !$db->sql_query($sql, END_TRANSACTION) )
{
message_die(GENERAL_ERROR, 'Could not delete watched post list', '', __LINE__, __FILE__, $sql);
}
 
sync('forum', $forum_id);
 
if ( !empty($topic_id) )
{
$redirect_page = "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'];
$l_redirect = sprintf($lang['Click_return_forum'], '<a href="' . $redirect_page . '">', '</a>');
}
else
{
$redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'];
$l_redirect = sprintf($lang['Click_return_modcp'], '<a href="' . $redirect_page . '">', '</a>');
}
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . $redirect_page . '">')
);
 
message_die(GENERAL_MESSAGE, $lang['Topics_Removed'] . '<br /><br />' . $l_redirect);
}
else
{
// Not confirmed, show confirmation message
if ( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
{
message_die(GENERAL_MESSAGE, $lang['None_selected']);
}
 
$hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
 
if ( isset($HTTP_POST_VARS['topic_id_list']) )
{
$topics = $HTTP_POST_VARS['topic_id_list'];
for($i = 0; $i < count($topics); $i++)
{
$hidden_fields .= '<input type="hidden" name="topic_id_list[]" value="' . intval($topics[$i]) . '" />';
}
}
else
{
$hidden_fields .= '<input type="hidden" name="' . POST_TOPIC_URL . '" value="' . $topic_id . '" />';
}
 
//
// Set template files
//
$template->set_filenames(array(
'confirm' => 'confirm_body.tpl')
);
 
$template->assign_vars(array(
'MESSAGE_TITLE' => $lang['Confirm'],
'MESSAGE_TEXT' => $lang['Confirm_delete_topic'],
 
'L_YES' => $lang['Yes'],
'L_NO' => $lang['No'],
 
'S_CONFIRM_ACTION' => append_sid("modcp.$phpEx"),
'S_HIDDEN_FIELDS' => $hidden_fields)
);
 
$template->pparse('confirm');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
break;
 
case 'move':
$page_title = $lang['Mod_CP'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
if ( $confirm )
{
if ( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
{
message_die(GENERAL_MESSAGE, $lang['None_selected']);
}
 
$new_forum_id = intval($HTTP_POST_VARS['new_forum']);
$old_forum_id = $forum_id;
 
$sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . $new_forum_id;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select from forums table', '', __LINE__, __FILE__, $sql);
}
if (!$db->sql_fetchrow($result))
{
message_die(GENERAL_MESSAGE, 'New forum does not exist');
}
 
$db->sql_freeresult($result);
 
if ( $new_forum_id != $old_forum_id )
{
$topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id);
 
$topic_list = '';
for($i = 0; $i < count($topics); $i++)
{
$topic_list .= ( ( $topic_list != '' ) ? ', ' : '' ) . intval($topics[$i]);
}
 
$sql = "SELECT *
FROM " . TOPICS_TABLE . "
WHERE topic_id IN ($topic_list)
AND forum_id = $old_forum_id
AND topic_status <> " . TOPIC_MOVED;
if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
{
message_die(GENERAL_ERROR, 'Could not select from topic table', '', __LINE__, __FILE__, $sql);
}
 
$row = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
 
for($i = 0; $i < count($row); $i++)
{
$topic_id = $row[$i]['topic_id'];
if ( isset($HTTP_POST_VARS['move_leave_shadow']) )
{
// Insert topic in the old forum that indicates that the forum has moved.
$sql = "INSERT INTO " . TOPICS_TABLE . " (forum_id, topic_title, topic_poster, topic_time, topic_status, topic_type, topic_vote, topic_views, topic_replies, topic_first_post_id, topic_last_post_id, topic_moved_id)
VALUES ($old_forum_id, '" . addslashes(str_replace("\'", "''", $row[$i]['topic_title'])) . "', '" . str_replace("\'", "''", $row[$i]['topic_poster']) . "', " . $row[$i]['topic_time'] . ", " . TOPIC_MOVED . ", " . POST_NORMAL . ", " . $row[$i]['topic_vote'] . ", " . $row[$i]['topic_views'] . ", " . $row[$i]['topic_replies'] . ", " . $row[$i]['topic_first_post_id'] . ", " . $row[$i]['topic_last_post_id'] . ", $topic_id)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert shadow topic', '', __LINE__, __FILE__, $sql);
}
}
 
$sql = "UPDATE " . TOPICS_TABLE . "
SET forum_id = $new_forum_id
WHERE topic_id = $topic_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update old topic', '', __LINE__, __FILE__, $sql);
}
 
$sql = "UPDATE " . POSTS_TABLE . "
SET forum_id = $new_forum_id
WHERE topic_id = $topic_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update post topic ids', '', __LINE__, __FILE__, $sql);
}
}
 
// Sync the forum indexes
sync('forum', $new_forum_id);
sync('forum', $old_forum_id);
 
$message = $lang['Topics_Moved'] . '<br /><br />';
 
}
else
{
$message = $lang['No_Topics_Moved'] . '<br /><br />';
}
 
if ( !empty($topic_id) )
{
$redirect_page = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;sid=" . $userdata['session_id'];
$message .= sprintf($lang['Click_return_topic'], '<a href="' . $redirect_page . '">', '</a>');
}
else
{
$redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'];
$message .= sprintf($lang['Click_return_modcp'], '<a href="' . $redirect_page . '">', '</a>');
}
 
$message = $message . '<br \><br \>' . sprintf($lang['Click_return_forum'], '<a href="' . "viewforum.$phpEx?" . POST_FORUM_URL . "=$old_forum_id&amp;sid=" . $userdata['session_id'] . '">', '</a>');
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . $redirect_page . '">')
);
 
message_die(GENERAL_MESSAGE, $message);
}
else
{
if ( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
{
message_die(GENERAL_MESSAGE, $lang['None_selected']);
}
 
$hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
 
if ( isset($HTTP_POST_VARS['topic_id_list']) )
{
$topics = $HTTP_POST_VARS['topic_id_list'];
 
for($i = 0; $i < count($topics); $i++)
{
$hidden_fields .= '<input type="hidden" name="topic_id_list[]" value="' . intval($topics[$i]) . '" />';
}
}
else
{
$hidden_fields .= '<input type="hidden" name="' . POST_TOPIC_URL . '" value="' . $topic_id . '" />';
}
 
//
// Set template files
//
$template->set_filenames(array(
'movetopic' => 'modcp_move.tpl')
);
 
$template->assign_vars(array(
'MESSAGE_TITLE' => $lang['Confirm'],
'MESSAGE_TEXT' => $lang['Confirm_move_topic'],
 
'L_MOVE_TO_FORUM' => $lang['Move_to_forum'],
'L_LEAVESHADOW' => $lang['Leave_shadow_topic'],
'L_YES' => $lang['Yes'],
'L_NO' => $lang['No'],
 
'S_FORUM_SELECT' => make_forum_select('new_forum', $forum_id),
'S_MODCP_ACTION' => append_sid("modcp.$phpEx"),
'S_HIDDEN_FIELDS' => $hidden_fields)
);
 
$template->pparse('movetopic');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
break;
 
case 'lock':
if ( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
{
message_die(GENERAL_MESSAGE, $lang['None_selected']);
}
 
$topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id);
 
$topic_id_sql = '';
for($i = 0; $i < count($topics); $i++)
{
$topic_id_sql .= ( ( $topic_id_sql != '' ) ? ', ' : '' ) . intval($topics[$i]);
}
 
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_status = " . TOPIC_LOCKED . "
WHERE topic_id IN ($topic_id_sql)
AND forum_id = $forum_id
AND topic_moved_id = 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
}
 
if ( !empty($topic_id) )
{
$redirect_page = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;sid=" . $userdata['session_id'];
$message = sprintf($lang['Click_return_topic'], '<a href="' . $redirect_page . '">', '</a>');
}
else
{
$redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'];
$message = sprintf($lang['Click_return_modcp'], '<a href="' . $redirect_page . '">', '</a>');
}
 
$message = $message . '<br \><br \>' . sprintf($lang['Click_return_forum'], '<a href="' . "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'] . '">', '</a>');
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . $redirect_page . '">')
);
 
message_die(GENERAL_MESSAGE, $lang['Topics_Locked'] . '<br /><br />' . $message);
 
break;
 
case 'unlock':
if ( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
{
message_die(GENERAL_MESSAGE, $lang['None_selected']);
}
 
$topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id);
 
$topic_id_sql = '';
for($i = 0; $i < count($topics); $i++)
{
$topic_id_sql .= ( ( $topic_id_sql != "") ? ', ' : '' ) . intval($topics[$i]);
}
 
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_status = " . TOPIC_UNLOCKED . "
WHERE topic_id IN ($topic_id_sql)
AND forum_id = $forum_id
AND topic_moved_id = 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
}
 
if ( !empty($topic_id) )
{
$redirect_page = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;sid=" . $userdata['session_id'];
$message = sprintf($lang['Click_return_topic'], '<a href="' . $redirect_page . '">', '</a>');
}
else
{
$redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'];
$message = sprintf($lang['Click_return_modcp'], '<a href="' . $redirect_page . '">', '</a>');
}
 
$message = $message . '<br \><br \>' . sprintf($lang['Click_return_forum'], '<a href="' . "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'] . '">', '</a>');
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . $redirect_page . '">')
);
 
message_die(GENERAL_MESSAGE, $lang['Topics_Unlocked'] . '<br /><br />' . $message);
 
break;
 
case 'split':
$page_title = $lang['Mod_CP'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$post_id_sql = '';
 
if (isset($HTTP_POST_VARS['split_type_all']) || isset($HTTP_POST_VARS['split_type_beyond']))
{
$posts = $HTTP_POST_VARS['post_id_list'];
 
for ($i = 0; $i < count($posts); $i++)
{
$post_id_sql .= (($post_id_sql != '') ? ', ' : '') . intval($posts[$i]);
}
}
 
if ($post_id_sql != '')
{
$sql = "SELECT post_id
FROM " . POSTS_TABLE . "
WHERE post_id IN ($post_id_sql)
AND forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get post id information', '', __LINE__, __FILE__, $sql);
}
$post_id_sql = '';
while ($row = $db->sql_fetchrow($result))
{
$post_id_sql .= (($post_id_sql != '') ? ', ' : '') . intval($row['post_id']);
}
$db->sql_freeresult($result);
 
if ($post_id_sql == '')
{
message_die(GENERAL_MESSAGE, $lang['None_selected']);
}
 
$sql = "SELECT post_id, poster_id, topic_id, post_time
FROM " . POSTS_TABLE . "
WHERE post_id IN ($post_id_sql)
ORDER BY post_time ASC";
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not get post information', '', __LINE__, __FILE__, $sql);
}
 
if ($row = $db->sql_fetchrow($result))
{
$first_poster = $row['poster_id'];
$topic_id = $row['topic_id'];
$post_time = $row['post_time'];
 
$user_id_sql = '';
$post_id_sql = '';
do
{
$user_id_sql .= (($user_id_sql != '') ? ', ' : '') . intval($row['poster_id']);
$post_id_sql .= (($post_id_sql != '') ? ', ' : '') . intval($row['post_id']);;
}
while ($row = $db->sql_fetchrow($result));
 
$post_subject = trim(htmlspecialchars($HTTP_POST_VARS['subject']));
if (empty($post_subject))
{
message_die(GENERAL_MESSAGE, $lang['Empty_subject']);
}
 
$new_forum_id = intval($HTTP_POST_VARS['new_forum_id']);
$topic_time = time();
$sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . $new_forum_id;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select from forums table', '', __LINE__, __FILE__, $sql);
}
if (!$db->sql_fetchrow($result))
{
message_die(GENERAL_MESSAGE, 'New forum does not exist');
}
 
$db->sql_freeresult($result);
 
$sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type)
VALUES ('" . str_replace("\'", "''", $post_subject) . "', $first_poster, " . $topic_time . ", $new_forum_id, " . TOPIC_UNLOCKED . ", " . POST_NORMAL . ")";
if (!($db->sql_query($sql, BEGIN_TRANSACTION)))
{
message_die(GENERAL_ERROR, 'Could not insert new topic', '', __LINE__, __FILE__, $sql);
}
 
$new_topic_id = $db->sql_nextid();
 
// Update topic watch table, switch users whose posts
// have moved, over to watching the new topic
$sql = "UPDATE " . TOPICS_WATCH_TABLE . "
SET topic_id = $new_topic_id
WHERE topic_id = $topic_id
AND user_id IN ($user_id_sql)";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not update topics watch table', '', __LINE__, __FILE__, $sql);
}
 
$sql_where = (!empty($HTTP_POST_VARS['split_type_beyond'])) ? " post_time >= $post_time AND topic_id = $topic_id" : "post_id IN ($post_id_sql)";
 
$sql = "UPDATE " . POSTS_TABLE . "
SET topic_id = $new_topic_id, forum_id = $new_forum_id
WHERE $sql_where";
if (!$db->sql_query($sql, END_TRANSACTION))
{
message_die(GENERAL_ERROR, 'Could not update posts table', '', __LINE__, __FILE__, $sql);
}
 
sync('topic', $new_topic_id);
sync('topic', $topic_id);
sync('forum', $new_forum_id);
sync('forum', $forum_id);
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;sid=" . $userdata['session_id'] . '">')
);
 
$message = $lang['Topic_split'] . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;sid=" . $userdata['session_id'] . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
}
else
{
//
// Set template files
//
$template->set_filenames(array(
'split_body' => 'modcp_split.tpl')
);
 
$sql = "SELECT u.username, p.*, pt.post_text, pt.bbcode_uid, pt.post_subject, p.post_username
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
WHERE p.topic_id = $topic_id
AND p.poster_id = u.user_id
AND p.post_id = pt.post_id
ORDER BY p.post_time ASC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get topic/post information', '', __LINE__, __FILE__, $sql);
}
 
$s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" /><input type="hidden" name="' . POST_TOPIC_URL . '" value="' . $topic_id . '" /><input type="hidden" name="mode" value="split" />';
 
if( ( $total_posts = $db->sql_numrows($result) ) > 0 )
{
$postrow = $db->sql_fetchrowset($result);
 
$template->assign_vars(array(
'L_SPLIT_TOPIC' => $lang['Split_Topic'],
'L_SPLIT_TOPIC_EXPLAIN' => $lang['Split_Topic_explain'],
'L_AUTHOR' => $lang['Author'],
'L_MESSAGE' => $lang['Message'],
'L_SELECT' => $lang['Select'],
'L_SPLIT_SUBJECT' => $lang['Split_title'],
'L_SPLIT_FORUM' => $lang['Split_forum'],
'L_POSTED' => $lang['Posted'],
'L_SPLIT_POSTS' => $lang['Split_posts'],
'L_SUBMIT' => $lang['Submit'],
'L_SPLIT_AFTER' => $lang['Split_after'],
'L_POST_SUBJECT' => $lang['Post_subject'],
'L_MARK_ALL' => $lang['Mark_all'],
'L_UNMARK_ALL' => $lang['Unmark_all'],
'L_POST' => $lang['Post'],
 
'FORUM_NAME' => $forum_name,
 
'U_VIEW_FORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"),
 
'S_SPLIT_ACTION' => append_sid("modcp.$phpEx"),
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_FORUM_SELECT' => make_forum_select("new_forum_id", false, $forum_id))
);
 
//
// Define censored word matches
//
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
 
for($i = 0; $i < $total_posts; $i++)
{
$post_id = $postrow[$i]['post_id'];
$poster_id = $postrow[$i]['poster_id'];
$poster = $postrow[$i]['username'];
 
$post_date = create_date($board_config['default_dateformat'], $postrow[$i]['post_time'], $board_config['board_timezone']);
 
$bbcode_uid = $postrow[$i]['bbcode_uid'];
$message = $postrow[$i]['post_text'];
$post_subject = ( $postrow[$i]['post_subject'] != '' ) ? $postrow[$i]['post_subject'] : $topic_title;
 
//
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
//
if ( !$board_config['allow_html'] )
{
if ( $postrow[$i]['enable_html'] )
{
$message = preg_replace('#(<)([\/]?.*?)(>)#is', '&lt;\\2&gt;', $message);
}
}
 
if ( $bbcode_uid != '' )
{
$message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message);
}
 
if ( count($orig_word) )
{
$post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
$message = preg_replace($orig_word, $replacement_word, $message);
}
 
$message = make_clickable($message);
 
if ( $board_config['allow_smilies'] && $postrow[$i]['enable_smilies'] )
{
$message = smilies_pass($message);
}
 
$message = str_replace("\n", '<br />', $message);
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
$checkbox = ( $i > 0 ) ? '<input type="checkbox" name="post_id_list[]" value="' . $post_id . '" />' : '&nbsp;';
$template->assign_block_vars('postrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'POSTER_NAME' => $poster,
'POST_DATE' => $post_date,
'POST_SUBJECT' => $post_subject,
'MESSAGE' => $message,
'POST_ID' => $post_id,
'S_SPLIT_CHECKBOX' => $checkbox)
);
}
 
$template->pparse('split_body');
}
}
break;
 
case 'ip':
$page_title = $lang['Mod_CP'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$rdns_ip_num = ( isset($HTTP_GET_VARS['rdns']) ) ? $HTTP_GET_VARS['rdns'] : "";
 
if ( !$post_id )
{
message_die(GENERAL_MESSAGE, $lang['No_such_post']);
}
 
//
// Set template files
//
$template->set_filenames(array(
'viewip' => 'modcp_viewip.tpl')
);
 
// Look up relevent data for this post
$sql = "SELECT poster_ip, poster_id
FROM " . POSTS_TABLE . "
WHERE post_id = $post_id
AND forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get poster IP information', '', __LINE__, __FILE__, $sql);
}
if ( !($post_row = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_MESSAGE, $lang['No_such_post']);
}
 
$ip_this_post = decode_ip($post_row['poster_ip']);
$ip_this_post = ( $rdns_ip_num == $ip_this_post ) ? htmlspecialchars(gethostbyaddr($ip_this_post)) : $ip_this_post;
 
$poster_id = $post_row['poster_id'];
 
$template->assign_vars(array(
'L_IP_INFO' => $lang['IP_info'],
'L_THIS_POST_IP' => $lang['This_posts_IP'],
'L_OTHER_IPS' => $lang['Other_IP_this_user'],
'L_OTHER_USERS' => $lang['Users_this_IP'],
'L_LOOKUP_IP' => $lang['Lookup_IP'],
'L_SEARCH' => $lang['Search'],
 
'SEARCH_IMG' => $images['icon_search'],
 
'IP' => $ip_this_post,
'U_LOOKUP_IP' => "modcp.$phpEx?mode=ip&amp;" . POST_POST_URL . "=$post_id&amp;" . POST_TOPIC_URL . "=$topic_id&amp;rdns=$ip_this_post&amp;sid=" . $userdata['session_id'])
);
 
//
// Get other IP's this user has posted under
//
$sql = "SELECT poster_ip, COUNT(*) AS postings
FROM " . POSTS_TABLE . "
WHERE poster_id = $poster_id
GROUP BY poster_ip
ORDER BY " . (( SQL_LAYER == 'msaccess' ) ? 'COUNT(*)' : 'postings' ) . " DESC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get IP information for this user', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
$i = 0;
do
{
if ( $row['poster_ip'] == $post_row['poster_ip'] )
{
$template->assign_vars(array(
'POSTS' => $row['postings'] . ' ' . ( ( $row['postings'] == 1 ) ? $lang['Post'] : $lang['Posts'] ))
);
continue;
}
 
$ip = decode_ip($row['poster_ip']);
$ip = ( $rdns_ip_num == $row['poster_ip'] || $rdns_ip_num == 'all') ? htmlspecialchars(gethostbyaddr($ip)) : $ip;
 
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
$template->assign_block_vars('iprow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'IP' => $ip,
'POSTS' => $row['postings'] . ' ' . ( ( $row['postings'] == 1 ) ? $lang['Post'] : $lang['Posts'] ),
 
'U_LOOKUP_IP' => "modcp.$phpEx?mode=ip&amp;" . POST_POST_URL . "=$post_id&amp;" . POST_TOPIC_URL . "=$topic_id&amp;rdns=" . $row['poster_ip'] . "&amp;sid=" . $userdata['session_id'])
);
 
$i++;
}
while ( $row = $db->sql_fetchrow($result) );
}
 
//
// Get other users who've posted under this IP
//
$sql = "SELECT u.user_id, u.username, COUNT(*) as postings
FROM " . USERS_TABLE ." u, " . POSTS_TABLE . " p
WHERE p.poster_id = u.user_id
AND p.poster_ip = '" . $post_row['poster_ip'] . "'
GROUP BY u.user_id, u.username
ORDER BY " . (( SQL_LAYER == 'msaccess' ) ? 'COUNT(*)' : 'postings' ) . " DESC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get posters information based on IP', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
$i = 0;
do
{
$id = $row['user_id'];
$username = ( $id == ANONYMOUS ) ? $lang['Guest'] : $row['username'];
 
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
$template->assign_block_vars('userrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'USERNAME' => $username,
'POSTS' => $row['postings'] . ' ' . ( ( $row['postings'] == 1 ) ? $lang['Post'] : $lang['Posts'] ),
'L_SEARCH_POSTS' => sprintf($lang['Search_user_posts'], $username),
 
'U_PROFILE' => ($id == ANONYMOUS) ? "modcp.$phpEx?mode=ip&amp;" . POST_POST_URL . "=" . $post_id . "&amp;" . POST_TOPIC_URL . "=" . $topic_id . "&amp;sid=" . $userdata['session_id'] : append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$id"),
'U_SEARCHPOSTS' => append_sid("search.$phpEx?search_author=" . (($id == ANONYMOUS) ? 'Anonymous' : urlencode($username)) . "&amp;showresults=topics"))
);
 
$i++;
}
while ( $row = $db->sql_fetchrow($result) );
}
 
$template->pparse('viewip');
 
break;
 
default:
$page_title = $lang['Mod_CP'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->assign_vars(array(
'FORUM_NAME' => $forum_name,
 
'L_MOD_CP' => $lang['Mod_CP'],
'L_MOD_CP_EXPLAIN' => $lang['Mod_CP_explain'],
'L_SELECT' => $lang['Select'],
'L_DELETE' => $lang['Delete'],
'L_MOVE' => $lang['Move'],
'L_LOCK' => $lang['Lock'],
'L_UNLOCK' => $lang['Unlock'],
'L_TOPICS' => $lang['Topics'],
'L_REPLIES' => $lang['Replies'],
'L_LASTPOST' => $lang['Last_Post'],
'L_SELECT' => $lang['Select'],
 
'U_VIEW_FORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"),
'S_HIDDEN_FIELDS' => '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />',
'S_MODCP_ACTION' => append_sid("modcp.$phpEx"))
);
 
$template->set_filenames(array(
'body' => 'modcp_body.tpl')
);
make_jumpbox('modcp.'.$phpEx);
 
//
// Define censored word matches
//
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
 
$sql = "SELECT t.*, u.username, u.user_id, p.post_time
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_last_post_id
ORDER BY t.topic_type DESC, p.post_time DESC
LIMIT $start, " . $board_config['topics_per_page'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
 
while ( $row = $db->sql_fetchrow($result) )
{
$topic_title = '';
 
if ( $row['topic_status'] == TOPIC_LOCKED )
{
$folder_img = $images['folder_locked'];
$folder_alt = $lang['Topic_locked'];
}
else
{
if ( $row['topic_type'] == POST_ANNOUNCE )
{
$folder_img = $images['folder_announce'];
$folder_alt = $lang['Topic_Announcement'];
}
else if ( $row['topic_type'] == POST_STICKY )
{
$folder_img = $images['folder_sticky'];
$folder_alt = $lang['Topic_Sticky'];
}
else
{
$folder_img = $images['folder'];
$folder_alt = $lang['No_new_posts'];
}
}
 
$topic_id = $row['topic_id'];
$topic_type = $row['topic_type'];
$topic_status = $row['topic_status'];
if ( $topic_type == POST_ANNOUNCE )
{
$topic_type = $lang['Topic_Announcement'] . ' ';
}
else if ( $topic_type == POST_STICKY )
{
$topic_type = $lang['Topic_Sticky'] . ' ';
}
else if ( $topic_status == TOPIC_MOVED )
{
$topic_type = $lang['Topic_Moved'] . ' ';
}
else
{
$topic_type = '';
}
if ( $row['topic_vote'] )
{
$topic_type .= $lang['Topic_Poll'] . ' ';
}
$topic_title = $row['topic_title'];
if ( count($orig_word) )
{
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
}
 
$u_view_topic = "modcp.$phpEx?mode=split&amp;" . POST_TOPIC_URL . "=$topic_id&amp;sid=" . $userdata['session_id'];
$topic_replies = $row['topic_replies'];
 
$last_post_time = create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone']);
 
$template->assign_block_vars('topicrow', array(
'U_VIEW_TOPIC' => $u_view_topic,
 
'TOPIC_FOLDER_IMG' => $folder_img,
'TOPIC_TYPE' => $topic_type,
'TOPIC_TITLE' => $topic_title,
'REPLIES' => $topic_replies,
'LAST_POST_TIME' => $last_post_time,
'TOPIC_ID' => $topic_id,
'L_TOPIC_FOLDER_ALT' => $folder_alt)
);
}
 
$template->assign_vars(array(
'PAGINATION' => generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'], $forum_topics, $board_config['topics_per_page'], $start),
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $forum_topics / $board_config['topics_per_page'] )),
'L_GOTO_PAGE' => $lang['Goto_page'])
);
 
$template->pparse('body');
 
break;
}
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
?>
/Forum/posting.php
0,0 → 1,1119
<?php
/***************************************************************************
* posting.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: posting.php,v 1.159.2.28 2006/01/28 14:56:51 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);
 
//
// Check and set various parameters
//
$params = array('submit' => 'post', 'preview' => 'preview', 'delete' => 'delete', 'poll_delete' => 'poll_delete', 'poll_add' => 'add_poll_option', 'poll_edit' => 'edit_poll_option', 'mode' => 'mode');
while( list($var, $param) = @each($params) )
{
if ( !empty($HTTP_POST_VARS[$param]) || !empty($HTTP_GET_VARS[$param]) )
{
$$var = ( !empty($HTTP_POST_VARS[$param]) ) ? htmlspecialchars($HTTP_POST_VARS[$param]) : htmlspecialchars($HTTP_GET_VARS[$param]);
}
else
{
$$var = '';
}
}
 
$confirm = isset($HTTP_POST_VARS['confirm']) ? true : false;
 
$params = array('forum_id' => POST_FORUM_URL, 'topic_id' => POST_TOPIC_URL, 'post_id' => POST_POST_URL);
while( list($var, $param) = @each($params) )
{
if ( !empty($HTTP_POST_VARS[$param]) || !empty($HTTP_GET_VARS[$param]) )
{
$$var = ( !empty($HTTP_POST_VARS[$param]) ) ? intval($HTTP_POST_VARS[$param]) : intval($HTTP_GET_VARS[$param]);
}
else
{
$$var = '';
}
}
 
$refresh = $preview || $poll_add || $poll_edit || $poll_delete;
$orig_word = $replacement_word = array();
 
//
// Set topic type
//
$topic_type = ( !empty($HTTP_POST_VARS['topictype']) ) ? intval($HTTP_POST_VARS['topictype']) : POST_NORMAL;
$topic_type = ( in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE)) ) ? $topic_type : POST_NORMAL;
 
//
// If the mode is set to topic review then output
// that review ...
//
if ( $mode == 'topicreview' )
{
require($phpbb_root_path . 'includes/topic_review.'.$phpEx);
 
topic_review($topic_id, false);
exit;
}
else if ( $mode == 'smilies' )
{
generate_smilies('window', PAGE_POSTING);
exit;
}
 
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_POSTING);
init_userprefs($userdata);
//
// End session management
//
 
//
// Was cancel pressed? If so then redirect to the appropriate
// page, no point in continuing with any further checks
//
if ( isset($HTTP_POST_VARS['cancel']) )
{
if ( $post_id )
{
$redirect = "viewtopic.$phpEx?" . POST_POST_URL . "=$post_id";
$post_append = "#$post_id";
}
else if ( $topic_id )
{
$redirect = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id";
$post_append = '';
}
else if ( $forum_id )
{
$redirect = "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id";
$post_append = '';
}
else
{
$redirect = "index.$phpEx";
$post_append = '';
}
 
redirect(append_sid($redirect, true) . $post_append);
}
 
//
// What auth type do we need to check?
//
$is_auth = array();
switch( $mode )
{
case 'newtopic':
if ( $topic_type == POST_ANNOUNCE )
{
$is_auth_type = 'auth_announce';
}
else if ( $topic_type == POST_STICKY )
{
$is_auth_type = 'auth_sticky';
}
else
{
$is_auth_type = 'auth_post';
}
break;
case 'reply':
case 'quote':
$is_auth_type = 'auth_reply';
break;
case 'editpost':
$is_auth_type = 'auth_edit';
break;
case 'delete':
case 'poll_delete':
$is_auth_type = 'auth_delete';
break;
case 'vote':
$is_auth_type = 'auth_vote';
break;
case 'topicreview':
$is_auth_type = 'auth_read';
break;
default:
message_die(GENERAL_MESSAGE, $lang['No_post_mode']);
break;
}
 
//
// Here we do various lookups to find topic_id, forum_id, post_id etc.
// Doing it here prevents spoofing (eg. faking forum_id, topic_id or post_id
//
$error_msg = '';
$post_data = array();
switch ( $mode )
{
case 'newtopic':
if ( empty($forum_id) )
{
message_die(GENERAL_MESSAGE, $lang['Forum_not_exist']);
}
 
$sql = "SELECT *
FROM " . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
break;
 
case 'reply':
case 'vote':
if ( empty( $topic_id) )
{
message_die(GENERAL_MESSAGE, $lang['No_topic_id']);
}
 
$sql = "SELECT f.*, t.topic_status, t.topic_title, t.topic_type
FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t
WHERE t.topic_id = $topic_id
AND f.forum_id = t.forum_id";
break;
 
case 'quote':
case 'editpost':
case 'delete':
case 'poll_delete':
if ( empty($post_id) )
{
message_die(GENERAL_MESSAGE, $lang['No_post_id']);
}
 
$select_sql = (!$submit) ? ', t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : '';
$from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : '';
$where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';
 
$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, p.post_id, p.poster_id" . $select_sql . "
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $from_sql . "
WHERE p.post_id = $post_id
AND t.topic_id = p.topic_id
AND f.forum_id = p.forum_id
$where_sql";
break;
 
default:
message_die(GENERAL_MESSAGE, $lang['No_valid_mode']);
}
 
if ( $result = $db->sql_query($sql) )
{
$post_info = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
 
$forum_id = $post_info['forum_id'];
$forum_name = $post_info['forum_name'];
 
$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $post_info);
 
if ( $post_info['forum_status'] == FORUM_LOCKED && !$is_auth['auth_mod'])
{
message_die(GENERAL_MESSAGE, $lang['Forum_locked']);
}
else if ( $mode != 'newtopic' && $post_info['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])
{
message_die(GENERAL_MESSAGE, $lang['Topic_locked']);
}
 
if ( $mode == 'editpost' || $mode == 'delete' || $mode == 'poll_delete' )
{
$topic_id = $post_info['topic_id'];
 
$post_data['poster_post'] = ( $post_info['poster_id'] == $userdata['user_id'] ) ? true : false;
$post_data['first_post'] = ( $post_info['topic_first_post_id'] == $post_id ) ? true : false;
$post_data['last_post'] = ( $post_info['topic_last_post_id'] == $post_id ) ? true : false;
$post_data['last_topic'] = ( $post_info['forum_last_post_id'] == $post_id ) ? true : false;
$post_data['has_poll'] = ( $post_info['topic_vote'] ) ? true : false;
$post_data['topic_type'] = $post_info['topic_type'];
$post_data['poster_id'] = $post_info['poster_id'];
 
if ( $post_data['first_post'] && $post_data['has_poll'] )
{
$sql = "SELECT *
FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
WHERE vd.topic_id = $topic_id
AND vr.vote_id = vd.vote_id
ORDER BY vr.vote_option_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql);
}
 
$poll_options = array();
$poll_results_sum = 0;
if ( $row = $db->sql_fetchrow($result) )
{
$poll_title = $row['vote_text'];
$poll_id = $row['vote_id'];
$poll_length = $row['vote_length'] / 86400;
 
do
{
$poll_options[$row['vote_option_id']] = $row['vote_option_text'];
$poll_results_sum += $row['vote_result'];
}
while ( $row = $db->sql_fetchrow($result) );
}
$db->sql_freeresult($result);
 
$post_data['edit_poll'] = ( ( !$poll_results_sum || $is_auth['auth_mod'] ) && $post_data['first_post'] ) ? true : 0;
}
else
{
$post_data['edit_poll'] = ($post_data['first_post'] && $is_auth['auth_pollcreate']) ? true : false;
}
//
// Can this user edit/delete the post/poll?
//
if ( $post_info['poster_id'] != $userdata['user_id'] && !$is_auth['auth_mod'] )
{
$message = ( $delete || $mode == 'delete' ) ? $lang['Delete_own_posts'] : $lang['Edit_own_posts'];
$message .= '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $message);
}
else if ( !$post_data['last_post'] && !$is_auth['auth_mod'] && ( $mode == 'delete' || $delete ) )
{
message_die(GENERAL_MESSAGE, $lang['Cannot_delete_replied']);
}
else if ( !$post_data['edit_poll'] && !$is_auth['auth_mod'] && ( $mode == 'poll_delete' || $poll_delete ) )
{
message_die(GENERAL_MESSAGE, $lang['Cannot_delete_poll']);
}
}
else
{
if ( $mode == 'quote' )
{
$topic_id = $post_info['topic_id'];
}
if ( $mode == 'newtopic' )
{
$post_data['topic_type'] = POST_NORMAL;
}
 
$post_data['first_post'] = ( $mode == 'newtopic' ) ? true : 0;
$post_data['last_post'] = false;
$post_data['has_poll'] = false;
$post_data['edit_poll'] = false;
}
if ( $mode == 'poll_delete' && !isset($poll_id) )
{
message_die(GENERAL_MESSAGE, $lang['No_such_post']);
}
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_such_post']);
}
 
//
// The user is not authed, if they're not logged in then redirect
// them, else show them an error message
//
if ( !$is_auth[$is_auth_type] )
{
if ( $userdata['session_logged_in'] )
{
message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_' . $is_auth_type], $is_auth[$is_auth_type . "_type"]));
}
 
switch( $mode )
{
case 'newtopic':
$redirect = "mode=newtopic&" . POST_FORUM_URL . "=" . $forum_id;
break;
case 'reply':
case 'topicreview':
$redirect = "mode=reply&" . POST_TOPIC_URL . "=" . $topic_id;
break;
case 'quote':
case 'editpost':
$redirect = "mode=quote&" . POST_POST_URL ."=" . $post_id;
break;
}
 
redirect(append_sid("login.$phpEx?redirect=posting.$phpEx&" . $redirect, true));
}
 
//
// Set toggles for various options
//
if ( !$board_config['allow_html'] )
{
$html_on = 0;
}
else
{
$html_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_html']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_html'] : $userdata['user_allowhtml'] );
}
 
if ( !$board_config['allow_bbcode'] )
{
$bbcode_on = 0;
}
else
{
$bbcode_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_bbcode']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_bbcode'] : $userdata['user_allowbbcode'] );
}
 
if ( !$board_config['allow_smilies'] )
{
$smilies_on = 0;
}
else
{
$smilies_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_smilies']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_smilies'] : $userdata['user_allowsmile'] );
}
 
if ( ($submit || $refresh) && $is_auth['auth_read'])
{
$notify_user = ( !empty($HTTP_POST_VARS['notify']) ) ? TRUE : 0;
}
else
{
if ( $mode != 'newtopic' && $userdata['session_logged_in'] && $is_auth['auth_read'] )
{
$sql = "SELECT topic_id
FROM " . TOPICS_WATCH_TABLE . "
WHERE topic_id = $topic_id
AND user_id = " . $userdata['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic watch information', '', __LINE__, __FILE__, $sql);
}
 
$notify_user = ( $db->sql_fetchrow($result) ) ? TRUE : $userdata['user_notify'];
$db->sql_freeresult($result);
}
else
{
$notify_user = ( $userdata['session_logged_in'] && $is_auth['auth_read'] ) ? $userdata['user_notify'] : 0;
}
}
 
$attach_sig = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['attach_sig']) ) ? TRUE : 0 ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? 0 : $userdata['user_attachsig'] );
 
// --------------------
// What shall we do?
//
if ( ( $delete || $poll_delete || $mode == 'delete' ) && !$confirm )
{
//
// Confirm deletion
//
$s_hidden_fields = '<input type="hidden" name="' . POST_POST_URL . '" value="' . $post_id . '" />';
$s_hidden_fields .= ( $delete || $mode == "delete" ) ? '<input type="hidden" name="mode" value="delete" />' : '<input type="hidden" name="mode" value="poll_delete" />';
 
$l_confirm = ( $delete || $mode == 'delete' ) ? $lang['Confirm_delete'] : $lang['Confirm_delete_poll'];
 
//
// Output confirmation page
//
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'confirm_body' => 'confirm_body.tpl')
);
 
$template->assign_vars(array(
'MESSAGE_TITLE' => $lang['Information'],
'MESSAGE_TEXT' => $l_confirm,
 
'L_YES' => $lang['Yes'],
'L_NO' => $lang['No'],
 
'S_CONFIRM_ACTION' => append_sid("posting.$phpEx"),
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
 
$template->pparse('confirm_body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
else if ( $mode == 'vote' )
{
//
// Vote in a poll
//
if ( !empty($HTTP_POST_VARS['vote_id']) )
{
$vote_option_id = intval($HTTP_POST_VARS['vote_id']);
 
$sql = "SELECT vd.vote_id
FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
WHERE vd.topic_id = $topic_id
AND vr.vote_id = vd.vote_id
AND vr.vote_option_id = $vote_option_id
GROUP BY vd.vote_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql);
}
 
if ( $vote_info = $db->sql_fetchrow($result) )
{
$vote_id = $vote_info['vote_id'];
 
$sql = "SELECT *
FROM " . VOTE_USERS_TABLE . "
WHERE vote_id = $vote_id
AND vote_user_id = " . $userdata['user_id'];
if ( !($result2 = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user vote data for this topic', '', __LINE__, __FILE__, $sql);
}
 
if ( !($row = $db->sql_fetchrow($result2)) )
{
$sql = "UPDATE " . VOTE_RESULTS_TABLE . "
SET vote_result = vote_result + 1
WHERE vote_id = $vote_id
AND vote_option_id = $vote_option_id";
if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )
{
message_die(GENERAL_ERROR, 'Could not update poll result', '', __LINE__, __FILE__, $sql);
}
 
$sql = "INSERT INTO " . VOTE_USERS_TABLE . " (vote_id, vote_user_id, vote_user_ip)
VALUES ($vote_id, " . $userdata['user_id'] . ", '$user_ip')";
if ( !$db->sql_query($sql, END_TRANSACTION) )
{
message_die(GENERAL_ERROR, "Could not insert user_id for poll", "", __LINE__, __FILE__, $sql);
}
 
$message = $lang['Vote_cast'];
}
else
{
$message = $lang['Already_voted'];
}
$db->sql_freeresult($result2);
}
else
{
$message = $lang['No_vote_option'];
}
$db->sql_freeresult($result);
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">')
);
$message .= '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
else
{
redirect(append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true));
}
}
else if ( $submit || $confirm )
{
//
// Submit post/vote (newtopic, edit, reply, etc.)
//
$return_message = '';
$return_meta = '';
 
switch ( $mode )
{
case 'editpost':
case 'newtopic':
case 'reply':
$username = ( !empty($HTTP_POST_VARS['username']) ) ? $HTTP_POST_VARS['username'] : '';
$subject = ( !empty($HTTP_POST_VARS['subject']) ) ? trim($HTTP_POST_VARS['subject']) : '';
$message = ( !empty($HTTP_POST_VARS['message']) ) ? $HTTP_POST_VARS['message'] : '';
$poll_title = ( isset($HTTP_POST_VARS['poll_title']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_title'] : '';
$poll_options = ( isset($HTTP_POST_VARS['poll_option_text']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_option_text'] : '';
$poll_length = ( isset($HTTP_POST_VARS['poll_length']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_length'] : '';
$bbcode_uid = '';
 
prepare_post($mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $poll_length);
 
if ( $error_msg == '' )
{
$topic_type = ( $topic_type != $post_data['topic_type'] && !$is_auth['auth_sticky'] && !$is_auth['auth_announce'] ) ? $post_data['topic_type'] : $topic_type;
 
submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length);
}
break;
 
case 'delete':
case 'poll_delete':
delete_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id);
break;
}
 
if ( $error_msg == '' )
{
if ( $mode != 'editpost' )
{
$user_id = ( $mode == 'reply' || $mode == 'newtopic' ) ? $userdata['user_id'] : $post_data['poster_id'];
update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id);
}
 
if ($error_msg == '' && $mode != 'poll_delete')
{
user_notification($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user);
}
 
if ( $mode == 'newtopic' || $mode == 'reply' )
{
$tracking_topics = ( !empty($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array();
$tracking_forums = ( !empty($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array();
 
if ( count($tracking_topics) + count($tracking_forums) == 100 && empty($tracking_topics[$topic_id]) )
{
asort($tracking_topics);
unset($tracking_topics[key($tracking_topics)]);
}
 
$tracking_topics[$topic_id] = time();
 
setcookie($board_config['cookie_name'] . '_t', serialize($tracking_topics), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}
 
$template->assign_vars(array(
'META' => $return_meta)
);
message_die(GENERAL_MESSAGE, $return_message);
}
}
 
if( $refresh || isset($HTTP_POST_VARS['del_poll_option']) || $error_msg != '' )
{
$username = ( !empty($HTTP_POST_VARS['username']) ) ? htmlspecialchars(trim(stripslashes($HTTP_POST_VARS['username']))) : '';
$subject = ( !empty($HTTP_POST_VARS['subject']) ) ? htmlspecialchars(trim(stripslashes($HTTP_POST_VARS['subject']))) : '';
$message = ( !empty($HTTP_POST_VARS['message']) ) ? htmlspecialchars(trim(stripslashes($HTTP_POST_VARS['message']))) : '';
 
$poll_title = ( !empty($HTTP_POST_VARS['poll_title']) ) ? htmlspecialchars(trim(stripslashes($HTTP_POST_VARS['poll_title']))) : '';
$poll_length = ( isset($HTTP_POST_VARS['poll_length']) ) ? max(0, intval($HTTP_POST_VARS['poll_length'])) : 0;
 
$poll_options = array();
if ( !empty($HTTP_POST_VARS['poll_option_text']) )
{
while( list($option_id, $option_text) = @each($HTTP_POST_VARS['poll_option_text']) )
{
if( isset($HTTP_POST_VARS['del_poll_option'][$option_id]) )
{
unset($poll_options[$option_id]);
}
else if ( !empty($option_text) )
{
$poll_options[intval($option_id)] = htmlspecialchars(trim(stripslashes($option_text)));
}
}
}
 
if ( isset($poll_add) && !empty($HTTP_POST_VARS['add_poll_option_text']) )
{
$poll_options[] = htmlspecialchars(trim(stripslashes($HTTP_POST_VARS['add_poll_option_text'])));
}
 
if ( $mode == 'newtopic' || $mode == 'reply')
{
$user_sig = ( $userdata['user_sig'] != '' && $board_config['allow_sig'] ) ? $userdata['user_sig'] : '';
}
else if ( $mode == 'editpost' )
{
$user_sig = ( $post_info['user_sig'] != '' && $board_config['allow_sig'] ) ? $post_info['user_sig'] : '';
$userdata['user_sig_bbcode_uid'] = $post_info['user_sig_bbcode_uid'];
}
if( $preview )
{
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
 
$bbcode_uid = ( $bbcode_on ) ? make_bbcode_uid() : '';
$preview_message = stripslashes(prepare_message(addslashes(unprepare_message($message)), $html_on, $bbcode_on, $smilies_on, $bbcode_uid));
$preview_subject = $subject;
$preview_username = $username;
 
//
// Finalise processing as per viewtopic
//
if( !$html_on )
{
if( $user_sig != '' || !$userdata['user_allowhtml'] )
{
$user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', '&lt;\2&gt;', $user_sig);
}
}
 
if( $attach_sig && $user_sig != '' && $userdata['user_sig_bbcode_uid'] )
{
$user_sig = bbencode_second_pass($user_sig, $userdata['user_sig_bbcode_uid']);
}
 
if( $bbcode_on )
{
$preview_message = bbencode_second_pass($preview_message, $bbcode_uid);
}
 
if( !empty($orig_word) )
{
$preview_username = ( !empty($username) ) ? preg_replace($orig_word, $replacement_word, $preview_username) : '';
$preview_subject = ( !empty($subject) ) ? preg_replace($orig_word, $replacement_word, $preview_subject) : '';
$preview_message = ( !empty($preview_message) ) ? preg_replace($orig_word, $replacement_word, $preview_message) : '';
}
 
if( $user_sig != '' )
{
$user_sig = make_clickable($user_sig);
}
$preview_message = make_clickable($preview_message);
 
if( $smilies_on )
{
if( $userdata['user_allowsmile'] && $user_sig != '' )
{
$user_sig = smilies_pass($user_sig);
}
 
$preview_message = smilies_pass($preview_message);
}
 
if( $attach_sig && $user_sig != '' )
{
$preview_message = $preview_message . '<br /><br />_________________<br />' . $user_sig;
}
 
$preview_message = str_replace("\n", '<br />', $preview_message);
 
$template->set_filenames(array(
'preview' => 'posting_preview.tpl')
);
 
$template->assign_vars(array(
'TOPIC_TITLE' => $preview_subject,
'POST_SUBJECT' => $preview_subject,
'POSTER_NAME' => $preview_username,
'POST_DATE' => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']),
'MESSAGE' => $preview_message,
 
'L_POST_SUBJECT' => $lang['Post_subject'],
'L_PREVIEW' => $lang['Preview'],
'L_POSTED' => $lang['Posted'],
'L_POST' => $lang['Post'])
);
$template->assign_var_from_handle('POST_PREVIEW_BOX', 'preview');
}
else if( $error_msg != '' )
{
$template->set_filenames(array(
'reg_header' => 'error_body.tpl')
);
$template->assign_vars(array(
'ERROR_MESSAGE' => $error_msg)
);
$template->assign_var_from_handle('ERROR_BOX', 'reg_header');
}
}
else
{
//
// User default entry point
//
if ( $mode == 'newtopic' )
{
$user_sig = ( $userdata['user_sig'] != '' ) ? $userdata['user_sig'] : '';
 
$username = ($userdata['session_logged_in']) ? $userdata['username'] : '';
$poll_title = '';
$poll_length = '';
$subject = '';
$message = '';
}
else if ( $mode == 'reply' )
{
$user_sig = ( $userdata['user_sig'] != '' ) ? $userdata['user_sig'] : '';
 
$username = ( $userdata['session_logged_in'] ) ? $userdata['username'] : '';
$subject = '';
$message = '';
 
}
else if ( $mode == 'quote' || $mode == 'editpost' )
{
$subject = ( $post_data['first_post'] ) ? $post_info['topic_title'] : $post_info['post_subject'];
$message = $post_info['post_text'];
 
if ( $mode == 'editpost' )
{
$attach_sig = ( $post_info['enable_sig'] && $post_info['user_sig'] != '' ) ? TRUE : 0;
$user_sig = $post_info['user_sig'];
 
$html_on = ( $post_info['enable_html'] ) ? true : false;
$bbcode_on = ( $post_info['enable_bbcode'] ) ? true : false;
$smilies_on = ( $post_info['enable_smilies'] ) ? true : false;
}
else
{
$attach_sig = ( $userdata['user_attachsig'] ) ? TRUE : 0;
$user_sig = $userdata['user_sig'];
}
 
if ( $post_info['bbcode_uid'] != '' )
{
$message = preg_replace('/\:(([a-z0-9]:)?)' . $post_info['bbcode_uid'] . '/s', '', $message);
}
 
$message = str_replace('<', '&lt;', $message);
$message = str_replace('>', '&gt;', $message);
$message = str_replace('<br />', "\n", $message);
 
if ( $mode == 'quote' )
{
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replace_word);
 
$msg_date = create_date($board_config['default_dateformat'], $postrow['post_time'], $board_config['board_timezone']);
 
// Use trim to get rid of spaces placed there by MS-SQL 2000
$quote_username = ( trim($post_info['post_username']) != '' ) ? $post_info['post_username'] : $post_info['username'];
$message = '[quote="' . $quote_username . '"]' . $message . '[/quote]';
 
if ( !empty($orig_word) )
{
$subject = ( !empty($subject) ) ? preg_replace($orig_word, $replace_word, $subject) : '';
$message = ( !empty($message) ) ? preg_replace($orig_word, $replace_word, $message) : '';
}
 
if ( !preg_match('/^Re:/', $subject) && strlen($subject) > 0 )
{
$subject = 'Re: ' . $subject;
}
 
$mode = 'reply';
}
else
{
$username = ( $post_info['user_id'] == ANONYMOUS && !empty($post_info['post_username']) ) ? $post_info['post_username'] : '';
}
}
}
 
//
// Signature toggle selection
//
if( $user_sig != '' )
{
$template->assign_block_vars('switch_signature_checkbox', array());
}
 
//
// HTML toggle selection
//
if ( $board_config['allow_html'] )
{
$html_status = $lang['HTML_is_ON'];
$template->assign_block_vars('switch_html_checkbox', array());
}
else
{
$html_status = $lang['HTML_is_OFF'];
}
 
//
// BBCode toggle selection
//
if ( $board_config['allow_bbcode'] )
{
$bbcode_status = $lang['BBCode_is_ON'];
$template->assign_block_vars('switch_bbcode_checkbox', array());
}
else
{
$bbcode_status = $lang['BBCode_is_OFF'];
}
 
//
// Smilies toggle selection
//
if ( $board_config['allow_smilies'] )
{
$smilies_status = $lang['Smilies_are_ON'];
$template->assign_block_vars('switch_smilies_checkbox', array());
}
else
{
$smilies_status = $lang['Smilies_are_OFF'];
}
 
if( !$userdata['session_logged_in'] || ( $mode == 'editpost' && $post_info['poster_id'] == ANONYMOUS ) )
{
$template->assign_block_vars('switch_username_select', array());
}
 
//
// Notify checkbox - only show if user is logged in
//
if ( $userdata['session_logged_in'] && $is_auth['auth_read'] )
{
if ( $mode != 'editpost' || ( $mode == 'editpost' && $post_info['poster_id'] != ANONYMOUS ) )
{
$template->assign_block_vars('switch_notify_checkbox', array());
}
}
 
//
// Delete selection
//
if ( $mode == 'editpost' && ( ( $is_auth['auth_delete'] && $post_data['last_post'] && ( !$post_data['has_poll'] || $post_data['edit_poll'] ) ) || $is_auth['auth_mod'] ) )
{
$template->assign_block_vars('switch_delete_checkbox', array());
}
 
//
// Topic type selection
//
$topic_type_toggle = '';
if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) )
{
$template->assign_block_vars('switch_type_toggle', array());
 
if( $is_auth['auth_sticky'] )
{
$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_STICKY . '"';
if ( $post_data['topic_type'] == POST_STICKY || $topic_type == POST_STICKY )
{
$topic_type_toggle .= ' checked="checked"';
}
$topic_type_toggle .= ' /> ' . $lang['Post_Sticky'] . '&nbsp;&nbsp;';
}
 
if( $is_auth['auth_announce'] )
{
$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_ANNOUNCE . '"';
if ( $post_data['topic_type'] == POST_ANNOUNCE || $topic_type == POST_ANNOUNCE )
{
$topic_type_toggle .= ' checked="checked"';
}
$topic_type_toggle .= ' /> ' . $lang['Post_Announcement'] . '&nbsp;&nbsp;';
}
 
if ( $topic_type_toggle != '' )
{
$topic_type_toggle = $lang['Post_topic_as'] . ': <input type="radio" name="topictype" value="' . POST_NORMAL .'"' . ( ( $post_data['topic_type'] == POST_NORMAL || $topic_type == POST_NORMAL ) ? ' checked="checked"' : '' ) . ' /> ' . $lang['Post_Normal'] . '&nbsp;&nbsp;' . $topic_type_toggle;
}
}
 
$hidden_form_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
 
switch( $mode )
{
case 'newtopic':
$page_title = $lang['Post_a_new_topic'];
$hidden_form_fields .= '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
break;
 
case 'reply':
$page_title = $lang['Post_a_reply'];
$hidden_form_fields .= '<input type="hidden" name="' . POST_TOPIC_URL . '" value="' . $topic_id . '" />';
break;
 
case 'editpost':
$page_title = $lang['Edit_Post'];
$hidden_form_fields .= '<input type="hidden" name="' . POST_POST_URL . '" value="' . $post_id . '" />';
break;
}
 
// Generate smilies listing for page output
generate_smilies('inline', PAGE_POSTING);
 
//
// Include page header
//
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'body' => 'posting_body.tpl',
'pollbody' => 'posting_poll_body.tpl',
'reviewbody' => 'posting_topic_review.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
 
$template->assign_vars(array(
'FORUM_NAME' => $forum_name,
'L_POST_A' => $page_title,
'L_POST_SUBJECT' => $lang['Post_subject'],
 
'U_VIEW_FORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
);
 
//
// This enables the forum/topic title to be output for posting
// but not for privmsg (where it makes no sense)
//
$template->assign_block_vars('switch_not_privmsg', array());
 
//
// Output the data to the template
//
$template->assign_vars(array(
'USERNAME' => $username,
'SUBJECT' => $subject,
'MESSAGE' => $message,
'HTML_STATUS' => $html_status,
'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="' . append_sid("faq.$phpEx?mode=bbcode") . '" target="_phpbbcode">', '</a>'),
'SMILIES_STATUS' => $smilies_status,
 
'L_SUBJECT' => $lang['Subject'],
'L_MESSAGE_BODY' => $lang['Message_body'],
'L_OPTIONS' => $lang['Options'],
'L_PREVIEW' => $lang['Preview'],
'L_SPELLCHECK' => $lang['Spellcheck'],
'L_SUBMIT' => $lang['Submit'],
'L_CANCEL' => $lang['Cancel'],
'L_CONFIRM_DELETE' => $lang['Confirm_delete'],
'L_DISABLE_HTML' => $lang['Disable_HTML_post'],
'L_DISABLE_BBCODE' => $lang['Disable_BBCode_post'],
'L_DISABLE_SMILIES' => $lang['Disable_Smilies_post'],
'L_ATTACH_SIGNATURE' => $lang['Attach_signature'],
'L_NOTIFY_ON_REPLY' => $lang['Notify'],
'L_DELETE_POST' => $lang['Delete_post'],
 
'L_BBCODE_B_HELP' => $lang['bbcode_b_help'],
'L_BBCODE_I_HELP' => $lang['bbcode_i_help'],
'L_BBCODE_U_HELP' => $lang['bbcode_u_help'],
'L_BBCODE_Q_HELP' => $lang['bbcode_q_help'],
'L_BBCODE_C_HELP' => $lang['bbcode_c_help'],
'L_BBCODE_L_HELP' => $lang['bbcode_l_help'],
'L_BBCODE_O_HELP' => $lang['bbcode_o_help'],
'L_BBCODE_P_HELP' => $lang['bbcode_p_help'],
'L_BBCODE_W_HELP' => $lang['bbcode_w_help'],
'L_BBCODE_A_HELP' => $lang['bbcode_a_help'],
'L_BBCODE_S_HELP' => $lang['bbcode_s_help'],
'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
'L_EMPTY_MESSAGE' => $lang['Empty_message'],
 
'L_FONT_COLOR' => $lang['Font_color'],
'L_COLOR_DEFAULT' => $lang['color_default'],
'L_COLOR_DARK_RED' => $lang['color_dark_red'],
'L_COLOR_RED' => $lang['color_red'],
'L_COLOR_ORANGE' => $lang['color_orange'],
'L_COLOR_BROWN' => $lang['color_brown'],
'L_COLOR_YELLOW' => $lang['color_yellow'],
'L_COLOR_GREEN' => $lang['color_green'],
'L_COLOR_OLIVE' => $lang['color_olive'],
'L_COLOR_CYAN' => $lang['color_cyan'],
'L_COLOR_BLUE' => $lang['color_blue'],
'L_COLOR_DARK_BLUE' => $lang['color_dark_blue'],
'L_COLOR_INDIGO' => $lang['color_indigo'],
'L_COLOR_VIOLET' => $lang['color_violet'],
'L_COLOR_WHITE' => $lang['color_white'],
'L_COLOR_BLACK' => $lang['color_black'],
 
'L_FONT_SIZE' => $lang['Font_size'],
'L_FONT_TINY' => $lang['font_tiny'],
'L_FONT_SMALL' => $lang['font_small'],
'L_FONT_NORMAL' => $lang['font_normal'],
'L_FONT_LARGE' => $lang['font_large'],
'L_FONT_HUGE' => $lang['font_huge'],
 
'L_BBCODE_CLOSE_TAGS' => $lang['Close_Tags'],
'L_STYLES_TIP' => $lang['Styles_tip'],
 
'U_VIEWTOPIC' => ( $mode == 'reply' ) ? append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;postorder=desc") : '',
'U_REVIEW_TOPIC' => ( $mode == 'reply' ) ? append_sid("posting.$phpEx?mode=topicreview&amp;" . POST_TOPIC_URL . "=$topic_id") : '',
 
'S_HTML_CHECKED' => ( !$html_on ) ? 'checked="checked"' : '',
'S_BBCODE_CHECKED' => ( !$bbcode_on ) ? 'checked="checked"' : '',
'S_SMILIES_CHECKED' => ( !$smilies_on ) ? 'checked="checked"' : '',
'S_SIGNATURE_CHECKED' => ( $attach_sig ) ? 'checked="checked"' : '',
'S_NOTIFY_CHECKED' => ( $notify_user ) ? 'checked="checked"' : '',
'S_TYPE_TOGGLE' => $topic_type_toggle,
'S_TOPIC_ID' => $topic_id,
'S_POST_ACTION' => append_sid("posting.$phpEx"),
'S_HIDDEN_FORM_FIELDS' => $hidden_form_fields)
);
 
//
// Poll entry switch/output
//
if( ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['edit_poll']) ) && $is_auth['auth_pollcreate'] )
{
$template->assign_vars(array(
'L_ADD_A_POLL' => $lang['Add_poll'],
'L_ADD_POLL_EXPLAIN' => $lang['Add_poll_explain'],
'L_POLL_QUESTION' => $lang['Poll_question'],
'L_POLL_OPTION' => $lang['Poll_option'],
'L_ADD_OPTION' => $lang['Add_option'],
'L_UPDATE_OPTION' => $lang['Update'],
'L_DELETE_OPTION' => $lang['Delete'],
'L_POLL_LENGTH' => $lang['Poll_for'],
'L_DAYS' => $lang['Days'],
'L_POLL_LENGTH_EXPLAIN' => $lang['Poll_for_explain'],
'L_POLL_DELETE' => $lang['Delete_poll'],
'POLL_TITLE' => $poll_title,
'POLL_LENGTH' => $poll_length)
);
 
if( $mode == 'editpost' && $post_data['edit_poll'] && $post_data['has_poll'])
{
$template->assign_block_vars('switch_poll_delete_toggle', array());
}
 
if( !empty($poll_options) )
{
while( list($option_id, $option_text) = each($poll_options) )
{
$template->assign_block_vars('poll_option_rows', array(
'POLL_OPTION' => str_replace('"', '&quot;', $option_text),
 
'S_POLL_OPTION_NUM' => $option_id)
);
}
}
 
$template->assign_var_from_handle('POLLBOX', 'pollbody');
}
 
//
// Topic review
//
if( $mode == 'reply' && $is_auth['auth_read'] )
{
require($phpbb_root_path . 'includes/topic_review.'.$phpEx);
topic_review($topic_id, true);
 
$template->assign_block_vars('switch_inline_mode', array());
$template->assign_var_from_handle('TOPIC_REVIEW_BOX', 'reviewbody');
}
 
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
?>
/Forum/privmsg.php
0,0 → 1,2199
<?php
/***************************************************************************
* privmsgs.php
* -------------------
* begin : Saturday, Jun 9, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: privmsg.php,v 1.96.2.49 2006/04/10 21:08:15 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);
 
//
// Is PM disabled?
//
if ( !empty($board_config['privmsg_disable']) )
{
message_die(GENERAL_MESSAGE, 'PM_disabled');
}
 
$html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#');
$html_entities_replace = array('&amp;', '&lt;', '&gt;', '&quot;');
 
//
// Parameters
//
$submit = ( isset($HTTP_POST_VARS['post']) ) ? TRUE : 0;
$submit_search = ( isset($HTTP_POST_VARS['usersubmit']) ) ? TRUE : 0;
$submit_msgdays = ( isset($HTTP_POST_VARS['submit_msgdays']) ) ? TRUE : 0;
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : 0;
$preview = ( isset($HTTP_POST_VARS['preview']) ) ? TRUE : 0;
$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : 0;
$delete = ( isset($HTTP_POST_VARS['delete']) ) ? TRUE : 0;
$delete_all = ( isset($HTTP_POST_VARS['deleteall']) ) ? TRUE : 0;
$save = ( isset($HTTP_POST_VARS['save']) ) ? TRUE : 0;
 
$refresh = $preview || $submit_search;
 
$mark_list = ( !empty($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : 0;
 
if ( isset($HTTP_POST_VARS['folder']) || isset($HTTP_GET_VARS['folder']) )
{
$folder = ( isset($HTTP_POST_VARS['folder']) ) ? $HTTP_POST_VARS['folder'] : $HTTP_GET_VARS['folder'];
$folder = htmlspecialchars($folder);
 
if ( $folder != 'inbox' && $folder != 'outbox' && $folder != 'sentbox' && $folder != 'savebox' )
{
$folder = 'inbox';
}
}
else
{
$folder = 'inbox';
}
 
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_PRIVMSGS);
init_userprefs($userdata);
//
// End session management
//
 
//
// Cancel
//
if ( $cancel )
{
redirect(append_sid("privmsg.$phpEx?folder=$folder", true));
}
 
//
// Var definitions
//
if ( !empty($HTTP_POST_VARS['mode']) || !empty($HTTP_GET_VARS['mode']) )
{
$mode = ( !empty($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
$mode = htmlspecialchars($mode);
}
else
{
$mode = '';
}
 
$start = ( !empty($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
 
if ( isset($HTTP_POST_VARS[POST_POST_URL]) || isset($HTTP_GET_VARS[POST_POST_URL]) )
{
$privmsg_id = ( isset($HTTP_POST_VARS[POST_POST_URL]) ) ? intval($HTTP_POST_VARS[POST_POST_URL]) : intval($HTTP_GET_VARS[POST_POST_URL]);
}
else
{
$privmsg_id = '';
}
 
$error = FALSE;
 
//
// Define the box image links
//
$inbox_img = ( $folder != 'inbox' || $mode != '' ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=inbox") . '"><img src="' . $images['pm_inbox'] . '" border="0" alt="' . $lang['Inbox'] . '" /></a>' : '<img src="' . $images['pm_inbox'] . '" border="0" alt="' . $lang['Inbox'] . '" />';
$inbox_url = ( $folder != 'inbox' || $mode != '' ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=inbox") . '">' . $lang['Inbox'] . '</a>' : $lang['Inbox'];
 
$outbox_img = ( $folder != 'outbox' || $mode != '' ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=outbox") . '"><img src="' . $images['pm_outbox'] . '" border="0" alt="' . $lang['Outbox'] . '" /></a>' : '<img src="' . $images['pm_outbox'] . '" border="0" alt="' . $lang['Outbox'] . '" />';
$outbox_url = ( $folder != 'outbox' || $mode != '' ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=outbox") . '">' . $lang['Outbox'] . '</a>' : $lang['Outbox'];
 
$sentbox_img = ( $folder != 'sentbox' || $mode != '' ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=sentbox") . '"><img src="' . $images['pm_sentbox'] . '" border="0" alt="' . $lang['Sentbox'] . '" /></a>' : '<img src="' . $images['pm_sentbox'] . '" border="0" alt="' . $lang['Sentbox'] . '" />';
$sentbox_url = ( $folder != 'sentbox' || $mode != '' ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=sentbox") . '">' . $lang['Sentbox'] . '</a>' : $lang['Sentbox'];
 
$savebox_img = ( $folder != 'savebox' || $mode != '' ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=savebox") . '"><img src="' . $images['pm_savebox'] . '" border="0" alt="' . $lang['Savebox'] . '" /></a>' : '<img src="' . $images['pm_savebox'] . '" border="0" alt="' . $lang['Savebox'] . '" />';
$savebox_url = ( $folder != 'savebox' || $mode != '' ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=savebox") . '">' . $lang['Savebox'] . '</a>' : $lang['Savebox'];
 
// ----------
// Start main
//
if ( $mode == 'newpm' )
{
$gen_simple_header = TRUE;
 
$page_title = $lang['Private_Messaging'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'body' => 'privmsgs_popup.tpl')
);
 
if ( $userdata['session_logged_in'] )
{
if ( $userdata['user_new_privmsg'] )
{
$l_new_message = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['You_new_pm'] : $lang['You_new_pms'];
}
else
{
$l_new_message = $lang['You_no_new_pm'];
}
 
$l_new_message .= '<br /><br />' . sprintf($lang['Click_view_privmsg'], '<a href="' . append_sid("privmsg.".$phpEx."?folder=inbox") . '" onclick="jump_to_inbox();return false;" target="_new">', '</a>');
}
else
{
$l_new_message = $lang['Login_check_pm'];
}
 
$template->assign_vars(array(
'L_CLOSE_WINDOW' => $lang['Close_window'],
'L_MESSAGE' => $l_new_message)
);
 
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
else if ( $mode == 'read' )
{
if ( !empty($HTTP_GET_VARS[POST_POST_URL]) )
{
$privmsgs_id = intval($HTTP_GET_VARS[POST_POST_URL]);
}
else
{
message_die(GENERAL_ERROR, $lang['No_post_id']);
}
 
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode&" . POST_POST_URL . "=$privmsgs_id", true));
}
 
//
// SQL to pull appropriate message, prevents nosey people
// reading other peoples messages ... hopefully!
//
switch( $folder )
{
case 'inbox':
$l_box_name = $lang['Inbox'];
$pm_sql_user = "AND pm.privmsgs_to_userid = " . $userdata['user_id'] . "
AND ( pm.privmsgs_type = " . PRIVMSGS_READ_MAIL . "
OR pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
OR pm.privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
break;
case 'outbox':
$l_box_name = $lang['Outbox'];
$pm_sql_user = "AND pm.privmsgs_from_userid = " . $userdata['user_id'] . "
AND ( pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
OR pm.privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) ";
break;
case 'sentbox':
$l_box_name = $lang['Sentbox'];
$pm_sql_user = "AND pm.privmsgs_from_userid = " . $userdata['user_id'] . "
AND pm.privmsgs_type = " . PRIVMSGS_SENT_MAIL;
break;
case 'savebox':
$l_box_name = $lang['Savebox'];
$pm_sql_user = "AND ( ( pm.privmsgs_to_userid = " . $userdata['user_id'] . "
AND pm.privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " )
OR ( pm.privmsgs_from_userid = " . $userdata['user_id'] . "
AND pm.privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " )
)";
break;
default:
message_die(GENERAL_ERROR, $lang['No_such_folder']);
break;
}
 
//
// Major query obtains the message ...
//
$sql = "SELECT u.username AS username_1, u.user_id AS user_id_1, u2.username AS username_2, u2.user_id AS user_id_2, u.user_sig_bbcode_uid, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_avatar, pm.*, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text
FROM " . PRIVMSGS_TABLE . " pm, " . PRIVMSGS_TEXT_TABLE . " pmt, " . USERS_TABLE . " u, " . USERS_TABLE . " u2
WHERE pm.privmsgs_id = $privmsgs_id
AND pmt.privmsgs_text_id = pm.privmsgs_id
$pm_sql_user
AND u.user_id = pm.privmsgs_from_userid
AND u2.user_id = pm.privmsgs_to_userid";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query private message post information', '', __LINE__, __FILE__, $sql);
}
 
//
// Did the query return any data?
//
if ( !($privmsg = $db->sql_fetchrow($result)) )
{
redirect(append_sid("privmsg.$phpEx?folder=$folder", true));
}
 
$privmsg_id = $privmsg['privmsgs_id'];
 
//
// Is this a new message in the inbox? If it is then save
// a copy in the posters sent box
//
if (($privmsg['privmsgs_type'] == PRIVMSGS_NEW_MAIL || $privmsg['privmsgs_type'] == PRIVMSGS_UNREAD_MAIL) && $folder == 'inbox')
{
// Update appropriate counter
switch ($privmsg['privmsgs_type'])
{
case PRIVMSGS_NEW_MAIL:
$sql = "user_new_privmsg = user_new_privmsg - 1";
break;
case PRIVMSGS_UNREAD_MAIL:
$sql = "user_unread_privmsg = user_unread_privmsg - 1";
break;
}
 
$sql = "UPDATE " . USERS_TABLE . "
SET $sql
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update private message read status for user', '', __LINE__, __FILE__, $sql);
}
 
$sql = "UPDATE " . PRIVMSGS_TABLE . "
SET privmsgs_type = " . PRIVMSGS_READ_MAIL . "
WHERE privmsgs_id = " . $privmsg['privmsgs_id'];
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update private message read status', '', __LINE__, __FILE__, $sql);
}
 
// Check to see if the poster has a 'full' sent box
$sql = "SELECT COUNT(privmsgs_id) AS sent_items, MIN(privmsgs_date) AS oldest_post_time
FROM " . PRIVMSGS_TABLE . "
WHERE privmsgs_type = " . PRIVMSGS_SENT_MAIL . "
AND privmsgs_from_userid = " . $privmsg['privmsgs_from_userid'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain sent message info for sendee', '', __LINE__, __FILE__, $sql);
}
 
$sql_priority = ( SQL_LAYER == 'mysql' ) ? 'LOW_PRIORITY' : '';
 
if ( $sent_info = $db->sql_fetchrow($result) )
{
if ($board_config['max_sentbox_privmsgs'] && $sent_info['sent_items'] >= $board_config['max_sentbox_privmsgs'])
{
$sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . "
WHERE privmsgs_type = " . PRIVMSGS_SENT_MAIL . "
AND privmsgs_date = " . $sent_info['oldest_post_time'] . "
AND privmsgs_from_userid = " . $privmsg['privmsgs_from_userid'];
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not find oldest privmsgs', '', __LINE__, __FILE__, $sql);
}
$old_privmsgs_id = $db->sql_fetchrow($result);
$old_privmsgs_id = $old_privmsgs_id['privmsgs_id'];
$sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . "
WHERE privmsgs_id = $old_privmsgs_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs (sent)', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE $sql_priority FROM " . PRIVMSGS_TEXT_TABLE . "
WHERE privmsgs_text_id = $old_privmsgs_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs text (sent)', '', __LINE__, __FILE__, $sql);
}
}
}
 
//
// This makes a copy of the post and stores it as a SENT message from the sendee. Perhaps
// not the most DB friendly way but a lot easier to manage, besides the admin will be able to
// set limits on numbers of storable posts for users ... hopefully!
//
$sql = "INSERT $sql_priority INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig)
VALUES (" . PRIVMSGS_SENT_MAIL . ", '" . str_replace("\'", "''", addslashes($privmsg['privmsgs_subject'])) . "', " . $privmsg['privmsgs_from_userid'] . ", " . $privmsg['privmsgs_to_userid'] . ", " . $privmsg['privmsgs_date'] . ", '" . $privmsg['privmsgs_ip'] . "', " . $privmsg['privmsgs_enable_html'] . ", " . $privmsg['privmsgs_enable_bbcode'] . ", " . $privmsg['privmsgs_enable_smilies'] . ", " . $privmsg['privmsgs_attach_sig'] . ")";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert private message sent info', '', __LINE__, __FILE__, $sql);
}
 
$privmsg_sent_id = $db->sql_nextid();
 
$sql = "INSERT $sql_priority INTO " . PRIVMSGS_TEXT_TABLE . " (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text)
VALUES ($privmsg_sent_id, '" . $privmsg['privmsgs_bbcode_uid'] . "', '" . str_replace("\'", "''", addslashes($privmsg['privmsgs_text'])) . "')";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert private message sent text', '', __LINE__, __FILE__, $sql);
}
}
 
//
// Pick a folder, any folder, so long as it's one below ...
//
$post_urls = array(
'post' => append_sid("privmsg.$phpEx?mode=post"),
'reply' => append_sid("privmsg.$phpEx?mode=reply&amp;" . POST_POST_URL . "=$privmsg_id"),
'quote' => append_sid("privmsg.$phpEx?mode=quote&amp;" . POST_POST_URL . "=$privmsg_id"),
'edit' => append_sid("privmsg.$phpEx?mode=edit&amp;" . POST_POST_URL . "=$privmsg_id")
);
$post_icons = array(
'post_img' => '<a href="' . $post_urls['post'] . '"><img src="' . $images['pm_postmsg'] . '" alt="' . $lang['Post_new_pm'] . '" border="0" /></a>',
'post' => '<a href="' . $post_urls['post'] . '">' . $lang['Post_new_pm'] . '</a>',
'reply_img' => '<a href="' . $post_urls['reply'] . '"><img src="' . $images['pm_replymsg'] . '" alt="' . $lang['Post_reply_pm'] . '" border="0" /></a>',
'reply' => '<a href="' . $post_urls['reply'] . '">' . $lang['Post_reply_pm'] . '</a>',
'quote_img' => '<a href="' . $post_urls['quote'] . '"><img src="' . $images['pm_quotemsg'] . '" alt="' . $lang['Post_quote_pm'] . '" border="0" /></a>',
'quote' => '<a href="' . $post_urls['quote'] . '">' . $lang['Post_quote_pm'] . '</a>',
'edit_img' => '<a href="' . $post_urls['edit'] . '"><img src="' . $images['pm_editmsg'] . '" alt="' . $lang['Edit_pm'] . '" border="0" /></a>',
'edit' => '<a href="' . $post_urls['edit'] . '">' . $lang['Edit_pm'] . '</a>'
);
 
if ( $folder == 'inbox' )
{
$post_img = $post_icons['post_img'];
$reply_img = $post_icons['reply_img'];
$quote_img = $post_icons['quote_img'];
$edit_img = '';
$post = $post_icons['post'];
$reply = $post_icons['reply'];
$quote = $post_icons['quote'];
$edit = '';
$l_box_name = $lang['Inbox'];
}
else if ( $folder == 'outbox' )
{
$post_img = $post_icons['post_img'];
$reply_img = '';
$quote_img = '';
$edit_img = $post_icons['edit_img'];
$post = $post_icons['post'];
$reply = '';
$quote = '';
$edit = $post_icons['edit'];
$l_box_name = $lang['Outbox'];
}
else if ( $folder == 'savebox' )
{
if ( $privmsg['privmsgs_type'] == PRIVMSGS_SAVED_IN_MAIL )
{
$post_img = $post_icons['post_img'];
$reply_img = $post_icons['reply_img'];
$quote_img = $post_icons['quote_img'];
$edit_img = '';
$post = $post_icons['post'];
$reply = $post_icons['reply'];
$quote = $post_icons['quote'];
$edit = '';
}
else
{
$post_img = $post_icons['post_img'];
$reply_img = '';
$quote_img = '';
$edit_img = '';
$post = $post_icons['post'];
$reply = '';
$quote = '';
$edit = '';
}
$l_box_name = $lang['Saved'];
}
else if ( $folder == 'sentbox' )
{
$post_img = $post_icons['post_img'];
$reply_img = '';
$quote_img = '';
$edit_img = '';
$post = $post_icons['post'];
$reply = '';
$quote = '';
$edit = '';
$l_box_name = $lang['Sent'];
}
 
$s_hidden_fields = '<input type="hidden" name="mark[]" value="' . $privmsgs_id . '" />';
 
$page_title = $lang['Read_pm'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
//
// Load templates
//
$template->set_filenames(array(
'body' => 'privmsgs_read_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
 
$template->assign_vars(array(
'INBOX_IMG' => $inbox_img,
'SENTBOX_IMG' => $sentbox_img,
'OUTBOX_IMG' => $outbox_img,
'SAVEBOX_IMG' => $savebox_img,
'INBOX' => $inbox_url,
 
'POST_PM_IMG' => $post_img,
'REPLY_PM_IMG' => $reply_img,
'EDIT_PM_IMG' => $edit_img,
'QUOTE_PM_IMG' => $quote_img,
'POST_PM' => $post,
'REPLY_PM' => $reply,
'EDIT_PM' => $edit,
'QUOTE_PM' => $quote,
 
'SENTBOX' => $sentbox_url,
'OUTBOX' => $outbox_url,
'SAVEBOX' => $savebox_url,
 
'BOX_NAME' => $l_box_name,
 
'L_MESSAGE' => $lang['Message'],
'L_INBOX' => $lang['Inbox'],
'L_OUTBOX' => $lang['Outbox'],
'L_SENTBOX' => $lang['Sent'],
'L_SAVEBOX' => $lang['Saved'],
'L_FLAG' => $lang['Flag'],
'L_SUBJECT' => $lang['Subject'],
'L_POSTED' => $lang['Posted'],
'L_DATE' => $lang['Date'],
'L_FROM' => $lang['From'],
'L_TO' => $lang['To'],
'L_SAVE_MSG' => $lang['Save_message'],
'L_DELETE_MSG' => $lang['Delete_message'],
 
'S_PRIVMSGS_ACTION' => append_sid("privmsg.$phpEx?folder=$folder"),
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
$username_from = $privmsg['username_1'];
$user_id_from = $privmsg['user_id_1'];
$username_to = $privmsg['username_2'];
$user_id_to = $privmsg['user_id_2'];
 
$post_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['board_timezone']);
 
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $user_id_from);
$profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>';
$profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
 
$temp_url = append_sid("privmsg.$phpEx?mode=post&amp;" . POST_USERS_URL . "=$user_id_from");
$pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
 
if ( !empty($privmsg['user_viewemail']) || $userdata['user_level'] == ADMIN )
{
$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL .'=' . $user_id_from) : 'mailto:' . $privmsg['user_email'];
 
$email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
$email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
}
else
{
$email_img = '';
$email = '';
}
 
$www_img = ( $privmsg['user_website'] ) ? '<a href="' . $privmsg['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : '';
$www = ( $privmsg['user_website'] ) ? '<a href="' . $privmsg['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
 
if ( !empty($privmsg['user_icq']) )
{
$icq_status_img = '<a href="http://wwp.icq.com/' . $privmsg['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $privmsg['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
$icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $privmsg['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
$icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $privmsg['user_icq'] . '">' . $lang['ICQ'] . '</a>';
}
else
{
$icq_status_img = '';
$icq_img = '';
$icq = '';
}
 
$aim_img = ( $privmsg['user_aim'] ) ? '<a href="aim:goim?screenname=' . $privmsg['user_aim'] . '&amp;message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '';
$aim = ( $privmsg['user_aim'] ) ? '<a href="aim:goim?screenname=' . $privmsg['user_aim'] . '&amp;message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : '';
 
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$user_id_from");
$msn_img = ( $privmsg['user_msnm'] ) ? '<a href="' . $temp_url . '"><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : '';
$msn = ( $privmsg['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : '';
 
$yim_img = ( $privmsg['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $privmsg['user_yim'] . '&amp;.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
$yim = ( $privmsg['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $privmsg['user_yim'] . '&amp;.src=pg">' . $lang['YIM'] . '</a>' : '';
 
$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($username_from) . "&amp;showresults=posts");
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $username_from) . '" title="' . sprintf($lang['Search_user_posts'], $username_from) . '" border="0" /></a>';
$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $username_from) . '</a>';
 
//
// Processing of post
//
$post_subject = $privmsg['privmsgs_subject'];
 
$private_message = $privmsg['privmsgs_text'];
$bbcode_uid = $privmsg['privmsgs_bbcode_uid'];
 
if ( $board_config['allow_sig'] )
{
$user_sig = ( $privmsg['privmsgs_from_userid'] == $userdata['user_id'] ) ? $userdata['user_sig'] : $privmsg['user_sig'];
}
else
{
$user_sig = '';
}
 
$user_sig_bbcode_uid = ( $privmsg['privmsgs_from_userid'] == $userdata['user_id'] ) ? $userdata['user_sig_bbcode_uid'] : $privmsg['user_sig_bbcode_uid'];
 
//
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
//
if ( !$board_config['allow_html'] || !$userdata['user_allowhtml'])
{
if ( $user_sig != '')
{
$user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "&lt;\\2&gt;", $user_sig);
}
 
if ( $privmsg['privmsgs_enable_html'] )
{
$private_message = preg_replace('#(<)([\/]?.*?)(>)#is', "&lt;\\2&gt;", $private_message);
}
}
 
if ( $user_sig != '' && $privmsg['privmsgs_attach_sig'] && $user_sig_bbcode_uid != '' )
{
$user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $user_sig);
}
 
if ( $bbcode_uid != '' )
{
$private_message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($private_message, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $private_message);
}
 
$private_message = make_clickable($private_message);
 
if ( $privmsg['privmsgs_attach_sig'] && $user_sig != '' )
{
$private_message .= '<br /><br />_________________<br />' . make_clickable($user_sig);
}
 
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
 
if ( count($orig_word) )
{
$post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
$private_message = preg_replace($orig_word, $replacement_word, $private_message);
}
 
if ( $board_config['allow_smilies'] && $privmsg['privmsgs_enable_smilies'] )
{
$private_message = smilies_pass($private_message);
}
 
$private_message = str_replace("\n", '<br />', $private_message);
 
//
// Dump it to the templating engine
//
$template->assign_vars(array(
'MESSAGE_TO' => $username_to,
'MESSAGE_FROM' => $username_from,
'RANK_IMAGE' => $rank_image,
'POSTER_JOINED' => $poster_joined,
'POSTER_POSTS' => $poster_posts,
'POSTER_FROM' => $poster_from,
'POSTER_AVATAR' => $poster_avatar,
'POST_SUBJECT' => $post_subject,
'POST_DATE' => $post_date,
'MESSAGE' => $private_message,
 
'PROFILE_IMG' => $profile_img,
'PROFILE' => $profile,
'SEARCH_IMG' => $search_img,
'SEARCH' => $search,
'EMAIL_IMG' => $email_img,
'EMAIL' => $email,
'WWW_IMG' => $www_img,
'WWW' => $www,
'ICQ_STATUS_IMG' => $icq_status_img,
'ICQ_IMG' => $icq_img,
'ICQ' => $icq,
'AIM_IMG' => $aim_img,
'AIM' => $aim,
'MSN_IMG' => $msn_img,
'MSN' => $msn,
'YIM_IMG' => $yim_img,
'YIM' => $yim)
);
 
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
}
else if ( ( $delete && $mark_list ) || $delete_all )
{
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true));
}
 
if ( isset($mark_list) && !is_array($mark_list) )
{
// Set to empty array instead of '0' if nothing is selected.
$mark_list = array();
}
 
if ( !$confirm )
{
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
$s_hidden_fields .= ( isset($HTTP_POST_VARS['delete']) ) ? '<input type="hidden" name="delete" value="true" />' : '<input type="hidden" name="deleteall" value="true" />';
 
for($i = 0; $i < count($mark_list); $i++)
{
$s_hidden_fields .= '<input type="hidden" name="mark[]" value="' . intval($mark_list[$i]) . '" />';
}
 
//
// Output confirmation page
//
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'confirm_body' => 'confirm_body.tpl')
);
$template->assign_vars(array(
'MESSAGE_TITLE' => $lang['Information'],
'MESSAGE_TEXT' => ( count($mark_list) == 1 ) ? $lang['Confirm_delete_pm'] : $lang['Confirm_delete_pms'],
 
'L_YES' => $lang['Yes'],
'L_NO' => $lang['No'],
 
'S_CONFIRM_ACTION' => append_sid("privmsg.$phpEx?folder=$folder"),
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
 
$template->pparse('confirm_body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
}
else if ( $confirm )
{
$delete_sql_id = '';
 
if (!$delete_all)
{
for ($i = 0; $i < count($mark_list); $i++)
{
$delete_sql_id .= (($delete_sql_id != '') ? ', ' : '') . intval($mark_list[$i]);
}
$delete_sql_id = "AND privmsgs_id IN ($delete_sql_id)";
}
 
switch($folder)
{
case 'inbox':
$delete_type = "privmsgs_to_userid = " . $userdata['user_id'] . " AND (
privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
break;
 
case 'outbox':
$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
break;
 
case 'sentbox':
$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SENT_MAIL;
break;
 
case 'savebox':
$delete_type = "( ( privmsgs_from_userid = " . $userdata['user_id'] . "
AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " )
OR ( privmsgs_to_userid = " . $userdata['user_id'] . "
AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) )";
break;
}
 
$sql = "SELECT privmsgs_id
FROM " . PRIVMSGS_TABLE . "
WHERE $delete_type $delete_sql_id";
 
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain id list to delete messages', '', __LINE__, __FILE__, $sql);
}
 
$mark_list = array();
while ( $row = $db->sql_fetchrow($result) )
{
$mark_list[] = $row['privmsgs_id'];
}
 
unset($delete_type);
 
if ( count($mark_list) )
{
$delete_sql_id = '';
for ($i = 0; $i < sizeof($mark_list); $i++)
{
$delete_sql_id .= (($delete_sql_id != '') ? ', ' : '') . intval($mark_list[$i]);
}
 
if ($folder == 'inbox' || $folder == 'outbox')
{
switch ($folder)
{
case 'inbox':
$sql = "privmsgs_to_userid = " . $userdata['user_id'];
break;
case 'outbox':
$sql = "privmsgs_from_userid = " . $userdata['user_id'];
break;
}
 
// Get information relevant to new or unread mail
// so we can adjust users counters appropriately
$sql = "SELECT privmsgs_to_userid, privmsgs_type
FROM " . PRIVMSGS_TABLE . "
WHERE privmsgs_id IN ($delete_sql_id)
AND $sql
AND privmsgs_type IN (" . PRIVMSGS_NEW_MAIL . ", " . PRIVMSGS_UNREAD_MAIL . ")";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user id list for outbox messages', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result))
{
$update_users = $update_list = array();
do
{
switch ($row['privmsgs_type'])
{
case PRIVMSGS_NEW_MAIL:
$update_users['new'][$row['privmsgs_to_userid']]++;
break;
 
case PRIVMSGS_UNREAD_MAIL:
$update_users['unread'][$row['privmsgs_to_userid']]++;
break;
}
}
while ($row = $db->sql_fetchrow($result));
 
if (sizeof($update_users))
{
while (list($type, $users) = each($update_users))
{
while (list($user_id, $dec) = each($users))
{
$update_list[$type][$dec][] = $user_id;
}
}
unset($update_users);
 
while (list($type, $dec_ary) = each($update_list))
{
switch ($type)
{
case 'new':
$type = "user_new_privmsg";
break;
 
case 'unread':
$type = "user_unread_privmsg";
break;
}
 
while (list($dec, $user_ary) = each($dec_ary))
{
$user_ids = implode(', ', $user_ary);
 
$sql = "UPDATE " . USERS_TABLE . "
SET $type = $type - $dec
WHERE user_id IN ($user_ids)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update user pm counters', '', __LINE__, __FILE__, $sql);
}
}
}
unset($update_list);
}
}
$db->sql_freeresult($result);
}
 
// Delete the messages
$delete_text_sql = "DELETE FROM " . PRIVMSGS_TEXT_TABLE . "
WHERE privmsgs_text_id IN ($delete_sql_id)";
$delete_sql = "DELETE FROM " . PRIVMSGS_TABLE . "
WHERE privmsgs_id IN ($delete_sql_id)
AND ";
 
switch( $folder )
{
case 'inbox':
$delete_sql .= "privmsgs_to_userid = " . $userdata['user_id'] . " AND (
privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
break;
 
case 'outbox':
$delete_sql .= "privmsgs_from_userid = " . $userdata['user_id'] . " AND (
privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
break;
 
case 'sentbox':
$delete_sql .= "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SENT_MAIL;
break;
 
case 'savebox':
$delete_sql .= "( ( privmsgs_from_userid = " . $userdata['user_id'] . "
AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " )
OR ( privmsgs_to_userid = " . $userdata['user_id'] . "
AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) )";
break;
}
 
if ( !$db->sql_query($delete_sql, BEGIN_TRANSACTION) )
{
message_die(GENERAL_ERROR, 'Could not delete private message info', '', __LINE__, __FILE__, $delete_sql);
}
 
if ( !$db->sql_query($delete_text_sql, END_TRANSACTION) )
{
message_die(GENERAL_ERROR, 'Could not delete private message text', '', __LINE__, __FILE__, $delete_text_sql);
}
}
}
}
else if ( $save && $mark_list && $folder != 'savebox' && $folder != 'outbox' )
{
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true));
}
if (sizeof($mark_list))
{
// See if recipient is at their savebox limit
$sql = "SELECT COUNT(privmsgs_id) AS savebox_items, MIN(privmsgs_date) AS oldest_post_time
FROM " . PRIVMSGS_TABLE . "
WHERE ( ( privmsgs_to_userid = " . $userdata['user_id'] . "
AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " )
OR ( privmsgs_from_userid = " . $userdata['user_id'] . "
AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . ") )";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain sent message info for sendee', '', __LINE__, __FILE__, $sql);
}
 
$sql_priority = ( SQL_LAYER == 'mysql' ) ? 'LOW_PRIORITY' : '';
 
if ( $saved_info = $db->sql_fetchrow($result) )
{
if ($board_config['max_savebox_privmsgs'] && $saved_info['savebox_items'] >= $board_config['max_savebox_privmsgs'] )
{
$sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . "
WHERE ( ( privmsgs_to_userid = " . $userdata['user_id'] . "
AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " )
OR ( privmsgs_from_userid = " . $userdata['user_id'] . "
AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . ") )
AND privmsgs_date = " . $saved_info['oldest_post_time'];
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not find oldest privmsgs (save)', '', __LINE__, __FILE__, $sql);
}
$old_privmsgs_id = $db->sql_fetchrow($result);
$old_privmsgs_id = $old_privmsgs_id['privmsgs_id'];
$sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . "
WHERE privmsgs_id = $old_privmsgs_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs (save)', '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE $sql_priority FROM " . PRIVMSGS_TEXT_TABLE . "
WHERE privmsgs_text_id = $old_privmsgs_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs text (save)', '', __LINE__, __FILE__, $sql);
}
}
}
$saved_sql_id = '';
for ($i = 0; $i < sizeof($mark_list); $i++)
{
$saved_sql_id .= (($saved_sql_id != '') ? ', ' : '') . intval($mark_list[$i]);
}
 
// Process request
$saved_sql = "UPDATE " . PRIVMSGS_TABLE;
 
// Decrement read/new counters if appropriate
if ($folder == 'inbox' || $folder == 'outbox')
{
switch ($folder)
{
case 'inbox':
$sql = "privmsgs_to_userid = " . $userdata['user_id'];
break;
case 'outbox':
$sql = "privmsgs_from_userid = " . $userdata['user_id'];
break;
}
 
// Get information relevant to new or unread mail
// so we can adjust users counters appropriately
$sql = "SELECT privmsgs_to_userid, privmsgs_type
FROM " . PRIVMSGS_TABLE . "
WHERE privmsgs_id IN ($saved_sql_id)
AND $sql
AND privmsgs_type IN (" . PRIVMSGS_NEW_MAIL . ", " . PRIVMSGS_UNREAD_MAIL . ")";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user id list for outbox messages', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result))
{
$update_users = $update_list = array();
do
{
switch ($row['privmsgs_type'])
{
case PRIVMSGS_NEW_MAIL:
$update_users['new'][$row['privmsgs_to_userid']]++;
break;
 
case PRIVMSGS_UNREAD_MAIL:
$update_users['unread'][$row['privmsgs_to_userid']]++;
break;
}
}
while ($row = $db->sql_fetchrow($result));
 
if (sizeof($update_users))
{
while (list($type, $users) = each($update_users))
{
while (list($user_id, $dec) = each($users))
{
$update_list[$type][$dec][] = $user_id;
}
}
unset($update_users);
 
while (list($type, $dec_ary) = each($update_list))
{
switch ($type)
{
case 'new':
$type = "user_new_privmsg";
break;
 
case 'unread':
$type = "user_unread_privmsg";
break;
}
 
while (list($dec, $user_ary) = each($dec_ary))
{
$user_ids = implode(', ', $user_ary);
 
$sql = "UPDATE " . USERS_TABLE . "
SET $type = $type - $dec
WHERE user_id IN ($user_ids)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update user pm counters', '', __LINE__, __FILE__, $sql);
}
}
}
unset($update_list);
}
}
$db->sql_freeresult($result);
}
 
switch ($folder)
{
case 'inbox':
$saved_sql .= " SET privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . "
WHERE privmsgs_to_userid = " . $userdata['user_id'] . "
AND ( privmsgs_type = " . PRIVMSGS_READ_MAIL . "
OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . ")";
break;
 
case 'outbox':
$saved_sql .= " SET privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . "
WHERE privmsgs_from_userid = " . $userdata['user_id'] . "
AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) ";
break;
 
case 'sentbox':
$saved_sql .= " SET privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . "
WHERE privmsgs_from_userid = " . $userdata['user_id'] . "
AND privmsgs_type = " . PRIVMSGS_SENT_MAIL;
break;
}
 
$saved_sql .= " AND privmsgs_id IN ($saved_sql_id)";
 
if ( !$db->sql_query($saved_sql) )
{
message_die(GENERAL_ERROR, 'Could not save private messages', '', __LINE__, __FILE__, $saved_sql);
}
 
redirect(append_sid("privmsg.$phpEx?folder=savebox", true));
}
}
else if ( $submit || $refresh || $mode != '' )
{
if ( !$userdata['session_logged_in'] )
{
$user_id = ( isset($HTTP_GET_VARS[POST_USERS_URL]) ) ? '&' . POST_USERS_URL . '=' . intval($HTTP_GET_VARS[POST_USERS_URL]) : '';
redirect(append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode" . $user_id, true));
}
//
// Toggles
//
if ( !$board_config['allow_html'] )
{
$html_on = 0;
}
else
{
$html_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_html']) ) ? 0 : TRUE ) : $userdata['user_allowhtml'];
}
 
if ( !$board_config['allow_bbcode'] )
{
$bbcode_on = 0;
}
else
{
$bbcode_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_bbcode']) ) ? 0 : TRUE ) : $userdata['user_allowbbcode'];
}
 
if ( !$board_config['allow_smilies'] )
{
$smilies_on = 0;
}
else
{
$smilies_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_smilies']) ) ? 0 : TRUE ) : $userdata['user_allowsmile'];
}
 
$attach_sig = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['attach_sig']) ) ? TRUE : 0 ) : $userdata['user_attachsig'];
$user_sig = ( $userdata['user_sig'] != '' && $board_config['allow_sig'] ) ? $userdata['user_sig'] : "";
if ( $submit && $mode != 'edit' )
{
//
// Flood control
//
$sql = "SELECT MAX(privmsgs_date) AS last_post_time
FROM " . PRIVMSGS_TABLE . "
WHERE privmsgs_from_userid = " . $userdata['user_id'];
if ( $result = $db->sql_query($sql) )
{
$db_row = $db->sql_fetchrow($result);
 
$last_post_time = $db_row['last_post_time'];
$current_time = time();
 
if ( ( $current_time - $last_post_time ) < $board_config['flood_interval'])
{
message_die(GENERAL_MESSAGE, $lang['Flood_Error']);
}
}
//
// End Flood control
//
}
 
if ($submit && $mode == 'edit')
{
$sql = 'SELECT privmsgs_from_userid
FROM ' . PRIVMSGS_TABLE . '
WHERE privmsgs_id = ' . (int) $privmsg_id . '
AND privmsgs_from_userid = ' . $userdata['user_id'];
 
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, "Could not obtain message details", "", __LINE__, __FILE__, $sql);
}
 
if (!($row = $db->sql_fetchrow($result)))
{
message_die(GENERAL_MESSAGE, $lang['No_such_post']);
}
$db->sql_freeresult($result);
 
unset($row);
}
 
if ( $submit )
{
if ( !empty($HTTP_POST_VARS['username']) )
{
$to_username = phpbb_clean_username($HTTP_POST_VARS['username']);
 
$sql = "SELECT user_id, user_notify_pm, user_email, user_lang, user_active
FROM " . USERS_TABLE . "
WHERE username = '" . str_replace("\'", "''", $to_username) . "'
AND user_id <> " . ANONYMOUS;
if ( !($result = $db->sql_query($sql)) )
{
$error = TRUE;
$error_msg = $lang['No_such_user'];
}
 
if (!($to_userdata = $db->sql_fetchrow($result)))
{
$error = TRUE;
$error_msg = $lang['No_such_user'];
}
}
else
{
$error = TRUE;
$error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['No_to_user'];
}
 
$privmsg_subject = trim(htmlspecialchars($HTTP_POST_VARS['subject']));
if ( empty($privmsg_subject) )
{
$error = TRUE;
$error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['Empty_subject'];
}
 
if ( !empty($HTTP_POST_VARS['message']) )
{
if ( !$error )
{
if ( $bbcode_on )
{
$bbcode_uid = make_bbcode_uid();
}
 
$privmsg_message = prepare_message($HTTP_POST_VARS['message'], $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
 
}
}
else
{
$error = TRUE;
$error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['Empty_message'];
}
}
 
if ( $submit && !$error )
{
//
// Has admin prevented user from sending PM's?
//
if ( !$userdata['user_allow_pm'] )
{
$message = $lang['Cannot_send_privmsg'];
message_die(GENERAL_MESSAGE, $message);
}
 
$msg_time = time();
 
if ( $mode != 'edit' )
{
//
// See if recipient is at their inbox limit
//
$sql = "SELECT COUNT(privmsgs_id) AS inbox_items, MIN(privmsgs_date) AS oldest_post_time
FROM " . PRIVMSGS_TABLE . "
WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
OR privmsgs_type = " . PRIVMSGS_READ_MAIL . "
OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )
AND privmsgs_to_userid = " . $to_userdata['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_MESSAGE, $lang['No_such_user']);
}
 
$sql_priority = ( SQL_LAYER == 'mysql' ) ? 'LOW_PRIORITY' : '';
 
if ( $inbox_info = $db->sql_fetchrow($result) )
{
if ($board_config['max_inbox_privmsgs'] && $inbox_info['inbox_items'] >= $board_config['max_inbox_privmsgs'])
{
$sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . "
WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
OR privmsgs_type = " . PRIVMSGS_READ_MAIL . "
OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )
AND privmsgs_date = " . $inbox_info['oldest_post_time'] . "
AND privmsgs_to_userid = " . $to_userdata['user_id'];
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not find oldest privmsgs (inbox)', '', __LINE__, __FILE__, $sql);
}
$old_privmsgs_id = $db->sql_fetchrow($result);
$old_privmsgs_id = $old_privmsgs_id['privmsgs_id'];
$sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . "
WHERE privmsgs_id = $old_privmsgs_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs (inbox)'.$sql, '', __LINE__, __FILE__, $sql);
}
 
$sql = "DELETE $sql_priority FROM " . PRIVMSGS_TEXT_TABLE . "
WHERE privmsgs_text_id = $old_privmsgs_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs text (inbox)', '', __LINE__, __FILE__, $sql);
}
}
}
 
$sql_info = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig)
VALUES (" . PRIVMSGS_NEW_MAIL . ", '" . str_replace("\'", "''", $privmsg_subject) . "', " . $userdata['user_id'] . ", " . $to_userdata['user_id'] . ", $msg_time, '$user_ip', $html_on, $bbcode_on, $smilies_on, $attach_sig)";
}
else
{
$sql_info = "UPDATE " . PRIVMSGS_TABLE . "
SET privmsgs_type = " . PRIVMSGS_NEW_MAIL . ", privmsgs_subject = '" . str_replace("\'", "''", $privmsg_subject) . "', privmsgs_from_userid = " . $userdata['user_id'] . ", privmsgs_to_userid = " . $to_userdata['user_id'] . ", privmsgs_date = $msg_time, privmsgs_ip = '$user_ip', privmsgs_enable_html = $html_on, privmsgs_enable_bbcode = $bbcode_on, privmsgs_enable_smilies = $smilies_on, privmsgs_attach_sig = $attach_sig
WHERE privmsgs_id = $privmsg_id";
}
 
if ( !($result = $db->sql_query($sql_info, BEGIN_TRANSACTION)) )
{
message_die(GENERAL_ERROR, "Could not insert/update private message sent info.", "", __LINE__, __FILE__, $sql_info);
}
 
if ( $mode != 'edit' )
{
$privmsg_sent_id = $db->sql_nextid();
 
$sql = "INSERT INTO " . PRIVMSGS_TEXT_TABLE . " (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text)
VALUES ($privmsg_sent_id, '" . $bbcode_uid . "', '" . str_replace("\'", "''", $privmsg_message) . "')";
}
else
{
$sql = "UPDATE " . PRIVMSGS_TEXT_TABLE . "
SET privmsgs_text = '" . str_replace("\'", "''", $privmsg_message) . "', privmsgs_bbcode_uid = '$bbcode_uid'
WHERE privmsgs_text_id = $privmsg_id";
}
 
if ( !$db->sql_query($sql, END_TRANSACTION) )
{
message_die(GENERAL_ERROR, "Could not insert/update private message sent text.", "", __LINE__, __FILE__, $sql);
}
 
if ( $mode != 'edit' )
{
//
// Add to the users new pm counter
//
$sql = "UPDATE " . USERS_TABLE . "
SET user_new_privmsg = user_new_privmsg + 1, user_last_privmsg = " . time() . "
WHERE user_id = " . $to_userdata['user_id'];
if ( !$status = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update private message new/read status for user', '', __LINE__, __FILE__, $sql);
}
 
if ( $to_userdata['user_notify_pm'] && !empty($to_userdata['user_email']) && $to_userdata['user_active'] )
{
$script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path']));
$script_name = ( $script_name != '' ) ? $script_name . '/privmsg.'.$phpEx : 'privmsg.'.$phpEx;
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
 
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
 
$emailer->use_template('privmsg_notify', $to_userdata['user_lang']);
$emailer->email_address($to_userdata['user_email']);
$emailer->set_subject($lang['Notification_subject']);
$emailer->assign_vars(array(
'USERNAME' => stripslashes($to_username),
'SITENAME' => $board_config['sitename'],
'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',
 
'U_INBOX' => $server_protocol . $server_name . $server_port . $script_name . '?folder=inbox')
);
 
$emailer->send();
$emailer->reset();
}
}
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("privmsg.$phpEx?folder=inbox") . '">')
);
 
$msg = $lang['Message_sent'] . '<br /><br />' . sprintf($lang['Click_return_inbox'], '<a href="' . append_sid("privmsg.$phpEx?folder=inbox") . '">', '</a> ') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
 
message_die(GENERAL_MESSAGE, $msg);
}
else if ( $preview || $refresh || $error )
{
 
//
// If we're previewing or refreshing then obtain the data
// passed to the script, process it a little, do some checks
// where neccessary, etc.
//
$to_username = (isset($HTTP_POST_VARS['username']) ) ? trim(htmlspecialchars(stripslashes($HTTP_POST_VARS['username']))) : '';
 
$privmsg_subject = ( isset($HTTP_POST_VARS['subject']) ) ? trim(htmlspecialchars(stripslashes($HTTP_POST_VARS['subject']))) : '';
$privmsg_message = ( isset($HTTP_POST_VARS['message']) ) ? trim($HTTP_POST_VARS['message']) : '';
$privmsg_message = preg_replace('#<textarea>#si', '&lt;textarea&gt;', $privmsg_message);
if ( !$preview )
{
$privmsg_message = stripslashes($privmsg_message);
}
 
//
// Do mode specific things
//
if ( $mode == 'post' )
{
$page_title = $lang['Post_new_pm'];
 
$user_sig = ( $userdata['user_sig'] != '' && $board_config['allow_sig'] ) ? $userdata['user_sig'] : '';
 
}
else if ( $mode == 'reply' )
{
$page_title = $lang['Post_reply_pm'];
 
$user_sig = ( $userdata['user_sig'] != '' && $board_config['allow_sig'] ) ? $userdata['user_sig'] : '';
 
}
else if ( $mode == 'edit' )
{
$page_title = $lang['Edit_pm'];
 
$sql = "SELECT u.user_id, u.user_sig
FROM " . PRIVMSGS_TABLE . " pm, " . USERS_TABLE . " u
WHERE pm.privmsgs_id = $privmsg_id
AND u.user_id = pm.privmsgs_from_userid";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain post and post text", "", __LINE__, __FILE__, $sql);
}
 
if ( $postrow = $db->sql_fetchrow($result) )
{
if ( $userdata['user_id'] != $postrow['user_id'] )
{
message_die(GENERAL_MESSAGE, $lang['Edit_own_posts']);
}
 
$user_sig = ( $postrow['user_sig'] != '' && $board_config['allow_sig'] ) ? $postrow['user_sig'] : '';
}
}
}
else
{
if ( !$privmsg_id && ( $mode == 'reply' || $mode == 'edit' || $mode == 'quote' ) )
{
message_die(GENERAL_ERROR, $lang['No_post_id']);
}
 
if ( !empty($HTTP_GET_VARS[POST_USERS_URL]) )
{
$user_id = intval($HTTP_GET_VARS[POST_USERS_URL]);
 
$sql = "SELECT username
FROM " . USERS_TABLE . "
WHERE user_id = $user_id
AND user_id <> " . ANONYMOUS;
if ( !($result = $db->sql_query($sql)) )
{
$error = TRUE;
$error_msg = $lang['No_such_user'];
}
 
if ( $row = $db->sql_fetchrow($result) )
{
$to_username = $row['username'];
}
}
else if ( $mode == 'edit' )
{
$sql = "SELECT pm.*, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text, u.username, u.user_id, u.user_sig
FROM " . PRIVMSGS_TABLE . " pm, " . PRIVMSGS_TEXT_TABLE . " pmt, " . USERS_TABLE . " u
WHERE pm.privmsgs_id = $privmsg_id
AND pmt.privmsgs_text_id = pm.privmsgs_id
AND pm.privmsgs_from_userid = " . $userdata['user_id'] . "
AND ( pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
OR pm.privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )
AND u.user_id = pm.privmsgs_to_userid";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain private message for editing', '', __LINE__, __FILE__, $sql);
}
 
if ( !($privmsg = $db->sql_fetchrow($result)) )
{
redirect(append_sid("privmsg.$phpEx?folder=$folder", true));
}
 
$privmsg_subject = $privmsg['privmsgs_subject'];
$privmsg_message = $privmsg['privmsgs_text'];
$privmsg_bbcode_uid = $privmsg['privmsgs_bbcode_uid'];
$privmsg_bbcode_enabled = ($privmsg['privmsgs_enable_bbcode'] == 1);
 
if ( $privmsg_bbcode_enabled )
{
$privmsg_message = preg_replace("/\:(([a-z0-9]:)?)$privmsg_bbcode_uid/si", '', $privmsg_message);
}
$privmsg_message = str_replace('<br />', "\n", $privmsg_message);
$privmsg_message = preg_replace('#</textarea>#si', '&lt;/textarea&gt;', $privmsg_message);
 
$user_sig = ( $board_config['allow_sig'] ) ? (($privmsg['privmsgs_type'] == PRIVMSGS_NEW_MAIL) ? $user_sig : $privmsg['user_sig']) : '';
 
$to_username = $privmsg['username'];
$to_userid = $privmsg['user_id'];
 
}
else if ( $mode == 'reply' || $mode == 'quote' )
{
 
$sql = "SELECT pm.privmsgs_subject, pm.privmsgs_date, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text, u.username, u.user_id
FROM " . PRIVMSGS_TABLE . " pm, " . PRIVMSGS_TEXT_TABLE . " pmt, " . USERS_TABLE . " u
WHERE pm.privmsgs_id = $privmsg_id
AND pmt.privmsgs_text_id = pm.privmsgs_id
AND pm.privmsgs_to_userid = " . $userdata['user_id'] . "
AND u.user_id = pm.privmsgs_from_userid";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain private message for editing', '', __LINE__, __FILE__, $sql);
}
 
if ( !($privmsg = $db->sql_fetchrow($result)) )
{
redirect(append_sid("privmsg.$phpEx?folder=$folder", true));
}
 
$orig_word = $replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
 
$privmsg_subject = ( ( !preg_match('/^Re:/', $privmsg['privmsgs_subject']) ) ? 'Re: ' : '' ) . $privmsg['privmsgs_subject'];
$privmsg_subject = preg_replace($orig_word, $replacement_word, $privmsg_subject);
 
$to_username = $privmsg['username'];
$to_userid = $privmsg['user_id'];
 
if ( $mode == 'quote' )
{
$privmsg_message = $privmsg['privmsgs_text'];
$privmsg_bbcode_uid = $privmsg['privmsgs_bbcode_uid'];
 
$privmsg_message = preg_replace("/\:(([a-z0-9]:)?)$privmsg_bbcode_uid/si", '', $privmsg_message);
$privmsg_message = str_replace('<br />', "\n", $privmsg_message);
$privmsg_message = preg_replace('#</textarea>#si', '&lt;/textarea&gt;', $privmsg_message);
$privmsg_message = preg_replace($orig_word, $replacement_word, $privmsg_message);
$msg_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['board_timezone']);
 
$privmsg_message = '[quote="' . $to_username . '"]' . $privmsg_message . '[/quote]';
 
$mode = 'reply';
}
}
else
{
$privmsg_subject = $privmsg_message = $to_username = '';
}
}
 
//
// Has admin prevented user from sending PM's?
//
if ( !$userdata['user_allow_pm'] && $mode != 'edit' )
{
$message = $lang['Cannot_send_privmsg'];
message_die(GENERAL_MESSAGE, $message);
}
 
//
// Start output, first preview, then errors then post form
//
$page_title = $lang['Send_private_message'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
if ( $preview && !$error )
{
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
 
if ( $bbcode_on )
{
$bbcode_uid = make_bbcode_uid();
}
 
$preview_message = stripslashes(prepare_message($privmsg_message, $html_on, $bbcode_on, $smilies_on, $bbcode_uid));
$privmsg_message = stripslashes(preg_replace($html_entities_match, $html_entities_replace, $privmsg_message));
 
//
// Finalise processing as per viewtopic
//
if ( !$html_on || !$board_config['allow_html'] || !$userdata['user_allowhtml'] )
{
if ( $user_sig != '' )
{
$user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "&lt;\\2&gt;", $user_sig);
}
}
 
if ( $attach_sig && $user_sig != '' && $userdata['user_sig_bbcode_uid'] )
{
$user_sig = bbencode_second_pass($user_sig, $userdata['user_sig_bbcode_uid']);
}
 
if ( $bbcode_on )
{
$preview_message = bbencode_second_pass($preview_message, $bbcode_uid);
}
 
if ( $attach_sig && $user_sig != '' )
{
$preview_message = $preview_message . '<br /><br />_________________<br />' . $user_sig;
}
if ( count($orig_word) )
{
$preview_subject = preg_replace($orig_word, $replacement_word, $privmsg_subject);
$preview_message = preg_replace($orig_word, $replacement_word, $preview_message);
}
else
{
$preview_subject = $privmsg_subject;
}
 
if ( $smilies_on )
{
$preview_message = smilies_pass($preview_message);
}
 
$preview_message = make_clickable($preview_message);
$preview_message = str_replace("\n", '<br />', $preview_message);
 
$s_hidden_fields = '<input type="hidden" name="folder" value="' . $folder . '" />';
$s_hidden_fields .= '<input type="hidden" name="mode" value="' . $mode . '" />';
 
if ( isset($privmsg_id) )
{
$s_hidden_fields .= '<input type="hidden" name="' . POST_POST_URL . '" value="' . $privmsg_id . '" />';
}
 
$template->set_filenames(array(
"preview" => 'privmsgs_preview.tpl')
);
 
$template->assign_vars(array(
'TOPIC_TITLE' => $preview_subject,
'POST_SUBJECT' => $preview_subject,
'MESSAGE_TO' => $to_username,
'MESSAGE_FROM' => $userdata['username'],
'POST_DATE' => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']),
'MESSAGE' => $preview_message,
 
'S_HIDDEN_FIELDS' => $s_hidden_fields,
 
'L_SUBJECT' => $lang['Subject'],
'L_DATE' => $lang['Date'],
'L_FROM' => $lang['From'],
'L_TO' => $lang['To'],
'L_PREVIEW' => $lang['Preview'],
'L_POSTED' => $lang['Posted'])
);
 
$template->assign_var_from_handle('POST_PREVIEW_BOX', 'preview');
}
 
//
// Start error handling
//
if ($error)
{
$template->set_filenames(array(
'reg_header' => 'error_body.tpl')
);
$template->assign_vars(array(
'ERROR_MESSAGE' => $error_msg)
);
$template->assign_var_from_handle('ERROR_BOX', 'reg_header');
}
 
//
// Load templates
//
$template->set_filenames(array(
'body' => 'posting_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
 
//
// Enable extensions in posting_body
//
$template->assign_block_vars('switch_privmsg', array());
 
//
// HTML toggle selection
//
if ( $board_config['allow_html'] )
{
$html_status = $lang['HTML_is_ON'];
$template->assign_block_vars('switch_html_checkbox', array());
}
else
{
$html_status = $lang['HTML_is_OFF'];
}
 
//
// BBCode toggle selection
//
if ( $board_config['allow_bbcode'] )
{
$bbcode_status = $lang['BBCode_is_ON'];
$template->assign_block_vars('switch_bbcode_checkbox', array());
}
else
{
$bbcode_status = $lang['BBCode_is_OFF'];
}
 
//
// Smilies toggle selection
//
if ( $board_config['allow_smilies'] )
{
$smilies_status = $lang['Smilies_are_ON'];
$template->assign_block_vars('switch_smilies_checkbox', array());
}
else
{
$smilies_status = $lang['Smilies_are_OFF'];
}
 
//
// Signature toggle selection - only show if
// the user has a signature
//
if ( $user_sig != '' )
{
$template->assign_block_vars('switch_signature_checkbox', array());
}
 
if ( $mode == 'post' )
{
$post_a = $lang['Send_a_new_message'];
}
else if ( $mode == 'reply' )
{
$post_a = $lang['Send_a_reply'];
$mode = 'post';
}
else if ( $mode == 'edit' )
{
$post_a = $lang['Edit_message'];
}
 
$s_hidden_fields = '<input type="hidden" name="folder" value="' . $folder . '" />';
$s_hidden_fields .= '<input type="hidden" name="mode" value="' . $mode . '" />';
if ( $mode == 'edit' )
{
$s_hidden_fields .= '<input type="hidden" name="' . POST_POST_URL . '" value="' . $privmsg_id . '" />';
}
 
//
// Send smilies to template
//
generate_smilies('inline', PAGE_PRIVMSGS);
 
$template->assign_vars(array(
'SUBJECT' => $privmsg_subject,
'USERNAME' => $to_username,
'MESSAGE' => $privmsg_message,
'HTML_STATUS' => $html_status,
'SMILIES_STATUS' => $smilies_status,
'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="' . append_sid("faq.$phpEx?mode=bbcode") . '" target="_phpbbcode">', '</a>'),
'FORUM_NAME' => $lang['Private_Message'],
 
'BOX_NAME' => $l_box_name,
'INBOX_IMG' => $inbox_img,
'SENTBOX_IMG' => $sentbox_img,
'OUTBOX_IMG' => $outbox_img,
'SAVEBOX_IMG' => $savebox_img,
'INBOX' => $inbox_url,
'SENTBOX' => $sentbox_url,
'OUTBOX' => $outbox_url,
'SAVEBOX' => $savebox_url,
 
'L_SUBJECT' => $lang['Subject'],
'L_MESSAGE_BODY' => $lang['Message_body'],
'L_OPTIONS' => $lang['Options'],
'L_SPELLCHECK' => $lang['Spellcheck'],
'L_PREVIEW' => $lang['Preview'],
'L_SUBMIT' => $lang['Submit'],
'L_CANCEL' => $lang['Cancel'],
'L_POST_A' => $post_a,
'L_FIND_USERNAME' => $lang['Find_username'],
'L_FIND' => $lang['Find'],
'L_DISABLE_HTML' => $lang['Disable_HTML_pm'],
'L_DISABLE_BBCODE' => $lang['Disable_BBCode_pm'],
'L_DISABLE_SMILIES' => $lang['Disable_Smilies_pm'],
'L_ATTACH_SIGNATURE' => $lang['Attach_signature'],
 
'L_BBCODE_B_HELP' => $lang['bbcode_b_help'],
'L_BBCODE_I_HELP' => $lang['bbcode_i_help'],
'L_BBCODE_U_HELP' => $lang['bbcode_u_help'],
'L_BBCODE_Q_HELP' => $lang['bbcode_q_help'],
'L_BBCODE_C_HELP' => $lang['bbcode_c_help'],
'L_BBCODE_L_HELP' => $lang['bbcode_l_help'],
'L_BBCODE_O_HELP' => $lang['bbcode_o_help'],
'L_BBCODE_P_HELP' => $lang['bbcode_p_help'],
'L_BBCODE_W_HELP' => $lang['bbcode_w_help'],
'L_BBCODE_A_HELP' => $lang['bbcode_a_help'],
'L_BBCODE_S_HELP' => $lang['bbcode_s_help'],
'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
'L_EMPTY_MESSAGE' => $lang['Empty_message'],
 
'L_FONT_COLOR' => $lang['Font_color'],
'L_COLOR_DEFAULT' => $lang['color_default'],
'L_COLOR_DARK_RED' => $lang['color_dark_red'],
'L_COLOR_RED' => $lang['color_red'],
'L_COLOR_ORANGE' => $lang['color_orange'],
'L_COLOR_BROWN' => $lang['color_brown'],
'L_COLOR_YELLOW' => $lang['color_yellow'],
'L_COLOR_GREEN' => $lang['color_green'],
'L_COLOR_OLIVE' => $lang['color_olive'],
'L_COLOR_CYAN' => $lang['color_cyan'],
'L_COLOR_BLUE' => $lang['color_blue'],
'L_COLOR_DARK_BLUE' => $lang['color_dark_blue'],
'L_COLOR_INDIGO' => $lang['color_indigo'],
'L_COLOR_VIOLET' => $lang['color_violet'],
'L_COLOR_WHITE' => $lang['color_white'],
'L_COLOR_BLACK' => $lang['color_black'],
 
'L_FONT_SIZE' => $lang['Font_size'],
'L_FONT_TINY' => $lang['font_tiny'],
'L_FONT_SMALL' => $lang['font_small'],
'L_FONT_NORMAL' => $lang['font_normal'],
'L_FONT_LARGE' => $lang['font_large'],
'L_FONT_HUGE' => $lang['font_huge'],
 
'L_BBCODE_CLOSE_TAGS' => $lang['Close_Tags'],
'L_STYLES_TIP' => $lang['Styles_tip'],
 
'S_HTML_CHECKED' => ( !$html_on ) ? ' checked="checked"' : '',
'S_BBCODE_CHECKED' => ( !$bbcode_on ) ? ' checked="checked"' : '',
'S_SMILIES_CHECKED' => ( !$smilies_on ) ? ' checked="checked"' : '',
'S_SIGNATURE_CHECKED' => ( $attach_sig ) ? ' checked="checked"' : '',
'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields,
'S_POST_ACTION' => append_sid("privmsg.$phpEx"),
'U_SEARCH_USER' => append_sid("search.$phpEx?mode=searchuser"),
'U_VIEW_FORUM' => append_sid("privmsg.$phpEx"))
);
 
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
 
//
// Default page
//
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true));
}
 
//
// Update unread status
//
$sql = "UPDATE " . USERS_TABLE . "
SET user_unread_privmsg = user_unread_privmsg + user_new_privmsg, user_new_privmsg = 0, user_last_privmsg = " . $userdata['session_start'] . "
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update private message new/read status for user', '', __LINE__, __FILE__, $sql);
}
 
$sql = "UPDATE " . PRIVMSGS_TABLE . "
SET privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . "
WHERE privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
AND privmsgs_to_userid = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update private message new/read status (2) for user', '', __LINE__, __FILE__, $sql);
}
 
//
// Reset PM counters
//
$userdata['user_new_privmsg'] = 0;
$userdata['user_unread_privmsg'] = ( $userdata['user_new_privmsg'] + $userdata['user_unread_privmsg'] );
 
//
// Generate page
//
$page_title = $lang['Private_Messaging'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
//
// Load templates
//
$template->set_filenames(array(
'body' => 'privmsgs_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
 
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
 
//
// New message
//
$post_new_mesg_url = '<a href="' . append_sid("privmsg.$phpEx?mode=post") . '"><img src="' . $images['post_new'] . '" alt="' . $lang['Send_a_new_message'] . '" border="0" /></a>';
 
//
// General SQL to obtain messages
//
$sql_tot = "SELECT COUNT(privmsgs_id) AS total
FROM " . PRIVMSGS_TABLE . " ";
$sql = "SELECT pm.privmsgs_type, pm.privmsgs_id, pm.privmsgs_date, pm.privmsgs_subject, u.user_id, u.username
FROM " . PRIVMSGS_TABLE . " pm, " . USERS_TABLE . " u ";
switch( $folder )
{
case 'inbox':
$sql_tot .= "WHERE privmsgs_to_userid = " . $userdata['user_id'] . "
AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
OR privmsgs_type = " . PRIVMSGS_READ_MAIL . "
OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
 
$sql .= "WHERE pm.privmsgs_to_userid = " . $userdata['user_id'] . "
AND u.user_id = pm.privmsgs_from_userid
AND ( pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
OR pm.privmsgs_type = " . PRIVMSGS_READ_MAIL . "
OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
break;
 
case 'outbox':
$sql_tot .= "WHERE privmsgs_from_userid = " . $userdata['user_id'] . "
AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
 
$sql .= "WHERE pm.privmsgs_from_userid = " . $userdata['user_id'] . "
AND u.user_id = pm.privmsgs_to_userid
AND ( pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
break;
 
case 'sentbox':
$sql_tot .= "WHERE privmsgs_from_userid = " . $userdata['user_id'] . "
AND privmsgs_type = " . PRIVMSGS_SENT_MAIL;
 
$sql .= "WHERE pm.privmsgs_from_userid = " . $userdata['user_id'] . "
AND u.user_id = pm.privmsgs_to_userid
AND pm.privmsgs_type = " . PRIVMSGS_SENT_MAIL;
break;
 
case 'savebox':
$sql_tot .= "WHERE ( ( privmsgs_to_userid = " . $userdata['user_id'] . "
AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " )
OR ( privmsgs_from_userid = " . $userdata['user_id'] . "
AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . ") )";
 
$sql .= "WHERE u.user_id = pm.privmsgs_from_userid
AND ( ( pm.privmsgs_to_userid = " . $userdata['user_id'] . "
AND pm.privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " )
OR ( pm.privmsgs_from_userid = " . $userdata['user_id'] . "
AND pm.privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " ) )";
break;
 
default:
message_die(GENERAL_MESSAGE, $lang['No_such_folder']);
break;
}
 
//
// Show messages over previous x days/months
//
if ( $submit_msgdays && ( !empty($HTTP_POST_VARS['msgdays']) || !empty($HTTP_GET_VARS['msgdays']) ) )
{
$msg_days = ( !empty($HTTP_POST_VARS['msgdays']) ) ? intval($HTTP_POST_VARS['msgdays']) : intval($HTTP_GET_VARS['msgdays']);
$min_msg_time = time() - ($msg_days * 86400);
 
$limit_msg_time_total = " AND privmsgs_date > $min_msg_time";
$limit_msg_time = " AND pm.privmsgs_date > $min_msg_time ";
 
if ( !empty($HTTP_POST_VARS['msgdays']) )
{
$start = 0;
}
}
else
{
$limit_msg_time = $limit_msg_time_total = '';
$msg_days = 0;
}
 
$sql .= $limit_msg_time . " ORDER BY pm.privmsgs_date DESC LIMIT $start, " . $board_config['topics_per_page'];
$sql_all_tot = $sql_tot;
$sql_tot .= $limit_msg_time_total;
 
//
// Get messages
//
if ( !($result = $db->sql_query($sql_tot)) )
{
message_die(GENERAL_ERROR, 'Could not query private message information', '', __LINE__, __FILE__, $sql_tot);
}
 
$pm_total = ( $row = $db->sql_fetchrow($result) ) ? $row['total'] : 0;
 
if ( !($result = $db->sql_query($sql_all_tot)) )
{
message_die(GENERAL_ERROR, 'Could not query private message information', '', __LINE__, __FILE__, $sql_tot);
}
 
$pm_all_total = ( $row = $db->sql_fetchrow($result) ) ? $row['total'] : 0;
 
//
// Build select box
//
$previous_days = array(0, 1, 7, 14, 30, 90, 180, 364);
$previous_days_text = array($lang['All_Posts'], $lang['1_Day'], $lang['7_Days'], $lang['2_Weeks'], $lang['1_Month'], $lang['3_Months'], $lang['6_Months'], $lang['1_Year']);
 
$select_msg_days = '';
for($i = 0; $i < count($previous_days); $i++)
{
$selected = ( $msg_days == $previous_days[$i] ) ? ' selected="selected"' : '';
$select_msg_days .= '<option value="' . $previous_days[$i] . '"' . $selected . '>' . $previous_days_text[$i] . '</option>';
}
 
//
// Define correct icons
//
switch ( $folder )
{
case 'inbox':
$l_box_name = $lang['Inbox'];
break;
case 'outbox':
$l_box_name = $lang['Outbox'];
break;
case 'savebox':
$l_box_name = $lang['Savebox'];
break;
case 'sentbox':
$l_box_name = $lang['Sentbox'];
break;
}
$post_pm = append_sid("privmsg.$phpEx?mode=post");
$post_pm_img = '<a href="' . $post_pm . '"><img src="' . $images['pm_postmsg'] . '" alt="' . $lang['Post_new_pm'] . '" border="0" /></a>';
$post_pm = '<a href="' . $post_pm . '">' . $lang['Post_new_pm'] . '</a>';
 
//
// Output data for inbox status
//
if ( $folder != 'outbox' )
{
$inbox_limit_pct = ( $board_config['max_' . $folder . '_privmsgs'] > 0 ) ? round(( $pm_all_total / $board_config['max_' . $folder . '_privmsgs'] ) * 100) : 100;
$inbox_limit_img_length = ( $board_config['max_' . $folder . '_privmsgs'] > 0 ) ? round(( $pm_all_total / $board_config['max_' . $folder . '_privmsgs'] ) * $board_config['privmsg_graphic_length']) : $board_config['privmsg_graphic_length'];
$inbox_limit_remain = ( $board_config['max_' . $folder . '_privmsgs'] > 0 ) ? $board_config['max_' . $folder . '_privmsgs'] - $pm_all_total : 0;
 
$template->assign_block_vars('switch_box_size_notice', array());
 
switch( $folder )
{
case 'inbox':
$l_box_size_status = sprintf($lang['Inbox_size'], $inbox_limit_pct);
break;
case 'sentbox':
$l_box_size_status = sprintf($lang['Sentbox_size'], $inbox_limit_pct);
break;
case 'savebox':
$l_box_size_status = sprintf($lang['Savebox_size'], $inbox_limit_pct);
break;
default:
$l_box_size_status = '';
break;
}
}
else
{
$inbox_limit_img_length = $inbox_limit_pct = $l_box_size_status = '';
}
 
//
// Dump vars to template
//
$template->assign_vars(array(
'BOX_NAME' => $l_box_name,
'INBOX_IMG' => $inbox_img,
'SENTBOX_IMG' => $sentbox_img,
'OUTBOX_IMG' => $outbox_img,
'SAVEBOX_IMG' => $savebox_img,
'INBOX' => $inbox_url,
'SENTBOX' => $sentbox_url,
'OUTBOX' => $outbox_url,
'SAVEBOX' => $savebox_url,
 
'POST_PM_IMG' => $post_pm_img,
'POST_PM' => $post_pm,
 
'INBOX_LIMIT_IMG_WIDTH' => $inbox_limit_img_length,
'INBOX_LIMIT_PERCENT' => $inbox_limit_pct,
 
'BOX_SIZE_STATUS' => $l_box_size_status,
 
'L_INBOX' => $lang['Inbox'],
'L_OUTBOX' => $lang['Outbox'],
'L_SENTBOX' => $lang['Sent'],
'L_SAVEBOX' => $lang['Saved'],
'L_MARK' => $lang['Mark'],
'L_FLAG' => $lang['Flag'],
'L_SUBJECT' => $lang['Subject'],
'L_DATE' => $lang['Date'],
'L_DISPLAY_MESSAGES' => $lang['Display_messages'],
'L_FROM_OR_TO' => ( $folder == 'inbox' || $folder == 'savebox' ) ? $lang['From'] : $lang['To'],
'L_MARK_ALL' => $lang['Mark_all'],
'L_UNMARK_ALL' => $lang['Unmark_all'],
'L_DELETE_MARKED' => $lang['Delete_marked'],
'L_DELETE_ALL' => $lang['Delete_all'],
'L_SAVE_MARKED' => $lang['Save_marked'],
 
'S_PRIVMSGS_ACTION' => append_sid("privmsg.$phpEx?folder=$folder"),
'S_HIDDEN_FIELDS' => '',
'S_POST_NEW_MSG' => $post_new_mesg_url,
'S_SELECT_MSG_DAYS' => $select_msg_days,
 
'U_POST_NEW_TOPIC' => append_sid("privmsg.$phpEx?mode=post"))
);
 
//
// Okay, let's build the correct folder
//
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query private messages', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
$i = 0;
do
{
$privmsg_id = $row['privmsgs_id'];
 
$flag = $row['privmsgs_type'];
 
$icon_flag = ( $flag == PRIVMSGS_NEW_MAIL || $flag == PRIVMSGS_UNREAD_MAIL ) ? $images['pm_unreadmsg'] : $images['pm_readmsg'];
$icon_flag_alt = ( $flag == PRIVMSGS_NEW_MAIL || $flag == PRIVMSGS_UNREAD_MAIL ) ? $lang['Unread_message'] : $lang['Read_message'];
 
$msg_userid = $row['user_id'];
$msg_username = $row['username'];
 
$u_from_user_profile = append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$msg_userid");
 
$msg_subject = $row['privmsgs_subject'];
 
if ( count($orig_word) )
{
$msg_subject = preg_replace($orig_word, $replacement_word, $msg_subject);
}
$u_subject = append_sid("privmsg.$phpEx?folder=$folder&amp;mode=read&amp;" . POST_POST_URL . "=$privmsg_id");
 
$msg_date = create_date($board_config['default_dateformat'], $row['privmsgs_date'], $board_config['board_timezone']);
 
if ( $flag == PRIVMSGS_NEW_MAIL && $folder == 'inbox' )
{
$msg_subject = '<b>' . $msg_subject . '</b>';
$msg_date = '<b>' . $msg_date . '</b>';
$msg_username = '<b>' . $msg_username . '</b>';
}
 
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$i++;
 
$template->assign_block_vars('listrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FROM' => $msg_username,
'SUBJECT' => $msg_subject,
'DATE' => $msg_date,
'PRIVMSG_FOLDER_IMG' => $icon_flag,
 
'L_PRIVMSG_FOLDER_ALT' => $icon_flag_alt,
 
'S_MARK_ID' => $privmsg_id,
 
'U_READ' => $u_subject,
'U_FROM_USER_PROFILE' => $u_from_user_profile)
);
}
while( $row = $db->sql_fetchrow($result) );
 
$template->assign_vars(array(
'PAGINATION' => generate_pagination("privmsg.$phpEx?folder=$folder", $pm_total, $board_config['topics_per_page'], $start),
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $pm_total / $board_config['topics_per_page'] )),
 
'L_GOTO_PAGE' => $lang['Goto_page'])
);
 
}
else
{
$template->assign_vars(array(
'L_NO_MESSAGES' => $lang['No_messages_folder'])
);
 
$template->assign_block_vars("switch_no_messages", array() );
}
 
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
?>
/Forum/profile.php
0,0 → 1,124
<?php
/***************************************************************************
* profile.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: profile.php,v 1.193.2.7 2006/04/09 16:17:27 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
 
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_PROFILE);
init_userprefs($userdata);
//
// End session management
//
 
// session id check
if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid']))
{
$sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid'];
}
else
{
$sid = '';
}
 
//
// Set default email variables
//
$script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
$script_name = ( $script_name != '' ) ? $script_name . '/profile.'.$phpEx : 'profile.'.$phpEx;
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
 
$server_url = $server_protocol . $server_name . $server_port . $script_name;
 
// -----------------------
// Page specific functions
//
function gen_rand_string($hash)
{
$rand_str = dss_rand();
 
return ( $hash ) ? md5($rand_str) : substr($rand_str, 0, 8);
}
//
// End page specific functions
// ---------------------------
 
//
// Start of program proper
//
if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
$mode = htmlspecialchars($mode);
 
if ( $mode == 'viewprofile' )
{
include($phpbb_root_path . 'includes/usercp_viewprofile.'.$phpEx);
exit;
}
else if ( $mode == 'editprofile' || $mode == 'register' )
{
if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
{
redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
}
 
include($phpbb_root_path . 'includes/usercp_register.'.$phpEx);
exit;
}
else if ( $mode == 'confirm' )
{
// Visual Confirmation
if ( $userdata['session_logged_in'] )
{
exit;
}
 
include($phpbb_root_path . 'includes/usercp_confirm.'.$phpEx);
exit;
}
else if ( $mode == 'sendpassword' )
{
include($phpbb_root_path . 'includes/usercp_sendpasswd.'.$phpEx);
exit;
}
else if ( $mode == 'activate' )
{
include($phpbb_root_path . 'includes/usercp_activate.'.$phpEx);
exit;
}
else if ( $mode == 'email' )
{
include($phpbb_root_path . 'includes/usercp_email.'.$phpEx);
exit;
}
}
 
redirect(append_sid("index.$phpEx", true));
 
?>
/Forum/search.php
0,0 → 1,1433
<?php
/***************************************************************************
* search.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: search.php,v 1.72.2.20 2006/05/20 14:01:48 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
 
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_SEARCH);
init_userprefs($userdata);
//
// End session management
//
 
//
// Define initial vars
//
if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
}
else
{
$mode = '';
}
 
if ( isset($HTTP_POST_VARS['search_keywords']) || isset($HTTP_GET_VARS['search_keywords']) )
{
$search_keywords = ( isset($HTTP_POST_VARS['search_keywords']) ) ? $HTTP_POST_VARS['search_keywords'] : $HTTP_GET_VARS['search_keywords'];
}
else
{
$search_keywords = '';
}
 
if ( isset($HTTP_POST_VARS['search_author']) || isset($HTTP_GET_VARS['search_author']))
{
$search_author = ( isset($HTTP_POST_VARS['search_author']) ) ? $HTTP_POST_VARS['search_author'] : $HTTP_GET_VARS['search_author'];
$search_author = phpbb_clean_username($search_author);
}
else
{
$search_author = '';
}
 
$search_id = ( isset($HTTP_GET_VARS['search_id']) ) ? $HTTP_GET_VARS['search_id'] : '';
 
$show_results = ( isset($HTTP_POST_VARS['show_results']) ) ? $HTTP_POST_VARS['show_results'] : 'posts';
$show_results = ($show_results == 'topics') ? 'topics' : 'posts';
 
if ( isset($HTTP_POST_VARS['search_terms']) )
{
$search_terms = ( $HTTP_POST_VARS['search_terms'] == 'all' ) ? 1 : 0;
}
else
{
$search_terms = 0;
}
 
if ( isset($HTTP_POST_VARS['search_fields']) )
{
$search_fields = ( $HTTP_POST_VARS['search_fields'] == 'all' ) ? 1 : 0;
}
else
{
$search_fields = 0;
}
 
$return_chars = ( isset($HTTP_POST_VARS['return_chars']) ) ? intval($HTTP_POST_VARS['return_chars']) : 200;
 
$search_cat = ( isset($HTTP_POST_VARS['search_cat']) ) ? intval($HTTP_POST_VARS['search_cat']) : -1;
$search_forum = ( isset($HTTP_POST_VARS['search_forum']) ) ? intval($HTTP_POST_VARS['search_forum']) : -1;
 
$sort_by = ( isset($HTTP_POST_VARS['sort_by']) ) ? intval($HTTP_POST_VARS['sort_by']) : 0;
 
if ( isset($HTTP_POST_VARS['sort_dir']) )
{
$sort_dir = ( $HTTP_POST_VARS['sort_dir'] == 'DESC' ) ? 'DESC' : 'ASC';
}
else
{
$sort_dir = 'DESC';
}
 
if ( !empty($HTTP_POST_VARS['search_time']) || !empty($HTTP_GET_VARS['search_time']))
{
$search_time = time() - ( ( ( !empty($HTTP_POST_VARS['search_time']) ) ? intval($HTTP_POST_VARS['search_time']) : intval($HTTP_GET_VARS['search_time']) ) * 86400 );
$topic_days = (!empty($HTTP_POST_VARS['search_time'])) ? intval($HTTP_POST_VARS['search_time']) : intval($HTTP_GET_VARS['search_time']);
}
else
{
$search_time = 0;
$topic_days = 0;
}
 
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
 
$sort_by_types = array($lang['Sort_Time'], $lang['Sort_Post_Subject'], $lang['Sort_Topic_Title'], $lang['Sort_Author'], $lang['Sort_Forum']);
 
//
// encoding match for workaround
//
$multibyte_charset = 'utf-8, big5, shift_jis, euc-kr, gb2312';
 
//
// Begin core code
//
if ( $mode == 'searchuser' )
{
//
// This handles the simple windowed user search functions called from various other scripts
//
if ( isset($HTTP_POST_VARS['search_username']) )
{
username_search($HTTP_POST_VARS['search_username']);
}
else
{
username_search('');
}
 
exit;
}
else if ( $search_keywords != '' || $search_author != '' || $search_id )
{
$store_vars = array('search_results', 'total_match_count', 'split_search', 'sort_by', 'sort_dir', 'show_results', 'return_chars');
$search_results = '';
 
//
// Search ID Limiter, decrease this value if you experience further timeout problems with searching forums
$limiter = 5000;
$current_time = time();
 
//
// Cycle through options ...
//
if ( $search_id == 'newposts' || $search_id == 'egosearch' || $search_id == 'unanswered' || $search_keywords != '' || $search_author != '' )
{
//
// Flood control
//
$where_sql = ($userdata['user_id'] == ANONYMOUS) ? "se.session_ip = '$user_ip'" : 'se.session_user_id = ' . $userdata['user_id'];
$sql = 'SELECT MAX(sr.search_time) AS last_search_time
FROM ' . SEARCH_TABLE . ' sr, ' . SESSIONS_TABLE . " se
WHERE sr.session_id = se.session_id
AND $where_sql";
if ($result = $db->sql_query($sql))
{
if ($row = $db->sql_fetchrow($result))
{
if (intval($row['last_search_time']) > 0 && ($current_time - intval($row['last_search_time'])) < intval($board_config['search_flood_interval']))
{
message_die(GENERAL_MESSAGE, $lang['Search_Flood_Error']);
}
}
}
if ( $search_id == 'newposts' || $search_id == 'egosearch' || ( $search_author != '' && $search_keywords == '' ) )
{
if ( $search_id == 'newposts' )
{
if ( $userdata['session_logged_in'] )
{
$sql = "SELECT post_id
FROM " . POSTS_TABLE . "
WHERE post_time >= " . $userdata['user_lastvisit'];
}
else
{
redirect(append_sid("login.$phpEx?redirect=search.$phpEx&search_id=newposts", true));
}
 
$show_results = 'topics';
$sort_by = 0;
$sort_dir = 'DESC';
}
else if ( $search_id == 'egosearch' )
{
if ( $userdata['session_logged_in'] )
{
$sql = "SELECT post_id
FROM " . POSTS_TABLE . "
WHERE poster_id = " . $userdata['user_id'];
}
else
{
redirect(append_sid("login.$phpEx?redirect=search.$phpEx&search_id=egosearch", true));
}
 
$show_results = 'topics';
$sort_by = 0;
$sort_dir = 'DESC';
}
else
{
$search_author = str_replace('*', '%', trim($search_author));
 
if( ( strpos($search_author, '%') !== false ) && ( strlen(str_replace('%', '', $search_author)) < $board_config['search_min_chars'] ) )
{
$search_author = '';
}
 
$sql = "SELECT user_id
FROM " . USERS_TABLE . "
WHERE username LIKE '" . str_replace("\'", "''", $search_author) . "'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain list of matching users (searching for: $search_author)", "", __LINE__, __FILE__, $sql);
}
 
$matching_userids = '';
if ( $row = $db->sql_fetchrow($result) )
{
do
{
$matching_userids .= ( ( $matching_userids != '' ) ? ', ' : '' ) . $row['user_id'];
}
while( $row = $db->sql_fetchrow($result) );
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_search_match']);
}
 
$sql = "SELECT post_id
FROM " . POSTS_TABLE . "
WHERE poster_id IN ($matching_userids)";
if ($search_time)
{
$sql .= " AND post_time >= " . $search_time;
}
}
 
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain matched posts list', '', __LINE__, __FILE__, $sql);
}
 
$search_ids = array();
while( $row = $db->sql_fetchrow($result) )
{
$search_ids[] = $row['post_id'];
}
$db->sql_freeresult($result);
 
$total_match_count = count($search_ids);
 
}
else if ( $search_keywords != '' )
{
$stopword_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/search_stopwords.txt');
$synonym_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/search_synonyms.txt');
 
$split_search = array();
$stripped_keywords = stripslashes($search_keywords);
$split_search = ( !strstr($multibyte_charset, $lang['ENCODING']) ) ? split_words(clean_words('search', $stripped_keywords, $stopword_array, $synonym_array), 'search') : split(' ', $search_keywords);
unset($stripped_keywords);
 
$search_msg_only = ( !$search_fields ) ? "AND m.title_match = 0" : ( ( strstr($multibyte_charset, $lang['ENCODING']) ) ? '' : '' );
 
$word_count = 0;
$current_match_type = 'or';
 
$word_match = array();
$result_list = array();
 
for($i = 0; $i < count($split_search); $i++)
{
if ( strlen(str_replace(array('*', '%'), '', trim($split_search[$i]))) < $board_config['search_min_chars'] )
{
$split_search[$i] = '';
continue;
}
 
switch ( $split_search[$i] )
{
case 'and':
$current_match_type = 'and';
break;
 
case 'or':
$current_match_type = 'or';
break;
 
case 'not':
$current_match_type = 'not';
break;
 
default:
if ( !empty($search_terms) )
{
$current_match_type = 'and';
}
 
if ( !strstr($multibyte_charset, $lang['ENCODING']) )
{
$match_word = str_replace('*', '%', $split_search[$i]);
$sql = "SELECT m.post_id
FROM " . SEARCH_WORD_TABLE . " w, " . SEARCH_MATCH_TABLE . " m
WHERE w.word_text LIKE '$match_word'
AND m.word_id = w.word_id
AND w.word_common <> 1
$search_msg_only";
}
else
{
$match_word = addslashes('%' . str_replace('*', '', $split_search[$i]) . '%');
$search_msg_only = ( $search_fields ) ? "OR post_subject LIKE '$match_word'" : '';
$sql = "SELECT post_id
FROM " . POSTS_TEXT_TABLE . "
WHERE post_text LIKE '$match_word'
$search_msg_only";
}
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain matched posts list', '', __LINE__, __FILE__, $sql);
}
 
$row = array();
while( $temp_row = $db->sql_fetchrow($result) )
{
$row[$temp_row['post_id']] = 1;
 
if ( !$word_count )
{
$result_list[$temp_row['post_id']] = 1;
}
else if ( $current_match_type == 'or' )
{
$result_list[$temp_row['post_id']] = 1;
}
else if ( $current_match_type == 'not' )
{
$result_list[$temp_row['post_id']] = 0;
}
}
 
if ( $current_match_type == 'and' && $word_count )
{
@reset($result_list);
while( list($post_id, $match_count) = @each($result_list) )
{
if ( !$row[$post_id] )
{
$result_list[$post_id] = 0;
}
}
}
 
$word_count++;
 
$db->sql_freeresult($result);
}
}
 
@reset($result_list);
 
$search_ids = array();
while( list($post_id, $matches) = each($result_list) )
{
if ( $matches )
{
$search_ids[] = $post_id;
}
}
unset($result_list);
$total_match_count = count($search_ids);
}
 
//
// If user is logged in then we'll check to see which (if any) private
// forums they are allowed to view and include them in the search.
//
// If not logged in we explicitly prevent searching of private forums
//
$auth_sql = '';
if ( $search_forum != -1 )
{
$is_auth = auth(AUTH_READ, $search_forum, $userdata);
 
if ( !$is_auth['auth_read'] )
{
message_die(GENERAL_MESSAGE, $lang['No_searchable_forums']);
}
 
$auth_sql = "f.forum_id = $search_forum";
}
else
{
$is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);
 
if ( $search_cat != -1 )
{
$auth_sql = "f.cat_id = $search_cat";
}
 
$ignore_forum_sql = '';
while( list($key, $value) = each($is_auth_ary) )
{
if ( !$value['auth_read'] )
{
$ignore_forum_sql .= ( ( $ignore_forum_sql != '' ) ? ', ' : '' ) . $key;
}
}
 
if ( $ignore_forum_sql != '' )
{
$auth_sql .= ( $auth_sql != '' ) ? " AND f.forum_id NOT IN ($ignore_forum_sql) " : "f.forum_id NOT IN ($ignore_forum_sql) ";
}
}
 
//
// Author name search
//
if ( $search_author != '' )
{
$search_author = str_replace('*', '%', trim($search_author));
 
if( ( strpos($search_author, '%') !== false ) && ( strlen(str_replace('%', '', $search_author)) < $board_config['search_min_chars'] ) )
{
$search_author = '';
}
}
 
if ( $total_match_count )
{
if ( $show_results == 'topics' )
{
//
// This one is a beast, try to seperate it a bit (workaround for connection timeouts)
//
$search_id_chunks = array();
$count = 0;
$chunk = 0;
 
if (count($search_ids) > $limiter)
{
for ($i = 0; $i < count($search_ids); $i++)
{
if ($count == $limiter)
{
$chunk++;
$count = 0;
}
$search_id_chunks[$chunk][$count] = $search_ids[$i];
$count++;
}
}
else
{
$search_id_chunks[0] = $search_ids;
}
 
$search_ids = array();
 
for ($i = 0; $i < count($search_id_chunks); $i++)
{
$where_sql = '';
 
if ( $search_time )
{
$where_sql .= ( $search_author == '' && $auth_sql == '' ) ? " AND post_time >= $search_time " : " AND p.post_time >= $search_time ";
}
if ( $search_author == '' && $auth_sql == '' )
{
$sql = "SELECT topic_id
FROM " . POSTS_TABLE . "
WHERE post_id IN (" . implode(", ", $search_id_chunks[$i]) . ")
$where_sql
GROUP BY topic_id";
}
else
{
$from_sql = POSTS_TABLE . " p";
 
if ( $search_author != '' )
{
$from_sql .= ", " . USERS_TABLE . " u";
$where_sql .= " AND u.user_id = p.poster_id AND u.username LIKE '$search_author' ";
}
 
if ( $auth_sql != '' )
{
$from_sql .= ", " . FORUMS_TABLE . " f";
$where_sql .= " AND f.forum_id = p.forum_id AND $auth_sql";
}
 
$sql = "SELECT p.topic_id
FROM $from_sql
WHERE p.post_id IN (" . implode(", ", $search_id_chunks[$i]) . ")
$where_sql
GROUP BY p.topic_id";
}
 
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic ids', '', __LINE__, __FILE__, $sql);
}
 
while ($row = $db->sql_fetchrow($result))
{
$search_ids[] = $row['topic_id'];
}
$db->sql_freeresult($result);
}
 
$total_match_count = sizeof($search_ids);
}
else if ( $search_author != '' || $search_time || $auth_sql != '' )
{
$search_id_chunks = array();
$count = 0;
$chunk = 0;
 
if (count($search_ids) > $limiter)
{
for ($i = 0; $i < count($search_ids); $i++)
{
if ($count == $limiter)
{
$chunk++;
$count = 0;
}
$search_id_chunks[$chunk][$count] = $search_ids[$i];
$count++;
}
}
else
{
$search_id_chunks[0] = $search_ids;
}
 
$search_ids = array();
 
for ($i = 0; $i < count($search_id_chunks); $i++)
{
$where_sql = ( $search_author == '' && $auth_sql == '' ) ? 'post_id IN (' . implode(', ', $search_id_chunks[$i]) . ')' : 'p.post_id IN (' . implode(', ', $search_id_chunks[$i]) . ')';
$select_sql = ( $search_author == '' && $auth_sql == '' ) ? 'post_id' : 'p.post_id';
$from_sql = ( $search_author == '' && $auth_sql == '' ) ? POSTS_TABLE : POSTS_TABLE . ' p';
 
if ( $search_time )
{
$where_sql .= ( $search_author == '' && $auth_sql == '' ) ? " AND post_time >= $search_time " : " AND p.post_time >= $search_time";
}
 
if ( $auth_sql != '' )
{
$from_sql .= ", " . FORUMS_TABLE . " f";
$where_sql .= " AND f.forum_id = p.forum_id AND $auth_sql";
}
 
if ( $search_author != '' )
{
$from_sql .= ", " . USERS_TABLE . " u";
$where_sql .= " AND u.user_id = p.poster_id AND u.username LIKE '$search_author'";
}
 
$sql = "SELECT " . $select_sql . "
FROM $from_sql
WHERE $where_sql";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain post ids', '', __LINE__, __FILE__, $sql);
}
 
while( $row = $db->sql_fetchrow($result) )
{
$search_ids[] = $row['post_id'];
}
$db->sql_freeresult($result);
}
 
$total_match_count = count($search_ids);
}
}
else if ( $search_id == 'unanswered' )
{
if ( $auth_sql != '' )
{
$sql = "SELECT t.topic_id, f.forum_id
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f
WHERE t.topic_replies = 0
AND t.forum_id = f.forum_id
AND t.topic_moved_id = 0
AND $auth_sql";
}
else
{
$sql = "SELECT topic_id
FROM " . TOPICS_TABLE . "
WHERE topic_replies = 0
AND topic_moved_id = 0";
}
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain post ids', '', __LINE__, __FILE__, $sql);
}
 
$search_ids = array();
while( $row = $db->sql_fetchrow($result) )
{
$search_ids[] = $row['topic_id'];
}
$db->sql_freeresult($result);
 
$total_match_count = count($search_ids);
 
//
// Basic requirements
//
$show_results = 'topics';
$sort_by = 0;
$sort_dir = 'DESC';
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_search_match']);
}
 
//
// Delete old data from the search result table
//
$sql = 'DELETE FROM ' . SEARCH_TABLE . '
WHERE search_time < ' . ($current_time - (int) $board_config['session_length']);
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete old search id sessions', '', __LINE__, __FILE__, $sql);
}
 
//
// Store new result data
//
$search_results = implode(', ', $search_ids);
$per_page = ( $show_results == 'posts' ) ? $board_config['posts_per_page'] : $board_config['topics_per_page'];
 
//
// Combine both results and search data (apart from original query)
// so we can serialize it and place it in the DB
//
$store_search_data = array();
 
//
// Limit the character length (and with this the results displayed at all following pages) to prevent
// truncated result arrays. Normally, search results above 12000 are affected.
// - to include or not to include
/*
$max_result_length = 60000;
if (strlen($search_results) > $max_result_length)
{
$search_results = substr($search_results, 0, $max_result_length);
$search_results = substr($search_results, 0, strrpos($search_results, ','));
$total_match_count = count(explode(', ', $search_results));
}
*/
 
for($i = 0; $i < count($store_vars); $i++)
{
$store_search_data[$store_vars[$i]] = $$store_vars[$i];
}
 
$result_array = serialize($store_search_data);
unset($store_search_data);
 
mt_srand ((double) microtime() * 1000000);
$search_id = mt_rand();
 
$sql = "UPDATE " . SEARCH_TABLE . "
SET search_id = $search_id, search_time = $current_time, search_array = '" . str_replace("\'", "''", $result_array) . "'
WHERE session_id = '" . $userdata['session_id'] . "'";
if ( !($result = $db->sql_query($sql)) || !$db->sql_affectedrows() )
{
$sql = "INSERT INTO " . SEARCH_TABLE . " (search_id, session_id, search_time, search_array)
VALUES($search_id, '" . $userdata['session_id'] . "', $current_time, '" . str_replace("\'", "''", $result_array) . "')";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert search results', '', __LINE__, __FILE__, $sql);
}
}
}
else
{
$search_id = intval($search_id);
if ( $search_id )
{
$sql = "SELECT search_array
FROM " . SEARCH_TABLE . "
WHERE search_id = $search_id
AND session_id = '". $userdata['session_id'] . "'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain search results', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
$search_data = unserialize($row['search_array']);
for($i = 0; $i < count($store_vars); $i++)
{
$$store_vars[$i] = $search_data[$store_vars[$i]];
}
}
}
}
 
//
// Look up data ...
//
if ( $search_results != '' )
{
if ( $show_results == 'posts' )
{
$sql = "SELECT pt.post_text, pt.bbcode_uid, pt.post_subject, p.*, f.forum_id, f.forum_name, t.*, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid
FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TEXT_TABLE . " pt
WHERE p.post_id IN ($search_results)
AND pt.post_id = p.post_id
AND f.forum_id = p.forum_id
AND p.topic_id = t.topic_id
AND p.poster_id = u.user_id";
}
else
{
$sql = "SELECT t.*, f.forum_id, f.forum_name, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
WHERE t.topic_id IN ($search_results)
AND t.topic_poster = u.user_id
AND f.forum_id = t.forum_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id";
}
 
$per_page = ( $show_results == 'posts' ) ? $board_config['posts_per_page'] : $board_config['topics_per_page'];
 
$sql .= " ORDER BY ";
switch ( $sort_by )
{
case 1:
$sql .= ( $show_results == 'posts' ) ? 'pt.post_subject' : 't.topic_title';
break;
case 2:
$sql .= 't.topic_title';
break;
case 3:
$sql .= 'u.username';
break;
case 4:
$sql .= 'f.forum_id';
break;
default:
$sql .= ( $show_results == 'posts' ) ? 'p.post_time' : 'p2.post_time';
break;
}
$sql .= " $sort_dir LIMIT $start, " . $per_page;
 
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not obtain search results', '', __LINE__, __FILE__, $sql);
}
 
$searchset = array();
while( $row = $db->sql_fetchrow($result) )
{
$searchset[] = $row;
}
$db->sql_freeresult($result);
//
// Define censored word matches
//
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
 
//
// Output header
//
$page_title = $lang['Search'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
if ( $show_results == 'posts' )
{
$template->set_filenames(array(
'body' => 'search_results_posts.tpl')
);
}
else
{
$template->set_filenames(array(
'body' => 'search_results_topics.tpl')
);
}
make_jumpbox('viewforum.'.$phpEx);
 
$l_search_matches = ( $total_match_count == 1 ) ? sprintf($lang['Found_search_match'], $total_match_count) : sprintf($lang['Found_search_matches'], $total_match_count);
 
$template->assign_vars(array(
'L_SEARCH_MATCHES' => $l_search_matches,
'L_TOPIC' => $lang['Topic'])
);
 
$highlight_active = '';
$highlight_match = array();
for($j = 0; $j < count($split_search); $j++ )
{
$split_word = $split_search[$j];
 
if ( $split_word != 'and' && $split_word != 'or' && $split_word != 'not' )
{
$highlight_match[] = '#\b(' . str_replace("*", "([\w]+)?", $split_word) . ')\b#is';
$highlight_active .= " " . $split_word;
 
for ($k = 0; $k < count($synonym_array); $k++)
{
list($replace_synonym, $match_synonym) = split(' ', trim(strtolower($synonym_array[$k])));
 
if ( $replace_synonym == $split_word )
{
$highlight_match[] = '#\b(' . str_replace("*", "([\w]+)?", $replace_synonym) . ')\b#is';
$highlight_active .= ' ' . $match_synonym;
}
}
}
}
 
$highlight_active = urlencode(trim($highlight_active));
 
$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array();
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array();
 
for($i = 0; $i < count($searchset); $i++)
{
$forum_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $searchset[$i]['forum_id']);
$topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $searchset[$i]['topic_id'] . "&amp;highlight=$highlight_active");
$post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $searchset[$i]['post_id'] . "&amp;highlight=$highlight_active") . '#' . $searchset[$i]['post_id'];
 
$post_date = create_date($board_config['default_dateformat'], $searchset[$i]['post_time'], $board_config['board_timezone']);
 
$message = $searchset[$i]['post_text'];
$topic_title = $searchset[$i]['topic_title'];
 
$forum_id = $searchset[$i]['forum_id'];
$topic_id = $searchset[$i]['topic_id'];
 
if ( $show_results == 'posts' )
{
if ( isset($return_chars) )
{
$bbcode_uid = $searchset[$i]['bbcode_uid'];
 
//
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
//
if ( $return_chars != -1 )
{
$message = strip_tags($message);
$message = preg_replace("/\[.*?:$bbcode_uid:?.*?\]/si", '', $message);
$message = preg_replace('/\[url\]|\[\/url\]/si', '', $message);
$message = ( strlen($message) > $return_chars ) ? substr($message, 0, $return_chars) . ' ...' : $message;
}
else
{
if ( !$board_config['allow_html'] )
{
if ( $postrow[$i]['enable_html'] )
{
$message = preg_replace('#(<)([\/]?.*?)(>)#is', '&lt;\\2&gt;', $message);
}
}
 
if ( $bbcode_uid != '' )
{
$message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message);
}
 
$message = make_clickable($message);
 
if ( $highlight_active )
{
if ( preg_match('/<.*>/', $message) )
{
$message = preg_replace($highlight_match, '<!-- #sh -->\1<!-- #eh -->', $message);
 
$end_html = 0;
$start_html = 1;
$temp_message = '';
$message = ' ' . $message . ' ';
 
while( $start_html = strpos($message, '<', $start_html) )
{
$grab_length = $start_html - $end_html - 1;
$temp_message .= substr($message, $end_html + 1, $grab_length);
 
if ( $end_html = strpos($message, '>', $start_html) )
{
$length = $end_html - $start_html + 1;
$hold_string = substr($message, $start_html, $length);
 
if ( strrpos(' ' . $hold_string, '<') != 1 )
{
$end_html = $start_html + 1;
$end_counter = 1;
 
while ( $end_counter && $end_html < strlen($message) )
{
if ( substr($message, $end_html, 1) == '>' )
{
$end_counter--;
}
else if ( substr($message, $end_html, 1) == '<' )
{
$end_counter++;
}
 
$end_html++;
}
 
$length = $end_html - $start_html + 1;
$hold_string = substr($message, $start_html, $length);
$hold_string = str_replace('<!-- #sh -->', '', $hold_string);
$hold_string = str_replace('<!-- #eh -->', '', $hold_string);
}
else if ( $hold_string == '<!-- #sh -->' )
{
$hold_string = str_replace('<!-- #sh -->', '<span style="color:#' . $theme['fontcolor3'] . '"><b>', $hold_string);
}
else if ( $hold_string == '<!-- #eh -->' )
{
$hold_string = str_replace('<!-- #eh -->', '</b></span>', $hold_string);
}
 
$temp_message .= $hold_string;
 
$start_html += $length;
}
else
{
$start_html = strlen($message);
}
}
 
$grab_length = strlen($message) - $end_html - 1;
$temp_message .= substr($message, $end_html + 1, $grab_length);
 
$message = trim($temp_message);
}
else
{
$message = preg_replace($highlight_match, '<span style="color:#' . $theme['fontcolor3'] . '"><b>\1</b></span>', $message);
}
}
}
 
if ( count($orig_word) )
{
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
$post_subject = ( $searchset[$i]['post_subject'] != "" ) ? preg_replace($orig_word, $replacement_word, $searchset[$i]['post_subject']) : $topic_title;
 
$message = preg_replace($orig_word, $replacement_word, $message);
}
else
{
$post_subject = ( $searchset[$i]['post_subject'] != '' ) ? $searchset[$i]['post_subject'] : $topic_title;
}
 
if ($board_config['allow_smilies'] && $searchset[$i]['enable_smilies'])
{
$message = smilies_pass($message);
}
 
$message = str_replace("\n", '<br />', $message);
 
}
 
$poster = ( $searchset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $searchset[$i]['user_id']) . '">' : '';
$poster .= ( $searchset[$i]['user_id'] != ANONYMOUS ) ? $searchset[$i]['username'] : ( ( $searchset[$i]['post_username'] != "" ) ? $searchset[$i]['post_username'] : $lang['Guest'] );
$poster .= ( $searchset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';
 
if ( $userdata['session_logged_in'] && $searchset[$i]['post_time'] > $userdata['user_lastvisit'] )
{
if ( !empty($tracking_topics[$topic_id]) && !empty($tracking_forums[$forum_id]) )
{
$topic_last_read = ( $tracking_topics[$topic_id] > $tracking_forums[$forum_id] ) ? $tracking_topics[$topic_id] : $tracking_forums[$forum_id];
}
else if ( !empty($tracking_topics[$topic_id]) || !empty($tracking_forums[$forum_id]) )
{
$topic_last_read = ( !empty($tracking_topics[$topic_id]) ) ? $tracking_topics[$topic_id] : $tracking_forums[$forum_id];
}
 
if ( $searchset[$i]['post_time'] > $topic_last_read )
{
$mini_post_img = $images['icon_minipost_new'];
$mini_post_alt = $lang['New_post'];
}
else
{
$mini_post_img = $images['icon_minipost'];
$mini_post_alt = $lang['Post'];
}
}
else
{
$mini_post_img = $images['icon_minipost'];
$mini_post_alt = $lang['Post'];
}
 
$template->assign_block_vars("searchresults", array(
'TOPIC_TITLE' => $topic_title,
'FORUM_NAME' => $searchset[$i]['forum_name'],
'POST_SUBJECT' => $post_subject,
'POST_DATE' => $post_date,
'POSTER_NAME' => $poster,
'TOPIC_REPLIES' => $searchset[$i]['topic_replies'],
'TOPIC_VIEWS' => $searchset[$i]['topic_views'],
'MESSAGE' => $message,
'MINI_POST_IMG' => $mini_post_img,
 
'L_MINI_POST_ALT' => $mini_post_alt,
 
'U_POST' => $post_url,
'U_TOPIC' => $topic_url,
'U_FORUM' => $forum_url)
);
}
else
{
$message = '';
 
if ( count($orig_word) )
{
$topic_title = preg_replace($orig_word, $replacement_word, $searchset[$i]['topic_title']);
}
 
$topic_type = $searchset[$i]['topic_type'];
 
if ($topic_type == POST_ANNOUNCE)
{
$topic_type = $lang['Topic_Announcement'] . ' ';
}
else if ($topic_type == POST_STICKY)
{
$topic_type = $lang['Topic_Sticky'] . ' ';
}
else
{
$topic_type = '';
}
 
if ( $searchset[$i]['topic_vote'] )
{
$topic_type .= $lang['Topic_Poll'] . ' ';
}
 
$views = $searchset[$i]['topic_views'];
$replies = $searchset[$i]['topic_replies'];
 
if ( ( $replies + 1 ) > $board_config['posts_per_page'] )
{
$total_pages = ceil( ( $replies + 1 ) / $board_config['posts_per_page'] );
$goto_page = ' [ <img src="' . $images['icon_gotopost'] . '" alt="' . $lang['Goto_page'] . '" title="' . $lang['Goto_page'] . '" />' . $lang['Goto_page'] . ': ';
 
$times = 1;
for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page'])
{
$goto_page .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id . "&amp;start=$j") . '">' . $times . '</a>';
if ( $times == 1 && $total_pages > 4 )
{
$goto_page .= ' ... ';
$times = $total_pages - 3;
$j += ( $total_pages - 4 ) * $board_config['posts_per_page'];
}
else if ( $times < $total_pages )
{
$goto_page .= ', ';
}
$times++;
}
$goto_page .= ' ] ';
}
else
{
$goto_page = '';
}
 
if ( $searchset[$i]['topic_status'] == TOPIC_MOVED )
{
$topic_type = $lang['Topic_Moved'] . ' ';
$topic_id = $searchset[$i]['topic_moved_id'];
 
$folder_image = '<img src="' . $images['folder'] . '" alt="' . $lang['No_new_posts'] . '" />';
$newest_post_img = '';
}
else
{
if ( $searchset[$i]['topic_status'] == TOPIC_LOCKED )
{
$folder = $images['folder_locked'];
$folder_new = $images['folder_locked_new'];
}
else if ( $searchset[$i]['topic_type'] == POST_ANNOUNCE )
{
$folder = $images['folder_announce'];
$folder_new = $images['folder_announce_new'];
}
else if ( $searchset[$i]['topic_type'] == POST_STICKY )
{
$folder = $images['folder_sticky'];
$folder_new = $images['folder_sticky_new'];
}
else
{
if ( $replies >= $board_config['hot_threshold'] )
{
$folder = $images['folder_hot'];
$folder_new = $images['folder_hot_new'];
}
else
{
$folder = $images['folder'];
$folder_new = $images['folder_new'];
}
}
 
if ( $userdata['session_logged_in'] )
{
if ( $searchset[$i]['post_time'] > $userdata['user_lastvisit'] )
{
if ( !empty($tracking_topics) || !empty($tracking_forums) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
{
 
$unread_topics = true;
 
if ( !empty($tracking_topics[$topic_id]) )
{
if ( $tracking_topics[$topic_id] > $searchset[$i]['post_time'] )
{
$unread_topics = false;
}
}
 
if ( !empty($tracking_forums[$forum_id]) )
{
if ( $tracking_forums[$forum_id] > $searchset[$i]['post_time'] )
{
$unread_topics = false;
}
}
 
if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
{
if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $searchset[$i]['post_time'] )
{
$unread_topics = false;
}
}
 
if ( $unread_topics )
{
$folder_image = $folder_new;
$folder_alt = $lang['New_posts'];
 
$newest_post_img = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> ';
}
else
{
$folder_alt = ( $searchset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
 
$folder_image = $folder;
$folder_alt = $folder_alt;
$newest_post_img = '';
}
 
}
else if ( $searchset[$i]['post_time'] > $userdata['user_lastvisit'] )
{
$folder_image = $folder_new;
$folder_alt = $lang['New_posts'];
 
$newest_post_img = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> ';
}
else
{
$folder_image = $folder;
$folder_alt = ( $searchset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
$newest_post_img = '';
}
}
else
{
$folder_image = $folder;
$folder_alt = ( $searchset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
$newest_post_img = '';
}
}
else
{
$folder_image = $folder;
$folder_alt = ( $searchset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
$newest_post_img = '';
}
}
 
 
$topic_author = ( $searchset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $searchset[$i]['user_id']) . '">' : '';
$topic_author .= ( $searchset[$i]['user_id'] != ANONYMOUS ) ? $searchset[$i]['username'] : ( ( $searchset[$i]['post_username'] != '' ) ? $searchset[$i]['post_username'] : $lang['Guest'] );
 
$topic_author .= ( $searchset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';
 
$first_post_time = create_date($board_config['default_dateformat'], $searchset[$i]['topic_time'], $board_config['board_timezone']);
 
$last_post_time = create_date($board_config['default_dateformat'], $searchset[$i]['post_time'], $board_config['board_timezone']);
 
$last_post_author = ( $searchset[$i]['id2'] == ANONYMOUS ) ? ( ($searchset[$i]['post_username2'] != '' ) ? $searchset[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $searchset[$i]['id2']) . '">' . $searchset[$i]['user2'] . '</a>';
 
$last_post_url = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $searchset[$i]['topic_last_post_id']) . '#' . $searchset[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>';
 
$template->assign_block_vars('searchresults', array(
'FORUM_NAME' => $searchset[$i]['forum_name'],
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
'FOLDER' => $folder_image,
'NEWEST_POST_IMG' => $newest_post_img,
'TOPIC_FOLDER_IMG' => $folder_image,
'GOTO_PAGE' => $goto_page,
'REPLIES' => $replies,
'TOPIC_TITLE' => $topic_title,
'TOPIC_TYPE' => $topic_type,
'VIEWS' => $views,
'TOPIC_AUTHOR' => $topic_author,
'FIRST_POST_TIME' => $first_post_time,
'LAST_POST_TIME' => $last_post_time,
'LAST_POST_AUTHOR' => $last_post_author,
'LAST_POST_IMG' => $last_post_url,
 
'L_TOPIC_FOLDER_ALT' => $folder_alt,
 
'U_VIEW_FORUM' => $forum_url,
'U_VIEW_TOPIC' => $topic_url)
);
}
}
 
$base_url = "search.$phpEx?search_id=$search_id";
 
$template->assign_vars(array(
'PAGINATION' => generate_pagination($base_url, $total_match_count, $per_page, $start),
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $per_page ) + 1 ), ceil( $total_match_count / $per_page )),
 
'L_AUTHOR' => $lang['Author'],
'L_MESSAGE' => $lang['Message'],
'L_FORUM' => $lang['Forum'],
'L_TOPICS' => $lang['Topics'],
'L_REPLIES' => $lang['Replies'],
'L_VIEWS' => $lang['Views'],
'L_POSTS' => $lang['Posts'],
'L_LASTPOST' => $lang['Last_Post'],
'L_POSTED' => $lang['Posted'],
'L_SUBJECT' => $lang['Subject'],
 
'L_GOTO_PAGE' => $lang['Goto_page'])
);
 
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_search_match']);
}
}
 
//
// Search forum
//
$sql = "SELECT c.cat_title, c.cat_id, f.forum_name, f.forum_id
FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f
WHERE f.cat_id = c.cat_id
ORDER BY c.cat_order, f.forum_order";
$result = $db->sql_query($sql);
if ( !$result )
{
message_die(GENERAL_ERROR, 'Could not obtain forum_name/forum_id', '', __LINE__, __FILE__, $sql);
}
 
$is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);
 
$s_forums = '';
while( $row = $db->sql_fetchrow($result) )
{
if ( $is_auth_ary[$row['forum_id']]['auth_read'] )
{
$s_forums .= '<option value="' . $row['forum_id'] . '">' . $row['forum_name'] . '</option>';
if ( empty($list_cat[$row['cat_id']]) )
{
$list_cat[$row['cat_id']] = $row['cat_title'];
}
}
}
 
if ( $s_forums != '' )
{
$s_forums = '<option value="-1">' . $lang['All_available'] . '</option>' . $s_forums;
 
//
// Category to search
//
$s_categories = '<option value="-1">' . $lang['All_available'] . '</option>';
while( list($cat_id, $cat_title) = @each($list_cat))
{
$s_categories .= '<option value="' . $cat_id . '">' . $cat_title . '</option>';
}
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_searchable_forums']);
}
 
//
// Number of chars returned
//
$s_characters = '<option value="-1">' . $lang['All_available'] . '</option>';
$s_characters .= '<option value="0">0</option>';
$s_characters .= '<option value="25">25</option>';
$s_characters .= '<option value="50">50</option>';
 
for($i = 100; $i < 1100 ; $i += 100)
{
$selected = ( $i == 200 ) ? ' selected="selected"' : '';
$s_characters .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
}
 
//
// Sorting
//
$s_sort_by = "";
for($i = 0; $i < count($sort_by_types); $i++)
{
$s_sort_by .= '<option value="' . $i . '">' . $sort_by_types[$i] . '</option>';
}
 
//
// Search time
//
$previous_days = array(0, 1, 7, 14, 30, 90, 180, 364);
$previous_days_text = array($lang['All_Posts'], $lang['1_Day'], $lang['7_Days'], $lang['2_Weeks'], $lang['1_Month'], $lang['3_Months'], $lang['6_Months'], $lang['1_Year']);
 
$s_time = '';
for($i = 0; $i < count($previous_days); $i++)
{
$selected = ( $topic_days == $previous_days[$i] ) ? ' selected="selected"' : '';
$s_time .= '<option value="' . $previous_days[$i] . '"' . $selected . '>' . $previous_days_text[$i] . '</option>';
}
 
//
// Output the basic page
//
$page_title = $lang['Search'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'body' => 'search_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
 
$template->assign_vars(array(
'L_SEARCH_QUERY' => $lang['Search_query'],
'L_SEARCH_OPTIONS' => $lang['Search_options'],
'L_SEARCH_KEYWORDS' => $lang['Search_keywords'],
'L_SEARCH_KEYWORDS_EXPLAIN' => $lang['Search_keywords_explain'],
'L_SEARCH_AUTHOR' => $lang['Search_author'],
'L_SEARCH_AUTHOR_EXPLAIN' => $lang['Search_author_explain'],
'L_SEARCH_ANY_TERMS' => $lang['Search_for_any'],
'L_SEARCH_ALL_TERMS' => $lang['Search_for_all'],
'L_SEARCH_MESSAGE_ONLY' => $lang['Search_msg_only'],
'L_SEARCH_MESSAGE_TITLE' => $lang['Search_title_msg'],
'L_CATEGORY' => $lang['Category'],
'L_RETURN_FIRST' => $lang['Return_first'],
'L_CHARACTERS' => $lang['characters_posts'],
'L_SORT_BY' => $lang['Sort_by'],
'L_SORT_ASCENDING' => $lang['Sort_Ascending'],
'L_SORT_DESCENDING' => $lang['Sort_Descending'],
'L_SEARCH_PREVIOUS' => $lang['Search_previous'],
'L_DISPLAY_RESULTS' => $lang['Display_results'],
'L_FORUM' => $lang['Forum'],
'L_TOPICS' => $lang['Topics'],
'L_POSTS' => $lang['Posts'],
 
'S_SEARCH_ACTION' => append_sid("search.$phpEx?mode=results"),
'S_CHARACTER_OPTIONS' => $s_characters,
'S_FORUM_OPTIONS' => $s_forums,
'S_CATEGORY_OPTIONS' => $s_categories,
'S_TIME_OPTIONS' => $s_time,
'S_SORT_OPTIONS' => $s_sort_by,
'S_HIDDEN_FIELDS' => '')
);
 
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
?>
/Forum/templates/index.htm
0,0 → 1,10
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
 
</body>
</html>
/Forum/templates/subSilver/admin/admin_message_body.tpl
0,0 → 1,13
 
<br /><br />
 
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline">
<tr>
<th class="thHead" align="center">{MESSAGE_TITLE}</th>
</tr>
<tr>
<td class="row1" width="100%" align="center"><span class="gen">{MESSAGE_TEXT}</span></td>
</tr>
</table>
 
<br />
/Forum/templates/subSilver/admin/auth_forum_body.tpl
0,0 → 1,31
 
<h1>{L_AUTH_TITLE}</h1>
 
<p>{L_AUTH_EXPLAIN}</p>
 
<h2>{L_FORUM}: {FORUM_NAME}</h2>
 
<form method="post" action="{S_FORUMAUTH_ACTION}">
<table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<!-- BEGIN forum_auth_titles -->
<th class="thTop">{forum_auth_titles.CELL_TITLE}</th>
<!-- END forum_auth_titles -->
</tr>
<tr>
<!-- BEGIN forum_auth_data -->
<td class="row1" align="center">{forum_auth_data.S_AUTH_LEVELS_SELECT}</td>
<!-- END forum_auth_data -->
</tr>
<tr>
<td colspan="{S_COLUMN_SPAN}" align="center" class="row1"> <span class="gensmall">{U_SWITCH_MODE}</span></td>
</tr>
<tr>
<td colspan="{S_COLUMN_SPAN}" class="catBottom" align="center">{S_HIDDEN_FIELDS}
<input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" />
&nbsp;&nbsp;
<input type="reset" value="{L_RESET}" name="reset" class="liteoption" />
</td>
</tr>
</table>
</form>
/Forum/templates/subSilver/admin/auth_select_body.tpl
0,0 → 1,13
 
<h1>{L_AUTH_TITLE}</h1>
 
<p>{L_AUTH_EXPLAIN}</p>
 
<form method="post" action="{S_AUTH_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thHead" align="center">{L_AUTH_SELECT}</th>
</tr>
<tr>
<td class="row1" align="center">{S_HIDDEN_FIELDS}{S_AUTH_SELECT}&nbsp;&nbsp;<input type="submit" value="{L_LOOK_UP}" class="mainoption" />&nbsp;</td>
</tr>
</table></form>
/Forum/templates/subSilver/admin/auth_ug_body.tpl
0,0 → 1,49
 
<h1>{L_AUTH_TITLE}</h1>
 
<h2>{L_USER_OR_GROUPNAME}: {USERNAME}</h2>
 
<form method="post" action="{S_AUTH_ACTION}">
 
<!-- BEGIN switch_user_auth -->
<p>{USER_LEVEL}</p>
<p>{USER_GROUP_MEMBERSHIPS}</p>
<!-- END switch_user_auth -->
 
<!-- BEGIN switch_group_auth -->
<p>{GROUP_MEMBERSHIP}</p>
<!-- END switch_group_auth -->
 
<h2>{L_PERMISSIONS}</h2>
 
<p>{L_AUTH_EXPLAIN}</p>
 
<table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th width="30%" class="thCornerL">{L_FORUM}</th>
<!-- BEGIN acltype -->
<th class="thTop">{acltype.L_UG_ACL_TYPE}</th>
<!-- END acltype -->
<th class="thCornerR">{L_MODERATOR_STATUS}</th>
</tr>
<!-- BEGIN forums -->
<tr>
<td class="{forums.ROW_CLASS}" align="center">{forums.FORUM_NAME}</td>
<!-- BEGIN aclvalues -->
<td class="{forums.ROW_CLASS}" align="center">{forums.aclvalues.S_ACL_SELECT}</td>
<!-- END aclvalues -->
<td class="{forums.ROW_CLASS}" align="center">{forums.S_MOD_SELECT}</td>
</tr>
<!-- END forums -->
<tr>
<td colspan="{S_COLUMN_SPAN}" class="row1" align="center"> <span class="gensmall">{U_SWITCH_MODE}</span></td>
</tr>
<tr>
<td colspan="{S_COLUMN_SPAN}" class="catBottom" align="center">{S_HIDDEN_FIELDS}
<input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" />
&nbsp;&nbsp;
<input type="reset" value="{L_RESET}" class="liteoption" name="reset" />
</td>
</tr>
</table>
</form>
/Forum/templates/subSilver/admin/board_config_body.tpl
0,0 → 1,272
 
<h1>{L_CONFIGURATION_TITLE}</h1>
 
<p>{L_CONFIGURATION_EXPLAIN}</p>
 
<form action="{S_CONFIG_ACTION}" method="post"><table width="99%" cellpadding="4" cellspacing="1" border="0" align="center" class="forumline">
<tr>
<th class="thHead" colspan="2">{L_GENERAL_SETTINGS}</th>
</tr>
<tr>
<td class="row1">{L_SERVER_NAME}</td>
<td class="row2"><input class="post" type="text" maxlength="255" size="40" name="server_name" value="{SERVER_NAME}" /></td>
</tr>
<tr>
<td class="row1">{L_SERVER_PORT}<br /><span class="gensmall">{L_SERVER_PORT_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" maxlength="5" size="5" name="server_port" value="{SERVER_PORT}" /></td>
</tr>
<tr>
<td class="row1">{L_SCRIPT_PATH}<br /><span class="gensmall">{L_SCRIPT_PATH_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" maxlength="255" name="script_path" value="{SCRIPT_PATH}" /></td>
</tr>
<tr>
<td class="row1">{L_SITE_NAME}<br /><span class="gensmall">{L_SITE_NAME_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="sitename" value="{SITENAME}" /></td>
</tr>
<tr>
<td class="row1">{L_SITE_DESCRIPTION}</td>
<td class="row2"><input class="post" type="text" size="40" maxlength="255" name="site_desc" value="{SITE_DESCRIPTION}" /></td>
</tr>
<tr>
<td class="row1">{L_DISABLE_BOARD}<br /><span class="gensmall">{L_DISABLE_BOARD_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="board_disable" value="1" {S_DISABLE_BOARD_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="board_disable" value="0" {S_DISABLE_BOARD_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_ACCT_ACTIVATION}</td>
<td class="row2"><input type="radio" name="require_activation" value="{ACTIVATION_NONE}" {ACTIVATION_NONE_CHECKED} />{L_NONE}&nbsp; &nbsp;<input type="radio" name="require_activation" value="{ACTIVATION_USER}" {ACTIVATION_USER_CHECKED} />{L_USER}&nbsp; &nbsp;<input type="radio" name="require_activation" value="{ACTIVATION_ADMIN}" {ACTIVATION_ADMIN_CHECKED} />{L_ADMIN}</td>
</tr>
<tr>
<td class="row1">{L_VISUAL_CONFIRM}<br /><span class="gensmall">{L_VISUAL_CONFIRM_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="enable_confirm" value="1" {CONFIRM_ENABLE} />{L_YES}&nbsp; &nbsp;<input type="radio" name="enable_confirm" value="0" {CONFIRM_DISABLE} />{L_NO}</td>
</tr>
<tr>
<td class="row1">{L_ALLOW_AUTOLOGIN}<br /><span class="gensmall">{L_ALLOW_AUTOLOGIN_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="allow_autologin" value="1" {ALLOW_AUTOLOGIN_YES} />{L_YES}&nbsp; &nbsp;<input type="radio" name="allow_autologin" value="0" {ALLOW_AUTOLOGIN_NO} />{L_NO}</td>
</tr>
<tr>
<td class="row1">{L_AUTOLOGIN_TIME} <br /><span class="gensmall">{L_AUTOLOGIN_TIME_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="max_autologin_time" value="{AUTOLOGIN_TIME}" /></td>
</tr>
<tr>
<td class="row1">{L_BOARD_EMAIL_FORM}<br /><span class="gensmall">{L_BOARD_EMAIL_FORM_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="board_email_form" value="1" {BOARD_EMAIL_FORM_ENABLE} /> {L_ENABLED}&nbsp;&nbsp;<input type="radio" name="board_email_form" value="0" {BOARD_EMAIL_FORM_DISABLE} /> {L_DISABLED}</td>
</tr>
<tr>
<td class="row1">{L_FLOOD_INTERVAL} <br /><span class="gensmall">{L_FLOOD_INTERVAL_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="flood_interval" value="{FLOOD_INTERVAL}" /></td>
</tr>
<tr>
<td class="row1">{L_SEARCH_FLOOD_INTERVAL} <br /><span class="gensmall">{L_SEARCH_FLOOD_INTERVAL_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="search_flood_interval" value="{SEARCH_FLOOD_INTERVAL}" /></td>
</tr>
<tr>
<td class="row1">{L_MAX_LOGIN_ATTEMPTS}<br /><span class="gensmall">{L_MAX_LOGIN_ATTEMPTS_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="max_login_attempts" value="{MAX_LOGIN_ATTEMPTS}" /></td>
</tr>
<tr>
<td class="row1">{L_LOGIN_RESET_TIME}<br /><span class="gensmall">{L_LOGIN_RESET_TIME_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="login_reset_time" value="{LOGIN_RESET_TIME}" /></td>
</tr>
<tr>
<td class="row1">{L_TOPICS_PER_PAGE}</td>
<td class="row2"><input class="post" type="text" name="topics_per_page" size="3" maxlength="4" value="{TOPICS_PER_PAGE}" /></td>
</tr>
<tr>
<td class="row1">{L_POSTS_PER_PAGE}</td>
<td class="row2"><input class="post" type="text" name="posts_per_page" size="3" maxlength="4" value="{POSTS_PER_PAGE}" /></td>
</tr>
<tr>
<td class="row1">{L_HOT_THRESHOLD}</td>
<td class="row2"><input class="post" type="text" name="hot_threshold" size="3" maxlength="4" value="{HOT_TOPIC}" /></td>
</tr>
<tr>
<td class="row1">{L_DEFAULT_STYLE}</td>
<td class="row2">{STYLE_SELECT}</td>
</tr>
<tr>
<td class="row1">{L_OVERRIDE_STYLE}<br /><span class="gensmall">{L_OVERRIDE_STYLE_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="override_user_style" value="1" {OVERRIDE_STYLE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="override_user_style" value="0" {OVERRIDE_STYLE_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_DEFAULT_LANGUAGE}</td>
<td class="row2">{LANG_SELECT}</td>
</tr>
<tr>
<td class="row1">{L_DATE_FORMAT}<br /><span class="gensmall">{L_DATE_FORMAT_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" name="default_dateformat" value="{DEFAULT_DATEFORMAT}" /></td>
</tr>
<tr>
<td class="row1">{L_SYSTEM_TIMEZONE}</td>
<td class="row2">{TIMEZONE_SELECT}</td>
</tr>
<tr>
<td class="row1">{L_ENABLE_GZIP}</td>
<td class="row2"><input type="radio" name="gzip_compress" value="1" {GZIP_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="gzip_compress" value="0" {GZIP_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_ENABLE_PRUNE}</td>
<td class="row2"><input type="radio" name="prune_enable" value="1" {PRUNE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="prune_enable" value="0" {PRUNE_NO} /> {L_NO}</td>
</tr>
<tr>
<th class="thHead" colspan="2">{L_COOKIE_SETTINGS}</th>
</tr>
<tr>
<td class="row2" colspan="2"><span class="gensmall">{L_COOKIE_SETTINGS_EXPLAIN}</span></td>
</tr>
<tr>
<td class="row1">{L_COOKIE_DOMAIN}</td>
<td class="row2"><input class="post" type="text" maxlength="255" name="cookie_domain" value="{COOKIE_DOMAIN}" /></td>
</tr>
<tr>
<td class="row1">{L_COOKIE_NAME}</td>
<td class="row2"><input class="post" type="text" maxlength="16" name="cookie_name" value="{COOKIE_NAME}" /></td>
</tr>
<tr>
<td class="row1">{L_COOKIE_PATH}</td>
<td class="row2"><input class="post" type="text" maxlength="255" name="cookie_path" value="{COOKIE_PATH}" /></td>
</tr>
<tr>
<td class="row1">{L_COOKIE_SECURE}<br /><span class="gensmall">{L_COOKIE_SECURE_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="cookie_secure" value="0" {S_COOKIE_SECURE_DISABLED} />{L_DISABLED}&nbsp; &nbsp;<input type="radio" name="cookie_secure" value="1" {S_COOKIE_SECURE_ENABLED} />{L_ENABLED}</td>
</tr>
<tr>
<td class="row1">{L_SESSION_LENGTH}</td>
<td class="row2"><input class="post" type="text" maxlength="5" size="5" name="session_length" value="{SESSION_LENGTH}" /></td>
</tr>
<tr>
<th class="thHead" colspan="2">{L_PRIVATE_MESSAGING}</th>
</tr>
<tr>
<td class="row1">{L_DISABLE_PRIVATE_MESSAGING}</td>
<td class="row2"><input type="radio" name="privmsg_disable" value="0" {S_PRIVMSG_ENABLED} />{L_ENABLED}&nbsp; &nbsp;<input type="radio" name="privmsg_disable" value="1" {S_PRIVMSG_DISABLED} />{L_DISABLED}</td>
</tr>
<tr>
<td class="row1">{L_INBOX_LIMIT}</td>
<td class="row2"><input class="post" type="text" maxlength="4" size="4" name="max_inbox_privmsgs" value="{INBOX_LIMIT}" /></td>
</tr>
<tr>
<td class="row1">{L_SENTBOX_LIMIT}</td>
<td class="row2"><input class="post" type="text" maxlength="4" size="4" name="max_sentbox_privmsgs" value="{SENTBOX_LIMIT}" /></td>
</tr>
<tr>
<td class="row1">{L_SAVEBOX_LIMIT}</td>
<td class="row2"><input class="post" type="text" maxlength="4" size="4" name="max_savebox_privmsgs" value="{SAVEBOX_LIMIT}" /></td>
</tr>
<tr>
<th class="thHead" colspan="2">{L_ABILITIES_SETTINGS}</th>
</tr>
<tr>
<td class="row1">{L_MAX_POLL_OPTIONS}</td>
<td class="row2"><input class="post" type="text" name="max_poll_options" size="4" maxlength="4" value="{MAX_POLL_OPTIONS}" /></td>
</tr>
<tr>
<td class="row1">{L_ALLOW_HTML}</td>
<td class="row2"><input type="radio" name="allow_html" value="1" {HTML_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_html" value="0" {HTML_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_ALLOWED_TAGS}<br /><span class="gensmall">{L_ALLOWED_TAGS_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="30" maxlength="255" name="allow_html_tags" value="{HTML_TAGS}" /></td>
</tr>
<tr>
<td class="row1">{L_ALLOW_BBCODE}</td>
<td class="row2"><input type="radio" name="allow_bbcode" value="1" {BBCODE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_bbcode" value="0" {BBCODE_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_ALLOW_SMILIES}</td>
<td class="row2"><input type="radio" name="allow_smilies" value="1" {SMILE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_smilies" value="0" {SMILE_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_SMILIES_PATH} <br /><span class="gensmall">{L_SMILIES_PATH_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="20" maxlength="255" name="smilies_path" value="{SMILIES_PATH}" /></td>
</tr>
<tr>
<td class="row1">{L_ALLOW_SIG}</td>
<td class="row2"><input type="radio" name="allow_sig" value="1" {SIG_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_sig" value="0" {SIG_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_MAX_SIG_LENGTH}<br /><span class="gensmall">{L_MAX_SIG_LENGTH_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="5" maxlength="4" name="max_sig_chars" value="{SIG_SIZE}" /></td>
</tr>
<tr>
<td class="row1">{L_ALLOW_NAME_CHANGE}</td>
<td class="row2"><input type="radio" name="allow_namechange" value="1" {NAMECHANGE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_namechange" value="0" {NAMECHANGE_NO} /> {L_NO}</td>
</tr>
<tr>
<th class="thHead" colspan="2">{L_AVATAR_SETTINGS}</th>
</tr>
<tr>
<td class="row1">{L_ALLOW_LOCAL}</td>
<td class="row2"><input type="radio" name="allow_avatar_local" value="1" {AVATARS_LOCAL_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_avatar_local" value="0" {AVATARS_LOCAL_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_ALLOW_REMOTE} <br /><span class="gensmall">{L_ALLOW_REMOTE_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="allow_avatar_remote" value="1" {AVATARS_REMOTE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_avatar_remote" value="0" {AVATARS_REMOTE_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_ALLOW_UPLOAD}</td>
<td class="row2"><input type="radio" name="allow_avatar_upload" value="1" {AVATARS_UPLOAD_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_avatar_upload" value="0" {AVATARS_UPLOAD_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_MAX_FILESIZE}<br /><span class="gensmall">{L_MAX_FILESIZE_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="4" maxlength="10" name="avatar_filesize" value="{AVATAR_FILESIZE}" /> Bytes</td>
</tr>
<tr>
<td class="row1">{L_MAX_AVATAR_SIZE} <br />
<span class="gensmall">{L_MAX_AVATAR_SIZE_EXPLAIN}</span>
</td>
<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="avatar_max_height" value="{AVATAR_MAX_HEIGHT}" /> x <input class="post" type="text" size="3" maxlength="4" name="avatar_max_width" value="{AVATAR_MAX_WIDTH}"></td>
</tr>
<tr>
<td class="row1">{L_AVATAR_STORAGE_PATH} <br /><span class="gensmall">{L_AVATAR_STORAGE_PATH_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="20" maxlength="255" name="avatar_path" value="{AVATAR_PATH}" /></td>
</tr>
<tr>
<td class="row1">{L_AVATAR_GALLERY_PATH} <br /><span class="gensmall">{L_AVATAR_GALLERY_PATH_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="20" maxlength="255" name="avatar_gallery_path" value="{AVATAR_GALLERY_PATH}" /></td>
</tr>
<tr>
<th class="thHead" colspan="2">{L_COPPA_SETTINGS}</th>
</tr>
<tr>
<td class="row1">{L_COPPA_FAX}</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="coppa_fax" value="{COPPA_FAX}" /></td>
</tr>
<tr>
<td class="row1">{L_COPPA_MAIL}<br /><span class="gensmall">{L_COPPA_MAIL_EXPLAIN}</span></td>
<td class="row2"><textarea name="coppa_mail" rows="5" cols="30">{COPPA_MAIL}</textarea></td>
</tr>
 
<tr>
<th class="thHead" colspan="2">{L_EMAIL_SETTINGS}</th>
</tr>
<tr>
<td class="row1">{L_ADMIN_EMAIL}</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="board_email" value="{EMAIL_FROM}" /></td>
</tr>
<tr>
<td class="row1">{L_EMAIL_SIG}<br /><span class="gensmall">{L_EMAIL_SIG_EXPLAIN}</span></td>
<td class="row2"><textarea name="board_email_sig" rows="5" cols="30">{EMAIL_SIG}</textarea></td>
</tr>
<tr>
<td class="row1">{L_USE_SMTP}<br /><span class="gensmall">{L_USE_SMTP_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="smtp_delivery" value="1" {SMTP_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="smtp_delivery" value="0" {SMTP_NO} /> {L_NO}</td>
</tr>
<tr>
<td class="row1">{L_SMTP_SERVER}</td>
<td class="row2"><input class="post" type="text" name="smtp_host" value="{SMTP_HOST}" size="25" maxlength="50" /></td>
</tr>
<tr>
<td class="row1">{L_SMTP_USERNAME}<br /><span class="gensmall">{L_SMTP_USERNAME_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" name="smtp_username" value="{SMTP_USERNAME}" size="25" maxlength="255" /></td>
</tr>
<tr>
<td class="row1">{L_SMTP_PASSWORD}<br /><span class="gensmall">{L_SMTP_PASSWORD_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="password" name="smtp_password" value="{SMTP_PASSWORD}" size="25" maxlength="255" /></td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" />&nbsp;&nbsp;<input type="reset" value="{L_RESET}" class="liteoption" />
</td>
</tr>
</table></form>
 
<br clear="all" />
/Forum/templates/subSilver/admin/category_edit_body.tpl
0,0 → 1,21
 
<h1>{L_EDIT_CATEGORY}</h1>
 
<p>{L_EDIT_CATEGORY_EXPLAIN}</p>
 
<form action="{S_FORUM_ACTION}" method="post">
<table cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
<tr>
<th class="thHead" colspan="2">{L_EDIT_CATEGORY}</th>
</tr>
<tr>
<td class="row1">{L_CATEGORY}</td>
<td class="row2"><input class="post" type="text" size="25" name="cat_title" value="{CAT_TITLE}" /></td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{S_SUBMIT_VALUE}" class="mainoption" /></td>
</tr>
</table>
</form>
<br clear="all" />
/Forum/templates/subSilver/admin/confirm_body.tpl
0,0 → 1,11
<table class="forumline" width="100%" cellspacing="1" cellpadding="4" border="0">
<tr>
<th class="thHead" height="25" valign="middle">{MESSAGE_TITLE}</th>
</tr>
<tr>
<td class="row1" align="center"><form action="{S_CONFIRM_ACTION}" method="post"><span class="gen"><br />{MESSAGE_TEXT}<br /><br />{S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{L_YES}" class="mainoption" />&nbsp;&nbsp;<input type="submit" name="cancel" value="{L_NO}" class="liteoption" /></span></form></td>
</tr>
</table>
 
<br clear="all" />
/Forum/templates/subSilver/admin/db_utils_backup_body.tpl
0,0 → 1,33
 
<h1>{L_DATABASE_BACKUP}</h1>
 
<P>{L_BACKUP_EXPLAIN}</p>
 
<form method="post" action="{S_DBUTILS_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th colspan="2" class="thHead">{L_BACKUP_OPTIONS}</th>
</tr>
<tr>
<td class="row2">{L_FULL_BACKUP}</td>
<td class="row2"><input type="radio" name="backup_type" value="full" checked /></td>
</tr>
<tr>
<td class="row1">{L_STRUCTURE_BACKUP}</td>
<td class="row1"><input type="radio" name="backup_type" value="structure" /></td>
</tr>
<tr>
<td class="row2">{L_DATA_BACKUP}</td>
<td class="row2"><input type="radio" name="backup_type" value="data" /></td>
</tr>
<tr>
<td class="row1">{L_ADDITIONAL_TABLES}</td>
<td class="row1"><input class="post" type="text" name="additional_tables" /></td>
</tr>
<tr>
<td class="row1">{L_GZIP_COMPRESS}</td>
<td class="row1">{L_NO} <input type="radio" name="gzipcompress" value="0" checked /> &nbsp;{L_YES} <input type="radio" name="gzipcompress" value="1" /></td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="backupstart" value="{L_START_BACKUP}" class="mainoption" /></td>
</tr>
</table></form>
/Forum/templates/subSilver/admin/db_utils_restore_body.tpl
0,0 → 1,13
 
<h1>{L_DATABASE_RESTORE}</h1>
 
<P>{L_RESTORE_EXPLAIN}</p>
 
<form enctype="multipart/form-data" method="post" action="{S_DBUTILS_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thHead">{L_SELECT_FILE}</th>
</tr>
<tr>
<td class="row1" align="center">&nbsp;<input type="file" name="backup_file">&nbsp;&nbsp;{S_HIDDEN_FIELDS}<input type="submit" name="restore_start" value="{L_START_RESTORE}" class="mainoption" />&nbsp;</td>
</tr>
</table></form>
/Forum/templates/subSilver/admin/disallow_body.tpl
0,0 → 1,24
 
<h1>{L_DISALLOW_TITLE}</h1>
 
<p>{L_DISALLOW_EXPLAIN}</p>
 
<form method="post" action="{S_FORM_ACTION}"><table width="80%" cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thHead" colspan="2">{L_ADD_DISALLOW}</th>
</tr>
<tr>
<td class="row1">{L_USERNAME}<br /><span class="gensmall">{L_ADD_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" name="disallowed_user" size="30" />&nbsp;<input type="submit" name="add_name" value="{L_ADD}" class="mainoption" /></td>
</tr>
<tr>
<th class="thHead" colspan="2">{L_DELETE_DISALLOW}</th>
</tr>
<tr>
<td class="row1">{L_USERNAME}<br /><span class="gensmall">{L_DELETE_EXPLAIN}</span></td>
<td class="row2">{S_DISALLOW_SELECT}&nbsp;<input type="submit" name="delete_name" value="{L_DELETE}" class="liteoption" /></td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center">&nbsp;</td>
</tr>
</table></form>
/Forum/templates/subSilver/admin/forum_admin_body.tpl
0,0 → 1,39
 
<h1>{L_FORUM_TITLE}</h1>
 
<p>{L_FORUM_EXPLAIN}</p>
 
<form method="post" action="{S_FORUM_ACTION}"><table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
<tr>
<th class="thHead" colspan="7">{L_FORUM_TITLE}</th>
</tr>
<!-- BEGIN catrow -->
<tr>
<td class="catLeft" colspan="3"><span class="cattitle"><b><a href="{catrow.U_VIEWCAT}">{catrow.CAT_DESC}</a></b></span></td>
<td class="cat" align="center" valign="middle"><span class="gen"><a href="{catrow.U_CAT_EDIT}">{L_EDIT}</a></span></td>
<td class="cat" align="center" valign="middle"><span class="gen"><a href="{catrow.U_CAT_DELETE}">{L_DELETE}</a></span></td>
<td class="cat" align="center" valign="middle" nowrap="nowrap"><span class="gen"><a href="{catrow.U_CAT_MOVE_UP}">{L_MOVE_UP}</a> <a href="{catrow.U_CAT_MOVE_DOWN}">{L_MOVE_DOWN}</a></span></td>
<td class="catRight" align="center" valign="middle"><span class="gen">&nbsp;</span></td>
</tr>
<!-- BEGIN forumrow -->
<tr>
<td class="row2"><span class="gen"><a href="{catrow.forumrow.U_VIEWFORUM}" target="_new">{catrow.forumrow.FORUM_NAME}</a></span><br /><span class="gensmall">{catrow.forumrow.FORUM_DESC}</span></td>
<td class="row1" align="center" valign="middle"><span class="gen">{catrow.forumrow.NUM_TOPICS}</span></td>
<td class="row2" align="center" valign="middle"><span class="gen">{catrow.forumrow.NUM_POSTS}</span></td>
<td class="row1" align="center" valign="middle"><span class="gen"><a href="{catrow.forumrow.U_FORUM_EDIT}">{L_EDIT}</a></span></td>
<td class="row2" align="center" valign="middle"><span class="gen"><a href="{catrow.forumrow.U_FORUM_DELETE}">{L_DELETE}</a></span></td>
<td class="row1" align="center" valign="middle"><span class="gen"><a href="{catrow.forumrow.U_FORUM_MOVE_UP}">{L_MOVE_UP}</a> <br /> <a href="{catrow.forumrow.U_FORUM_MOVE_DOWN}">{L_MOVE_DOWN}</a></span></td>
<td class="row2" align="center" valign="middle"><span class="gen"><a href="{catrow.forumrow.U_FORUM_RESYNC}">{L_RESYNC}</a></span></td>
</tr>
<!-- END forumrow -->
<tr>
<td colspan="7" class="row2"><input class="post" type="text" name="{catrow.S_ADD_FORUM_NAME}" /> <input type="submit" class="liteoption" name="{catrow.S_ADD_FORUM_SUBMIT}" value="{L_CREATE_FORUM}" /></td>
</tr>
<tr>
<td colspan="7" height="1" class="spaceRow"><img src="../templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<!-- END catrow -->
<tr>
<td colspan="7" class="catBottom"><input class="post" type="text" name="categoryname" /> <input type="submit" class="liteoption" name="addcategory" value="{L_CREATE_CATEGORY}" /></td>
</tr>
</table></form>
/Forum/templates/subSilver/admin/forum_delete_body.tpl
0,0 → 1,23
 
<h1>{L_FORUM_DELETE}</h1>
 
<p>{L_FORUM_DELETE_EXPLAIN}</p>
 
<form action="{S_FORUM_ACTION}" method="post">
<table cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
<tr>
<th colspan="2" class="thHead">{L_FORUM_DELETE}</th>
</tr>
<tr>
<td class="row1">{L_FORUM_NAME}</td>
<td class="row1"><span class="row1">{NAME}</span></td>
</tr>
<tr>
<td class="row1">{L_MOVE_CONTENTS}</td>
<td class="row1">{S_SELECT_TO}</td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{S_SUBMIT_VALUE}" class="mainoption" /></td>
</tr>
</table>
</form>
/Forum/templates/subSilver/admin/forum_edit_body.tpl
0,0 → 1,50
 
<h1>{L_FORUM_TITLE}</h1>
 
<p>{L_FORUM_EXPLAIN}</p>
 
<form action="{S_FORUM_ACTION}" method="post">
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
<tr>
<th class="thHead" colspan="2">{L_FORUM_SETTINGS}</th>
</tr>
<tr>
<td class="row1">{L_FORUM_NAME}</td>
<td class="row2"><input type="text" size="25" name="forumname" value="{FORUM_NAME}" class="post" /></td>
</tr>
<tr>
<td class="row1">{L_FORUM_DESCRIPTION}</td>
<td class="row2"><textarea rows="5" cols="45" wrap="virtual" name="forumdesc" class="post">{DESCRIPTION}</textarea></td>
</tr>
<tr>
<td class="row1">{L_CATEGORY}</td>
<td class="row2"><select name="c">{S_CAT_LIST}</select></td>
</tr>
<tr>
<td class="row1">{L_FORUM_STATUS}</td>
<td class="row2"><select name="forumstatus">{S_STATUS_LIST}</select></td>
</tr>
<tr>
<td class="row1">{L_AUTO_PRUNE}</td>
<td class="row2"><table cellspacing="0" cellpadding="1" border="0">
<tr>
<td align="right" valign="middle">{L_ENABLED}</td>
<td align="left" valign="middle"><input type="checkbox" name="prune_enable" value="1" {S_PRUNE_ENABLED} /></td>
</tr>
<tr>
<td align="right" valign="middle">{L_PRUNE_DAYS}</td>
<td align="left" valign="middle">&nbsp;<input type="text" name="prune_days" value="{PRUNE_DAYS}" size="5" class="post" />&nbsp;{L_DAYS}</td>
</tr>
<tr>
<td align="right" valign="middle">{L_PRUNE_FREQ}</td>
<td align="left" valign="middle">&nbsp;<input type="text" name="prune_freq" value="{PRUNE_FREQ}" size="5" class="post" />&nbsp;{L_DAYS}</td>
</tr>
</table></td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{S_SUBMIT_VALUE}" class="mainoption" /></td>
</tr>
</table>
</form>
<br clear="all" />
/Forum/templates/subSilver/admin/forum_prune_body.tpl
0,0 → 1,22
 
<h1>{L_FORUM_PRUNE}</h1>
 
<p>{L_FORUM_PRUNE_EXPLAIN}</p>
 
<h2>{L_FORUM}: {FORUM_NAME}</h2>
 
<form method="post" action="{S_FORUMPRUNE_ACTION}">
<table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thHead">{L_FORUM_PRUNE}</th>
</tr>
<tr>
<td class="row1">{S_PRUNE_DATA}</td>
</tr>
<tr>
<td class="catBottom" align="center">{S_HIDDEN_VARS}
<input type="submit" name="doprune" value="{L_DO_PRUNE}" class="mainoption">
</td>
</tr>
</table>
</form>
/Forum/templates/subSilver/admin/forum_prune_result_body.tpl
0,0 → 1,21
 
<h1>{L_FORUM_PRUNE}</h1>
 
<p>{L_PRUNE_RESULT}</p>
 
<table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thCornerL">{L_FORUM}</th>
<th class="thTop">{L_TOPICS_PRUNED}</th>
<th class="thCornerR">{L_POSTS_PRUNED}</th>
</tr>
<!-- BEGIN prune_results -->
<tr>
<td class="{prune_results.ROW_CLASS}" align="center">{prune_results.FORUM_NAME}</td>
<td class="{prune_results.ROW_CLASS}" align="center">{prune_results.FORUM_TOPICS}</td>
<td class="{prune_results.ROW_CLASS}" align="center">{prune_results.FORUM_POSTS}</td>
</tr>
<!-- END prune_results -->
</table>
 
<br />
/Forum/templates/subSilver/admin/forum_prune_select_body.tpl
0,0 → 1,12
 
<h1>{L_FORUM_PRUNE}</h1>
 
<form method="post" action="{S_FORUMPRUNE_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thHead" align="center">{L_SELECT_FORUM}</th>
</tr>
<tr>
<td class="row1" align="center">{S_FORUMS_SELECT} &nbsp;<input type="submit" name="pruneset" value="{L_LOOK_UP}" class="mainoption">&nbsp;</td>
</tr>
</table></form>
/Forum/templates/subSilver/admin/group_edit_body.tpl
0,0 → 1,56
 
<h1>{L_GROUP_TITLE}</h1>
 
<form action="{S_GROUP_ACTION}" method="post" name="post"><table border="0" cellpadding="3" cellspacing="1" class="forumline" align="center">
<tr>
<th class="thHead" colspan="2">{L_GROUP_EDIT_DELETE}</th>
</tr>
<tr>
<td class="row1" colspan="2"><span class="gensmall">{L_ITEMS_REQUIRED}</span></td>
</tr>
<tr>
<td class="row1" width="38%"><span class="gen">{L_GROUP_NAME}:</span></td>
<td class="row2" width="62%">
<input class="post" type="text" name="group_name" size="35" maxlength="40" value="{GROUP_NAME}" />
</td>
</tr>
<tr>
<td class="row1" width="38%"><span class="gen">{L_GROUP_DESCRIPTION}:</span></td>
<td class="row2" width="62%">
<textarea class="post" name="group_description" rows="5" cols="51">{GROUP_DESCRIPTION}</textarea>
</td>
</tr>
<tr>
<td class="row1" width="38%"><span class="gen">{L_GROUP_MODERATOR}:</span></td>
<td class="row2" width="62%"><input class="post" type="text" class="post" name="username" maxlength="50" size="20" value="{GROUP_MODERATOR}" /> &nbsp; <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></td>
</tr>
 
<tr>
<td class="row1" width="38%"><span class="gen">{L_GROUP_STATUS}:</span></td>
<td class="row2" width="62%">
<input type="radio" name="group_type" value="{S_GROUP_OPEN_TYPE}" {S_GROUP_OPEN_CHECKED} /> {L_GROUP_OPEN} &nbsp;&nbsp;<input type="radio" name="group_type" value="{S_GROUP_CLOSED_TYPE}" {S_GROUP_CLOSED_CHECKED} /> {L_GROUP_CLOSED} &nbsp;&nbsp;<input type="radio" name="group_type" value="{S_GROUP_HIDDEN_TYPE}" {S_GROUP_HIDDEN_CHECKED} /> {L_GROUP_HIDDEN}</td>
</tr>
<!-- BEGIN group_edit -->
<tr>
<td class="row1" width="38%"><span class="gen">{L_DELETE_MODERATOR}</span>
<br />
<span class="gensmall">{L_DELETE_MODERATOR_EXPLAIN}</span></td>
<td class="row2" width="62%">
<input type="checkbox" name="delete_old_moderator" value="1">
{L_YES}</td>
</tr>
<tr>
<td class="row1" width="38%"><span class="gen">{L_GROUP_DELETE}:</span></td>
<td class="row2" width="62%">
<input type="checkbox" name="group_delete" value="1">
{L_GROUP_DELETE_CHECK}</td>
</tr>
<!-- END group_edit -->
<tr>
<td class="catBottom" colspan="2" align="center"><span class="cattitle">
<input type="submit" name="group_update" value="{L_SUBMIT}" class="mainoption" />
&nbsp;&nbsp;
<input type="reset" value="{L_RESET}" name="reset" class="liteoption" />
</span></td>
</tr>
</table>{S_HIDDEN_FIELDS}</form>
/Forum/templates/subSilver/admin/group_select_body.tpl
0,0 → 1,19
 
<h1>{L_GROUP_TITLE}</h1>
 
<p>{L_GROUP_EXPLAIN}</p>
 
<form method="post" action="{S_GROUP_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thHead" align="center">{L_GROUP_SELECT}</th>
</tr>
<!-- BEGIN select_box -->
<tr>
<td class="row1" align="center">{S_GROUP_SELECT}&nbsp;&nbsp;<input type="submit" name="edit" value="{L_LOOK_UP}" class="mainoption" />&nbsp;</td>
</tr>
<!-- END select_box -->
<tr>
<td class="catBottom" align="center">{S_HIDDEN_FIELDS}<input type="submit" class="liteoption" name="new" value="{L_CREATE_NEW_GROUP}" /></td>
</tr>
</table></form>
/Forum/templates/subSilver/admin/index.htm
0,0 → 1,10
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
 
</body>
</html>
/Forum/templates/subSilver/admin/index_body.tpl
0,0 → 1,86
 
<h1>{L_WELCOME}</h1>
 
<p>{L_ADMIN_INTRO}</p>
 
<h1>{L_FORUM_STATS}</h1>
 
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline">
<tr>
<th width="25%" nowrap="nowrap" height="25" class="thCornerL">{L_STATISTIC}</th>
<th width="25%" height="25" class="thTop">{L_VALUE}</th>
<th width="25%" nowrap="nowrap" height="25" class="thTop">{L_STATISTIC}</th>
<th width="25%" height="25" class="thCornerR">{L_VALUE}</th>
</tr>
<tr>
<td class="row1" nowrap="nowrap">{L_NUMBER_POSTS}:</td>
<td class="row2"><b>{NUMBER_OF_POSTS}</b></td>
<td class="row1" nowrap="nowrap">{L_POSTS_PER_DAY}:</td>
<td class="row2"><b>{POSTS_PER_DAY}</b></td>
</tr>
<tr>
<td class="row1" nowrap="nowrap">{L_NUMBER_TOPICS}:</td>
<td class="row2"><b>{NUMBER_OF_TOPICS}</b></td>
<td class="row1" nowrap="nowrap">{L_TOPICS_PER_DAY}:</td>
<td class="row2"><b>{TOPICS_PER_DAY}</b></td>
</tr>
<tr>
<td class="row1" nowrap="nowrap">{L_NUMBER_USERS}:</td>
<td class="row2"><b>{NUMBER_OF_USERS}</b></td>
<td class="row1" nowrap="nowrap">{L_USERS_PER_DAY}:</td>
<td class="row2"><b>{USERS_PER_DAY}</b></td>
</tr>
<tr>
<td class="row1" nowrap="nowrap">{L_BOARD_STARTED}:</td>
<td class="row2"><b>{START_DATE}</b></td>
<td class="row1" nowrap="nowrap">{L_AVATAR_DIR_SIZE}:</td>
<td class="row2"><b>{AVATAR_DIR_SIZE}</b></td>
</tr>
<tr>
<td class="row1" nowrap="nowrap">{L_DB_SIZE}:</td>
<td class="row2"><b>{DB_SIZE}</b></td>
<td class="row1" nowrap="nowrap">{L_GZIP_COMPRESSION}:</td>
<td class="row2"><b>{GZIP_COMPRESSION}</b></td>
</tr>
</table>
 
<h1>{L_VERSION_INFORMATION}</h1>
 
{VERSION_INFO}
 
<br />
 
<h1>{L_WHO_IS_ONLINE}</h1>
 
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline">
<tr>
<th width="20%" class="thCornerL" height="25">&nbsp;{L_USERNAME}&nbsp;</th>
<th width="20%" height="25" class="thTop">&nbsp;{L_STARTED}&nbsp;</th>
<th width="20%" class="thTop">&nbsp;{L_LAST_UPDATE}&nbsp;</th>
<th width="20%" class="thCornerR">&nbsp;{L_FORUM_LOCATION}&nbsp;</th>
<th width="20%" height="25" class="thCornerR">&nbsp;{L_IP_ADDRESS}&nbsp;</th>
</tr>
<!-- BEGIN reg_user_row -->
<tr>
<td width="20%" class="{reg_user_row.ROW_CLASS}">&nbsp;<span class="gen"><a href="{reg_user_row.U_USER_PROFILE}" class="gen">{reg_user_row.USERNAME}</a></span>&nbsp;</td>
<td width="20%" align="center" class="{reg_user_row.ROW_CLASS}">&nbsp;<span class="gen">{reg_user_row.STARTED}</span>&nbsp;</td>
<td width="20%" align="center" nowrap="nowrap" class="{reg_user_row.ROW_CLASS}">&nbsp;<span class="gen">{reg_user_row.LASTUPDATE}</span>&nbsp;</td>
<td width="20%" class="{reg_user_row.ROW_CLASS}">&nbsp;<span class="gen"><a href="{reg_user_row.U_FORUM_LOCATION}" class="gen">{reg_user_row.FORUM_LOCATION}</a></span>&nbsp;</td>
<td width="20%" class="{reg_user_row.ROW_CLASS}">&nbsp;<span class="gen"><a href="{reg_user_row.U_WHOIS_IP}" class="gen" target="_phpbbwhois">{reg_user_row.IP_ADDRESS}</a></span>&nbsp;</td>
</tr>
<!-- END reg_user_row -->
<tr>
<td colspan="5" height="1" class="row3"><img src="../templates/subSilver/images/spacer.gif" width="1" height="1" alt="."></td>
</tr>
<!-- BEGIN guest_user_row -->
<tr>
<td width="20%" class="{guest_user_row.ROW_CLASS}">&nbsp;<span class="gen">{guest_user_row.USERNAME}</span>&nbsp;</td>
<td width="20%" align="center" class="{guest_user_row.ROW_CLASS}">&nbsp;<span class="gen">{guest_user_row.STARTED}</span>&nbsp;</td>
<td width="20%" align="center" nowrap="nowrap" class="{guest_user_row.ROW_CLASS}">&nbsp;<span class="gen">{guest_user_row.LASTUPDATE}</span>&nbsp;</td>
<td width="20%" class="{guest_user_row.ROW_CLASS}">&nbsp;<span class="gen"><a href="{guest_user_row.U_FORUM_LOCATION}" class="gen">{guest_user_row.FORUM_LOCATION}</a></span>&nbsp;</td>
<td width="20%" class="{guest_user_row.ROW_CLASS}">&nbsp;<span class="gen"><a href="{guest_user_row.U_WHOIS_IP}" target="_phpbbwhois">{guest_user_row.IP_ADDRESS}</a></span>&nbsp;</td>
</tr>
<!-- END guest_user_row -->
</table>
 
<br />
/Forum/templates/subSilver/admin/index_frameset.tpl
0,0 → 1,17
<html dir="{S_CONTENT_DIRECTION}">
<head>
<title>phpBB Administration</title>
<meta http-equiv="Content-Type" content="text/html;">
</head>
 
<frameset cols="170,*" rows="*" border="2" framespacing="0" frameborder="yes">
<frame src="{S_FRAME_NAV}" name="nav" marginwidth="3" marginheight="3" scrolling="auto">
<frame src="{S_FRAME_MAIN}" name="main" marginwidth="10" marginheight="10" scrolling="auto">
</frameset>
 
<noframes>
<body bgcolor="#FFFFFF" text="#000000">
<p>Sorry, your browser doesn't seem to support frames</p>
</body>
</noframes>
</html>
/Forum/templates/subSilver/admin/index_navigate.tpl
0,0 → 1,37
<table width="100%" cellpadding="4" cellspacing="0" border="0" align="center">
<tr>
<td align="center" ><a href="{U_FORUM_INDEX}" target="_parent"><img src="../templates/subSilver/images/logo_phpBB_med.gif" border="0" /></a></td>
</tr>
<tr>
<td align="center" >
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline">
<tr>
<th height="25" class="thHead"><b>{L_ADMIN}</b></th>
</tr>
<tr>
<td class="row1"><span class="genmed"><a href="{U_ADMIN_INDEX}" target="main" class="genmed">{L_ADMIN_INDEX}</a></span></td>
</tr>
<tr>
<td class="row1"><span class="genmed"><a href="{U_FORUM_INDEX}" target="_parent" class="genmed">{L_FORUM_INDEX}</a></span></td>
</tr>
<tr>
<td class="row1"><span class="genmed"><a href="{U_FORUM_INDEX}" target="main" class="genmed">{L_PREVIEW_FORUM}</a></span></td>
</tr>
<!-- BEGIN catrow -->
<tr>
<td height="28" class="catSides"><span class="cattitle">{catrow.ADMIN_CATEGORY}</span></td>
</tr>
<!-- BEGIN modulerow -->
<tr>
<td class="row1"><span class="genmed"><a href="{catrow.modulerow.U_ADMIN_MODULE}" target="main" class="genmed">{catrow.modulerow.ADMIN_MODULE}</a></span>
</td>
</tr>
<!-- END modulerow -->
<!-- END catrow -->
</table>
</td>
</tr>
</table>
 
<br />
/Forum/templates/subSilver/admin/page_footer.tpl
0,0 → 1,22
 
<!--
 
Please note that the following copyright notice
MUST be displayed on each and every page output
by phpBB. You may alter the font, colour etc. but
you CANNOT remove it, nor change it so that it be,
to all intents and purposes, invisible. You may ADD
your own notice to it should you have altered the
code but you may not replace it. The hyperlink must
also remain intact. These conditions are part of the
licence this software is released under. See the
LICENCE and README files for more information.
 
The phpBB Group : 2001
 
//-->
 
<div align="center"><span class="copyright">Powered by phpBB {PHPBB_VERSION} &copy; 2001 <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB Group</a><br />{TRANSLATION_INFO}</span></div>
 
</body>
</html>
/Forum/templates/subSilver/admin/page_header.tpl
0,0 → 1,226
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{S_CONTENT_DIRECTION}">
<head>
{META}
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
<!-- link rel="stylesheet" href="../templates/subSilver/{T_HEAD_STYLESHEET}" type="text/css" -->
<style type="text/css">
<!--
 
/*
The original subSilver Theme for phpBB version 2+
Created by subBlue design
http://www.subBlue.com
 
NOTE: These CSS definitions are stored within the main page body so that you can use the phpBB2
theme administration centre. When you have finalised your style you could cut the final CSS code
and place it in an external file, deleting this section to save bandwidth.
*/
/* General page style. The scroll bar colours only visible in IE5.5+ */
body {
background-color: {T_BODY_BGCOLOR};
scrollbar-face-color: {T_TR_COLOR2};
scrollbar-highlight-color: {T_TD_COLOR2};
scrollbar-shadow-color: {T_TR_COLOR2};
scrollbar-3dlight-color: {T_TR_COLOR3};
scrollbar-arrow-color: {T_BODY_LINK};
scrollbar-track-color: {T_TR_COLOR1};
scrollbar-darkshadow-color: {T_TH_COLOR1};
}
 
/* General font families for common tags */
font,th,td,p { font-family: {T_FONTFACE1} }
p, td { font-size : {T_FONTSIZE2}; color : {T_BODY_TEXT}; }
a:link,a:active,a:visited { color : {T_BODY_LINK}; }
a:hover { text-decoration: underline; color : {T_BODY_HLINK}; }
hr { height: 0px; border: solid {T_TR_COLOR3} 0px; border-top-width: 1px;}
h1,h2 { font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; font-size : 22px; font-weight : bold; text-decoration : none; line-height : 120%; color : #000000;}
 
 
/* This is the border line & background colour round the entire page */
.bodyline { background-color: {T_TD_COLOR2}; border: 1px {T_TH_COLOR1} solid; }
 
/* This is the outline round the main forum tables */
.forumline { background-color: {T_TD_COLOR2}; border: 2px {T_TH_COLOR2} solid; }
 
 
/* Main table cell colours and backgrounds */
td.row1 { background-color: {T_TR_COLOR1}; }
td.row2 { background-color: {T_TR_COLOR2}; }
td.row3 { background-color: {T_TR_COLOR3}; }
 
 
/*
This is for the table cell above the Topics, Post & Last posts on the index.php page
By default this is the fading out gradiated silver background.
However, you could replace this with a bitmap specific for each forum
*/
td.rowpic {
background-color: {T_TD_COLOR2};
background-image: url(../templates/subSilver/images/{T_TH_CLASS3});
background-repeat: repeat-y;
}
 
/* Header cells - the blue and silver gradient backgrounds */
th {
color: {T_FONTCOLOR3}; font-size: {T_FONTSIZE2}px; font-weight : bold;
background-color: {T_BODY_LINK}; height: 25px;
background-image: url(../templates/subSilver/images/{T_TH_CLASS2});
}
 
td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {
background-image: url(../templates/subSilver/images/{T_TH_CLASS1});
background-color:{T_TR_COLOR3}; border: {T_TH_COLOR3}; border-style: solid; height: 28px;
}
 
 
/*
Setting additional nice inner borders for the main table cells.
The names indicate which sides the border will be on.
Don't worry if you don't understand this, just ignore it :-)
*/
td.cat,td.catHead,td.catBottom {
height: 29px;
border-width: 0px 0px 0px 0px;
}
th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.thCornerR {
font-weight: bold; border: {T_TD_COLOR2}; border-style: solid; height: 28px; }
td.row3Right,td.spaceRow {
background-color: {T_TR_COLOR3}; border: {T_TH_COLOR3}; border-style: solid; }
 
th.thHead,td.catHead { font-size: {T_FONTSIZE3}px; border-width: 1px 1px 0px 1px; }
th.thSides,td.catSides,td.spaceRow { border-width: 0px 1px 0px 1px; }
th.thRight,td.catRight,td.row3Right { border-width: 0px 1px 0px 0px; }
th.thLeft,td.catLeft { border-width: 0px 0px 0px 1px; }
th.thBottom,td.catBottom { border-width: 0px 1px 1px 1px; }
th.thTop { border-width: 1px 0px 0px 0px; }
th.thCornerL { border-width: 1px 0px 0px 1px; }
th.thCornerR { border-width: 1px 1px 0px 0px; }
 
 
/* The largest text used in the index page title and toptic title etc. */
.maintitle {
font-weight: bold; font-size: 22px; font-family: "{T_FONTFACE2}",{T_FONTFACE1};
text-decoration: none; line-height : 120%; color : {T_BODY_TEXT};
}
 
 
/* General text */
.gen { font-size : {T_FONTSIZE3}px; }
.genmed { font-size : {T_FONTSIZE2}px; }
.gensmall { font-size : {T_FONTSIZE1}px; }
.gen,.genmed,.gensmall { color : {T_BODY_TEXT}; }
a.gen,a.genmed,a.gensmall { color: {T_BODY_LINK}; text-decoration: none; }
a.gen:hover,a.genmed:hover,a.gensmall:hover { color: {T_BODY_HLINK}; text-decoration: underline; }
 
 
/* The register, login, search etc links at the top of the page */
.mainmenu { font-size : {T_FONTSIZE2}px; color : {T_BODY_TEXT} }
a.mainmenu { text-decoration: none; color : {T_BODY_LINK}; }
a.mainmenu:hover{ text-decoration: underline; color : {T_BODY_HLINK}; }
 
 
/* Forum category titles */
.cattitle { font-weight: bold; font-size: {T_FONTSIZE3}px ; letter-spacing: 1px; color : {T_BODY_LINK}}
a.cattitle { text-decoration: none; color : {T_BODY_LINK}; }
a.cattitle:hover{ text-decoration: underline; }
 
 
/* Forum title: Text and link to the forums used in: index.php */
.forumlink { font-weight: bold; font-size: {T_FONTSIZE3}px; color : {T_BODY_LINK}; }
a.forumlink { text-decoration: none; color : {T_BODY_LINK}; }
a.forumlink:hover{ text-decoration: underline; color : {T_BODY_HLINK}; }
 
 
/* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */
.nav { font-weight: bold; font-size: {T_FONTSIZE2}px; color : {T_BODY_TEXT};}
a.nav { text-decoration: none; color : {T_BODY_LINK}; }
a.nav:hover { text-decoration: underline; }
 
 
 
/* Name of poster in viewmsg.php and viewtopic.php and other places */
.name { font-size : {T_FONTSIZE2}px; color : {T_BODY_TEXT};}
 
/* Location, number of posts, post date etc */
.postdetails { font-size : {T_FONTSIZE1}px; color : {T_BODY_TEXT}; }
 
 
/* The content of the posts (body of text) */
.postbody { font-size : {T_FONTSIZE3}px; line-height: 18px}
a.postlink:link { text-decoration: none; color : {T_BODY_LINK} }
a.postlink:visited { text-decoration: none; color : {T_BODY_VLINK}; }
a.postlink:hover { text-decoration: underline; color : {T_BODY_HLINK}}
 
 
/* Quote & Code blocks */
.code {
font-family: {T_FONTFACE3}; font-size: {T_FONTSIZE2}px; color: {T_FONTCOLOR2};
background-color: {T_TD_COLOR1}; border: {T_TR_COLOR3}; border-style: solid;
border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}
 
.quote {
font-family: {T_FONTFACE1}; font-size: {T_FONTSIZE2}px; color: {T_FONTCOLOR1}; line-height: 125%;
background-color: {T_TD_COLOR1}; border: {T_TR_COLOR3}; border-style: solid;
border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}
 
 
/* Copyright and bottom info */
.copyright { font-size: {T_FONTSIZE1}px; font-family: {T_FONTFACE1}; color: {T_FONTCOLOR1}; letter-spacing: -1px;}
a.copyright { color: {T_FONTCOLOR1}; text-decoration: none;}
a.copyright:hover { color: {T_BODY_TEXT}; text-decoration: underline;}
 
 
/* Form elements */
input,textarea, select {
color : {T_BODY_TEXT};
font: normal {T_FONTSIZE2}px {T_FONTFACE1};
border-color : {T_BODY_TEXT};
}
 
/* The text input fields background colour */
input.post, textarea.post, select {
background-color : {T_TD_COLOR2};
}
 
input { text-indent : 2px; }
 
/* The buttons used for bbCode styling in message post */
input.button {
background-color : {T_TR_COLOR1};
color : {T_BODY_TEXT};
font-size: {T_FONTSIZE2}px; font-family: {T_FONTFACE1};
}
 
/* The main submit button option */
input.mainoption {
background-color : {T_TD_COLOR1};
font-weight : bold;
}
 
/* None-bold submit button */
input.liteoption {
background-color : {T_TD_COLOR1};
font-weight : normal;
}
 
/* This is the line in the posting page which shows the rollover
help line. This is actually a text box, but if set to be the same
colour as the background no one will know ;)
*/
.helpline { background-color: {T_TR_COLOR2}; border-style: none; }
 
 
/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
@import url("../templates/subSilver/formIE.css");
-->
</style>
<title>{SITENAME} - {L_PHPBB_ADMIN}</title>
</head>
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">
 
<a name="top"></a>
/Forum/templates/subSilver/admin/ranks_edit_body.tpl
0,0 → 1,31
 
<h1>{L_RANKS_TITLE}</h1>
 
<p>{L_RANKS_TEXT}</p>
 
<form action="{S_RANK_ACTION}" method="post"><table class="forumline" cellpadding="4" cellspacing="1" border="0" align="center">
<tr>
<th class="thTop" colspan="2">{L_RANKS_TITLE}</th>
</tr>
<tr>
<td class="row1" width="38%"><span class="gen">{L_RANK_TITLE}:</span></td>
<td class="row2"><input class="post" type="text" name="title" size="35" maxlength="40" value="{RANK}" /></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_RANK_SPECIAL}</span></td>
<td class="row2"><input type="radio" name="special_rank" value="1" {SPECIAL_RANK} />{L_YES} &nbsp;&nbsp;<input type="radio" name="special_rank" value="0" {NOT_SPECIAL_RANK} /> {L_NO}</td>
</tr>
<tr>
<td class="row1" width="38%"><span class="gen">{L_RANK_MINIMUM}:</span></td>
<td class="row2"><input class="post" type="text" name="min_posts" size="5" maxlength="10" value="{MINIMUM}" /></td>
</tr>
<tr>
<td class="row1" width="38%"><span class="gen">{L_RANK_IMAGE}:</span><br />
<span class="gensmall">{L_RANK_IMAGE_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" name="rank_image" size="40" maxlength="255" value="{IMAGE}" /><br />{IMAGE_DISPLAY}</td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center"><input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" />&nbsp;&nbsp;<input type="reset" value="{L_RESET}" class="liteoption" /></td>
</tr>
</table>
{S_HIDDEN_FIELDS}</form>
/Forum/templates/subSilver/admin/ranks_list_body.tpl
0,0 → 1,26
 
<h1>{L_RANKS_TITLE}</h1>
 
<p>{L_RANKS_TEXT}</p>
 
<form method="post" action="{S_RANKS_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thCornerL">{L_RANK}</th>
<th class="thTop">{L_RANK_MINIMUM}</th>
<th class="thTop">{L_SPECIAL_RANK}</th>
<th class="thTop">{L_EDIT}</th>
<th class="thCornerR">{L_DELETE}</th>
</tr>
<!-- BEGIN ranks -->
<tr>
<td class="{ranks.ROW_CLASS}" align="center">{ranks.RANK}</td>
<td class="{ranks.ROW_CLASS}" align="center">{ranks.RANK_MIN}</td>
<td class="{ranks.ROW_CLASS}" align="center">{ranks.SPECIAL_RANK}</td>
<td class="{ranks.ROW_CLASS}" align="center"><a href="{ranks.U_RANK_EDIT}">{L_EDIT}</a></td>
<td class="{ranks.ROW_CLASS}" align="center"><a href="{ranks.U_RANK_DELETE}">{L_DELETE}</a></td>
</tr>
<!-- END ranks -->
<tr>
<td class="catBottom" align="center" colspan="6"><input type="submit" class="mainoption" name="add" value="{L_ADD_RANK}" /></td>
</tr>
</table></form>
/Forum/templates/subSilver/admin/smile_edit_body.tpl
0,0 → 1,34
 
<h1>{L_SMILEY_TITLE}</h1>
 
<p>{L_SMILEY_EXPLAIN}</p>
 
<script language="javascript" type="text/javascript">
<!--
function update_smiley(newimage)
{
document.smiley_image.src = "{S_SMILEY_BASEDIR}/" + newimage;
}
//-->
</script>
 
<form method="post" action="{S_SMILEY_ACTION}"><table class="forumline" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th class="thHead" colspan="2">{L_SMILEY_CONFIG}</th>
</tr>
<tr>
<td class="row2">{L_SMILEY_CODE}</td>
<td class="row2"><input class="post" type="text" name="smile_code" value="{SMILEY_CODE}" /></td>
</tr>
<tr>
<td class="row1">{L_SMILEY_URL}</td>
<td class="row1"><select name="smile_url" onchange="update_smiley(this.options[selectedIndex].value);">{S_FILENAME_OPTIONS}</select> &nbsp; <img name="smiley_image" src="{SMILEY_IMG}" border="0" alt="" /> &nbsp;</td>
</tr>
<tr>
<td class="row2">{L_SMILEY_EMOTION}</td>
<td class="row2"><input class="post" type="text" name="smile_emotion" value="{SMILEY_EMOTICON}" /></td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="mainoption" type="submit" value="{L_SUBMIT}" /></td>
</tr>
</table></form>
/Forum/templates/subSilver/admin/smile_import_body.tpl
0,0 → 1,24
 
<h1>{L_SMILEY_TITLE}</h1>
 
<p>{L_SMILEY_EXPLAIN}</p>
 
<form method="post" action="{S_SMILEY_ACTION}"><table class="forumline" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th class="thHead" colspan="2">{L_SMILEY_IMPORT}</th>
</tr>
<tr>
<td class="row2">{L_SELECT_LBL}</td>
<td class="row2">{S_SMILE_SELECT}</td>
</tr>
<tr>
<td class="row1">{L_DEL_EXISTING}</td>
<td class="row1"><input type="checkbox" name="clear_current" value="1" /></td>
</tr>
<tr>
<td class="row2" colspan="2" align="center">{L_CONFLICTS}<br /><input type="radio" name="replace" value="1" checked="checked"/> {L_REPLACE_EXISTING} &nbsp; <input type="radio" name="replace" value="0" /> {L_KEEP_EXISTING}</td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="mainoption" name="import_pack" type="submit" value="{L_IMPORT}" /></td>
</tr>
</table></form>
/Forum/templates/subSilver/admin/smile_list_body.tpl
0,0 → 1,25
 
<h1>{L_SMILEY_TITLE}</h1>
 
<P>{L_SMILEY_TEXT}</p>
 
<form method="post" action="{S_SMILEY_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thCornerL">{L_CODE}</th>
<th class="thTop">{L_SMILE}</th>
<th class="thTop">{L_EMOT}</th>
<th colspan="2" class="thCornerR">{L_ACTION}</th>
</tr>
<!-- BEGIN smiles -->
<tr>
<td class="{smiles.ROW_CLASS}">{smiles.CODE}</td>
<td class="{smiles.ROW_CLASS}"><img src="{smiles.SMILEY_IMG}" alt="{smiles.CODE}" /></td>
<td class="{smiles.ROW_CLASS}">{smiles.EMOT}</td>
<td class="{smiles.ROW_CLASS}"><a href="{smiles.U_SMILEY_EDIT}">{L_EDIT}</a></td>
<td class="{smiles.ROW_CLASS}"><a href="{smiles.U_SMILEY_DELETE}">{L_DELETE}</a></td>
</tr>
<!-- END smiles -->
<tr>
<td class="catBottom" colspan="5" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="add" value="{L_SMILEY_ADD}" class="mainoption" />&nbsp;&nbsp;<input class="liteoption" type="submit" name="import_pack" value="{L_IMPORT_PACK}">&nbsp;&nbsp;<input class="liteoption" type="submit" name="export_pack" value="{L_EXPORT_PACK}"></td>
</tr>
</table></form>
/Forum/templates/subSilver/admin/styles_addnew_body.tpl
0,0 → 1,19
 
<h1>{L_STYLES_TITLE}</h1>
 
<p>{L_STYLES_ADD_TEXT}</p>
 
<table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thCornerL">{L_STYLE}</th>
<th class="thTop">{L_TEMPLATE}</th>
<th class="thCornerR">{L_ACTION}</th>
</tr>
<!-- BEGIN styles -->
<tr>
<td class="{styles.ROW_CLASS}">{styles.STYLE_NAME}</td>
<td class="{styles.ROW_CLASS}">{styles.TEMPLATE_NAME}</td>
<td class="{styles.ROW_CLASS}"><a href="{styles.U_STYLES_INSTALL}">{L_INSTALL}</a></td>
</tr>
<!-- END styles -->
</table>
/Forum/templates/subSilver/admin/styles_edit_body.tpl
0,0 → 1,246
 
<h1>{L_THEMES_TITLE}</h1>
 
<p>{L_THEMES_EXPLAIN}</p>
 
<form action="{S_THEME_ACTION}" method="POST"><table width="99%" cellpadding="4" cellspacing="1" border="0" align="center" class="forumline">
<tr>
<th class="thHead" colspan="3">{L_THEME_SETTINGS}</th>
</tr>
<tr>
<td class="row1">{L_THEME_NAME}:</td>
<td class="row2" colspan="2"><input class="post" type="text" size="25" maxlength="100" name="style_name" value="{THEME_NAME}"></td>
</tr>
<tr>
<td class="row1">{L_TEMPLATE}:</td>
<td class="row2" colspan="2">{S_TEMPLATE_SELECT}</td>
</tr>
<tr>
<th>{L_THEME_ELEMENT}</th>
<th>{L_VALUE}</th>
<th>{L_SIMPLE_NAME}</th>
</tr>
<tr>
<td class="row1">{L_STYLESHEET}:<br /><span class="gensmall">{L_STYLESHEET_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="head_stylesheet" value="{HEAD_STYLESHEET}"></td>
<td class="row2">&nbsp;</td>
</tr>
<tr>
<td class="row1">{L_BACKGROUND_IMAGE}:</td>
<td class="row2" ><input class="post" type="text" size="25" maxlength="100" name="body_background" value="{BODY_BACKGROUND}"></td>
<td class="row2">&nbsp;</td>
</tr>
<tr>
<td class="row1">{L_BACKGROUND_COLOR}:</td>
<td class="row2" ><input class="post" type="text" size="6" maxlength="6" name="body_bgcolor" value="{BODY_BGCOLOR}"></td>
<td class="row2">&nbsp;</td>
</tr>
<tr>
<td class="row1">{L_BODY_TEXT_COLOR}:</td>
<td class="row2" ><input class="post" type="text" size="6" maxlength="6" name="body_text" value="{BODY_TEXT_COLOR}"></td>
<td class="row2">&nbsp;</td>
</tr>
<tr>
<td class="row1">{L_BODY_LINK_COLOR}:</td>
<td class="row2" ><input class="post" type="text" size="6" maxlength="6" name="body_link" value="{BODY_LINK_COLOR}"></td>
<td class="row2">&nbsp;</td>
</tr>
<tr>
<td class="row1">{L_BODY_VLINK_COLOR}:</td>
<td class="row2" ><input class="post" type="text" size="6" maxlength="6" name="body_vlink" value="{BODY_VLINK_COLOR}"></td>
<td class="row2">&nbsp;</td>
</tr>
<tr>
<td class="row1">{L_BODY_ALINK_COLOR}:</td>
<td class="row2" ><input class="post" type="text" size="6" maxlength="6" name="body_alink" value="{BODY_ALINK_COLOR}"></td>
<td class="row2">&nbsp;</td>
</tr>
<tr>
<td class="row1">{L_BODY_HLINK_COLOR}:</td>
<td class="row2" ><input class="post" type="text" size="6" maxlength="6" name="body_hlink" value="{BODY_HLINK_COLOR}"></td>
<td class="row2">&nbsp;</td>
</tr>
 
<tr>
<td class="row1">{L_TR_COLOR1}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="tr_color1" value="{TR_COLOR1}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="tr_color1_name" value="{TR_COLOR1_NAME}">
</tr>
 
<tr>
<td class="row1">{L_TR_COLOR2}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="tr_color2" value="{TR_COLOR2}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="tr_color2_name" value="{TR_COLOR2_NAME}">
</tr>
 
<tr>
<td class="row1">{L_TR_COLOR3}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="tr_color3" value="{TR_COLOR3}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="tr_color3_name" value="{TR_COLOR3_NAME}">
</tr>
<tr>
<td class="row1">{L_TR_CLASS1}:</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="25" name="tr_class1" value="{TR_CLASS1}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="tr_class1_name" value="{TR_CLASS1_NAME}">
</tr>
 
<tr>
<td class="row1">{L_TR_CLASS2}:</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="25" name="tr_class2" value="{TR_CLASS2}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="tr_class2_name" value="{TR_CLASS2_NAME}">
</tr>
 
<tr>
<td class="row1">{L_TR_CLASS3}:</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="25" name="tr_class3" value="{TR_CLASS3}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="tr_class3_name" value="{TR_CLASS3_NAME}">
</tr>
<tr>
<td class="row1">{L_TH_COLOR1}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="th_color1" value="{TH_COLOR1}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="th_color1_name" value="{TH_COLOR1_NAME}">
</tr>
 
<tr>
<td class="row1">{L_TH_COLOR2}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="th_color2" value="{TH_COLOR2}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="th_color2_name" value="{TH_COLOR2_NAME}">
</tr>
 
<tr>
<td class="row1">{L_TH_COLOR3}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="th_color3" value="{TH_COLOR3}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="th_color3_name" value="{TH_COLOR3_NAME}">
</tr>
<tr>
<td class="row1">{L_TH_CLASS1}:</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="25" name="th_class1" value="{TH_CLASS1}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="th_class1_name" value="{TH_CLASS1_NAME}">
</tr>
 
<tr>
<td class="row1">{L_TH_CLASS2}:</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="25" name="th_class2" value="{TH_CLASS2}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="th_class2_name" value="{TH_CLASS2_NAME}">
</tr>
 
<tr>
<td class="row1">{L_TH_CLASS3}:</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="25" name="th_class3" value="{TH_CLASS3}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="th_class3_name" value="{TH_CLASS3_NAME}">
</tr>
<tr>
<td class="row1">{L_TD_COLOR1}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="td_color1" value="{TD_COLOR1}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="td_color1_name" value="{TD_COLOR1_NAME}">
</tr>
 
<tr>
<td class="row1">{L_TD_COLOR2}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="td_color2" value="{TD_COLOR2}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="td_color2_name" value="{TD_COLOR2_NAME}">
</tr>
 
<tr>
<td class="row1">{L_TD_COLOR3}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="td_color3" value="{TD_COLOR3}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="td_color3_name" value="{TD_COLOR3_NAME}">
</tr>
<tr>
<td class="row1">{L_TD_CLASS1}:</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="25" name="td_class1" value="{TD_CLASS1}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="td_class1_name" value="{TD_CLASS1_NAME}">
</tr>
 
<tr>
<td class="row1">{L_TD_CLASS2}:</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="25" name="td_class2" value="{TD_CLASS2}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="td_class2_name" value="{TD_CLASS2_NAME}">
</tr>
 
<tr>
<td class="row1">{L_TD_CLASS3}:</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="25" name="td_class3" value="{TD_CLASS3}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="td_class3_name" value="{TD_CLASS3_NAME}">
</tr>
 
<tr>
<td class="row1">{L_FONTFACE_1}:</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="50" name="fontface1" value="{FONTFACE1}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontface1_name" value="{FONTFACE1_NAME}">
</tr>
 
<tr>
<td class="row1">{L_FONTFACE_2}:</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="50" name="fontface2" value="{FONTFACE2}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontface2_name" value="{FONTFACE2_NAME}">
</tr>
 
<tr>
<td class="row1">{L_FONTFACE_3}:</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="50" name="fontface3" value="{FONTFACE3}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontface3_name" value="{FONTFACE3_NAME}">
</tr>
 
<tr>
<td class="row1">{L_FONTSIZE_1}:</td>
<td class="row2"><input class="post" type="text" size="4" maxlength="4" name="fontsize1" value="{FONTSIZE1}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontsize1_name" value="{FONTSIZE1_NAME}">
</tr>
 
<tr>
<td class="row1">{L_FONTSIZE_2}:</td>
<td class="row2"><input class="post" type="text" size="4" maxlength="4" name="fontsize2" value="{FONTSIZE2}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontsize2_name" value="{FONTSIZE2_NAME}">
</tr>
 
<tr>
<td class="row1">{L_FONTSIZE_3}:</td>
<td class="row2"><input class="post" type="text" size="4" maxlength="4" name="fontsize3" value="{FONTSIZE3}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontsize3_name" value="{FONTSIZE3_NAME}">
</tr>
 
<tr>
<td class="row1">{L_FONTCOLOR_1}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="fontcolor1" value="{FONTCOLOR1}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontcolor1_name" value="{FONTCOLOR1_NAME}">
</tr>
 
<tr>
<td class="row1">{L_FONTCOLOR_2}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="fontcolor2" value="{FONTCOLOR2}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontcolor2_name" value="{FONTCOLOR2_NAME}">
</tr>
 
<tr>
<td class="row1">{L_FONTCOLOR_3}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="fontcolor3" value="{FONTCOLOR3}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontcolor3_name" value="{FONTCOLOR3_NAME}">
</tr>
 
<tr>
<td class="row1">{L_SPAN_CLASS_1}:</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="25" name="span_class1" value="{SPAN_CLASS1}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="span_class1_name" value="{SPAN_CLASS1_NAME}">
</tr>
 
<tr>
<td class="row1">{L_SPAN_CLASS_2}:</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="25" name="span_class2" value="{SPAN_CLASS2}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="span_class2_name" value="{SPAN_CLASS2_NAME}">
</tr>
 
<tr>
<td class="row1">{L_SPAN_CLASS_3}:</td>
<td class="row2"><input class="post" type="text" size="25" maxlength="25" name="span_class3" value="{SPAN_CLASS3}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="span_class3_name" value="{SPAN_CLASS3_NAME}">
</tr>
 
 
<tr>
<td class="catBottom" colspan="3" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SAVE_SETTINGS}" class="mainoption" />
</td>
</tr>
</table></form>
 
<br clear="all">
/Forum/templates/subSilver/admin/styles_exporter.tpl
0,0 → 1,14
 
<h1>{L_STYLE_EXPORTER}</h1>
 
<p>{L_EXPORTER_EXPLAIN}</p>
 
<form method="post" action="{S_EXPORTER_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thHead" align="center">{L_TEMPLATE_SELECT}</th>
</tr>
<tr>
<td class="row1" align="center">{S_TEMPLATE_SELECT}&nbsp;&nbsp;<input type="submit" name="edit" value="{L_SUBMIT}" class="mainoption" />&nbsp;</td>
</tr>
</table></form>
/Forum/templates/subSilver/admin/styles_list_body.tpl
0,0 → 1,21
 
<h1>{L_STYLES_TITLE}</h1>
 
<p>{L_STYLES_TEXT}</p>
 
<table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thCornerL">{L_STYLE}</th>
<th class="thTop">{L_TEMPLATE}</th>
<th class="thTop">{L_EDIT}</th>
<th colspan="2" class="thCornerR">{L_DELETE}</th>
</tr>
<!-- BEGIN styles -->
<tr>
<td class="{styles.ROW_CLASS}">{styles.STYLE_NAME}</td>
<td class="{styles.ROW_CLASS}">{styles.TEMPLATE_NAME}</td>
<td class="{styles.ROW_CLASS}"><a href="{styles.U_STYLES_EDIT}">{L_EDIT}</a></td>
<td class="{styles.ROW_CLASS}"><a href="{styles.U_STYLES_DELETE}">{L_DELETE}</a></td>
</tr>
<!-- END styles -->
</table>
/Forum/templates/subSilver/admin/user_avatar_gallery.tpl
0,0 → 1,36
 
<h1>{L_USER_TITLE}</h1>
 
<p>{L_USER_EXPLAIN}</p>
 
<form action="{S_PROFILE_ACTION}" method="post">
 
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
<tr>
<th class="thHead" colspan="{S_COLSPAN}" height="25" valign="middle">{L_AVATAR_GALLERY}</th>
</tr>
<tr>
<td class="catBottom" align="center" valign="middle" colspan="6" height="28"><span class="genmed">{L_CATEGORY}:&nbsp;<select name="avatarcategory">{S_OPTIONS_CATEGORIES}</select>&nbsp;<input type="submit" class="liteoption" value="{L_GO}" name="avatargallery" /></span></td>
</tr>
<!-- BEGIN avatar_row -->
<tr>
<!-- BEGIN avatar_column -->
<td class="row1" align="center"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" /></td>
<!-- END avatar_column -->
</tr>
<tr>
<!-- BEGIN avatar_option_column -->
<td class="row2" align="center"><input type="radio" name="avatarselect" value="{avatar_row.avatar_option_column.S_OPTIONS_AVATAR}" /></td>
<!-- END avatar_option_column -->
</tr>
 
<!-- END avatar_row -->
<tr>
<td class="catBottom" colspan="{S_COLSPAN}" align="center" height="28">{S_HIDDEN_FIELDS}
<input type="submit" name="submitavatar" value="{L_SELECT_AVATAR}" class="mainoption" />
&nbsp;&nbsp;
<input type="submit" name="cancelavatar" value="{L_RETURN_PROFILE}" class="liteoption" />
</td>
</tr>
</table>
</form>
/Forum/templates/subSilver/admin/user_ban_body.tpl
0,0 → 1,54
 
<h1>{L_BAN_TITLE}</h1>
 
<p>{L_BAN_EXPLAIN}</p>
 
<form method="post" name="post" action="{S_BANLIST_ACTION}"><table width="80%" cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thHead" colspan="2">{L_BAN_USER}</th>
</tr>
<tr>
<td class="row1">{L_USERNAME}:</td>
<td class="row2"><input class="post" type="text" class="post" name="username" maxlength="50" size="20" /> <input type="hidden" name="mode" value="edit" />{S_HIDDEN_FIELDS} <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></td>
</tr>
<tr>
<th class="thHead" colspan="2">{L_UNBAN_USER}</th>
</tr>
<tr>
<td class="row1">{L_USERNAME}: <br /><span class="gensmall">{L_UNBAN_USER_EXPLAIN}</span></td>
<td class="row2">{S_UNBAN_USERLIST_SELECT}</td>
</tr>
<tr>
<th class="thHead" colspan="2">{L_BAN_IP}</th>
</tr>
<tr>
<td class="row1">{L_IP_OR_HOSTNAME}: <br /><span class="gensmall">{L_BAN_IP_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" name="ban_ip" size="35" /></td>
</tr>
<tr>
<th class="thHead" colspan="2">{L_UNBAN_IP}</th>
</tr>
<tr>
<td class="row1">{L_IP_OR_HOSTNAME}: <br /><span class="gensmall">{L_UNBAN_IP_EXPLAIN}</span></td>
<td class="row2">{S_UNBAN_IPLIST_SELECT}</td>
</tr>
<tr>
<th class="thHead" colspan="2">{L_BAN_EMAIL}</th>
</tr>
<tr>
<td class="row1">{L_EMAIL_ADDRESS}: <br /><span class="gensmall">{L_BAN_EMAIL_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" name="ban_email" size="35" /></td>
</tr>
<tr>
<th class="thHead" colspan="2">{L_UNBAN_EMAIL}</th>
</tr>
<tr>
<td class="row1">{L_EMAIL_ADDRESS}: <br /><span class="gensmall">{L_UNBAN_EMAIL_EXPLAIN}</span></td>
<td class="row2">{S_UNBAN_EMAILLIST_SELECT}</td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center"><input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" />&nbsp;&nbsp;<input type="reset" value="{L_RESET}" class="liteoption" /></td>
</tr>
</table></form>
 
<p>{L_BAN_EXPLAIN_WARN}</p>
/Forum/templates/subSilver/admin/user_edit_body.tpl
0,0 → 1,310
 
<h1>{L_USER_TITLE}</h1>
 
<p>{L_USER_EXPLAIN}</p>
 
{ERROR_BOX}
 
<form action="{S_PROFILE_ACTION}" {S_FORM_ENCTYPE} method="post"><table width="98%" cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thHead" colspan="2">{L_REGISTRATION_INFO}</th>
</tr>
<tr>
<td class="row2" colspan="2"><span class="gensmall">{L_ITEMS_REQUIRED}</span></td>
</tr>
<tr>
<td class="row1" width="38%"><span class="gen">{L_USERNAME}: *</span></td>
<td class="row2">
<input class="post" type="text" name="username" size="35" maxlength="40" value="{USERNAME}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_EMAIL_ADDRESS}: *</span></td>
<td class="row2">
<input class="post" type="text" name="email" size="35" maxlength="255" value="{EMAIL}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_NEW_PASSWORD}: *</span><br />
<span class="gensmall">{L_PASSWORD_IF_CHANGED}</span></td>
<td class="row2">
<input class="post" type="password" name="password" size="35" maxlength="32" value="" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_CONFIRM_PASSWORD}: * </span><br />
<span class="gensmall">{L_PASSWORD_CONFIRM_IF_CHANGED}</span></td>
<td class="row2">
<input class="post" type="password" name="password_confirm" size="35" maxlength="32" value="" />
</td>
</tr>
<tr>
<td class="catsides" colspan="2">&nbsp;</td>
</tr>
<tr>
<th class="thSides" colspan="2">{L_PROFILE_INFO}</th>
</tr>
<tr>
<td class="row2" colspan="2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_ICQ_NUMBER}</span></td>
<td class="row2">
<input class="post" type="text" name="icq" size="10" maxlength="15" value="{ICQ}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_AIM}</span></td>
<td class="row2">
<input class="post" type="text" name="aim" size="20" maxlength="255" value="{AIM}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_MESSENGER}</span></td>
<td class="row2">
<input class="post" type="text" name="msn" size="20" maxlength="255" value="{MSN}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_YAHOO}</span></td>
<td class="row2">
<input class="post" type="text" name="yim" size="20" maxlength="255" value="{YIM}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_WEBSITE}</span></td>
<td class="row2">
<input class="post" type="text" name="website" size="35" maxlength="255" value="{WEBSITE}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_LOCATION}</span></td>
<td class="row2">
<input class="post" type="text" name="location" size="35" maxlength="100" value="{LOCATION}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_OCCUPATION}</span></td>
<td class="row2">
<input class="post" type="text" name="occupation" size="35" maxlength="100" value="{OCCUPATION}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_INTERESTS}</span></td>
<td class="row2">
<input class="post" type="text" name="interests" size="35" maxlength="150" value="{INTERESTS}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_SIGNATURE}</span><br />
<span class="gensmall">{L_SIGNATURE_EXPLAIN}<br />
<br />
{HTML_STATUS}<br />
{BBCODE_STATUS}<br />
{SMILIES_STATUS}</span></td>
<td class="row2">
<textarea class="post" name="signature" rows="6" cols="45">{SIGNATURE}</textarea>
</td>
</tr>
<tr>
<td class="catsides" colspan="2"><span class="cattitle">&nbsp;</span></td>
</tr>
<tr>
<th class="thSides" colspan="2">{L_PREFERENCES}</th>
</tr>
<tr>
<td class="row1"><span class="gen">{L_PUBLIC_VIEW_EMAIL}</span></td>
<td class="row2">
<input type="radio" name="viewemail" value="1" {VIEW_EMAIL_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="viewemail" value="0" {VIEW_EMAIL_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_HIDE_USER}</span></td>
<td class="row2">
<input type="radio" name="hideonline" value="1" {HIDE_USER_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="hideonline" value="0" {HIDE_USER_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_NOTIFY_ON_REPLY}</span></td>
<td class="row2">
<input type="radio" name="notifyreply" value="1" {NOTIFY_REPLY_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="notifyreply" value="0" {NOTIFY_REPLY_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_NOTIFY_ON_PRIVMSG}</span></td>
<td class="row2">
<input type="radio" name="notifypm" value="1" {NOTIFY_PM_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_POPUP_ON_PRIVMSG}</span></td>
<td class="row2">
<input type="radio" name="popup_pm" value="1" {POPUP_PM_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="popup_pm" value="0" {POPUP_PM_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ADD_SIGNATURE}</span></td>
<td class="row2">
<input type="radio" name="attachsig" value="1" {ALWAYS_ADD_SIGNATURE_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="attachsig" value="0" {ALWAYS_ADD_SIGNATURE_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_BBCODE}</span></td>
<td class="row2">
<input type="radio" name="allowbbcode" value="1" {ALWAYS_ALLOW_BBCODE_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="allowbbcode" value="0" {ALWAYS_ALLOW_BBCODE_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_HTML}</span></td>
<td class="row2">
<input type="radio" name="allowhtml" value="1" {ALWAYS_ALLOW_HTML_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="allowhtml" value="0" {ALWAYS_ALLOW_HTML_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_SMILIES}</span></td>
<td class="row2">
<input type="radio" name="allowsmilies" value="1" {ALWAYS_ALLOW_SMILIES_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_BOARD_LANGUAGE}</span></td>
<td class="row2">{LANGUAGE_SELECT}</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_BOARD_STYLE}</span></td>
<td class="row2">{STYLE_SELECT}</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_TIMEZONE}</span></td>
<td class="row2">{TIMEZONE_SELECT}</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_DATE_FORMAT}</span><br />
<span class="gensmall">{L_DATE_FORMAT_EXPLAIN}</span></td>
<td class="row2">
<input class="post" type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="16" />
</td>
</tr>
<tr>
<td class="catSides" colspan="2"><span class="cattitle">&nbsp;</span></td>
</tr>
<tr>
<th class="thSides" colspan="2" height="12" valign="middle">{L_AVATAR_PANEL}</th>
</tr>
<tr align="center">
<td class="row1" colspan="2">
<table width="70%" cellspacing="2" cellpadding="0" border="0">
<tr>
<td width="65%"><span class="gensmall">{L_AVATAR_EXPLAIN}</span></td>
<td align="center"><span class="gensmall">{L_CURRENT_IMAGE}</span><br />
{AVATAR}<br />
<input type="checkbox" name="avatardel" />
&nbsp;<span class="gensmall">{L_DELETE_AVATAR}</span></td>
</tr>
</table>
</td>
</tr>
 
<!-- BEGIN avatar_local_upload -->
<tr>
<td class="row1"><span class="gen">{L_UPLOAD_AVATAR_FILE}</span></td>
<td class="row2">
<input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" />
<input type="file" name="avatar" class="post" style="width: 200px" />
</td>
</tr>
<!-- END avatar_local_upload -->
<!-- BEGIN avatar_remote_upload -->
<tr>
<td class="row1"><span class="gen">{L_UPLOAD_AVATAR_URL}</span></td>
<td class="row2">
<input class="post" type="text" name="avatarurl" size="40" style="width: 200px" />
</td>
</tr>
<!-- END avatar_remote_upload -->
<!-- BEGIN avatar_remote_link -->
<tr>
<td class="row1"><span class="gen">{L_LINK_REMOTE_AVATAR}</span></td>
<td class="row2">
<input class="post" type="text" name="avatarremoteurl" size="40" style="width: 200px" />
</td>
</tr>
<!-- END avatar_remote_link -->
<!-- BEGIN avatar_local_gallery -->
<tr>
<td class="row1"><span class="gen">{L_AVATAR_GALLERY}</span></td>
<td class="row2">
<input type="submit" name="avatargallery" value="{L_SHOW_GALLERY}" class="liteoption" />
</td>
</tr>
<!-- END avatar_local_gallery -->
 
<tr>
<td class="catSides" colspan="2">&nbsp;</td>
</tr>
<tr>
<th class="thSides" colspan="2">{L_SPECIAL}</th>
</tr>
<tr>
<td class="row1" colspan="2"><span class="gensmall">{L_SPECIAL_EXPLAIN}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_USER_ACTIVE}</span></td>
<td class="row2">
<input type="radio" name="user_status" value="1" {USER_ACTIVE_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="user_status" value="0" {USER_ACTIVE_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_ALLOW_PM}</span></td>
<td class="row2">
<input type="radio" name="user_allowpm" value="1" {ALLOW_PM_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="user_allowpm" value="0" {ALLOW_PM_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_ALLOW_AVATAR}</span></td>
<td class="row2">
<input type="radio" name="user_allowavatar" value="1" {ALLOW_AVATAR_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="user_allowavatar" value="0" {ALLOW_AVATAR_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_SELECT_RANK}</span></td>
<td class="row2"><select name="user_rank">{RANK_SELECT_BOX}</select></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_DELETE_USER}?</span></td>
<td class="row2">
<input type="checkbox" name="deleteuser">
{L_DELETE_USER_EXPLAIN}</td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center">{S_HIDDEN_FIELDS}
<input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" />
&nbsp;&nbsp;
<input type="reset" value="{L_RESET}" class="liteoption" />
</td>
</tr>
</table></form>
/Forum/templates/subSilver/admin/user_email_body.tpl
0,0 → 1,31
 
<h1>{L_EMAIL_TITLE}</h1>
 
<p>{L_EMAIL_EXPLAIN}</p>
 
<form method="post" action="{S_USER_ACTION}">
 
{ERROR_BOX}
 
<table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thHead" colspan="2">{L_COMPOSE}</th>
</tr>
<tr>
<td class="row1" align="right"><b>{L_RECIPIENTS}</b></td>
<td class="row2" align="left">{S_GROUP_SELECT}</td>
</tr>
<tr>
<td class="row1" align="right"><b>{L_EMAIL_SUBJECT}</b></td>
<td class="row2"><span class="gen"><input class="post" type="text" name="subject" size="45" maxlength="100" tabindex="2" class="post" value="{SUBJECT}" /></span></td>
</tr>
<tr>
<td class="row1" align="right" valign="top"> <span class="gen"><b>{L_EMAIL_MSG}</b></span>
<td class="row2"><span class="gen"> <textarea name="message" rows="15" cols="35" wrap="virtual" style="width:450px" tabindex="3" class="post">{MESSAGE}</textarea></span>
</tr>
<tr>
<td class="catBottom" align="center" colspan="2"><input type="submit" value="{L_EMAIL}" name="submit" class="mainoption" /></td>
</tr>
</table>
 
</form>
/Forum/templates/subSilver/admin/user_select_body.tpl
0,0 → 1,13
 
<h1>{L_USER_TITLE}</h1>
 
<p>{L_USER_EXPLAIN}</p>
 
<form method="post" name="post" action="{S_USER_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thHead" align="center">{L_USER_SELECT}</th>
</tr>
<tr>
<td class="row1" align="center"><input type="text" class="post" name="username" maxlength="50" size="20" /> <input type="hidden" name="mode" value="edit" />{S_HIDDEN_FIELDS}<input type="submit" name="submituser" value="{L_LOOK_UP}" class="mainoption" /> <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></td>
</tr>
</table></form>
/Forum/templates/subSilver/admin/words_edit_body.tpl
0,0 → 1,21
 
<h1>{L_WORDS_TITLE}</h1>
 
<p>{L_WORDS_TEXT}</p>
 
<form method="post" action="{S_WORDS_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th colspan="2" class="thHead">{L_WORD_CENSOR}</th>
</tr>
<tr>
<td class="row1">{L_WORD}</td>
<td class="row2"><input class="post" type="text" name="word" value="{WORD}" /></td>
</tr>
<tr>
<td class="row1">{L_REPLACEMENT}</td>
<td class="row2"><input class="post" type="text" name="replacement" value="{REPLACEMENT}" /></td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="save" value="{L_SUBMIT}" class="mainoption" /></td>
</tr>
</table></form>
/Forum/templates/subSilver/admin/words_list_body.tpl
0,0 → 1,23
 
<h1>{L_WORDS_TITLE}</h1>
 
<P>{L_WORDS_TEXT}</p>
 
<form method="post" action="{S_WORDS_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thCornerL">{L_WORD}</th>
<th class="thTop">{L_REPLACEMENT}</th>
<th colspan="2" class="thCornerR">{L_ACTION}</th>
</tr>
<!-- BEGIN words -->
<tr>
<td class="{words.ROW_CLASS}" align="center">{words.WORD}</td>
<td class="{words.ROW_CLASS}" align="center">{words.REPLACEMENT}</td>
<td class="{words.ROW_CLASS}"><a href="{words.U_WORD_EDIT}">{L_EDIT}</a></td>
<td class="{words.ROW_CLASS}"><a href="{words.U_WORD_DELETE}">{L_DELETE}</a></td>
</tr>
<!-- END words -->
<tr>
<td colspan="5" align="center" class="catBottom">{S_HIDDEN_FIELDS}<input type="submit" name="add" value="{L_ADD_WORD}" class="mainoption" /></td>
</tr>
</table></form>
/Forum/templates/subSilver/agreement.tpl
0,0 → 1,19
 
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a></span></td>
</tr>
</table>
 
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
<tr>
<th class="thHead" height="25" valign="middle">{SITENAME} - {REGISTRATION}</th>
</tr>
<tr>
<td class="row1" align="center"><table width="80%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td><span class="genmed"><br />{AGREEMENT}<br /><br /><br /><div align="center"><a href="{U_AGREE_OVER13}" class="genmed">{AGREE_OVER_13}</a><br /><br /><a href="{U_AGREE_UNDER13}" class="genmed">{AGREE_UNDER_13}</a><br /><br /><a href="{U_INDEX}" class="genmed">{DO_NOT_AGREE}</a></div><br /></span></td>
</tr>
</table></td>
</tr>
</table>
/Forum/templates/subSilver/bbcode.tpl
0,0 → 1,60
<!-- BEGIN ulist_open --><ul><!-- END ulist_open -->
<!-- BEGIN ulist_close --></ul><!-- END ulist_close -->
 
<!-- BEGIN olist_open --><ol type="{LIST_TYPE}"><!-- END olist_open -->
<!-- BEGIN olist_close --></ol><!-- END olist_close -->
 
<!-- BEGIN listitem --><li><!-- END listitem -->
 
<!-- BEGIN quote_username_open --></span>
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<td><span class="genmed"><b>{USERNAME} {L_WROTE}:</b></span></td>
</tr>
<tr>
<td class="quote"><!-- END quote_username_open -->
<!-- BEGIN quote_open --></span>
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<td><span class="genmed"><b>{L_QUOTE}:</b></span></td>
</tr>
<tr>
<td class="quote"><!-- END quote_open -->
<!-- BEGIN quote_close --></td>
</tr>
</table>
<span class="postbody"><!-- END quote_close -->
 
<!-- BEGIN code_open --></span>
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<td><span class="genmed"><b>{L_CODE}:</b></span></td>
</tr>
<tr>
<td class="code"><!-- END code_open -->
<!-- BEGIN code_close --></td>
</tr>
</table>
<span class="postbody"><!-- END code_close -->
 
 
<!-- BEGIN b_open --><span style="font-weight: bold"><!-- END b_open -->
<!-- BEGIN b_close --></span><!-- END b_close -->
 
<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open -->
<!-- BEGIN u_close --></span><!-- END u_close -->
 
<!-- BEGIN i_open --><span style="font-style: italic"><!-- END i_open -->
<!-- BEGIN i_close --></span><!-- END i_close -->
 
<!-- BEGIN color_open --><span style="color: {COLOR}"><!-- END color_open -->
<!-- BEGIN color_close --></span><!-- END color_close -->
 
<!-- BEGIN size_open --><span style="font-size: {SIZE}px; line-height: normal"><!-- END size_open -->
<!-- BEGIN size_close --></span><!-- END size_close -->
 
<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->
 
<!-- BEGIN url --><a href="{URL}" target="_blank" class="postlink">{DESCRIPTION}</a><!-- END url -->
 
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</a><!-- END email -->
/Forum/templates/subSilver/confirm_body.tpl
0,0 → 1,17
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td class="nav" align="left"><a class="nav" href="{U_INDEX}">{L_INDEX}</a></td>
</tr>
</table>
 
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
<tr>
<th class="thHead" height="25" valign="middle">{MESSAGE_TITLE}</th>
</tr>
<tr>
<td class="row1" align="center"><form action="{S_CONFIRM_ACTION}" method="post"><span class="gen"><br />{MESSAGE_TEXT}<br /><br />{S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{L_YES}" class="mainoption" />&nbsp;&nbsp;<input type="submit" name="cancel" value="{L_NO}" class="liteoption" /></span></form></td>
</tr>
</table>
 
<br clear="all" />
/Forum/templates/subSilver/error_body.tpl
0,0 → 1,18
<table class="forumline" width="100%" cellspacing="1" cellpadding="4" border="0">
<tr>
<td><table width="100%" cellspacing="0" cellpadding="1" border="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td align="center"><span class="gen">{ERROR_MESSAGE}</span></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
 
<br clear="all" />
/Forum/templates/subSilver/faq_body.tpl
0,0 → 1,52
 
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></td>
</tr>
</table>
 
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<th class="thHead">{L_FAQ_TITLE}</th>
</tr>
<tr>
<td class="row1">
<!-- BEGIN faq_block_link -->
<span class="gen"><b>{faq_block_link.BLOCK_TITLE}</b></span><br />
<!-- BEGIN faq_row_link -->
<span class="gen"><a href="{faq_block_link.faq_row_link.U_FAQ_LINK}" class="postlink">{faq_block_link.faq_row_link.FAQ_LINK}</a></span><br />
<!-- END faq_row_link -->
<br />
<!-- END faq_block_link -->
</td>
</tr>
<tr>
<td class="catBottom" height="28">&nbsp;</td>
</tr>
</table>
 
<br clear="all" />
 
<!-- BEGIN faq_block -->
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<td class="catHead" height="28" align="center"><span class="cattitle">{faq_block.BLOCK_TITLE}</span></td>
</tr>
<!-- BEGIN faq_row -->
<tr>
<td class="{faq_block.faq_row.ROW_CLASS}" align="left" valign="top"><span class="postbody"><a name="{faq_block.faq_row.U_FAQ_ID}"></a><b>{faq_block.faq_row.FAQ_QUESTION}</b></span><br /><span class="postbody">{faq_block.faq_row.FAQ_ANSWER}<br /><a class="postlink" href="#top">{L_BACK_TO_TOP}</a></span></td>
</tr>
<tr>
<td class="spaceRow" height="1"><img src="templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<!-- END faq_row -->
</table>
 
<br clear="all" />
<!-- END faq_block -->
 
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
<td align="right" valign="middle" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><br />{JUMPBOX}</td>
</tr>
</table>
/Forum/templates/subSilver/formIE.css
0,0 → 1,19
/* Fancy form styles for IE */
 
input, textarea, select {
border-top-width : 1px;
border-right-width : 1px;
border-bottom-width : 1px;
border-left-width : 1px;
}
 
input { text-indent : 2px; }
 
input.button {
border-top-width : 1px;
border-right-width : 1px;
border-bottom-width : 1px;
border-left-width : 1px;
}
 
.postbody { line-height: 18px}
/Forum/templates/subSilver/groupcp_info_body.tpl
0,0 → 1,128
<form action="{S_GROUPCP_ACTION}" method="post">
 
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></td>
</tr>
</table>
 
<table class="forumline" width="100%" cellspacing="1" cellpadding="4" border="0">
<tr>
<th class="thHead" colspan="7" height="25">{L_GROUP_INFORMATION}</th>
</tr>
<tr>
<td class="row1" width="20%"><span class="gen">{L_GROUP_NAME}:</span></td>
<td class="row2"><span class="gen"><b>{GROUP_NAME}</b></span></td>
</tr>
<tr>
<td class="row1" width="20%"><span class="gen">{L_GROUP_DESC}:</span></td>
<td class="row2"><span class="gen">{GROUP_DESC}</span></td>
</tr>
<tr>
<td class="row1" width="20%"><span class="gen">{L_GROUP_MEMBERSHIP}:</span></td>
<td class="row2"><span class="gen">{GROUP_DETAILS} &nbsp;&nbsp;
<!-- BEGIN switch_subscribe_group_input -->
<input class="mainoption" type="submit" name="joingroup" value="{L_JOIN_GROUP}" />
<!-- END switch_subscribe_group_input -->
<!-- BEGIN switch_unsubscribe_group_input -->
<input class="mainoption" type="submit" name="unsub" value="{L_UNSUBSCRIBE_GROUP}" />
<!-- END switch_unsubscribe_group_input -->
</span></td>
</tr>
<!-- BEGIN switch_mod_option -->
<tr>
<td class="row1" width="20%"><span class="gen">{L_GROUP_TYPE}:</span></td>
<td class="row2"><span class="gen"><input type="radio" name="group_type" value="{S_GROUP_OPEN_TYPE}" {S_GROUP_OPEN_CHECKED} /> {L_GROUP_OPEN} &nbsp;&nbsp;<input type="radio" name="group_type" value="{S_GROUP_CLOSED_TYPE}" {S_GROUP_CLOSED_CHECKED} /> {L_GROUP_CLOSED} &nbsp;&nbsp;<input type="radio" name="group_type" value="{S_GROUP_HIDDEN_TYPE}" {S_GROUP_HIDDEN_CHECKED} /> {L_GROUP_HIDDEN} &nbsp;&nbsp; <input class="mainoption" type="submit" name="groupstatus" value="{L_UPDATE}" /></span></td>
</tr>
<!-- END switch_mod_option -->
</table>
 
{S_HIDDEN_FIELDS}
 
</form>
 
<form action="{S_GROUPCP_ACTION}" method="post" name="post">
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline">
<tr>
<th class="thCornerL" height="25">{L_PM}</th>
<th class="thTop">{L_USERNAME}</th>
<th class="thTop">{L_POSTS}</th>
<th class="thTop">{L_FROM}</th>
<th class="thTop">{L_EMAIL}</th>
<th class="thTop">{L_WEBSITE}</th>
<th class="thCornerR">{L_SELECT}</th>
</tr>
<tr>
<td class="catSides" colspan="8" height="28"><span class="cattitle">{L_GROUP_MODERATOR}</span></td>
</tr>
<tr>
<td class="row1" align="center"> {MOD_PM_IMG} </td>
<td class="row1" align="center"><span class="gen"><a href="{U_MOD_VIEWPROFILE}" class="gen">{MOD_USERNAME}</a></span></td>
<td class="row1" align="center" valign="middle"><span class="gen">{MOD_POSTS}</span></td>
<td class="row1" align="center" valign="middle"><span class="gen">{MOD_FROM}</span></td>
<td class="row1" align="center" valign="middle"><span class="gen">{MOD_EMAIL_IMG}</span></td>
<td class="row1" align="center">{MOD_WWW_IMG}</td>
<td class="row1" align="center"> &nbsp; </td>
</tr>
<tr>
<td class="catSides" colspan="8" height="28"><span class="cattitle">{L_GROUP_MEMBERS}</span></td>
</tr>
<!-- BEGIN member_row -->
<tr>
<td class="{member_row.ROW_CLASS}" align="center"> {member_row.PM_IMG} </td>
<td class="{member_row.ROW_CLASS}" align="center"><span class="gen"><a href="{member_row.U_VIEWPROFILE}" class="gen">{member_row.USERNAME}</a></span></td>
<td class="{member_row.ROW_CLASS}" align="center"><span class="gen">{member_row.POSTS}</span></td>
<td class="{member_row.ROW_CLASS}" align="center"><span class="gen"> {member_row.FROM}
</span></td>
<td class="{member_row.ROW_CLASS}" align="center" valign="middle"><span class="gen">{member_row.EMAIL_IMG}</span></td>
<td class="{member_row.ROW_CLASS}" align="center"> {member_row.WWW_IMG}</td>
<td class="{member_row.ROW_CLASS}" align="center">
<!-- BEGIN switch_mod_option -->
<input type="checkbox" name="members[]" value="{member_row.USER_ID}" />
<!-- END switch_mod_option -->
</td>
</tr>
<!-- END member_row -->
 
<!-- BEGIN switch_no_members -->
<tr>
<td class="row1" colspan="7" align="center"><span class="gen">{L_NO_MEMBERS}</span></td>
</tr>
<!-- END switch_no_members -->
 
<!-- BEGIN switch_hidden_group -->
<tr>
<td class="row1" colspan="7" align="center"><span class="gen">{L_HIDDEN_MEMBERS}</span></td>
</tr>
<!-- END switch_hidden_group -->
 
<!-- BEGIN switch_mod_option -->
<tr>
<td class="catBottom" colspan="8" align="right">
<span class="cattitle"><input type="submit" name="remove" value="{L_REMOVE_SELECTED}" class="mainoption" /></span>
</td>
</tr>
<!-- END switch_mod_option -->
</table>
 
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="left" valign="top">
<!-- BEGIN switch_mod_option -->
<span class="genmed"><input type="text" class="post" name="username" maxlength="50" size="20" /> <input type="submit" name="add" value="{L_ADD_MEMBER}" class="mainoption" /> <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></span><br /><br />
<!-- END switch_mod_option -->
<span class="nav">{PAGE_NUMBER}</span></td>
<td align="right" valign="top"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td>
</tr>
</table>
 
{PENDING_USER_BOX}
 
{S_HIDDEN_FIELDS}</form>
 
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
<td valign="top" align="right">{JUMPBOX}</td>
</tr>
</table>
/Forum/templates/subSilver/groupcp_pending_info.tpl
0,0 → 1,36
 
<br clear="all" />
 
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline">
<tr>
<th class="thCornerL" height="25">{L_PM}</th>
<th class="thTop">{L_USERNAME}</th>
<th class="thTop">{L_POSTS}</th>
<th class="thTop">{L_FROM}</th>
<th class="thTop">{L_EMAIL}</th>
<th class="thTop">{L_WEBSITE}</th>
<th class="thCornerR">{L_SELECT}</th>
</tr>
<tr>
<td class="catSides" colspan="8" height="28"><span class="cattitle">{L_PENDING_MEMBERS}</span></td>
</tr>
<!-- BEGIN pending_members_row -->
<tr>
<td class="{pending_members_row.ROW_CLASS}" align="center"> {pending_members_row.PM_IMG}
</td>
<td class="{pending_members_row.ROW_CLASS}" align="center"><span class="gen"><a href="{pending_members_row.U_VIEWPROFILE}" class="gen">{pending_members_row.USERNAME}</a></span></td>
<td class="{pending_members_row.ROW_CLASS}" align="center"><span class="gen">{pending_members_row.POSTS}</span></td>
<td class="{pending_members_row.ROW_CLASS}" align="center"><span class="gen">{pending_members_row.FROM}</span></td>
<td class="{pending_members_row.ROW_CLASS}" align="center"><span class="gen">{pending_members_row.EMAIL_IMG}</span></td>
<td class="{pending_members_row.ROW_CLASS}" align="center"><span class="gen">{pending_members_row.WWW_IMG}</span></td>
<td class="{pending_members_row.ROW_CLASS}" align="center"><span class="gensmall"> <input type="checkbox" name="pending_members[]" value="{pending_members_row.USER_ID}" checked="checked" /></span></td>
</tr>
<!-- END pending_members_row -->
<tr>
<td class="cat" colspan="8" align="right"><span class="cattitle">
<input type="submit" name="approve" value="{L_APPROVE_SELECTED}" class="mainoption" />
&nbsp;
<input type="submit" name="deny" value="{L_DENY_SELECTED}" class="liteoption" />
</span></td>
</tr>
</table>
/Forum/templates/subSilver/groupcp_user_body.tpl
0,0 → 1,76
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
</tr>
</table>
 
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline">
<!-- BEGIN switch_groups_joined -->
<tr>
<th colspan="2" align="center" class="thHead" height="25">{L_GROUP_MEMBERSHIP_DETAILS}</th>
</tr>
<!-- BEGIN switch_groups_member -->
<tr>
<td class="row1"><span class="gen">{L_YOU_BELONG_GROUPS}</span></td>
<td class="row2" align="right">
<table width="90%" cellspacing="0" cellpadding="0" border="0">
<tr><form method="get" action="{S_USERGROUP_ACTION}">
<td width="40%"><span class="gensmall">{GROUP_MEMBER_SELECT}</span></td>
<td align="center" width="30%">
<input type="submit" value="{L_VIEW_INFORMATION}" class="liteoption" />{S_HIDDEN_FIELDS}
</td>
</form></tr>
</table>
</td>
</tr>
<!-- END switch_groups_member -->
<!-- BEGIN switch_groups_pending -->
<tr>
<td class="row1"><span class="gen">{L_PENDING_GROUPS}</span></td>
<td class="row2" align="right">
<table width="90%" cellspacing="0" cellpadding="0" border="0">
<tr><form method="get" action="{S_USERGROUP_ACTION}">
<td width="40%"><span class="gensmall">{GROUP_PENDING_SELECT}</span></td>
<td align="center" width="30%">
<input type="submit" value="{L_VIEW_INFORMATION}" class="liteoption" />{S_HIDDEN_FIELDS}
</td>
</form></tr>
</table>
</td>
</tr>
<!-- END switch_groups_pending -->
<!-- END switch_groups_joined -->
<!-- BEGIN switch_groups_remaining -->
<tr>
<th colspan="2" align="center" class="thHead" height="25">{L_JOIN_A_GROUP}</th>
</tr>
<tr>
<td class="row1"><span class="gen">{L_SELECT_A_GROUP}</span></td>
<td class="row2" align="right">
<table width="90%" cellspacing="0" cellpadding="0" border="0">
<tr><form method="get" action="{S_USERGROUP_ACTION}">
<td width="40%"><span class="gensmall">{GROUP_LIST_SELECT}</span></td>
<td align="center" width="30%">
<input type="submit" value="{L_VIEW_INFORMATION}" class="liteoption" />{S_HIDDEN_FIELDS}
</td>
</form></tr>
</table>
</td>
</tr>
<!-- END switch_groups_remaining -->
</table>
 
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="right" valign="top"><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
</table>
 
<br clear="all" />
 
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
<td valign="top" align="right">{JUMPBOX}</td>
</tr>
</table>
/Forum/templates/subSilver/images/cellpic.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/cellpic1.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/cellpic2.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/cellpic3.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/created_by.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/folder.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/folder_announce.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/folder_announce_new.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/folder_big.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/folder_hot.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/folder_lock.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/folder_lock_new.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/folder_locked_big.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/folder_new.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/folder_new_big.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/folder_new_hot.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/folder_sticky.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/folder_sticky_new.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/icon_delete.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/icon_latest_reply.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/icon_mini_faq.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/icon_mini_groups.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/icon_mini_login.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/icon_mini_members.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/icon_mini_message.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/icon_mini_profile.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/icon_mini_register.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/icon_mini_search.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/icon_minipost.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/icon_minipost_new.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/icon_newest_reply.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/index.htm
0,0 → 1,16
<html>
<head>
<title>subSilver created by subBlue Design</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
 
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center" valign="middle"><a href="http://www.subblue.com/" target="_new"><img src="created_by.jpg" width="400" height="300" border="0" alt="Created by subBlue Design" /></a></td>
</tr>
</table>
 
</body>
</html>
/Forum/templates/subSilver/images/lang_english/icon_aim.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/lang_english/icon_edit.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/lang_english/icon_email.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/lang_english/icon_icq_add.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/lang_english/icon_ip.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/lang_english/icon_msnm.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/lang_english/icon_pm.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/lang_english/icon_profile.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/lang_english/icon_quote.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/lang_english/icon_search.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/lang_english/icon_www.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/lang_english/icon_yim.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/lang_english/msg_newpost.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/lang_english/post.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/lang_english/reply-locked.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/lang_english/reply.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/logo_phpBB.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/logo_phpBB_med.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/msg_inbox.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/msg_outbox.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/msg_savebox.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/msg_sentbox.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/spacer.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/topic_delete.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/topic_lock.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/topic_move.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/topic_split.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/topic_unlock.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/vote_lcap.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/vote_rcap.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/voting_bar.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/images/whosonline.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Forum/templates/subSilver/index.htm
0,0 → 1,16
<html>
<head>
<title>subSilver created by subBlue Design</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
 
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center" valign="middle"><a href="http://www.subblue.com/" target="_new"><img src="images/created_by.jpg" width="400" height="300" border="0" alt="Created by subBlue Design" /></a></td>
</tr>
</table>
 
</body>
</html>
/Forum/templates/subSilver/index_body.tpl
0,0 → 1,109
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
<tr>
<td align="left" valign="bottom"><span class="gensmall">
<!-- BEGIN switch_user_logged_in -->
{LAST_VISIT_DATE}<br />
<!-- END switch_user_logged_in -->
{CURRENT_TIME}<br /></span><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
<td align="right" valign="bottom" class="gensmall">
<!-- BEGIN switch_user_logged_in -->
<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
<!-- END switch_user_logged_in -->
<a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td>
</tr>
</table>
 
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th>
<th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
<th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th>
<th class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
</tr>
<!-- BEGIN catrow -->
<tr>
<td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
<td class="rowpic" colspan="3" align="right">&nbsp;</td>
</tr>
<!-- BEGIN forumrow -->
<tr>
<td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
<td class="row1" width="100%" height="50"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />
</span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
</span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td>
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td>
<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
</tr>
<!-- END forumrow -->
<!-- END catrow -->
</table>
 
<table width="100%" cellspacing="0" border="0" align="center" cellpadding="2">
<tr>
<td align="left">
<!-- BEGIN switch_user_logged_in -->
<span class="gensmall"><a href="{U_MARK_READ}" class="gensmall">{L_MARK_FORUMS_READ}</a></span>
<!-- END switch_user_logged_in -->
</td>
<td align="right"><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
</table>
 
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" colspan="2" height="28"><span class="cattitle"><a href="{U_VIEWONLINE}" class="cattitle">{L_WHO_IS_ONLINE}</a></span></td>
</tr>
<tr>
<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
<td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>
</td>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
</tr>
</table>
 
<table width="100%" cellpadding="1" cellspacing="1" border="0">
<tr>
<td align="left" valign="top"><span class="gensmall">{L_ONLINE_EXPLAIN}</span></td>
</tr>
</table>
 
<!-- BEGIN switch_user_logged_out -->
<form method="post" action="{S_LOGIN_ACTION}">
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="28"><a name="login"></a><span class="cattitle">{L_LOGIN_LOGOUT}</span></td>
</tr>
<tr>
<td class="row1" align="center" valign="middle" height="28"><span class="gensmall">{L_USERNAME}:
<input class="post" type="text" name="username" size="10" />
&nbsp;&nbsp;&nbsp;{L_PASSWORD}:
<input class="post" type="password" name="password" size="10" maxlength="32" />
<!-- BEGIN switch_allow_autologin -->
&nbsp;&nbsp; &nbsp;&nbsp;{L_AUTO_LOGIN}
<input class="text" type="checkbox" name="autologin" />
<!-- END switch_allow_autologin -->
&nbsp;&nbsp;&nbsp;
<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" />
</span> </td>
</tr>
</table>
</form>
<!-- END switch_user_logged_out -->
 
<br clear="all" />
 
<table cellspacing="3" border="0" align="center" cellpadding="0">
<tr>
<td width="20" align="center"><img src="templates/subSilver/images/folder_new_big.gif" alt="{L_NEW_POSTS}"/></td>
<td><span class="gensmall">{L_NEW_POSTS}</span></td>
<td>&nbsp;&nbsp;</td>
<td width="20" align="center"><img src="templates/subSilver/images/folder_big.gif" alt="{L_NO_NEW_POSTS}" /></td>
<td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
<td>&nbsp;&nbsp;</td>
<td width="20" align="center"><img src="templates/subSilver/images/folder_locked_big.gif" alt="{L_FORUM_LOCKED}" /></td>
<td><span class="gensmall">{L_FORUM_LOCKED}</span></td>
</tr>
</table>
/Forum/templates/subSilver/jumpbox.tpl
0,0 → 1,6
 
<form method="get" name="jumpbox" action="{S_JUMPBOX_ACTION}" onSubmit="if(document.jumpbox.f.value == -1){return false;}"><table cellspacing="0" cellpadding="0" border="0">
<tr>
<td nowrap="nowrap"><span class="gensmall">{L_JUMP_TO}:&nbsp;{S_JUMPBOX_SELECT}&nbsp;<input type="submit" value="{L_GO}" class="liteoption" /></span></td>
</tr>
</table></form>
/Forum/templates/subSilver/login_body.tpl
0,0 → 1,46
<form action="{S_LOGIN_ACTION}" method="post" target="_top">
 
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></td>
</tr>
</table>
 
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
<tr>
<th height="25" class="thHead" nowrap="nowrap">{L_ENTER_PASSWORD}</th>
</tr>
<tr>
<td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td colspan="2" align="center">&nbsp;</td>
</tr>
<tr>
<td width="45%" align="right"><span class="gen">{L_USERNAME}:</span></td>
<td>
<input type="text" class="post" name="username" size="25" maxlength="40" value="{USERNAME}" />
</td>
</tr>
<tr>
<td align="right"><span class="gen">{L_PASSWORD}:</span></td>
<td>
<input type="password" class="post" name="password" size="25" maxlength="32" />
</td>
</tr>
<!-- BEGIN switch_allow_autologin -->
<tr align="center">
<td colspan="2"><span class="gen">{L_AUTO_LOGIN}: <input type="checkbox" name="autologin" /></span></td>
</tr>
<!-- END switch_allow_autologin -->
<tr align="center">
<td colspan="2">{S_HIDDEN_FIELDS}<input type="submit" name="login" class="mainoption" value="{L_LOGIN}" /></td>
</tr>
<tr align="center">
<td colspan="2"><span class="gensmall"><a href="{U_SEND_PASSWORD}" class="gensmall">{L_SEND_PASSWORD}</a></span></td>
</tr>
</table></td>
</tr>
</table>
 
</form>
/Forum/templates/subSilver/memberlist_body.tpl
0,0 → 1,55
 
<form method="post" action="{S_MODE_ACTION}">
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
<td align="right" nowrap="nowrap"><span class="genmed">{L_SELECT_SORT_METHOD}:&nbsp;{S_MODE_SELECT}&nbsp;&nbsp;{L_ORDER}&nbsp;{S_ORDER_SELECT}&nbsp;&nbsp;
<input type="submit" name="submit" value="{L_SUBMIT}" class="liteoption" />
</span></td>
</tr>
</table>
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th height="25" class="thCornerL" nowrap="nowrap">#</th>
<th class="thTop" nowrap="nowrap">&nbsp;</th>
<th class="thTop" nowrap="nowrap">{L_USERNAME}</th>
<th class="thTop" nowrap="nowrap">{L_EMAIL}</th>
<th class="thTop" nowrap="nowrap">{L_FROM}</th>
<th class="thTop" nowrap="nowrap">{L_JOINED}</th>
<th class="thTop" nowrap="nowrap">{L_POSTS}</th>
<th class="thCornerR" nowrap="nowrap">{L_WEBSITE}</th>
</tr>
<!-- BEGIN memberrow -->
<tr>
<td class="{memberrow.ROW_CLASS}" align="center"><span class="gen">&nbsp;{memberrow.ROW_NUMBER}&nbsp;</span></td>
<td class="{memberrow.ROW_CLASS}" align="center">&nbsp;{memberrow.PM_IMG}&nbsp;</td>
<td class="{memberrow.ROW_CLASS}" align="center"><span class="gen"><a href="{memberrow.U_VIEWPROFILE}" class="gen">{memberrow.USERNAME}</a></span></td>
<td class="{memberrow.ROW_CLASS}" align="center" valign="middle">&nbsp;{memberrow.EMAIL_IMG}&nbsp;</td>
<td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.FROM}</span></td>
<td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gensmall">{memberrow.JOINED}</span></td>
<td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.POSTS}</span></td>
<td class="{memberrow.ROW_CLASS}" align="center">&nbsp;{memberrow.WWW_IMG}&nbsp;</td>
</tr>
<!-- END memberrow -->
<tr>
<td class="catBottom" colspan="8" height="28">&nbsp;</td>
</tr>
</table>
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="right" valign="top"></td>
</tr>
</table>
 
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td><span class="nav">{PAGE_NUMBER}</span></td>
<td align="right"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td>
</tr>
</table></form>
 
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
<td valign="top" align="right">{JUMPBOX}</td>
</tr>
</table>
/Forum/templates/subSilver/message_body.tpl
0,0 → 1,27
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></td>
</tr>
</table>
 
<table class="forumline" width="100%" cellspacing="1" cellpadding="4" border="0">
<tr>
<th class="thHead" height="25"><b>{MESSAGE_TITLE}</b></th>
</tr>
<tr>
<td class="row1"><table width="100%" cellspacing="0" cellpadding="1" border="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td align="center"><span class="gen">{MESSAGE_TEXT}</span></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
 
<br clear="all" />
/Forum/templates/subSilver/modcp_body.tpl
0,0 → 1,58
 
<form method="post" action="{S_MODCP_ACTION}">
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a> -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
</tr>
</table>
 
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" colspan="5" align="center" height="28"><span class="cattitle">{L_MOD_CP}</span>
</td>
</tr>
<tr>
<td class="spaceRow" colspan="5" align="center"><span class="gensmall">{L_MOD_CP_EXPLAIN}</span></td>
</tr>
<tr>
<th width="4%" class="thLeft" nowrap="nowrap">&nbsp;</th>
<th nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
<th width="8%" nowrap="nowrap">&nbsp;{L_REPLIES}&nbsp;</th>
<th width="17%" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
<th width="5%" class="thRight" nowrap="nowrap">&nbsp;{L_SELECT}&nbsp;</th>
</tr>
<!-- BEGIN topicrow -->
<tr>
<td class="row1" align="center" valign="middle"><img src="{topicrow.TOPIC_FOLDER_IMG}" width="19" height="18" alt="{topicrow.L_TOPIC_FOLDER_ALT}" title="{topicrow.L_TOPIC_FOLDER_ALT}" /></td>
<td class="row1">&nbsp;<span class="topictitle">{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span></td>
<td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.REPLIES}</span></td>
<td class="row1" align="center" valign="middle"><span class="postdetails">{topicrow.LAST_POST_TIME}</span></td>
<td class="row2" align="center" valign="middle">
<input type="checkbox" name="topic_id_list[]" value="{topicrow.TOPIC_ID}" />
</td>
</tr>
<!-- END topicrow -->
<tr align="right">
<td class="catBottom" colspan="5" height="29"> {S_HIDDEN_FIELDS}
<input type="submit" name="delete" class="liteoption" value="{L_DELETE}" />
&nbsp;
<input type="submit" name="move" class="liteoption" value="{L_MOVE}" />
&nbsp;
<input type="submit" name="lock" class="liteoption" value="{L_LOCK}" />
&nbsp;
<input type="submit" name="unlock" class="liteoption" value="{L_UNLOCK}" />
</td>
</tr>
</table>
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="left" valign="middle"><span class="nav">{PAGE_NUMBER}</b></span></td>
<td align="right" valign="top" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td>
</tr>
</table>
</form>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right">{JUMPBOX}</td>
</tr>
</table>
/Forum/templates/subSilver/modcp_move.tpl
0,0 → 1,37
 
<form action="{S_MODCP_ACTION}" method="post">
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></td>
</tr>
</table>
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline">
<tr>
<th height="25" class="thHead"><b>{MESSAGE_TITLE}</b></th>
</tr>
<tr>
<td class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td align="center"><span class="gen">{L_MOVE_TO_FORUM} &nbsp; {S_FORUM_SELECT}<br /><br />
<input type="checkbox" name="move_leave_shadow" checked="checked" />{L_LEAVESHADOW}<br />
<br />
{MESSAGE_TEXT}</span><br />
<br />
{S_HIDDEN_FIELDS}
<input class="mainoption" type="submit" name="confirm" value="{L_YES}" />
&nbsp;&nbsp;
<input class="liteoption" type="submit" name="cancel" value="{L_NO}" />
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
/Forum/templates/subSilver/modcp_split.tpl
0,0 → 1,85
 
<form method="post" action="{S_SPLIT_ACTION}">
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a><span class="nav">
-> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
</tr>
</table>
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline">
<tr>
<th height="25" class="thHead" colspan="3" nowrap="nowrap">{L_SPLIT_TOPIC}</th>
</tr>
<tr>
<td class="row2" colspan="3" align="center"><span class="gensmall">{L_SPLIT_TOPIC_EXPLAIN}</span></td>
</tr>
<tr>
<td class="row1" nowrap="nowrap"><span class="gen">{L_SPLIT_SUBJECT}</span></td>
<td class="row2" colspan="2"><input class="post" type="text" size="35" style="width: 350px" maxlength="60" name="subject" /></td>
</tr>
<tr>
<td class="row1" nowrap="nowrap"><span class="gen">{L_SPLIT_FORUM}</span></td>
<td class="row2" colspan="2">{S_FORUM_SELECT}</td>
</tr>
<tr>
<td class="catHead" colspan="3" height="28">
<table width="60%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td width="50%" align="center">
<input class="liteoption" type="submit" name="split_type_all" value="{L_SPLIT_POSTS}" />
</td>
<td width="50%" align="center">
<input class="liteoption" type="submit" name="split_type_beyond" value="{L_SPLIT_AFTER}" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th class="thLeft" nowrap="nowrap">{L_AUTHOR}</th>
<th nowrap="nowrap">{L_MESSAGE}</th>
<th class="thRight" nowrap="nowrap">{L_SELECT}</th>
</tr>
<!-- BEGIN postrow -->
<tr>
<td align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a>{postrow.POSTER_NAME}</span></td>
<td width="100%" valign="top" class="{postrow.ROW_CLASS}">
<table width="100%" cellspacing="0" cellpadding="3" border="0">
<tr>
<td valign="middle"><img src="templates/subSilver/images/icon_minipost.gif" alt="{L_POST}"><span class="postdetails">{L_POSTED}:
{postrow.POST_DATE}&nbsp;&nbsp;&nbsp;&nbsp;{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
</tr>
<tr>
<td valign="top">
<hr size="1" />
<span class="postbody">{postrow.MESSAGE}</span></td>
</tr>
</table>
</td>
<td width="5%" align="center" class="{postrow.ROW_CLASS}">{postrow.S_SPLIT_CHECKBOX}</td>
</tr>
<tr>
<td colspan="3" height="1" class="row3"><img src="templates/subSilver/images/spacer.gif" width="1" height="1" alt="."></td>
</tr>
<!-- END postrow -->
<tr>
<td class="catBottom" colspan="3" height="28">
<table width="60%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td width="50%" align="center">
<input class="liteoption" type="submit" name="split_type_all" value="{L_SPLIT_POSTS}" />
</td>
<td width="50%" align="center">
<input class="liteoption" type="submit" name="split_type_beyond" value="{L_SPLIT_AFTER}" />
{S_HIDDEN_FIELDS} </td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="right" valign="top"><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
</table>
</form>
/Forum/templates/subSilver/modcp_viewip.tpl
0,0 → 1,58
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
</tr>
</table>
 
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th height="25" class="thHead">{L_IP_INFO}</th>
</tr>
<tr>
<td class="catHead" height="28"><span class="cattitle"><b>{L_THIS_POST_IP}</b></span></td>
</tr>
<tr>
<td class="row1">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>&nbsp;<span class="gen">{IP} [ {POSTS} ]</span></td>
<td align="right"><span class="gen">[ <a href="{U_LOOKUP_IP}">{L_LOOKUP_IP}</a>
]&nbsp;</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="catHead" height="28"><span class="cattitle"><b>{L_OTHER_USERS}</b></span></td>
</tr>
<!-- BEGIN userrow -->
<tr>
<td class="{userrow.ROW_CLASS}">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>&nbsp;<span class="gen"><a href="{userrow.U_PROFILE}">{userrow.USERNAME}</a> [ {userrow.POSTS} ]</span></td>
<td align="right"><a href="{userrow.U_SEARCHPOSTS}" title="{userrow.L_SEARCH_POSTS}"><img src="{SEARCH_IMG}" border="0" alt="{L_SEARCH}" /></a>
&nbsp;</td>
</tr>
</table>
</td>
</tr>
<!-- END userrow -->
<tr>
<td class="catHead" height="28"><span class="cattitle"><b>{L_OTHER_IPS}</b></span></td>
</tr>
<!-- BEGIN iprow -->
<tr>
<td class="{iprow.ROW_CLASS}"><table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>&nbsp;<span class="gen">{iprow.IP} [ {iprow.POSTS} ]</span></td>
<td align="right"><span class="gen">[ <a href="{iprow.U_LOOKUP_IP}">{L_LOOKUP_IP}</a>
]&nbsp;</span></td>
</tr>
</table></td>
</tr>
<!-- END iprow -->
</table>
 
<br clear="all" />
/Forum/templates/subSilver/overall_footer.tpl
0,0 → 1,34
 
<div align="center"><span class="copyright"><br />{ADMIN_LINK}<br />
<!--
We request you retain the full copyright notice below including the link to www.phpbb.com.
This not only gives respect to the large amount of time given freely by the developers
but also helps build interest, traffic and use of phpBB 2.0. If you cannot (for good
reason) retain the full copyright we request you at least leave in place the
Powered by phpBB line, with phpBB linked to www.phpbb.com. If you refuse
to include even this then support on our forums may be affected.
 
The phpBB Group : 2002
// -->
Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> &copy; 2001, 2005 phpBB Group<br />{TRANSLATION_INFO}</span></div>
</td>
</tr>
</table>
 
<!-- AUTOINCLUDE START "Page/Footer.cs.ihtml" DO NOT REMOVE -->
<!-- ============== PATIÈKA ============== -->
<div class="Footer">
<script type="text/javascript">
<!--
SetRelativePath("../../");
DrawFooter();
// -->
</script>
<noscript>
<b> Pro zobrazení (vložení) hlavièky je potøeba JavaScript </b>
</noscript>
</div>
<!-- AUTOINCLUDE END -->
 
</body>
</html>
/Forum/templates/subSilver/overall_header.tpl
0,0 → 1,81
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
<meta http-equiv="Content-Style-Type" content="text/css">
{META}
{NAV_LINKS}
<title>{SITENAME} :: {PAGE_TITLE}</title>
 
<!-- BEGIN switch_enable_pm_popup -->
<script language="Javascript" type="text/javascript">
<!--
if ( {PRIVATE_MESSAGE_NEW_FLAG} )
{
window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
}
//-->
</script>
<!-- END switch_enable_pm_popup -->
 
<!-- AUTOINCLUDE START "Page/Head.cs.ihtml" DO NOT REMOVE -->
<link rel="StyleSheet" href="http://test.mlab.cz/Web/CSS/MLAB.css" type="text/css" title="MLAB základní styl" />
<link rel="shortcut icon" type="image/x-icon" href="http://test.mlab.cz/Web/PIC/MLAB.ico" />
<script language="JavaScript" type="text/javascript" src="http://test.mlab.cz/Web/JS/MLAB_Menu.js"></script>
<!-- AUTOINCLUDE END -->
 
</head>
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">
 
<!-- AUTOINCLUDE START "Page/Header.cs.ihtml" DO NOT REMOVE -->
<!-- ============== HLAVICKA ============== -->
<div class="Header">
<script type="text/javascript">
<!--
SetRelativePath("../../");
DrawHeader();
// -->
</script>
<noscript>
<b> Pro zobrazení (vložení) hlavièky je potøeba JavaScript </b>
</noscript>
</div>
<!-- AUTOINCLUDE END -->
 
<!-- AUTOINCLUDE START "Page/Menu.cs.ihtml" DO NOT REMOVE -->
<!-- ============== MENU ============== -->
<div class="Menu">
<script type="text/javascript">
<!--
SetRelativePath("../../");
DrawMenu();
// -->
</script>
<noscript>
<b> Pro zobrazení (vložení) menu je potøeba JavaScript </b>
</noscript>
</div>
<!-- AUTOINCLUDE END -->
 
<a name="top"></a>
 
<table>
<tr>
<td class="bodyline"><table>
<tr>
<table>
<tr>
<td><span class="mainmenu">&nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a>&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp;
<!-- BEGIN switch_user_logged_out -->
&nbsp;<a href="{U_REGISTER}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" hspace="3" />{L_REGISTER}</a>&nbsp;
<!-- END switch_user_logged_out -->
</span></td>
</tr>
<tr>
<td><span class="mainmenu">&nbsp;<a href="{U_PROFILE}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a>&nbsp; &nbsp;<a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a>&nbsp; &nbsp;<a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a>&nbsp;</span></td>
</tr>
</table></td>
</tr>
</table>
 
<br />
/Forum/templates/subSilver/posting_body.tpl
0,0 → 1,481
<script language="JavaScript" type="text/javascript">
<!--
// bbCode control by
// subBlue design
// www.subBlue.com
 
// Startup variables
var imageTag = false;
var theSelection = false;
 
// Check for Browser & Platform for PC & IE specific bits
// More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
var clientPC = navigator.userAgent.toLowerCase(); // Get client info
var clientVer = parseInt(navigator.appVersion); // Get browser version
 
var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1));
var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1)
&& (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1)
&& (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1));
var is_moz = 0;
 
var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1));
var is_mac = (clientPC.indexOf("mac")!=-1);
 
// Helpline messages
b_help = "{L_BBCODE_B_HELP}";
i_help = "{L_BBCODE_I_HELP}";
u_help = "{L_BBCODE_U_HELP}";
q_help = "{L_BBCODE_Q_HELP}";
c_help = "{L_BBCODE_C_HELP}";
l_help = "{L_BBCODE_L_HELP}";
o_help = "{L_BBCODE_O_HELP}";
p_help = "{L_BBCODE_P_HELP}";
w_help = "{L_BBCODE_W_HELP}";
a_help = "{L_BBCODE_A_HELP}";
s_help = "{L_BBCODE_S_HELP}";
f_help = "{L_BBCODE_F_HELP}";
 
// Define the bbCode tags
bbcode = new Array();
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]');
imageTag = false;
 
// Shows the help messages in the helpline window
function helpline(help) {
document.post.helpbox.value = eval(help + "_help");
}
 
 
// Replacement for arrayname.length property
function getarraysize(thearray) {
for (i = 0; i < thearray.length; i++) {
if ((thearray[i] == "undefined") || (thearray[i] == "") || (thearray[i] == null))
return i;
}
return thearray.length;
}
 
// Replacement for arrayname.push(value) not implemented in IE until version 5.5
// Appends element to the array
function arraypush(thearray,value) {
thearray[ getarraysize(thearray) ] = value;
}
 
// Replacement for arrayname.pop() not implemented in IE until version 5.5
// Removes and returns the last element of an array
function arraypop(thearray) {
thearraysize = getarraysize(thearray);
retval = thearray[thearraysize - 1];
delete thearray[thearraysize - 1];
return retval;
}
 
 
function checkForm() {
 
formErrors = false;
 
if (document.post.message.value.length < 2) {
formErrors = "{L_EMPTY_MESSAGE}";
}
 
if (formErrors) {
alert(formErrors);
return false;
} else {
bbstyle(-1);
//formObj.preview.disabled = true;
//formObj.submit.disabled = true;
return true;
}
}
 
function emoticon(text) {
var txtarea = document.post.message;
text = ' ' + text + ' ';
if (txtarea.createTextRange && txtarea.caretPos) {
var caretPos = txtarea.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
txtarea.focus();
} else {
txtarea.value += text;
txtarea.focus();
}
}
 
function bbfontstyle(bbopen, bbclose) {
var txtarea = document.post.message;
 
if ((clientVer >= 4) && is_ie && is_win) {
theSelection = document.selection.createRange().text;
if (!theSelection) {
txtarea.value += bbopen + bbclose;
txtarea.focus();
return;
}
document.selection.createRange().text = bbopen + theSelection + bbclose;
txtarea.focus();
return;
}
else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
{
mozWrap(txtarea, bbopen, bbclose);
return;
}
else
{
txtarea.value += bbopen + bbclose;
txtarea.focus();
}
storeCaret(txtarea);
}
 
 
function bbstyle(bbnumber) {
var txtarea = document.post.message;
 
txtarea.focus();
donotinsert = false;
theSelection = false;
bblast = 0;
 
if (bbnumber == -1) { // Close all open tags & default button names
while (bbcode[0]) {
butnumber = arraypop(bbcode) - 1;
txtarea.value += bbtags[butnumber + 1];
buttext = eval('document.post.addbbcode' + butnumber + '.value');
eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
}
imageTag = false; // All tags are closed including image tags :D
txtarea.focus();
return;
}
 
if ((clientVer >= 4) && is_ie && is_win)
{
theSelection = document.selection.createRange().text; // Get text selection
if (theSelection) {
// Add tags around selection
document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1];
txtarea.focus();
theSelection = '';
return;
}
}
else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
{
mozWrap(txtarea, bbtags[bbnumber], bbtags[bbnumber+1]);
return;
}
// Find last occurance of an open tag the same as the one just clicked
for (i = 0; i < bbcode.length; i++) {
if (bbcode[i] == bbnumber+1) {
bblast = i;
donotinsert = true;
}
}
 
if (donotinsert) { // Close all open tags up to the one just clicked & default button names
while (bbcode[bblast]) {
butnumber = arraypop(bbcode) - 1;
txtarea.value += bbtags[butnumber + 1];
buttext = eval('document.post.addbbcode' + butnumber + '.value');
eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
imageTag = false;
}
txtarea.focus();
return;
} else { // Open tags
if (imageTag && (bbnumber != 14)) { // Close image tag before adding another
txtarea.value += bbtags[15];
lastValue = arraypop(bbcode) - 1; // Remove the close image tag from the list
document.post.addbbcode14.value = "Img"; // Return button back to normal state
imageTag = false;
}
// Open tag
txtarea.value += bbtags[bbnumber];
if ((bbnumber == 14) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag
arraypush(bbcode,bbnumber+1);
eval('document.post.addbbcode'+bbnumber+'.value += "*"');
txtarea.focus();
return;
}
storeCaret(txtarea);
}
 
// From http://www.massless.org/mozedit/
function mozWrap(txtarea, open, close)
{
var selLength = txtarea.textLength;
var selStart = txtarea.selectionStart;
var selEnd = txtarea.selectionEnd;
if (selEnd == 1 || selEnd == 2)
selEnd = selLength;
 
var s1 = (txtarea.value).substring(0,selStart);
var s2 = (txtarea.value).substring(selStart, selEnd)
var s3 = (txtarea.value).substring(selEnd, selLength);
txtarea.value = s1 + open + s2 + close + s3;
return;
}
 
// Insert at Claret position. Code from
// http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
function storeCaret(textEl) {
if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}
 
//-->
</script>
 
<!-- BEGIN privmsg_extensions -->
<table border="0" cellspacing="0" cellpadding="0" align="center" width="100%">
<tr>
<td valign="top" align="center" width="100%">
<table height="40" cellspacing="2" cellpadding="2" border="0">
<tr valign="middle">
<td>{INBOX_IMG}</td>
<td><span class="cattitle">{INBOX_LINK}&nbsp;&nbsp;</span></td>
<td>{SENTBOX_IMG}</td>
<td><span class="cattitle">{SENTBOX_LINK}&nbsp;&nbsp;</span></td>
<td>{OUTBOX_IMG}</td>
<td><span class="cattitle">{OUTBOX_LINK}&nbsp;&nbsp;</span></td>
<td>{SAVEBOX_IMG}</td>
<td><span class="cattitle">{SAVEBOX_LINK}&nbsp;&nbsp;</span></td>
</tr>
</table>
</td>
</tr>
</table>
 
<br clear="all" />
<!-- END privmsg_extensions -->
 
<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)">
 
{POST_PREVIEW_BOX}
{ERROR_BOX}
 
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a>
<!-- BEGIN switch_not_privmsg -->
-> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
<!-- END switch_not_privmsg -->
</tr>
</table>
 
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
<tr>
<th class="thHead" colspan="2" height="25"><b>{L_POST_A}</b></th>
</tr>
<!-- BEGIN switch_username_select -->
<tr>
<td class="row1"><span class="gen"><b>{L_USERNAME}</b></span></td>
<td class="row2"><span class="genmed"><input type="text" class="post" tabindex="1" name="username" size="25" maxlength="25" value="{USERNAME}" /></span></td>
</tr>
<!-- END switch_username_select -->
<!-- BEGIN switch_privmsg -->
<tr>
<td class="row1"><span class="gen"><b>{L_USERNAME}</b></span></td>
<td class="row2"><span class="genmed"><input type="text" class="post" name="username" maxlength="25" size="25" tabindex="1" value="{USERNAME}" />&nbsp;<input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></span></td>
</tr>
<!-- END switch_privmsg -->
<tr>
<td class="row1" width="22%"><span class="gen"><b>{L_SUBJECT}</b></span></td>
<td class="row2" width="78%"> <span class="gen">
<input type="text" name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{SUBJECT}" />
</span> </td>
</tr>
<tr>
<td class="row1" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td><span class="gen"><b>{L_MESSAGE_BODY}</b></span> </td>
</tr>
<tr>
<td valign="middle" align="center"> <br />
<table width="100" border="0" cellspacing="0" cellpadding="5">
<tr align="center">
<td colspan="{S_SMILIES_COLSPAN}" class="gensmall"><b>{L_EMOTICONS}</b></td>
</tr>
<!-- BEGIN smilies_row -->
<tr align="center" valign="middle">
<!-- BEGIN smilies_col -->
<td><a href="javascript:emoticon('{smilies_row.smilies_col.SMILEY_CODE}')"><img src="{smilies_row.smilies_col.SMILEY_IMG}" border="0" alt="{smilies_row.smilies_col.SMILEY_DESC}" title="{smilies_row.smilies_col.SMILEY_DESC}" /></a></td>
<!-- END smilies_col -->
</tr>
<!-- END smilies_row -->
<!-- BEGIN switch_smilies_extra -->
<tr align="center">
<td colspan="{S_SMILIES_COLSPAN}"><span class="nav"><a href="{U_MORE_SMILIES}" onclick="window.open('{U_MORE_SMILIES}', '_phpbbsmilies', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=250');return false;" target="_phpbbsmilies" class="nav">{L_MORE_SMILIES}</a></span></td>
</tr>
<!-- END switch_smilies_extra -->
</table>
</td>
</tr>
</table>
</td>
<td class="row2" valign="top"><span class="gen"> <span class="genmed"> </span>
<table width="450" border="0" cellspacing="0" cellpadding="2">
<tr align="center" valign="middle">
<td><span class="genmed">
<input type="button" class="button" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onClick="bbstyle(0)" onMouseOver="helpline('b')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onClick="bbstyle(2)" onMouseOver="helpline('i')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onClick="bbstyle(4)" onMouseOver="helpline('u')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onClick="bbstyle(6)" onMouseOver="helpline('q')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onClick="bbstyle(8)" onMouseOver="helpline('c')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onClick="bbstyle(10)" onMouseOver="helpline('l')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onClick="bbstyle(12)" onMouseOver="helpline('o')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onClick="bbstyle(14)" onMouseOver="helpline('p')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" />
</span></td>
</tr>
<tr>
<td colspan="9">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="genmed"> &nbsp;{L_FONT_COLOR}:
<select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">
<option style="color:black; background-color: {T_TD_COLOR1}" value="{T_FONTCOLOR1}" class="genmed">{L_COLOR_DEFAULT}</option>
<option style="color:darkred; background-color: {T_TD_COLOR1}" value="darkred" class="genmed">{L_COLOR_DARK_RED}</option>
<option style="color:red; background-color: {T_TD_COLOR1}" value="red" class="genmed">{L_COLOR_RED}</option>
<option style="color:orange; background-color: {T_TD_COLOR1}" value="orange" class="genmed">{L_COLOR_ORANGE}</option>
<option style="color:brown; background-color: {T_TD_COLOR1}" value="brown" class="genmed">{L_COLOR_BROWN}</option>
<option style="color:yellow; background-color: {T_TD_COLOR1}" value="yellow" class="genmed">{L_COLOR_YELLOW}</option>
<option style="color:green; background-color: {T_TD_COLOR1}" value="green" class="genmed">{L_COLOR_GREEN}</option>
<option style="color:olive; background-color: {T_TD_COLOR1}" value="olive" class="genmed">{L_COLOR_OLIVE}</option>
<option style="color:cyan; background-color: {T_TD_COLOR1}" value="cyan" class="genmed">{L_COLOR_CYAN}</option>
<option style="color:blue; background-color: {T_TD_COLOR1}" value="blue" class="genmed">{L_COLOR_BLUE}</option>
<option style="color:darkblue; background-color: {T_TD_COLOR1}" value="darkblue" class="genmed">{L_COLOR_DARK_BLUE}</option>
<option style="color:indigo; background-color: {T_TD_COLOR1}" value="indigo" class="genmed">{L_COLOR_INDIGO}</option>
<option style="color:violet; background-color: {T_TD_COLOR1}" value="violet" class="genmed">{L_COLOR_VIOLET}</option>
<option style="color:white; background-color: {T_TD_COLOR1}" value="white" class="genmed">{L_COLOR_WHITE}</option>
<option style="color:black; background-color: {T_TD_COLOR1}" value="black" class="genmed">{L_COLOR_BLACK}</option>
</select> &nbsp;{L_FONT_SIZE}:<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">
<option value="7" class="genmed">{L_FONT_TINY}</option>
<option value="9" class="genmed">{L_FONT_SMALL}</option>
<option value="12" selected class="genmed">{L_FONT_NORMAL}</option>
<option value="18" class="genmed">{L_FONT_LARGE}</option>
<option value="24" class="genmed">{L_FONT_HUGE}</option>
</select>
</span></td>
<td nowrap="nowrap" align="right"><span class="gensmall"><a href="javascript:bbstyle(-1)" class="genmed" onMouseOver="helpline('a')">{L_BBCODE_CLOSE_TAGS}</a></span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="9"> <span class="gensmall">
<input type="text" name="helpbox" size="45" maxlength="100" style="width:450px; font-size:10px" class="helpline" value="{L_STYLES_TIP}" />
</span></td>
</tr>
<tr>
<td colspan="9"><span class="gen">
<textarea name="message" rows="15" cols="35" wrap="virtual" style="width:450px" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{MESSAGE}</textarea>
</span></td>
</tr>
</table>
</span></td>
</tr>
<tr>
<td class="row1" valign="top"><span class="gen"><b>{L_OPTIONS}</b></span><br /><span class="gensmall">{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}</span></td>
<td class="row2"><span class="gen"> </span>
<table cellspacing="0" cellpadding="1" border="0">
<!-- BEGIN switch_html_checkbox -->
<tr>
<td>
<input type="checkbox" name="disable_html" {S_HTML_CHECKED} />
</td>
<td><span class="gen">{L_DISABLE_HTML}</span></td>
</tr>
<!-- END switch_html_checkbox -->
<!-- BEGIN switch_bbcode_checkbox -->
<tr>
<td>
<input type="checkbox" name="disable_bbcode" {S_BBCODE_CHECKED} />
</td>
<td><span class="gen">{L_DISABLE_BBCODE}</span></td>
</tr>
<!-- END switch_bbcode_checkbox -->
<!-- BEGIN switch_smilies_checkbox -->
<tr>
<td>
<input type="checkbox" name="disable_smilies" {S_SMILIES_CHECKED} />
</td>
<td><span class="gen">{L_DISABLE_SMILIES}</span></td>
</tr>
<!-- END switch_smilies_checkbox -->
<!-- BEGIN switch_signature_checkbox -->
<tr>
<td>
<input type="checkbox" name="attach_sig" {S_SIGNATURE_CHECKED} />
</td>
<td><span class="gen">{L_ATTACH_SIGNATURE}</span></td>
</tr>
<!-- END switch_signature_checkbox -->
<!-- BEGIN switch_notify_checkbox -->
<tr>
<td>
<input type="checkbox" name="notify" {S_NOTIFY_CHECKED} />
</td>
<td><span class="gen">{L_NOTIFY_ON_REPLY}</span></td>
</tr>
<!-- END switch_notify_checkbox -->
<!-- BEGIN switch_delete_checkbox -->
<tr>
<td>
<input type="checkbox" name="delete" />
</td>
<td><span class="gen">{L_DELETE_POST}</span></td>
</tr>
<!-- END switch_delete_checkbox -->
<!-- BEGIN switch_type_toggle -->
<tr>
<td></td>
<td><span class="gen">{S_TYPE_TOGGLE}</span></td>
</tr>
<!-- END switch_type_toggle -->
</table>
</td>
</tr>
{POLLBOX}
<tr>
<td class="catBottom" colspan="2" align="center" height="28"> {S_HIDDEN_FORM_FIELDS}<input type="submit" tabindex="5" name="preview" class="mainoption" value="{L_PREVIEW}" />&nbsp;<input type="submit" accesskey="s" tabindex="6" name="post" class="mainoption" value="{L_SUBMIT}" /></td>
</tr>
</table>
 
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="right" valign="top"><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
</table>
</form>
 
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
<td valign="top" align="right">{JUMPBOX}</td>
</tr>
</table>
 
{TOPIC_REVIEW_BOX}
/Forum/templates/subSilver/posting_poll_body.tpl
0,0 → 1,31
 
<tr>
<th class="thHead" colspan="2">{L_ADD_A_POLL}</th>
</tr>
<tr>
<td class="row1" colspan="2"><span class="gensmall">{L_ADD_POLL_EXPLAIN}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen"><b>{L_POLL_QUESTION}</b></span></td>
<td class="row2"><span class="genmed"><input type="text" name="poll_title" size="50" maxlength="255" class="post" value="{POLL_TITLE}" /></span></td>
</tr>
<!-- BEGIN poll_option_rows -->
<tr>
<td class="row1"><span class="gen"><b>{L_POLL_OPTION}</b></span></td>
<td class="row2"><span class="genmed"><input type="text" name="poll_option_text[{poll_option_rows.S_POLL_OPTION_NUM}]" size="50" class="post" maxlength="255" value="{poll_option_rows.POLL_OPTION}" /></span> &nbsp;<input type="submit" name="edit_poll_option" value="{L_UPDATE_OPTION}" class="liteoption" /> <input type="submit" name="del_poll_option[{poll_option_rows.S_POLL_OPTION_NUM}]" value="{L_DELETE_OPTION}" class="liteoption" /></td>
</tr>
<!-- END poll_option_rows -->
<tr>
<td class="row1"><span class="gen"><b>{L_POLL_OPTION}</b></span></td>
<td class="row2"><span class="genmed"><input type="text" name="add_poll_option_text" size="50" maxlength="255" class="post" value="{ADD_POLL_OPTION}" /></span> &nbsp;<input type="submit" name="add_poll_option" value="{L_ADD_OPTION}" class="liteoption" /></td>
</tr>
<tr>
<td class="row1"><span class="gen"><b>{L_POLL_LENGTH}</b></span></td>
<td class="row2"><span class="genmed"><input type="text" name="poll_length" size="3" maxlength="3" class="post" value="{POLL_LENGTH}" /></span>&nbsp;<span class="gen"><b>{L_DAYS}</b></span> &nbsp; <span class="gensmall">{L_POLL_LENGTH_EXPLAIN}</span></td>
</tr>
<!-- BEGIN switch_poll_delete_toggle -->
<tr>
<td class="row1"><span class="gen"><b>{L_POLL_DELETE}</b></span></td>
<td class="row2"><input type="checkbox" name="poll_delete" /></td>
</tr>
<!-- END switch_poll_delete_toggle -->
/Forum/templates/subSilver/posting_preview.tpl
0,0 → 1,23
<table class="forumline" width="100%" cellspacing="1" cellpadding="4" border="0">
<tr>
<th height="25" class="thHead">{L_PREVIEW}</th>
</tr>
<tr>
<td class="row1"><img src="templates/subSilver/images/icon_minipost.gif" alt="{L_POST}" /><span class="postdetails">{L_POSTED}: {POST_DATE} &nbsp;&nbsp;&nbsp; {L_POST_SUBJECT}: {POST_SUBJECT}</span></td>
</tr>
<tr>
<td class="row1"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<span class="postbody">{MESSAGE}</span>
</td>
</tr>
</table></td>
</tr>
<tr>
<td class="spaceRow" height="1"><img src="templates/subSilver/images/spacer.gif" width="1" height="1" /></td>
</tr>
</table>
 
<br clear="all" />
/Forum/templates/subSilver/posting_smilies.tpl
0,0 → 1,45
 
<script language="javascript" type="text/javascript">
<!--
function emoticon(text) {
text = ' ' + text + ' ';
if (opener.document.forms['post'].message.createTextRange && opener.document.forms['post'].message.caretPos) {
var caretPos = opener.document.forms['post'].message.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
opener.document.forms['post'].message.focus();
} else {
opener.document.forms['post'].message.value += text;
opener.document.forms['post'].message.focus();
}
}
//-->
</script>
 
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td><table width="100%" border="0" cellspacing="1" cellpadding="4" class="forumline">
<tr>
<th class="thHead" height="25">{L_EMOTICONS}</th>
</tr>
<tr>
<td><table width="100" border="0" cellspacing="0" cellpadding="5">
<!-- BEGIN smilies_row -->
<tr align="center" valign="middle">
<!-- BEGIN smilies_col -->
<td><a href="javascript:emoticon('{smilies_row.smilies_col.SMILEY_CODE}')"><img src="{smilies_row.smilies_col.SMILEY_IMG}" border="0" alt="{smilies_row.smilies_col.SMILEY_DESC}" title="{smilies_row.smilies_col.SMILEY_DESC}" /></a></td>
<!-- END smilies_col -->
</tr>
<!-- END smilies_row -->
<!-- BEGIN switch_smilies_extra -->
<tr align="center">
<td colspan="{S_SMILIES_COLSPAN}"><span class="nav"><a href="{U_MORE_SMILIES}" onclick="open_window('{U_MORE_SMILIES}', 250, 300);return false" target="_smilies" class="nav">{L_MORE_SMILIES}</a></td>
</tr>
<!-- END switch_smilies_extra -->
</table></td>
</tr>
<tr>
<td align="center"><br /><span class="genmed"><a href="javascript:window.close();" class="genmed">{L_CLOSE_WINDOW}</a></span></td>
</tr>
</table></td>
</tr>
</table>
/Forum/templates/subSilver/posting_topic_review.tpl
0,0 → 1,39
 
<!-- BEGIN switch_inline_mode -->
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
<tr>
<td class="catHead" height="28" align="center"><b><span class="cattitle">{L_TOPIC_REVIEW}</span></b></td>
</tr>
<tr>
<td class="row1"><iframe width="100%" height="300" src="{U_REVIEW_TOPIC}" >
<!-- END switch_inline_mode -->
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
<tr>
<th class="thCornerL" width="22%" height="26">{L_AUTHOR}</th>
<th class="thCornerR">{L_MESSAGE}</th>
</tr>
<!-- BEGIN postrow -->
<tr>
<td width="22%" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span></td>
<td class="{postrow.ROW_CLASS}" height="28" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen">&nbsp;</span>&nbsp;&nbsp;&nbsp;{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
</tr>
<tr>
<td colspan="2"><hr /></td>
</tr>
<tr>
<td colspan="2"><span class="postbody">{postrow.MESSAGE}</span></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" height="1" class="spaceRow"><img src="templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<!-- END postrow -->
</table>
<!-- BEGIN switch_inline_mode -->
</iframe></td>
</tr>
</table>
<!-- END switch_inline_mode -->
/Forum/templates/subSilver/privmsgs_body.tpl
0,0 → 1,120
<script language="Javascript" type="text/javascript">
//
// Should really check the browser to stop this whining ...
//
function select_switch(status)
{
for (i = 0; i < document.privmsg_list.length; i++)
{
document.privmsg_list.elements[i].checked = status;
}
}
</script>
 
<table border="0" cellspacing="0" cellpadding="0" align="center" width="100%">
<tr>
<td valign="top" align="center" width="100%">
<table height="40" cellspacing="2" cellpadding="2" border="0">
<tr valign="middle">
<td>{INBOX_IMG}</td>
<td><span class="cattitle">{INBOX} &nbsp;</span></td>
<td>{SENTBOX_IMG}</td>
<td><span class="cattitle">{SENTBOX} &nbsp;</span></td>
<td>{OUTBOX_IMG}</td>
<td><span class="cattitle">{OUTBOX} &nbsp;</span></td>
<td>{SAVEBOX_IMG}</td>
<td><span class="cattitle">{SAVEBOX} &nbsp;</span></td>
</tr>
</table>
</td>
<td align="right">
<!-- BEGIN switch_box_size_notice -->
<table width="175" cellspacing="1" cellpadding="2" border="0" class="bodyline">
<tr>
<td colspan="3" width="175" class="row1" nowrap="nowrap"><span class="gensmall">{BOX_SIZE_STATUS}</span></td>
</tr>
<tr>
<td colspan="3" width="175" class="row2">
<table cellspacing="0" cellpadding="1" border="0">
<tr>
<td bgcolor="{T_TD_COLOR2}"><img src="templates/subSilver/images/spacer.gif" width="{INBOX_LIMIT_IMG_WIDTH}" height="8" alt="{INBOX_LIMIT_PERCENT}" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="33%" class="row1"><span class="gensmall">0%</span></td>
<td width="34%" align="center" class="row1"><span class="gensmall">50%</span></td>
<td width="33%" align="right" class="row1"><span class="gensmall">100%</span></td>
</tr>
</table>
<!-- END switch_box_size_notice -->
</td>
</tr>
</table>
 
<br clear="all" />
 
<form method="post" name="privmsg_list" action="{S_PRIVMSGS_ACTION}">
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" valign="middle">{POST_PM_IMG}</td>
<td align="left" width="100%">&nbsp;<span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
<td align="right" nowrap="nowrap"><span class="gensmall">{L_DISPLAY_MESSAGES}:
<select name="msgdays">{S_SELECT_MSG_DAYS}
</select>
<input type="submit" value="{L_GO}" name="submit_msgdays" class="liteoption" />
</span></td>
</tr>
</table>
 
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
<tr>
<th width="5%" height="25" class="thCornerL" nowrap="nowrap">&nbsp;{L_FLAG}&nbsp;</th>
<th width="55%" class="thTop" nowrap="nowrap">&nbsp;{L_SUBJECT}&nbsp;</th>
<th width="20%" class="thTop" nowrap="nowrap">&nbsp;{L_FROM_OR_TO}&nbsp;</th>
<th width="15%" class="thTop" nowrap="nowrap">&nbsp;{L_DATE}&nbsp;</th>
<th width="5%" class="thCornerR" nowrap="nowrap">&nbsp;{L_MARK}&nbsp;</th>
</tr>
<!-- BEGIN listrow -->
<tr>
<td class="{listrow.ROW_CLASS}" width="5%" align="center" valign="middle"><img src="{listrow.PRIVMSG_FOLDER_IMG}" width="19" height="18" alt="{listrow.L_PRIVMSG_FOLDER_ALT}" title="{listrow.L_PRIVMSG_FOLDER_ALT}" /></td>
<td width="55%" valign="middle" class="{listrow.ROW_CLASS}"><span class="topictitle">&nbsp;<a href="{listrow.U_READ}" class="topictitle">{listrow.SUBJECT}</a></span></td>
<td width="20%" valign="middle" align="center" class="{listrow.ROW_CLASS}"><span class="name">&nbsp;<a href="{listrow.U_FROM_USER_PROFILE}" class="name">{listrow.FROM}</a></span></td>
<td width="15%" align="center" valign="middle" class="{listrow.ROW_CLASS}"><span class="postdetails">{listrow.DATE}</span></td>
<td width="5%" align="center" valign="middle" class="{listrow.ROW_CLASS}"><span class="postdetails">
<input type="checkbox" name="mark[]2" value="{listrow.S_MARK_ID}" />
</span></td>
</tr>
<!-- END listrow -->
<!-- BEGIN switch_no_messages -->
<tr>
<td class="row1" colspan="5" align="center" valign="middle"><span class="gen">{L_NO_MESSAGES}</span></td>
</tr>
<!-- END switch_no_messages -->
<tr>
<td class="catBottom" colspan="5" height="28" align="right"> {S_HIDDEN_FIELDS}
<input type="submit" name="save" value="{L_SAVE_MARKED}" class="mainoption" />
&nbsp;
<input type="submit" name="delete" value="{L_DELETE_MARKED}" class="liteoption" />
&nbsp;
<input type="submit" name="deleteall" value="{L_DELETE_ALL}" class="liteoption" />
</td>
</tr>
</table>
 
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="left" valign="middle"><span class="nav">{POST_PM_IMG}</span></td>
<td align="left" valign="middle" width="100%"><span class="nav">{PAGE_NUMBER}</span></td>
<td align="right" valign="top" nowrap="nowrap"><b><span class="gensmall"><a href="javascript:select_switch(true);" class="gensmall">{L_MARK_ALL}</a> :: <a href="javascript:select_switch(false);" class="gensmall">{L_UNMARK_ALL}</a></span></b><br /><span class="nav">{PAGINATION}<br /></span><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
</table>
</form>
 
<table width="100%" border="0">
<tr>
<td align="right" valign="top">{JUMPBOX}</td>
</tr>
</table>
/Forum/templates/subSilver/privmsgs_popup.tpl
0,0 → 1,22
 
<script language="javascript" type="text/javascript">
<!--
function jump_to_inbox()
{
opener.document.location.href = "{U_PRIVATEMSGS}";
window.close();
}
//-->
</script>
 
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="4" class="forumline">
<tr>
<td valign="top" class="row1" align="center"><br /><span class="gen">{L_MESSAGE}</span><br /><br /><span class="genmed"><a href="javascript:window.close();" class="genmed">{L_CLOSE_WINDOW}</a></span><br /><br /></td>
</tr>
</table>
</td>
</tr>
</table>
/Forum/templates/subSilver/privmsgs_preview.tpl
0,0 → 1,27
<table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">
<tr>
<th height="25" class="thHead" colspan="2">{L_PREVIEW}</th>
</tr>
<tr>
<td class="row2"><span class="genmed">{L_FROM}:</span></td>
<td width="100%" class="row2"><span class="genmed">{MESSAGE_FROM}</span></td>
</tr>
<tr>
<td class="row2"><span class="genmed">{L_TO}:</span></td>
<td width="100%" class="row2"><span class="genmed">{MESSAGE_TO}</span></td>
</tr>
<tr>
<td class="row2"><span class="genmed">{L_POSTED}:</span></td>
<td width="100%" class="row2"><span class="genmed">{POST_DATE}</span></td>
</tr>
<tr>
<td class="row2"><span class="genmed">{L_SUBJECT}:</span></td>
<td width="100%" class="row2"><span class="genmed">{POST_SUBJECT}</span></td>
</tr>
<tr>
<td valign="top" colspan="2" class="row1"><span class="postbody">{MESSAGE}</span></td>
</tr>
</table>
 
<br clear="all" />
/Forum/templates/subSilver/privmsgs_read_body.tpl
0,0 → 1,86
 
<table cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td valign="middle">{INBOX_IMG}</td>
<td valign="middle"><span class="cattitle">{INBOX} &nbsp;</span></td>
<td valign="middle">{SENTBOX_IMG}</td>
<td valign="middle"><span class="cattitle">{SENTBOX} &nbsp;</span></td>
<td valign="middle">{OUTBOX_IMG}</td>
<td valign="middle"><span class="cattitle">{OUTBOX} &nbsp;</span></td>
<td valign="middle">{SAVEBOX_IMG}</td>
<td valign="middle"><span class="cattitle">{SAVEBOX}</span></td>
</tr>
</table>
 
<br clear="all" />
 
<form method="post" action="{S_PRIVMSGS_ACTION}">
<table width="100%" cellspacing="2" cellpadding="2" border="0">
<tr>
<td valign="middle">{REPLY_PM_IMG}</td>
<td width="100%"><span class="nav">&nbsp;<a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
</tr>
</table>
 
<table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">
<tr>
<th colspan="3" class="thHead" nowrap="nowrap">{BOX_NAME} :: {L_MESSAGE}</th>
</tr>
<tr>
<td class="row2"><span class="genmed">{L_FROM}:</span></td>
<td width="100%" class="row2" colspan="2"><span class="genmed">{MESSAGE_FROM}</span></td>
</tr>
<tr>
<td class="row2"><span class="genmed">{L_TO}:</span></td>
<td width="100%" class="row2" colspan="2"><span class="genmed">{MESSAGE_TO}</span></td>
</tr>
<tr>
<td class="row2"><span class="genmed">{L_POSTED}:</span></td>
<td width="100%" class="row2" colspan="2"><span class="genmed">{POST_DATE}</span></td>
</tr>
<tr>
<td class="row2"><span class="genmed">{L_SUBJECT}:</span></td>
<td width="100%" class="row2"><span class="genmed">{POST_SUBJECT}</span></td>
<td nowrap="nowrap" class="row2" align="right"> {QUOTE_PM_IMG} {EDIT_PM_IMG}</td>
</tr>
<tr>
<td valign="top" colspan="3" class="row1"><span class="postbody">{MESSAGE}</span></td>
</tr>
<tr>
<td width="78%" height="28" valign="bottom" colspan="3" class="row1">
<table cellspacing="0" cellpadding="0" border="0" height="18">
<tr>
<td valign="middle" nowrap="nowrap">{PROFILE_IMG} {PM_IMG} {EMAIL_IMG}
{WWW_IMG} {AIM_IMG} {YIM_IMG} {MSN_IMG}</td><td>&nbsp;</td><td valign="top" nowrap="nowrap"><script language="JavaScript" type="text/javascript"><!--
 
if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 )
document.write('{ICQ_IMG}');
else
document.write('<div style="position:relative"><div style="position:absolute">{ICQ_IMG}</div><div style="position:absolute;left:3px">{ICQ_STATUS_IMG}</div></div>');
//--></script><noscript>{ICQ_IMG}</noscript></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="catBottom" colspan="3" height="28" align="right"> {S_HIDDEN_FIELDS}
<input type="submit" name="save" value="{L_SAVE_MSG}" class="liteoption" />
&nbsp;
<input type="submit" name="delete" value="{L_DELETE_MSG}" class="liteoption" />
</td>
</tr>
</table>
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td>{REPLY_PM_IMG}</td>
<td align="right" valign="top"><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
</table>
</form>
 
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td valign="top" align="right"><span class="gensmall">{JUMPBOX}</span></td>
</tr>
</table>
/Forum/templates/subSilver/profile_add_body.tpl
0,0 → 1,274
 
<form action="{S_PROFILE_ACTION}" {S_FORM_ENCTYPE} method="post">
 
{ERROR_BOX}
 
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
</tr>
</table>
 
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
<tr>
<th class="thHead" colspan="2" height="25" valign="middle">{L_REGISTRATION_INFO}</th>
</tr>
<tr>
<td class="row2" colspan="2"><span class="gensmall">{L_ITEMS_REQUIRED}</span></td>
</tr>
<!-- BEGIN switch_namechange_disallowed -->
<tr>
<td class="row1" width="38%"><span class="gen">{L_USERNAME}: *</span></td>
<td class="row2"><input type="hidden" name="username" value="{USERNAME}" /><span class="gen"><b>{USERNAME}</b></span></td>
</tr>
<!-- END switch_namechange_disallowed -->
<!-- BEGIN switch_namechange_allowed -->
<tr>
<td class="row1" width="38%"><span class="gen">{L_USERNAME}: *</span></td>
<td class="row2"><input type="text" class="post" style="width:200px" name="username" size="25" maxlength="25" value="{USERNAME}" /></td>
</tr>
<!-- END switch_namechange_allowed -->
<tr>
<td class="row1"><span class="gen">{L_EMAIL_ADDRESS}: *</span></td>
<td class="row2"><input type="text" class="post" style="width:200px" name="email" size="25" maxlength="255" value="{EMAIL}" /></td>
</tr>
<!-- BEGIN switch_edit_profile -->
<tr>
<td class="row1"><span class="gen">{L_CURRENT_PASSWORD}: *</span><br />
<span class="gensmall">{L_CONFIRM_PASSWORD_EXPLAIN}</span></td>
<td class="row2">
<input type="password" class="post" style="width: 200px" name="cur_password" size="25" maxlength="32" value="{CUR_PASSWORD}" />
</td>
</tr>
<!-- END switch_edit_profile -->
<tr>
<td class="row1"><span class="gen">{L_NEW_PASSWORD}: *</span><br />
<span class="gensmall">{L_PASSWORD_IF_CHANGED}</span></td>
<td class="row2">
<input type="password" class="post" style="width: 200px" name="new_password" size="25" maxlength="32" value="{NEW_PASSWORD}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_CONFIRM_PASSWORD}: * </span><br />
<span class="gensmall">{L_PASSWORD_CONFIRM_IF_CHANGED}</span></td>
<td class="row2">
<input type="password" class="post" style="width: 200px" name="password_confirm" size="25" maxlength="32" value="{PASSWORD_CONFIRM}" />
</td>
</tr>
<!-- Visual Confirmation -->
<!-- BEGIN switch_confirm -->
<tr>
<td class="row1" colspan="2" align="center"><span class="gensmall">{L_CONFIRM_CODE_IMPAIRED}</span><br /><br />{CONFIRM_IMG}<br /><br /></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_CONFIRM_CODE}: * </span><br /><span class="gensmall">{L_CONFIRM_CODE_EXPLAIN}</span></td>
<td class="row2"><input type="text" class="post" style="width: 200px" name="confirm_code" size="6" maxlength="6" value="" /></td>
</tr>
<!-- END switch_confirm -->
<tr>
<td class="catSides" colspan="2" height="28">&nbsp;</td>
</tr>
<tr>
<th class="thSides" colspan="2" height="25" valign="middle">{L_PROFILE_INFO}</th>
</tr>
<tr>
<td class="row2" colspan="2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_ICQ_NUMBER}:</span></td>
<td class="row2">
<input type="text" name="icq" class="post" style="width: 100px" size="10" maxlength="15" value="{ICQ}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_AIM}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 150px" name="aim" size="20" maxlength="255" value="{AIM}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_MESSENGER}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 150px" name="msn" size="20" maxlength="255" value="{MSN}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_YAHOO}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 150px" name="yim" size="20" maxlength="255" value="{YIM}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_WEBSITE}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 200px" name="website" size="25" maxlength="255" value="{WEBSITE}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_LOCATION}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 200px" name="location" size="25" maxlength="100" value="{LOCATION}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_OCCUPATION}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 200px" name="occupation" size="25" maxlength="100" value="{OCCUPATION}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_INTERESTS}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 200px" name="interests" size="35" maxlength="150" value="{INTERESTS}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_SIGNATURE}:</span><br /><span class="gensmall">{L_SIGNATURE_EXPLAIN}<br /><br />{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}</span></td>
<td class="row2">
<textarea name="signature" style="width: 300px" rows="6" cols="30" class="post">{SIGNATURE}</textarea>
</td>
</tr>
<tr>
<td class="catSides" colspan="2" height="28">&nbsp;</td>
</tr>
<tr>
<th class="thSides" colspan="2" height="25" valign="middle">{L_PREFERENCES}</th>
</tr>
<tr>
<td class="row1"><span class="gen">{L_PUBLIC_VIEW_EMAIL}:</span></td>
<td class="row2">
<input type="radio" name="viewemail" value="1" {VIEW_EMAIL_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="viewemail" value="0" {VIEW_EMAIL_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_HIDE_USER}:</span></td>
<td class="row2">
<input type="radio" name="hideonline" value="1" {HIDE_USER_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="hideonline" value="0" {HIDE_USER_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_NOTIFY_ON_REPLY}:</span><br />
<span class="gensmall">{L_NOTIFY_ON_REPLY_EXPLAIN}</span></td>
<td class="row2">
<input type="radio" name="notifyreply" value="1" {NOTIFY_REPLY_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="notifyreply" value="0" {NOTIFY_REPLY_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_NOTIFY_ON_PRIVMSG}:</span></td>
<td class="row2">
<input type="radio" name="notifypm" value="1" {NOTIFY_PM_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_POPUP_ON_PRIVMSG}:</span><br /><span class="gensmall">{L_POPUP_ON_PRIVMSG_EXPLAIN}</span></td>
<td class="row2">
<input type="radio" name="popup_pm" value="1" {POPUP_PM_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="popup_pm" value="0" {POPUP_PM_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ADD_SIGNATURE}:</span></td>
<td class="row2">
<input type="radio" name="attachsig" value="1" {ALWAYS_ADD_SIGNATURE_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="attachsig" value="0" {ALWAYS_ADD_SIGNATURE_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_BBCODE}:</span></td>
<td class="row2">
<input type="radio" name="allowbbcode" value="1" {ALWAYS_ALLOW_BBCODE_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="allowbbcode" value="0" {ALWAYS_ALLOW_BBCODE_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_HTML}:</span></td>
<td class="row2">
<input type="radio" name="allowhtml" value="1" {ALWAYS_ALLOW_HTML_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="allowhtml" value="0" {ALWAYS_ALLOW_HTML_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_SMILIES}:</span></td>
<td class="row2">
<input type="radio" name="allowsmilies" value="1" {ALWAYS_ALLOW_SMILIES_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_BOARD_LANGUAGE}:</span></td>
<td class="row2"><span class="gensmall">{LANGUAGE_SELECT}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_BOARD_STYLE}:</span></td>
<td class="row2"><span class="gensmall">{STYLE_SELECT}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_TIMEZONE}:</span></td>
<td class="row2"><span class="gensmall">{TIMEZONE_SELECT}</span></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_DATE_FORMAT}:</span><br />
<span class="gensmall">{L_DATE_FORMAT_EXPLAIN}</span></td>
<td class="row2">
<input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="14" class="post" />
</td>
</tr>
<!-- BEGIN switch_avatar_block -->
<tr>
<td class="catSides" colspan="2" height="28">&nbsp;</td>
</tr>
<tr>
<th class="thSides" colspan="2" height="12" valign="middle">{L_AVATAR_PANEL}</th>
</tr>
<tr>
<td class="row1" colspan="2"><table width="70%" cellspacing="2" cellpadding="0" border="0" align="center">
<tr>
<td width="65%"><span class="gensmall">{L_AVATAR_EXPLAIN}</span></td>
<td align="center"><span class="gensmall">{L_CURRENT_IMAGE}</span><br />{AVATAR}<br /><input type="checkbox" name="avatardel" />&nbsp;<span class="gensmall">{L_DELETE_AVATAR}</span></td>
</tr>
</table></td>
</tr>
<!-- BEGIN switch_avatar_local_upload -->
<tr>
<td class="row1"><span class="gen">{L_UPLOAD_AVATAR_FILE}:</span></td>
<td class="row2"><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" /><input type="file" name="avatar" class="post" style="width:200px" /></td>
</tr>
<!-- END switch_avatar_local_upload -->
<!-- BEGIN switch_avatar_remote_upload -->
<tr>
<td class="row1"><span class="gen">{L_UPLOAD_AVATAR_URL}:</span><br /><span class="gensmall">{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></td>
<td class="row2"><input type="text" name="avatarurl" size="40" class="post" style="width:200px" /></td>
</tr>
<!-- END switch_avatar_remote_upload -->
<!-- BEGIN switch_avatar_remote_link -->
<tr>
<td class="row1"><span class="gen">{L_LINK_REMOTE_AVATAR}:</span><br /><span class="gensmall">{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></td>
<td class="row2"><input type="text" name="avatarremoteurl" size="40" class="post" style="width:200px" /></td>
</tr>
<!-- END switch_avatar_remote_link -->
<!-- BEGIN switch_avatar_local_gallery -->
<tr>
<td class="row1"><span class="gen">{L_AVATAR_GALLERY}:</span></td>
<td class="row2"><input type="submit" name="avatargallery" value="{L_SHOW_GALLERY}" class="liteoption" /></td>
</tr>
<!-- END switch_avatar_local_gallery -->
<!-- END switch_avatar_block -->
<tr>
<td class="catBottom" colspan="2" align="center" height="28">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" />&nbsp;&nbsp;<input type="reset" value="{L_RESET}" name="reset" class="liteoption" /></td>
</tr>
</table>
 
</form>
/Forum/templates/subSilver/profile_avatar_gallery.tpl
0,0 → 1,37
 
<form action="{S_PROFILE_ACTION}" method="post">
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
</tr>
</table>
 
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
<tr>
<th class="thHead" colspan="{S_COLSPAN}" height="25" valign="middle">{L_AVATAR_GALLERY}</th>
</tr>
<tr>
<td class="catBottom" align="center" valign="middle" colspan="6" height="28"><span class="genmed">{L_CATEGORY}:&nbsp;{S_CATEGORY_SELECT}&nbsp;<input type="submit" class="liteoption" value="{L_GO}" name="avatargallery" /></span></td>
</tr>
<!-- BEGIN avatar_row -->
<tr>
<!-- BEGIN avatar_column -->
<td class="row1" align="center"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" alt="{avatar_row.avatar_column.AVATAR_NAME}" title="{avatar_row.avatar_column.AVATAR_NAME}" /></td>
<!-- END avatar_column -->
</tr>
<tr>
<!-- BEGIN avatar_option_column -->
<td class="row2" align="center"><input type="radio" name="avatarselect" value="{avatar_row.avatar_option_column.S_OPTIONS_AVATAR}" /></td>
<!-- END avatar_option_column -->
</tr>
 
<!-- END avatar_row -->
<tr>
<td class="catBottom" colspan="{S_COLSPAN}" align="center" height="28">{S_HIDDEN_FIELDS}
<input type="submit" name="submitavatar" value="{L_SELECT_AVATAR}" class="mainoption" />
&nbsp;&nbsp;
<input type="submit" name="cancelavatar" value="{L_RETURN_PROFILE}" class="liteoption" />
</td>
</tr>
</table>
</form>
/Forum/templates/subSilver/profile_send_email.tpl
0,0 → 1,74
 
<script language="JavaScript" type="text/javascript">
<!--
function checkForm(formObj) {
 
formErrors = false;
 
if (formObj.message.value.length < 2) {
formErrors = "{L_EMPTY_MESSAGE_EMAIL}";
}
else if ( formObj.subject.value.length < 2)
{
formErrors = "{L_EMPTY_SUBJECT_EMAIL}";
}
 
if (formErrors) {
alert(formErrors);
return false;
}
}
//-->
</script>
 
<form action="{S_POST_ACTION}" method="post" name="post" onSubmit="return checkForm(this)">
 
{ERROR_BOX}
 
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
</tr>
</table>
 
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
<tr>
<th class="thHead" colspan="2" height="25"><b>{L_SEND_EMAIL_MSG}</b></th>
</tr>
<tr>
<td class="row1" width="22%"><span class="gen"><b>{L_RECIPIENT}</b></span></td>
<td class="row2" width="78%"><span class="gen"><b>{USERNAME}</b></span> </td>
</tr>
<tr>
<td class="row1" width="22%"><span class="gen"><b>{L_SUBJECT}</b></span></td>
<td class="row2" width="78%"><span class="gen"><input type="text" name="subject" size="45" maxlength="100" style="width:450px" tabindex="2" class="post" value="{SUBJECT}" /></span> </td>
</tr>
<tr>
<td class="row1" valign="top"><span class="gen"><b>{L_MESSAGE_BODY}</b></span><br /><span class="gensmall">{L_MESSAGE_BODY_DESC}</span></td>
<td class="row2"><span class="gen"><textarea name="message" rows="25" cols="40" wrap="virtual" style="width:500px" tabindex="3" class="post">{MESSAGE}</textarea></span></td>
</tr>
<tr>
<td class="row1" valign="top"><span class="gen"><b>{L_OPTIONS}</b></span></td>
<td class="row2"><table cellspacing="0" cellpadding="1" border="0">
<tr>
<td><input type="checkbox" name="cc_email" value="1" checked="checked" /></td>
<td><span class="gen">{L_CC_EMAIL}</span></td>
</tr>
</table></td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center" height="28">{S_HIDDEN_FIELDS}<input type="submit" tabindex="6" name="submit" class="mainoption" value="{L_SEND_EMAIL}" /></td>
</tr>
</table>
 
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="right" valign="top"><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
</table></form>
 
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
<td valign="top" align="right">{JUMPBOX}</td>
</tr>
</table>
/Forum/templates/subSilver/profile_send_pass.tpl
0,0 → 1,35
 
<form action="{S_PROFILE_ACTION}" method="post">
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
</tr>
</table>
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
<tr>
<th class="thHead" colspan="2" height="25" valign="middle">{L_SEND_PASSWORD}</th>
</tr>
<tr>
<td class="row2" colspan="2"><span class="gensmall">{L_ITEMS_REQUIRED}</span></td>
</tr>
<tr>
<td class="row1" width="38%"><span class="gen">{L_USERNAME}: *</span></td>
<td class="row2">
<input type="text" class="post" style="width: 200px" name="username" size="25" maxlength="40" value="{USERNAME}" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_EMAIL_ADDRESS}: *</span></td>
<td class="row2">
<input type="text" class="post" style="width: 200px" name="email" size="25" maxlength="255" value="{EMAIL}" />
</td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center" height="28">{S_HIDDEN_FIELDS}
<input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" />
&nbsp;&nbsp;
<input type="reset" value="{L_RESET}" name="reset" class="liteoption" />
</td>
</tr>
</table>
</form>
/Forum/templates/subSilver/profile_view_body.tpl
0,0 → 1,91
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
</tr>
</table>
 
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<th class="thHead" colspan="2" height="25" nowrap="nowrap">{L_VIEWING_PROFILE}</th>
</tr>
<tr>
<td class="catLeft" width="40%" height="28" align="center"><b><span class="gen">{L_AVATAR}</span></b></td>
<td class="catRight" width="60%"><b><span class="gen">{L_ABOUT_USER}</span></b></td>
</tr>
<tr>
<td class="row1" height="6" valign="top" align="center">{AVATAR_IMG}<br /><span class="postdetails">{POSTER_RANK}</span></td>
<td class="row1" rowspan="3" valign="top"><table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td valign="middle" align="right" nowrap="nowrap"><span class="gen">{L_JOINED}:&nbsp;</span></td>
<td width="100%"><b><span class="gen">{JOINED}</span></b></td>
</tr>
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_TOTAL_POSTS}:&nbsp;</span></td>
<td valign="top"><b><span class="gen">{POSTS}</span></b><br /><span class="genmed">[{POST_PERCENT_STATS} / {POST_DAY_STATS}]</span> <br /><span class="genmed"><a href="{U_SEARCH_USER}" class="genmed">{L_SEARCH_USER_POSTS}</a></span></td>
</tr>
<tr>
<td valign="middle" align="right" nowrap="nowrap"><span class="gen">{L_LOCATION}:&nbsp;</span></td>
<td><b><span class="gen">{LOCATION}</span></b></td>
</tr>
<tr>
<td valign="middle" align="right" nowrap="nowrap"><span class="gen">{L_WEBSITE}:&nbsp;</span></td>
<td><span class="gen"><b>{WWW}</b></span></td>
</tr>
<tr>
<td valign="middle" align="right" nowrap="nowrap"><span class="gen">{L_OCCUPATION}:&nbsp;</span></td>
<td><b><span class="gen">{OCCUPATION}</span></b></td>
</tr>
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_INTERESTS}:</span></td>
<td> <b><span class="gen">{INTERESTS}</span></b></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="catLeft" align="center" height="28"><b><span class="gen">{L_CONTACT} {USERNAME} </span></b></td>
</tr>
<tr>
<td class="row1" valign="top"><table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td valign="middle" align="right" nowrap="nowrap"><span class="gen">{L_EMAIL_ADDRESS}:</span></td>
<td class="row1" valign="middle" width="100%"><b><span class="gen">{EMAIL_IMG}</span></b></td>
</tr>
<tr>
<td valign="middle" nowrap="nowrap" align="right"><span class="gen">{L_PM}:</span></td>
<td class="row1" valign="middle"><b><span class="gen">{PM_IMG}</span></b></td>
</tr>
<tr>
<td valign="middle" nowrap="nowrap" align="right"><span class="gen">{L_MESSENGER}:</span></td>
<td class="row1" valign="middle"><span class="gen">{MSN}</span></td>
</tr>
<tr>
<td valign="middle" nowrap="nowrap" align="right"><span class="gen">{L_YAHOO}:</span></td>
<td class="row1" valign="middle"><span class="gen">{YIM_IMG}</span></td>
</tr>
<tr>
<td valign="middle" nowrap="nowrap" align="right"><span class="gen">{L_AIM}:</span></td>
<td class="row1" valign="middle"><span class="gen">{AIM_IMG}</span></td>
</tr>
<tr>
<td valign="middle" nowrap="nowrap" align="right"><span class="gen">{L_ICQ_NUMBER}:</span></td>
<td class="row1"><script language="JavaScript" type="text/javascript"><!--
 
if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 )
document.write(' {ICQ_IMG}');
else
document.write('<table cellspacing="0" cellpadding="0" border="0"><tr><td nowrap="nowrap"><div style="position:relative;height:18px"><div style="position:absolute">{ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">{ICQ_STATUS_IMG}</div></div></td></tr></table>');
//--></script><noscript>{ICQ_IMG}</noscript></td>
</tr>
</table>
</td>
</tr>
</table>
 
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="right"><span class="nav"><br />{JUMPBOX}</span></td>
</tr>
</table>
/Forum/templates/subSilver/search_body.tpl
0,0 → 1,57
 
<form action="{S_SEARCH_ACTION}" method="POST"><table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
</tr>
</table>
 
<table class="forumline" width="100%" cellpadding="4" cellspacing="1" border="0">
<tr>
<th class="thHead" colspan="4" height="25">{L_SEARCH_QUERY}</th>
</tr>
<tr>
<td class="row1" colspan="2" width="50%"><span class="gen">{L_SEARCH_KEYWORDS}:</span><br /><span class="gensmall">{L_SEARCH_KEYWORDS_EXPLAIN}</span></td>
<td class="row2" colspan="2" valign="top"><span class="genmed"><input type="text" style="width: 300px" class="post" name="search_keywords" size="30" /><br /><input type="radio" name="search_terms" value="any" checked="checked" /> {L_SEARCH_ANY_TERMS}<br /><input type="radio" name="search_terms" value="all" /> {L_SEARCH_ALL_TERMS}</span></td>
</tr>
<tr>
<td class="row1" colspan="2"><span class="gen">{L_SEARCH_AUTHOR}:</span><br /><span class="gensmall">{L_SEARCH_AUTHOR_EXPLAIN}</span></td>
<td class="row2" colspan="2" valign="middle"><span class="genmed"><input type="text" style="width: 300px" class="post" name="search_author" size="30" /></span></td>
</tr>
<tr>
<th class="thHead" colspan="4" height="25">{L_SEARCH_OPTIONS}</th>
</tr>
<tr>
<td class="row1" align="right"><span class="gen">{L_FORUM}:&nbsp;</span></td>
<td class="row2"><span class="genmed"><select class="post" name="search_forum">{S_FORUM_OPTIONS}</select></span></td>
<td class="row1" align="right" nowrap="nowrap"><span class="gen">{L_SEARCH_PREVIOUS}:&nbsp;</span></td>
<td class="row2" valign="middle"><span class="genmed"><select class="post" name="search_time">{S_TIME_OPTIONS}</select><br /><input type="radio" name="search_fields" value="all" checked="checked" /> {L_SEARCH_MESSAGE_TITLE}<br /><input type="radio" name="search_fields" value="msgonly" /> {L_SEARCH_MESSAGE_ONLY}</span></td>
</tr>
<tr>
<td class="row1" align="right"><span class="gen">{L_CATEGORY}:&nbsp;</span></td>
<td class="row2"><span class="genmed"><select class="post" name="search_cat">{S_CATEGORY_OPTIONS}
</select></span></td>
<td class="row1" align="right"><span class="gen">{L_SORT_BY}:&nbsp;</span></td>
<td class="row2" valign="middle" nowrap="nowrap"><span class="genmed"><select class="post" name="sort_by">{S_SORT_OPTIONS}</select><br /><input type="radio" name="sort_dir" value="ASC" /> {L_SORT_ASCENDING}<br /><input type="radio" name="sort_dir" value="DESC" checked="checked" /> {L_SORT_DESCENDING}</span>&nbsp;</td>
</tr>
<tr>
<td class="row1" align="right" nowrap="nowrap"><span class="gen">{L_DISPLAY_RESULTS}:&nbsp;</span></td>
<td class="row2" nowrap="nowrap"><input type="radio" name="show_results" value="posts" /><span class="genmed">{L_POSTS}<input type="radio" name="show_results" value="topics" checked="checked" />{L_TOPICS}</span></td>
<td class="row1" align="right"><span class="gen">{L_RETURN_FIRST}</span></td>
<td class="row2"><span class="genmed"><select class="post" name="return_chars">{S_CHARACTER_OPTIONS}</select> {L_CHARACTERS}</span></td>
</tr>
<tr>
<td class="catBottom" colspan="4" align="center" height="28">{S_HIDDEN_FIELDS}<input class="liteoption" type="submit" value="{L_SEARCH}" /></td>
</tr>
</table>
 
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="right" valign="middle"><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
</table></form>
 
<table width="100%" border="0">
<tr>
<td align="right" valign="top">{JUMPBOX}</td>
</tr>
</table>
/Forum/templates/subSilver/search_results_posts.tpl
0,0 → 1,51
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" valign="bottom"><span class="maintitle">{L_SEARCH_MATCHES}</span><br /></td>
</tr>
</table>
 
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
</tr>
</table>
 
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline" align="center">
<tr>
<th width="150" height="25" class="thCornerL" nowrap="nowrap">{L_AUTHOR}</th>
<th width="100%" class="thCornerR" nowrap="nowrap">{L_MESSAGE}</th>
</tr>
<!-- BEGIN searchresults -->
<tr>
<td class="catHead" colspan="2" height="28"><span class="topictitle"><img src="templates/subSilver/images/folder.gif" align="absmiddle" />&nbsp; {L_TOPIC}:&nbsp;<a href="{searchresults.U_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span></td>
</tr>
<tr>
<td width="150" align="left" valign="top" class="row1" rowspan="2"><span class="name"><b>{searchresults.POSTER_NAME}</b></span><br />
<br />
<span class="postdetails">{L_REPLIES}: <b>{searchresults.TOPIC_REPLIES}</b><br />
{L_VIEWS}: <b>{searchresults.TOPIC_VIEWS}</b></span><br />
</td>
<td width="100%" valign="top" class="row1"><img src="{searchresults.MINI_POST_IMG}" width="12" height="9" alt="{searchresults.L_MINI_POST_ALT}" title="{searchresults.L_MINI_POST_ALT}" border="0" /><span class="postdetails">{L_FORUM}:&nbsp;<b><a href="{searchresults.U_FORUM}" class="postdetails">{searchresults.FORUM_NAME}</a></b>&nbsp; &nbsp;{L_POSTED}: {searchresults.POST_DATE}&nbsp; &nbsp;{L_SUBJECT}: <b><a href="{searchresults.U_POST}">{searchresults.POST_SUBJECT}</a></b></span></td>
</tr>
<tr>
<td valign="top" class="row1"><span class="postbody">{searchresults.MESSAGE}</span></td>
</tr>
<!-- END searchresults -->
<tr>
<td class="catBottom" colspan="2" height="28" align="center">&nbsp; </td>
</tr>
</table>
 
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="left" valign="top"><span class="nav">{PAGE_NUMBER}</span></td>
<td align="right" valign="top" nowrap="nowrap"><span class="nav">{PAGINATION}</span><br /><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
</table>
 
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
<td valign="top" align="right">{JUMPBOX}</td>
</tr>
</table>
/Forum/templates/subSilver/search_results_topics.tpl
0,0 → 1,51
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" valign="bottom"><span class="maintitle">{L_SEARCH_MATCHES}</span><br /></td>
</tr>
</table>
 
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
</tr>
</table>
 
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
<tr>
<th width="4%" height="25" class="thCornerL" nowrap="nowrap">&nbsp;</th>
<th class="thTop" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th>
<th class="thTop" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
<th class="thTop" nowrap="nowrap">&nbsp;{L_AUTHOR}&nbsp;</th>
<th class="thTop" nowrap="nowrap">&nbsp;{L_REPLIES}&nbsp;</th>
<th class="thTop" nowrap="nowrap">&nbsp;{L_VIEWS}&nbsp;</th>
<th class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
</tr>
<!-- BEGIN searchresults -->
<tr>
<td class="row1" align="center" valign="middle"><img src="{searchresults.TOPIC_FOLDER_IMG}" width="19" height="18" alt="{searchresults.L_TOPIC_FOLDER_ALT}" title="{searchresults.L_TOPIC_FOLDER_ALT}" /></td>
<td class="row1"><span class="forumlink"><a href="{searchresults.U_VIEW_FORUM}" class="forumlink">{searchresults.FORUM_NAME}</a></span></td>
<td class="row2"><span class="topictitle">{searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span><br /><span class="gensmall">{searchresults.GOTO_PAGE}</span></td>
<td class="row1" align="center" valign="middle"><span class="name">{searchresults.TOPIC_AUTHOR}</span></td>
<td class="row2" align="center" valign="middle"><span class="postdetails">{searchresults.REPLIES}</span></td>
<td class="row1" align="center" valign="middle"><span class="postdetails">{searchresults.VIEWS}</span></td>
<td class="row2" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{searchresults.LAST_POST_TIME}<br />{searchresults.LAST_POST_AUTHOR} {searchresults.LAST_POST_IMG}</span></td>
</tr>
<!-- END searchresults -->
<tr>
<td class="catBottom" colspan="7" height="28" valign="middle">&nbsp; </td>
</tr>
</table>
 
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="left" valign="top"><span class="nav">{PAGE_NUMBER}</span></td>
<td align="right" valign="top" nowrap="nowrap"><span class="nav">{PAGINATION}</span><br /><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
</table>
 
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
<td valign="top" align="right">{JUMPBOX}</td>
</tr>
</table>
/Forum/templates/subSilver/search_username.tpl
0,0 → 1,30
 
<script language="javascript" type="text/javascript">
<!--
function refresh_username(selected_username)
{
opener.document.forms['post'].username.value = selected_username;
opener.focus();
window.close();
}
//-->
</script>
 
<form method="post" name="search" action="{S_SEARCH_ACTION}">
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td><table width="100%" class="forumline" cellpadding="4" cellspacing="1" border="0">
<tr>
<th class="thHead" height="25">{L_SEARCH_USERNAME}</th>
</tr>
<tr>
<td valign="top" class="row1"><span class="genmed"><br /><input type="text" name="search_username" value="{USERNAME}" class="post" />&nbsp; <input type="submit" name="search" value="{L_SEARCH}" class="liteoption" /></span><br /><span class="gensmall">{L_SEARCH_EXPLAIN}</span><br />
<!-- BEGIN switch_select_name -->
<span class="genmed">{L_UPDATE_USERNAME}<br /><select name="username_list">{S_USERNAME_OPTIONS}</select>&nbsp; <input type="submit" class="liteoption" onClick="refresh_username(this.form.username_list.options[this.form.username_list.selectedIndex].value);return false;" name="use" value="{L_SELECT}" /></span><br />
<!-- END switch_select_name -->
<br /><span class="genmed"><a href="javascript:window.close();" class="genmed">{L_CLOSE_WINDOW}</a></span></td>
</tr>
</table></td>
</tr>
</table>
</form>
/Forum/templates/subSilver/simple_footer.tpl
0,0 → 1,19
 
<div align="center"><span class="copyright"><br />
<!--
We request you retain the full copyright notice below including the link to www.phpbb.com.
This not only gives respect to the large amount of time given freely by the developers
but also helps build interest, traffic and use of phpBB 2.0. If you cannot (for good
reason) retain the full copyright we request you at least leave in place the
Powered by phpBB line, with phpBB linked to www.phpbb.com. If you refuse
to include even this then support on our forums may be affected.
 
The phpBB Group : 2002
// -->
Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> &copy; 2001, 2005 phpBB Group</span></div>
</td>
</tr>
</table>
 
</body>
</html>
/Forum/templates/subSilver/simple_header.tpl
0,0 → 1,237
<!-- DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" -->
<!-- <html xmlns="http://www.w3.org/1999/xhtml"> -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<style type="text/css">
<!--
-->
</style>
{META}
<title>{SITENAME} :: {PAGE_TITLE}</title>
<!-- link rel="stylesheet" href="templates/subSilver/{T_HEAD_STYLESHEET}" type="text/css" -->
<style type="text/css">
<!--
 
/*
The original subSilver Theme for phpBB version 2+
Created by subBlue design
http://www.subBlue.com
 
NOTE: These CSS definitions are stored within the main page body so that you can use the phpBB2
theme administration centre. When you have finalised your style you could cut the final CSS code
and place it in an external file, deleting this section to save bandwidth.
*/
/* General page style. The scroll bar colours only visible in IE5.5+ */
body {
background-color: {T_BODY_BGCOLOR};
scrollbar-face-color: {T_TR_COLOR2};
scrollbar-highlight-color: {T_TD_COLOR2};
scrollbar-shadow-color: {T_TR_COLOR2};
scrollbar-3dlight-color: {T_TR_COLOR3};
scrollbar-arrow-color: {T_BODY_LINK};
scrollbar-track-color: {T_TR_COLOR1};
scrollbar-darkshadow-color: {T_TH_COLOR1};
}
 
/* General font families for common tags */
font,th,td,p { font-family: {T_FONTFACE1} }
a:link,a:active,a:visited { color : {T_BODY_LINK}; }
a:hover { text-decoration: underline; color : {T_BODY_HLINK}; }
hr { height: 0px; border: solid {T_TR_COLOR3} 0px; border-top-width: 1px;}
 
 
/* This is the border line & background colour round the entire page */
.bodyline { background-color: {T_TD_COLOR2}; border: 1px {T_TH_COLOR1} solid; }
 
/* This is the outline round the main forum tables */
.forumline { background-color: {T_TD_COLOR2}; border: 2px {T_TH_COLOR2} solid; }
 
 
/* Main table cell colours and backgrounds */
td.row1 { background-color: {T_TR_COLOR1}; }
td.row2 { background-color: {T_TR_COLOR2}; }
td.row3 { background-color: {T_TR_COLOR3}; }
 
 
/*
This is for the table cell above the Topics, Post & Last posts on the index.php page
By default this is the fading out gradiated silver background.
However, you could replace this with a bitmap specific for each forum
*/
td.rowpic {
background-color: {T_TD_COLOR2};
background-image: url(templates/subSilver/images/{T_TH_CLASS3});
background-repeat: repeat-y;
}
 
/* Header cells - the blue and silver gradient backgrounds */
th {
color: {T_FONTCOLOR3}; font-size: {T_FONTSIZE2}px; font-weight : bold;
background-color: {T_BODY_LINK}; height: 25px;
background-image: url(templates/subSilver/images/{T_TH_CLASS2});
}
 
td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {
background-image: url(templates/subSilver/images/{T_TH_CLASS1});
background-color:{T_TR_COLOR3}; border: {T_TH_COLOR3}; border-style: solid; height: 28px;
}
 
 
/*
Setting additional nice inner borders for the main table cells.
The names indicate which sides the border will be on.
Don't worry if you don't understand this, just ignore it :-)
*/
td.cat,td.catHead,td.catBottom {
height: 29px;
}
th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.thCornerR {
font-weight: bold; border: {T_TD_COLOR2}; border-style: solid; height: 28px; }
td.row3Right,td.spaceRow {
background-color: {T_TR_COLOR3}; border: {T_TH_COLOR3}; border-style: solid; }
 
th.thHead,td.catHead { font-size: {T_FONTSIZE3}px; border-width: 1px 1px 0px 1px; }
th.thSides,td.catSides,td.spaceRow { border-width: 0px 1px 0px 1px; }
th.thRight,td.catRight,td.row3Right { border-width: 0px 1px 0px 0px; }
th.thLeft,td.catLeft { border-width: 0px 0px 0px 1px; }
th.thBottom,td.catBottom { border-width: 0px 1px 1px 1px; }
th.thTop { border-width: 1px 0px 0px 0px; }
th.thCornerL { border-width: 1px 0px 0px 1px; }
th.thCornerR { border-width: 1px 1px 0px 0px; }
 
 
/* The largest text used in the index page title and toptic title etc. */
.maintitle {
font-weight: bold; font-size: 22px; font-family: "{T_FONTFACE2}",{T_FONTFACE1};
text-decoration: none; line-height : 120%; color : {T_BODY_TEXT};
}
 
 
/* General text */
.gen { font-size : {T_FONTSIZE3}px; }
.genmed { font-size : {T_FONTSIZE2}px; }
.gensmall { font-size : {T_FONTSIZE1}px; }
.gen,.genmed,.gensmall { color : {T_BODY_TEXT}; }
a.gen,a.genmed,a.gensmall { color: {T_BODY_LINK}; text-decoration: none; }
a.gen:hover,a.genmed:hover,a.gensmall:hover { color: {T_BODY_HLINK}; text-decoration: underline; }
 
 
/* The register, login, search etc links at the top of the page */
.mainmenu { font-size : {T_FONTSIZE2}px; color : {T_BODY_TEXT} }
a.mainmenu { text-decoration: none; color : {T_BODY_LINK}; }
a.mainmenu:hover{ text-decoration: underline; color : {T_BODY_HLINK}; }
 
 
/* Forum category titles */
.cattitle { font-weight: bold; font-size: {T_FONTSIZE3}px ; letter-spacing: 1px; color : {T_BODY_LINK}}
a.cattitle { text-decoration: none; color : {T_BODY_LINK}; }
a.cattitle:hover{ text-decoration: underline; }
 
 
/* Forum title: Text and link to the forums used in: index.php */
.forumlink { font-weight: bold; font-size: {T_FONTSIZE3}px; color : {T_BODY_LINK}; }
a.forumlink { text-decoration: none; color : {T_BODY_LINK}; }
a.forumlink:hover{ text-decoration: underline; color : {T_BODY_HLINK}; }
 
 
/* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */
.nav { font-weight: bold; font-size: {T_FONTSIZE2}px; color : {T_BODY_TEXT};}
a.nav { text-decoration: none; color : {T_BODY_LINK}; }
a.nav:hover { text-decoration: underline; }
 
 
/* titles for the topics: could specify viewed link colour too */
.topictitle { font-weight: bold; font-size: {T_FONTSIZE2}px; color : {T_BODY_TEXT}; }
a.topictitle:link { text-decoration: none; color : {T_BODY_LINK}; }
a.topictitle:visited { text-decoration: none; color : {T_BODY_VLINK}; }
a.topictitle:hover { text-decoration: underline; color : {T_BODY_HLINK}; }
 
 
/* Name of poster in viewmsg.php and viewtopic.php and other places */
.name { font-size : {T_FONTSIZE2}px; color : {T_BODY_TEXT};}
 
/* Location, number of posts, post date etc */
.postdetails { font-size : {T_FONTSIZE1}px; color : {T_BODY_TEXT}; }
 
 
/* The content of the posts (body of text) */
.postbody { font-size : {T_FONTSIZE3}px; line-height: 18px}
a.postlink:link { text-decoration: none; color : {T_BODY_LINK} }
a.postlink:visited { text-decoration: none; color : {T_BODY_VLINK}; }
a.postlink:hover { text-decoration: underline; color : {T_BODY_HLINK}}
 
 
/* Quote & Code blocks */
.code {
font-family: {T_FONTFACE3}; font-size: {T_FONTSIZE2}px; color: {T_FONTCOLOR2};
background-color: {T_TD_COLOR1}; border: {T_TR_COLOR3}; border-style: solid;
border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}
 
.quote {
font-family: {T_FONTFACE1}; font-size: {T_FONTSIZE2}px; color: {T_FONTCOLOR1}; line-height: 125%;
background-color: {T_TD_COLOR1}; border: {T_TR_COLOR3}; border-style: solid;
border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}
 
 
/* Copyright and bottom info */
.copyright { font-size: {T_FONTSIZE1}px; font-family: {T_FONTFACE1}; color: {T_FONTCOLOR1}; letter-spacing: -1px;}
a.copyright { color: {T_FONTCOLOR1}; text-decoration: none;}
a.copyright:hover { color: {T_BODY_TEXT}; text-decoration: underline;}
 
 
/* Form elements */
input,textarea, select {
color : {T_BODY_TEXT};
font: normal {T_FONTSIZE2}px {T_FONTFACE1};
border-color : {T_BODY_TEXT};
}
 
/* The text input fields background colour */
input.post, textarea.post, select {
background-color : {T_TD_COLOR2};
}
 
input { text-indent : 2px; }
 
/* The buttons used for bbCode styling in message post */
input.button {
background-color : {T_TR_COLOR1};
color : {T_BODY_TEXT};
font-size: {T_FONTSIZE2}px; font-family: {T_FONTFACE1};
}
 
/* The main submit button option */
input.mainoption {
background-color : {T_TD_COLOR1};
font-weight : bold;
}
 
/* None-bold submit button */
input.liteoption {
background-color : {T_TD_COLOR1};
font-weight : normal;
}
 
/* This is the line in the posting page which shows the rollover
help line. This is actually a text box, but if set to be the same
colour as the background no one will know ;)
*/
.helpline { background-color: {T_TR_COLOR2}; border-style: none; }
 
 
/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
@import url("templates/subSilver/formIE.css");
-->
</style>
</head>
 
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">
<span class="gen"><a name="top"></a></span>
/Forum/templates/subSilver/subSilver.cfg
0,0 → 1,101
<?php
//
// ** Configuration file for subSilver template **
//
// ** copyright (C) 2001 The phpBB Group **
// ** Created by subBlue design **
// ** www.subBlue.com **
//
// ** subSilver dev. forum: www.subSky.com/phpBB2/ **
//
// $Id: subSilver.cfg,v 1.11.2.1 2005/10/08 19:41:31 grahamje Exp $
//
// Please note that to enable support of different languages
// the {LANG} place holder is available. This will be replaced
// with xxx where xxx is the users selected language. If
// that language isn't available it will default to english.
// Therefore you MUST ensure you have at least a english
// directory if you choose to localise your template
//
 
//
// Do not alter this line!
//
define(TEMPLATE_CONFIG, TRUE);
 
$current_template_images = $current_template_path . "/images";
 
$images['icon_quote'] = "$current_template_images/{LANG}/icon_quote.gif";
$images['icon_edit'] = "$current_template_images/{LANG}/icon_edit.gif";
$images['icon_search'] = "$current_template_images/{LANG}/icon_search.gif";
$images['icon_profile'] = "$current_template_images/{LANG}/icon_profile.gif";
$images['icon_pm'] = "$current_template_images/{LANG}/icon_pm.gif";
$images['icon_email'] = "$current_template_images/{LANG}/icon_email.gif";
$images['icon_delpost'] = "$current_template_images/icon_delete.gif";
$images['icon_ip'] = "$current_template_images/{LANG}/icon_ip.gif";
$images['icon_www'] = "$current_template_images/{LANG}/icon_www.gif";
$images['icon_icq'] = "$current_template_images/{LANG}/icon_icq_add.gif";
$images['icon_aim'] = "$current_template_images/{LANG}/icon_aim.gif";
$images['icon_yim'] = "$current_template_images/{LANG}/icon_yim.gif";
$images['icon_msnm'] = "$current_template_images/{LANG}/icon_msnm.gif";
$images['icon_minipost'] = "$current_template_images/icon_minipost.gif";
$images['icon_gotopost'] = "$current_template_images/icon_minipost.gif";
$images['icon_minipost_new'] = "$current_template_images/icon_minipost_new.gif";
$images['icon_latest_reply'] = "$current_template_images/icon_latest_reply.gif";
$images['icon_newest_reply'] = "$current_template_images/icon_newest_reply.gif";
 
$images['forum'] = "$current_template_images/folder_big.gif";
$images['forum_new'] = "$current_template_images/folder_new_big.gif";
$images['forum_locked'] = "$current_template_images/folder_locked_big.gif";
 
$images['folder'] = "$current_template_images/folder.gif";
$images['folder_new'] = "$current_template_images/folder_new.gif";
$images['folder_hot'] = "$current_template_images/folder_hot.gif";
$images['folder_hot_new'] = "$current_template_images/folder_new_hot.gif";
$images['folder_locked'] = "$current_template_images/folder_lock.gif";
$images['folder_locked_new'] = "$current_template_images/folder_lock_new.gif";
$images['folder_sticky'] = "$current_template_images/folder_sticky.gif";
$images['folder_sticky_new'] = "$current_template_images/folder_sticky_new.gif";
$images['folder_announce'] = "$current_template_images/folder_announce.gif";
$images['folder_announce_new'] = "$current_template_images/folder_announce_new.gif";
 
$images['post_new'] = "$current_template_images/{LANG}/post.gif";
$images['post_locked'] = "$current_template_images/{LANG}/reply-locked.gif";
$images['reply_new'] = "$current_template_images/{LANG}/reply.gif";
$images['reply_locked'] = "$current_template_images/{LANG}/reply-locked.gif";
 
$images['pm_inbox'] = "$current_template_images/msg_inbox.gif";
$images['pm_outbox'] = "$current_template_images/msg_outbox.gif";
$images['pm_savebox'] = "$current_template_images/msg_savebox.gif";
$images['pm_sentbox'] = "$current_template_images/msg_sentbox.gif";
$images['pm_readmsg'] = "$current_template_images/folder.gif";
$images['pm_unreadmsg'] = "$current_template_images/folder_new.gif";
$images['pm_replymsg'] = "$current_template_images/{LANG}/reply.gif";
$images['pm_postmsg'] = "$current_template_images/{LANG}/msg_newpost.gif";
$images['pm_quotemsg'] = "$current_template_images/{LANG}/icon_quote.gif";
$images['pm_editmsg'] = "$current_template_images/{LANG}/icon_edit.gif";
$images['pm_new_msg'] = "";
$images['pm_no_new_msg'] = "";
 
$images['Topic_watch'] = "";
$images['topic_un_watch'] = "";
$images['topic_mod_lock'] = "$current_template_images/topic_lock.gif";
$images['topic_mod_unlock'] = "$current_template_images/topic_unlock.gif";
$images['topic_mod_split'] = "$current_template_images/topic_split.gif";
$images['topic_mod_move'] = "$current_template_images/topic_move.gif";
$images['topic_mod_delete'] = "$current_template_images/topic_delete.gif";
 
$images['voting_graphic'][0] = "$current_template_images/voting_bar.gif";
$images['voting_graphic'][1] = "$current_template_images/voting_bar.gif";
$images['voting_graphic'][2] = "$current_template_images/voting_bar.gif";
$images['voting_graphic'][3] = "$current_template_images/voting_bar.gif";
$images['voting_graphic'][4] = "$current_template_images/voting_bar.gif";
 
//
// Vote graphic length defines the maximum length of a vote result
// graphic, ie. 100% = this length
//
$board_config['vote_graphic_length'] = 205;
$board_config['privmsg_graphic_length'] = 175;
 
?>
/Forum/templates/subSilver/subSilver.css
0,0 → 1,210
/*
The original subSilver Theme for phpBB version 2+
Created by subBlue design
http://www.subBlue.com
*/
 
 
/* General page style. The scroll bar colours only visible in IE5.5+ */
body {
background-color: #E5E5E5;
scrollbar-face-color: #DEE3E7;
scrollbar-highlight-color: #FFFFFF;
scrollbar-shadow-color: #DEE3E7;
scrollbar-3dlight-color: #D1D7DC;
scrollbar-arrow-color: #006699;
scrollbar-track-color: #EFEFEF;
scrollbar-darkshadow-color: #98AAB1;
}
 
/* General font families for common tags */
font,th,td,p { font-family: Verdana, Arial, Helvetica, sans-serif }
a:link,a:active,a:visited { color : #006699; }
a:hover { text-decoration: underline; color : #DD6900; }
hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;}
 
 
/* This is the border line & background colour round the entire page */
.bodyline { background-color: #FFFFFF; border: 1px #98AAB1 solid; }
 
/* This is the outline round the main forum tables */
.forumline { background-color: #FFFFFF; border: 2px #006699 solid; }
 
 
/* Main table cell colours and backgrounds */
td.row1 { background-color: #EFEFEF; }
td.row2 { background-color: #DEE3E7; }
td.row3 { background-color: #D1D7DC; }
 
 
/*
This is for the table cell above the Topics, Post & Last posts on the index.php page
By default this is the fading out gradiated silver background.
However, you could replace this with a bitmap specific for each forum
*/
td.rowpic {
background-color: #FFFFFF;
background-image: url(images/cellpic2.jpg);
background-repeat: repeat-y;
}
 
/* Header cells - the blue and silver gradient backgrounds */
th {
color: #FFA34F; font-size: 11px; font-weight : bold;
background-color: #006699; height: 25px;
background-image: url(images/cellpic3.gif);
}
 
td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {
background-image: url(images/cellpic1.gif);
background-color:#D1D7DC; border: #FFFFFF; border-style: solid; height: 28px;
}
 
 
/*
Setting additional nice inner borders for the main table cells.
The names indicate which sides the border will be on.
Don't worry if you don't understand this, just ignore it :-)
*/
td.cat,td.catHead,td.catBottom {
height: 29px;
border-width: 0px 0px 0px 0px;
}
th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.thCornerR {
font-weight: bold; border: #FFFFFF; border-style: solid; height: 28px; }
td.row3Right,td.spaceRow {
background-color: #D1D7DC; border: #FFFFFF; border-style: solid; }
 
th.thHead,td.catHead { font-size: 12px; border-width: 1px 1px 0px 1px; }
th.thSides,td.catSides,td.spaceRow { border-width: 0px 1px 0px 1px; }
th.thRight,td.catRight,td.row3Right { border-width: 0px 1px 0px 0px; }
th.thLeft,td.catLeft { border-width: 0px 0px 0px 1px; }
th.thBottom,td.catBottom { border-width: 0px 1px 1px 1px; }
th.thTop { border-width: 1px 0px 0px 0px; }
th.thCornerL { border-width: 1px 0px 0px 1px; }
th.thCornerR { border-width: 1px 1px 0px 0px; }
 
 
/* The largest text used in the index page title and toptic title etc. */
.maintitle,h1,h2 {
font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif;
text-decoration: none; line-height : 120%; color : #000000;
}
 
 
/* General text */
.gen { font-size : 12px; }
.genmed { font-size : 11px; }
.gensmall { font-size : 10px; }
.gen,.genmed,.gensmall { color : #000000; }
a.gen,a.genmed,a.gensmall { color: #006699; text-decoration: none; }
a.gen:hover,a.genmed:hover,a.gensmall:hover { color: #DD6900; text-decoration: underline; }
 
 
/* The register, login, search etc links at the top of the page */
.mainmenu { font-size : 11px; color : #000000 }
a.mainmenu { text-decoration: none; color : #006699; }
a.mainmenu:hover{ text-decoration: underline; color : #DD6900; }
 
 
/* Forum category titles */
.cattitle { font-weight: bold; font-size: 12px ; letter-spacing: 1px; color : #006699}
a.cattitle { text-decoration: none; color : #006699; }
a.cattitle:hover{ text-decoration: underline; }
 
 
/* Forum title: Text and link to the forums used in: index.php */
.forumlink { font-weight: bold; font-size: 12px; color : #006699; }
a.forumlink { text-decoration: none; color : #006699; }
a.forumlink:hover{ text-decoration: underline; color : #DD6900; }
 
 
/* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */
.nav { font-weight: bold; font-size: 11px; color : #000000;}
a.nav { text-decoration: none; color : #006699; }
a.nav:hover { text-decoration: underline; }
 
 
/* titles for the topics: could specify viewed link colour too */
.topictitle { font-weight: bold; font-size: 11px; color : #000000; }
a.topictitle:link { text-decoration: none; color : #006699; }
a.topictitle:visited { text-decoration: none; color : #5493B4; }
a.topictitle:hover { text-decoration: underline; color : #DD6900; }
 
 
/* Name of poster in viewmsg.php and viewtopic.php and other places */
.name { font-size : 11px; color : #000000;}
 
/* Location, number of posts, post date etc */
.postdetails { font-size : 10px; color : #000000; }
 
 
/* The content of the posts (body of text) */
.postbody { font-size : 12px;}
a.postlink:link { text-decoration: none; color : #006699 }
a.postlink:visited { text-decoration: none; color : #5493B4; }
a.postlink:hover { text-decoration: underline; color : #DD6900}
 
 
/* Quote & Code blocks */
.code {
font-family: Courier, 'Courier New', sans-serif; font-size: 11px; color: #006600;
background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}
 
.quote {
font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #444444; line-height: 125%;
background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}
 
 
/* Copyright and bottom info */
.copyright { font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #444444; letter-spacing: -1px;}
a.copyright { color: #444444; text-decoration: none;}
a.copyright:hover { color: #000000; text-decoration: underline;}
 
 
/* Form elements */
input,textarea, select {
color : #000000;
font: normal 11px Verdana, Arial, Helvetica, sans-serif;
border-color : #000000;
}
 
/* The text input fields background colour */
input.post, textarea.post, select {
background-color : #FFFFFF;
}
 
input { text-indent : 2px; }
 
/* The buttons used for bbCode styling in message post */
input.button {
background-color : #EFEFEF;
color : #000000;
font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif;
}
 
/* The main submit button option */
input.mainoption {
background-color : #FAFAFA;
font-weight : bold;
}
 
/* None-bold submit button */
input.liteoption {
background-color : #FAFAFA;
font-weight : normal;
}
 
/* This is the line in the posting page which shows the rollover
help line. This is actually a text box, but if set to be the same
colour as the background no one will know ;)
*/
.helpline { background-color: #DEE3E7; border-style: none; }
 
 
/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
@import url("formIE.css");
/Forum/templates/subSilver/theme_info.cfg
0,0 → 1,51
<?php
 
//
// phpBB 2.x auto-generated theme config file for subSilver
// Do not change anything in this file!
//
 
$subSilver[0]['template_name'] = "subSilver";
$subSilver[0]['style_name'] = "subSilver";
$subSilver[0]['head_stylesheet'] = "subSilver.css";
$subSilver[0]['body_background'] = "";
$subSilver[0]['body_bgcolor'] = "E5E5E5";
$subSilver[0]['body_text'] = "000000";
$subSilver[0]['body_link'] = "006699";
$subSilver[0]['body_vlink'] = "5493B4";
$subSilver[0]['body_alink'] = "";
$subSilver[0]['body_hlink'] = "DD6900";
$subSilver[0]['tr_color1'] = "EFEFEF";
$subSilver[0]['tr_color2'] = "DEE3E7";
$subSilver[0]['tr_color3'] = "D1D7DC";
$subSilver[0]['tr_class1'] = "";
$subSilver[0]['tr_class2'] = "";
$subSilver[0]['tr_class3'] = "";
$subSilver[0]['th_color1'] = "98AAB1";
$subSilver[0]['th_color2'] = "006699";
$subSilver[0]['th_color3'] = "FFFFFF";
$subSilver[0]['th_class1'] = "cellpic1.gif";
$subSilver[0]['th_class2'] = "cellpic3.gif";
$subSilver[0]['th_class3'] = "cellpic2.jpg";
$subSilver[0]['td_color1'] = "FAFAFA";
$subSilver[0]['td_color2'] = "FFFFFF";
$subSilver[0]['td_color3'] = "";
$subSilver[0]['td_class1'] = "row1";
$subSilver[0]['td_class2'] = "row2";
$subSilver[0]['td_class3'] = "";
$subSilver[0]['fontface1'] = "Verdana, Arial, Helvetica, sans-serif";
$subSilver[0]['fontface2'] = "Trebuchet MS";
$subSilver[0]['fontface3'] = "Courier, \'Courier New\', sans-serif";
$subSilver[0]['fontsize1'] = "10";
$subSilver[0]['fontsize2'] = "11";
$subSilver[0]['fontsize3'] = "12";
$subSilver[0]['fontcolor1'] = "444444";
$subSilver[0]['fontcolor2'] = "006600";
$subSilver[0]['fontcolor3'] = "FFA34F";
$subSilver[0]['span_class1'] = "";
$subSilver[0]['span_class2'] = "";
$subSilver[0]['span_class3'] = "";
$subSilver[0]['img_size_poll'] = "0";
$subSilver[0]['img_size_privmsg'] = "0";
 
?>
/Forum/templates/subSilver/viewforum_body.tpl
0,0 → 1,98
 
<form method="post" action="{S_POST_DAYS_ACTION}">
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" valign="bottom" colspan="2"><a class="maintitle" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><br /><span class="gensmall"><b>{L_MODERATOR}: {MODERATORS}<br /><br />{LOGGED_IN_USER_LIST}</b></span></td>
<td align="right" valign="bottom" nowrap="nowrap"><span class="gensmall"><b>{PAGINATION}</b></span></td>
</tr>
<tr>
<td align="left" valign="middle" width="50"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" /></a></td>
<td align="left" valign="middle" class="nav" width="100%"><span class="nav">&nbsp;&nbsp;&nbsp;<a href="{U_INDEX}" class="nav">{L_INDEX}</a> -> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td>
<td align="right" valign="bottom" class="nav" nowrap="nowrap"><span class="gensmall"><a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a></span></td>
</tr>
</table>
 
<table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">
<tr>
<th colspan="2" align="center" height="25" class="thCornerL" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
<th width="50" align="center" class="thTop" nowrap="nowrap">&nbsp;{L_REPLIES}&nbsp;</th>
<th width="100" align="center" class="thTop" nowrap="nowrap">&nbsp;{L_AUTHOR}&nbsp;</th>
<th width="50" align="center" class="thTop" nowrap="nowrap">&nbsp;{L_VIEWS}&nbsp;</th>
<th align="center" class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
</tr>
<!-- BEGIN topicrow -->
<tr>
<td class="row1" align="center" valign="middle" width="20"><img src="{topicrow.TOPIC_FOLDER_IMG}" width="19" height="18" alt="{topicrow.L_TOPIC_FOLDER_ALT}" title="{topicrow.L_TOPIC_FOLDER_ALT}" /></td>
<td class="row1" width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />
{topicrow.GOTO_PAGE}</span></td>
<td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.REPLIES}</span></td>
<td class="row3" align="center" valign="middle"><span class="name">{topicrow.TOPIC_AUTHOR}</span></td>
<td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.VIEWS}</span></td>
<td class="row3Right" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{topicrow.LAST_POST_TIME}<br />{topicrow.LAST_POST_AUTHOR} {topicrow.LAST_POST_IMG}</span></td>
</tr>
<!-- END topicrow -->
<!-- BEGIN switch_no_topics -->
<tr>
<td class="row1" colspan="6" height="30" align="center" valign="middle"><span class="gen">{L_NO_TOPICS}</span></td>
</tr>
<!-- END switch_no_topics -->
<tr>
<td class="catBottom" align="center" valign="middle" colspan="6" height="28"><span class="genmed">{L_DISPLAY_TOPICS}:&nbsp;{S_SELECT_TOPIC_DAYS}&nbsp;
<input type="submit" class="liteoption" value="{L_GO}" name="submit" />
</span></td>
</tr>
</table>
 
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="left" valign="middle" width="50"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" /></a></td>
<td align="left" valign="middle" width="100%"><span class="nav">&nbsp;&nbsp;&nbsp;<a href="{U_INDEX}" class="nav">{L_INDEX}</a> -> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td>
<td align="right" valign="middle" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span>
</td>
</tr>
<tr>
<td align="left" colspan="3"><span class="nav">{PAGE_NUMBER}</span></td>
</tr>
</table>
</form>
 
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right">{JUMPBOX}</td>
</tr>
</table>
 
<table width="100%" cellspacing="0" border="0" align="center" cellpadding="0">
<tr>
<td align="left" valign="top"><table cellspacing="3" cellpadding="0" border="0">
<tr>
<td width="20" align="left"><img src="{FOLDER_NEW_IMG}" alt="{L_NEW_POSTS}" width="19" height="18" /></td>
<td class="gensmall">{L_NEW_POSTS}</td>
<td>&nbsp;&nbsp;</td>
<td width="20" align="center"><img src="{FOLDER_IMG}" alt="{L_NO_NEW_POSTS}" width="19" height="18" /></td>
<td class="gensmall">{L_NO_NEW_POSTS}</td>
<td>&nbsp;&nbsp;</td>
<td width="20" align="center"><img src="{FOLDER_ANNOUNCE_IMG}" alt="{L_ANNOUNCEMENT}" width="19" height="18" /></td>
<td class="gensmall">{L_ANNOUNCEMENT}</td>
</tr>
<tr>
<td width="20" align="center"><img src="{FOLDER_HOT_NEW_IMG}" alt="{L_NEW_POSTS_HOT}" width="19" height="18" /></td>
<td class="gensmall">{L_NEW_POSTS_HOT}</td>
<td>&nbsp;&nbsp;</td>
<td width="20" align="center"><img src="{FOLDER_HOT_IMG}" alt="{L_NO_NEW_POSTS_HOT}" width="19" height="18" /></td>
<td class="gensmall">{L_NO_NEW_POSTS_HOT}</td>
<td>&nbsp;&nbsp;</td>
<td width="20" align="center"><img src="{FOLDER_STICKY_IMG}" alt="{L_STICKY}" width="19" height="18" /></td>
<td class="gensmall">{L_STICKY}</td>
</tr>
<tr>
<td class="gensmall"><img src="{FOLDER_LOCKED_NEW_IMG}" alt="{L_NEW_POSTS_LOCKED}" width="19" height="18" /></td>
<td class="gensmall">{L_NEW_POSTS_LOCKED}</td>
<td>&nbsp;&nbsp;</td>
<td class="gensmall"><img src="{FOLDER_LOCKED_IMG}" alt="{L_NO_NEW_POSTS_LOCKED}" width="19" height="18" /></td>
<td class="gensmall">{L_NO_NEW_POSTS_LOCKED}</td>
</tr>
</table></td>
<td align="right"><span class="gensmall">{S_AUTH_LIST}</span></td>
</tr>
</table>
/Forum/templates/subSilver/viewonline_body.tpl
0,0 → 1,53
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
</tr>
</table>
 
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline">
<tr>
<th width="35%" class="thCornerL" height="25">&nbsp;{L_USERNAME}&nbsp;</th>
<th width="25%" class="thTop">&nbsp;{L_LAST_UPDATE}&nbsp;</th>
<th width="40%" class="thCornerR">&nbsp;{L_FORUM_LOCATION}&nbsp;</th>
</tr>
<tr>
<td class="catSides" colspan="3" height="28"><span class="cattitle"><b>{TOTAL_REGISTERED_USERS_ONLINE}</b></span></td>
</tr>
<!-- BEGIN reg_user_row -->
<tr>
<td width="35%" class="{reg_user_row.ROW_CLASS}">&nbsp;<span class="gen"><a href="{reg_user_row.U_USER_PROFILE}" class="gen">{reg_user_row.USERNAME}</a></span>&nbsp;</td>
<td width="25%" align="center" nowrap="nowrap" class="{reg_user_row.ROW_CLASS}">&nbsp;<span class="gen">{reg_user_row.LASTUPDATE}</span>&nbsp;</td>
<td width="40%" class="{reg_user_row.ROW_CLASS}">&nbsp;<span class="gen"><a href="{reg_user_row.U_FORUM_LOCATION}" class="gen">{reg_user_row.FORUM_LOCATION}</a></span>&nbsp;</td>
</tr>
<!-- END reg_user_row -->
<tr>
<td colspan="3" height="1" class="row3"><img src="templates/subSilver/images/spacer.gif" width="1" height="1" alt="."></td>
</tr>
<tr>
<td class="catSides" colspan="3" height="28"><span class="cattitle"><b>{TOTAL_GUEST_USERS_ONLINE}</b></span></td>
</tr>
<!-- BEGIN guest_user_row -->
<tr>
<td width="35%" class="{guest_user_row.ROW_CLASS}">&nbsp;<span class="gen">{guest_user_row.USERNAME}</span>&nbsp;</td>
<td width="25%" align="center" nowrap="nowrap" class="{guest_user_row.ROW_CLASS}">&nbsp;<span class="gen">{guest_user_row.LASTUPDATE}</span>&nbsp;</td>
<td width="40%" class="{guest_user_row.ROW_CLASS}">&nbsp;<span class="gen"><a href="{guest_user_row.U_FORUM_LOCATION}" class="gen">{guest_user_row.FORUM_LOCATION}</a></span>&nbsp;</td>
</tr>
<!-- END guest_user_row -->
</table>
 
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="left" valign="top"><span class="gensmall">{L_ONLINE_EXPLAIN}</span></td>
<td align="right" valign="top"><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
</table>
 
<br />
 
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
<td valign="top" align="right">{JUMPBOX}</td>
</tr>
</table>
 
/Forum/templates/subSilver/viewtopic_body.tpl
0,0 → 1,91
 
<table width="100%" cellspacing="2" cellpadding="2" border="0">
<tr>
<td align="left" valign="bottom" colspan="2"><a class="maintitle" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><br />
<span class="gensmall"><b>{PAGINATION}</b><br />
&nbsp; </span></td>
</tr>
</table>
 
<table width="100%" cellspacing="2" cellpadding="2" border="0">
<tr>
<td align="left" valign="bottom" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a>&nbsp;&nbsp;&nbsp;<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td>
<td align="left" valign="middle" width="100%"><span class="nav">&nbsp;&nbsp;&nbsp;<a href="{U_INDEX}" class="nav">{L_INDEX}</a>
-> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
</tr>
</table>
 
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
<tr align="right">
<td class="catHead" colspan="2" height="28"><span class="nav"><a href="{U_VIEW_OLDER_TOPIC}" class="nav">{L_VIEW_PREVIOUS_TOPIC}</a> :: <a href="{U_VIEW_NEWER_TOPIC}" class="nav">{L_VIEW_NEXT_TOPIC}</a> &nbsp;</span></td>
</tr>
{POLL_DISPLAY}
<tr>
<th class="thLeft" width="150" height="26" nowrap="nowrap">{L_AUTHOR}</th>
<th class="thRight" nowrap="nowrap">{L_MESSAGE}</th>
</tr>
<!-- BEGIN postrow -->
<tr>
<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br /></td>
<td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen">&nbsp;</span>&nbsp; &nbsp;{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
<td valign="top" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
</tr>
<tr>
<td colspan="2"><hr /></td>
</tr>
<tr>
<td colspan="2"><span class="postbody">{postrow.MESSAGE}{postrow.SIGNATURE}</span><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td>
</tr>
</table></td>
</tr>
<tr>
<td class="{postrow.ROW_CLASS}" width="150" align="left" valign="middle"><span class="nav"><a href="#top" class="nav">{L_BACK_TO_TOP}</a></span></td>
<td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="bottom" nowrap="nowrap"><table cellspacing="0" cellpadding="0" border="0" height="18" width="18">
<tr>
<td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}<script language="JavaScript" type="text/javascript"><!--
 
if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 )
document.write(' {postrow.ICQ_IMG}');
else
document.write('</td><td>&nbsp;</td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">{postrow.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">{postrow.ICQ_STATUS_IMG}</div></div>');
//--></script><noscript>{postrow.ICQ_IMG}</noscript></td>
</tr>
</table></td>
</tr>
<tr>
<td class="spaceRow" colspan="2" height="1"><img src="templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<!-- END postrow -->
<tr align="center">
<td class="catBottom" colspan="2" height="28"><table cellspacing="0" cellpadding="0" border="0">
<tr><form method="post" action="{S_POST_DAYS_ACTION}">
<td align="center"><span class="gensmall">{L_DISPLAY_POSTS}: {S_SELECT_POST_DAYS}&nbsp;{S_SELECT_POST_ORDER}&nbsp;<input type="submit" value="{L_GO}" class="liteoption" name="submit" /></span></td>
</form></tr>
</table></td>
</tr>
</table>
 
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a>&nbsp;&nbsp;&nbsp;<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td>
<td align="left" valign="middle" width="100%"><span class="nav">&nbsp;&nbsp;&nbsp;<a href="{U_INDEX}" class="nav">{L_INDEX}</a>
-> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
<td align="right" valign="top" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span>
</td>
</tr>
<tr>
<td align="left" colspan="3"><span class="nav">{PAGE_NUMBER}</span></td>
</tr>
</table>
 
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
<td width="40%" valign="top" nowrap="nowrap" align="left"><span class="gensmall">{S_WATCH_TOPIC}</span><br />
&nbsp;<br />
{S_TOPIC_ADMIN}</td>
<td align="right" valign="top" nowrap="nowrap">{JUMPBOX}<span class="gensmall">{S_AUTH_LIST}</span></td>
</tr>
</table>
/Forum/templates/subSilver/viewtopic_poll_ballot.tpl
0,0 → 1,26
<tr>
<td class="row2" colspan="2"><br clear="all" /><form method="POST" action="{S_POLL_ACTION}"><table cellspacing="0" cellpadding="4" border="0" align="center">
<tr>
<td align="center"><span class="gen"><b>{POLL_QUESTION}</b></span></td>
</tr>
<tr>
<td align="center"><table cellspacing="0" cellpadding="2" border="0">
<!-- BEGIN poll_option -->
<tr>
<td><input type="radio" name="vote_id" value="{poll_option.POLL_OPTION_ID}" />&nbsp;</td>
<td><span class="gen">{poll_option.POLL_OPTION_CAPTION}</span></td>
</tr>
<!-- END poll_option -->
</table></td>
</tr>
<tr>
<td align="center">
<input type="submit" name="submit" value="{L_SUBMIT_VOTE}" class="liteoption" />
</td>
</tr>
<tr>
<td align="center"><span class="gensmall"><b><a href="{U_VIEW_RESULTS}" class="gensmall">{L_VIEW_RESULTS}</a></b></span></td>
</tr>
</table>{S_HIDDEN_FIELDS}</form></td>
</tr>
/Forum/templates/subSilver/viewtopic_poll_result.tpl
0,0 → 1,36
<tr>
<td class="row2" colspan="2"><br clear="all" />
<table cellspacing="0" cellpadding="4" border="0" align="center">
<tr>
<td colspan="4" align="center"><span class="gen"><b>{POLL_QUESTION}</b></span></td>
</tr>
<tr>
<td align="center">
<table cellspacing="0" cellpadding="2" border="0">
<!-- BEGIN poll_option -->
<tr>
<td><span class="gen">{poll_option.POLL_OPTION_CAPTION}</span></td>
<td>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><img src="templates/subSilver/images/vote_lcap.gif" width="4" alt="" height="12" /></td>
<td><img src="{poll_option.POLL_OPTION_IMG}" width="{poll_option.POLL_OPTION_IMG_WIDTH}" height="12" alt="{poll_option.POLL_OPTION_PERCENT}" /></td>
<td><img src="templates/subSilver/images/vote_rcap.gif" width="4" alt="" height="12" /></td>
</tr>
</table>
</td>
<td align="center"><b><span class="gen">&nbsp;{poll_option.POLL_OPTION_PERCENT}&nbsp;</span></b></td>
<td align="center"><span class="gen">[ {poll_option.POLL_OPTION_RESULT} ]</span></td>
</tr>
<!-- END poll_option -->
</table>
</td>
</tr>
<tr>
<td colspan="4" align="center"><span class="gen"><b>{L_TOTAL_VOTES} : {TOTAL_VOTES}</b></span></td>
</tr>
</table>
<br clear="all" />
</td>
</tr>
/Forum/viewforum.php
0,0 → 1,695
<?php
/***************************************************************************
* viewforum.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: viewforum.php,v 1.139.2.12 2004/03/13 15:08:23 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
 
//
// Start initial var setup
//
if ( isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL]) )
{
$forum_id = ( isset($HTTP_GET_VARS[POST_FORUM_URL]) ) ? intval($HTTP_GET_VARS[POST_FORUM_URL]) : intval($HTTP_POST_VARS[POST_FORUM_URL]);
}
else if ( isset($HTTP_GET_VARS['forum']))
{
$forum_id = intval($HTTP_GET_VARS['forum']);
}
else
{
$forum_id = '';
}
 
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
 
if ( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
{
$mark_read = (isset($HTTP_POST_VARS['mark'])) ? $HTTP_POST_VARS['mark'] : $HTTP_GET_VARS['mark'];
}
else
{
$mark_read = '';
}
//
// End initial var setup
//
 
//
// Check if the user has actually sent a forum ID with his/her request
// If not give them a nice error page.
//
if ( !empty($forum_id) )
{
$sql = "SELECT *
FROM " . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
}
}
else
{
message_die(GENERAL_MESSAGE, 'Forum_not_exist');
}
 
//
// If the query doesn't return any rows this isn't a valid forum. Inform
// the user.
//
if ( !($forum_row = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_MESSAGE, 'Forum_not_exist');
}
 
//
// Start session management
//
$userdata = session_pagestart($user_ip, $forum_id);
init_userprefs($userdata);
//
// End session management
//
 
//
// Start auth check
//
$is_auth = array();
$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_row);
 
if ( !$is_auth['auth_read'] || !$is_auth['auth_view'] )
{
if ( !$userdata['session_logged_in'] )
{
$redirect = POST_FORUM_URL . "=$forum_id" . ( ( isset($start) ) ? "&start=$start" : '' );
redirect(append_sid("login.$phpEx?redirect=viewforum.$phpEx&$redirect", true));
}
//
// The user is not authed to read this forum ...
//
$message = ( !$is_auth['auth_view'] ) ? $lang['Forum_not_exist'] : sprintf($lang['Sorry_auth_read'], $is_auth['auth_read_type']);
 
message_die(GENERAL_MESSAGE, $message);
}
//
// End of auth check
//
 
//
// Handle marking posts
//
if ( $mark_read == 'topics' )
{
if ( $userdata['session_logged_in'] )
{
$sql = "SELECT MAX(post_time) AS last_post
FROM " . POSTS_TABLE . "
WHERE forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array();
$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array();
 
if ( ( count($tracking_forums) + count($tracking_topics) ) >= 150 && empty($tracking_forums[$forum_id]) )
{
asort($tracking_forums);
unset($tracking_forums[key($tracking_forums)]);
}
 
if ( $row['last_post'] > $userdata['user_lastvisit'] )
{
$tracking_forums[$forum_id] = time();
 
setcookie($board_config['cookie_name'] . '_f', serialize($tracking_forums), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}
}
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">')
);
}
 
$message = $lang['Topics_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a> ');
message_die(GENERAL_MESSAGE, $message);
}
//
// End handle marking posts
//
 
$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : '';
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : '';
 
//
// Do the forum Prune
//
if ( $is_auth['auth_mod'] && $board_config['prune_enable'] )
{
if ( $forum_row['prune_next'] < time() && $forum_row['prune_enable'] )
{
include($phpbb_root_path . 'includes/prune.'.$phpEx);
require($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
auto_prune($forum_id);
}
}
//
// End of forum prune
//
 
//
// Obtain list of moderators of each forum
// First users, then groups ... broken into two queries
//
$sql = "SELECT u.user_id, u.username
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g, " . USERS_TABLE . " u
WHERE aa.forum_id = $forum_id
AND aa.auth_mod = " . TRUE . "
AND g.group_single_user = 1
AND ug.group_id = aa.group_id
AND g.group_id = aa.group_id
AND u.user_id = ug.user_id
GROUP BY u.user_id, u.username
ORDER BY u.user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
}
 
$moderators = array();
while( $row = $db->sql_fetchrow($result) )
{
$moderators[] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>';
}
 
$sql = "SELECT g.group_id, g.group_name
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
WHERE aa.forum_id = $forum_id
AND aa.auth_mod = " . TRUE . "
AND g.group_single_user = 0
AND g.group_type <> ". GROUP_HIDDEN ."
AND ug.group_id = aa.group_id
AND g.group_id = aa.group_id
GROUP BY g.group_id, g.group_name
ORDER BY g.group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
}
 
while( $row = $db->sql_fetchrow($result) )
{
$moderators[] = '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>';
}
$l_moderators = ( count($moderators) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
$forum_moderators = ( count($moderators) ) ? implode(', ', $moderators) : $lang['None'];
unset($moderators);
 
//
// Generate a 'Show topics in previous x days' select box. If the topicsdays var is sent
// then get it's value, find the number of topics with dates newer than it (to properly
// handle pagination) and alter the main query
//
$previous_days = array(0, 1, 7, 14, 30, 90, 180, 364);
$previous_days_text = array($lang['All_Topics'], $lang['1_Day'], $lang['7_Days'], $lang['2_Weeks'], $lang['1_Month'], $lang['3_Months'], $lang['6_Months'], $lang['1_Year']);
 
if ( !empty($HTTP_POST_VARS['topicdays']) || !empty($HTTP_GET_VARS['topicdays']) )
{
$topic_days = ( !empty($HTTP_POST_VARS['topicdays']) ) ? intval($HTTP_POST_VARS['topicdays']) : intval($HTTP_GET_VARS['topicdays']);
$min_topic_time = time() - ($topic_days * 86400);
 
$sql = "SELECT COUNT(t.topic_id) AS forum_topics
FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
WHERE t.forum_id = $forum_id
AND p.post_id = t.topic_last_post_id
AND p.post_time >= $min_topic_time";
 
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain limited topics count information', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
 
$topics_count = ( $row['forum_topics'] ) ? $row['forum_topics'] : 1;
$limit_topics_time = "AND p.post_time >= $min_topic_time";
 
if ( !empty($HTTP_POST_VARS['topicdays']) )
{
$start = 0;
}
}
else
{
$topics_count = ( $forum_row['forum_topics'] ) ? $forum_row['forum_topics'] : 1;
 
$limit_topics_time = '';
$topic_days = 0;
}
 
$select_topic_days = '<select name="topicdays">';
for($i = 0; $i < count($previous_days); $i++)
{
$selected = ($topic_days == $previous_days[$i]) ? ' selected="selected"' : '';
$select_topic_days .= '<option value="' . $previous_days[$i] . '"' . $selected . '>' . $previous_days_text[$i] . '</option>';
}
$select_topic_days .= '</select>';
 
 
//
// All announcement data, this keeps announcements
// on each viewforum page ...
//
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u2.user_id
AND t.topic_type = " . POST_ANNOUNCE . "
ORDER BY t.topic_last_post_id DESC ";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
 
$topic_rowset = array();
$total_announcements = 0;
while( $row = $db->sql_fetchrow($result) )
{
$topic_rowset[] = $row;
$total_announcements++;
}
 
$db->sql_freeresult($result);
 
//
// Grab all the basic data (all topics except announcements)
// for this forum
//
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id
AND t.topic_type <> " . POST_ANNOUNCE . "
$limit_topics_time
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
LIMIT $start, ".$board_config['topics_per_page'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
 
$total_topics = 0;
while( $row = $db->sql_fetchrow($result) )
{
$topic_rowset[] = $row;
$total_topics++;
}
 
$db->sql_freeresult($result);
 
//
// Total topics ...
//
$total_topics += $total_announcements;
 
//
// Define censored word matches
//
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
 
//
// Post URL generation for templating vars
//
$template->assign_vars(array(
'L_DISPLAY_TOPICS' => $lang['Display_topics'],
 
'U_POST_NEW_TOPIC' => append_sid("posting.$phpEx?mode=newtopic&amp;" . POST_FORUM_URL . "=$forum_id"),
 
'S_SELECT_TOPIC_DAYS' => $select_topic_days,
'S_POST_DAYS_ACTION' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_id . "&amp;start=$start"))
);
 
//
// User authorisation levels output
//
$s_auth_can = ( ( $is_auth['auth_post'] ) ? $lang['Rules_post_can'] : $lang['Rules_post_cannot'] ) . '<br />';
$s_auth_can .= ( ( $is_auth['auth_reply'] ) ? $lang['Rules_reply_can'] : $lang['Rules_reply_cannot'] ) . '<br />';
$s_auth_can .= ( ( $is_auth['auth_edit'] ) ? $lang['Rules_edit_can'] : $lang['Rules_edit_cannot'] ) . '<br />';
$s_auth_can .= ( ( $is_auth['auth_delete'] ) ? $lang['Rules_delete_can'] : $lang['Rules_delete_cannot'] ) . '<br />';
$s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '<br />';
 
if ( $is_auth['auth_mod'] )
{
$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;start=" . $start . "&amp;sid=" . $userdata['session_id'] . '">', '</a>');
}
 
//
// Mozilla navigation bar
//
$nav_links['up'] = array(
'url' => append_sid('index.'.$phpEx),
'title' => sprintf($lang['Forum_Index'], $board_config['sitename'])
);
 
//
// Dump out the page header and load viewforum template
//
define('SHOW_ONLINE', true);
$page_title = $lang['View_forum'] . ' - ' . $forum_row['forum_name'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'body' => 'viewforum_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
 
$template->assign_vars(array(
'FORUM_ID' => $forum_id,
'FORUM_NAME' => $forum_row['forum_name'],
'MODERATORS' => $forum_moderators,
'POST_IMG' => ( $forum_row['forum_status'] == FORUM_LOCKED ) ? $images['post_locked'] : $images['post_new'],
 
'FOLDER_IMG' => $images['folder'],
'FOLDER_NEW_IMG' => $images['folder_new'],
'FOLDER_HOT_IMG' => $images['folder_hot'],
'FOLDER_HOT_NEW_IMG' => $images['folder_hot_new'],
'FOLDER_LOCKED_IMG' => $images['folder_locked'],
'FOLDER_LOCKED_NEW_IMG' => $images['folder_locked_new'],
'FOLDER_STICKY_IMG' => $images['folder_sticky'],
'FOLDER_STICKY_NEW_IMG' => $images['folder_sticky_new'],
'FOLDER_ANNOUNCE_IMG' => $images['folder_announce'],
'FOLDER_ANNOUNCE_NEW_IMG' => $images['folder_announce_new'],
 
'L_TOPICS' => $lang['Topics'],
'L_REPLIES' => $lang['Replies'],
'L_VIEWS' => $lang['Views'],
'L_POSTS' => $lang['Posts'],
'L_LASTPOST' => $lang['Last_Post'],
'L_MODERATOR' => $l_moderators,
'L_MARK_TOPICS_READ' => $lang['Mark_all_topics'],
'L_POST_NEW_TOPIC' => ( $forum_row['forum_status'] == FORUM_LOCKED ) ? $lang['Forum_locked'] : $lang['Post_new_topic'],
'L_NO_NEW_POSTS' => $lang['No_new_posts'],
'L_NEW_POSTS' => $lang['New_posts'],
'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'],
'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'],
'L_NO_NEW_POSTS_HOT' => $lang['No_new_posts_hot'],
'L_NEW_POSTS_HOT' => $lang['New_posts_hot'],
'L_ANNOUNCEMENT' => $lang['Post_Announcement'],
'L_STICKY' => $lang['Post_Sticky'],
'L_POSTED' => $lang['Posted'],
'L_JOINED' => $lang['Joined'],
'L_AUTHOR' => $lang['Author'],
 
'S_AUTH_LIST' => $s_auth_can,
 
'U_VIEW_FORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL ."=$forum_id"),
 
'U_MARK_READ' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;mark=topics"))
);
//
// End header
//
 
//
// Okay, lets dump out the page ...
//
if( $total_topics )
{
for($i = 0; $i < $total_topics; $i++)
{
$topic_id = $topic_rowset[$i]['topic_id'];
 
$topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];
 
$replies = $topic_rowset[$i]['topic_replies'];
 
$topic_type = $topic_rowset[$i]['topic_type'];
 
if( $topic_type == POST_ANNOUNCE )
{
$topic_type = $lang['Topic_Announcement'] . ' ';
}
else if( $topic_type == POST_STICKY )
{
$topic_type = $lang['Topic_Sticky'] . ' ';
}
else
{
$topic_type = '';
}
 
if( $topic_rowset[$i]['topic_vote'] )
{
$topic_type .= $lang['Topic_Poll'] . ' ';
}
if( $topic_rowset[$i]['topic_status'] == TOPIC_MOVED )
{
$topic_type = $lang['Topic_Moved'] . ' ';
$topic_id = $topic_rowset[$i]['topic_moved_id'];
 
$folder_image = $images['folder'];
$folder_alt = $lang['Topics_Moved'];
$newest_post_img = '';
}
else
{
if( $topic_rowset[$i]['topic_type'] == POST_ANNOUNCE )
{
$folder = $images['folder_announce'];
$folder_new = $images['folder_announce_new'];
}
else if( $topic_rowset[$i]['topic_type'] == POST_STICKY )
{
$folder = $images['folder_sticky'];
$folder_new = $images['folder_sticky_new'];
}
else if( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED )
{
$folder = $images['folder_locked'];
$folder_new = $images['folder_locked_new'];
}
else
{
if($replies >= $board_config['hot_threshold'])
{
$folder = $images['folder_hot'];
$folder_new = $images['folder_hot_new'];
}
else
{
$folder = $images['folder'];
$folder_new = $images['folder_new'];
}
}
 
$newest_post_img = '';
if( $userdata['session_logged_in'] )
{
if( $topic_rowset[$i]['post_time'] > $userdata['user_lastvisit'] )
{
if( !empty($tracking_topics) || !empty($tracking_forums) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
{
$unread_topics = true;
 
if( !empty($tracking_topics[$topic_id]) )
{
if( $tracking_topics[$topic_id] >= $topic_rowset[$i]['post_time'] )
{
$unread_topics = false;
}
}
 
if( !empty($tracking_forums[$forum_id]) )
{
if( $tracking_forums[$forum_id] >= $topic_rowset[$i]['post_time'] )
{
$unread_topics = false;
}
}
 
if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
{
if( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] >= $topic_rowset[$i]['post_time'] )
{
$unread_topics = false;
}
}
 
if( $unread_topics )
{
$folder_image = $folder_new;
$folder_alt = $lang['New_posts'];
 
$newest_post_img = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> ';
}
else
{
$folder_image = $folder;
$folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
 
$newest_post_img = '';
}
}
else
{
$folder_image = $folder_new;
$folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['New_posts'];
 
$newest_post_img = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> ';
}
}
else
{
$folder_image = $folder;
$folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
 
$newest_post_img = '';
}
}
else
{
$folder_image = $folder;
$folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
 
$newest_post_img = '';
}
}
 
if( ( $replies + 1 ) > $board_config['posts_per_page'] )
{
$total_pages = ceil( ( $replies + 1 ) / $board_config['posts_per_page'] );
$goto_page = ' [ <img src="' . $images['icon_gotopost'] . '" alt="' . $lang['Goto_page'] . '" title="' . $lang['Goto_page'] . '" />' . $lang['Goto_page'] . ': ';
 
$times = 1;
for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page'])
{
$goto_page .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id . "&amp;start=$j") . '">' . $times . '</a>';
if( $times == 1 && $total_pages > 4 )
{
$goto_page .= ' ... ';
$times = $total_pages - 3;
$j += ( $total_pages - 4 ) * $board_config['posts_per_page'];
}
else if ( $times < $total_pages )
{
$goto_page .= ', ';
}
$times++;
}
$goto_page .= ' ] ';
}
else
{
$goto_page = '';
}
$view_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id");
 
$topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $topic_rowset[$i]['user_id']) . '">' : '';
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] );
 
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';
 
$first_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['topic_time'], $board_config['board_timezone']);
 
$last_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['post_time'], $board_config['board_timezone']);
 
$last_post_author = ( $topic_rowset[$i]['id2'] == ANONYMOUS ) ? ( ($topic_rowset[$i]['post_username2'] != '' ) ? $topic_rowset[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $topic_rowset[$i]['id2']) . '">' . $topic_rowset[$i]['user2'] . '</a>';
 
$last_post_url = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $topic_rowset[$i]['topic_last_post_id']) . '#' . $topic_rowset[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>';
 
$views = $topic_rowset[$i]['topic_views'];
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
$template->assign_block_vars('topicrow', array(
'ROW_COLOR' => $row_color,
'ROW_CLASS' => $row_class,
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
'TOPIC_FOLDER_IMG' => $folder_image,
'TOPIC_AUTHOR' => $topic_author,
'GOTO_PAGE' => $goto_page,
'REPLIES' => $replies,
'NEWEST_POST_IMG' => $newest_post_img,
'TOPIC_TITLE' => $topic_title,
'TOPIC_TYPE' => $topic_type,
'VIEWS' => $views,
'FIRST_POST_TIME' => $first_post_time,
'LAST_POST_TIME' => $last_post_time,
'LAST_POST_AUTHOR' => $last_post_author,
'LAST_POST_IMG' => $last_post_url,
 
'L_TOPIC_FOLDER_ALT' => $folder_alt,
 
'U_VIEW_TOPIC' => $view_topic_url)
);
}
 
$topics_count -= $total_announcements;
 
$template->assign_vars(array(
'PAGINATION' => generate_pagination("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;topicdays=$topic_days", $topics_count, $board_config['topics_per_page'], $start),
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $topics_count / $board_config['topics_per_page'] )),
 
'L_GOTO_PAGE' => $lang['Goto_page'])
);
}
else
{
//
// No topics
//
$no_topics_msg = ( $forum_row['forum_status'] == FORUM_LOCKED ) ? $lang['Forum_locked'] : $lang['No_topics_post_one'];
$template->assign_vars(array(
'L_NO_TOPICS' => $no_topics_msg)
);
 
$template->assign_block_vars('switch_no_topics', array() );
 
}
 
//
// Parse the page and print
//
$template->pparse('body');
 
//
// Page footer
//
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
?>
/Forum/viewonline.php
0,0 → 1,289
<?php
/***************************************************************************
* viewonline.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: viewonline.php,v 1.54.2.4 2005/05/06 20:50:10 acydburn Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
 
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_VIEWONLINE);
init_userprefs($userdata);
//
// End session management
//
 
//
// Output page header and load viewonline template
//
$page_title = $lang['Who_is_Online'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
$template->set_filenames(array(
'body' => 'viewonline_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
 
$template->assign_vars(array(
'L_WHOSONLINE' => $lang['Who_is_Online'],
'L_ONLINE_EXPLAIN' => $lang['Online_explain'],
'L_USERNAME' => $lang['Username'],
'L_FORUM_LOCATION' => $lang['Forum_Location'],
'L_LAST_UPDATE' => $lang['Last_updated'])
);
 
//
// Forum info
//
$sql = "SELECT forum_name, forum_id
FROM " . FORUMS_TABLE;
if ( $result = $db->sql_query($sql) )
{
while( $row = $db->sql_fetchrow($result) )
{
$forum_data[$row['forum_id']] = $row['forum_name'];
}
}
else
{
message_die(GENERAL_ERROR, 'Could not obtain user/online forums information', '', __LINE__, __FILE__, $sql);
}
 
//
// Get auth data
//
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata);
 
//
// Get user list
//
$sql = "SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_time, s.session_page, s.session_ip
FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s
WHERE u.user_id = s.session_user_id
AND s.session_time >= ".( time() - 300 ) . "
ORDER BY u.username ASC, s.session_ip ASC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain regd user/online information', '', __LINE__, __FILE__, $sql);
}
 
$guest_users = 0;
$registered_users = 0;
$hidden_users = 0;
 
$reg_counter = 0;
$guest_counter = 0;
$prev_user = 0;
$prev_ip = '';
 
while ( $row = $db->sql_fetchrow($result) )
{
$view_online = false;
 
if ( $row['session_logged_in'] )
{
$user_id = $row['user_id'];
 
if ( $user_id != $prev_user )
{
$username = $row['username'];
 
$style_color = '';
if ( $row['user_level'] == ADMIN )
{
$username = '<b style="color:#' . $theme['fontcolor3'] . '">' . $username . '</b>';
}
else if ( $row['user_level'] == MOD )
{
$username = '<b style="color:#' . $theme['fontcolor2'] . '">' . $username . '</b>';
}
 
if ( !$row['user_allow_viewonline'] )
{
$view_online = ( $userdata['user_level'] == ADMIN ) ? true : false;
$hidden_users++;
 
$username = '<i>' . $username . '</i>';
}
else
{
$view_online = true;
$registered_users++;
}
 
$which_counter = 'reg_counter';
$which_row = 'reg_user_row';
$prev_user = $user_id;
}
}
else
{
if ( $row['session_ip'] != $prev_ip )
{
$username = $lang['Guest'];
$view_online = true;
$guest_users++;
$which_counter = 'guest_counter';
$which_row = 'guest_user_row';
}
}
 
$prev_ip = $row['session_ip'];
 
if ( $view_online )
{
if ( $row['session_page'] < 1 || !$is_auth_ary[$row['session_page']]['auth_view'] )
{
switch( $row['session_page'] )
{
case PAGE_INDEX:
$location = $lang['Forum_index'];
$location_url = "index.$phpEx";
break;
case PAGE_POSTING:
$location = $lang['Posting_message'];
$location_url = "index.$phpEx";
break;
case PAGE_LOGIN:
$location = $lang['Logging_on'];
$location_url = "index.$phpEx";
break;
case PAGE_SEARCH:
$location = $lang['Searching_forums'];
$location_url = "search.$phpEx";
break;
case PAGE_PROFILE:
$location = $lang['Viewing_profile'];
$location_url = "index.$phpEx";
break;
case PAGE_VIEWONLINE:
$location = $lang['Viewing_online'];
$location_url = "viewonline.$phpEx";
break;
case PAGE_VIEWMEMBERS:
$location = $lang['Viewing_member_list'];
$location_url = "memberlist.$phpEx";
break;
case PAGE_PRIVMSGS:
$location = $lang['Viewing_priv_msgs'];
$location_url = "privmsg.$phpEx";
break;
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "faq.$phpEx";
break;
default:
$location = $lang['Forum_index'];
$location_url = "index.$phpEx";
}
}
else
{
$location_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $row['session_page']);
$location = $forum_data[$row['session_page']];
}
 
$row_color = ( $$which_counter % 2 ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( $$which_counter % 2 ) ? $theme['td_class1'] : $theme['td_class2'];
 
$template->assign_block_vars("$which_row", array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'USERNAME' => $username,
'LASTUPDATE' => create_date($board_config['default_dateformat'], $row['session_time'], $board_config['board_timezone']),
'FORUM_LOCATION' => $location,
 
'U_USER_PROFILE' => append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $user_id),
'U_FORUM_LOCATION' => append_sid($location_url))
);
 
$$which_counter++;
}
}
 
if( $registered_users == 0 )
{
$l_r_user_s = $lang['Reg_users_zero_online'];
}
else if( $registered_users == 1 )
{
$l_r_user_s = $lang['Reg_user_online'];
}
else
{
$l_r_user_s = $lang['Reg_users_online'];
}
 
if( $hidden_users == 0 )
{
$l_h_user_s = $lang['Hidden_users_zero_online'];
}
else if( $hidden_users == 1 )
{
$l_h_user_s = $lang['Hidden_user_online'];
}
else
{
$l_h_user_s = $lang['Hidden_users_online'];
}
 
if( $guest_users == 0 )
{
$l_g_user_s = $lang['Guest_users_zero_online'];
}
else if( $guest_users == 1 )
{
$l_g_user_s = $lang['Guest_user_online'];
}
else
{
$l_g_user_s = $lang['Guest_users_online'];
}
 
$template->assign_vars(array(
'TOTAL_REGISTERED_USERS_ONLINE' => sprintf($l_r_user_s, $registered_users) . sprintf($l_h_user_s, $hidden_users),
'TOTAL_GUEST_USERS_ONLINE' => sprintf($l_g_user_s, $guest_users))
);
 
if ( $registered_users + $hidden_users == 0 )
{
$template->assign_vars(array(
'L_NO_REGISTERED_USERS_BROWSING' => $lang['No_users_browsing'])
);
}
 
if ( $guest_users == 0 )
{
$template->assign_vars(array(
'L_NO_GUESTS_BROWSING' => $lang['No_users_browsing'])
);
}
 
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
?>
/Forum/viewtopic.php
0,0 → 1,1213
<?php
/***************************************************************************
* viewtopic.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: viewtopic.php,v 1.186.2.46 2006/04/21 19:07:46 grahamje Exp $
*
*
***************************************************************************/
 
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
 
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
 
//
// Start initial var setup
//
$topic_id = $post_id = 0;
if ( isset($HTTP_GET_VARS[POST_TOPIC_URL]) )
{
$topic_id = intval($HTTP_GET_VARS[POST_TOPIC_URL]);
}
else if ( isset($HTTP_GET_VARS['topic']) )
{
$topic_id = intval($HTTP_GET_VARS['topic']);
}
 
if ( isset($HTTP_GET_VARS[POST_POST_URL]))
{
$post_id = intval($HTTP_GET_VARS[POST_POST_URL]);
}
 
 
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
 
if (!$topic_id && !$post_id)
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}
 
//
// Find topic id if user requested a newer
// or older topic
//
if ( isset($HTTP_GET_VARS['view']) && empty($HTTP_GET_VARS[POST_POST_URL]) )
{
if ( $HTTP_GET_VARS['view'] == 'newest' )
{
if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) || isset($HTTP_GET_VARS['sid']) )
{
$session_id = isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) ? $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid'] : $HTTP_GET_VARS['sid'];
 
if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))
{
$session_id = '';
}
 
if ( $session_id )
{
$sql = "SELECT p.post_id
FROM " . POSTS_TABLE . " p, " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u
WHERE s.session_id = '$session_id'
AND u.user_id = s.session_user_id
AND p.topic_id = $topic_id
AND p.post_time >= u.user_lastvisit
ORDER BY p.post_time ASC
LIMIT 1";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain newer/older topic information', '', __LINE__, __FILE__, $sql);
}
 
if ( !($row = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_MESSAGE, 'No_new_posts_last_visit');
}
 
$post_id = $row['post_id'];
 
if (isset($HTTP_GET_VARS['sid']))
{
redirect("viewtopic.$phpEx?sid=$session_id&" . POST_POST_URL . "=$post_id#$post_id");
}
else
{
redirect("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id");
}
}
}
 
redirect(append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true));
}
else if ( $HTTP_GET_VARS['view'] == 'next' || $HTTP_GET_VARS['view'] == 'previous' )
{
$sql_condition = ( $HTTP_GET_VARS['view'] == 'next' ) ? '>' : '<';
$sql_ordering = ( $HTTP_GET_VARS['view'] == 'next' ) ? 'ASC' : 'DESC';
 
$sql = "SELECT t.topic_id
FROM " . TOPICS_TABLE . " t, " . TOPICS_TABLE . " t2
WHERE
t2.topic_id = $topic_id
AND t.forum_id = t2.forum_id
AND t.topic_moved_id = 0
AND t.topic_last_post_id $sql_condition t2.topic_last_post_id
ORDER BY t.topic_last_post_id $sql_ordering
LIMIT 1";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain newer/older topic information", '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
$topic_id = intval($row['topic_id']);
}
else
{
$message = ( $HTTP_GET_VARS['view'] == 'next' ) ? 'No_newer_topics' : 'No_older_topics';
message_die(GENERAL_MESSAGE, $message);
}
}
}
 
//
// This rather complex gaggle of code handles querying for topics but
// also allows for direct linking to a post (and the calculation of which
// page the post is on and the correct display of viewtopic)
//
$join_sql_table = (!$post_id) ? '' : ", " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2 ";
$join_sql = (!$post_id) ? "t.topic_id = $topic_id" : "p.post_id = $post_id AND t.topic_id = p.topic_id AND p2.topic_id = p.topic_id AND p2.post_id <= $post_id";
$count_sql = (!$post_id) ? '' : ", COUNT(p2.post_id) AS prev_posts";
 
$order_sql = (!$post_id) ? '' : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments ORDER BY p.post_id ASC";
 
$sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments" . $count_sql . "
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $join_sql_table . "
WHERE $join_sql
AND f.forum_id = t.forum_id
$order_sql";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain topic information", '', __LINE__, __FILE__, $sql);
}
 
if ( !($forum_topic_data = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}
 
$forum_id = intval($forum_topic_data['forum_id']);
 
//
// Start session management
//
$userdata = session_pagestart($user_ip, $forum_id);
init_userprefs($userdata);
//
// End session management
//
 
//
// Start auth check
//
$is_auth = array();
$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_topic_data);
 
if( !$is_auth['auth_view'] || !$is_auth['auth_read'] )
{
if ( !$userdata['session_logged_in'] )
{
$redirect = ($post_id) ? POST_POST_URL . "=$post_id" : POST_TOPIC_URL . "=$topic_id";
$redirect .= ($start) ? "&start=$start" : '';
redirect(append_sid("login.$phpEx?redirect=viewtopic.$phpEx&$redirect", true));
}
 
$message = ( !$is_auth['auth_view'] ) ? $lang['Topic_post_not_exist'] : sprintf($lang['Sorry_auth_read'], $is_auth['auth_read_type']);
 
message_die(GENERAL_MESSAGE, $message);
}
//
// End auth check
//
 
$forum_name = $forum_topic_data['forum_name'];
$topic_title = $forum_topic_data['topic_title'];
$topic_id = intval($forum_topic_data['topic_id']);
$topic_time = $forum_topic_data['topic_time'];
 
if ($post_id)
{
$start = floor(($forum_topic_data['prev_posts'] - 1) / intval($board_config['posts_per_page'])) * intval($board_config['posts_per_page']);
}
 
//
// Is user watching this thread?
//
if( $userdata['session_logged_in'] )
{
$can_watch_topic = TRUE;
 
$sql = "SELECT notify_status
FROM " . TOPICS_WATCH_TABLE . "
WHERE topic_id = $topic_id
AND user_id = " . $userdata['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain topic watch information", '', __LINE__, __FILE__, $sql);
}
 
if ( $row = $db->sql_fetchrow($result) )
{
if ( isset($HTTP_GET_VARS['unwatch']) )
{
if ( $HTTP_GET_VARS['unwatch'] == 'topic' )
{
$is_watching_topic = 0;
 
$sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : '';
$sql = "DELETE $sql_priority FROM " . TOPICS_WATCH_TABLE . "
WHERE topic_id = $topic_id
AND user_id = " . $userdata['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not delete topic watch information", '', __LINE__, __FILE__, $sql);
}
}
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;start=$start") . '">')
);
 
$message = $lang['No_longer_watching'] . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;start=$start") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
else
{
$is_watching_topic = TRUE;
 
if ( $row['notify_status'] )
{
$sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : '';
$sql = "UPDATE $sql_priority " . TOPICS_WATCH_TABLE . "
SET notify_status = 0
WHERE topic_id = $topic_id
AND user_id = " . $userdata['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not update topic watch information", '', __LINE__, __FILE__, $sql);
}
}
}
}
else
{
if ( isset($HTTP_GET_VARS['watch']) )
{
if ( $HTTP_GET_VARS['watch'] == 'topic' )
{
$is_watching_topic = TRUE;
 
$sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : '';
$sql = "INSERT $sql_priority INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id, notify_status)
VALUES (" . $userdata['user_id'] . ", $topic_id, 0)";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not insert topic watch information", '', __LINE__, __FILE__, $sql);
}
}
 
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;start=$start") . '">')
);
 
$message = $lang['You_are_watching'] . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;start=$start") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
else
{
$is_watching_topic = 0;
}
}
}
else
{
if ( isset($HTTP_GET_VARS['unwatch']) )
{
if ( $HTTP_GET_VARS['unwatch'] == 'topic' )
{
redirect(append_sid("login.$phpEx?redirect=viewtopic.$phpEx&" . POST_TOPIC_URL . "=$topic_id&unwatch=topic", true));
}
}
else
{
$can_watch_topic = 0;
$is_watching_topic = 0;
}
}
 
//
// Generate a 'Show posts in previous x days' select box. If the postdays var is POSTed
// then get it's value, find the number of topics with dates newer than it (to properly
// handle pagination) and alter the main query
//
$previous_days = array(0, 1, 7, 14, 30, 90, 180, 364);
$previous_days_text = array($lang['All_Posts'], $lang['1_Day'], $lang['7_Days'], $lang['2_Weeks'], $lang['1_Month'], $lang['3_Months'], $lang['6_Months'], $lang['1_Year']);
 
if( !empty($HTTP_POST_VARS['postdays']) || !empty($HTTP_GET_VARS['postdays']) )
{
$post_days = ( !empty($HTTP_POST_VARS['postdays']) ) ? intval($HTTP_POST_VARS['postdays']) : intval($HTTP_GET_VARS['postdays']);
$min_post_time = time() - (intval($post_days) * 86400);
 
$sql = "SELECT COUNT(p.post_id) AS num_posts
FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
WHERE t.topic_id = $topic_id
AND p.topic_id = t.topic_id
AND p.post_time >= $min_post_time";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain limited topics count information", '', __LINE__, __FILE__, $sql);
}
 
$total_replies = ( $row = $db->sql_fetchrow($result) ) ? intval($row['num_posts']) : 0;
 
$limit_posts_time = "AND p.post_time >= $min_post_time ";
 
if ( !empty($HTTP_POST_VARS['postdays']))
{
$start = 0;
}
}
else
{
$total_replies = intval($forum_topic_data['topic_replies']) + 1;
 
$limit_posts_time = '';
$post_days = 0;
}
 
$select_post_days = '<select name="postdays">';
for($i = 0; $i < count($previous_days); $i++)
{
$selected = ($post_days == $previous_days[$i]) ? ' selected="selected"' : '';
$select_post_days .= '<option value="' . $previous_days[$i] . '"' . $selected . '>' . $previous_days_text[$i] . '</option>';
}
$select_post_days .= '</select>';
 
//
// Decide how to order the post display
//
if ( !empty($HTTP_POST_VARS['postorder']) || !empty($HTTP_GET_VARS['postorder']) )
{
$post_order = (!empty($HTTP_POST_VARS['postorder'])) ? htmlspecialchars($HTTP_POST_VARS['postorder']) : htmlspecialchars($HTTP_GET_VARS['postorder']);
$post_time_order = ($post_order == "asc") ? "ASC" : "DESC";
}
else
{
$post_order = 'asc';
$post_time_order = 'ASC';
}
 
$select_post_order = '<select name="postorder">';
if ( $post_time_order == 'ASC' )
{
$select_post_order .= '<option value="asc" selected="selected">' . $lang['Oldest_First'] . '</option><option value="desc">' . $lang['Newest_First'] . '</option>';
}
else
{
$select_post_order .= '<option value="asc">' . $lang['Oldest_First'] . '</option><option value="desc" selected="selected">' . $lang['Newest_First'] . '</option>';
}
$select_post_order .= '</select>';
 
//
// Go ahead and pull all data for this topic
//
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
WHERE p.topic_id = $topic_id
$limit_posts_time
AND pt.post_id = p.post_id
AND u.user_id = p.poster_id
ORDER BY p.post_time $post_time_order
LIMIT $start, ".$board_config['posts_per_page'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain post/user information.", '', __LINE__, __FILE__, $sql);
}
 
$postrow = array();
if ($row = $db->sql_fetchrow($result))
{
do
{
$postrow[] = $row;
}
while ($row = $db->sql_fetchrow($result));
$db->sql_freeresult($result);
 
$total_posts = count($postrow);
}
else
{
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
sync('topic', $topic_id);
 
message_die(GENERAL_MESSAGE, $lang['No_posts_topic']);
}
 
$resync = FALSE;
if ($forum_topic_data['topic_replies'] + 1 < $start + count($postrow))
{
$resync = TRUE;
}
elseif ($start + $board_config['posts_per_page'] > $forum_topic_data['topic_replies'])
{
$row_id = intval($forum_topic_data['topic_replies']) % intval($board_config['posts_per_page']);
if ($postrow[$row_id]['post_id'] != $forum_topic_data['topic_last_post_id'] || $start + count($postrow) < $forum_topic_data['topic_replies'])
{
$resync = TRUE;
}
}
elseif (count($postrow) < $board_config['posts_per_page'])
{
$resync = TRUE;
}
 
if ($resync)
{
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
sync('topic', $topic_id);
 
$result = $db->sql_query('SELECT COUNT(post_id) AS total FROM ' . POSTS_TABLE . ' WHERE topic_id = ' . $topic_id);
$row = $db->sql_fetchrow($result);
$total_replies = $row['total'];
}
 
$sql = "SELECT *
FROM " . RANKS_TABLE . "
ORDER BY rank_special, rank_min";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain ranks information.", '', __LINE__, __FILE__, $sql);
}
 
$ranksrow = array();
while ( $row = $db->sql_fetchrow($result) )
{
$ranksrow[] = $row;
}
$db->sql_freeresult($result);
 
//
// Define censored word matches
//
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
 
//
// Censor topic title
//
if ( count($orig_word) )
{
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
}
 
//
// Was a highlight request part of the URI?
//
$highlight_match = $highlight = '';
if (isset($HTTP_GET_VARS['highlight']))
{
// Split words and phrases
$words = explode(' ', trim(htmlspecialchars($HTTP_GET_VARS['highlight'])));
 
for($i = 0; $i < sizeof($words); $i++)
{
if (trim($words[$i]) != '')
{
$highlight_match .= (($highlight_match != '') ? '|' : '') . str_replace('*', '\w*', preg_quote($words[$i], '#'));
}
}
unset($words);
 
$highlight = urlencode($HTTP_GET_VARS['highlight']);
$highlight_match = phpbb_rtrim($highlight_match, "\\");
}
 
//
// Post, reply and other URL generation for
// templating vars
//
$new_topic_url = append_sid("posting.$phpEx?mode=newtopic&amp;" . POST_FORUM_URL . "=$forum_id");
$reply_topic_url = append_sid("posting.$phpEx?mode=reply&amp;" . POST_TOPIC_URL . "=$topic_id");
$view_forum_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id");
$view_prev_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;view=previous");
$view_next_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;view=next");
 
//
// Mozilla navigation bar
//
$nav_links['prev'] = array(
'url' => $view_prev_topic_url,
'title' => $lang['View_previous_topic']
);
$nav_links['next'] = array(
'url' => $view_next_topic_url,
'title' => $lang['View_next_topic']
);
$nav_links['up'] = array(
'url' => $view_forum_url,
'title' => $forum_name
);
 
$reply_img = ( $forum_topic_data['forum_status'] == FORUM_LOCKED || $forum_topic_data['topic_status'] == TOPIC_LOCKED ) ? $images['reply_locked'] : $images['reply_new'];
$reply_alt = ( $forum_topic_data['forum_status'] == FORUM_LOCKED || $forum_topic_data['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['Reply_to_topic'];
$post_img = ( $forum_topic_data['forum_status'] == FORUM_LOCKED ) ? $images['post_locked'] : $images['post_new'];
$post_alt = ( $forum_topic_data['forum_status'] == FORUM_LOCKED ) ? $lang['Forum_locked'] : $lang['Post_new_topic'];
 
//
// Set a cookie for this topic
//
if ( $userdata['session_logged_in'] )
{
$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array();
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array();
 
if ( !empty($tracking_topics[$topic_id]) && !empty($tracking_forums[$forum_id]) )
{
$topic_last_read = ( $tracking_topics[$topic_id] > $tracking_forums[$forum_id] ) ? $tracking_topics[$topic_id] : $tracking_forums[$forum_id];
}
else if ( !empty($tracking_topics[$topic_id]) || !empty($tracking_forums[$forum_id]) )
{
$topic_last_read = ( !empty($tracking_topics[$topic_id]) ) ? $tracking_topics[$topic_id] : $tracking_forums[$forum_id];
}
else
{
$topic_last_read = $userdata['user_lastvisit'];
}
 
if ( count($tracking_topics) >= 150 && empty($tracking_topics[$topic_id]) )
{
asort($tracking_topics);
unset($tracking_topics[key($tracking_topics)]);
}
 
$tracking_topics[$topic_id] = time();
 
setcookie($board_config['cookie_name'] . '_t', serialize($tracking_topics), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}
 
//
// Load templates
//
$template->set_filenames(array(
'body' => 'viewtopic_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx, $forum_id);
 
//
// Output page header
//
$page_title = $lang['View_topic'] .' - ' . $topic_title;
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
 
//
// User authorisation levels output
//
$s_auth_can = ( ( $is_auth['auth_post'] ) ? $lang['Rules_post_can'] : $lang['Rules_post_cannot'] ) . '<br />';
$s_auth_can .= ( ( $is_auth['auth_reply'] ) ? $lang['Rules_reply_can'] : $lang['Rules_reply_cannot'] ) . '<br />';
$s_auth_can .= ( ( $is_auth['auth_edit'] ) ? $lang['Rules_edit_can'] : $lang['Rules_edit_cannot'] ) . '<br />';
$s_auth_can .= ( ( $is_auth['auth_delete'] ) ? $lang['Rules_delete_can'] : $lang['Rules_delete_cannot'] ) . '<br />';
$s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '<br />';
 
$topic_mod = '';
 
if ( $is_auth['auth_mod'] )
{
$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'] . '">', '</a>');
 
$topic_mod .= "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;mode=delete&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_delete'] . '" alt="' . $lang['Delete_topic'] . '" title="' . $lang['Delete_topic'] . '" border="0" /></a>&nbsp;';
 
$topic_mod .= "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;mode=move&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_move'] . '" alt="' . $lang['Move_topic'] . '" title="' . $lang['Move_topic'] . '" border="0" /></a>&nbsp;';
 
$topic_mod .= ( $forum_topic_data['topic_status'] == TOPIC_UNLOCKED ) ? "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;mode=lock&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_lock'] . '" alt="' . $lang['Lock_topic'] . '" title="' . $lang['Lock_topic'] . '" border="0" /></a>&nbsp;' : "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;mode=unlock&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_unlock'] . '" alt="' . $lang['Unlock_topic'] . '" title="' . $lang['Unlock_topic'] . '" border="0" /></a>&nbsp;';
 
$topic_mod .= "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;mode=split&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_split'] . '" alt="' . $lang['Split_topic'] . '" title="' . $lang['Split_topic'] . '" border="0" /></a>&nbsp;';
}
 
//
// Topic watch information
//
$s_watching_topic = '';
if ( $can_watch_topic )
{
if ( $is_watching_topic )
{
$s_watching_topic = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;unwatch=topic&amp;start=$start&amp;sid=" . $userdata['session_id'] . '">' . $lang['Stop_watching_topic'] . '</a>';
$s_watching_topic_img = ( isset($images['topic_un_watch']) ) ? "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;unwatch=topic&amp;start=$start&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_un_watch'] . '" alt="' . $lang['Stop_watching_topic'] . '" title="' . $lang['Stop_watching_topic'] . '" border="0"></a>' : '';
}
else
{
$s_watching_topic = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;watch=topic&amp;start=$start&amp;sid=" . $userdata['session_id'] . '">' . $lang['Start_watching_topic'] . '</a>';
$s_watching_topic_img = ( isset($images['Topic_watch']) ) ? "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;watch=topic&amp;start=$start&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['Topic_watch'] . '" alt="' . $lang['Start_watching_topic'] . '" title="' . $lang['Start_watching_topic'] . '" border="0"></a>' : '';
}
}
 
//
// If we've got a hightlight set pass it on to pagination,
// I get annoyed when I lose my highlight after the first page.
//
$pagination = ( $highlight != '' ) ? generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;postdays=$post_days&amp;postorder=$post_order&amp;highlight=$highlight", $total_replies, $board_config['posts_per_page'], $start) : generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;postdays=$post_days&amp;postorder=$post_order", $total_replies, $board_config['posts_per_page'], $start);
 
//
// Send vars to template
//
$template->assign_vars(array(
'FORUM_ID' => $forum_id,
'FORUM_NAME' => $forum_name,
'TOPIC_ID' => $topic_id,
'TOPIC_TITLE' => $topic_title,
'PAGINATION' => $pagination,
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / intval($board_config['posts_per_page']) ) + 1 ), ceil( $total_replies / intval($board_config['posts_per_page']) )),
 
'POST_IMG' => $post_img,
'REPLY_IMG' => $reply_img,
 
'L_AUTHOR' => $lang['Author'],
'L_MESSAGE' => $lang['Message'],
'L_POSTED' => $lang['Posted'],
'L_POST_SUBJECT' => $lang['Post_subject'],
'L_VIEW_NEXT_TOPIC' => $lang['View_next_topic'],
'L_VIEW_PREVIOUS_TOPIC' => $lang['View_previous_topic'],
'L_POST_NEW_TOPIC' => $post_alt,
'L_POST_REPLY_TOPIC' => $reply_alt,
'L_BACK_TO_TOP' => $lang['Back_to_top'],
'L_DISPLAY_POSTS' => $lang['Display_posts'],
'L_LOCK_TOPIC' => $lang['Lock_topic'],
'L_UNLOCK_TOPIC' => $lang['Unlock_topic'],
'L_MOVE_TOPIC' => $lang['Move_topic'],
'L_SPLIT_TOPIC' => $lang['Split_topic'],
'L_DELETE_TOPIC' => $lang['Delete_topic'],
'L_GOTO_PAGE' => $lang['Goto_page'],
 
'S_TOPIC_LINK' => POST_TOPIC_URL,
'S_SELECT_POST_DAYS' => $select_post_days,
'S_SELECT_POST_ORDER' => $select_post_order,
'S_POST_DAYS_ACTION' => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $topic_id . "&amp;start=$start"),
'S_AUTH_LIST' => $s_auth_can,
'S_TOPIC_ADMIN' => $topic_mod,
'S_WATCH_TOPIC' => $s_watching_topic,
'S_WATCH_TOPIC_IMG' => $s_watching_topic_img,
 
'U_VIEW_TOPIC' => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;start=$start&amp;postdays=$post_days&amp;postorder=$post_order&amp;highlight=$highlight"),
'U_VIEW_FORUM' => $view_forum_url,
'U_VIEW_OLDER_TOPIC' => $view_prev_topic_url,
'U_VIEW_NEWER_TOPIC' => $view_next_topic_url,
'U_POST_NEW_TOPIC' => $new_topic_url,
'U_POST_REPLY_TOPIC' => $reply_topic_url)
);
 
//
// Does this topic contain a poll?
//
if ( !empty($forum_topic_data['topic_vote']) )
{
$s_hidden_fields = '';
 
$sql = "SELECT vd.vote_id, vd.vote_text, vd.vote_start, vd.vote_length, vr.vote_option_id, vr.vote_option_text, vr.vote_result
FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
WHERE vd.topic_id = $topic_id
AND vr.vote_id = vd.vote_id
ORDER BY vr.vote_option_id ASC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain vote data for this topic", '', __LINE__, __FILE__, $sql);
}
 
if ( $vote_info = $db->sql_fetchrowset($result) )
{
$db->sql_freeresult($result);
$vote_options = count($vote_info);
 
$vote_id = $vote_info[0]['vote_id'];
$vote_title = $vote_info[0]['vote_text'];
 
$sql = "SELECT vote_id
FROM " . VOTE_USERS_TABLE . "
WHERE vote_id = $vote_id
AND vote_user_id = " . intval($userdata['user_id']);
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain user vote data for this topic", '', __LINE__, __FILE__, $sql);
}
 
$user_voted = ( $row = $db->sql_fetchrow($result) ) ? TRUE : 0;
$db->sql_freeresult($result);
 
if ( isset($HTTP_GET_VARS['vote']) || isset($HTTP_POST_VARS['vote']) )
{
$view_result = ( ( ( isset($HTTP_GET_VARS['vote']) ) ? $HTTP_GET_VARS['vote'] : $HTTP_POST_VARS['vote'] ) == 'viewresult' ) ? TRUE : 0;
}
else
{
$view_result = 0;
}
 
$poll_expired = ( $vote_info[0]['vote_length'] ) ? ( ( $vote_info[0]['vote_start'] + $vote_info[0]['vote_length'] < time() ) ? TRUE : 0 ) : 0;
 
if ( $user_voted || $view_result || $poll_expired || !$is_auth['auth_vote'] || $forum_topic_data['topic_status'] == TOPIC_LOCKED )
{
$template->set_filenames(array(
'pollbox' => 'viewtopic_poll_result.tpl')
);
 
$vote_results_sum = 0;
 
for($i = 0; $i < $vote_options; $i++)
{
$vote_results_sum += $vote_info[$i]['vote_result'];
}
 
$vote_graphic = 0;
$vote_graphic_max = count($images['voting_graphic']);
 
for($i = 0; $i < $vote_options; $i++)
{
$vote_percent = ( $vote_results_sum > 0 ) ? $vote_info[$i]['vote_result'] / $vote_results_sum : 0;
$vote_graphic_length = round($vote_percent * $board_config['vote_graphic_length']);
 
$vote_graphic_img = $images['voting_graphic'][$vote_graphic];
$vote_graphic = ($vote_graphic < $vote_graphic_max - 1) ? $vote_graphic + 1 : 0;
 
if ( count($orig_word) )
{
$vote_info[$i]['vote_option_text'] = preg_replace($orig_word, $replacement_word, $vote_info[$i]['vote_option_text']);
}
 
$template->assign_block_vars("poll_option", array(
'POLL_OPTION_CAPTION' => $vote_info[$i]['vote_option_text'],
'POLL_OPTION_RESULT' => $vote_info[$i]['vote_result'],
'POLL_OPTION_PERCENT' => sprintf("%.1d%%", ($vote_percent * 100)),
 
'POLL_OPTION_IMG' => $vote_graphic_img,
'POLL_OPTION_IMG_WIDTH' => $vote_graphic_length)
);
}
 
$template->assign_vars(array(
'L_TOTAL_VOTES' => $lang['Total_votes'],
'TOTAL_VOTES' => $vote_results_sum)
);
 
}
else
{
$template->set_filenames(array(
'pollbox' => 'viewtopic_poll_ballot.tpl')
);
 
for($i = 0; $i < $vote_options; $i++)
{
if ( count($orig_word) )
{
$vote_info[$i]['vote_option_text'] = preg_replace($orig_word, $replacement_word, $vote_info[$i]['vote_option_text']);
}
 
$template->assign_block_vars("poll_option", array(
'POLL_OPTION_ID' => $vote_info[$i]['vote_option_id'],
'POLL_OPTION_CAPTION' => $vote_info[$i]['vote_option_text'])
);
}
 
$template->assign_vars(array(
'L_SUBMIT_VOTE' => $lang['Submit_vote'],
'L_VIEW_RESULTS' => $lang['View_results'],
 
'U_VIEW_RESULTS' => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;postdays=$post_days&amp;postorder=$post_order&amp;vote=viewresult"))
);
 
$s_hidden_fields = '<input type="hidden" name="topic_id" value="' . $topic_id . '" /><input type="hidden" name="mode" value="vote" />';
}
 
if ( count($orig_word) )
{
$vote_title = preg_replace($orig_word, $replacement_word, $vote_title);
}
 
$s_hidden_fields .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
 
$template->assign_vars(array(
'POLL_QUESTION' => $vote_title,
 
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_POLL_ACTION' => append_sid("posting.$phpEx?mode=vote&amp;" . POST_TOPIC_URL . "=$topic_id"))
);
 
$template->assign_var_from_handle('POLL_DISPLAY', 'pollbox');
}
}
 
//
// Update the topic view counter
//
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_views = topic_views + 1
WHERE topic_id = $topic_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update topic views.", '', __LINE__, __FILE__, $sql);
}
 
//
// Okay, let's do the loop, yeah come on baby let's do the loop
// and it goes like this ...
//
for($i = 0; $i < $total_posts; $i++)
{
$poster_id = $postrow[$i]['user_id'];
$poster = ( $poster_id == ANONYMOUS ) ? $lang['Guest'] : $postrow[$i]['username'];
 
$post_date = create_date($board_config['default_dateformat'], $postrow[$i]['post_time'], $board_config['board_timezone']);
 
$poster_posts = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Posts'] . ': ' . $postrow[$i]['user_posts'] : '';
 
$poster_from = ( $postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Location'] . ': ' . $postrow[$i]['user_from'] : '';
 
$poster_joined = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Joined'] . ': ' . create_date($lang['DATE_FORMAT'], $postrow[$i]['user_regdate'], $board_config['board_timezone']) : '';
 
$poster_avatar = '';
if ( $postrow[$i]['user_avatar_type'] && $poster_id != ANONYMOUS && $postrow[$i]['user_allowavatar'] )
{
switch( $postrow[$i]['user_avatar_type'] )
{
case USER_AVATAR_UPLOAD:
$poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_REMOTE:
$poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_GALLERY:
$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
break;
}
}
 
//
// Define the little post icon
//
if ( $userdata['session_logged_in'] && $postrow[$i]['post_time'] > $userdata['user_lastvisit'] && $postrow[$i]['post_time'] > $topic_last_read )
{
$mini_post_img = $images['icon_minipost_new'];
$mini_post_alt = $lang['New_post'];
}
else
{
$mini_post_img = $images['icon_minipost'];
$mini_post_alt = $lang['Post'];
}
 
$mini_post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$i]['post_id']) . '#' . $postrow[$i]['post_id'];
 
//
// Generate ranks, set them to empty string initially.
//
$poster_rank = '';
$rank_image = '';
if ( $postrow[$i]['user_id'] == ANONYMOUS )
{
}
else if ( $postrow[$i]['user_rank'] )
{
for($j = 0; $j < count($ranksrow); $j++)
{
if ( $postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
{
$poster_rank = $ranksrow[$j]['rank_title'];
$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
}
}
}
else
{
for($j = 0; $j < count($ranksrow); $j++)
{
if ( $postrow[$i]['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
{
$poster_rank = $ranksrow[$j]['rank_title'];
$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
}
}
}
 
//
// Handle anon users posting with usernames
//
if ( $poster_id == ANONYMOUS && $postrow[$i]['post_username'] != '' )
{
$poster = $postrow[$i]['post_username'];
$poster_rank = $lang['Guest'];
}
 
$temp_url = '';
 
if ( $poster_id != ANONYMOUS )
{
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$poster_id");
$profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>';
$profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
 
$temp_url = append_sid("privmsg.$phpEx?mode=post&amp;" . POST_USERS_URL . "=$poster_id");
$pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
 
if ( !empty($postrow[$i]['user_viewemail']) || $is_auth['auth_mod'] )
{
$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL .'=' . $poster_id) : 'mailto:' . $postrow[$i]['user_email'];
 
$email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
$email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
}
else
{
$email_img = '';
$email = '';
}
 
$www_img = ( $postrow[$i]['user_website'] ) ? '<a href="' . $postrow[$i]['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : '';
$www = ( $postrow[$i]['user_website'] ) ? '<a href="' . $postrow[$i]['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
 
if ( !empty($postrow[$i]['user_icq']) )
{
$icq_status_img = '<a href="http://wwp.icq.com/' . $postrow[$i]['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $postrow[$i]['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
$icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $postrow[$i]['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
$icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $postrow[$i]['user_icq'] . '">' . $lang['ICQ'] . '</a>';
}
else
{
$icq_status_img = '';
$icq_img = '';
$icq = '';
}
 
$aim_img = ( $postrow[$i]['user_aim'] ) ? '<a href="aim:goim?screenname=' . $postrow[$i]['user_aim'] . '&amp;message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '';
$aim = ( $postrow[$i]['user_aim'] ) ? '<a href="aim:goim?screenname=' . $postrow[$i]['user_aim'] . '&amp;message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : '';
 
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$poster_id");
$msn_img = ( $postrow[$i]['user_msnm'] ) ? '<a href="' . $temp_url . '"><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : '';
$msn = ( $postrow[$i]['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : '';
 
$yim_img = ( $postrow[$i]['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&amp;.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
$yim = ( $postrow[$i]['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&amp;.src=pg">' . $lang['YIM'] . '</a>' : '';
}
else
{
$profile_img = '';
$profile = '';
$pm_img = '';
$pm = '';
$email_img = '';
$email = '';
$www_img = '';
$www = '';
$icq_status_img = '';
$icq_img = '';
$icq = '';
$aim_img = '';
$aim = '';
$msn_img = '';
$msn = '';
$yim_img = '';
$yim = '';
}
 
$temp_url = append_sid("posting.$phpEx?mode=quote&amp;" . POST_POST_URL . "=" . $postrow[$i]['post_id']);
$quote_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_quote'] . '" alt="' . $lang['Reply_with_quote'] . '" title="' . $lang['Reply_with_quote'] . '" border="0" /></a>';
$quote = '<a href="' . $temp_url . '">' . $lang['Reply_with_quote'] . '</a>';
 
$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($postrow[$i]['username']) . "&amp;showresults=posts");
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '" title="' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '" border="0" /></a>';
$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '</a>';
 
if ( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] )
{
$temp_url = append_sid("posting.$phpEx?mode=editpost&amp;" . POST_POST_URL . "=" . $postrow[$i]['post_id']);
$edit_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_edit'] . '" alt="' . $lang['Edit_delete_post'] . '" title="' . $lang['Edit_delete_post'] . '" border="0" /></a>';
$edit = '<a href="' . $temp_url . '">' . $lang['Edit_delete_post'] . '</a>';
}
else
{
$edit_img = '';
$edit = '';
}
 
if ( $is_auth['auth_mod'] )
{
$temp_url = "modcp.$phpEx?mode=ip&amp;" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&amp;" . POST_TOPIC_URL . "=" . $topic_id . "&amp;sid=" . $userdata['session_id'];
$ip_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_ip'] . '" alt="' . $lang['View_IP'] . '" title="' . $lang['View_IP'] . '" border="0" /></a>';
$ip = '<a href="' . $temp_url . '">' . $lang['View_IP'] . '</a>';
 
$temp_url = "posting.$phpEx?mode=delete&amp;" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&amp;sid=" . $userdata['session_id'];
$delpost_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" border="0" /></a>';
$delpost = '<a href="' . $temp_url . '">' . $lang['Delete_post'] . '</a>';
}
else
{
$ip_img = '';
$ip = '';
 
if ( $userdata['user_id'] == $poster_id && $is_auth['auth_delete'] && $forum_topic_data['topic_last_post_id'] == $postrow[$i]['post_id'] )
{
$temp_url = "posting.$phpEx?mode=delete&amp;" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&amp;sid=" . $userdata['session_id'];
$delpost_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" border="0" /></a>';
$delpost = '<a href="' . $temp_url . '">' . $lang['Delete_post'] . '</a>';
}
else
{
$delpost_img = '';
$delpost = '';
}
}
 
$post_subject = ( $postrow[$i]['post_subject'] != '' ) ? $postrow[$i]['post_subject'] : '';
 
$message = $postrow[$i]['post_text'];
$bbcode_uid = $postrow[$i]['bbcode_uid'];
 
$user_sig = ( $postrow[$i]['enable_sig'] && $postrow[$i]['user_sig'] != '' && $board_config['allow_sig'] ) ? $postrow[$i]['user_sig'] : '';
$user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];
 
//
// Note! The order used for parsing the message _is_ important, moving things around could break any
// output
//
 
//
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
//
if ( !$board_config['allow_html'] || !$userdata['user_allowhtml'])
{
if ( $user_sig != '' )
{
$user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "&lt;\\2&gt;", $user_sig);
}
 
if ( $postrow[$i]['enable_html'] )
{
$message = preg_replace('#(<)([\/]?.*?)(>)#is', "&lt;\\2&gt;", $message);
}
}
 
//
// Parse message and/or sig for BBCode if reqd
//
if ($user_sig != '' && $user_sig_bbcode_uid != '')
{
$user_sig = ($board_config['allow_bbcode']) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace("/\:$user_sig_bbcode_uid/si", '', $user_sig);
}
 
if ($bbcode_uid != '')
{
$message = ($board_config['allow_bbcode']) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace("/\:$bbcode_uid/si", '', $message);
}
 
if ( $user_sig != '' )
{
$user_sig = make_clickable($user_sig);
}
$message = make_clickable($message);
 
//
// Parse smilies
//
if ( $board_config['allow_smilies'] )
{
if ( $postrow[$i]['user_allowsmile'] && $user_sig != '' )
{
$user_sig = smilies_pass($user_sig);
}
 
if ( $postrow[$i]['enable_smilies'] )
{
$message = smilies_pass($message);
}
}
 
//
// Highlight active words (primarily for search)
//
if ($highlight_match)
{
// This has been back-ported from 3.0 CVS
$message = preg_replace('#(?!<.*)(?<!\w)(' . $highlight_match . ')(?!\w|[^<>]*>)#i', '<b style="color:#'.$theme['fontcolor3'].'">\1</b>', $message);
}
 
//
// Replace naughty words
//
if (count($orig_word))
{
$post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
 
if ($user_sig != '')
{
$user_sig = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $user_sig . '<'), 1, -1));
}
 
$message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $message . '<'), 1, -1));
}
 
//
// Replace newlines (we use this rather than nl2br because
// till recently it wasn't XHTML compliant)
//
if ( $user_sig != '' )
{
$user_sig = '<br />_________________<br />' . str_replace("\n", "\n<br />\n", $user_sig);
}
 
$message = str_replace("\n", "\n<br />\n", $message);
 
//
// Editing information
//
if ( $postrow[$i]['post_edit_count'] )
{
$l_edit_time_total = ( $postrow[$i]['post_edit_count'] == 1 ) ? $lang['Edited_time_total'] : $lang['Edited_times_total'];
 
$l_edited_by = '<br /><br />' . sprintf($l_edit_time_total, $poster, create_date($board_config['default_dateformat'], $postrow[$i]['post_edit_time'], $board_config['board_timezone']), $postrow[$i]['post_edit_count']);
}
else
{
$l_edited_by = '';
}
 
//
// Again this will be handled by the templating
// code at some point
//
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
$template->assign_block_vars('postrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'POSTER_NAME' => $poster,
'POSTER_RANK' => $poster_rank,
'RANK_IMAGE' => $rank_image,
'POSTER_JOINED' => $poster_joined,
'POSTER_POSTS' => $poster_posts,
'POSTER_FROM' => $poster_from,
'POSTER_AVATAR' => $poster_avatar,
'POST_DATE' => $post_date,
'POST_SUBJECT' => $post_subject,
'MESSAGE' => $message,
'SIGNATURE' => $user_sig,
'EDITED_MESSAGE' => $l_edited_by,
 
'MINI_POST_IMG' => $mini_post_img,
'PROFILE_IMG' => $profile_img,
'PROFILE' => $profile,
'SEARCH_IMG' => $search_img,
'SEARCH' => $search,
'PM_IMG' => $pm_img,
'PM' => $pm,
'EMAIL_IMG' => $email_img,
'EMAIL' => $email,
'WWW_IMG' => $www_img,
'WWW' => $www,
'ICQ_STATUS_IMG' => $icq_status_img,
'ICQ_IMG' => $icq_img,
'ICQ' => $icq,
'AIM_IMG' => $aim_img,
'AIM' => $aim,
'MSN_IMG' => $msn_img,
'MSN' => $msn,
'YIM_IMG' => $yim_img,
'YIM' => $yim,
'EDIT_IMG' => $edit_img,
'EDIT' => $edit,
'QUOTE_IMG' => $quote_img,
'QUOTE' => $quote,
'IP_IMG' => $ip_img,
'IP' => $ip,
'DELETE_IMG' => $delpost_img,
'DELETE' => $delpost,
 
'L_MINI_POST_ALT' => $mini_post_alt,
 
'U_MINI_POST' => $mini_post_url,
'U_POST_ID' => $postrow[$i]['post_id'])
);
}
 
$template->pparse('body');
 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
 
?>