diff options
Diffstat (limited to 'phpBB/adm')
-rw-r--r-- | phpBB/adm/admin_attachments.php | 57 | ||||
-rw-r--r-- | phpBB/adm/admin_board.php | 352 | ||||
-rw-r--r-- | phpBB/adm/admin_database.php | 4 | ||||
-rw-r--r-- | phpBB/adm/admin_forums.php | 18 | ||||
-rw-r--r-- | phpBB/adm/admin_groups.php | 20 | ||||
-rw-r--r-- | phpBB/adm/admin_permissions.php | 2 | ||||
-rw-r--r-- | phpBB/adm/admin_search.php | 40 | ||||
-rw-r--r-- | phpBB/adm/index.php | 1 | ||||
-rw-r--r-- | phpBB/adm/pagestart.php | 2 |
9 files changed, 295 insertions, 201 deletions
diff --git a/phpBB/adm/admin_attachments.php b/phpBB/adm/admin_attachments.php index a3b5b64e7e..05587a897e 100644 --- a/phpBB/adm/admin_attachments.php +++ b/phpBB/adm/admin_attachments.php @@ -104,23 +104,6 @@ if ($mode == 'attach') if ($submit) { -/* - // Update Extension Group Filesizes - if ($config_name == 'max_filesize') - { - $old_size = (int) $default_config[$config_name]; - $new_size = (int) $new[$config_name]; - - if ($old_size != $new_size) - { - // check for similar value of old_size in Extension Groups. If so, update these values. - $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . " - SET max_filesize = $new_size - WHERE max_filesize = $old_size"; - $db->sql_query($sql); - } - } -*/ set_config($config_name, $new[$config_name]); if (in_array($config_name, array('max_filesize', 'attachment_quota', 'max_filesize_pm'))) @@ -299,12 +282,13 @@ if ($submit && $mode == 'ext_groups') if (!sizeof($error)) { // Ok, build the update/insert array - $upload_icon = request_var('upload_icon', 'no_image'); - $size_select = request_var('size_select', 'b'); - $forum_select = request_var('forum_select', false); - $allowed_forums = isset($_REQUEST['allowed_forums']) ? array_map('intval', array_values($_REQUEST['allowed_forums'])) : array(); - $max_filesize = request_var('max_filesize', 0); - $max_filesize = ($size_select == 'kb') ? round($max_filesize * 1024) : (($size_select == 'mb') ? round($max_filesize * 1048576) : $max_filesize); + $upload_icon = request_var('upload_icon', 'no_image'); + $size_select = request_var('size_select', 'b'); + $forum_select = request_var('forum_select', false); + $allowed_forums = isset($_REQUEST['allowed_forums']) ? array_map('intval', array_values($_REQUEST['allowed_forums'])) : array(); + $allow_in_pm = isset($_REQUEST['allow_in_pm']) ? true : false; + $max_filesize = request_var('max_filesize', 0); + $max_filesize = ($size_select == 'kb') ? round($max_filesize * 1024) : (($size_select == 'mb') ? round($max_filesize * 1048576) : $max_filesize); if ($max_filesize == $config['max_filesize']) { @@ -323,7 +307,8 @@ if ($submit && $mode == 'ext_groups') 'download_mode' => request_var('download_mode', INLINE_LINK), 'upload_icon' => ($upload_icon == 'no_image') ? '' : $upload_icon, 'max_filesize' => $max_filesize, - 'allowed_forums'=> ($forum_select) ? serialize($allowed_forums) : '' + 'allowed_forums'=> ($forum_select) ? serialize($allowed_forums) : '', + 'allow_in_pm' => ($allow_in_pm) ? 1 : 0 ); $sql = ($action == 'add') ? 'INSERT INTO ' . EXTENSION_GROUPS_TABLE . ' ' : 'UPDATE ' . EXTENSION_GROUPS_TABLE . ' SET '; @@ -377,7 +362,7 @@ if ($submit && $mode == 'ext_groups') if ($submit && $mode == 'orphan') { $delete_files = array_keys(request_var('delete', '')); - $add_files = array_keys(request_var('add', '')); + $add_files = (isset($_REQUEST['add'])) ? array_keys(request_var('add', '')) : array(); $post_ids = request_var('post_id', 0); foreach ($delete_files as $delete) @@ -802,6 +787,7 @@ if ($mode == 'ext_groups') $group_name = request_var('group_name', ''); $cat_id = 0; $allow_group = 1; + $allow_in_pm = 1; $download_mode = 1; $upload_icon = ''; $max_filesize = 0; @@ -838,7 +824,8 @@ if ($mode == 'ext_groups') $max_filesize = ($max_filesize >= 1048576) ? round($max_filesize / 1048576 * 100) / 100 : (($max_filesize >= 1024) ? round($max_filesize / 1024 * 100) / 100 : $max_filesize); - $s_allowed = ($allow_group == 1) ? 'checked="checked"' : ''; + $s_allowed = ($allow_group) ? ' checked="checked"' : ''; + $s_in_pm_allowed = ($allow_in_pm) ? ' checked="checked"' : ''; $filename_list = ''; $no_image_select = false; @@ -926,7 +913,11 @@ if ($mode == 'ext_groups') </tr> <tr> <td class="row1" width="35%"><b><?php echo $user->lang['ALLOWED']; ?></b>:</td> - <td class="row2"><input type="checkbox" name="allow_group" value="<?php echo $group_id; ?>" <?php echo $s_allowed; ?> /></td> + <td class="row2"><input type="checkbox" name="allow_group" value="<?php echo $group_id; ?>"<?php echo $s_allowed; ?> /></td> + </tr> + <tr> + <td class="row1" width="35%"><b><?php echo $user->lang['ALLOW_IN_PM']; ?></b>:</td> + <td class="row2"><input type="checkbox" name="allow_in_pm" value="1"<?php echo $s_in_pm_allowed; ?> /></td> </tr> <tr> <td class="row1" width="35%"><b><?php echo $user->lang['DOWNLOAD_MODE']; ?></b>:</td> @@ -1416,9 +1407,10 @@ function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename) if ($filedata['post_attach'] && !sizeof($filedata['error'])) { $message_parser->attachment_data = array( - 'post_id' => $post_id, + 'post_msg_id' => $post_id, 'poster_id' => $user->data['user_id'], 'topic_id' => $topic_id, + 'in_message' => 0, 'physical_filename' => $filedata['destination_filename'], 'real_filename' => $filedata['filename'], 'comment' => $message_parser->filename_data['filecomment'], @@ -1725,8 +1717,15 @@ function rewrite_extensions() $extensions[$extension]['upload_icon'] = (string) $row['upload_icon']; $extensions[$extension]['max_filesize'] = (int) $row['max_filesize']; + $allowed_forums = ($row['allowed_forums']) ? unserialize(trim($row['allowed_forums'])) : array(); + + if ($row['allow_in_pm']) + { + $allowed_forums = array_merge($allowed_forums, array(0)); + } + // Store allowed extensions forum wise - $extensions['_allowed_'][$extension] = (!$row['allowed_forums']) ? 0 : unserialize(trim($row['allowed_forums'])); + $extensions['_allowed_'][$extension] = (!sizeof($allowed_forums)) ? 0 : $allowed_forums; } $db->sql_freeresult($result); diff --git a/phpBB/adm/admin_board.php b/phpBB/adm/admin_board.php index c55205c116..ac65b60816 100644 --- a/phpBB/adm/admin_board.php +++ b/phpBB/adm/admin_board.php @@ -22,6 +22,7 @@ if (!empty($setmodules)) $module['GENERAL']['EMAIL_SETTINGS'] = ($auth->acl_get('a_server')) ? "$filename$SID&mode=email" : ''; $module['GENERAL']['LOAD_SETTINGS'] = ($auth->acl_get('a_server')) ? "$filename$SID&mode=load" : ''; $module['GENERAL']['SERVER_SETTINGS'] = ($auth->acl_get('a_server')) ? "$filename$SID&mode=server" : ''; + $module['GENERAL']['MESSAGE_SETTINGS'] = ($auth->acl_get('a_defaults')) ? "$filename$SID&mode=message" : ''; $module['USER']['KARMA_SETTINGS'] = ($auth->acl_get('a_user')) ? "$filename$SID&mode=karma" : ''; return; } @@ -76,6 +77,10 @@ switch ($mode) $l_title = 'KARMA_SETTINGS'; $which_auth = 'a_user'; break; + case 'message': + $l_title = 'MESSAGE_SETTINGS'; + $which_auth = 'a_defaults'; + break; default: return; } @@ -86,32 +91,21 @@ if (!$auth->acl_get($which_auth)) trigger_error($user->lang['NO_ADMIN']); } -// Pull all config data -$sql = 'SELECT * - FROM ' . CONFIG_TABLE; -$result = $db->sql_query($sql); +$new = $config; +$cfg_array = (isset($_REQUEST['config'])) ? request_var('config', '') : $new; -while ($row = $db->sql_fetchrow($result)) +foreach ($cfg_array as $config_name => $config_value) { - $config_name = $row['config_name']; - $config_value = $row['config_value']; - - $default_config[$config_name] = $config_value; - $new[$config_name] = request_var($config_name, $default_config[$config_name]); - - if ($config_name == 'bump_interval' && $submit) - { - $new['bump_interval'] = request_var('bump_interval', 2) . request_var('bump_type', 'd'); - } + $new[$config_name] = $config_value; if ($config_name == 'email_function_name') { $new['email_function_name'] = (empty($new['email_function_name']) || !function_exists($new['email_function_name'])) ? 'mail' : str_replace(array('(', ')'), array('', ''), trim($new['email_function_name'])); } - + if ($submit) { - set_config($config_name, $new[$config_name]); + set_config($config_name, $config_value); } } @@ -147,19 +141,19 @@ switch ($mode) ?> <tr> <td class="row1" width="50%"><b><?php echo $user->lang['COOKIE_DOMAIN']; ?>: </b></td> - <td class="row2"><input class="post" type="text" maxlength="255" name="cookie_domain" value="<?php echo $new['cookie_domain']; ?>" /></td> + <td class="row2"><input class="post" type="text" maxlength="255" name="config[cookie_domain]" value="<?php echo $new['cookie_domain']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['COOKIE_NAME']; ?>: </b></td> - <td class="row2"><input class="post" type="text" maxlength="16" name="cookie_name" value="<?php echo $new['cookie_name']; ?>" /></td> + <td class="row2"><input class="post" type="text" maxlength="16" name="config[cookie_name]" value="<?php echo $new['cookie_name']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['COOKIE_PATH']; ?>: </b></td> - <td class="row2"><input class="post" type="text" maxlength="255" name="cookie_path" value="<?php echo $new['cookie_path']; ?>" /></td> + <td class="row2"><input class="post" type="text" maxlength="255" name="config[cookie_p]" value="<?php echo $new['cookie_path']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['COOKIE_SECURE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['COOKIE_SECURE_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="cookie_secure" value="0"<?php echo $cookie_secure_no; ?> /><?php echo $user->lang['DISABLED']; ?> <input type="radio" name="cookie_secure" value="1"<?php echo $cookie_secure_yes; ?> /><?php echo $user->lang['ENABLED']; ?></td> + <td class="row2"><input type="radio" name="config[cookie_secure]" value="0"<?php echo $cookie_secure_no; ?> /><?php echo $user->lang['DISABLED']; ?> <input type="radio" name="config[cookie_secure]" value="1"<?php echo $cookie_secure_yes; ?> /><?php echo $user->lang['ENABLED']; ?></td> </tr> <?php @@ -177,35 +171,35 @@ switch ($mode) ?> <tr> <td class="row1" width="50%"><b><?php echo $user->lang['ALLOW_LOCAL']; ?>: </b></td> - <td class="row2"><input type="radio" name="allow_avatar_local" value="1"<?php echo $avatars_local_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="allow_avatar_local" value="0"<?php echo $avatars_local_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[allow_avatar_local]" value="1"<?php echo $avatars_local_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[allow_avatar_local]" value="0"<?php echo $avatars_local_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ALLOW_REMOTE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ALLOW_REMOTE_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="allow_avatar_remote" value="1"<?php echo $avatars_remote_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="allow_avatar_remote" value="0"<?php echo $avatars_remote_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[allow_avatar_remote]" value="1"<?php echo $avatars_remote_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[allow_avatar_remote]" value="0"<?php echo $avatars_remote_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ALLOW_UPLOAD']; ?>: </b></td> - <td class="row2"><input type="radio" name="allow_avatar_upload" value="1"<?php echo $avatars_upload_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="allow_avatar_upload" value="0"<?php echo $avatars_upload_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[allow_avatar_upload]" value="1"<?php echo $avatars_upload_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[allow_avatar_upload]" value="0"<?php echo $avatars_upload_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['MAX_FILESIZE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['MAX_FILESIZE_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="4" maxlength="10" name="avatar_filesize" value="<?php echo $new['avatar_filesize']; ?>" /> Bytes</td> + <td class="row2"><input class="post" type="text" size="4" maxlength="10" name="config[avatar_filesize]" value="<?php echo $new['avatar_filesize']; ?>" /> Bytes</td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['MIN_AVATAR_SIZE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['MIN_AVATAR_SIZE_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="avatar_min_height" value="<?php echo $new['avatar_min_height']; ?>" /> x <input class="post" type="text" size="3" maxlength="4" name="avatar_min_width" value="<?php echo $new['avatar_min_width']; ?>"></td> + <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="config[avatar_min_height]" value="<?php echo $new['avatar_min_height']; ?>" /> x <input class="post" type="text" size="3" maxlength="4" name="config[avatar_min_width]" value="<?php echo $new['avatar_min_width']; ?>"></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['MAX_AVATAR_SIZE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['MAX_AVATAR_SIZE_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="avatar_max_height" value="<?php echo $new['avatar_max_height']; ?>" /> x <input class="post" type="text" size="3" maxlength="4" name="avatar_max_width" value="<?php echo $new['avatar_max_width']; ?>"></td> + <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="config[avatar_max_height]" value="<?php echo $new['avatar_max_height']; ?>" /> x <input class="post" type="text" size="3" maxlength="4" name="config[avatar_max_width]" value="<?php echo $new['avatar_max_width']; ?>"></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['AVATAR_STORAGE_PATH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['AVATAR_STORAGE_PATH_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="20" maxlength="255" name="avatar_path" value="<?php echo $new['avatar_path']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="20" maxlength="255" name="config[avatar_path]" value="<?php echo $new['avatar_path']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['AVATAR_GALLERY_PATH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['AVATAR_GALLERY_PATH_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="20" maxlength="255" name="avatar_gallery_path" value="<?php echo $new['avatar_gallery_path']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="20" maxlength="255" name="config[avatar_gallery_path]" value="<?php echo $new['avatar_gallery_path']; ?>" /></td> </tr> <?php @@ -220,7 +214,7 @@ switch ($mode) $dst_yes = ($new['board_dst']) ? 'checked="checked"' : ''; $dst_no = (!$new['board_dst']) ? 'checked="checked"' : ''; - $yes_no_switches = array('override_user_style', 'allow_topic_notify', 'allow_forum_notify', 'allow_html', 'allow_bbcode', 'allow_smilies', 'allow_sig', 'allow_nocensors', 'allow_namechange', 'allow_attachments', 'allow_pm_attach', 'board_dst'); + $yes_no_switches = array('override_user_style', 'allow_privmsg', 'allow_topic_notify', 'allow_forum_notify', 'allow_html', 'allow_bbcode', 'allow_smilies', 'allow_sig', 'allow_nocensors', 'allow_namechange', 'allow_attachments', 'allow_pm_attach', 'board_dst'); foreach ($yes_no_switches as $switch) { @@ -232,83 +226,79 @@ switch ($mode) ?> <tr> <td class="row1" width="50%"><b><?php echo $user->lang['DEFAULT_STYLE']; ?></td> - <td class="row2"><select name="default_style"><?php echo $style_select; ?></select></td> + <td class="row2"><select name="config[default_style]"><?php echo $style_select; ?></select></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['OVERRIDE_STYLE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['OVERRIDE_STYLE_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="override_user_style" value="1" <?php echo $override_user_style_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="override_user_style" value="0" <?php echo $override_user_style_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[override_user_style]" value="1" <?php echo $override_user_style_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[override_user_style]" value="0" <?php echo $override_user_style_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['DEFAULT_LANGUAGE']; ?>: </b></td> - <td class="row2"><select name="default_lang"><?php echo $lang_select; ?></select></td> + <td class="row2"><select name="config[default_lang]"><?php echo $lang_select; ?></select></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['DEFAULT_DATE_FORMAT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['DEFAULT_DATE_FORMAT_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" name="default_dateformat" value="<?php echo $new['default_dateformat']; ?>" /></td> + <td class="row2"><input class="post" type="text" name="config[default_dateformat]" value="<?php echo $new['default_dateformat']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['SYSTEM_TIMEZONE']; ?>: </b></td> - <td class="row2"><select name="board_timezone"><?php echo $timezone_select; ?></select></td> + <td class="row2"><select name="config[board_timezone]"><?php echo $timezone_select; ?></select></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['SYSTEM_DST']; ?>: </b></td> - <td class="row2"><input type="radio" name="board_dst" value="1" <?php echo $board_dst_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="board_dst" value="0" <?php echo $board_dst_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[board_dst]" value="1" <?php echo $board_dst_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[board_dst]" value="0" <?php echo $board_dst_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> - <td class="row1"><b><?php echo $user->lang['BOXES_MAX']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['BOXES_MAX_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" maxlength="4" size="4" name="pm_max_boxes" value="<?php echo $new['pm_max_boxes']; ?>" /></td> - </tr> - <tr> - <td class="row1"><b><?php echo $user->lang['BOXES_LIMIT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['BOXES_LIMIT_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" maxlength="4" size="4" name="pm_max_msgs" value="<?php echo $new['pm_max_msgs']; ?>" /></td> + <td class="row1"><b><?php echo $user->lang['BOARD_PM']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['BOARD_PM_EXPLAIN']; ?></span></td> + <td class="row2"><input type="radio" name="config[allow_privmsg]" value="1" <?php echo $privmsg_yes; ?> /><?php echo $user->lang['ENABLED']; ?> <input type="radio" name="config[allow_privmsg]" value="0" <?php echo $privmsg_no; ?> /><?php echo $user->lang['DISABLED']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ALLOW_TOPIC_NOTIFY']; ?>: </b></td> - <td class="row2"><input type="radio" name="allow_topic_notify" value="1" <?php echo $topic_notify_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="allow_topic_notify" value="0" <?php echo $topic_notify_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[allow_topic_notify]" value="1" <?php echo $topic_notify_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[allow_topic_notify]" value="0" <?php echo $topic_notify_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ALLOW_FORUM_NOTIFY']; ?>: </b></td> - <td class="row2"><input type="radio" name="allow_forum_notify" value="1" <?php echo $forum_notify_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="allow_forum_notify" value="0" <?php echo $forum_notify_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[allow_forum_notify]" value="1" <?php echo $forum_notify_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[allow_forum_notify]" value="0" <?php echo $forum_notify_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ALLOW_NAME_CHANGE']; ?>: </b></td> - <td class="row2"><input type="radio" name="allow_namechange" value="1" <?php echo $namechange_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="allow_namechange" value="0" <?php echo $namechange_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[allow_namechange]" value="1" <?php echo $namechange_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[allow_namechange]" value="0" <?php echo $namechange_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ALLOW_ATTACHMENTS']; ?>: </b></td> - <td class="row2"><input type="radio" name="allow_attachments" value="1" <?php echo $attachments_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="allow_attachments" value="0" <?php echo $attachments_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[allow_attachments]" value="1" <?php echo $attachments_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[allow_attachments]" value="0" <?php echo $attachments_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ALLOW_PM_ATTACHMENTS']; ?>: </b></td> - <td class="row2"><input type="radio" name="allow_pm_attach" value="1" <?php echo $pm_attach_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="allow_pm_attach" value="0" <?php echo $pm_attach_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[allow_pm_attach]" value="1" <?php echo $pm_attach_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[allow_pm_attach]" value="0" <?php echo $pm_attach_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ALLOW_HTML']; ?>: </b></td> - <td class="row2"><input type="radio" name="allow_html" value="1" <?php echo $html_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="allow_html" value="0" <?php echo $html_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[allow_html]" value="1" <?php echo $html_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[allow_html]" value="0" <?php echo $html_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ALLOWED_TAGS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ALLOWED_TAGS_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="30" maxlength="255" name="allow_html_tags" value="<?php echo $new['allow_html_tags']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="30" maxlength="255" name="config[allow_html_tags]" value="<?php echo $new['allow_html_tags']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ALLOW_BBCODE']; ?>: </b></td> - <td class="row2"><input type="radio" name="allow_bbcode" value="1" <?php echo $bbcode_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="allow_bbcode" value="0" <?php echo $bbcode_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[allow_bbcode]" value="1" <?php echo $bbcode_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[allow_bbcode]" value="0" <?php echo $bbcode_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ALLOW_SMILIES']; ?>: </b></td> - <td class="row2"><input type="radio" name="allow_smilies" value="1" <?php echo $smilies_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="allow_smilies" value="0" <?php echo $smilies_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[allow_smilies]" value="1" <?php echo $smilies_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[allow_smilies]" value="0" <?php echo $smilies_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ALLOW_SIG']; ?>: </b></td> - <td class="row2"><input type="radio" name="allow_sig" value="1" <?php echo $sig_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="allow_sig" value="0" <?php echo $sig_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[allow_sig]" value="1" <?php echo $sig_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[allow_sig]" value="0" <?php echo $sig_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['MAX_SIG_LENGTH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['MAX_SIG_LENGTH_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="5" maxlength="4" name="max_sig_chars" value="<?php echo $new['max_sig_chars']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="5" maxlength="4" name="config[max_sig_chars]" value="<?php echo $new['max_sig_chars']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ALLOW_NO_CENSORS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ALLOW_NO_CENSORS_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="allow_nocensors" value="1" <?php echo $nocensors_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="allow_nocensors" value="0" <?php echo $nocensors_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[allow_nocensors]" value="1" <?php echo $nocensors_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[allow_nocensors]" value="0" <?php echo $nocensors_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <?php @@ -316,7 +306,7 @@ switch ($mode) case 'setting': - $yes_no_switches = array('board_disable', 'enable_confirm', 'coppa_enable', 'privmsg_disable', 'display_last_edited', 'emailreuse'); + $yes_no_switches = array('board_disable', 'enable_confirm', 'coppa_enable', 'display_last_edited', 'allow_emailreuse'); foreach ($yes_no_switches as $switch) { @@ -330,14 +320,11 @@ switch ($mode) $activation_admin = ($new['require_activation'] == USER_ACTIVATION_ADMIN) ? 'checked="checked"' : ''; $activation_disable = ($new['require_activation'] == USER_ACTIVATION_DISABLE) ? 'checked="checked"' : ''; - preg_match('#^([0-9]+)([m|h|d])$#', $new['bump_interval'], $match); - $bump_time = $match[1]; - $s_bump_type = ''; $types = array('m' => 'MINUTES', 'h' => 'HOURS', 'd' => 'DAYS'); foreach ($types as $type => $lang) { - $selected = ($type == $match[2]) ? 'selected="selected" ' : ''; + $selected = ($new['bump_type'] == $type) ? 'selected="selected" ' : ''; $s_bump_type .= '<option value="' . $type . '" ' . $selected . '>' . $user->lang[$lang] . '</option>'; } @@ -353,118 +340,114 @@ switch ($mode) $pass_char_options = ''; foreach ($pass_type_ary as $lang => $value) { - $selected = ($new['allow_pass_chars'] == $value) ? ' selected="selected"' : ''; + $selected = ($new['pass_complex'] == $value) ? ' selected="selected"' : ''; $pass_char_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$lang] . '</option>'; } ?> <tr> <td class="row1" width="50%"><b><?php echo $user->lang['SITE_NAME']; ?>: </b></td> - <td class="row2"><input class="post" type="text" size="40" maxlength="255" name="sitename" value="<?php echo $new['sitename']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="40" maxlength="255" name="config[sitename]" value="<?php echo $new['sitename']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['SITE_DESC']; ?>: </b></td> - <td class="row2"><input class="post" type="text" size="40" maxlength="255" name="site_desc" value="<?php echo $new['site_desc']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="40" maxlength="255" name="config[site_desc]" value="<?php echo $new['site_desc']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['DISABLE_BOARD']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['DISABLE_BOARD_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="board_disable" value="1" <?php echo $board_disable_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="board_disable" value="0" <?php echo $board_disable_no; ?> /> <?php echo $user->lang['NO']; ?><br /><input class="post" type="text" name="board_disable_msg" maxlength="255" size="40" value="<?php echo $new['board_disable_msg']; ?>" /></td> + <td class="row2"><input type="radio" name="config[board_disable]" value="1" <?php echo $board_disable_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[board_disable]" value="0" <?php echo $board_disable_no; ?> /> <?php echo $user->lang['NO']; ?><br /><input class="post" type="text" name="config[board_disable_msg]" maxlength="255" size="40" value="<?php echo $new['board_disable_msg']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ACC_ACTIVATION']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ACC_ACTIVATION_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="require_activation" value="<?php echo USER_ACTIVATION_NONE; ?>" <?php echo $activation_none; ?> /> <?php echo $user->lang['ACC_NONE']; ?><?php if ($config['email_enable']) { ?> <input type="radio" name="require_activation" value="<?php echo USER_ACTIVATION_SELF; ?>" <?php echo $activation_user; ?> /> <?php echo $user->lang['ACC_USER']; ?> <input type="radio" name="require_activation" value="<?php echo USER_ACTIVATION_ADMIN; ?>" <?php echo $activation_admin; ?> /> <?php echo $user->lang['ACC_ADMIN']; ?><?php } ?> <input type="radio" name="require_activation" value="<?php echo USER_ACTIVATION_DISABLE; ?>" <?php echo $activation_disable; ?> /> <?php echo $user->lang['ACC_DISABLE']; ?></td> + <td class="row2"><input type="radio" name="config[require_activation]" value="<?php echo USER_ACTIVATION_NONE; ?>" <?php echo $activation_none; ?> /> <?php echo $user->lang['ACC_NONE']; ?><?php if ($config['email_enable']) { ?> <input type="radio" name="config[require_activation]" value="<?php echo USER_ACTIVATION_SELF; ?>" <?php echo $activation_user; ?> /> <?php echo $user->lang['ACC_USER']; ?> <input type="radio" name="config[require_activation]" value="<?php echo USER_ACTIVATION_ADMIN; ?>" <?php echo $activation_admin; ?> /> <?php echo $user->lang['ACC_ADMIN']; ?><?php } ?> <input type="radio" name="config[require_activation]" value="<?php echo USER_ACTIVATION_DISABLE; ?>" <?php echo $activation_disable; ?> /> <?php echo $user->lang['ACC_DISABLE']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ENABLE_COPPA']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ENABLE_COPPA_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="coppa_enable" value="1" <?php echo $enable_confirm_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="coppa_enable" value="0" <?php echo $enable_confirm_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[coppa_enable]" value="1" <?php echo $enable_confirm_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[coppa_enable]" value="0" <?php echo $enable_confirm_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['COPPA_FAX']; ?>: </b></td> - <td class="row2"><input class="post" type="text" size="25" maxlength="100" name="coppa_fax" value="<?php echo $new['coppa_fax']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="25" maxlength="100" name="config[coppa_fax]" value="<?php echo $new['coppa_fax']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['COPPA_MAIL']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['COPPA_MAIL_EXPLAIN']; ?></span></td> - <td class="row2"><textarea name="coppa_mail" rows="5" cols="40"><?php echo $new['coppa_mail']; ?></textarea></td> + <td class="row2"><textarea name="config[coppa_mail]" rows="5" cols="40"><?php echo $new['coppa_mail']; ?></textarea></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['VISUAL_CONFIRM']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['VISUAL_CONFIRM_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="enable_confirm" value="1"<?php echo $enable_confirm_yes ?> /> <?php echo $user->lang['YES'] ?> <input type="radio" name="enable_confirm" value="0" <?php echo $enable_confirm_no ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[enable_confirm]" value="1"<?php echo $enable_confirm_yes ?> /> <?php echo $user->lang['YES'] ?> <input type="radio" name="config[enable_confirm]" value="0" <?php echo $enable_confirm_no ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['REG_LIMIT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['REG_LIMIT_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" maxlength="4" size="4" name="max_reg_attempts" value="<?php echo $new['max_reg_attempts']; ?>" /></td> + <td class="row2"><input class="post" type="text" maxlength="4" size="4" name="config[max_reg_attempts]" value="<?php echo $new['max_reg_attempts']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['USERNAME_LENGTH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['USERNAME_LENGTH_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="3" maxlength="3" name="min_name_chars" value="<?php echo $new['min_name_chars']; ?>" /> <?php echo $user->lang['MIN_CHARS']; ?> <input class="post" type="text" size="3" maxlength="3" name="max_name_chars" value="<?php echo $new['max_name_chars']; ?>" /> <?php echo $user->lang['MAX_CHARS']; ?></td> + <td class="row2"><input class="post" type="text" size="3" maxlength="3" name="config[min_name_chars]" value="<?php echo $new['min_name_chars']; ?>" /> <?php echo $user->lang['MIN_CHARS']; ?> <input class="post" type="text" size="3" maxlength="3" name="config[max_name_chars]" value="<?php echo $new['max_name_chars']; ?>" /> <?php echo $user->lang['MAX_CHARS']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['USERNAME_CHARS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['USERNAME_CHARS_EXPLAIN']; ?></span></td> - <td class="row2"><select name="allow_name_chars"><?php echo $user_char_options; ?></select></td> + <td class="row2"><select name="config[allow_name_chars]"><?php echo $user_char_options; ?></select></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['PASSWORD_LENGTH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['PASSWORD_LENGTH_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="3" maxlength="3" name="min_pass_chars" value="<?php echo $new['min_pass_chars']; ?>" /> <?php echo $user->lang['MIN_CHARS']; ?> <input class="post" type="text" size="3" maxlength="3" name="max_pass_chars" value="<?php echo $new['max_pass_chars']; ?>" /> <?php echo $user->lang['MAX_CHARS']; ?></td> + <td class="row2"><input class="post" type="text" size="3" maxlength="3" name="config[min_pass_chars]" value="<?php echo $new['min_pass_chars']; ?>" /> <?php echo $user->lang['MIN_CHARS']; ?> <input class="post" type="text" size="3" maxlength="3" name="config[max_pass_chars]" value="<?php echo $new['max_pass_chars']; ?>" /> <?php echo $user->lang['MAX_CHARS']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['PASSWORD_TYPE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['PASSWORD_TYPE_EXPLAIN']; ?></span></td> - <td class="row2"><select name="pass_complex"><?php echo $pass_char_options; ?></select></td> + <td class="row2"><select name="config[pass_complex]"><?php echo $pass_char_options; ?></select></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['FORCE_PASS_CHANGE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['FORCE_PASS_CHANGE_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="3" maxlength="3" name="chg_passforce" value="<?php echo $new['chg_passforce']; ?>" /> <?php echo $user->lang['DAYS']; ?></td> + <td class="row2"><input class="post" type="text" size="3" maxlength="3" name="config[chg_passforce]" value="<?php echo $new['chg_passforce']; ?>" /> <?php echo $user->lang['DAYS']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ALLOW_EMAIL_REUSE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ALLOW_EMAIL_REUSE_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="allow_emailreuse" value="1" <?php echo $emailreuse_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="allow_emailreuse" value="0" <?php echo $emailreuse_no; ?> /> <?php echo $user->lang['NO']; ?></td> - </tr> - <tr> - <td class="row1"><b><?php echo $user->lang['BOARD_PM']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['BOARD_PM_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="privmsg_disable" value="0" <?php echo $privmsg_disable_no; ?> /><?php echo $user->lang['ENABLED']; ?> <input type="radio" name="privmsg_disable" value="1" <?php echo $privmsg_disable_yes; ?> /><?php echo $user->lang['DISABLED']; ?></td> + <td class="row2"><input type="radio" name="config[allow_emailreuse]" value="1" <?php echo $emailreuse_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[allow_emailreuse]" value="0" <?php echo $emailreuse_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['EDIT_TIME']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['EDIT_TIME_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" maxlength="3" size="3" name="edit_time" value="<?php echo $new['edit_time']; ?>" /></td> + <td class="row2"><input class="post" type="text" maxlength="3" size="3" name="config[edit_time]" value="<?php echo $new['edit_time']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['DISPLAY_LAST_EDITED']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['DISPLAY_LAST_EDITED_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="display_last_edited" value="1" <?php echo $display_last_edited_yes; ?> /><?php echo $user->lang['YES']; ?> <input type="radio" name="display_last_edited" value="0" <?php echo $display_last_edited_no; ?> /><?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[display_last_edited]" value="1" <?php echo $display_last_edited_yes; ?> /><?php echo $user->lang['YES']; ?> <input type="radio" name="config[display_last_edited]" value="0" <?php echo $display_last_edited_no; ?> /><?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['FLOOD_INTERVAL']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['FLOOD_INTERVAL_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="flood_interval" value="<?php echo $new['flood_interval']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="config[flood_interval]" value="<?php echo $new['flood_interval']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['BUMP_INTERVAL']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['BUMP_INTERVAL_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="bump_interval" value="<?php echo $bump_time ?>" /> <select name="bump_type"><?php echo $s_bump_type; ?></select></td> + <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="config[bump_interval]" value="<?php echo $new['bump_interval'] ?>" /> <select name="config[bump_type]"><?php echo $s_bump_type; ?></select></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['TOPICS_PER_PAGE']; ?>: </b></td> - <td class="row2"><input class="post" type="text" name="topics_per_page" size="3" maxlength="4" value="<?php echo $new['topics_per_page']; ?>" /></td> + <td class="row2"><input class="post" type="text" name="config[topics_per_page]" size="3" maxlength="4" value="<?php echo $new['topics_per_page']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['POSTS_PER_PAGE']; ?>: </b></td> - <td class="row2"><input class="post" type="text" name="posts_per_page" size="3" maxlength="4" value="<?php echo $new['posts_per_page']; ?>" /></td> + <td class="row2"><input class="post" type="text" name="config[posts_per_page]" size="3" maxlength="4" value="<?php echo $new['posts_per_page']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['HOT_THRESHOLD']; ?>: </b></td> - <td class="row2"><input class="post" type="text" name="hot_threshold" size="3" maxlength="4" value="<?php echo $new['hot_threshold']; ?>" /></td> + <td class="row2"><input class="post" type="text" name="config[hot_threshold]" size="3" maxlength="4" value="<?php echo $new['hot_threshold']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['MAX_POLL_OPTIONS']; ?>: </b></td> - <td class="row2"><input class="post" type="text" name="max_poll_options" size="4" maxlength="4" value="<?php echo $new['max_poll_options']; ?>" /></td> + <td class="row2"><input class="post" type="text" name="config[max_poll_options]" size="4" maxlength="4" value="<?php echo $new['max_poll_options']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['CHAR_LIMIT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['CHAR_LIMIT_EXPLAIN']; ?></span</td> - <td class="row2"><input class="post" type="text" size="4" maxlength="6" name="max_post_chars" value="<?php echo $new['max_post_chars']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="4" maxlength="6" name="config[max_post_chars]" value="<?php echo $new['max_post_chars']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['SMILIES_LIMIT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SMILIES_LIMIT_EXPLAIN']; ?></span</td> - <td class="row2"><input class="post" type="text" size="4" maxlength="4" name="max_post_smilies" value="<?php echo $new['max_post_smilies']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="4" maxlength="4" name="config[max_post_smilies]" value="<?php echo $new['max_post_smilies']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['QUOTE_DEPTH_LIMIT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['QUOTE_DEPTH_LIMIT_EXPLAIN']; ?></span</td> - <td class="row2"><input class="post" type="text" size="4" maxlength="4" name="max_quote_depth" value="<?php echo $new['max_quote_depth']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="4" maxlength="4" name="config[max_quote_depth]" value="<?php echo $new['max_quote_depth']; ?>" /></td> </tr> <?php @@ -491,55 +474,55 @@ switch ($mode) ?> <tr> <td class="row1" width="50%"><b><?php echo $user->lang['ENABLE_EMAIL']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ENABLE_EMAIL_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="email_enable" value="1" <?php echo $email_yes; ?> /> <?php echo $user->lang['ENABLED']; ?> <input type="radio" name="email_enable" value="0" <?php echo $email_no; ?> /> <?php echo $user->lang['DISABLED']; ?></td> + <td class="row2"><input type="radio" name="config[email_enable]" value="1" <?php echo $email_yes; ?> /> <?php echo $user->lang['ENABLED']; ?> <input type="radio" name="config[email_enable]" value="0" <?php echo $email_no; ?> /> <?php echo $user->lang['DISABLED']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['BOARD_EMAIL_FORM']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['BOARD_EMAIL_FORM_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="board_email_form" value="1" <?php echo $board_email_form_yes; ?> /> <?php echo $user->lang['ENABLED']; ?> <input type="radio" name="board_email_form" value="0" <?php echo $board_email_form_no; ?> /> <?php echo $user->lang['DISABLED']; ?></td> + <td class="row2"><input type="radio" name="config[board_email_form]" value="1" <?php echo $board_email_form_yes; ?> /> <?php echo $user->lang['ENABLED']; ?> <input type="radio" name="config[board_email_form]" value="0" <?php echo $board_email_form_no; ?> /> <?php echo $user->lang['DISABLED']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['EMAIL_FUNCTION_NAME']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['EMAIL_FUNCTION_NAME_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="20" maxlength="50" name="email_function_name" value="<?php echo $new['email_function_name']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="20" maxlength="50" name="config[email_function_name]" value="<?php echo $new['email_function_name']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['EMAIL_PACKAGE_SIZE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['EMAIL_PACKAGE_SIZE_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="5" maxlength="5" name="email_package_size" value="<?php echo $new['email_package_size']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="5" maxlength="5" name="config[email_package_size]" value="<?php echo $new['email_package_size']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['CONTACT_EMAIL']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['CONTACT_EMAIL_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="25" maxlength="100" name="board_contact" value="<?php echo $new['board_contact']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="25" maxlength="100" name="config[board_contact]" value="<?php echo $new['board_contact']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ADMIN_EMAIL']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ADMIN_EMAIL_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="25" maxlength="100" name="board_email" value="<?php echo $new['board_email']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="25" maxlength="100" name="config[board_email]" value="<?php echo $new['board_email']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['EMAIL_SIG']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['EMAIL_SIG_EXPLAIN']; ?></span></td> - <td class="row2"><textarea name="board_email_sig" rows="5" cols="30"><?php echo $new['board_email_sig']; ?></textarea></td> + <td class="row2"><textarea name="config[board_email_sig]" rows="5" cols="30"><?php echo $new['board_email_sig']; ?></textarea></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['USE_SMTP']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['USE_SMTP_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="smtp_delivery" value="1" <?php echo $smtp_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="smtp_delivery" value="0" <?php echo $smtp_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[smtp_delivery]" value="1" <?php echo $smtp_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[smtp_delivery]" value="0" <?php echo $smtp_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['SMTP_SERVER']; ?>: </b></td> - <td class="row2"><input class="post" type="text" name="smtp_host" value="<?php echo $new['smtp_host']; ?>" size="25" maxlength="50" /></td> + <td class="row2"><input class="post" type="text" name="config[smtp_host]" value="<?php echo $new['smtp_host']; ?>" size="25" maxlength="50" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['SMTP_PORT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SMTP_PORT_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" name="smtp_port" value="<?php echo $new['smtp_port']; ?>" size="4" maxlength="5" /></td> + <td class="row2"><input class="post" type="text" name="config[smtp_port]" value="<?php echo $new['smtp_port']; ?>" size="4" maxlength="5" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['SMTP_AUTH_METHOD']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SMTP_AUTH_METHOD_EXPLAIN']; ?></span></td> - <td class="row2"><select name="smtp_auth_method"><?php echo $s_smtp_auth_options; ?></select></td> + <td class="row2"><select name="config[smtp_auth_method]"><?php echo $s_smtp_auth_options; ?></select></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['SMTP_USERNAME']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SMTP_USERNAME_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" name="smtp_username" value="<?php echo $new['smtp_username']; ?>" size="25" maxlength="255" /></td> + <td class="row2"><input class="post" type="text" name="config[smtp_username]" value="<?php echo $new['smtp_username']; ?>" size="25" maxlength="255" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['SMTP_PASSWORD']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SMTP_PASSWORD_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="password" name="smtp_password" value="<?php echo $new['smtp_password']; ?>" size="25" maxlength="255" /></td> + <td class="row2"><input class="post" type="password" name="config[smtp_password]" value="<?php echo $new['smtp_password']; ?>" size="25" maxlength="255" /></td> </tr> <?php @@ -560,43 +543,43 @@ switch ($mode) ?> <tr> <td class="row1" width="50%"><b><?php echo $user->lang['SERVER_NAME']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SERVER_NAME_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" maxlength="255" size="40" name="server_name" value="<?php echo $new['server_name']; ?>" /></td> + <td class="row2"><input class="post" type="text" maxlength="255" size="40" name="config[server_name]" value="<?php echo $new['server_name']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['SERVER_PORT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SERVER_PORT_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" maxlength="5" size="5" name="server_port" value="<?php echo $new['server_port']; ?>" /></td> + <td class="row2"><input class="post" type="text" maxlength="5" size="5" name="config[server_port]" value="<?php echo $new['server_port']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['SCRIPT_PATH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SCRIPT_PATH_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" maxlength="255" name="script_path" value="<?php echo $new['script_path']; ?>" /></td> + <td class="row2"><input class="post" type="text" maxlength="255" name="config[script_path]" value="<?php echo $new['script_path']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['IP_VALID']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['IP_VALID_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="ip_check" value="4" <?php echo $ip_all; ?> /> <?php echo $user->lang['ALL']; ?> <input type="radio" name="ip_check" value="3" <?php echo $ip_classc; ?> /> <?php echo $user->lang['CLASS_C']; ?> <input type="radio" name="ip_check" value="2" <?php echo $ip_classb; ?> /> <?php echo $user->lang['CLASS_B']; ?> <input type="radio" name="ip_check" value="0" <?php echo $ip_none; ?> /> <?php echo $user->lang['NONE']; ?> </td> + <td class="row2"><input type="radio" name="config[ip_check]" value="4" <?php echo $ip_all; ?> /> <?php echo $user->lang['ALL']; ?> <input type="radio" name="config[ip_check]" value="3" <?php echo $ip_classc; ?> /> <?php echo $user->lang['CLASS_C']; ?> <input type="radio" name="config[ip_check]" value="2" <?php echo $ip_classb; ?> /> <?php echo $user->lang['CLASS_B']; ?> <input type="radio" name="config[ip_check]" value="0" <?php echo $ip_none; ?> /> <?php echo $user->lang['NONE']; ?> </td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['BROWSER_VALID']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['BROWSER_VALID_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="browser_check" value="1" <?php echo $browser_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="browser_check" value="0" <?php echo $browser_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[browser_check]" value="1" <?php echo $browser_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[browser_check]" value="0" <?php echo $browser_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ENABLE_GZIP']; ?>: </b></td> - <td class="row2"><input type="radio" name="gzip_compress" value="1" <?php echo $gzip_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="gzip_compress" value="0" <?php echo $gzip_no; ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[gzip_compress]" value="1" <?php echo $gzip_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[gzip_compress]" value="0" <?php echo $gzip_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['SMILIES_PATH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SMILIES_PATH_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="20" maxlength="255" name="smilies_path" value="<?php echo $new['smilies_path']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="20" maxlength="255" name="config[smilies_path]" value="<?php echo $new['smilies_path']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ICONS_PATH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ICONS_PATH_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="20" maxlength="255" name="icons_path" value="<?php echo $new['icons_path']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="20" maxlength="255" name="config[icons_path]" value="<?php echo $new['icons_path']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['UPLOAD_ICONS_PATH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['UPLOAD_ICONS_PATH_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="20" maxlength="255" name="upload_icons_path" value="<?php echo $new['upload_icons_path']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="20" maxlength="255" name="config[upload_icons_path]" value="<?php echo $new['upload_icons_path']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['RANKS_PATH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['RANKS_PATH_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="20" maxlength="255" name="ranks_path" value="<?php echo $new['ranks_path']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="20" maxlength="255" name="config[ranks_path]" value="<?php echo $new['ranks_path']; ?>" /></td> </tr> <?php @@ -630,75 +613,168 @@ switch ($mode) ?> <tr> <td class="row1" width="50%"><b><?php echo $user->lang['LIMIT_LOAD']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['LIMIT_LOAD_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="4" maxlength="4" name="limit_load" value="<?php echo $new['limit_load']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="4" maxlength="4" name="config[limit_load]" value="<?php echo $new['limit_load']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['SESSION_LENGTH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SESSION_LENGTH_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" maxlength="5" size="5" name="session_length" value="<?php echo $new['session_length']; ?>" /></td> + <td class="row2"><input class="post" type="text" maxlength="5" size="5" name="config[session_length]" value="<?php echo $new['session_length']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['LIMIT_SESSIONS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['LIMIT_SESSIONS_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="4" maxlength="4" name="active_sessions" value="<?php echo $new['active_sessions']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="4" maxlength="4" name="config[active_sessions]" value="<?php echo $new['active_sessions']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['YES_POST_MARKING']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['YES_POST_MARKING_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="load_db_track" value="1"<?php echo $load_db_track_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="load_db_track" value="0" <?php echo $load_db_track_no ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[load_db_track]" value="1"<?php echo $load_db_track_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="config[load_db_track]" value="0" <?php echo $load_db_track_no ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['YES_READ_MARKING']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['YES_READ_MARKING_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="load_db_lastread" value="1"<?php echo $load_db_lastread_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="load_db_lastread" value="0" <?php echo $load_db_lastread_no ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[load_db_lastread]" value="1"<?php echo $load_db_lastread_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="config[load_db_lastread]" value="0" <?php echo $load_db_lastread_no ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['YES_ONLINE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['YES_ONLINE_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="load_online" value="1"<?php echo $load_online_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="load_online" value="0" <?php echo $load_online_no ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[load_online]" value="1"<?php echo $load_online_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="config[load_online]" value="0" <?php echo $load_online_no ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['YES_ONLINE_TRACK']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['YES_ONLINE_TRACK_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="load_onlinetrack" value="1"<?php echo $load_onlinetrack_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="load_onlinetrack" value="0" <?php echo $load_onlinetrack_no ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[load_onlinetrack]" value="1"<?php echo $load_onlinetrack_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="config[load_onlinetrack]" value="0" <?php echo $load_onlinetrack_no ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['ONLINE_LENGTH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ONLINE_LENGTH_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="4" maxlength="3" name="load_online_time" value="<?php echo $new['load_online_time']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="4" maxlength="3" name="config[load_online_time]" value="<?php echo $new['load_online_time']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['YES_BIRTHDAYS']; ?>: </b></td> - <td class="row2"><input type="radio" name="load_birthdays" value="1"<?php echo $load_birthdays_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="load_birthdays" value="0" <?php echo $load_birthdays_no ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[load_birthdays]" value="1"<?php echo $load_birthdays_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="config[load_birthdays]" value="0" <?php echo $load_birthdays_no ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['YES_MODERATORS']; ?>: </b></td> - <td class="row2"><input type="radio" name="load_moderators" value="1"<?php echo $moderators_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="load_moderators" value="0" <?php echo $moderators_no ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[load_moderators]" value="1"<?php echo $moderators_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="config[load_moderators]" value="0" <?php echo $moderators_no ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['YES_JUMPBOX']; ?>: </b></td> - <td class="row2"><input type="radio" name="load_jumpbox" value="1"<?php echo $jumpbox_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="load_jumpbox" value="0" <?php echo $jumpbox_no ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[load_jumpbox]" value="1"<?php echo $jumpbox_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="config[load_jumpbox]" value="0" <?php echo $jumpbox_no ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['YES_SEARCH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['YES_SEARCH_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="load_search" value="1"<?php echo $search_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="load_search" value="0" <?php echo $search_no ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[load_search]" value="1"<?php echo $search_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="config[load_search]" value="0" <?php echo $search_no ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['SEARCH_INTERVAL']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SEARCH_INTERVAL_EXPLAIN']; ?></span></td> - <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="search_interval" value="<?php echo $new['search_interval']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="config[search_interval]" value="<?php echo $new['search_interval']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['MIN_SEARCH_CHARS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['MIN_SEARCH_CHARS_EXPLAIN']; ?></span</td> - <td class="row2"><input class="post" type="text" size="3" maxlength="3" name="min_search_chars" value="<?php echo $new['min_search_chars']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="3" maxlength="3" name="config[min_search_chars]" value="<?php echo $new['min_search_chars']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['MAX_SEARCH_CHARS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['MAX_SEARCH_CHARS_EXPLAIN']; ?></span</td> - <td class="row2"><input class="post" type="text" size="3" maxlength="3" name="max_search_chars" value="<?php echo $new['max_search_chars']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="3" maxlength="3" name="config[max_search_chars]" value="<?php echo $new['max_search_chars']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['YES_SEARCH_UPDATE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['YES_SEARCH_UPDATE_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="load_search_upd" value="1"<?php echo $search_update_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="load_search_upd" value="0" <?php echo $search_update_no ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[load_search_upd]" value="1"<?php echo $search_update_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="config[load_search_upd]" value="0" <?php echo $search_update_no ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <!--tr> <td class="row1"><b><?php echo $user->lang['YES_SEARCH_PHRASE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['YES_SEARCH_PHRASE_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="load_search_phr" value="1"<?php echo $search_phrase_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="load_search_phr" value="0" <?php echo $search_phrase_no ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[load_search_phr]" value="1"<?php echo $search_phrase_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="config[load_search_phr]" value="0" <?php echo $search_phrase_no ?> /> <?php echo $user->lang['NO']; ?></td> </tr--> <tr> <td class="row1"><b><?php echo $user->lang['RECOMPILE_TEMPLATES']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['RECOMPILE_TEMPLATES_EXPLAIN']; ?></span></td> - <td class="row2"><input type="radio" name="load_tplcompile" value="1"<?php echo $tplcompile_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="load_tplcompile" value="0" <?php echo $tplcompile_no ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[load_tplcompile]" value="1"<?php echo $tplcompile_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="config[load_tplcompile]" value="0" <?php echo $tplcompile_no ?> /> <?php echo $user->lang['NO']; ?></td> + </tr> +<?php + + break; + + case 'message': + + $yes_no_switches = array('auth_html_pm', 'auth_bbcode_pm', 'auth_smilies_pm', 'auth_download_pm', 'allow_sig_pm', 'enable_karma_pm', 'auth_report_pm', 'auth_quote_pm', 'print_pm', 'email_pm', 'forward_pm', 'auth_img_pm', 'auth_flash_pm', 'enable_pm_icons', 'allow_mass_pm'); + + foreach ($yes_no_switches as $switch) + { + $switch_var = str_replace(array('allow_', 'auth_'), array('', ''), $switch); + ${$switch_var . '_yes'} = ($new[$switch]) ? ' checked="checked"' : ''; + ${$switch_var . '_no'} = (!$new[$switch]) ? ' checked="checked"' : ''; + } + +?> + + <tr> + <td class="row1"><b><?php echo $user->lang['BOXES_MAX']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['BOXES_MAX_EXPLAIN']; ?></span></td> + <td class="row2"><input class="post" type="text" maxlength="4" size="4" name="config[pm_max_boxes]" value="<?php echo $new['pm_max_boxes']; ?>" /></td> + </tr> + <tr> + <td class="row1"><b><?php echo $user->lang['BOXES_LIMIT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['BOXES_LIMIT_EXPLAIN']; ?></span></td> + <td class="row2"><input class="post" type="text" maxlength="4" size="4" name="config[pm_max_msgs]" value="<?php echo $new['pm_max_msgs']; ?>" /></td> + </tr> + <tr> + <td class="row1"><b><?php echo $user->lang['FULL_FOLDER_ACTION']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['FULL_FOLDER_ACTION_EXPLAIN']; ?></span></td> + <td class="row2"><select name="config[full_folder_action]"><option value="1"><?php echo $user->lang['DELETE_OLD_MESSAGES']; ?></option><option value="2"><?php echo $user->lang['HOLD_NEW_MESSAGES']; ?></option></select></td> + </tr> + <tr> + <td class="row1"><b><?php echo $user->lang['PM_EDIT_TIME']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['PM_EDIT_TIME_EXPLAIN']; ?></span></td> + <td class="row2"><input class="post" type="text" maxlength="3" size="3" name="config[pm_edit_time]" value="<?php echo $new['pm_edit_time']; ?>" /></td> + </tr> + <tr> + <td class="row1"><b><?php echo $user->lang['ALLOW_MASS_PM']; ?>: </b></td> + <td class="row2"><input type="radio" name="config[allow_mass_pm]" value="1" <?php echo $mass_pm_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[allow_mass_pm]" value="0" <?php echo $mass_pm_no; ?> /> <?php echo $user->lang['NO']; ?></td> + </tr> + <tr> + <td class="row1"><b><?php echo $user->lang['ALLOW_HTML_PM']; ?>: </b></td> + <td class="row2"><input type="radio" name="config[auth_html_pm]" value="1" <?php echo $html_pm_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[auth_html_pm]" value="0" <?php echo $html_pm_no; ?> /> <?php echo $user->lang['NO']; ?></td> + </tr> + <tr> + <td class="row1"><b><?php echo $user->lang['ALLOW_BBCODE_PM']; ?>: </b></td> + <td class="row2"><input type="radio" name="config[auth_bbcode_pm]" value="1" <?php echo $bbcode_pm_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[auth_bbcode_pm]" value="0" <?php echo $bbcode_pm_no; ?> /> <?php echo $user->lang['NO']; ?></td> + </tr> + <tr> + <td class="row1"><b><?php echo $user->lang['ALLOW_SMILIES_PM']; ?>: </b></td> + <td class="row2"><input type="radio" name="config[auth_smilies_pm]" value="1" <?php echo $smilies_pm_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[auth_smilies_pm]" value="0" <?php echo $smilies_pm_no; ?> /> <?php echo $user->lang['NO']; ?></td> + </tr> + <tr> + <td class="row1"><b><?php echo $user->lang['AUTH_DOWNLOAD_PM']; ?>: </b></td> + <td class="row2"><input type="radio" name="config[auth_download_pm]" value="1" <?php echo $download_pm_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[auth_download_pm]" value="0" <?php echo $download_pm_no; ?> /> <?php echo $user->lang['NO']; ?></td> + </tr> + <tr> + <td class="row1"><b><?php echo $user->lang['ALLOW_SIG_PM']; ?>: </b></td> + <td class="row2"><input type="radio" name="config[allow_sig_pm]" value="1" <?php echo $sig_pm_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[allow_sig_pm]" value="0" <?php echo $sig_pm_no; ?> /> <?php echo $user->lang['NO']; ?></td> + </tr> +<!-- <tr> + <td class="row1" width="50%"><?php echo $user->lang['ENABLE_KARMA_PM']; ?>: </td> + <td class="row2"><input type="radio" name="config[enable_karma_pm]" value="1"<?php echo $enable_karma_pm_yes ?> /> <?php echo $user->lang['YES'] ?> <input type="radio" name="config[enable_karma_pm]" value="0" <?php echo $enable_karma_pm_no ?> /> <?php echo $user->lang['NO']; ?></td> + </tr>//--> + <tr> + <td class="row1"><b><?php echo $user->lang['AUTH_REPORT_PM']; ?>: </b></td> + <td class="row2"><input type="radio" name="config[auth_report_pm]" value="1" <?php echo $report_pm_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[auth_report_pm]" value="0" <?php echo $report_pm_no; ?> /> <?php echo $user->lang['NO']; ?></td> + </tr> + <tr> + <td class="row1"><b><?php echo $user->lang['AUTH_QUOTE_PM']; ?>: </b></td> + <td class="row2"><input type="radio" name="config[auth_quote_pm]" value="1" <?php echo $quote_pm_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[auth_quote_pm]" value="0" <?php echo $quote_pm_no; ?> /> <?php echo $user->lang['NO']; ?></td> + </tr> + <tr> + <td class="row1"><b><?php echo $user->lang['PRINT_PM']; ?>: </b></td> + <td class="row2"><input type="radio" name="config[print_pm]" value="1" <?php echo $print_pm_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[print_pm]" value="0" <?php echo $print_pm_no; ?> /> <?php echo $user->lang['NO']; ?></td> + </tr> + <tr> + <td class="row1"><b><?php echo $user->lang['EMAIL_PM']; ?>: </b></td> + <td class="row2"><input type="radio" name="config[email_pm]" value="1" <?php echo $email_pm_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[email_pm]" value="0" <?php echo $email_pm_no; ?> /> <?php echo $user->lang['NO']; ?></td> + </tr> + <tr> + <td class="row1"><b><?php echo $user->lang['FORWARD_PM']; ?>: </b></td> + <td class="row2"><input type="radio" name="config[forward_pm]" value="1" <?php echo $forward_pm_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[forward_pm]" value="0" <?php echo $forward_pm_no; ?> /> <?php echo $user->lang['NO']; ?></td> + </tr> + <tr> + <td class="row1"><b><?php echo $user->lang['AUTH_IMG_PM']; ?>: </b></td> + <td class="row2"><input type="radio" name="config[auth_img_pm]" value="1" <?php echo $img_pm_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[auth_img_pm]" value="0" <?php echo $img_pm_no; ?> /> <?php echo $user->lang['NO']; ?></td> + </tr> + <tr> + <td class="row1"><b><?php echo $user->lang['AUTH_FLASH_PM']; ?>: </b></td> + <td class="row2"><input type="radio" name="config[auth_flash_pm]" value="1" <?php echo $flash_pm_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[auth_flash_pm]" value="0" <?php echo $flash_pm_no; ?> /> <?php echo $user->lang['NO']; ?></td> + </tr> + <tr> + <td class="row1"><b><?php echo $user->lang['ENABLE_PM_ICONS']; ?>: </b></td> + <td class="row2"><input type="radio" name="config[enable_pm_icons]" value="1" <?php echo $enable_pm_icons_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="config[enable_pm_icons]" value="0" <?php echo $enable_pm_icons_no; ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <?php @@ -729,7 +805,7 @@ switch ($mode) ?> <tr> <td class="row1" width="50%"><b><?php echo $user->lang['AUTH_METHOD']; ?>: </b></td> - <td class="row2"><select name="auth_method"><?php echo $auth_select; ?></select></td> + <td class="row2"><select name="config[auth_method]"><?php echo $auth_select; ?></select></td> </tr> <?php @@ -769,27 +845,27 @@ switch ($mode) ?> <tr> <td class="row1" width="50%"><?php echo $user->lang['ENABLE_KARMA']; ?>: </td> - <td class="row2"><input type="radio" name="enable_karma" value="1"<?php echo $enable_karma_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="enable_karma" value="0" <?php echo $enable_karma_no ?> /> <?php echo $user->lang['NO']; ?></td> + <td class="row2"><input type="radio" name="config[enable_karma]" value="1"<?php echo $enable_karma_yes ?> /><?php echo $user->lang['YES'] ?> <input type="radio" name="config[enable_karma]" value="0" <?php echo $enable_karma_no ?> /> <?php echo $user->lang['NO']; ?></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['MIN_RATINGS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['MIN_RATINGS_EXPLAIN']; ?></span</td> - <td class="row2"><input class="post" type="text" size="3" maxlength="5" name="min_ratings" value="<?php echo $new['min_ratings']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="3" maxlength="5" name="config[min_ratings]" value="<?php echo $new['min_ratings']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['KARMA_HIST_WEIGHT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['KARMA_HIST_WEIGHT_EXPLAIN']; ?></span</td> - <td class="row2"><input class="post" type="text" size="3" maxlength="5" name="karma_hist_weight" value="<?php echo $new['karma_hist_weight']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="3" maxlength="5" name="config[karma_hist_weight]" value="<?php echo $new['karma_hist_weight']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['KARMA_DAY_WEIGHT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['KARMA_DAY_WEIGHT_EXPLAIN']; ?></span</td> - <td class="row2"><input class="post" type="text" size="3" maxlength="5" name="karma_day_weight" value="<?php echo $new['karma_30_weight']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="3" maxlength="5" name="config[karma_day_weight]" value="<?php echo $new['karma_30_weight']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['KARMA_REG_WEIGHT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['KARMA_REG_WEIGHT_EXPLAIN']; ?></span</td> - <td class="row2"><input class="post" type="text" size="3" maxlength="5" name="karma_reg_weight" value="<?php echo $new['karma_reg_weight']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="3" maxlength="5" name="config[karma_reg_weight]" value="<?php echo $new['karma_reg_weight']; ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['KARMA_POST_WEIGHT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['KARMA_POST_WEIGHT_EXPLAIN']; ?></span</td> - <td class="row2"><input class="post" type="text" size="3" maxlength="5" name="karma_post_weight" value="<?php echo $new['karma_post_weight']; ?>" /></td> + <td class="row2"><input class="post" type="text" size="3" maxlength="5" name="config[karma_post_weight]" value="<?php echo $new['karma_post_weight']; ?>" /></td> </tr> <?php diff --git a/phpBB/adm/admin_database.php b/phpBB/adm/admin_database.php index 8c73927951..e26997fb93 100644 --- a/phpBB/adm/admin_database.php +++ b/phpBB/adm/admin_database.php @@ -19,7 +19,7 @@ if (!empty($setmodules)) $file_uploads = @ini_get('file_uploads'); if (!empty($file_uploads) && $file_uploads !== 0 && strtolower($file_uploads) != 'off' && $auth->acl_get('a_restore')) { - $module['DB']['DB_RESTORE'] = "$filenamex$SID&mode=restore"; + $module['DB']['DB_RESTORE'] = "$filename$SID&mode=restore"; } return; @@ -30,7 +30,7 @@ define('IN_PHPBB', 1); $phpbb_root_path = '../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); require('pagestart.' . $phpEx); -include($phpbb_root_path . 'functions_compress.'.$phpEx); +include($phpbb_root_path . 'includes/functions_compress.'.$phpEx); @set_time_limit(1200); diff --git a/phpBB/adm/admin_forums.php b/phpBB/adm/admin_forums.php index 19cab76e6b..fb203999f5 100644 --- a/phpBB/adm/admin_forums.php +++ b/phpBB/adm/admin_forums.php @@ -1332,28 +1332,27 @@ function delete_forum_content($forum_id) // Use delete_attachments('topic', $ids, false) here... // Select then delete all attachments - $sql = 'SELECT a.physical_filename, a.thumbnail + $sql = 'SELECT a.topic_id FROM ' . POSTS_TABLE . ' p, ' . ATTACHMENTS_TABLE . " a WHERE p.forum_id = $forum_id - AND a.post_id = p.post_id"; + AND a.in_message = 0 + AND a.topic_id = p.topic_id"; $result = $db->sql_query($sql); + $topic_ids = array(); while ($row = $db->sql_fetchrow($result)) { - phpbb_unlink($row['physical_filename'], 'file'); - if ($row['thumbnail']) - { - phpbb_unlink($row['physical_filename'], 'thumbnail'); - } + $topic_ids[] = $row['topic_id']; } $db->sql_freeresult($result); + + delete_attachments('topic', $topic_ids, false); // Delete everything else and thank MySQL for offering multi-table deletion $tables_ary = array( SEARCH_MATCH_TABLE => 'wm.post_id', RATINGS_TABLE => 'ra.post_id', REPORTS_TABLE => 're.post_id', - ATTACHMENTS_TABLE => 'a.post_id', TOPICS_WATCH_TABLE => 'tw.topic_id', TOPICS_TRACK_TABLE => 'tt.topic_id', POLL_OPTIONS_TABLE => 'po.post_id', @@ -1391,7 +1390,8 @@ function delete_forum_content($forum_id) $sql = 'SELECT a.attach_id, a.physical_filename, a.thumbnail FROM ' . POSTS_TABLE . ' p, ' . ATTACHMENTS_TABLE . " a WHERE p.forum_id = $forum_id - AND a.post_id = p.post_id"; + AND a.in_message = 0 + AND a.post_msg_id = p.post_id"; $result = $db->sql_query($sql); $attach_ids = array(); diff --git a/phpBB/adm/admin_groups.php b/phpBB/adm/admin_groups.php index 75e2e6c126..8d51b867e2 100644 --- a/phpBB/adm/admin_groups.php +++ b/phpBB/adm/admin_groups.php @@ -245,12 +245,14 @@ function marklist(match, status) $group_desc = request_var('group_description', ''); $group_type = request_var('group_type', 0); - $colour = request_var('group_colour', ''); - $rank = request_var('group_rank', 0); + $colour = request_var('group_colour', ''); + $rank = request_var('group_rank', 0); $data['uploadurl'] = request_var('uploadurl', ''); $data['remotelink'] = request_var('remotelink', ''); $delete = request_var('delete', ''); + $receive_pm = isset($_REQUEST['group_receive_pm']) ? 1 : 0; + $message_limit = request_var('group_message_limit', 0); if (!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl'] || $data['remotelink']) { @@ -293,12 +295,12 @@ function marklist(match, status) // Only set the rank, colour, etc. if it's changed or if we're adding a new // group. This prevents existing group members being updated if no changes // were made. - foreach (array('rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height') as $test) + foreach (array('rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height', 'receive_pm', 'message_limit') as $test) { ${'group_' . $test} = ($action == 'add' || (isset($$test) && $$test != ${'group_' . $test})) ? $$test : false; } - if (!($error = group_create($group_id, $group_type, $group_name, $group_description, $group_colour, $group_rank, $group_avatar, $group_avatar_type, $group_avatar_width, $group_avatar_height))) + if (!($error = group_create($group_id, $group_type, $group_name, $group_description, $group_colour, $group_rank, $group_avatar, $group_avatar_type, $group_avatar_width, $group_avatar_height, $group_receive_pm, $group_message_limit))) { $message = ($action == 'edit') ? 'GROUP_UPDATED' : 'GROUP_CREATED'; trigger_error($message); @@ -369,7 +371,7 @@ function marklist(match, status) function swatch() { - window.open('./swatch.<?php echo $phpEx; ?>?form=settings&name=group_colour', '_swatch', 'HEIGHT=115,resizable=yes,scrollbars=no,WIDTH=636'); + window.open('./swatch.<?php echo $phpEx; ?>?form=settings&name=group_colour', '_swatch', 'HEIGHT=115,resizable=yes,scrollbars=no,WIDTH=636'); return false; } @@ -436,6 +438,14 @@ function swatch() <th colspan="2"><?php echo $user->lang['GROUP_SETTINGS_SAVE']; ?></th> </tr> <tr> + <td class="row2"><b><?php echo $user->lang['GROUP_RECEIVE_PM']; ?>:</b></td> + <td class="row1" nowrap="nowrap"><input type="checkbox" name="group_receive_pm"<?php echo ($group_receive_pm) ? ' checked="checked"' : ''; ?> /></td> + </tr> + <tr> + <td class="row2"><b><?php echo $user->lang['GROUP_MESSAGE_LIMIT']; ?>:</b></td> + <td class="row1" nowrap="nowrap"><input class="post" type="text" maxlength="4" size="4" name="group_message_limit" value="<?php echo $group_message_limit; ?>" /></td> + </tr> + <tr> <td class="row2"><b><?php echo $user->lang['GROUP_COLOR']; ?>:</b><br /><span class="gensmall"><?php echo $user->lang['GROUP_COLOR_EXPLAIN']; ?></span></td> <td class="row1" nowrap="nowrap"><input class="post" type="text" name="group_colour" value="<?php echo (!empty($group_colour)) ? $group_colour : ''; ?>" size="6" maxlength="6" /> [ <a href="<?php echo "swatch.$phpEx"; ?>" onclick="swatch();return false" target="_swatch"><?php echo $user->lang['COLOUR_SWATCH']; ?></a> ]</td> </tr> diff --git a/phpBB/adm/admin_permissions.php b/phpBB/adm/admin_permissions.php index b29dc5e995..7bfed014b4 100644 --- a/phpBB/adm/admin_permissions.php +++ b/phpBB/adm/admin_permissions.php @@ -1320,7 +1320,7 @@ function update_foes() global $db; $perms = array(); - foreach (auth::acl_get_list(false, array('a_', 'm_'), false) as $forum_id => $forum_ary) + foreach ($auth->acl_get_list(false, array('a_', 'm_'), false) as $forum_id => $forum_ary) { foreach ($forum_ary as $auth_option => $user_ary) { diff --git a/phpBB/adm/admin_search.php b/phpBB/adm/admin_search.php index 6d5999575c..4d5e660b64 100644 --- a/phpBB/adm/admin_search.php +++ b/phpBB/adm/admin_search.php @@ -36,7 +36,7 @@ define('IN_PHPBB', 1); $phpbb_root_path = '../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); require('pagestart.' . $phpEx); -include($phpbb_root_path . 'includes/functions_posting.'.$phpEx); +include($phpbb_root_path . 'includes/message_parser.'.$phpEx); // Check permissions if (!$auth->acl_get('a_search')) @@ -48,10 +48,11 @@ if (!$auth->acl_get('a_search')) if (isset($_POST['start']) || isset($_GET['batchstart'])) { $batchsize = 200; // Process this many posts per batch - $batchstart = (!isset($_GET['batchstart'])) ? $row['min_post_id'] : $_GET['batchstart']; - $batchcount = (!isset($_GET['batchcount'])) ? 1 : $_GET['batchcount']; + $batchcount = request_var('batchcount', 1); + $batchstart = request_var('batchstart', 0); $loopcount = 0; - $batchend = $batchstart + $batchsize; + + $fulltext = new fulltext_search(); // Search re-indexing is tough on the server ... so we'll check the load // each loop and if we're on a 1min load of 3 or more we'll re-load the page @@ -64,12 +65,13 @@ if (isset($_POST['start']) || isset($_GET['batchstart'])) if ($load > 3) { - redirect("admin_search.$phpEx$SID&batchstart=$batchstart&batchcount=$batch_count"); + redirect("admin_search.$phpEx$SID&batchstart=$batchstart&batchcount=$batchcount"); } } } - // Try and load stopword and synonym files + /* Try and load stopword and synonym files + // Do this with the mode "admin" and the fulltext class $stopword_array = array(); $synonym_array = array(); @@ -95,8 +97,9 @@ if (isset($_POST['start']) || isset($_GET['batchstart'])) } closedir($dir); + */ - if (!isset($_GET['batchstart'])) + if (!$batchstart) { // Take board offline set_config('board_disable', 1); @@ -109,17 +112,20 @@ if (isset($_POST['start']) || isset($_GET['batchstart'])) // Fetch a batch of posts_text entries $sql = "SELECT COUNT(*) AS total, MAX(post_id) AS max_post_id, MIN(post_id) AS min_post_id - FROM " . POSTS_TEXT_TABLE; + FROM " . POSTS_TABLE; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $totalposts = $row['total']; $max_post_id = $row['max_post_id']; + $batchstart = (!$batchstart) ? $row['min_post_id'] : $batchstart; + $batchend = $batchstart + $batchsize; + $db->sql_freeresult($result); $sql = "SELECT * - FROM " . POSTS_TEXT_TABLE . " + FROM " . POSTS_TABLE . " WHERE post_id BETWEEN $batchstart AND $batchend"; @@ -129,7 +135,9 @@ if (isset($_POST['start']) || isset($_GET['batchstart'])) { do { - $post_id = $row['post_id']; + $mode = 'admin'; + $fulltext->add($mode, $row['post_id'], $row['post_text'], $row['post_subject']); + /*$post_id = $row['post_id']; $search_raw_words = array(); $search_raw_words['text'] = split_words(clean_words('post', $row['post_text'], $stopword_array, $synonym_array)); @@ -162,7 +170,7 @@ if (isset($_POST['start']) || isset($_GET['batchstart'])) for($i = 0; $i < count($word); $i++) { - $word_text_sql .= (($word_text_sql != '') ? ', ' : '') . "'" . $word[$i] . "'"; + $word_text_sql .= (($word_text_sql != '') ? ', ' : '') . "'" . $db->sql_escape($word[$i]) . "'"; } $check_words = array(); @@ -201,17 +209,17 @@ if (isset($_POST['start']) || isset($_GET['batchstart'])) { case 'mysql': case 'mysql4': - $value_sql .= (($value_sql != '') ? ', ' : '') . "('" . $word[$i] . "')"; + $value_sql .= (($value_sql != '') ? ', ' : '') . "('" . $db->sql_escape($word[$i]) . "')"; break; case 'mssql': case 'sqlite': - $value_sql .= (($value_sql != '') ? ' UNION ALL ' : '') . "SELECT '" . $word[$i] . "'"; + $value_sql .= (($value_sql != '') ? ' UNION ALL ' : '') . "SELECT '" . $db->sql_escape($word[$i]) . "'"; break; default: $sql = 'INSERT INTO ' . SEARCH_WORD_TABLE . " (word_text) - VALUES ('" . $word[$i] . "')"; + VALUES ('" . $db->sql_escape($word[$i]) . "')"; $db->sql_query($sql); break; } @@ -252,7 +260,7 @@ if (isset($_POST['start']) || isset($_GET['batchstart'])) $db->sql_query($sql); } } - + */ } while ($row = $db->sql_fetchrow($result)); } @@ -309,7 +317,7 @@ else if (isset($_POST['cancel'])) } else { - adm_page_header($user->lang['Search_index']); + adm_page_header($user->lang['SEARCH_INDEX']); ?> diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index ae825fa697..194d8bf979 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -508,6 +508,7 @@ elseif ($pane == 'right') view_log('admin', $log_data, $log_count, 5); + $row_class = 'row2'; for($i = 0; $i < sizeof($log_data); $i++) { $row_class = ($row_class == 'row1') ? 'row2' : 'row1'; diff --git a/phpBB/adm/pagestart.php b/phpBB/adm/pagestart.php index 20ffec69e0..716d07563f 100644 --- a/phpBB/adm/pagestart.php +++ b/phpBB/adm/pagestart.php @@ -84,7 +84,7 @@ th { background-image: url('images/cellpic3.gif') } td.cat { background-image: url('images/cellpic1.gif') } //--> </style> -<title><?php echo $config['sitename'] . ' - ' . $page_title; ?></title> +<title><?php echo $config['sitename'] . ' - ' . $sub_title; ?></title> </head> <body> |