diff options
-rw-r--r-- | phpBB/adm/style/acp_styles.html | 218 | ||||
-rw-r--r-- | phpBB/adm/style/sql_report.css | 130 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_language.php | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_modules.php | 4 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_styles.php | 1140 | ||||
-rw-r--r-- | phpBB/includes/db/dbal.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 7 | ||||
-rw-r--r-- | phpBB/includes/functions_template.php | 1 | ||||
-rw-r--r-- | phpBB/includes/functions_transfer.php | 17 | ||||
-rw-r--r-- | phpBB/includes/session.php | 7 | ||||
-rw-r--r-- | phpBB/install/schemas/firebird_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/mssql_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/oracle_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/postgres_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/schema_data.sql | 197 | ||||
-rw-r--r-- | phpBB/install/schemas/sqlite_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/language/en/acp/common.php | 37 | ||||
-rw-r--r-- | phpBB/language/en/acp/styles.php | 180 | ||||
-rw-r--r-- | phpBB/style.php | 40 |
20 files changed, 1862 insertions, 132 deletions
diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html new file mode 100644 index 0000000000..d8d1d11d9e --- /dev/null +++ b/phpBB/adm/style/acp_styles.html @@ -0,0 +1,218 @@ +<!-- INCLUDE overall_header.html --> + +<a name="maincontent"></a> + +<!-- IF S_DELETE --> + + <a href="{U_BACK}" style="float: right">« {L_BACK}</a> + + <h1>{L_TITLE}</h1> + + <p>{L_EXPLAIN}</p> + + <form id="acp_styles" method="post" action="{U_ACTION}"> + + <fieldset> + <legend>{L_TITLE}</legend> + <dl> + <dt><label>{L_NAME}:</label></dt> + <dd><b>{NAME}</b></dd> + </dl> + <dl> + <dt><label for="new_id">{L_REPLACE}:</label><br /><span>{L_REPLACE_EXPLAIN}</span></dt> + <dd><select name="new_id">{S_REPLACE_OPTIONS}</select></dd> + </dl> + </fieldset> + + <fieldset class="quick"> + <input class="button1" type="submit" name="update" value="{L_DELETE}" /> + </fieldset> + + </form> + +<!-- ELSEIF S_EXPORT --> + + <a href="{U_BACK}" style="float: right">« {L_BACK}</a> + + <h1>{L_TITLE}</h1> + + <p>{L_EXPLAIN}</p> + + <!-- IF S_ERROR_MSG --> + <div class="errorbox"> + <h3>{L_WARNING}</h3> + <p>{ERROR_MSG}</p> + </div> + <!-- ENDIF --> + + <form id="acp_styles" method="post" action="{U_ACTION}"> + + <fieldset> + <legend>{L_TITLE}</legend> + <dl> + <dt><label>{L_NAME}:</label></dt> + <dd><b>{NAME}</b></dd> + </dl> + <!-- IF S_STYLE --> + <dl> + <dt><label for="inc_template">{L_INCLUDE_TEMPLATE}:</label></dt> + <dd><input type="radio" id="inc_template" name="inc_template" value="1" checked="checked" /> {L_YES} <input type="radio" name="inc_template" value="0" /> {L_NO}</dd> + </dl> + <dl> + <dt><label for="inc_theme">{L_INCLUDE_THEME}:</label></dt> + <dd><input type="radio" id="inc_theme" name="inc_theme" value="1" checked="checked" /> {L_YES} <input type="radio" name="inc_theme" value="0" /> {L_NO}</dd> + </dl> + <dl> + <dt><label for="inc_imageset">{L_INCLUDE_IMAGESET}:</label></dt> + <dd><input type="radio" id="inc_imageset" name="inc_imageset" value="1" checked="checked" /> {L_YES} <input type="radio" name="inc_imageset" value="0" /> {L_NO}</dd> + </dl> + <!-- ENDIF --> + <dl> + <dt><label for="store">{L_DOWNLOAD_STORE}:</label><br /><span>{L_DOWNLOAD_STORE_EXPLAIN}</span></dt> + <dd><input type="radio" id="store" name="store" value="1" checked="checked" /> {L_EXPORT_STORE} <input type="radio" name="store" value="0" /> {L_EXPORT_DOWNLOAD}</dd> + </dl> + <dl> + <dt><label for="format">{L_ARCHIVE_FORMAT}:</label></dt> + <dd>{FORMAT_BUTTONS}</dd> + </dl> + </fieldset> + + <fieldset class="quick"> + <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> + </fieldset> + + </form> + +<!-- ELSEIF S_FRONTEND --> + + <h1>{L_TITLE}</h1> + + <p>{L_EXPLAIN}</p> + + <!-- IF S_STYLE --> <!-- DEFINE $COLSPAN = 4 --> <!-- ELSE --> <!-- DEFINE $COLSPAN = 3 --> <!-- ENDIF --> + + <form id="acp_styles" method="post" action="{U_ACTION}"> + + <table cellspacing="1"> + <col class="row1" /><!-- IF S_STYLE --><col class="row1" /><!-- ENDIF --><col class="row2" /> + <thead> + <tr> + <th>{L_NAME}</th> + <!-- IF S_STYLE --><th>{L_STYLE_USED_BY}</th><!-- ENDIF --> + <th>{L_OPTIONS}</th> + </tr> + </thead> + <tbody> + <tr> + <td class="row3" colspan="{$COLSPAN}"><b>{L_INSTALLED}</b></td> + </tr> + <!-- BEGIN installed --> + <tr> + <td><a href="{installed.U_EDIT}">{installed.NAME}</a><!-- IF installed.S_DEFAULT_STYLE --> *<!-- ENDIF --></td> + <!-- IF S_STYLE --> + <td style="text-align: center;">{installed.STYLE_COUNT}</td> + <!-- ENDIF --> + <td style="text-align: center;"> + <!-- IF S_STYLE --> + <a href="{installed.U_STYLE_ACT_DEACT}">{installed.L_STYLE_ACT_DEACT}</a> | + <!-- ENDIF --> + {installed.S_OPTIONS} | <a href="{installed.U_PREVIEW}" target="_preview">{L_PREVIEW}</a> + </td> + <!-- END installed --> + <tr> + <td class="row3" colspan="{$COLSPAN}"><b>{L_UNINSTALLED}</b></td> + </tr> + <!-- IF not .uninstalled --> + <tr> + <td class="row1" colspan="{$COLSPAN}" style="text-align: center;">{L_NO_UNINSTALLED}</td> + </tr> + <!-- ENDIF --> + <!-- BEGIN uninstalled --> + <tr> + <td<!-- IF S_STYLE --> colspan="2"<!-- ENDIF -->>{uninstalled.NAME}<br /><b class="small">{L_COPYRIGHT}: {uninstalled.COPYRIGHT}</b></td> + <td style="text-align: center;"><a href="{uninstalled.U_INSTALL}">{L_INSTALL}</a></td> + </tr> + <!-- END uninstalled --> + </tbody> + </table> + + <fieldset class="quick"> + {L_CREATE}: <input type="text" name="name" value="" /> {L_FROM} <select name="basis">{S_BASIS_OPTIONS}</select> <input class="button2" type="submit" name="add" value="{L_SUBMIT}" /> + </fieldset> + + </form> + +<!-- ELSEIF S_DETAILS --> + + <a href="{U_BACK}" style="float: right">« {L_BACK}</a> + + <h1>{L_TITLE}</h1> + + <p>{L_EXPLAIN}</p> + + <!-- IF S_ERROR_MSG --> + <div class="errorbox"> + <h3>{L_WARNING}</h3> + <p>{ERROR_MSG}</p> + </div> + <!-- ENDIF --> + + <form id="acp_styles" method="post" action="{U_ACTION}"> + + <fieldset> + <legend>{L_TITLE}</legend> + <dl> + <dt><label for="name">{L_NAME}:</label></dt> + <dd><input type="text" id="name" name="name" value="{NAME}" /></dd> + </dl> + <dl> + <dt><label for="copyright">{L_COPYRIGHT}:</label></dt> + <dd><input type="text" id="copyright" name="copyright" value="{COPYRIGHT}" /></dd> + </dl> + <!-- IF S_STYLE --> + <dl> + <dt><label for="template_id">{L_STYLE_TEMPLATE}:</label></dt> + <dd><select id="template_id" name="template_id">{S_TEMPLATE_OPTIONS}</select></dd> + </dl> + <dl> + <dt><label for="theme_id">{L_STYLE_THEME}:</label></dt> + <dd><select id="theme_id" name="theme_id">{S_THEME_OPTIONS}</select></dd> + </dl> + <dl> + <dt><label for="imageset_id">{L_STYLE_IMAGESET}:</label></dt> + <dd><select id="imageset_id" name="imageset_id">{S_IMAGESET_OPTIONS}</select></dd> + </dl> + <!-- ENDIF --> + <!-- IF S_TEMPLATE or S_THEME --> + <dl> + <dt><label for="store_db">{L_LOCATION}:</label><br /><span>{L_LOCATION_EXPLAIN}</span></dt> + <dd><input type="radio" name="store_db" value="0"<!-- IF not S_STORE_DB --> id="store_db" checked="checked"<!-- ENDIF --> /> {L_STORE_FILESYSTEM} <input type="radio" name="store_db" value="1"<!-- IF S_STORE_DB --> id="store_db" checked="checked"<!-- ENDIF --> /> {L_STORE_DATABASE}</dd> + </dl> + <!-- ENDIF --> + <!-- IF S_STYLE --> + </fieldset> + + <fieldset> + <legend>{L_OPTIONS}</legend> + <dl> + <dt><label for="style_active">{L_STYLE_ACTIVE}:</label></dt> + <dd><input type="radio" name="style_active" value="1"<!-- IF S_STYLE_ACTIVE --> id="style_active" checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" name="style_active" value="0"<!-- IF not S_STYLE_ACTIVE --> id="style_active" checked="checked"<!-- ENDIF --> /> {L_NO}</dd> + </dl> + <!-- IF not S_STYLE_DEFAULT --> + <dl> + <dt><label for="style_default">{L_STYLE_DEFAULT}:</label></dt> + <dd><input type="radio" name="style_default" value="1" /> {L_YES} <input type="radio" id="style_default" name="style_default" value="0" checked="checked" /> {L_NO}</dd> + </dl> + <!-- ENDIF --> + <!-- ENDIF --> + </fieldset> + + <fieldset class="quick"> + <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> + </fieldset> + + </form> + +<!-- ENDIF --> + +<!-- INCLUDE overall_footer.html -->
\ No newline at end of file diff --git a/phpBB/adm/style/sql_report.css b/phpBB/adm/style/sql_report.css new file mode 100644 index 0000000000..a72b7d80b5 --- /dev/null +++ b/phpBB/adm/style/sql_report.css @@ -0,0 +1,130 @@ +/* + $Id$ + + The original "subSilver" theme for phpBB2 + Created by subBlue design :: http://www.subBlue.com + Updated for phpBB 2.2 by psoTFX :: phpBB Group + Copyright (c) 2002 phpBB Group +*/ + +body { + background-color: white; + font-family: Verdana, Arial, Helvetica, sans-serif; + margin: 0; + border: 0; + padding: 0; +} + +p { + font-size: 8pt; +} + +.maintitle, h1 { + font: bold 18pt 'Trebuchet MS', Verdana, sans-serif; + text-decoration:none; + line-height: 120%; +} + +h2 { + font: bold 12pt Arial, Helvetica, sans-serif; + text-decoration:none; + line-height: 120%; +} + +.maintitle { + color: #12749B +} + +/* + Anchors +*/ +a:link, a:active, a:visited { color: #006699; text-decoration: none; } +a:hover { color: #DD6900; text-decoration: underline; } + +a.nav { color: #006699; text-decoration: none; } +a.nav:hover { text-decoration: underline; } + +a.th:link { color: #FFA34F; text-decoration: none; } +a.th:active { color: #FFA34F; text-decoration: none; } +a.th:visited { color: #FFA34F; text-decoration: none; } +a.th:hover { color: #FFA34F; text-decoration: underline; } + +/* + Non-tag specific +*/ +.gen, .gensmall { + color: black; +} +.gen { + font-size: 8pt; +} +.gensmall { + font-size: 7pt; +} +.nav { + color: black; + font: bold 7pt; +} + +.error { color: #FF0000 } + +/* + Tables +*/ +table.bg { + background-color: #ACBBC6 +} + +th, td { + font: normal 8pt Verdana, Arial, Helvetica, sans-serif; +} + +th { + height: 25px; + background-color: #006699; + color: #FFA34F; + font-weight: bold; + font-size: 11px; +} + +td.cat { + height: 28px; + background-color: #D1D7DC; +} + +.row1 { + background-color: #EFEFEF; +} +.row2 { + background-color: #DEE3E7; +} +.row3 { + background-color: #D1D7DC; +} + +/* + Misc +*/ +hr { + height: 0px; + border: solid #D1D7DC 0px; + border-top-width: 1px; +} + +/* + Forms +*/ +input { + text-indent: 2px; +} + +textarea, select { + border: 1px solid; +} + +input, textarea, select { + color: black; + font: normal 8pt Verdana, Arial, Helvetica, sans-serif; + border-color: black; +} + diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php index 4566ab1c79..0949311ae7 100644 --- a/phpBB/includes/acp/acp_language.php +++ b/phpBB/includes/acp/acp_language.php @@ -642,7 +642,7 @@ class acp_language if (!in_array($use_method, $methods)) { - $use_method = ''; + $use_method = 'tar'; } // Let the user decide in which format he wants to have the pack diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php index bb7adfa988..62c071dff8 100644 --- a/phpBB/includes/acp/acp_modules.php +++ b/phpBB/includes/acp/acp_modules.php @@ -44,6 +44,10 @@ class acp_modules { $user->add_lang('ucp'); } + else if ($this->module_class == 'mcp') + { + $user->add_lang('mcp'); + } $this->page_title = strtoupper($this->module_class); diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php new file mode 100644 index 0000000000..3774a9ae87 --- /dev/null +++ b/phpBB/includes/acp/acp_styles.php @@ -0,0 +1,1140 @@ +<?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_styles +{ + var $u_action; + + var $style_cfg; + var $template_cfg; + var $theme_cfg; + var $imageset_cfg; + var $imageset_keys; + + function main($id, $mode) + { + global $db, $user, $auth, $template; + global $config, $SID, $phpbb_root_path, $phpbb_admin_path, $phpEx; + + $user->add_lang('acp/styles'); + + $this->tpl_name = 'acp_styles'; + $this->page_title = 'ACP_CAT_STYLES'; + + $action = request_var('action', ''); + $action = (isset($_POST['add'])) ? 'add' : $action; + $style_id = request_var('id', 0); + + $this->u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode"; + + // Fill the configuration variables + $this->style_cfg = $this->template_cfg = $this->theme_cfg = $this->imageset_cfg = ' +# +# phpBB {MODE} configuration file +# +# @package phpBB3 +# @copyright (c) 2005 phpBB Group +# @license http://opensource.org/licenses/gpl-license.php GNU Public License +# +# +# At the left is the name, please do not change this +# At the right the value is entered +# For on/off options the valid values are on, off, 1, 0, true and false +# +# Values get trimmed, if you want to add a space in front or at the end of +# the value, then enclose the value with single or double quotes. +# Single and double quotes do not need to be escaped. +# +# + +# General Information about this {MODE} +name = {NAME} +copyright = {COPYRIGHT} +version = {VERSION} +'; + + $this->theme_cfg .= ' +# Some configuration options + +# +# You have to turn this option on if you want to use the +# path template variables ({T_IMAGESET_PATH} for example) within +# your css file. +# This is mostly the case if you want to use language specific +# images within your css file. +# +parse_css_file = {PARSE_CSS_FILE} + +# +# This option defines the pagination seperator in templates. +# +pagination_sep = \'{PAGINATION_SEP}\' +'; + + $this->imageset_keys = 'site_logo, btn_post, btn_post_pm, btn_reply, btn_reply_pm, btn_locked, btn_profile, btn_pm, btn_delete, btn_info, btn_quote, btn_search, btn_edit, btn_report, btn_email, btn_www, btn_icq, btn_aim, btn_yim, btn_msnm, btn_jabber, btn_online, btn_offline, btn_friend, btn_foe, icon_unapproved, icon_reported, icon_attach, icon_post, icon_post_new, icon_post_latest, icon_post_newest, forum, forum_new, forum_locked, forum_link, sub_forum, sub_forum_new, folder, folder_moved, folder_posted, folder_new, folder_new_posted, folder_hot, folder_hot_posted, folder_hot_new, folder_hot_new_posted, folder_locked, folder_locked_posted, folder_locked_new, folder_locked_new_posted, folder_sticky, folder_sticky_posted, folder_sticky_new, folder_sticky_new_posted, folder_announce, folder_announce_posted, folder_announce_new, folder_announce_new_posted, folder_global, folder_global_posted, folder_global_new, folder_global_new_posted, poll_left, poll_center, poll_right, attach_progress_bar, user_icon1, user_icon2, user_icon3, user_icon4, user_icon5, user_icon6, user_icon7, user_icon8, user_icon9, user_icon10'; + + // Execute overall actions + switch ($action) + { + case 'delete': + if ($style_id) + { + $this->remove($mode, $style_id); + return; + } + break; + + case 'export': + if ($style_id) + { + $this->export($mode, $style_id); + return; + } + break; + + case 'add': + case 'install': + install($mode, $action, $style_id); + break; + + case 'details': + if ($style_id) + { + $this->details($mode, $style_id); + return; + } + break; + } + + switch ($mode) + { + case 'style': + + switch ($action) + { + case 'activate': + case 'deactivate': + + if ($style_id == $config['default_style']) + { + trigger_error($user->lang['DEACTIVATE_DEFAULT'] . adm_back_link($this->u_action)); + } + + $sql = 'UPDATE ' . STYLES_TABLE . ' + SET style_active = ' . (($action == 'activate') ? 1 : 0) . ' + WHERE style_id = ' . $style_id; + $db->sql_query($sql); + + // Set style to default for any member using deactivated style + if ($action == 'deactivate') + { + $sql = 'UPDATE ' . USERS_TABLE . ' + SET user_style = ' . $config['default_style'] . " + WHERE user_style = $style_id"; + $db->sql_query($sql); + } + break; + } + + $this->frontend('style', array('export', 'delete')); + break; + + case 'template': + + $this->frontend('template', array('cache', 'details', 'refresh', 'export', 'delete')); + break; + + case 'theme': + + $this->frontend('theme', array('details', 'refresh', 'export', 'delete')); + break; + + case 'imageset': + + $this->frontend('imageset', array('details', 'delete', 'export')); + break; + } + } + + /** + * Build Frontend with supplied options + */ + function frontend($mode, $options) + { + global $user, $template, $db, $config, $phpbb_root_path, $phpEx, $SID; + + $sql_from = ''; + $style_count = array(); + + switch ($mode) + { + case 'style': + $sql_from = STYLES_TABLE; + + $sql = 'SELECT user_style, COUNT(user_style) AS style_count + FROM ' . USERS_TABLE . ' + GROUP BY user_style'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $style_count[$row['user_style']] = $row['style_count']; + } + $db->sql_freeresult($result); + + break; + + case 'template': + $sql_from = STYLES_TPL_TABLE; + break; + + case 'theme': + $sql_from = STYLES_CSS_TABLE; + break; + + case 'imageset': + $sql_from = STYLES_IMAGE_TABLE; + break; + } + + $l_prefix = strtoupper($mode); + + $this->page_title = 'ACP_' . $l_prefix . 'S'; + + $template->assign_vars(array( + 'S_FRONTEND' => true, + 'S_STYLE' => ($mode == 'style') ? true : false, + + 'L_TITLE' => $user->lang[$this->page_title], + 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'], + 'L_NAME' => $user->lang[$l_prefix . '_NAME'], + 'L_INSTALLED' => $user->lang['INSTALLED_' . $l_prefix], + 'L_UNINSTALLED' => $user->lang['UNINSTALLED_' . $l_prefix], + 'L_NO_UNINSTALLED' => $user->lang['NO_UNINSTALLED_' . $l_prefix], + 'L_CREATE' => $user->lang['CREATE_' . $l_prefix], + + 'U_ACTION' => $this->u_action, + ) + ); + + $sql = "SELECT * + FROM $sql_from"; + $result = $db->sql_query($sql); + + $installed = array(); + + $basis_options = '<option class="sep" value="">' . $user->lang['OPTIONAL_BASIS'] . '</option>'; + while ($row = $db->sql_fetchrow($result)) + { + $installed[] = $row[$mode . '_name']; + $basis_options .= '<option value="' . $row[$mode . '_id'] . '">' . $row[$mode . '_name'] . '</option>'; + + $stylevis = ($mode == 'style' && !$row['style_active']) ? 'activate' : 'deactivate'; + + $s_options = array(); + foreach ($options as $option) + { + $s_options[] = '<a href="' . $this->u_action . "&action=$option&id=" . $row[$mode . '_id'] . '">' . $user->lang[strtoupper($option)] . '</a>'; + } + + $template->assign_block_vars('installed', array( + 'S_DEFAULT_STYLE' => ($mode == 'style' && $row['style_id'] == $config['default_style']) ? true : false, + 'U_EDIT' => $this->u_action . '&action=' . (($mode == 'style') ? 'details' : 'edit') . '&id=' . $row[$mode . '_id'], + 'U_STYLE_ACT_DEACT' => $this->u_action . '&action=' . $stylevis . '&id=' . $row[$mode . '_id'], + 'L_STYLE_ACT_DEACT' => $user->lang['STYLE_' . strtoupper($stylevis)], + 'S_OPTIONS' => implode(' | ', $s_options), + 'U_PREVIEW' => "{$phpbb_root_path}index.$phpEx$SID&$mode=" . $row[$mode . '_id'], + + 'NAME' => $row[$mode . '_name'], + 'STYLE_COUNT' => ($mode == 'style' && isset($style_count[$row['style_id']])) ? $style_count[$row['style_id']] : 0, + ) + ); + } + $db->sql_freeresult($result); + + // Grab uninstalled items + $new_ary = $cfg = array(); + + /** + * @todo grab templates/themes/imagesets from style directories + */ + $dp = opendir("{$phpbb_root_path}styles"); + while ($file = readdir($dp)) + { + $subpath = ($mode != 'style') ? "$mode/" : ''; + if ($file{0} != '.' && file_exists("{$phpbb_root_path}styles/$file/$subpath$mode.cfg")) + { + if ($cfg = file("{$phpbb_root_path}styles/$file/$subpath$mode.cfg")) + { + $items = parse_cfg_file('', $cfg); + $name = (isset($items['name'])) ? trim($items['name']) : false; + + if ($name && !in_array($name, $installed)) + { + $new_ary[] = array( + 'path' => $file, + 'name' => $name, + 'copyright' => $items['copyright'], + ); + } + } + } + } + unset($installed); + @closedir($dp); + + if (sizeof($new_ary)) + { + foreach ($new_ary as $cfg) + { + $template->assign_block_vars('uninstalled', array( + 'NAME' => $cfg['name'], + 'COPYRIGHT' => $cfg['copyright'], + 'U_INSTALL' => $this->u_action . '&action=install&path=' . urlencode($cfg['path'])) + ); + } + } + unset($new_ary); + + $template->assign_vars(array( + 'S_BASIS_OPTIONS' => $basis_options) + ); + + } + + /** + * Remove style/template/theme/imageset + */ + function remove($mode, $style_id) + { + global $db, $template, $user, $phpbb_root_path, $cache; + + $new_id = request_var('new_id', 0); + $update = (isset($_POST['update'])) ? true : false; + + switch ($mode) + { + case 'style': + $sql_from = STYLES_TABLE; + $sql_select = 'style_name'; + break; + + case 'template': + $sql_from = STYLES_TPL_TABLE; + $sql_select = 'template_name, template_path, template_storedb'; + break; + + case 'theme': + $sql_from = STYLES_CSS_TABLE; + $sql_select = 'theme_name, theme_path, theme_storedb'; + break; + + case 'imageset': + $sql_from = STYLES_IMAGE_TABLE; + $sql_select = 'imageset_name, imageset_path'; + break; + } + + $l_prefix = strtoupper($mode); + + $sql = "SELECT $sql_select + FROM $sql_from + WHERE {$mode}_id = $style_id"; + $result = $db->sql_query($sql); + $style_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$style_row) + { + trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action)); + } + + $sql = "SELECT {$mode}_id, {$mode}_name + FROM $sql_from + WHERE {$mode}_id <> $style_id + ORDER BY {$mode}_name ASC"; + $result = $db->sql_query($sql); + + $s_options = ''; + + if ($row = $db->sql_fetchrow($result)) + { + do + { + $s_options .= '<option value="' . $row[$mode . '_id'] . '">' . $row[$mode . '_name'] . '</option>'; + } + while ($row = $db->sql_fetchrow($result)); + } + else + { + trigger_error($user->lang['ONLY_' . $l_prefix] . adm_back_link($this->u_action)); + } + $db->sql_freeresult($result); + + if ($update) + { + $sql = "DELETE FROM $sql_from + WHERE {$mode}_id = $style_id"; + $db->sql_query($sql); + + if ($mode == 'style') + { + $sql = 'UPDATE ' . USERS_TABLE . " + SET user_style = $new_id + WHERE user_style = $style_id"; + $db->sql_query($sql); + } + else + { + $sql = 'UPDATE ' . STYLES_TABLE . " + SET {$mode}_id = $new_id + WHERE {$mode}_id = $style_id"; + $db->sql_query($sql); + } + + $cache->destroy('sql', STYLES_TABLE); + + add_log('admin', 'LOG_' . $l_prefix . '_DELETE', $style_row[$mode . '_name']); + $message = ($mode != 'style') ? $l_prefix . '_DELETED_FS' : $l_prefix . '_DELETED'; + trigger_error($user->lang[$message] . adm_back_link($this->u_action)); + } + + $this->page_title = 'DELETE_' . $l_prefix; + + $template->assign_vars(array( + 'S_DELETE' => true, + 'S_REPLACE_OPTIONS' => $s_options, + + 'L_TITLE' => $user->lang[$this->page_title], + 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'], + 'L_NAME' => $user->lang[$l_prefix . '_NAME'], + 'L_REPLACE' => $user->lang['REPLACE_' . $l_prefix], + 'L_REPLACE_EXPLAIN' => $user->lang['REPLACE_' . $l_prefix . '_EXPLAIN'], + + 'U_ACTION' => $this->u_action . "&action=delete&id=$style_id", + 'U_BACK' => $this->u_action, + + 'NAME' => $style_row[$mode . '_name'], + ) + ); + } + + /** + * Export style or style elements + */ + function export($mode, $style_id) + { + global $db, $template, $user, $phpbb_root_path, $cache, $phpEx, $config; + + $update = (isset($_POST['update'])) ? true : false; + + $inc_template = request_var('inc_template', 0); + $inc_theme = request_var('inc_theme', 0); + $inc_imageset = request_var('inc_imageset', 0); + $store = request_var('store', 0); + $format = request_var('format', ''); + + $error = array(); + $methods = array('tar'); + + $available_methods = array('tar.gz' => 'zlib', 'tar.bz2' => 'bz2', 'zip' => 'zlib'); + foreach ($available_methods as $type => $module) + { + if (!@extension_loaded($module)) + { + continue; + } + + $methods[] = $type; + } + + if (!in_array($format, $methods)) + { + $format = 'tar'; + } + + switch ($mode) + { + case 'style': + if ($update && ($inc_template + $inc_theme + $inc_imageset) < 1) + { + $error[] = $user->lang['STYLE_ERR_MORE_ELEMENTS']; + } + + $name = 'style_name'; + + $sql_select = 's.style_id, s.style_name, s.style_copyright'; + $sql_select .= ($inc_template) ? ', t.*' : ', t.template_name'; + $sql_select .= ($inc_theme) ? ', c.*' : ', c.theme_name'; + $sql_select .= ($inc_imageset) ? ', i.*' : ', i.imageset_name'; + $sql_from = STYLES_TABLE . ' s, ' . STYLES_TPL_TABLE . ' t, ' . STYLES_CSS_TABLE . ' c, ' . STYLES_IMAGE_TABLE . ' i'; + $sql_where = "s.style_id = $style_id AND t.template_id = s.template_id AND c.theme_id = s.theme_id AND i.imageset_id = s.imageset_id"; + + $l_prefix = 'STYLE'; + break; + + case 'template': + $name = 'template_name'; + + $sql_select = '*'; + $sql_from = STYLES_TPL_TABLE; + $sql_where = "template_id = $style_id"; + + $l_prefix = 'TEMPLATE'; + break; + + case 'theme': + $name = 'theme_name'; + + $sql_select = '*'; + $sql_from = STYLES_CSS_TABLE; + $sql_where = "theme_id = $style_id"; + + $l_prefix = 'THEME'; + break; + + case 'imageset': + $name = 'imageset_name'; + + $sql_select = '*'; + $sql_from = STYLES_IMAGE_TABLE; + $sql_where = "imageset_id = $style_id"; + + $l_prefix = 'IMAGESET'; + break; + } + + if ($update && !sizeof($error)) + { + $sql = "SELECT $sql_select + FROM $sql_from + WHERE $sql_where"; + $result = $db->sql_query($sql); + $style_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$style_row) + { + trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action)); + } + + $var_ary = array('style_id', 'style_name', 'style_copyright', 'template_id', 'template_name', 'template_path', 'template_copyright', 'template_storedb', 'bbcode_bitfield', 'theme_id', 'theme_name', 'theme_path', 'theme_copyright', 'theme_storedb', 'theme_mtime', 'theme_data', 'imageset_id', 'imageset_name', 'imageset_path', 'imageset_copyright'); + + foreach ($var_ary as $var) + { + if (!isset($style_row[$var])) + { + $style_row[$var] = ''; + } + } + + $files = $data = array(); + + if ($mode == 'style') + { + $style_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['style_name'], $style_row['style_copyright'], $config['version']), $this->style_cfg); + + $style_cfg .= (!$inc_template) ? "\ntemplate = {$style_row['template_name']}" : ''; + $style_cfg .= (!$inc_theme) ? "\ntheme = {$style_row['theme_name']}" : ''; + $style_cfg .= (!$inc_imageset) ? "\nimageset = {$style_row['imageset_name']}" : ''; + + $data[] = array( + 'src' => $style_cfg, + 'prefix' => 'style.cfg' + ); + + unset($style_cfg); + } + + // Export template core code + if ($mode == 'template' || $inc_template) + { + $template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], $config['version']), $this->template_cfg); + $template_cfg .= "\nbbcode_bitfield = {$style_row['bbcode_bitfield']}"; + + $data[] = array( + 'src' => $template_cfg, + 'prefix' => 'template/template.cfg' + ); + + // This is potentially nasty memory-wise ... + if (!$style_row['template_storedb']) + { + $files[] = array( + 'src' => "styles/{$style_row['template_path']}/template/", + 'prefix-' => "styles/{$style_row['template_path']}/", + 'prefix+' => false, + 'exclude' => 'template.cfg' + ); + } + else + { + $sql = 'SELECT template_filename, template_data + FROM ' . STYLES_TPLDATA_TABLE . " + WHERE template_id = {$style_row['template_id']}"; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $data[] = array( + 'src' => $row['template_data'], + 'prefix' => 'template/' . $row['template_filename'] + ); + } + $db->sql_freeresult($result); + } + unset($template_cfg); + } + + // Export theme core code + if ($mode == 'theme' || $inc_theme) + { + $theme_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['theme_name'], $style_row['theme_copyright'], $config['version']), $this->theme_cfg); + + // Read old cfg file + $items = $cache->obtain_cfg_items($style_row); + $items = $items['theme']; + + if (!isset($items['parse_css_file'])) + { + $items['parse_css_file'] = 'off'; + } + + if (!isset($items['pagination_sep'])) + { + $items['pagination_sep'] = ', '; + } + + $theme_cfg = str_replace(array('{PARSE_CSS_FILE}', '{PAGINATION_SEP}'), array($items['parse_css_file'], $items['pagination_sep']), $theme_cfg); + + $files[] = array( + 'src' => "styles/{$style_row['theme_path']}/theme/", + 'prefix-' => "styles/{$style_row['theme_path']}/", + 'prefix+' => false, + 'exclude' => ($style_row['theme_storedb']) ? 'stylesheet.css,theme.cfg' : 'theme.cfg' + ); + + $data[] = array( + 'src' => $theme_cfg, + 'prefix' => 'theme/theme.cfg' + ); + + if ($style_row['theme_storedb']) + { + $data[] = array( + 'src' => $style_row['theme_data'], + 'prefix' => 'theme/stylesheet.css' + ); + } + + unset($items, $theme_cfg); + } + + // Export imageset core code + if ($mode == 'imageset' || $inc_imageset) + { + $imageset_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['imageset_name'], $style_row['imageset_copyright'], $config['version']), $this->imageset_cfg); + + $imageset_definitions = explode(', ', $this->imageset_keys); + + foreach ($imageset_definitions as $key) + { + $imageset_cfg .= "\n" . $key . ' = ' . str_replace("styles/{$style_row['imageset_path']}/imageset/", '{PATH}', $style_row[$key]); + } + + $files[] = array( + 'src' => "styles/{$style_row['imageset_path']}/imageset/", + 'prefix-' => "styles/{$style_row['imageset_path']}/", + 'prefix+' => false, + 'exclude' => 'imageset.cfg' + ); + + $data[] = array( + 'src' => trim($imageset_cfg), + 'prefix' => 'imageset/imageset.cfg' + ); + + unset($imageset_cfg); + } + + switch ($format) + { + case 'tar': + $ext = 'tar'; + $mimetype = 'x-tar'; + $compress = 'compress_tar'; + break; + + case 'zip': + $ext = 'zip'; + $mimetype = 'zip'; + break; + + case 'tar.gz': + $ext = 'tar.gz'; + $mimetype = 'x-gzip'; + break; + + case 'tar.bz2': + $ext = 'tar.bz2'; + $mimetype = 'x-bzip2'; + break; + + default: + $error[] = $user->lang[$l_prefix . '_ERR_ARCHIVE']; + } + + if (!sizeof($error)) + { + include($phpbb_root_path . 'includes/functions_compress.' . $phpEx); + + $path = str_replace(' ', '_', $style_row[$mode . '_name']); + + if ($format == 'zip') + { + $compress = new compress_zip('w', $phpbb_root_path . "store/$path.$ext"); + } + else + { + $compress = new compress_tar('w', $phpbb_root_path . "store/$path.$ext", $ext); + } + + if (sizeof($files)) + { + foreach ($files as $file_ary) + { + $compress->add_file($file_ary['src'], $file_ary['prefix-'], $file_ary['prefix+'], $file_ary['exclude']); + } + } + + if (sizeof($data)) + { + foreach ($data as $data_ary) + { + $compress->add_data($data_ary['src'], $data_ary['prefix']); + } + } + + $compress->close(); + + add_log('admin', 'LOG_' . $l_prefix . '_EXPORT', $style_row[$mode . '_name']); + + if (!$store) + { + $compress->download($path); + @unlink("{$phpbb_root_path}store/$path.$ext"); + exit; + } + + trigger_error(sprintf($user->lang[$l_prefix . '_EXPORTED'], "store/$path.$ext") . adm_back_link($this->u_action)); + } + } + + $sql = "SELECT {$mode}_id, {$mode}_name + FROM " . (($mode == 'style') ? STYLES_TABLE : $sql_from) . " + WHERE {$mode}_id = $style_id"; + $result = $db->sql_query($sql); + $style_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$style_row) + { + trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action)); + } + + $this->page_title = $l_prefix . '_EXPORT'; + + $format_buttons = ''; + foreach ($methods as $method) + { + $format_buttons .= '<input type="radio"' . ((!$format_buttons) ? ' id="format"' : '') . ' value="' . $method . '" name="format"' . (($method == $format) ? ' checked="checked"' : '') . ' /> ' . $method . ' '; + } + + $template->assign_vars(array( + 'S_EXPORT' => true, + 'S_ERROR_MSG' => (sizeof($error)) ? true : false, + 'S_STYLE' => ($mode == 'style') ? true : false, + + 'L_TITLE' => $user->lang[$this->page_title], + 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'], + 'L_NAME' => $user->lang[$l_prefix . '_NAME'], + + 'U_ACTION' => $this->u_action . '&action=export&id=' . $style_id, + 'U_BACK' => $this->u_action, + + 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '', + 'NAME' => $style_row[$mode . '_name'], + 'FORMAT_BUTTONS' => $format_buttons) + ); + } + + /** + * Display details + */ + function details($mode, $style_id) + { + global $template, $db, $config, $user, $safe_mode, $cache; + + $update = (isset($_POST['update'])) ? true : false; + $l_type = strtoupper($mode); + + $error = array(); + $element_ary = array('template' => STYLES_TPL_TABLE, 'theme' => STYLES_CSS_TABLE, 'imageset' => STYLES_IMAGE_TABLE); + + switch ($mode) + { + case 'style': + $sql_from = STYLES_TABLE; + break; + + case 'template': + $sql_from = STYLES_TPL_TABLE; + break; + + case 'theme': + $sql_from = STYLES_CSS_TABLE; + break; + + case 'imageset': + $sql_from = STYLES_IMAGE_TABLE; + break; + } + + $sql = "SELECT * + FROM $sql_from + WHERE {$mode}_id = $style_id"; + $result = $db->sql_query($sql); + $style_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$style_row) + { + trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action)); + } + + $style_row['style_default'] = ($mode == 'style' && $config['default_style'] == $style_id) ? 1 : 0; + + if ($update) + { + $name = request_var('name', ''); + $copyright = request_var('copyright', ''); + + $template_id = request_var('template_id', 0); + $theme_id = request_var('theme_id', 0); + $imageset_id = request_var('imageset_id', 0); + + $style_active = request_var('style_active', 0); + $style_default = request_var('style_default', 0); + $store_db = request_var('store_db', 0); + + if ($mode == 'style' && (!$template_id || !$theme_id || !$imageset_id)) + { + $error[] = $user->lang['STYLE_ERR_NO_IDS']; + } + + if ($mode == 'style' && $style_row['style_active'] && !$style_active && $config['default_style'] == $style_id) + { + $error[] = $user->lang['DEACTIVATE_DEFAULT']; + } + + if (!$name) + { + $error[] = $user->lang[$l_type . '_ERR_STYLE_NAME']; + } + + if (!sizeof($error)) + { + // Check if the character set is allowed + if (!preg_match('/^[a-z0-9_\-\+ ]+$/i', $name)) + { + $error[] = $user->lang[$l_type . '_ERR_NAME_CHARS']; + } + + // Check length settings + if (strlen($name) > 30) + { + $error[] = $user->lang[$l_type . '_ERR_NAME_LONG']; + } + + if (strlen($copyright) > 60) + { + $error[] = $user->lang[$l_type . '_ERR_COPY_LONG']; + } + } +/* + if (!sizeof($error)) + { + // Check if the name already exist + $sql = "SELECT {$mode}_id + FROM $sql_from + WHERE {$mode}_name = '" . $db->sql_escape($name) . "'"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ($row) + { + $error[] = $user->lang[$l_type . '_ERR_NAME_EXIST']; + } + } +*/ + } + + if ($update && sizeof($error)) + { + $style_row = array_merge($style_row, array( + 'template_id' => $template_id, + 'theme_id' => $theme_id, + 'imageset_id' => $imageset_id, + 'style_active' => $style_active, + $mode . '_storedb' => $store_db, + $mode . '_name' => $name, + $mode . '_copyright' => $copyright) + ); + } + + // User has submitted form and no errors have occured + if ($update && !sizeof($error)) + { + $sql_ary = array( + $mode . '_name' => $name, + $mode . '_copyright' => $copyright + ); + + switch ($mode) + { + case 'style': + + $sql_ary += array( + 'template_id' => $template_id, + 'theme_id' => $theme_id, + 'imageset_id' => $imageset_id, + 'style_active' => $style_active, + ); + break; + + case 'imageset': + break; + + case 'theme': + + if ($style_row['theme_storedb'] != $store_db) + { + $theme_data = ''; + + if ($style_row['theme_storedb']) + { + $theme_data = implode('', file("{$phpbb_root_path}styles/" . $style_row['theme_path'] . '/theme/stylesheet.css')); + + // Match CSS imports + $matches = array(); + preg_match_all('/@import url\(\"(.*)\"\);/i', $theme_data, $matches); + + if (sizeof($matches)) + { + foreach ($matches[0] as $idx => $match) + { + $theme_data = str_replace($match, $this->load_css_file($style_row['theme_path'], $matches[1][$idx]), $theme_data); + } + } + } + + if (!$store_db && !$safe_mode && is_writeable("{$phpbb_root_path}styles/{$style_row['theme_path']}/theme/stylesheet.css")) + { + $store_db = 1; + + if ($fp = @fopen("{$phpbb_root_path}styles/{$style_row['theme_path']}/theme/stylesheet.css", 'wb')) + { + $store_db = (@fwrite($fp, str_replace("styles/{$style_row['theme_path']}/theme/", './', $theme_data))) ? 0 : 1; + } + fclose($fp); + } + $theme_data = str_replace('./', "styles/{$style_row['theme_path']}/theme/", $theme_data); + + $sql_ary += array( + 'theme_mtime' => ($store_db) ? filemtime("{$phpbb_root_path}styles/{$style_row['theme_path']}/theme/stylesheet.css") : 0, + 'theme_storedb' => $store_db, + 'theme_data' => ($store_db) ? $theme_data : '', + ); + } + break; + + case 'template': + + if ($style_row['template_storedb'] != $store_db) + { + $filelist = filelist("{$phpbb_root_path}styles/{$style_row['template_path']}/template", '', 'html'); + + if (!$store_db && !$safe_mode && is_writeable("{$phpbb_root_path}styles/{$style_row['template_path']}/template")) + { + $sql = 'SELECT * + FROM ' . STYLES_TPLDATA_TABLE . " + WHERE template_id = $style_id"; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + if (!($fp = @fopen("{$phpbb_root_path}styles/{$style_row['template_path']}/template/" . $row['template_filename'], 'wb'))) + { + $store_db = 1; + break; + } + + fwrite($fp, $row['template_data']); + fclose($fp); + } + $db->sql_freeresult($result); + + if (!$store_db) + { + $sql = 'DELETE FROM ' . STYLES_TPLDATA_TABLE . " + WHERE template_id = $style_id"; + $db->sql_query($sql); + } + } + + $sql_ary += array( + 'template_storedb' => $store_db, + ); + } + break; + } + + if (sizeof($sql_ary)) + { + $sql = "UPDATE $sql_from + SET " . $db->sql_build_array('UPDATE', $sql_ary) . " + WHERE {$mode}_id = $style_id"; + $db->sql_query($sql); + + // Making this the default style? + if ($mode == 'style' && $style_default) + { + set_config('default_style', $style_id); + } + } + + $cache->destroy('sql', STYLES_TABLE); + + add_log('admin', 'LOG_' . $l_type . '_EDIT_DETAILS', $name); + trigger_error($user->lang[$l_type . '_DETAILS_UPDATED'] . adm_back_link($this->u_action)); + } + + $style_options = array(); + + if ($mode == 'style') + { + foreach ($element_ary as $element => $table) + { + $sql = "SELECT {$element}_id, {$element}_name + FROM $table + ORDER BY {$element}_id ASC"; + $result = $db->sql_query($sql); + + ${$element . '_options'} = ''; + while ($row = $db->sql_fetchrow($result)) + { + $selected = ($row[$element . '_id'] == $style_row[$element . '_id']) ? ' selected="selected"' : ''; + ${$element . '_options'} .= '<option value="' . $row[$element . '_id'] . '"' . $selected . '>' . $row[$element . '_name'] . '</option>'; + } + $db->sql_freeresult($result); + } + } + + $this->page_title = 'EDIT_DETAILS_' . $l_type; + + $template->assign_vars(array( + 'S_DETAILS' => true, + 'S_ERROR_MSG' => (sizeof($error)) ? true : false, + 'S_STYLE' => ($mode == 'style') ? true : false, + 'S_TEMPLATE' => ($mode == 'template') ? true : false, + 'S_THEME' => ($mode == 'theme') ? true : false, + 'S_IMAGESET' => ($mode == 'imageset') ? true : false, + 'S_STORE_DB' => (isset($style_row[$mode . '_storedb'])) ? $style_row[$mode . '_storedb'] : 0, + 'S_STYLE_ACTIVE' => (isset($style_row['style_active'])) ? $style_row['style_active'] : 0, + 'S_STYLE_DEFAULT' => (isset($style_row['style_default'])) ? $style_row['style_default'] : 0, + + 'S_TEMPLATE_OPTIONS' => ($mode == 'style') ? $template_options : '', + 'S_THEME_OPTIONS' => ($mode == 'style') ? $theme_options : '', + 'S_IMAGESET_OPTIONS' => ($mode == 'style') ? $imageset_options : '', + + 'U_ACTION' => $this->u_action . '&action=details&id=' . $style_id, + 'U_BACK' => $this->u_action, + + 'L_TITLE' => $user->lang[$this->page_title], + 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'], + 'L_NAME' => $user->lang[$l_type . '_NAME'], + 'L_LOCATION' => ($mode == 'template' || $mode == 'theme') ? $user->lang[$l_type . '_LOCATION'] : '', + 'L_LOCATION_EXPLAIN' => ($mode == 'template' || $mode == 'theme') ? $user->lang[$l_type . '_LOCATION_EXPLAIN'] : '', + + 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '', + 'NAME' => $style_row[$mode . '_name'], + 'COPYRIGHT' => $style_row[$mode . '_copyright'], + ) + ); + } + + /** + * Load css file contents + */ + function load_css_file($path, $filename) + { + global $phpbb_root_path; + + $handle = "{$phpbb_root_path}styles/$path/theme/$filename"; + + if ($fp = @fopen($handle, 'r')) + { + $content = trim(@fread($fp, filesize($handle))); + @fclose($fp); + } + else + { + $content = ''; + } + + return $content; + } + +} + +/** +* @package module_install +*/ +class acp_styles_info +{ + function module() + { + return array( + 'filename' => 'acp_styles', + 'title' => 'ACP_CAT_STYLES', + 'version' => '1.0.0', + 'modes' => array( + 'style' => array('title' => 'ACP_STYLES', 'auth' => 'acl_a_styles'), + 'template' => array('title' => 'ACP_TEMPLATES', 'auth' => 'acl_a_styles'), + 'theme' => array('title' => 'ACP_THEMES', 'auth' => 'acl_a_styles'), + 'imageset' => array('title' => 'ACP_IMAGESETS', 'auth' => 'acl_a_styles'), + ), + ); + } + + function install() + { + } + + function uninstall() + { + } +} + +?>
\ No newline at end of file diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php index c451af4d24..9618c71d3d 100644 --- a/phpBB/includes/db/dbal.php +++ b/phpBB/includes/db/dbal.php @@ -255,7 +255,7 @@ class dbal $totaltime = $mtime[0] + $mtime[1] - $starttime; echo ' - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8869-1"><meta http-equiv="Content-Style-Type" content="text/css"><link rel="stylesheet" href="' . $phpbb_root_path . 'adm/subSilver.css" type="text/css"> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8869-1"><meta http-equiv="Content-Style-Type" content="text/css"><link rel="stylesheet" href="' . $phpbb_root_path . 'adm/style/sql_report.css" type="text/css"> <style type="text/css"> th { background-image: url(\'' . $phpbb_root_path . 'adm/images/cellpic3.gif\') } td.cat { background-image: url(\'' . $phpbb_root_path . 'adm/images/cellpic1.gif\') } </style> <title>Explain</title></head><body> <table width="100%" cellspacing="0" cellpadding="0" border="0"><tr> diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 8570ff2eed..7f816d9b1c 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1481,11 +1481,14 @@ function build_hidden_fields($field_ary) /** * Parse cfg file */ -function parse_cfg_file($filename) +function parse_cfg_file($filename, $lines = false) { $parsed_items = array(); - $lines = file($filename); + if ($lines === false) + { + $lines = file($filename); + } foreach ($lines as $line) { diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php index d82150993e..429346b7a4 100644 --- a/phpBB/includes/functions_template.php +++ b/phpBB/includes/functions_template.php @@ -193,7 +193,6 @@ class template_compile for ($i = 0, $size = sizeof($text_blocks); $i < $size; $i++) { $trim_check_text = trim($text_blocks[$i]); - $trim_check_block = trim($compile_blocks[$i]); $template_php .= (!$no_echo) ? ((!empty($trim_check_text)) ? $text_blocks[$i] : '') . ((!empty($compile_blocks[$i])) ? $compile_blocks[$i] : '') : ((!empty($trim_check_text)) ? $text_blocks[$i] : '') . ((!empty($compile_blocks[$i])) ? $compile_blocks[$i] : ''); } diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php index 29ca76e240..eee92c2cac 100644 --- a/phpBB/includes/functions_transfer.php +++ b/phpBB/includes/functions_transfer.php @@ -55,7 +55,7 @@ class transfer // temporary files or have write access on a folder within phpBB // like the cache folder. If the user can't do either, then // he/she needs to use the fsock ftp method - $temp_name = tempnam($this->tmp_path, 'ftp_'); + $temp_name = tempnam($this->tmp_path, 'transfer_'); @unlink($temp_name); $fp = @fopen($temp_name, 'w'); @@ -183,6 +183,21 @@ class transfer { return $this->_close(); } + + /** + * Determine methods able to be used + */ + function methods() + { + $methods = array(); + + if (@extension_loaded('ftp')) + { + $methods[] = 'ftp'; + } + + return $methods; + } } /** diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 19569be832..0094b4e107 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -105,8 +105,8 @@ class session $s_ip = implode('.', array_slice(explode('.', $this->data['session_ip']), 0, $config['ip_check'])); $u_ip = implode('.', array_slice(explode('.', $this->ip), 0, $config['ip_check'])); - $s_browser = ($config['browser_check']) ? $this->data['session_browser'] : ''; - $u_browser = ($config['browser_check']) ? $this->browser : ''; + $s_browser = ($config['browser_check']) ? substr($this->data['session_browser'], 0, 149) : ''; + $u_browser = ($config['browser_check']) ? substr($this->browser, 0, 149) : ''; if ($u_ip == $s_ip && $s_browser == $u_browser) { @@ -312,6 +312,7 @@ class session $sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE session_id = '" . $db->sql_escape($this->session_id) . "'"; + if (!$this->session_id || !$db->sql_query($sql) || !$db->sql_affectedrows()) { // Limit new sessions in 1 minute period (if required) @@ -666,7 +667,7 @@ class session ); } - $sql = ($key) ? 'UPDATE ' . SESSIONS_KEYS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE user_id = ' . (int) $user_id . ' AND key_id = "' . $db->sql_escape($key) . '"' : 'INSERT INTO ' . SESSIONS_KEYS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); + $sql = ($key) ? 'UPDATE ' . SESSIONS_KEYS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE user_id = ' . (int) $user_id . ' AND key_id = "' . $db->sql_escape(md5($key)) . '"' : 'INSERT INTO ' . SESSIONS_KEYS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); $db->sql_query($sql); $this->cookie_data['k'] = $key_id; diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 04e86d0035..5706fa03d2 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -509,7 +509,7 @@ CREATE TABLE phpbb_sessions ( session_start INTEGER DEFAULT 0 NOT NULL, session_time INTEGER DEFAULT 0 NOT NULL, session_ip VARCHAR(40) DEFAULT '0' NOT NULL, - session_browser VARCHAR(100), + session_browser VARCHAR(150), session_page VARCHAR(100) NOT NULL, session_viewonline INTEGER DEFAULT 1 NOT NULL, session_admin INTEGER DEFAULT 0 NOT NULL diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 6308ddb60a..f8c1f3ded2 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -514,7 +514,7 @@ CREATE TABLE [phpbb_sessions] ( [session_start] [int] NOT NULL , [session_time] [int] NOT NULL , [session_ip] [varchar] (40) NOT NULL , - [session_browser] [varchar] (100) NULL , + [session_browser] [varchar] (150) NULL , [session_page] [varchar] (100) NOT NULL , [session_viewonline] [int] NOT NULL , [session_admin] [int] NOT NULL diff --git a/phpBB/install/schemas/mysql_schema.sql b/phpBB/install/schemas/mysql_schema.sql index feb5bf1c66..1984f3e985 100644 --- a/phpBB/install/schemas/mysql_schema.sql +++ b/phpBB/install/schemas/mysql_schema.sql @@ -598,7 +598,7 @@ CREATE TABLE phpbb_sessions ( session_start int(11) DEFAULT '0' NOT NULL, session_time int(11) DEFAULT '0' NOT NULL, session_ip varchar(40) DEFAULT '0' NOT NULL, - session_browser varchar(100) DEFAULT '' NOT NULL, + session_browser varchar(150) DEFAULT '' NOT NULL, session_page varchar(100) DEFAULT '' NOT NULL, session_viewonline tinyint(1) DEFAULT '1' NOT NULL, session_admin tinyint(1) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 2e281a3d65..eb0ab820e6 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -1204,7 +1204,7 @@ CREATE TABLE phpbb_sessions ( session_start number(11) DEFAULT '0' NOT NULL, session_time number(11) DEFAULT '0' NOT NULL, session_ip varchar2(40) DEFAULT '0', - session_browser varchar2(100) DEFAULT '', + session_browser varchar2(150) DEFAULT '', session_page varchar2(100) DEFAULT '', session_viewonline number(1) DEFAULT '1' NOT NULL, session_admin number(1) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 831a5382da..5f99762ed9 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -817,7 +817,7 @@ CREATE TABLE phpbb_sessions ( session_start INT4 DEFAULT '0' NOT NULL, session_time INT4 DEFAULT '0' NOT NULL, session_ip varchar(40) DEFAULT '0' NOT NULL, - session_browser varchar(100) DEFAULT '' NULL, + session_browser varchar(150) DEFAULT '' NULL, session_page varchar(100) DEFAULT '' NOT NULL, session_viewonline INT2 DEFAULT '1' NOT NULL, session_admin INT2 DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 4c7eefceec..966d24c6b6 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -431,7 +431,6 @@ INSERT INTO phpbb_bots (bot_id, bot_active, bot_name, user_id, bot_agent, bot_ip # -- Modules # UCP -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (69, 1, 'modules', 'acp', 1, 67, 295, 296, 'UCP', 'ucp', ''); INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (13, 1, '', 'ucp', 1, 0, 59, 68, 'UCP_MAIN', '', ''); INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (14, 1, 'main', 'ucp', 1, 13, 60, 61, 'UCP_MAIN_FRONT', 'front', ''); INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (15, 1, 'main', 'ucp', 1, 13, 62, 63, 'UCP_MAIN_SUBSCRIBED', 'subscribed', ''); @@ -460,105 +459,111 @@ INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (38, 1, '', 'ucp', 1, 0, 111, 116, 'UCP_ZEBRA', '', ''); INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (39, 1, 'zebra', 'ucp', 1, 38, 112, 113, 'UCP_ZEBRA_FRIENDS', 'friends', ''); INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (40, 1, 'zebra', 'ucp', 1, 38, 114, 115, 'UCP_ZEBRA_FOES', 'foes', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (90, 1, 'pm', 'ucp', 0, 27, 98, 99, 'UCP_PM_POPUP_TITLE', 'popup', 'cfg_allow_privmsg'); # ACP -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (7, 1, 'modules', 'acp', 1, 67, 293, 294, 'ACP', 'acp', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (2, 1, '', 'acp', 1, 0, 157, 192, 'ACP_CAT_GENERAL', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (11, 1, '', 'acp', 1, 0, 227, 268, 'ACP_CAT_USERGROUP', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (41, 1, 'main', 'acp', 1, 2, 158, 159, 'ACP_MAIN', 'main', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (42, 1, '', 'acp', 1, 2, 160, 171, 'ACP_GENERAL_CONFIGURATION', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (43, 1, '', 'acp', 1, 2, 172, 179, 'ACP_CLIENT_COMMUNICATION', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (44, 1, '', 'acp', 1, 2, 180, 191, 'ACP_SERVER_CONFIGURATION', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (46, 1, '', 'acp', 1, 0, 193, 202, 'ACP_CAT_FORUMS', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (47, 1, '', 'acp', 1, 0, 203, 226, 'ACP_CAT_POSTING', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (48, 1, '', 'acp', 1, 0, 269, 274, 'ACP_CAT_PERMISSIONS', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (49, 1, '', 'acp', 1, 0, 275, 278, 'ACP_CAT_STYLES', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (50, 1, '', 'acp', 1, 0, 279, 290, 'ACP_CAT_MAINTANENCE', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (51, 1, '', 'acp', 1, 0, 291, 310, 'ACP_CAT_SYSTEM', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (52, 1, '', 'acp', 1, 0, 311, 312, 'ACP_CAT_DOT_MODS', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (53, 1, '', 'acp', 1, 46, 194, 199, 'ACP_CAT_FORUMS', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (54, 1, '', 'acp', 1, 46, 200, 201, 'ACP_CAT_PERMISSIONS', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (56, 1, '', 'acp', 1, 47, 216, 225, 'ACP_ATTACHMENTS', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (57, 1, '', 'acp', 1, 11, 228, 251, 'ACP_CAT_USERS', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (58, 1, '', 'acp', 1, 11, 252, 255, 'ACP_GROUPS', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (59, 1, '', 'acp', 1, 11, 256, 267, 'ACP_USER_SECURITY', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (60, 1, '', 'acp', 1, 48, 270, 271, 'ACP_CAT_GENERAL', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (61, 1, '', 'acp', 1, 48, 272, 273, 'ACP_PERMISSION_SETTINGS', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (62, 1, '', 'acp', 1, 49, 276, 277, 'ACP_STYLE_MANAGEMENT', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (63, 1, '', 'acp', 1, 50, 280, 287, 'ACP_FORUM_LOGS', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (64, 1, '', 'acp', 1, 50, 288, 289, 'ACP_CAT_DATABASE', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (65, 1, '', 'acp', 1, 51, 300, 301, 'ACP_AUTOMATION', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (66, 1, '', 'acp', 1, 51, 302, 309, 'ACP_GENERAL_TASKS', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (67, 1, '', 'acp', 1, 51, 292, 299, 'ACP_MODULE_MANAGEMENT', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (71, 1, 'board', 'acp', 1, 42, 161, 162, 'ACP_BOARD_SETTINGS', 'settings', 'acl_a_board'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (72, 1, 'board', 'acp', 1, 42, 163, 164, 'ACP_BOARD_DEFAULTS', 'default', 'acl_a_defaults'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (73, 1, 'board', 'acp', 1, 42, 165, 166, 'ACP_AVATAR_SETTINGS', 'avatar', 'acl_a_board'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (74, 1, 'attachments', 'acp', 1, 42, 167, 168, 'ACP_ATTACHMENT_SETTINGS', 'attach', 'acl_a_attach'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (75, 1, '', 'acp', 1, 47, 204, 215, 'ACP_MESSAGES', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (76, 1, 'attachments', 'acp', 1, 56, 217, 218, 'ACP_ATTACHMENT_SETTINGS', 'attach', 'acl_a_attach'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (77, 1, 'attachments', 'acp', 1, 56, 219, 220, 'ACP_EXTENSION_GROUPS', 'ext_groups', 'acl_a_attach'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (78, 1, 'attachments', 'acp', 1, 56, 221, 222, 'ACP_MANAGE_EXTENSIONS', 'extensions', 'acl_a_attach'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (80, 1, 'attachments', 'acp', 1, 56, 223, 224, 'ACP_ORPHAN_ATTACHMENTS', 'orphan', 'acl_a_attach'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (81, 1, 'board', 'acp', 1, 42, 169, 170, 'ACP_MESSAGE_SETTINGS', 'message', 'acl_a_defaults'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (82, 1, 'board', 'acp', 1, 43, 173, 174, 'ACP_AUTH_SETTINGS', 'auth', 'acl_a_server'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (83, 1, 'board', 'acp', 1, 43, 175, 176, 'ACP_EMAIL_SETTINGS', 'email', 'acl_a_server'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (84, 1, 'jabber', 'acp', 1, 43, 177, 178, 'ACP_JABBER_SETTINGS', 'settings', 'acl_a_server'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (85, 1, 'board', 'acp', 1, 44, 181, 182, 'ACP_COOKIE_SETTINGS', 'cookie', 'acl_a_cookies'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (86, 1, 'board', 'acp', 1, 44, 183, 184, 'ACP_SERVER_SETTINGS', 'server', 'acl_a_server'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (87, 1, 'board', 'acp', 1, 44, 185, 186, 'ACP_LOAD_SETTINGS', 'load', 'acl_a_server'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (89, 1, 'php_info', 'acp', 1, 44, 187, 188, 'ACP_PHP_INFO', 'info', 'acl_a_server'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (90, 1, 'pm', 'ucp', 0, 27, 98, 99, 'UCP_PM_POPUP_TITLE', 'popup', 'cfg_allow_privmsg'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (91, 1, 'bots', 'acp', 1, 44, 189, 190, 'ACP_BOTS', 'bots', 'acl_a_server'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (93, 1, 'board', 'acp', 1, 75, 205, 206, 'ACP_MESSAGE_SETTINGS', 'message', 'acl_a_defaults'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (94, 1, 'bbcodes', 'acp', 1, 75, 207, 208, 'ACP_BBCODES', 'bbcodes', 'acl_a_bbcode'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (95, 1, 'icons', 'acp', 1, 75, 209, 210, 'ACP_ICONS', 'icons', 'acl_a_icons'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (96, 1, 'icons', 'acp', 1, 75, 211, 212, 'ACP_SMILIES', 'smilies', 'acl_a_icons'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (97, 1, 'words', 'acp', 1, 75, 213, 214, 'ACP_WORDS', 'words', 'acl_a_words'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (98, 1, 'logs', 'acp', 1, 63, 281, 282, 'ACP_ADMIN_LOGS', 'admin', 'acl_a_'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (99, 1, 'logs', 'acp', 1, 63, 283, 284, 'ACP_MOD_LOGS', 'mod', 'acl_a_'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (100, 1, 'logs', 'acp', 1, 63, 285, 286, 'ACP_CRITICAL_LOGS', 'critical', 'acl_a_'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (101, 1, 'language', 'acp', 1, 66, 303, 304, 'ACP_LANGUAGE_PACKS', 'lang_packs', 'acl_a_server'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (102, 1, 'bots', 'acp', 1, 66, 305, 306, 'ACP_BOTS', 'bots', 'acl_a_server'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (103, 1, 'groups', 'acp', 1, 58, 253, 254, 'ACP_GROUPS_MANAGE', 'manage', 'acl_a_group'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (105, 1, 'email', 'acp', 1, 66, 307, 308, 'ACP_MASS_EMAIL', 'email', 'acl_a_email'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (106, 1, 'ranks', 'acp', 1, 57, 233, 234, 'ACP_MANAGE_RANKS', 'ranks', 'acl_a_ranks'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (107, 1, 'ban', 'acp', 1, 59, 261, 262, 'ACP_BAN_EMAILS', 'email', 'acl_a_ban'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (108, 1, 'ban', 'acp', 1, 59, 263, 264, 'ACP_BAN_IPS', 'ip', 'acl_a_ban'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (109, 1, 'ban', 'acp', 1, 59, 265, 266, 'ACP_BAN_USERNAMES', 'user', 'acl_a_ban'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (110, 1, 'disallow', 'acp', 1, 59, 259, 260, 'ACP_DISALLOW_USERNAMES', 'usernames', 'acl_a_names'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (111, 1, 'prune', 'acp', 1, 59, 257, 258, 'ACP_PRUNE_USERS', 'users', 'acl_a_userdel'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (112, 1, 'prune', 'acp', 1, 53, 197, 198, 'ACP_PRUNE_FORUMS', 'forums', 'acl_a_prune'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (113, 1, 'profile', 'acp', 1, 57, 231, 232, 'ACP_CUSTOM_PROFILE_FIELDS', 'profile', 'acl_a_user'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (114, 1, 'forums', 'acp', 1, 53, 195, 196, 'ACP_MANAGE_FORUMS', 'manage', 'acl_a_forum'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (115, 1, 'users', 'acp', 1, 57, 229, 230, 'ACP_MANAGE_USERS', 'overview', 'acl_a_user'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (116, 1, 'users', 'acp', 0, 57, 235, 236, 'ACP_USER_FEEDBACK', 'feedback', 'acl_a_user'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (117, 1, 'users', 'acp', 0, 57, 237, 238, 'ACP_USER_PROFILE', 'profile', 'acl_a_user'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (118, 1, 'users', 'acp', 0, 57, 239, 240, 'ACP_USER_PREFS', 'prefs', 'acl_a_user'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (119, 1, 'users', 'acp', 0, 57, 241, 242, 'ACP_USER_AVATAR', 'avatar', 'acl_a_user'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (120, 1, 'users', 'acp', 0, 57, 243, 244, 'ACP_USER_SIG', 'sig', 'acl_a_user'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (121, 1, 'users', 'acp', 0, 57, 245, 246, 'ACP_USER_GROUPS', 'groups', 'acl_a_user'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (122, 1, 'users', 'acp', 0, 57, 247, 248, 'ACP_USER_PERM', 'perm', 'acl_a_user'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (123, 1, 'users', 'acp', 0, 57, 249, 250, 'ACP_USER_ATTACH', 'attach', 'acl_a_user'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (2, 1, '', 'acp', 1, 0, 167, 202, 'ACP_CAT_GENERAL', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (74, 1, 'attachments', 'acp', 1, 42, 177, 178, 'ACP_ATTACHMENT_SETTINGS', 'attach', 'acl_a_attach'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (7, 1, 'modules', 'acp', 1, 67, 323, 324, 'ACP', 'acp', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (72, 1, 'board', 'acp', 1, 42, 173, 174, 'ACP_BOARD_DEFAULTS', 'default', 'acl_a_defaults'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (11, 1, '', 'acp', 1, 0, 237, 278, 'ACP_CAT_USERGROUP', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (41, 1, 'main', 'acp', 1, 2, 168, 169, 'ACP_MAIN', 'main', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (73, 1, 'board', 'acp', 1, 42, 175, 176, 'ACP_AVATAR_SETTINGS', 'avatar', 'acl_a_board'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (42, 1, '', 'acp', 1, 2, 170, 181, 'ACP_GENERAL_CONFIGURATION', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (43, 1, '', 'acp', 1, 2, 182, 189, 'ACP_CLIENT_COMMUNICATION', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (44, 1, '', 'acp', 1, 2, 190, 201, 'ACP_SERVER_CONFIGURATION', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (69, 1, 'modules', 'acp', 1, 67, 325, 326, 'UCP', 'ucp', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (46, 1, '', 'acp', 1, 0, 203, 212, 'ACP_CAT_FORUMS', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (47, 1, '', 'acp', 1, 0, 213, 236, 'ACP_CAT_POSTING', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (48, 1, '', 'acp', 1, 0, 279, 284, 'ACP_CAT_PERMISSIONS', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (49, 1, '', 'acp', 1, 0, 285, 298, 'ACP_CAT_STYLES', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (50, 1, '', 'acp', 1, 0, 299, 310, 'ACP_CAT_MAINTANENCE', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (51, 1, '', 'acp', 1, 0, 311, 330, 'ACP_CAT_SYSTEM', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (52, 1, '', 'acp', 1, 0, 331, 332, 'ACP_CAT_DOT_MODS', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (71, 1, 'board', 'acp', 1, 42, 171, 172, 'ACP_BOARD_SETTINGS', 'settings', 'acl_a_board'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (53, 1, '', 'acp', 1, 46, 204, 209, 'ACP_CAT_FORUMS', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (54, 1, '', 'acp', 1, 46, 210, 211, 'ACP_CAT_PERMISSIONS', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (75, 1, '', 'acp', 1, 47, 214, 225, 'ACP_MESSAGES', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (56, 1, '', 'acp', 1, 47, 226, 235, 'ACP_ATTACHMENTS', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (57, 1, '', 'acp', 1, 11, 238, 261, 'ACP_CAT_USERS', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (58, 1, '', 'acp', 1, 11, 262, 265, 'ACP_GROUPS', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (59, 0, '', 'acp', 1, 11, 266, 277, 'ACP_USER_SECURITY', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (60, 1, '', 'acp', 1, 48, 280, 281, 'ACP_CAT_GENERAL', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (61, 1, '', 'acp', 1, 48, 282, 283, 'ACP_PERMISSION_SETTINGS', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (62, 1, '', 'acp', 1, 49, 286, 289, 'ACP_STYLE_MANAGEMENT', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (63, 1, '', 'acp', 1, 50, 300, 307, 'ACP_FORUM_LOGS', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (64, 1, '', 'acp', 1, 50, 308, 309, 'ACP_CAT_DATABASE', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (65, 1, '', 'acp', 1, 51, 312, 313, 'ACP_AUTOMATION', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (66, 1, '', 'acp', 1, 51, 314, 321, 'ACP_GENERAL_TASKS', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (67, 1, '', 'acp', 1, 51, 322, 329, 'ACP_MODULE_MANAGEMENT', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (93, 1, 'board', 'acp', 1, 75, 215, 216, 'ACP_MESSAGE_SETTINGS', 'message', 'acl_a_defaults'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (76, 1, 'attachments', 'acp', 1, 56, 227, 228, 'ACP_ATTACHMENT_SETTINGS', 'attach', 'acl_a_attach'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (77, 1, 'attachments', 'acp', 1, 56, 229, 230, 'ACP_EXTENSION_GROUPS', 'ext_groups', 'acl_a_attach'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (78, 1, 'attachments', 'acp', 1, 56, 231, 232, 'ACP_MANAGE_EXTENSIONS', 'extensions', 'acl_a_attach'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (80, 1, 'attachments', 'acp', 1, 56, 233, 234, 'ACP_ORPHAN_ATTACHMENTS', 'orphan', 'acl_a_attach'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (81, 1, 'board', 'acp', 1, 42, 179, 180, 'ACP_MESSAGE_SETTINGS', 'message', 'acl_a_defaults'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (82, 1, 'board', 'acp', 1, 43, 183, 184, 'ACP_AUTH_SETTINGS', 'auth', 'acl_a_server'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (83, 1, 'board', 'acp', 1, 43, 185, 186, 'ACP_EMAIL_SETTINGS', 'email', 'acl_a_server'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (84, 1, 'jabber', 'acp', 1, 43, 187, 188, 'ACP_JABBER_SETTINGS', 'settings', 'acl_a_server'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (85, 1, 'board', 'acp', 1, 44, 191, 192, 'ACP_COOKIE_SETTINGS', 'cookie', 'acl_a_cookies'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (86, 1, 'board', 'acp', 1, 44, 193, 194, 'ACP_SERVER_SETTINGS', 'server', 'acl_a_server'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (87, 1, 'board', 'acp', 1, 44, 195, 196, 'ACP_LOAD_SETTINGS', 'load', 'acl_a_server'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (89, 1, 'php_info', 'acp', 1, 44, 197, 198, 'ACP_PHP_INFO', 'info', 'acl_a_server'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (91, 1, 'bots', 'acp', 1, 44, 199, 200, 'ACP_BOTS', 'bots', 'acl_a_server'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (92, 1, 'modules', 'acp', 1, 67, 327, 328, 'MCP', 'mcp', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (94, 1, 'bbcodes', 'acp', 1, 75, 217, 218, 'ACP_BBCODES', 'bbcodes', 'acl_a_bbcode'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (95, 1, 'icons', 'acp', 1, 75, 219, 220, 'ACP_ICONS', 'icons', 'acl_a_icons'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (96, 1, 'icons', 'acp', 1, 75, 221, 222, 'ACP_SMILIES', 'smilies', 'acl_a_icons'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (97, 1, 'words', 'acp', 1, 75, 223, 224, 'ACP_WORDS', 'words', 'acl_a_words'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (98, 1, 'logs', 'acp', 1, 63, 301, 302, 'ACP_ADMIN_LOGS', 'admin', 'acl_a_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (99, 1, 'logs', 'acp', 1, 63, 303, 304, 'ACP_MOD_LOGS', 'mod', 'acl_a_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (100, 1, 'logs', 'acp', 1, 63, 305, 306, 'ACP_CRITICAL_LOGS', 'critical', 'acl_a_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (101, 1, 'language', 'acp', 1, 66, 315, 316, 'ACP_LANGUAGE_PACKS', 'lang_packs', 'acl_a_server'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (102, 1, 'bots', 'acp', 1, 66, 317, 318, 'ACP_BOTS', 'bots', 'acl_a_server'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (103, 1, 'groups', 'acp', 1, 58, 263, 264, 'ACP_GROUPS_MANAGE', 'manage', 'acl_a_group'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (105, 1, 'email', 'acp', 1, 66, 319, 320, 'ACP_MASS_EMAIL', 'email', 'acl_a_email'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (106, 1, 'ranks', 'acp', 1, 57, 243, 244, 'ACP_MANAGE_RANKS', 'ranks', 'acl_a_ranks'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (107, 1, 'ban', 'acp', 1, 59, 271, 272, 'ACP_BAN_EMAILS', 'email', 'acl_a_ban'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (108, 1, 'ban', 'acp', 1, 59, 273, 274, 'ACP_BAN_IPS', 'ip', 'acl_a_ban'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (109, 1, 'ban', 'acp', 1, 59, 275, 276, 'ACP_BAN_USERNAMES', 'user', 'acl_a_ban'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (110, 1, 'disallow', 'acp', 1, 59, 269, 270, 'ACP_DISALLOW_USERNAMES', 'usernames', 'acl_a_names'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (111, 1, 'prune', 'acp', 1, 59, 267, 268, 'ACP_PRUNE_USERS', 'users', 'acl_a_userdel'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (112, 1, 'prune', 'acp', 1, 53, 207, 208, 'ACP_PRUNE_FORUMS', 'forums', 'acl_a_prune'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (113, 1, 'profile', 'acp', 1, 57, 241, 242, 'ACP_CUSTOM_PROFILE_FIELDS', 'profile', 'acl_a_user'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (114, 1, 'forums', 'acp', 1, 53, 205, 206, 'ACP_MANAGE_FORUMS', 'manage', 'acl_a_forum'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (115, 1, 'users', 'acp', 1, 57, 239, 240, 'ACP_MANAGE_USERS', 'overview', 'acl_a_user'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (116, 1, 'users', 'acp', 0, 57, 245, 246, 'ACP_USER_FEEDBACK', 'feedback', 'acl_a_user'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (117, 1, 'users', 'acp', 0, 57, 247, 248, 'ACP_USER_PROFILE', 'profile', 'acl_a_user'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (118, 1, 'users', 'acp', 0, 57, 249, 250, 'ACP_USER_PREFS', 'prefs', 'acl_a_user'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (119, 1, 'users', 'acp', 0, 57, 251, 252, 'ACP_USER_AVATAR', 'avatar', 'acl_a_user'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (120, 1, 'users', 'acp', 0, 57, 253, 254, 'ACP_USER_SIG', 'sig', 'acl_a_user'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (121, 1, 'users', 'acp', 0, 57, 255, 256, 'ACP_USER_GROUPS', 'groups', 'acl_a_user'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (122, 1, 'users', 'acp', 0, 57, 257, 258, 'ACP_USER_PERM', 'perm', 'acl_a_user'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (123, 1, 'users', 'acp', 0, 57, 259, 260, 'ACP_USER_ATTACH', 'attach', 'acl_a_user'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (141, 1, '', 'acp', 1, 49, 290, 297, 'ACP_STYLE_COMPONENTS', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (142, 1, 'styles', 'acp', 1, 62, 287, 288, 'ACP_STYLES', 'style', 'acl_a_styles'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (143, 1, 'styles', 'acp', 1, 141, 291, 292, 'ACP_TEMPLATES', 'template', 'acl_a_styles'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (144, 1, 'styles', 'acp', 1, 141, 293, 294, 'ACP_THEMES', 'theme', 'acl_a_styles'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (145, 1, 'styles', 'acp', 1, 141, 295, 296, 'ACP_IMAGESETS', 'imageset', 'acl_a_styles'); # MCP -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (92, 1, 'modules', 'acp', 1, 67, 297, 298, 'MCP', 'mcp', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (124, 1, 1, '', 'mcp', 0, 35, 44, 'MCP_MAIN', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (125, 1, 1, '', 'mcp', 0, 45, 50, 'MCP_NOTES', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (126, 1, 1, '', 'mcp', 0, 51, 58, 'MCP_QUEUE', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (127, 1, 1, '', 'mcp', 0, 59, 68, 'MCP_WARN', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (128, 1, 1, 'main', 'mcp', 124, 36, 37, 'MCP_MAIN_FRONT', 'front', 'acl_m_'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (129, 1, 1, 'main', 'mcp', 124, 38, 39, 'MCP_MAIN_FORUM_VIEW', 'forum_view', 'acl_m_'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (130, 1, 1, 'main', 'mcp', 124, 40, 41, 'MCP_MAIN_TOPIC_VIEW', 'topic_view', 'acl_m_'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (131, 1, 1, 'main', 'mcp', 124, 42, 43, 'MCP_MAIN_POST_DETAILS', 'post_details', 'acl_m_'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (132, 1, 1, 'notes', 'mcp', 125, 46, 47, 'MCP_NOTES_FRONT', 'front', 'acl_m_'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (133, 1, 1, 'notes', 'mcp', 125, 48, 49, 'MCP_NOTES_USER', 'user_notes', 'acl_m_'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (134, 1, 1, 'queue', 'mcp', 126, 52, 53, 'MCP_QUEUE_UNAPPROVED_TOPICS', 'unapproved_topics', 'acl_m_approve'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (135, 1, 1, 'queue', 'mcp', 126, 54, 55, 'MCP_QUEUE_UNAPPROVED_POSTS', 'unapproved_posts', 'acl_m_approve'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (136, 1, 1, 'queue', 'mcp', 126, 56, 57, 'MCP_QUEUE_REPORTS', 'reports', 'acl_m_approve'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (137, 1, 1, 'warn', 'mcp', 127, 60, 61, 'MCP_WARN_FRONT', 'front', 'acl_m_'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (138, 1, 1, 'warn', 'mcp', 127, 62, 63, 'MCP_WARN_LIST', 'list', 'acl_m_'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (139, 1, 1, 'warn', 'mcp', 127, 64, 65, 'MCP_WARN_USER', 'warn_user', 'acl_m_'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (140, 1, 1, 'warn', 'mcp', 127, 66, 67, 'MCP_WARN_POST', 'warn_post', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (124, 1, '', 'mcp', 1, 0, 35, 44, 'MCP_MAIN', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (125, 1, '', 'mcp', 1, 0, 45, 50, 'MCP_NOTES', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (126, 1, '', 'mcp', 1, 0, 51, 58, 'MCP_QUEUE', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (127, 1, '', 'mcp', 1, 0, 59, 68, 'MCP_WARN', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (128, 1, 'main', 'mcp', 1, 124, 36, 37, 'MCP_MAIN_FRONT', 'front', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (129, 1, 'main', 'mcp', 1, 124, 38, 39, 'MCP_MAIN_FORUM_VIEW', 'forum_view', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (130, 1, 'main', 'mcp', 1, 124, 40, 41, 'MCP_MAIN_TOPIC_VIEW', 'topic_view', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (131, 1, 'main', 'mcp', 1, 124, 42, 43, 'MCP_MAIN_POST_DETAILS', 'post_details', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (132, 1, 'notes', 'mcp', 1, 125, 46, 47, 'MCP_NOTES_FRONT', 'front', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (133, 1, 'notes', 'mcp', 1, 125, 48, 49, 'MCP_NOTES_USER', 'user_notes', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (134, 1, 'queue', 'mcp', 1, 126, 52, 53, 'MCP_QUEUE_UNAPPROVED_TOPICS', 'unapproved_topics', 'acl_m_approve'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (135, 1, 'queue', 'mcp', 1, 126, 54, 55, 'MCP_QUEUE_UNAPPROVED_POSTS', 'unapproved_posts', 'acl_m_approve'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (136, 1, 'queue', 'mcp', 1, 126, 56, 57, 'MCP_QUEUE_REPORTS', 'reports', 'acl_m_approve'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (137, 1, 'warn', 'mcp', 1, 127, 60, 61, 'MCP_WARN_FRONT', 'front', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (138, 1, 'warn', 'mcp', 1, 127, 62, 63, 'MCP_WARN_LIST', 'list', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (139, 1, 'warn', 'mcp', 1, 127, 64, 65, 'MCP_WARN_USER', 'warn_user', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (140, 1, 'warn', 'mcp', 1, 127, 66, 67, 'MCP_WARN_POST', 'warn_post', 'acl_m_'); # MSSQL IDENTITY phpbb_modules OFF # diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 128605bcc9..a8ecce69eb 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -599,7 +599,7 @@ CREATE TABLE phpbb_sessions ( session_start int(11) NOT NULL DEFAULT '0', session_time int(11) NOT NULL DEFAULT '0', session_ip varchar(40) NOT NULL DEFAULT '0', - session_browser varchar(100) NOT NULL DEFAULT '', + session_browser varchar(150) NOT NULL DEFAULT '', session_page varchar(100) NOT NULL DEFAULT '', session_viewonline tinyint(1) NOT NULL DEFAULT '1', session_admin tinyint(1) NOT NULL DEFAULT '0', diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index 02eb6b42f8..ef46ee9be0 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -73,6 +73,7 @@ $lang = array_merge($lang, array( 'ACP_GROUPS_MANAGEMENT' => 'Group Management', 'ACP_ICONS' => 'Topic Icons', 'ACP_ICONS_SMILIES' => 'Topic Icons/Smilies', + 'ACP_IMAGESETS' => 'Imagesets', 'ACP_INDEX' => 'Admin index', 'ACP_JABBER_SETTINGS' => 'Jabber Settings', 'ACP_LANGUAGE' => 'Language Management', @@ -99,7 +100,11 @@ $lang = array_merge($lang, array( 'ACP_SERVER_CONFIGURATION' => 'Server Configuration', 'ACP_SERVER_SETTINGS' => 'Server Settings', 'ACP_SMILIES' => 'Smilies', + 'ACP_STYLE_COMPONENTS' => 'Style Components', 'ACP_STYLE_MANAGEMENT' => 'Style Management', + 'ACP_STYLES' => 'Styles', + 'ACP_TEMPLATES' => 'Templates', + 'ACP_THEMES' => 'Themes', 'ACP_USER_ATTACH' => 'Attachments', 'ACP_USER_AVATAR' => 'Avatar', 'ACP_USER_FEEDBACK' => 'Feedback', @@ -126,15 +131,19 @@ $lang = array_merge($lang, array( 'CONFIG_UPDATED' => 'Configuration updated successfully', 'CONFIRM_OPERATION' => 'Are you sure you wish to carry out this operation?', - 'DEACTIVATE' => 'Deactivate', - 'DIMENSIONS' => 'Dimensions', - 'DISABLE' => 'Disable', - 'DISPLAY' => 'Display', - 'DOWNLOAD' => 'Download', - 'DOWNLOAD_AS' => 'Download as', + 'DEACTIVATE' => 'Deactivate', + 'DIMENSIONS' => 'Dimensions', + 'DISABLE' => 'Disable', + 'DISPLAY' => 'Display', + 'DOWNLOAD' => 'Download', + 'DOWNLOAD_AS' => 'Download as', + 'DOWNLOAD_STORE' => 'Download or Store file', + 'DOWNLOAD_STORE_EXPLAIN' => 'You may directly download the file or save it in your store/ folder.', 'EDIT' => 'Edit', 'ENABLE' => 'Enable', + 'EXPORT_DOWNLOAD' => 'Download', + 'EXPORT_STORE' => 'Store', 'FORUM_INDEX' => 'Forum Index', @@ -322,6 +331,10 @@ $lang = array_merge($lang, array( 'LOG_USERS_APPROVED' => '<b>Users approved in usergroup</b> %s<br />» %s', 'LOG_USERS_ADDED' => '<b>Added new members to usergroup</b> %s<br />» %s', + 'LOG_IMAGESET_DELETE' => '<b>Deleted imageset</b><br />» %s', + 'LOG_IMAGESET_EDIT_DETAILS' => '<b>Edited imageset details</b><br />» %s', + 'LOG_IMAGESET_EXPORT' => '<b>Exported imageset</b><br />» %s', + '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', @@ -362,6 +375,18 @@ $lang = array_merge($lang, array( 'LOG_RESYNC_POSTCOUNTS' => '<b>User postcounts synced</b>', 'LOG_RESYNC_STATS' => '<b>Post, topic and user stats reset</b>', + 'LOG_STYLE_DELETE' => '<b>Deleted style</b><br />» %s', + 'LOG_STYLE_EDIT_DETAILS' => '<b>Edited style</b><br />» %s', + 'LOG_STYLE_EXPORT' => '<b>Exported style</b><br />» %s', + + 'LOG_TEMPLATE_DELETE' => '<b>Deleted template set</b><br />» %s', + 'LOG_TEMPLATE_EDIT_DETAILS' => '<b>Edited template details</b><br />» %s', + 'LOG_TEMPLATE_EXPORT' => '<b>Exported template set</b><br />» %s', + + 'LOG_THEME_DELETE' => '<b>Theme deleted</b><br />» %s', + 'LOG_THEME_EDIT_DETAILS' => '<b>Edited theme details</b><br />» %s', + 'LOG_THEME_EXPORT' => '<b>Exported theme</b><br />» %s', + 'LOG_USER_ACTIVE' => '<b>User activated</b><br />» %s', 'LOG_USER_BAN_USER' => '<b>Banned User via user management</b> for reason "<i>%s</i>"<br />» %s', 'LOG_USER_BAN_IP' => '<b>Banned ip via user management</b> for reason "<i>%s</i>"<br />» %s', diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php new file mode 100644 index 0000000000..c3962207a0 --- /dev/null +++ b/phpBB/language/en/acp/styles.php @@ -0,0 +1,180 @@ +<?php +/** +* +* acp_styles [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_merge($lang, array( + 'ACP_IMAGESETS_EXPLAIN' => 'Imagesets comprise all the button, forum, folder, etc. and other non-style specific images used by the board. Here you can edit, export or delete existing imagesets and import or activate new sets.', + 'ACP_STYLES_EXPLAIN' => 'Here you can manage the available styles on your board. A style consists off a template, theme and imageset. You may alter existing styles, delete, deactivate, reactivate, create or import new ones. You can also see what a style will look like using the preview function. The current default style is noted by the presence of an asterix (*). Also listed is the total user count for each style, note that overriding user styles will not be reflected here.', + 'ACP_TEMPLATES_EXPLAIN' => 'A Template set comprises all the markup used to generate the layout of your board. Here you can edit existing template sets, delete, export, import and preview sets. You can also modify the templating code used to generate BBCode.', + 'ACP_THEMES_EXPLAIN' => 'From here you can create, install, edit, delete and export themes. A theme is the combination of colours and images that are applied to your templates to define the basic look of your forum. The range of options open to you depends on the configuration of your server and phpBB installation, see the Manual for further details. Please note that when creating new themes the use of an existing theme as a basis is optional.', + 'ARCHIVE_FORMAT' => 'Archive file type', + + 'CACHE' => 'Cache', + 'COPYRIGHT' => 'Copyright', + 'CREATE_IMAGESET' => 'Create new imageset', + 'CREATE_STYLE' => 'Create new style', + 'CREATE_TEMPLATE' => 'Create new template set', + 'CREATE_THEME' => 'Create new theme', + + 'DEACTIVATE_DEFAULT' => 'You cannot deactivate the default style.', + 'DELETE_FROM_FS' => 'Delete from filesystem', + 'DELETE_IMAGESET' => 'Delete Imageset', + 'DELETE_IMAGESET_EXPLAIN' => 'Here you can remove the selected imageset from the database. Additionally, if you have permission you can elect to remove the set from the filesystem. Please note that there is no undo capability. When the imageset is deleted it is gone for good. It is recommended that you first export your set for possible future use.', + 'DELETE_STYLE' => 'Delete style', + 'DELETE_STYLE_EXPLAIN' => 'Here you can remove the selected style. You cannot remove all the style elements from here. These must be deleted individually via their respective forms. Take care in deleting styles there is no undo facility.', + 'DELETE_TEMPLATE' => 'Delete Template', + 'DELETE_TEMPLATE_EXPLAIN' => 'Here you can remove the selected template set from the database. Additionally, if you have permission you can elect to remove the set from the filesystem. Please note that there is no undo capability. When the templates are deleted they are gone for good. It is recommended that you first export your set for possible future use.', + 'DELETE_THEME' => 'Delete theme', + 'DELETE_THEME_EXPLAIN' => 'Here you can remove the selected theme from the database. Additionally, if you have permission you can elect to remove the theme from the filesystem. Please note that there is no undo capability. When the theme is deleted it is gone for good. It is recommended that you first export your theme for possible future use.', + 'DETAILS' => 'Details', + + 'EDIT_DETAILS_IMAGESET' => 'Edit imageset details', + 'EDIT_DETAILS_IMAGESET_EXPLAIN' => 'Here you can edit certain imageset details such as its name.', + 'EDIT_DETAILS_STYLE' => 'Edit Style', + 'EDIT_DETAILS_STYLE_EXPLAIN' => 'Using the form below you can modify this existing style. You may alter the combination of template, theme and imageset which define the style itself. You may also make the style the default one.', + 'EDIT_DETAILS_TEMPLATE' => 'Edit template details', + 'EDIT_DETAILS_TEMPLATE_EXPLAIN' => 'Here you can edit certain templates details such as its name. You may also have the option to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your template set can be written to by the webserver.', + 'EDIT_DETAILS_THEME' => 'Edit theme details', + 'EDIT_DETAILS_THEME_EXPLAIN' => 'Here you can edit certain theme details such as its name. You may also have the option to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your stylesheet can be written to by the webserver.', + 'EXPORT' => 'Export', + + 'FROM' => 'from', // "Create new style .... from ..." + + 'IMAGESET_DELETED' => 'Imageset deleted successfully', + 'IMAGESET_DELETED_FS' => 'Imageset removed from database but some files may remain on the filesystem', + 'IMAGESET_DETAILS_UPDATED' => 'Imageset details successfully updated', + 'IMAGESET_ERR_ARCHIVE' => 'Please select an archive method', + 'IMAGESET_ERR_COPY_LONG' => 'The copyright can be no longer than 60 characters', + 'IMAGESET_ERR_NAME_CHARS' => 'The imageset name can only contain alphanumeric characters, -, +, _ and space', + 'IMAGESET_ERR_NAME_EXIST' => 'A imageset with that name already exists', + 'IMAGESET_ERR_NAME_LONG' => 'The imageset name can be no longer than 30 characters', + 'IMAGESET_ERR_STYLE_NAME' => 'You must supply a name for this imageset', + 'IMAGESET_EXPORT' => 'Export Imageset', + 'IMAGESET_EXPORT_EXPLAIN' => 'Here you can export an imageset in the form of an archive. This archive will contain all the data necessary to install the set of images on another board. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.', + 'IMAGESET_EXPORTED' => 'Imageset exported succesfully and stored in %s', + 'IMAGESET_NAME' => 'Imageset Name', + 'INCLUDE_IMAGESET' => 'Include imageset', + 'INCLUDE_TEMPLATE' => 'Include template', + 'INCLUDE_THEME' => 'Include theme', + 'INSTALLED_IMAGESET' => 'Installed imagesets', + 'INSTALLED_STYLE' => 'Installed styles', + 'INSTALLED_TEMPLATE' => 'Installed templates', + 'INSTALLED_THEME' => 'Installed themes', + + 'NO_IMAGESET' => 'Cannot find imageset on filesystem', + 'NO_STYLE' => 'Cannot find style on filesystem', + 'NO_TEMPLATE' => 'Cannot find template on filesystem', + 'NO_THEME' => 'Cannot find theme on filesystem', + 'NO_UNINSTALLED_IMAGESET' => 'No uninstalled imagesets detected', + 'NO_UNINSTALLED_STYLE' => 'No uninstalled styles detected', + 'NO_UNINSTALLED_TEMPLATE' => 'No uninstalled templates detected', + 'NO_UNINSTALLED_THEME' => 'No uninstalled themes detected', + + 'ONLY_IMAGESET' => 'This is the only remaining imageset, you cannot delete it', + 'ONLY_STYLE' => 'This is the only remaining style, you cannot delete it', + 'ONLY_TEMPLATE' => 'This is the only remaining template set, you cannot delete it', + 'ONLY_THEME' => 'This is the only remaining theme, you cannot delete it', + 'OPTIONAL_BASIS' => 'Optional basis', + + 'REFRESH' => 'Refresh', + 'REPLACE_IMAGESET' => 'Replace imageset with', + 'REPLACE_IMAGESET_EXPLAIN' => 'This imageset will replace the one you are deleting in any styles that use it.', + 'REPLACE_STYLE' => 'Replace style with', + 'REPLACE_STYLE_EXPLAIN' => 'This style will replace the one being deleted for members that use it.', + 'REPLACE_TEMPLATE' => 'Replace template with', + 'REPLACE_TEMPLATE_EXPLAIN' => 'This template set will replace the one you are deleting in any styles that use it.', + 'REPLACE_THEME' => 'Replace theme with', + 'REPLACE_THEME_EXPLAIN' => 'This theme will replace the one you are deleting in any styles that use it.', + + 'STORE_DATABASE' => 'Database', + 'STORE_FILESYSTEM' => 'Filesystem', + + 'STYLE_ACTIVATE' => 'Activate', + 'STYLE_ACTIVE' => 'Active', + 'STYLE_DEACTIVATE' => 'Deactivate', + 'STYLE_DEFAULT' => 'Make default style', + 'STYLE_DELETED' => 'Style deleted successfully', + 'STYLE_DETAILS_UPDATED' => 'Style edited successfully', + 'STYLE_ERR_ARCHIVE' => 'Please select an archive method', + 'STYLE_ERR_COPY_LONG' => 'The copyright can be no longer than 60 characters', + 'STYLE_ERR_MORE_ELEMENTS' => 'You must select at least one style element.', + 'STYLE_ERR_NAME_CHARS' => 'The style name can only contain alphanumeric characters, -, +, _ and space', + 'STYLE_ERR_NAME_EXIST' => 'A style with that name already exists', + 'STYLE_ERR_NAME_LONG' => 'The style name can be no longer than 30 characters', + 'STYLE_ERR_NO_IDS' => 'You must select a template, theme and imageset for this style', + 'STYLE_ERR_STYLE_NAME' => 'You must supply a name for this style', + 'STYLE_EXPORT' => 'Export Style', + 'STYLE_EXPORT_EXPLAIN' => 'Here you can export a style in the form of an archive. A style does not need to contain all elements but it must contain at least one. For example if you have created a new theme and imageset for a commonly used template you could simply export the theme and imageset and ommit the template. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.', + 'STYLE_EXPORTED' => 'Style exported succesfully and stored in %s', + 'STYLE_IMAGESET' => 'Imageset', + 'STYLE_NAME' => 'Style name', + 'STYLE_TEMPLATE' => 'Template', + 'STYLE_THEME' => 'Theme', + 'STYLE_USED_BY' => 'Used by', + + 'TEMPLATE_DELETED' => 'Template set deleted successfully', + 'TEMPLATE_DELETED_FS' => 'Template set removed from database but some files may remain on the filesystem', + 'TEMPLATE_DETAILS_UPDATED' => 'Template details successfully updated', + 'TEMPLATE_ERR_ARCHIVE' => 'Please select an archive method', + 'TEMPLATE_ERR_COPY_LONG' => 'The copyright can be no longer than 60 characters', + 'TEMPLATE_ERR_NAME_CHARS' => 'The template name can only contain alphanumeric characters, -, +, _ and space', + 'TEMPLATE_ERR_NAME_EXIST' => 'A template set with that name already exists', + 'TEMPLATE_ERR_NAME_LONG' => 'The template name can be no longer than 30 characters', + 'TEMPLATE_ERR_STYLE_NAME' => 'You must supply a name for this templates', + 'TEMPLATE_EXPORT' => 'Export Templates', + 'TEMPLATE_EXPORT_EXPLAIN' => 'Here you can export a template set in the form of an archive. This archive will contain all the files necessary to install the templates on another board. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.', + 'TEMPLATE_EXPORTED' => 'Templates exported succesfully and stored in %s', + 'TEMPLATE_LOCATION' => 'Store templates in', + 'TEMPLATE_LOCATION_EXPLAIN' => 'Images are always stored on the filesystem.', + 'TEMPLATE_NAME' => 'Template name', + + 'THEME_DELETED' => 'Theme deleted successfully', + 'THEME_DELETED_FS' => 'Theme removed from database but files remain on the filesystem', + 'THEME_DETAILS_UPDATED' => 'Theme details successfully updated', + 'THEME_ERR_ARCHIVE' => 'Please select an archive method', + 'THEME_ERR_COPY_LONG' => 'The copyright can be no longer than 60 characters', + 'THEME_ERR_NAME_CHARS' => 'The theme name can only contain alphanumeric characters, -, +, _ and space', + 'THEME_ERR_NAME_EXIST' => 'A theme with that name already exists', + 'THEME_ERR_NAME_LONG' => 'The theme name can be no longer than 30 characters', + 'THEME_ERR_STYLE_NAME' => 'You must supply a name for this theme', + 'THEME_EXPORT' => 'Export Theme', + 'THEME_EXPORT_EXPLAIN' => 'Here you can export a theme in the form of an archive. This archive will contain all the data necessary to install the theme on another board. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.', + 'THEME_EXPORTED' => 'Theme exported succesfully and stored in %s', + 'THEME_LOCATION' => 'Store stylesheet in', + 'THEME_LOCATION_EXPLAIN' => 'Images are always stored on the filesystem.', + 'THEME_NAME' => 'Theme Name', + + 'UNINSTALLED_IMAGESET' => 'Uninstalled imagesets', + 'UNINSTALLED_STYLE' => 'Uninstalled styles', + 'UNINSTALLED_TEMPLATE' => 'Uninstalled templates', + 'UNINSTALLED_THEME' => 'Uninstalled themes', + +)); + +?>
\ No newline at end of file diff --git a/phpBB/style.php b/phpBB/style.php index d6de27a453..2c47e72f17 100644 --- a/phpBB/style.php +++ b/phpBB/style.php @@ -28,12 +28,21 @@ if (!empty($load_extensions)) } } + +$sid = (isset($_GET['sid'])) ? htmlspecialchars($_GET['sid']) : ''; +$id = (isset($_GET['id'])) ? intval($_GET['id']) : 0; + +if (!preg_match('/^[A-Za-z0-9]*$/', $sid)) +{ + $sid = ''; +} + // This is a simple script to grab and output the requested CSS data stored in the DB // We include a session_id check to try and limit 3rd party linking ... unless they // happen to have a current session it will output nothing. We will also cache the // resulting CSS data for five minutes ... anything to reduce the load on the SQL // server a little -if (!empty($_GET['id']) && !empty($_GET['sid'])) +if ($id && $sid) { // Include files require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx); @@ -49,16 +58,15 @@ if (!empty($_GET['id']) && !empty($_GET['sid'])) exit; } - $sid = htmlspecialchars($_GET['sid']); - $id = intval($_GET['id']); - $sql = "SELECT s.session_id, u.user_lang FROM {$table_prefix}sessions s, {$table_prefix}users u - WHERE s.session_id = '" . ((!get_magic_quotes_gpc()) ? $db->sql_escape($sid) : $sid) . "' + WHERE s.session_id = '" . $db->sql_escape($sid) . "' AND s.session_user_id = u.user_id"; $result = $db->sql_query($sql); + $user = $db->sql_fetchrow($result); + $db->sql_freeresult($result); - if ($user = $db->sql_fetchrow($result)) + if ($user) { $sql = "SELECT s.style_id, c.theme_data, c.theme_path, c.theme_name, c.theme_mtime, i.imageset_path, t.template_path FROM {$table_prefix}styles s, {$table_prefix}styles_template t, {$table_prefix}styles_theme c, {$table_prefix}styles_imageset i @@ -66,13 +74,14 @@ if (!empty($_GET['id']) && !empty($_GET['sid'])) AND t.template_id = s.template_id AND c.theme_id = s.theme_id AND i.imageset_id = s.imageset_id"; - $result2 = $db->sql_query($sql, 300); + $result = $db->sql_query($sql, 300); + $theme = $db->sql_fetchrow($result); + $db->sql_freeresult($result); - if (!($theme = $db->sql_fetchrow($result2))) + if (!$theme) { exit; } - $db->sql_freeresult($result2); $force_load = true; // Ideally this needs to be based on $config['load_tplcompile'] @@ -81,24 +90,26 @@ if (!empty($_GET['id']) && !empty($_GET['sid'])) $theme['theme_data'] = implode('', file("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css')); // Match CSS imports + $matches = array(); preg_match_all('/@import url\(\"(.*)\"\);/i', $theme['theme_data'], $matches); - if ($matches) + if (sizeof($matches)) { foreach ($matches[0] as $idx => $match) { - $theme['theme_data'] = str_replace($match, load_css_file( $matches[1][$idx] ), $theme['theme_data']); + $theme['theme_data'] = str_replace($match, load_css_file($matches[1][$idx]), $theme['theme_data']); } } - $db->sql_query("UPDATE {$table_prefix}styles_theme SET theme_data = '" . $db->sql_escape($theme['theme_data']) . "', theme_mtime = " . time() . " - WHERE theme_id = $id"); + $sql = "UPDATE {$table_prefix}styles_theme + SET theme_data = '" . $db->sql_escape($theme['theme_data']) . "', theme_mtime = " . time() . " + WHERE theme_id = $id"; + $db->sql_query($sql); } header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 3600)); header('Content-type: text/css'); - // Parse Theme Data $replace = array( '{T_THEME_PATH}' => "{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme', @@ -113,7 +124,6 @@ if (!empty($_GET['id']) && !empty($_GET['sid'])) echo $theme['theme_data']; } - $db->sql_freeresult($result); if (!empty($cache)) { |