This commit was manufactured by cvs2svn to create tag

'release_2_0_18'.

git-svn-id: file:///svn/phpbb/tags/release_2_0_18@5287 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
(no author) 2005-10-31 07:31:06 +00:00
parent 212515e02c
commit 662c839e43
963 changed files with 11589 additions and 57876 deletions

View file

@ -16,16 +16,16 @@ define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['General']['Configuration'] = "$file?mode=config";
$module['General']['Configuration'] = "$file";
return;
}
//
// Let's set the root dir for phpBB
//
$phpbb_root_path = "../";
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
require('./pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
//
@ -43,10 +43,15 @@ else
{
$config_name = $row['config_name'];
$config_value = $row['config_value'];
$default_config[$config_name] = $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')
{
$cookie_name = str_replace('.', '_', $new['cookie_name']);
}
if( isset($HTTP_POST_VARS['submit']) )
{
$sql = "UPDATE " . CONFIG_TABLE . " SET
@ -68,7 +73,7 @@ else
}
$style_select = style_select($new['default_style'], 'default_style', "../templates");
$lang_select = language_select($new['default_lang'], 'default_lang', "../language");
$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\"" : "";
@ -92,6 +97,12 @@ $activation_none = ( $new['require_activation'] == USER_ACTIVATION_NONE ) ? "che
$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\"" : "";
@ -155,6 +166,12 @@ $template->assign_vars(array(
"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'],
@ -242,6 +259,11 @@ $template->assign_vars(array(
"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'],
@ -311,6 +333,6 @@ $template->assign_vars(array(
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
?>

View file

@ -34,15 +34,10 @@ if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['General']['Backup_DB'] = $filename . "?perform=backup";
if(@phpversion() >= '4.0.0')
{
$file_uploads = @ini_get('file_uploads');
}
else
{
$file_uploads = @get_cfg_var('file_uploads');
}
if( ($file_uploads != 0 || empty($file_uploads)) && (strtolower($file_uploads) != 'off') && (@phpversion() != '4.0.4pl1') )
$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";
}
@ -54,9 +49,9 @@ if( !empty($setmodules) )
// Load default header
//
$no_page_header = TRUE;
$phpbb_root_path = "../";
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
require('./pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/sql_parse.'.$phpEx);
//
@ -375,7 +370,7 @@ function get_table_def_mysql($table, $crlf)
// Ok lets grab the fields...
//
$result = $db->sql_query($field_query);
if(!result)
if(!$result)
{
message_die(GENERAL_ERROR, "Failed in get_table_def (show fields)", "", __LINE__, __FILE__, $field_query);
}
@ -571,86 +566,69 @@ function get_table_content_postgresql($table, $handler)
function get_table_content_mysql($table, $handler)
{
global $db;
//
// Grab the data from the table.
//
$result = $db->sql_query("SELECT * FROM $table");
if (!$result)
// 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");
}
if($db->sql_numrows($result) > 0)
{
$schema_insert = "\n#\n# Table Data for $table\n#\n";
}
else
{
$schema_insert = "";
}
$handler($schema_insert);
//
// Loop through the resulting rows and build the sql statement.
//
while ($row = $db->sql_fetchrow($result))
if ($row = $db->sql_fetchrow($result))
{
$table_list = '(';
$num_fields = $db->sql_numfields($result);
//
// Grab the list of field names.
//
for ($j = 0; $j < $num_fields; $j++)
{
$table_list .= $db->sql_fieldname($j, $result) . ', ';
}
//
// Get rid of the last comma
//
$table_list = ereg_replace(', $', '', $table_list);
$table_list .= ')';
//
// 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++)
{
if(!isset($row[$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[$j] != '')
{
$schema_insert .= ' \'' . addslashes($row[$j]) . '\',';
}
else
{
$schema_insert .= '\'\',';
}
}
//
// Get rid of the the last comma.
//
$schema_insert = ereg_replace(',$', '', $schema_insert);
$schema_insert .= ');';
//
// Go ahead and send the insert statement to the handler function.
//
$handler(trim($schema_insert));
$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);
}
@ -671,7 +649,6 @@ function output_table_content($content)
//
// 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'];
@ -680,22 +657,27 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
{
case 'backup':
if( SQL_LAYER == 'oracle' || SQL_LAYER == 'odbc' || SQL_LAYER == 'mssql' )
$error = false;
switch(SQL_LAYER)
{
switch(SQL_LAYER)
{
case 'oracle':
$db_type = "Oracle";
break;
case 'odbc':
$db_type = "ODBC";
break;
case 'mssql':
$db_type = "MSSQL";
break;
}
case 'oracle':
$error = true;
break;
case 'db2':
$error = true;
break;
case 'msaccess':
$error = true;
break;
case 'mssql':
case 'mssql-odbc':
$error = true;
break;
}
include('page_header_admin.'.$phpEx);
if ($error)
{
include('./page_header_admin.'.$phpEx);
$template->set_filenames(array(
"body" => "admin/admin_message_body.tpl")
@ -708,11 +690,10 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
$template->pparse("body");
break;
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_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words');
$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');
$additional_tables = (isset($HTTP_POST_VARS['additional_tables'])) ? $HTTP_POST_VARS['additional_tables'] : ( (isset($HTTP_GET_VARS['additional_tables'])) ? $HTTP_GET_VARS['additional_tables'] : "" );
@ -720,6 +701,8 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
$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))
@ -740,12 +723,11 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
if( !isset($HTTP_POST_VARS['backupstart']) && !isset($HTTP_GET_VARS['backupstart']))
{
include('page_header_admin.'.$phpEx);
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(
@ -771,22 +753,26 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
}
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=\"0;url=admin_db_utilities.$phpEx?perform=backup&amp;additional_tables=" . quotemeta($additional_tables) . "&amp;backup_type=$backup_type&amp;drop=1&amp;backupstart=1&amp;gzipcompress=$gzipcompress&amp;startdownload=1\">",
"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.php');
include('./page_header_admin.'.$phpEx);
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
}
header("Pragma: no-cache");
@ -807,7 +793,7 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
{
@ob_start();
@ob_implicit_flush(0);
header("Content-Type: text/x-delimtext; name=\"phpbb_db_backup.sql.gz\"");
header("Content-Type: application/x-gzip; name=\"phpbb_db_backup.sql.gz\"");
header("Content-disposition: attachment; filename=phpbb_db_backup.sql.gz");
}
else
@ -832,15 +818,19 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
for($i = 0; $i < count($tables); $i++)
{
$table_name = $tables[$i];
if(SQL_LAYER != 'mysql4')
switch (SQL_LAYER)
{
$table_def_function = "get_table_def_" . SQL_LAYER;
$table_content_function = "get_table_content_" . SQL_LAYER;
}
else
{
$table_def_function = "get_table_def_mysql";
$table_content_function = "get_table_content_mysql";
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')
@ -868,12 +858,12 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
break;
case 'restore':
if(!isset($restore_start))
if(!isset($HTTP_POST_VARS['restore_start']))
{
//
// Define Template files...
//
include('page_header_admin.'.$phpEx);
include('./page_header_admin.'.$phpEx);
$template->set_filenames(array(
"body" => "admin/db_utils_restore_body.tpl")
@ -907,7 +897,6 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
if($backup_file_tmpname == "" || $backup_file_name == "")
{
include('page_header_admin.'.$phpEx);
message_die(GENERAL_MESSAGE, $lang['Restore_Error_no_file']);
}
//
@ -916,7 +905,7 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
// a hackers attempt at getting us to process a local system
// file.
//
if( file_exists($backup_file_tmpname) )
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) )
{
@ -943,7 +932,6 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
}
else
{
include('page_header_admin.'.$phpEx);
message_die(GENERAL_ERROR, $lang['Restore_Error_decompress']);
}
}
@ -958,13 +946,11 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
}
else
{
include('page_header_admin.'.$phpEx);
message_die(GENERAL_ERROR, $lang['Restore_Error_filename'] ." $backup_file_type $backup_file_name");
}
}
else
{
include('page_header_admin.'.$phpEx);
message_die(GENERAL_ERROR, $lang['Restore_Error_uploading']);
}
@ -991,15 +977,13 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
if(!$result && ( !(SQL_LAYER == 'postgresql' && eregi("drop table", $sql) ) ) )
{
//include('page_header_admin.'.$phpEx);
// echo "~~$sql~~";
message_die(GENERAL_ERROR, "Error importing backup file", "", __LINE__, __FILE__, $sql);
}
}
}
}
include('page_header_admin.'.$phpEx);
include('./page_header_admin.'.$phpEx);
$template->set_filenames(array(
"body" => "admin/admin_message_body.tpl")
@ -1019,6 +1003,6 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
}
}
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
?>

View file

@ -33,17 +33,20 @@ if( !empty($setmodules) )
//
// Include required files, get $phpEx and check permissions
//
$phpbb_root_path = "../";
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
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']) ) ? $HTTP_POST_VARS['disallowed_user'] : $HTTP_GET_VARS['disallowed_user'];
$disallowed_user = preg_replace( '/\*/', '%', $disallowed_user );
$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'];
@ -110,8 +113,6 @@ else
$user = array();
for( $i = 0; $i < count($disallowed); $i++ )
{
$disallowed[$i]['disallow_username'] = preg_replace('/%/', '*', $disallowed[$i]['disallow_username']);
$disallow_select .= '<option value="' . $disallowed[$i]['disallow_id'] . '">' . $disallowed[$i]['disallow_username'] . '</option>';
}
}
@ -140,4 +141,6 @@ $template->assign_vars(array(
$template->pparse("body");
include('./page_footer_admin.'.$phpEx);
?>

View file

@ -32,9 +32,9 @@ if ( !empty($setmodules) )
//
// Load default header
//
$phpbb_root_path = '../';
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
require('./pagestart.' . $phpEx);
require($phpbb_root_path . 'includes/prune.'.$phpEx);
require($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
@ -168,9 +168,9 @@ else
$forum_name = ( $forum_id == -1 ) ? $lang['All_Forums'] : $forum_rows[0]['forum_name'];
$prune_data = $lang['Prune_topics_not_posted'] . " ";
$prune_data .= '<input type="text" name="prunedays" size="4"> ' . $lang['Days'];
$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 . '">';
$hidden_input = '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
//
// Assign the template variables.
@ -178,6 +178,7 @@ else
$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'],
@ -193,6 +194,6 @@ else
//
$template->pparse('body');
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
?>

View file

@ -34,9 +34,9 @@ if( !empty($setmodules) )
// Load default header
//
$no_page_header = TRUE;
$phpbb_root_path = "../";
$phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
require('./pagestart.' . $phpEx);
//
// Start program - define vars
@ -52,23 +52,23 @@ $simple_auth_ary = array(
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'] . "]");
$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");
$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']);
'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_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]))
@ -79,7 +79,7 @@ if(isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL
else
{
unset($forum_id);
$forum_sql = "";
$forum_sql = '';
}
if( isset($HTTP_GET_VARS['adv']) )
@ -96,66 +96,58 @@ else
//
if( isset($HTTP_POST_VARS['submit']) )
{
$sql = "";
$sql = '';
if(!empty($forum_id))
{
$sql = "UPDATE " . FORUMS_TABLE . " SET ";
if(isset($HTTP_POST_VARS['simpleauth']))
{
$simple_ary = $simple_auth_ary[$HTTP_POST_VARS['simpleauth']];
$simple_ary = $simple_auth_ary[intval($HTTP_POST_VARS['simpleauth'])];
for($i = 0; $i < count($simple_ary); $i++)
{
$sql .= $forum_auth_fields[$i] . " = " . $simple_ary[$i];
if($i < count($simple_ary) - 1)
{
$sql .= ", ";
}
$sql .= ( ( $sql != '' ) ? ', ' : '' ) . $forum_auth_fields[$i] . ' = ' . $simple_ary[$i];
}
$sql .= " WHERE forum_id = $forum_id";
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 = $HTTP_POST_VARS[$forum_auth_fields[$i]];
$value = intval($HTTP_POST_VARS[$forum_auth_fields[$i]]);
if($forum_auth_fields[$i] == 'auth_vote')
if ( $forum_auth_fields[$i] == 'auth_vote' )
{
if( $HTTP_POST_VARS['auth_vote'] == AUTH_ALL )
if ( $HTTP_POST_VARS['auth_vote'] == AUTH_ALL )
{
$value = AUTH_REG;
}
}
$sql .= $forum_auth_fields[$i] . " = " . $value;
if($i < count($forum_auth_fields) - 1)
{
$sql .= ", ";
}
$sql .= ( ( $sql != '' ) ? ', ' : '' ) .$forum_auth_fields[$i] . ' = ' . $value;
}
$sql .= " WHERE forum_id = $forum_id";
$sql = "UPDATE " . FORUMS_TABLE . " SET $sql WHERE forum_id = $forum_id";
}
if($sql != "")
if ( $sql != '' )
{
if(!$db->sql_query($sql))
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update auth table!", "", __LINE__, __FILE__, $sql);
message_die(GENERAL_ERROR, 'Could not update auth table', '', __LINE__, __FILE__, $sql);
}
}
$forum_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") . '">')
'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);
@ -187,7 +179,7 @@ if( empty($forum_id) )
// specified
//
$template->set_filenames(array(
"body" => "admin/auth_select_body.tpl")
'body' => 'admin/auth_select_body.tpl')
);
$select_list = '<select name="' . POST_FORUM_URL . '">';
@ -198,13 +190,13 @@ if( empty($forum_id) )
$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'],
'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)
'S_AUTH_ACTION' => append_sid("admin_forumauth.$phpEx"),
'S_AUTH_SELECT' => $select_list)
);
}
@ -215,7 +207,7 @@ else
// specified
//
$template->set_filenames(array(
"body" => "admin/auth_forum_body.tpl")
'body' => 'admin/auth_forum_body.tpl')
);
$forum_name = $forum_rows[0]['forum_name'];
@ -244,38 +236,30 @@ else
// If we didn't get a match above then we
// automatically switch into 'advanced' mode
//
if(!isset($adv) && !$matched)
if ( !isset($adv) && !$matched )
{
$adv = 1;
}
$s_column_span == 0;
if( empty($adv) )
if ( empty($adv) )
{
$simple_auth = "<select name=\"simpleauth\">";
$simple_auth = '<select name="simpleauth">';
for($j = 0; $j < count($simple_auth_types); $j++)
{
if($matched_type == $j)
{
$simple_auth .= "<option value=\"$j\" selected>";
$simple_auth .= $simple_auth_types[$j];
$simple_auth .= "</option>";
}
else
{
$simple_auth .= "<option value=\"$j\">" . $simple_auth_types[$j] . "</option>";
}
$selected = ( $matched_type == $j ) ? ' selected="selected"' : '';
$simple_auth .= '<option value="' . $j . '"' . $selected . '>' . $simple_auth_types[$j] . '</option>';
}
$simple_auth .= "</select>";
$simple_auth .= '</select>';
$template->assign_block_vars("forum_auth_titles", array(
"CELL_TITLE" => $lang['Simple_mode'])
$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)
$template->assign_block_vars('forum_auth_data', array(
'S_AUTH_LEVELS_SELECT' => $simple_auth)
);
$s_column_span++;
@ -288,37 +272,29 @@ else
//
for($j = 0; $j < count($forum_auth_fields); $j++)
{
$custom_auth[$j] = "&nbsp;<select name=\"" . $forum_auth_fields[$j] . "\">";
$custom_auth[$j] = '&nbsp;<select name="' . $forum_auth_fields[$j] . '">';
for($k = 0; $k < count($forum_auth_levels); $k++)
{
if ( $forum_rows[0][$forum_auth_fields[$j]] == $forum_auth_const[$k] )
{
$custom_auth[$j] .= "<option value=\"" . $forum_auth_const[$k] . "\" selected>";
$custom_auth[$j] .= $lang['Forum_' . $forum_auth_levels[$k]];
$custom_auth[$j] .= "</option>";
}
else
{
$custom_auth[$j] .= "<option value=\"" . $forum_auth_const[$k] . "\">". $lang['Forum_' . $forum_auth_levels[$k]] . "</option>";
}
$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;";
$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_titles', array(
'CELL_TITLE' => $cell_title)
);
$template->assign_block_vars("forum_auth_data", array(
"S_AUTH_LEVELS_SELECT" => $custom_auth[$j])
$template->assign_block_vars('forum_auth_data', array(
'S_AUTH_LEVELS_SELECT' => $custom_auth[$j])
);
$s_column_span++;
}
}
$adv_mode = (empty($adv)) ? "1" : "0";
$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>';
@ -326,26 +302,27 @@ else
$s_hidden_fields = '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '">';
$template->assign_vars(array(
"FORUM_NAME" => $forum_name,
'FORUM_NAME' => $forum_name,
"L_AUTH_TITLE" => $lang['Auth_Control_Forum'],
"L_AUTH_EXPLAIN" => $lang['Forum_auth_explain'],
"L_SUBMIT" => $lang['Submit'],
"L_RESET" => $lang['Reset'],
'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,
'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)
'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);
include('./page_header_admin.'.$phpEx);
$template->pparse("body");
$template->pparse('body');
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
?>

View file

@ -1,6 +1,6 @@
<?php
/***************************************************************************
* admin_forums.php
* admin_forums.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
@ -8,7 +8,6 @@
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
@ -32,9 +31,9 @@ if( !empty($setmodules) )
//
// Load default header
//
$phpbb_root_path = "../";
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
require('./pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
$forum_auth_ary = array(
@ -44,7 +43,7 @@ $forum_auth_ary = array(
"auth_reply" => AUTH_ALL,
"auth_edit" => AUTH_REG,
"auth_delete" => AUTH_REG,
"auth_sticky" => AUTH_REG,
"auth_sticky" => AUTH_MOD,
"auth_announce" => AUTH_MOD,
"auth_vote" => AUTH_REG,
"auth_pollcreate" => AUTH_REG
@ -56,6 +55,7 @@ $forum_auth_ary = array(
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
{
@ -233,6 +233,7 @@ if( isset($HTTP_POST_VARS['addforum']) || isset($HTTP_POST_VARS['addcategory'])
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
//
@ -302,8 +303,14 @@ if( !empty($mode) )
$catlist = get_list('category', $cat_id, TRUE);
$forumstatus == ( FORUM_LOCKED ) ? $forumlocked = "selected=\"selected\"" : $forumunlocked = "selected=\"selected\"";
$statuslist = "<option value=\"" . FORUM_UNLOCKED . "\" $forumunlocked>Unlocked</option>\n";
$statuslist .= "<option value=\"" . FORUM_LOCKED . "\" $forumlocked>Locked</option>\n";
// 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")
@ -493,7 +500,7 @@ if( !empty($mode) )
// 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 ('" . $HTTP_POST_VARS['categoryname'] . "', $next_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);
@ -604,8 +611,41 @@ if( !empty($mode) )
// 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); // Delete everything from forum
prune($from_id, 0, true); // Delete everything from forum
}
else
{
@ -616,6 +656,7 @@ if( !empty($mode) )
{
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__);
@ -637,6 +678,57 @@ if( !empty($mode) )
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) )
@ -826,7 +918,7 @@ if( !empty($mode) )
if ($show_index != TRUE)
{
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
exit;
}
}
@ -931,6 +1023,6 @@ if( $total_categories = $db->sql_numrows($q_categories) )
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
?>
?>

View file

@ -22,7 +22,7 @@
define('IN_PHPBB', 1);
if( !empty($setmodules) )
if ( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Groups']['Manage'] = $filename;
@ -33,38 +33,36 @@ if( !empty($setmodules) )
//
// Load default header
//
$phpbb_root_path = "../";
$phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
require('./pagestart.' . $phpEx);
if( isset($HTTP_POST_VARS[POST_GROUPS_URL]) || isset($HTTP_GET_VARS[POST_GROUPS_URL]) )
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 = "";
$group_id = 0;
}
//
// Mode setting
//
if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['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 = "";
$mode = '';
}
if( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) )
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")
'body' => 'admin/group_edit_body.tpl')
);
if ( isset($HTTP_POST_VARS['edit']) )
@ -76,34 +74,33 @@ if( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) )
FROM " . GROUPS_TABLE . "
WHERE group_single_user <> " . TRUE . "
AND group_id = $group_id";
if(!$result = $db->sql_query($sql))
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Error getting group information", "", __LINE__, __FILE__, $sql);
message_die(GENERAL_ERROR, 'Error getting group information', '', __LINE__, __FILE__, $sql);
}
if( !$db->sql_numrows($result) )
if ( !($group_info = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_MESSAGE, $lang['Group_not_exist']);
}
$group_info = $db->sql_fetchrow($result);
$mode = "editgroup";
$template->assign_block_vars("group_edit", array());
$mode = 'editgroup';
$template->assign_block_vars('group_edit', array());
}
else if( isset($HTTP_POST_VARS['new']) )
else if ( isset($HTTP_POST_VARS['new']) )
{
$group_info = array (
"group_name" => "",
"group_description" => "",
"group_moderator" => "",
"group_type" => GROUP_OPEN);
$group_open = "checked=\"checked\"";
'group_name' => '',
'group_description' => '',
'group_moderator' => '',
'group_type' => GROUP_OPEN);
$group_open = ' checked="checked"';
$mode = "newgroup";
$mode = 'newgroup';
}
//
// Ok, now we know everything about them, let's show the page.
//
@ -111,119 +108,166 @@ if( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) )
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
ORDER BY username";
$u_result = $db->sql_query($sql);
if( !$u_result )
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain user info for moderator list", "", __LINE__, __FILE__, $sql);
message_die(GENERAL_ERROR, 'Could not obtain user info for moderator list', '', __LINE__, __FILE__, $sql);
}
$user_list = $db->sql_fetchrowset($u_result);
for($i = 0; $i < count($user_list); $i++)
while ( $row = $db->sql_fetchrow($result) )
{
if( $user_list[$i]['user_id'] == $group_info['group_moderator'] )
if ( $row['user_id'] == $group_info['group_moderator'] )
{
$group_moderator = $user_list[$i]['username'];
$group_moderator = $row['username'];
}
}
$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\"" : "";
$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,
'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'],
'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"),
'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)
'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']) )
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']) )
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 ( !$result = $db->sql_query($sql) )
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update group", "", __LINE__, __FILE__, $sql);
message_die(GENERAL_ERROR, 'Could not update group', '', __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . USER_GROUP_TABLE . "
WHERE group_id = " . $group_id;
if ( !$result = $db->sql_query($sql) )
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update user_group", "", __LINE__, __FILE__, $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 ( !$result = $db->sql_query($sql) )
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update auth_access", "", __LINE__, __FILE__, $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 = $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']) ? 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']) ? intval($HTTP_POST_VARS['delete_old_moderator']) : "";
$group_name = isset($HTTP_POST_VARS['group_name']) ? 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 == "" )
if ( $group_name == '' )
{
message_die(GENERAL_MESSAGE, $lang['No_group_name']);
}
else if( $group_moderator == "" )
else if ( $group_moderator == '' )
{
message_die(GENERAL_MESSAGE, $lang['No_group_moderator']);
}
$this_userdata = get_userdata($group_moderator);
$this_userdata = get_userdata($group_moderator, true);
$group_moderator = $this_userdata['user_id'];
if( !$group_moderator )
if ( !$group_moderator )
{
message_die(GENERAL_MESSAGE, $lang['No_group_moderator']);
}
@ -234,81 +278,86 @@ else if( isset($HTTP_POST_VARS['group_update']) )
FROM " . GROUPS_TABLE . "
WHERE group_single_user <> " . TRUE . "
AND group_id = " . $group_id;
if(!$result = $db->sql_query($sql))
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Error getting group information", "", __LINE__, __FILE__, $sql);
message_die(GENERAL_ERROR, 'Error getting group information', '', __LINE__, __FILE__, $sql);
}
if( !$db->sql_numrows($result) )
if( !($group_info = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_MESSAGE, $lang['Group_not_exist']);
}
$group_info = $db->sql_fetchrow($result);
if ( $group_info['group_moderator'] != $group_moderator )
{
if ( $delete_old_moderator != "" )
if ( $delete_old_moderator )
{
$sql = "DELETE FROM " . USER_GROUP_TABLE . "
WHERE user_id = " . $group_info['group_moderator'] . "
AND group_id = " . $group_id;
if ( !$result = $db->sql_query($sql) )
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update group moderator", "", __LINE__, __FILE__, $sql);
message_die(GENERAL_ERROR, 'Could not update group moderator', '', __LINE__, __FILE__, $sql);
}
}
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending)
VALUES (" . $group_id . ", " . $group_moderator . ", 0)";
if ( !$result = $db->sql_query($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, "Couldn't update group moderator", "", __LINE__, __FILE__, $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 ( !$result = $db->sql_query($sql) )
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update group", "", __LINE__, __FILE__, $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 = $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" )
else if( $mode == 'newgroup' )
{
$sql = "SELECT MAX(group_id) AS new_group_id
FROM " . GROUPS_TABLE;
if ( !$result = $db->sql_query($sql) )
$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, "Couldn't insert new group", "", __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$new_group_id = $row['new_group_id'] + 1;
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_type, group_name, group_description, group_moderator, group_single_user)
VALUES ($new_group_id, $group_type, '" . str_replace("\'", "''", $group_name) . "', '" . str_replace("\'", "''", $group_description) . "', $group_moderator, '0')";
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert new group", "", __LINE__, __FILE__, $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 ( !$result = $db->sql_query($sql) )
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert new user-group info", "", __LINE__, __FILE__, $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 = $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['Group_mode_not_selected']);
message_die(GENERAL_MESSAGE, $lang['No_group_action']);
}
}
}
@ -318,42 +367,46 @@ else
FROM " . GROUPS_TABLE . "
WHERE group_single_user <> " . TRUE . "
ORDER BY group_name";
$g_result = $db->sql_query($sql);
$group_list = $db->sql_fetchrowset($g_result);
$select_list = "<select name=\"" . POST_GROUPS_URL . "\">";
for($i = 0; $i < count($group_list); $i++)
if ( !($result = $db->sql_query($sql)) )
{
$select_list .= "<option value=\"" . $group_list[$i]['group_id'] . "\">" . $group_list[$i]['group_name'] . "</option>";
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>';
}
$select_list .= "</select>";
$template->set_filenames(array(
"body" => "admin/group_select_body.tpl")
'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'],
'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)
'S_GROUP_ACTION' => append_sid("admin_groups.$phpEx"),
'S_GROUP_SELECT' => $select_list)
);
//
// Faking the IF... ELSE statements again...
//
if( count($group_list) > 0 )
if ( $select_list != '' )
{
$template->assign_block_vars("select_box", array());
$template->assign_block_vars('select_box', array());
}
$template->pparse('body');
}
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
?>

View file

@ -33,9 +33,9 @@ if( !empty($setmodules) )
// Load default header
//
$no_page_header = TRUE;
$phpbb_root_path = "../";
$phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
require('./pagestart.' . $phpEx);
//
// Increase maximum execution time in case of a lot of users, but don't complain about it if it isn't
@ -43,108 +43,120 @@ require('pagestart.' . $phpEx);
//
@set_time_limit(1200);
$message = "";
$subject = "";
$message = '';
$subject = '';
//
// Do the job ...
//
if( isset($HTTP_POST_VARS['submit']) )
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]);
if( $group_id != -1 )
$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)) )
{
$sql = "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";
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
{
$sql = "SELECT user_email
FROM " . USERS_TABLE;
$message = ( $group_id != -1 ) ? $lang['Group_not_exist'] : $lang['No_such_user'];
$error = true;
$error_msg .= ( !empty($error_msg) ) ? '<br />' . $message : $message;
}
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Coult not select group members!", __LINE__, __FILE__, $sql);
}
if( !$db->sql_numrows($result) )
{
//
// Output a relevant GENERAL_MESSAGE about users/group
// not existing
//
}
$email_list = $db->sql_fetchrowset($g_result);
$subject = stripslashes($HTTP_POST_VARS["subject"]);
$message = stripslashes($HTTP_POST_VARS["message"]);
//
// Error checking needs to go here ... if no subject and/or
// no message then skip over the send and return to the form
//
$error = FALSE;
if( !$error )
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'])
if ( preg_match('/[c-z]:\\\.*/i', getenv('PATH')) && !$board_config['smtp_delivery'])
{
// We are running on windows, force delivery to use
// our smtp functions since php's are broken by default
$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'] = get_cfg_var('SMTP');
$board_config['smtp_host'] = @$ini_val('SMTP');
}
$emailer = new emailer($board_config['smtp_delivery']);
$email_headers = "From: " . $board_config['board_email'] . "\n";
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
$bcc_list = "";
for($i = 0; $i < count($email_list); $i++)
for ($i = 0; $i < count($bcc_list); $i++)
{
if( $bcc_list != "" )
{
$bcc_list .= ", ";
}
$bcc_list .= $email_list[$i]['user_email'];
$emailer->bcc($bcc_list[$i]);
}
$email_headers .= "Bcc: $bcc_list\n";
$email_headers .= "Return-Path: " . $userdata['board_email'] . "\n";
$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) . "\r\n";
$emailer->use_template("admin_send_email");
$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)
'SITENAME' => $board_config['sitename'],
'BOARD_EMAIL' => $board_config['board_email'],
'MESSAGE' => $message)
);
$emailer->send();
$emailer->reset();
$message = $lang['Email_sent'] . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
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
//
@ -152,47 +164,50 @@ if( isset($HTTP_POST_VARS['submit']) )
$sql = "SELECT group_id, group_name
FROM ".GROUPS_TABLE . "
WHERE group_single_user <> 1";
$g_result = $db->sql_query($sql);
$group_list = $db->sql_fetchrowset($g_result);
$select_list = '<select name = "' . POST_GROUPS_URL . '">';
$select_list .= '<option value = "-1">' . $lang['All_users'] . '</option>';
for($i = 0;$i < count($group_list); $i++)
if ( !($result = $db->sql_query($sql)) )
{
$select_list .= "<option value = \"" . $group_list[$i]['group_id'];
$select_list .= "\">" . $group_list[$i]['group_name'] . "</option>";
message_die(GENERAL_ERROR, 'Could not obtain list of groups', '', __LINE__, __FILE__, $sql);
}
$select_list .= "</select>";
$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);
include('./page_header_admin.'.$phpEx);
$template->set_filenames(array(
"body" => "admin/user_email_body.tpl")
'body' => 'admin/user_email_body.tpl')
);
$template->assign_vars(array(
"MESSAGE" => $message,
"SUBJECT" => $subject,
'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,
'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)
'S_USER_ACTION' => append_sid('admin_mass_email.'.$phpEx),
'S_GROUP_SELECT' => $select_list)
);
$template->pparse('body');
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
?>
?>

View file

@ -8,7 +8,6 @@
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
@ -32,13 +31,14 @@ if( !empty($setmodules) )
//
// Let's set the root dir for phpBB
//
$phpbb_root_path = "../";
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
require('./pagestart.' . $phpEx);
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ($HTTP_GET_VARS['mode']) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
$mode = htmlspecialchars($mode);
}
else
{
@ -162,8 +162,19 @@ if( $mode != "" )
}
}
if( $rank_id )
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";
@ -255,7 +266,7 @@ if( $mode != "" )
$template->assign_vars(array(
"L_RANKS_TITLE" => $lang['Ranks_title'],
"L_RANKS_TEXT" => $lang['Ranks_explain'],
"L_RANK" => $lang['Rank'],
"L_RANK" => $lang['Rank_title'],
"L_RANK_MINIMUM" => $lang['Rank_minimum'],
"L_SPECIAL_RANK" => $lang['Special_rank'],
"L_EDIT" => $lang['Edit'],
@ -360,6 +371,6 @@ else
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
?>

View file

@ -47,9 +47,9 @@ if( isset($HTTP_GET_VARS['export_pack']) )
}
}
$phpbb_root_path = "../";
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
require('./pagestart.' . $phpEx);
//
// Check to see what mode we should operate in.
@ -57,6 +57,7 @@ require('pagestart.' . $phpEx);
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
{
@ -72,7 +73,7 @@ $dir = @opendir($phpbb_root_path . $board_config['smilies_path']);
while($file = @readdir($dir))
{
if( !@is_dir($phpbb_root_path . $board_config['smilies_path'] . '/' . $file) )
if( !@is_dir(phpbb_realpath($phpbb_root_path . $board_config['smilies_path'] . '/' . $file)) )
{
$img_size = @getimagesize($phpbb_root_path . $board_config['smilies_path'] . '/' . $file);
@ -239,7 +240,7 @@ else if( isset($HTTP_POST_VARS['export_pack']) || isset($HTTP_GET_VARS['export_p
FROM " . SMILIES_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete smiley", "", __LINE__, __FILE__, $sql);
message_die(GENERAL_ERROR, "Could not get smiley list", "", __LINE__, __FILE__, $sql);
}
$resultset = $db->sql_fetchrowset($result);
@ -265,7 +266,7 @@ else if( isset($HTTP_POST_VARS['export_pack']) || isset($HTTP_GET_VARS['export_p
message_die(GENERAL_MESSAGE, $message);
}
else if( isset($HTTP_POST_VARS['add']) )
else if( isset($HTTP_POST_VARS['add']) || isset($HTTP_GET_VARS['add']) )
{
//
// Admin has selected to add a smiley.
@ -286,7 +287,7 @@ else if( isset($HTTP_POST_VARS['add']) )
$template->assign_vars(array(
"L_SMILEY_TITLE" => $lang['smiley_title'],
"L_SMILEY_CONFIG" => $lang['smiley_config'],
"L_SMILEY_EXPLAIN" => $lang['smiley_instr'],
"L_SMILEY_EXPLAIN" => $lang['smile_desc'],
"L_SMILEY_CODE" => $lang['smiley_code'],
"L_SMILEY_URL" => $lang['smiley_url'],
"L_SMILEY_EMOTION" => $lang['smiley_emot'],
@ -313,6 +314,7 @@ else if ( $mode != "" )
//
$smiley_id = ( !empty($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id'];
$smiley_id = intval($smiley_id);
$sql = "DELETE FROM " . SMILIES_TABLE . "
WHERE smilies_id = " . $smiley_id;
@ -333,6 +335,7 @@ else if ( $mode != "" )
//
$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 . "
@ -340,7 +343,7 @@ else if ( $mode != "" )
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, $lang['smile_edit_err'], "", __LINE__, __FILE__, $sql);
message_die(GENERAL_ERROR, 'Could not obtain emoticon information', "", __LINE__, __FILE__, $sql);
}
$smile_data = $db->sql_fetchrow($result);
@ -399,10 +402,18 @@ else if ( $mode != "" )
// 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']) ) ? $HTTP_POST_VARS['smile_code'] : $HTTP_GET_VARS['smile_code'];
$smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? $HTTP_POST_VARS['smile_url'] : $HTTP_GET_VARS['smile_url'];
$smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion'];
$smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? trim($HTTP_POST_VARS['smile_code']) : trim($HTTP_GET_VARS['smile_code']);
$smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? trim($HTTP_POST_VARS['smile_url']) : trim($HTTP_GET_VARS['smile_url']);
$smile_url = phpbb_ltrim(basename($smile_url), "'");
$smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? trim($HTTP_POST_VARS['smile_emotion']) : trim($HTTP_GET_VARS['smile_emotion']);
$smile_id = ( isset($HTTP_POST_VARS['smile_id']) ) ? intval($HTTP_POST_VARS['smile_id']) : intval($HTTP_GET_VARS['smile_id']);
// 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.
//
@ -415,8 +426,7 @@ else if ( $mode != "" )
$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";
$result = $db->sql_query($sql);
if( !$result )
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't update smilies info", "", __LINE__, __FILE__, $sql);
}
@ -437,7 +447,17 @@ else if ( $mode != "" )
//
$smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? $HTTP_POST_VARS['smile_code'] : $HTTP_GET_VARS['smile_code'];
$smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? $HTTP_POST_VARS['smile_url'] : $HTTP_GET_VARS['smile_url'];
$smile_url = phpbb_ltrim(basename($smile_url), "'");
$smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion'];
$smile_code = trim($smile_code);
$smile_url = trim($smile_url);
$smile_emotion = trim($smile_emotion);
// 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.
@ -536,6 +556,6 @@ else
//
// Page Footer
//
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
?>
?>

View file

@ -38,26 +38,28 @@ if( !empty($setmodules) )
//
// Check if the user has cancled a confirmation message.
//
$phpbb_root_path = "../";
$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;
if( empty($HTTP_POST_VARS['send_file']) )
{
$no_page_header = ( $cancel ) ? TRUE : FALSE;
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
}
$no_page_header = (!empty($HTTP_POST_VARS['send_file']) || $cancel) ? TRUE : FALSE;
if( $cancel )
require('./pagestart.' . $phpEx);
$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE;
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE;
if ($cancel)
{
header("Location: " . append_sid("admin_styles.$phpEx"));
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
{
@ -73,7 +75,7 @@ switch( $mode )
if( isset($install_to) )
{
include($phpbb_root_path. "templates/" . $install_to . "/theme_info.cfg");
include($phpbb_root_path. "templates/" . basename($install_to) . "/theme_info.cfg");
$template_name = $$install_to;
$found = FALSE;
@ -132,9 +134,9 @@ switch( $mode )
{
while( $sub_dir = @readdir($dir) )
{
if( !is_file($phpbb_root_path . 'templates/' .$sub_dir) && !is_link($phpbb_root_path . 'templates/' .$sub_dir) && $sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS" )
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_root_path. "templates/" . $sub_dir . "/theme_info.cfg") )
if( @file_exists(@phpbb_realpath($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg")) )
{
include($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg");
@ -490,7 +492,7 @@ switch( $mode )
$themes_title = $lang['Edit_theme'];
$themes_explain = $lang['Edit_theme_explain'];
$style_id = $HTTP_GET_VARS['style_id'];
$style_id = intval($HTTP_GET_VARS['style_id']);
$selected_names = array();
$selected_values = array();
@ -549,7 +551,7 @@ switch( $mode )
$s_template_select = '<select name="template_name">';
while( $file = @readdir($dir) )
{
if( !is_file($phpbb_root_path . 'templates/' . $file) && !is_link($phpbb_root_path . 'templates/' . $file) && $file != "." && $file != ".." && $file != "CVS" )
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'])
{
@ -561,6 +563,7 @@ switch( $mode )
}
}
}
$s_template_select .= '</select>';
}
else
{
@ -579,6 +582,7 @@ switch( $mode )
"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'],
@ -704,7 +708,7 @@ switch( $mode )
$sql = "SELECT *
FROM " . THEMES_TABLE . "
WHERE template_name = '$template_name'";
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);
@ -736,7 +740,7 @@ switch( $mode )
@umask(0111);
$fp = @fopen($phpbb_root_path . 'templates/' . $template_name . '/theme_info.cfg', 'w');
$fp = @fopen($phpbb_root_path . 'templates/' . basename($template_name) . '/theme_info.cfg', 'w');
if( !$fp )
{
@ -747,7 +751,7 @@ switch( $mode )
$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 type="submit" name="submit" value="' . $lang['Download'] . '" />' . $s_hidden_fields;
$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")
@ -789,7 +793,7 @@ switch( $mode )
$s_template_select = '<select name="export_template">';
while( $file = @readdir($dir) )
{
if( !is_file($phpbb_root_path . 'templates/' . $file) && !is_link($phpbb_root_path . 'templates/' .$file) && $file != "." && $file != ".." && $file != "CVS" )
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";
}
@ -929,9 +933,9 @@ switch( $mode )
break;
}
if( !$HTTP_POST_VARS['send_file'] )
if (empty($HTTP_POST_VARS['send_file']))
{
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
}
?>
?>

View file

@ -36,9 +36,9 @@ if( !empty($setmodules) )
//
$no_page_header = TRUE;
$phpbb_root_path = "../";
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
require('./pagestart.' . $phpEx);
$params = array('mode' => 'mode', 'user_id' => POST_USERS_URL, 'group_id' => POST_GROUPS_URL, 'adv' => 'adv');
@ -54,6 +54,11 @@ while( list($var, $param) = @each($params) )
}
}
$user_id = intval($user_id);
$group_id = intval($group_id);
$adv = intval($adv);
$mode = htmlspecialchars($mode);
//
// Start program - define vars
//
@ -246,9 +251,10 @@ if ( isset($HTTP_POST_VARS['submit']) && ( ( $mode == 'user' && $user_id ) || (
}
}
$sql = "SELECT *
FROM " . FORUMS_TABLE . " f
ORDER BY forum_order";
$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);
@ -409,6 +415,7 @@ if ( isset($HTTP_POST_VARS['submit']) && ( ( $mode == 'user' && $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";
@ -503,6 +510,48 @@ if ( isset($HTTP_POST_VARS['submit']) && ( ( $mode == 'user' && $user_id ) || (
}
}
$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);
}
}
@ -510,7 +559,7 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
{
if ( isset($HTTP_POST_VARS['username']) )
{
$this_userdata = get_userdata($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']);
@ -521,9 +570,10 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
//
// Front end
//
$sql = "SELECT *
FROM " . FORUMS_TABLE . " f
ORDER BY forum_order";
$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);
@ -556,7 +606,7 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
}
}
$sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE ";
$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)) )
{
@ -759,7 +809,7 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
$i++;
}
@reset($auth_user);
// @reset($auth_user);
if ( $mode == 'user' )
{
@ -782,18 +832,26 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
}
}
$t_usergroup_list = $t_pending_list = '';
if( count($name) )
{
$t_usergroup_list = '';
for($i = 0; $i < count($ug_info); $i++)
{
$t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$mode&amp;" . POST_GROUPS_URL . "=" . $id[$i]) . '">' . $name[$i] . '</a>';
$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>';
}
}
}
else
{
$t_usergroup_list = $lang['None'];
}
$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 )
@ -819,7 +877,7 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
//
// Dump in the page header ...
//
include('page_header_admin.'.$phpEx);
include('./page_header_admin.'.$phpEx);
$template->set_filenames(array(
"body" => 'admin/auth_ug_body.tpl')
@ -850,20 +908,20 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
$template->assign_vars(array(
'USERNAME' => $t_groupname,
'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list)
'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_USER_OR_GROUP' => ( $mode == 'user' ) ? $lang['User'] : $lang['Group'],
'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_RESET' => $lang['Reset'],
'L_FORUM' => $lang['Forum'],
'U_USER_OR_GROUP' => append_sid("admin_ug_auth.$phpEx"),
'U_SWITCH_MODE' => $u_switch_mode,
@ -878,7 +936,7 @@ else
//
// Select a user/group
//
include('page_header_admin.'.$phpEx);
include('./page_header_admin.'.$phpEx);
$template->set_filenames(array(
'body' => ( $mode == 'user' ) ? 'admin/user_select_body.tpl' : 'admin/auth_select_body.tpl')
@ -920,7 +978,7 @@ else
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
$l_type = ( $mode == 'user' ) ? "USER" : "AUTH";
$l_type = ( $mode == 'user' ) ? 'USER' : 'AUTH';
$template->assign_vars(array(
'L_' . $l_type . '_TITLE' => ( $mode == 'user' ) ? $lang['Auth_Control_User'] : $lang['Auth_Control_Group'],
@ -936,6 +994,6 @@ else
$template->pparse('body');
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
?>
?>

View file

@ -22,7 +22,7 @@
define('IN_PHPBB', 1);
if( !empty($setmodules) )
if ( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Users']['Ban_Management'] = $filename;
@ -33,38 +33,39 @@ if( !empty($setmodules) )
//
// Load default header
//
$phpbb_root_path = "../";
$phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
require('./pagestart.' . $phpEx);
//
// Start program
//
if( isset($HTTP_POST_VARS['submit']) )
if ( isset($HTTP_POST_VARS['submit']) )
{
$user_bansql = "";
$email_bansql = "";
$ip_bansql = "";
$user_bansql = '';
$email_bansql = '';
$ip_bansql = '';
$user_list = array();
if( isset($HTTP_POST_VARS['ban_user']) )
if ( !empty($HTTP_POST_VARS['username']) )
{
$user_list_temp = $HTTP_POST_VARS['ban_user'];
for($i = 0; $i < count($user_list_temp); $i++)
$this_userdata = get_userdata($HTTP_POST_VARS['username'], true);
if( !$this_userdata )
{
$user_list[] = trim($user_list_temp[$i]);
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']) )
if ( isset($HTTP_POST_VARS['ban_ip']) )
{
$ip_list_temp = explode(",", $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) )
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 ... !
@ -72,12 +73,12 @@ if( isset($HTTP_POST_VARS['submit']) )
$ip_1_counter = $ip_range_explode[1];
$ip_1_end = $ip_range_explode[5];
while($ip_1_counter <= $ip_1_end)
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];
$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)
if ( $ip_2_counter == 0 && $ip_2_end == 254 )
{
$ip_2_counter = 255;
$ip_2_fragment = 255;
@ -85,12 +86,12 @@ if( isset($HTTP_POST_VARS['submit']) )
$ip_list[] = encode_ip("$ip_1_counter.255.255.255");
}
while($ip_2_counter <= $ip_2_end)
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];
$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 )
if ( $ip_3_counter == 0 && $ip_3_end == 254 )
{
$ip_3_counter = 255;
$ip_3_fragment = 255;
@ -98,12 +99,12 @@ if( isset($HTTP_POST_VARS['submit']) )
$ip_list[] = encode_ip("$ip_1_counter.$ip_2_counter.255.255");
}
while($ip_3_counter <= $ip_3_end)
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];
$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)
if ( $ip_4_counter == 0 && $ip_4_end == 254 )
{
$ip_4_counter = 255;
$ip_4_fragment = 255;
@ -111,7 +112,7 @@ if( isset($HTTP_POST_VARS['submit']) )
$ip_list[] = encode_ip("$ip_1_counter.$ip_2_counter.$ip_3_counter.255");
}
while($ip_4_counter <= $ip_4_end)
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++;
@ -123,29 +124,29 @@ if( isset($HTTP_POST_VARS['submit']) )
$ip_1_counter++;
}
}
else if( preg_match("/^([\w\-_]\.?){2,}$/is", trim($ip_list_temp[$i])) )
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]) )
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])) )
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])));
$ip_list[] = encode_ip(str_replace('*', '255', trim($ip_list_temp[$i])));
}
}
}
$email_list = array();
if(isset($HTTP_POST_VARS['ban_email']))
if ( isset($HTTP_POST_VARS['ban_email']) )
{
$email_list_temp = explode(",", $HTTP_POST_VARS['ban_email']);
$email_list_temp = explode(',', $HTTP_POST_VARS['ban_email']);
for($i = 0; $i < count($email_list_temp); $i++)
{
@ -154,7 +155,7 @@ if( isset($HTTP_POST_VARS['submit']) )
// contained in the annotated php manual at php.com (ereg
// section)
//
if( eregi("^(([[:alnum:]\*]+([-_.][[:alnum:]\*]+)*\.?)|(\*))@([[:alnum:]]+([-_]?[[:alnum:]]+)*\.){1,3}([[:alnum:]]{2,6})$", trim($email_list_temp[$i])) )
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]);
}
@ -163,32 +164,33 @@ if( isset($HTTP_POST_VARS['submit']) )
$sql = "SELECT *
FROM " . BANLIST_TABLE;
if( !$result = $db->sql_query($sql) )
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 = "";
$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'])
if ( $user_list[$i] == $current_banlist[$j]['ban_userid'] )
{
$in_banlist = true;
}
}
if(!$in_banlist)
if ( !$in_banlist )
{
$kill_session_sql .= ( ($kill_session_sql != "") ? " OR " : "" ) . "session_user_id = $user_list[$i]";
$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( !$result = $db->sql_query($sql) )
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert ban_userid info into database", "", __LINE__, __FILE__, $sql);
}
@ -200,28 +202,28 @@ if( isset($HTTP_POST_VARS['submit']) )
$in_banlist = false;
for($j = 0; $j < count($current_banlist); $j++)
{
if($ip_list[$i] == $current_banlist[$j]['ban_ip'])
if ( $ip_list[$i] == $current_banlist[$j]['ban_ip'] )
{
$in_banlist = true;
}
}
if(!$in_banlist)
if ( !$in_banlist )
{
if( preg_match("/(ff\.)|(\.ff)/is", chunk_split($ip_list[$i], 2, ".")) )
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, "."))) . "'";
$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;
$kill_session_sql .= ( ( $kill_session_sql != '' ) ? ' OR ' : '' ) . $kill_ip_sql;
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_ip)
VALUES ('" . $ip_list[$i] . "')";
if( !$result = $db->sql_query($sql) )
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert ban_ip info into database", "", __LINE__, __FILE__, $sql);
}
@ -229,18 +231,15 @@ if( isset($HTTP_POST_VARS['submit']) )
}
//
// 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
// 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 != "" )
if ( $kill_session_sql != '' )
{
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE $kill_session_sql";
if( !$result = $db->sql_query($sql) )
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete banned sessions from database", "", __LINE__, __FILE__, $sql);
}
@ -251,87 +250,75 @@ if( isset($HTTP_POST_VARS['submit']) )
$in_banlist = false;
for($j = 0; $j < count($current_banlist); $j++)
{
if( $email_list[$i] == $current_banlist[$j]['ban_email'] )
if ( $email_list[$i] == $current_banlist[$j]['ban_email'] )
{
$in_banlist = true;
}
}
if( !$in_banlist )
if ( !$in_banlist )
{
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_email)
VALUES ('" . str_replace("\'", "''", $email_list[$i]) . "')";
if( !$result = $db->sql_query($sql) )
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert ban_email info into database", "", __LINE__, __FILE__, $sql);
}
}
}
$where_sql = "";
$where_sql = '';
if(isset($HTTP_POST_VARS['unban_user']))
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)
if ( $user_list[$i] != -1 )
{
if($where_sql != "")
{
$where_sql .= ", ";
}
$where_sql .= $user_list[$i];
$where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . intval($user_list[$i]);
}
}
}
if( isset($HTTP_POST_VARS['unban_ip']) )
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)
if ( $ip_list[$i] != -1 )
{
if($where_sql != "")
{
$where_sql .= ", ";
}
$where_sql .= $ip_list[$i];
$where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . str_replace("\'", "''", $ip_list[$i]);
}
}
}
if( isset($HTTP_POST_VARS['unban_email']) )
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)
if ( $email_list[$i] != -1 )
{
if($where_sql != "")
{
$where_sql .= ", ";
}
$where_sql .= $email_list[$i];
$where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . str_replace("\'", "''", $email_list[$i]);
}
}
}
if( $where_sql != "" )
if ( $where_sql != '' )
{
$sql = "DELETE FROM " . BANLIST_TABLE . "
WHERE ban_id IN ($where_sql)";
if( !$result = $db->sql_query($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 = $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);
@ -354,37 +341,13 @@ else
'S_BANLIST_ACTION' => append_sid("admin_user_ban.$phpEx"))
);
$userban_count = 0;
$sql = "SELECT user_id, username
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
ORDER BY username 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]['user_id'] . '">' . $user_list[$i]['username'] . '</option>';
$userban_count++;
}
$select_userlist = '<select name="ban_user[]" multiple="multiple" size="5">' . $select_userlist . '</select>';
$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'],
'S_BAN_USERLIST_SELECT' => $select_userlist)
'L_BAN_EMAIL_EXPLAIN' => $lang['Ban_email_explain'])
);
$userban_count = 0;
@ -469,8 +432,12 @@ else
'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_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,
@ -480,6 +447,6 @@ else
$template->pparse('body');
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
?>

View file

@ -30,20 +30,24 @@ if( !empty($setmodules) )
return;
}
$phpbb_root_path = "../";
$phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
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
{
@ -53,22 +57,167 @@ else
//
// 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]) ) )
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'] ) )
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'] );
$user_id = intval($HTTP_POST_VARS['id']);
$this_userdata = get_userdata($user_id);
if( !$this_userdata )
if (!($this_userdata = get_userdata($user_id)))
{
message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] );
}
$username = ( !empty($HTTP_POST_VARS['username']) ) ? trim(strip_tags( $HTTP_POST_VARS['username'] ) ) : '';
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 = "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']) ) ? trim(strip_tags(htmlspecialchars($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'] ) )) : '';
@ -105,6 +254,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
$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'] ) : '';
@ -129,22 +279,22 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
$password_confirm = '';
$icq = stripslashes($icq);
$aim = stripslashes($aim);
$msn = stripslashes($msn);
$yim = stripslashes($yim);
$aim = htmlspecialchars(stripslashes($aim));
$msn = htmlspecialchars(stripslashes($msn));
$yim = htmlspecialchars(stripslashes($yim));
$website = stripslashes($website);
$location = stripslashes($location);
$occupation = stripslashes($occupation);
$interests = stripslashes($interests);
$signature = stripslashes($signature);
$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 = stripslashes($user_dateformat);
$user_dateformat = htmlspecialchars(stripslashes($user_dateformat));
if ( !isset($HTTP_POST_VARS['cancelavatar']))
{
$user_avatar = $user_avatar_local;
$user_avatar = $user_avatar_category . '/' . $user_avatar_local;
$user_avatar_type = USER_AVATAR_GALLERY;
}
}
@ -156,22 +306,33 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
$error = FALSE;
if( stripslashes($username) != $this_userdata['username'] )
if (stripslashes($username) != $this_userdata['username'])
{
unset($rename_user);
if( !validate_username($username) )
if ( stripslashes(strtolower($username)) != strtolower($this_userdata['username']) )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Invalid_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'];
}
}
else
if (!$error)
{
$username_sql = "username = '" . str_replace("\'", "''", $username) . "', ";
$username_sql = "username = '" . str_replace("\\'", "''", $username) . "', ";
$rename_user = $username; // Used for renaming usergroup
}
}
$passwd_sql = "";
$passwd_sql = '';
if( !empty($password) && !empty($password_confirm) )
{
//
@ -199,25 +360,13 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
}
if( $user_status == 0 )
{
// User is (made) inactive. Delete all their sessions.
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_user_id = $user_id";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete this users sessions', '', __LINE__, __FILE__, $sql);
}
}
if( $signature != "" )
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);
}
$sig_length_check = preg_replace('/(\[.*?)(=.*?)\]/is', '\\1]', stripslashes($signature));
// Only create a new bbcode_uid when there was no uid yet.
if ( $signature_bbcode_uid == '' )
@ -233,9 +382,6 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
}
}
//
// Avatar stuff
//
//
// Avatar stuff
//
@ -244,7 +390,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
{
if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "" )
{
if( @file_exists("./" . $board_config['avatar_path'] . "/" . $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']);
}
@ -269,9 +415,9 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
if( $user_avatar_loc != "" )
{
if( file_exists($user_avatar_loc) && ereg(".jpg$|.gif$|.png$", $user_avatar_name) )
if( file_exists(@phpbb_realpath($user_avatar_loc)) && ereg(".jpg$|.gif$|.png$", $user_avatar_name) )
{
if( $user_avatar_size <= $board_config['avatar_filesize'] && $avatar_size > 0)
if( $user_avatar_size <= $board_config['avatar_filesize'] && $user_avatar_size > 0)
{
$error_type = false;
@ -312,7 +458,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "" )
{
if( @file_exists("./../" . $board_config['avatar_path'] . "/" . $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']);
}
@ -421,7 +567,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "")
{
if( file_exists("./../" . $board_config['avatar_path'] . "/" . $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']);
}
@ -500,7 +646,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
}
else if( $user_avatar_local != "" && $avatar_sql == "" && !$error )
{
$avatar_sql = ", user_avatar = '" . str_replace("\'", "''", $user_avatar_local) . "', user_avatar_type = " . USER_AVATAR_GALLERY;
$avatar_sql = ", user_avatar = '" . str_replace("\'", "''", phpbb_ltrim(basename($user_avatar_category), "'") . '/' . phpbb_ltrim(basename($user_avatar_local), "'")) . "', user_avatar_type = " . USER_AVATAR_GALLERY;
}
//
@ -508,98 +654,41 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
//
if( !$error )
{
if( $HTTP_POST_VARS['deleteuser'] )
$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) )
{
$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)) )
if( isset($rename_user) )
{
message_die(GENERAL_ERROR, 'Could not obtain group information for this user', '', __LINE__, __FILE__, $sql);
$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);
}
}
$row = $db->sql_fetchrow($result);
$sql = "UPDATE " . POSTS_TABLE . "
SET poster_id = " . ANONYMOUS . ", post_username = '$username'
WHERE poster_id = $user_id";
if( !$db->sql_query($sql) )
// Delete user session, to prevent the user navigating the forum (if logged in) when disabled
if (!$user_status)
{
message_die(GENERAL_ERROR, 'Could not update posts for this user', '', __LINE__, __FILE__, $sql);
$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);
}
}
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_poster = " . ANONYMOUS . "
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 = "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);
}
$message = $lang['User_deleted'];
$message .= $lang['Admin_user_updated'];
}
else
{
$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);
}
}
$message .= $lang['Admin_user_updated'];
}
else
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Admin_user_fail'];
}
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Admin_user_fail'];
}
$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>');
@ -618,24 +707,24 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
$template->assign_var_from_handle('ERROR_BOX', 'reg_header');
$username = stripslashes($username);
$username = htmlspecialchars(stripslashes($username));
$email = stripslashes($email);
$password = '';
$password_confirm = '';
$icq = stripslashes($icq);
$aim = str_replace('+', ' ', stripslashes($aim));
$msn = stripslashes($msn);
$yim = stripslashes($yim);
$aim = htmlspecialchars(str_replace('+', ' ', stripslashes($aim)));
$msn = htmlspecialchars(stripslashes($msn));
$yim = htmlspecialchars(stripslashes($yim));
$website = stripslashes($website);
$location = stripslashes($location);
$occupation = stripslashes($occupation);
$interests = stripslashes($interests);
$signature = stripslashes($signature);
$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 = stripslashes($user_dateformat);
$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'] ) )
@ -651,7 +740,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
}
else
{
$this_userdata = get_userdata( $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'] );
@ -668,15 +757,17 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
$password_confirm = '';
$icq = $this_userdata['user_icq'];
$aim = str_replace('+', ' ', $this_userdata['user_aim'] );
$msn = $this_userdata['user_msnm'];
$yim = $this_userdata['user_yim'];
$aim = htmlspecialchars(str_replace('+', ' ', $this_userdata['user_aim'] ));
$msn = htmlspecialchars($this_userdata['user_msnm']);
$yim = htmlspecialchars($this_userdata['user_yim']);
$website = $this_userdata['user_website'];
$location = $this_userdata['user_from'];
$occupation = $this_userdata['user_occ'];
$interests = $this_userdata['user_interests'];
$signature = $this_userdata['user_sig'];
$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'];
@ -693,7 +784,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
$user_style = $this_userdata['user_style'];
$user_lang = $this_userdata['user_lang'];
$user_timezone = $this_userdata['user_timezone'];
$user_dateformat = $this_userdata['user_dateformat'];
$user_dateformat = htmlspecialchars($this_userdata['user_dateformat']);
$user_status = $this_userdata['user_active'];
$user_allowavatar = $this_userdata['user_allowavatar'];
@ -721,7 +812,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
$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) )
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);
@ -732,7 +823,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
{
if( preg_match("/(\.gif$|\.png$|\.jpg)$/is", $sub_file) )
{
$avatar_images[$file][$avatar_row_count][$avatar_col_count] = $file . "/" . $sub_file;
$avatar_images[$file][$avatar_row_count][$avatar_col_count] = $sub_file;
$avatar_col_count++;
if( $avatar_col_count == 5 )
@ -749,7 +840,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
if( isset($HTTP_POST_VARS['avatarcategory']) )
{
$category = $HTTP_POST_VARS['avatarcategory'];
$category = htmlspecialchars($HTTP_POST_VARS['avatarcategory']);
}
else
{
@ -777,7 +868,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
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'] . "/" . $avatar_images[$category][$i][$j])
"AVATAR_IMAGE" => "../" . $board_config['avatar_gallery_path'] . '/' . $category . '/' . $avatar_images[$category][$i][$j])
);
$template->assign_block_vars("avatar_row.avatar_option_column", array(
@ -788,7 +879,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
$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 . '" />';
$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) . '" />';
@ -844,7 +935,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
if( !empty($user_avatar_local) )
{
$s_hidden_fields .= '<input type="hidden" name="avatarlocal" value="' . $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 )
@ -885,8 +976,6 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
$rank_select_box .= '<option value="' . $rank_id . '"' . $selected . '>' . $rank . '</option>';
}
$signature = preg_replace('/\:[0-9a-z\:]*?\]/si', ']', $signature);
$template->set_filenames(array(
"body" => "admin/user_edit_body.tpl")
);
@ -929,7 +1018,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
'ALWAYS_ALLOW_SMILIES_YES' => ($allowsmilies) ? 'checked="checked"' : '',
'ALWAYS_ALLOW_SMILIES_NO' => (!$allowsmilies) ? 'checked="checked"' : '',
'AVATAR' => $avatar,
'LANGUAGE_SELECT' => language_select($user_lang, 'language', '../language'),
'LANGUAGE_SELECT' => language_select($user_lang),
'TIMEZONE_SELECT' => tz_select($user_timezone),
'STYLE_SELECT' => style_select($user_style, 'style'),
'DATE_FORMAT' => $user_dateformat,
@ -941,6 +1030,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
'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'],
@ -954,7 +1044,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
'L_YAHOO' => $lang['YIM'],
'L_WEBSITE' => $lang['Website'],
'L_AIM' => $lang['AIM'],
'L_LOCATION' => $lang['From'],
'L_LOCATION' => $lang['Location'],
'L_OCCUPATION' => $lang['Occupation'],
'L_BOARD_LANGUAGE' => $lang['Board_lang'],
'L_BOARD_STYLE' => $lang['Board_style'],
@ -971,7 +1061,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
'L_ALWAYS_ADD_SIGNATURE' => $lang['Always_add_sig'],
'L_SPECIAL' => $lang['User_special'],
'L_SPECIAL_EXPLAIN' => $lang['User_specail_explain'],
'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'],
@ -1012,7 +1102,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
'S_PROFILE_ACTION' => append_sid("admin_users.$phpEx"))
);
if( file_exists('./../' . $board_config['avatar_path'] ) )
if( file_exists(@phpbb_realpath('./../' . $board_config['avatar_path'])) && ($board_config['allow_avatar_upload'] == TRUE) )
{
if ( $form_enctype != '' )
{
@ -1021,33 +1111,24 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
$template->assign_block_vars('avatar_remote_upload', array() );
}
if( file_exists('./../' . $board_config['avatar_gallery_path'] ) )
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
//
$sql = "SELECT user_id, username
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS ."
ORDER BY username";
$result = $db->sql_query($sql);
$select_list = '<select name="' . POST_USERS_URL . '">';
while( $row = $db->sql_fetchrow($result) )
{
$select_list .= '<option value="' . $row['user_id'] . '">' . $row['username'] . '</option>';
}
$select_list .= '</select>';
$template->set_filenames(array(
'body' => 'admin/user_select_body.tpl')
);
@ -1059,7 +1140,7 @@ else
'L_LOOK_UP' => $lang['Look_up_user'],
'L_FIND_USERNAME' => $lang['Find_username'],
'U_SEARCH_USER' => append_sid("../search.$phpEx?mode=searchuser"),
'U_SEARCH_USER' => append_sid("./../search.$phpEx?mode=searchuser"),
'S_USER_ACTION' => append_sid("admin_users.$phpEx"),
'S_USER_SELECT' => $select_list)
@ -1068,6 +1149,6 @@ else
}
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
?>
?>

View file

@ -32,13 +32,14 @@ if( !empty($setmodules) )
//
// Load default header
//
$phpbb_root_path = "../";
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
require('./pagestart.' . $phpEx);
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ($HTTP_GET_VARS['mode']) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
$mode = htmlspecialchars($mode);
}
else
{
@ -63,7 +64,7 @@ if( $mode != "" )
{
if( $mode == "edit" || $mode == "add" )
{
$word_id = ( isset($HTTP_GET_VARS['id']) ) ? $HTTP_GET_VARS['id'] : 0;
$word_id = ( isset($HTTP_GET_VARS['id']) ) ? intval($HTTP_GET_VARS['id']) : 0;
$template->set_filenames(array(
"body" => "admin/words_edit_body.tpl")
@ -109,11 +110,11 @@ if( $mode != "" )
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
}
else if( $mode == "save" )
{
$word_id = ( isset($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : 0;
$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']) : "";
@ -150,6 +151,7 @@ if( $mode != "" )
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
{
@ -172,7 +174,7 @@ if( $mode != "" )
}
else
{
message_die(GENERAL_MESSAGE, $lang['Must_specify_word']);
message_die(GENERAL_MESSAGE, $lang['No_word_selected']);
}
}
}
@ -230,6 +232,6 @@ else
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
?>

View file

@ -26,9 +26,9 @@ define('IN_PHPBB', 1);
// Load default header
//
$no_page_header = TRUE;
$phpbb_root_path = "../";
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
require('./pagestart.' . $phpEx);
// ---------------
// Begin functions
@ -68,7 +68,7 @@ if( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'left' )
unset($setmodules);
include('page_header_admin.'.$phpEx);
include('./page_header_admin.'.$phpEx);
$template->set_filenames(array(
"body" => "admin/index_navigate.tpl")
@ -116,12 +116,12 @@ if( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'left' )
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
include('./page_footer_admin.'.$phpEx);
}
elseif( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' )
{
include('page_header_admin.'.$phpEx);
include('./page_header_admin.'.$phpEx);
$template->set_filenames(array(
"body" => "admin/index_body.tpl")
@ -132,6 +132,7 @@ elseif( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' )
"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'],
@ -331,7 +332,7 @@ elseif( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' )
WHERE s.session_logged_in = " . TRUE . "
AND u.user_id = s.session_user_id
AND u.user_id <> " . ANONYMOUS . "
AND u.user_session_time >= " . ( time() - 300 ) . "
AND s.session_time >= " . ( time() - 300 ) . "
ORDER BY u.user_session_time DESC";
if(!$result = $db->sql_query($sql))
{
@ -454,7 +455,7 @@ elseif( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' )
"FORUM_LOCATION" => $location,
"IP_ADDRESS" => $reg_ip,
"U_WHOIS_IP" => "http://www.samspade.org/t/ipwhois?a=$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))
);
@ -546,7 +547,7 @@ elseif( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' )
"FORUM_LOCATION" => $location,
"IP_ADDRESS" => $guest_ip,
"U_WHOIS_IP" => "http://www.samspade.org/t/ipwhois?a=$guest_ip",
"U_WHOIS_IP" => "http://network-tools.com/default.asp?host=$guest_ip",
"U_FORUM_LOCATION" => append_sid($location_url))
);
}
@ -559,9 +560,74 @@ elseif( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' )
);
}
// 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);
include('./page_footer_admin.'.$phpEx);
}
else
@ -583,8 +649,9 @@ else
$template->pparse("body");
$db->sql_close();
exit;
}
?>
?>

View file

@ -25,30 +25,21 @@ if ( !defined('IN_PHPBB') )
die("Hacking attempt");
}
global $do_gzip_compress;
//
// Show the overall footer.
//
$current_time = time();
$template->set_filenames(array(
"page_footer" => "admin/page_footer.tpl")
'page_footer' => 'admin/page_footer.tpl')
);
$template->assign_vars(array(
"PHPBB_VERSION" => "2.0 " . $board_config['version'],
"TRANSLATION_INFO" => $lang['TRANSLATION_INFO'])
'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");
//
// Output page creation time
//
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
$template->pparse('page_footer');
//
// Close our DB connection.
@ -75,8 +66,8 @@ if( $do_gzip_compress )
echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents;
echo pack("V", $gzip_crc);
echo pack("V", $gzip_size);
echo pack('V', $gzip_crc);
echo pack('V', $gzip_size);
}
exit;

View file

@ -31,22 +31,24 @@ define('HEADER_INC', true);
// gzip_compression
//
$do_gzip_compress = FALSE;
if($board_config['gzip_compress'])
if ( $board_config['gzip_compress'] )
{
$phpver = phpversion();
if($phpver >= '4.0.4pl1')
$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'))
if ( extension_loaded('zlib') )
{
ob_start('ob_gzhandler');
}
}
else if($phpver > '4.0')
else if ( $phpver > '4.0' )
{
if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip'))
if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') )
{
if(extension_loaded('zlib'))
if ( extension_loaded('zlib') )
{
$do_gzip_compress = TRUE;
ob_start();
@ -62,6 +64,10 @@ $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
@ -72,34 +78,12 @@ $template->assign_vars(array(
'PAGE_TITLE' => $page_title,
'L_ADMIN' => $lang['Admin'],
'L_USERNAME' => $lang['Username'],
'L_PASSWORD' => $lang['Password'],
'L_INDEX' => $lang['Forum_Index'],
'L_REGISTER' => $lang['Register'],
'L_PROFILE' => $lang['Profile'],
'L_SEARCH' => $lang['Search'],
'L_PRIVATEMSGS' => $lang['Private_msgs'],
'L_MEMBERLIST' => $lang['Memberlist'],
'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']),
'L_FAQ' => $lang['FAQ'],
'L_USERGROUPS' => $lang['Usergroups'],
'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_MODERATOR' => $lang['Moderator'],
'L_NONEWPOSTS' => $lang['No_new_posts'],
'L_NEWPOSTS' => $lang['New_posts'],
'L_POSTED' => $lang['Posted'],
'L_JOINED' => $lang['Joined'],
'L_AUTHOR' => $lang['Author'],
'L_MESSAGE' => $lang['Message'],
'L_BY' => $lang['by'],
'U_INDEX' => append_sid('../index.'.$phpEx),
'S_TIMEZONE' => sprintf($lang['All_times'], $lang[$board_config['board_timezone']]),
'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'])),
@ -151,4 +135,4 @@ $template->assign_vars(array(
$template->pparse('header');
?>
?>

View file

@ -20,13 +20,13 @@
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
if (!defined('IN_PHPBB'))
{
die("Hacking attempt");
}
define('IN_ADMIN', true);
// Include files
include($phpbb_root_path . 'common.'.$phpEx);
//
@ -37,20 +37,38 @@ init_userprefs($userdata);
//
// End session management
//
if( !$userdata['session_logged_in'] )
if (!$userdata['session_logged_in'])
{
header("Location: ../" . append_sid("login.$phpEx?redirect=admin/"));
redirect(append_sid("login.$phpEx?redirect=admin/index.$phpEx", true));
}
else if( $userdata['user_level'] != ADMIN )
else if ($userdata['user_level'] != ADMIN)
{
message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}
if ( empty($no_page_header) )
if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
{
$url = str_replace(preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name'])), '', $HTTP_SERVER_VARS['REQUEST_URI']);
$url = str_replace(preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path'])), '', $url);
$url = str_replace('//', '/', $url);
$url = preg_replace('/sid=([^&]*)(&?)/i', '', $url);
$url = preg_replace('/\?$/', '', $url);
$url .= ((strpos($url, '?')) ? '&' : '?') . '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);
include('./page_header_admin.'.$phpEx);
}
?>

View file

@ -8,7 +8,6 @@
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
@ -25,9 +24,73 @@ 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))
{
unset($$var);
}
}
unset($input);
}
//
// addslashes to vars if magic_quotes_gpc is off
// this is a security precaution to prevent someone
@ -101,18 +164,20 @@ if( !get_magic_quotes_gpc() )
// malicious rewriting of language and otherarray values via
// URI params
//
$board_config = Array();
$userdata = Array();
$theme = Array();
$images = Array();
$lang = Array();
$board_config = array();
$userdata = array();
$theme = array();
$images = array();
$lang = array();
$nav_links = array();
$gen_simple_header = FALSE;
@include($phpbb_root_path . 'config.'.$phpEx);
include($phpbb_root_path . 'config.'.$phpEx);
if( !defined("PHPBB_INSTALLED") )
{
header("Location: install.$phpEx");
header('Location: ' . $phpbb_root_path . 'install/install.' . $phpEx);
exit;
}
include($phpbb_root_path . 'includes/constants.'.$phpEx);
@ -122,45 +187,18 @@ include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
//
// Mozilla navigation bar
// Default items that should be valid on all pages.
// Defined here and not in page_header.php so they can be redefined in the code
//
$nav_links['top'] = array (
'url' => append_sid($phpbb_root_dir."index.".$phpEx),
'title' => sprintf($lang['Forum_Index'], $board_config['sitename'])
);
$nav_links['search'] = array (
'url' => append_sid($phpbb_root_dir."search.".$phpEx),
'title' => $lang['Search']
);
$nav_links['help'] = array (
'url' => append_sid($phpbb_root_dir."faq.".$phpEx),
'title' => $lang['FAQ']
);
$nav_links['author'] = array (
'url' => append_sid($phpbb_root_dir."memberlist.".$phpEx),
'title' => $lang['Memberlist']
);
// We do not need this any longer, unset for safety purposes
unset($dbpasswd);
//
// Obtain and encode users IP
//
if( getenv('HTTP_X_FORWARDED_FOR') != '' )
{
$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR );
if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", getenv('HTTP_X_FORWARDED_FOR'), $ip_list) )
{
$private_ip = array('/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10..*/', '/^224..*/', '/^240..*/');
$client_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);
}
}
else
{
$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR );
}
// 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);
//
@ -170,16 +208,19 @@ $user_ip = encode_ip($client_ip);
//
$sql = "SELECT *
FROM " . CONFIG_TABLE;
if(!$result = $db->sql_query($sql))
if( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}
else
while ( $row = $db->sql_fetchrow($result) )
{
while($row = $db->sql_fetchrow($result))
{
$board_config[$row['config_name']] = $row['config_value'];
}
$board_config[$row['config_name']] = $row['config_value'];
}
if (file_exists('install') || file_exists('contrib'))
{
message_die(GENERAL_MESSAGE, 'Please ensure both the install/ and contrib/ directories are deleted');
}
//

View file

@ -117,7 +117,7 @@ class sql_db
$query = "TOP " . ( $row_offset + $num_rows ) . $query;
}
$this->result = odbc_exec($this->db_connect_id, "SELECT $query");
$this->result = odbc_exec($this->db_connect_id, "SELECT $query");
if( $this->result )
{
@ -148,7 +148,7 @@ class sql_db
$row_inner++;
}
$this->num_rows[$this->result] = count($this->result_rowset[$this->result]);
$this->num_rows[$this->result] = count($this->result_rowset[$this->result]);
odbc_free_result($this->result);
}
@ -165,7 +165,7 @@ class sql_db
{
if( odbc_fetch_row($result_id) )
{
$this->next_id[$this->db_connect_id] = odbc_result($result_id, 1);
$this->next_id[$this->db_connect_id] = odbc_result($result_id, 1);
$this->affected_rows[$this->db_connect_id] = odbc_num_rows($this->result);
}
}
@ -232,7 +232,7 @@ class sql_db
//
function sql_numrows($query_id = 0)
{
if( !$query_id )
if( !$query_id )
{
$query_id = $this->result;
}

View file

@ -51,7 +51,7 @@ class sql_db
$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);
$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 != "" )
{
@ -92,7 +92,7 @@ class sql_db
//
// Query method
//
function sql_query($query = "", $transaction = FALSE)
function sql_query($query = '', $transaction = FALSE)
{
//
// Remove any pre-existing queries
@ -100,13 +100,13 @@ class sql_db
unset($this->result);
unset($this->row);
if ( $query != "" )
if ( $query != '' )
{
$this->num_queries++;
if ( $transaction == BEGIN_TRANSACTION && !$this->in_transaction )
{
if ( !mssql_query("BEGIN TRANSACTION", $this->db_connect_id) )
if ( !@mssql_query('BEGIN TRANSACTION', $this->db_connect_id) )
{
return false;
}
@ -125,7 +125,7 @@ class sql_db
// 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) )
if( preg_match('#^SELECT(.*?)(LIMIT ([0-9]+)[, ]*([0-9]+)*)?$#s', $query, $limits) )
{
$query = $limits[1];
@ -134,10 +134,10 @@ class sql_db
$row_offset = ( $limits[4] ) ? $limits[3] : "";
$num_rows = ( $limits[4] ) ? $limits[4] : $limits[3];
$query = "TOP " . ( $row_offset + $num_rows ) . $query;
$query = 'TOP ' . ( $row_offset + $num_rows ) . $query;
}
$this->result = mssql_query("SELECT $query", $this->db_connect_id);
$this->result = @mssql_query("SELECT $query", $this->db_connect_id);
if( $this->result )
{
@ -145,20 +145,20 @@ class sql_db
if( $row_offset > 0 )
{
mssql_data_seek($this->result, $row_offset);
@mssql_data_seek($this->result, $row_offset);
}
}
}
else if( eregi("^INSERT ", $query) )
else if( preg_match('#^INSERT #i', $query) )
{
if( mssql_query($query, $this->db_connect_id) )
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);
$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) )
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'];
@ -168,14 +168,14 @@ class sql_db
}
else
{
if( mssql_query($query, $this->db_connect_id) )
if( @mssql_query($query, $this->db_connect_id) )
{
$this->result = time() + microtime();
$result_id = mssql_query("SELECT @@ROWCOUNT as affected", $this->db_connect_id);
$result_id = @mssql_query('SELECT @@ROWCOUNT as affected', $this->db_connect_id);
if( $result_id )
{
if( $row = mssql_fetch_array($result_id) )
if( $row = @mssql_fetch_array($result_id) )
{
$this->affected_rows[$this->db_connect_id] = $row['affected'];
}
@ -187,7 +187,7 @@ class sql_db
{
if( $this->in_transaction )
{
mssql_query("ROLLBACK", $this->db_connect_id);
@mssql_query('ROLLBACK', $this->db_connect_id);
$this->in_transaction = FALSE;
}
@ -198,7 +198,7 @@ class sql_db
{
$this->in_transaction = FALSE;
if( !@mssql_query("COMMIT", $this->db_connect_id) )
if( !@mssql_query('COMMIT', $this->db_connect_id) )
{
@mssql_query("ROLLBACK", $this->db_connect_id);
return false;
@ -213,9 +213,9 @@ class sql_db
{
$this->in_transaction = FALSE;
if( !@mssql_query("COMMIT", $this->db_connect_id) )
if( !@mssql_query('COMMIT', $this->db_connect_id) )
{
@mssql_query("ROLLBACK", $this->db_connect_id);
@mssql_query('ROLLBACK', $this->db_connect_id);
return false;
}
}
@ -236,7 +236,7 @@ class sql_db
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);
return ( !empty($this->limit_offset[$query_id]) ) ? @mssql_num_rows($query_id) - $this->limit_offset[$query_id] : @mssql_num_rows($query_id);
}
else
{
@ -251,7 +251,7 @@ class sql_db
$query_id = $this->result;
}
return ( $query_id ) ? mssql_num_fields($query_id) : false;
return ( $query_id ) ? @mssql_num_fields($query_id) : false;
}
function sql_fieldname($offset, $query_id = 0)
@ -261,7 +261,7 @@ class sql_db
$query_id = $this->result;
}
return ( $query_id ) ? mssql_field_name($query_id, $offset) : false;
return ( $query_id ) ? @mssql_field_name($query_id, $offset) : false;
}
function sql_fieldtype($offset, $query_id = 0)
@ -271,7 +271,7 @@ class sql_db
$query_id = $this->result;
}
return ( $query_id ) ? mssql_field_type($query_id, $offset) : false;
return ( $query_id ) ? @mssql_field_type($query_id, $offset) : false;
}
function sql_fetchrow($query_id = 0)
@ -285,12 +285,13 @@ class sql_db
{
empty($row);
$row = mssql_fetch_array($query_id);
$row = @mssql_fetch_array($query_id);
while( list($key, $value) = @each($row) )
{
$row[$key] = stripslashes($value);
}
@reset($row);
return $row;
}
@ -312,7 +313,7 @@ class sql_db
$i = 0;
empty($rowset);
while( $row = mssql_fetch_array($query_id))
while( $row = @mssql_fetch_array($query_id))
{
while( list($key, $value) = @each($row) )
{
@ -320,6 +321,7 @@ class sql_db
}
$i++;
}
@reset($rowset);
return $rowset;
}
@ -342,18 +344,18 @@ class sql_db
{
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;
$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);
$result = @mssql_result($this->result, $row, $field);
}
}
else
{
if( empty($this->row[$query_id]) )
{
$this->row[$query_id] = mssql_fetch_array($query_id);
$this->row[$query_id] = @mssql_fetch_array($query_id);
$result = stripslashes($this->row[$query_id][$field]);
}
}
@ -375,7 +377,7 @@ class sql_db
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);
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
{
@ -400,7 +402,7 @@ class sql_db
$query_id = $this->result;
}
return ( $query_id ) ? mssql_free_result($query_id) : false;
return ( $query_id ) ? @mssql_free_result($query_id) : false;
}
function sql_error($query_id = 0)

View file

@ -259,7 +259,7 @@ class sql_db
{
if($this->rowset[$query_id])
{
$result = $this->rowset[$query_id][$field];
$result = $this->rowset[$query_id][0][$field];
}
else if($this->row[$query_id])
{

View file

@ -271,7 +271,7 @@ class sql_db
{
if( $this->rowset[$query_id] )
{
$result = $this->rowset[$query_id][$field];
$result = $this->rowset[$query_id][0][$field];
}
else if( $this->row[$query_id] )
{

View file

@ -1,472 +0,0 @@
<?php
/***************************************************************************
* oracle.php
* -------------------
* begin : Thrusday Feb 15, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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","oracle");
class sql_db
{
var $db_connect_id;
var $query_result;
var $in_transaction = 0;
var $row = array();
var $rowset = array();
var $num_queries = 0;
var $last_query_text = "";
//
// 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 = @OCIPLogon($this->user, $this->password, $this->server);
}
else
{
$this->db_connect_id = @OCINLogon($this->user, $this->password, $this->server);
}
if($this->db_connect_id)
{
return $this->db_connect_id;
}
else
{
return false;
}
}
//
// Other base methods
//
function sql_close()
{
if($this->db_connect_id)
{
// Commit outstanding transactions
if($this->in_transaction)
{
OCICommit($this->db_connect_id);
}
if($this->query_result)
{
@OCIFreeStatement($this->query_result);
}
$result = @OCILogoff($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);
// Put us in transaction mode because with Oracle as soon as you make a query you're in a transaction
$this->in_transaction = TRUE;
if($query != "")
{
$this->last_query = $query;
$this->num_queries++;
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];
}
}
if(eregi("^(INSERT|UPDATE) ", $query))
{
$query = preg_replace("/\\\'/s", "''", $query);
}
$this->query_result = @OCIParse($this->db_connect_id, $query);
$success = @OCIExecute($this->query_result, OCI_DEFAULT);
}
if($success)
{
if($transaction == END_TRANSACTION)
{
OCICommit($this->db_connect_id);
$this->in_transaction = FALSE;
}
unset($this->row[$this->query_result]);
unset($this->rowset[$this->query_result]);
$this->last_query_text[$this->query_result] = $query;
return $this->query_result;
}
else
{
if($this->in_transaction)
{
OCIRollback($this->db_connect_id);
}
return false;
}
}
//
// Other query methods
//
function sql_numrows($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @OCIFetchStatement($query_id, $this->rowset);
// OCIFetchStatment kills our query result so we have to execute the statment again
// if we ever want to use the query_id again.
@OCIExecute($query_id, OCI_DEFAULT);
return $result;
}
else
{
return false;
}
}
function sql_affectedrows($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @OCIRowCount($query_id);
return $result;
}
else
{
return false;
}
}
function sql_numfields($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @OCINumCols($query_id);
return $result;
}
else
{
return false;
}
}
function sql_fieldname($offset, $query_id = 0)
{
// OCIColumnName uses a 1 based array so we have to up the offset by 1 in here to maintain
// full abstraction compatibitly
$offset += 1;
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = strtolower(@OCIColumnName($query_id, $offset));
return $result;
}
else
{
return false;
}
}
function sql_fieldtype($offset, $query_id = 0)
{
// This situation is the same as fieldname
$offset += 1;
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @OCIColumnType($query_id, $offset);
return $result;
}
else
{
return false;
}
}
function sql_fetchrow($query_id = 0, $debug = FALSE)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result_row = "";
$result = @OCIFetchInto($query_id, $result_row, OCI_ASSOC+OCI_RETURN_NULLS);
if($debug)
{
echo "Query was: ".$this->last_query . "<br>";
echo "Result: $result<br>";
echo "Query ID: $query_id<br>";
echo "<pre>";
var_dump($result_row);
echo "</pre>";
}
if($result_row == "")
{
return false;
}
for($i = 0; $i < count($result_row); $i++)
{
list($key, $val) = each($result_row);
$return_arr[strtolower($key)] = $val;
}
$this->row[$query_id] = $return_arr;
return $this->row[$query_id];
}
else
{
return false;
}
}
// This function probably isn't as efficant is it could be but any other way I do it
// I end up losing 1 row...
function sql_fetchrowset($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$rows = @OCIFetchStatement($query_id, $results);
@OCIExecute($query_id, OCI_DEFAULT);
for($i = 0; $i <= $rows; $i++)
{
@OCIFetchInto($query_id, $tmp_result, OCI_ASSOC+OCI_RETURN_NULLS);
for($j = 0; $j < count($tmp_result); $j++)
{
list($key, $val) = each($tmp_result);
$return_arr[strtolower($key)] = $val;
}
$result[] = $return_arr;
}
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)
{
// Reset the internal rownum pointer.
@OCIExecute($query_id, OCI_DEFAULT);
for($i = 0; $i < $rownum; $i++)
{
// Move the interal pointer to the row we want
@OCIFetch($query_id);
}
// Get the field data.
$result = @OCIResult($query_id, strtoupper($field));
}
else
{
// The internal pointer should be where we want it
// so we just grab the field out of the current row.
$result = @OCIResult($query_id, strtoupper($field));
}
return $result;
}
else
{
return false;
}
}
function sql_rowseek($rownum, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
@OCIExecute($query_id, OCI_DEFAULT);
for($i = 0; $i < $rownum; $i++)
{
@OCIFetch($query_id);
}
$result = @OCIFetch($query_id);
return $result;
}
else
{
return false;
}
}
function sql_nextid($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id && $this->last_query_text[$query_id] != "")
{
if( eregi("^(INSERT{1}|^INSERT INTO{1})[[:space:]][\"]?([a-zA-Z0-9\_\-]+)[\"]?", $this->last_query_text[$query_id], $tablename))
{
$query = "SELECT ".$tablename[2]."_id_seq.currval FROM DUAL";
$stmt = @OCIParse($this->db_connect_id, $query);
@OCIExecute($stmt,OCI_DEFAULT );
$temp_result = @OCIFetchInto($stmt, $temp_result, OCI_ASSOC+OCI_RETURN_NULLS);
if($temp_result)
{
return $temp_result['CURRVAL'];
}
else
{
return false;
}
}
else
{
return false;
}
}
else
{
return false;
}
}
function sql_nextid($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id && $this->last_query_text[$query_id] != "")
{
if( eregi("^(INSERT{1}|^INSERT INTO{1})[[:space:]][\"]?([a-zA-Z0-9\_\-]+)[\"]?", $this->last_query_text[$query_id], $tablename))
{
$query = "SELECT ".$tablename[2]."_id_seq.CURRVAL FROM DUAL";
$temp_q_id = @OCIParse($this->db_connect_id, $query);
@OCIExecute($temp_q_id, OCI_DEFAULT);
@OCIFetchInto($temp_q_id, $temp_result, OCI_ASSOC+OCI_RETURN_NULLS);
if($temp_result)
{
return $temp_result['CURRVAL'];
}
else
{
return false;
}
}
else
{
return false;
}
}
else
{
return false;
}
}
function sql_freeresult($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @OCIFreeStatement($query_id);
return $result;
}
else
{
return false;
}
}
function sql_error($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
$result = @OCIError($query_id);
return $result;
}
} // class sql_db
} // if ... define
?>

View file

@ -1,186 +0,0 @@
/*
* Basic DB data for phpBB2 devel
*
* $Id$
*/
-- Config
INSERT INTO phpbb_config VALUES ('board_disable','0');
INSERT INTO phpbb_config VALUES ('board_startdate','994190324');
INSERT INTO phpbb_config VALUES ('sitename','yourdomain.com');
INSERT INTO phpbb_config VALUES ('cookie_name','phpbb2oracle');
INSERT INTO phpbb_config VALUES ('cookie_path','/');
INSERT INTO phpbb_config VALUES ('cookie_domain','');
INSERT INTO phpbb_config VALUES ('cookie_secure','0');
INSERT INTO phpbb_config VALUES ('session_length','900');
INSERT INTO phpbb_config VALUES ('allow_html','0');
INSERT INTO phpbb_config VALUES ('allow_html_tags','b,i,u,pre');
INSERT INTO phpbb_config VALUES ('allow_bbcode','1');
INSERT INTO phpbb_config VALUES ('allow_smilies','1');
INSERT INTO phpbb_config VALUES ('allow_sig','1');
INSERT INTO phpbb_config VALUES ('allow_namechange','0');
INSERT INTO phpbb_config VALUES ('allow_theme_create','0');
INSERT INTO phpbb_config VALUES ('allow_avatar_local','0');
INSERT INTO phpbb_config VALUES ('allow_avatar_remote','1');
INSERT INTO phpbb_config VALUES ('allow_avatar_upload','1');
INSERT INTO phpbb_config VALUES ('override_user_style','0');
INSERT INTO phpbb_config VALUES ('posts_per_page','15');
INSERT INTO phpbb_config VALUES ('topics_per_page','50');
INSERT INTO phpbb_config VALUES ('hot_threshold','25');
INSERT INTO phpbb_config VALUES ('max_poll_options','10');
INSERT INTO phpbb_config VALUES ('max_sig_chars','255');
INSERT INTO phpbb_config VALUES ('max_inbox_privmsgs','50');
INSERT INTO phpbb_config VALUES ('max_sentbox_privmsgs','25');
INSERT INTO phpbb_config VALUES ('max_savebox_privmsgs','50');
INSERT INTO phpbb_config VALUES ('board_email_sig','Thanks, The Management');
INSERT INTO phpbb_config VALUES ('board_email','youraddress@yourdomain.com');
INSERT INTO phpbb_config VALUES ('smtp_delivery','0');
INSERT INTO phpbb_config VALUES ('smtp_host','');
INSERT INTO phpbb_config VALUES ('require_activation','0');
INSERT INTO phpbb_config VALUES ('require_admin_activation','0');
INSERT INTO phpbb_config VALUES ('flood_interval','15');
INSERT INTO phpbb_config VALUES ('avatar_filesize','6144');
INSERT INTO phpbb_config VALUES ('avatar_max_width','80');
INSERT INTO phpbb_config VALUES ('avatar_max_height','80');
INSERT INTO phpbb_config VALUES ('avatar_path','images/avatars');
INSERT INTO phpbb_config VALUES ('smilies_path','images/smiles');
INSERT INTO phpbb_config VALUES ('default_style','8');
INSERT INTO phpbb_config VALUES ('default_admin_style','2');
INSERT INTO phpbb_config VALUES ('default_lang','english');
INSERT INTO phpbb_config VALUES ('default_dateformat','D M d, Y g:i a');
INSERT INTO phpbb_config VALUES ('board_timezone','0');
INSERT INTO phpbb_config VALUES ('prune_enable','1');
INSERT INTO phpbb_config VALUES ('gzip_compress','1');
INSERT INTO phpbb_config VALUES ('record_online_users','0');
INSERT INTO phpbb_config VALUES ('record_online_date','0');
INSERT INTO phpbb_config VALUES ('script_path', '/phpBB2/');
INSERT INTO phpbb_config VALUES ('version', 'RC-4');
INSERT INTO phpbb_config VALUES ('server_name', 'www.yourdomain.tld');
INSERT INTO phpbb_config VALUES ('server_port', '80');
-- Categories
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 1);
-- Forums
INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, cat_id, forum_order, forum_posts, forum_topics, forum_last_post_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 'Test Forum 1', 'This is just a test forum, nothing special here.', 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 3, 3, 3);
-- Users
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_autologin_key, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active, user_template) VALUES
( '-1', 'Anonymous', '0', '972086460', '1', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '0', '', '', '', '0', '0', '1', '1', '', '', '', '-8', 'D M d, Y g:i a', '', '', '0', '0');
-- username: admin password: admin (change this or remove it once everything is working!)
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_autologin_key, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( '2', 'Admin', '1', '972086460', '21232f297a57a5a743894a0e4a801fc3', '', 'admin@yourdomain.com', '', '', '', '', '', 'A Signature', '1', '2', '', '', '', '0', '0', '1', '0', '1', '1', '1', '1', '1', '', 'english', '-8', 'd M Y h:i a', '', '', '0', '1');
-- Ranks
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( '1', 'Site Admin', '-1', '1', '');
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( '2', 'Newbie', '0', '0', '');
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( '5', 'Here Often', '10', '0', '');
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( '6', 'Should Get Out More', '50', '0', '');
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( '7', 'Has No Life', '200', '0', '');
-- Groups
INSERT INTO phpbb_groups (group_id, group_name, group_description, group_single_user) VALUES (1, 'Anonymous', 'Personal User', 1);
INSERT INTO phpbb_groups (group_id, group_name, group_description, group_single_user) VALUES (2, 'Admin', 'Personal User', 1);
-- User -> Group
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (1, -1, 0);
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (2, 2, 0);
-- User Access (admin is set as ... an admin)
INSERT INTO phpbb_auth_access (group_id, forum_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_mod) VALUES (2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
-- Demo Topic
INSERT INTO phpbb_topics (topic_id, topic_title, topic_poster, topic_time, topic_views, topic_replies, forum_id, topic_status, topic_type, topic_last_post_id) VALUES (1, 'Demo Topic', 2, 972086460, 0, 0, 1, 0, 0, 1);
-- Demo Post
INSERT INTO phpbb_posts (post_id, topic_id, forum_id, poster_id, post_time, post_username, poster_ip) VALUES (1, 1, 1, 2, 972086460, '', '7F000001');
INSERT INTO phpbb_posts_text (post_id, post_subject, post_text) VALUES (1, 'This is the subject', 'This is a demo post in the demo topic, what do you think of it?');
-- Themes
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (1,'Original default','Default','','','','','','','','','','','','','','','','','','','','','CCCCCC','DDDDDD','','','','','','','',NULL,NULL,NULL,'','','','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (2,'PSO [ Grey ]','PSO', '','','FFFFFF','000000','002266','004411','','','','','','','','','000000','D2D2D2','BCBCBC','','','','EDEDED','DEDEDE','','row1','row2','','verdana,serif','arial,helvetica','courier',1,2,3,'','','','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (3,'PSO [ Wheat ] ','PSO','','','FFFFFF','000000','002266','004411','','','','','','','','','001100','E5CCA5','D4A294','','','','EBE4D9','DAD1C4','','row1','row2','','verdana,serif','arial,helvetica','courier',1,2,3,'000000','','','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (4,'PSO [ Ocean ]','PSO','','','DFF5FF','000000','011001','2100cc','','','','','','','','','000000','A7C1CB','7897A8','','','','83D7CC','A0CCE0','','row1','row2','','verdana,serif','arial,helvetica','courier',1,2,3,'','','','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (6,'PSO [ Blue ]','PSO','','','FFFFFF','000000','417FB9','4E6172','0000AA','','','','','','','','000000','90BAE2','5195D4','','','','cde3f2','daedFd','','row1','row2','','verdana,serif','arial,helvetica','courier',1,2,3,'000000','','','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (7,'PSO [ Cool Midnight ]','PSO', '','','444444','ECECEC','EDF2F2','DDEDED','FFFFFF','EDF2F2','','','','','','','000000','80707F','66555F','','','','60707D','667A80','','row1','row2','','Verdana,serif','Arial,Helvetica,sans-serif','courier',NULL,NULL,NULL,'ECECEC','ECECEC','ECECEC','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (8,'PSO [ Pastel Purple ]','PSO','','','FFFFFF','000000','445588','337744','','','','','','','','','CCCCDD','CCCCDD','DDDDEE','','','','EFEFEF','FEFEFE','','row1','row2','','Verdana,serif','Arial,Helvetica,sans-serif','courier',1,2,3,'','','0000EE','','','');
INSERT INTO phpbb_themes (themes_id, template_name, style_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (9,'subSilver','subSilver','subSilver','','E5E5E5','000000','006699','5584AA','FF9933','EDF2F2','EFEFEF','DEE3E7','c2cdd6','','','','CBD3D9','BCBCBC','1B7CAD','','','','AEBDC4','006699','FFFFFF','row1','row2','','Verdana,Arial,Helvetica,sans-serif','Verdana,Arial,Helvetica,sans-serif','courier','','','','004c75','004c75','004c75','','','');
-- Smilies
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '1', ':D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '2', ':-D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '3', ':grin:', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '4', ':)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '5', ':-)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '6', ':smile:', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '7', ':(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '8', ':-(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '9', ':sad:', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '10', ':o', 'icon_eek.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '11', ':-o', 'icon_eek.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '12', ':eek:', 'icon_eek.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '13', ':?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '14', ':-?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '15', ':???:', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '16', '8)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '17', '8-)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '18', ':cool:', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '19', ':lol:', 'icon_lol.gif', 'Laughing');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '20', ':x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '21', ':-x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '22', ':mad:', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '23', ':P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '24', ':-P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '25', ':razz:', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '26', ':oops:', 'icon_redface.gif', 'Embarassed');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '27', ':cry:', 'icon_cry.gif', 'Crying or Very sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '28', ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '29', ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '30', ':wink:', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '31', ';)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '32', ';-)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '33', ':!:', 'icon_exclaim.gif', 'Exclamation');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '34', ':?:', 'icon_question.gif', 'Question');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '35', ':idea:', 'icon_idea.gif', 'Idea');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '36', ':arrow:', 'icon_arrow.gif', 'Arrow');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '37', ':|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '38', ':-|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '39', ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '40', ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
-- Words
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '1', 'asshole', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '2', 'assram*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '3', 'asswipe', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '4', 'asstool*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '5', 'bastard', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '6', 'bitch', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '7', 'bollock*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '8', 'crap*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '9', '*crap', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '10', 'cunt*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '11', 'dickweed', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '12', 'dickwad', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '13', 'dickhead', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '14', '*fuck*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '15', 'fuk*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '16', 'masturbat*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '17', 'piss*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '18', 'prick', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '19', 'pussy', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '20', '*shit*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '21', 'slut', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '22', 'tits', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '23', '*wank*', '*beep*');
COMMIT;

View file

@ -1,521 +0,0 @@
/*
phpBB2 Oracle 8i DB schema - (c) 2001 The phpBB Group
$Id$
*/
/*
This first section is optional, however its probably the best method
of running phpBB on Oracle. If you already have a tablespace and user created
for phpBB you can leave this section commented out!
The first set of statements create a phpBB tablespace and a phpBB user,
make sure you change the password of the phpBB user befor you run this script!!
*/
/*
CREATE TABLESPACE phpbb
DATAFILE 'E:/web/Oracle8i/ORADATA/phpbb01.dbf'
SIZE 10M
AUTOEXTEND ON NEXT 10M
MAXSIZE 100M;
CREATE USER phpbb
IDENTIFIED BY phpbb_password
DEFAULT TABLESPACE phpbb
TEMPORARY TABLESPACE temp;
GRANT CREATE SESSION TO phpbb;
GRANT CREATE TABLE TO phpbb;
GRANT CREATE SEQUENCE TO phpbb;
GRANT CREATE TRIGGER TO phpbb;
ALTER USER phpbb QUOTA unlimited ON phpbb;
COMMIT;
DISCONNECT;
CONNECT phpbb/phpbb_password;
*/
CREATE SEQUENCE phpbb_banlist_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_categories_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_config_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_disallow_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_forums_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_posts_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_privmsgs_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_ranks_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_smilies_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_themes_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_topics_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_users_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_words_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_groups_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_forum_prune_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_vote_desc_id_seq increment by 1 start with 2 minvalue 0;
/* --------------------------------------------------------
Table structure for table phpbb_auth_access
-------------------------------------------------------- */
CREATE TABLE phpbb_auth_access (
group_id number(4) DEFAULT '0' NOT NULL,
forum_id number(4) DEFAULT '0' NOT NULL,
auth_view number(4) DEFAULT '0' NOT NULL,
auth_read number(4) DEFAULT '0' NOT NULL,
auth_post number(4) DEFAULT '0' NOT NULL,
auth_reply number(4) DEFAULT '0' NOT NULL,
auth_edit number(4) DEFAULT '0' NOT NULL,
auth_delete number(4) DEFAULT '0' NOT NULL,
auth_announce number(4) DEFAULT '0' NOT NULL,
auth_sticky number(4) DEFAULT '0' NOT NULL,
auth_pollcreate number(4) DEFAULT '0' NOT NULL,
auth_attachments number(4) DEFAULT '0' NOT NULL,
auth_vote number(4) DEFAULT '0' NOT NULL,
auth_mod number(4) DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_auth_access_pkey PRIMARY KEY (group_id)
);
CREATE INDEX group_phpbb_auth_access_index ON phpbb_auth_access (forum_id);
/* --------------------------------------------------------
Table structure for table phpbb_groups
-------------------------------------------------------- */
CREATE TABLE phpbb_groups (
group_id number(4) NOT NULL,
group_name varchar(40) NOT NULL,
group_type number(2) DEFAULT '1' NOT NULL,
group_description varchar(255) NOT NULL,
group_moderator number(4) DEFAULT '0' NOT NULL,
group_single_user number(4) DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_groups_pkey PRIMARY KEY (group_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_banlist
-------------------------------------------------------- */
CREATE TABLE phpbb_banlist (
ban_id number(4) NOT NULL,
ban_userid number(4),
ban_ip char(8),
ban_email varchar(255),
CONSTRAINT phpbb_banlist_pkey PRIMARY KEY (ban_id)
);
CREATE INDEX ban_userid_phpbb_banlist_index ON phpbb_banlist (ban_userid);
/* --------------------------------------------------------
Table structure for table phpbb_categories
-------------------------------------------------------- */
CREATE TABLE phpbb_categories (
cat_id number(4) NOT NULL,
cat_title varchar(100),
cat_order number(4),
CONSTRAINT phpbb_categories_pkey PRIMARY KEY (cat_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_config
-------------------------------------------------------- */
CREATE TABLE phpbb_config (
config_name varchar(255) NOT NULL,
config_value varchar(255),
CONSTRAINT phpbb_config_pkey PRIMARY KEY (config_name)
);
/* --------------------------------------------------------
Table structure for table phpbb_disallow
-------------------------------------------------------- */
CREATE TABLE phpbb_disallow (
disallow_id number(4) NOT NULL,
disallow_username varchar(25),
CONSTRAINT phpbb_disallow_pkey PRIMARY KEY (disallow_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_forums
-------------------------------------------------------- */
CREATE TABLE phpbb_forums (
forum_id number(4) NOT NULL,
cat_id number(4),
forum_name varchar(150),
forum_desc varchar(2000),
forum_status number(4) DEFAULT '0' NOT NULL,
forum_order number(4) DEFAULT '1' NOT NULL,
forum_posts number(4) DEFAULT '0' NOT NULL,
forum_topics number(4) DEFAULT '0' NOT NULL,
forum_last_post_id number(4) DEFAULT '0' NOT NULL,
prune_enable number(4) DEFAULT '0' NOT NULL,
prune_next number(4),
auth_view number(4) DEFAULT '0' NOT NULL,
auth_read number(4) DEFAULT '0' NOT NULL,
auth_post number(4) DEFAULT '0' NOT NULL,
auth_reply number(4) DEFAULT '0' NOT NULL,
auth_edit number(4) DEFAULT '0' NOT NULL,
auth_delete number(4) DEFAULT '0' NOT NULL,
auth_announce number(4) DEFAULT '0' NOT NULL,
auth_sticky number(4) DEFAULT '0' NOT NULL,
auth_pollcreate number(4) DEFAULT '0' NOT NULL,
auth_vote number(4) DEFAULT '0' NOT NULL,
auth_attachments number(4) DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_forums_pkey PRIMARY KEY (forum_id)
);
CREATE INDEX cat_id_phpbb_forums_index ON phpbb_forums (cat_id);
CREATE INDEX forums_order_phpbb_forums ON phpbb_forums (forum_order);
/* --------------------------------------------------------
Table structure for table phpbb_forum_prune
-------------------------------------------------------- */
CREATE TABLE phpbb_forum_prune (
prune_id number(4) NOT NULL,
forum_id number(4) NOT NULL,
prune_days number(4) NOT NULL,
prune_freq number(4) NOT NULL,
CONSTRAINT phpbb_forum_prune_pkey PRIMARY KEY (prune_id)
);
CREATE INDEX forum_id_phpbb_forum_prune ON phpbb_forum_prune (forum_id);
/* --------------------------------------------------------
Table structure for table phpbb_posts
-------------------------------------------------------- */
CREATE TABLE phpbb_posts (
post_id number(4) NOT NULL,
topic_id number(4) DEFAULT '0' NOT NULL,
forum_id number(4) DEFAULT '0' NOT NULL,
poster_id number(4) DEFAULT '0' NOT NULL,
post_time number(11) DEFAULT '0' NOT NULL,
post_username varchar(30),
poster_ip char(8) DEFAULT '' NOT NULL,
enable_bbcode number(4) DEFAULT '1' NOT NULL,
enable_html number(4) DEFAULT '0' NOT NULL,
enable_smilies number(4) DEFAULT '1' NOT NULL,
enable_sig number(4) DEFAULT '1' NOT NULL,
post_edit_time number(11),
post_edit_count number(4) DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_posts_pkey PRIMARY KEY (post_id)
);
CREATE INDEX forum_id_phpbb_posts_index ON phpbb_posts (forum_id);
CREATE INDEX post_time_phpbb_posts_index ON phpbb_posts (post_time);
CREATE INDEX poster_id_phpbb_posts_index ON phpbb_posts (poster_id);
CREATE INDEX topic_id_phpbb_posts_index ON phpbb_posts (topic_id);
/* --------------------------------------------------------
Table structure for table phpbb_posts_text
-------------------------------------------------------- */
CREATE TABLE phpbb_posts_text (
post_id number(4) DEFAULT '0' NOT NULL,
bbcode_uid varchar(10) DEFAULT '',
post_subject varchar(255),
post_text varchar(2000),
CONSTRAINT phpbb_posts_text_pkey PRIMARY KEY (post_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_privmsgs
-------------------------------------------------------- */
CREATE TABLE phpbb_privmsgs (
privmsgs_id number(4) NOT NULL,
privmsgs_type number(4) DEFAULT '0' NOT NULL,
privmsgs_subject varchar(255) DEFAULT '0' NOT NULL,
privmsgs_from_userid number(4) DEFAULT '0' NOT NULL,
privmsgs_to_userid number(4) DEFAULT '0' NOT NULL,
privmsgs_date number(4) DEFAULT '0' NOT NULL,
privmsgs_ip char(8) NOT NULL,
privmsgs_enable_bbcode number(1) DEFAULT '1' NOT NULL,
privmsgs_enable_html number(1) DEFAULT '0' NOT NULL,
privmsgs_enable_smilies number(1) DEFAULT '1' NOT NULL,
privmsgs_attach_sig number(1) DEFAULT '1' NOT NULL,
CONSTRAINT phpbb_privmsgs_pkey PRIMARY KEY (privmsgs_id)
);
CREATE INDEX privmsgs_from_userid_index ON phpbb_privmsgs (privmsgs_from_userid);
CREATE INDEX privmsgs_to_userid_index ON phpbb_privmsgs (privmsgs_to_userid);
/* --------------------------------------------------------
Table structure for table phpbb_privmsgs_text
-------------------------------------------------------- */
CREATE TABLE phpbb_privmsgs_text (
privmsgs_text_id number(4) DEFAULT '0' NOT NULL,
privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL,
privmsgs_text varchar(2000),
CONSTRAINT phpbb_privmsgs_text_pkey PRIMARY KEY (privmsgs_text_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_ranks
-------------------------------------------------------- */
CREATE TABLE phpbb_ranks (
rank_id number(4) NOT NULL,
rank_title varchar(50) DEFAULT '' NOT NULL,
rank_min number(4) DEFAULT '0' NOT NULL,
rank_special number(4) DEFAULT '0',
rank_image varchar(255),
CONSTRAINT phpbb_ranks_pkey PRIMARY KEY (rank_id)
);
CREATE INDEX rank_max_phpbb_ranks_index ON phpbb_ranks (rank_max);
CREATE INDEX rank_min_phpbb_ranks_index ON phpbb_ranks (rank_min);
/* --------------------------------------------------------
Table structure for table phpbb_session
-------------------------------------------------------- */
CREATE TABLE phpbb_sessions (
session_id char(32) DEFAULT '0' NOT NULL,
session_user_id number(11) DEFAULT '0' NOT NULL,
session_start number(11) DEFAULT '0' NOT NULL,
session_time number(11) DEFAULT '0' NOT NULL,
session_last_visit number(11) DEFAULT '0' NOT NULL,
session_ip char(8) DEFAULT '0' NOT NULL,
session_page number(11) DEFAULT '0' NOT NULL,
session_logged_in number(11) DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_sessions_pkey PRIMARY KEY (session_id)
);
CREATE INDEX session_id_ip_user_id ON phpbb_sessions (session_id, session_ip, session_user_id);
/* --------------------------------------------------------
Table structure for table phpbb_smilies
-------------------------------------------------------- */
CREATE TABLE phpbb_smilies (
smilies_id number(4) NOT NULL,
code varchar(50),
smile_url varchar(100),
emoticon varchar(75),
CONSTRAINT phpbb_smilies_pkey PRIMARY KEY (smilies_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_themes
-------------------------------------------------------- */
CREATE TABLE phpbb_themes (
themes_id number(4) NOT NULL,
style_name varchar(30),
template_name varchar(30) DEFAULT '' NOT NULL,
head_stylesheet varchar(100),
body_background varchar(100),
body_bgcolor char(6),
body_text char(6),
body_link char(6),
body_vlink char(6),
body_alink char(6),
body_hlink char(6),
tr_color1 char(6),
tr_color2 char(6),
tr_color3 char(6),
tr_class1 varchar(25),
tr_class2 varchar(25),
tr_class3 varchar(25),
th_color1 char(6),
th_color2 char(6),
th_color3 char(6),
th_class1 varchar(25),
th_class2 varchar(25),
th_class3 varchar(25),
td_color1 char(6),
td_color2 char(6),
td_color3 char(6),
td_class1 varchar(25),
td_class2 varchar(25),
td_class3 varchar(25),
fontface1 varchar(25),
fontface2 varchar(25),
fontface3 varchar(25),
fontsize1 number(4),
fontsize2 number(4),
fontsize3 number(4),
fontcolor1 char(6),
fontcolor2 char(6),
fontcolor3 char(6),
span_class1 varchar(25),
span_class2 varchar(25),
span_class3 varchar(25),
CONSTRAINT phpbb_themes_pkey PRIMARY KEY (themes_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_themes_name
-------------------------------------------------------- */
CREATE TABLE phpbb_themes_name (
themes_id number(4) DEFAULT '0' NOT NULL,
tr_color1_name varchar(50),
tr_color2_name varchar(50),
tr_color3_name varchar(50),
tr_class1_name varchar(50),
tr_class2_name varchar(50),
tr_class3_name varchar(50),
th_color1_name varchar(50),
th_color2_name varchar(50),
th_color3_name varchar(50),
th_class1_name varchar(50),
th_class2_name varchar(50),
th_class3_name varchar(50),
td_color1_name varchar(50),
td_color2_name varchar(50),
td_color3_name varchar(50),
td_class1_name varchar(50),
td_class2_name varchar(50),
td_class3_name varchar(50),
fontface1_name varchar(50),
fontface2_name varchar(50),
fontface3_name varchar(50),
fontsize1_name varchar(50),
fontsize2_name varchar(50),
fontsize3_name varchar(50),
fontcolor1_name varchar(50),
fontcolor2_name varchar(50),
fontcolor3_name varchar(50),
span_class1_name varchar(50),
span_class2_name varchar(50),
span_class3_name varchar(50),
CONSTRAINT phpbb_themes_name_pkey PRIMARY KEY (themes_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_topics
-------------------------------------------------------- */
CREATE TABLE phpbb_topics (
topic_id number(4) NOT NULL,
topic_title varchar(100) DEFAULT '' NOT NULL,
topic_poster number(4) DEFAULT '0' NOT NULL,
topic_time number(11) DEFAULT '0' NOT NULL,
topic_views number(4) DEFAULT '0' NOT NULL,
topic_replies number(4) DEFAULT '0' NOT NULL,
forum_id number(4) DEFAULT '0' NOT NULL,
topic_status number(4) DEFAULT '0' NOT NULL,
topic_vote number(4) DEFAULT '0' NOT NULL,
topic_type number(4) DEFAULT '0' NOT NULL,
topic_moved_id number(4),
topic_last_post_id number(4) DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_topics_pkey PRIMARY KEY (topic_id)
);
CREATE INDEX phpbb_topics_index ON phpbb_topics (forum_id, topic_id);
CREATE INDEX forum_id_phpbb_topics_index ON phpbb_topics (forum_id);
/* --------------------------------------------------------
Table structure for table phpbb_topics_watch
-------------------------------------------------------- */
CREATE TABLE phpbb_topics_watch (
topic_id number(4),
user_id number(4),
notify_status number(4) DEFAULT '0' NOT NULL
);
CREATE INDEX phpbb_topics_watch_index ON phpbb_topics_watch (topic_id, user_id);
/* --------------------------------------------------------
Table structure for table phpbb_user_group
-------------------------------------------------------- */
CREATE TABLE phpbb_user_group (
group_id number(4) DEFAULT '0' NOT NULL,
user_id number(4) DEFAULT '0' NOT NULL,
user_pending number(4)
);
CREATE INDEX group_id_phpbb_user_group ON phpbb_user_group (group_id);
CREATE INDEX user_id_phpbb_user_group_index ON phpbb_user_group (user_id);
/* --------------------------------------------------------
Table structure for table phpbb_users
-------------------------------------------------------- */
CREATE TABLE phpbb_users (
user_id number(4) NOT NULL,
user_active number(4),
username varchar(25) DEFAULT '' NOT NULL,
user_regdate number(11) DEFAULT '0' NOT NULL,
user_password varchar(32) DEFAULT '' NOT NULL,
user_autologin_key varchar(32),
user_email varchar(255),
user_icq varchar(15),
user_website varchar(100),
user_occ varchar(100),
user_from varchar(100),
user_interests varchar(255),
user_sig varchar(2000),
user_sig_bbcode_uid char(10),
user_style number(4),
user_aim varchar(255),
user_yim varchar(255),
user_msnm varchar(255),
user_posts number(4) DEFAULT '0' NOT NULL,
user_viewemail number(4),
user_attachsig number(4),
user_allowhtml number(4) DEFAULT '1',
user_allowbbcode number(4) DEFAULT '1',
user_allowsmile number(4) DEFAULT '1',
user_allow_pm number(4) DEFAULT '1' NOT NULL,
user_allowavatar number(4) DEFAULT '1' NOT NULL,
user_allow_viewonline number(4) DEFAULT '1' NOT NULL,
user_rank number(4) DEFAULT '0',
user_avatar varchar(100),
user_level number(4) DEFAULT '1',
user_lang varchar(255),
user_timezone number(4) DEFAULT '0' NOT NULL,
user_dateformat varchar(14) DEFAULT 'd M Y H:m' NOT NULL,
user_notify_pm number(4) DEFAULT '1' NOT NULL,
user_notify number(4),
user_actkey varchar(32),
user_newpasswd varchar(32),
CONSTRAINT phpbb_users_pkey PRIMARY KEY (user_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_vote_desc
-------------------------------------------------------- */
CREATE TABLE phpbb_vote_desc (
vote_id number(4) NOT NULL,
topic_id number(4) DEFAULT '0' NOT NULL,
vote_text varchar2(4000) NOT NULL,
vote_start number(4) DEFAULT '0' NOT NULL,
vote_length number(4) DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_vote_dsc_pkey PRIMARY KEY (vote_id)
);
CREATE INDEX topic_id_phpbb_vote_desc_index ON phpbb_vote_desc (topic_id);
/* --------------------------------------------------------
Table structure for table phpbb_vote_results
-------------------------------------------------------- */
CREATE TABLE phpbb_vote_results (
vote_id number(4) DEFAULT '0' NOT NULL,
vote_option_id number(4) DEFAULT '0' NOT NULL,
vote_option_text varchar(255) NOT NULL,
vote_result number(4) DEFAULT '0' NOT NULL
);
CREATE INDEX option_id_vote_results_index ON phpbb_vote_results (vote_option_id);
/* --------------------------------------------------------
Table structure for table phpbb_vote_voters
-------------------------------------------------------- */
CREATE TABLE phpbb_vote_voters (
vote_id number(4) DEFAULT '0' NOT NULL,
vote_user_id number(4) DEFAULT '0' NOT NULL,
vote_user_ip char(8) NOT NULL
);
CREATE INDEX vote_id_vote_voters_index ON phpbb_vote_voters (vote_id);
CREATE INDEX vote_user_id_vote_voters_index ON phpbb_vote_voters (vote_user_id);
CREATE INDEX vote_user_ip_vote_voters_index ON phpbb_vote_voters (vote_user_ip);
/* --------------------------------------------------------
Table structure for table phpbb_words
-------------------------------------------------------- */
CREATE TABLE phpbb_words (
word_id number(4) NOT NULL,
word varchar(100) DEFAULT '' NOT NULL,
replacement varchar(100) DEFAULT '' NOT NULL,
CONSTRAINT phpbb_words_pkey PRIMARY KEY (word_id)
);
COMMIT;

View file

@ -1,217 +0,0 @@
/*
phpBB2 Oracle 8i Triggers File - (c) 2001 The phpBB Group
$Id$
*/
/* --------------------------------------------------------
Trigger structure for table phpbb_groups
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_PHPBB_GROUPS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "GROUP_ID" ON "PHPBB"."PHPBB_GROUPS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_GROUPS_ID_SEQ.NEXTVAL
INTO :NEW.group_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_banlist
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_PHPBB_BANLIST_ID_SEQ"
BEFORE INSERT OR UPDATE OF "BAN_ID" ON "PHPBB"."PHPBB_BANLIST"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_BANLIST_ID_SEQ.NEXTVAL
INTO :NEW.ban_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_categories
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_CATEGORIES_ID_SEQ"
BEFORE INSERT OR UPDATE OF "CAT_ID" ON "PHPBB"."PHPBB_CATEGORIES"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_CATEGORIES_ID_SEQ.NEXTVAL
INTO :NEW.cat_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_disallow
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_DISALLOW_ID_SEQ"
BEFORE INSERT OR UPDATE OF "DISALLOW_ID" ON "PHPBB"."PHPBB_DISALLOW"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_DISALLOW_ID_SEQ.NEXTVAL
INTO :NEW.disallow_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_forums
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_FORUMS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "FORUM_ID" ON "PHPBB"."PHPBB_FORUMS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_FORUMS_ID_SEQ.NEXTVAL
INTO :NEW.forum_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_forum_prune
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_FORUM_PRUNE_ID_SEQ"
BEFORE INSERT OR UPDATE OF "PRUNE_ID" ON "PHPBB"."PHPBB_FORUM_PRUNE"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_FORUM_PRUNE_ID_SEQ.NEXTVAL
INTO :NEW.prune_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_posts
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_POSTS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "POST_ID" ON "PHPBB"."PHPBB_POSTS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_POSTS_ID_SEQ.NEXTVAL
INTO :NEW.post_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_privmsgs
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_PRIVMSGS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "PRIVMSGS_ID" ON "PHPBB"."PHPBB_PRIVMSGS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_PRIVMSGS_ID_SEQ.NEXTVAL
INTO :NEW.privmsgs_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_ranks
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_RANK_ID_SEQ"
BEFORE INSERT OR UPDATE OF "RANK_ID" ON "PHPBB"."PHPBB_RANKS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_RANKS_ID_SEQ.NEXTVAL
INTO :NEW.rank_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_smilies
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_SMILIES_ID_SEQ"
BEFORE INSERT OR UPDATE OF "SMILIES_ID" ON "PHPBB"."PHPBB_SMILIES"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_SMILIES_ID_SEQ.NEXTVAL
INTO :NEW.smilies_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_themes
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_THEMES_ID_SEQ"
BEFORE INSERT OR UPDATE OF "THEMES_ID" ON "PHPBB"."PHPBB_THEMES"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_THEMES_ID_SEQ.NEXTVAL
INTO :NEW.themes_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_topics
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_TOPICS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "TOPIC_ID" ON "PHPBB"."PHPBB_TOPICS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_TOPICS_ID_SEQ.NEXTVAL
INTO :NEW.topic_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_users
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_USERS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "USER_ID" ON "PHPBB"."PHPBB_USERS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_USERS_ID_SEQ.NEXTVAL
INTO :NEW.user_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_vote_desc
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_VOTE_DESC_ID_SEQ"
BEFORE INSERT OR UPDATE OF "VOTE_ID" ON "PHPBB"."PHPBB_VOTE_DESC"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_VOTE_DESC_ID_SEQ.NEXTVAL
INTO :NEW.vote_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_words
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_WORDS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "WORD_ID" ON "PHPBB"."PHPBB_WORDS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_WORDS_ID_SEQ.NEXTVAL
INTO :NEW.word_id
FROM DUAL;
END;
/
COMMIT;

View file

@ -13,11 +13,11 @@ die("Please read the first lines of this script for instructions on how to enabl
// Do not change anything below this line.
//
define('IN_PHPBB', true);
$phpbb_root_path = "../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/post.'.$phpEx);
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
srand ((double) microtime() * 1000000);
@ -51,6 +51,9 @@ And a quote!
[/quote]
';
$users = intval($HTTP_GET_VARS['users']);
$posts = intval($HTTP_GET_VARS['posts']);
$size = intval($HTTP_GET_VARS['size']);
// The script expects the ID's in the tables to sequential (1,2,3,4,5),
// so no holes please (1,4,5,8)...
@ -88,7 +91,9 @@ if ($posts > 0)
$endtime = microtime();
if ($submit="" || !isset($submit))
$submit = (isset($HTTP_GET_VARS['submit'])) ? true : false;
if (!$submit)
{
?>
Hello, welcome to this little phpBB Benchmarking script :)<p>
@ -219,10 +224,10 @@ function make_topic($user_id, $subject, $forum_id)
$topic_vote = 0;
$current_time = time();
$sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote)
VALUES ('$subject', $user_id, $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)";
$sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote)
VALUES ('$subject', $user_id, $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)";
if( $result = $db->sql_query($sql, BEGIN_TRANSACTION) )
if( $result = $db->sql_query($sql) )
{
$new_topic_id = $db->sql_nextid();
}
@ -238,17 +243,14 @@ function make_topic($user_id, $subject, $forum_id)
function create_posting($userid, $topic_id, $forum, $mode='newtopic')
function create_posting($userid, $topic_id, $forum, $mode = 'newtopic')
{
$message = generatepost();
return make_post($topic_id, $forum, $userid, "", $message, $mode);
}
function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $mode='newtopic')
function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $mode = 'newtopic')
{
global $db;
$current_time = time();
@ -261,64 +263,43 @@ function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $m
$post_subject = 'random subject';
$post_message = prepare_message($text, $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
$post_message = prepare_message($text, $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
$sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, bbcode_uid, enable_bbcode, enable_html, enable_smilies, enable_sig)
VALUES ($new_topic_id, $forum_id, $user_id, '$post_username', $current_time, '$user_ip', '$bbcode_uid', $bbcode_on, $html_on, $smilies_on, $attach_sig)";
$sql = "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 ($new_topic_id, $forum_id, $user_id, '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)";
$result = $db->sql_query($sql);
if($result)
{
$new_post_id = $db->sql_nextid();
$sql = "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, post_text)
VALUES ($new_post_id, '$post_subject', '$post_message')";
$sql = "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text)
VALUES ($new_post_id, '$post_subject', '$bbcode_uid', '$post_message')";
if($db->sql_query($sql))
{
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_last_post_id = $new_post_id";
if($mode == "reply")
$post_data = array();
$post_data['first_post'] = false;
$post_data['last_post'] = true;
$sql = "SELECT SUM(post_id) as total FROM " . POSTS_TABLE . " WHERE topic_id = " . $new_topic_id;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$total = intval($row['total']);
if ($total == 1)
{
$sql .= ", topic_replies = topic_replies + 1 ";
}
$sql .= " WHERE topic_id = $new_topic_id";
if($db->sql_query($sql))
{
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_last_post_id = $new_post_id, forum_posts = forum_posts + 1";
if($mode == "newtopic")
{
$sql .= ", forum_topics = forum_topics + 1";
}
$sql .= " WHERE forum_id = $forum_id";
if($db->sql_query($sql))
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_posts = user_posts + 1
WHERE user_id = " . $user_id;
if($db->sql_query($sql, END_TRANSACTION))
{
// SUCCESS.
return true;
}
else
{
message_die(GENERAL_ERROR, "Error updating users table", "", __LINE__, __FILE__, $sql);
}
}
else
{
message_die(GENERAL_ERROR, "Error updating forums table", "", __LINE__, __FILE__, $sql);
}
}
else
{
message_die(GENERAL_ERROR, "Error updating topics table", "", __LINE__, __FILE__, $sql);
$post_data['first_post'] = true;
}
$sql = "SELECT forum_last_post_id
FROM " . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$post_data['last_topic'] = ( $row['forum_last_post_id'] == $new_post_id ) ? true : false;
update_post_stats($mode, $post_data, $forum_id, $new_topic_id, $new_post_id, $user_id);
}
else
{
@ -336,11 +317,10 @@ function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $m
{
message_die(GENERAL_ERROR, "Error inserting data into posts table", "", __LINE__, __FILE__, $sql);
}
}
function generatepost($size=850)
function generatepost($size = 850)
{
global $bigass_text;
// Returns a string with a length between $size and $size*0.2
@ -417,22 +397,6 @@ function make_user($username)
message_die(GENERAL_ERROR, "Couldn't obtained next user_id information.", "", __LINE__, __FILE__, $sql);
}
$sql = "SELECT MAX(group_id) AS total
FROM " . GROUPS_TABLE;
if($result = $db->sql_query($sql))
{
$row = $db->sql_fetchrow($result);
$new_group_id = $row['total'] + 1;
unset($result);
unset($row);
}
else
{
message_die(GENERAL_ERROR, "Couldn't obtained next user_id information.", "", __LINE__, __FILE__, $sql);
}
$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_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$icq', '$website', '$occupation', '$location', '$interests', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, ";
@ -441,12 +405,14 @@ function make_user($username)
if($result = $db->sql_query($sql, BEGIN_TRANSACTION))
{
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_name, group_description, group_single_user, group_moderator)
VALUES ($new_group_id, '', 'Personal User', 1, 0)";
$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))
{
$group_id = $db->sql_nextid();
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending)
VALUES ($new_user_id, $new_group_id, 0)";
VALUES ($new_user_id, $group_id, 0)";
if($result = $db->sql_query($sql, END_TRANSACTION))
{
@ -474,4 +440,4 @@ function make_user($username)
?>
?>

View file

@ -0,0 +1,67 @@
<html>
<body>
<?php
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
//
// Do not change anything below this line.
//
//
// Convert 2.0.x Usernames to the new 2.0.5 Username format.
//
chdir("../");
define('IN_PHPBB', true);
include('extension.inc');
include('config.'.$phpEx);
include('includes/constants.'.$phpEx);
include('includes/db.'.$phpEx);
$sql = "SELECT user_id, username
FROM " . USERS_TABLE;
$result = $db->sql_query($sql);
if(!$result)
{
die("Unable to get users");
}
while ($row = $db->sql_fetchrow($result))
{
if (!preg_match('#(&gt;)|(&lt;)|(&quot)|(&amp;)#', $row['username']))
{
if ($row['username'] != htmlspecialchars($row['username']))
{
flush();
$sql = "UPDATE " . USERS_TABLE . "
SET username = '" . str_replace("'", "''", htmlspecialchars($row['username'])) . "'
WHERE user_id = " . $row['user_id'];
if (!$db->sql_query($sql))
{
echo "ERROR: Unable to rename user " . htmlspecialchars($row['username']) . " with ID " . $row['user_id'] . "<br>";
echo "<pre>" . print_r($db->sql_error()) . "</pre><br />$sql";
}
else
{
echo "Renamed User " . htmlspecialchars($row['username']) . " with ID " . $row['user_id'] . "<br>";
}
}
}
}
echo "<br>That's All Folks!";
?>
</body>
</html>

View file

@ -0,0 +1,73 @@
<?php
/***************************************************************************
* revar_lang_files.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
//die("Please read the first lines of this script for instructions on how to enable it");
$dirname = "./../language";
$dir = opendir($dirname);
while ( $file = readdir($dir) )
{
if ( ereg('^lang_', $file) && !is_file(phpbb_realpath($dirname . '/' . $file)) && !is_link(phpbb_realpath($dirname . '/' . $file)) )
{
include($dirname . '/' . $file . '/lang_main.php');
$lang_dir = opendir($dirname . '/' . $file . '/email');
while ( $email = readdir($lang_dir) )
{
if ( ereg('\.tpl$', $email) && is_file(phpbb_realpath($dirname . '/' . $file . '/email/' . $email)) )
{
$fp = fopen($dirname . '/' . $file . '/email/' . $email, 'r+');
$email_file = "";
while ( $line = fread($fp, 100000) )
{
$email_file .= $line;
}
if ( !preg_match('/^Charset: .*?$/m', $email_file) )
{
$email_file = preg_replace('/^((Subject: .*?\n)(\n))?/i', "\\2Charset: " . $lang['ENCODING'] . "\n\n", $email_file);
}
echo '<b>' . $dirname . '/' . $file . '/email/' . $email . "</b><br />\n";
echo nl2br($email_file);
echo "\n\n<br /><br />\n\n";
fseek($fp, 0);
fwrite($fp, $email_file);
fclose($fp);
}
}
echo "\n\n<hr />\n\n";
}
}
?>

View file

@ -36,7 +36,7 @@ $dir = opendir($dirname);
while ( $file = readdir($dir) )
{
if ( ereg("^lang_", $file) && !is_file($dirname . "/" . $file) && !is_link($dirname . "/" . $file) )
if ( ereg("^lang_", $file) && !is_file(realpath($dirname . "/" . $file)) && !is_link(realpath($dirname . "/" . $file)) )
{
foreach($vars as $lang_file => $lang_var)
{

View file

@ -1 +1,6 @@
Please see: http://www.phpbb.com/credits.php for a list of all the people involved in phpBB.
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.

749
phpBB/docs/CHANGELOG.html Normal file
View file

@ -0,0 +1,749 @@
<!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="#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="2017"></a><h3 class="h3">l.i. Changes since 2.0.17</h3>
<ul>
<li>[Fix] incorrect handling of password resets if admin activation is enabled (Bug #88)</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] 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.ii. 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.iii. 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.iv. 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.v. 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.vi. 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.vii. 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.viii. 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.ix. 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.x. 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.xi. 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.xii. 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.xiii. 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.xiv. 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.xv. 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.xvi. 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.xvii. 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.xviii. 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.xix. 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.xx. 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.xxi. 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.xxii. 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.xxiii. 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>

206
phpBB/docs/FAQ.html Normal file
View file

@ -0,0 +1,206 @@
<!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. 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>

259
phpBB/docs/INSTALL.html Normal file
View file

@ -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.17 you should select the phpBB-2.0.17_to_2.0.18.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.17 you need the phpBB-2.0.17_to_2.0.18.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>

224
phpBB/docs/README.html Normal file
View file

@ -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>

View file

@ -34,6 +34,9 @@ init_userprefs($userdata);
// End session management
//
// Set vars to prevent naughtiness
$faq = array();
//
// Load the appropriate faq file
//
@ -97,7 +100,7 @@ include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'faq_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx, $forum_id);
make_jumpbox('viewforum.'.$phpEx);
$template->assign_vars(array(
'L_FAQ_TITLE' => $l_title,

View file

@ -29,7 +29,7 @@ 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;
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']);
@ -99,9 +99,9 @@ function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$
$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="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</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;
}
@ -127,7 +127,7 @@ $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_GET_VARS[POST_GROUPS_URL]) ) ? intval($HTTP_GET_VARS[POST_GROUPS_URL]) : intval($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
{
@ -137,6 +137,7 @@ else
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
{
@ -151,14 +152,13 @@ $start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) :
//
// Default var values
//
$header_location = ( @preg_match('/Microsoft|WebSTAR/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
$is_moderator = FALSE;
if ( isset($HTTP_POST_VARS['groupstatus']) && $group_id )
{
if ( !$userdata['session_logged_in'] )
{
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
}
$sql = "SELECT group_moderator
@ -207,7 +207,7 @@ else if ( isset($HTTP_POST_VARS['joingroup']) && $group_id )
//
if ( !$userdata['session_logged_in'] )
{
header($header_location . ppend_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
}
$sql = "SELECT ug.user_id, g.group_type
@ -275,17 +275,17 @@ else if ( isset($HTTP_POST_VARS['joingroup']) && $group_id )
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n";
$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->extra_headers($email_headers);
$emailer->set_subject($lang['Group_request']);
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'GROUP_MODERATOR' => $moderator['username'],
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
'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")
);
@ -308,11 +308,11 @@ else if ( isset($HTTP_POST_VARS['unsub']) || isset($HTTP_POST_VARS['unsubpending
//
if ( $cancel )
{
header($header_location . ppend_sid("groupcp.$phpEx", true));
redirect(append_sid("groupcp.$phpEx", true));
}
elseif ( !$userdata['session_logged_in'] )
{
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
}
if ( $confirm )
@ -337,7 +337,7 @@ else if ( isset($HTTP_POST_VARS['unsub']) || isset($HTTP_POST_VARS['unsubpending
message_die(GENERAL_ERROR, 'Could not obtain moderator status', '', __LINE__, __FILE__, $sql);
}
if ( !($row = $db->sql_fetchrow($result)) )
if ( !($row = $db->sql_fetchrow($result)) || $row['is_auth_mod'] == 0 )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . USER . "
@ -353,7 +353,7 @@ else if ( isset($HTTP_POST_VARS['unsub']) || isset($HTTP_POST_VARS['unsubpending
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">')
);
$message = $lang['Usub_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 = $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);
}
@ -395,7 +395,7 @@ else if ( $group_id )
{
if ( !$userdata['session_logged_in'] )
{
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
}
}
@ -425,7 +425,7 @@ else if ( $group_id )
$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(+)";
AND aa.group_id (+) = g.group_id";
break;
default:
@ -456,7 +456,7 @@ else if ( $group_id )
{
if ( !$userdata['session_logged_in'] )
{
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
}
if ( !$is_moderator )
@ -472,7 +472,7 @@ else if ( $group_id )
if ( isset($HTTP_POST_VARS['add']) )
{
$username = ( isset($HTTP_POST_VARS['username']) ) ? $HTTP_POST_VARS['username'] : "";
$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 . "
@ -553,17 +553,17 @@ else if ( $group_id )
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n";
$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->extra_headers($email_headers);
$emailer->set_subject($lang['Group_added']);
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'GROUP_NAME' => $group_name,
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
'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")
);
@ -591,7 +591,7 @@ else if ( $group_id )
$sql_in = '';
for($i = 0; $i < count($members); $i++)
{
$sql_in .= ( ( $sql_in != '' ) ? ', ' : '' ) . $members[$i];
$sql_in .= ( ( $sql_in != '' ) ? ', ' : '' ) . intval($members[$i]);
}
if ( isset($HTTP_POST_VARS['approve']) )
@ -685,10 +685,10 @@ else if ( $group_id )
message_die(GENERAL_ERROR, 'Could not get user email information', '', __LINE__, __FILE__, $sql);
}
$email_addresses = '';
while( $row = $db->sql_fetchrow($result) )
$bcc_list = array();
while ($row = $db->sql_fetchrow($result))
{
$email_addresses .= ( ( $email_addresses != '' ) ? ', ' : '' ) . $row['user_email'];
$bcc_list[] = $row['user_email'];
}
//
@ -708,17 +708,21 @@ else if ( $group_id )
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\nBcc: " . $email_addresses . "\r\n";
$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->email_address($userdata['user_email']);
$emailer->set_subject();//$lang['Group_approved']
$emailer->extra_headers($email_headers);
$emailer->set_subject($lang['Group_approved']);
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'GROUP_NAME' => $group_name,
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
'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")
);
@ -893,6 +897,8 @@ else if ( $group_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'],
@ -912,7 +918,8 @@ else if ( $group_id )
'L_PENDING_MEMBERS' => $lang['Pending_members'],
'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'],
'L_PM' => $lang['Private_Message'],
'L_EMAIL' => $lang['Email'],
'L_EMAIL' => $lang['Email'],
'L_POSTS' => $lang['Posts'],
'L_WEBSITE' => $lang['Website'],
'L_FROM' => $lang['Location'],
'L_ORDER' => $lang['Order'],
@ -1142,6 +1149,8 @@ else
// 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
@ -1209,6 +1218,7 @@ else
//
// Load and process templates
//
$page_title = $lang['Group_Control_Panel'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(

View file

@ -129,9 +129,9 @@ function auth($type, $forum_id, $userdata, $f_access = '')
if ( !($f_access = $db->$sql_fetchrow($result)) )
{
message_die(GENERAL_ERROR, 'No forum access control lists exist', '', __LINE__, __FILE__, $sql);
$db->sql_freeresult($result);
return array();
}
$db->sql_freeresult($result);
}
@ -158,19 +158,20 @@ function auth($type, $forum_id, $userdata, $f_access = '')
if ( $row = $db->sql_fetchrow($result) )
{
if ( $forum_id != AUTH_LIST_ALL)
do
{
$u_access[] = $row;
}
else
{
do
if ( $forum_id != AUTH_LIST_ALL)
{
$u_access[] = $row;
}
else
{
$u_access[$row['forum_id']][] = $row;
}
while( $row = $db->sql_fetchrow($result) );
}
while( $row = $db->sql_fetchrow($result) );
}
$db->sql_freeresult($result);
}
$is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? TRUE : 0;
@ -199,7 +200,7 @@ function auth($type, $forum_id, $userdata, $f_access = '')
{
case AUTH_ALL:
$auth_user[$key] = TRUE;
$auth_user[$key . '_type'] = $lang['Auth_Anonymous_users'];
$auth_user[$key . '_type'] = $lang['Auth_Anonymous_Users'];
break;
case AUTH_REG:
@ -238,7 +239,7 @@ function auth($type, $forum_id, $userdata, $f_access = '')
{
case AUTH_ALL:
$auth_user[$f_forum_id][$key] = TRUE;
$auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Anonymous_users'];
$auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Anonymous_Users'];
break;
case AUTH_REG:

View file

@ -26,7 +26,7 @@ if ( !defined('IN_PHPBB') )
define("BBCODE_UID_LEN", 10);
// global that holds loaded-and-prepared bbcode templates, so we only have to do
// global that holds loaded-and-prepared bbcode templates, so we only have to do
// that stuff once.
$bbcode_tpl = null;
@ -45,21 +45,21 @@ 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;
}
@ -68,7 +68,7 @@ function load_bbcode_template()
* 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
* 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
@ -77,53 +77,55 @@ function load_bbcode_template()
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\\2', $bbcode_tpl['url']);
$bbcode_tpl['url1'] = str_replace('{DESCRIPTION}', '\\1\\2', $bbcode_tpl['url1']);
$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\\2', $bbcode_tpl['url']);
$bbcode_tpl['url3'] = str_replace('{DESCRIPTION}', '\\3', $bbcode_tpl['url3']);
$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}', '\\2', $bbcode_tpl['url4']);
$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
* 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;
@ -135,13 +137,13 @@ function bbencode_second_pass($text, $uid)
$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);
}
@ -149,6 +151,14 @@ function bbencode_second_pass($text, $uid)
// [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);
@ -165,17 +175,9 @@ function bbencode_second_pass($text, $uid)
$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 = preg_replace("/\[size=([1-2]?[0-9]):$uid\]/si", $bbcode_tpl['size_open'], $text);
$text = str_replace("[/size:$uid]", $bbcode_tpl['size_close'], $text);
// [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);
// [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);
@ -194,28 +196,28 @@ function bbencode_second_pass($text, $uid)
// [img]image_url_here[/img] code..
// This one gets first-passed..
$patterns[0] = "#\[img:$uid\](.*?)\[/img:$uid\]#si";
$replacements[0] = $bbcode_tpl['img'];
// [url]xxxx://www.phpbb.com[/url] code..
$patterns[1] = "#\[url\]([a-z]+?://){1}([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)\[/url\]#si";
$replacements[1] = $bbcode_tpl['url1'];
$patterns[] = "#\[img:$uid\]([^?].*?)\[/img:$uid\]#i";
$replacements[] = $bbcode_tpl['img'];
// matches a [url]xxxx://www.phpbb.com[/url] code..
$patterns[] = "#\[url\]([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url1'];
// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
$patterns[2] = "#\[url\]([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)\[/url\]#si";
$replacements[2] = $bbcode_tpl['url2'];
$patterns[] = "#\[url\]((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url2'];
// [url=xxxx://www.phpbb.com]phpBB[/url] code..
$patterns[3] = "#\[url=([a-z]+?://){1}([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)\](.*?)\[/url\]#si";
$replacements[3] = $bbcode_tpl['url3'];
$patterns[] = "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url3'];
// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
$patterns[4] = "#\[url=([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)\](.*?)\[/url\]#si";
$replacements[4] = $bbcode_tpl['url4'];
$patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url4'];
// [email]user@domain.tld[/email] code..
$patterns[5] = "#\[email\]([a-z0-9\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
$replacements[5] = $bbcode_tpl['email'];
$patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
$replacements[] = $bbcode_tpl['email'];
$text = preg_replace($patterns, $replacements, $text);
@ -250,8 +252,7 @@ function bbencode_first_pass($text, $uid)
// [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=(\\\\".*?\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\1]");
$text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\".*?\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\1]");
// [list] and [list=x] for (un)ordered lists.
$open_tag = array();
@ -270,7 +271,7 @@ function bbencode_first_pass($text, $uid)
$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);
$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);
@ -282,13 +283,10 @@ function bbencode_first_pass($text, $uid)
$text = preg_replace("#\[i\](.*?)\[/i\]#si", "[i:$uid]\\1[/i:$uid]", $text);
// [img]image_url_here[/img] code..
$text = preg_replace("#\[img\](([a-z]+?)://([^ \n\r]+?))\[/img\]#si", "[img:$uid]\\1[/img:$uid]", $text);
$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..
$text = substr($text, 1);
return $text;
return substr($text, 1);;
} // bbencode_first_pass()
@ -349,9 +347,9 @@ function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_
$open_tag[0] = $open_tag_temp;
$open_tag_count = 1;
}
$open_is_regexp = false;
if ($open_regexp_replace)
{
$open_is_regexp = true;
@ -362,12 +360,11 @@ function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_
$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;
@ -383,29 +380,32 @@ function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_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);
$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\=\\\\"/si', $possible_start) && !preg_match('/\[quote=\\\\"[^"]*\\\\"\]/si', $possible_start) )
if( preg_match('#\[quote=\\\"#si', $possible_start, $match) && !preg_match('#\[quote=\\\"(.*?)\\\"\]#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..
//
$possible_start = substr($text, $curr_pos, strpos($text, "\"]", $curr_pos + 1) - $curr_pos + 2);
if ($close_pos = strpos($text, '"]', $curr_pos + 9))
{
if (strpos(substr($text, $curr_pos + 9, $close_pos - ($curr_pos + 9)), '[quote') === false)
{
$possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 2);
}
}
}
//
// Now compare, either using regexp or not.
if ($open_is_regexp)
{
$match_result = array();
// PREG regexp comparison.
if (preg_match($open_tag[$i], $possible_start, $match_result))
{
$found_start = true;
@ -432,8 +432,14 @@ function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_
// 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);
bbcode_array_push($stack, $match);
++$curr_pos;
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
{
@ -448,7 +454,7 @@ function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_
// There exists a starting tag.
$curr_nesting_depth = sizeof($stack);
// We need to do 2 replacements now.
$match = bbcode_array_pop($stack);
$match = array_pop($stack);
$start_index = $match['pos'];
$start_tag = $match['tag'];
$start_length = strlen($start_tag);
@ -477,20 +483,34 @@ function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_
// 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_is_regexp)
if ($open_tag[0] == '[code]')
{
$text = $before_start_tag . $start_tag;
$text = $before_start_tag . '&#91;code&#93;';
$text .= $between_tags . '&#91;/code&#93;';
}
else
{
$text = $before_start_tag . substr($start_tag, 0, $start_length - 1) . ":$uid]";
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 .= $between_tags . substr($close_tag_new, 0, $close_tag_new_length - 1) . ":$uid]";
}
$text .= $after_end_tag;
@ -500,10 +520,10 @@ function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_
// otherwise, we go back to the start.
if (sizeof($stack) > 0)
{
$match = bbcode_array_pop($stack);
$match = array_pop($stack);
$curr_pos = $match['pos'];
bbcode_array_push($stack, $match);
++$curr_pos;
// bbcode_array_push($stack, $match);
// ++$curr_pos;
}
else
{
@ -552,15 +572,18 @@ function bbencode_second_pass_code($text, $uid, $bbcode_tpl)
{
$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;
@ -593,26 +616,25 @@ function bbencode_second_pass_code($text, $uid, $bbcode_tpl)
*/
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;
$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, or comma.
$ret = preg_replace("#([\n ])([a-z]+?)://([^,\t \n\r]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>", $ret);
// 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.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// yyyy contains either alphanum, "-", or "."
// zzzz is optional.. will contain everything up to the first space, newline, or comma.
// This is slightly restrictive - it's not going to match stuff like "forums.foo.com"
// This is to keep it from getting annoying and matching stuff that's not meant to be a link.
$ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^,\t \n\r]*)?)#i", "\\1<a href=\"http://www.\\2.\\3\\4\" target=\"_blank\">www.\\2.\\3\\4</a>", $ret);
// 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);
$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);
@ -678,6 +700,7 @@ function escape_slashes($input)
* 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)
{
@ -689,6 +712,7 @@ function bbcode_array_push(&$stack, $value)
* 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)
{
@ -718,39 +742,38 @@ function bbcode_array_pop(&$stack)
//
function smilies_pass($message)
{
global $db, $board_config;
static $smilies;
static $orig, $repl;
if( empty($smilies) )
if (!isset($orig))
{
$sql = "SELECT code, smile_url
FROM " . SMILIES_TABLE;
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( !$db->sql_numrows($result) )
if (count($smilies))
{
return $message;
usort($smilies, 'smiley_sort');
}
$smilies = $db->sql_fetchrowset($result);
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" />';
}
}
usort($smilies, 'smiley_sort');
for($i = 0; $i < count($smilies); $i++)
{
$orig[] = "/(?<=.\\W|\\W.|^\\W)" . phpbb_preg_quote($smilies[$i]['code'], "/") . "(?=.\\W|\\W.|\\W$)/";
$repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['smile_url'] . '" border="0" />';
}
if( $i > 0 )
if (count($orig))
{
$message = preg_replace($orig, $repl, ' ' . $message . ' ');
$message = substr($message, 1, -1);
}
return $message;
}
@ -764,5 +787,4 @@ function smiley_sort($a, $b)
return ( strlen($a['code']) > strlen($b['code']) ) ? -1 : 1;
}
?>

View file

@ -26,8 +26,8 @@ if ( !defined('IN_PHPBB') )
}
// Debug Level
define('DEBUG', 1); // Debugging on
//define('DEBUG', 0); // Debugging off
//define('DEBUG', 1); // Debugging on
define('DEBUG', 1); // Debugging off
// User Levels <- Do not change the values of USER or ADMIN
@ -148,6 +148,7 @@ 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');
@ -166,6 +167,7 @@ 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');
@ -178,4 +180,4 @@ define('VOTE_DESC_TABLE', $table_prefix.'vote_desc');
define('VOTE_RESULTS_TABLE', $table_prefix.'vote_results');
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');
?>
?>

View file

@ -60,7 +60,7 @@ switch($dbms)
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false);
if(!$db->db_connect_id)
{
message_die(CRITICAL_ERROR, "Could not connect to the database");
message_die(CRITICAL_ERROR, "Could not connect to the database");
}
?>

View file

@ -26,209 +26,255 @@
//
class emailer
{
var $tpl_file;
var $msg, $subject, $extra_headers;
var $addresses, $reply_to, $from;
var $use_smtp;
var $msg;
var $mimeOut;
var $arrPlaceHolders = array(); // an associative array that has the key = placeHolderName and val = placeHolderValue.
var $subject, $extra_headers, $address;
var $tpl_msg = array();
function emailer($use_smtp)
{
$this->reset();
$this->use_smtp = $use_smtp;
$this->tpl_file = NULL;
$this->address = NULL;
$this->msg = "";
$this->mimeOut = "";
$this->reply_to = $this->from = '';
}
//
// Resets all the data (address, template file, etc etc to default
//
function reset()
{
$this->tpl_file = "";
$this->address = "";
$this->msg = "";
$this->memOut = "";
$this->vars = "";
$this->addresses = array();
$this->vars = $this->msg = $this->extra_headers = '';
}
//
// Sets an email address to send to
//
function email_address($address)
{
$success = true;
$this->address = '';
$this->address .= $address;
return $success;
$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 = $subject;
$this->subject = trim(preg_replace('#[\n\r]+#s', '', $subject));
}
//
// set up extra mail headers
//
function extra_headers($headers)
{
$this->extra_headers = $headers;
$this->extra_headers .= trim($headers) . "\n";
}
function use_template($template_file, $template_lang = "")
function use_template($template_file, $template_lang = '')
{
global $board_config, $phpbb_root_path;
if( $template_lang == "" )
if (trim($template_file) == '')
{
message_die(GENERAL_ERROR, 'No template file set', '', __LINE__, __FILE__);
}
if (trim($template_lang) == '')
{
$template_lang = $board_config['default_lang'];
}
$template_file = $phpbb_root_path . "language/lang_" . $template_lang . "/email/" . $template_file . ".tpl";
if( !file_exists($template_file) )
if (empty($this->tpl_msg[$template_lang . $template_file]))
{
message_die(GENERAL_ERROR, "Couldn't find template file: $template_file", "", __LINE__, __FILE__);
}
else
{
$this->tpl_file = $template_file;
if( !$this->load_msg() )
$tpl_file = $phpbb_root_path . 'language/lang_' . $template_lang . '/email/' . $template_file . '.tpl';
if (!@file_exists(@phpbb_realpath($tpl_file)))
{
message_die(GENERAL_ERROR, "Couldn't load template file: $template_file", "", __LINE__, __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);
}
return TRUE;
}
//
// Open the template file and read in the message
//
function load_msg()
{
if ($this->tpl_file == NULL)
{
message_die(GENERAL_ERROR, "No template file set", "", __LINE__, __FILE__);
}
else
{
if(!($fd = fopen($this->tpl_file, 'r')))
{
message_die(GENERAL_ERROR, "fopen failed opening template file", "", __LINE__, __FILE__);
}
else
{
$this->msg .= fread($fd, filesize($this->tpl_file));
fclose($fd);
}
}
return TRUE;
$this->msg = $this->tpl_msg[$template_lang . $template_file];
return true;
}
// assign variables
function assign_vars($vars)
{
if(empty($this->vars))
{
$this->vars = $vars;
}
else
{
$this->vars .= $vars;
}
$this->vars = (empty($this->vars)) ? $vars : $this->vars . $vars;
}
function parse_email()
// Send the mail out to the recipients set previously in var $this->address
function send()
{
@reset($this->vars);
while (list($key, $val) = @each($this->vars))
{
$$key = $val;
}
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();
preg_match("/^(Subject:(.*?)[\r\n]+?)?(.*?)$/is", $this->msg, $match);
$this->msg = ( isset($match[3]) ) ? trim($match[3]) : '';
$this->subject = ( $this->subject != '' ) ? $this->subject : trim($match[2]);
return TRUE;
}
//
// Send the mail out to the recipients set previously in var $this->address
//
function send()
{
global $phpEx, $phpbb_root_dir;
if (isset($phpbb_root_dir))
if (preg_match('#^(Subject:(.*?))$#m', $this->msg, $match))
{
// we must be in the admin section.
$phpbb_root_path = $phpbb_root_dir;
$this->subject = (trim($match[2]) != '') ? trim($match[2]) : (($this->subject != '') ? $this->subject : 'No Subject');
$drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
}
else
{
$phpbb_root_path = "./";
$this->subject = (($this->subject != '') ? $this->subject : 'No Subject');
}
if ($this->address == NULL)
if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match))
{
message_die(GENERAL_ERROR, "No email address set", "", __LINE__, __FILE__);
$this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($lang['ENCODING']);
$drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
}
else
{
if(!$this->parse_email())
$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') )
{
return FALSE;
include($phpbb_root_path . 'includes/smtp.' . $phpEx);
}
if($this->use_smtp)
$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)
{
if(!defined('SMTP_INCLUDED'))
$to = ' ';
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '1'
WHERE config_name = 'sendmail_fix'";
if (!$db->sql_query($sql))
{
include($phpbb_root_path . "includes/smtp.".$phpEx);
message_die(GENERAL_ERROR, 'Unable to update config table', '', __LINE__, __FILE__, $sql);
}
if(!smtpmail($this->address, $this->subject, $this->msg, $this->extra_headers))
{
message_die(GENERAL_ERROR, "Sending via SMTP failed", "", __LINE__, __FILE__);
}
}
else
{
@mail($this->address, $this->subject, $this->msg, $this->extra_headers);
$board_config['sendmail_fix'] = 1;
$result = @mail($to, $this->subject, preg_replace("#(?<!\r)\n#s", "\n", $this->msg), $this->extra_headers);
}
}
return TRUE;
// 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.
// Attach files via MIME.
//
function attachFile($filename, $mimetype="application/octet-stream", $szFromAddress, $szFilenameToDisplay)
function attachFile($filename, $mimetype = "application/octet-stream", $szFromAddress, $szFilenameToDisplay)
{
global $lang;
$mime_boundary = "--==================_846811060==_";
$this->mailMsg = "--".$mime_boundary."\nContent-Type: text/plain;\n\tcharset=\"iso-8859-1\"\n\n".$this->mailMsg;
$this->msg = '--' . $mime_boundary . "\nContent-Type: text/plain;\n\tcharset=\"" . $lang['ENCODING'] . "\"\n\n" . $this->msg;
if ($mime_filename)
{
@ -244,11 +290,11 @@ class emailer
$this->mimeOut .= "Content-Transfer-Encoding: quoted-printable\n";
$this->mimeOut .= "Content-Disposition: attachment;\n\tfilename=\"$szFilenameToDisplay\"\n\n";
if ($mimetype == "message/rfc822")
if ( $mimetype == "message/rfc822" )
{
$this->mimeOut .= "From: ".$szFromAddress."\n";
$this->mimeOut .= "To: ".$this->emailAddress."\n";
$this->mimeOut .= "Date: ".date("D, d M Y G:i:s ").$this->getTimeZoneInEmailFormat()."\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";
@ -311,7 +357,7 @@ class emailer
//
function encode_file($sourcefile)
{
if (is_readable($sourcefile))
if (is_readable(phpbb_realpath($sourcefile)))
{
$fd = fopen($sourcefile, "r");
$contents = fread($fd, filesize($sourcefile));

View file

@ -74,14 +74,91 @@ function get_db_stat($mode)
return false;
}
function get_userdata($user)
// 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;
}
//
// 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;
$sql .= ( ( is_integer($user) ) ? "user_id = $user" : "username = '" . $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);
@ -92,7 +169,9 @@ function get_userdata($user)
function make_jumpbox($action, $match_forum_id = 0)
{
global $template, $lang, $db, $SID, $nav_links, $phpEx;
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
@ -120,7 +199,7 @@ function make_jumpbox($action, $match_forum_id = 0)
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>';
$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) )
@ -137,6 +216,9 @@ function make_jumpbox($action, $match_forum_id = 0)
{
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>';
@ -166,13 +248,14 @@ function make_jumpbox($action, $match_forum_id = 0)
}
else
{
$boxstring .= '<select name="' . POST_FORUM_URL . '" onChange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"></select>';
$boxstring .= '<select name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"></select>';
}
if ( isset($SID) )
{
$boxstring .= '<input type="hidden" name="sid" value="' . $SID . '" />';
}
// 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')
@ -196,6 +279,7 @@ function init_userprefs($userdata)
{
global $board_config, $theme, $images;
global $template, $lang, $phpEx, $phpbb_root_path;
global $nav_links;
if ( $userdata['user_id'] != ANONYMOUS )
{
@ -215,7 +299,7 @@ function init_userprefs($userdata)
}
}
if ( !file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx) )
if ( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx)) )
{
$board_config['default_lang'] = 'english';
}
@ -224,7 +308,7 @@ function init_userprefs($userdata)
if ( defined('IN_ADMIN') )
{
if( !file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.'.$phpEx) )
if( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.'.$phpEx)) )
{
$board_config['default_lang'] = 'english';
}
@ -248,6 +332,29 @@ function init_userprefs($userdata)
$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;
}
@ -271,7 +378,7 @@ function setup_style($style)
$template_path = 'templates/' ;
$template_name = $row['template_name'] ;
$template = new Template($phpbb_root_path . $template_path . $template_name, $board_config, $db);
$template = new Template($phpbb_root_path . $template_path . $template_name);
if ( $template )
{
@ -283,7 +390,7 @@ function setup_style($style)
message_die(CRITICAL_ERROR, "Could not open $template_name template config file", '', __LINE__, __FILE__);
}
$img_lang = ( file_exists($current_template_path . '/images/lang_' . $board_config['default_lang']) ) ? $board_config['default_lang'] : 'english';
$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) )
{
@ -461,7 +568,7 @@ function obtain_word_list(&$orig_word, &$replacement_word)
{
do
{
$orig_word[] = '#\b(' . str_replace('\*', '\w*?', phpbb_preg_quote($row['word'], '#')) . ')\b#i';
$orig_word[] = '#\b(' . str_replace('\*', '\w*?', preg_quote($row['word'], '#')) . ')\b#i';
$replacement_word[] = $row['replacement'];
}
while ( $row = $db->sql_fetchrow($result) );
@ -491,10 +598,18 @@ function obtain_word_list(&$orig_word, &$replacement_word)
//
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;
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;
//
@ -519,7 +634,7 @@ function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '',
if ( $err_line != '' && $err_file != '' )
{
$debug_text .= '</br /><br />Line : ' . $err_line . '<br />File : ' . $err_file;
$debug_text .= '</br /><br />Line : ' . $err_line . '<br />File : ' . basename($err_file);
}
}
@ -594,6 +709,7 @@ function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '',
{
$msg_title = $lang['General_Error'];
}
break;
case CRITICAL_ERROR:
//
@ -670,4 +786,51 @@ function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '',
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;
}
?>

View file

@ -24,15 +24,16 @@
//
// Simple version of jumpbox, just lists authed forums
//
function make_forum_select($box_name, $ignore_forum = false)
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 forum_id, forum_name
FROM " . FORUMS_TABLE . "
ORDER BY cat_id, forum_order";
$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);
@ -43,7 +44,8 @@ function make_forum_select($box_name, $ignore_forum = false)
{
if ( $is_auth_ary[$row['forum_id']]['auth_read'] && $ignore_forum != $row['forum_id'] )
{
$forum_list .= '<option value="' . $row['forum_id'] . '">' . $row['forum_name'] . '</option>';
$selected = ( $select_forum == $row['forum_id'] ) ? ' selected="selected"' : '';
$forum_list .= '<option value="' . $row['forum_id'] . '"' . $selected .'>' . $row['forum_name'] . '</option>';
}
}
@ -55,7 +57,7 @@ function make_forum_select($box_name, $ignore_forum = false)
//
// Synchronise functions for forums/topics
//
function sync($type, $id)
function sync($type, $id = false)
{
global $db;
@ -64,7 +66,7 @@ function sync($type, $id)
case 'all forums':
$sql = "SELECT forum_id
FROM " . FORUMS_TABLE;
if ( !$result = $db->sql_query($sql) )
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get forum IDs', '', __LINE__, __FILE__, $sql);
}
@ -78,7 +80,7 @@ function sync($type, $id)
case 'all topics':
$sql = "SELECT topic_id
FROM " . TOPICS_TABLE;
if ( !$result = $db->sql_query($sql) )
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get topic ID', '', __LINE__, __FILE__, $sql);
}
@ -90,12 +92,10 @@ function sync($type, $id)
break;
case 'forum':
$sql = "SELECT MAX(p.post_id) AS last_post, COUNT(p.post_id) AS total
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
WHERE p.forum_id = $id
AND t.topic_id = p.topic_id
AND t.topic_status <> " . TOPIC_MOVED;
if ( !$result = $db->sql_query($sql) )
$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);
}
@ -113,9 +113,8 @@ function sync($type, $id)
$sql = "SELECT COUNT(topic_id) AS total
FROM " . TOPICS_TABLE . "
WHERE forum_id = $id
AND topic_status <> " . TOPIC_MOVED;
if ( !$result = $db->sql_query($sql) )
WHERE forum_id = $id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get topic count', '', __LINE__, __FILE__, $sql);
}
@ -135,22 +134,54 @@ function sync($type, $id)
$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) )
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get post ID', '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) )
{
$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) )
if ($row['total_posts'])
{
message_die(GENERAL_ERROR, 'Could not update topic', '', __LINE__, __FILE__, $sql);
// 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;
}

View file

@ -20,12 +20,12 @@
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
if (!defined('IN_PHPBB'))
{
die("Hacking attempt");
die('Hacking attempt');
}
$html_entities_match = array('#&#', '#<#', '#>#');
$html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#');
$html_entities_replace = array('&amp;', '&lt;', '&gt;');
$unhtml_specialchars_match = array('#&gt;#', '#&lt;#', '#&quot;#', '#&amp;#');
@ -37,16 +37,14 @@ $unhtml_specialchars_replace = array('>', '<', '"', '&');
//
function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid = 0)
{
global $board_config;
global $html_entities_match, $html_entities_replace;
global $code_entities_match, $code_entities_replace;
global $board_config, $html_entities_match, $html_entities_replace;
//
// Clean up the message
//
$message = trim($message);
if ( $html_on )
if ($html_on)
{
$allowed_html_tags = split(',', $board_config['allow_html_tags']);
@ -55,33 +53,32 @@ function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid
$tmp_message = '';
$message = ' ' . $message . ' ';
while ( $start_html = strpos($message, '<', $start_html) )
while ($start_html = strpos($message, '<', $start_html))
{
$tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1, ( $start_html - $end_html - 1 )));
$tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1, ($start_html - $end_html - 1)));
if ( $end_html = strpos($message, '>', $start_html) )
if ($end_html = strpos($message, '>', $start_html))
{
$length = $end_html - $start_html + 1;
$hold_string = substr($message, $start_html, $length);
if ( ( $unclosed_open = strrpos(' ' . $hold_string, '<') ) != 1 )
if (($unclosed_open = strrpos(' ' . $hold_string, '<')) != 1)
{
$tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($hold_string, 0, $unclosed_open - 1));
$hold_string = substr($hold_string, $unclosed_open - 1);
}
$tagallowed = false;
for($i = 0; $i < sizeof($allowed_html_tags); $i++)
for ($i = 0; $i < sizeof($allowed_html_tags); $i++)
{
$match_tag = trim($allowed_html_tags[$i]);
if ( preg_match('/^<\/?' . $match_tag . '\b/i', $hold_string) )
if (preg_match('#^<\/?' . $match_tag . '[> ]#i', $hold_string))
{
$tagallowed = true;
$tagallowed = (preg_match('#^<\/?' . $match_tag . ' .*?(style[\t ]*?=|on[\w]+[\t ]*?=)#i', $hold_string)) ? false : true;
}
}
$tmp_message .= ( $length && !$tagallowed ) ? preg_replace($html_entities_match, $html_entities_replace, $hold_string) : $hold_string;
$tmp_message .= ($length && !$tagallowed) ? preg_replace($html_entities_match, $html_entities_replace, $hold_string) : $hold_string;
$start_html += $length;
}
@ -94,37 +91,20 @@ function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid
}
}
if ( $end_html != strlen($message) && $tmp_message != '' )
if (!$end_html || ($end_html != strlen($message) && $tmp_message != ''))
{
$tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1));
}
$message = ( $tmp_message != '' ) ? trim($tmp_message) : trim($message);
$message = ($tmp_message != '') ? trim($tmp_message) : trim($message);
}
else
{
$message = preg_replace($html_entities_match, $html_entities_replace, $message);
}
if( $bbcode_on && $bbcode_uid != '' )
if($bbcode_on && $bbcode_uid != '')
{
$tmp_message = $message;
if ( ($match_count = preg_match_all('#^(.*?)\[code\](.*?)\[\/code\](.*?)$#is', $tmp_message, $match)) )
{
$code_entities_match = array('#<#', '#>#', '#"#', '#:#', '#\[#', '#\]#', '#\(#', '#\)#', '#\{#', '#\}#');
$code_entities_replace = array('&lt;', '&gt;', '&quot;', '&#58;', '&#91;', '&#93;', '&#40;', '&#41;', '&#123;', '&#125;');
$message = '';
for($i = 0; $i < $match_count; $i++)
{
$message .= $match[1][$i] . '[code]' . preg_replace($code_entities_match, $code_entities_replace, $match[2][$i]) . '[/code]';
$tmp_message = $match[3][$i];
}
$message .= $tmp_message;
}
$message = bbencode_first_pass($message, $bbcode_uid);
}
@ -146,79 +126,83 @@ function prepare_post(&$mode, &$post_data, &$bbcode_on, &$html_on, &$smilies_on,
global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path;
// Check username
if ( !empty($username) )
if (!empty($username))
{
$username = htmlspecialchars(trim(strip_tags($username)));
$username = phpbb_clean_username($username);
if ( !$userdata['session_logged_in'] || ( $userdata['session_logged_in'] && $username != $userdata['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'] )
if ($result['error'])
{
$error_msg .= ( !empty($error_msg) ) ? '<br />' . $result['error_msg'] : $result['error_msg'];
$error_msg .= (!empty($error_msg)) ? '<br />' . $result['error_msg'] : $result['error_msg'];
}
}
else
{
$username = '';
}
}
// Check subject
if ( !empty($subject) )
if (!empty($subject))
{
$subject = htmlspecialchars(trim($subject));
}
else if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) )
else if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post']))
{
$error_msg .= ( !empty($error_msg) ) ? '<br />' . $lang['Empty_subject'] : $lang['Empty_subject'];
$error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Empty_subject'] : $lang['Empty_subject'];
}
// Check message
if ( !empty($message) )
if (!empty($message))
{
$bbcode_uid = ( $bbcode_on ) ? make_bbcode_uid() : '';
$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 != 'polldelete' )
else if ($mode != 'delete' && $mode != 'poll_delete')
{
$error_msg .= ( !empty($error_msg) ) ? '<br />' . $lang['Empty_message'] : $lang['Empty_message'];
$error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Empty_message'] : $lang['Empty_message'];
}
//
// Handle poll stuff
//
if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) )
if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post']))
{
$poll_length = ( isset($poll_length) ) ? max(0, intval($poll_length)) : 0;
$poll_length = (isset($poll_length)) ? max(0, intval($poll_length)) : 0;
if ( !empty($poll_title) )
if (!empty($poll_title))
{
$poll_title = htmlspecialchars(trim($poll_title));
}
if( !empty($poll_options) )
if(!empty($poll_options))
{
$temp_option_text = array();
while( list($option_id, $option_text) = @each($poll_options) )
while(list($option_id, $option_text) = @each($poll_options))
{
$option_text = trim($option_text);
if ( !empty($option_text) )
if (!empty($option_text))
{
$temp_option_text[$option_id] = htmlspecialchars($option_text);
}
}
$option_text = $temp_option_text;
if ( count($poll_options) < 2 )
if (count($poll_options) < 2)
{
$error_msg .= ( !empty($error_msg) ) ? '<br />' . $lang['To_few_poll_options'] : $lang['To_few_poll_options'];
$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'] )
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'];
$error_msg .= (!empty($error_msg)) ? '<br />' . $lang['To_many_poll_options'] : $lang['To_many_poll_options'];
}
else if ( $poll_title == '' )
else if ($poll_title == '')
{
$error_msg .= ( !empty($error_msg) ) ? '<br />' . $lang['Empty_poll_title'] : $lang['Empty_poll_title'];
$error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Empty_poll_title'] : $lang['Empty_poll_title'];
}
}
}
@ -229,7 +213,7 @@ function prepare_post(&$mode, &$post_data, &$bbcode_on, &$html_on, &$smilies_on,
//
// 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)
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;
@ -238,97 +222,99 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
$current_time = time();
if ( $mode == 'newtopic' || $mode == 'reply' )
if ($mode == 'newtopic' || $mode == 'reply' || $mode == 'editpost')
{
//
// Flood control
//
$where_sql = ( $userdata['user_id'] == ANONYMOUS ) ? "poster_ip = '$user_ip'" : 'poster_id = ' . $userdata['user_id'];
$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 ($result = $db->sql_query($sql))
{
if( $row = $db->sql_fetchrow($result) )
if ($row = $db->sql_fetchrow($result))
{
if ( $row['last_post_time'] > 0 && ( $current_time - $row['last_post_time'] ) < $board_config['flood_interval'] )
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']);
}
}
}
}
else if ( $mode == 'editpost' )
if ($mode == 'editpost')
{
remove_search_post($post_id);
}
if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) )
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, topic_vote = $topic_vote WHERE topic_id = $topic_id";
if ( !($result = $db->sql_query($sql)) )
$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' )
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 enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";
if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
$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' )
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 ( !($result = $db->sql_query($sql)) )
$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($post_id, stripslashes($post_message), stripslashes($post_subject));
add_search_words('single', $post_id, stripslashes($post_message), stripslashes($post_subject));
//
// Add poll
//
if ( ( $mode == 'newtopic' || $mode == 'editpost' ) && !empty($poll_title) && count($poll_options) >= 2 )
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 ( !($result = $db->sql_query($sql)) )
$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'] )
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)) )
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) )
while ($row = $db->sql_fetchrow($result))
{
$old_poll_result[$row['vote_option_id']] = $row['vote_result'];
if( !isset($poll_options[$row['vote_option_id']]) )
if (!isset($poll_options[$row['vote_option_id']]))
{
$delete_option_sql .= ( $delete_option_sql != '' ) ? ', ' . $row['vote_option_id'] : $row['vote_option_id'];
$delete_option_sql .= ($delete_option_sql != '') ? ', ' . $row['vote_option_id'] : $row['vote_option_id'];
}
}
}
@ -340,15 +326,15 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
@reset($poll_options);
$poll_option_id = 1;
while ( list($option_id, $option_text) = each($poll_options) )
while (list($option_id, $option_text) = each($poll_options))
{
if( !empty($option_text) )
if (!empty($option_text))
{
$option_text = str_replace("\'", "''", $option_text);
$poll_result = ( $mode == "editpost" && isset($old_poll_result[$option_id]) ) ? $old_poll_result[$option_id] : 0;
$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 ( !($result = $db->sql_query($sql)) )
$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);
}
@ -356,11 +342,12 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
}
}
if( $delete_option_sql != '' )
if ($delete_option_sql != '')
{
$sql = "DELETE FROM " . VOTE_RESULTS_TABLE . "
WHERE vote_option_id IN ($delete_option_sql)";
if ( !($result = $db->sql_query($sql)) )
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);
}
@ -380,73 +367,77 @@ function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_i
{
global $db;
$sign = ( $mode == 'delete' ) ? "- 1" : "+ 1";
$sign = ($mode == 'delete') ? '- 1' : '+ 1';
$forum_update_sql = "forum_posts = forum_posts $sign";
$topic_update_sql = '';
if ( $mode == 'delete' )
if ($mode == 'delete')
{
if ( $post_data['last_post'] )
if ($post_data['last_post'])
{
if ( $post_data['first_post'] )
if ($post_data['first_post'])
{
$forum_update_sql .= ', forum_topics = forum_topics - 1';
}
else
{
$topic_update_sql = "topic_replies = topic_replies - 1";
$topic_update_sql .= 'topic_replies = topic_replies - 1';
$sql = "SELECT MAX(post_id) AS post_id
$sql = "SELECT MAX(post_id) AS last_post_id
FROM " . POSTS_TABLE . "
WHERE topic_id = $topic_id";
if ( !($db->sql_query($sql)) )
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) )
if ($row = $db->sql_fetchrow($result))
{
$topic_update_sql .= ', topic_last_post_id = ' . $row['post_id'];
$topic_update_sql .= ', topic_last_post_id = ' . $row['last_post_id'];
}
}
if ( $post_data['last_topic'] )
if ($post_data['last_topic'])
{
$sql = "SELECT MAX(post_id) AS post_id
$sql = "SELECT MAX(post_id) AS last_post_id
FROM " . POSTS_TABLE . "
WHERE forum_id = $forum_id";
if ( !($db->sql_query($sql)) )
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) )
if ($row = $db->sql_fetchrow($result))
{
$forum_update_sql .= ( $row['post_id'] ) ? ', forum_last_post_id = ' . $row['post_id'] : ', forum_last_post_id = 0';
$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'] )
else if ($post_data['first_post'])
{
$sql = "SELECT MIN(post_id) AS post_id
$sql = "SELECT MIN(post_id) AS first_post_id
FROM " . POSTS_TABLE . "
WHERE topic_id = $topic_id";
if ( !($db->sql_query($sql)) )
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) )
if ($row = $db->sql_fetchrow($result))
{
$topic_update_sql = 'topic_replies = topic_replies - 1, topic_first_post_id = ' . $row['post_id'];
$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' )
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" );
$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
{
@ -456,28 +447,28 @@ function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_i
$sql = "UPDATE " . FORUMS_TABLE . " SET
$forum_update_sql
WHERE forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
if ( $topic_update_sql != '' )
if ($topic_update_sql != '')
{
$sql = "UPDATE " . TOPICS_TABLE . " SET
$topic_update_sql
WHERE topic_id = $topic_id";
if ( !($result = $db->sql_query($sql)) )
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
}
if ( $mode != 'poll_delete' )
if ($mode != 'poll_delete')
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_posts = user_posts $sign
WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql, END_TRANSACTION)) )
if (!$db->sql_query($sql, END_TRANSACTION))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
@ -494,91 +485,82 @@ function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
global $userdata, $user_ip;
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
$topic_update_sql = '';
if ( $mode != 'poll_delete' )
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)) )
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)) )
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
WHERE post_id = $post_id";
if ( !($db->sql_query($sql)) )
if ($post_data['last_post'])
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
$forum_update_sql = 'forum_posts = forum_posts - 1';
$topic_update_sql .= 'topic_replies = topic_replies - 1';
if ( $post_data['last_post'] )
{
if ( $post_data['first_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)) )
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)) )
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'] )
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 vote_id = $poll_id";
if ( !($db->sql_query($sql)) )
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)) )
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)) )
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
}
}
remove_search_post($post_id);
if ( $mode == 'delete' && $post_data['first_post'] && $post_data['last_post'] )
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) . '">';
$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>');
$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>');
@ -589,86 +571,117 @@ function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
//
// Handle user notification on new post
//
function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_id, &$notify_user)
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 != 'delete')
{
$delete_sql = ( !$post_data['first_post'] && !$post_data['last_post'] ) ? " AND user_id = " . $userdata['user_id'] : "";
$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id" . $delete_sql;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not change topic notify data', '', __LINE__, __FILE__, $sql);
}
}
else
{
if ( $mode == 'reply' )
if ($mode == 'reply')
{
$sql = "SELECT ban_userid
FROM " . BANLIST_TABLE;
if ( !($result = $db->sql_query($sql)) )
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) )
while ($row = $db->sql_fetchrow($result))
{
if ( isset($row['ban_userid']) )
if (isset($row['ban_userid']) && !empty($row['ban_userid']))
{
$user_id_sql = ', ' . $row['ban_userid'];
$user_id_sql .= ', ' . $row['ban_userid'];
}
}
$sql = "SELECT u.user_id, u.username, u.user_email, u.user_lang, t.topic_title
FROM " . TOPICS_WATCH_TABLE . " tw, " . TOPICS_TABLE . " t, " . USERS_TABLE . " u
$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.user_id NOT IN (" . $userdata['user_id'] . ", " . ANONYMOUS . $user_id_sql . ")
AND tw.notify_status = " . TOPIC_WATCH_UN_NOTIFIED . "
AND t.topic_id = tw.topic_id
AND u.user_id = tw.user_id";
if ( !($result = $db->sql_query($sql)) )
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not obtain list of topic watchers', '', __LINE__, __FILE__, $sql);
}
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
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']) . '/' : '/';
$email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n";
$update_watched_sql = '';
if ( $row = $db->sql_fetchrow($result) )
$bcc_list_ary = array();
if ($row = $db->sql_fetchrow($result))
{
$topic_title = preg_replace($orig_word, $replacement_word, unprepare_message($row['topic_title']));
// Sixty second limit
@set_time_limit(60);
do
{
if ( $row['user_email'] != '' )
if ($row['user_email'] != '')
{
$emailer->use_template('topic_notify', $row['user_lang']);
$emailer->email_address($row['user_email']);
$emailer->set_subject();//$lang['Topic_reply_notification']
$emailer->extra_headers($email_headers);
$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' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
'USERNAME' => $row['username'],
'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,
@ -678,14 +691,12 @@ function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_id
$emailer->send();
$emailer->reset();
$update_watched_sql .= ( $update_watched_sql != '' ) ? ', ' . $row['user_id'] : $row['user_id'];
}
}
while ( $row = $db->sql_fetchrow($result) );
}
$db->sql_freeresult($result);
if ( $update_watched_sql != '' )
if ($update_watched_sql != '')
{
$sql = "UPDATE " . TOPICS_WATCH_TABLE . "
SET notify_status = " . TOPIC_WATCH_NOTIFIED . "
@ -699,28 +710,28 @@ function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_id
FROM " . TOPICS_WATCH_TABLE . "
WHERE topic_id = $topic_id
AND user_id = " . $userdata['user_id'];
if ( !($result = $db->sql_query($sql)) )
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']) )
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 ( !$result = $db->sql_query($sql) )
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']) )
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 ( !($result = $db->sql_query($sql)) )
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not insert topic watch information', '', __LINE__, __FILE__, $sql);
}
@ -742,14 +753,14 @@ function generate_smilies($mode, $page_id)
$inline_rows = 5;
$window_columns = 8;
if ( $mode == 'window' )
if ($mode == 'window')
{
$userdata = session_pagestart($user_ip, $page_id);
init_userprefs($userdata);
$gen_simple_header = TRUE;
$page_title = $lang['Review_topic'] . " - $topic_title";
$page_title = $lang['Emoticons'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
@ -760,32 +771,32 @@ function generate_smilies($mode, $page_id)
$sql = "SELECT emoticon, code, smile_url
FROM " . SMILIES_TABLE . "
ORDER BY smilies_id";
if ( $result = $db->sql_query($sql) )
if ($result = $db->sql_query($sql))
{
$num_smilies = 0;
$rowset = array();
while ( $row = $db->sql_fetchrow($result) )
while ($row = $db->sql_fetchrow($result))
{
if ( empty($rowset[$row['smile_url']]) )
if (empty($rowset[$row['smile_url']]))
{
$rowset[$row['smile_url']]['code'] = str_replace('\\', '\\\\', str_replace("'", "\\'", $row['code']));
$rowset[$row['smile_url']]['code'] = str_replace("'", "\\'", str_replace('\\', '\\\\', $row['code']));
$rowset[$row['smile_url']]['emoticon'] = $row['emoticon'];
$num_smilies++;
}
}
if ( $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;
$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) )
while (list($smile_url, $data) = @each($rowset))
{
if ( !$col )
if (!$col)
{
$template->assign_block_vars('smilies_row', array());
}
@ -798,9 +809,9 @@ function generate_smilies($mode, $page_id)
$s_colspan = max($s_colspan, $col + 1);
if ( $col == $smilies_split_row )
if ($col == $smilies_split_row)
{
if ( $mode == 'inline' && $row == $inline_rows - 1 )
if ($mode == 'inline' && $row == $inline_rows - 1)
{
break;
}
@ -813,7 +824,7 @@ function generate_smilies($mode, $page_id)
}
}
if ( $mode == 'inline' && $num_smilies > $inline_rows * $inline_columns )
if ($mode == 'inline' && $num_smilies > $inline_rows * $inline_columns)
{
$template->assign_block_vars('switch_smilies_extra', array());
@ -831,7 +842,7 @@ function generate_smilies($mode, $page_id)
}
}
if ( $mode == 'window' )
if ($mode == 'window')
{
$template->pparse('smiliesbody');
@ -839,4 +850,4 @@ function generate_smilies($mode, $page_id)
}
}
?>
?>

View file

@ -3,7 +3,7 @@
* functions_search.php
* -------------------
* begin : Wed Sep 05 2001
* copyright : (C) 2001 The phpBB Group
* copyright : (C) 2002 The phpBB Group
* email : support@phpbb.com
*
* $Id$
@ -21,9 +21,8 @@
function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
{
// Weird, $init_match doesn't work with static when double quotes (") are used...
static $drop_char_match = array('^', '$', '&', '(', ')', '<', '>', '`', '\'', '"', '|', ',', '@', '_', '?', '%', '-', '~', '+', '.', '[', ']', '{', '}', ':', '\\', '/', '=', '#', '\'', ';', '!');
static $drop_char_replace = array(' ', ' ', ' ', ' ', ' ', ' ', ' ', '', '', ' ', ' ', ' ', ' ', '', ' ', ' ', '', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' , ' ', ' ', ' ', ' ', ' ', ' ');
static $drop_char_replace = array(' ', ' ', ' ', ' ', ' ', ' ', ' ', '', '', ' ', ' ', ' ', ' ', '', ' ', ' ', '', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' , ' ', ' ', ' ', ' ', ' ', ' ');
$entry = ' ' . strip_tags(strtolower($entry)) . ' ';
@ -42,13 +41,10 @@ function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
}
else if ( $mode == 'search' )
{
$entry = str_replace('+', ' and ', $entry);
$entry = str_replace('-', ' not ', $entry);
$entry = str_replace(' +', ' and ', $entry);
$entry = str_replace(' -', ' not ', $entry);
}
// Replace numbers on their own
$entry = preg_replace('/\b[0-9]+\b/', ' ', $entry);
//
// Filter out strange characters like ^, $, &, change "it's" to "its"
//
@ -61,8 +57,8 @@ function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
{
$entry = str_replace('*', ' ', $entry);
// 'words' that consist of <=3 or >=25 characters are removed.
$entry = preg_replace('/\b([a-z0-9]{1,3}|[a-z0-9]{20,})\b/',' ', $entry);
// 'words' that consist of <3 or >20 characters are removed.
$entry = preg_replace('/[ ]([\S]{1,2}|[\S]{21,})[ ]/',' ', $entry);
}
if ( !empty($stopword_list) )
@ -73,7 +69,7 @@ function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
if ( $mode == 'post' || ( $stopword != 'not' && $stopword != 'and' && $stopword != 'or' ) )
{
$entry = preg_replace('#\b' . preg_quote($stopword) . '\b#', ' ', $entry);
$entry = str_replace(' ' . trim($stopword) . ' ', ' ', $entry);
}
}
}
@ -85,7 +81,7 @@ function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
list($replace_synonym, $match_synonym) = split(' ', trim(strtolower($synonym_list[$j])));
if ( $mode == 'post' || ( $match_synonym != 'not' && $match_synonym != 'and' && $match_synonym != 'or' ) )
{
$entry = preg_replace('#\b' . trim($match_synonym) . '\b#', ' ' . trim($replace_synonym) . ' ', $entry);
$entry = str_replace(' ' . trim($match_synonym) . ' ', ' ' . trim($replace_synonym) . ' ', $entry);
}
}
}
@ -93,31 +89,32 @@ function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
return $entry;
}
function split_words(&$entry, $mode = 'post')
function split_words($entry, $mode = 'post')
{
if ( $mode == 'post' )
{
preg_match_all("/\b(\w[\w']*\w+|\w+?)\b/", $entry, $split_entries);
}
else
{
preg_match_all('/(\*?[a-z0-9]+\*?)|\b([a-z0-9]+)\b/', $entry, $split_entries);
}
// 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($post_id, $post_text, $post_title = '')
function add_search_words($mode, $post_id, $post_text, $post_title = '')
{
global $db, $phpbb_root_path, $board_config, $lang;
$stopwords_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_stopwords.txt");
$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) )
@ -198,14 +195,15 @@ function add_search_words($post_id, $post_text, $post_title = '')
{
case 'mysql':
case 'mysql4':
$value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . '(\'' . $word[$i] . '\')';
$value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . '(\'' . $word[$i] . '\', 0)';
break;
case 'mssql':
$value_sql .= ( ( $value_sql != '' ) ? ' UNION ALL ' : '' ) . "SELECT '" . $word[$i] . "'";
case 'mssql-odbc':
$value_sql .= ( ( $value_sql != '' ) ? ' UNION ALL ' : '' ) . "SELECT '" . $word[$i] . "', 0";
break;
default:
$sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text)
VALUES ('" . $word[$i] . "')";
$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);
@ -221,11 +219,12 @@ function add_search_words($post_id, $post_text, $post_title = '')
{
case 'mysql':
case 'mysql4':
$sql = "INSERT IGNORE INTO " . SEARCH_WORD_TABLE . " (word_text)
$sql = "INSERT IGNORE INTO " . SEARCH_WORD_TABLE . " (word_text, word_common)
VALUES $value_sql";
break;
case 'mssql':
$sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text)
case 'mssql-odbc':
$sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text, word_common)
$value_sql";
break;
}
@ -254,9 +253,9 @@ function add_search_words($post_id, $post_text, $post_title = '')
}
}
if ( $mode == 'single' )
if ($mode == 'single')
{
remove_common('single', 0.4, $word);
remove_common('single', 4/10, $word);
}
return;
@ -269,7 +268,8 @@ function remove_common($mode, $fraction, $word_id_list = array())
{
global $db;
$sql = ( $mode == 'global' ) ? "SELECT COUNT(post_id) AS total_posts FROM " . SEARCH_MATCH_TABLE . " GROUP BY post_id" : "SELECT SUM(forum_posts) AS total_posts FROM " . FORUMS_TABLE;
$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);
@ -335,7 +335,7 @@ function remove_common($mode, $fraction, $word_id_list = array())
}
}
return $word_count;
return;
}
function remove_search_post($post_id_sql)
@ -428,16 +428,18 @@ function remove_search_post($post_id_sql)
function username_search($search_match)
{
global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path;
global $starttime;
global $starttime, $gen_simple_header;
$gen_simple_header = TRUE;
$username_list = '';
if ( !empty($search_match) )
{
$username_search = preg_replace('/\*/', '%', trim(strip_tags($search_match)));
$username_search = preg_replace('/\*/', '%', phpbb_clean_username($search_match));
$sql = "SELECT username
FROM " . USERS_TABLE . "
WHERE username LIKE '" . str_replace("\'", "''", $username_search) . "'
WHERE username LIKE '" . str_replace("\'", "''", $username_search) . "' AND user_id <> " . ANONYMOUS . "
ORDER BY username";
if ( !($result = $db->sql_query($sql)) )
{
@ -459,7 +461,6 @@ function username_search($search_match)
$db->sql_freeresult($result);
}
$gen_simple_header = TRUE;
$page_title = $lang['Search'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
@ -468,7 +469,7 @@ function username_search($search_match)
);
$template->assign_vars(array(
'USERNAME' => ( !empty($search_match) ) ? $search_match : '',
'USERNAME' => (!empty($search_match)) ? phpbb_clean_username($search_match) : '',
'L_CLOSE_WINDOW' => $lang['Close_window'],
'L_SEARCH_USERNAME' => $lang['Find_username'],

View file

@ -26,14 +26,14 @@
//
function language_select($default, $select_name = "language", $dirname="language")
{
global $phpEx;
global $phpEx, $phpbb_root_path;
$dir = opendir($dirname);
$dir = opendir($phpbb_root_path . $dirname);
$lang = array();
while ( $file = readdir($dir) )
{
if ( ereg("^lang_", $file) && !is_file($dirname . "/" . $file) && !is_link($dirname . "/" . $file) )
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);

View file

@ -18,7 +18,6 @@
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
//
@ -30,61 +29,79 @@ function validate_username($username)
{
global $db, $lang, $userdata;
$username = str_replace("\'", "''", $username);
// Remove doubled up spaces
$username = preg_replace('#\s+#', ' ', trim($username));
$username = phpbb_clean_username($username);
$sql = "SELECT username
FROM " . USERS_TABLE . "
FROM " . USERS_TABLE . "
WHERE LOWER(username) = '" . strtolower($username) . "'";
if ( $result = $db->sql_query($sql) )
if ($result = $db->sql_query($sql))
{
if ( $row = $db->sql_fetchrow($result) )
while ($row = $db->sql_fetchrow($result))
{
if ( ( $userdata['session_logged_in'] && $row['username'] != $userdata['username'] ) || !$userdata['session_logged_in'] )
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 ($result = $db->sql_query($sql))
{
if ( $row = $db->sql_fetchrow($result) )
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 ($result = $db->sql_query($sql))
{
while( $row = $db->sql_fetchrow($result) )
if ($row = $db->sql_fetchrow($result))
{
if ( preg_match("#\b(" . str_replace("\*", "\w*?", preg_quote($row['disallow_username'])) . ")\b#i", $username) )
do
{
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
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 ($result = $db->sql_query($sql))
{
while( $row = $db->sql_fetchrow($result) )
if ($row = $db->sql_fetchrow($result))
{
if ( preg_match("#\b(" . str_replace("\*", "\w*?", preg_quote($row['word'])) . ")\b#i", $username) )
do
{
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
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 " in username.
if ( strstr($username, '"') )
// 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']);
}
@ -100,36 +117,43 @@ function validate_email($email)
{
global $db, $lang;
if ( $email != '' )
if ($email != '')
{
if ( preg_match('/^[a-z0-9\.\-_]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$/is', $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 ($result = $db->sql_query($sql))
{
while( $row = $db->sql_fetchrow($result) )
if ($row = $db->sql_fetchrow($result))
{
$match_email = str_replace('*', '.*', $row['ban_email']);
if ( preg_match('/^' . $match_email . '$/is', $email) )
do
{
return array('error' => true, 'error_msg' => $lang['Email_banned']);
$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)) )
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) )
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' => '');
}
@ -148,28 +172,28 @@ function validate_optional_fields(&$icq, &$aim, &$msnm, &$yim, &$website, &$loca
for($i = 0; $i < count($check_var_length); $i++)
{
if ( strlen($$check_var_length[$i]) < 2 )
if (strlen($$check_var_length[$i]) < 2)
{
$$check_var_length[$i] = '';
}
}
// ICQ number has to be only numbers.
if ( !preg_match('/^[0-9]+$/', $icq) )
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 ($website != "")
{
if ( !preg_match('#^http:\/\/#i', $website) )
if (!preg_match('#^http[s]?:\/\/#i', $website))
{
$website = 'http://' . $website;
}
if ( !preg_match('#^http\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $website) )
if (!preg_match('#^http[s]?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $website))
{
$website = '';
}
@ -178,4 +202,4 @@ function validate_optional_fields(&$icq, &$aim, &$msnm, &$yim, &$website, &$loca
return;
}
?>
?>

View file

@ -35,7 +35,9 @@ if ( $board_config['gzip_compress'] )
{
$phpver = phpversion();
if ( $phpver >= '4.0.4pl1' )
$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') )
{
@ -70,7 +72,7 @@ $template->set_filenames(array(
//
if ( $userdata['session_logged_in'] )
{
$u_login_logout = 'login.'.$phpEx.'?logout=true';
$u_login_logout = 'login.'.$phpEx.'?logout=true&amp;sid=' . $userdata['session_id'];
$l_login_logout = $lang['Logout'] . ' [ ' . $userdata['username'] . ' ]';
}
else
@ -85,184 +87,188 @@ $s_last_visit = ( $userdata['session_logged_in'] ) ? create_date($board_config['
// Get basic (usernames + totals) online
// situation
//
$user_forum_sql = ( !empty($forum_id) ) ? "AND ( u.user_session_page = $forum_id
OR s.session_page = $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 ) . "
OR u.user_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();
$logged_visible_online = 0;
$logged_hidden_online = 0;
$guests_online = 0;
$online_userlist = '';
$l_online_users = '';
$prev_user_id = 0;
$prev_user_ip = '';
while( $row = $db->sql_fetchrow($result) )
if (defined('SHOW_ONLINE'))
{
// User is logged in and therefor not a guest
if ( $row['session_logged_in'] )
$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)) )
{
// Skip multiple sessions for one user
if ( $row['user_id'] != $prev_user_id )
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'] )
{
$style_color = '';
if ( $row['user_level'] == ADMIN )
// Skip multiple sessions for one user
if ( $row['user_id'] != $prev_user_id )
{
$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'] . '"';
$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;
}
}
if ( $row['user_allow_viewonline'] )
$prev_user_id = $row['user_id'];
}
else
{
// Skip multiple sessions for one user
if ( $row['session_ip'] != $prev_session_ip )
{
$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;
$guests_online++;
}
}
$prev_user_id = $row['user_id'];
$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
{
// Skip multiple sessions for one user
if ( $row['session_ip'] != $prev_session_ip )
{
$guests_online++;
}
$l_t_user_s = $lang['Online_users_total'];
}
$prev_session_ip = $row['session_ip'];
}
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) )
if ( $logged_visible_online == 0 )
{
message_die(GENERAL_ERROR, 'Could not update online user record (nr of users)', '', __LINE__, __FILE__, $sql);
$l_r_user_s = $lang['Reg_users_zero_total'];
}
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '" . $board_config['record_online_date'] . "'
WHERE config_name = 'record_online_date'";
if ( !$db->sql_query($sql) )
else if ( $logged_visible_online == 1 )
{
message_die(GENERAL_ERROR, 'Could not update online user record (date)', '', __LINE__, __FILE__, $sql);
$l_r_user_s = $lang['Reg_user_total'];
}
else
{
$l_r_user_s = $lang['Reg_users_total'];
}
}
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_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 ( $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 ( $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'];
}
if ( $logged_hidden_online == 0 )
{
$l_h_user_s = $lang['Hidden_users_zero_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);
}
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'] )
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']);
$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'] . "
SET user_last_privmsg = " . $userdata['user_lastvisit'] . "
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
@ -275,7 +281,7 @@ if ( $userdata['session_logged_in'] )
else
{
$s_privmsg_new = 0;
$icon_pm = $images['pm_no_new_msg'];
$icon_pm = $images['pm_new_msg'];
}
}
else
@ -288,8 +294,8 @@ if ( $userdata['session_logged_in'] )
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']);
$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
{
@ -307,86 +313,93 @@ else
//
// 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, $nav_array['url'], $nav_array['title']);
$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'],
'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'])),
'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,
'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,
'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>'),
'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_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_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_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_MEMBERSLIST' => append_sid('memberlist.'.$phpEx),
'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'], $lang[$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'],
'S_TIMEZONE' => sprintf($lang['All_times'], $l_timezone),
'S_LOGIN_ACTION' => append_sid('login.'.$phpEx),
'T_HEAD_STYLESHEET' => $theme['head_stylesheet'],
@ -427,7 +440,7 @@ $template->assign_vars(array(
'T_SPAN_CLASS1' => $theme['span_class1'],
'T_SPAN_CLASS2' => $theme['span_class2'],
'T_SPAN_CLASS3' => $theme['span_class3'],
'NAV_LINKS' => $nav_links_html)
);
@ -437,6 +450,14 @@ $template->assign_vars(array(
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
{
@ -448,9 +469,21 @@ else
}
}
header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
header ('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
// 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');

View file

@ -22,70 +22,36 @@
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
die('Hacking attempt');
}
global $do_gzip_compress;
//
// Show the overall footer.
//
if($userdata['user_level'] == ADMIN)
{
$admin_link = "<a href=\"" . append_sid("admin/index.$phpEx") . "\">" . $lang['Admin_panel'] . "</a><br /><br />";
}
else
{
$admin_link = "";
}
$current_time = time();
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
if( empty($gen_simple_header) )
{
$template->set_filenames(array(
"overall_footer" => "overall_footer.tpl")
);
}
else
{
$template->set_filenames(array(
"overall_footer" => "simple_footer.tpl")
);
}
$template->assign_vars(array(
"PHPBB_VERSION" => "2.0 " . $board_config['version'],
"TRANSLATION_INFO" => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : "",
"ADMIN_LINK" => $admin_link)
$template->set_filenames(array(
'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
);
$template->pparse("overall_footer");
$template->assign_vars(array(
'TRANSLATION_INFO' => (isset($lang['TRANSLATION_INFO'])) ? $lang['TRANSLATION_INFO'] : ((isset($lang['TRANSLATION'])) ? $lang['TRANSLATION'] : ''),
'ADMIN_LINK' => $admin_link)
);
//
// Output page creation time
//
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
$gzip_text = ($board_config['gzip_compress']) ? "GZIP compression enabled" : "GZIP compression disabled";
$debug_mode = (DEBUG) ? " : Debug Mode" : "";
printf("<br /><center><font size=\"-2\">phpBB Created this page in %f seconds : " . $db->num_queries . " queries executed : $gzip_text".$debug_mode."</font></center>", $totaltime);
$template->pparse('overall_footer');
//
// Close our DB connection.
//
$db->sql_close();
//for($i=0;$i<count($db->query_array);$i++)
// echo $db->query_array[$i] . "<BR>";
//
// Compress buffered output if required
// and send to browser
// Compress buffered output if required and send to browser
//
if($do_gzip_compress)
if ( $do_gzip_compress )
{
//
// Borrowed from php.net!
@ -101,10 +67,10 @@ if($do_gzip_compress)
echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents;
echo pack("V", $gzip_crc);
echo pack("V", $gzip_size);
echo pack('V', $gzip_crc);
echo pack('V', $gzip_size);
}
exit;
?>
?>

View file

@ -27,18 +27,18 @@ if ( !defined('IN_PHPBB') )
require($phpbb_root_path . 'includes/functions_search.'.$phpEx);
function prune($forum_id, $prune_date)
function prune($forum_id, $prune_date, $prune_all = false)
{
global $db, $lang;
$prune_all = ($prune_all) ? '' : 'AND t.topic_vote = 0 AND t.topic_type <> ' . POST_ANNOUNCE;
//
// Those without polls ...
// 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
AND t.topic_vote = 0
AND t.topic_type <> " . POST_ANNOUNCE . "
$prune_all
AND ( p.post_id = t.topic_last_post_id
OR t.topic_last_post_id = 0 )";
if ( $prune_date != '' )
@ -56,6 +56,7 @@ function prune($forum_id, $prune_date)
{
$sql_topics .= ( ( $sql_topics != '' ) ? ', ' : '' ) . $row['topic_id'];
}
$db->sql_freeresult($result);
if( $sql_topics != '' )
{
@ -73,12 +74,20 @@ function prune($forum_id, $prune_date)
{
$sql_post .= ( ( $sql_post != '' ) ? ', ' : '' ) . $row['post_id'];
}
$db->sql_freeresult($result);
if ( $sql_post != '' )
{
$sql = "DELETE FROM " . TOPICS_TABLE . "
$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);
}
@ -101,13 +110,6 @@ function prune($forum_id, $prune_date)
message_die(GENERAL_ERROR, 'Could not delete post during prune', '', __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
WHERE post_id IN ($sql_post)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete search matches', '', __LINE__, __FILE__, $sql);
}
remove_search_post($sql_post);
return array ('topics' => $pruned_topics, 'posts' => $pruned_posts);

View file

@ -20,13 +20,11 @@
*
***************************************************************************/
//
// session_begin()
//
// 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)
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;
@ -39,79 +37,110 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
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'])) : '';
$sessiondata = isset($HTTP_COOKIE_VARS[$cookiename . '_data']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : array();
$sessionmethod = SESSION_METHOD_COOKIE;
}
else
{
$sessiondata = '';
$sessiondata = array();
$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
$sessionmethod = SESSION_METHOD_GET;
}
$last_visit = 0;
$current_time = time();
$expiry_time = $current_time - $board_config['session_length'];
//
// Try and pull the last time stored
// in a cookie, if it exists
//
$sql = "SELECT *
FROM " . USERS_TABLE . "
WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql)) )
if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))
{
message_die(CRITICAL_ERROR, 'Could not obtain lastvisit data from user table', '', __LINE__, __FILE__, $sql);
$session_id = '';
}
$userdata = $db->sql_fetchrow($result);
$page_id = (int) $page_id;
if ( $user_id != ANONYMOUS )
$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'])
{
$auto_login_key = $userdata['user_password'];
$enable_autologin = $sessiondata['autologinid'] = false;
}
if ( $auto_create )
//
// 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)
{
if ( isset($sessiondata['autologinid']) && $userdata['user_active'] )
$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)))
{
// We have to login automagically
if( $sessiondata['autologinid'] == $auto_login_key )
{
// autologinid matches password
$login = 1;
$enable_autologin = 1;
message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);
}
$last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;
}
else
{
// No match; don't login, set as anonymous user
$login = 0;
$enable_autologin = 0;
$user_id = ANONYMOUS;
}
}
else
{
// Autologin is not set. Don't login, set as anonymous user
$login = 0;
$enable_autologin = 0;
$user_id = ANONYMOUS;
}
$userdata = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$enable_autologin = $login = 1;
}
else
else if (!$auto_create)
{
$last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;
$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;
}
}
else
//
// 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)
{
$login = 0;
$enable_autologin = 0;
$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
//
@ -123,8 +152,8 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
OR ban_userid = $user_id";
if ( $user_id != ANONYMOUS )
{
$sql .= " OR ban_email LIKE '" . str_replace("\'", "''", $row['user_email']) . "'
OR ban_email LIKE '" . substr(str_replace("\'", "''", $row['user_email']), strpos(str_replace("\'", "''", $row['user_email']), "@")) . "'";
$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)) )
{
@ -143,35 +172,76 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
// 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
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 ( !($result = $db->sql_query($sql)) || !$db->sql_affectedrows() )
if ( !$db->sql_query($sql) || !$db->sql_affectedrows() )
{
$session_id = md5(uniqid($user_ip));
list($sec, $usec) = explode(' ', microtime());
mt_srand((float) $sec + ((float) $usec * 100000));
$session_id = md5(uniqid(mt_rand(), true));
$sql = "INSERT INTO " . SESSIONS_TABLE . "
(session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in)
VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login)";
if ( !($result = $db->sql_query($sql)) )
(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 : session_begin', '', __LINE__, __FILE__, $sql);
message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);
}
}
if ( $user_id != ANONYMOUS )
{
$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) )
$last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;
if (!$admin)
{
message_die(CRITICAL_ERROR, 'Error updating last visit time : session_begin', '', __LINE__, __FILE__, $sql);
$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;
$sessiondata['autologinid'] = ( $enable_autologin && $sessionmethod == SESSION_METHOD_COOKIE ) ? $auto_login_key : '';
//
// Regenerate the auto-login key
//
if ($enable_autologin)
{
list($sec, $usec) = explode(' ', microtime());
mt_srand(hexdec(substr($session_id, 0, 8)) + (float) $sec + ((float) $usec * 1000000));
$auto_login_key = uniqid(mt_rand(), true);
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;
}
@ -182,20 +252,20 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
$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);
// header('Set-cookie: ' . $cookiename . '_data=' . urlencode(serialize($sessiondata)) . '; expires=' . gmdate("l, d-M-Y H:i:s", $current_time + 31536000) . ' GMT; domain=' . $cookiedomain . '; path=' . $cookiepath . $cookiesecure);
// header('Set-cookie: ' . $cookiename . '_sid=' . $session_id . '; domain=' . $cookiedomain . '; path=' . $cookiepath . $cookiesecure);
$SID = ( $sessionmethod == SESSION_METHOD_GET ) ? 'sid=' . $session_id : '';
$SID = 'sid=' . $session_id;
return $userdata;
}
//
// Checks for a given user session, tidies session
// table and updates user sessions at each page refresh
// Checks for a given user session, tidies session table and updates user
// sessions at each page refresh
//
function session_pagestart($user_ip, $thispage_id)
{
@ -206,24 +276,31 @@ function session_pagestart($user_ip, $thispage_id)
$cookiepath = $board_config['cookie_path'];
$cookiedomain = $board_config['cookie_domain'];
$cookiesecure = $board_config['cookie_secure'];
$cookiesecure = ( $board_config['cookie_secure'] ) ? '; 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'])) : '';
$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
{
$session_data = '';
$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?
//
@ -236,11 +313,10 @@ function session_pagestart($user_ip, $thispage_id)
$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
AND s.session_ip = '$user_ip'";
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 : session_pagestart', '', __LINE__, __FILE__, $sql);
message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);
}
$userdata = $db->sql_fetchrow($result);
@ -250,40 +326,53 @@ function session_pagestart($user_ip, $thispage_id)
//
if ( isset($userdata['user_id']) )
{
$SID = ( $sessionmethod == SESSION_METHOD_GET ) ? 'sid=' . $session_id : '';
//
// Only update session DB a minute or so after last update
// 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.
//
$last_update = ( $userdata['user_id'] == ANONYMOUS ) ? $userdata['session_time'] : $userdata['user_session_time'];
$ip_check_s = substr($userdata['session_ip'], 0, 6);
$ip_check_u = substr($user_ip, 0, 6);
if ( $current_time - $last_update > 60 )
{ // || $userdata['user_session_page'] != $thispage_id
$sql = ( $userdata['user_id'] == ANONYMOUS ) ? "UPDATE " . SESSIONS_TABLE . " SET session_time = $current_time, session_page = $thispage_id WHERE session_id = '" . $userdata['session_id'] . "' AND session_ip = '$user_ip'" : "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 : session_pagestart', '', __LINE__, __FILE__, $sql);
}
if ($ip_check_s == $ip_check_u)
{
$SID = ($sessionmethod == SESSION_METHOD_GET || defined('IN_ADMIN')) ? 'sid=' . $session_id : '';
//
// Delete expired sessions
// Only update session DB a minute or so after last update
//
$expiry_time = $current_time - $board_config['session_length'];
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_time < $expiry_time
AND session_id <> '$session_id'";
if ( !($result = $db->sql_query($sql)) )
if ( $current_time - $userdata['session_time'] > 60 )
{
message_die(CRITICAL_ERROR, 'Error clearing sessions table : session_pagestart', '', __LINE__, __FILE__, $sql);
// 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);
}
setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
// header('Set-cookie: ' . $cookiename . '_data=' . urlencode(serialize($sessiondata)) . '; expires=' . gmdate("l, d-M-Y H:i:s", $current_time + 31536000) . ' GMT; domain=' . $cookiedomain . '; path=' . $cookiepath . $cookiesecure);
// header('Set-cookie: ' . $cookiename . '_sid=' . $session_id . '; domain=' . $cookiedomain . '; path=' . $cookiepath . $cookiesecure);
return $userdata;
}
return $userdata;
}
}
@ -291,67 +380,120 @@ function session_pagestart($user_ip, $thispage_id)
// 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']) ) ? $sessiondata['userid'] : ANONYMOUS;
$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 : session_pagestart', '', __LINE__, __FILE__, $sql);
message_die(CRITICAL_ERROR, 'Error creating user session', '', __LINE__, __FILE__, $sql);
}
return $userdata;
}
//
// session_end closes out a session
// deleting the corresponding entry
// in the sessions table
//
/**
* 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;
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'];
// $cookiesecure = ( $board_config['cookie_secure'] ) ? '; secure' : '';
//
// Pull cookiedata or grab the URI propagated sid
//
if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) )
{
$session_id = isset( $HTTP_COOKIE_VARS[$cookiename . '_sid'] ) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : '';
$sessionmethod = SESSION_METHOD_COOKIE;
}
else
{
$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
$sessionmethod = SESSION_METHOD_GET;
}
$current_time = time();
if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))
{
return;
}
//
// Delete existing session
//
$sql = "DELETE FROM " . SESSIONS_TABLE . "
$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 removing user session : session_end', '', __LINE__, __FILE__, $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);
// header('Set-cookie: ' . $cookiename . '_data=0; expires=' . gmdate("l, d-M-Y H:i:s", 0) . ' GMT; domain=' . $cookiedomain . '; path=' . $cookiepath. $cookiesecure);
// header('Set-cookie: ' . $cookiename . '_sid=0; expires=' . gmdate("l, d-M-Y H:i:s", 0) . ' GMT; domain=' . $cookiedomain . '; path=' . $cookiepath . $cookiesecure);
$SID = ( $sessionmethod == SESSION_METHOD_GET ) ? 'sid=' . $session_id : '';
return true;
}
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;
}
//
@ -364,12 +506,12 @@ function append_sid($url, $non_html_amp = false)
{
global $SID;
if ( !empty($SID) && !eregi('sid=', $url) )
if ( !empty($SID) && !preg_match('#sid=#', $url) )
{
$url .= ( ( strpos($url, '?') != false ) ? ( ( $non_html_amp ) ? '&' : '&amp;' ) : '?' ) . $SID;
$url .= ( ( strpos($url, '?') !== false ) ? ( ( $non_html_amp ) ? '&' : '&amp;' ) : '?' ) . $SID;
}
return($url);
return $url;
}
?>
?>

View file

@ -20,54 +20,44 @@
***************************************************************************/
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)
{
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__);
}
}
/****************************************************************************
* Function: smtpmail
* Description: This is a functional replacement for php's builtin mail
* function, that uses smtp.
* Usage: The usage for this function is identical to that of php's
* built in mail function.
****************************************************************************/
function smtpmail($mail_to, $subject, $message, $headers = "")
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 = '')
{
// For now I'm using an array based $smtp_vars to hold the smtp server
// info, but it should probably change to $board_config...
// then the relevant info would be $board_config['smtp_host'] and
// $board_config['smtp_port'].
global $board_config;
//
// Fix any bare linefeeds in the message to make it RFC821 Compliant.
//
$message = preg_replace("/(?<!\r)\n/si", "\r\n", $message);
$message = preg_replace("#(?<!\r)\n#si", "\r\n", $message);
if ($headers != "")
if ($headers != '')
{
if(is_array($headers))
if (is_array($headers))
{
if(sizeof($headers) > 1)
if (sizeof($headers) > 1)
{
$headers = join("\r\n", $headers);
$headers = join("\n", $headers);
}
else
{
@ -76,140 +66,129 @@ function smtpmail($mail_to, $subject, $message, $headers = "")
}
$headers = chop($headers);
//
// Make sure there are no bare linefeeds in the headers
//
$headers = preg_replace("/(?<!\r)\n/si", "\r\n", $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) )
$headers = '';
while(list(, $header) = each($header_array))
{
if( preg_match("/^cc:/si", $header) )
if (preg_match('#^cc:#si', $header))
{
$cc = preg_replace("/^cc:(.*)/si", "\\1", $header);
$cc = preg_replace('#^cc:(.*)#si', '\1', $header);
}
else if( preg_match("/^bcc:/si", $header ))
else if (preg_match('#^bcc:#si', $header))
{
$bcc = preg_replace("/^bcc:(.*)/si", "\\1", $header);
$header = "";
$bcc = preg_replace('#^bcc:(.*)#si', '\1', $header);
$header = '';
}
$headers .= $header . "\r\n";
$headers .= ($header != '') ? $header . "\r\n" : '';
}
$headers = chop($headers);
$cc = explode(",", $cc);
$bcc = explode(",", $bcc);
$cc = explode(', ', $cc);
$bcc = explode(', ', $bcc);
}
if(trim($mail_to) == "")
{
message_die(GENERAL_ERROR, "No email address specified", "", __LINE__, __FILE__);
}
if(trim($subject) == "")
if (trim($subject) == '')
{
message_die(GENERAL_ERROR, "No email Subject specified", "", __LINE__, __FILE__);
}
if(trim($message) == "")
if (trim($message) == '')
{
message_die(GENERAL_ERROR, "Email message was blank", "", __LINE__, __FILE__);
}
$mail_to_array = explode(",", $mail_to);
//
// 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) )
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__);
}
server_parse($socket, "220");
// 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']) )
{
// Send the RFC2554 specified EHLO.
// This improved as provided by SirSir to accomodate
// both SMTP AND ESMTP capable servers
fputs($socket, "EHLO " . $board_config['smtp_host'] . "\r\n");
server_parse($socket, "250");
fputs($socket, "EHLO " . $board_config['smtp_host'] . "\r\n");
server_parse($socket, "250", __LINE__);
fputs($socket, "AUTH LOGIN\r\n");
server_parse($socket, "334");
fputs($socket, base64_encode($board_config['smtp_username']) . "\r\n");
server_parse($socket, "334");
fputs($socket, base64_encode($board_config['smtp_password']) . "\r\n");
server_parse($socket, "235");
}
else
{
// Send the RFC821 specified HELO.
fputs($socket, "HELO " . $board_config['smtp_host'] . "\r\n");
server_parse($socket, "250");
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");
server_parse($socket, "250", __LINE__);
// Specify each user to send to and build to header.
$to_header = "To: ";
@reset( $mail_to_array );
while( list( , $mail_to_address ) = each( $mail_to_array ))
$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))
{
//
// Add an additional bit of error checking to the To field.
//
$mail_to_address = trim($mail_to_address);
if ( preg_match('/[^ ]+\@[^ ]+/', $mail_to_address) )
{
fputs( $socket, "RCPT TO: <$mail_to_address>\r\n" );
server_parse( $socket, "250" );
}
$to_header .= "<$mail_to_address>, ";
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 ))
@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) )
$bcc_address = trim($bcc_address);
if (preg_match('#[^ ]+\@[^ ]+#', $bcc_address))
{
fputs( $socket, "RCPT TO: <$bcc_address>\r\n" );
server_parse( $socket, "250" );
fputs($socket, "RCPT TO: <$bcc_address>\r\n");
server_parse($socket, "250", __LINE__);
}
}
@reset( $cc );
while( list( , $cc_address ) = each( $cc ))
@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) )
$cc_address = trim($cc_address);
if (preg_match('#[^ ]+\@[^ ]+#', $cc_address))
{
fputs($socket, "RCPT TO: <$cc_address>\r\n");
server_parse($socket, "250");
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");
server_parse($socket, "354", __LINE__);
// Send the Subject Line...
fputs($socket, "Subject: $subject\r\n");
// Now the To Header.
fputs($socket, "$to_header\r\n");
fputs($socket, "To: $mail_to\r\n");
// Now any custom headers....
fputs($socket, "$headers\r\n\r\n");
@ -219,7 +198,7 @@ function smtpmail($mail_to, $subject, $message, $headers = "")
// Ok the all the ingredients are mixed in let's cook this puppy...
fputs($socket, ".\r\n");
server_parse($socket, "250");
server_parse($socket, "250", __LINE__);
// Now tell the server we are done and close the socket...
fputs($socket, "QUIT\r\n");
@ -228,4 +207,4 @@ function smtpmail($mail_to, $subject, $message, $headers = "")
return TRUE;
}
?>
?>

View file

@ -230,7 +230,7 @@ class Template {
// Check if it's an absolute or relative path.
if (substr($filename, 0, 1) != '/')
{
$filename = $this->root . '/' . $filename;
$filename = ($rp_filename = phpbb_realpath($this->root . '/' . $filename)) ? $rp_filename : $filename;
}
if (!file_exists($filename))
@ -331,7 +331,7 @@ class Template {
if ($block_nesting_level < 2)
{
// Block is not nested.
$code_lines[$i] = '$_' . $a[1] . '_count = ( isset($this->_tpldata[\'' . $n[1] . '.\']) ) ? sizeof($this->_tpldata[\'' . $n[1] . '.\']) : 0;';
$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" . '{';
}
@ -347,7 +347,7 @@ class Template {
// 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] = '$_' . $a[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;';
$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" . '{';
}
@ -475,4 +475,4 @@ class Template {
}
?>
?>

View file

@ -30,9 +30,9 @@ function topic_review($topic_id, $is_inline_review)
if ( !$is_inline_review )
{
if ( !isset($topic_id) )
if ( !isset($topic_id) || !$topic_id)
{
message_die(GENERAL_MESSAGE, 'Topic_not_exist');
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}
//
@ -51,6 +51,7 @@ function topic_review($topic_id, $is_inline_review)
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}
$db->sql_freeresult($result);
$forum_id = $forum_row['forum_id'];
$topic_title = $forum_row['topic_title'];
@ -139,6 +140,11 @@ function topic_review($topic_id, $is_inline_review)
$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'] : '';
@ -202,6 +208,7 @@ function topic_review($topic_id, $is_inline_review)
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist', '', __LINE__, __FILE__, $sql);
}
$db->sql_freeresult($result);
$template->assign_vars(array(
'L_AUTHOR' => $lang['Author'],

View file

@ -27,70 +27,93 @@ if ( !defined('IN_PHPBB') )
exit;
}
$sql = "SELECT user_id, user_email, user_newpasswd, user_lang
$sql = "SELECT user_active, user_id, username, user_email, user_newpasswd, user_lang, user_actkey
FROM " . USERS_TABLE . "
WHERE user_actkey = '" . str_replace("\'", "''", $HTTP_GET_VARS['act_key']) . "'";
if ( $result = $db->sql_query($sql) )
{
if ( $row = $db->sql_fetchrow($result) )
{
$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) )
{
if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN && $sql_update_pass == '' )
{
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
$email_headers = 'From: ' . $board_config['board_email'] . "\r\nReturn-Path: " . $board_config['board_email'] . "\r\n";
$emailer->use_template('admin_welcome_activated', $row['user_lang']);
$emailer->email_address($row['user_email']);
$emailer->set_subject();//$lang['Account_activated_subject']
$emailer->extra_headers($email_headers);
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'USERNAME' => $username,
'PASSWORD' => $password_confirm,
'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_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql_update);
}
}
else
{
message_die(GENERAL_ERROR, $lang['Wrong_activation']); //wrongactiv
}
}
else
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']);
}
?>

View file

@ -51,9 +51,10 @@ 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('./' . $board_config['avatar_path'] . '/' . $avatar_file) )
if ( @file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $avatar_file)) )
{
@unlink('./' . $board_config['avatar_path'] . '/' . $avatar_file);
}
@ -62,19 +63,44 @@ function user_avatar_delete($avatar_type, $avatar_file)
return ", user_avatar = '', user_avatar_type = " . USER_AVATAR_NONE;
}
function user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename)
function user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename, $avatar_category)
{
return ( $mode == 'editprofile' ) ? ", user_avatar = '" . str_replace("\'", "''", $avatar_filename) . "', user_avatar_type = " . USER_AVATAR_GALLERY : '';
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)
{
if ( !preg_match('#^http:\/\/#i', $avatar_filename) )
global $lang;
if ( !preg_match('#^(http)|(ftp):\/\/#i', $avatar_filename) )
{
$avatar_filename = 'http://' . $avatar_filename;
}
if ( !preg_match('#^(http:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+(:[0-9]+)*\/.*?\.(gif|jpg|jpeg|png)$)#is', $avatar_filename) )
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'];
@ -87,10 +113,13 @@ function user_avatar_url($mode, &$error, &$error_msg, $avatar_filename)
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, $user_ip, $db, $lang;
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]*)\/(.*)$/', $avatar_filename, $url_ary) )
{
if ( empty($url_ary[4]) )
@ -121,7 +150,7 @@ function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_typ
}
@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) )
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'];
@ -136,7 +165,7 @@ function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_typ
$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($user_ip) . '-');
$tmp_filename = tempnam($tmp_path, uniqid(rand()) . '-');
$fptr = @fopen($tmp_filename, 'wb');
$bytes_written = @fwrite($fptr, $avatar_data, $avatar_filesize);
@ -148,7 +177,7 @@ function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_typ
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) = @getimagesize($tmp_filename);
list($width, $height, $type) = @getimagesize($tmp_filename);
}
else
{
@ -158,11 +187,11 @@ function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_typ
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $l_avatar_size : $l_avatar_size;
}
}
else if ( $avatar_mode == 'local' && file_exists($avatar_filename) && preg_match('/\.(jpg|jpeg|gif|png)$/i', $avatar_realname) )
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);
preg_match('#image\/[x\-]*([a-z]+)#', $avatar_filetype, $avatar_filetype);
$avatar_filetype = $avatar_filetype[1];
}
else
@ -174,7 +203,7 @@ function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_typ
return;
}
list($width, $height) = @getimagesize($avatar_filename);
list($width, $height, $type) = @getimagesize($avatar_filename);
}
if ( !($imgtype = check_image_type($avatar_filetype, $error, $error_msg)) )
@ -182,16 +211,51 @@ function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_typ
return;
}
if ( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
switch ($type)
{
$new_filename = ( $current_avatar != '' && $mode != 'register' ) ? $current_avatar : uniqid($user_ip) . $imgtype;
// 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 != '' )
{
if ( file_exists('./' . $board_config['avatar_path'] . '/' . $current_avatar) )
{
@unlink('./' . $board_config['avatar_path'] . '/' . $current_avatar);
}
user_avatar_delete($current_type, $current_avatar);
}
if( $avatar_mode == 'remote' )
@ -215,6 +279,10 @@ function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_typ
$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");
}
@ -233,7 +301,7 @@ function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_typ
return $avatar_sql;
}
function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, &$icq, &$aim, &$msn, &$yim, &$website, &$location, &$occupation, &$interests, &$signature, &$viewemail, &$notifypm, &$popuppm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$allowviewonline, &$style, &$language, &$timezone, &$dateformat)
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;
@ -253,7 +321,7 @@ function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current
{
if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $sub_file) )
{
$avatar_images[$file][$avatar_row_count][$avatar_col_count] = $file . '/' . $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++;
@ -299,7 +367,7 @@ function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current
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'] . '/' . $avatar_images[$category][$i][$j],
"AVATAR_IMAGE" => $board_config['avatar_gallery_path'] . '/' . $category . '/' . $avatar_images[$category][$i][$j],
"AVATAR_NAME" => $avatar_name[$category][$i][$j])
);
@ -309,9 +377,9 @@ function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current
}
}
$params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popuppm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'allowviewonline', 'style', 'language', 'timezone', 'dateformat');
$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="agreed" value="true" />';
$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++)
{
@ -333,4 +401,4 @@ function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current
return;
}
?>
?>

View file

@ -0,0 +1,435 @@
<?php
/***************************************************************************
* usercp_confirm.php
* -------------------
* begin : Saturday, Jan 15, 2003
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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;
}
// If we can we will generate a single filtered png else we will have to simply
// output six seperate original pngs ... first way is preferable!
if (@extension_loaded('zlib'))
{
$_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(gzcompress($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;
}
else
{
if (!empty($HTTP_GET_VARS['c']))
{
$_png = define_raw_pngs();
$char = substr($code, intval($HTTP_GET_VARS['c']) - 1, 1);
header('Content-Type: image/png');
header('Cache-control: no-cache, no-store');
echo base64_decode($_png[$char]);
unset($_png);
exit;
}
}
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($gzimage, $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);
// IDAT
$image .= png_chunk(strlen($gzimage), 'IDAT', $gzimage);
// 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;
}
?>

View file

@ -27,21 +27,26 @@ if ( !defined('IN_PHPBB') )
exit;
}
if ( !$userdata['session_logged_in'] )
// Is send through board enabled? No, return to index
if (!$board_config['board_email_form'])
{
header('Location: ' . append_sid("login.$phpEx?redirect=profile.$phpEx&mode=email&" . POST_USERS_URL . "=$user_id", true));
exit;
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]) ) ? $HTTP_GET_VARS[POST_USERS_URL] : $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";
@ -94,16 +99,13 @@ if ( $result = $db->sql_query($sql) )
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
$email_headers = 'From: ' . $userdata['user_email'] . "\n";
if ( !empty($HTTP_POST_VARS['cc_email']) )
{
$email_headers .= "Cc: " . $userdata['user_email'] . "\n";
}
$email_headers .= 'Return-Path: ' . $userdata['user_email'] . "\n";
$email_headers .= 'X-AntiAbuse: Board servername - ' . $server_name . "\n";
$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) . "\r\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);
@ -120,6 +122,25 @@ if ( $result = $db->sql_query($sql) )
$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") . '">')
);
@ -156,7 +177,8 @@ if ( $result = $db->sql_query($sql) )
$template->assign_vars(array(
'USERNAME' => $username,
'S_POST_ACTION' => append_sid("profile.$phpEx?&amp;mode=email&amp;" . POST_USERS_URL . "=$user_id"),
'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'],

View file

@ -1,6 +1,6 @@
<?php
/***************************************************************************
* usercp_register.php
* usercp_register.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
@ -21,31 +21,46 @@
*
***************************************************************************/
/*
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(&$coppa)
function show_coppa()
{
global $template, $lang, $phpbb_root_path, $phpEx;
global $userdata, $template, $lang, $phpbb_root_path, $phpEx;
$template->set_filenames(array(
'body' => 'agreement.tpl')
);
$template->assign_vars(array(
'COPPA' => $coppa,
'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'],
'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"))
@ -55,31 +70,31 @@ function show_coppa(&$coppa)
}
//
//
//
// ---------------------------------------
$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($coppa);
show_coppa();
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
$coppa = ( ( !$HTTP_POST_VARS['coppa'] && !$HTTP_GET_VARS['coppa'] ) || $mode == 'register' ) ? 0 : TRUE;
$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']) ||
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);
@ -89,20 +104,24 @@ if (
if ( $mode == 'editprofile' )
{
$user_id = intval($HTTP_POST_VARS['user_id']);
$current_email = trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['current_email'])));
$current_email = trim(htmlspecialchars($HTTP_POST_VARS['current_email']));
}
$strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests');
$strip_var_list['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(strip_tags($HTTP_POST_VARS[$param]));
$$var = trim(htmlspecialchars($HTTP_POST_VARS[$param]));
}
}
$trim_var_list = array('password_current' => 'cur_password', 'password' => 'new_password', 'password_confirm' => 'password_confirm', 'signature' => 'signature');
$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) )
{
@ -112,11 +131,9 @@ if (
}
}
$username = str_replace('&nbsp;', '', $username);
$email = htmlspecialchars($email);
$signature = str_replace('<br />', "\n", $signature);
// Run some validation on the optional fields. These are pass-by-ref, so they'll be changed to
// 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);
@ -124,7 +141,7 @@ if (
$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;
$popup_pm = ( isset($HTTP_POST_VARS['popup_pm']) ) ? ( ($HTTP_POST_VARS['popup_pm']) ? TRUE : 0 ) : TRUE;
if ( $mode == 'register' )
{
@ -136,11 +153,11 @@ if (
}
else
{
$attachsig = ( isset($HTTP_POST_VARS['attachsig']) ) ? ( ($HTTP_POST_VARS['attachsig']) ? TRUE : 0 ) : 0;
$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_allowsmiles'];
$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'];
@ -149,7 +166,7 @@ if (
{
if ( preg_match('/^[a-z_]+$/i', $HTTP_POST_VARS['language']) )
{
$user_lang = $HTTP_POST_VARS['language'];
$user_lang = htmlspecialchars($HTTP_POST_VARS['language']);
}
else
{
@ -163,25 +180,37 @@ if (
}
$user_timezone = ( isset($HTTP_POST_VARS['timezone']) ) ? doubleval($HTTP_POST_VARS['timezone']) : $board_config['board_timezone'];
$user_dateformat = ( !empty($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'] : '' );
$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_remoteurl = ( !empty($HTTP_POST_VARS['avatarremoteurl']) ) ? trim($HTTP_POST_VARS['avatarremoteurl']) : '';
$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_loc) && $mode == 'editprofile' ) ? $userdata['user_avatar'] : '';
$user_avatar_type = ( empty($user_avatar_loc) && $mode == 'editprofile' ) ? $userdata['user_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']) )
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);
$password = '';
$password_confirm = '';
$cur_password = htmlspecialchars(stripslashes($cur_password));
$new_password = htmlspecialchars(stripslashes($new_password));
$password_confirm = htmlspecialchars(stripslashes($password_confirm));
$icq = stripslashes($icq);
$aim = stripslashes($aim);
@ -192,19 +221,29 @@ if (
$location = stripslashes($location);
$occupation = stripslashes($occupation);
$interests = stripslashes($interests);
$signature = stripslashes($signature);
$signature = htmlspecialchars(stripslashes($signature));
$user_lang = stripslashes($user_lang);
$user_dateformat = stripslashes($user_dateformat);
if ( !isset($HTTP_POST_VARS['cancelavatar']))
if ( !isset($HTTP_POST_VARS['cancelavatar']))
{
$user_avatar = $user_avatar_local;
$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
//
@ -223,25 +262,73 @@ if ( isset($HTTP_POST_VARS['submit']) )
}
else if ( $mode == 'register' )
{
$coppa = (!$HTTP_POST_VARS['coppa'] && !$HTTP_GET_VARS['coppa']) ? 0 : TRUE;
if ( empty($username) || empty($password) || empty($password_confirm) || empty($email) )
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($password) && !empty($password_confirm) )
if ( !empty($new_password) && !empty($password_confirm) )
{
if ( $password != $password_confirm )
if ( $new_password != $password_confirm )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
}
else if ( strlen($password) > 32 )
else if ( strlen($new_password) > 32 )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_long'];
@ -250,8 +337,8 @@ if ( isset($HTTP_POST_VARS['submit']) )
{
if ( $mode == 'editprofile' )
{
$sql = "SELECT user_password
FROM " . USERS_TABLE . "
$sql = "SELECT user_password
FROM " . USERS_TABLE . "
WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql)) )
{
@ -260,21 +347,21 @@ if ( isset($HTTP_POST_VARS['submit']) )
$row = $db->sql_fetchrow($result);
if ( $row['user_password'] != md5($password_current) )
if ( $row['user_password'] != md5($cur_password) )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Current_password_mismatch'];
}
}
if ( !$error )
{
$password = md5($password);
$passwd_sql = "user_password = '$password', ";
$new_password = md5($new_password);
$passwd_sql = "user_password = '$new_password', ";
}
}
}
else if ( ( empty($password) && !empty($password_confirm) ) || ( !empty($password) && empty($password_confirm) ) )
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'];
@ -293,11 +380,11 @@ if ( isset($HTTP_POST_VARS['submit']) )
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $result['error_msg'];
}
if ( $mode == 'editprofile' )
{
$sql = "SELECT user_password
FROM " . USERS_TABLE . "
$sql = "SELECT user_password
FROM " . USERS_TABLE . "
WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql)) )
{
@ -306,7 +393,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
$row = $db->sql_fetchrow($result);
if ( $row['user_password'] != md5($password_current) )
if ( $row['user_password'] != md5($cur_password) )
{
$email = $userdata['user_email'];
@ -321,18 +408,22 @@ if ( isset($HTTP_POST_VARS['submit']) )
{
if ( empty($username) )
{
// Error is already triggered, since one field is empty.
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Username_disallowed'];
}
else if ( $username != $userdata['username'] || $mode == 'register' )
else if ( $username != $userdata['username'] || $mode == 'register')
{
$result = validate_username($username);
if ( $result['error'] )
if (strtolower($username) != strtolower($userdata['username']) || $mode == 'register')
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $result['error_msg'];
$result = validate_username($username);
if ( $result['error'] )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $result['error_msg'];
}
}
else
if (!$error)
{
$username_sql = "username = '" . str_replace("\'", "''", $username) . "', ";
}
@ -347,22 +438,30 @@ if ( isset($HTTP_POST_VARS['submit']) )
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Signature_too_long'];
}
if ( $signature_bbcode_uid == '' )
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['avatar_type'], $userdata['avatar_file']);
$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'] )
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) ) ? 'local' : 'remote';
$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) )
@ -375,11 +474,13 @@ if ( isset($HTTP_POST_VARS['submit']) )
}
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'] )
{
$avatar_sql = user_avatar_gallery($mode, $error, $error_msg, $user_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 )
@ -391,12 +492,13 @@ if ( isset($HTTP_POST_VARS['submit']) )
if ( $mode == 'editprofile' )
{
if ( $email != $current_email && ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN ) && $userdata['user_level'] != ADMIN )
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;
$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'] )
@ -411,7 +513,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
}
$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 = $popuppm, 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 . "
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)) )
{
@ -426,22 +528,56 @@ if ( isset($HTTP_POST_VARS['submit']) )
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
$email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n";
$emailer->use_template('user_activate', stripslashes($user_lang));
$emailer->email_address($email);
$emailer->set_subject();//$lang['Reactivate']
$emailer->extra_headers($email_headers);
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'USERNAME' => $username,
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
'U_ACTIVATE' => $server_url . '?mode=activate&act_key=' . $user_actkey)
);
$emailer->send();
$emailer->reset();
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>');
}
@ -471,24 +607,11 @@ if ( isset($HTTP_POST_VARS['submit']) )
}
$user_id = $row['total'] + 1;
$sql = "SELECT MAX(group_id) AS total
FROM " . GROUPS_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);
}
$group_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("\'", "''", $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, $popuppm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
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);
@ -507,13 +630,15 @@ if ( isset($HTTP_POST_VARS['submit']) )
message_die(GENERAL_ERROR, 'Could not insert data into users table', '', __LINE__, __FILE__, $sql);
}
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_name, group_description, group_single_user, group_moderator)
VALUES ($group_id, '', 'Personal User', 1, 0)";
$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)) )
@ -545,24 +670,22 @@ if ( isset($HTTP_POST_VARS['submit']) )
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
$email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n";
$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'])
$emailer->extra_headers($email_headers);
$emailer->set_subject(sprintf($lang['Welcome_subject'], $board_config['sitename']));
if( $coppa )
{
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'SITENAME' => $board_config['sitename'],
'WELCOME_MSG' => sprintf($lang['Welcome_subject'], $board_config['sitename']),
'USERNAME' => $username,
'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&act_key=' . $user_actkey,
'FAX_INFO' => $board_config['coppa_fax'],
'MAIL_INFO' => $board_config['coppa_mail'],
'EMAIL_ADDRESS' => $email,
@ -579,13 +702,13 @@ if ( isset($HTTP_POST_VARS['submit']) )
else
{
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'SITENAME' => $board_config['sitename'],
'WELCOME_MSG' => sprintf($lang['Welcome_subject'], $board_config['sitename']),
'USERNAME' => $username,
'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&act_key=' . $user_actkey)
'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
);
}
@ -594,19 +717,34 @@ if ( isset($HTTP_POST_VARS['submit']) )
if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN )
{
$emailer->use_template("admin_activate", stripslashes($user_lang));
$emailer->email_address($board_config['board_email']);
$emailer->set_subject(); //$lang['New_account_subject']
$emailer->extra_headers($email_headers);
$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' => $username,
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
$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&act_key=' . $user_actkey)
);
$emailer->send();
$emailer->reset();
'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>');
@ -621,22 +759,23 @@ if ( $error )
{
//
// If an error occured we need to stripslashes on returned data
//
//
$username = stripslashes($username);
$email = stripslashes($email);
$password = '';
$new_password = '';
$password_confirm = '';
$icq = stripslashes($icq);
$aim = htmlspecialchars(str_replace('+', ' ', stripslashes($aim)));
$msn = htmlspecialchars(stripslashes($msn));
$yim = htmlspecialchars(stripslashes($yim));
$aim = str_replace('+', ' ', stripslashes($aim));
$msn = stripslashes($msn);
$yim = stripslashes($yim);
$website = htmlspecialchars(stripslashes($website));
$location = htmlspecialchars(stripslashes($location));
$occupation = htmlspecialchars(stripslashes($occupation));
$interests = htmlspecialchars(stripslashes($interests));
$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);
@ -645,26 +784,26 @@ if ( $error )
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 = htmlspecialchars($userdata['username']);
$username = $userdata['username'];
$email = $userdata['user_email'];
$password = '';
$new_password = '';
$password_confirm = '';
$icq = $userdata['user_icq'];
$aim = htmlspecialchars(str_replace('+', ' ', $userdata['user_aim']));
$msn = htmlspecialchars($userdata['user_msnm']);
$yim = htmlspecialchars($userdata['user_yim']);
$aim = str_replace('+', ' ', $userdata['user_aim']);
$msn = $userdata['user_msnm'];
$yim = $userdata['user_yim'];
$website = htmlspecialchars($userdata['user_website']);
$location = htmlspecialchars($userdata['user_from']);
$occupation = htmlspecialchars($userdata['user_occ']);
$interests = htmlspecialchars($userdata['user_interests']);
$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", '', $userdata['user_sig']) : $userdata['user_sig'];
$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'];
$popuppm = $userdata['user_popup_pm'];
$popup_pm = $userdata['user_popup_pm'];
$notifyreply = $userdata['user_notify'];
$attachsig = $userdata['user_attachsig'];
$allowhtml = $userdata['user_allowhtml'];
@ -701,13 +840,15 @@ if( isset($HTTP_POST_VARS['avatargallery']) && !$error )
{
include($phpbb_root_path . 'includes/usercp_avatar.'.$phpEx);
$avatar_category = ( !empty($HTTP_POST_VARS['avatarcategory']) ) ? $HTTP_POST_VARS['avatarcategory'] : '';
$avatar_category = ( !empty($HTTP_POST_VARS['avatarcategory']) ) ? htmlspecialchars($HTTP_POST_VARS['avatarcategory']) : '';
$template->set_filenames(array(
'body' => 'profile_avatar_gallery.tpl')
);
display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popuppm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat);
$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
{
@ -718,13 +859,11 @@ else
$coppa = FALSE;
}
if ( !isset($user_template) )
if ( !isset($user_style) )
{
$selected_template = $board_config['system_template'];
$user_style = $board_config['default_style'];
}
$signature = preg_replace('/\:[0-9a-z\:]*?\]/si', ']', $signature);
$avatar_img = '';
if ( $user_avatar_type )
{
@ -755,7 +894,7 @@ else
if ( !empty($user_avatar_local) )
{
$s_hidden_fields .= '<input type="hidden" name="avatarlocal" value="' . $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'];
@ -782,16 +921,106 @@ else
$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);
$confirm_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');
list($usec, $sec) = explode(' ', microtime());
mt_srand($sec * $usec);
$max_chars = count($confirm_chars) - 1;
$code = '';
for ($i = 0; $i < 6; $i++)
{
$code .= $confirm_chars[mt_rand(0, $max_chars)];
}
$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 = (@extension_loaded('zlib')) ? '<img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id") . '" alt="" title="" />' : '<img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=1") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=2") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=3") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=4") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=5") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=6") . '" 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') || phpversion() == '4.0.4pl1' || !$board_config['allow_avatar_upload'] || ( phpversion() < '4.0.3' && @$ini_val('open_basedir') != '' ) ) ? '' : 'enctype="multipart/form-data"';
$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' => $username,
'CUR_PASSWORD' => $cur_password,
'NEW_PASSWORD' => $new_password,
'PASSWORD_CONFIRM' => $password_confirm,
'EMAIL' => $email,
'CONFIRM_IMG' => $confirm_image,
'YIM' => $yim,
'ICQ' => $icq,
'MSN' => $msn,
@ -807,8 +1036,8 @@ else
'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"' : '',
'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"' : '',
@ -827,11 +1056,11 @@ else
'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>'),
'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_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'] : '',
@ -886,6 +1115,10 @@ else
'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'],
@ -899,27 +1132,30 @@ else
// of the templates to 'fake' an IF...ELSE...ENDIF solution
// it works well :)
//
if ( $userdata['user_allowavatar'] && ( $board_config['allow_avatar_upload'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] ) )
if ( $mode != 'register' )
{
$template->assign_block_vars('switch_avatar_block', array() );
if ( $board_config['allow_avatar_upload'] && file_exists('./' . $board_config['avatar_path']) )
if ( $userdata['user_allowavatar'] && ( $board_config['allow_avatar_upload'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] ) )
{
if ( $form_enctype != '' )
$template->assign_block_vars('switch_avatar_block', array() );
if ( $board_config['allow_avatar_upload'] && file_exists(@phpbb_realpath('./' . $board_config['avatar_path'])) )
{
$template->assign_block_vars('switch_avatar_block.switch_avatar_local_upload', array() );
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() );
}
$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_remote'] )
{
$template->assign_block_vars('switch_avatar_block.switch_avatar_remote_link', array() );
}
if ( $board_config['allow_avatar_local'] && file_exists('./' . $board_config['avatar_gallery_path']) )
{
$template->assign_block_vars('switch_avatar_block.switch_avatar_local_gallery', 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() );
}
}
}
}
@ -928,4 +1164,4 @@ $template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
?>

View file

@ -29,7 +29,7 @@ if ( !defined('IN_PHPBB') )
if ( isset($HTTP_POST_VARS['submit']) )
{
$username = ( !empty($HTTP_POST_VARS['username']) ) ? trim(strip_tags($HTTP_POST_VARS['username'])) : '';
$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
@ -46,15 +46,16 @@ if ( isset($HTTP_POST_VARS['submit']) )
}
$username = $row['username'];
$user_id = $row['user_id'];
$user_actkey = gen_rand_string(true);
$key_len = 54 - strlen($server_url);
$key_len = ( $str_len > 6 ) ? $key_len : 6;
$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'
SET user_newpasswd = '" . md5($user_password) . "', user_actkey = '$user_actkey'
WHERE user_id = " . $row['user_id'];
if ( !$db->sql_query($sql) )
{
@ -64,20 +65,20 @@ if ( isset($HTTP_POST_VARS['submit']) )
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n";
$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->extra_headers($email_headers);
$emailer->set_subject($lang['New_password_activation']);
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'USERNAME' => $username,
'PASSWORD' => $user_password,
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',
'U_ACTIVATE' => $server_url . "?mode=activate&act_key=$user_actkey")
'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
);
$emailer->send();
$emailer->reset();
@ -124,11 +125,14 @@ $template->assign_vars(array(
'L_ITEMS_REQUIRED' => $lang['Items_required'],
'L_EMAIL_ADDRESS' => $lang['Email_address'],
'L_SUBMIT' => $lang['Submit'],
'L_RESET' => $lang['Reset'])
'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);
?>
?>

View file

@ -31,7 +31,12 @@ if ( empty($HTTP_GET_VARS[POST_USERS_URL]) || $HTTP_GET_VARS[POST_USERS_URL] ==
{
message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
}
$profiledata = get_userdata(intval($HTTP_GET_VARS[POST_USERS_URL]));
$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 . "
@ -41,6 +46,7 @@ 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;
@ -159,8 +165,8 @@ $yim_img = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config
$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="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
$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
@ -168,6 +174,15 @@ $search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
$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']),
@ -222,7 +237,7 @@ $template->assign_vars(array(
'L_OCCUPATION' => $lang['Occupation'],
'L_INTERESTS' => $lang['Interests'],
'U_SEARCH_USER' => append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username'])),
'U_SEARCH_USER' => append_sid("search.$phpEx?search_author=" . $u_search_author),
'S_PROFILE_ACTION' => append_sid("profile.$phpEx"))
);

View file

@ -118,7 +118,9 @@ if( !($result = $db->sql_query($sql)) )
message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
}
$category_rows = array();
while( $category_rows[] = $db->sql_fetchrow($result) );
$db->sql_freeresult($result);
if( ( $total_categories = count($category_rows) ) )
{
@ -170,6 +172,7 @@ if( ( $total_categories = count($category_rows) ) )
{
$forum_data[] = $row;
}
$db->sql_freeresult($result);
if ( !($total_forums = count($forum_data)) )
{
@ -180,8 +183,14 @@ if( ( $total_categories = count($category_rows) ) )
// Obtain a list of topic ids which contain
// posts made since user last visited
//
if ( $userdata['session_logged_in'] )
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
@ -197,6 +206,7 @@ if( ( $total_categories = count($category_rows) ) )
{
$new_topic_data[$topic_data['forum_id']][$topic_data['topic_id']] = $topic_data['post_time'];
}
$db->sql_freeresult($result);
}
//
@ -222,6 +232,7 @@ if( ( $total_categories = count($category_rows) ) )
{
$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
@ -241,6 +252,7 @@ if( ( $total_categories = count($category_rows) ) )
{
$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
@ -251,6 +263,7 @@ if( ( $total_categories = count($category_rows) ) )
//
// Start output of page
//
define('SHOW_ONLINE', true);
$page_title = $lang['Index'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

File diff suppressed because it is too large Load diff

1049
phpBB/install/install.php Normal file

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -41,10 +41,14 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sentbox_privms
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_savebox_privmsgs','50');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_sig','Thanks, The Management');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email','youraddress@yourdomain.com');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_autologin','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_autologin_time','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_delivery','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('sendmail_fix','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval','15');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form','0');
@ -58,16 +62,16 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style','1'
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_dateformat','D M d, Y g:i a');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('prune_enable','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('privmsg_disable','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('privmsg_disable','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_fax', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_mail', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_users', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_users', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.yourdomain.tld');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', 'RC-4');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.18');
/*
-- Categories
@ -82,14 +86,14 @@ SET IDENTITY_INSERT phpbb_categories OFF;
/*
-- Forums
*/
INSERT INTO phpbb_forums (forum_id, cat_id, forum_name, forum_desc, forum_status, forum_order, forum_posts, forum_topics, forum_last_post_id, prune_next, prune_enable, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 1, 'Test Forum 1', 'This is just a test forum, nothing special here.', '', 1, 1, 1, 1, '', 1, '', '', '', '', 1, 1, 3, 1, 1, 1, 3);
INSERT INTO phpbb_forums (forum_id, cat_id, forum_name, forum_desc, forum_status, forum_order, forum_posts, forum_topics, forum_last_post_id, prune_next, prune_enable, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 1, 'Test Forum 1', 'This is just a test forum, nothing special here.', '', 1, 1, 1, 1, '', 1, '', '', '', '', 1, 1, 3, 3, 1, 1, 3);
/*
-- Users
Default Admin --> username: admin
Default Admin --> username: admin
password: admin (change this or remove it once everything is working!)
*/
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 0, 1, 0, 1, 1, NULL, '', '', '', '', '', '', 0, 0);
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 1, 1, 0, 1, 1, NULL, '', '', 0, '', '', '', 0, 0);
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_popup_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( 2, 'Admin', 1, 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', '', '', '', '', '', '', 1, 1, '', '', '', 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, '', 'english', 0, 'd M Y h:i a', '', '', 0, 1);
@ -106,9 +110,12 @@ SET IDENTITY_INSERT phpbb_ranks OFF;
/*
-- Groups
*/
SET IDENTITY_INSERT phpbb_groups ON;
INSERT INTO phpbb_groups (group_id, group_type, group_name, group_description, group_moderator, group_single_user) VALUES (1, 1, 'Anonymous', 'Personal User', '', 1);
INSERT INTO phpbb_groups (group_id, group_type, group_name, group_description, group_moderator, group_single_user) VALUES (2, 1, 'Admin', 'Personal User', '', 1);
SET IDENTITY_INSERT phpbb_groups OFF;
/*
-- User -> Group
@ -167,38 +174,36 @@ INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 9, ':
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 10, ':o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 11, ':-o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 12, ':eek:', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, '8O', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, '8-O', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':shock:', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, ':-?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, ':???:', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, '8)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, '8-)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':cool:', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':lol:', 'icon_lol.gif', 'Laughing');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':-x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':mad:', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':-P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':razz:', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':oops:', 'icon_redface.gif', 'Embarassed');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':cry:', 'icon_cry.gif', 'Crying or Very sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':twisted:', 'icon_twisted.gif', 'Twisted Evil');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ':wink:', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ';)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ';-)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':!:', 'icon_exclaim.gif', 'Exclamation');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':?:', 'icon_question.gif', 'Question');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':idea:', 'icon_idea.gif', 'Idea');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':arrow:', 'icon_arrow.gif', 'Arrow');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':-|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 43, ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 44, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, ':shock:', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, ':?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':-?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':???:', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, '8)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, '8-)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, ':cool:', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, ':lol:', 'icon_lol.gif', 'Laughing');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':-x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':mad:', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':-P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':razz:', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':oops:', 'icon_redface.gif', 'Embarassed');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':cry:', 'icon_cry.gif', 'Crying or Very sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':twisted:', 'icon_twisted.gif', 'Twisted Evil');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':wink:', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ';)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ';-)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ':!:', 'icon_exclaim.gif', 'Exclamation');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ':?:', 'icon_question.gif', 'Question');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':idea:', 'icon_idea.gif', 'Idea');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':arrow:', 'icon_arrow.gif', 'Arrow');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':-|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
SET IDENTITY_INSERT phpbb_smilies OFF;
@ -241,4 +246,4 @@ INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 11,
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 12, 1, 1 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 1 );
COMMIT;
COMMIT;

View file

@ -1,6 +1,6 @@
/*
mssql_schema.sql for phpBB2 (c) 2001, phpBB Group
mssql_schema.sql for phpBB2 (c) 2001, phpBB Group
$Id$
@ -23,7 +23,7 @@ CREATE TABLE [phpbb_auth_access] (
[auth_vote] [smallint] NOT NULL ,
[auth_pollcreate] [smallint] NOT NULL ,
[auth_attachments] [smallint] NOT NULL ,
[auth_mod] [smallint] NOT NULL
[auth_mod] [smallint] NOT NULL
) ON [PRIMARY]
GO
@ -31,26 +31,34 @@ CREATE TABLE [phpbb_banlist] (
[ban_id] [int] IDENTITY (1, 1) NOT NULL ,
[ban_userid] [int] NULL ,
[ban_ip] [char] (8) NULL ,
[ban_email] [varchar] (50) NULL
[ban_email] [varchar] (50) NULL
) ON [PRIMARY]
GO
CREATE TABLE [phpbb_categories] (
[cat_id] [int] IDENTITY (1, 1) NOT NULL ,
[cat_title] [varchar] (50) NOT NULL ,
[cat_order] [int] NOT NULL
[cat_order] [int] NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [phpbb_config] (
[config_name] [varchar] (255) NULL ,
[config_value] [varchar] (255) NULL
[config_value] [varchar] (255) NULL
) ON [PRIMARY]
GO
CREATE TABLE [phpbb_confirm] (
[confirm_id] [char] (32) NOT NULL ,
[session_id] [char] (32) NOT NULL ,
[code] [char] (6) NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [phpbb_disallow] (
[disallow_id] [int] IDENTITY (1, 1) NOT NULL ,
[disallow_username] [varchar] (100) NULL
[disallow_username] [varchar] (100) NULL
) ON [PRIMARY]
GO
@ -58,7 +66,7 @@ CREATE TABLE [phpbb_forum_prune] (
[prune_id] [int] IDENTITY (1, 1) NOT NULL ,
[forum_id] [int] NOT NULL ,
[prune_days] [int] NOT NULL ,
[prune_freq] [int] NOT NULL
[prune_freq] [int] NOT NULL
) ON [PRIMARY]
GO
@ -84,17 +92,17 @@ CREATE TABLE [phpbb_forums] (
[auth_announce] [smallint] NOT NULL ,
[auth_vote] [smallint] NOT NULL ,
[auth_pollcreate] [smallint] NOT NULL ,
[auth_attachments] [smallint] NOT NULL
[auth_attachments] [smallint] NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [phpbb_groups] (
[group_id] [int] NOT NULL ,
[group_id] [int] IDENTITY (1, 1) NOT NULL ,
[group_type] [smallint] NULL ,
[group_name] [varchar] (50) NOT NULL ,
[group_description] [varchar] (255) NOT NULL ,
[group_moderator] [int] NULL ,
[group_single_user] [smallint] NOT NULL
[group_single_user] [smallint] NOT NULL
) ON [PRIMARY]
GO
@ -111,7 +119,7 @@ CREATE TABLE [phpbb_posts] (
[enable_smilies] [smallint] NULL ,
[enable_sig] [smallint] NULL ,
[post_edit_time] [int] NULL ,
[post_edit_count] [smallint] NULL
[post_edit_count] [smallint] NULL
) ON [PRIMARY]
GO
@ -119,7 +127,7 @@ CREATE TABLE [phpbb_posts_text] (
[post_id] [int] NOT NULL ,
[bbcode_uid] [char] (10) NULL ,
[post_subject] [char] (60) NULL ,
[post_text] [text] NULL
[post_text] [text] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
@ -134,14 +142,14 @@ CREATE TABLE [phpbb_privmsgs] (
[privmsgs_enable_bbcode] [smallint] NULL ,
[privmsgs_enable_html] [smallint] NULL ,
[privmsgs_enable_smilies] [smallint] NULL ,
[privmsgs_attach_sig] [smallint] NULL
[privmsgs_attach_sig] [smallint] NULL
) ON [PRIMARY]
GO
CREATE TABLE [phpbb_privmsgs_text] (
[privmsgs_text_id] [int] NOT NULL ,
[privmsgs_bbcode_uid] [char] (10) NULL ,
[privmsgs_text] [text] NULL
[privmsgs_text] [text] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
@ -150,28 +158,28 @@ CREATE TABLE [phpbb_ranks] (
[rank_title] [varchar] (50) NOT NULL ,
[rank_min] [int] NULL ,
[rank_special] [smallint] NULL ,
[rank_image] [varchar] (50) NULL
[rank_image] [varchar] (50) NULL
) ON [PRIMARY]
GO
CREATE TABLE [phpbb_search_results] (
[search_id] [int] NOT NULL ,
[session_id] [char] (32) NOT NULL ,
[search_array] [text] NOT NULL
[search_array] [text] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [phpbb_search_wordlist] (
[word_id] [int] IDENTITY (1, 1) NOT NULL ,
[word_text] [varchar] (50) NOT NULL ,
[word_common] [tinyint] NOT NULL
[word_common] [tinyint] NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [phpbb_search_wordmatch] (
[post_id] [int] NOT NULL ,
[word_id] [int] NOT NULL ,
[title_match] [smallint] NOT NULL
[title_match] [smallint] NOT NULL
) ON [PRIMARY]
GO
@ -182,7 +190,16 @@ CREATE TABLE [phpbb_sessions] (
[session_time] [int] NULL ,
[session_ip] [char] (8) NOT NULL ,
[session_page] [int] NULL ,
[session_logged_in] [smallint] NULL
[session_logged_in] [smallint] NULL,
[session_admin] [smallint] NULL
) ON [PRIMARY]
GO
CREATE TABLE [phpbb_sessions_keys] (
[key_id] [char] (32) NOT NULL ,
[user_id] [int] NOT NULL ,
[last_ip] [char] (8) NOT NULL ,
[last_login] [int] NOT NULL
) ON [PRIMARY]
GO
@ -190,7 +207,7 @@ CREATE TABLE [phpbb_smilies] (
[smilies_id] [int] IDENTITY (1, 1) NOT NULL ,
[code] [varchar] (10) NOT NULL ,
[smile_url] [varchar] (50) NOT NULL ,
[emoticon] [varchar] (50) NULL
[emoticon] [varchar] (50) NULL
) ON [PRIMARY]
GO
@ -237,7 +254,7 @@ CREATE TABLE [phpbb_themes] (
[span_class2] [varchar] (25) NULL ,
[span_class3] [varchar] (25) NULL ,
[img_size_poll] [smallint] NULL ,
[img_size_privmsg] [smallint] NULL
[img_size_privmsg] [smallint] NULL
) ON [PRIMARY]
GO
@ -289,21 +306,21 @@ CREATE TABLE [phpbb_topics] (
[topic_vote] [smallint] NOT NULL ,
[topic_first_post_id] [int] NULL ,
[topic_last_post_id] [int] NULL ,
[topic_moved_id] [int] NULL
[topic_moved_id] [int] NULL
) ON [PRIMARY]
GO
CREATE TABLE [phpbb_topics_watch] (
[topic_id] [int] NOT NULL ,
[user_id] [int] NOT NULL ,
[notify_status] [smallint] NOT NULL
[notify_status] [smallint] NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [phpbb_user_group] (
[group_id] [int] NOT NULL ,
[user_id] [int] NOT NULL ,
[user_pending] [smallint] NULL
[user_pending] [smallint] NULL
) ON [PRIMARY]
GO
@ -318,7 +335,7 @@ CREATE TABLE [phpbb_users] (
[user_regdate] [int] NOT NULL ,
[user_level] [smallint] NOT NULL ,
[user_posts] [int] NOT NULL ,
[user_timezone] [real] NOT NULL ,
[user_timezone] [decimal] (5,2) NOT NULL ,
[user_style] [int] NULL ,
[user_lang] [varchar] (255) NULL ,
[user_dateformat] [varchar] (14) NOT NULL ,
@ -352,7 +369,7 @@ CREATE TABLE [phpbb_users] (
[user_interests] [varchar] (255) NULL ,
[user_actkey] [varchar] (32) NULL ,
[user_newpasswd] [varchar] (32) NULL ,
[user_notify] [smallint] NOT NULL
[user_notify] [smallint] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
@ -361,7 +378,7 @@ CREATE TABLE [phpbb_vote_desc] (
[topic_id] [int] NOT NULL ,
[vote_text] [varchar] (255) NOT NULL ,
[vote_start] [int] NOT NULL ,
[vote_length] [int] NOT NULL
[vote_length] [int] NOT NULL
) ON [PRIMARY]
GO
@ -369,158 +386,165 @@ CREATE TABLE [phpbb_vote_results] (
[vote_id] [int] NOT NULL ,
[vote_option_id] [int] NOT NULL ,
[vote_option_text] [varchar] (255) NOT NULL ,
[vote_result] [int] NOT NULL
[vote_result] [int] NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [phpbb_vote_voters] (
[vote_id] [int] NOT NULL ,
[vote_user_id] [int] NOT NULL ,
[vote_user_ip] [char] (8) NOT NULL
[vote_user_ip] [char] (8) NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [phpbb_words] (
[word_id] [int] IDENTITY (1, 1) NOT NULL ,
[word] [varchar] (255) NOT NULL ,
[replacement] [varchar] (255) NOT NULL
[replacement] [varchar] (255) NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_banlist] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_banlist] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_banlist] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_banlist] PRIMARY KEY CLUSTERED
(
[ban_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_categories] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_categories] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_categories] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_categories] PRIMARY KEY CLUSTERED
(
[cat_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_disallow] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_disallow] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_confirm] PRIMARY KEY CLUSTERED
(
[session_id],[confirm_id]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_disallow] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_disallow] PRIMARY KEY CLUSTERED
(
[disallow_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_forum_prune] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_forum_prune] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_forum_prune] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_forum_prune] PRIMARY KEY CLUSTERED
(
[prune_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_forums] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_forums] PRIMARY KEY CLUSTERED
(
[forum_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_groups] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_groups] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_groups] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_groups] PRIMARY KEY CLUSTERED
(
[group_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_posts] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_posts] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_posts] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_posts] PRIMARY KEY CLUSTERED
(
[post_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_privmsgs] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_privmsgs] PRIMARY KEY CLUSTERED
(
[privmsgs_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_privmsgs_text] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_privmsgs_text] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_privmsgs_text] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_privmsgs_text] PRIMARY KEY CLUSTERED
(
[privmsgs_text_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_ranks] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_ranks] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_ranks] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_ranks] PRIMARY KEY CLUSTERED
(
[rank_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_search_results] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_search_results] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_search_results] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_search_results] PRIMARY KEY CLUSTERED
(
[search_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_search_wordlist] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_search_wordlist] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_search_wordlist] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_search_wordlist] PRIMARY KEY CLUSTERED
(
[word_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_smilies] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_smilies] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_smilies] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_smilies] PRIMARY KEY CLUSTERED
(
[smilies_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_themes] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_themes] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_themes] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_themes] PRIMARY KEY CLUSTERED
(
[themes_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_themes_name] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_themes_name] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_themes_name] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_themes_name] PRIMARY KEY CLUSTERED
(
[themes_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_topics] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_topics] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_topics] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_topics] PRIMARY KEY CLUSTERED
(
[topic_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_users] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_users] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_users] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_users] PRIMARY KEY CLUSTERED
(
[user_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_vote_desc] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_vote_desc] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_vote_desc] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_vote_desc] PRIMARY KEY CLUSTERED
(
[vote_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_words] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_words] PRIMARY KEY CLUSTERED
ALTER TABLE [phpbb_words] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_words] PRIMARY KEY CLUSTERED
(
[word_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_auth_access] WITH NOCHECK ADD
ALTER TABLE [phpbb_auth_access] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_auth_access_auth_view] DEFAULT (0) FOR [auth_view],
CONSTRAINT [DF_phpbb_auth_access_auth_read] DEFAULT (0) FOR [auth_read],
CONSTRAINT [DF_phpbb_auth_access_auth_post] DEFAULT (0) FOR [auth_post],
@ -535,7 +559,7 @@ ALTER TABLE [phpbb_auth_access] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_auth_access_auth_mod] DEFAULT (0) FOR [auth_mod]
GO
ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_forums_forum_posts] DEFAULT (0) FOR [forum_posts],
CONSTRAINT [DF_phpbb_forums_forum_topics] DEFAULT (0) FOR [forum_topics],
CONSTRAINT [DF_phpbb_forums_forum_last_post_id] DEFAULT (0) FOR [forum_last_post_id],
@ -553,20 +577,34 @@ ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_forums_auth_attachments] DEFAULT (0) FOR [auth_attachments]
GO
ALTER TABLE [phpbb_search_wordlist] WITH NOCHECK ADD
ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_confirm_confirm_id] DEFAULT ('') FOR [confirm_id],
CONSTRAINT [DF_phpbb_confirm_session_id] DEFAULT ('') FOR [session_id],
CONSTRAINT [DF_phpbb_confirm_code] DEFAULT ('') FOR [code]
GO
ALTER TABLE [phpbb_posts] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_posts_enable_bbcode] DEFAULT (1) FOR [enable_bbcode],
CONSTRAINT [DF_phpbb_posts_enable_html] DEFAULT (0) FOR [enable_html],
CONSTRAINT [DF_phpbb_posts_enable_smilies] DEFAULT (1) FOR [enable_smilies],
CONSTRAINT [DF_phpbb_posts_enable_sig] DEFAULT (1) FOR [enable_sig],
CONSTRAINT [DF_phpbb_posts_post_edit_count] DEFAULT (0) FOR [post_edit_count]
GO
ALTER TABLE [phpbb_search_wordlist] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_search_wordlist_word_common] DEFAULT (0) FOR [word_common]
GO
ALTER TABLE [phpbb_topics] WITH NOCHECK ADD
ALTER TABLE [phpbb_topics] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_topics_topic_views] DEFAULT (0) FOR [topic_views],
CONSTRAINT [DF_phpbb_topics_topic_replies] DEFAULT (0) FOR [topic_replies],
CONSTRAINT [DF_phpbb_topics_topic_status] DEFAULT (0) FOR [topic_status],
CONSTRAINT [DF_phpbb_topics_topic_type] DEFAULT (0) FOR [topic_type],
CONSTRAINT [DF_phpbb_topics_topic_vote] DEFAULT (0) FOR [topic_vote],
CONSTRAINT [DF_phpbb_topics_topic_vote] DEFAULT (0) FOR [topic_vote],
CONSTRAINT [DF_phpbb_topics_topic_moved_id] DEFAULT (0) FOR topic_moved_id
GO
ALTER TABLE [phpbb_users] WITH NOCHECK ADD
ALTER TABLE [phpbb_users] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_users_user_level] DEFAULT (0) FOR [user_level],
CONSTRAINT [DF_phpbb_users_user_posts] DEFAULT (0) FOR [user_posts],
CONSTRAINT [DF_phpbb_users_user_session_time] DEFAULT (0) FOR [user_session_time],
@ -584,8 +622,9 @@ ALTER TABLE [phpbb_users] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_users_user_allowavatar] DEFAULT (1) FOR [user_allowavatar],
CONSTRAINT [DF_phpbb_users_user_allow_pm] DEFAULT (1) FOR [user_allow_pm],
CONSTRAINT [DF_phpbb_users_user_allow_viewonline] DEFAULT (1) FOR [user_allow_viewonline],
CONSTRAINT [DF_phpbb_users_user_notify_pm] DEFAULT (1) FOR [user_notify_pm],
CONSTRAINT [DF_phpbb_users_user_notify_pm] DEFAULT (0) FOR [user_notify_pm],
CONSTRAINT [DF_phpbb_users_user_popup_pm] DEFAULT (1) FOR [user_popup_pm],
CONSTRAINT [DF_phpbb_users_user_dateformat] DEFAULT('d M Y H:i') FOR [user_dateformat],
CONSTRAINT [DF_phpbb_users_user_avatar_type] DEFAULT (0) FOR [user_avatar_type]
GO
@ -637,6 +676,12 @@ GO
CREATE INDEX [IX_phpbb_sessions] ON [phpbb_sessions]([session_id], [session_user_id], [session_ip], [session_logged_in]) ON [PRIMARY]
GO
CREATE INDEX [IX_phpbb_sessions_keys] ON [phpbb_sessions_keys]([key_id], [user_id]) ON [PRIMARY]
GO
CREATE INDEX [IX_phpbb_sessions_keys] ON [phpbb_sessions_keys]([last_login]) ON [PRIMARY]
GO
CREATE INDEX [IX_phpbb_topics] ON [phpbb_topics]([forum_id], [topic_type], [topic_first_post_id], [topic_last_post_id]) ON [PRIMARY]
GO
@ -665,4 +710,4 @@ GO
GO
COMMIT
GO
GO

View file

@ -23,6 +23,9 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_theme_create
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_local','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remote','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_autologin','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_autologin_time','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page','15');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page','50');
@ -38,6 +41,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_delivery','0'
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('sendmail_fix','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval','15');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form','0');
@ -51,7 +55,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style','1'
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_dateformat','D M d, Y g:i a');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('prune_enable','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('privmsg_disable','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('privmsg_disable','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_fax', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_mail', '');
@ -60,7 +64,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.myserver.tld');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', 'RC-4');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.18');
# -- Categories
@ -68,11 +72,11 @@ INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test cat
# -- Forums
INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, cat_id, forum_order, forum_posts, forum_topics, forum_last_post_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 'Test Forum 1', 'This is just a test forum.', 1, 10, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 1, 1, 1, 3);
INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, cat_id, forum_order, forum_posts, forum_topics, forum_last_post_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 'Test Forum 1', 'This is just a test forum.', 1, 10, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 1, 1, 3);
# -- Users
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 0, 1, 0, 1, 1, NULL, '', '', '', '', '', '', 0, 0);
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 1, 1, 0, 1, 1, NULL, '', '', 0, '', '', '', 0, 0);
# -- username: admin password: admin (change this or remove it once everything is working!)
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_popup_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( 2, 'Admin', 1, 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', '', '', '', '', '', '', 1, 1, '', '', '', 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, '', 'english', 0, 'd M Y h:i a', '', '', 0, 1);
@ -120,38 +124,36 @@ INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 9, ':
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 10, ':o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 11, ':-o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 12, ':eek:', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, '8O', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, '8-O', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':shock:', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, ':-?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, ':???:', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, '8)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, '8-)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':cool:', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':lol:', 'icon_lol.gif', 'Laughing');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':-x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':mad:', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':-P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':razz:', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':oops:', 'icon_redface.gif', 'Embarassed');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':cry:', 'icon_cry.gif', 'Crying or Very sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':twisted:', 'icon_twisted.gif', 'Twisted Evil');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ':wink:', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ';)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ';-)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':!:', 'icon_exclaim.gif', 'Exclamation');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':?:', 'icon_question.gif', 'Question');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':idea:', 'icon_idea.gif', 'Idea');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':arrow:', 'icon_arrow.gif', 'Arrow');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':-|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 43, ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 44, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, ':shock:', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, ':?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':-?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':???:', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, '8)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, '8-)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, ':cool:', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, ':lol:', 'icon_lol.gif', 'Laughing');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':-x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':mad:', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':-P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':razz:', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':oops:', 'icon_redface.gif', 'Embarassed');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':cry:', 'icon_cry.gif', 'Crying or Very sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':twisted:', 'icon_twisted.gif', 'Twisted Evil');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':wink:', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ';)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ';-)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ':!:', 'icon_exclaim.gif', 'Exclamation');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ':?:', 'icon_question.gif', 'Question');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':idea:', 'icon_idea.gif', 'Idea');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':arrow:', 'icon_arrow.gif', 'Arrow');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':-|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
# -- wordlist

View file

@ -21,7 +21,7 @@ CREATE TABLE phpbb_auth_access (
auth_vote tinyint(1) DEFAULT '0' NOT NULL,
auth_pollcreate tinyint(1) DEFAULT '0' NOT NULL,
auth_attachments tinyint(1) DEFAULT '0' NOT NULL,
auth_mod tinyint(1) DEFAULT '0' NOT NULL,
auth_mod tinyint(1) DEFAULT '0' NOT NULL,
KEY group_id (group_id),
KEY forum_id (forum_id)
);
@ -33,7 +33,7 @@ CREATE TABLE phpbb_auth_access (
CREATE TABLE phpbb_user_group (
group_id mediumint(8) DEFAULT '0' NOT NULL,
user_id mediumint(8) DEFAULT '0' NOT NULL,
user_pending tinyint(1),
user_pending tinyint(1),
KEY group_id (group_id),
KEY user_id (user_id)
);
@ -43,12 +43,12 @@ CREATE TABLE phpbb_user_group (
#
CREATE TABLE phpbb_groups (
group_id mediumint(8) NOT NULL auto_increment,
group_type tinyint(4) DEFAULT '1' NOT NULL,
group_type tinyint(4) DEFAULT '1' NOT NULL,
group_name varchar(40) NOT NULL,
group_description varchar(255) NOT NULL,
group_moderator mediumint(8) DEFAULT '0' NOT NULL,
group_single_user tinyint(1) DEFAULT '1' NOT NULL,
PRIMARY KEY (group_id),
group_moderator mediumint(8) DEFAULT '0' NOT NULL,
group_single_user tinyint(1) DEFAULT '1' NOT NULL,
PRIMARY KEY (group_id),
KEY group_single_user (group_single_user)
);
@ -62,7 +62,7 @@ CREATE TABLE phpbb_banlist (
ban_userid mediumint(8) NOT NULL,
ban_ip char(8) NOT NULL,
ban_email varchar(255),
PRIMARY KEY (ban_id),
PRIMARY KEY (ban_id),
KEY ban_ip_user_id (ban_ip, ban_userid)
);
@ -75,7 +75,7 @@ CREATE TABLE phpbb_categories (
cat_id mediumint(8) UNSIGNED NOT NULL auto_increment,
cat_title varchar(100),
cat_order mediumint(8) UNSIGNED NOT NULL,
PRIMARY KEY (cat_id),
PRIMARY KEY (cat_id),
KEY cat_order (cat_order)
);
@ -84,20 +84,32 @@ CREATE TABLE phpbb_categories (
#
# Table structure for table 'phpbb_config'
#
CREATE TABLE phpbb_config (
config_name varchar(255) NOT NULL,
config_value varchar(255) NOT NULL,
CREATE TABLE phpbb_config (
config_name varchar(255) NOT NULL,
config_value varchar(255) NOT NULL,
PRIMARY KEY (config_name)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_confirm'
#
CREATE TABLE phpbb_confirm (
confirm_id char(32) DEFAULT '' NOT NULL,
session_id char(32) DEFAULT '' NOT NULL,
code char(6) DEFAULT '' NOT NULL,
PRIMARY KEY (session_id,confirm_id)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_disallow'
#
CREATE TABLE phpbb_disallow (
disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment,
disallow_username varchar(25),
disallow_username varchar(25) DEFAULT '' NOT NULL,
PRIMARY KEY (disallow_id)
);
@ -109,8 +121,8 @@ CREATE TABLE phpbb_disallow (
CREATE TABLE phpbb_forum_prune (
prune_id mediumint(8) UNSIGNED NOT NULL auto_increment,
forum_id smallint(5) UNSIGNED NOT NULL,
prune_days tinyint(4) UNSIGNED NOT NULL,
prune_freq tinyint(4) UNSIGNED NOT NULL,
prune_days smallint(5) UNSIGNED NOT NULL,
prune_freq smallint(5) UNSIGNED NOT NULL,
PRIMARY KEY(prune_id),
KEY forum_id (forum_id)
);
@ -125,7 +137,7 @@ CREATE TABLE phpbb_forums (
cat_id mediumint(8) UNSIGNED NOT NULL,
forum_name varchar(150),
forum_desc text,
forum_status tinyint(4) DEFAULT '0' NOT NULL,
forum_status tinyint(4) DEFAULT '0' NOT NULL,
forum_order mediumint(8) UNSIGNED DEFAULT '1' NOT NULL,
forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
@ -145,7 +157,7 @@ CREATE TABLE phpbb_forums (
auth_attachments tinyint(2) DEFAULT '0' NOT NULL,
PRIMARY KEY (forum_id),
KEY forums_order (forum_order),
KEY cat_id (cat_id),
KEY cat_id (cat_id),
KEY forum_last_post_id (forum_last_post_id)
);
@ -160,18 +172,18 @@ CREATE TABLE phpbb_posts (
forum_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
poster_id mediumint(8) DEFAULT '0' NOT NULL,
post_time int(11) DEFAULT '0' NOT NULL,
poster_ip char(8) NOT NULL,
post_username varchar(25),
poster_ip char(8) NOT NULL,
post_username varchar(25),
enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
enable_html tinyint(1) DEFAULT '0' NOT NULL,
enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
enable_sig tinyint(1) DEFAULT '1' NOT NULL,
enable_sig tinyint(1) DEFAULT '1' NOT NULL,
post_edit_time int(11),
post_edit_count smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (post_id),
KEY forum_id (forum_id),
KEY topic_id (topic_id),
KEY poster_id (poster_id),
KEY poster_id (poster_id),
KEY post_time (post_time)
);
@ -203,8 +215,8 @@ CREATE TABLE phpbb_privmsgs (
privmsgs_ip char(8) NOT NULL,
privmsgs_enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
privmsgs_enable_html tinyint(1) DEFAULT '0' NOT NULL,
privmsgs_enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
privmsgs_attach_sig tinyint(1) DEFAULT '1' NOT NULL,
privmsgs_enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
privmsgs_attach_sig tinyint(1) DEFAULT '1' NOT NULL,
PRIMARY KEY (privmsgs_id),
KEY privmsgs_from_userid (privmsgs_from_userid),
KEY privmsgs_to_userid (privmsgs_to_userid)
@ -217,7 +229,7 @@ CREATE TABLE phpbb_privmsgs (
#
CREATE TABLE phpbb_privmsgs_text (
privmsgs_text_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL,
privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL,
privmsgs_text text,
PRIMARY KEY (privmsgs_text_id)
);
@ -233,7 +245,7 @@ CREATE TABLE phpbb_ranks (
rank_min mediumint(8) DEFAULT '0' NOT NULL,
rank_special tinyint(1) DEFAULT '0',
rank_image varchar(255),
PRIMARY KEY (rank_id)
PRIMARY KEY (rank_id)
);
@ -258,7 +270,7 @@ CREATE TABLE phpbb_search_wordlist (
word_text varchar(50) binary NOT NULL default '',
word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
word_common tinyint(1) unsigned NOT NULL default '0',
PRIMARY KEY (word_text),
PRIMARY KEY (word_text),
KEY word_id (word_id)
);
@ -270,6 +282,7 @@ CREATE TABLE phpbb_search_wordmatch (
post_id mediumint(8) UNSIGNED NOT NULL default '0',
word_id mediumint(8) UNSIGNED NOT NULL default '0',
title_match tinyint(1) NOT NULL default '0',
KEY post_id (post_id),
KEY word_id (word_id)
);
@ -282,12 +295,7 @@ CREATE TABLE phpbb_search_wordmatch (
# this table a type HEAP. This type of table is stored
# within system memory and therefore for big busy boards
# is likely to be noticeably faster than continually
# writing to disk ...
#
# I must admit I read about this type on vB's board.
# Hey, I never said you cannot get basic ideas from
# competing boards, just that I find it's best not to
# look at any code ... !
# writing to disk ...
#
CREATE TABLE phpbb_sessions (
session_id char(32) DEFAULT '' NOT NULL,
@ -297,11 +305,25 @@ CREATE TABLE phpbb_sessions (
session_ip char(8) DEFAULT '0' NOT NULL,
session_page int(11) DEFAULT '0' NOT NULL,
session_logged_in tinyint(1) DEFAULT '0' NOT NULL,
session_admin tinyint(2) DEFAULT '0' NOT NULL,
PRIMARY KEY (session_id),
KEY session_user_id (session_user_id),
KEY session_id_ip_user_id (session_id, session_ip, session_user_id)
);
# --------------------------------------------------------
#
# Table structure for table `phpbb_sessions_keys`
#
CREATE TABLE phpbb_sessions_keys (
key_id varchar(32) DEFAULT '0' NOT NULL,
user_id mediumint(8) DEFAULT '0' NOT NULL,
last_ip varchar(8) DEFAULT '0' NOT NULL,
last_login int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (key_id, user_id),
KEY last_login (last_login)
);
# --------------------------------------------------------
#
@ -321,8 +343,8 @@ CREATE TABLE phpbb_smilies (
# Table structure for table 'phpbb_themes'
#
CREATE TABLE phpbb_themes (
themes_id mediumint(8) UNSIGNED NOT NULL auto_increment,
template_name varchar(30) NOT NULL default '',
themes_id mediumint(8) UNSIGNED NOT NULL auto_increment,
template_name varchar(30) NOT NULL default '',
style_name varchar(30) NOT NULL default '',
head_stylesheet varchar(100) default NULL,
body_background varchar(100) default NULL,
@ -361,9 +383,9 @@ CREATE TABLE phpbb_themes (
fontcolor3 varchar(6) default NULL,
span_class1 varchar(25) default NULL,
span_class2 varchar(25) default NULL,
span_class3 varchar(25) default NULL,
img_size_poll smallint(5) UNSIGNED,
img_size_privmsg smallint(5) UNSIGNED,
span_class3 varchar(25) default NULL,
img_size_poll smallint(5) UNSIGNED,
img_size_privmsg smallint(5) UNSIGNED,
PRIMARY KEY (themes_id)
);
@ -429,8 +451,8 @@ CREATE TABLE phpbb_topics (
PRIMARY KEY (topic_id),
KEY forum_id (forum_id),
KEY topic_moved_id (topic_moved_id),
KEY topic_status (topic_status),
KEY topic_type (topic_type)
KEY topic_status (topic_status),
KEY topic_type (topic_type)
);
@ -443,7 +465,7 @@ CREATE TABLE phpbb_topics_watch (
user_id mediumint(8) NOT NULL DEFAULT '0',
notify_status tinyint(1) NOT NULL default '0',
KEY topic_id (topic_id),
KEY user_id (user_id),
KEY user_id (user_id),
KEY notify_status (notify_status)
);
@ -453,38 +475,38 @@ CREATE TABLE phpbb_topics_watch (
# Table structure for table 'phpbb_users'
#
CREATE TABLE phpbb_users (
user_id mediumint(8) NOT NULL auto_increment,
user_id mediumint(8) NOT NULL,
user_active tinyint(1) DEFAULT '1',
username varchar(25) NOT NULL,
user_password varchar(32) NOT NULL,
user_session_time int(11) DEFAULT '0' NOT NULL,
user_session_page smallint(5) DEFAULT '0' NOT NULL,
user_lastvisit int(11) DEFAULT '0' NOT NULL,
user_regdate int(11) DEFAULT '0' NOT NULL,
user_session_time int(11) DEFAULT '0' NOT NULL,
user_session_page smallint(5) DEFAULT '0' NOT NULL,
user_lastvisit int(11) DEFAULT '0' NOT NULL,
user_regdate int(11) DEFAULT '0' NOT NULL,
user_level tinyint(4) DEFAULT '0',
user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_timezone float DEFAULT '0' NOT NULL,
user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
user_style tinyint(4),
user_lang varchar(255),
user_dateformat varchar(14) DEFAULT 'd M Y H:i' NOT NULL,
user_new_privmsg smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
user_unread_privmsg smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
user_last_privmsg int(11) DEFAULT '0' NOT NULL,
user_emailtime int(11),
user_viewemail tinyint(1),
user_attachsig tinyint(1),
user_allowhtml tinyint(1) DEFAULT '1',
user_allowbbcode tinyint(1) DEFAULT '1',
user_allowsmile tinyint(1) DEFAULT '1',
user_allowavatar tinyint(1) DEFAULT '1' NOT NULL,
user_allow_pm tinyint(1) DEFAULT '1' NOT NULL,
user_allow_viewonline tinyint(1) DEFAULT '1' NOT NULL,
user_new_privmsg smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
user_unread_privmsg smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
user_last_privmsg int(11) DEFAULT '0' NOT NULL,
user_emailtime int(11),
user_viewemail tinyint(1),
user_attachsig tinyint(1),
user_allowhtml tinyint(1) DEFAULT '1',
user_allowbbcode tinyint(1) DEFAULT '1',
user_allowsmile tinyint(1) DEFAULT '1',
user_allowavatar tinyint(1) DEFAULT '1' NOT NULL,
user_allow_pm tinyint(1) DEFAULT '1' NOT NULL,
user_allow_viewonline tinyint(1) DEFAULT '1' NOT NULL,
user_notify tinyint(1) DEFAULT '1' NOT NULL,
user_notify_pm tinyint(1) DEFAULT '1' NOT NULL,
user_popup_pm tinyint(1) DEFAULT '0' NOT NULL,
user_notify_pm tinyint(1) DEFAULT '0' NOT NULL,
user_popup_pm tinyint(1) DEFAULT '0' NOT NULL,
user_rank int(11) DEFAULT '0',
user_avatar varchar(100),
user_avatar_type tinyint(4) DEFAULT '0' NOT NULL,
user_avatar_type tinyint(4) DEFAULT '0' NOT NULL,
user_email varchar(255),
user_icq varchar(15),
user_website varchar(100),
@ -498,7 +520,7 @@ CREATE TABLE phpbb_users (
user_interests varchar(255),
user_actkey varchar(32),
user_newpasswd varchar(32),
PRIMARY KEY (user_id),
PRIMARY KEY (user_id),
KEY user_session_time (user_session_time)
);

View file

@ -24,6 +24,9 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_theme_create
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_local','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remote','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_autologin','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_autologin_time','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page','15');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page','50');
@ -39,6 +42,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_delivery','0'
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('sendmail_fix','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval','15');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form','0');
@ -52,7 +56,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style','1'
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_dateformat','D M d, Y g:i a');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('prune_enable','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('privmsg_disable','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('privmsg_disable','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_fax', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_mail', '');
@ -61,17 +65,17 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.yourdomain.tld');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', 'RC-4');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.18');
-- Categories
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 10);
-- Forums
INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, cat_id, forum_order, forum_posts, forum_topics, forum_last_post_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 'Test Forum 1', 'This is just a test forum.', 1, 10, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 1, 1, 1, 3);
INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, cat_id, forum_order, forum_posts, forum_topics, forum_last_post_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 'Test Forum 1', 'This is just a test forum.', 1, 10, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 1, 1, 3);
-- Users
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 0, 1, 0, 1, 1, NULL, '', '', '', '', '', '', 0, 0);
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 1, 1, 0, 1, 1, NULL, '', '', 0, '', '', '', 0, 0);
-- username: admin password: admin (change this or remove it once everything is working!)
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_popup_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( 2, 'Admin', 1, 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', '', '', '', '', '', '', 1, 1, '', '', '', 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, '', 'english', 0, 'd M Y h:i a', '', '', 0, 1);
@ -107,50 +111,48 @@ INSERT INTO phpbb_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_col
-- Smilies
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':grin:', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':smile:', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':sad:', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':eek:', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( '8O', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( '8-O', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':shock:', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':???:', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( '8)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( '8-)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':cool:', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':lol:', 'icon_lol.gif', 'Laughing');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':mad:', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':razz:', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':oops:', 'icon_redface.gif', 'Embarassed');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':cry:', 'icon_cry.gif', 'Crying or Very sad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':twisted:', 'icon_twisted.gif', 'Twisted Evil');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':wink:', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ';)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ';-)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':!:', 'icon_exclaim.gif', 'Exclamation');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':?:', 'icon_question.gif', 'Question');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':idea:', 'icon_idea.gif', 'Idea');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':arrow:', 'icon_arrow.gif', 'Arrow');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 1, ':D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 2, ':-D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 3, ':grin:', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 4, ':)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 5, ':-)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 6, ':smile:', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 7, ':(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 8, ':-(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 9, ':sad:', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 10, ':o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 11, ':-o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 12, ':eek:', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, ':shock:', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, ':?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':-?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':???:', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, '8)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, '8-)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, ':cool:', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, ':lol:', 'icon_lol.gif', 'Laughing');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':-x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':mad:', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':-P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':razz:', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':oops:', 'icon_redface.gif', 'Embarassed');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':cry:', 'icon_cry.gif', 'Crying or Very sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':twisted:', 'icon_twisted.gif', 'Twisted Evil');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':wink:', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ';)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ';-)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ':!:', 'icon_exclaim.gif', 'Exclamation');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ':?:', 'icon_question.gif', 'Question');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':idea:', 'icon_idea.gif', 'Idea');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':arrow:', 'icon_arrow.gif', 'Arrow');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':-|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
-- wordlist

View file

@ -33,16 +33,27 @@ CREATE TABLE phpbb_auth_access (
auth_reply int2 DEFAULT '0' NOT NULL,
auth_edit int2 DEFAULT '0' NOT NULL,
auth_delete int2 DEFAULT '0' NOT NULL,
auth_announce int2 DEFAULT '0' NOT NULL,
auth_sticky int2 DEFAULT '0' NOT NULL,
auth_announce int2 DEFAULT '0' NOT NULL,
auth_vote int2 DEFAULT '0' NOT NULL,
auth_pollcreate int2 DEFAULT '0' NOT NULL,
auth_attachments int2 DEFAULT '0' NOT NULL,
auth_vote int2 DEFAULT '0' NOT NULL,
auth_mod int2 DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_auth_access_pkey PRIMARY KEY (group_id, forum_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_confirm
-------------------------------------------------------- */
CREATE TABLE phpbb_confirm (
confirm_id char(32) DEFAULT '' NOT NULL,
session_id char(32) DEFAULT '' NOT NULL,
code char(6) DEFAULT '' NOT NULL,
CONSTRAINT phpbb_confirm_pkey PRIMARY KEY (session_id, confirm_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_groups
-------------------------------------------------------- */
@ -199,12 +210,12 @@ CREATE TABLE phpbb_privmsgs (
privmsgs_ip char(8) NOT NULL,
privmsgs_enable_bbcode int2 DEFAULT '1' NOT NULL,
privmsgs_enable_html int2 DEFAULT '0' NOT NULL,
privmsgs_enable_smilies int2 DEFAULT '1' NOT NULL,
privmsgs_attach_sig int2 DEFAULT '1' NOT NULL,
privmsgs_enable_smilies int2 DEFAULT '1' NOT NULL,
privmsgs_attach_sig int2 DEFAULT '1' NOT NULL,
CONSTRAINT phpbb_privmsgs_pkey PRIMARY KEY (privmsgs_id)
);
CREATE INDEX privmsgs_from_userid_index ON phpbb_privmsgs (privmsgs_from_userid);
CREATE INDEX privmsgs_to_userid_index ON phpbb_privmsgs (privmsgs_to_userid);
CREATE INDEX privmsgs_from_userid_phpbb_privmsgs_index ON phpbb_privmsgs (privmsgs_from_userid);
CREATE INDEX privmsgs_to_userid_phpbb_privmsgs_index ON phpbb_privmsgs (privmsgs_to_userid);
/* --------------------------------------------------------
@ -212,7 +223,7 @@ CREATE INDEX privmsgs_to_userid_index ON phpbb_privmsgs (privmsgs_to_userid);
-------------------------------------------------------- */
CREATE TABLE phpbb_privmsgs_text (
privmsgs_text_id int4 DEFAULT '0' NOT NULL,
privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL,
privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL,
privmsgs_text text,
CONSTRAINT phpbb_privmsgs_text_pkey PRIMARY KEY (privmsgs_text_id)
);
@ -240,19 +251,19 @@ CREATE TABLE phpbb_search_results (
search_array text NOT NULL,
CONSTRAINT phpbb_search_results_pkey PRIMARY KEY (search_id)
);
CREATE INDEX session_id_phpbb_search_results ON phpbb_search_results (session_id);
CREATE INDEX session_id_phpbb_search_results_index ON phpbb_search_results (session_id);
/* --------------------------------------------------------
Table structure for table phpbb_search_wordlist
-------------------------------------------------------- */
CREATE TABLE phpbb_search_wordlist (
word_id int4 DEFAULT nextval('phpbb_search_wordlist_id_seq'::text) NOT NULL,
word_text varchar(50) NOT NULL DEFAULT '',
word_common int2 NOT NULL DEFAULT '0',
word_id int4 DEFAULT nextval('phpbb_search_wordlist_id_seq'::text) NOT NULL,
word_text varchar(50) NOT NULL DEFAULT '',
word_common int2 NOT NULL DEFAULT '0',
CONSTRAINT phpbb_search_wordlist_pkey PRIMARY KEY (word_text)
);
CREATE INDEX word_id_phpbb_search_wordlist ON phpbb_search_wordlist (word_id);
CREATE INDEX word_id_phpbb_search_wordlist_index ON phpbb_search_wordlist (word_id);
/* --------------------------------------------------------
@ -263,7 +274,8 @@ CREATE TABLE phpbb_search_wordmatch (
word_id int4 NOT NULL default '0',
title_match int2 NOT NULL default '0'
);
CREATE INDEX word_id_phpbb_search_wordmatch ON phpbb_search_wordmatch (word_id);
CREATE INDEX word_id_phpbb_search_wordmatch_index ON phpbb_search_wordmatch (word_id);
CREATE INDEX post_id_phpbb_search_wordmatch_index ON phpbb_search_wordmatch (post_id);
/* --------------------------------------------------------
@ -277,11 +289,23 @@ CREATE TABLE phpbb_sessions (
session_ip char(8) DEFAULT '0' NOT NULL,
session_page int4 DEFAULT '0' NOT NULL,
session_logged_in int2 DEFAULT '0' NOT NULL,
session_admin int2 DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_session_pkey PRIMARY KEY (session_id)
);
CREATE INDEX session_user_id ON phpbb_sessions (session_user_id);
CREATE INDEX session_id_ip_user_id ON phpbb_sessions (session_id, session_ip, session_user_id);
CREATE INDEX session_user_id_phpbb_sessions_index ON phpbb_sessions (session_user_id);
CREATE INDEX session_id_ip_user_id_phpbb_sessions_index ON phpbb_sessions (session_id, session_ip, session_user_id);
/* --------------------------------------------------------
Table structure for table phpbb_sessions_keys
-------------------------------------------------------- */
CREATE TABLE phpbb_sessions_keys (
key_id char(32) DEFAULT '0' NOT NULL,
user_id int4 DEFAULT '0' NOT NULL,
last_ip char(8) DEFAULT '0' NOT NULL,
last_login int4 DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_sessions_keys_pkey PRIMARY KEY (key_id, user_id)
);
CREATE INDEX last_login_phpbb_sessions_keys_index ON phpbb_sessions_keys (last_login);
/* --------------------------------------------------------
Table structure for table phpbb_smilies
@ -340,8 +364,8 @@ CREATE TABLE phpbb_themes (
span_class1 varchar(25),
span_class2 varchar(25),
span_class3 varchar(25),
img_size_poll int2,
img_size_privmsg int2,
img_size_poll int2,
img_size_privmsg int2,
CONSTRAINT phpbb_themes_pkey PRIMARY KEY (themes_id)
);
@ -399,9 +423,9 @@ CREATE TABLE phpbb_topics (
topic_status int2 DEFAULT '0' NOT NULL,
topic_vote int2 DEFAULT '0' NOT NULL,
topic_type int2 DEFAULT '0' NOT NULL,
topic_first_post_id int4 DEFAULT '0' NOT NULL,
topic_first_post_id int4 DEFAULT '0' NOT NULL,
topic_last_post_id int4 DEFAULT '0' NOT NULL,
topic_moved_id int4 DEFAULT '0' NOT NULL,
topic_moved_id int4 DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_topics_pkey PRIMARY KEY (topic_id)
);
CREATE INDEX forum_id_phpbb_topics_index ON phpbb_topics (forum_id);
@ -445,9 +469,9 @@ CREATE TABLE phpbb_users (
username varchar(25) DEFAULT '' NOT NULL,
user_regdate int4 DEFAULT '0' NOT NULL,
user_password varchar(32) DEFAULT '' NOT NULL,
user_session_time int4 DEFAULT '0' NOT NULL,
user_session_page int2 DEFAULT '0' NOT NULL,
user_lastvisit int4 DEFAULT '0' NOT NULL,
user_session_time int4 DEFAULT '0' NOT NULL,
user_session_page int2 DEFAULT '0' NOT NULL,
user_lastvisit int4 DEFAULT '0' NOT NULL,
user_email varchar(255),
user_icq varchar(15),
user_website varchar(100),
@ -461,10 +485,10 @@ CREATE TABLE phpbb_users (
user_yim varchar(255),
user_msnm varchar(255),
user_posts int4 DEFAULT '0' NOT NULL,
user_new_privmsg int2 DEFAULT '0' NOT NULL,
user_unread_privmsg int2 DEFAULT '0' NOT NULL,
user_last_privmsg int4 DEFAULT '0' NOT NULL,
user_emailtime int4,
user_new_privmsg int2 DEFAULT '0' NOT NULL,
user_unread_privmsg int2 DEFAULT '0' NOT NULL,
user_last_privmsg int4 DEFAULT '0' NOT NULL,
user_emailtime int4,
user_viewemail int2,
user_attachsig int2,
user_allowhtml int2 DEFAULT '1',
@ -474,14 +498,14 @@ CREATE TABLE phpbb_users (
user_allowavatar int2 DEFAULT '1' NOT NULL,
user_allow_viewonline int2 DEFAULT '1' NOT NULL,
user_rank int4 DEFAULT '0',
user_avatar varchar(100),
user_avatar_type int2 DEFAULT '0' NOT NULL,
user_level int4 DEFAULT '1',
user_avatar varchar(100),
user_avatar_type int2 DEFAULT '0' NOT NULL,
user_level int4 DEFAULT '0',
user_lang varchar(255),
user_timezone real DEFAULT '0' NOT NULL,
user_dateformat varchar(14) DEFAULT 'd M Y H:m' NOT NULL,
user_notify_pm int2 DEFAULT '1' NOT NULL,
user_popup_pm int2 DEFAULT '0' NOT NULL,
user_timezone decimal(5) DEFAULT '0' NOT NULL,
user_dateformat varchar(14) DEFAULT 'd M Y H:i' NOT NULL,
user_notify_pm int2 DEFAULT '0' NOT NULL,
user_popup_pm int2 DEFAULT '0' NOT NULL,
user_notify int2,
user_actkey varchar(32),
user_newpasswd varchar(32),

File diff suppressed because it is too large Load diff

View file

@ -21,6 +21,8 @@
define('IN_PHPBB', true);
$phpbb_root_path = './../';
if ( !defined('INSTALLING') )
{
error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
@ -30,15 +32,14 @@ if ( !defined('INSTALLING') )
// If we are being called from the install script then we don't need these
// as they are already included.
//
include('extension.inc');
include('config.'.$phpEx);
include('includes/constants.'.$phpEx);
include('includes/functions.'.$phpEx);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'config.'.$phpEx);
include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
if( defined("PHPBB_INSTALLED") )
{
header("Location: index.$phpEx");
exit;
redirect("../index.$phpEx");
}
}
@ -47,9 +48,9 @@ if ( !defined('INSTALLING') )
//
$dbms = 'mysql';
include('includes/db.'.$phpEx);
include('includes/bbcode.'.$phpEx);
include('includes/functions_search.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
set_time_limit(0); // Unlimited execution time
@ -87,11 +88,10 @@ function common_header()
the page which called the style sheet (i.e. this page in the root phpBB directory)
whereas all other browsers see image paths relative to the style sheet. Stupid NS again!
*/
TH { background-image: url(templates/subSilver/images/cellpic3.gif) }
TD.cat { background-image: url(templates/subSilver/images/cellpic1.gif) }
TD.rowpic { background-image: url(templates/subSilver/images/cellpic2.jpg); background-repeat: repeat-y }
td.icqback { background-image: url(templates/subSilver/images/icon_icq_add.gif); background-repeat: no-repeat }
TD.catHead,TD.catSides,TD.catLeft,TD.catRight,TD.catBottom { background-image: url(templates/subSilver/images/cellpic1.gif) }
th { background-image: url('../templates/subSilver/images/cellpic3.gif') }
td.cat { background-image: url('../templates/subSilver/images/cellpic1.gif') }
td.rowpic { background-image: url('../templates/subSilver/images/cellpic2.jpg'); background-repeat: repeat-y }
td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom { background-image: url('../templates/subSilver/images/cellpic1.gif') }
font,th,td,p,body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11pt }
a:link,a:active,a:visited { font-family: Verdana, Arial, Helvetica, sans-serif; color : #006699; font-size:11pt }
@ -103,7 +103,7 @@ hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;}
.ok {color:green}
/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
@import url("templates/subSilver/formIE.css");
@import url("../templates/subSilver/formIE.css");
-->
</style>
</head>
@ -113,7 +113,7 @@ hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;}
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="Forum Home" vspace="1" /></td>
<td><img src="../templates/subSilver/images/logo_phpBB.gif" border="0" alt="Forum Home" vspace="1" /></td>
<td align="center" width="100%" valign="middle"><span class="maintitle">Upgrading to phpBB 2.0</span></td>
</tr>
</table></td>
@ -161,7 +161,7 @@ function query($sql, $errormsg)
}
}
function smiley_replace($text = "")
function smiley_replace($text = '')
{
global $db;
@ -186,7 +186,7 @@ function smiley_replace($text = "")
}
}
return ( $text != "" ) ? preg_replace($search, $replace, $text) : "";
return ( $text != '' ) ? preg_replace($search, $replace, $text) : '';
}
@ -194,29 +194,29 @@ function get_schema()
{
global $table_prefix;
$schemafile = file('db/schemas/mysql_schema.sql');
$schemafile = file('schemas/mysql_schema.sql');
$tabledata = 0;
for($i=0; $i < count($schemafile); $i++)
{
$line = $schemafile[$i];
if ( preg_match("/^CREATE TABLE (\w+)/i", $line, $matches) )
if ( preg_match('/^CREATE TABLE (\w+)/i', $line, $matches) )
{
// Start of a new table definition, set some variables and go to the next line.
$tabledata = 1;
// Replace the 'phpbb_' prefix by the user defined prefix.
$table = str_replace("phpbb_", $table_prefix, $matches[1]);
$table = str_replace('phpbb_', $table_prefix, $matches[1]);
$table_def[$table] = "CREATE TABLE $table (\n";
continue;
}
if ( preg_match("/^\);/", $line) )
if ( preg_match('/^\);/', $line) )
{
// End of the table definition
// After this we will skip everything until the next 'CREATE' line
$tabledata = 0;
$table_def[$table] .= ")"; // We don't need the closing semicolon
$table_def[$table] .= ')'; // We don't need the closing semicolon
}
if ( $tabledata == 1 )
@ -224,18 +224,18 @@ function get_schema()
// We are inside a table definition, parse this line.
// Add the current line to the complete table definition:
$table_def[$table] .= $line;
if ( preg_match("/^\s*(\w+)\s+(\w+)\((\d+)\)(.*)$/", $line, $matches) )
if ( preg_match('/^\s*(\w+)\s+(\w+)\(([\d,]+)\)(.*)$/', $line, $matches) )
{
// This is a column definition
$field = $matches[1];
$type = $matches[2];
$size = $matches[3];
preg_match("/DEFAULT (NULL|\'.*?\')[,\s](.*)$/i", $matches[4], $match);
preg_match('/DEFAULT (NULL|\'.*?\')[,\s](.*)$/i', $matches[4], $match);
$default = $match[1];
$notnull = ( preg_match("/NOT NULL/i", $matches[4]) ) ? 1 : 0;
$auto_increment = ( preg_match("/auto_increment/i", $matches[4]) ) ? 1 : 0;
$notnull = ( preg_match('/NOT NULL/i', $matches[4]) ) ? 1 : 0;
$auto_increment = ( preg_match('/auto_increment/i', $matches[4]) ) ? 1 : 0;
$field_def[$table][$field] = array(
'type' => $type,
@ -246,17 +246,17 @@ function get_schema()
);
}
if ( preg_match("/\s*PRIMARY\s+KEY\s*\((.*)\).*/", $line, $matches) )
if ( preg_match('/\s*PRIMARY\s+KEY\s*\((.*)\).*/', $line, $matches) )
{
// Primary key
$key_def[$table]['PRIMARY'] = $matches[1];
}
else if ( preg_match("/\s*KEY\s+(\w+)\s*\((.*)\)/", $line, $matches) )
else if ( preg_match('/\s*KEY\s+(\w+)\s*\((.*)\)/', $line, $matches) )
{
// Normal key
$key_def[$table][$matches[1]] = $matches[2];
}
else if ( preg_match("/^\s*(\w+)\s*(.*?),?\s*$/", $line, $matches) )
else if ( preg_match('/^\s*(\w+)\s*(.*?),?\s*$/', $line, $matches) )
{
// Column definition
$create_def[$table][$matches[1]] = $matches[2];
@ -280,11 +280,11 @@ function get_inserts()
{
global $table_prefix;
$insertfile = file("db/schemas/mysql_basic.sql");
$insertfile = file('schemas/mysql_basic.sql');
for($i = 0; $i < count($insertfile); $i++)
{
if ( preg_match("/(INSERT INTO (\w+)\s.*);/i", str_replace("phpbb_", $table_prefix, $insertfile[$i]), $matches) )
if ( preg_match('/(INSERT INTO (\w+)\s.*);/i', str_replace('phpbb_', $table_prefix, $insertfile[$i]), $matches) )
{
$returnvalue[$matches[2]][] = $matches[1];
}
@ -323,16 +323,16 @@ function output_table_content($content)
function bbdecode($message)
{
// Undo [code]
$code_start_html = "<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Code:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><PRE>";
$code_end_html = "</PRE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode End -->";
$message = str_replace($code_start_html, "[code]", $message);
$message = str_replace($code_end_html, "[/code]", $message);
$code_start_html = '<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Code:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><PRE>';
$code_end_html = '</PRE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode End -->';
$message = str_replace($code_start_html, '[code]', $message);
$message = str_replace($code_end_html, '[/code]', $message);
// Undo [quote]
$quote_start_html = "<!-- BBCode Quote Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Quote:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><BLOCKQUOTE>";
$quote_end_html = "</BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode Quote End -->";
$message = str_replace($quote_start_html, "[quote]", $message);
$message = str_replace($quote_end_html, "[/quote]", $message);
$quote_start_html = '<!-- BBCode Quote Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Quote:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><BLOCKQUOTE>';
$quote_end_html = '</BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode Quote End -->';
$message = str_replace($quote_start_html, '[quote]', $message);
$message = str_replace($quote_end_html, '[/quote]', $message);
// Undo [b] and [i]
$message = preg_replace("#<!-- BBCode Start --><B>(.*?)</B><!-- BBCode End -->#s", "[b]\\1[/b]", $message);
@ -353,17 +353,17 @@ function bbdecode($message)
// Undo lists (unordered/ordered)
// <li> tags:
$message = str_replace("<!-- BBCode --><LI>", "[*]", $message);
$message = str_replace('<!-- BBCode --><LI>', '[*]', $message);
// [list] tags:
$message = str_replace("<!-- BBCode ulist Start --><UL>", "[list]", $message);
$message = str_replace('<!-- BBCode ulist Start --><UL>', '[list]', $message);
// [list=x] tags:
$message = preg_replace("#<!-- BBCode olist Start --><OL TYPE=([A1])>#si", "[list=\\1]", $message);
$message = preg_replace('#<!-- BBCode olist Start --><OL TYPE=([A1])>#si', "[list=\\1]", $message);
// [/list] tags:
$message = str_replace("</UL><!-- BBCode ulist End -->", "[/list]", $message);
$message = str_replace("</OL><!-- BBCode olist End -->", "[/list]", $message);
$message = str_replace('</UL><!-- BBCode ulist End -->', '[/list]', $message);
$message = str_replace('</OL><!-- BBCode olist End -->', '[/list]', $message);
return $message;
}
@ -386,9 +386,8 @@ function inarray($needle, $haystack)
function end_step($next)
{
global $debug;
print "<hr /><a href=\"$PHP_SELF?next=$next\">Next step: <b>$next</b></a><br /><br />\n";
exit;
}
//
// End functions
@ -565,9 +564,11 @@ if ( !empty($next) )
if ( !inarray($name, $ignore_configs) )
{
$name = ( !empty($rename_configs[$name]) ) ? $rename_configs[$name] : $name;
// phpBB 1.x has some problems with escaping strings in the database. Try to correct for
// this by removing all slashes and then escaping once.
$sql = "REPLACE INTO " . CONFIG_TABLE . " (config_name, config_value)
VALUES ('$name', '" . stripslashes($value) . "')";
VALUES ('$name', '".addslashes(stripslashes(stripslashes($value)))."')";
query($sql, "Couldn't update config table with values from old config table");
}
}
@ -764,12 +765,12 @@ if ( !empty($next) )
$sql = "SELECT COUNT(*) AS total, MAX(user_id) AS maxid
FROM " . USERS_TABLE;
$result = query($sql, "Couldn't get max post_id.");
$result = query($sql, "Couldn't get max user_id.");
$maxid = $db->sql_fetchrow($result);
$row = $db->sql_fetchrow($result);
$totalposts = $maxid['total'];
$maxid = $maxid['maxid'];
$totalposts = $row['total'];
$maxid = $row['maxid'];
$sql = "ALTER TABLE " . USERS_TABLE . "
ADD user_sig_bbcode_uid CHAR(10),
@ -819,16 +820,9 @@ if ( !empty($next) )
$group_id = $db->sql_nextid();
if ( $group_id != 0 )
{
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending)
VALUES ($group_id, " . $row['user_id'] . ", 0)";
query($sql, "Wasn't able to insert user ".$row['user_id']." into table ".USER_GROUP_TABLE);
}
else
{
print "Couldn't get insert ID for " . GROUPS_TABLE . " table<br>\n";
}
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending)
VALUES ($group_id, " . $row['user_id'] . ", 0)";
query($sql, "Wasn't able to insert user ".$row['user_id']." into table ".USER_GROUP_TABLE);
if ( is_int($row['user_regdate']) )
{
@ -874,7 +868,7 @@ if ( !empty($next) )
$row['user_website'] = addslashes($website);
$row['user_icq'] = (ereg("^[0-9]+$", $row['user_icq'])) ? $row['user_icq'] : '';
reset($checklength);
@reset($checklength);
while($field = each($checklength))
{
@ -941,6 +935,14 @@ if ( !empty($next) )
}
}
// Set any non-standard (like) email addresses to nothing
// could do this above as a preg_ but this one query may
// be faster
$sql = "UPDATE " . USERS_TABLE . "
SET user_email = ''
WHERE user_email NOT REGEXP '^[a-zA-Z0-9_\+\.\-]+@.*[a-zA-Z0-9\-_]+\.[a-zA-Z]{2,}$'";
query($sql, "Couldn't update ".USERS_TABLE." table non-standard user_email entries");
print " <span class=\"ok\"><b>OK</b></span><br />\n";
lock_tables(0);
@ -1075,7 +1077,7 @@ if ( !empty($next) )
// undo 1.2.x encoding..
$row['post_text'] = bbdecode(stripslashes($row['post_text']));
$row['post_text'] = undo_make_clickable($row['post_text']);
$row['post_text'] = str_replace("<BR>", "\n", $row['post_text']);
$row['post_text'] = str_replace('<BR>', "\n", $row['post_text']);
// make a uid
$uid = make_bbcode_uid();
@ -1086,14 +1088,14 @@ if ( !empty($next) )
$row['post_text'] = addslashes($row['post_text']);
$edited_sql = "";
if ( preg_match("/^(.*?)([\n]+<font size=\-1>\[ This message was .*?)$/s", $row['post_text'], $matches) )
if ( preg_match('/^(.*?)([\n]+<font size=\-1>\[ This message was .*?)$/s', $row['post_text'], $matches) )
{
$row['post_text'] = $matches[1];
$edit_info = $matches[2];
$edit_times = count(explode(" message ", $edit_info)) - 1; // Taken from example for substr_count in annotated PHP manual
$edit_times = count(explode(' message ', $edit_info)) - 1; // Taken from example for substr_count in annotated PHP manual
if ( preg_match("/^.* by: (.*?) on (....)-(..)-(..) (..):(..) \]<\/font>/s", $edit_info, $matches) )
if ( preg_match('/^.* by: (.*?) on (....)-(..)-(..) (..):(..) \]<\/font>/s', $edit_info, $matches) )
{
$edited_user = $matches[1];
$edited_time = gmmktime($matches[5], $matches[6], 0, $matches[3], $matches[4], $matches[2]);
@ -1130,7 +1132,7 @@ if ( !empty($next) )
$inc++;
if ( $inc == $per_pct )
{
print ".";
print '.';
flush();
$inc = 0;
}
@ -1259,7 +1261,7 @@ if ( !empty($next) )
$inc++;
if ( $inc == $per_pct )
{
print ".";
print '.';
flush();
$inc = 0;
}
@ -1279,7 +1281,7 @@ if ( !empty($next) )
while( $row = $db->sql_fetchrow($result) )
{
// Check if this moderator and this forum still exist
$sql = "SELECT NULL
$sql = "SELECT user_id
FROM " . USERS_TABLE . ", " . FORUMS_TABLE . "
WHERE user_id = " . $row['user_id'] . "
AND forum_id = " . $row['forum_id'];
@ -1309,6 +1311,35 @@ if ( !empty($next) )
print "<span class=\"ok\"><b>OK</b></span><br />\n";
}
print " * Setting correct user_level for moderators ::";
flush();
$sql = "SELECT DISTINCT u.user_id
FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa
WHERE aa.auth_mod = 1
AND ug.group_id = aa.group_id
AND u.user_id = ug.user_id
AND u.user_level <> " . ADMIN;
$result = query($sql, "Couldn't obtain list of moderators");
if ( $row = $db->sql_fetchrow($result) )
{
$ug_sql = '';
do
{
$ug_sql .= ( ( $ug_sql != '' ) ? ', ' : '' ) . $row['user_id'];
}
while ( $row = $db->sql_fetchrow($result) );
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . MOD . "
WHERE user_id IN ($ug_sql)";
query($sql, "Couldn't set moderator status for users");
}
print "<span class=\"ok\"><b>OK</b></span><br />\n";
end_step('convert_privforums');
@ -1600,77 +1631,6 @@ if ( !empty($next) )
}
print " <span class=\"ok\"><b>OK</b></span><br />\n";
end_step('fulltext_search_indexing');
case 'fulltext_search_indexing':
//
// Generate search word list
//
// Fetch a batch of posts_text entries
//
$sql = "SELECT COUNT(*) as total, MAX(post_id) as max_post_id
FROM " . POSTS_TEXT_TABLE;
$result = query($sql, "Couldn't get post count totals");
$max_post_id = $db->sql_fetchrow($result);
$totalposts = $max_post_id['total'];
$max_post_id = $max_post_id['max_post_id'];
$per_percent = round(( $totalposts / 500 ) * 10);
$postcounter = ( !isset($HTTP_GET_VARS['batchstart']) ) ? 0 : $HTTP_GET_VARS['batchstart'];
$batchsize = 150; // Process this many posts per loop
$batchcount = 0;
$total_percent = 0;
for(;$postcounter <= $max_post_id; $postcounter += $batchsize)
{
$batchstart = $postcounter + 1;
$batchend = $postcounter + $batchsize;
$batchcount++;
print " * Fulltext Indexing ( $batchstart to $batchend ) :: ";
flush();
$sql = "SELECT *
FROM " . POSTS_TEXT_TABLE ."
WHERE post_id
BETWEEN $batchstart
AND $batchend";
$posts_result = query($sql, "Couldn't obtain post_text");
$per_pct = ceil( $db->sql_numrows($posts_result) / 40 );
$inc = 0;
if ( $row = $db->sql_fetchrow($posts_result) )
{
do
{
add_search_words($row['post_id'], $row['post_text'], $row['post_subject']);
$inc++;
if ( $inc == $per_pct )
{
print ".";
flush();
$inc = 0;
}
}
while( $row = $db->sql_fetchrow($posts_result) );
}
$db->sql_freeresult($posts_result);
// Remove common words after the first 2 batches and after every 4th batch after that.
if ( $batchcount % 4 == 3 )
{
remove_common('global', 0.4);
}
print " <span class=\"ok\"><b>OK</b></span><br />\n";
}
end_step('update_topics');
case 'update_topics':
@ -1836,7 +1796,7 @@ if ( !empty($next) )
$sql = "UPDATE " . $table_prefix . "config
SET config_value = '" . $script_path . "'
WHERE config_name = 'script_path'";
query($sql, "Couldn't insert Board admin email");
query($sql, "Couldn't insert Board script path");
//
// Change session table to HEAP if MySQL version matches
@ -1851,7 +1811,7 @@ if ( !empty($next) )
if ( preg_match("/^(3\.23)|(4\.)/", $version) )
{
$sql = "ALTER TABLE " . $table_prefix . "sessions
TYPE=HEAP";
TYPE=HEAP MAX_ROWS=500";
$db->sql_query($sql);
}
@ -1900,12 +1860,83 @@ if ( !empty($next) )
print "<span class=\"ok\"><b>OK</b></span><br />\n";
}
end_step('fulltext_search_indexing');
case 'fulltext_search_indexing':
//
// Generate search word list
//
// Fetch a batch of posts_text entries
//
$sql = "SELECT COUNT(*) as total, MAX(post_id) as max_post_id
FROM " . POSTS_TEXT_TABLE;
$result = query($sql, "Couldn't get post count totals");
$max_post_id = $db->sql_fetchrow($result);
$totalposts = $max_post_id['total'];
$max_post_id = $max_post_id['max_post_id'];
$per_percent = round(( $totalposts / 500 ) * 10);
$postcounter = ( !isset($HTTP_GET_VARS['batchstart']) ) ? 0 : $HTTP_GET_VARS['batchstart'];
$batchsize = 150; // Process this many posts per loop
$batchcount = 0;
$total_percent = 0;
for(;$postcounter <= $max_post_id; $postcounter += $batchsize)
{
$batchstart = $postcounter + 1;
$batchend = $postcounter + $batchsize;
$batchcount++;
print " * Fulltext Indexing ( $batchstart to $batchend ) :: ";
flush();
$sql = "SELECT *
FROM " . POSTS_TEXT_TABLE ."
WHERE post_id
BETWEEN $batchstart
AND $batchend";
$posts_result = query($sql, "Couldn't obtain post_text");
$per_pct = ceil( $db->sql_numrows($posts_result) / 40 );
$inc = 0;
if ( $row = $db->sql_fetchrow($posts_result) )
{
do
{
add_search_words('global', $row['post_id'], $row['post_text'], $row['post_subject']);
$inc++;
if ( $inc == $per_pct )
{
print ".";
flush();
$inc = 0;
}
}
while( $row = $db->sql_fetchrow($posts_result) );
}
$db->sql_freeresult($posts_result);
// Remove common words after the first 2 batches and after every 4th batch after that.
if ( $batchcount % 4 == 3 )
{
remove_common('global', 4/10);
}
print " <span class=\"ok\"><b>OK</b></span><br />\n";
}
echo "\n<br /><br />\n\n<font size=\"+3\"><b>UPGRADE COMPLETED</b></font><br />\n";
}
}
print "<br />If the upgrade completed without error you may click <a href=\"index.$phpEx\">Here</a> to proceed to the index<br />";
print "<br />If the upgrade completed without error you may click <a href=\"./../index.$phpEx\">Here</a> to proceed to the index<br />";
common_footer();
?>
?>

View file

@ -1,9 +0,0 @@
Subject: Llogari e re
Përshëndetje,
Llogaria e "{USERNAME}" është c'aktivizuar ose sapo krijuar; kontrolloni detajet mbi këtë përdorues dhe aktivizoni llogarinë duke klikuar lidhjen e mëposhtme:
{U_ACTIVATE}
{EMAIL_SIG}

View file

@ -1,10 +0,0 @@
Mesazhi i mëposhtëm është dërguar nga një administrator i "{SITENAME}". Nqs ky mesazh është i padëshirueshëm, abuzues apo përmban material të pahijshëm ju lutem kontaktoni webmasterin tek adresa:
{BOARD_EMAIL}
Ju lutem përfshini këtë mesazh (sidomos detajet e serverit).
Mesazhi i dërguar vazhdon:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{MESSAGE}

View file

@ -1,7 +0,0 @@
Subject: Llogaria u aktivizia
Përshëndetje {USERNAME},
Llogaria juaj tek "{SITENAME}" u aktivizua, ju mund të identifikoheni tashti duke përdorur emrin dhe fjalëkalimin që morët në mesazhin e mëparshëm.
{EMAIL_SIG}

View file

@ -1,18 +0,0 @@
Subject: Mirsevini tek forumi i {SITENAME}
{WELCOME_MSG}
Ju lutem ruajeni këtë mesazh për referencë. Informacioni mbi llogarinë tuaj është si më poshtë:
----------------------------
Identifikimi: {USERNAME}
Fjalëkalimi: {PASSWORD}
----------------------------
Llogaria juaj është e ç'aktivizuar tashti për tashti, administratori duhet ta aprovojë përpara se të keni mundësi të identifikoheni. Kur llogaria juaj të aprovohet do merrni një mesazh të ri.
Ju lutem mos harroni fjalëkalimin sepse ai ruhet i shifruar në regjistrin tonë dhe ne nuk mund ta deshifrojmë. Megjithatë nqs harroni fjalëkalimin ju mund të kërkoni një të ri i cili duhet aktivizuar në të njëjtën mënyrë.
Ju falënderojmë për regjistrimin.
{EMAIL_SIG}

View file

@ -1,52 +0,0 @@
Subject: Mirsevini tek forumi i {SITENAME}
{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 recived 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}

View file

@ -1,11 +0,0 @@
Subject: Jeni anëtar i këtij grupi tashmë
Urime,
Ju jeni pranuar tek grupi "{GROUP_NAME}" në {SITENAME}.
Ky veprim u bë nga moderatori i grupit ose administratori i forumit, kontaktoni ata për më shumë informacion.
Ju mund të shikoni anëtarësitë tuaja këtu:
{U_GROUPCP}
{EMAIL_SIG}

View file

@ -1,10 +0,0 @@
Subject: Kërkesa juaj u aprovua
Urime,
Kërkesa juaj për anëtarësim tek grupi "{GROUP_NAME}" tek {SITENAME} u aprovua.
Ju mund të shikoni anëtarësitë tuaja këtu:
{U_GROUPCP}
{EMAIL_SIG}

View file

@ -1,10 +0,0 @@
Subject: Dikush ka bërë kërkesë për anëtarësim tek grupi juaj
I nderuar {GROUP_MODERATOR},
Një anëtar ka kërkuar të anëtarësohet tek një nga grupet që moderoni tek {SITENAME}.
Për ta aprovuar ose mosaprovuar këtë kërkesë kliko:
{U_GROUPCP}
{EMAIL_SIG}

View file

@ -1,11 +0,0 @@
Subject: Sapo keni marrë mesazh privat të ri
Përshëndetje {USERNAME},
Ju sapo keni marrë një mesazh të ri privat në llogarinë tuaj tek "{SITENAME}" dhe keni kërkuar tu informojmë sa herë që kjo ndodh. Klikoni këtu për ta parë mesazhin e ri:
{U_INBOX}
Kini parasysh që gjithmonë mund të zgjidhni që të mos njoftoheni për mesazhe të reja duke ndryshuar vetitë e duhura tek profili juaj.
{EMAIL_SIG}

View file

@ -1,13 +0,0 @@
Përshëndetje {TO_USERNAME},
Mesazhi i mëposhtëm u dërgua për ju nga {FROM_USERNAME} nëpërmjet llogarisë tuaj tek {SITENAME}. Nqs ky mesazh është i padëshirueshëm, abuzues apo përmban material të pahijshëm ju lutem kontaktoni webmasterin tek adresa:
{BOARD_EMAIL}
Ju lutem përfshini këtë mesazh (sidomos detajet e serverit). Ju lutem njoftoni që adresa nga u dërgua ky mesazh është ajo e {FROM_USERNAME}.
Mesazhi i dërguar vazhdon:
~~~~~~~~~~~~~~~~~~~~~~~~~~~
{MESSAGE}

View file

@ -1,13 +0,0 @@
Subject: Përgjigje tek tema - {TOPIC_TITLE}
Përshëndetje {USERNAME},
Ju po merrni këtë mesazh sepse jeni duke vëzhguar temën "{TOPIC_TITLE}" tek {SITENAME}. Kjo temë ka pasur të paktën një përgjigje që nga vizita juaj e fundit. Ju mund të përdorni lidhjen e mëposhtme për të parë këto përgjigje; nuk do ju dërgohen lajmërime të tjera deri sa ta vizitoni temën.
{U_TOPIC}
Nqs nuk dëshironi më ta vëzhgoni këtë temë ose klikoni lidhjen "Ndalo së vëzhguari këtë temë", ose klikoni lidhjen e mëposhtme:
{U_STOP_WATCHING_TOPIC}
{EMAIL_SIG}

View file

@ -1,9 +0,0 @@
Subject: Riaktivizoni llogarinë tuaj
Përshëndetje {USERNAME},
Llogaria juaj tek "{SITENAME}" është c'aktivizuar, ka shumë mundësi për shkak të ndryshimeve në profilin tuaj. Klikoni në lidhjen e mëposhtme për ta riaktivizuar:
{U_ACTIVATE}
{EMAIL_SIG}

View file

@ -1,17 +0,0 @@
Subject: Aktivizoni fjalëkalimin e ri
Përshëndetje {USERNAME}
Po e merrni këtë mesazh sepse ju (ose dikush që pretendon të jetë ju) ka kërkuar një fjalëkalim i ri për llogarinë tuaj tek {SITENAME}. Nqs nuk ishit ju ai që kërkuat një fjalëkalim të ri injorojeni këtë mesazh. Nqs ky mesazh ju vjen në mënyrë të përsëritur kontaktoni administratorin e forumit.
Për të përdorur fjalëkalimi e ri ju duhet ta aktivizoni duke klikuar më poshtë:
{U_ACTIVATE}
Nqs kjo procedurë është e sukseshme atëherë mund të identifikoheni duke përdorur fjalëkalimin e mëposhtëm:
Fjalëkalimi: {PASSWORD}
Ju mund ta ndryshoni këtë fjalëkalim nëpërmjet profilit tuaj. Nqs hasni ndonjë problem kontaktoni administratorin e forumit.
{EMAIL_SIG}

View file

@ -1,16 +0,0 @@
Subject: Mirsevini tek forumi i {SITENAME}
{WELCOME_MSG}
Ju lutem ruajeni këtë mesazh për referencë. Informacioni mbi llogarinë tuaj është si më poshtë:
----------------------------
Identifikimi: {USERNAME}
Fjalëkalimi: {PASSWORD}
----------------------------
Ju lutem mos harroni fjalëkalimin sepse ai ruhet i shifruar në regjistrin tonë dhe ne nuk mund ta deshifrojmë. Megjithatë nqs harroni fjalëkalimin ju mund të kërkoni një të ri i cili duhet aktivizuar në të njëjtën mënyrë.
Ju falënderojmë për regjistrimin.
{EMAIL_SIG}

View file

@ -1,20 +0,0 @@
Subject: Mirsevini tek forumi i {SITENAME}
{WELCOME_MSG}
Ju lutem ruajeni këtë mesazh për referencë. Informacioni mbi llogarinë tuaj është si më poshtë:
----------------------------
Identifikimi: {USERNAME}
Fjalëkalimi: {PASSWORD}
----------------------------
Llogaria juaj është e ç'aktivizuar tashti për tashti. Ju nuk mund ta përdorni derisa të vizitoni lidhjen e mëposhtme:
{U_ACTIVATE}
Ju lutem mos harroni fjalëkalimin sepse ai ruhet i shifruar në regjistrin tonë dhe ne nuk mund ta deshifrojmë. Megjithatë nqs harroni fjalëkalimin ju mund të kërkoni një të ri i cili duhet aktivizuar në të njëjtën mënyrë.
Ju falënderojmë për regjistrimin.
{EMAIL_SIG}

View file

@ -1,721 +0,0 @@
<?php
/***************************************************************************
* lang_admin.php [English]
* -------------------
* begin : Sat Dec 16 2000
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
****************************************************************************/
/***************************************************************************
*
* 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'] = "Administrim i Përgjithshëm";
$lang['Users'] = "Administrim i Anëtarëve";
$lang['Groups'] = "Administrim i Grupeve";
$lang['Forums'] = "Administrim i Forumeve";
$lang['Styles'] = "Administrim i Paraqitjes";
$lang['Configuration'] = "Konfigurimi";
$lang['Permissions'] = "Autorizimet";
$lang['Manage'] = "Menaxhimi";
$lang['Disallow'] = "Mos lejo emrat";
$lang['Prune'] = "Shkurtimi";
$lang['Mass_Email'] = "Email Masiv";
$lang['Ranks'] = "Gradimi";
$lang['Smilies'] = "Figurinat";
$lang['Ban_Management'] = "Përjashtimet";
$lang['Word_Censor'] = "Fjalët e Censuruara";
$lang['Export'] = "Eksporto";
$lang['Create_new'] = "Krijo";
$lang['Add_new'] = "Shto";
$lang['Backup_DB'] = "Krijo një kopje të Regjistrit";
$lang['Restore_DB'] = "Rivendos Regjistrin";
//
// Index
//
$lang['Admin'] = "Administrim";
$lang['Not_admin'] = "Ju nuk keni autorizim për të modifikuar këtë forum";
$lang['Welcome_phpBB'] = "Mirësevini tek phpBB";
$lang['Admin_intro'] = "Ju falënderojmë që zgjodhët phpBB për forumin tuaj. Kjo faqe jep një përmbledhje të statistikave kryesore për forumin tuaj. Kthehuni tek kjo faqe duke klikuar mbi butonin <u>Indeksi i Administrimit</u> në anën e majtë të faqes. Klikoni ikonën e phpBB për të shkuar tek indeksi kryesor i forumeve. Lidhjet e tjera në anën e majte të faqes mundësojnë kontrollin e plotë të forumit dhe përmbajnë udhëzime mbi përdorimin e cdo kontrolli.";
$lang['Main_index'] = "Indeksi i Forumit";
$lang['Forum_stats'] = "Statistikat e Forumit";
$lang['Admin_Index'] = "Indeksi i Administrimit";
$lang['Preview_forum'] = "Shqyrto Forumin";
$lang['Click_return_admin_index'] = "Kliko %skëtu%s për të shkuar tek indeksi i administrimit";
$lang['Statistic'] = "Statistika";
$lang['Value'] = "Vlera";
$lang['Number_posts'] = "Numri i postimeve";
$lang['Posts_per_day'] = "Postime në ditë";
$lang['Number_topics'] = "Numri i temave";
$lang['Topics_per_day'] = "Tema në ditë";
$lang['Number_users'] = "Numri i anëtarëve";
$lang['Users_per_day'] = "Anëtarë në ditë";
$lang['Board_started'] = "Forumi filloi";
$lang['Avatar_dir_size'] = "Madhësia e direktorisë së fotos personale";
$lang['Database_size'] = "Madhësia e regjistrit";
$lang['Gzip_compression'] ="Kompresimi me Gzip";
$lang['Not_available'] = "Nuk ofrohet";
$lang['ON'] = "Aktiv"; // This is for GZip compression
$lang['OFF'] = "Jo-aktiv";
//
// DB Utils
//
$lang['Database_Utilities'] = "Vegla të dobishme për përpunimin e regjistrit";
$lang['Restore'] = "Rivendos";
$lang['Backup'] = "Krijo kopje";
$lang['Restore_explain'] = "Ky veprim do kryejë një rivendosje të plotë të të gjitha tabelave të phpBB nga një skedar. Nqs serveri juaj e lejon, ju mund të ngarkoni një skedar të kompresuar me gzip. <b>KUJDES</b> Ky veprim do rishkruajë të gjitha të dhënat e forumit. Procesi i rivendosjes mund të kërkojë shumë kohë, ju lutem mos ikni nga kjo faqe deri në përfundim të procesit!";
$lang['Backup_explain'] = "Këtu mund të krijoni një kopje të plotë të phpBB. Nqs keni tabela speciale në të njëjtin regjistër me phpBB dhe doni ti kopjoni në të njëjtin skedar, specifikoni emrat e tyre duke i ndarë me presje tek kutia e Tabelave Shtesë. Nqs serveri juaj e lejon, ju mund të kompresoni skedarin me gzip para se ta shkarkoni.";
$lang['Backup_options'] = "Mundësitë për Kopjen";
$lang['Start_backup'] = "Fillo kopjimin";
$lang['Full_backup'] = "Kopjim i plotë";
$lang['Structure_backup'] = "Vetëm - Kopjim i strukturës";
$lang['Data_backup'] = "Vetëm - Kopjim i të dhënave";
$lang['Additional_tables'] = "Tabela Shtesë";
$lang['Gzip_compress'] = "Kompreso skedarin me gzip";
$lang['Select_file'] = "Zgjidh një skedar";
$lang['Start_Restore'] = "Fillo rivendosjen";
$lang['Restore_success'] = "Regjistri u rivendos në mënyrë të suksesshme.<br /><br />Forumi juaj duhet të kthehet në gjendjen që kishte kur u kopjua.";
$lang['Backup_download'] = "Shkarkimi do filloje së shpejti, prisni deri sa të fillojë";
$lang['Backups_not_supported'] = "Na vjen keq, por kopjimi nuk mbështetet për këtë lloj regjistri";
$lang['Restore_Error_uploading'] = "Problem me ngarkimin e skedarit (kopja e regjistrit)";
$lang['Restore_Error_filename'] = "Problem me emrin e skedarit, provo një skedar tjetër";
$lang['Restore_Error_decompress'] = "Nuk dekompreson dot skedarin me gzip, ngarkoni një text-file";
$lang['Restore_Error_no_file'] = "Asnjë skedar nuk u ngarkua";
//
// Auth pages
//
$lang['Select_a_User'] = "Zgjidh një anëtar";
$lang['Select_a_Group'] = "Zgjidh një grup";
$lang['Select_a_Forum'] = "Zgjidh një forum";
$lang['Auth_Control_User'] = "Kontrolli i autorizimeve personale";
$lang['Auth_Control_Group'] = "Kontrolli i autorizimeve të grupeve";
$lang['Auth_Control_Forum'] = "Kontrolli i autorizimeve për forumet";
$lang['Look_up_User'] = "Analizo anëtarin";
$lang['Look_up_Group'] = "Analizo grupin";
$lang['Look_up_Forum'] = "Analizo forumin";
$lang['Group_auth_explain'] = "Këtu mund të ndryshoni autorizimet dhe statusin e moderatorit që i janë caktuar cdo grupi anëtarësh. Kujdes, mos harroni që ndryshimi i autorizimeve për grupin mund të mos ndikojë autorizimet personale, etj. Ju do paralajmëroheni në këto raste.";
$lang['User_auth_explain'] = "Këtu mund të ndryshoni autorizimet dhe statusin e moderatorit që i janë caktuar cdo përdoruesi. Kujdes, mos harroni që ndryshimi i autorizimeve për përdoruesin mund të mos ndikojë autorizimet për grupin, etj. Ju do paralajmëroheni në këto raste.";
$lang['Forum_auth_explain'] = "Këtu mund të ndryshoni autorizimet për cdo forum. Ka dy mënyra për ta bërë këtë, mënyra e thjeshtë dhe mënyra e avancuar. Mënyra e avancuar ofron kontroll më të përpiktë për cdo veprim. Mos harroni që ndryshimi i nivelit të autorizimit në një forum do ndikojë përdorimin e tij nga përdoruesët e ndryshëm.";
$lang['Simple_mode'] = "Mënyra e thjeshtë";
$lang['Advanced_mode'] = "Mënyra e avancuar";
$lang['Moderator_status'] = "Status moderatori";
$lang['Allowed_Access'] = "Lejohet hyrja";
$lang['Disallowed_Access'] = "Ndalohet hyrja";
$lang['Is_Moderator'] = "Eshtë moderator";
$lang['Not_Moderator'] = "Nuk është moderator";
$lang['Conflict_warning'] = "Paralajmërim: Konflikt në autorizim";
$lang['Conflict_access_userauth'] = "Ky përdorues ka akoma te drejta për hyrje në këtë forum nëpërmjet anëtarësisë në grup. You duhet të ndryshoni autorizimet e grupit, ose ta hiqni këtë përdorues nga ky grup në mënyrë që ta ndaloni. Grupet që i japin të drejta (dhe forumet që ndikohen) janë renditur më poshtë.";
$lang['Conflict_mod_userauth'] = "Ky përdorues ka akoma të drejta Moderatori për këtë forum nëpërmjet anëtarësisë në grup. You duhet të ndryshoni autorizimet e grupit, ose ta hiqni këtë përdorues nga ky grup në mënyrë që ta ndaloni. Grupet që i japin të drejta (dhe forumet që ndikohen) janë renditur më poshtë.";
$lang['Conflict_access_groupauth'] = "Ky përdorues/ë kanë akoma te drejta për hyrje në këtë forum nëpërmjet autorizimeve individuale. You duhet të ndryshoni autorizimet individuale që ta/i ndaloni. Përdoruesët me të drejta (dhe forumet që ndikohen) janë renditur më poshtë.";
$lang['Conflict_mod_groupauth'] = "Ky përdorues ka akoma të drejta Moderatori për këtë forum nëpërmjet autorizimeve personale. You duhet të ndryshoni autorizimet individuale që ta ndaloni. Përdoruesët me të drejta (dhe forumet që ndikohen) janë renditur më poshtë.";
$lang['Public'] = "Publik";
$lang['Private'] = "Privat";
$lang['Registered'] = "I regjistruar";
$lang['Administrators'] = "Administratorët";
$lang['Hidden'] = "I fshehur";
// 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'] = "Shiko";
$lang['Read'] = "Lexo";
$lang['Post'] = "Shkruaj";
$lang['Reply'] = "Përgjigju";
$lang['Edit'] = "Modifiko";
$lang['Delete'] = "Fshi";
$lang['Sticky'] = "Ngjitës";
$lang['Announce'] = "Lajmëro";
$lang['Vote'] = "Voto";
$lang['Pollcreate'] = "Krijo votim";
$lang['Permissions'] = "Autorizimet";
$lang['Simple_Permission'] = "Autorizim i thjeshtësuar";
$lang['User_Level'] = "Nivel përdoruesi";
$lang['Auth_User'] = "Përdorues";
$lang['Auth_Admin'] = "Administrator";
$lang['Group_memberships'] = "Anëtarësia e grupit";
$lang['Usergroup_members'] = "Ky grup ka keta anëtarë";
$lang['Forum_auth_updated'] = "Autorizimet e forumit u ri-freskuan";
$lang['User_auth_updated'] = "Autorizimet e përdoruesit u ri-freskuan";
$lang['Group_auth_updated'] = "Autorizimet e grupit u ri-freskuan";
$lang['Auth_updated'] = "Autorizimet u ri-freskuan";
$lang['Click_return_userauth'] = "Kliko %sketu%s për ty kthyer tek Autorizimet e Përdoruesve";
$lang['Click_return_groupauth'] = "Kliko %sketu%s për ty kthyer tek Autorizimet e Grupeve";
$lang['Click_return_forumauth'] = "Kliko %sketu%s për ty kthyer tek Autorizimet e Forumeve";
//
// Banning
//
$lang['Ban_control'] = "Menaxhimi i përjashtimeve";
$lang['Ban_explain'] = "Këtu bëhet përjashtimi i përdoruesve/anëtarëve. Kjo arrihet duke përjashtuar një anëtar specifik, një IP/hostname ose grup IP/hostname, ose të dyja bashkë. Këto metoda pengojnë një përdorues madje dhe të shikojnë faqen kryesore të forumit. Nqs doni të pengoni dikë të përjashtuar më parë dhe që tenton të regjistrohet me një emër të ri, mund ta ndaloni atë duke përjashtuar adresën e email. Kini parasysh, përjashtimi i email-it nuk pengon dikë që të shkruajë apo shikojë forumin. Për këtë përdorni një ose të dyja metodat e mësipërme.";
$lang['Ban_explain_warn'] = "Kujdes, përjashtimi i një serie IP-sh përjashton cdo IP midis fillimit dhe fundit të serisë. Nqs ju duhet të përjashtoni një seri, mundohuni ta minimizoni serinë. ";
$lang['Select_username'] = "Zgjidh identifikimin";
$lang['Select_ip'] = "Zgjidh IP";
$lang['Select_email'] = "Zgjidh adresën e e-mail";
$lang['Ban_username'] = "Përjashto një ose më shumë anëtarë";
$lang['Ban_username_explain'] = "Përjashtimi i një ose më shumë anëtarëve njëkohësisht është i mundur me kombinimin e duhur të butonave";
$lang['Ban_IP'] = "Përjashto një ose më shumë IP ose hostname";
$lang['IP_hostname'] = "IP ose hostnames";
$lang['Ban_IP_explain'] = "Per të specifikuar më shumë se një IP ose hostname, ndajini me presje. To specify a range of IP addresses separate the start and end with a hyphen (-), to specify a wildcard use *";
$lang['Ban_email'] = "Pëjashto një ose më shumë adresa e-mail";
$lang['Ban_email_explain'] = "Per të specifikuar më shumë se një adresë e-maili, ndajini me presje. Për të specifikuar një -wildcard username- përdor *, për shembull *@hotmail.com";
$lang['Unban_username'] = "Riprano një ose më shumë anëtarë";
$lang['Unban_username_explain'] = "Ripranimi i një ose më shumë anëtarëve njëkohësisht është i mundur me kombinimin e duhur të butonave";
$lang['Unban_IP'] = "Riprano një ose më shumë IP";
$lang['Unban_IP_explain'] = "Ripranimi i një ose më shumë IP njëkohësisht është i mundur me kombinimin e duhur të butonave";
$lang['Unban_email'] = "Riprano një ose më shumë adresa e-maili";
$lang['Unban_email_explain'] = "Ripranimi i një ose më shumë adresave njëkohësisht është i mundur me kombinimin e duhur të butonave";
$lang['No_banned_users'] = "Asnjë anëtar i përjashtuar";
$lang['No_banned_ip'] = "Asnjë IP e përjashtuar";
$lang['No_banned_email'] = "Asnjë adresë e-maili e përjashtuar";
$lang['Ban_update_sucessful'] = "Lista e përjashtimeve u refreskua në mënyrë të suksesshme";
$lang['Click_return_banadmin'] = "Kliko %skëtu%s për tu kthyer tek menaxhimi i përjashtimeve";
//
// Configuration
//
$lang['General_Config'] = "Konfigurim i përgjithshëm";
$lang['Config_explain'] = "Formulari i mëposhtëm ju jep mundësine e konfigurimit të opsioneve të përgjithshme. Për administrimin dhe konfigurimin e anëtarëve dhe forumeve, përdorni tabelat në krahun e majtë.";
$lang['Click_return_config'] = "Kliko %skëtu%s për tu kthyer tek konfigurimi i përgjithshëm";
$lang['General_settings'] = "Vetitë e përgjithshme të forumit(site)";
$lang['Server_name'] = "Domain Name";
$lang['Server_name_explain'] = "The domain name this board runs from";
$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'] = "Emri i websitit";
$lang['Site_desc'] = "Përshkrimi i websitit";
$lang['Board_disable'] = "Disaktivizoje websitin";
$lang['Board_disable_explain'] = "KUJDES!!!! Ky veprim do e bëjë forumin jofunksional. Nqs bëni logout pas disaktivizimit,nuk do keni mundësi që të bëni login!";
$lang['Acct_activation'] = "Mundëso aktivizimin e llogarisë nga";
$lang['Acc_None'] = "Askush"; // Këto janë 3 llojet e aktivizimit
$lang['Acc_User'] = "Anëtari";
$lang['Acc_Admin'] = "Administratori";
$lang['Abilities_settings'] = "Veti Elementare të Anëtarëve dhe Forumeve";
$lang['Max_poll_options'] = "Nr. maksimal i mundësive për një votim";
$lang['Flood_Interval'] = "Flood Interval";
$lang['Flood_Interval_explain'] = "Numri i sekondave që një anëtar duhet të presë midis postimeve";
$lang['Board_email_form'] = "Përdorimi për e-mail";
$lang['Board_email_form_explain'] = "Anëtarët mund të dërgojnë e-mail nëpërmjet këtij serveri";
$lang['Topics_per_page'] = "Diskutime për faqe";
$lang['Posts_per_page'] = "Poste për faqe";
$lang['Hot_threshold'] = "Posts for Popular Threshold";
$lang['Default_style'] = "Paraqitja e paracaktuar";
$lang['Override_style'] = "Zëvendëso preferencën e përdoruesve?";
$lang['Override_style_explain'] = "Zëvendëson paraqitjen e preferuar të përdoruesve me paraqitjen e paracaktuar";
$lang['Default_language'] = "Gjuha e paracaktuar";
$lang['Date_format'] = "Formatimi i Datës";
$lang['System_timezone'] = "Brezi orar i sistemit";
$lang['Enable_gzip'] = "Mundëso kompresimin me GZip";
$lang['Enable_prune'] = "Mundëso shkurtimin/shartimin e forumeve";
$lang['Allow_HTML'] = "Lejo HTML";
$lang['Allow_BBCode'] = "Lejo BBCode";
$lang['Allowed_tags'] = "Shënjat HTML të lejuara";
$lang['Allowed_tags_explain'] = "Ndaji shënjat me presje";
$lang['Allow_smilies'] = "Lejo figurinat";
$lang['Smilies_path'] = "Shtegu i direktorisë së figurinave";
$lang['Smilies_path_explain'] = "Path under your phpBB root dir, e.g. images/smilies";
$lang['Allow_sig'] = "Lejo firmat";
$lang['Max_sig_length'] = "Madhësia maksimale e firmave";
$lang['Max_sig_length_explain'] = "Nr. maksimal i shkronjave të lejuara në një firmë";
$lang['Allow_name_change'] = "Lejo ndërrimin e username";
$lang['Avatar_settings'] = "Vetitë e Ikonave Personale";
$lang['Allow_local'] = "Mundëso galerinë e ikonave personale";
$lang['Allow_remote'] = "Mundëso ikona personale nga servera të tjerë";
$lang['Allow_remote_explain'] = "Ikona personale që ruhen në një websit tjetër";
$lang['Allow_upload'] = "Mundëso ngarkimin e ikonave personale";
$lang['Max_filesize'] = "Madhësia maksimale e ikonës personale";
$lang['Max_filesize_explain'] = "Vetëm për ikonat e ngarkuara ne këtë server";
$lang['Max_avatar_size'] = "Dimensionet maksimale të ikonave personale";
$lang['Max_avatar_size_explain'] = "(Gjatësi x Gjerësi në piksel)";
$lang['Avatar_storage_path'] = "Shtegu i magazinimit të ikonave personale";
$lang['Avatar_storage_path_explain'] = "Path under your phpBB root dir, e.g. images/avatars";
$lang['Avatar_gallery_path'] = "Shtegu i galerisë së ikonave personale";
$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 where parents will send COPPA registration forms";
$lang['Email_settings'] = "Vetitë e E-mail";
$lang['Admin_email'] = "Adresa e email të administratorit";
$lang['Email_sig'] = "Firma e email-it";
$lang['Email_sig_explain'] = "Kjo firmë do u bashkangjitet në fund të gjithë mesazheve të derguara nga ky server";
$lang['Use_SMTP'] = "Përdor server SMTP per dërgimin e email-ave";
$lang['Use_SMTP_explain'] = "Përcaktoje këtë veti nqs doni/jeni i detyruar të mos përdorni programin mail te serverit";
$lang['SMTP_server'] = "Adresa e serverit SMTP";
$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'] = "Maksimumi i posteve në Inbox";
$lang['Sentbox_limits'] = "Maksimumi i posteve në Sentbox";
$lang['Savebox_limits'] = "Maksimumi i posteve në Savebox";
$lang['Cookie_settings'] = "Vetitë e Cookie-s ";
$lang['Cookie_settings_explain'] = "Këto të dhëna kontrollojnë se si cooki i dërgohet browser-it. Në shumicën e rasteve, vlerat e paracaktuara jane të mjaftueshme. Nqs keni nevojë ti ndryshoni, kini kujdes se të dhëna jokorrekte krijojne probleme me indentifikimin e anëtarëve.";
$lang['Cookie_name'] = "Emri i Cookie";
$lang['Cookie_domain'] = "Domain i Cookie";
$lang['Cookie_path'] = "Shtegu i Cookie";
$lang['Session_length'] = "Zgjatja e sesionit [ në sekonda ]";
$lang['Cookie_secure'] = "Cookie e sigurtë [ https ]";
$lang['Session_length'] = "Session length [ seconds ]";
//
// Forum Management
//
$lang['Forum_admin'] = "Administrim Forumi";
$lang['Forum_admin_explain'] = "Nga ky panel bëhet krijimi, fshirja, modifikimi, ri-renditja, dhe ri-sinkronizimi i kategorive dhe forumeve";
$lang['Edit_forum'] = "Modifiko forumin";
$lang['Create_forum'] = "Krijo forum";
$lang['Create_category'] = "Krijo kategori";
$lang['Remove'] = "Hiq";
$lang['Action'] = "Veprimi";
$lang['Update_order'] = "Rifresko renditjen";
$lang['Config_updated'] = "Rifreskimi i konfigurimit të forumit u bë në mënyrë të suksesshme";
$lang['Edit'] = "Modifiko";
$lang['Delete'] = "Fshi";
$lang['Move_up'] = "Lëvize sipër";
$lang['Move_down'] = "Lëvize poshtë";
$lang['Resync'] = "Ri-sinkronizo";
$lang['No_mode'] = "No mode was set";
$lang['Forum_edit_delete_explain'] = "Formulari i mëposhtëm ju jep mundësine e konfigurimit të opsioneve të përgjithshme. Për administrimin dhe konfigurimin e anëtarëve dhe forumeve, përdorni tabelat në krahun e majtë.";
$lang['Move_contents'] = "Zhvendos gjithë përmbajtjen";
$lang['Forum_delete'] = "Fshije këtë forum";
$lang['Forum_delete_explain'] = "Formulari i mëposhtëm ju jep mundësine e fshirjes së një forumi (apo kategorie) dhe ruajtjen e gjithë mesazheve (forumeve) që përmban.";
$lang['Forum_settings'] = "Vetitë e përgjithshme të forumit";
$lang['Forum_name'] = "Emri i forumit";
$lang['Forum_desc'] = "Përshkrimi";
$lang['Forum_status'] = "Statusi i forumit";
$lang['Forum_pruning'] = "Auto-shkurtim";
$lang['prune_freq'] = 'Kontrollo vjetërsinë e diskutimit cdo';
$lang['prune_days'] = "Hiq diskutimet ku nuk postohet prej";
$lang['Set_prune_data'] = "Ju zgjodhët auto-shkurtim për këtë forum por nuk specifikuat një frekuencë ose nr. e ditëve për shkurtim. Ju lutem shkoni mbrapsht dhe specifikoni këto veti.";
$lang['Move_and_Delete'] = "Zhvendos dhe Fshi";
$lang['Delete_all_posts'] = "Fshi gjithë postet";
$lang['Nowhere_to_move'] = "S'ke ku e con";
$lang['Edit_Category'] = "Modifiko kategorinë";
$lang['Edit_Category_explain'] = "Përdor këtë formular për ndërrimin e emrit të kategorisë";
$lang['Forums_updated'] = "Informacioni rreth forumit dhe kategorisë u freskua në menyrë të suksesshme";
$lang['Must_delete_forums'] = "Fshi gjithë forumet në këtë kategori para se të fshish kategorinë vetë";
$lang['Click_return_forumadmin'] = "Kliko %skëtu%s për tu kthyer tek administrimi i forumeve";
//
// Smiley Management
//
$lang['smiley_title'] = "Vegël për menaxhimin e figurinave";
$lang['smile_desc'] = "Nga ky panel ju mund të shtoni, hiqni dhe editoni figurinat që mund të përdoren nga përdoruesit.";
$lang['smiley_config'] = "Konfigurimi i figurinave";
$lang['smiley_code'] = "Kodi i figurinave";
$lang['smiley_url'] = "Adresa e figurinës";
$lang['smiley_emot'] = "Emocioni i figurinës";
$lang['smile_add'] = "Shto një figurinë";
$lang['Smile'] = "Figurina";
$lang['Emotion'] = "Emocioni";
$lang['Select_pak'] = "Zgjidh skedarin paketë (.pak)";
$lang['replace_existing'] = "Zëvendëso figurinën egzistuese";
$lang['keep_existing'] = "Mbaje figurinën egzistuese";
$lang['smiley_import_inst'] = "You duhet të dekompresoni skedarin me figurina dhe vendosni figurinat në direktorinë e duhur. Pastaj zgjidhni informacionin e duhur në këtë formular që të importoni skedarin e figurinave (Smiley Pack)";
$lang['smiley_import'] = "Importo skedarin e figurinave (Smiley Pack)";
$lang['choose_smile_pak'] = "Zgjidh një nga skedarët e figurinave ( .pak)";
$lang['import'] = "Importo figurina";
$lang['smile_conflicts'] = "Cfarë duhet bërë në rast konflikti";
$lang['del_existing_smileys'] = "Fshi figurinat ekzistuese përpara se të importosh";
$lang['import_smile_pack'] = "Importo skedarin e figurinave";
$lang['export_smile_pack'] = "Krijo një skedar figurinash";
$lang['export_smiles'] = "Për të krijuar një skedar figurinash prej figurinave ekzistuese, kliko %skëtu%s për të shkarkuar skedarin smiles.pak Ndryshojini emrin skedarin nqs doni, po mos i ndryshoni -file extension-. Pastaj krijoni një skedar .zip që përmban të gjitha imazhet e figurinave plus skedarin .pak.";
$lang['smiley_add_success'] = "Figurina u shtua në mënyrë të suksesshme.";
$lang['smiley_edit_success'] = "Figurina u ri-freskua në mënyrë të suksesshme.";
$lang['smiley_import_success'] = "Skedari i figurinave (Smiley Pack) u importua në mënyrë të suksesshme.";
$lang['smiley_del_success'] = "Figurina u hoq në mënyrë të suksesshme.";
$lang['Click_return_smileadmin'] = "Kliko %skëtu%s për ty kthyer tek Administrimi i Figurinave";
//
// User Management
//
$lang['User_admin'] = "Administrimi i Anëtarëve";
$lang['User_admin_explain'] = "Këtu mund të ndryshoni informacionin mbi anëtarët dhe disa opcione specifike. Bëni modifikimin e autorizimeve me anë të panelit të përshtatshëm në krahun e majtë të panelit.";
$lang['Look_up_user'] = "Analizo anëtarin";
$lang['Admin_user_fail'] = "Nuk u arrit të ri-freskohej profili i anëtarit.";
$lang['Admin_user_updated'] = "Profili i këtij anëtari u ri-freskua në mënyrë të suksesshme.";
$lang['Click_return_useradmin'] = "Kliko %skëtu%s për tu kthyer tek Administrimi i Anëtarëve";
$lang['User_delete'] = "Fshije këtë përdorues";
$lang['User_delete_explain'] = "Kliko këtu për ta fshirë këtë anëtar, ky veprim është i pakthyeshëm.";
$lang['User_deleted'] = "Anëtari u fshi në mënyrë të suksesshme.";
$lang['User_status'] = "Anëtari është aktiv";
$lang['User_allowpm'] = "Mund të dërgojë Mesazhe Private";
$lang['User_allowavatar'] = "Mund të shfaqë ikonën personale";
$lang['Admin_avatar_explain'] = "Këtu mund të shikoni dhe fshini ikonën aktuale personale të anëtarit.";
$lang['User_special'] = "Fusha speciale vetëm për administratorët.";
$lang['User_special_explain'] = "Këto fusha nuk mund të modifikohen nga anëtarët. Ju mund të vendosni statusin dhe veti të tjera që nuk i jepen anëtarëve.";
//
// Group Management
//
$lang['Group_administration'] = "Administrim i Grupeve";
$lang['Group_admin_explain'] = "Tek ky panel ju mund të administroni të gjithë grupet e përdoruesve. Fshi, krijo dhe modifiko grupet ekzistuese. Zgjidh moderatorët, hap/mbyll dhe vendos emrin dhe përshkrimin e grupit.";
$lang['Error_updating_groups'] = "Pati një problem gjatë ri-freskimit të grupeve";
$lang['Updated_group'] = "Grupi u ri-freskua me sukses";
$lang['Added_new_group'] = "Grupi u krijua me sukses";
$lang['Deleted_group'] = "Grupi u fshi me sukses";
$lang['New_group'] = "Krijo grup të ri";
$lang['Edit_group'] = "Modifiko grupin";
$lang['group_name'] = "Emri i grupit";
$lang['group_description'] = "Përshkrimi i grupit";
$lang['group_moderator'] = "Moderatori i grupit";
$lang['group_status'] = "Statusi i grupit";
$lang['group_open'] = "Grup i hapur";
$lang['group_closed'] = "Grup i mbyllur";
$lang['group_hidden'] = "Grup i fshehte";
$lang['group_delete'] = "Fshi grupin";
$lang['group_delete_check'] = "Fshi këtë grup";
$lang['submit_group_changes'] = "Paraqit ndryshimet";
$lang['reset_group_changes'] = "Pastro ndryshimet";
$lang['No_group_name'] = "Specifiko emrin e këtij grupi";
$lang['No_group_moderator'] = "Specifiko moderatorin e këtij grupi";
$lang['No_group_mode'] = "Specifiko një mënyrë për këtë grup, hapur ose mbyllur";
$lang['delete_group_moderator'] = "Fshi moderatorin e vjetër të grupit?";
$lang['delete_moderator_explain'] = "Nqs jeni duke ndryshuar moderatorin e grupit, vër një kryq tek kjo kuti për të hequr moderatorin e vjetër nga grupi. Ndryshe, lëre bosh dhe moderatori i vjetër do bëhet një anëtar i thjeshtë i grupit.";
$lang['Click_return_groupsadmin'] = "Kliko %skëtu%s për ty kthyer tek Administrimi i Grupeve";
$lang['Select_group'] = "Zgjidh një grup";
$lang['Look_up_group'] = "Analizo një grup";
//
// Prune Administration
//
$lang['Forum_Prune'] = "Shkurto forumin";
$lang['Forum_Prune_explain'] = "Ky veprim do fshijë cdo temë ku nuk është postuar brënda afatit që ju keni përcaktuar. Nqs nuk përcaktoni një numër, atëherë gjithë temat do fshihen. Megjithatë, temat ku ka votime të hapura dhe lajmërimet duhen fshirë mekanikisht.";
$lang['Do_Prune'] = "Bëje shkurtimin";
$lang['All_Forums'] = "Gjithë forumet";
$lang['Prune_topics_not_posted'] = "Shkurto temat pa pergjigje brënda";
$lang['Topics_pruned'] = "Temat e shkurtuara";
$lang['Posts_pruned'] = "Mesazhet e shkurtuara";
$lang['Prune_success'] = "Shkurtimi i forumeve u bë me sukses";
//
// Word censor
//
$lang['Words_title'] = "Censurimi i fjalëve";
$lang['Words_explain'] = "Nga ky panel ju mund të shtoni, modifikoni, dhe hiqni fjalë që do censurohen automatikisht. Gjithashtu, emrat e anëtarëve nuk do mund të përmbajnë fjalë të tilla. Wildcards (*) are accepted in the word field, eg. *test* will match detestable, test* would match testing, *test would match detest.";
$lang['Word'] = "Fjalë";
$lang['Edit_word_censor'] = "Modifiko censurën";
$lang['Replacement'] = "Zëvendësimi";
$lang['Add_new_word'] = "Shto një fjalë";
$lang['Update_word'] = "Ri-fresko censurën";
$lang['Must_enter_word'] = "You duhet të specifikoni një fjalë dhe zëvendësimin e saj";
$lang['No_word_selected'] = "Asnjë fjalë nuk është zgjedhur për modifikim";
$lang['Word_updated'] = "Censura e zgjedhur u ri-freskua me sukses";
$lang['Word_added'] = "Censura u shtua me sukses";
$lang['Word_removed'] = "Censura e zgjedhur u hoq me sukses";
$lang['Click_return_wordadmin'] = "Kliko %skëtu%s për tu kthyer tek Administrimi i Censurës";
//
// Mass Email
//
$lang['Mass_email_explain'] = "Nga ky panel ju mund të dërgoni një e-mail tek të gjithë anëtarët e forumit, ose nje grupi specifik. Për të kryer këtë, një e-mail do i dërgohet adresës administrative të specifikuar, dhe një kopje karboni do u dërgohet gjithë marrësve. Kini parasysh se nqs i dërgoni e-mail nje grupi të madh personash, ky proces do kohë, kështu që prisni deri sa të njoftoheni se procesi mbaroi.";
$lang['Compose'] = "Harto";
$lang['Recipients'] = "Marrësit";
$lang['All_users'] = "Të gjithë anëtarët";
$lang['Email_successfull'] = "Mesazhi u dërgua";
$lang['Click_return_massemail'] = "Kliko %skëtu%s për tu kthyer tek paneli i E-mail në Masë";
//
// Ranks admin
//
$lang['Ranks_title'] = "Administrimi i Gradave";
$lang['Ranks_explain'] = "Ky formular mundëson shtimin, modifikimin dhe fshirjen e gradave. Gjithashtu, ju mund të krijoni grada të personalizuara të cilat i aplikohen përdoruesve nëpërmjet panelit të administrimit të përdoruesve.";
$lang['Add_new_rank'] = "Shto një gradë";
$lang['Rank_title'] = "Titulli i gradës";
$lang['Rank_special'] = "Cakto si gradë speciale";
$lang['Rank_minimum'] = "Minimumi i mesazheve";
$lang['Rank_maximum'] = "Maksimumi i mesazheve";
$lang['Rank_image'] = "Ikona e gradës";
$lang['Rank_image_explain'] = "Përdore këtë për të specifikuar ikonën që shoqëron gradën";
$lang['Must_select_rank'] = "Zgjidh një gradë";
$lang['No_assigned_rank'] = "Nuk është dhënë ndonjë gradë speciale";
$lang['Rank_updated'] = "Grada u ri-freskua me sukses";
$lang['Rank_added'] = "Grada u shtua me sukses";
$lang['Rank_removed'] = "Grada u fshi me sukses";
$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'] = "Kliko %skëtu%s për tu kthyer tek Administrimi i Gradave";
//
// Disallow Username Admin
//
$lang['Disallow_control'] = "Kontrolli i emrave të ndaluar";
$lang['Disallow_explain'] = "Këtu mund të specifikoni emrat që nuk mund të përdoren. Disallowed usernames are allowed to contain a wildcard character of *. Kini parasysh se nuk mund të specifikoni një emër që është regjistruar tashmë. Fshini atë anëtar dhe pastaj ndalojeni atë fjalë.";
$lang['Delete_disallow'] = "Fshi";
$lang['Delete_disallow_title'] = "Hiq një nga emrat e ndaluar";
$lang['Delete_disallow_explain'] = "Heqja e një emri nga lista e ndaluar bëhet duke e zgjedhur atë tek kjo listë dhe klikuar paraqit.";
$lang['Add_disallow'] = "Shto";
$lang['Add_disallow_title'] = "Shto një emër të ndaluar";
$lang['Add_disallow_explain'] = "Ju mund të ndaloni një emër duke përdorur * në vend të cdo karakteri në atë pozicion.";
$lang['No_disallowed'] = "Asnjë emër i ndaluar";
$lang['Disallowed_deleted'] = "Emri i ndaluar u fshi me sukses";
$lang['Disallow_successful'] = "Emri i ndaluar u shtua me sukses";
$lang['Disallowed_already'] = "Emri që shtuat nuk mund të ndalohet. Ky emër ose ekziston në listën e emrave të ndaluar, ose ekziston në listën e censurës ose është në përdorim nga një anëtar.";
$lang['Click_return_disallowadmin'] = "Kliko %skëtu%s për tu kthyer tek Administrimi i emrave të ndaluar";
//
// Styles Admin
//
$lang['Styles_admin'] = "Administrimi i stileve";
$lang['Styles_explain'] = "Me anë të këtij paneli mund të shtoni, hiqni dhe menaxhoni (shabllonet dhe motivet) në dispozicion të anëtarëve.";
$lang['Styles_addnew_explain'] = "Lista e mëposhtme përmban të gjithë motivet që janë të mundshëm për shabllonet që keni. Artikujt në këtë listë nuk janë instaluar akoma në regjistrin e phpBB. Kliko butonin instalo për të instaluar një nga këto artikuj në databazë.";
$lang['Select_template'] = "Zgjidh një shabllon";
$lang['Style'] = "Stili";
$lang['Template'] = "Shabllon";
$lang['Install'] = "Instalo";
$lang['Download'] = "Shkarko";
$lang['Edit_theme'] = "Modifiko motivin";
$lang['Edit_theme_explain'] = "Në formularin më poshtë modifiko vetitë e motivit që keni zgjedhur.";
$lang['Create_theme'] = "Krijo motiv";
$lang['Create_theme_explain'] = "Përdor formularin e mëposhtëm për të krijuar një motiv për shabllonin e zgjedhur. Kur zgjidhni ngjyrat (për të cilat duhen përdorur numrat me bazë 16 --hexadecimal--) mos vendosni shenjën #. psh. #CC00BB është gabim.";
$lang['Export_themes'] = "Eksporto motivet";
$lang['Export_explain'] = "Ky panel mundëson eksportimin e të dhënave të motivit për shabllonin e zgjedhur. Zgjidh shabllonin nga lista e mëposhtme dhe phpBB do krijojë automatikisht skedarin për konfigurimin e motivit dhe do provojë ta ruajë në direktorinë ku shablloni i zgjedhur rri. Nqs nuk mund ta ruani skedarin atje, do keni mundësinë për ta shkarkuar në kompjuterin tuaj. Në mënyrë që skedari të vendoset në direktorinë e shabllonit, webserveri duhet të ketë autorizim për të shkruar në atë direktori. Për më shumë info, shiko manualin e përdorimit.";
$lang['Theme_installed'] = "Motivi i zgjedhur u instalua me sukses";
$lang['Style_removed'] = "Stili i zgjedhur u hoq nga regjistri. Për ta hequr këtë stil përfundimisht nga sistemi juaj, fshijeni këtë stil nga direktoria e shablloneve.";
$lang['Theme_info_saved'] = "Informacioni i motivit për shabllonin e zgjedhur u ruajt. Rivendosni autorizimet në nivelin lexim-vetëm (read-only) për theme_info.cfg ";
$lang['Theme_updated'] = "Motivi i zgjedhur u ri-freskua. Tashti duhet të eksportoni vetitë e reja të motivit";
$lang['Theme_created'] = "Motivi u krijua. Tashti duhet të eskportoni motivin e ri tek skedari i konfigurimit për ruajtje.";
$lang['Confirm_delete_style'] = "Jeni i sigurtë për fshirjen e këtij stili";
$lang['Download_theme_cfg'] = "Eksportuesi nuk mundi të shkruajë skedarin e informacionit të motivit. Kliko butonin e meposhtëm për ta shkarkuar këtë skedar. Pasi ta keni shkarkuar, transferojeni tek direktoria që përmban skedarët e shablloneve. You mund ti arkivoni skedarët dhe ti shpërndani për përdorim diku tjetër.";
$lang['No_themes'] = "Shablloni që zgjodhët nuk ka asnjë motiv të bashkangjitur. Për të krijuar një motiv të ri kliko butonin Krijo në anën e majtë.";
$lang['No_template_dir'] = "Direktoria e shablloneve nuk hapet. Webserveri nuk mund ta lexojë ose direktoria nuk ekziston.";
$lang['Cannot_remove_style'] = "Stili i zgjdhur nuk mund të fshihet sepse është stili i paracaktuar i forumi. Ndryshoni stilin e paracaktuar dh pastaj provoni nga e para";
$lang['Style_exists'] = "Emri i zgjedhur për këtë stil ekziston. Zgjidhni një emër tjetër";
$lang['Click_return_styleadmin'] = "Kliko %skëtu%s për tu kthyer tek Administratori i Stileve";
$lang['Theme_settings'] = "Vetitë e motivit";
$lang['Theme_element'] = "Elementi i motivit";
$lang['Simple_name'] = "Emër i thjeshtë";
$lang['Value'] = "Vlera";
$lang['Save_Settings'] = "Regjistro vetitë";
$lang['Stylesheet'] = "CSS Stylesheet";
$lang['Background_image'] = "Background Image";
$lang['Background_color'] = "Background Colour";
$lang['Theme_name'] = "Emri i Motivit";
$lang['Link_color'] = "Link Colour";
$lang['Text_color'] = "Ngjyra e tekstit";
$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'] = "Mirësevini tek instaluesi i phpBB v.2";
$lang['Initial_config'] = "Konfigurimi elementar";
$lang['DB_config'] = "Konfigurimi i regjistrit";
$lang['Admin_config'] = "Konfigurimi i administratorit";
$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, 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, 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 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 centre (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 choose";
$lang['Install_No_PCRE'] = "phpBB2 Requires the Perl-Compatible Regular Expressions Module for php which your php configuration doesn't appear to support!";
//
// That's all Folks!
// -------------------------------------------------
?>

View file

@ -1,76 +0,0 @@
<?php
/***************************************************************************
* lang_bbcode.php [english]
* -------------------
* begin : Wednesday Oct 3, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
/***************************************************************************/
*
* Translation to Albanian done by alket ---> alkettttt@yahoo.com
* http://www26.brinkster.com/alketttt/
*
***************************************************************************/
//
// 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("--","Hyrje");
$faq[] = array("C'është BBCode?", "BBCode është një implementim special i HTML. Përdorimi i BBCode tek forumi juaj varet nga konfigurimi që ka bërë administratori. Për më tepër BBCode mund të aktivizohet ose c'aktivizohet në mesazhet individuale. BBCode është shumë i ngjashëm me HTML, tags janë mbyllur brenda kllapave katrore [ and ] në vend të &lt; and &gt; dhe ofron kontroll më të madh në formatimin e teksteve. Në varësi të shabllonit në përdorim, shtimi i BBCode në mesazhet tuaja është shumë i lehtë nëpërmjet kodeve të klikueshme mbi përmbajtjen e mesazhit në formularin e postimit. Megjithatë guida e mëposhtme mund t'ju hyjë në punë.");
$faq[] = array("--","Formatimi i tekstit");
$faq[] = array("Si të krijoni tekst bold, underlined dhe italic.", "BBCode ju lejon ta ndryshoni stilin e tekstit shumë thjeshtë. Psh: <ul><li>Për ta bërë një tekst bold futeni midis <b>[b][/b]</b>, psh. <br /><br /><b>[b]</b>Përshëndetje<b>[/b]</b><br /><br />bëhet <b>Përshëndetje</b></li><li>Për nënvizim përdor <b>[u][/u]</b>, psh:<br /><br /><b>[u]</b>Mirëmëngjes<b>[/u]</b><br /><br />bëhet <u>Mirëmëngjes</u></li><li>Për të bërë tekstin me italics përdor <b>[i][/i]</b>, psh.<br /><br />Si jeni <b>[i]</b>Sonte?<b>[/i]</b><br /><br />del: Si jeni <i>Sonte?</i></li></ul>");
$faq[] = array("Si të ndryshohet ngjyra ose madhësia e tekstit.", "Përdorni kodet e mëposhtme për këtë, megjithatë kini parasysh që paraqitja në ekran varet nga sistemi dhe browser-i që përdoret: <ul><li>Ndryshimi i ngjyrës bëhet duke e futur tekstin midis <b>[color=][/color]</b>. Ju mund të specifikoni emrin e ngjyrës (psh. red - kuq, blue - blu, yellow - verdhë, etj.) ose kodin hegzadeksimal, psh. #FFFFFF, #000000. Psh, për të shkruar me të kuqe përdorni:<br /><br ><b>[color=red]</b>Hello!<b>[/color]</b><br /><br />ose<br /><br /><b>[color=#FF0000]</b>Hello!<b>[/color]</b><br /><br />dhe të dyja kodet do nxjerrin <span style=\"color:red\">Hello!</span></li><li>Ndryshimi i madhësisë së tekstit bëhet në mënyrë të ngjashme duke përdorur<b>[size=][/size]</b>. Ky kod varet nga shablloni në përdorim megjithatë formati i rekomanduar është një vlerë numerike që prezanton madhësinë e tekstit në piksel, duke filluar nga 1 (aq i vogël sa nuk e sheh dot) deri tek 29-ta (shumë i madh). Psh:<br /><br /><b>[size=9]</b>I vogël<b>[/size]</b><br /><br />do jetë zakonisht <span style=\"font-size:9px\">I vogël</span><br /><br />kurse:<br /><br /><b>[size=24]</b>I stërmadh!<b>[/size]</b><br /><br />do jetë <span style=\"font-size:24px\">I stërmadh!</span></li></ul>");
$faq[] = array("A mund ti kombinoj kodet e formatimit?", "Po, patjetër, psh. nqs doni të tërhiqni vëmendjen mund të shkruani:<br /><br /><b>[size=18][color=red][b]</b>Kujdes!<b>[/b][/color][/size]</b><br /><br />dhe kjo do nxjerrë <span style=\"color:red;font-size:18px\"><b>Kujdes!</b></span><br /><br />Kini parasysh që është përgjegjësia juaj ti mbyllni kodet e formatimit në mënyrë korrekte. Shembulli i mëposhtëm tregon një rast kur kodet nuk janë mbyllur në mënyrë korrekte:<br /><br /><b>[b][u]</b>Kjo është gabim<b>[/b][/u]</b>");
$faq[] = array("--","Si të citoni dhe tekstet me gjerësi fikse");
$faq[] = array("Si të citoni në përgjigjet tuaja", "Ka dy mënyra për të cituar, me ose pa referencë.<ul><li>Kur përdorni funksionin Cito në përgjigjet tuaja do shikoni që teksti i mesazhit shtohet në dritaren ku do shkruani i përfshirë në një bllok <b>[quote=\"\"][/quote]</b>. Kjo metodë ju lejon të citoni duke iu refereruar një personi. Psh. për të cituar dicka nga z.Arjan shkruani:<br /><br /><b>[quote=\"z.Arjan\"]</b>teksti që po citoni shkon këtu<b>[/quote]</b><br /><br />Kjo do rezultojë në shtimin e z.Arjan shkroi: përpara tekstit që po citoni. Ju <b>duhet</b> të vini \"\" rreth emrit; janë të domosdoshme.</li><li>Metoda e dytë ju lejon të citoni dicka pa specifikuar autorin. Për të bërë këtë rrethojeni tekstin mekodet <b>[quote][/quote]</b>. Kur të shikoni mesazhin do vëreni që do tregojë vetëm Kuotë: përpara tekstit. </li></ul>");
$faq[] = array("Shkruarja e kodeve kompjuterike dhe teksteve me gjerësi fikse", "Nqs doni të shkruani një pjesë me kod kompjuteri ose cdo lloj teksti që kërkon gjerësi fikse atëherë duhet ta rrethoni me kodet <b>[code][/code]</b>, psh.<br /><br /><b>[code]</b>echo \"Ky është kod komputeri\";<b>[/code]</b><br /><br />Formatimi i përdorur brënda kodeve <b>[code][/code]</b> ruhet kur përpunohet nga kompjuteri.");
$faq[] = array("--","Prodhimi i listave");
$faq[] = array("Krijimi i një liste të pa-renditur", "BBCode lejon dy lloj listash, të renditura dhe të parenditura. Në thelb ato janë të njëjta me ekuivalentet në HTML. Një listë e parenditur tregon cdo send në listën tuaj në mënyrë të njëpasnjëshme të paraprira nga një karakter pike. Për të krijuar një listë të parenditur përdoret <b>[list][/list]</b> dhe përcakto cdo send të listës duke përdorur <b>[*]</b>. Psh. për të renditur ngjyrat tuaja të preferuara ju mund të përdorni:<br /><br /><b>[list]</b><br /><b>[*]</b>E kuqe<br /><b>[*]</b>Blu<br /><b>[*]</b>E verdhë<br /><b>[/list]</b><br /><br />Kjo do prodhonte listën<ul><li>E kuqe</li><li>Blu</li><li>E verdhë</li></ul>");
$faq[] = array("Krijimi i një liste të renditur", "Lloji i dytë i listës, lista e renditur, ju mundëson të kontrolloni se c'shkruhet para cdo sendi të listës. Për të krijuar një listë të renditur përdoret <b>[list=1][/list]</b> për të krijuar një listë me renditje numerike ose <b>[list=a][/list]</b> për një listë me renditje alfabetike. Njëlloj si tek lista e parenditur cdo send përcaktohet nga <b>[*]</b>. Psh:<br /><br /><b>[list=1]</b><br /><b>[*]</b>Shko në dyqan<br /><b>[*]</b>Bli një kompjuter<br /><b>[*]</b>Shaje kompjuterin kur nuk punon<br /><b>[/list]</b><br /><br />do prodhojë:<ol type=\"1\"><li>Shko në dyqan</li><li>Bli një kompjuter</li><li>Shaje kompjuterin kur nuk punon</li></ol>kurse për një listë me renditje alfabetike:<br /><br /><b>[list=a]</b><br /><b>[*]</b>Përgjigja e parë e mundshme<br /><b>[*]</b>Përgjigja e dytë e mundshme<br /><b>[*]</b>Përgjigja e tretë e mundshme<br /><b>[/list]</b><br /><br />e cila jep<ol type=\"a\"><li>Përgjigja e parë e mundshme</li><li>Përgjigja e dytë e mundshme</li><li>Përgjigja e tretë e mundshme</li></ol>");
$faq[] = array("--", "Krijimi i lidhjeve");
$faq[] = array("Lidhje me një websit tjetër", "BBCode i phpBB lejon disa mënyra për krijimin e URI-ve, Uniform Resource Indicators që njihen si URL.<ul><li>Mënyra e parë përdor kodin <b>[url=][/url]</b>, cdo gjë që shkruani mbas shenjës së barazimit do shkaktojë përmbajtjen e atij kodi të shërbejë si një URL. Psh. për tu lidhur me phpBB.com me këtë metodë shkruani:<br /><br /><b>[url=http://www.phpbb.com/]</b>Vizito phpBB!<b>[/url]</b><br /><br />kjo do prodhonte lidhjen që vijon, <a href=\"http://www.phpbb.com/\" target=\"_blank\">Vizito phpBB!</a> Do shikoni që lidhja hapet në një dritare të re duke i lejuar përdoruesit të vazhdojnë të përdorin forumin.</li><li>Nqs doni që adresa URL vetë të tregohet si lidhje shkruani:<br /><br /><b>[url]</b>http://www.phpbb.com/<b>[/url]</b><br /><br />Kjo do tregojë lidhjen që vijon, <a href=\"http://www.phpbb.com/\" target=\"_blank\">http://www.phpbb.com/</a></li><li>Për më tepër phpBB përdor dicka që quhet <i>Lidhjet Magjike</i>, kjo do e kthejë cdo URL me sintaksë korrekte në një lidhje pa patur nevojë te shkruhet ndonjë kod, nuk ka nevojë as për http://. Psh. shkruajtja e www.phpbb.com në mesazhin tuaj do krijojë një lidhje tek <a href=\"http://www.phpbb.com/\" target=\"_blank\">www.phpbb.com</a> në mënyrë automatike kur dikush lexon mesazhin. </li><li>E njëjta gjë aplikohet me adresat e postës elektronike, ju mund ta specifikoni adresën me anë të kodit, psh:<br /><br /><b>[email]</b>no.one@domain.adr<b>[/email]</b><br /><br />e cila do tregojë <a href=\"emailto:no.one@domain.adr\">no.one@domain.adr</a> ose mund të shtypni thjesht no.one@domain.adr në mesazhin tuaj dhe adresa do konvertohet në lidhje në mënyrë automatike.</li></ul>Ashtu si me të gjitha kodet e tjera BBCode URL-të mund të mbështjellin cdo lloj kodi tjetër BBCode, psh <b>[img][/img]</b> (lexo më poshtë), <b>[b][/b]</b>, etj. Ashtu si me kodet e formatimit është në dorën tuaj që kodet të jenë hapur dhe mbyllur në rradhën e duhur, psh: <br /><br /><b>[url=http://www.phpbb.com/][img]</b>http://www.phpbb.com/images/phplogo.gif<b>[/url][/img]</b><br /><br /> <u>nuk</u> është korrekte gjë që mund të shkaktojë fshirjen e mesazhit tuaj.");
$faq[] = array("--", "Tregimi i imazheve");
$faq[] = array("Shtimi i një imazhi në mesazhin tuaj", "BBCode i phpBB përfshin një kod për tregimin e imazheve në mesazhet tuaja. Duhet të keni dy gjëra parasysh kur përdorni këtë kod; e para, shumë përdorues nuk e cmojnë vendosjen e shumë imazheve nëpër poste dhe e dyta imazhi duhet të jetë diku në internet para se të tregohet në një mesazh (nuk mund të ekzistojë vetëm në kompjuterin tuaj, përvec rastit kur keni një webserver). phpBB nuk e mundëson mbajtjen e imazheve në një dosje lokale tashti për tashti (këto cështje do adresohen në versionin e mëvonshëm të phpBB). Për të treguar një imazh duhet ta rrethoni URL-në (adresën në internet) e imazhit me kodet <b>[img][/img]</b>. Psh:<br /><br /><b>[img]</b>http://www.phpbb.com/images/phplogo.gif<b>[/img]</b><br /><br />Sic u tregua në seksionin e URL (mësipër) ju mund ta mbështillni një imazh me kodin <b>[url][/url]</b> nqs dëshironi që imazhi të shërbejë edhe si lidhje, psh.<br /><br /><b>[url=http://www.phpbb.com/][img]</b>http://www.phpbb.com/images/phplogo.gif<b>[/img][/url]</b><br /><br />do prodhonte:<br /><br /><a href=\"http://www.phpbb.com/\" target=\"_blank\"><img src=\"http://www.phpbb.com/images/phplogo.gif\" border=\"0\" alt=\"\" /></a><br />");
$faq[] = array("--", "Cështje të tjera");
$faq[] = array("A mund të shtoj kodet e mia?", "Jo, nuk besojmë se është e mundur në phpBB 2.0 Po mundohemi të shtojmë kode BBCode të personalizueshme në versionin tjetër të phpBB.");
//
// This ends the BBCode guide entries
//
?>

View file

@ -1,107 +0,0 @@
<?php
/***************************************************************************
* lang_faq.php [english]
* -------------------
* begin : Wednesday Oct 3, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
/***************************************************************************/
*
* Translation to Albanian done by alket ---> alkettttt@yahoo.com
* http://www26.brinkster.com/alketttt/
*
***************************************************************************/
//
// 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("--","Probleme me regjistrimin dhe identifikimin");
$faq[] = array("Pse nuk identifikohem dot?", "A jeni regjistruar? Duhet të regjistroheni nqs doni të identifikoheni. A jeni përjashtuar nga forumi (një mesazh do shfaqet dhe do ju thotë që jeni përjashtuar)? Nqs po, kontaktoni webmasterin ose administratorin e forumit për sqarime të mëtejshme. Nqs jeni regjistruar dhe nuk jeni përjashtuar dhe prapë nuk identifikoheni dot, atëherë kontrolloni emrin e identifikimit dhe fjalëkalimin. Ky është problemi më i zakonshëm po nqs ju jeni i sigurtë që emri dhe fjalëkalimi janë korrektë kontaktoni administratorin e forumit.");
$faq[] = array("Përse është e nevojshme që të regjistrohem?", "Kjo varet nga konfigurimi i forumit. Megjithatë, regjistrimi ju jep mundësi që nuk u jepen vizitorëve të paregjistruar. Regjistrimi ju mundëson caktimin e ikonave personale, përdorimin e mesazheve private, dërgimin e mesazheve me postë elektronike anëtarëve të tjerë, anëtarësimin në grupe përdoruesish, etj. Regjistrimi bëhet brenda disa minutash kështu që ju këshillojmë ta bëni këtë.");
$faq[] = array("Pse c'indentifikohem automatikisht?", "Nqs nuk zgjidhni kutinë <i>Më identifiko automatikisht</i> kur identifikoheni, programi i forumit do ju mbajë mend vetëm për një kohë të caktuar. Kjo ndalon përdorimin e llogarisë tuaj nga dikush tjetër që përdor kompjuerin tuaj. Nqs doni të identifikoheni automatikisht, zgjidhni kutinë e përmendur më lartë; Ky veprim nuk rekomandohet nëse përdorni një kompjuter që nuk është juaji.");
$faq[] = array("A është e mundur që emri im të mos shfaqet tek lista e përdoruesve në linjë?", "Po, tek profili juaj bëje mundësinë <i>Fshih qënien në linjë</i> aktive. Pasi bën këtë vetëm administratorët dhe ti mund të shikojne emrin tënd. Ti do numërohesh si përdorues i fshehur.");
$faq[] = array("Humba fjalëkalimin!", "Mos u frikësoni. Megjithëse fjalëkalimi i vjetër nuk mund të shikohet, ai mund të rishkruhet. Për të bërë këtë shko tek faqja e identifikimit dhe kliko <u>Harrova fjalëkalimin</u>, ndiq udhëzimet dhe brënda disa minutash do keni një fjalëkalim të ri.");
$faq[] = array("U regjistrova po nuk identifikohem dot!", "Në fillim kontrollo nëse po specifikon emrin dhe fjalëkalimin e duhur. Nqs ata janë korrekt, dy gjëra mund të ndodhin: Nqs COPPA është aktivizuar dhe ju zgjodhët <u>Jam nën 13 vjec</u> kur u regjistruat, ndiq udhëzimet që tu dërguan. Nqs COPPA nuk është aktivizuar, a ka nevojë për aktivizim llogaria juaj? Disa forume kërkojnë aktivizim të llogarisë nga ju ose administratori para se të identifikoheni. Kjo gjë duhet tu thuhej në momentin që u regjistruat. Nqs morët një mesazh me postë elektronike, ndiqni udhëzimet, nqs jo verifikoni adresën tuaj të postës elektronike. Një prej arsyeve që aktivizimi kërkohet është parandalimi i regjistrimit me adresa që nuk ekzistojnë. Nqs jeni i sigurtë që adresa juaj e postës elektronike është korrekte, kontaktoni administratorin e forumit.");
$faq[] = array("U regjistrova kohë më parë po nuk identifikohem dot më!", "Arsyet më të zakonshme janë specifikimi i gabuar i emrit të identifikimit ose fjalëkalimit (shikoni postën elektronike me adresën e së cilës u u regjistruat për këto) ose administratori ka fshirë llogarinë tuaj për të zvogëluar regjistrin e forumit. Provoni të regjistroheni prapë dhe të merrni pjesë në diskutime.");
$faq[] = array("--","Preferencat dhe vetitë e përdoruesve");
$faq[] = array("Si mund ti ndryshoj vetitë e mia?", "Të gjitha vetitë tuaja (nqs jeni regjistruar) ruhen ne regjistër. Klikoni <u>Profili</u> pë të modifikuar të gjitha vetitë e profilit tuaj (zakonisht shfaqet në fillim të faqes");
$faq[] = array("Ora nuk është e saktë!", "Ora është përgjithësisht e saktë, megjithatë ju mund të jeni duke parë orën e një brezi tjetë orar. Në këtë rast duhet të ndryshoni brezin orar ku jeni tek profili juaj, psh. Londër, Paris, New York, Sidnei, etj. Vini re se brezi orar ashtu si shumë veti të tjera mund të ndryshoshet vetëm nqs jeni i regjistruar");
$faq[] = array("E ndryshova brezin orar po ora është prapë gabim!", "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("Gjuha ime nuk është në listë!", "Kjo ndodh se ose administratori nuk e ka instaluar ose paketa për gjuhën që doni nuk ekziston. Provoni ti kërkoni administratorit ta instalojë gjuhën që doni; nqs nuk ekziston mos merrni leje dhe krijoni vetë një përkthim të ri. Më shumë informacion ka tek faqja e phpBB Group (shiko lidhjen në fund të faqes)");
$faq[] = array("Si mund të vendos një imazh nën emrin tim?", "Zakonisht ka dy imazhe nën emrin tuaj. I pari është imazhi që tregon gradën tuaj dhe zakonisht përbëhet nga disa yje që tregojnë se sa mesazhe keni shkruar në forum. Nën këtë mund të jetë një imazh më i madh që njihet si ikona personale. Aktivizimi dhe mënyra e përdorjes së ikonave personale është në dorë të administratorit të forumit. Nqs nuk keni mundësi ti përdorni ikonat personale, pyesni administratorin për arsyet.");
$faq[] = array("Si mund ta ndryshoj gradën?", "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, e.g. 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("Kur klikoj butonin e postës elektronike të një përdoruesi më kërkohet të identifikohem!", "Na vjen keq, po vetëm përdoruesët e regjistruar mund të dërgojnë mesazhe nëpërmjet formularit të forumit (nqs administratori e ka aktivizuar këtë funksion). Kjo bëhet për të penguar abuzimin e sistemit të postës elektronike nga përdoruesit anonimë.");
$faq[] = array("--","Probleme me postimin");
$faq[] = array("Si mund të shkruaj në forum?", "Shumë e thjeshtë. Kliko në butonin e duhur tek paneli i forumit ose temës. Mund tu kërkohet të regjistroheni përpara se të shkruani dicka; veprimet që ju lejohen tregohen nën panelin e forumit ose temës. (psh. <i>Ju mund të krijoni tema të reja në këtë forum. Ju mund ti përgjigjeni temave të këtij forumi<i> etj.)");
$faq[] = array("Si mund ta redaktoj apo fshij një mesazh?", "Nqs nuk jeni moderator ju mund të fshini apo redaktoni vetëm shkrimet tuaja (shpeshherë vetëm brenda një kohe të caktuar mbas postimit) duke klikuar butonin <i>redakto</i> për mesazhin e duhur. 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, this 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("Si mund ti shtoj një firmë mesazheve të mia?", "Në fillim krijo një firmë nëpërmjet profilit tuaj. Pasi ta keni krijuar, zgjidhni kutinë <i>Bashkangjit firmën</i> në formularin e postimit. Gjithashtu, ju mund ti shtoni firmën cdo mesazhi automatikisht duke zgjedhur kutinë e duhur tek profili juaj (megjithatë ju akoma keni mundësinë për të mos ta shtuar firmën në mesazhe individuale, c'zgjidh kutinë tek formulari i postimit).");
$faq[] = array("Si mund të bëj një sondazh?", "Kur hapni një temë të re (ose kur redaktoni mesazhin e parë të temës, nqs keni lejen e duhur) do shikoni formularin <i>Hap Sondazh</i> nën formularin kryesor (nqs nuk e shikoni formularin e sondazhit ju nuk keni lejen e duhur për të hapur një sondazh). Shkruani pyetjen e sondazhit dhe të paktën dy zgjedhje. Për të shtuar një zgjedhje shkruaj emrin dhe kliko <i>Shto zgjedhje</i>. Gjithashtu keni mundësi të specifikoni se për sa ditë është i hapur sondazhi, 0 është sondazh infinit . Nr. i zgjedhjeve për një sondazh është i kufizuar nga administratori.");
$faq[] = array("Si fshihet apo redaktohet një sondazh?", "Ashtu si mesazhet, sondazhet mund të redaktohen vetëm nga autori, moderatorët ose administratori. Për të redaktuar sondazhin kliko tek mesazhi i parë i temës (vetëm mesazhi i parë në një temë mund të ketë një sondazh). Nqs askush nuk ka votuar atëherë autori mund ta fshijë ose redaktojë sondazhin, megjithatë nëse dikush ka votuar vetëm moderatorët ose administratori mund ta redaktojë ose fshijë. Kjo bëhet për të siguruar vërtetësinë e një sondazhi.");
$faq[] = array("Pse nuk hyj dot në disa forume?", "Disa forume mund të jenë private dhe vetëm anëtarë me leje speciale mund të hyjnë atje. Kjo leje jepet vetem nga administratori ose moderatorët, pyesni ata nëse mund të hyni.");
$faq[] = array("Pse nuk votoj dot?", "Vetëm përdoruesit e regjistruar mund të votojnë. Nqs jeni regjistruar dhe prapë nuk mund të votoni atëherë nuk keni lejen e duhur për ta bërë atë gjë.");
$faq[] = array("--","Formatimi dhe llojet e temave");
$faq[] = array("C'është BBCode?", "BBCode është një implementim special i HTML. Përdorimi i BBCode tek forumi juaj varet nga konfigurimi që ka bërë administratori. Për më tepër BBCode mund të aktivizohet ose c'aktivizohet në mesazhet individuale. BBCode është shumë i ngjashëm me HTML, tags janë mbyllur brenda kllapave katrore [ and ] në vend të < and > dhe ofron kontroll më të madh në formatimin e teksteve. Në varësi të shabllonit në përdorim, shtimi i BBCode në mesazhet tuaja është shumë i lehtë nëpërmjet kodeve të klikueshme mbi përmbajtjen e mesazhit në formularin e postimit. Megjithatë udhezuesi i BBCode mund t'ju hyjë në punë.");
$faq[] = array("A mund të përdor HTML?", "Përdorimi i HTML është i mundur kur administratori e ka aktivizuar, ai ka kontroll të plotë. Nqs HTML lejohet ju mund të realizoni se vetëm disa nga kodet punojnë. Kjo është bërë për arsye <i>sigurie</i> në mënyrë që të ndalohet abuzimi i forumit nga përdorimi i kodeve HTML të cilat shkatërrojnë formatimin ose krijojnë probleme të tjera. Nqs HTML është aktivizuar ju mund ta ç'aktivizoni në mënyrë individuale tek formulari i postimit.");
$faq[] = array("Cfarë janë figurinat?", "Figurinat janë imazhe të vogla që mund të përdoren për të shprehur emocione apo ndjenja në mënyrë grafike duke shkruar një kod të thjeshtë psh. :) nënkupton i gëzuar dhe :( nënkupton i mërzitur. Lista e plotë e figurinave shihet tek formulari i postimit. Mundohuni të mos i mbi-përdorni figurinat ama, ato mund ta bëjnë një mesazh të palexueshëm dhe moderatorët mund ta redaktojnë ose fshijnë mesazhin fare.");
$faq[] = array("A mund të postoj imazhe?", "Imazhen mund të tregohen në mesazhin tuaj. Megjithatë, nuk ka asnjë mënyrë për ti ngarkuar imazhet në regjistrin e këtij forumi. Prandaj ju duhet të krijoni një lidhje me një imazh në internet. Psh. http://www.diku.net/foto-ime.gif. Nuk mund të lidhni një imazh në kompjuterin tuaj ose imazhe që ruhen me fjalëkalim si psh. imazhe në inbox të hotmail apo yahoo etj. Për të krijuar lidhjen e imazhit me mesazhin tuaj përdor kodin BBCode [img] ose HTML. (Nqs lejohet)");
$faq[] = array("Cfarë janë Lajmërimet?", "Lajmërimet shpesh përmbajnë informacion të rëndësishëm që duhet lexuar sa më parë. Lajmërimet qëndrojnë në krye të forumit ku janë postuar. Postimi i Lajmërimeve bëhet nga persona me leje të posaçme.");
$faq[] = array("C'janë temat ngjitëse?", "Temat ngjitëse duken nën lajmërimet dhe vetëm në faqen e parë. Ato janë të rëndësishme kështu që duhen lexuar po patët mundësi. Ashtu si lajmërimet leja për të postuar tema ngjitëse jepet nga administratori.");
$faq[] = array("C'janë temat e kycura?", "Temat mund të kycen nga moderatorët ose administratori. Ju nuk mund ti përgjigjeni temave të kycura dhe sondazhet mbyllen automatikisht. Temat mund të mbyllen për shumë arsye.");
$faq[] = array("--","Nivelet dhe grupet e përdoruesve");
$faq[] = array("C'janë Administratorët?", "Administratorët janë persona me nivelin më të lartë të kontrollit mbi gjithë forumin. Ata mund të vendosin mbi gjithcka që ka lidhje me forumin si psh. vendosjen e autorizimeve, përjashtimin e anëtarëve, kush bëhet moderator etj. Ata gjithashtu kanë të gjitha vetitë e një moderatori.");
$faq[] = array("C'janë Moderatorët?", "Moderatorët janë anëtarë (ose grupe anëtarësh) të cilët janë zgjedhur për tu marrë me problemet e përditshme të forumit. Ata kanë mundësi të redaktojnë dhe fshijnë mesazhet si edhe mundësi të kycin, shkycin, zhvendosin, fshijnë dhe ndajnë temat e forumit që moderojnë. Përgjithësisht moderatorët kanë për detyrë të mbajnë mesazhet <i>në temë</i> dhe të fshijnë mesazhet fyese dhe abuzive");
$faq[] = array("C'janë grupet e anëtarëve?", "Grupet e anëtarëve janë një mënyrë për grupimin e anëtarëve për qëllime administrative. Cdo anëtar mund ti përkasë disa grupeve dhe cdo grupi mund ti jepen autorizme të ndryshme. Kjo e bën të lehtë bërjen e disa anëtarëve moderatorë në një forum apo dhënien e lejes për tu futur në një forum privat etj.");
$faq[] = array("Si mund të anëtarësohem në një grup?", "Për tu bërë anëtar i një grupi kliko atje ku thotë Grupet e Anëtarëve dhe do shihni të gjitha grupet. Megjithatë jo të gjitha grupet janë <i>të hapura</i> për cdo përdorues, disa janë të mbyllur dhe disa janë të fshehtë. Nqs grupi është i hapur atëherë kliko butonin e duhur për tu bërë anëtar. Moderatori i grupit duhet ta aprovojë kërkesën tuaj, ata mund tu bëjnë pyetje të ndryshme.");
$faq[] = array("Si mund të bëhem moderator i një grupi?", "Grupet e anëtarëve krijohen fillimisht nga administratori dhe pastaj ai zgjedh moderatorin. Nqs doni të bëheni moderator i një grupi, kontaktoni administratorin, provo ti dërgosh një mesazh privat.");
$faq[] = array("--","Mesazhet Private");
$faq[] = array("Nuk dërgoj dot mesazhe private!", "Ju ose nuk jeni regjistruar ose identifikuar, ose administratori ka ç'aktivizuar sistemin e mesazheve private për tërë forumin. Gjithashtu administratori mund tua ketë ndaluar të dërgoni mesazhe private. Në rastin e fundit kontaktoni administratorin.");
$faq[] = array("Ngela duke marrë mesazhe private që nuk i dua!", "Së shpejti do i shtojmë një listë injorimesh sistemit të mesazheve private, tashti për tashti provoni ti lajmëroni këta persona. Nqs ata vazhdojnë tu ngacmojnë lajmëroni administratorin i cili mund tua ndalojë mesazhet private atyre përgjithmonë.");
$faq[] = array("Më ka ardhur një mesazh abuziv ose ofendues nga një përdorues i këtij forumi!", "Na vjen shumë keq për këtë. Sistemi i postës elektronike që përdor ky forum përfshin disa mënyra për gjetjen e personave që dërgojnë mesazhe të tilla. Ju duhet ti dërgoni administratori një kopje të plotë të mesazhit që morët; it is very important this include the headers (these list details of the user that sent the email). Administratori mund të veprojë pastaj.");
//
// These entries should remain in all languages and for all modifications
//
$faq[] = array("--","Cështje të phpBB 2");
$faq[] = array("Kush e krijoi këtë program?", "Ky program (në formën origjinale) u prodhua, lëshua dhe është pronë e <a href=\"http://www.phpbb.com/\" target=\"_blank\">phpBB Group</a>. I disponueshëm sipas kushteve të GNU General Public Licence (Liçenca Publike e Përgjithshme) dhe mund të kopjohet lirisht, kliko tek lidhja e mësipërme për detaje");
$faq[] = array("Pse nuk e ka X apo Y veti ky program?", "Ky program u shkrua dhe liçencua nëpërmjet phpBB Group. Nqs mendoni se një veti e re duhet shtuar atëherë vizitoni faqen phpbb.com. Ju lutem mos postoni kërkesa për veti tek forumi i phpbb.com, phpbb Group përdor sourceforge.net për menaxhimin e procesit të programimit të phpBB. Ju lutem shikoni nëpër forum për të parë se c'pozicion merr grupi ynë për vetitë e reja dhe ndiqni procedurat e specifikuara.");
$faq[] = array("Kë duhet të kontaktoj për probleme abuzimi apo legale në lidhje me këtë forum?", "Ju duhet të kontaktoni administratorin e këtij forumi. Nqs nuk mundeni, duhet të kontaktoni ndonjë nga moderatorët. Nqs nuk merrni përgjigje atëherë kontaktoni pronarin e domain-it (bëni një kërkim whois) ose nqs ky forum përdor një shërbim falas (psh. yahoo, free.fr, f2s.com, etc.), departamentin e ankesave të atij shërbimi. Ju lutem kini parasysh që phpBB Group nuk ka absolutisht asnjë kontroll mbi këtë forum dhe nuk mund të mbahet përgjegjës se si, ku ose nga kush përdoret ky forum. Eshtë komplet i kotë kontaktimi i phpBB Group në lidhje me cdo lloj çështjeje legale (cease and desist, liable, defamatory comment, etc.) që nuk lidhet direkt me phpbb.com ose me programin e phpBB vetë. Nqs i dërgoni ndonjë mesazh phpBB Group mbi cdo lloj përdorimi të këtij nga programi nga një subjekt i tretë atëherë duhet të prisni një përgjigje të shkurtër ose mos prisni fare.");
//
// This ends the FAQ entries
//
?>

View file

@ -1,992 +0,0 @@
<?php
/***************************************************************************
* lang_main.php [English]
* -------------------
* begin : Sat Dec 16 2000
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
****************************************************************************/
/***************************************************************************
*
* 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 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!
//
//setlocale(LC_ALL, "en");
$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
//
// Common, these terms are used
// extensively on several pages
//
$lang['Forum'] = "Forum";
$lang['Category'] = "Kategori";
$lang['Topic'] = "Tema";
$lang['Topics'] = "Temat";
$lang['Replies'] = "Përgjigjet";
$lang['Views'] = "Shikime";
$lang['Post'] = "Mesazh";
$lang['Posts'] = "Mesazhe";
$lang['Posted'] = "Postuar";
$lang['Username'] = "Identifikim";
$lang['Password'] = "Fjalëkalim";
$lang['Email'] = "Email";
$lang['Poster'] = "Shkruesi";
$lang['Author'] = "Autori";
$lang['Time'] = "Ora";
$lang['Hours'] = "Orë";
$lang['Message'] = "Mesazh";
$lang['1_Day'] = "1 Ditë";
$lang['7_Days'] = "7 Ditë";
$lang['2_Weeks'] = "2 Javë";
$lang['1_Month'] = "1 Muaj";
$lang['3_Months'] = "3 Muaj";
$lang['6_Months'] = "6 Muaj";
$lang['1_Year'] = "1 Vit";
$lang['Go'] = "Shko";
$lang['Jump_to'] = "Kërce tek";
$lang['Submit'] = "Paraqit";
$lang['Reset'] = "Nga e para";
$lang['Cancel'] = "Anullo";
$lang['Preview'] = "Preview";
$lang['Confirm'] = "Konfirmo";
$lang['Spellcheck'] = "Spellcheck";
$lang['Yes'] = "Po";
$lang['No'] = "Jo";
$lang['Enabled'] = "Aktivizuar";
$lang['Disabled'] = "C'aktivizuar";
$lang['Error'] = "Problem";
$lang['Next'] = "Tjetri";
$lang['Previous'] = "I mëparshëm";
$lang['Goto_page'] = "Shko tek faqja";
$lang['Joined'] = "Anëtarësuar";
$lang['IP_Address'] = "Adresa IP";
$lang['Select_forum'] = "Zgjidh një forum";
$lang['View_latest_post'] = "Shiko mesazhin e fundit";
$lang['View_newest_post'] = "Shiko mesazhin më të ri";
$lang['Page_of'] = "Faqja <b>%d</b> e <b>%d</b>"; // Replaces with: Page 1 of 2 for example
$lang['ICQ'] = "Nr. i ICQ";
$lang['AIM'] = "Adresa e AIM";
$lang['MSNM'] = "MSN Messenger";
$lang['YIM'] = "Yahoo Messenger";
$lang['Forum_Index'] = "%s Indeksi i forumit"; // eg. sitename Forum Index, %s can be removed if you prefer
$lang['Post_new_topic'] = "Posto temë të re";
$lang['Reply_to_topic'] = "Përgjigju temës";
$lang['Reply_with_quote'] = "Përgjigju me kuotë";
$lang['Click_return_topic'] = "Kliko %skëtu%s për tu kthyer tek tema"; // %s's here are for uris, do not remove!
$lang['Click_return_login'] = "Kliko %skëtu%s për ta riprovuar";
$lang['Click_return_forum'] = "Kliko %skëtu%s për tu kthyer tek forumi";
$lang['Click_view_message'] = "Kliko %skëtu%s për të parë mesazhin tënd";
$lang['Click_return_modcp'] = "Kliko %skëtu%s për tu kthyer Paneli i Kontrollit për Moderatorët";
$lang['Click_return_group'] = "Kliko %skëtu%s për tu kthyer tek informacioni i grupit";
$lang['Admin_panel'] = "Shko tek Paneli i Administrimit";
$lang['Board_disable'] = "Kërkojme ndjesë po ky forum nuk është i disponueshëm";
//
// Global Header strings
//
$lang['Registered_users'] = "Anëtarët e regjistruar";
$lang['Browsing_forum'] = "Përdoruesit që po shfletojnë forumin:";
$lang['Online_users_zero_total'] = "<b>0</b> përdorues online:";
$lang['Online_users_total'] = "<b>%d</b> përdorues online:";
$lang['Online_user_total'] = "<b>%d</b> përdorues online:";
$lang['Reg_users_zero_total'] = " 0 anëtarë";
$lang['Reg_users_total'] = " %d anëtarë";
$lang['Reg_user_total'] = " %d anëtar";
$lang['Hidden_users_zero_total'] = " 0 të fshehur";
$lang['Hidden_user_total'] = " %d të fshehur";
$lang['Hidden_users_total'] = " %d të fshehur";
$lang['Guest_users_zero_total'] = " 0 vizitorë";
$lang['Guest_users_total'] = " %d vizitorë";
$lang['Guest_user_total'] = " %d vizitor";
$lang['Record_online_users'] = "Nr. Rekord i përdoruesve online ishte <b>%s</b> më %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'] = "Hera e fundit që vizituat %s"; // %s replaced by date/time
$lang['Current_time'] = "Ora është %s"; // %s replaced by time
$lang['Search_new'] = "Shiko mesazhet që nga vizita e fundit";
$lang['Search_your_posts'] = "Shiko mesazhet e tua";
$lang['Search_unanswered'] = "Shiko mesazhet pa përgjigje";
$lang['Register'] = "Regjistrohu";
$lang['Profile'] = "Profili";
$lang['Edit_profile'] = "Modifiko profilin";
$lang['Search'] = "Kërko";
$lang['Memberlist'] = "Lista e Anëtarëve";
$lang['FAQ'] = "FAQ";
$lang['BBCode_guide'] = "Udhëzuesi i BBCode";
$lang['Usergroups'] = "Grupet e Anëtarëve";
$lang['Last_Post'] = "Mesazhi i fundit";
$lang['Moderator'] = "Moderator";
$lang['Moderators'] = "Moderatorë";
//
// Stats block text
//
$lang['Posted_articles_zero_total'] = "Anëtarët e këtij forumi kanë postuar <b>0</b> artikuj"; // Number of posts
$lang['Posted_articles_total'] = "Anëtarët e këtij forumi kanë postuar <b>%d</b> artikuj"; // Number of posts
$lang['Posted_article_total'] = "Anëtarët e këtij forumi kanë postuar <b>%d</b> artikull"; // Number of posts
$lang['Registered_users_zero_total'] = "Forumi ka <b>0</b> anëtarë të regjistruar"; // # registered users
$lang['Registered_users_total'] = "Forumi ka <b>%d</b> anëtarë të regjistruar"; // # registered users
$lang['Registered_user_total'] = "Forumi ka <b>%d</b> anëtar të regjistruar"; // # registered users
$lang['Newest_user'] = "Anëtari më i ri është <b>%s%s%s</b>"; // a href, username, /a
$lang['No_new_posts_last_visit'] = "Asnjë mesazh i ri që nga vizita juaj e fundit";
$lang['No_new_posts'] = "Asnjë mesazh i ri";
$lang['New_posts'] = "Mesazhe të reja";
$lang['New_post'] = "Mesazh i ri";
$lang['No_new_posts_hot'] = "Asnjë mesazh i ri [ Popular ]";
$lang['New_posts_hot'] = "Mesazhe të reja [ Popular ]";
$lang['No_new_posts_locked'] = "Asnjë mesazh i ri [ Locked ]";
$lang['New_posts_locked'] = "Mesazhe të reja [ Locked ]";
$lang['Forum_is_locked'] = "Forumi është kycur";
//
// Login
//
$lang['Enter_password'] = "Ju lutem shkruani identifikimin dhe fjalkalimin për tu identifikuar";
$lang['Login'] = "Identifikohu";
$lang['Logout'] = "C'identifikohu";
$lang['Forgotten_password'] = "Harrova fjalkalimin";
$lang['Log_me_in'] = "Më identifiko automatikisht sa herë që vizitoj";
$lang['Error_login'] = "Keni specifikuar një llogari inekzistente, inaktive ose një fjalëkalim të gabuar";
//
// Index page
//
$lang['Index'] = "Indeksi";
$lang['No_Posts'] = "Asnjë mesazh";
$lang['No_forums'] = "Ky forum është bosh";
$lang['Private_Message'] = "Mesazh Privat";
$lang['Private_Messages'] = "Mesazhe Private";
$lang['Who_is_Online'] = "Kush është online";
$lang['Mark_all_forums'] = "Shënoji gjithë forumet si të vizituar";
$lang['Forums_marked_read'] = "Të gjithë forumet janë shënuar si të lexuar";
//
// Viewforum
//
$lang['View_forum'] = "Shiko forumin";
$lang['Forum_not_exist'] = "Forumi që zgjodhët nuk ekziston";
$lang['Reached_on_error'] = "Keni arritur tek kjo faqe nëpërmjet një gabimi";
$lang['Display_topics'] = "Shfaq tema nga ";
$lang['All_Topics'] = "Gjithë temat";
$lang['Topic_Announcement'] = "<b>Lajmërim:</b>";
$lang['Topic_Sticky'] = "<b>Ngjitës</b>";
$lang['Topic_Moved'] = "<b>Ka lëvizur</b>";
$lang['Topic_Poll'] = "<b>[ Sondazh ]</b>";
$lang['Mark_all_topics'] = "Shënoji gjithë temat si të lexuara";
$lang['Topics_marked_read'] = "Temat e këtij forumi u shënuan si të lexuara";
$lang['Rules_post_can'] = "Ju <b>mund</b> të krijoni tema të reja në këtë forum";
$lang['Rules_post_cannot'] = "Ju <b>nuk mund</b> të krijoni tema të reja në këtë forum";
$lang['Rules_reply_can'] = "Ju <b>mund</b> ti përgjigjeni temave të këtij forumi";
$lang['Rules_reply_cannot'] = "Ju <b>nuk mund</b> ti përgjigjeni temave të këtij forumi";
$lang['Rules_edit_can'] = "Ju <b>mund</b> të modifikoni postimet tuaja në këtë forum";
$lang['Rules_edit_cannot'] = "Ju <b>nuk mund</b> të modifikoni postimet tuaja në këtë forum";
$lang['Rules_delete_can'] = "Ju <b>mund</b> të fshini postimet tuaja në këtë forum";
$lang['Rules_delete_cannot'] = "Ju <b>nuk mund</b> të fshini postimet tuaja në këtë forum";
$lang['Rules_vote_can'] = "Ju <b>mund</b> të votoni në votimet e këtij forumi";
$lang['Rules_vote_cannot'] = "Ju <b>nuk mund</b> të votoni në votimet e këtij forumi";
$lang['Rules_moderate'] = "Ju <b>mund</b> të %smoderoni këtë forum%s"; // %s replaced by a href links, do not remove!
$lang['No_topics_post_one'] = "Nuk ka asnjë mesazh në këtë forum<br />Kliko tek <b>Hap temë të re</b> për të hapur një";
//
// Viewtopic
//
$lang['View_topic'] = "Shiko temën";
$lang['Guest'] = 'Guest';
$lang['Post_subject'] = "Titulli i mesazhit";
$lang['View_next_topic'] = "Shiko temën pasuese";
$lang['View_previous_topic'] = "Shiko temën e mëparshme";
$lang['Submit_vote'] = "Paraqit votën";
$lang['View_results'] = "Shiko rezultatin";
$lang['No_newer_topics'] = "Nuk ka tema më të reja në këtë forum";
$lang['No_older_topics'] = "Nuk ka tema më të vjetra në këtë forum";
$lang['Topic_post_not_exist'] = "Tema ose mesazhi që kërkuat nuk ekziston";
$lang['No_posts_topic'] = "Nuk ka asnjë mezash për këtë temë";
$lang['Display_posts'] = "Shfaq mesazhe nga";
$lang['All_Posts'] = "Të gjitha mesazhet";
$lang['Newest_First'] = "Më i riu në krye";
$lang['Oldest_First'] = "Më i vjetri në krye";
$lang['Back_to_top'] = "Mbrapsht në krye";
$lang['Read_profile'] = "Shiko profilin e anëtarit";
$lang['Send_email'] = "Dërgo email";
$lang['Visit_website'] = "Vizito websitin e shkruesit";
$lang['ICQ_status'] = "Statusi në ICQ";
$lang['Edit_delete_post'] = "Modifiko/fshi këtë mesazh";
$lang['View_IP'] = "Shiko IP e shkruesit";
$lang['Delete_post'] = "Fshije këtë mesazh";
$lang['wrote'] = "shkruajti"; // proceeds the username and is followed by the quoted text
$lang['Quote'] = "Kuotë"; // comes before bbcode quote output.
$lang['Code'] = "Kodi"; // comes before bbcode code output.
$lang['Edited_time_total'] = "Edituar për herë të fundit nga %s në %s, edituar %d herë gjithsej"; // Last edited by me on 12 Oct 2001, edited 1 time in total
$lang['Edited_times_total'] = "Edituar për herë të fundit nga %s në %s, edituar %d herë gjithsej"; // Last edited by me on 12 Oct 2001, edited 2 times in total
$lang['Lock_topic'] = "Kyce këtë temë";
$lang['Unlock_topic'] = "Shkyce këtë temë";
$lang['Move_topic'] = "Zhvendose këtë temë";
$lang['Delete_topic'] = "Fshije këtë temë";
$lang['Split_topic'] = "Ndaje këtë temë";
$lang['Stop_watching_topic'] = "Ndalo së vëzhguari këtë temë";
$lang['Start_watching_topic'] = "Vëzhgo këtë temë për përgjigje";
$lang['No_longer_watching'] = "Ju nuk e vëzhgoni më këtë temë";
$lang['You_are_watching'] = "Ju jeni duke e vëzhguar këtë temë";
$lang['Total_votes'] = "Totali i votave";
//
// Posting/Replying (Not private messaging!)
//
$lang['Message_body'] = "Përmbajtja e mesazhit";
$lang['Topic_review'] = "Shqyrto temën";
$lang['No_post_mode'] = "Mënyra e postimit nuk është specifikuar"; // If posting.php is called without a mode (newtopic/reply/delete/etc, shouldn't be shown normaly)
$lang['Post_a_new_topic'] = "Hap një temë të re";
$lang['Post_a_reply'] = "Përgjigju";
$lang['Post_topic_as'] = "Hap një temë si";
$lang['Edit_Post'] = "Modifiko mesazhin";
$lang['Options'] = "Mundësitë";
$lang['Post_Announcement'] = "Lajmërim";
$lang['Post_Sticky'] = "Ngjitës";
$lang['Post_Normal'] = "Normal";
$lang['Confirm_delete'] = "Jeni i sigurtë për fshirjen e këtij mesazhi?";
$lang['Confirm_delete_poll'] = "Jeni i sigurtë për fshirjen e këtij sondazhi?";
$lang['Flood_Error'] = "Nuk mund të postoni prapë menjëherë";
$lang['Empty_subject'] = "Duhet të specifikoni një titull kur postoni një mesazh";
$lang['Empty_message'] = "Duhet të shkruani dicka kur postoni një mesazh";
$lang['Forum_locked'] = "Forumi është kycur. Postimi, modifikimi dhe fshirja e temave s'lejohet";
$lang['Topic_locked'] = "Forumi është kycur. Postimi dhe modifikimi i mesazheve nuk lejohet";
$lang['No_post_id'] = "Nuk u specifikua ID e postimit";
$lang['No_topic_id'] = "Duhet të zgjidhni një temë për tu përgjigjur";
$lang['No_valid_mode'] = "Ju vetëm mund të postoni, përgjigjeni, modifikoni ose kuotoni mesazhet...ju lutem provojeni prapë";
$lang['No_such_post'] = "Një post i tillë nuk ekziston, ju lutem provoni prapë";
$lang['Edit_own_posts'] = "Na vjen keq po ju mund të editoni vetëm mesazhet tuaja";
$lang['Delete_own_posts'] = "Na vjen keq po ju mund të fshini vetëm mesazhet tuaja";
$lang['Cannot_delete_replied'] = "Na vjen keq po ju nuk mund të fshini mesazhe të cilat kanë përgjigje";
$lang['Cannot_delete_poll'] = "Na vjen keq po ju nuk mund të fshini një sondazh aktiv";
$lang['Empty_poll_title'] = "Duhet të specifikoni një titull për sondazhin tuaj";
$lang['To_few_poll_options'] = "Duhet të specifikoni të paktën dy zgjedhje për sondazhin";
$lang['To_many_poll_options'] = "Keni vënë shumë zgjedhje për sondazhin";
$lang['Post_has_no_poll'] = "Ky mesazh nuk ka sondazh";
$lang['Add_poll'] = "Hap një sondazh";
$lang['Add_poll_explain'] = "Nqs nuk do të shtosh një sondazh tek tema, lëre fushën bosh";
$lang['Poll_question'] = "Pyetja e sondazhit";
$lang['Poll_option'] = "Zgjedhje sondazhi";
$lang['Add_option'] = "Shto mundësi";
$lang['Update'] = "Ri-fresko";
$lang['Delete'] = "Fshi";
$lang['Poll_for'] = "Vazhdo sondazhin për";
$lang['Days'] = "Ditë"; // This is used for the Run poll for ... Days + in admin_forums for pruning
$lang['Poll_for_explain'] = "[ Shkruaj 0 ose lër bosh për një sondazh që vazhdon gjithmonë ]";
$lang['Delete_poll'] = "Fshi sondazhin";
$lang['Disable_HTML_post'] = "Disaktivizo HTML në këtë mesazh";
$lang['Disable_BBCode_post'] = "Disaktivizo BBCode në këtë mesazh";
$lang['Disable_Smilies_post'] = "Disaktivizo figurinat në këtë mesazh";
$lang['HTML_is_ON'] = "HTML është e <u>aktivizuar</u>";
$lang['HTML_is_OFF'] = "HTML është e <u>disaktivizuar</u>";
$lang['BBCode_is_ON'] = "%sBBCode%s është i <u>aktivizuar</u>"; // %s are replaced with URI pointing to FAQ
$lang['BBCode_is_OFF'] = "%sBBCode%s është i <u>disaktivizuar</u>";
$lang['Smilies_are_ON'] = "Figurinat janë <u>aktivizuar</u>";
$lang['Smilies_are_OFF'] = "Figurinat janë <u>disaktivizuar</u>";
$lang['Attach_signature'] = "Bashkangjit firmën (firma mund të modifikohet tek profili)";
$lang['Notify'] = "Më njofto kur dikush përgjigjet";
$lang['Delete_post'] = "Fshije këtë mesazh";
$lang['Stored'] = "Mesazhi juaj u postua me sukses";
$lang['Deleted'] = "Mesazhi juaj u fshi me sukses";
$lang['Poll_delete'] = "Sondazhi juaj u fshi me sukses";
$lang['Vote_cast'] = "Vota juaj u regjistrua";
$lang['Topic_reply_notification'] = "Njoftim për përgjigje tek tema";
$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'] = "Emocionet";
$lang['More_emoticons'] = "Trego më shumë emocione";
$lang['Font_color'] = "Ngjyra e fontit";
$lang['color_default'] = "E paracaktuar";
$lang['color_dark_red'] = "E kuqe e errët";
$lang['color_red'] = "E kuqe";
$lang['color_orange'] = "Portokalli";
$lang['color_brown'] = "Kafe";
$lang['color_yellow'] = "E verdhë";
$lang['color_green'] = "Jeshile";
$lang['color_olive'] = "Ngjyrë ulliri";
$lang['color_cyan'] = "Bojëqielli";
$lang['color_blue'] = "Blu";
$lang['color_dark_blue'] = "Blu e errët";
$lang['color_indigo'] = "Lejla";
$lang['color_violet'] = "Vjollcë";
$lang['color_white'] = "E bardhë";
$lang['color_black'] = "E zezë";
$lang['Font_size'] = "Nr. i fontit";
$lang['font_tiny'] = "i vockël";
$lang['font_small'] = "i vogël";
$lang['font_normal'] = "normal";
$lang['font_large'] = "i madh";
$lang['font_huge'] = "i stërmadh";
$lang['Close_Tags'] = "Close Tags";
$lang['Styles_tip'] = "Tip: Styles can be applied quickly to selected text";
//
// Private Messaging
//
$lang['Private_Messaging'] = "Mesazhim privat";
$lang['Login_check_pm'] = "Identifikohu për të parë mesazhet private";
$lang['New_pms'] = "Ju keni %d mesazhe të reja"; // You have 2 new messages
$lang['New_pm'] = "Ju keni %d mesazh të ri"; // You have 1 new message
$lang['No_new_pm'] = "Ju nuk keni asnjë mesazh të ri";
$lang['Unread_pms'] = "Ju keni %d mesazhe të palexuara";
$lang['Unread_pm'] = "Ju keni % mesazh të palexuar";
$lang['No_unread_pm'] = "Ju nuk keni mesazhe të palexuara";
$lang['You_new_pm'] = "Një mesazh privat i ri ka ardhur për ju tek Inbox";
$lang['You_new_pms'] = "Disa mesazhe private të reja kanë ardhur për ju tek Inbox";
$lang['You_no_new_pm'] = "Asnjë mesazh privat i ri në Inbox";
$lang['Inbox'] = "Inbox";
$lang['Outbox'] = "Outbox";
$lang['Savebox'] = "Savebox";
$lang['Sentbox'] = "Sentbox";
$lang['Flag'] = "Flag";
$lang['Subject'] = "Titulli";
$lang['From'] = "Nga";
$lang['To'] = "Për";
$lang['Date'] = "Data";
$lang['Mark'] = "Shëno";
$lang['Sent'] = "Dërguar";
$lang['Saved'] = "Ruajtur";
$lang['Delete_marked'] = "Fshi të shënuarët";
$lang['Delete_all'] = "Fshiji të gjithë";
$lang['Save_marked'] = "Ruaji të shënuarët";
$lang['Save_message'] = "Ruaj mesazhin";
$lang['Delete_message'] = "Fshi mesazhin";
$lang['Display_messages'] = "Shfaq mesazhe nga"; // Followed by number of days/weeks/months
$lang['All_Messages'] = "Të gjithë mesazhet";
$lang['No_messages_folder'] = "Ju nuk keni asnjë mesazh në këtë dosje";
$lang['PM_disabled'] = "Mesazhet private nuk lejohen në këtë forum";
$lang['Cannot_send_privmsg'] = "Na vjen keq, po administratori jua ka ndaluar dërgimin e mesazheve private";
$lang['No_to_user'] = "Duhet të specifikoni një emër për të dërguar këtë mesazh";
$lang['No_such_user'] = "Na vjen keq po ky anëtar nuk ekziston";
$lang['Disable_HTML_pm'] = "C'aktivizo HTML në këtë mesazh";
$lang['Disable_BBCode_pm'] = "C'aktivizo BBCode në këtë mesazh";
$lang['Disable_Smilies_pm'] = "C'aktivizo figurinat në këtë mesazh";
$lang['Message_sent'] = "Mesazhi juaj u dërgua";
$lang['Click_return_inbox'] = "Kliko %skëtu%s për tu kthyer tek Inbox";
$lang['Click_return_index'] = "Kliko %skëtu%s për tu kthyer tek Indeksi";
$lang['Send_a_new_message'] = "Dërgo një mesazh të ri privat";
$lang['Send_a_reply'] = "Përgjigju një mesazhi privat";
$lang['Edit_message'] = "Modifiko mesazhin privat";
$lang['Notification_subject'] = "Një mesazh i ri privat ka ardhur";
$lang['Find_username'] = "Gjej një anëtar";
$lang['Find'] = "Gjej";
$lang['No_match'] = "Nuk u gjet asnjë";
$lang['No_post_id'] = "Nuk u specifikua ID e postimit";
$lang['No_such_folder'] = "Një dosje e tillë nuk ekziston";
$lang['No_folder'] = "Asnjë dosje nuk u specifikua";
$lang['Mark_all'] = "Shënoji të gjithë/a";
$lang['Unmark_all'] = "De-Shëno të gjitha :)";
$lang['Confirm_delete_pm'] = "Jeni i sigurtë që doni ta fshini këtë mesazh?";
$lang['Confirm_delete_pms'] = "Jeni i sigurtë që doni ti fshini këto mesazhe?";
$lang['Inbox_size'] = "Ju e keni Inbox %d%% plot"; // eg. Your Inbox is 50% full
$lang['Sentbox_size'] = "Ju e keni Sentbox %d%% plot";
$lang['Savebox_size'] = "Ju e keni Savebox %d%% plot";
$lang['Click_view_privmsg'] = "Kliko %skëtu%s për të vizituar Inbox-in tuaj";
//
// Profiles/Registration
//
$lang['Viewing_user_profile'] = "Duke parë profilin :: %s"; // %s is username
$lang['About_user'] = "Gjithcka mbi %s"; // %s is username
$lang['Preferences'] = "Preferencat";
$lang['Items_required'] = "Artikujt e shënuar me * janë të domosdoshëm (unless stated otherwise)";
$lang['Registration_info'] = "Informacioni i regjistrimit";
$lang['Profile_info'] = "Informacioni i profilit";
$lang['Profile_info_warn'] = "Ky informacion do jetë i disponueshëm tek publiku";
$lang['Avatar_panel'] = "Paneli i kontrollit të ikonave personale";
$lang['Avatar_gallery'] = "Galeria e ikonave personale";
$lang['Website'] = "Websit";
$lang['Location'] = "Vendodhja";
$lang['Contact'] = "Kontakto";
$lang['Email_address'] = "Adresa e e-mail";
$lang['Email'] = "Email";
$lang['Send_private_message'] = "Dërgo mesazh privat";
$lang['Hidden_email'] = "[ I/e fshehur ]";
$lang['Search_user_posts'] = "Gjej gjithë mesazhet nga %s";
$lang['Interests'] = "Interesat";
$lang['Occupation'] = "Profesioni";
$lang['Poster_rank'] = "Grada e anëtarit";
$lang['Total_posts'] = "Nr. total i mesazheve";
$lang['User_post_pct_stats'] = "%.2f%% i totalit"; // 1.25% of total
$lang['User_post_day_stats'] = "%.2f mesazhe në ditë"; // 1.5 posts per day
$lang['Search_user_posts'] = "Gjej gjithë mesazhet nga %s"; // Find all posts by username
$lang['No_user_id_specified'] = "Na vjen keq po ai anëtar nuk ekziston";
$lang['Wrong_Profile'] = "Nuk lejohet modifiki i profilit të një tjetri";
$lang['Only_one_avatar'] = "Lejohet vetëm një ikonë personale";
$lang['File_no_data'] = "Skedari tek URL që specifikuat është i korruptuar";
$lang['No_connection_URL'] = "Lidhja me URL që specifikuat është e pamundur për momentin";
$lang['Incomplete_URL'] = "URL që specifikuat nuk ekziston";
$lang['Wrong_remote_avatar_format'] = "URL e ikonës personale nuk është e saktë";
$lang['No_send_account_inactive'] = "Na vjen keq, po fjalëkalimi juaj nuk mund të nxirret nga regjistri sepse llogaria juaj nuk është aktive. Kontaktoni administratorin ";
$lang['Always_smile'] = "Lejo figurinat gjithmonë";
$lang['Always_html'] = "Lejo HTML gjithmonë";
$lang['Always_bbcode'] = "Lejo BBCode gjithmonë";
$lang['Always_add_sig'] = "Bashkangjite firmën gjithmonë";
$lang['Always_notify'] = "Më njofto gjithmonë kur ka përgjigje";
$lang['Always_notify_explain'] = "Dërgon një email kur dikush shkruan në një temë ku keni shkruar edhe ju. Ky opsion mund të ndryshohet sa herë që poston";
$lang['Board_style'] = "Stili i forumit";
$lang['Board_lang'] = "Gjuha e forumit";
$lang['No_themes'] = "Asnjë temë në regjistër";
$lang['Timezone'] = "Brezi orar";
$lang['Date_format'] = "Formati i kohës";
$lang['Date_format_explain'] = "Sintaksa e përdorur është identike me atë të funksionit <a href=\"http://www.php.net/date\" target=\"_other\">date()</a> të PHP";
$lang['Signature'] = "Firma";
$lang['Signature_explain'] = "Kjo është një thënie ose grup fjalësh që i bashkangjitet cdo meszhi që shkruani. Një limit prej %d karakteresh ekziston";
$lang['Public_view_email'] = "Gjithmonë tregoje adresën time të e-mail";
$lang['Current_password'] = "Fjalëkalimi i tanishëm";
$lang['New_password'] = "Fjalëkalimi i ri";
$lang['Confirm_password'] = "Konfirmo fjalëkalimin";
$lang['Confirm_password_explain'] = "You must confirm your current password if you wish to change it or alter your email address";
$lang['password_if_changed'] = "Vendosja e një fjalëkalimi është e nevojshme vetëm nëse doni të ndryshoni fjalëkalimin e tanishëm";
$lang['password_confirm_if_changed'] = "Konfirmimi i fjalëkalimit është i nevojshëm vetëm nëse doni të ndryshoni fjalëkalimin e tanishëm";
$lang['Avatar'] = "Ikona personale";
$lang['Avatar_explain'] = "Shfaq një imazh të vogël poshtë emrit tuaj kur postoni. Vetëm një imazh është i lejuar dhe gjerësia lejohet deri në %d pixel, lartësia deri në %d pixel dhe madhësia e skedarit deri në %d kB.";
$lang['Upload_Avatar_URL'] = "Ngarko ikonën nga interneti";
$lang['Upload_Avatar_URL_explain'] = "Shkruaj adresën e ikonës, do kopjohet këtu";
$lang['Pick_local_Avatar'] = "Zgjidh një ikonë nga galeria";
$lang['Link_remote_Avatar'] = "Link to off-site Avatar";
$lang['Link_remote_Avatar_explain'] = "Specifiko adresën e internetit (URL) të imazhit që doni të lidhni si ikonë";
$lang['Avatar_URL'] = "URL of Avatar Image";
$lang['Select_from_gallery'] = "Select Avatar from gallery";
$lang['View_avatar_gallery'] = "Show gallery";
$lang['Select_avatar'] = "Zgjidh ikonën";
$lang['Return_profile'] = "Anulloje ikonën";
$lang['Select_category'] = "Zgjidh kategorinë";
$lang['Delete_Image'] = "Fshi imazhin";
$lang['Current_Image'] = "Imazhi i tanishëm";
$lang['Notify_on_privmsg'] = "Më njofto për cdo mesazh privat";
$lang['Popup_on_privmsg'] = "Hap dritare të re kur merr mesazh privat";
$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'] = "Profili juaj u rifreskua";
$lang['Profile_updated_inactive'] = "Your profile has been updated, however you have changed vital details thus your account is now inactive. Check your email to find out how to reactivate your account, or if admin activation is require wait for the administrator to reactivate your account";
$lang['Password_mismatch'] = "Fjalëkalimet që specifikuat janë të ndryshëm";
$lang['Current_password_mismatch'] = "Fjalëkalimi që specifikuat nuk është i njëjtë me atë në regjistrin tonë";
$lang['Password_long'] = "Fjalëkalimi juaj nuk duhet të ketë më shumë se 32 karaktere";
$lang['Username_taken'] = "Na vjen keq po ky identifikim është në përdorim";
$lang['Username_invalid'] = "Na vjen keq po ky identifikim përmban një karakter invalid si psh. \"";
$lang['Username_disallowed'] = "Na vjen keq po ky identifikim nuk është i lejueshëm";
$lang['Email_taken'] = "Na vjen keq po ajo adresë poste elektronike është përdorur më parë";
$lang['Email_banned'] = "Na vjen keq po ajo adresë poste elektronike është përjashtuar";
$lang['Email_invalid'] = "Na vjen keq po ajo adresë poste elektronike është invalide";
$lang['Signature_too_long'] = "Firma juaj është shumë e gjatë";
$lang['Fields_empty'] = "Duhet të mbushni fushat e domosdoshme";
$lang['Avatar_filetype'] = "Lloji i skedarit të ikonës personale duhet të jetë .jpg, .gif or .png";
$lang['Avatar_filesize'] = "Madhësia e skedarit të ikonës personale lejohet deri në %d kB"; // The avatar image file size must be less than 6 kB
$lang['Avatar_imagesize'] = "Ikona personale duhet të jetë deri në %d pixel e gjërë dhe %d pixel e lartë";
$lang['Welcome_subject'] = "Mirësevini tek %s Forums"; // Welcome to my.com forums
$lang['New_account_subject'] = "Llogari e re për anëtarë";
$lang['Account_activated_subject'] = "Llogaria u aktivizua";
$lang['Account_added'] = "Faleminderit për regjistrimin, llogaria juaj u hap. Ju tashti keni mundësi të identifikoheni. ";
$lang['Account_inactive'] = "Llogaria juaj u hap. Megjithatë, ky forum kërkon aktivizimin e llogarisë. Një mesazh me celësin e aktivizimit u dërgua tek adresa që dhatë. Shikoni mesazhin për më shumë informacion.";
$lang['Account_inactive_admin'] = "Llogaria juaj u hap. Megjithatë, ky forum kërkon aktivizimin e llogarisë nga administratori. Një mesazh do ju dërgohet sapo llogaria juaj të aktivizohet.";
$lang['Account_active'] = "Llogaria juaj u aktivizua, faleminderit për regjistrimin";
$lang['Account_active_admin'] = "Llogaria u aktivizua";
$lang['Reactivate'] = "Riaktivizo llogarinë";
$lang['COPPA'] = "Llogaria juaj u krijua por duhet të aprovohet nga administratori. Shikoni postën elektronike për detaje.";
$lang['Registration'] = "Kushtet e Regjistrimit";
$lang['Reg_agreement'] = "Megjithëse administratorët dhe moderatorët e këtij forumi do mundohen të fshijnë ose redaktojnë shkrime të kundërshtueshme sa më parë, është e pamundur që të rishikohet cdo mesazh. Prandaj ju duhet të kuptoni se mesazhet e postuara në këtë forum janë shprehje e opinionit të autorit dhe jo të administratorit, moderatorëve apo webmasterit (përvec rasteve kur këta të fundit janë autorë të shkrimeve) dhe ata nuk mund të mbahen përgjegjës. <br /><br />Ju pranoni të mos shkruani mesazhe abuzuese, vulgare, të neveritshme, urryese, kërcënuese, shpifëse apo cdo lloj materiali që mund të bjerë ndesh me ligjet në përdorim. Shkrime të tilla do cojnë në përjashtimin tuaj të menjëhershëm dhe të përhershëm (dhe njoftimin e ISP-së tuaj). Adresa IP për cdo mesazh regjistrohet për të bërë të mundur aplikimin e këtyre procedurave. Ju pranoni që webmasteri, administratori dhe moderatorët e këtij forumi kanë të drejtë të fshijnë, redaktojnë, zhvendosin apo kycin cdo temë sipas gjykimit të tyre. Si përdorues ju pranoni që informacioni që ju dhatë do të ruhet në një regjistër. Megjithëse ky informacion nuk do i jepet askujt pa lejen tuaj webmasteri, administratori dhe moderatorët nuk mund të mbahen përgjegjës nqs ky informacion vidhet.<br /><br />Ky forum përdor cookies për të ruajtur informacion në kompjuterin tuaj. Këto cookies nuk përmbajnë asnjë informacion personal, ato shërbejnë vetëm për përmirësimin e shërbimit që ofrohet nga ky forum. Adresa e postës elektronike përdoret vetëm për konfirmimin e regjistrimit tuaj dhe fjalëkalimit (dhe në rastet kur u dërgohet një fjalëkalimi i ri nqs harroni atë që kishit).";
$lang['Agree_under_13'] = "I pranoj këto kushte dhe jam <b>nën</b> 13 vjec";
$lang['Agree_over_13'] = "I pranoj këto kushte dhe jam <b>mbi</b> 13 vjec";
$lang['Agree_not'] = "Nuk i pranoj këto kushte";
$lang['Wrong_activation'] = "Celësi i aktivizimit që dhatë nuk përkon me asnjë celës në regjistrin tonë.";
$lang['Send_password'] = "Më dërgo një fjalëkalim të ri";
$lang['Password_updated'] = "Një fjalëkalim i ri u krijua, shiko postën elektronike për detajet e aktivizimit";
$lang['No_email_match'] = "Adresa e postës elektronike që dhatë nuk përkon me adresën e atij anëtari";
$lang['New_password_activation'] = "Aktivizim i fjalëkalimit të ri";
$lang['Password_activated'] = "Llogaria juaj u ri-aktivizua. Jepni fjalëkalimin e ri për tu identifikuar";
$lang['Send_email_msg'] = "Dërgo një mesazh me postë elektronike";
$lang['No_user_specified'] = "Asnjë anëtar nuk u specifikua";
$lang['User_prevent_email'] = "Ky anëtar nuk pranon mesazhe me postë elektronike. Provo ti dërgosh një mesazh privat.";
$lang['User_not_exist'] = "Ai anëtar nuk ekziston";
$lang['CC_email'] = "Dërgoi vetes një kopje të mesazhit";
$lang['Email_message_desc'] = "Ky mesazh do dërgohet si tekst i thjeshtë. Mos përdor HTML ose BBCode. Adresa e kthimit do jetë adresa juaj.";
$lang['Flood_email_limit'] = "Nuk mund të dërgosh një mesazh tashti. Provo më vonë";
$lang['Recipient'] = "Marrësi";
$lang['Email_sent'] = "Mesazhi u dërgua";
$lang['Send_email'] = "Dërgo një mesazh";
$lang['Empty_subject_email'] = "Duhet të specifikoni një subjekt për këtë mesazh";
$lang['Empty_message_email'] = "Duhet të shkruani dicka që të dërgohet ky mesazh ";
//
// Memberslist
//
$lang['Select_sort_method'] = "Zgjidh metodën e renditjes";
$lang['Sort'] = "Rendit";
$lang['Sort_Top_Ten'] = "Top Ten Posters";
$lang['Sort_Joined'] = "Data e anëtarësimit";
$lang['Sort_Username'] = "Identifikimi";
$lang['Sort_Location'] = "Vendi";
$lang['Sort_Posts'] = "Nr. total i mesazheve";
$lang['Sort_Email'] = "Adresa e postës elektronike";
$lang['Sort_Website'] = "Websiti";
$lang['Sort_Ascending'] = "Në ngjitje";
$lang['Sort_Descending'] = "Në zbritje";
$lang['Order'] = "Rregulli";
//
// Group control panel
//
$lang['Group_Control_Panel'] = "Paneli i Kontrollit të Grupeve";
$lang['Group_member_details'] = "Detajet e anëtarësisë së grupeve";
$lang['Group_member_join'] = "Futu në një grup";
$lang['Group_Information'] = "Informacioni i grupit";
$lang['Group_name'] = "Emri i grupit";
$lang['Group_description'] = "Përshkrimi i grupit";
$lang['Group_membership'] = "Anëtarësia e grupit";
$lang['Group_Members'] = "Anëtarët e grupit";
$lang['Group_Moderator'] = "Moderatori i grupit";
$lang['Pending_members'] = "Anëtarët në pritje";
$lang['Group_type'] = "Lloji i grupit";
$lang['Group_open'] = "Grup i hapur";
$lang['Group_closed'] = "Grup i mbyllur";
$lang['Group_hidden'] = "Grup i fshehtë";
$lang['Current_memberships'] = "Anëtarësia aktuale";
$lang['Non_member_groups'] = "Grupet pa anëtarë";
$lang['Memberships_pending'] = "Anëtarësitë në pritje";
$lang['No_groups_exist'] = "Asnjë grup nuk ekziston";
$lang['Group_not_exist'] = "Ai grup nuk ekziston";
$lang['Join_group'] = "Futu në grup";
$lang['No_group_members'] = "Ky grup nuk ka anëtarë";
$lang['Group_hidden_members'] = "Ky grup është i fshehtë. Nuk mund t'ja shikosh anëtarësinë";
$lang['No_pending_group_members'] = "Ky grup nuk ka anëtarë në pritje";
$lang["Group_joined"] = "Ju jeni pajtuar tek ky grup me sukses <br /> Ju do lajmëroheni me postë elektronike kur të aprovoheni nga moderatori i grupit";
$lang['Group_request'] = "Eshtë bërë një kërkesë për anëtarësim";
$lang['Group_approved'] = "Kërkesa juaj u aprovua";
$lang['Group_added'] = "Ju shtuat këtij grupi";
$lang['Already_member_group'] = "Ju jeni anëtar i këtij grupi tashmë!";
$lang['User_is_member_group'] = "Përdoruesi është anëtar i këtij grupi tashmë";
$lang['Group_type_updated'] = "Lloji i grupit u ri-freskua";
$lang['Could_not_add_user'] = "Përdoruesi që zgjodhët nuk ekziston";
$lang['Could_not_anon_user'] = "Nuk mund ta bësh anëtar grupi përdoruesin Anonymous";
$lang['Confirm_unsub'] = "Jeni i sigurtë për anullimin e pajtimit tek ky grup?";
$lang['Confirm_unsub_pending'] = "Pajtimi juaj tek ky grup nuk është aprovuar akoma, jeni i sigurtë që doni ta anulloni?";
$lang['Unsub_success'] = "Pajtimi juaj tek ky grup është anulluar";
$lang['Approve_selected'] = "Aprovo të zgjedhurit";
$lang['Deny_selected'] = "Kundërshto të zgjedhurit";
$lang['Not_logged_in'] = "Duhet të jeni i identifikuar për tu futur në një grup";
$lang['Remove_selected'] = "Hiq të zgjedhurit";
$lang['Add_member'] = "Shto anëtar";
$lang['Not_group_moderator'] = "Nuk mund ta kryeni atë veprim sepse nuk jeni moderatori i këtij grupi";
$lang['Login_to_join'] = "Identifikohu për tu futur në një grup ose për të menaxhuar anëtarësitë";
$lang['This_open_group'] = "Ky është një grup i hapur, klikoni për të kërkuar anëtarësi";
$lang['This_closed_group'] = "Ky grup është mbyllur, nuk pranohen më anëtarë";
$lang['This_hidden_group'] = "Ky është grup i fshehtë, nuk lejohet aplikimi automatik";
$lang['Member_this_group'] = "Ju jeni anëtar i këtij grupi";
$lang['Pending_this_group'] = "Kërkesa juaj për anëtarësi në këtë grup nuk është konfirmuar akoma";
$lang['Are_group_moderator'] = "Ju jeni moderatori i grupit";
$lang['None'] = "Asnjë";
$lang['Subscribe'] = "Pajtohu";
$lang['Unsubscribe'] = "Anullo pajtimin";
$lang['View_Information'] = "Shiko informacionin";
//
// 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'] = "Kërko për autorin";
$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'] = "Kërko titullin dhe përmbajtjen mesazhit";
$lang['Search_msg_only'] = "Kërko vetëm përmbajtjen mesazhit";
$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'] = "Rendit sipas";
$lang['Sort_Time'] = "Kohës së postimit";
$lang['Sort_Post_Subject'] = "Subjekit të mesazhit";
$lang['Sort_Topic_Title'] = "Titullit të temës";
$lang['Sort_Author'] = "Autorit";
$lang['Sort_Forum'] = "Forumit";
$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['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>përdorues anonimë</b>";
$lang['Auth_Registered_Users'] = "<b>përdorues të regjistruar</b>";
$lang['Auth_Users_granted_access'] = "<b>users granted special access</b>";
$lang['Auth_Moderators'] = "<b>moderatorët</b>";
$lang['Auth_Administrators'] = "<b>administratorët</b>";
$lang['Not_Moderator'] = "Ju nuk jeni moderator i këtij forumi";
$lang['Not_Authorised'] = "I pa autorizuar";
$lang['You_been_banned'] = "Ju jeni përjashtuar nga ky forum <br />Kontaktoni webmasterin ose administratorin e forumit";
//
// Viewonline
//
$lang['Reg_users_zero_online'] = "Ka 0 anëtarë dhe "; // There ae 5 Registered and
$lang['Reg_users_online'] = "Ka %d anëtarë dhe "; // There ae 5 Registered and
$lang['Reg_user_online'] = "Ka %d anëtar dhe "; // There ae 5 Registered and
$lang['Hidden_users_zero_online'] = "0 Hidden users online"; // 6 Hidden users online
$lang['Hidden_users_online'] = "%d anëtarë sekret në linjë"; // 6 Hidden users online
$lang['Hidden_user_online'] = "%d anëtar sekret në linjë"; // 6 Hidden users online
$lang['Guest_users_online'] = "Ka %d vizitorë në linjë"; // There are 10 Guest users online
$lang['Guest_users_zero_online'] = "Ka 0 vizitorë në linjë"; // There are 10 Guest users online
$lang['Guest_user_online'] = "Ka %d vizitor në linjë"; // There is 1 Guest user online
$lang['No_users_browsing'] = "Nuk ka asnjë përdorues në linjë";
$lang['Online_explain'] = "This data is based on users active over the past five minutes";
$lang['Forum_Location'] = "Venddodhja e forumit";
$lang['Last_updated'] = "Rifreskuar më";
$lang['Forum_index'] = "Indeksi i forumit";
$lang['Logging_on'] = "Duke u identifikuar";
$lang['Posting_message'] = "Duke shkruar një mesazh";
$lang['Searching_forums'] = "Duke kërkuar nëpër forum";
$lang['Viewing_profile'] = "Duke parë profilin";
$lang['Viewing_online'] = "Duke parë kush është në linjë";
$lang['Viewing_member_list'] = "Duke parë listën e anëtarëve";
$lang['Viewing_priv_msgs'] = "Duke parë mesazhet private";
$lang['Viewing_FAQ'] = "Duke parë FAQ";
//
// Moderator Control Panel
//
$lang['Mod_CP'] = "Paneli i kontrollit për moderatorët";
$lang['Mod_CP_explain'] = "Nëpërmjet formularit të mëposhtëm mund të moderoni këtë forum. Mund të kycni, shkycni, lëvizni ose fshini cdo temë ose nr. temash.";
$lang['Select'] = "Zgjidh";
$lang['Delete'] = "Fshi";
$lang['Move'] = "Lëviz";
$lang['Lock'] = "Kyc";
$lang['Unlock'] = "Shkyc";
$lang['Topics_Removed'] = "Temat e zgjedhura u hoqën me sukses nga regjistri";
$lang['Topics_Locked'] = "Temat e zgjedhura u kycën me sukses";
$lang['Topics_Moved'] = "Temat e zgjedhura u zhvendosën me sukses";
$lang['Topics_Unlocked'] = "Temat e zgjedhura u shkycën me sukses";
$lang['No_Topics_Moved'] = "Asnjë temë nuk u zhvendos";
$lang['Confirm_delete_topic'] = "Jeni i sigurtë që doni të fshini temën/at e zgjedhur/a?";
$lang['Confirm_lock_topic'] = "Jeni i sigurtë që doni të kycni temën/at e zgjedhur/a?";
$lang['Confirm_unlock_topic'] = "Jeni i sigurtë që doni të shkycni temën/at e zgjedhur/a?";
$lang['Confirm_move_topic'] = "Jeni i sigurtë që doni të lëvizni temën/at e zgjedhur/a";
$lang['Move_to_forum'] = "Zhvendos tek forumi";
$lang['Leave_shadow_topic'] = "Lër hijen e temës tek forumi i vjetër";
$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 no selected any topics to preform this operation on. Please go back and select at least one.";
$lang['New_forum'] = "New forum";
$lang['This_posts_IP'] = "IP for this post";
$lang['Other_IP_this_user'] = "Other IP's this user has posted from";
$lang['Users_this_IP'] = "Users posting from this IP";
$lang['IP_info'] = "IP Information";
$lang['Lookup_IP'] = "Look up IP";
//
// Timezones ... for display on each page
//
$lang['All_times'] = "Ora është sipas %s"; // eg. All times are GMT - 12 Hours (times from next block)
$lang['-12'] = "GMT - 12 Hours";
$lang['-11'] = "GMT - 11 Hours";
$lang['-10'] = "HST (Hawaii)";
$lang['-9'] = "GMT - 9 Hours";
$lang['-8'] = "PST (U.S./Canada)";
$lang['-7'] = "MST (U.S./Canada)";
$lang['-6'] = "CST (U.S./Canada)";
$lang['-5'] = "EST (U.S./Canada)";
$lang['-4'] = "GMT - 4 Hours";
$lang['-3.5'] = "GMT - 3.5 Hours";
$lang['-3'] = "GMT - 3 Hours";
$lang['-2'] = "Mid-Atlantic";
$lang['-1'] = "GMT - 1 Hours";
$lang['0'] = "GMT";
$lang['1'] = "CET (Europe)";
$lang['2'] = "EET (Europe)";
$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'] = "WST (Australia)";
$lang['9'] = "GMT + 9 Hours";
$lang['9.5'] = "CST (Australia)";
$lang['10'] = "EST (Australia)";
$lang['11'] = "GMT + 11 Hours";
$lang['12'] = "GMT + 12 Hours";
// These are displayed in the timezone select box
$lang['tz']['-12'] = "(GMT -12:00 hours) Eniwetok, Kwajalein";
$lang['tz']['-11'] = "(GMT -11:00 hours) Midway Island, Samoa";
$lang['tz']['-10'] = "(GMT -10:00 hours) Hawaii";
$lang['tz']['-9'] = "(GMT -9:00 hours) Alaska";
$lang['tz']['-8'] = "(GMT -8:00 hours) Pacific Time (US &amp; Canada), Tijuana";
$lang['tz']['-7'] = "(GMT -7:00 hours) Mountain Time (US &amp; Canada), Arizona";
$lang['tz']['-6'] = "(GMT -6:00 hours) Central Time (US &amp; Canada), Mexico City";
$lang['tz']['-5'] = "(GMT -5:00 hours) Eastern Time (US &amp; Canada), Bogota, Lima, Quito";
$lang['tz']['-4'] = "(GMT -4:00 hours) Atlantic Time (Canada), Caracas, La Paz";
$lang['tz']['-3.5'] = "(GMT -3:30 hours) Newfoundland";
$lang['tz']['-3'] = "(GMT -3:00 hours) Brassila, Buenos Aires, Georgetown, Falkland Is";
$lang['tz']['-2'] = "(GMT -2:00 hours) Mid-Atlantic, Ascension Is., St. Helena";
$lang['tz']['-1'] = "(GMT -1:00 hours) Azores, Cape Verde Islands";
$lang['tz']['0'] = "(GMT) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia";
$lang['tz']['1'] = "(GMT +1:00 hours) Amsterdam, Berlin, Brussels, Madrid, Paris, Rome";
$lang['tz']['2'] = "(GMT +2:00 hours) Cairo, Helsinki, Kaliningrad, South Africa, Warsaw";
$lang['tz']['3'] = "(GMT +3:00 hours) Baghdad, Riyadh, Moscow, Nairobi";
$lang['tz']['3.5'] = "(GMT +3:30 hours) Tehran";
$lang['tz']['4'] = "(GMT +4:00 hours) Abu Dhabi, Baku, Muscat, Tbilisi";
$lang['tz']['4.5'] = "(GMT +4:30 hours) Kabul";
$lang['tz']['5'] = "(GMT +5:00 hours) Ekaterinburg, Islamabad, Karachi, Tashkent";
$lang['tz']['5.5'] = "(GMT +5:30 hours) Bombay, Calcutta, Madras, New Delhi";
$lang['tz']['6'] = "(GMT +6:00 hours) Almaty, Colombo, Dhaka, Novosibirsk";
$lang['tz']['6.5'] = "(GMT +6:30 hours) Rangoon";
$lang['tz']['7'] = "(GMT +7:00 hours) Bangkok, Hanoi, Jakarta";
$lang['tz']['8'] = "(GMT +8:00 hours) Beijing, Hong Kong, Perth, Singapore, Taipei";
$lang['tz']['9'] = "(GMT +9:00 hours) Osaka, Sapporo, Seoul, Tokyo, Yakutsk";
$lang['tz']['9.5'] = "(GMT +9:30 hours) Adelaide, Darwin";
$lang['tz']['10'] = "(GMT +10:00 hours) Canberra, Guam, Melbourne, Sydney, Vladivostok";
$lang['tz']['11'] = "(GMT +11:00 hours) Magadan, New Caledonia, Solomon Islands";
$lang['tz']['12'] = "(GMT +12:00 hours) Auckland, Wellington, Fiji, Marshall Island";
$lang['datetime']['Sunday'] = "e Dielë";
$lang['datetime']['Monday'] = "e Hënë";
$lang['datetime']['Tuesday'] = "e Martë";
$lang['datetime']['Wednesday'] = "e Mërkurë";
$lang['datetime']['Thursday'] = "e Enjte";
$lang['datetime']['Friday'] = "e Premte";
$lang['datetime']['Saturday'] = "e Shtunë";
$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'] = "Janar";
$lang['datetime']['February'] = "Shkurt";
$lang['datetime']['March'] = "Mars";
$lang['datetime']['April'] = "Prill";
$lang['datetime']['May'] = "Maj";
$lang['datetime']['June'] = "Qershor";
$lang['datetime']['July'] = "Korrik";
$lang['datetime']['August'] = "Gusht";
$lang['datetime']['September'] = "Shtator";
$lang['datetime']['October'] = "Tetor";
$lang['datetime']['November'] = "Nëntor";
$lang['datetime']['December'] = "Dhjetor";
$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'] = "Informacion";
$lang['Critical_Information'] = "Informacion kritik ";
$lang['General_Error'] = "Problem i përgjithshëm";
$lang['Critical_Error'] = "Problem kritik";
$lang['An_error_occured'] = "Pati një problem";
$lang['A_critical_error'] = "Pati një problem kritik";
//
// That's all Folks!
// -------------------------------------------------
?>

Some files were not shown because too many files have changed in this diff Show more