mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
This commit was manufactured by cvs2svn to create tag
'release_2_0_2'. git-svn-id: file:///svn/phpbb/tags/release_2_0_2@2845 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
212515e02c
commit
435058a7be
561 changed files with 24331 additions and 19533 deletions
|
@ -23,9 +23,9 @@ 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);
|
||||
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
|
||||
|
||||
//
|
||||
|
@ -311,6 +311,6 @@ $template->assign_vars(array(
|
|||
|
||||
$template->pparse("body");
|
||||
|
||||
include('page_footer_admin.'.$phpEx);
|
||||
include('./page_footer_admin.'.$phpEx);
|
||||
|
||||
?>
|
||||
|
|
|
@ -42,6 +42,7 @@ if( !empty($setmodules) )
|
|||
{
|
||||
$file_uploads = @get_cfg_var('file_uploads');
|
||||
}
|
||||
|
||||
if( ($file_uploads != 0 || empty($file_uploads)) && (strtolower($file_uploads) != 'off') && (@phpversion() != '4.0.4pl1') )
|
||||
{
|
||||
$module['General']['Restore_DB'] = $filename . "?perform=restore";
|
||||
|
@ -54,9 +55,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 +376,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);
|
||||
}
|
||||
|
@ -695,7 +696,7 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
|
|||
break;
|
||||
}
|
||||
|
||||
include('page_header_admin.'.$phpEx);
|
||||
include('./page_header_admin.'.$phpEx);
|
||||
|
||||
$template->set_filenames(array(
|
||||
"body" => "admin/admin_message_body.tpl")
|
||||
|
@ -711,7 +712,7 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
|
|||
break;
|
||||
}
|
||||
|
||||
$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');
|
||||
|
||||
|
||||
$additional_tables = (isset($HTTP_POST_VARS['additional_tables'])) ? $HTTP_POST_VARS['additional_tables'] : ( (isset($HTTP_GET_VARS['additional_tables'])) ? $HTTP_GET_VARS['additional_tables'] : "" );
|
||||
|
@ -740,12 +741,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 +771,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&additional_tables=" . quotemeta($additional_tables) . "&backup_type=$backup_type&drop=1&backupstart=1&gzipcompress=$gzipcompress&startdownload=1\">",
|
||||
"META" => "<meta http-equiv=\"refresh\" content=\"2;url=admin_db_utilities.$phpEx?perform=backup&additional_tables=" . quotemeta($additional_tables) . "&backup_type=$backup_type&drop=1&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 +811,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
|
||||
|
@ -873,7 +877,7 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
|
|||
//
|
||||
// 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 +911,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']);
|
||||
}
|
||||
//
|
||||
|
@ -943,7 +946,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 +960,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 +991,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 +1017,6 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
|
|||
}
|
||||
}
|
||||
|
||||
include('page_footer_admin.'.$phpEx);
|
||||
include('./page_footer_admin.'.$phpEx);
|
||||
|
||||
?>
|
||||
|
|
|
@ -33,16 +33,15 @@ 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 );
|
||||
|
||||
if( !validate_username($disallowed_user) )
|
||||
{
|
||||
|
@ -110,8 +109,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 +137,6 @@ $template->assign_vars(array(
|
|||
|
||||
$template->pparse("body");
|
||||
|
||||
include('./page_footer_admin.'.$phpEx);
|
||||
|
||||
?>
|
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
?>
|
|
@ -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,26 +96,20 @@ 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']];
|
||||
|
||||
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";
|
||||
$sql = "UPDATE " . FORUMS_TABLE . " SET $sql WHERE forum_id = $forum_id";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -123,39 +117,34 @@ if( isset($HTTP_POST_VARS['submit']) )
|
|||
{
|
||||
$value = $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 +176,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 +187,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 +204,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 +233,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 +269,29 @@ else
|
|||
//
|
||||
for($j = 0; $j < count($forum_auth_fields); $j++)
|
||||
{
|
||||
$custom_auth[$j] = " <select name=\"" . $forum_auth_fields[$j] . "\">";
|
||||
$custom_auth[$j] = ' <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> ";
|
||||
$custom_auth[$j] .= '</select> ';
|
||||
|
||||
$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 +299,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);
|
||||
|
||||
?>
|
|
@ -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(
|
||||
|
@ -302,8 +301,9 @@ 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";
|
||||
$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 +493,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);
|
||||
|
@ -826,7 +826,7 @@ if( !empty($mode) )
|
|||
|
||||
if ($show_index != TRUE)
|
||||
{
|
||||
include('page_footer_admin.'.$phpEx);
|
||||
include('./page_footer_admin.'.$phpEx);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
@ -931,6 +931,6 @@ if( $total_categories = $db->sql_numrows($q_categories) )
|
|||
|
||||
$template->pparse("body");
|
||||
|
||||
include('page_footer_admin.'.$phpEx);
|
||||
include('./page_footer_admin.'.$phpEx);
|
||||
|
||||
?>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
define('IN_PHPBB', 1);
|
||||
|
||||
if( !empty($setmodules) )
|
||||
if ( !empty($setmodules) )
|
||||
{
|
||||
$filename = basename(__FILE__);
|
||||
$module['Groups']['Manage'] = $filename;
|
||||
|
@ -33,38 +33,35 @@ 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 = '';
|
||||
}
|
||||
|
||||
//
|
||||
// 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'];
|
||||
}
|
||||
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 +73,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,111 +107,108 @@ 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']) )
|
||||
{
|
||||
$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']);
|
||||
}
|
||||
|
@ -223,7 +216,7 @@ else if( isset($HTTP_POST_VARS['group_update']) )
|
|||
$this_userdata = get_userdata($group_moderator);
|
||||
$group_moderator = $this_userdata['user_id'];
|
||||
|
||||
if( !$group_moderator )
|
||||
if ( !$group_moderator )
|
||||
{
|
||||
message_die(GENERAL_MESSAGE, $lang['No_group_moderator']);
|
||||
}
|
||||
|
@ -234,81 +227,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 +316,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);
|
||||
|
||||
?>
|
||||
|
|
|
@ -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,114 @@ 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 = '';
|
||||
do
|
||||
{
|
||||
$bcc_list .= ( ( $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";
|
||||
|
||||
$bcc_list = "";
|
||||
for($i = 0; $i < count($email_list); $i++)
|
||||
{
|
||||
if( $bcc_list != "" )
|
||||
{
|
||||
$bcc_list .= ", ";
|
||||
}
|
||||
$bcc_list .= $email_list[$i]['user_email'];
|
||||
}
|
||||
$email_headers = 'Return-Path: ' . $userdata['board_email'] . "\nFrom: " . $board_config['board_email'] . "\n";
|
||||
$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";
|
||||
$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");
|
||||
$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 +158,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);
|
||||
|
||||
?>
|
|
@ -32,9 +32,9 @@ 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']) )
|
||||
{
|
||||
|
@ -255,7 +255,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 +360,6 @@ else
|
|||
|
||||
$template->pparse("body");
|
||||
|
||||
include('page_footer_admin.'.$phpEx);
|
||||
include('./page_footer_admin.'.$phpEx);
|
||||
|
||||
?>
|
||||
|
|
|
@ -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.
|
||||
|
@ -265,7 +265,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 +286,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'],
|
||||
|
@ -340,7 +340,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);
|
||||
|
||||
|
@ -536,6 +536,6 @@ else
|
|||
//
|
||||
// Page Footer
|
||||
//
|
||||
include('page_footer_admin.'.$phpEx);
|
||||
include('./page_footer_admin.'.$phpEx);
|
||||
|
||||
?>
|
|
@ -38,7 +38,7 @@ if( !empty($setmodules) )
|
|||
//
|
||||
// Check if the user has cancled a confirmation message.
|
||||
//
|
||||
$phpbb_root_path = "../";
|
||||
$phpbb_root_path = "./../";
|
||||
|
||||
$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE;
|
||||
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE;
|
||||
|
@ -47,12 +47,14 @@ if( empty($HTTP_POST_VARS['send_file']) )
|
|||
{
|
||||
$no_page_header = ( $cancel ) ? TRUE : FALSE;
|
||||
require($phpbb_root_path . 'extension.inc');
|
||||
require('pagestart.' . $phpEx);
|
||||
require('./pagestart.' . $phpEx);
|
||||
}
|
||||
|
||||
if( $cancel )
|
||||
{
|
||||
header("Location: " . append_sid("admin_styles.$phpEx"));
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . append_sid("admin_styles.$phpEx"));
|
||||
exit;
|
||||
}
|
||||
|
||||
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
||||
|
@ -561,6 +563,7 @@ switch( $mode )
|
|||
}
|
||||
}
|
||||
}
|
||||
$s_template_select .= '</select>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -931,7 +934,7 @@ switch( $mode )
|
|||
|
||||
if( !$HTTP_POST_VARS['send_file'] )
|
||||
{
|
||||
include('page_footer_admin.'.$phpEx);
|
||||
include('./page_footer_admin.'.$phpEx);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
@ -787,7 +787,9 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
|
|||
$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&" . POST_GROUPS_URL . "=" . $id[$i]) . '">' . $name[$i] . '</a>';
|
||||
$ug = ( $mode == 'user' ) ? 'group&' . POST_GROUPS_URL : 'user&' . POST_USERS_URL;
|
||||
|
||||
$t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>';
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -819,7 +821,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')
|
||||
|
@ -856,7 +858,6 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
|
|||
|
||||
$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'],
|
||||
|
@ -864,6 +865,7 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
|
|||
'L_PERMISSIONS' => $lang['Permissions'],
|
||||
'L_SUBMIT' => $lang['Submit'],
|
||||
'L_RESET' => $lang['Reset'],
|
||||
'L_FORUM' => $lang['Forum'],
|
||||
|
||||
'U_USER_OR_GROUP' => append_sid("admin_ug_auth.$phpEx"),
|
||||
'U_SWITCH_MODE' => $u_switch_mode,
|
||||
|
@ -878,7 +880,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 +922,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 +938,6 @@ else
|
|||
|
||||
$template->pparse('body');
|
||||
|
||||
include('page_footer_admin.'.$phpEx);
|
||||
include('./page_footer_admin.'.$phpEx);
|
||||
|
||||
?>
|
|
@ -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']);
|
||||
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 ( eregi('^(([[:alnum:]\*]+([-_.][[:alnum:]\*]+)*\.?)|(\*))@([[:alnum:]]+([-_]?[[:alnum:]]+)*\.){1,3}([[:alnum:]]{2,6})$', 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 != '' ) ? ', ' : '' ) . $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 != '' ) ? ', ' : '' ) . $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 != '' ) ? ', ' : '' ) . $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;
|
||||
|
@ -470,7 +433,11 @@ else
|
|||
'L_UNBAN_IP_EXPLAIN' => $lang['Unban_IP_explain'],
|
||||
'L_UNBAN_EMAIL' => $lang['Unban_email'],
|
||||
'L_UNBAN_EMAIL_EXPLAIN' => $lang['Unban_email_explain'],
|
||||
'L_USERNAME' => $lang['Username'],
|
||||
'L_LOOK_UP' => $lang['Look_up_User'],
|
||||
'L_FIND_USERNAME' => $lang['Find_username'],
|
||||
|
||||
'U_SEARCH_USER' => append_sid("./../search.$phpEx?mode=searchuser"),
|
||||
'S_UNBAN_USERLIST_SELECT' => $select_userlist,
|
||||
'S_UNBAN_IPLIST_SELECT' => $select_iplist,
|
||||
'S_UNBAN_EMAILLIST_SELECT' => $select_emaillist,
|
||||
|
@ -480,6 +447,6 @@ else
|
|||
|
||||
$template->pparse('body');
|
||||
|
||||
include('page_footer_admin.'.$phpEx);
|
||||
include('./page_footer_admin.'.$phpEx);
|
||||
|
||||
?>
|
|
@ -30,9 +30,9 @@ 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);
|
||||
|
@ -159,10 +159,12 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
|
|||
if( stripslashes($username) != $this_userdata['username'] )
|
||||
{
|
||||
unset($rename_user);
|
||||
if( !validate_username($username) )
|
||||
|
||||
$result = validate_username($username);
|
||||
if ( $result['error'] )
|
||||
{
|
||||
$error = TRUE;
|
||||
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Invalid_username'];
|
||||
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $result['error_msg'];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -199,17 +201,6 @@ 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 != "" )
|
||||
{
|
||||
$sig_length_check = preg_replace('/(\[.*?)(=.*?)\]/is', '\\1]', stripslashes($signature));
|
||||
|
@ -217,7 +208,6 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
|
|||
{
|
||||
$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 +223,6 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Avatar stuff
|
||||
//
|
||||
//
|
||||
// Avatar stuff
|
||||
//
|
||||
|
@ -523,7 +510,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
|
|||
$row = $db->sql_fetchrow($result);
|
||||
|
||||
$sql = "UPDATE " . POSTS_TABLE . "
|
||||
SET poster_id = " . ANONYMOUS . ", post_username = '$username'
|
||||
SET poster_id = " . DELETED . ", post_username = '$username'
|
||||
WHERE poster_id = $user_id";
|
||||
if( !$db->sql_query($sql) )
|
||||
{
|
||||
|
@ -531,13 +518,47 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
|
|||
}
|
||||
|
||||
$sql = "UPDATE " . TOPICS_TABLE . "
|
||||
SET topic_poster = " . ANONYMOUS . "
|
||||
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) )
|
||||
|
@ -573,6 +594,80 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
|
|||
message_die(GENERAL_ERROR, 'Could not delete user from topic watch table', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$sql = "SELECT privmsgs_id
|
||||
FROM " . PRIVMSGS_TABLE . "
|
||||
WHERE ( ( privmsgs_from_userid = $user_id
|
||||
AND privmsgs_type = " . PRIVMSGS_NEW_MAIL . " )
|
||||
OR ( privmsgs_from_userid = $user_id
|
||||
AND privmsgs_type = " . PRIVMSGS_SENT_MAIL . " )
|
||||
OR ( privmsgs_to_userid = $user_id
|
||||
AND privmsgs_type = " . PRIVMSGS_READ_MAIL . " )
|
||||
OR ( privmsgs_to_userid = $user_id
|
||||
AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " )
|
||||
OR ( privmsgs_from_userid = $user_id
|
||||
AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " ) )";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Could not select all user\'s private messages', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
//
|
||||
// This little bit of code directly from the private messaging section.
|
||||
// Thanks Paul!
|
||||
//
|
||||
|
||||
while ( $row_privmsgs = $db->sql_fetchrow($result) )
|
||||
{
|
||||
$mark_list[] = $row_privmsgs['privmsgs_id'];
|
||||
}
|
||||
|
||||
if ( count($mark_list) )
|
||||
{
|
||||
$delete_sql_id = implode(', ', $mark_list);
|
||||
|
||||
//
|
||||
// We shouldn't need to worry about updating conters here...
|
||||
// They are already gone!
|
||||
//
|
||||
|
||||
$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)";
|
||||
|
||||
//
|
||||
// Shouldn't need the switch statement here, either, as we just want
|
||||
// to take out all of the private messages. This will not affect
|
||||
// the other messages we want to keep; the ids are unique.
|
||||
//
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "UPDATE " . PRIVMSGS_TABLE . "
|
||||
SET privmsgs_to_userid = " . DELETED . "
|
||||
WHERE privmsgs_to_userid = $user_id";
|
||||
if ( !$db->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Could not update private messages saved to the user', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$sql = "UPDATE " . PRIVMSGS_TABLE . "
|
||||
SET privmsgs_from_userid = " . DELETED . "
|
||||
WHERE privmsgs_from_userid = $user_id";
|
||||
if ( !$db->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Could not update private messages saved from the user', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$message = $lang['User_deleted'];
|
||||
|
||||
}
|
||||
|
@ -941,6 +1036,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 +1050,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 +1067,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 +1108,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('./../' . $board_config['avatar_path'] ) && ($board_config['allow_avatar_upload'] == TRUE) )
|
||||
{
|
||||
if ( $form_enctype != '' )
|
||||
{
|
||||
|
@ -1021,33 +1117,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('./../' . $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 +1146,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 +1155,6 @@ else
|
|||
|
||||
}
|
||||
|
||||
include('page_footer_admin.'.$phpEx);
|
||||
include('./page_footer_admin.'.$phpEx);
|
||||
|
||||
?>
|
||||
|
|
|
@ -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);
|
||||
|
||||
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
||||
{
|
||||
|
@ -109,7 +109,7 @@ if( $mode != "" )
|
|||
|
||||
$template->pparse("body");
|
||||
|
||||
include('page_footer_admin.'.$phpEx);
|
||||
include('./page_footer_admin.'.$phpEx);
|
||||
}
|
||||
else if( $mode == "save" )
|
||||
{
|
||||
|
@ -172,7 +172,7 @@ if( $mode != "" )
|
|||
}
|
||||
else
|
||||
{
|
||||
message_die(GENERAL_MESSAGE, $lang['Must_specify_word']);
|
||||
message_die(GENERAL_MESSAGE, $lang['No_word_selected']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -230,6 +230,6 @@ else
|
|||
|
||||
$template->pparse("body");
|
||||
|
||||
include('page_footer_admin.'.$phpEx);
|
||||
include('./page_footer_admin.'.$phpEx);
|
||||
|
||||
?>
|
|
@ -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")
|
||||
|
@ -561,7 +561,7 @@ elseif( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' )
|
|||
|
||||
$template->pparse("body");
|
||||
|
||||
include('page_footer_admin.'.$phpEx);
|
||||
include('./page_footer_admin.'.$phpEx);
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -583,6 +583,7 @@ else
|
|||
|
||||
$template->pparse("body");
|
||||
|
||||
$db->sql_close();
|
||||
exit;
|
||||
|
||||
}
|
||||
|
|
|
@ -28,27 +28,16 @@ if ( !defined('IN_PHPBB') )
|
|||
//
|
||||
// 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' => '2' . $board_config['version'],
|
||||
'TRANSLATION_INFO' => $lang['TRANSLATION_INFO'])
|
||||
);
|
||||
|
||||
$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 +64,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;
|
||||
|
|
|
@ -31,22 +31,22 @@ 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')
|
||||
if ( $phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible') )
|
||||
{
|
||||
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();
|
||||
|
@ -72,30 +72,8 @@ $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),
|
||||
|
||||
|
|
|
@ -39,7 +39,9 @@ init_userprefs($userdata);
|
|||
//
|
||||
if( !$userdata['session_logged_in'] )
|
||||
{
|
||||
header("Location: ../" . append_sid("login.$phpEx?redirect=admin/"));
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . '../' . append_sid("login.$phpEx?redirect=admin/"));
|
||||
exit;
|
||||
}
|
||||
else if( $userdata['user_level'] != ADMIN )
|
||||
{
|
||||
|
@ -50,7 +52,7 @@ 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);
|
||||
}
|
||||
|
||||
?>
|
|
@ -101,18 +101,19 @@ 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();
|
||||
$gen_simple_header = FALSE;
|
||||
|
||||
@include($phpbb_root_path . 'config.'.$phpEx);
|
||||
include($phpbb_root_path . 'config.'.$phpEx);
|
||||
|
||||
if( !defined("PHPBB_INSTALLED") )
|
||||
{
|
||||
header("Location: install.$phpEx");
|
||||
exit;
|
||||
}
|
||||
|
||||
include($phpbb_root_path . 'includes/constants.'.$phpEx);
|
||||
|
@ -153,7 +154,7 @@ if( getenv('HTTP_X_FORWARDED_FOR') != '' )
|
|||
|
||||
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..*/');
|
||||
$private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10..*/', '/^224..*/', '/^240..*/');
|
||||
$client_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);
|
||||
}
|
||||
}
|
||||
|
@ -170,16 +171,14 @@ $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'];
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -137,7 +137,7 @@ class sql_db
|
|||
$row_outer_max = ( isset($num_rows) ) ? $row_offset + $num_rows + 1 : 1E9;
|
||||
$row_inner = 0;
|
||||
|
||||
while( odbc_fetch_row($this->result, $row_outer) && $row_outer < $row_outer_max )
|
||||
while( odbc_fetch_row($this->result) && $row_outer < $row_outer_max )
|
||||
{
|
||||
for($j = 0; $j < count($this->field_names[$this->result]); $j++)
|
||||
{
|
||||
|
|
|
@ -291,6 +291,7 @@ class sql_db
|
|||
{
|
||||
$row[$key] = stripslashes($value);
|
||||
}
|
||||
@reset($row);
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
@ -320,6 +321,7 @@ class sql_db
|
|||
}
|
||||
$i++;
|
||||
}
|
||||
@reset($rowset);
|
||||
|
||||
return $rowset;
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -63,11 +63,11 @@ 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.2');
|
||||
|
||||
/*
|
||||
-- Categories
|
||||
|
@ -89,7 +89,7 @@ INSERT INTO phpbb_forums (forum_id, cat_id, forum_name, forum_desc, forum_status
|
|||
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, 0, 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);
|
||||
|
||||
|
||||
|
@ -167,38 +167,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;
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ CREATE TABLE [phpbb_forums] (
|
|||
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 ,
|
||||
|
@ -318,7 +318,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] (4,2) NOT NULL ,
|
||||
[user_style] [int] NULL ,
|
||||
[user_lang] [varchar] (255) NULL ,
|
||||
[user_dateformat] [varchar] (14) NOT NULL ,
|
||||
|
|
|
@ -60,7 +60,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.2');
|
||||
|
||||
|
||||
# -- Categories
|
||||
|
@ -72,7 +72,7 @@ INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, cat_id, forum_order,
|
|||
|
||||
|
||||
# -- 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, 0, 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 +120,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
|
||||
|
|
|
@ -453,7 +453,7 @@ 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,
|
||||
|
@ -463,7 +463,7 @@ CREATE TABLE phpbb_users (
|
|||
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(4,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,
|
||||
|
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -61,7 +61,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.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.2');
|
||||
|
||||
-- Categories
|
||||
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 10);
|
||||
|
@ -71,7 +71,7 @@ INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test cat
|
|||
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);
|
||||
|
||||
-- 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, 0, 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 +107,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
|
||||
|
|
|
@ -478,7 +478,7 @@ CREATE TABLE phpbb_users (
|
|||
user_avatar_type int2 DEFAULT '0' NOT NULL,
|
||||
user_level int4 DEFAULT '1',
|
||||
user_lang varchar(255),
|
||||
user_timezone real DEFAULT '0' NOT NULL,
|
||||
user_timezone decimal(4) 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,
|
||||
|
|
|
@ -417,22 +417,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 +425,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))
|
||||
{
|
||||
|
||||
|
|
73
phpBB/develop/encoding_emails.php
Normal file
73
phpBB/develop/encoding_emails.php
Normal 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($dirname . '/' . $file) && !is_link($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($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";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -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'] : ' ';
|
||||
$joined = create_date($date_format, $row['user_regdate'], $board_config['board_timezone']);
|
||||
|
@ -159,6 +159,7 @@ 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));
|
||||
exit;
|
||||
}
|
||||
|
||||
$sql = "SELECT group_moderator
|
||||
|
@ -207,7 +208,8 @@ 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));
|
||||
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
exit;
|
||||
}
|
||||
|
||||
$sql = "SELECT ug.user_id, g.group_type
|
||||
|
@ -275,7 +277,7 @@ 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";
|
||||
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n";
|
||||
|
||||
$emailer->use_template('group_request', $moderator['user_lang']);
|
||||
$emailer->email_address($moderator['user_email']);
|
||||
|
@ -308,11 +310,13 @@ else if ( isset($HTTP_POST_VARS['unsub']) || isset($HTTP_POST_VARS['unsubpending
|
|||
//
|
||||
if ( $cancel )
|
||||
{
|
||||
header($header_location . ppend_sid("groupcp.$phpEx", true));
|
||||
header($header_location . append_sid("groupcp.$phpEx", true));
|
||||
exit;
|
||||
}
|
||||
elseif ( !$userdata['session_logged_in'] )
|
||||
{
|
||||
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $confirm )
|
||||
|
@ -396,6 +400,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));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -457,6 +462,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));
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( !$is_moderator )
|
||||
|
@ -553,7 +559,7 @@ 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";
|
||||
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n";
|
||||
|
||||
$emailer->use_template('group_added', $row['user_lang']);
|
||||
$emailer->email_address($row['user_email']);
|
||||
|
@ -708,7 +714,7 @@ 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";
|
||||
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\nBcc: " . $email_addresses . "\n";
|
||||
|
||||
$emailer->use_template('group_approved');
|
||||
$emailer->email_address($userdata['user_email']);
|
||||
|
@ -913,6 +919,7 @@ else if ( $group_id )
|
|||
'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'],
|
||||
'L_PM' => $lang['Private_Message'],
|
||||
'L_EMAIL' => $lang['Email'],
|
||||
'L_POSTS' => $lang['Posts'],
|
||||
'L_WEBSITE' => $lang['Website'],
|
||||
'L_FROM' => $lang['Location'],
|
||||
'L_ORDER' => $lang['Order'],
|
||||
|
|
|
@ -158,18 +158,18 @@ 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) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -198,19 +198,19 @@ function bbencode_second_pass($text, $uid)
|
|||
$replacements[0] = $bbcode_tpl['img'];
|
||||
|
||||
// [url]xxxx://www.phpbb.com[/url] code..
|
||||
$patterns[1] = "#\[url\]([a-z]+?://){1}([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)\[/url\]#si";
|
||||
$patterns[1] = "#\[url\]([a-z]+?://){1}([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+\(\)]+)\[/url\]#si";
|
||||
$replacements[1] = $bbcode_tpl['url1'];
|
||||
|
||||
// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
|
||||
$patterns[2] = "#\[url\]([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)\[/url\]#si";
|
||||
$patterns[2] = "#\[url\]([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+\(\)]+)\[/url\]#si";
|
||||
$replacements[2] = $bbcode_tpl['url2'];
|
||||
|
||||
// [url=xxxx://www.phpbb.com]phpBB[/url] code..
|
||||
$patterns[3] = "#\[url=([a-z]+?://){1}([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)\](.*?)\[/url\]#si";
|
||||
$patterns[3] = "#\[url=([a-z]+?://){1}([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+\(\)]+)\](.*?)\[/url\]#si";
|
||||
$replacements[3] = $bbcode_tpl['url3'];
|
||||
|
||||
// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
|
||||
$patterns[4] = "#\[url=([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)\](.*?)\[/url\]#si";
|
||||
$patterns[4] = "#\[url=([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+\(\)]+)\](.*?)\[/url\]#si";
|
||||
$replacements[4] = $bbcode_tpl['url4'];
|
||||
|
||||
// [email]user@domain.tld[/email] code..
|
||||
|
@ -251,7 +251,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();
|
||||
|
@ -282,7 +282,7 @@ 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(s)?://)([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)\[/img\]#si", "[img:$uid]\\1\\3[/img:$uid]", $text);
|
||||
|
||||
// Remove our padding from the string..
|
||||
$text = substr($text, 1);
|
||||
|
@ -433,7 +433,13 @@ function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_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;
|
||||
//
|
||||
// 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 = $curr_pos + strlen($possible_start);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -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('<', '>', '"', ':', '[', ']', '(', ')', '{', '}');
|
||||
$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 . '[code]';
|
||||
$text .= $between_tags . '[/code]';
|
||||
}
|
||||
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;
|
||||
|
@ -600,7 +620,7 @@ function make_clickable($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);
|
||||
$ret = preg_replace("#([\n ])([a-z]+?)://([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>", $ret);
|
||||
|
||||
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
|
||||
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
|
||||
|
@ -608,7 +628,7 @@ function make_clickable($text)
|
|||
// 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);
|
||||
$ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#i", "\\1<a href=\"http://www.\\2.\\3\\4\" target=\"_blank\">www.\\2.\\3\\4</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 ".".
|
||||
|
@ -718,40 +738,34 @@ function bbcode_array_pop(&$stack)
|
|||
//
|
||||
function smilies_pass($message)
|
||||
{
|
||||
global $db, $board_config;
|
||||
static $smilies;
|
||||
static $orig, $repl;
|
||||
|
||||
if( empty($smilies) )
|
||||
{
|
||||
$sql = "SELECT code, smile_url
|
||||
FROM " . SMILIES_TABLE;
|
||||
if( !$result = $db->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't obtain smilies data", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
if (!isset($orig))
|
||||
{
|
||||
global $db, $board_config;
|
||||
$orig = $repl = array();
|
||||
|
||||
if( !$db->sql_numrows($result) )
|
||||
{
|
||||
return $message;
|
||||
}
|
||||
$sql = 'SELECT code, smile_url 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);
|
||||
|
||||
$smilies = $db->sql_fetchrowset($result);
|
||||
}
|
||||
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" />';
|
||||
}
|
||||
}
|
||||
|
||||
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 )
|
||||
{
|
||||
$message = preg_replace($orig, $repl, ' ' . $message . ' ');
|
||||
$message = substr($message, 1, -1);
|
||||
}
|
||||
|
||||
return $message;
|
||||
if (count($orig))
|
||||
{
|
||||
$message = preg_replace($orig, $repl, ' ' . $message . ' ');
|
||||
$message = substr($message, 1, -1);
|
||||
}
|
||||
return $message;
|
||||
}
|
||||
|
||||
function smiley_sort($a, $b)
|
||||
|
|
|
@ -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', 0); // Debugging off
|
||||
|
||||
|
||||
// User Levels <- Do not change the values of USER or ADMIN
|
||||
|
|
|
@ -38,8 +38,8 @@ class emailer
|
|||
$this->use_smtp = $use_smtp;
|
||||
$this->tpl_file = NULL;
|
||||
$this->address = NULL;
|
||||
$this->msg = "";
|
||||
$this->mimeOut = "";
|
||||
$this->msg = '';
|
||||
$this->mimeOut = '';
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -47,11 +47,11 @@ class emailer
|
|||
//
|
||||
function reset()
|
||||
{
|
||||
$this->tpl_file = "";
|
||||
$this->address = "";
|
||||
$this->msg = "";
|
||||
$this->memOut = "";
|
||||
$this->vars = "";
|
||||
$this->tpl_file = '';
|
||||
$this->address = '';
|
||||
$this->msg = '';
|
||||
$this->memOut = '';
|
||||
$this->vars = '';
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -59,13 +59,8 @@ class emailer
|
|||
//
|
||||
function email_address($address)
|
||||
{
|
||||
|
||||
$success = true;
|
||||
|
||||
$this->address = '';
|
||||
$this->address .= $address;
|
||||
|
||||
return $success;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -84,30 +79,27 @@ class emailer
|
|||
$this->extra_headers = $headers;
|
||||
}
|
||||
|
||||
function use_template($template_file, $template_lang = "")
|
||||
function use_template($template_file, $template_lang = '')
|
||||
{
|
||||
global $board_config, $phpbb_root_path;
|
||||
|
||||
if( $template_lang == "" )
|
||||
if ( $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) )
|
||||
$this->tpl_file = $phpbb_root_path . 'language/lang_' . $template_lang . '/email/' . $template_file . '.tpl';
|
||||
if ( !file_exists($this->tpl_file) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't find template file: $template_file", "", __LINE__, __FILE__);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->tpl_file = $template_file;
|
||||
if( !$this->load_msg() )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't load template file: $template_file", "", __LINE__, __FILE__);
|
||||
}
|
||||
message_die(GENERAL_ERROR, 'Could not find email template file ' . $template_file, '', __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
if ( !$this->load_msg() )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Could not load email template file ' . $template_file, '', __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -115,39 +107,30 @@ class emailer
|
|||
//
|
||||
function load_msg()
|
||||
{
|
||||
if ($this->tpl_file == NULL)
|
||||
if ( $this->tpl_file == NULL )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "No template file set", "", __LINE__, __FILE__);
|
||||
message_die(GENERAL_ERROR, 'No template file set', '', __LINE__, __FILE__);
|
||||
}
|
||||
else
|
||||
|
||||
if ( !($fd = fopen($this->tpl_file, 'r')) )
|
||||
{
|
||||
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);
|
||||
}
|
||||
message_die(GENERAL_ERROR, 'Failed opening template file', '', __LINE__, __FILE__);
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
$this->msg .= fread($fd, filesize($this->tpl_file));
|
||||
fclose($fd);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
global $lang;
|
||||
@reset($this->vars);
|
||||
while (list($key, $val) = @each($this->vars))
|
||||
{
|
||||
|
@ -165,12 +148,13 @@ class emailer
|
|||
// do this here because the subject may contain a variable
|
||||
//
|
||||
$match = array();
|
||||
preg_match("/^(Subject:(.*?)[\r\n]+?)?(.*?)$/is", $this->msg, $match);
|
||||
preg_match("/^(Subject:(.*?)[\r\n]+?)?(Charset:(.*?)[\r\n]+?)?(.*?)$/is", $this->msg, $match);
|
||||
|
||||
$this->msg = ( isset($match[3]) ) ? trim($match[3]) : '';
|
||||
$this->msg = ( isset($match[5]) ) ? trim($match[5]) : '';
|
||||
$this->subject = ( $this->subject != '' ) ? $this->subject : trim($match[2]);
|
||||
$this->encoding = ( trim($match[4]) != '' ) ? trim($match[4]) : $lang['ENCODING'];
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -178,57 +162,56 @@ class emailer
|
|||
//
|
||||
function send()
|
||||
{
|
||||
global $phpEx, $phpbb_root_dir;
|
||||
global $phpEx, $phpbb_root_path;
|
||||
|
||||
if (isset($phpbb_root_dir))
|
||||
if ( $this->address == NULL )
|
||||
{
|
||||
// we must be in the admin section.
|
||||
$phpbb_root_path = $phpbb_root_dir;
|
||||
message_die(GENERAL_ERROR, 'No email address set', '', __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
if ( !$this->parse_email() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Add date and encoding type
|
||||
//
|
||||
$universal_extra = "MIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . gmdate('D, d M Y H:i:s', time()) . " UT\n";
|
||||
$this->extra_headers = $universal_extra . $this->extra_headers;
|
||||
|
||||
if ( $this->use_smtp )
|
||||
{
|
||||
if ( !defined('SMTP_INCLUDED') )
|
||||
{
|
||||
include($phpbb_root_path . 'includes/smtp.' . $phpEx);
|
||||
}
|
||||
|
||||
$result = smtpmail($this->address, $this->subject, $this->msg, $this->extra_headers);
|
||||
}
|
||||
else
|
||||
{
|
||||
$phpbb_root_path = "./";
|
||||
$result = @mail($this->address, $this->subject, $this->msg, $this->extra_headers);
|
||||
}
|
||||
|
||||
if ($this->address == NULL)
|
||||
if ( !$result )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "No email address set", "", __LINE__, __FILE__);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!$this->parse_email())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if($this->use_smtp)
|
||||
{
|
||||
if(!defined('SMTP_INCLUDED'))
|
||||
{
|
||||
include($phpbb_root_path . "includes/smtp.".$phpEx);
|
||||
}
|
||||
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);
|
||||
}
|
||||
message_die(GENERAL_ERROR, 'Failed sending email', '', __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// 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->mailMsg = '--' . $mime_boundary . "\nContent-Type: text/plain;\n\tcharset=\"" . $lang['ENCODING'] . "\"\n\n" . $this->mailMsg;
|
||||
|
||||
if ($mime_filename)
|
||||
{
|
||||
|
@ -244,11 +227,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";
|
||||
|
|
|
@ -94,6 +94,8 @@ function make_jumpbox($action, $match_forum_id = 0)
|
|||
{
|
||||
global $template, $lang, $db, $SID, $nav_links, $phpEx;
|
||||
|
||||
// $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata);
|
||||
|
||||
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
|
||||
FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f
|
||||
WHERE f.cat_id = c.cat_id
|
||||
|
@ -137,6 +139,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>';
|
||||
|
||||
|
@ -491,7 +496,7 @@ 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;
|
||||
global $userdata, $user_ip, $session_length;
|
||||
global $starttime;
|
||||
|
||||
|
@ -594,6 +599,7 @@ function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '',
|
|||
{
|
||||
$msg_title = $lang['General_Error'];
|
||||
}
|
||||
break;
|
||||
|
||||
case CRITICAL_ERROR:
|
||||
//
|
||||
|
@ -669,5 +675,4 @@ function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '',
|
|||
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
|
@ -24,7 +24,7 @@
|
|||
//
|
||||
// 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;
|
||||
|
||||
|
@ -43,7 +43,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 +56,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 +65,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 +79,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 +91,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 +112,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 +133,19 @@ 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";
|
||||
$sql = ( $row['total_posts'] ) ? "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" : "DELETE FROM " . TOPICS_TABLE . " WHERE topic_id = $id";
|
||||
if ( !$db->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Could not update topic', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
if ( !defined('IN_PHPBB') )
|
||||
{
|
||||
die("Hacking attempt");
|
||||
die('Hacking attempt');
|
||||
}
|
||||
|
||||
$html_entities_match = array('#&#', '#<#', '#>#');
|
||||
|
@ -74,8 +74,7 @@ function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid
|
|||
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 . '(?!(\s*)style(\s*)\\=)/i', $hold_string) )
|
||||
{
|
||||
$tagallowed = true;
|
||||
}
|
||||
|
@ -108,23 +107,6 @@ function prepare_message($message, $html_on, $bbcode_on, $smile_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('<', '>', '"', ':', '[', ']', '(', ')', '{', '}');
|
||||
|
||||
$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);
|
||||
}
|
||||
|
||||
|
@ -249,7 +231,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
|||
WHERE $where_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'] )
|
||||
{
|
||||
|
@ -267,12 +249,12 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
|||
{
|
||||
$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)) )
|
||||
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();
|
||||
}
|
||||
|
@ -280,18 +262,18 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
|||
|
||||
$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)) )
|
||||
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)) )
|
||||
if ( !$db->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
@ -304,7 +286,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
|||
if ( ( $mode == 'newtopic' || $mode == 'editpost' ) && !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)) )
|
||||
if ( !$db->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
@ -326,7 +308,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
|||
{
|
||||
$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'];
|
||||
}
|
||||
|
@ -342,13 +324,13 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
|||
$poll_option_id = 1;
|
||||
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;
|
||||
|
||||
$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)) )
|
||||
if ( !$db->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
@ -356,11 +338,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,7 +363,7 @@ 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 = '';
|
||||
|
||||
|
@ -395,53 +378,57 @@ function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_i
|
|||
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) )
|
||||
{
|
||||
$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'] )
|
||||
{
|
||||
$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) )
|
||||
{
|
||||
$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'] )
|
||||
{
|
||||
$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) )
|
||||
{
|
||||
$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' )
|
||||
{
|
||||
|
@ -456,7 +443,7 @@ 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);
|
||||
}
|
||||
|
@ -465,8 +452,9 @@ function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_i
|
|||
{
|
||||
$sql = "UPDATE " . TOPICS_TABLE . " SET
|
||||
$topic_update_sql
|
||||
WHERE topic_id = $topic_id";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
WHERE topic_id = $topic_id
|
||||
OR topic_moved_id = $topic_id";
|
||||
if ( !$db->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
@ -477,7 +465,7 @@ function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_i
|
|||
$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);
|
||||
}
|
||||
|
@ -496,89 +484,80 @@ function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
|||
|
||||
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
|
||||
|
||||
$topic_update_sql = '';
|
||||
if ( $mode != 'poll_delete' )
|
||||
{
|
||||
$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)) )
|
||||
{
|
||||
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'] )
|
||||
{
|
||||
$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'] )
|
||||
{
|
||||
$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>');
|
||||
|
@ -598,9 +577,9 @@ function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_id
|
|||
|
||||
if ( $mode == 'delete' )
|
||||
{
|
||||
$delete_sql = ( !$post_data['first_post'] && !$post_data['last_post'] ) ? " AND user_id = " . $userdata['user_id'] : "";
|
||||
$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)) )
|
||||
if ( !$db->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Could not change topic notify data', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
@ -650,11 +629,13 @@ function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_id
|
|||
$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";
|
||||
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n";
|
||||
|
||||
$update_watched_sql = '';
|
||||
if ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
@set_time_limit(120);
|
||||
|
||||
$topic_title = preg_replace($orig_word, $replacement_word, unprepare_message($row['topic_title']));
|
||||
|
||||
do
|
||||
|
@ -663,7 +644,7 @@ function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_id
|
|||
{
|
||||
$emailer->use_template('topic_notify', $row['user_lang']);
|
||||
$emailer->email_address($row['user_email']);
|
||||
$emailer->set_subject();//$lang['Topic_reply_notification']
|
||||
$emailer->set_subject();
|
||||
$emailer->extra_headers($email_headers);
|
||||
|
||||
$emailer->assign_vars(array(
|
||||
|
@ -711,7 +692,7 @@ function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_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);
|
||||
}
|
||||
|
@ -720,7 +701,7 @@ function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_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);
|
||||
}
|
||||
|
|
|
@ -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('/\b([a-z0-9]{1,2}|[a-z0-9]{21,})\b/',' ', $entry);
|
||||
}
|
||||
|
||||
if ( !empty($stopword_list) )
|
||||
|
@ -95,14 +91,8 @@ function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
|
|||
|
||||
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);
|
||||
}
|
||||
$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];
|
||||
}
|
||||
|
@ -198,14 +188,14 @@ 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] . "'";
|
||||
$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 +211,11 @@ 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)
|
||||
$sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text, word_common)
|
||||
$value_sql";
|
||||
break;
|
||||
}
|
||||
|
@ -428,7 +418,9 @@ 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) )
|
||||
|
@ -459,7 +451,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);
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ function validate_username($username)
|
|||
{
|
||||
while( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
if ( preg_match("#\b(" . str_replace("\*", "\w*?", preg_quote($row['disallow_username'])) . ")\b#i", $username) )
|
||||
if ( preg_match("#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($row['disallow_username'], '#')) . ")\b#i", $username) )
|
||||
{
|
||||
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ function validate_username($username)
|
|||
{
|
||||
while( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
if ( preg_match("#\b(" . str_replace("\*", "\w*?", preg_quote($row['word'])) . ")\b#i", $username) )
|
||||
if ( preg_match("#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($row['word'], '#')) . ")\b#i", $username) )
|
||||
{
|
||||
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ function validate_email($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;
|
||||
|
@ -110,7 +110,7 @@ function validate_email($email)
|
|||
{
|
||||
while( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
$match_email = str_replace('*', '.*', $row['ban_email']);
|
||||
$match_email = str_replace('*', '.*?', $row['ban_email']);
|
||||
if ( preg_match('/^' . $match_email . '$/is', $email) )
|
||||
{
|
||||
return array('error' => true, 'error_msg' => $lang['Email_banned']);
|
||||
|
|
|
@ -35,7 +35,7 @@ if ( $board_config['gzip_compress'] )
|
|||
{
|
||||
$phpver = phpversion();
|
||||
|
||||
if ( $phpver >= '4.0.4pl1' )
|
||||
if ( $phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible') )
|
||||
{
|
||||
if ( extension_loaded('zlib') )
|
||||
{
|
||||
|
@ -85,13 +85,11 @@ $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)" : '';
|
||||
$user_forum_sql = ( !empty($forum_id) ) ? "AND 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 ) . " )
|
||||
AND s.session_time >= ".( time() - 300 ) . "
|
||||
$user_forum_sql
|
||||
ORDER BY u.username ASC, s.session_ip ASC";
|
||||
if( !($result = $db->sql_query($sql)) )
|
||||
|
@ -386,7 +384,7 @@ $template->assign_vars(array(
|
|||
'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_TIMEZONE' => sprintf($lang['All_times'], $lang[number_format($board_config['board_timezone'])]),
|
||||
'S_LOGIN_ACTION' => append_sid('login.'.$phpEx),
|
||||
|
||||
'T_HEAD_STYLESHEET' => $theme['head_stylesheet'],
|
||||
|
|
|
@ -22,70 +22,35 @@
|
|||
|
||||
if ( !defined('IN_PHPBB') )
|
||||
{
|
||||
die("Hacking attempt");
|
||||
die('Hacking attempt');
|
||||
}
|
||||
|
||||
//
|
||||
// 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="' . append_sid("admin/index.$phpEx") . '">' . $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(
|
||||
'PHPBB_VERSION' => '2' . $board_config['version'],
|
||||
'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '',
|
||||
'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,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;
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
*
|
||||
***************************************************************************/
|
||||
|
||||
//
|
||||
// session_begin()
|
||||
//
|
||||
// Adds/updates a new session to the database for the given userid.
|
||||
// Returns the new session ID on success.
|
||||
|
@ -54,8 +52,7 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
|
|||
$expiry_time = $current_time - $board_config['session_length'];
|
||||
|
||||
//
|
||||
// Try and pull the last time stored
|
||||
// in a cookie, if it exists
|
||||
// Try and pull the last time stored in a cookie, if it exists
|
||||
//
|
||||
$sql = "SELECT *
|
||||
FROM " . USERS_TABLE . "
|
||||
|
@ -81,8 +78,6 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
|
|||
// autologinid matches password
|
||||
$login = 1;
|
||||
$enable_autologin = 1;
|
||||
|
||||
$last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -102,7 +97,6 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
|
|||
}
|
||||
else
|
||||
{
|
||||
$last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;
|
||||
$login = 1;
|
||||
}
|
||||
}
|
||||
|
@ -123,8 +117,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)) )
|
||||
{
|
||||
|
@ -146,27 +140,29 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
|
|||
SET session_user_id = $user_id, session_start = $current_time, session_time = $current_time, session_page = $page_id, session_logged_in = $login
|
||||
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));
|
||||
|
||||
$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)) )
|
||||
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 )
|
||||
{
|
||||
{// ( $userdata['user_session_time'] > $expiry_time && $auto_create ) ? $userdata['user_lastvisit'] : (
|
||||
$last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;
|
||||
|
||||
$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 : session_begin', '', __LINE__, __FILE__, $sql);
|
||||
message_die(CRITICAL_ERROR, 'Error updating last visit time', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$userdata['user_lastvisit'] = $last_visit;
|
||||
|
@ -185,8 +181,6 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
|
|||
|
||||
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 : '';
|
||||
|
||||
|
@ -194,8 +188,8 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
|
|||
}
|
||||
|
||||
//
|
||||
// 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,7 +200,6 @@ 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);
|
||||
|
@ -219,7 +212,7 @@ function session_pagestart($user_ip, $thispage_id)
|
|||
}
|
||||
else
|
||||
{
|
||||
$session_data = '';
|
||||
$sessiondata = '';
|
||||
$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
|
||||
$sessionmethod = SESSION_METHOD_GET;
|
||||
}
|
||||
|
@ -236,11 +229,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 +242,60 @@ 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 ) ? '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);
|
||||
$sql = "UPDATE " . SESSIONS_TABLE . "
|
||||
SET session_time = $current_time, session_page = $thispage_id
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Delete expired sessions
|
||||
//
|
||||
$expiry_time = $current_time - $board_config['session_length'];
|
||||
$sql = "DELETE FROM " . SESSIONS_TABLE . "
|
||||
WHERE session_time < $expiry_time
|
||||
AND session_id <> '$session_id'";
|
||||
if ( !$db->sql_query($sql) )
|
||||
{
|
||||
message_die(CRITICAL_ERROR, 'Error clearing sessions table', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
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,11 +303,11 @@ 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;
|
||||
|
@ -316,7 +328,6 @@ function session_end($session_id, $user_id)
|
|||
$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
|
||||
|
@ -338,20 +349,15 @@ function session_end($session_id, $user_id)
|
|||
$sql = "DELETE FROM " . SESSIONS_TABLE . "
|
||||
WHERE session_id = '$session_id'
|
||||
AND session_user_id = $user_id";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
if ( !$db->sql_query($sql) )
|
||||
{
|
||||
message_die(CRITICAL_ERROR, 'Error removing user session : session_end', '', __LINE__, __FILE__, $sql);
|
||||
message_die(CRITICAL_ERROR, 'Error removing user session', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -170,7 +170,7 @@ function smtpmail($mail_to, $subject, $message, $headers = "")
|
|||
fputs( $socket, "RCPT TO: <$mail_to_address>\r\n" );
|
||||
server_parse( $socket, "250" );
|
||||
}
|
||||
$to_header .= "<$mail_to_address>, ";
|
||||
$to_header .= ( ( $mail_to_address != '' ) ? ', ' : '' ) . "<$mail_to_address>";
|
||||
}
|
||||
// Ok now do the CC and BCC fields...
|
||||
@reset( $bcc );
|
||||
|
|
|
@ -139,6 +139,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'] : '';
|
||||
|
||||
|
|
|
@ -27,70 +27,81 @@ if ( !defined('IN_PHPBB') )
|
|||
exit;
|
||||
}
|
||||
|
||||
$sql = "SELECT user_id, user_email, user_newpasswd, user_lang
|
||||
$sql = "SELECT user_active, user_id, 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'] && $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 ( $row['user_actkey'] == $HTTP_GET_VARS['act_key'] )
|
||||
{
|
||||
$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 ( $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'] . "\nReturn-Path: " . $board_config['board_email'] . "\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_MESSAGE, $lang['Wrong_activation']);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
message_die(GENERAL_MESSAGE, $lang['No_such_user']);
|
||||
}
|
||||
|
||||
?>
|
|
@ -64,17 +64,26 @@ function user_avatar_delete($avatar_type, $avatar_file)
|
|||
|
||||
function user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename)
|
||||
{
|
||||
return ( $mode == 'editprofile' ) ? ", user_avatar = '" . str_replace("\'", "''", $avatar_filename) . "', user_avatar_type = " . USER_AVATAR_GALLERY : '';
|
||||
global $board_config;
|
||||
if ( file_exists($board_config['avatar_gallery_path'] . '/' . $avatar_filename) && ($mode == 'editprofile') )
|
||||
{
|
||||
$return = ", user_avatar = '" . str_replace("\'", "''", $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) )
|
||||
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('#^((http)|(ftp):\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)+[a-z]+(:[0-9]+)*\/.*?\.(gif|jpg|jpeg|png)$)#is', $avatar_filename) )
|
||||
{
|
||||
$error = true;
|
||||
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $lang['Wrong_remote_avatar_format'] : $lang['Wrong_remote_avatar_format'];
|
||||
|
@ -162,7 +171,7 @@ function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_typ
|
|||
{
|
||||
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
|
||||
|
@ -184,7 +193,7 @@ function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_typ
|
|||
|
||||
if ( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
|
||||
{
|
||||
$new_filename = ( $current_avatar != '' && $mode != 'register' ) ? $current_avatar : uniqid($user_ip) . $imgtype;
|
||||
$new_filename = uniqid($user_ip) . $imgtype;
|
||||
|
||||
if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' )
|
||||
{
|
||||
|
@ -233,7 +242,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, &$popuppm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat)
|
||||
{
|
||||
global $board_config, $db, $template, $lang, $images, $theme;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
@ -309,7 +318,7 @@ 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', 'popuppm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');
|
||||
|
||||
$s_hidden_vars = '<input type="hidden" name="agreed" value="true" />';
|
||||
|
||||
|
|
|
@ -27,21 +27,21 @@ if ( !defined('IN_PHPBB') )
|
|||
exit;
|
||||
}
|
||||
|
||||
if ( !$userdata['session_logged_in'] )
|
||||
{
|
||||
header('Location: ' . append_sid("login.$phpEx?redirect=profile.$phpEx&mode=email&" . POST_USERS_URL . "=$user_id", true));
|
||||
exit;
|
||||
}
|
||||
|
||||
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'] )
|
||||
{
|
||||
header('Location: ' . append_sid("login.$phpEx?redirect=profile.$phpEx&mode=email&" . POST_USERS_URL . "=$user_id", true));
|
||||
exit;
|
||||
}
|
||||
|
||||
$sql = "SELECT username, user_email, user_viewemail, user_lang
|
||||
FROM " . USERS_TABLE . "
|
||||
WHERE user_id = $user_id";
|
||||
|
@ -94,16 +94,11 @@ 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 = 'Return-Path: ' . $userdata['user_email'] . "\nFrom: " . $userdata['user_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";
|
||||
$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 +115,25 @@ if ( $result = $db->sql_query($sql) )
|
|||
$emailer->send();
|
||||
$emailer->reset();
|
||||
|
||||
if ( !empty($HTTP_POST_VARS['cc_email']) )
|
||||
{
|
||||
$email_headers = 'Return-Path: ' . $userdata['user_email'] . "\nFrom: " . $userdata['user_email'] . "\n";
|
||||
$emailer->use_template('profile_send_email');
|
||||
$emailer->email_address($userdata['user_email']);
|
||||
$emailer->set_subject($subject);
|
||||
$emailer->extra_headers($email_headers);
|
||||
|
||||
$emailer->assign_vars(array(
|
||||
'SITENAME' => $board_config['sitename'],
|
||||
'BOARD_EMAIL' => $board_config['board_email'],
|
||||
'FROM_USERNAME' => $userdata['username'],
|
||||
'TO_USERNAME' => $username,
|
||||
'MESSAGE' => $message)
|
||||
);
|
||||
$emailer->send();
|
||||
$emailer->reset();
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'META' => '<meta http-equiv="refresh" content="5;url=' . append_sid("index.$phpEx") . '">')
|
||||
);
|
||||
|
|
|
@ -27,11 +27,11 @@ if ( !defined('IN_PHPBB') )
|
|||
exit;
|
||||
}
|
||||
|
||||
//
|
||||
// ---------------------------------------
|
||||
// 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;
|
||||
|
||||
|
@ -40,7 +40,6 @@ function show_coppa(&$coppa)
|
|||
);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'COPPA' => $coppa,
|
||||
'REGISTRATION' => $lang['Registration'],
|
||||
'AGREEMENT' => $lang['Reg_agreement'],
|
||||
"AGREE_OVER_13" => $lang['Agree_over_13'],
|
||||
|
@ -55,8 +54,7 @@ function show_coppa(&$coppa)
|
|||
|
||||
}
|
||||
//
|
||||
//
|
||||
//
|
||||
// ---------------------------------------
|
||||
|
||||
$error = FALSE;
|
||||
$page_title = ( $mode == 'editprofile' ) ? $lang['Edit_profile'] : $lang['Register'];
|
||||
|
@ -65,12 +63,12 @@ if ( $mode == 'register' && !isset($HTTP_POST_VARS['agreed']) && !isset($HTTP_GE
|
|||
{
|
||||
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
|
||||
|
@ -102,7 +100,7 @@ if (
|
|||
}
|
||||
}
|
||||
|
||||
$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) )
|
||||
{
|
||||
|
@ -176,12 +174,13 @@ if (
|
|||
$user_avatar = ( empty($user_avatar_loc) && $mode == 'editprofile' ) ? $userdata['user_avatar'] : '';
|
||||
$user_avatar_type = ( empty($user_avatar_loc) && $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 = stripslashes($cur_password);
|
||||
$new_password = stripslashes($new_password);
|
||||
$password_confirm = stripslashes($password_confirm);
|
||||
|
||||
$icq = stripslashes($icq);
|
||||
$aim = stripslashes($aim);
|
||||
|
@ -201,9 +200,25 @@ if (
|
|||
{
|
||||
$user_avatar = $user_avatar_local;
|
||||
$user_avatar_type = USER_AVATAR_GALLERY;
|
||||
|
||||
if ( $userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && @file_exists('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar']) )
|
||||
{
|
||||
@unlink('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar']);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
// 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 ( $userdata['session_logged_in'] && $mode =="register" && $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,9 +238,7 @@ 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'];
|
||||
|
@ -234,14 +247,14 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
|||
}
|
||||
|
||||
$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'];
|
||||
|
@ -260,7 +273,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) )
|
||||
{
|
||||
$error = TRUE;
|
||||
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Current_password_mismatch'];
|
||||
|
@ -269,12 +282,12 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
|||
|
||||
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'];
|
||||
|
@ -306,7 +319,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'];
|
||||
|
||||
|
@ -354,9 +367,14 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
|||
$signature = prepare_message($signature, $allowhtml, $allowbbcode, $allowsmilies, $signature_bbcode_uid);
|
||||
}
|
||||
|
||||
if ( $website != '' )
|
||||
{
|
||||
rawurlencode($website);
|
||||
}
|
||||
|
||||
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'] )
|
||||
{
|
||||
|
@ -381,6 +399,10 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
|||
{
|
||||
$avatar_sql = user_avatar_gallery($mode, $error, $error_msg, $user_avatar_local);
|
||||
}
|
||||
else
|
||||
{
|
||||
$avatar_sql = '';
|
||||
}
|
||||
|
||||
if ( !$error )
|
||||
{
|
||||
|
@ -391,12 +413,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'] )
|
||||
|
@ -426,7 +449,7 @@ 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";
|
||||
$email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n";
|
||||
|
||||
$emailer->use_template('user_activate', stripslashes($user_lang));
|
||||
$emailer->email_address($email);
|
||||
|
@ -438,7 +461,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
|||
'USERNAME' => $username,
|
||||
'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();
|
||||
|
@ -471,24 +494,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, $popuppm, $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 +517,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,7 +557,7 @@ 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";
|
||||
$email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n";
|
||||
|
||||
$emailer->use_template($email_template, stripslashes($user_lang));
|
||||
$emailer->email_address($email);
|
||||
|
@ -561,8 +573,6 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
|||
'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,
|
||||
|
@ -585,7 +595,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
|||
'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,7 +604,8 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
|||
|
||||
if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN )
|
||||
{
|
||||
$emailer->use_template("admin_activate", stripslashes($user_lang));
|
||||
//$emailer->use_template("admin_activate", stripslashes($user_lang));
|
||||
$emailer->use_template("admin_activate", $board_config['default_lang']);
|
||||
$emailer->email_address($board_config['board_email']);
|
||||
$emailer->set_subject(); //$lang['New_account_subject']
|
||||
$emailer->extra_headers($email_headers);
|
||||
|
@ -603,7 +614,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
|||
'USERNAME' => $username,
|
||||
'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();
|
||||
|
@ -624,7 +635,7 @@ if ( $error )
|
|||
//
|
||||
$username = stripslashes($username);
|
||||
$email = stripslashes($email);
|
||||
$password = '';
|
||||
$new_password = '';
|
||||
$password_confirm = '';
|
||||
|
||||
$icq = stripslashes($icq);
|
||||
|
@ -637,6 +648,7 @@ if ( $error )
|
|||
$occupation = htmlspecialchars(stripslashes($occupation));
|
||||
$interests = htmlspecialchars(stripslashes($interests));
|
||||
$signature = stripslashes($signature);
|
||||
$signature = ( $signature_bbcode_uid != '' ) ? preg_replace("/:(([a-z0-9]+:)?)$signature_bbcode_uid\]/si", ']', $signature) : $signature;
|
||||
|
||||
$user_lang = stripslashes($user_lang);
|
||||
$user_dateformat = stripslashes($user_dateformat);
|
||||
|
@ -647,7 +659,7 @@ else if ( $mode == 'editprofile' && !isset($HTTP_POST_VARS['avatargallery']) &&
|
|||
$user_id = $userdata['user_id'];
|
||||
$username = htmlspecialchars($userdata['username']);
|
||||
$email = $userdata['user_email'];
|
||||
$password = '';
|
||||
$new_password = '';
|
||||
$password_confirm = '';
|
||||
|
||||
$icq = $userdata['user_icq'];
|
||||
|
@ -660,7 +672,7 @@ else if ( $mode == 'editprofile' && !isset($HTTP_POST_VARS['avatargallery']) &&
|
|||
$occupation = htmlspecialchars($userdata['user_occ']);
|
||||
$interests = htmlspecialchars($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", ']', $userdata['user_sig']) : $userdata['user_sig'];
|
||||
|
||||
$viewemail = $userdata['user_viewemail'];
|
||||
$notifypm = $userdata['user_notify_pm'];
|
||||
|
@ -707,7 +719,9 @@ if( isset($HTTP_POST_VARS['avatargallery']) && !$error )
|
|||
'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, $popuppm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -723,8 +737,6 @@ else
|
|||
$selected_template = $board_config['system_template'];
|
||||
}
|
||||
|
||||
$signature = preg_replace('/\:[0-9a-z\:]*?\]/si', ']', $signature);
|
||||
|
||||
$avatar_img = '';
|
||||
if ( $user_avatar_type )
|
||||
{
|
||||
|
@ -787,10 +799,13 @@ else
|
|||
// 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,
|
||||
'YIM' => $yim,
|
||||
'ICQ' => $icq,
|
||||
|
@ -899,27 +914,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('./' . $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('./' . $board_config['avatar_gallery_path']) )
|
||||
{
|
||||
$template->assign_block_vars('switch_avatar_block.switch_avatar_local_gallery', array() );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ 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);
|
||||
|
@ -54,7 +55,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
|||
$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,7 +65,7 @@ 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";
|
||||
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n";
|
||||
|
||||
$emailer->use_template('user_activate_passwd', $row['user_lang']);
|
||||
$emailer->email_address($row['user_email']);
|
||||
|
@ -77,7 +78,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
|||
'PASSWORD' => $user_password,
|
||||
'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,7 +125,9 @@ $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_PROFILE_ACTION' => append_sid("profile.$phpEx?mode=sendpassword"))
|
||||
);
|
||||
|
||||
$template->pparse('body');
|
||||
|
|
|
@ -25,7 +25,7 @@ set_magic_quotes_runtime(0); // Disable magic_quotes_runtime
|
|||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path='./';
|
||||
include($phpbb_root_path.'extension.inc');
|
||||
include($phpbb_root_dir . 'includes/functions_selects.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
|
||||
|
||||
$userdata = array();
|
||||
$lang = array();
|
||||
|
@ -344,6 +344,7 @@ else
|
|||
else
|
||||
{
|
||||
header("Location: " . append_sid("index.$phpEx", true));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -875,7 +876,7 @@ else
|
|||
if( preg_match("/^(3\.23)|(4\.)/", $version) )
|
||||
{
|
||||
$sql = "ALTER TABLE " . $table_prefix . "sessions
|
||||
TYPE=HEAP";
|
||||
TYPE=HEAP MAX_ROWS=500";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
@ -905,12 +906,12 @@ else
|
|||
//
|
||||
$config_data = '<?php'."\n\n";
|
||||
$config_data .= "//\n// phpBB 2.x auto-generated config file\n// Do not change anything in this file!\n//\n\n";
|
||||
$config_data .= '$dbms = "' . $dbms . '";' . "\n\n";
|
||||
$config_data .= '$dbhost = "' . $dbhost . '";' . "\n";
|
||||
$config_data .= '$dbname = "' . $dbname . '";' . "\n";
|
||||
$config_data .= '$dbuser = "' . $dbuser . '";' . "\n";
|
||||
$config_data .= '$dbpasswd = "' . $dbpasswd . '";' . "\n\n";
|
||||
$config_data .= '$table_prefix = "' . $table_prefix . '";' . "\n\n";
|
||||
$config_data .= '$dbms = \'' . $dbms . '\';' . "\n\n";
|
||||
$config_data .= '$dbhost = \'' . $dbhost . '\';' . "\n";
|
||||
$config_data .= '$dbname = \'' . $dbname . '\';' . "\n";
|
||||
$config_data .= '$dbuser = \'' . $dbuser . '\';' . "\n";
|
||||
$config_data .= '$dbpasswd = \'' . $dbpasswd . '\';' . "\n\n";
|
||||
$config_data .= '$table_prefix = \'' . $table_prefix . '\';' . "\n\n";
|
||||
$config_data .= 'define(\'PHPBB_INSTALLED\', true);'."\n\n";
|
||||
$config_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused!
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Llogari e re
|
||||
Charset: iso-8859-1
|
||||
|
||||
Përshëndetje,
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
Charset: iso-8859-1
|
||||
|
||||
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}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Llogaria u aktivizia
|
||||
Charset: iso-8859-1
|
||||
|
||||
Përshëndetje {USERNAME},
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Mirsevini tek forumi i {SITENAME}
|
||||
Charset: iso-8859-1
|
||||
|
||||
{WELCOME_MSG}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Mirsevini tek forumi i {SITENAME}
|
||||
Charset: iso-8859-1
|
||||
|
||||
{WELCOME_MSG}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Jeni anëtar i këtij grupi tashmë
|
||||
Charset: iso-8859-1
|
||||
|
||||
Urime,
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Kërkesa juaj u aprovua
|
||||
Charset: iso-8859-1
|
||||
|
||||
Urime,
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Dikush ka bërë kërkesë për anëtarësim tek grupi juaj
|
||||
Charset: iso-8859-1
|
||||
|
||||
I nderuar {GROUP_MODERATOR},
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Sapo keni marrë mesazh privat të ri
|
||||
Charset: iso-8859-1
|
||||
|
||||
Përshëndetje {USERNAME},
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
Charset: iso-8859-1
|
||||
|
||||
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:
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Përgjigje tek tema - {TOPIC_TITLE}
|
||||
Charset: iso-8859-1
|
||||
|
||||
Përshëndetje {USERNAME},
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Riaktivizoni llogarinë tuaj
|
||||
Charset: iso-8859-1
|
||||
|
||||
Përshëndetje {USERNAME},
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Aktivizoni fjalëkalimin e ri
|
||||
Charset: iso-8859-1
|
||||
|
||||
Përshëndetje {USERNAME}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Mirsevini tek forumi i {SITENAME}
|
||||
Charset: iso-8859-1
|
||||
|
||||
{WELCOME_MSG}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Mirsevini tek forumi i {SITENAME}
|
||||
Charset: iso-8859-1
|
||||
|
||||
{WELCOME_MSG}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: гФКСЯ МПнП
|
||||
Charset: windows-1256
|
||||
|
||||
гСНИЗ,
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
Charset: windows-1256
|
||||
|
||||
هذه رسالة من مدير "{SITENAME}". اذا كانت هذه الرسالة اعلانات, تحتوي على لغة بذيئة أو اي كلام غير ملائم الرجاء مراسلة مسؤول الموقع على العنوان التالي:
|
||||
|
||||
{BOARD_EMAIL}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: تم تشغيل الاشتراك
|
||||
Charset: windows-1256
|
||||
|
||||
مرحبا {USERNAME},
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: أهلا وسهلا بكم في منتدى {SITENAME}
|
||||
Charset: windows-1256
|
||||
|
||||
{WELCOME_MSG}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: أهلا وسهلا بكم في منتدى {SITENAME}
|
||||
Charset: windows-1256
|
||||
|
||||
{WELCOME_MSG}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: تم اضافتك للمجموعة
|
||||
Charset: windows-1256
|
||||
|
||||
مبروك,
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: تمت الموافقة على طلبك
|
||||
Charset: windows-1256
|
||||
|
||||
مبروك,
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: تم تقديم طلبك للاشتراك في المجموعة
|
||||
Charset: windows-1256
|
||||
|
||||
السيد/ة {GROUP_MODERATOR},
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: لقد وصلت رسالة خاصة
|
||||
Charset: windows-1256
|
||||
|
||||
مرحبا {USERNAME},
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
Charset: windows-1256
|
||||
|
||||
مرحبا {TO_USERNAME},
|
||||
|
||||
هذه الرسالة قد ارسلها {FROM_USERNAME} لحسابك في الموقع {SITENAME}. اذا كانت هذه الرسالة اعلانات, تحتوي على لغة بذيئة أو اي كلام غير ملائم الرجاء مراسلة مسؤول الموقع على العنوان التالي:
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: التذكير بالردود على المواضيع - {TOPIC_TITLE}
|
||||
Charset: windows-1256
|
||||
|
||||
مرحبا {USERNAME},
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: v
|
||||
Charset: windows-1256
|
||||
|
||||
ăŃÍČÇ {USERNAME},
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: New password activation
|
||||
Charset: windows-1256
|
||||
|
||||
ãÑÍÈÇ {USERNAME}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: أهلا وسهلا بكم في منتدى {SITENAME}
|
||||
Charset: windows-1256
|
||||
|
||||
{WELCOME_MSG}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: أهلا وسهلا بكم في منتدى {SITENAME}
|
||||
Charset: windows-1256
|
||||
|
||||
{WELCOME_MSG}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Нов потребител
|
||||
Charset: windows-1251
|
||||
|
||||
Здравейте!
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
Charset: windows-1251
|
||||
|
||||
Това е мейл, пратен от администратора на "{SITENAME}". Ако това съобщение е спам, съдържа неприлични или други коментари които вие намирате за обидни, моля свържете се с webmaster-а на следния е-мейл адрес:
|
||||
|
||||
{BOARD_EMAIL}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: دَِْمفوْمً<D985> م ـيْوقوِـٍ
|
||||
Charset: windows-1251
|
||||
|
||||
الِـقمىْم {USERNAME}!
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Добре дошли на {SITENAME} Форумите
|
||||
Subject: Добре дошли на форумите на {SITENAME}
|
||||
Charset: windows-1251
|
||||
|
||||
{WELCOME_MSG}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Добре дошли на {SITENAME} Форумите
|
||||
Subject: Добре дошли на форумите на {SITENAME}
|
||||
Charset: windows-1251
|
||||
|
||||
{WELCOME_MSG}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Приет сте за член на тази група
|
||||
Charset: windows-1251
|
||||
|
||||
Поздравления,
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Вашата кандидатура е одобрена
|
||||
Charset: windows-1251
|
||||
|
||||
Поздравления,
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Получена е заявка за приемане в групата ви
|
||||
Charset: windows-1251
|
||||
|
||||
{GROUP_MODERATOR},
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Получихте ново лично съобщения
|
||||
Subject: Получихте ново лично съобщение
|
||||
Charset: windows-1251
|
||||
|
||||
الِـقمىْم {USERNAME}!
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
Charset: windows-1251
|
||||
|
||||
Здравейте {TO_USERNAME}!
|
||||
|
||||
Съобщението по-долу ви е пратено от {FROM_USERNAME} чрез вашия профил на {SITENAME}. Ако това съобщение е спам, съдържа неприлични или други коментари които вие намирате за обидни, моля свържете се с webmaster-а на следния е-мейл адрес:
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Уведемояване за отговори по темата - {TOPIC_TITLE}
|
||||
Subject: Уведемояване за отговори по темата: {TOPIC_TITLE}
|
||||
Charset: windows-1251
|
||||
|
||||
الِـقمىْم {USERNAME}!
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: ذم-ـيْوقوِـىْم َُِْمفوْمً<D985> ّو!
|
||||
Charset: windows-1251
|
||||
|
||||
الِـقمىْم {USERNAME}!
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Активиране на нова парола
|
||||
Charset: windows-1251
|
||||
|
||||
Здравейте {USERNAME}!
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Добре дошли на {SITENAME} Форумите
|
||||
Subject: Добре дошли на форумите на {SITENAME}
|
||||
Charset: windows-1251
|
||||
|
||||
{WELCOME_MSG}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Subject: Добре дошли на {SITENAME} Форумите
|
||||
Subject: Добре дошли на форумите на {SITENAME}
|
||||
Charset: windows-1251
|
||||
|
||||
{WELCOME_MSG}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue