diff options
-rw-r--r-- | phpBB/includes/acp/acp_attachments.php | 1428 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_board.php | 554 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_bots.php | 351 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_jabber.php | 188 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_main.php | 409 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_modules.php | 1006 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_php_info.php | 105 | ||||
-rw-r--r-- | phpBB/language/en/acp/attachments.php | 146 | ||||
-rw-r--r-- | phpBB/language/en/acp/board.php | 347 | ||||
-rw-r--r-- | phpBB/language/en/acp/bots.php | 65 | ||||
-rw-r--r-- | phpBB/language/en/acp/common.php | 192 | ||||
-rw-r--r-- | phpBB/language/en/acp/modules.php | 75 |
12 files changed, 4866 insertions, 0 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php new file mode 100644 index 0000000000..fcd61377b8 --- /dev/null +++ b/phpBB/includes/acp/acp_attachments.php @@ -0,0 +1,1428 @@ +<?php +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package acp +*/ +class acp_attachments +{ + function main($id, $mode) + { + global $db, $user, $auth, $template; + global $config, $SID, $phpbb_admin_path, $phpbb_root_path, $phpEx; + + $u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode"; + + $user->add_lang(array('posting', 'viewtopic', 'acp/attachments')); + + $error = $notify = array(); + $submit = (isset($_POST['submit'])) ? true : false; + $action = request_var('action', ''); + + switch ($mode) + { + case 'attach': + $l_title = 'ACP_ATTACHMENT_SETTINGS'; + break; + + case 'extensions': + $l_title = 'ACP_MANAGE_EXTENSIONS'; + break; + + case 'ext_groups': + $l_title = 'ACP_EXTENSION_GROUPS'; + break; + + case 'orphan': + $l_title = 'ACP_ORPHAN_ATTACHMENTS'; + break; + + default: + trigger_error('NO_MODE'); + } + + $this->tpl_name = 'acp_attachments'; + + $template->assign_vars(array( + 'L_TITLE' => $user->lang[$l_title], + 'L_TITLE_EXPLAIN' => $user->lang[$l_title . '_EXPLAIN'], + 'U_ACTION' => $u_action, + ) + ); + + switch ($mode) + { + case 'attach': + + include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx); + + $config_sizes = array('max_filesize' => 'size', 'attachment_quota' => 'quota_size', 'max_filesize_pm' => 'pm_size'); + foreach ($config_sizes as $cfg_key => $var) + { + $$var = request_var($var, ''); + } + + // Pull all config data + $sql = 'SELECT * + FROM ' . CONFIG_TABLE; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $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]); + + foreach ($config_sizes as $cfg_key => $var) + { + if (empty($$var) && !$submit && $config_name == $cfg_key) + { + $$var = (intval($default_config[$config_name]) >= 1048576) ? 'mb' : ((intval($default_config[$config_name]) >= 1024) ? 'kb' : 'b'); + } + + if (!$submit && $config_name == $cfg_key) + { + $new[$config_name] = ($new[$config_name] >= 1048576) ? round($new[$config_name] / 1048576 * 100) / 100 : (($new[$config_name] >= 1024) ? round($new[$config_name] / 1024 * 100) / 100 : $new[$config_name]); + } + + if ($submit && $config_name == $cfg_key) + { + $old = $new[$config_name]; + $new[$config_name] = ($$var == 'kb') ? round($new[$config_name] * 1024) : (($$var == 'mb') ? round($new[$config_name] * 1048576) : $new[$config_name]); + } + } + + if ($submit) + { + set_config($config_name, $new[$config_name]); + + if (in_array($config_name, array('max_filesize', 'attachment_quota', 'max_filesize_pm'))) + { + $new[$config_name] = $old; + } + } + } + $db->sql_freeresult($result); + + $this->perform_site_list(); + + if ($submit) + { + add_log('admin', 'LOG_' . strtoupper($mode) . '_CONFIG'); + + // Check Settings + $this->test_upload($error, $new['upload_path'], false); + + if (!sizeof($error)) + { + trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($u_action)); + } + } + + $template->assign_var('S_ATTACHMENT_SETTINGS', true); + + if ($action == 'imgmagick') + { + $new['img_imagick'] = $this->search_imagemagick(); + } + + // We strip eventually manual added convert program, we only want the patch + $new['img_imagick'] = str_replace(array('convert', '.exe'), array('', ''), $new['img_imagick']); + + $select_size_mode = size_select('size', $size); + $select_quota_size_mode = size_select('quota_size', $quota_size); + $select_pm_size_mode = size_select('pm_size', $pm_size); + + $sql = 'SELECT group_name, cat_id + FROM ' . EXTENSION_GROUPS_TABLE . ' + WHERE cat_id > 0 + ORDER BY cat_id'; + $result = $db->sql_query($sql); + + $s_assigned_groups = array(); + while ($row = $db->sql_fetchrow($result)) + { + $s_assigned_groups[$row['cat_id']][] = $row['group_name']; + } + $db->sql_freeresult($result); + + $supported_types = get_supported_image_types(); + + // Check Thumbnail Support + if (!$new['img_imagick'] && (!isset($supported_types['format']) || !sizeof($supported_types['format']))) + { + $new['img_create_thumbnail'] = '0'; + } + + $template->assign_vars(array( + 'UPLOAD_PATH' => $new['upload_path'], + 'DISPLAY_ORDER' => $new['display_order'], + 'ATTACHMENT_QUOTA' => $new['attachment_quota'], + 'MAX_FILESIZE' => $new['max_filesize'], + 'MAX_PM_FILESIZE' => $new['max_filesize_pm'], + 'MAX_ATTACHMENTS' => $new['max_attachments'], + 'MAX_ATTACHMENTS_PM' => $new['max_attachments_pm'], + 'SECURE_DOWNLOADS' => $new['secure_downloads'], + 'SECURE_ALLOW_DENY' => $new['secure_allow_deny'], + 'ALLOW_EMPTY_REFERER' => $new['secure_allow_empty_referer'], + 'ASSIGNED_GROUPS' => (sizeof($s_assigned_groups[ATTACHMENT_CATEGORY_IMAGE])) ? implode(', ', $s_assigned_groups[ATTACHMENT_CATEGORY_IMAGE]) : $user->lang['NONE'], + 'DISPLAY_INLINED' => $new['img_display_inlined'], + 'CREATE_THUMBNAIL' => $new['img_create_thumbnail'], + 'MIN_THUMB_FILESIZE' => $new['img_min_thumb_filesize'], + 'IMG_IMAGICK' => $new['img_imagick'], + 'MAX_WIDTH' => $new['img_max_width'], + 'MAX_HEIGHT' => $new['img_max_height'], + 'LINK_WIDTH' => $new['img_link_width'], + 'LINK_HEIGHT' => $new['img_link_height'], + + 'U_SEARCH_IMAGICK' => $u_action . '&action=imgmagick', + + 'S_QUOTA_SELECT' => $select_quota_size_mode, + 'S_MAX_FILESIZE_SELECT' => $select_size_mode, + 'S_MAX_PM_FILESIZE_SELECT' => $select_pm_size_mode, + 'S_THUMBNAIL_SUPPORT' => (!$new['img_imagick'] && (!isset($supported_types['format']) || !sizeof($supported_types['format']))) ? false : true, + ) + ); + + // Secure Download Options - Same procedure as with banning + $allow_deny = ($new['secure_allow_deny']) ? 'ALLOWED' : 'DISALLOWED'; + + $sql = 'SELECT * + FROM ' . SITELIST_TABLE; + $result = $db->sql_query($sql); + + $defined_ips = ''; + $ips = array(); + + while ($row = $db->sql_fetchrow($result)) + { + $value = ($row['site_ip']) ? $row['site_ip'] : $row['site_hostname']; + if ($value) + { + $defined_ips .= '<option' . (($row['ip_exclude']) ? ' class="sep"' : '') . ' value="' . $row['site_id'] . '">' . $value . '</option>'; + $ips[$row['site_id']] = $value; + } + } + $db->sql_freeresult($result); + + $template->assign_vars(array( + 'S_SECURE_DOWNLOADS' => $new['secure_downloads'], + 'S_DEFINED_IPS' => ($defined_ips != '') ? true : false, + + 'DEFINED_IPS' => $defined_ips, + + 'L_SECURE_TITLE' => $user->lang['DEFINE_' . $allow_deny . '_IPS'], + 'L_IP_EXCLUDE' => $user->lang['EXCLUDE_FROM_' . $allow_deny . '_IP'], + 'L_REMOVE_IPS' => $user->lang['REMOVE_' . $allow_deny . '_IPS'], + ) + ); + + break; + + case 'extensions': + + if ($submit || isset($_POST['add_extension_check'])) + { + if ($submit) + { + + // Change Extensions ? + $extension_change_list = (isset($_POST['extension_change_list'])) ? array_map('intval', $_POST['extension_change_list']) : array(); + $group_select_list = (isset($_POST['group_select'])) ? array_map('intval', $_POST['group_select']) : array(); + + // Generate correct Change List + $extensions = array(); + + for ($i = 0, $size = sizeof($extension_change_list); $i < $size; $i++) + { + $extensions[$extension_change_list[$i]]['group_id'] = $group_select_list[$i]; + } + + $sql = 'SELECT * + FROM ' . EXTENSIONS_TABLE . ' + ORDER BY extension_id'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + if ($row['group_id'] != $extensions[$row['extension_id']]['group_id']) + { + $sql = 'UPDATE ' . EXTENSIONS_TABLE . ' + SET group_id = ' . (int) $extensions[$row['extension_id']]['group_id'] . ' + WHERE extension_id = ' . $row['extension_id']; + $db->sql_query($sql); + add_log('admin', 'LOG_ATTACH_EXT_UPDATE', $row['extension']); + } + } + $db->sql_freeresult($result); + + // Delete Extension ? + $extension_id_list = (isset($_POST['extension_id_list'])) ? array_map('intval', $_POST['extension_id_list']) : array(); + + if (sizeof($extension_id_list)) + { + $sql = 'SELECT extension + FROM ' . EXTENSIONS_TABLE . ' + WHERE extension_id IN (' . implode(', ', $extension_id_list) . ')'; + $result = $db->sql_query($sql); + + $extension_list = ''; + while ($row = $db->sql_fetchrow($result)) + { + $extension_list .= ($extension_list == '') ? $row['extension'] : ', ' . $row['extension']; + } + $db->sql_freeresult($result); + + $sql = 'DELETE + FROM ' . EXTENSIONS_TABLE . ' + WHERE extension_id IN (' . implode(', ', $extension_id_list) . ')'; + $db->sql_query($sql); + + add_log('admin', 'LOG_ATTACH_EXT_DEL', $extension_list); + } + } + + // Add Extension ? + $add_extension = strtolower(request_var('add_extension', '')); + $add_extension_group = request_var('add_group_select', 0); + $add = (isset($_POST['add_extension_check'])) ? true : false; + + if ($add_extension != '' && $add) + { + if (!sizeof($error)) + { + $sql = 'SELECT extension_id + FROM ' . EXTENSIONS_TABLE . " + WHERE extension = '" . $db->sql_escape($add_extension) . "'"; + $result = $db->sql_query($sql); + + if ($row = $db->sql_fetchrow($result)) + { + $error[] = sprintf($user->lang['EXTENSION_EXIST'], $add_extension); + } + $db->sql_freeresult($result); + + if (!sizeof($error)) + { + $sql_ary = array( + 'group_id' => $add_extension_group, + 'extension' => $add_extension + ); + + $db->sql_query('INSERT INTO ' . EXTENSIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); + add_log('admin', 'LOG_ATTACH_EXT_ADD', $add_extension); + } + } + } + + if (!sizeof($error)) + { + $notify[] = $user->lang['EXTENSIONS_UPDATED']; + } + + $cache->destroy('_extensions'); + } + + $template->assign_vars(array( + 'S_EXTENSIONS' => true, + 'ADD_EXTENSION' => (isset($add_extension)) ? $add_extension : '', + 'GROUP_SELECT_OPTIONS' => (isset($_POST['add_extension_check'])) ? $this->group_select('add_group_select', $add_extension_group, 'extension_group') : $this->group_select('add_group_select', false, 'extension_group')) + ); + + $sql = 'SELECT * + FROM ' . EXTENSIONS_TABLE . ' + ORDER BY group_id, extension'; + $result = $db->sql_query($sql); + + if ($row = $db->sql_fetchrow($result)) + { + $old_group_id = $row['group_id']; + do + { + $s_spacer = false; + + $current_group_id = $row['group_id']; + if ($old_group_id != $current_group_id) + { + $s_spacer = true; + $old_group_id = $current_group_id; + } + + $template->assign_block_vars('extensions', array( + 'S_SPACER' => $s_spacer, + 'EXTENSION_ID' => $row['extension_id'], + 'EXTENSION' => $row['extension'], + 'GROUP_OPTIONS' => $this->group_select('group_select[]', $row['group_id'])) + ); + } + while ($row = $db->sql_fetchrow($result)); + } + $db->sql_freeresult($result); + + break; + + case 'ext_groups': + + $template->assign_var('S_EXTENSION_GROUPS', true); + + if ($submit) + { + $action = request_var('action', ''); + $group_id = request_var('g', 0); + + if ($action != 'add' && $action != 'edit') + { + trigger_error('WRONG_MODE'); + } + + if (!$group_id && $action == 'edit') + { + trigger_error('NO_EXT_GROUP_SPECIFIED'); + } + + if ($group_id) + { + $sql = 'SELECT * FROM ' . EXTENSION_GROUPS_TABLE . " + WHERE group_id = $group_id"; + $result = $db->sql_query($sql); + $ext_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + } + else + { + $ext_row = array(); + } + + $group_name = request_var('group_name', ''); + $new_group_name = ($action == 'add') ? $group_name : (($ext_row['group_name'] != $group_name) ? $group_name : ''); + + if (!$group_name) + { + $error[] = $user->lang['NO_EXT_GROUP_NAME']; + } + + // Check New Group Name + if ($new_group_name) + { + $sql = 'SELECT group_id + FROM ' . EXTENSION_GROUPS_TABLE . " + WHERE LOWER(group_name) = '" . $db->sql_escape(strtolower($new_group_name)) . "'"; + $result = $db->sql_query($sql); + if ($db->sql_fetchrow($result)) + { + $error[] = sprintf($user->lang['EXTENSION_GROUP_EXIST'], $new_group_name); + } + $db->sql_freeresult($result); + } + + 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($_POST['allowed_forums']) ? array_map('intval', array_values($_POST['allowed_forums'])) : array(); + $allow_in_pm = isset($_POST['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']) + { + $max_filesize = 0; + } + + if (!sizeof($allowed_forums)) + { + $forum_select = false; + } + + $group_ary = array( + 'group_name' => $group_name, + 'cat_id' => request_var('special_category', ATTACHMENT_CATEGORY_NONE), + 'allow_group' => (isset($_POST['allow_group'])) ? 1 : 0, + '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) : '', + 'allow_in_pm' => ($allow_in_pm) ? 1 : 0 + ); + + $sql = ($action == 'add') ? 'INSERT INTO ' . EXTENSION_GROUPS_TABLE . ' ' : 'UPDATE ' . EXTENSION_GROUPS_TABLE . ' SET '; + $sql .= $db->sql_build_array((($action == 'add') ? 'INSERT' : 'UPDATE'), $group_ary); + $sql .= ($action == 'edit') ? " WHERE group_id = $group_id" : ''; + + $db->sql_query($sql); + + if ($action == 'add') + { + $group_id = $db->sql_nextid(); + } + + add_log('admin', 'LOG_ATTACH_EXTGROUP_' . strtoupper($action), $group_name); + } + + $extension_list = isset($_REQUEST['extensions']) ? array_map('intval', array_values($_REQUEST['extensions'])) : array(); + + if ($action == 'edit' && sizeof($extension_list)) + { + $sql = 'UPDATE ' . EXTENSIONS_TABLE . " + SET group_id = 0 + WHERE group_id = $group_id"; + $db->sql_query($sql); + } + + if (sizeof($extension_list)) + { + $sql = 'UPDATE ' . EXTENSIONS_TABLE . " + SET group_id = $group_id + WHERE extension_id IN (" . implode(', ', $extension_list) . ")"; + $db->sql_query($sql); + } + + $this->rewrite_extensions(); + + if (!sizeof($error)) + { + $notify[] = $user->lang['SUCCESS_EXTENSION_GROUP_' . strtoupper($action)]; + } + } + + $cat_lang = array( + ATTACHMENT_CATEGORY_NONE => $user->lang['NONE'], + ATTACHMENT_CATEGORY_IMAGE => $user->lang['CAT_IMAGES'], + ATTACHMENT_CATEGORY_WM => $user->lang['CAT_WM_FILES'], + ATTACHMENT_CATEGORY_RM => $user->lang['CAT_RM_FILES'] + ); + + $group_id = request_var('g', 0); + $action = (isset($_POST['add'])) ? 'add' : $action; +// $action = (($action == 'add' || $action == 'edit') && $submit && !sizeof($error)) ? 'show' : $action; + + switch ($action) + { + case 'delete': + + if (confirm_box(true)) + { + $sql = 'SELECT group_name + FROM ' . EXTENSION_GROUPS_TABLE . " + WHERE group_id = $group_id"; + $result = $db->sql_query($sql); + $group_name = $db->sql_fetchfield('group_name', 0, $result); + $db->sql_freeresult($result); + + $sql = 'DELETE + FROM ' . EXTENSION_GROUPS_TABLE . " + WHERE group_id = $group_id"; + $db->sql_query($sql); + + // Set corresponding Extensions to a pending Group + $sql = 'UPDATE ' . EXTENSIONS_TABLE . " + SET group_id = 0 + WHERE group_id = $group_id"; + $db->sql_query($sql); + + add_log('admin', 'LOG_ATTACH_EXTGROUP_DEL', $group_name); + + $this->rewrite_extensions(); + + trigger_error($user->lang['EXTENSION_GROUP_DELETED'] . adm_back_link($u_action)); + } + else + { + confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array( + 'i' => $id, + 'mode' => $mode, + 'action' => $action, + 'group_id' => $group_id, + 'action' => 'delete', + ))); + } + + break; + + case 'edit': + + if (!$group_id) + { + trigger_error($user->lang['NO_EXTENSION_GROUP'] . adm_back_link($u_action)); + } + + $sql = 'SELECT * FROM ' . EXTENSION_GROUPS_TABLE . " + WHERE group_id = $group_id"; + $result = $db->sql_query($sql); + $ext_group_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $forum_ids = (!$ext_group_row['allowed_forums']) ? array() : unserialize(trim($ext_group_row['allowed_forums'])); + + case 'add': + + if ($action == 'add') + { + $ext_group_row = array( + 'group_name' => request_var('group_name', ''), + 'cat_id' => 0, + 'allow_group' => 1, + 'allow_in_pm' => 1, + 'download_mode' => 1, + 'upload_icon' => '', + 'max_filesize' => 0, + ); + + $forum_ids = array(); + } + + $extensions = array(); + + $sql = 'SELECT * FROM ' . EXTENSIONS_TABLE . " + WHERE group_id = $group_id OR group_id = 0 + ORDER BY extension"; + $result = $db->sql_query($sql); + $extensions = $db->sql_fetchrowset($result); + $db->sql_freeresult($result); + + if ($ext_group_row['max_filesize'] == 0) + { + $ext_group_row['max_filesize'] = (int) $config['max_filesize']; + } + + $size_format = ($ext_group_row['max_filesize'] >= 1048576) ? 'mb' : (($ext_group_row['max_filesize'] >= 1024) ? 'kb' : 'b'); + + $ext_group_row['max_filesize'] = ($ext_group_row['max_filesize'] >= 1048576) ? round($ext_group_row['max_filesize'] / 1048576 * 100) / 100 : (($ext_group_row['max_filesize'] >= 1024) ? round($ext_group_row['max_filesize'] / 1024 * 100) / 100 : $ext_group_row['max_filesize']); + + $img_path = $config['upload_icons_path']; + + $imglist = filelist($phpbb_root_path . $img_path); + $imglist = array_values($imglist); + $imglist = $imglist[0]; + + $filename_list = ''; + $no_image_select = false; + foreach ($imglist as $key => $img) + { + if (!$ext_group_row['upload_icon']) + { + $no_image_select = true; + $selected = ''; + } + else + { + $selected = ($ext_group_row['upload_icon'] == $img) ? ' selected="selected"' : ''; + } + + $filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . htmlspecialchars($img) . '</option>'; + } + + $i = 0; + $assigned_extensions = ''; + foreach ($extensions as $num => $row) + { + if ($row['group_id'] == $group_id && $group_id) + { + $assigned_extensions .= ($i) ? ', ' . $row['extension'] : $row['extension']; + $i++; + } + } + + $s_extension_options = ''; + foreach ($extensions as $row) + { + $s_extension_options .= '<option' . ((!$row['group_id']) ? ' class="disabled"' : '') . ' value="' . $row['extension_id'] . '"' . (($row['group_id'] == $group_id && $group_id) ? ' selected="selected"' : '') . '>' . $row['extension'] . '</option>'; + } + + $template->assign_vars(array( + 'PHPBB_ROOT_PATH' => $phpbb_root_path, + 'IMG_PATH' => $img_path, + 'ACTION' => $action, + 'GROUP_ID' => $group_id, + 'GROUP_NAME' => $ext_group_row['group_name'], + 'ALLOW_GROUP' => $ext_group_row['allow_group'], + 'ALLOW_IN_PM' => $ext_group_row['allow_in_pm'], + 'UPLOAD_ICON_SRC' => $phpbb_root_path . $img_path . '/' . $ext_group_row['upload_icon'], + 'EXTGROUP_FILESIZE' => $ext_group_row['max_filesize'], + 'ASSIGNED_EXTENSIONS' => $assigned_extensions, + + 'S_CATEGORY_SELECT' => $this->category_select('special_category', $group_id, 'category'), + 'S_DOWNLOAD_SELECT' => $this->download_select('download_mode', $group_id, 'download_mode'), + 'S_EXT_GROUP_SIZE' => size_select('size_select', $size_format), + 'S_EXTENSION_OPTIONS' => $s_extension_options, + 'S_FILENAME_LIST' => $filename_list, + 'S_EDIT_GROUP' => true, + 'S_NO_IMAGE' => $no_image_select, + 'S_FORUM_IDS' => (sizeof($forum_ids)) ? true : false, + + 'U_EXTENSIONS' => $phpbb_admin_path . "index.$phpEx$SID&i=$id&mode=extensions", + + 'L_LEGEND' => $user->lang[strtoupper($action) . '_EXTENSION_GROUP'], + ) + ); + + $s_forum_id_options = ''; + + $sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id + FROM ' . FORUMS_TABLE . ' + ORDER BY left_id ASC'; + $result = $db->sql_query($sql); + + $right = $cat_right = $padding_inc = 0; + $padding = $forum_list = $holding = ''; + $padding_store = array('0' => ''); + while ($row = $db->sql_fetchrow($result)) + { + if ($row['forum_type'] == FORUM_CAT && ($row['left_id'] + 1 == $row['right_id'])) + { + // Non-postable forum with no subforums, don't display + continue; + } + + if (!$auth->acl_get('f_list', $row['forum_id'])) + { + // if the user does not have permissions to list this forum skip + continue; + } + + if ($row['left_id'] < $right) + { + $padding .= ' '; + $padding_store[$row['parent_id']] = $padding; + } + else if ($row['left_id'] > $right + 1) + { + $padding = $padding_store[$row['parent_id']]; + } + + $right = $row['right_id']; + + $selected = (in_array($row['forum_id'], $forum_ids)) ? ' selected="selected"' : ''; + + if ($row['left_id'] > $cat_right) + { + $holding = ''; + } + + if ($row['right_id'] - $row['left_id'] > 1) + { + $cat_right = max($cat_right, $row['right_id']); + + $holding .= '<option value="' . $row['forum_id'] . '"' . (($row['forum_type'] == FORUM_POST) ? ' class="blue"' : '') . $selected . '>' . $padding . $row['forum_name'] . '</option>'; + } + else + { + $s_forum_id_options .= $holding . '<option value="' . $row['forum_id'] . '"' . (($row['forum_type'] == FORUM_POST) ? ' class="blue"' : '') . $selected . '>' . $padding . $row['forum_name'] . '</option>'; + $holding = ''; + } + } + $db->sql_freeresult($result); + unset($padding_store); + + $template->assign_vars(array( + 'S_FORUM_ID_OPTIONS' => $s_forum_id_options) + ); + + break; + + case 'deactivate': + case 'activate': + + if (!$group_id) + { + trigger_error($user->lang['NO_EXTENSION_GROUP'] . adm_back_link($u_action)); + } + + $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . ' + SET allow_group = ' . (($action == 'activate') ? '1' : '0') . " + WHERE group_id = $group_id"; + $db->sql_query($sql); + + $this->rewrite_extensions(); + + break; + } + + $sql = 'SELECT * + FROM ' . EXTENSION_GROUPS_TABLE . ' + ORDER BY allow_group DESC, group_name'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $s_add_spacer = ($row['allow_group'] == 0 && $act_deact == 'deactivate') ? true : false; + + $act_deact = ($row['allow_group']) ? 'deactivate' : 'activate'; + + $template->assign_block_vars('groups', array( + 'S_ADD_SPACER' => $s_add_spacer, + + 'U_EDIT' => $u_action . "&action=edit&g={$row['group_id']}", + 'U_DELETE' => $u_action . "&action=delete&g={$row['group_id']}", + 'U_ACT_DEACT' => $u_action . "&action=$act_deact&g={$row['group_id']}", + + 'L_ACT_DEACT' => $user->lang[strtoupper($act_deact)], + 'GROUP_NAME' => $row['group_name'], + 'CATEGORY' => $cat_lang[$row['cat_id']], + ) + ); + + } + $db->sql_freeresult($result); + + break; + + case 'orphan': + + if ($submit) + { + + $delete_files = (isset($_POST['delete'])) ? array_keys(request_var('delete', array('' => 0))) : array(); + $add_files = (isset($_POST['add'])) ? array_keys(request_var('add', array('' => 0))) : array(); + $post_ids = request_var('post_id', array('' => 0)); + + foreach ($delete_files as $delete) + { + phpbb_unlink($delete); + phpbb_unlink($delete, 'thumbnail'); + } + + if (sizeof($delete_files)) + { + add_log('admin', sprintf($user->lang['LOG_ATTACH_ORPHAN_DEL'], implode(', ', $delete_files))); + $notify[] = sprintf($user->lang['LOG_ATTACH_ORPHAN_DEL'], implode(', ', $delete_files)); + } + + $upload_list = array(); + foreach ($add_files as $file) + { + if (!in_array($file, $delete_files) && $post_ids[$file]) + { + $upload_list[$post_ids[$file]] = $file; + } + } + unset($add_files); + + if (sizeof($upload_list)) + { + $template->assign_var('S_UPLOADING_FILES', true); + + include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx); + $message_parser = new parse_message(); + + $sql = 'SELECT forum_id, forum_name + FROM ' . FORUMS_TABLE; + $result = $db->sql_query($sql); + + $forum_names = array(); + while ($row = $db->sql_fetchrow($result)) + { + $forum_names[$row['forum_id']] = $row['forum_name']; + } + $db->sql_freeresult($result); + + $sql = 'SELECT forum_id, topic_id, post_id + FROM ' . POSTS_TABLE . ' + WHERE post_id IN (' . implode(', ', array_keys($upload_list)) . ')'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $return = true; + + if ($auth->acl_gets('f_attach', 'u_attach', $row['forum_id'])) + { + $return = $this->upload_file($row['post_id'], $row['topic_id'], $row['forum_id'], $config['upload_path'], $upload_list[$row['post_id']]); + } + + $template->assign_block_vars('upload', array( + 'FILE_INFO' => sprintf($user->lang['UPLOADING_FILE_TO'], $upload_list[$row['post_id']], $row['post_id']), + 'S_DENIED' => (!$auth->acl_gets('f_attach', 'u_attach', $row['forum_id'])) ? true : false, + 'L_DENIED' => (!$auth->acl_gets('f_attach', 'u_attach', $row['forum_id'])) ? sprintf($user->lang['UPLOAD_DENIED_FORUM'], $forum_names[$row['forum_id']]) : '', + 'ERROR_MSG' => ($return === true) ? false : $return) + ); + } + $db->sql_freeresult($result); + + unset($message_parser); + } + } + + $template->assign_vars(array( + 'S_ORPHAN' => true) + ); + + $attach_filelist = array(); + + $dir = @opendir($phpbb_root_path . $config['upload_path']); + while ($file = @readdir($dir)) + { + if (is_file($phpbb_root_path . $config['upload_path'] . '/' . $file) && filesize($phpbb_root_path . $config['upload_path'] . '/' . $file) && $file{0} != '.' && $file != 'index.htm' && !preg_match('#^thumb\_#', $file)) + { + $attach_filelist[$file] = $file; + } + } + @closedir($dir); + + $sql = 'SELECT physical_filename + FROM ' . ATTACHMENTS_TABLE; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + unset($attach_filelist[$row['physical_filename']]); + } + $db->sql_freeresult($result); + + $i = 0; + foreach ($attach_filelist as $file) + { + $filesize = @filesize($phpbb_root_path . $config['upload_path'] . '/' . $file); + $size_lang = ($filesize >= 1048576) ? $user->lang['MB'] : ( ($filesize >= 1024) ? $user->lang['KB'] : $user->lang['BYTES'] ); + $filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize); + + $template->assign_block_vars('orphan', array( + 'FILESIZE' => $filesize . ' ' . $size_lang, + 'U_FILE' => $phpbb_root_path . $config['upload_path'] . '/' . $file, + 'FILE' => $file, + 'POST_IDS' => (!empty($post_ids[$file])) ? $post_ids[$file] : '') + ); + } + + break; + } + + if (sizeof($error)) + { + $template->assign_vars(array( + 'S_WARNING' => true, + 'WARNING_MSG' => implode('<br />', $error)) + ); + } + + if (sizeof($notify)) + { + $template->assign_vars(array( + 'S_NOTIFY' => true, + 'NOTIFY_MSG' => implode('<br />', $notify)) + ); + } + + } + + /** + * Build Select for category items + */ + function category_select($select_name, $group_id = false, $key = '') + { + global $db, $user; + + $types = array( + ATTACHMENT_CATEGORY_NONE => $user->lang['NONE'], + ATTACHMENT_CATEGORY_IMAGE => $user->lang['CAT_IMAGES'], + ATTACHMENT_CATEGORY_WM => $user->lang['CAT_WM_FILES'], + ATTACHMENT_CATEGORY_RM => $user->lang['CAT_RM_FILES'] + ); + + if ($group_id) + { + $sql = 'SELECT cat_id + FROM ' . EXTENSION_GROUPS_TABLE . ' + WHERE group_id = ' . (int) $group_id; + $result = $db->sql_query($sql); + + $cat_type = (!($row = $db->sql_fetchrow($result))) ? ATTACHMENT_CATEGORY_NONE : $row['cat_id']; + + $db->sql_freeresult($result); + } + else + { + $cat_type = ATTACHMENT_CATEGORY_NONE; + } + + $group_select = '<select name="' . $select_name . '"' . (($key) ? ' id="' . $key . '"' : '') . '>'; + + foreach ($types as $type => $mode) + { + $selected = ($type == $cat_type) ? ' selected="selected"' : ''; + $group_select .= '<option value="' . $type . '"' . $selected . '>' . $mode . '</option>'; + } + + $group_select .= '</select>'; + + return $group_select; + } + + /** + * Extension group select + */ + function group_select($select_name, $default_group = false, $key = '') + { + global $db, $user; + + $group_select = '<select name="' . $select_name . '"' . (($key) ? ' id="' . $key . '"' : '') . '>'; + + $sql = 'SELECT group_id, group_name + FROM ' . EXTENSION_GROUPS_TABLE . ' + ORDER BY group_name'; + $result = $db->sql_query($sql); + + $group_name = array(); + while ($row = $db->sql_fetchrow($result)) + { + $group_name[] = $row; + } + $db->sql_freeresult($result); + + $row['group_id'] = 0; + $row['group_name'] = $user->lang['NOT_ASSIGNED']; + $group_name[] = $row; + + for ($i = 0; $i < sizeof($group_name); $i++) + { + if ($default_group === false) + { + $selected = ($i == 0) ? ' selected="selected"' : ''; + } + else + { + $selected = ($group_name[$i]['group_id'] == $default_group) ? ' selected="selected"' : ''; + } + + $group_select .= '<option value="' . $group_name[$i]['group_id'] . '"' . $selected . '>' . $group_name[$i]['group_name'] . '</option>'; + } + + $group_select .= '</select>'; + + return $group_select; + } + + /** + * Build select for download modes + */ + function download_select($select_name, $group_id = false, $key = '') + { + global $db, $user; + + $types = array( + INLINE_LINK => $user->lang['MODE_INLINE'], + PHYSICAL_LINK => $user->lang['MODE_PHYSICAL'] + ); + + if ($group_id) + { + $sql = "SELECT download_mode + FROM " . EXTENSION_GROUPS_TABLE . " + WHERE group_id = " . (int) $group_id; + $result = $db->sql_query($sql); + + $download_mode = (!($row = $db->sql_fetchrow($result))) ? INLINE_LINK : $row['download_mode']; + + $db->sql_freeresult($result); + } + else + { + $download_mode = INLINE_LINK; + } + + $group_select = '<select name="' . $select_name . '"' . (($key) ? ' id="' . $key . '"' : '') . '>'; + + foreach ($types as $type => $mode) + { + $selected = ($type == $download_mode) ? ' selected="selected"' : ''; + $group_select .= '<option value="' . $type . '"' . $selected . '>' . $mode . '</option>'; + } + + $group_select .= '</select>'; + + return $group_select; + } + + /** + * Upload already uploaded file... huh? are you kidding? + * @todo integrate into upload class + */ + function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename) + { + global $message_parser, $db, $user, $phpbb_root_path; + + $message_parser->attachment_data = array(); + + $message_parser->filename_data['filecomment'] = ''; + $message_parser->filename_data['filename'] = $phpbb_root_path . $upload_dir . '/' . basename($filename); + + $filedata = upload_attachment('local', $forum_id, true, $phpbb_root_path . $upload_dir . '/' . basename($filename)); + + if ($filedata['post_attach'] && !sizeof($filedata['error'])) + { + $message_parser->attachment_data = array( + 'post_msg_id' => $post_id, + 'poster_id' => $user->data['user_id'], + 'topic_id' => $topic_id, + 'in_message' => 0, + 'physical_filename' => $filedata['physical_filename'], + 'real_filename' => $filedata['real_filename'], + 'comment' => $message_parser->filename_data['filecomment'], + 'extension' => $filedata['extension'], + 'mimetype' => $filedata['mimetype'], + 'filesize' => $filedata['filesize'], + 'filetime' => $filedata['filetime'], + 'thumbnail' => $filedata['thumbnail'] + ); + + $message_parser->filename_data['filecomment'] = ''; + $filedata['post_attach'] = FALSE; + + // Submit Attachment + $attach_sql = $message_parser->attachment_data; + + $db->sql_transaction(); + + $sql = 'INSERT INTO ' . ATTACHMENTS_TABLE . ' ' . $db->sql_build_array('INSERT', $attach_sql); + $db->sql_query($sql); + + $sql = 'UPDATE ' . POSTS_TABLE . " + SET post_attachment = 1 + WHERE post_id = $post_id"; + $db->sql_query($sql); + + $sql = 'UPDATE ' . TOPICS_TABLE . " + SET topic_attachment = 1 + WHERE topic_id = $topic_id"; + $db->sql_query($sql); + + $db->sql_transaction('commit'); + + add_log('admin', sprintf($user->lang['LOG_ATTACH_FILEUPLOAD'], $post_id, $filename)); + + return true; + } + else if (sizeof($filedata['error'])) + { + return sprintf($user->lang['ADMIN_UPLOAD_ERROR'], implode('<br />', $filedata['error'])); + } + } + + /** + * Search Imagick + */ + function search_imagemagick() + { + $imagick = ''; + + $exe = ((defined('PHP_OS')) && (preg_match('#win#i', PHP_OS))) ? '.exe' : ''; + + if (empty($_ENV['MAGICK_HOME'])) + { + $locations = array('C:/WINDOWS/', 'C:/WINNT/', 'C:/WINDOWS/SYSTEM/', 'C:/WINNT/SYSTEM/', 'C:/WINDOWS/SYSTEM32/', 'C:/WINNT/SYSTEM32/', '/usr/bin/', '/usr/sbin/', '/usr/local/bin/', '/usr/local/sbin/', '/opt/', '/usr/imagemagick/', '/usr/bin/imagemagick/'); + + foreach ($locations as $location) + { + if (@is_readable($location . 'mogrify' . $exe) && @filesize($location . 'mogrify' . $exe) > 3000) + { + $imagick = str_replace('\\', '/', $location); + continue; + } + } + } + else + { + $imagick = str_replace('\\', '/', $_ENV['MAGICK_HOME']); + } + + return $imagick; + } + + /** + * Test Settings + */ + function test_upload(&$error, $upload_dir, $create_directory = false) + { + global $user, $phpbb_root_path; + + // Does the target directory exist, is it a directory and writeable. + if ($create_directory) + { + if (!file_exists($phpbb_root_path . $upload_dir)) + { + @mkdir($phpbb_root_path . $upload_dir, 0777); + @chmod($phpbb_root_path . $upload_dir, 0777); + } + } + + if (!file_exists($phpbb_root_path . $upload_dir)) + { + $error[] = sprintf($user->lang['NO_UPLOAD_DIR'], $upload_dir); + return; + } + + if (!is_dir($phpbb_root_path . $upload_dir)) + { + $error[] = sprintf($user->lang['UPLOAD_NOT_DIR'], $upload_dir); + return; + } + + if (!is_writable($phpbb_root_path . $upload_dir)) + { + $error[] = sprintf($user->lang['NO_WRITE_UPLOAD'], $upload_dir); + return; + } + } + + /** + * Perform operations on sites for external linking + */ + function perform_site_list() + { + global $db, $user; + + if (isset($_REQUEST['securesubmit'])) + { + // Grab the list of entries + $ips = request_var('ips', ''); + $ip_list = array_unique(explode("\n", $ips)); + $ip_list_log = implode(', ', $ip_list); + + $ip_exclude = (!empty($_POST['ipexclude'])) ? 1 : 0; + + $iplist = array(); + $hostlist = array(); + + foreach ($ip_list as $item) + { + 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($item), $ip_range_explode)) + { + // Don't ask about all this, just don't ask ... ! + $ip_1_counter = $ip_range_explode[1]; + $ip_1_end = $ip_range_explode[5]; + + while ($ip_1_counter <= $ip_1_end) + { + $ip_2_counter = ($ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[2] : 0; + $ip_2_end = ($ip_1_counter < $ip_1_end) ? 254 : $ip_range_explode[6]; + + if ($ip_2_counter == 0 && $ip_2_end == 254) + { + $ip_2_counter = 256; + $ip_2_fragment = 256; + + $iplist[] = "'$ip_1_counter.*'"; + } + + while ($ip_2_counter <= $ip_2_end) + { + $ip_3_counter = ($ip_2_counter == $ip_range_explode[2] && $ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[3] : 0; + $ip_3_end = ($ip_2_counter < $ip_2_end || $ip_1_counter < $ip_1_end) ? 254 : $ip_range_explode[7]; + + if ($ip_3_counter == 0 && $ip_3_end == 254) + { + $ip_3_counter = 256; + $ip_3_fragment = 256; + + $iplist[] = "'$ip_1_counter.$ip_2_counter.*'"; + } + + while ($ip_3_counter <= $ip_3_end) + { + $ip_4_counter = ($ip_3_counter == $ip_range_explode[3] && $ip_2_counter == $ip_range_explode[2] && $ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[4] : 0; + $ip_4_end = ($ip_3_counter < $ip_3_end || $ip_2_counter < $ip_2_end) ? 254 : $ip_range_explode[8]; + + if ($ip_4_counter == 0 && $ip_4_end == 254) + { + $ip_4_counter = 256; + $ip_4_fragment = 256; + + $iplist[] = "'$ip_1_counter.$ip_2_counter.$ip_3_counter.*'"; + } + + while ($ip_4_counter <= $ip_4_end) + { + $iplist[] = "'$ip_1_counter.$ip_2_counter.$ip_3_counter.$ip_4_counter'"; + $ip_4_counter++; + } + $ip_3_counter++; + } + $ip_2_counter++; + } + $ip_1_counter++; + } + } + else if (preg_match('#^([0-9]{1,3})\.([0-9\*]{1,3})\.([0-9\*]{1,3})\.([0-9\*]{1,3})$#', trim($item)) || preg_match('#^[a-f0-9:]+\*?$#i', trim($item))) + { + $iplist[] = "'" . trim($item) . "'"; + } + else if (preg_match('#^([\w\-_]\.?){2,}$#is', trim($item))) + { + $hostlist[] = "'" . trim($item) . "'"; + } + else if (preg_match("#^([a-z0-9\-\*\._/]+?)$#is", trim($item))) + { + $hostlist[] = "'" . trim($item) . "'"; + } + } + + $sql = 'SELECT site_ip, site_hostname + FROM ' . SITELIST_TABLE . " + WHERE ip_exclude = $ip_exclude"; + $result = $db->sql_query($sql); + + if ($row = $db->sql_fetchrow($result)) + { + $iplist_tmp = array(); + $hostlist_tmp = array(); + do + { + if ($row['site_ip']) + { + $iplist_tmp[] = "'" . $row['site_ip'] . "'"; + } + else if ($row['site_hostname']) + { + $hostlist_tmp[] = "'" . $row['site_hostname'] . "'"; + } + break; + } + while ($row = $db->sql_fetchrow($result)); + + $iplist = array_unique(array_diff($iplist, $iplist_tmp)); + $hostlist = array_unique(array_diff($hostlist, $hostlist_tmp)); + unset($iplist_tmp); + unset($hostlist_tmp); + } + + if (sizeof($iplist)) + { + foreach ($iplist as $ip_entry) + { + $sql = 'INSERT INTO ' . SITELIST_TABLE . " (site_ip, ip_exclude) + VALUES ($ip_entry, $ip_exclude)"; + $db->sql_query($sql); + } + } + + if (sizeof($hostlist)) + { + foreach ($hostlist as $host_entry) + { + $sql = 'INSERT INTO ' . SITELIST_TABLE . " (site_hostname, ip_exclude) + VALUES ($host_entry, $ip_exclude)"; + $db->sql_query($sql); + } + } + + if (!empty($ip_list_log)) + { + // Update log + $log_entry = ($ip_exclude) ? 'LOG_DOWNLOAD_EXCLUDE_IP' : 'LOG_DOWNLOAD_IP'; + add_log('admin', $log_entry, $ip_list_log); + } + + trigger_error($user->lang['SECURE_DOWNLOAD_UPDATE_SUCCESS']); + } + else if (isset($_POST['unsecuresubmit'])) + { + $unip_sql = implode(', ', array_map('intval', $_POST['unip'])); + + if ($unip_sql != '') + { + $l_unip_list = ''; + + // Grab details of ips for logging information later + $sql = 'SELECT site_ip, site_hostname + FROM ' . SITELIST_TABLE . " + WHERE site_id IN ($unip_sql)"; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $l_unip_list .= (($l_unip_list != '') ? ', ' : '') . (($row['site_ip']) ? $row['site_ip'] : $row['site_hostname']); + } + + $sql = 'DELETE FROM ' . SITELIST_TABLE . " + WHERE site_id IN ($unip_sql)"; + $db->sql_query($sql); + + add_log('admin', 'LOG_DOWNLOAD_REMOVE_IP', $l_unip_list); + } + + trigger_error($user->lang['SECURE_DOWNLOAD_UPDATE_SUCCESS']); + } + } + + /** + * Re-Write extensions cache file + */ + function rewrite_extensions() + { + global $db, $cache; + + $sql = 'SELECT e.extension, g.* + FROM ' . EXTENSIONS_TABLE . ' e, ' . EXTENSION_GROUPS_TABLE . ' g + WHERE e.group_id = g.group_id + AND g.allow_group = 1'; + $result = $db->sql_query($sql); + + $extensions = array(); + while ($row = $db->sql_fetchrow($result)) + { + $extension = $row['extension']; + + $extensions[$extension]['display_cat'] = (int) $row['cat_id']; + $extensions[$extension]['download_mode']= (int) $row['download_mode']; + $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] = (!sizeof($allowed_forums)) ? 0 : $allowed_forums; + } + $db->sql_freeresult($result); + + $cache->destroy('_extensions'); + $cache->put('_extensions', $extensions); + } + +} + +/** +* @package module_install +*/ +class acp_attachments_info +{ + function module() + { + return array( + 'filename' => 'acp_attachments', + 'title' => 'Attachments', + 'version' => '1.0.0', + 'modes' => array( + 'attach' => array('title' => 'ACP_ATTACHMENT_SETTINGS', 'auth' => 'acl_a_attach'), + 'extensions' => array('title' => 'ACP_MANAGE_EXTENSIONS', 'auth' => 'acl_a_attach'), + 'ext_groups' => array('title' => 'ACP_EXTENSION_GROUPS', 'auth' => 'acl_a_attach'), + 'orphan' => array('title' => 'ACP_ORPHAN_ATTACHMENTS', 'auth' => 'acl_a_attach') + ), + ); + } + + function install() + { + } + + function uninstall() + { + } +} + +?>
\ No newline at end of file diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php new file mode 100644 index 0000000000..351913f28e --- /dev/null +++ b/phpBB/includes/acp/acp_board.php @@ -0,0 +1,554 @@ +<?php +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package acp +*/ +class acp_board +{ + function main($id, $mode) + { + global $db, $user, $auth, $template; + global $config, $SID, $phpbb_root_path, $phpbb_admin_path, $phpEx; + + $user->add_lang('acp/board'); + + $action = request_var('action', ''); + $submit = (isset($_POST['submit'])) ? true : false; + + switch ($mode) + { + case 'cookie': + $display_vars = array( + 'title' => 'ACP_COOKIE_SETTINGS', + 'vars' => array( + 'legend1' => 'ACP_COOKIE_SETTINGS', + 'cookie_domain' => array('lang' => 'COOKIE_DOMAIN', 'type' => 'text::255', 'explain' => false), + 'cookie_name' => array('lang' => 'COOKIE_NAME', 'type' => 'text::16', 'explain' => false), + 'cookie_path' => array('lang' => 'COOKIE_PATH', 'type' => 'text::255', 'explain' => false), + 'cookie_secure' => array('lang' => 'COOKIE_SECURE', 'type' => 'radio:disabled_enabled', 'explain' => true) + ) + ); + break; + + case 'avatar': + $display_vars = array( + 'title' => 'ACP_AVATAR_SETTINGS', + 'vars' => array( + 'legend1' => 'ACP_AVATAR_SETTINGS', + 'avatar_min_height' => false, 'avatar_min_width' => false, 'avatar_max_height' => false, 'avatar_max_width' => false, + + 'allow_avatar_local' => array('lang' => 'ALLOW_LOCAL', 'type' => 'radio:yes_no', 'explain' => false), + 'allow_avatar_remote' => array('lang' => 'ALLOW_REMOTE', 'type' => 'radio:yes_no', 'explain' => true), + 'allow_avatar_upload' => array('lang' => 'ALLOW_UPLOAD', 'type' => 'radio:yes_no', 'explain' => false), + 'avatar_filesize' => array('lang' => 'MAX_FILESIZE', 'type' => 'text:4:10', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']), + 'avatar_min' => array('lang' => 'MIN_AVATAR_SIZE', 'type' => 'dimension:3:4', 'explain' => true), + 'avatar_max' => array('lang' => 'MAX_AVATAR_SIZE', 'type' => 'dimension:3:4', 'explain' => true), + 'avatar_path' => array('lang' => 'AVATAR_STORAGE_PATH', 'type' => 'text:20:255', 'explain' => true), + 'avatar_gallery_path' => array('lang' => 'AVATAR_GALLERY_PATH', 'type' => 'text:20:255', 'explain' => true) + ) + ); + break; + + case 'settings': + $display_vars = array( + 'title' => 'ACP_BOARD_SETTINGS', + 'vars' => array( + 'legend1' => 'GENERAL_SETTINGS', + 'sitename' => array('lang' => 'SITE_NAME', 'type' => 'text:40:255', 'explain' => false), + 'site_desc' => array('lang' => 'SITE_DESC', 'type' => 'text:40:255', 'explain' => false), + 'board_disable' => array('lang' => 'DISABLE_BOARD', 'type' => 'custom', 'method' => 'board_disable', 'explain' => true), + 'board_disable_msg' => false, 'max_name_chars' => false, 'max_pass_chars' => false, 'bump_type' => false, + + 'legend2' => 'COPPA', + 'coppa_enable' => array('lang' => 'ENABLE_COPPA', 'type' => 'radio:yes_no', 'explain' => true), + 'coppa_mail' => array('lang' => 'COPPA_MAIL', 'type' => 'textarea:5:40', 'explain' => true), + 'coppa_fax' => array('lang' => 'COPPA_FAX', 'type' => 'text:25:100', 'explain' => false), + + 'legend3' => 'REGISTRATION', + 'require_activation'=> array('lang' => 'ACC_ACTIVATION', 'type' => 'custom', 'method' => 'select_acc_activation', 'explain' => true), + 'enable_confirm' => array('lang' => 'VISUAL_CONFIRM', 'type' => 'radio:yes_no', 'explain' => true), + 'max_reg_attempts' => array('lang' => 'REG_LIMIT', 'type' => 'text:4:4', 'explain' => true), + 'min_name_chars' => array('lang' => 'USERNAME_LENGTH', 'type' => 'custom', 'method' => 'username_length', 'explain' => true), + 'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'type' => 'custom', 'method' => 'password_length', 'explain' => true), + 'allow_name_chars' => array('lang' => 'USERNAME_CHARS', 'type' => 'select', 'method' => 'select_username_chars', 'explain' => true), + 'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true), + 'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'type' => 'text:3:3', 'explain' => true), + 'allow_emailreuse' => array('lang' => 'ALLOW_EMAIL_REUSE', 'type' => 'radio:yes_no', 'explain' => true), + + 'legend4' => 'POSTING', + 'edit_time' => array('lang' => 'EDIT_TIME', 'type' => 'text:3:3', 'explain' => true), + 'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'type' => 'radio:yes_no', 'explain' => true), + 'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'type' => 'text:3:4', 'explain' => true), + 'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true), + 'topics_per_page' => array('lang' => 'TOPICS_PER_PAGE', 'type' => 'text:3:4', 'explain' => false), + 'posts_per_page' => array('lang' => 'POSTS_PER_PAGE', 'type' => 'text:3:4', 'explain' => false), + 'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'type' => 'text:3:4', 'explain' => false), + 'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'type' => 'text:4:4', 'explain' => false), + 'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'type' => 'text:4:6', 'explain' => true), + 'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'type' => 'text:4:4', 'explain' => true), + 'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'type' => 'text:4:4', 'explain' => true) + ) + ); + break; + + case 'default': + $display_vars = array( + 'title' => 'ACP_BOARD_DEFAULTS', + 'vars' => array( + 'legend1' => 'GENERAL_SETTINGS', + 'default_style' => array('lang' => 'DEFAULT_STYLE', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', true), 'explain' => false), + 'override_user_style' => array('lang' => 'OVERRIDE_STYLE', 'type' => 'radio:yes_no', 'explain' => true), + 'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false), + 'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'type' => 'text::255', 'explain' => true), + 'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'type' => 'select', 'function' => 'tz_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false), + 'board_dst' => array('lang' => 'SYSTEM_DST', 'type' => 'radio:yes_no', 'explain' => false), + 'allow_html_tags' => array('lang' => 'ALLOWED_TAGS', 'type' => 'text:30:255', 'explain' => true), + 'max_sig_chars' => array('lang' => 'MAX_SIG_LENGTH', 'type' => 'text:5:4', 'explain' => true), + + 'legend2' => 'GENERAL_OPTIONS', + 'allow_privmsg' => array('lang' => 'BOARD_PM', 'type' => 'radio:yes_no', 'explain' => true), + 'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'type' => 'radio:yes_no', 'explain' => false), + 'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'type' => 'radio:yes_no', 'explain' => false), + 'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'type' => 'radio:yes_no', 'explain' => false), + 'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false), + 'allow_html' => array('lang' => 'ALLOW_HTML', 'type' => 'radio:yes_no', 'explain' => false), + 'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'type' => 'radio:yes_no', 'explain' => false), + 'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'type' => 'radio:yes_no', 'explain' => false), + 'allow_sig' => array('lang' => 'ALLOW_SIG', 'type' => 'radio:yes_no', 'explain' => false), + 'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'type' => 'radio:yes_no', 'explain' => true), + 'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'type' => 'radio:yes_no', 'explain' => true) + ) + ); + break; + + case 'load': + $display_vars = array( + 'title' => 'ACP_LOAD_SETTINGS', + 'vars' => array( + 'legend1' => 'GENERAL_SETTINGS', + 'limit_load' => array('lang' => 'LIMIT_LOAD', 'type' => 'text:4:4', 'explain' => true), + 'session_length' => array('lang' => 'SESSION_LENGTH', 'type' => 'text:5:5', 'explain' => true), + 'active_sessions' => array('lang' => 'LIMIT_SESSIONS', 'type' => 'text:4:4', 'explain' => true), + 'search_interval' => array('lang' => 'SEARCH_INTERVAL', 'type' => 'text:3:4', 'explain' => true), + 'min_search_chars' => array('lang' => 'MIN_SEARCH_CHARS', 'type' => 'text:3:3', 'explain' => true), + 'max_search_chars' => array('lang' => 'MAX_SEARCH_CHARS', 'type' => 'text:3:3', 'explain' => true), + 'load_online_time' => array('lang' => 'ONLINE_LENGTH', 'type' => 'text:4:3', 'explain' => true), + + 'legend2' => 'GENERAL_OPTIONS', + 'load_db_track' => array('lang' => 'YES_POST_MARKING', 'type' => 'radio:yes_no', 'explain' => true), + 'load_db_lastread' => array('lang' => 'YES_READ_MARKING', 'type' => 'radio:yes_no', 'explain' => true), + 'load_online' => array('lang' => 'YES_ONLINE', 'type' => 'radio:yes_no', 'explain' => true), + 'load_onlinetrack' => array('lang' => 'YES_ONLINE_TRACK', 'type' => 'radio:yes_no', 'explain' => true), + 'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'type' => 'radio:yes_no', 'explain' => false), + 'load_moderators' => array('lang' => 'YES_MODERATORS', 'type' => 'radio:yes_no', 'explain' => false), + 'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'type' => 'radio:yes_no', 'explain' => false), + 'load_search' => array('lang' => 'YES_SEARCH', 'type' => 'radio:yes_no', 'explain' => true), + 'load_search_upd' => array('lang' => 'YES_SEARCH_UPDATE', 'type' => 'radio:yes_no', 'explain' => true), + // 'load_search_phr' => array('lang' => 'YES_SEARCH_PHRASE', 'type' => 'radio:yes_no', 'explain' => true), + 'load_tplcompile' => array('lang' => 'RECOMPILE_TEMPLATES', 'type' => 'radio:yes_no', 'explain' => true) + ) + ); + break; + + case 'auth': + $display_vars = array( + 'title' => 'ACP_AUTH_SETTINGS', + 'vars' => array( + 'legend1' => 'ACP_AUTH_SETTINGS', + 'auth_method' => array('lang' => 'AUTH_METHOD', 'type' => 'select', 'method' => 'select_auth_method', 'explain' => false) + ) + ); + break; + + case 'server': + $display_vars = array( + 'title' => 'ACP_SERVER_SETTINGS', + 'vars' => array( + 'legend1' => 'ACP_SERVER_SETTINGS', + 'server_name' => array('lang' => 'SERVER_NAME', 'type' => 'text:40:255', 'explain' => true), + 'server_port' => array('lang' => 'SERVER_PORT', 'type' => 'text:5:5', 'explain' => true), + 'script_path' => array('lang' => 'SCRIPT_PATH', 'type' => 'text::255', 'explain' => true), + 'ip_check' => array('lang' => 'IP_VALID', 'type' => 'custom', 'method' => 'select_ip_check', 'explain' => true), + 'browser_check' => array('lang' => 'BROWSER_VALID', 'type' => 'radio:yes_no', 'explain' => true), + 'gzip_compress' => array('lang' => 'ENABLE_GZIP', 'type' => 'radio:yes_no', 'explain' => false), + + 'legend2' => 'PATH_SETTINGS', + 'smilies_path' => array('lang' => 'SMILIES_PATH', 'type' => 'text:20:255', 'explain' => true), + 'icons_path' => array('lang' => 'ICONS_PATH', 'type' => 'text:20:255', 'explain' => true), + 'upload_icons_path' => array('lang' => 'UPLOAD_ICONS_PATH', 'type' => 'text:20:255', 'explain' => true), + 'ranks_path' => array('lang' => 'RANKS_PATH', 'type' => 'text:20:255', 'explain' => true) + ) + ); + break; + + case 'email': + $display_vars = array( + 'title' => 'ACP_EMAIL_SETTINGS', + 'vars' => array( + 'legend1' => 'GENERAL_SETTINGS', + 'email_enable' => array('lang' => 'ENABLE_EMAIL', 'type' => 'radio:enabled_disabled', 'explain' => true), + 'board_email_form' => array('lang' => 'BOARD_EMAIL_FORM', 'type' => 'radio:enabled_disabled', 'explain' => true), + 'email_function_name' => array('lang' => 'EMAIL_FUNCTION_NAME', 'type' => 'text:20:50', 'explain' => true), + 'email_package_size' => array('lang' => 'EMAIL_PACKAGE_SIZE', 'type' => 'text:5:5', 'explain' => true), + 'board_contact' => array('lang' => 'CONTACT_EMAIL', 'type' => 'text:25:100', 'explain' => true), + 'board_email' => array('lang' => 'ADMIN_EMAIL', 'type' => 'text:25:100', 'explain' => true), + 'board_email_sig' => array('lang' => 'EMAIL_SIG', 'type' => 'textarea:5:30', 'explain' => true), + + 'legend2' => 'SMTP_SETTINGS', + 'smtp_delivery' => array('lang' => 'USE_SMTP', 'type' => 'radio:yes_no', 'explain' => true), + 'smtp_host' => array('lang' => 'SMTP_SERVER', 'type' => 'text:25:50', 'explain' => false), + 'smtp_port' => array('lang' => 'SMTP_PORT', 'type' => 'text:4:5', 'explain' => true), + 'smtp_auth_method' => array('lang' => 'SMTP_AUTH_METHOD', 'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true), + 'smtp_username' => array('lang' => 'SMTP_USERNAME', 'type' => 'text:25:255', 'explain' => true), + 'smtp_password' => array('lang' => 'SMTP_PASSWORD', 'type' => 'password:25:255', 'explain' => true) + ) + ); + break; + + case 'message': + $display_vars = array( + 'title' => 'ACP_MESSAGE_SETTINGS', + 'lang' => 'ucp', + 'vars' => array( + 'legend1' => 'GENERAL_SETTINGS', + 'pm_max_boxes' => array('lang' => 'BOXES_MAX', 'type' => 'text:4:4', 'explain' => true), + 'pm_max_msgs' => array('lang' => 'BOXES_LIMIT', 'type' => 'text:4:4', 'explain' => true), + 'full_folder_action' => array('lang' => 'FULL_FOLDER_ACTION', 'type' => 'select', 'method' => 'full_folder_select', 'explain' => true), + 'pm_edit_time' => array('lang' => 'PM_EDIT_TIME', 'type' => 'text:3:3', 'explain' => true), + + 'legend2' => 'GENERAL_OPTIONS', + 'allow_mass_pm' => array('lang' => 'ALLOW_MASS_PM', 'type' => 'radio:yes_no', 'explain' => false), + 'auth_html_pm' => array('lang' => 'ALLOW_HTML_PM', 'type' => 'radio:yes_no', 'explain' => false), + 'auth_bbcode_pm' => array('lang' => 'ALLOW_BBCODE_PM', 'type' => 'radio:yes_no', 'explain' => false), + 'auth_smilies_pm' => array('lang' => 'ALLOW_SMILIES_PM', 'type' => 'radio:yes_no', 'explain' => false), + 'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false), + 'auth_download_pm' => array('lang' => 'ALLOW_DOWNLOAD_PM', 'type' => 'radio:yes_no', 'explain' => false), + 'allow_sig_pm' => array('lang' => 'ALLOW_SIG_PM', 'type' => 'radio:yes_no', 'explain' => false), + 'auth_report_pm' => array('lang' => 'ALLOW_REPORT_PM', 'type' => 'radio:yes_no', 'explain' => false), + 'auth_quote_pm' => array('lang' => 'ALLOW_QUOTE_PM', 'type' => 'radio:yes_no', 'explain' => false), + 'print_pm' => array('lang' => 'ALLOW_PRINT_PM', 'type' => 'radio:yes_no', 'explain' => false), + 'email_pm' => array('lang' => 'ALLOW_EMAIL_PM', 'type' => 'radio:yes_no', 'explain' => false), + 'forward_pm' => array('lang' => 'ALLOW_FORWARD_PM', 'type' => 'radio:yes_no', 'explain' => false), + 'auth_img_pm' => array('lang' => 'ALLOW_IMG_PM', 'type' => 'radio:yes_no', 'explain' => false), + 'auth_flash_pm' => array('lang' => 'ALLOW_FLASH_PM', 'type' => 'radio:yes_no', 'explain' => false), + 'enable_pm_icons' => array('lang' => 'ENABLE_PM_ICONS', 'type' => 'radio:yes_no', 'explain' => false) + ) + ); + break; + + default: + trigger_error('NO_MODE'); + } + + $u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode"; + + if (isset($display_vars['lang'])) + { + $user->add_lang($display_vars['lang']); + } + + $this->new_config = $config; + $cfg_array = (isset($_REQUEST['config'])) ? request_var('config', array('' => '')) : $this->new_config; + + // We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to... + foreach ($display_vars['vars'] as $config_name => $null) + { + if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false) + { + continue; + } + + $config_value = $cfg_array[$config_name]; + $this->new_config[$config_name] = $config_value; + + if ($config_name == 'email_function_name') + { + $this->new_config['email_function_name'] = (empty($this->new_config['email_function_name']) || !function_exists($this->new_config['email_function_name'])) ? 'mail' : str_replace(array('(', ')'), array('', ''), trim($this->new_config['email_function_name'])); + } + + if ($submit) + { + set_config($config_name, $config_value); + } + } + + if ($submit) + { + add_log('admin', 'LOG_' . strtoupper($mode) . '_CONFIG'); + + trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($u_action)); + } + + $this->tpl_name = 'acp_board'; + + $template->assign_vars(array( + 'L_TITLE' => $user->lang[$display_vars['title']], + 'L_TITLE_EXPLAIN' => $user->lang[$display_vars['title'] . '_EXPLAIN'], + 'U_ACTION' => $u_action) + ); + + // Output relevant page + foreach ($display_vars['vars'] as $config_key => $vars) + { + + if (!is_array($vars) && strpos($config_key, 'legend') === false) + { + continue; + } + + if (strpos($config_key, 'legend') !== false) + { + $template->assign_block_vars('options', array( + 'S_LEGEND' => true, + 'LEGEND' => $user->lang[$vars]) + ); + + continue; + } + + $type = explode(':', $vars['type']); + + $template->assign_block_vars('options', array( + 'KEY' => $config_key, + 'TITLE' => $user->lang[$vars['lang']], + 'S_EXPLAIN' => $vars['explain'], + 'TITLE_EXPLAIN' => ($vars['explain']) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '', + 'CONTENT' => build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars), + ) + ); + + unset($display_vars['vars'][$config_key]); + } + + if ($mode == 'auth') + { + $template->assign_var('S_AUTH', true); + + $auth_plugins = array(); + + $dp = opendir($phpbb_root_path . 'includes/auth'); + while ($file = readdir($dp)) + { + if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file)) + { + $auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file); + } + } + + sort($auth_plugins); + + foreach ($auth_plugins as $method) + { + if ($method && file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx)) + { + include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx); + + $method = 'admin_' . $method; + if (function_exists($method)) + { + if ($fields = $method($new)) + { + // Check if we need to create config fields for this plugin + foreach ($fields['config'] as $field) + { + if (!isset($config[$field])) + { + set_config($field, ''); + } + } + } + + if ($fields['tpl']) + { + $template->assign_block_vars('auth_tpl', array( + 'TPL' => $fields['tpl']) + ); + } + unset($fields); + } + } + } + } + } + + function select_auth_method($selected_method, $key = '') + { + global $new, $phpbb_root_path, $phpEx; + + $auth_plugins = array(); + + $dp = opendir($phpbb_root_path . 'includes/auth'); + while ($file = readdir($dp)) + { + if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file)) + { + $auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file); + } + } + + sort($auth_plugins); + + $auth_select = ''; + foreach ($auth_plugins as $method) + { + $selected = ($selected_method == $method) ? ' selected="selected"' : ''; + $auth_select .= '<option value="' . $method . '"' . $selected . '>' . ucfirst($method) . '</option>'; + } + + return $auth_select; + } + + function mail_auth_select($selected_method, $key = '') + { + global $user; + + $auth_methods = array('PLAIN', 'LOGIN', 'CRAM-MD5', 'DIGEST-MD5', 'POP-BEFORE-SMTP'); + $s_smtp_auth_options = ''; + + foreach ($auth_methods as $method) + { + $s_smtp_auth_options .= '<option value="' . $method . '"' . (($selected_method == $method) ? ' selected="selected"' : '') . '>' . $user->lang['SMTP_' . str_replace('-', '_', $method)] . '</option>'; + } + + return $s_smtp_auth_options; + } + + function full_folder_select($value, $key = '') + { + global $user; + + return '<option value="1"' . (($value == 1) ? ' selected="selected"' : '') . '>' . $user->lang['DELETE_OLDEST_MESSAGES'] . '</option><option value="2"' . (($value == 2) ? ' selected="selected"' : '') . '>' . $user->lang['HOLD_NEW_MESSAGES'] . '</option>'; + } + + function select_ip_check($value, $key = '') + { + $radio_ary = array(4 => 'ALL', 3 => 'CLASS_C', 2 => 'CLASS_B', 0 => 'NONE'); + + return h_radio('config[ip_check]', $radio_ary, $value, $key); + } + + function select_acc_activation($value, $key = '') + { + global $user, $config; + + $radio_ary = array(USER_ACTIVATION_DISABLE => 'ACC_DISABLE', USER_ACTIVATION_NONE => 'ACC_NONE'); + if ($config['email_enable']) + { + $radio_ary += array(USER_ACTIVATION_SELF => 'ACC_USER', USER_ACTIVATION_ADMIN => 'ACC_ADMIN'); + } + + return h_radio('config[require_activation]', $radio_ary, $value, $key); + } + + function username_length($value, $key = '') + { + global $new, $user; + + return '<input id="' . $key . '" type="text" size="3" maxlength="3" name="config[min_name_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . ' <input type="text" size="3" maxlength="3" name="config[max_name_chars]" value="' . $new['max_name_chars'] . '" /> ' . $user->lang['MAX_CHARS']; + } + + function select_username_chars($selected_value, $key) + { + global $user; + + $user_char_ary = array('USERNAME_CHARS_ANY' => '.*', 'USERNAME_ALPHA_ONLY' => '[\w]+', 'USERNAME_ALPHA_SPACERS' => '[\w_\+\. \-\[\]]+'); + $user_char_options = ''; + foreach ($user_char_ary as $lang => $value) + { + $selected = ($selected_value == $value) ? ' selected="selected"' : ''; + $user_char_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$lang] . '</option>'; + } + + return $user_char_options; + } + + function password_length($value, $key) + { + global $new, $user; + + return '<input id="' . $key . '" type="text" size="3" maxlength="3" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . ' <input type="text" size="3" maxlength="3" name="config[max_pass_chars]" value="' . $new['max_pass_chars'] . '" /> ' . $user->lang['MAX_CHARS']; + } + + function select_password_chars($selected_value, $key) + { + global $user; + + $pass_type_ary = array('PASS_TYPE_ANY' => '.*', 'PASS_TYPE_CASE' => '[a-zA-Z]', 'PASS_TYPE_ALPHA' => '[a-zA-Z0-9]', 'PASS_TYPE_SYMBOL' => '[a-zA-Z\W]'); + $pass_char_options = ''; + foreach ($pass_type_ary as $lang => $value) + { + $selected = ($selected_value == $value) ? ' selected="selected"' : ''; + $pass_char_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$lang] . '</option>'; + } + + return $pass_char_options; + } + + function bump_interval($value, $key) + { + global $new, $user; + + $s_bump_type = ''; + $types = array('m' => 'MINUTES', 'h' => 'HOURS', 'd' => 'DAYS'); + foreach ($types as $type => $lang) + { + $selected = ($new['bump_type'] == $type) ? 'selected="selected" ' : ''; + $s_bump_type .= '<option value="' . $type . '" ' . $selected . '>' . $user->lang[$lang] . '</option>'; + } + + return '<input id="' . $key . '" type="text" size="3" maxlength="4" name="config[bump_interval]" value="' . $value . '" /> <select name="config[bump_type]">' . $s_bump_type . '</select>'; + } + + function board_disable($value, $key) + { + global $new, $user; + + $radio_ary = array(1 => 'YES', 0 => 'NO'); + + return h_radio('config[board_disable]', $radio_ary, $value) . '<br /><input id="' . $key . '" type="text" name="config[board_disable_msg]" maxlength="255" size="40" value="' . $new['board_disable_msg'] . '" />'; + } +} + +/** +* @package module_install +*/ +class acp_board_info +{ + function module() + { + return array( + 'filename' => 'acp_board', + 'title' => 'Board Management', + 'version' => '1.0.0', + 'modes' => array( + 'auth' => array('title' => 'ACP_AUTH_SETTINGS', 'auth' => 'acl_a_server'), + 'avatar' => array('title' => 'ACP_AVATAR_SETTINGS', 'auth' => 'acl_a_board'), + 'default' => array('title' => 'ACP_BOARD_DEFAULTS', 'auth' => 'acl_a_defaults'), + 'settings' => array('title' => 'ACP_BOARD_SETTINGS', 'auth' => 'acl_a_board'), + 'cookie' => array('title' => 'ACP_COOKIE_SETTINGS', 'auth' => 'acl_a_cookies'), + 'email' => array('title' => 'ACP_EMAIL_SETTINGS', 'auth' => 'acl_a_server'), + 'load' => array('title' => 'ACP_LOAD_SETTINGS', 'auth' => 'acl_a_server'), + 'server' => array('title' => 'ACP_SERVER_SETTINGS', 'auth' => 'acl_a_server'), + 'message' => array('title' => 'ACP_MESSAGE_SETTINGS', 'auth' => 'acl_a_defaults'), + ), + ); + } + + function install() + { + } + + function uninstall() + { + } +} + +?>
\ No newline at end of file diff --git a/phpBB/includes/acp/acp_bots.php b/phpBB/includes/acp/acp_bots.php new file mode 100644 index 0000000000..0dc1f8f148 --- /dev/null +++ b/phpBB/includes/acp/acp_bots.php @@ -0,0 +1,351 @@ +<?php +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package acp +*/ +class acp_bots +{ + function main($id, $mode) + { + global $config, $db, $user, $auth, $template, $cache; + global $SID, $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix; + + $action = request_var('action', ''); + $submit = (isset($_POST['submit'])) ? true : false; + $mark = request_var('mark', array(0)); + $bot_id = request_var('id', 0); + + if (isset($_POST['add'])) + { + $action = 'add'; + } + + $error = array(); + + $user->add_lang('acp/bots'); + $this->tpl_name = 'acp_bots'; + + $u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode"; + + // User wants to do something, how inconsiderate of them! + switch ($action) + { + case 'activate': + if ($bot_id || sizeof($mark)) + { + $sql_id = ($bot_id) ? " = $bot_id" : ' IN (' . implode(', ', $mark) . ')'; + + $sql = 'UPDATE ' . BOTS_TABLE . " + SET bot_active = 1 + WHERE bot_id $sql_id"; + $db->sql_query($sql); + } + + $cache->destroy('bots'); + break; + + case 'deactivate': + if ($bot_id || sizeof($mark)) + { + $sql_id = ($bot_id) ? " = $bot_id" : ' IN (' . implode(', ', $mark) . ')'; + + $sql = 'UPDATE ' . BOTS_TABLE . " + SET bot_active = 0 + WHERE bot_id $sql_id"; + $db->sql_query($sql); + } + + $cache->destroy('bots'); + break; + + case 'delete': + if ($bot_id || sizeof($mark)) + { + // We need to delete the relevant user, usergroup and bot entries ... + $sql_id = ($bot_id) ? " = $bot_id" : ' IN (' . implode(', ', $mark) . ')'; + + $sql = 'SELECT bot_name, user_id + FROM ' . BOTS_TABLE . " + WHERE bot_id $sql_id"; + $result = $db->sql_query($sql); + + $user_id_ary = $bot_name_ary = array(); + while ($row = $db->sql_fetchrow($result)) + { + $user_id_ary[] = (int) $row['user_id']; + $bot_name_ary[] = $row['bot_name']; + } + $db->sql_freeresult($result); + + $db->sql_transaction(); + + $sql = 'DELETE FROM ' . BOTS_TABLE . " + WHERE bot_id $sql_id"; + $db->sql_query($sql); + + foreach (array(USERS_TABLE, USER_GROUP_TABLE) as $table) + { + $sql = "DELETE FROM $table + WHERE user_id IN (" . implode(', ', $user_id_ary) . ')'; + $db->sql_query($sql); + } + + $db->sql_transaction('commit'); + + $cache->destroy('bots'); + + add_log('admin', 'LOG_BOT_DELETE', implode(', ', $bot_name_ary)); + trigger_error($user->lang['BOT_DELETED'] . adm_back_link($u_action)); + } + break; + + case 'edit': + case 'add': + $bot_row = array( + 'bot_name' => request_var('bot_name', ''), + 'bot_agent' => request_var('bot_agent', ''), + 'bot_ip' => request_var('bot_ip', ''), + 'bot_active' => request_var('bot_active', true), + 'bot_lang' => request_var('bot_lang', $config['default_lang']), + 'bot_style' => request_var('bot_style' , $config['default_style']), + ); + + if ($submit) + { + if (!$bot_row['bot_agent'] && !$bot_row['bot_ip']) + { + $error[] = $user->lang['ERR_BOT_NO_MATCHES']; + } + + if ($bot_row['bot_ip'] && !preg_match('#^[\d\.,:]+$#', $bot_row['bot_ip'])) + { + if (!$ip_list = gethostbynamel($bot_row['bot_ip'])) + { + $error[] = $user->lang['ERR_BOT_NO_IP']; + } + else + { + $bot_row['bot_ip'] = implode(',', $ip_list); + } + } + $bot_row['bot_ip'] = str_replace(' ', '', $bot_row['bot_ip']); + + if (!sizeof($error)) + { + $db->sql_transaction(); + + // New bot? Create a new user and group entry + if ($action == 'add') + { + $sql = 'SELECT group_id, group_colour + FROM ' . GROUPS_TABLE . " + WHERE group_name = 'BOTS' + AND group_type = " . GROUP_SPECIAL; + $result = $db->sql_query($sql); + $group_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$group_row) + { + trigger_error($user->lang['NO_GROUP'] . adm_back_link($u_action . "&id=$bot_id&action=$action")); + } + + $sql = 'INSERT INTO ' . USERS_TABLE . ' ' . $db->sql_build_array('INSERT', array( + 'group_id' => (int) $group_row['group_id'], + 'username' => (string) $bot_row['bot_name'], + 'user_type' => (int) USER_IGNORE, + 'user_colour' => (string) $group_row['group_colour'], + 'user_lang' => (string) $bot_row['bot_lang'], + 'user_style' => (int) $bot_row['bot_style'], + 'user_options' => 0) + ); + $db->sql_query($sql); + + $user_id = $db->sql_nextid(); + + // Add to Bots usergroup + $sql = 'INSERT INTO ' . USER_GROUP_TABLE . ' ' . $db->sql_build_array('INSERT', array( + 'user_id' => $user_id, + 'group_id' => $group_row['group_id']) + ); + $db->sql_query($sql); + + $sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array( + 'user_id' => (int) $user_id, + 'bot_name' => (string) $bot_row['bot_name'], + 'bot_active' => (int) $bot_row['bot_active'], + 'bot_agent' => (string) $bot_row['bot_agent'], + 'bot_ip' => (string) $bot_row['bot_ip']) + ); + $db->sql_query($sql); + + $log = 'ADDED'; + } + else if ($bot_id) + { + $sql = 'SELECT user_id + FROM ' . BOTS_TABLE . " + WHERE bot_id = $bot_id"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$row) + { + trigger_error($user->lang['NO_BOT'] . adm_back_link($u_action . "&id=$bot_id&action=$action")); + } + + $sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array( + 'user_style' => (int) $bot_row['bot_style'], + 'user_lang' => (string) $bot_row['bot_lang']) + ) . " WHERE user_id = {$row['user_id']}"; + $db->sql_query($sql); + + $sql = 'UPDATE ' . BOTS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array( + 'bot_name' => (string) $bot_row['bot_name'], + 'bot_active' => (int) $bot_row['bot_active'], + 'bot_agent' => (string) $bot_row['bot_agent'], + 'bot_ip' => (string) $bot_row['bot_ip']) + ) . " WHERE bot_id = $bot_id"; + $db->sql_query($sql); + + $log = 'UPDATED'; + } + + $db->sql_transaction('commit'); + + $cache->destroy('bots'); + + add_log('admin', 'LOG_BOT_' . $log, $bot_row['bot_name']); + trigger_error($user->lang['BOT_' . $log] . adm_back_link($u_action . "&id=$bot_id&action=$action")); + } + } + else if ($bot_id) + { + $sql = 'SELECT b.*, u.user_lang, u.user_style + FROM ' . BOTS_TABLE . ' b, ' . USERS_TABLE . " u + WHERE b.bot_id = $bot_id + AND u.user_id = b.user_id"; + $result = $db->sql_query($sql); + $bot_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$bot_row) + { + trigger_error($user->lang['NO_BOT'] . adm_back_link($u_action . "&id=$bot_id&action=$action")); + } + + $bot_row['bot_lang'] = $bot_row['user_lang']; + $bot_row['bot_style'] = $bot_row['user_style']; + unset($bot_row['user_lang'], $bot_row['user_style']); + } + + $s_active_options = ''; + foreach (array('0' => 'NO', '1' => 'YES') as $value => $lang) + { + $selected = ($bot_row['bot_active'] == $value) ? ' selected="selected"' : ''; + $s_active_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$lang] . '</option>'; + } + + $style_select = style_select($bot_row['bot_style'], true); + $lang_select = language_select($bot_row['bot_lang']); + + $l_title = ($action == 'edit') ? 'EDIT' : 'ADD'; + + $template->assign_vars(array( + 'L_TITLE' => $user->lang['BOT_' . $l_title], + 'U_ACTION' => $u_action . "&id=$bot_id&action=$action", + 'U_BACK' => $u_action, + 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '', + + 'BOT_NAME' => $bot_row['bot_name'], + 'BOT_IP' => $bot_row['bot_ip'], + 'BOT_AGENT' => $bot_row['bot_agent'], + + 'S_EDIT_BOT' => true, + 'S_ACTIVE_OPTIONS' => $s_active_options, + 'S_STYLE_OPTIONS' => $style_select, + 'S_LANG_OPTIONS' => $lang_select, + 'S_ERROR' => (sizeof($error)) ? true : false, + ) + ); + + return; + + break; + } + + $s_options = ''; + foreach (array('activate' => 'BOT_ACTIVATE', 'deactivate' => 'BOT_DEACTIVATE', 'delete' => 'DELETE') as $value => $lang) + { + $s_options .= '<option value="' . $value . '">' . $user->lang[$lang] . '</option>'; + } + + $template->assign_vars(array( + 'U_ACTION' => $u_action, + 'S_BOT_OPTIONS' => $s_options) + ); + + $sql = 'SELECT b.bot_id, b.bot_name, b.bot_active, u.user_lastvisit + FROM ' . BOTS_TABLE . ' b, ' . USERS_TABLE . ' u + WHERE u.user_id = b.user_id + ORDER BY u.user_lastvisit DESC'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $active_lang = (!$row['bot_active']) ? 'BOT_ACTIVATE' : 'BOT_DEACTIVATE'; + $active_value = (!$row['bot_active']) ? 'activate' : 'deactivate'; + + $template->assign_block_vars('bots', array( + 'BOT_NAME' => $row['bot_name'], + 'BOT_ID' => $row['bot_id'], + 'LAST_VISIT' => ($row['user_lastvisit']) ? $user->format_date($row['user_lastvisit']) : $user->lang['BOT_NEVER'], + + 'U_ACTIVATE_DEACTIVATE' => $u_action . "&id={$row['bot_id']}&action=$active_value", + 'L_ACTIVATE_DEACTIVATE' => $user->lang[$active_lang], + 'U_EDIT' => $u_action . "&id={$row['bot_id']}&action=edit", + 'U_DELETE' => $u_action . "&id={$row['bot_id']}&action=delete") + ); + } + $db->sql_freeresult($result); + + } +} + +/** +* @package module_install +*/ +class acp_bots_info +{ + function module() + { + return array( + 'filename' => 'acp_bots', + 'title' => 'ACP_BOTS', + 'version' => '1.0.0', + 'modes' => array( + 'bots' => array('title' => 'ACP_BOTS', 'auth' => 'acl_a_server'), + ), + ); + } + + function install() + { + } + + function uninstall() + { + } +} + + +?>
\ No newline at end of file diff --git a/phpBB/includes/acp/acp_jabber.php b/phpBB/includes/acp/acp_jabber.php new file mode 100644 index 0000000000..d41e169754 --- /dev/null +++ b/phpBB/includes/acp/acp_jabber.php @@ -0,0 +1,188 @@ +<?php +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +* @todo Check/enter/update transport info +*/ + +/** +* @package acp +*/ +class acp_jabber +{ + function main($id, $mode) + { + global $db, $user, $auth, $template; + global $config, $SID, $phpbb_root_path, $phpbb_admin_path, $phpEx; + + $user->add_lang('acp/board'); + + include_once($phpbb_root_path . 'includes/functions_jabber.' . $phpEx); + + $action = request_var('action', ''); + $submit = (isset($_POST['submit'])) ? true : false; + + if ($mode != 'settings') + { + return; + } + + $u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode"; + $this->tpl_name = 'acp_jabber'; + + $jab_enable = request_var('jab_enable', $config['jab_enable']); + $jab_host = request_var('jab_host', $config['jab_host']); + $jab_port = request_var('jab_port', $config['jab_port']); + $jab_username = request_var('jab_username', $config['jab_username']); + $jab_password = request_var('jab_password', $config['jab_password']); + $jab_resource = request_var('jab_resource', $config['jab_resource']); + + $jabber = new jabber(); + $error = array(); + + // Setup the basis vars for jabber connection + $jabber->server = $jab_host; + $jabber->port = ($jab_port) ? $jab_port : 5222; + $jabber->username = $jab_username; + $jabber->password = $jab_password; + $jabber->resource = $jab_resource; + + // Are changing (or initialising) a new host or username? If so run some checks and + // try to create account if it doesn't exist + if ($jab_enable) + { + if ($jab_host != $config['jab_host'] || $jab_username != $config['jab_username']) + { + if (!$jabber->Connect()) + { + trigger_error('Could not connect to Jabber server' . adm_back_link($u_action)); + } + + // First we'll try to authorise using this account, if that fails we'll + // try to create it. + if (!($result = $jabber->SendAuth())) + { + if (($result = $jabber->AccountRegistration($config['board_email'], $config['sitename'])) <> 2) + { + $error[] = ($result == 1) ? $user->lang['ERR_JAB_USERNAME'] : sprintf($user->lang['ERR_JAB_REGISTER'], $result); + } + else + { + $message = $user->lang['JAB_REGISTERED']; + $log = 'JAB_REGISTER'; + } + } + else + { + $message = $user->lang['JAB_CHANGED']; + $log = 'JAB_CHANGED'; + } + + sleep(1); + $jabber->Disconnect(); + } + else if ($jab_password != $config['jab_password']) + { + if (!$jabber->Connect()) + { + trigger_error('Could not connect to Jabber server' . adm_back_link($u_action)); + } + + if (!$jabber->SendAuth()) + { + trigger_error('Could not authorise on Jabber server' . adm_back_link($u_action)); + } + $jabber->SendPresence(NULL, NULL, 'online'); + + if (($result = $jabber->ChangePassword($jab_password)) <> 2) + { + $error[] = ($result == 1) ? $user->lang['ERR_JAB_PASSCHG'] : sprintf($user->lang['ERR_JAB_PASSFAIL'], $result); + } + else + { + $message = $user->lang['JAB_PASS_CHANGED']; + $log = 'JAB_PASSCHG'; + } + + sleep(1); + $jabber->Disconnect(); + } + } + + // Pull relevant config data + $sql = 'SELECT * + FROM ' . CONFIG_TABLE . " + WHERE config_name LIKE 'jab_%'"; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $config_name = $row['config_name']; + $config_value = $row['config_value']; + + $default_config[$config_name] = $config_value; + $new[$config_name] = (isset($_POST[$config_name])) ? request_var($config_name, '') : $default_config[$config_name]; + + if ($submit && !sizeof($error)) + { + set_config($config_name, $new[$config_name]); + } + } + + if ($submit && !sizeof($error)) + { + add_log('admin', 'LOG_' . $log); + trigger_error($message . adm_back_link($u_action)); + } + + if (sizeof($error)) + { + $template->assign_vars(array( + 'S_WARNING' => true, + 'WARNING_MSG' => implode('<br />', $error)) + ); + } + + $template->assign_vars(array( + 'U_ACTION' => $u_action, + 'JAB_ENABLE' => $new['jab_enable'], + 'L_JAB_SERVER_EXPLAIN' => sprintf($user->lang['JAB_SERVER_EXPLAIN'], '<a href="http://www.jabber.org/user/publicservers.php" rel="external">', '</a>'), + 'JAB_HOST' => $new['jab_host'], + 'JAB_PORT' => $new['jab_port'], + 'JAB_USERNAME' => $new['jab_username'], + 'JAB_PASSWORD' => $new['jab_password'], + 'JAB_RESOURCE' => $new['jab_resource']) + ); + } +} + +/** +* @package module_install +*/ +class acp_jabber_info +{ + function module() + { + return array( + 'filename' => 'acp_jabber', + 'title' => 'Jabber', + 'version' => '1.0.0', + 'modes' => array( + 'settings' => array('title' => 'ACP_JABBER_SETTINGS', 'auth' => 'acl_a_server'), + ), + ); + } + + function install() + { + } + + function uninstall() + { + } +} +?>
\ No newline at end of file diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php new file mode 100644 index 0000000000..98d38789fe --- /dev/null +++ b/phpBB/includes/acp/acp_main.php @@ -0,0 +1,409 @@ +<?php +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package acp +*/ +class acp_main +{ + function main($id, $mode) + { + global $config, $db, $user, $auth, $template; + global $SID, $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix; + + $action = request_var('action', ''); + $mark = (isset($_REQUEST['mark'])) ? implode(', ', request_var('mark', array(0))) : ''; + + if ($mark) + { + switch ($action) + { + case 'activate': + case 'delete': + + if (!$auth->acl_get('a_user')) + { + trigger_error($user->lang['NO_ADMIN']); + } + + $sql = 'SELECT username + FROM ' . USERS_TABLE . " + WHERE user_id IN ($mark)"; + $result = $db->sql_query($sql); + + $user_affected = array(); + while ($row = $db->sql_fetchrow($result)) + { + $user_affected[] = $row['username']; + } + $db->sql_freeresult($result); + + if ($action == 'activate') + { + include($phpbb_root_path . 'includes/functions_user.php'); + $mark_ary = explode(', ', $mark); + + foreach ($mark_ary as $user_id) + { + user_active_flip($user_id, USER_INACTIVE); + } + } + else if ($action == 'delete') + { + $sql = 'DELETE FROM ' . USER_GROUP_TABLE . " WHERE user_id IN ($mark)"; + $db->sql_query($sql); + $sql = 'DELETE FROM ' . USERS_TABLE . " WHERE user_id IN ($mark)"; + $db->sql_query($sql); + + add_log('admin', 'LOG_INDEX_' . strtoupper($action), implode(', ', $user_affected)); + } + + if ($action != 'delete') + { + set_config('num_users', $config['num_users'] + $db->sql_affectedrows(), true); + } + + break; + + case 'remind': + if (!$auth->acl_get('a_user')) + { + trigger_error($user->lang['NO_ADMIN']); + } + + if (empty($config['email_enable'])) + { + trigger_error($user->lang['EMAIL_DISABLED']); + } + + $sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey + FROM ' . USERS_TABLE . " + WHERE user_id IN ($mark)"; + $result = $db->sql_query($sql); + + if ($row = $db->sql_fetchrow($result)) + { + // Send the messages + include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx); + + $messenger = new messenger(); + + $board_url = generate_board_url() . "/ucp.$phpEx?mode=activate"; + $sig = str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']); + + $usernames = array(); + do + { + $messenger->template('user_remind_inactive', $row['user_lang']); + + $messenger->replyto($config['board_email']); + $messenger->to($row['user_email'], $row['username']); + $messenger->im($row['user_jabber'], $row['username']); + + $messenger->assign_vars(array( + 'EMAIL_SIG' => $sig, + 'USERNAME' => $row['username'], + 'SITENAME' => $config['sitename'], + 'REGISTER_DATE' => $user->format_date($row['user_regdate']), + + 'U_ACTIVATE' => "$board_url&mode=activate&u=" . $row['user_id'] . '&k=' . $row['user_actkey']) + ); + + $messenger->send($row['user_notify_type']); + + $usernames[] = $row['username']; + } + while ($row = $db->sql_fetchrow($result)); + + $messenger->save_queue(); + + unset($email_list); + + add_log('admin', 'LOG_INDEX_REMIND', implode(', ', $usernames)); + unset($usernames); + } + $db->sql_freeresult($result); + + break; + } + } + + switch ($action) + { + case 'online': + if (!$auth->acl_get('a_defaults')) + { + trigger_error($user->lang['NO_ADMIN']); + } + + set_config('record_online_users', 1, true); + set_config('record_online_date', time(), true); + add_log('admin', 'LOG_RESET_ONLINE'); + break; + + case 'stats': + if (!$auth->acl_get('a_defaults')) + { + trigger_error($user->lang['NO_ADMIN']); + } + + $sql = 'SELECT COUNT(post_id) AS stat + FROM ' . POSTS_TABLE . ' + WHERE post_approved = 1'; + $result = $db->sql_query($sql); + + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + set_config('num_posts', (int) $row['stat'], true); + + $sql = 'SELECT COUNT(topic_id) AS stat + FROM ' . TOPICS_TABLE . ' + WHERE topic_approved = 1'; + $result = $db->sql_query($sql); + + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + set_config('num_topics', (int) $row['stat'], true); + + $sql = 'SELECT COUNT(user_id) AS stat + FROM ' . USERS_TABLE . ' + WHERE user_type IN (' . USER_NORMAL . ',' . USER_FOUNDER . ')'; + $result = $db->sql_query($sql); + + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + set_config('num_users', (int) $row['stat'], true); + + $sql = 'SELECT COUNT(attach_id) as stat + FROM ' . ATTACHMENTS_TABLE; + $result = $db->sql_query($sql); + + set_config('num_files', (int) $db->sql_fetchfield('stat', 0, $result), true); + $db->sql_freeresult($result); + + $sql = 'SELECT SUM(filesize) as stat + FROM ' . ATTACHMENTS_TABLE; + $result = $db->sql_query($sql); + + set_config('upload_dir_size', (int) $db->sql_fetchfield('stat', 0, $result), true); + $db->sql_freeresult($result); + + add_log('admin', 'LOG_RESYNC_STATS'); + break; + + case 'user': + if (!$auth->acl_get('a_defaults')) + { + trigger_error($user->lang['NO_ADMIN']); + } + + $post_count_ary = $auth->acl_getf('f_postcount'); + + $forum_ary = array(); + foreach ($post_count_ary as $forum_id => $allowed) + { + if ($allowed['f_postcount']) + { + $forum_ary[] = $forum_id; + } + } + + if (!sizeof($forum_ary)) + { + $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_posts = 0'); + } + else + { + $sql = 'SELECT COUNT(post_id) AS num_posts, poster_id + FROM ' . POSTS_TABLE . ' + WHERE poster_id <> ' . ANONYMOUS . ' + AND forum_id IN (' . implode(', ', $forum_ary) . ') + GROUP BY poster_id'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $db->sql_query('UPDATE ' . USERS_TABLE . " SET user_posts = {$row['num_posts']} WHERE user_id = {$row['poster_id']}"); + } + $db->sql_freeresult($result); + } + + add_log('admin', 'LOG_RESYNC_POSTCOUNTS'); + break; + + case 'date': + if (!$auth->acl_get('a_defaults')) + { + trigger_error($user->lang['NO_ADMIN']); + } + + set_config('board_startdate', time() - 1); + add_log('admin', 'LOG_RESET_DATE'); + break; + } + + // Get forum statistics + $total_posts = $config['num_posts']; + $total_topics = $config['num_topics']; + $total_users = $config['num_users']; + $total_files = $config['num_files']; + + $start_date = $user->format_date($config['board_startdate']); + + $boarddays = (time() - $config['board_startdate']) / 86400; + + $posts_per_day = sprintf('%.2f', $total_posts / $boarddays); + $topics_per_day = sprintf('%.2f', $total_topics / $boarddays); + $users_per_day = sprintf('%.2f', $total_users / $boarddays); + $files_per_day = sprintf('%.2f', $total_files / $boarddays); + + $upload_dir_size = ($config['upload_dir_size'] >= 1048576) ? sprintf('%.2f ' . $user->lang['MB'], ($config['upload_dir_size'] / 1048576)) : (($config['upload_dir_size'] >= 1024) ? sprintf('%.2f ' . $user->lang['KB'], ($config['upload_dir_size'] / 1024)) : sprintf('%.2f ' . $user->lang['BYTES'], $config['upload_dir_size'])); + + $avatar_dir_size = 0; + + if ($avatar_dir = @opendir($phpbb_root_path . $config['avatar_path'])) + { + while ($file = readdir($avatar_dir)) + { + if ($file{0} != '.') + { + $avatar_dir_size += filesize($phpbb_root_path . $config['avatar_path'] . '/' . $file); + } + } + @closedir($avatar_dir); + + // This bit of code translates the avatar directory size into human readable format + // Borrowed the code from the PHP.net annoted manual, origanally written by: + // Jesse (jesse@jess.on.ca) + $avatar_dir_size = ($avatar_dir_size >= 1048576) ? sprintf('%.2f ' . $user->lang['MB'], ($avatar_dir_size / 1048576)) : (($avatar_dir_size >= 1024) ? sprintf('%.2f ' . $user->lang['KB'], ($avatar_dir_size / 1024)) : sprintf('%.2f ' . $user->lang['BYTES'], $avatar_dir_size)); + } + else + { + // Couldn't open Avatar dir. + $avatar_dir_size = $user->lang['NOT_AVAILABLE']; + } + + if ($posts_per_day > $total_posts) + { + $posts_per_day = $total_posts; + } + + if ($topics_per_day > $total_topics) + { + $topics_per_day = $total_topics; + } + + if ($users_per_day > $total_users) + { + $users_per_day = $total_users; + } + + if ($files_per_day > $total_files) + { + $files_per_day = $total_files; + } + + $dbsize = get_database_size(); + $s_action_options = build_select(array('online' => 'RESET_ONLINE', 'date' => 'RESET_DATE', 'stats' => 'RESYNC_STATS', 'user' => 'RESYNC_POSTCOUNTS')); + + $template->assign_vars(array( + 'TOTAL_POSTS' => $total_posts, + 'POSTS_PER_DAY' => $posts_per_day, + 'TOTAL_TOPICS' => $total_topics, + 'TOPICS_PER_DAY' => $topics_per_day, + 'TOTAL_USERS' => $total_users, + 'USERS_PER_DAY' => $users_per_day, + 'TOTAL_FILES' => $total_files, + 'FILES_PER_DAY' => $files_per_day, + 'START_DATE' => $start_date, + 'AVATAR_DIR_SIZE' => $avatar_dir_size, + 'DBSIZE' => $dbsize, + 'UPLOAD_DIR_SIZE' => $upload_dir_size, + 'GZIP_COMPRESSION' => ($config['gzip_compress']) ? $user->lang['ON'] : $user->lang['OFF'], + + 'U_ACTION' => "{$phpbb_admin_path}index.$phpEx$SID", + + 'S_ACTION_OPTIONS' => $s_action_options, + ) + ); + + view_log('admin', $log_data, $log_count, 5); + + foreach ($log_data as $row) + { + $template->assign_block_vars('log', array( + 'USERNAME' => $row['username'], + 'IP' => $row['ip'], + 'DATE' => $user->format_date($row['time']), + 'ACTION' => $row['action']) + ); + } + + if ($auth->acl_get('a_user')) + { + $sql = 'SELECT user_id, username, user_regdate + FROM ' . USERS_TABLE . ' + WHERE user_type = ' . USER_INACTIVE . ' + ORDER BY user_regdate ASC'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $template->assign_block_vars('inactive', array( + 'DATE' => $user->format_date($row['user_regdate']), + 'USER_ID' => $row['user_id'], + 'USERNAME' => $row['username'], + 'U_USER_ADMIN' => "{$phpbb_admin_path}admin_users.$phpEx$SID&u={$row['user_id']}") + ); + } + + $option_ary = array('activate' => 'ACTIVATE', 'delete' => 'DELETE'); + if ($config['email_enable']) + { + $option_ary += array('remind' => 'REMIND'); + } + + $template->assign_vars(array( + 'S_INACTIVE_USERS' => true, + 'S_INACTIVE_OPTIONS' => build_select($option_ary)) + ); + } + + $this->tpl_name = 'acp_main'; + } +} + +/** +* @package module_install +*/ +class acp_main_info +{ + function module() + { + return array( + 'filename' => 'acp_main', + 'title' => 'ACP Index', + 'version' => '1.0.0', + 'modes' => array( + 'main' => array('title' => 'Index', 'auth' => ''), + ), + ); + } + + function install() + { + } + + function uninstall() + { + } +} + +?>
\ No newline at end of file diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php new file mode 100644 index 0000000000..8cd28faa39 --- /dev/null +++ b/phpBB/includes/acp/acp_modules.php @@ -0,0 +1,1006 @@ +<?php +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* - Able to check for new module versions (modes changed/adjusted/added/removed) +* Icons for: +* - module enabled and displayed (common) +* - module enabled and not displayed +* - module deactivated +* - category (enabled) +* - category disabled +*/ + +/** +* @package acp +*/ +class acp_modules +{ + var $mode = ''; + + function main($id, $mode) + { + global $db, $user, $auth, $template; + global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx, $SID; + + // Set a global define for modules we might include (the author is able to prevent executing of code with this) + define('MODULE_INCLUDE', true); + + $user->add_lang('acp/modules'); + + $this->tpl_name = 'acp_modules'; + + // module class + $this->module_class = $mode; + + if ($this->module_class == 'ucp') + { + $user->add_lang('ucp'); + } + + $u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode"; + $parent_id = request_var('parent_id', 0); + $module_id = request_var('m', 0); + $action = request_var('action', ''); + $errors = array(); + + switch ($action) + { + case 'delete': + if (!$module_id) + { + trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($u_action . '&parent_id=' . $parent_id)); + } + + if (confirm_box(true)) + { + $errors = $this->delete_module($module_id); + + if (!sizeof($errors)) + { + $this->remove_cache_file(); + trigger_error($user->lang['MODULE_DELETED'] . adm_back_link($u_action . '&parent_id=' . $parent_id)); + } + } + else + { + confirm_box(false, 'DELETE_MODULE', build_hidden_fields(array( + 'i' => $id, + 'mode' => $mode, + 'parent_id' => $parent_id, + 'module_id' => $module_id, + 'action' => $action, + ))); + } + + break; + + case 'enable': + case 'disable': + if (!$module_id) + { + trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($u_action . '&parent_id=' . $parent_id)); + } + + $sql = 'UPDATE ' . MODULES_TABLE . ' + SET module_enabled = ' . (($action == 'enable') ? 1 : 0) . " + WHERE module_id = $module_id"; + $db->sql_query($sql); + + add_log('admin', 'LOG_MODULE_' . strtoupper($action)); + $this->remove_cache_file(); + + break; + + case 'move_up': + case 'move_down': + if (!$module_id) + { + trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($u_action . '&parent_id=' . $parent_id)); + } + + $sql = 'SELECT parent_id, left_id, right_id, module_langname + FROM ' . MODULES_TABLE . " + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND module_id = $module_id"; + $result = $db->sql_query($sql); + + if (!($row = $db->sql_fetchrow($result))) + { + trigger_error($user->lang['NO_MODULE'] . adm_back_link($u_action . '&parent_id=' . $parent_id)); + } + $db->sql_freeresult($result); + + $module_info = array($module_id => $row); + + // Get the adjacent forum + $sql = 'SELECT module_id, left_id, right_id, module_langname + FROM ' . MODULES_TABLE . " + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND parent_id = {$row['parent_id']} + AND " . (($action == 'move_up') ? "right_id < {$row['right_id']} ORDER BY right_id DESC" : "left_id > {$row['left_id']} ORDER BY left_id ASC"); + $result = $db->sql_query_limit($sql, 1); + + if (!($row = $db->sql_fetchrow($result))) + { + // already on top or at bottom + break; + } + $db->sql_freeresult($result); + + $module_info[$row['module_id']] = $row; + + if ($action == 'move_up') + { + $up_id = $module_id; + $down_id = $row['module_id']; + } + else + { + $up_id = $row['module_id']; + $down_id = $module_id; + } + + $move_module_name = $this->lang_name($row['module_langname']); + $diff_up = $module_info[$up_id]['right_id'] - $module_info[$up_id]['left_id']; + $diff_down = $module_info[$down_id]['right_id'] - $module_info[$down_id]['left_id']; + + $ids = array(); + + $sql = 'SELECT module_id + FROM ' . MODULES_TABLE . " + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND left_id > " . $module_info[$up_id]['left_id'] . ' + AND right_id < ' . $module_info[$up_id]['right_id']; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $ids[] = $row['module_id']; + } + $db->sql_freeresult($result); + + // Start transaction + $db->sql_transaction('begin'); + + $sql = 'UPDATE ' . MODULES_TABLE . ' + SET left_id = left_id + ' . ($diff_up + 1) . ', right_id = right_id + ' . ($diff_up + 1) . " + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND left_id > " . $module_info[$down_id]['left_id'] . ' + AND right_id < ' . $module_info[$down_id]['right_id']; + $db->sql_query($sql); + + if (sizeof($ids)) + { + $sql = 'UPDATE ' . MODULES_TABLE . ' + SET left_id = left_id - ' . ($diff_down + 1) . ', right_id = right_id - ' . ($diff_down + 1) . " + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND module_id IN (" . implode(', ', $ids) . ')'; + $db->sql_query($sql); + } + + $sql = 'UPDATE ' . MODULES_TABLE . ' + SET left_id = ' . $module_info[$down_id]['left_id'] . ', right_id = ' . ($module_info[$down_id]['left_id'] + $diff_up) . " + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND module_id = $up_id"; + $db->sql_query($sql); + + $sql = 'UPDATE ' . MODULES_TABLE . ' + SET left_id = ' . ($module_info[$up_id]['right_id'] - $diff_down) . ', right_id = ' . $module_info[$up_id]['right_id'] . " + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND module_id = $down_id"; + $db->sql_query($sql); + + $db->sql_transaction('commit'); + + add_log('admin', 'LOG_MODULE_' . strtoupper($action), $move_module_name); + + // recalculate binary tree + recalc_btree('module_id', MODULES_TABLE, $this->module_class); + $this->remove_cache_file(); + + break; + + case 'quickadd': + $quick_install = request_var('quick_install', ''); + + if (confirm_box(true)) + { + if (!$quick_install || strpos($quick_install, '::') === false) + { + break; + } + + list($module_name, $module_mode) = explode('::', $quick_install); + + // Check if module name and mode exist... + $fileinfo = $this->get_module_infos($module_name); + $fileinfo = $fileinfo[$module_name]; + + if (isset($fileinfo['modes'][$module_mode])) + { + $module_data = array( + 'module_name' => $module_name, + 'module_enabled' => 0, + 'module_display' => (isset($fileinfo['modes'][$module_mode]['display'])) ? $fileinfo['modes'][$module_mode]['display'] : 1, + 'parent_id' => $parent_id, + 'module_class' => $this->module_class, + 'module_langname' => $fileinfo['modes'][$module_mode]['title'], + 'module_mode' => $module_mode, + 'module_auth' => $fileinfo['modes'][$module_mode]['auth'], + ); + + $errors = $this->update_module_data($module_data); + + if (!sizeof($errors)) + { + // recalculate binary tree + recalc_btree('module_id', MODULES_TABLE, $this->module_class); + $this->remove_cache_file(); + + trigger_error($user->lang['MODULE_ADDED'] . adm_back_link($u_action . '&parent_id=' . $parent_id)); + } + } + } + else + { + confirm_box(false, 'ADD_MODULE', build_hidden_fields(array( + 'i' => $id, + 'mode' => $mode, + 'parent_id' => $parent_id, + 'action' => 'quickadd', + 'quick_install' => $quick_install, + ))); + } + + break; + + case 'edit': + + if (!$module_id) + { + trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($u_action . '&parent_id=' . $parent_id)); + } + + $module_row = $this->get_module_row($module_id); + + // no break + + case 'add': + + if ($action == 'add') + { + $module_row = array( + 'module_name' => '', + 'module_enabled' => 0, + 'module_display' => 1, + 'parent_id' => 0, + 'module_langname' => request_var('module_langname', ''), + 'module_mode' => '', + 'module_auth' => '', + ); + } + + $module_data = array(); + + $module_data['module_name'] = request_var('module_name', (string) $module_row['module_name']); + $module_data['module_enabled'] = request_var('module_enabled', (int) $module_row['module_enabled']); + $module_data['module_display'] = request_var('module_display', (int) $module_row['module_display']); + $module_data['parent_id'] = request_var('parent_id', (int) $module_row['parent_id']); + $module_data['module_class'] = $this->module_class; + $module_data['module_langname'] = request_var('module_langname', (string) $module_row['module_langname']); + $module_data['module_mode'] = request_var('module_mode', (string) $module_row['module_mode']); + + $submit = (isset($_POST['submit'])) ? true : false; + + if ($submit) + { + if (!$module_data['module_langname']) + { + trigger_error($user->lang['NO_MODULE_LANGNAME'] . adm_back_link($u_action . '&parent_id=' . $parent_id)); + } + + $module_type = request_var('module_type', 'category'); + + if ($module_type == 'category') + { + $module_data['module_name'] = $module_data['module_mode'] = $module_data['module_auth'] = ''; + $module_data['module_display'] = 1; + } + + if ($action == 'edit') + { + $module_data['module_id'] = $module_id; + } + + // Adjust auth row + if ($module_data['module_name'] && $module_data['module_mode']) + { + $fileinfo = $this->get_module_infos($module_data['module_name']); + $module_data['module_auth'] = $fileinfo[$module_data['module_name']]['modes'][$module_data['module_mode']]['auth']; + } + + $errors = $this->update_module_data($module_data); + + if (!sizeof($errors)) + { + // recalculate binary tree + recalc_btree('module_id', MODULES_TABLE, $this->module_class); + $this->remove_cache_file(); + + trigger_error((($action == 'add') ? $user->lang['MODULE_ADDED'] : $user->lang['MODULE_EDITED']) . adm_back_link($u_action . '&parent_id=' . $parent_id)); + } + } + + // Category/not category? + $is_cat = (!$module_data['module_name']) ? true : false; + + // Get module informations + $module_infos = $this->get_module_infos(); + + // Build name options + $s_name_options = $s_mode_options = ''; + foreach ($module_infos as $option => $values) + { + if (!$module_data['module_name']) + { + $module_data['module_name'] = $option; + } + + // Name options + $s_name_options .= '<option value="' . $option . '"' . (($option == $module_data['module_name']) ? ' selected="selected"' : '') . '>' . $this->lang_name($values['title']) . ' [' . $this->module_class . '_' . $option . ']</option>'; + + $template->assign_block_vars('m_names', array('NAME' => str_replace("'", "\'", stripslashes($option)))); + + // Build module modes + foreach ($values['modes'] as $m_mode => $m_values) + { + if ($option == $module_data['module_name']) + { + $s_mode_options .= '<option value="' . $m_mode . '"' . (($m_mode == $module_data['module_mode']) ? ' selected="selected"' : '') . '>' . $this->lang_name($m_values['title']) . '</option>'; + } + + $template->assign_block_vars('m_names.modes', array( + 'OPTION' => str_replace("'", "\'", stripslashes($m_mode)), + 'VALUE' => str_replace("'", "\'", stripslashes($this->lang_name($m_values['title'])))) + ); + } + } + + $s_cat_option = '<option value="0"' . (($module_data['parent_id'] == 0) ? ' selected="selected"' : '') . '>' . $user->lang['NO_PARENT'] . '</option>'; + + $template->assign_vars(array_merge(array( + 'S_EDIT_MODULE' => true, + 'S_IS_CAT' => $is_cat, + 'S_CAT_OPTIONS' => $s_cat_option . $this->make_module_select($parent_id, ($action == 'edit') ? $module_row['module_id'] : false, false, false, false, true), + 'S_MODULE_NAMES' => $s_name_options, + 'S_MODULE_MODES' => $s_mode_options, + 'U_BACK' => $u_action . '&parent_id=' . $parent_id, + 'U_EDIT_ACTION' => $u_action, + + 'L_TITLE' => $user->lang[strtoupper($action) . '_MODULE'], + + 'MODULENAME' => $this->lang_name($module_data['module_langname']), + 'ACTION' => $action, + 'MODULE_ID' => $module_id, + + ), + array_change_key_case($module_data, CASE_UPPER)) + ); + + if (sizeof($errors)) + { + $template->assign_vars(array( + 'S_ERROR' => true, + 'ERROR_MSG' => implode('<br />', $errors)) + ); + } + + return; + + break; + } + + // Default management page + if (sizeof($errors)) + { + $template->assign_vars(array( + 'S_ERROR' => true, + 'ERROR_MSG' => implode('<br />', $errors)) + ); + } + + if (!$parent_id) + { + $navigation = strtoupper($this->module_class); + } + else + { + $navigation = '<a href="' . $u_action . '">' . strtoupper($this->module_class) . '</a>'; + + $modules_nav = $this->get_module_branch($parent_id, 'parents', 'descending'); + foreach ($modules_nav as $row) + { + $langname = $this->lang_name($row['module_langname']); + + if ($row['module_id'] == $parent_id) + { + $navigation .= ' -> ' . $langname; + } + else + { + $navigation .= ' -> <a href="' . $u_action . '&parent_id=' . $row['module_id'] . '">' . $langname . '</a>'; + } + } + } + + // Jumpbox + $module_box = $this->make_module_select($parent_id, false, false, false, false); + + $sql = 'SELECT * + FROM ' . MODULES_TABLE . " + WHERE parent_id = $parent_id + AND module_class = '" . $db->sql_escape($this->module_class) . "' + ORDER BY left_id"; + $result = $db->sql_query($sql); + + if ($row = $db->sql_fetchrow($result)) + { + do + { + $langname = $this->lang_name($row['module_langname']); + + if (!$row['module_enabled']) + { + $module_image = '<img src="images/icon_folder_lock.gif" width="46" height="25" alt="' . $user->lang['DEACTIVATED_MODULE'] .'" />'; + } + else + { + $module_image = (!$row['module_name'] || $row['left_id'] + 1 != $row['right_id']) ? '<img src="images/icon_subfolder.gif" width="46" height="25" alt="' . $user->lang['CATEGORY'] . '" />' : '<img src="images/icon_folder.gif" width="46" height="25" alt="' . $user->lang['MODULE'] . '" />'; + } + + $url = $u_action . '&parent_id=' . $parent_id . '&m=' . $row['module_id']; + + $template->assign_block_vars('modules', array( + 'MODULE_IMAGE' => $module_image, + 'MODULE_TITLE' => $langname, + 'MODULE_ENABLED' => ($row['module_enabled']) ? true : false, + + 'U_MODULE' => $u_action . '&parent_id=' . $row['module_id'], + 'U_MOVE_UP' => $url . '&action=move_up', + 'U_MOVE_DOWN' => $url . '&action=move_down', + 'U_EDIT' => $url . '&action=edit', + 'U_DELETE' => $url . '&action=delete', + 'U_ENABLE' => $url . '&action=enable', + 'U_DISABLE' => $url . '&action=disable') + ); + } + while ($row = $db->sql_fetchrow($result)); + } + else if ($parent_id) + { + $row = $this->get_module_row($parent_id); + + $url = $u_action . '&parent_id=' . $parent_id . '&m=' . $row['module_id']; + + $template->assign_vars(array( + 'S_NO_MODULES' => true, + + 'U_EDIT' => $url . '&action=edit', + 'U_DELETE' => $url . '&action=delete', + 'U_ENABLE' => $url . '&action=enable', + 'U_DISABLE' => $url . '&action=disable') + ); + } + $db->sql_freeresult($result); + + // Quick adding module + $module_infos = $this->get_module_infos(); + + // Build quick options + $s_install_options = ''; + foreach ($module_infos as $option => $values) + { + // Name options + $s_install_options .= '<optgroup label="' . $this->lang_name($values['title']) . ' [' . $this->module_class . '_' . $option . ']">'; + + // Build module modes + foreach ($values['modes'] as $m_mode => $m_values) + { + $s_install_options .= '<option value="' . $option . '::' . $m_mode . '"> ' . $this->lang_name($m_values['title']) . '</option>'; + } + + $s_install_options .= '</optgroup>'; + } + + $template->assign_vars(array( + 'U_SEL_ACTION' => $u_action, + 'U_ACTION' => $u_action . '&parent_id=' . $parent_id, + 'NAVIGATION' => $navigation, + 'MODULE_BOX' => $module_box, + 'S_INSTALL_OPTIONS' => $s_install_options, + ) + ); + } + + /** + * Get row for specified module + */ + function get_module_row($module_id) + { + global $db, $user; + + $sql = 'SELECT * + FROM ' . MODULES_TABLE . " + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND module_id = $module_id"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$row) + { + trigger_error($user->lang['NO_MODULE']); + } + + return $row; + } + + /** + * Get available module informations from module files + */ + function get_module_infos($module = '') + { + global $phpbb_root_path, $phpEx; + + $directory = $phpbb_root_path . 'includes/' . $this->module_class . '/'; + + $fileinfo = array(); + + if (!$module) + { + $dh = opendir($directory); + while ($file = readdir($dh)) + { + // Is module? + if (strpos($file, $this->module_class . '_') === 0) + { + $class = str_replace(".$phpEx", '', $file) . '_info'; + + // Do not include current working file ;) + if (!class_exists($class)) + { + include($directory . $file); + } + + // Get module title tag + if (class_exists($class)) + { + $c_class = new $class(); + $module_info = $c_class->module(); + $fileinfo[str_replace($this->module_class . '_', '', $module_info['filename'])] = $module_info; + } + } + } + closedir($dh); + } + else + { + $filename = $this->module_class . '_' . basename($module); + $class = $this->module_class . '_' . basename($module) . '_info'; + + // Do not include current working file ;) + if (!class_exists($class)) + { + include($directory . $filename . '.' . $phpEx); + } + + // Get module title tag + if (class_exists($class)) + { + $c_class = new $class(); + $module_info = $c_class->module(); + $fileinfo[str_replace($this->module_class . '_', '', $module_info['filename'])] = $module_info; + } + } + + return $fileinfo; + } + + /** + * Simple version of jumpbox, just lists modules + */ + function make_module_select($select_id = false, $ignore_id = false, $ignore_acl = false, $ignore_nonpost = false, $ignore_emptycat = true, $ignore_noncat = false) + { + global $db, $user, $auth, $config; + + $sql = 'SELECT module_id, module_enabled, module_name, parent_id, module_langname, left_id, right_id, module_auth + FROM ' . MODULES_TABLE . " + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + ORDER BY left_id ASC"; + $result = $db->sql_query($sql); + + $right = $iteration = 0; + $padding_store = array('0' => ''); + $module_list = $padding = ''; + + while ($row = $db->sql_fetchrow($result)) + { + if ($row['left_id'] < $right) + { + $padding .= ' '; + $padding_store[$row['parent_id']] = $padding; + } + else if ($row['left_id'] > $right + 1) + { + $padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : ''; + } + + $right = $row['right_id']; + + /** + * @todo think about using module class here + */ + if (!$ignore_acl && $row['module_auth']) + { + $is_auth = false; + eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$id)?#e', '#\$id#', '#cfg_([a-z_]+)#e'), array('(int) $auth->acl_get("\\1"\\2)', '$this->acl_forup_id', '(int) $config["\\1"]'), trim($row['module_auth'])) . ');'); + if (!$is_auth) + { + continue; + } + } + + // ignore this module? + if ((is_array($ignore_id) && in_array($row['module_id'], $ignore_id)) || $row['module_id'] == $ignore_id) + { + continue; + } + + // empty category + if (!$row['module_name'] && ($row['left_id'] + 1 == $row['right_id']) && $ignore_emptycat) + { + continue; + } + + // ignore non-category? + if ($row['module_name'] && $ignore_noncat) + { + continue; + } + + $selected = (is_array($select_id)) ? ((in_array($row['module_id'], $select_id)) ? ' selected="selected"' : '') : (($row['module_id'] == $select_id) ? ' selected="selected"' : ''); + + $langname = $this->lang_name($row['module_langname']); + $module_list .= '<option value="' . $row['module_id'] . '"' . $selected . ((!$row['module_enabled']) ? ' class="disabled"' : '') . '>' . $padding . $langname . '</option>'; + + $iteration++; + } + unset($padding_store); + + return $module_list; + } + + /** + * Get module branch + */ + function get_module_branch($module_id, $type = 'all', $order = 'descending', $include_module = true) + { + global $db; + + switch ($type) + { + case 'parents': + $condition = 'm1.left_id BETWEEN m2.left_id AND m2.right_id'; + break; + + case 'children': + $condition = 'm2.left_id BETWEEN m1.left_id AND m1.right_id'; + break; + + default: + $condition = 'm2.left_id BETWEEN m1.left_id AND m1.right_id OR m1.left_id BETWEEN m2.left_id AND m2.right_id'; + } + + $rows = array(); + + $sql = 'SELECT m2.* + FROM (' . MODULES_TABLE . ' m1 + LEFT JOIN ' . MODULES_TABLE . " m2 ON $condition) + WHERE m1.module_class = '" . $db->sql_escape($this->module_class) . "' + AND m2.module_class = '" . $db->sql_escape($this->module_class) . "' + AND m1.module_id = $module_id + ORDER BY m2.left_id " . (($order == 'descending') ? 'ASC' : 'DESC'); + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + if (!$include_module && $row['module_id'] == $module_id) + { + continue; + } + + $rows[] = $row; + } + $db->sql_freeresult($result); + + return $rows; + } + + /** + * Remove modules cache file + */ + function remove_cache_file() + { + global $phpbb_root_path, $phpEx; + + // Sanitise for future path use, it's escaped as appropriate for queries + $p_class = str_replace(array('.', '/', '\\'), '', basename($this->module_class)); + + if (file_exists($phpbb_root_path . 'cache/' . $p_class . '_modules.' . $phpEx)) + { + @unlink($phpbb_root_path . 'cache/' . $p_class . '_modules.' . $phpEx); + } + } + + /** + * Return correct language name + */ + function lang_name($module_langname) + { + global $user; + + return (!empty($user->lang[$module_langname])) ? $user->lang[$module_langname] : $module_langname; + } + + /** + * Update/Add module + */ + function update_module_data(&$module_data) + { + global $db, $user; + + if (!isset($module_data['module_id'])) + { + // no module_id means we're creating a new category/module + + $db->sql_transaction('begin'); + + if ($module_data['parent_id']) + { + $sql = 'SELECT left_id, right_id + FROM ' . MODULES_TABLE . " + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND module_id = {$module_data['parent_id']}"; + $result = $db->sql_query($sql); + + if (!$row = $db->sql_fetchrow($result)) + { + trigger_error($user->lang['PARENT_NO_EXIST']); + } + $db->sql_freeresult($result); + + $sql = 'UPDATE ' . MODULES_TABLE . " + SET left_id = left_id + 2, right_id = right_id + 2 + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND left_id > {$row['right_id']}"; + $db->sql_query($sql); + + $sql = 'UPDATE ' . MODULES_TABLE . " + SET right_id = right_id + 2 + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND {$row['left_id']} BETWEEN left_id AND right_id"; + $db->sql_query($sql); + + $module_data['left_id'] = $row['right_id']; + $module_data['right_id'] = $row['right_id'] + 1; + } + else + { + $sql = 'SELECT MAX(right_id) AS right_id + FROM ' . MODULES_TABLE . " + WHERE module_class = '" . $db->sql_escape($this->module_class) . "'"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $module_data['left_id'] = $row['right_id'] + 1; + $module_data['right_id'] = $row['right_id'] + 2; + } + + $sql = 'INSERT INTO ' . MODULES_TABLE . ' ' . $db->sql_build_array('INSERT', $module_data); + $db->sql_query($sql); + + $db->sql_transaction('commit'); + + $module_data['module_id'] = $db->sql_nextid(); + add_log('admin', 'LOG_MODULE_ADD', $this->lang_name($module_data['module_langname'])); + } + else + { + $row = $this->get_module_row($module_data['module_id']); + + if ($module_data['module_name'] && !$row['module_name']) + { + // we're turning a category into a module + $branch = $this->get_module_branch($module_data['module_id'], 'children', 'descending', false); + + if (sizeof($branch)) + { + return array($user->lang['NO_CATEGORY_TO_MODULE']); + } + } + + if ($row['parent_id'] != $module_data['parent_id']) + { + $this->move_module($module_data['module_id'], $module_data['parent_id']); + } + + $sql = 'UPDATE ' . MODULES_TABLE . ' + SET ' . $db->sql_build_array('UPDATE', $module_data) . " + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND module_id = {$module_data['module_id']}"; + $db->sql_query($sql); + + add_log('admin', 'LOG_MODULE_EDIT', $this->lang_name($module_data['module_langname'])); + } + + return array(); + } + + function move_module($from_module_id, $to_parent_id) + { + global $db; + + $moved_modules = $this->get_module_branch($from_module_id, 'children', 'descending'); + $from_data = $moved_modules[0]; + $diff = sizeof($moved_modules) * 2; + + $moved_ids = array(); + for ($i = 0; $i < sizeof($moved_modules); ++$i) + { + $moved_ids[] = $moved_modules[$i]['module_id']; + } + + // Resync parents + $sql = 'UPDATE ' . MODULES_TABLE . " + SET right_id = right_id - $diff + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND left_id < " . $from_data['right_id'] . " + AND right_id > " . $from_data['right_id']; + $db->sql_query($sql); + + // Resync righthand side of tree + $sql = 'UPDATE ' . MODULES_TABLE . " + SET left_id = left_id - $diff, right_id = right_id - $diff + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND left_id > " . $from_data['right_id']; + $db->sql_query($sql); + + if ($to_parent_id > 0) + { + $to_data = $this->get_module_row($to_parent_id); + + // Resync new parents + $sql = 'UPDATE ' . MODULES_TABLE . " + SET right_id = right_id + $diff + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND " . $to_data['right_id'] . ' BETWEEN left_id AND right_id + AND module_id NOT IN (' . implode(', ', $moved_ids) . ')'; + $db->sql_query($sql); + + // Resync the righthand side of the tree + $sql = 'UPDATE ' . MODULES_TABLE . " + SET left_id = left_id + $diff, right_id = right_id + $diff + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND left_id > " . $to_data['right_id'] . ' + AND module_id NOT IN (' . implode(', ', $moved_ids) . ')'; + $db->sql_query($sql); + + // Resync moved branch + $to_data['right_id'] += $diff; + if ($to_data['right_id'] > $from_data['right_id']) + { + $diff = '+ ' . ($to_data['right_id'] - $from_data['right_id'] - 1); + } + else + { + $diff = '- ' . abs($to_data['right_id'] - $from_data['right_id'] - 1); + } + } + else + { + $sql = 'SELECT MAX(right_id) AS right_id + FROM ' . MODULES_TABLE . " + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND module_id NOT IN (" . implode(', ', $moved_ids) . ')'; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $diff = '+ ' . ($row['right_id'] - $from_data['left_id'] + 1); + } + + $sql = 'UPDATE ' . MODULES_TABLE . " + SET left_id = left_id $diff, right_id = right_id $diff + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND module_id IN (" . implode(', ', $moved_ids) . ')'; + $db->sql_query($sql); + } + + function delete_module($module_id) + { + global $db, $user; + + $row = $this->get_module_row($module_id); + + $branch = $this->get_module_branch($module_id, 'children', 'descending', false); + + if (sizeof($branch)) + { + return array($user->lang['CANNOT_REMOVE_MODULE']); + } + + // If not move + $diff = 2; + $sql = 'DELETE FROM ' . MODULES_TABLE . " + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND module_id = $module_id"; + $db->sql_query($sql); + + // Resync tree + $sql = 'UPDATE ' . MODULES_TABLE . " + SET right_id = right_id - $diff + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND left_id < {$row['right_id']} AND right_id > {$row['right_id']}"; + $db->sql_query($sql); + + $sql = 'UPDATE ' . MODULES_TABLE . " + SET left_id = left_id - $diff, right_id = right_id - $diff + WHERE module_class = '" . $db->sql_escape($this->module_class) . "' + AND left_id > {$row['right_id']}"; + $db->sql_query($sql); + + add_log('admin', 'LOG_MODULE_REMOVED', $this->lang_name($row['module_langname'])); + + return array(); + + } +} + +/** +* @package module_install +*/ +class acp_modules_info +{ + function module() + { + return array( + 'filename' => 'acp_modules', + 'title' => 'ACP_MODULE_MANAGEMENT', + 'version' => '1.0.0', + 'modes' => array( + 'acp' => array('title' => 'ACP', 'auth' => 'acl_a_modules'), + 'ucp' => array('title' => 'USER_CONTROL_PANEL', 'auth' => 'acl_a_modules'), + 'mcp' => array('title' => 'MCP', 'auth' => 'acl_a_modules'), + ), + ); + } + + function install() + { + } + + function uninstall() + { + } +} + +?>
\ No newline at end of file diff --git a/phpBB/includes/acp/acp_php_info.php b/phpBB/includes/acp/acp_php_info.php new file mode 100644 index 0000000000..19e4d81348 --- /dev/null +++ b/phpBB/includes/acp/acp_php_info.php @@ -0,0 +1,105 @@ +<?php +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package acp +*/ +class acp_php_info +{ + function main($id, $mode) + { + global $db, $user, $auth, $template; + global $config, $SID, $phpbb_root_path, $phpbb_admin_path, $phpEx; + + if ($mode != 'info') + { + trigger_error('NO_MODE'); + } + + $this->tpl_name = 'acp_php_info'; + + ob_start(); + phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_VARIABLES); + $phpinfo = ob_get_contents(); + ob_end_clean(); + + // Get used layout + $layout = (preg_match('#bgcolor#i', $phpinfo)) ? 'old' : 'new'; + + // Here we play around a little with the PHP Info HTML to try and stylise + // it along phpBB's lines ... hopefully without breaking anything. The idea + // for this was nabbed from the PHP annotated manual + preg_match_all('#<body[^>]*>(.*)</body>#siU', $phpinfo, $output); + + switch ($layout) + { + case 'old': + $output = preg_replace('#<table#', '<table', $output[1][0]); + $output = preg_replace('# bgcolor="\#(\w){6}"#', '', $output); + $output = preg_replace('#(\w),(\w)#', '\1, \2', $output); + $output = preg_replace('#border="0" cellpadding="3" cellspacing="1" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $output); + $output = preg_replace('#<tr valign="top"><td align="left">(.*?<a .*?</a>)(.*?)</td></tr>#s', '<tr class="row1"><td style="{background-color: #9999cc;}"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td style="{background-color: #9999cc;}">\2</td><td style="{background-color: #9999cc;}">\1</td></tr></table></td></tr>', $output); + $output = preg_replace('#<tr valign="baseline"><td[ ]{0,1}><b>(.*?)</b>#', '<tr><td class="row1" nowrap="nowrap">\1', $output); + $output = preg_replace('#<td align="(center|left)">#', '<td class="row2">', $output); + $output = preg_replace('#<td>#', '<td class="row2">', $output); + $output = preg_replace('#valign="middle"#', '', $output); + $output = preg_replace('#<tr >#', '<tr>', $output); + $output = preg_replace('#<hr(.*?)>#', '', $output); + $output = preg_replace('#<h1 align="center">#i', '<h1>', $output); + $output = preg_replace('#<h2 align="center">#i', '<h2>', $output); + break; + + case 'new': + $output = preg_replace('#(\w),(\w)#', '\1, \2', $output[1][0]); + $output = preg_replace('#<tr class="v"><td>(.*?<a .*?</a>)(.*?)</td></tr>#s', '<tr class="row1"><td><table class="type2"><tr><td>\2</td><td>\1</td></tr></table></td></tr>', $output); + $output = preg_replace('#class="e"#', 'class="row1"', $output); + $output = preg_replace('#class="v"#', 'class="row2"', $output); + $output = preg_replace('#class="h"#', '', $output); + $output = preg_replace('#<hr />#', '', $output); + $output = preg_replace('#<table [^<]+>#i', '<table>', $output); + $output = preg_replace('#<img border="0"#i', '<img', $output); + $output = str_replace(array('<font', '</font>'), array('<span', '</span>'), $output); + + preg_match_all('#<div class="center">(.*)</div>#siU', $output, $output); + $output = $output[1][0]; + break; + } + + $template->assign_var('PHPINFO', $output); + } +} + +/** +* @package module_install +*/ +class acp_php_info_info +{ + function module() + { + return array( + 'filename' => 'acp_php_info', + 'title' => 'ACP_PHP_INFO', + 'version' => '1.0.0', + 'modes' => array( + 'info' => array('title' => 'ACP_PHP_INFO', 'auth' => 'acl_a_server'), + ), + ); + } + + function install() + { + } + + function uninstall() + { + } +} + +?>
\ No newline at end of file diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php new file mode 100644 index 0000000000..16a823883b --- /dev/null +++ b/phpBB/language/en/acp/attachments.php @@ -0,0 +1,146 @@ +<?php +/** +* +* acp_attachments [English] +* +* @package language +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* DO NOT CHANGE +*/ +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +// DEVELOPERS PLEASE NOTE +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine + +$lang += array( + 'ACP_ATTACHMENT_SETTINGS_EXPLAIN' => 'Here you can configure the Main Settings for Attachments and the associated Special Categories.', + 'ACP_EXTENSION_GROUPS_EXPLAIN' => 'Here you can add, delete and modify your Extension Groups, you can disable Extension Groups, assign a special Category to them, change the download mechanism and you can define an Upload Icon which will be displayed in front of an Attachment belonging to the Group.', + 'ACP_MANAGE_EXTENSIONS_EXPLAIN' => 'Here you can manage your allowed extensions. To activate your Extensions, please refer to the extension groups management panel. We strongly recommend not to allow scripting extensions (such as php, php3, php4, phtml, pl, cgi, asp, aspx...)', + 'ACP_ORPHAN_ATTACHMENTS_EXPLAIN' => 'Here you are able to see files within the Attachments upload directory but not assigned to posts. This happens mostly if users are attaching files but not submitting the post. You are able to delete the files or attach them to existing posts. Attaching to posts requires a valid post id, you have to determine this id by yourself, this feature is mainly for those people wanting to upload files with another program and assigning those (mostly large) files to an existing post.', + 'ADD_EXTENSION' => 'Add extension', + 'ADD_EXTENSION_GROUP' => 'Add Extension Group', + 'ADMIN_UPLOAD_ERROR' => 'Errors while trying to attach file: %s', + 'ALLOWED_FORUMS' => 'Allowed Forums', + 'ALLOWED_FORUMS_EXPLAIN' => 'Able to post the assigned extensions at the selected (or all if selected) forums', + 'ALLOW_ALL_FORUMS' => 'Allow All Forums', + 'ALLOW_IN_PM' => 'Allowed in private messaging', + 'ALLOW_SELECTED_FORUMS' => 'Only Forums selected below', + 'ASSIGNED_EXTENSIONS' => 'Assigned Extensions', + 'ASSIGNED_GROUP' => 'Assigned Group', + 'ATTACHMENTS' => 'Attachments', + 'ATTACH_EXTENSIONS_URL' => 'Extensions', + 'ATTACH_EXT_GROUPS_URL' => 'Extension Groups', + 'ATTACH_MAX_FILESIZE' => 'Maximum filesize', + 'ATTACH_MAX_FILESIZE_EXPLAIN' => 'Maximum size of each file, 0 is unlimited.', + 'ATTACH_MAX_PM_FILESIZE' => 'Maximum filesize messaging', + 'ATTACH_MAX_PM_FILESIZE_EXPLAIN' => 'Maximum drive space available per user for private message attachments, 0 is unlimited.', + 'ATTACH_ORPHAN_URL' => 'Orphan Attachments', + 'ATTACH_POST_ID' => 'Post ID', + 'ATTACH_QUOTA' => 'Total attachment quota', + 'ATTACH_QUOTA_EXPLAIN' => 'Maximum drive space available for attachments in total, 0 is unlimited.', + 'ATTACH_TO_POST' => 'Attach file to post', + + 'CAT_IMAGES' => 'Images', + 'CAT_RM_FILES' => 'Real Media Streams', + 'CAT_WM_FILES' => 'Win Media Streams', + 'CREATE_GROUP' => 'Create new group', + 'CREATE_THUMBNAIL' => 'Create thumbnail', + 'CREATE_THUMBNAIL_EXPLAIN' => 'Create a thumbnail in all possible situations.', + + 'DEFINE_ALLOWED_IPS' => 'Define allowed IPs/Hostnames', + 'DEFINE_DISALLOWED_IPS' => 'Define disallowed IPs/Hostnames', + 'DOWNLOAD_ADD_IPS_EXPLAIN' => 'To specify several different IP\'s or hostnames enter each on a new line. To specify a range of IP addresses separate the start and end with a hyphen (-), to specify a wildcard use *', + 'DOWNLOAD_MODE' => 'Download Mode', + 'DOWNLOAD_MODE_EXPLAIN' => 'If you experience problems downloading files, set this to "physical", the user will be directed to the file directly. Do not set it to physical if not really needed, it discloses the filename.', + 'DOWNLOAD_REMOVE_IPS_EXPLAIN' => 'You can remove (or un-exclude) multiple IP addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded IP\'s have a blue background.', + 'DISPLAY_INLINED' => 'Display images inline', + 'DISPLAY_INLINED_EXPLAIN' => 'If set to No image attachments will show as a link.', + 'DISPLAY_ORDER' => 'Attachment Display Order', + 'DISPLAY_ORDER_EXPLAIN' => 'Display attachments ordered by time.', + + 'EDIT_EXTENSION_GROUP' => 'Edit Extension Group', + 'EXCLUDE_ENTERED_IP' => 'Enable this to exclude the entered IP/Hostname.', + 'EXCLUDE_FROM_ALLOWED_IP' => 'Exclude IP from allowed IPs/Hostnames', + 'EXCLUDE_FROM_DISALLOWED_IP' => 'Exclude IP from disallowed IPs/Hostnames', + 'EXTENSIONS_UPDATED' => 'Extensions successfully updated', + 'EXTENSION_EXIST' => 'The Extension %s already exist', + 'EXTENSION_GROUP' => 'Extension Group', + 'EXTENSION_GROUPS' => 'Extension Groups', + 'EXTENSION_GROUP_DELETED' => 'Extension Group successfully deleted', + 'EXTENSION_GROUP_EXIST' => 'The Extension Group %s already exist', + + 'GO_TO_EXTENSIONS' => 'Go to Extension Management Screen', + 'GROUP_NAME' => 'Group name', + + 'IMAGE_LINK_SIZE' => 'Image Link Dimensions', + 'IMAGE_LINK_SIZE_EXPLAIN' => 'Display image attachment as link if image is larger than this, set to 0px by 0px to disable.', + 'IMAGICK_PATH' => 'Imagemagick path', + 'IMAGICK_PATH_EXPLAIN' => 'Full path to the imagemagick convert application, e.g. /usr/bin/', + + 'MAX_ATTACHMENTS' => 'Max attachments per post', + 'MAX_ATTACHMENTS_PM' => 'Max attachments per message', + 'MAX_EXTGROUP_FILESIZE' => 'Maximum Filesize', + 'MAX_IMAGE_SIZE' => 'Maximum Image Dimensions', + 'MAX_IMAGE_SIZE_EXPLAIN' => 'Maximum size of image attachments, 0px by 0px disables image attachments.', + 'MIN_THUMB_FILESIZE' => 'Minimum thumbnail filesize', + 'MIN_THUMB_FILESIZE_EXPLAIN' => 'Do not create a thumbnail for images smaller than this.', + 'MODE_INLINE' => 'Inline', + 'MODE_PHYSICAL' => 'Physical', + + 'NOT_ASSIGNED' => 'Not assigned', + 'NO_EXT_GROUP_NAME' => 'No Group Name entered', + 'NO_EXT_GROUP_SPECIFIED' => 'No Extension Group specified', + 'NO_IMAGE' => 'No Image', + 'NO_IPS_DEFINED' => 'No IPs or Hostnames defined', + 'NO_UPLOAD_DIR' => 'The upload directory you specified does not exist.', + 'NO_WRITE_UPLOAD' => 'The upload directory you specified cannot be written to. Please alter the permissions to allow the webserver to write to it.', + + 'ORDER_ALLOW_DENY' => 'Allow', + 'ORDER_DENY_ALLOW' => 'Deny', + + 'REMOVE_ALLOWED_IPS' => 'Remove or Un-exclude allowed IPs/Hostnames', + 'REMOVE_DISALLOWED_IPS' => 'Remove or Un-exclude disallowed IPs/Hostnames', + + 'SEARCH_IMAGICK' => 'Search for Imagemagick', + 'SECURE_ALLOW_DENY' => 'Allow/Deny List', + 'SECURE_ALLOW_DENY_EXPLAIN' => 'Allow or Deny the list of addresses, this setting only applies to downloading files', + 'SECURE_DOWNLOADS' => 'Enable secure downloads', + 'SECURE_DOWNLOADS_EXPLAIN' => 'With this option enabled, downloads are limited to IP\'s/hostnames you defined.', + 'SECURE_DOWNLOAD_NOTICE' => 'Secure Downloads are not enabled. The settings below will be applied after enabling secure downloads.', + 'SECURE_DOWNLOAD_UPDATE_SUCCESS'=> 'The IP list has been updated successfully', + 'SECURE_EMPTY_REFERER' => 'Allow empty referer', + 'SECURE_EMPTY_REFERER_EXPLAIN' => 'Secure downloads are based on referers. Do you want to allow downloads for those ommitting the referer?', + 'SETTINGS_CAT_IMAGES' => 'Image category settings', + 'SPECIAL_CATEGORY' => 'Special Category', + 'SPECIAL_CATEGORY_EXPLAIN' => 'Special Categories differ between the way presented within posts.', + 'SUCCESSFULLY_UPLOADED' => 'Succeessfully uploaded', + 'SUCCESS_EXTENSION_GROUP_ADD' => 'Extension Group successfully added', + 'SUCCESS_EXTENSION_GROUP_EDIT' => 'Extension Group successfully updated', + + 'UPLOADING_FILES' => 'Uploading Files', + 'UPLOADING_FILE_TO' => 'Uploading File "%1$s" to Post Number %2$d...', + 'UPLOAD_DENIED_FORUM' => 'You do not have the permission to upload files to forum "%s"', + 'UPLOAD_DIR' => 'Upload Directory', + 'UPLOAD_DIR_EXPLAIN' => 'Storage Path for Attachments.', + 'UPLOAD_ICON' => 'Upload Icon', + 'UPLOAD_NOT_DIR' => 'The upload location you specified does not appear to be a directory.', + +); + +?>
\ No newline at end of file diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php new file mode 100644 index 0000000000..2bfacd798c --- /dev/null +++ b/phpBB/language/en/acp/board.php @@ -0,0 +1,347 @@ +<?php +/** +* +* acp_board [English] +* +* @package language +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* DO NOT CHANGE +*/ +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +// DEVELOPERS PLEASE NOTE +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine + +// Jabber settings +$lang += array( + 'ACP_JABBER_SETTINGS_EXPLAIN' => 'Here you can enable and control the use Jabber for instant messaging and board notices. Jabber is an opensource protocol and therefore available for use by anyone. Some Jabber servers include gateways or transports which allow you to contact users on other networks. Not all servers offer all transports and changes in protocols can prevent transports from operating. Note that it may take several seconds to update Jabber account details, do not stop the script till completed!', + + 'JAB_ENABLE' => 'Enable Jabber', + 'JAB_ENABLE_EXPLAIN' => 'Enables use of jabber messaging and notifications', + + 'JAB_SERVER' => 'Jabber server', + 'JAB_SERVER_EXPLAIN' => 'See %sjabber.org%s for a list of servers', + 'JAB_PORT' => 'Jabber port', + 'JAB_PORT_EXPLAIN' => 'Leave blank unless you know it is not 5222', + 'JAB_USERNAME' => 'Jabber username', + 'JAB_USERNAME_EXPLAIN' => 'If this user is not registered it will be created if possible.', + 'JAB_PASSWORD' => 'Jabber password', + 'JAB_RESOURCE' => 'Jabber resource', + 'JAB_RESOURCE_EXPLAIN' => 'The resource locates this particular connection, e.g. board, home, etc.', + + 'JAB_PASS_CHANGED' => 'Jabber password changed successfully', + 'JAB_REGISTERED' => 'New account registered successfully', + 'JAB_CHANGED' => 'Jabber account changed successfully', + + 'ERR_JAB_USERNAME' => 'The username specified already exists, please choose an alternative.', + 'ERR_JAB_REGISTER' => 'An error occured trying to register this account, %s', + 'ERR_JAB_PASSCHG' => 'Could not change password', + 'ERR_JAB_PASSFAIL' => 'Password update failed, %s', +); + +// Message Settings +$lang += array( + 'ACP_MESSAGE_SETTINGS_EXPLAIN' => 'Here you can set all default settings for private messaging', + + 'BOXES_MAX' => 'Max private message folders', + 'BOXES_MAX_EXPLAIN' => 'By default users may create this many personal folders for private messages..', + 'BOXES_LIMIT' => 'Max private messages per box', + 'BOXES_LIMIT_EXPLAIN' => 'Users may receive no more than this many messages in each of their private message boxes or zero for unlimited messages.', + 'FULL_FOLDER_ACTION' => 'Full folder default action', + 'FULL_FOLDER_ACTION_EXPLAIN'=> 'Default Action to take if an users folder is full and if the users folder action set is not applicable. For the special folder "SENTBOX" the default action is always deleting old messages.', + 'HOLD_NEW_MESSAGES' => 'Hold new messages', + 'PM_EDIT_TIME' => 'Limit editing time', + 'PM_EDIT_TIME_EXPLAIN' => 'Limits the time available to edit a private message not already delivered, zero equals infinity', + + 'ALLOW_MASS_PM' => 'Allow Mass PM\'s', + 'ALLOW_HTML_PM' => 'Allow HTML in private messages', + 'ALLOW_BBCODE_PM' => 'Allow BBCode in private messages', + 'ALLOW_SMILIES_PM' => 'Allow smilies in private messages', + 'ALLOW_DOWNLOAD_PM' => 'Allow downloading of attachments in private messages', + 'ALLOW_REPORT_PM' => 'Allow reporting of private messages', + 'ALLOW_FORWARD_PM' => 'Allow forwarding of private messages', + 'ALLOW_PRINT_PM' => 'Allow print view in private messaging', + 'ALLOW_EMAIL_PM' => 'Allow emailing private messages', + 'ALLOW_IMG_PM' => 'Allow use of IMG BBCode Tag', + 'ALLOW_FLASH_PM' => 'Allow use of FLASH BBCode Tag', + 'ALLOW_SIG_PM' => 'Allow signature in private messages', + 'ALLOW_QUOTE_PM' => 'Allow quotes in private messages', + 'ENABLE_PM_ICONS' => 'Enable use of topic icons in private messages' +); + +// Cookie settings +$lang += array( + 'ACP_COOKIE_SETTINGS_EXPLAIN' => 'These details define the data used to send cookies to your users browsers. In most cases the default values for the cookie settings should be sufficient. If you do need to change any do so with care, incorrect settings can prevent users logging in.', + + 'COOKIE_DOMAIN' => 'Cookie domain', + 'COOKIE_NAME' => 'Cookie name', + 'COOKIE_PATH' => 'Cookie path', + 'COOKIE_SECURE' => 'Cookie secure', + 'COOKIE_SECURE_EXPLAIN' => 'If your server is running via SSL set this to enabled else leave as disabled', +); + +// Avatar settings +$lang += array( + 'ACP_AVATAR_SETTINGS_EXPLAIN' => 'Avatars are generally small, unique images a user can associate with themselves. Depending on the style they are usually displayed below the username when viewing topics. Here you can determine how users can define their avatars. Please note that in order to upload avatars you need to have created the directory you name below and ensure it can be written to by the web server. Please also note that filesize limits are only imposed on uploaded avatars, they do not apply to remotely linked images.', + 'ALLOW_LOCAL' => 'Enable gallery avatars', + 'ALLOW_REMOTE' => 'Enable remote avatars', + 'ALLOW_REMOTE_EXPLAIN' => 'Avatars linked to from another website', + 'ALLOW_UPLOAD' => 'Enable avatar uploading', + 'MAX_FILESIZE' => 'Maximum Avatar File Size', + 'MAX_FILESIZE_EXPLAIN' => 'For uploaded avatar files', + 'MIN_AVATAR_SIZE' => 'Minimum Avatar Dimensions', + 'MIN_AVATAR_SIZE_EXPLAIN' => '(Height x Width in pixels)', + 'MAX_AVATAR_SIZE' => 'Maximum Avatar Dimensions', + 'MAX_AVATAR_SIZE_EXPLAIN' => '(Height x Width in pixels)', + 'AVATAR_STORAGE_PATH' => 'Avatar Storage Path', + 'AVATAR_STORAGE_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. images/avatars/upload', + 'AVATAR_GALLERY_PATH' => 'Avatar Gallery Path', + 'AVATAR_GALLERY_PATH_EXPLAIN' => 'Path under your phpBB root dir for pre-loaded images, e.g. images/avatars/gallery', +); + +// Server settings +$lang += array( + 'ACP_SERVER_SETTINGS_EXPLAIN' => 'Here you define server and domain dependant settings. Please ensure the data you enter is accurate, errors will result in emails containing incorrect information. When entering the domain name remember it does include http:// or other protocol term. Only alter the port number if you know your server uses a different value, port 80 is correct in most cases.', + 'PATH_SETTINGS' => 'Path Settings', + 'SERVER_NAME' => 'Domain Name', + 'SERVER_NAME_EXPLAIN' => 'The domain name this board runs from', + 'SCRIPT_PATH' => 'Script path', + 'SCRIPT_PATH_EXPLAIN' => 'The path where phpBB2 is located relative to the domain name', + 'SERVER_PORT' => 'Server Port', + 'SERVER_PORT_EXPLAIN' => 'The port your server is running on, usually 80, only change if different', + 'IP_VALID' => 'Session IP validation', + 'IP_VALID_EXPLAIN' => 'Determines how much of the users IP is used to validate a session; All compares the complete address, A.B.C the first x.x.x, A.B the first x.x, None disables checking.', + 'ALL' => 'All', + 'CLASS_C' => 'A.B.C', + 'CLASS_B' => 'A.B', + 'BROWSER_VALID' => 'Validate browser', + 'BROWSER_VALID_EXPLAIN' => 'Enables browser validation for each session inproving security.', + 'ENABLE_GZIP' => 'Enable GZip Compression', + 'SMILIES_PATH' => 'Smilies storage path', + 'SMILIES_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. images/smilies', + 'ICONS_PATH' => 'Post icons storage path', + 'ICONS_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. images/icons', + 'UPLOAD_ICONS_PATH' => 'Extension group icons storage path', + 'UPLOAD_ICONS_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. images/upload_icons', + 'RANKS_PATH' => 'Rank image storage path', + 'RANKS_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. images/ranks', +); + +// Load settings +$lang += array( + 'ACP_LOAD_SETTINGS_EXPLAIN' => 'Here you can enable and disable certain board functions to reduce the amount of processing required. On most servers there is no need to disable any functions. However on certain systems or in shared hosting environments it may be beneficial to disable capabilities you do not really need. You can also specify limits for system load and active sessions beyond which the board will go offline.', + 'LIMIT_LOAD' => 'Limit system load', + 'LIMIT_LOAD_EXPLAIN' => 'If the 1 minute system load exceeds this value the board will go offline, 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers.', + 'LIMIT_SESSIONS' => 'Limit sessions', + 'LIMIT_SESSIONS_EXPLAIN' => 'If the number of sessions exceeds this value within a one minute period the board will go offline. Set to 0 for unlimited sessions.', + 'SESSION_LENGTH' => 'Session length', + 'SESSION_LENGTH_EXPLAIN' => 'Sessions will expire after this time, in seconds.', + 'YES_POST_MARKING' => 'Enable dotted topics', + 'YES_POST_MARKING_EXPLAIN' => 'Indicates whether user has posted to a topic.', + 'YES_READ_MARKING' => 'Enable server-side topic marking', + 'YES_READ_MARKING_EXPLAIN' => 'Stores read/unread status information in the database rather than a cookie.', + 'ONLINE_LENGTH' => 'View online time span', + 'ONLINE_LENGTH_EXPLAIN' => 'Time in minutes after which inactive users will not appear in viewonline listings, lower equals less processing.', + 'YES_ONLINE' => 'Enable online user listings', + 'YES_ONLINE_EXPLAIN' => 'Display online user information on index, forum and topic pages.', + 'YES_ONLINE_GUESTS' => 'Enable online guest listings in viewonline', + 'YES_ONLINE_GUESTS_EXPLAIN' => 'Allow display of guest user informations in viewonline.', + 'YES_ONLINE_TRACK' => 'Enable display of user online img', + 'YES_ONLINE_TRACK_EXPLAIN' => 'Display online information for user in profiles and viewtopic.', + 'YES_BIRTHDAYS' => 'Enable birthday listing', + 'YES_MODERATORS' => 'Enable display of Moderators', + 'YES_JUMPBOX' => 'Enable display of Jumpbox', + 'YES_SEARCH' => 'Enable search facilities', + 'YES_SEARCH_EXPLAIN' => 'User and backend search functions including fulltext updates when posting.', + 'YES_SEARCH_UPDATE' => 'Enable fulltext updating', + 'YES_SEARCH_UPDATE_EXPLAIN' => 'Updating of fulltext indexes when posting, overriden if search is disabled.', + 'YES_SEARCH_PHRASE' => 'Enable phrase searching', + 'YES_SEARCH_PHRASE_EXPLAIN' => 'Searching for phrases requires additional processing.', + 'RECOMPILE_TEMPLATES' => 'Recompile stale templates', + 'RECOMPILE_TEMPLATES_EXPLAIN'=> 'Check for updated template files on filesystem and recompile.', +); + +// Email settings +$lang += array( + 'ACP_EMAIL_SETTINGS_EXPLAIN' => 'This information is used when the board sends emails to your users. Please ensure the email address you specify is valid, any bounced or undeliverable messages will likely be sent to that address. If your host does not provide a native (PHP based) email service you can instead send messages directly using SMTP. This requires the address of an appropriate server (ask your provider if necessary), do not specify any old name here! If the server requires authentication (and only if it does) enter the necessary username and password. Please note only basic authentication is offered, different authentication implementations are not currently supported.', + 'ENABLE_EMAIL' => 'Enable board-wide emails', + 'ENABLE_EMAIL_EXPLAIN' => 'If this is set to disabled no emails will be sent by the board at all.', + 'BOARD_EMAIL_FORM' => 'Users send email via board', + 'BOARD_EMAIL_FORM_EXPLAIN' => 'Instead of showing the users email address users are able to send emails via the board.', + 'BOARD_HIDE_EMAILS' => 'Hide email addresses', + 'BOARD_HIDE_EMAILS_EXPLAIN' => 'This function keeps email addresses completely private.', + 'EMAIL_FUNCTION_NAME' => 'Email Function Name', + 'EMAIL_FUNCTION_NAME_EXPLAIN' => 'The email function used to send mails through PHP.', + 'EMAIL_PACKAGE_SIZE' => 'Email Package Size', + 'EMAIL_PACKAGE_SIZE_EXPLAIN' => 'This is the number of emails sent in one package.', + 'ADMIN_EMAIL' => 'Return Email Address', + 'ADMIN_EMAIL_EXPLAIN' => 'This will be used as the return address on all emails.', + 'EMAIL_SIG' => 'Email Signature', + 'EMAIL_SIG_EXPLAIN' => 'This text will be attached to all emails the board sends.', + 'CONTACT_EMAIL' => 'Contact email address', + 'CONTACT_EMAIL_EXPLAIN' => 'This address will be used whenever a specific contact point is needed, e.g. spam, error output, etc.', + + 'SMTP_SETTINGS' => 'SMTP Settings', + 'USE_SMTP' => 'Use SMTP Server for email', + 'USE_SMTP_EXPLAIN' => 'Say yes if you want or have to send email via a named server instead of the local mail function.', + 'SMTP_SERVER' => 'SMTP Server Address', + 'SMTP_PORT' => 'SMTP Server Port', + 'SMTP_PORT_EXPLAIN' => 'Only change this if you know your SMTP server is on a different port.', + 'SMTP_AUTH_METHOD' => 'Authentication method for SMTP', + 'SMTP_AUTH_METHOD_EXPLAIN' => 'Only used if a username/password is set, ask your provider if you are unsure which method to use.', + 'SMTP_LOGIN' => 'LOGIN', + 'SMTP_PLAIN' => 'PLAIN', + 'SMTP_CRAM_MD5' => 'CRAM-MD5', + 'SMTP_DIGEST_MD5' => 'DIGEST-MD5', + 'SMTP_POP_BEFORE_SMTP' => 'POP-BEFORE-SMTP', + 'SMTP_USERNAME' => 'SMTP Username', + 'SMTP_USERNAME_EXPLAIN' => 'Only enter a username if your smtp server requires it.', + 'SMTP_PASSWORD' => 'SMTP Password', + 'SMTP_PASSWORD_EXPLAIN' => 'Only enter a password if your smtp server requires it.', +); + +// Board settings +$lang += array( + 'ACP_BOARD_SETTINGS_EXPLAIN' => 'Here you can determine the basic operation of your board, from the site name through user registration to private messaging.', + 'SITE_NAME' => 'Site name', + 'SITE_DESC' => 'Site description', + 'DISABLE_BOARD' => 'Disable board', + 'DISABLE_BOARD_EXPLAIN' => 'This will make the board unavailable to users. You can also enter a short (255 character) message to display if you wish.', + 'ACC_ACTIVATION' => 'Account activation', + 'ACC_ACTIVATION_EXPLAIN' => 'This determines whether users have immediate access to the board or if confirmation is required. You can also completely disable new registrations.', + 'ACC_NONE' => 'None', + 'ACC_USER' => 'User', + 'ACC_ADMIN' => 'Admin', + 'ACC_USER_ADMIN' => 'User + Admin', + 'ACC_DISABLE' => 'Disable', + 'ALLOW_AUTOLOGIN' => 'Allow persistent logins', + 'ALLOW_AUTOLOGIN_EXPLAIN' => 'Determines whether users can autologin when they visit the board.', + 'AUTOLOGIN_LENGTH' => 'Persistent login key expiry days', + 'AUTOLOGIN_LENGTH_EXPLAIN' => 'Number of days after which persistent login keys are removed or zero to disable.', + 'VISUAL_CONFIRM' => 'Enable visual confirmation', + 'VISUAL_CONFIRM_EXPLAIN' => 'Requires new users enter a random code matching an image to help prevent mass registrations.', + 'LOGIN_LIMIT' => 'Login attempts', + 'LOGIN_LIMIT_EXPLAIN' => 'Number of failed logins users can make before being locked out that session', + 'REG_LIMIT' => 'Registration attempts', + 'REG_LIMIT_EXPLAIN' => 'Number of attempts users can make at the confirmation code before being locked out that session.', + 'FORCE_PASS_CHANGE' => 'Force password change', + 'FORCE_PASS_CHANGE_EXPLAIN' => 'Require user to change their password after a set number of days or zero to disable.', + 'SAVE_PASSWORDS' => 'Save previous passwords', + 'SAVE_PASSWORDS_EXPLAIN' => 'Prevents users re-using the specified number of previous passwords or zero to disable.', + 'CHAR_LIMIT' => 'Max characters per post', + 'CHAR_LIMIT_EXPLAIN' => 'Set to 0 for unlimited characters.', + 'SMILIES_LIMIT' => 'Max smilies per post', + 'SMILIES_LIMIT_EXPLAIN' => 'Set to 0 for unlimited smilies.', + 'QUOTE_DEPTH_LIMIT' => 'Max nested quotes per post', + 'QUOTE_DEPTH_LIMIT_EXPLAIN' => 'Set to 0 for unlimited depth.', + 'USERNAME_LENGTH' => 'Username length', + 'USERNAME_LENGTH_EXPLAIN' => 'Minimum and maximum number of characters in usernames.', + 'USERNAME_CHARS' => 'Limit username chars', + 'USERNAME_CHARS_EXPLAIN' => 'Restrict type of characters that may be used in usernames, spacers are; space, -, +, _, [ and ]', + 'PASSWORD_LENGTH' => 'Password length', + 'PASSWORD_LENGTH_EXPLAIN' => 'Minimum and maximum number of characters in passwords.', + 'PASSWORD_TYPE' => 'Password complexity', + 'PASSWORD_TYPE_EXPLAIN' => 'Determines how complex a password needs to be when set or altered, subsequent options include the previous ones.', + 'PASS_TYPE_ANY' => 'No requirements', + 'PASS_TYPE_CASE' => 'Must be mixed case', + 'PASS_TYPE_ALPHA' => 'Must contain alphanumerics', + 'PASS_TYPE_SYMBOL' => 'Must contain symbols', + 'MIN_CHARS' => 'Min', + 'MAX_CHARS' => 'Max', + 'ALLOW_EMAIL_REUSE' => 'Allow Email address re-use', + 'ALLOW_EMAIL_REUSE_EXPLAIN' => 'Different users can register with the same email address.', + 'USERNAME_CHARS_ANY' => 'Any character', + 'USERNAME_ALPHA_ONLY' => 'Alphanumeric only', + 'USERNAME_ALPHA_SPACERS' => 'Alphanumeric and spacers', + 'ENABLE_COPPA' => 'Enable COPPA', + 'ENABLE_COPPA_EXPLAIN' => 'This requires users to declare whether they are 13 or over for compliance with the U.S. COPPA act.', + 'COPPA_FAX' => 'COPPA Fax Number', + 'COPPA_MAIL' => 'COPPA Mailing Address', + 'COPPA_MAIL_EXPLAIN' => 'This is the mailing address where parents will send COPPA registration forms', + 'BOARD_PM' => 'Private Messaging', + 'BOARD_PM_EXPLAIN' => 'Enable or disable private messaging for all users.', + 'EDIT_TIME' => 'Limit editing time', + 'EDIT_TIME_EXPLAIN' => 'Limits the time available to edit a new post, zero equals infinity', + 'DISPLAY_LAST_EDITED' => 'Display last edited time information', + 'DISPLAY_LAST_EDITED_EXPLAIN' => 'Choose if the last edited by information to be displayed on posts', + 'FLOOD_INTERVAL' => 'Flood Interval', + 'FLOOD_INTERVAL_EXPLAIN' => 'Number of seconds a user must wait between posting new messages. To enable users to ignore this alter their permissions.', + 'BUMP_INTERVAL' => 'Bump Interval', + 'BUMP_INTERVAL_EXPLAIN' => 'Number of minutes, hours or days between the last post to a topic and the ability to bump this topic.', + 'SEARCH_INTERVAL' => 'Search Flood Interval', + 'SEARCH_INTERVAL_EXPLAIN' => 'Number of seconds users must wait between searches.', + 'MIN_SEARCH_CHARS' => 'Min characters indexed by search', + 'MIN_SEARCH_CHARS_EXPLAIN' => 'Words with at least this many characters will be indexed for searching.', + 'MAX_SEARCH_CHARS' => 'Max characters indexed by search', + 'MAX_SEARCH_CHARS_EXPLAIN' => 'Words with no more than this many characters will be indexed for searching.', + 'TOPICS_PER_PAGE' => 'Topics Per Page', + 'POSTS_PER_PAGE' => 'Posts Per Page', + 'HOT_THRESHOLD' => 'Posts for Popular Threshold', + 'MAX_POLL_OPTIONS' => 'Max number of poll options', + 'COPPA' => 'Coppa', + 'REGISTRATION' => 'User Registration', + 'POSTING' => 'Posting', +); + +// Auth settings +$lang += array( + 'ACP_AUTH_SETTINGS_EXPLAIN' => 'phpBB2 supports authentication plug-ins, or modules. These allow you determine how users are authenticated when they log into the board. By default three plug-ins are provided; DB, LDAP and Apache. Not all methods require additional information so only fill out fields if they are relevant to the selected method.', + 'AUTH_METHOD' => 'Select an authentication method', + 'LDAP_SERVER' => 'LDAP server name', + 'LDAP_SERVER_EXPLAIN' => 'If using LDAP this is the name or IP address of the server.', + 'LDAP_DN' => 'LDAP base dn', + 'LDAP_DN_EXPLAIN' => 'This is the Distinguished Name, locating the user information, e.g. o=My Company,c=US', + 'LDAP_UID' => 'LDAP uid', + 'LDAP_UID_EXPLAIN' => 'This is the key under which to search for a given login identity, e.g. uid, sn, etc.', +); + +// Board defaults +$lang += array( + 'ACP_BOARD_DEFAULTS_EXPLAIN' => 'These settings allow you to define a number of default or global settings used by the board. For example, to disable the use of HTML across the entire board alter the relevant setting below. This data is also used for new user registrations and (where relevant) guest users. Please note that registered users can override some of these options with their own settings.', + 'DEFAULT_STYLE' => 'Default Style', + 'OVERRIDE_STYLE' => 'Override user style', + 'OVERRIDE_STYLE_EXPLAIN' => 'Replaces users style with the default.', + 'DEFAULT_LANGUAGE' => 'Default Language', + 'DEFAULT_DATE_FORMAT' => 'Date Format', + 'DEFAULT_DATE_FORMAT_EXPLAIN'=> 'The date format is the same as the PHP date function.', + 'SYSTEM_TIMEZONE' => 'System Timezone', + 'SYSTEM_DST' => 'Enable Daylight Savings Time', + 'ALLOW_TOPIC_NOTIFY' => 'Allow Topic Watching', + 'ALLOW_FORUM_NOTIFY' => 'Allow Forum Watching', + 'ALLOW_NAME_CHANGE' => 'Allow Username changes', + + 'MIN_RATINGS' => 'Ratings count before karma', + 'MIN_RATINGS_EXPLAIN' => 'Number of distinct ratings before users karma is calculated.', + 'ALLOW_ATTACHMENTS' => 'Allow Attachments', + 'ALLOW_PM_ATTACHMENTS' => 'Allow Attachments in Private Messages', + 'ALLOW_HTML' => 'Allow HTML', + 'ALLOWED_TAGS' => 'Allowed HTML tags', + 'ALLOWED_TAGS_EXPLAIN' => 'Separate tags with commas.', + 'ALLOW_BBCODE' => 'Allow BBCode', + 'ALLOW_SMILIES' => 'Allow Smilies', + 'ALLOW_SIG' => 'Allow Signatures', + 'MAX_SIG_LENGTH' => 'Maximum signature length', + 'MAX_SIG_LENGTH_EXPLAIN' => 'Maximum number of characters in user signatures.', + 'ALLOW_NO_CENSORS' => 'Allow Disable of Censors', + 'ALLOW_NO_CENSORS_EXPLAIN' => 'User can disable word censoring.', + 'ALLOW_BOOKMARKS' => 'Allow bookmarking topics', + 'ALLOW_BOOKMARKS_EXPLAIN' => 'User is able to store personal bookmarks' +); + +?>
\ No newline at end of file diff --git a/phpBB/language/en/acp/bots.php b/phpBB/language/en/acp/bots.php new file mode 100644 index 0000000000..720fda8341 --- /dev/null +++ b/phpBB/language/en/acp/bots.php @@ -0,0 +1,65 @@ +<?php +/** +* +* acp_bots [English] +* +* @package language +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* DO NOT CHANGE +*/ +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +// DEVELOPERS PLEASE NOTE +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine + +// Bot settings +$lang += array( + 'BOTS' => 'Manage Bots', + 'BOTS_EXPLAIN' => 'Bots or crawlers are automated agents most commonly used by search engines to update their databases. Since they rarely make proper use of sessions they can distort visitor counts, increase load and sometimes fail to index sites correctly. Here you can define a special type of user to overcome these problems.', + 'BOT_ACTIVATE' => 'Activate', + 'BOT_ACTIVE' => 'Bot active', + 'BOT_ADD' => 'Add bot', + 'BOT_ADDED' => 'New bot successfully added', + 'BOT_AGENT' => 'Agent match', + 'BOT_AGENT_EXPLAIN' => 'A string matching the bots browser agent, partial matches are allowed.', + 'BOT_DEACTIVATE' => 'Deactivate', + 'BOT_DELETED' => 'Bot deleted successfully', + 'BOT_EDIT' => 'Edit bots', + 'BOT_EDIT_EXPLAIN' => 'Here you can add or edit an existing bot entry. You may define an agent string and/or one or more IP addresses (or range of addresses) to match. Be careful when defining matching agent strings or addresses. You may also specify a style and language that the bot will view the board using. This may allow you to reduce bandwidth use by setting a simple style for bots. Remember to set appropriate permissions for the special Bot usergroup.', + 'BOT_LANG' => 'Bot language', + 'BOT_LANG_EXPLAIN' => 'The language presented to the bot as it browses.', + 'BOT_LAST_VISIT' => 'Last visit', + 'BOT_IP' => 'Bot IP address', + 'BOT_IP_EXPLAIN' => 'Partial matches are allowed, seperate addresses with an apostrophe. A single hostname may be entered instead of an IP.', + 'BOT_NAME' => 'Bot name', + 'BOT_NAME_EXPLAIN' => 'Used only for your own information.', + 'BOT_NEVER' => 'Never', + 'BOT_STYLE' => 'Bot style', + 'BOT_STYLE_EXPLAIN' => 'The style used for the board by the bot.', + 'BOT_UPDATED' => 'Existing bot updated successfully', + 'BOT_VIS' => 'Bot visible', + 'BOT_VIS_EXPLAIN' => 'Allow bot to be seen by all users in online lists.', + + 'ERR_BOT_NO_IP' => 'The IP addresses you supplied were invalid or the hostname could not be resolved.', + 'ERR_BOT_NO_MATCHES' => 'You must supply at least one of an agent or IP for this bot match.', + + 'NO_BOT' => 'Found no bot with the specified ID', +); + +?>
\ No newline at end of file diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php new file mode 100644 index 0000000000..c9337d5991 --- /dev/null +++ b/phpBB/language/en/acp/common.php @@ -0,0 +1,192 @@ +<?php +/** +* +* acp common [English] +* +* @package language +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* DO NOT CHANGE +*/ +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +// DEVELOPERS PLEASE NOTE +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine + +// Common +$lang += array( + 'ACP_ATTACHMENTS' => 'Attachments', + 'ACP_ATTACHMENT_SETTINGS' => 'Attachment Settings', + 'ACP_AUTH_SETTINGS' => 'Authentication', + 'ACP_AVATAR_SETTINGS' => 'Avatar Settings', + 'ACP_BOARD_DEFAULTS' => 'Board Defaults', + 'ACP_BOARD_SETTINGS' => 'Board Settings', + 'ACP_BOTS' => 'Spiders/Robots', + 'ACP_CAT_GENERAL' => 'General', + 'ACP_COOKIE_SETTINGS' => 'Cookie Settings', + 'ACP_EMAIL_SETTINGS' => 'Email Settings', + 'ACP_EXTENSION_GROUPS' => 'Manage Extension Groups', + 'ACP_JABBER_SETTINGS' => 'Jabber Settings', + 'ACP_LOAD_SETTINGS' => 'Load Settings', + 'ACP_MAIN' => 'Admin index', + 'ACP_MANAGE_EXTENSIONS' => 'Manage Extensions', + 'ACP_MESSAGE_SETTINGS' => 'Message Settings', + 'ACP_MODULE_MANAGEMENT' => 'Module Management', + 'ACP_ORPHAN_ATTACHMENTS' => 'Orphan Attachments', + 'ACP_PHP_INFO' => 'PHP Information', + 'ACP_POSTING' => 'Posting', + 'ACP_SERVER_SETTINGS' => 'Server Settings', + + 'ACTION' => 'Action', + 'ACTIVATE' => 'Activate', + 'ADMIN' => 'Administration', + 'ADMIN_INDEX' => 'Admin Index', + 'ADMIN_PANEL' => 'Administration Control Panel', + + 'BACK' => 'Back', + + 'CONFIG_UPDATED' => 'Configuration updated successfully', + + 'DEACTIVATE' => 'Deactivate', + 'DISABLE' => 'Disable', + + 'EDIT' => 'Edit', + 'ENABLE' => 'Enable', + + 'FORUM_INDEX' => 'Forum Index', + + 'GENERAL_OPTIONS' => 'General Options', + 'GENERAL_SETTINGS' => 'General Settings', + + 'IP' => 'User IP', + 'IP_HOSTNAME' => 'IP addresses or hostnames', + + 'LOGGED_IN_AS' => 'You are logged in as:', + 'LOGIN_ADMIN' => 'To administer the board you must be an authenticated user.', + 'LOGIN_ADMIN_CONFIRM' => 'To administer the board you must re-authenticate yourself.', + 'LOGIN_ADMIN_SUCCESS' => 'You have successfully authenticated and will now be redirected to the Administration Control Panel', + + 'MOVE_DOWN' => 'Move Down', + 'MOVE_UP' => 'Move Up', + + 'NO_ADMIN' => 'You are not authorised to administer this board.', + + 'OFF' => 'OFF', + 'ON' => 'ON', + + 'REMIND' => 'Remind', + 'RETURN_TO' => 'Return to ...', + + 'USER_CONTROL_PANEL' => 'User Control Panel', +); + +// PHP info +$lang += array( + 'ACP_PHP_INFO_EXPLAIN' => 'This page lists information on the version of PHP installed on this server. It includes details of loaded modules, available variables and default settings. This information may be useful when diagnosing problems. Please be aware that some hosting companies will limit what information is displayed here for security reasons. You are advised to not give out any details on this page except when asked by support or other Team Member on the support forums.', +); + +// Index page +$lang += array( + 'ADMIN_INTRO' => 'Thank you for choosing phpBB as your forum solution. This screen will give you a quick overview of all the various statistics of your board. The links on the left hand side of this screen allow you to control every aspect of your forum experience. Each page will have instructions on how to use the tools.', + 'ADMIN_LOG' => 'Logged administrator actions', + 'ADMIN_LOG_INDEX_EXPLAIN' => 'This gives an overview of the last five actions carried out by board administrators. A full copy of the log can be viewed from the appropriate menu item to the left.', + 'AVATAR_DIR_SIZE' => 'Avatar directory size', + + 'BOARD_STARTED' => 'Board started', + + 'DATABASE_SIZE' => 'Database size', + + 'FILES_PER_DAY' => 'Attachments per day', + 'FORUM_STATS' => 'Forum Statistics', + + 'GZIP_COMPRESSION' => 'Gzip compression', + + 'INACTIVE_USERS' => 'Inactive Users', + 'INACTIVE_USERS_EXPLAIN' => 'This is a list of users who have registered but whos accounts are inactive. You can activate, delete or remind (by sending an email) these users if you wish.', + + 'NO_INACTIVE_USERS' => 'No inactive users', + 'NOT_AVAILABLE' => 'Not available', + 'NUMBER_FILES' => 'Number of Attachments', + 'NUMBER_POSTS' => 'Number of posts', + 'NUMBER_TOPICS' => 'Number of topics', + 'NUMBER_USERS' => 'Number of users', + + 'POSTS_PER_DAY' => 'Posts per day', + + 'RESET_DATE' => 'Reset Date', + 'RESET_ONLINE' => 'Reset Online', + 'RESYNC_POSTCOUNTS' => 'Resync Postcounts', + 'RESYNC_STATS' => 'Resync Stats', + + 'STATISTIC' => 'Statistic', + + 'TOPICS_PER_DAY' => 'Topics per day', + + 'UPLOAD_DIR_SIZE' => 'Upload directory size', + 'USERS_PER_DAY' => 'Users per day', + + 'VALUE' => 'Value', + + 'WELCOME_PHPBB' => 'Welcome to phpBB', +); + +// Log +$lang += array( + 'LOG_MODULE_DISABLE' => '<b>Module disabled</b>', + 'LOG_MODULE_ENABLE' => '<b>Module enabled</b>', + 'LOG_MODULE_MOVE_DOWN' => '<b>Module moved down</b><br />» %s', + 'LOG_MODULE_MOVE_UP' => '<b>Module moved up</b><br />» %s', + 'LOG_MODULE_REMOVED' => '<b>Module removed</b><br />» %s', + 'LOG_MODULE_ADD' => '<b>Module added</b><br />» %s', + 'LOG_MODULE_EDIT' => '<b>Module edited</b><br />» %s', + + 'LOG_RESET_DATE' => '<b>Board start date reset</b>', + 'LOG_RESET_ONLINE' => '<b>Most users online reset</b>', + 'LOG_RESYNC_POSTCOUNTS' => '<b>User postcounts synced</b>', + 'LOG_RESYNC_STATS' => '<b>Post, topic and user stats reset</b>', + + 'LOG_INDEX_ACTIVATE' => '<b>Activated inactive users</b><br />» %s', + 'LOG_INDEX_DELETE' => '<b>Deleted inactive users</b><br />» %s', + 'LOG_INDEX_REMIND' => '<b>Sent reminder emails to inactive users</b><br />» %s', + + 'LOG_DOWNLOAD_EXCLUDE_IP' => '<b>Exluded ip/hostname from download list</b><br />» %s', + 'LOG_DOWNLOAD_IP' => '<b>Added ip/hostname to download list</b><br />» %s', + 'LOG_DOWNLOAD_REMOVE_IP' => '<b>Removed ip/hostname from download list</b><br />» %s', + + 'LOG_SERVER_CONFIG' => '<b>Altered server settings</b>', + 'LOG_DEFAULT_CONFIG' => '<b>Altered board defaults</b>', + 'LOG_SETTINGS_CONFIG' => '<b>Altered board settings</b>', + 'LOG_COOKIE_CONFIG' => '<b>Altered cookie settings</b>', + 'LOG_EMAIL_CONFIG' => '<b>Altered email settings</b>', + 'LOG_AVATAR_CONFIG' => '<b>Altered avatar settings</b>', + 'LOG_AUTH_CONFIG' => '<b>Altered authentication settings</b>', + 'LOG_LOAD_CONFIG' => '<b>Altered load settings</b>', + 'LOG_MESSAGE_CONFIG' => '<b>Altered private message settings</b>', + + 'LOG_ATTACH_CONFIG' => '<b>Altered attachment settings</b>', + 'LOG_ATTACH_EXT_ADD' => '<b>Added or edited attachment extension</b><br />» %s', + 'LOG_ATTACH_EXT_DEL' => '<b>Removed attachment extension</b><br />» %s', + 'LOG_ATTACH_EXT_UPDATE' => '<b>Updated attachment extension</b><br />» %s', + 'LOG_ATTACH_EXTGROUP_ADD' => '<b>Added extension group</b><br />» %s', + 'LOG_ATTACH_EXTGROUP_EDIT' => '<b>Edited extension group</b><br />» %s', + 'LOG_ATTACH_EXTGROUP_DEL' => '<b>Removed extension group</b><br />» %s', + 'LOG_ATTACH_FILEUPLOAD' => '<b>Orphan File uploaded to Post Number %1$d - %2$s</b>', + 'LOG_ATTACH_ORPHAN_DEL' => '<b>Orphan Files deleted</b><br />» %s', +); + +?>
\ No newline at end of file diff --git a/phpBB/language/en/acp/modules.php b/phpBB/language/en/acp/modules.php new file mode 100644 index 0000000000..c36dc4ad1d --- /dev/null +++ b/phpBB/language/en/acp/modules.php @@ -0,0 +1,75 @@ +<?php +/** +* +* acp_modules [English] +* +* @package language +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* DO NOT CHANGE +*/ +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +// DEVELOPERS PLEASE NOTE +// +// Placeholders can now contain order information, e.g. instead of +// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows +// translators to re-order the output of data while ensuring it remains correct +// +// You do not need this where single placeholders are used, e.g. 'Message %d' is fine +// equally where a string contains only two placeholders which are used to wrap text +// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine + +$lang += array( + 'ACP_MODULE_MANAGEMENT_EXPLAIN' => 'Here you are able to manage all kind of modules. Please note that if you place the same module under different categories, the category selected will be the first one found within the tree.', + 'ADD_MODULE' => 'Add module', + 'ADD_MODULE_CONFIRM' => 'Are you sure you want to add the selected module with the selected mode?', + 'ADD_MODULE_TITLE' => 'Add Module', + + 'CANNOT_REMOVE_MODULE' => 'Unable to remove module, it has assigned childs. Please remove or move all childs before performing this action', + 'CATEGORY' => 'Category', + 'CHOOSE_MODE' => 'Choose Module Mode', + 'CHOOSE_MODE_EXPLAIN' => 'Choose the modules mode being used.', + 'CHOOSE_MODULE' => 'Choose Module', + 'CHOOSE_MODULE_EXPLAIN' => 'Choose the file being called by this module.', + 'CREATE_MODULE' => 'Create new module', + + 'DEACTIVATED_MODULE' => 'Deactivated module', + 'DELETE_MODULE' => 'Delete module', + 'DELETE_MODULE_CONFIRM' => 'Are you sure you want to remove this module?', + + 'EDIT_MODULE' => 'Edit module', + 'EDIT_MODULE_EXPLAIN' => 'Here you are able to enter module specific settings', + + 'MODULE' => 'Module', + 'MODULE_ADDED' => 'Module successfully added', + 'MODULE_DELETED' => 'Module successfully removed', + 'MODULE_DISPLAYED' => 'Module displayed', + 'MODULE_DISPLAYED_EXPLAIN' => 'If you do not whish to display this module, but want to use it, set this to no.', + 'MODULE_EDITED' => 'Module successfully edited', + 'MODULE_ENABLED' => 'Module enabled', + 'MODULE_LANGNAME' => 'Module Language Name', + 'MODULE_LANGNAME_EXPLAIN' => 'Enter the displayed module name. Use language constant if name is served from language file.', + 'MODULE_TYPE' => 'Module type', + + 'NO_CATEGORY_TO_MODULE' => 'Unable to turn category into module. Please remove/move all childs before performing this action.', + 'NO_MODULE' => 'No module found', + 'NO_MODULE_ID' => 'No module id specified', + 'NO_MODULE_LANGNAME' => 'No module language name specified', + 'NO_PARENT' => 'No Parent', + + 'PARENT' => 'Parent', + 'PARENT_NO_EXIST' => 'Parent does not exist', + + 'SELECT_MODULE' => 'Select a module', +); + +?>
\ No newline at end of file |