From 1855c017e95795966149c6c265a7588f8f5ad19e Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 19 Dec 2005 18:55:52 +0000 Subject: [PATCH] - drop in the new administration panel - not finished yet: some user related items, style admin, database admin and permissions - Graham: Please add your MCP schema data to the schema data file. ;) git-svn-id: file:///svn/phpbb/trunk@5357 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/admin_database.php | 994 ------ phpBB/adm/admin_permissions.php | 1360 -------- phpBB/adm/admin_search.php | 175 - phpBB/adm/admin_styles.php | 3377 -------------------- phpBB/adm/admin_users.php | 2057 ------------ phpBB/adm/editor.js | 306 -- phpBB/adm/images/bg_header.jpg | Bin 0 -> 18314 bytes phpBB/adm/images/logo.gif | Bin 0 -> 7337 bytes phpBB/adm/images/spacer.gif | Bin 0 -> 807 bytes phpBB/adm/index.php | 972 ++---- phpBB/adm/pagestart.php | 469 --- phpBB/adm/style/acp_attachments.html | 421 +++ phpBB/adm/style/acp_ban.html | 111 + phpBB/adm/style/acp_bbcodes.html | 96 + phpBB/adm/style/acp_board.html | 41 + phpBB/adm/style/acp_bots.html | 101 + phpBB/adm/style/acp_disallow.html | 47 + phpBB/adm/style/acp_email.html | 54 + phpBB/adm/style/acp_forums.html | 347 ++ phpBB/adm/style/acp_groups.html | 306 ++ phpBB/adm/style/acp_icons.html | 165 + phpBB/adm/style/acp_jabber.html | 53 + phpBB/adm/style/acp_language.html | 201 ++ phpBB/adm/style/acp_logs.html | 75 + phpBB/adm/style/acp_main.html | 155 + phpBB/adm/style/acp_modules.html | 190 ++ phpBB/adm/style/acp_php_info.html | 11 + phpBB/adm/style/acp_profile.html | 189 ++ phpBB/adm/style/acp_prune_forums.html | 103 + phpBB/adm/style/acp_prune_users.html | 57 + phpBB/adm/style/acp_ranks.html | 95 + phpBB/adm/style/acp_users.html | 442 +++ phpBB/adm/style/acp_words.html | 72 + phpBB/adm/style/admin.css | 794 +++++ phpBB/adm/style/confirm_body.html | 20 + phpBB/adm/style/custom_profile_fields.html | 32 + phpBB/adm/style/message_body.html | 8 + phpBB/adm/style/overall_footer.html | 34 + phpBB/adm/style/overall_header.html | 103 + phpBB/adm/style/simple_body.html | 8 + phpBB/adm/style/simple_footer.html | 30 + phpBB/adm/style/simple_header.html | 63 + phpBB/adm/subSilver.css | 217 -- phpBB/adm/swatch.php | 29 +- phpBB/includes/acp/acp_jabber.php | 3 + phpBB/includes/acp/acp_logs.php | 4 +- phpBB/includes/acp/acp_modules.php | 1 + phpBB/includes/acp/acp_users.php | 1287 ++++++++ phpBB/includes/functions_admin.php | 2 +- phpBB/includes/functions_user.php | 65 +- phpBB/includes/message_parser.php | 4 +- phpBB/includes/ucp/ucp_pm.php | 2 +- phpBB/includes/ucp/ucp_prefs.php | 4 +- phpBB/includes/ucp/ucp_profile.php | 3 +- phpBB/install/schemas/schema_data.sql | 153 +- phpBB/language/en/acp/board.php | 1 + phpBB/language/en/acp/common.php | 38 +- phpBB/language/en/acp/modules.php | 2 + phpBB/language/en/acp/users.php | 94 + phpBB/language/en/admin.php | 2238 ------------- phpBB/language/en/mcp.php | 72 +- 61 files changed, 6356 insertions(+), 11997 deletions(-) delete mode 100644 phpBB/adm/admin_database.php delete mode 100644 phpBB/adm/admin_permissions.php delete mode 100644 phpBB/adm/admin_search.php delete mode 100644 phpBB/adm/admin_styles.php delete mode 100644 phpBB/adm/admin_users.php delete mode 100644 phpBB/adm/editor.js create mode 100644 phpBB/adm/images/bg_header.jpg create mode 100644 phpBB/adm/images/logo.gif create mode 100644 phpBB/adm/images/spacer.gif delete mode 100644 phpBB/adm/pagestart.php create mode 100644 phpBB/adm/style/acp_attachments.html create mode 100644 phpBB/adm/style/acp_ban.html create mode 100644 phpBB/adm/style/acp_bbcodes.html create mode 100644 phpBB/adm/style/acp_board.html create mode 100644 phpBB/adm/style/acp_bots.html create mode 100644 phpBB/adm/style/acp_disallow.html create mode 100644 phpBB/adm/style/acp_email.html create mode 100644 phpBB/adm/style/acp_forums.html create mode 100644 phpBB/adm/style/acp_groups.html create mode 100644 phpBB/adm/style/acp_icons.html create mode 100644 phpBB/adm/style/acp_jabber.html create mode 100644 phpBB/adm/style/acp_language.html create mode 100644 phpBB/adm/style/acp_logs.html create mode 100644 phpBB/adm/style/acp_main.html create mode 100644 phpBB/adm/style/acp_modules.html create mode 100644 phpBB/adm/style/acp_php_info.html create mode 100644 phpBB/adm/style/acp_profile.html create mode 100644 phpBB/adm/style/acp_prune_forums.html create mode 100644 phpBB/adm/style/acp_prune_users.html create mode 100644 phpBB/adm/style/acp_ranks.html create mode 100644 phpBB/adm/style/acp_users.html create mode 100644 phpBB/adm/style/acp_words.html create mode 100644 phpBB/adm/style/admin.css create mode 100644 phpBB/adm/style/confirm_body.html create mode 100644 phpBB/adm/style/custom_profile_fields.html create mode 100644 phpBB/adm/style/message_body.html create mode 100644 phpBB/adm/style/overall_footer.html create mode 100644 phpBB/adm/style/overall_header.html create mode 100644 phpBB/adm/style/simple_body.html create mode 100644 phpBB/adm/style/simple_footer.html create mode 100644 phpBB/adm/style/simple_header.html delete mode 100644 phpBB/adm/subSilver.css create mode 100644 phpBB/includes/acp/acp_users.php create mode 100644 phpBB/language/en/acp/users.php delete mode 100644 phpBB/language/en/admin.php diff --git a/phpBB/adm/admin_database.php b/phpBB/adm/admin_database.php deleted file mode 100644 index ca4cf7db9b..0000000000 --- a/phpBB/adm/admin_database.php +++ /dev/null @@ -1,994 +0,0 @@ -acl_get('a_backup')) ? $filename . "$SID&mode=backup" : ''; - - $file_uploads = @ini_get('file_uploads'); - if (!empty($file_uploads) && $file_uploads !== 0 && strtolower($file_uploads) != 'off' && $auth->acl_get('a_restore')) - { - $module['DB']['DB_RESTORE'] = "$filename$SID&mode=restore"; - } - - return; -} - -define('IN_PHPBB', 1); -// Load default header -$phpbb_root_path = '../'; -$phpEx = substr(strrchr(__FILE__, '.'), 1); -require('pagestart.' . $phpEx); -include($phpbb_root_path . 'includes/functions_compress.'.$phpEx); - -@set_time_limit(1200); - - -// Get some vars -$mode = (isset($_GET['mode'])) ? htmlspecialchars($_GET['mode']) : ''; -$action = (isset($_REQUEST['action'])) ? htmlspecialchars($_REQUEST['action']) : ''; - - -// -------------------- -// Begin program proper -// -------------------- -switch($mode) -{ - case 'backup': - if (!$auth->acl_get('a_backup')) - { - trigger_error($user->lang['NO_ADMIN']); - } - - $db_type = ''; - switch (SQL_LAYER) - { - case 'oracle': - $db_type = 'Oracle'; - break; - case 'odbc': - $db_type = 'ODBC'; - break; - case 'mssql': - $db_type = 'MSSQL'; - break; - } - - if ($db_type) - { - trigger_error($user->lang['Backups_not_supported']); - } - - $additional_tables = (isset($_REQUEST['tables'])) ? htmlspecialchars($_REQUEST['tables']) : ''; - $backup_type = (isset($_REQUEST['type'])) ? intval($_REQUEST['type']) : false; - $search = (!empty($_REQUEST['search'])) ? true : false; - $store = (!empty($_REQUEST['store'])) ? true : false; - $compress = (isset($_REQUEST['compress'])) ? htmlspecialchars($_REQUEST['compress']) : ''; - - if (!isset($_POST['backupstart']) && !isset($_GET['backupstart'])) - { - adm_page_header($user->lang['DB_BACKUP']); - -?> - -

lang['DB_BACKUP']; ?>

- -

lang['Backup_explain']; ?>

- -
"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lang['Backup_options']; ?>
lang['Backup_type']; ?>: lang['Full_backup']; ?>   lang['Structure_only']; ?>   lang['Data_only']; ?>
lang['Additional_tables']; ?>:
lang['Additional_tables_explain']; ?>
lang['INC_SEARCH_INDEX']; ?>:
lang['INC_SEARCH_INDEX_EXPLAIN']; ?>
lang['YES']; ?>   lang['NO']; ?>
lang['DOWNLOAD_STORE']; ?>:
lang['DOWNLOAD_STORE_EXPLAIN']; ?>
lang['EXPORT_DOWNLOAD']; ?>   lang['EXPORT_STORE']; ?>
lang['Compress_file']; ?>: lang['NONE']; ?>  .gz  .zip  .bz2
- -"; - - $message = (empty($store_path)) ? $user->lang['Backup_download'] : $user->lang['Backup_writing']; - - adm_page_header($user->lang['DB_Backup'], $meta); - page_message($user->lang['DB_Backup'], $message); - adm_page_footer(); - } - - $tables = (SQL_LAYER != 'postgresql') ? mysql_get_tables() : pg_get_tables(); - @sort($tables); - - if (!empty($additional_tables)) - { - $additional_tables = explode(',', $additional_tables); - - for($i = 0; $i < count($additional_tables); $i++) - { - $tables[] = trim($additional_tables[$i]); - } - unset($additional_tables); - } - - // Enable output buffering - @ob_start(); - @ob_implicit_flush(0); - - // Build the sql script file... - echo "#\n"; - echo "# phpBB Backup Script\n"; - echo "# Dump of tables for $dbname\n"; - echo "#\n# DATE : " . gmdate("d-m-Y H:i:s", time()) . " GMT\n"; - echo "#\n"; - - if (SQL_LAYER == 'postgresql') - { - echo "\n" . pg_get_sequences("\n", $backup_type); - } - - for($i = 0; $i < count($tables); $i++) - { - $table_name = $tables[$i]; - - if (SQL_LAYER != 'mysql4') - { - $table_def_function = "get_table_def_" . SQL_LAYER; - $table_content_function = "get_table_content_" . SQL_LAYER; - } - else - { - $table_def_function = "get_table_def_mysql"; - $table_content_function = "get_table_content_mysql"; - } - - if ($backup_type != 'data') - { - echo "#\n# TABLE: " . $table_name . "\n#\n"; - echo $table_def_function($table_name, "\n") . "\n"; - } - - if ($backup_type != 'structure') - { - // - // Skip search table data? - // - if ($search || (!$search && !preg_match('/search_word/', $table_name))) - { - $table_content_function($table_name, "output_table_content"); - } - } - } - - // Flush the buffer, send the file - switch ($compress) - {/* - case 'gzip': - $extension = 'sql.gz'; - $contents = gzencode(ob_get_contents()); - ob_end_clean(); - break; - - case 'zip': - $extension = 'zip'; - $zip = new zipfile; - $zip->add_file(ob_get_contents(), "phpbb_db_backup.sql", time()); - ob_end_clean(); - $contents = $zip->file(); - break; - - case 'bzip': - $extension = 'bz2'; - $contents = bzcompress(ob_get_contents()); - ob_end_clean(); - break;*/ - - default: - $extension = 'sql'; - $contents = ob_get_contents(); - ob_end_clean(); - } - - add_log('admin', 'log_db_backup'); - - if (empty($store_path)) - { - header("Pragma: no-cache"); - header("Content-Type: text/x-delimtext; name=\"phpbb_db_backup.$extension\""); - header("Content-disposition: attachment; filename=phpbb_db_backup.$extension"); - - echo $contents; - unset($contents); - } - else - { - if (!($fp = fopen('./../' . $store_path . "/phpbb_db_backup.$extension", 'wb'))) - { - message_die(ERROR, 'Could not open backup file'); - } - - if (!fwrite($fp, $contents)) - { - message_die(ERROR, 'Could not write backup file content'); - } - - fclose($fp); - unset($contents); - - trigger_error($user->lang['Backup_success']); - } - - exit; - break; - - case 'restore': - if (!$auth->acl_get('a_restore')) - { - trigger_error($user->lang['NO_ADMIN']); - } - - if (isset($_POST['restorestart'])) - { - // Handle the file upload .... - // If no file was uploaded report an error... - if (!empty($_POST['local'])) - { - $file_tmpname = './../' . str_replace('\\\\', '/', $_POST['local']); - $filename = substr($file_tmpname, strrpos($file_tmpname, '/')); - } - else - { - $filename = (!empty($_POST['backup_file']['name'])) ? $HTTP_POST_FILES['backup_file']['name'] : ''; - $file_tmpname = ($HTTP_POST_FILES['backup_file']['tmp_name'] != 'none') ? $HTTP_POST_FILES['backup_file']['tmp_name'] : ''; - } - - if ($file_tmpname == '' || $filename == '' || !file_exists($file_tmpname)) - { - trigger_error($user->lang['Restore_Error_no_file']); - } - - $ext = substr($filename, strrpos($filename, '.') + 1); - - if (!preg_match('/^(sql|gz|bz2)$/', $ext)) - { - trigger_error($user->lang['Restore_Error_filename']); - } - - if ((!extension_loaded('zlib') && $ext == 'gz') || (!extension_loaded('zip') && $ext == 'zip') || ($ext == 'bz2' && !extension_loaded('bz2'))) - { - trigger_error($user->lang['Compress_unsupported']); - } - - $sql_query = ''; - switch ($ext) - { - case 'gz': - $fp = gzopen($file_tmpname, 'rb'); - while (!gzeof($fp)) - { - $sql_query .= gzgets($fp, 100000); - } - gzclose($fp); - break; - - case 'bz2': - $sql_query = bzdecompress(fread(fopen($file_tmpname, 'rb'), filesize($file_tmpname))); - break; - - case 'zip': - - - default; - $sql_query = fread(fopen($file_tmpname, 'r'), filesize($file_tmpname)); - } - - if ($sql_query != '') - { - // Strip out sql comments... - remove_remarks($sql_query); - $pieces = split_sql_file($sql_query, ';'); - - $sql_count = count($pieces); - for($i = 0; $i < $sql_count; $i++) - { - $sql = trim($pieces[$i]); - - if (!empty($sql) && $sql[0] != '#') - { - $db->sql_query($sql); - } - } - } - - add_log('admin', 'log_db_restore'); - - trigger_error($user->lang['Restore_success']); - } - - // - // Restore page - // - adm_page_header($user->lang['DB_RESTORE']); - -?> - -

lang['DB_RESTORE']; ?>

- -

lang['Restore_explain']; ?>

- -
"> - - - - - - - - - - - - - -
lang['Select_file']; ?>
lang['Upload_file']; ?>:
lang['Supported_extensions']; - - $types = ': sql'; - if (extension_loaded('zlib')) - { - $types .= ', sql.gz'; - } - if (extension_loaded('bz2')) - { - $types .= ', bz2'; - } - - echo $types; - -?>
lang['Local_backup_file']; ?>:
lang['Local_backup_file_explain']; ?>
- -lang['No_admin']); - exit; - -} - -adm_page_footer(); - -// ----------------------------------------------- -// Begin Functions -// - -// -// Table defns (not from phpMyAdmin) -// -function mysql_get_tables() -{ - global $db, $table_prefix; - - $tables = array(); - - $result = mysql_list_tables($db->dbname, $db->db_connect_id); - if ($row = $db->sql_fetchrow($result)) - { - do - { - if (preg_match('/^' . $table_prefix . '/', $row[0])) - { - $tables[] = $row[0]; - } - } - while ($row = $db->sql_fetchrow($result)); - } - - return $tables; -} - -// -// The following functions are adapted from phpMyAdmin and upgrade_20.php -// -// This function is used for grabbing the sequences for postgres... -// -function pg_get_sequences($crlf, $backup_type) -{ - global $db; - - $get_seq_sql = "SELECT relname FROM pg_class WHERE NOT relname ~ 'pg_.*' - AND relkind = 'S' ORDER BY relname"; - - $seq = $db->sql_query($get_seq_sql); - - if (!$num_seq = $db->sql_numrows($seq)) - { - - $return_val = "# No Sequences Found $crlf"; - - } - else - { - $return_val = "# Sequences $crlf"; - $i_seq = 0; - - while($i_seq < $num_seq) - { - $row = $db->sql_fetchrow($seq); - $sequence = $row['relname']; - - $get_props_sql = "SELECT * FROM $sequence"; - $seq_props = $db->sql_query($get_props_sql); - - if ($db->sql_numrows($seq_props) > 0) - { - $row1 = $db->sql_fetchrow($seq_props); - - if ($backup_type == 'structure') - { - $row['last_value'] = 1; - } - - $return_val .= "CREATE SEQUENCE $sequence start " . $row['last_value'] . ' increment ' . $row['increment_by'] . ' maxvalue ' . $row['max_value'] . ' minvalue ' . $row['min_value'] . ' cache ' . $row['cache_value'] . "; $crlf"; - - } // End if numrows > 0 - - if (($row['last_value'] > 1) && ($backup_type != 'structure')) - { - $return_val .= "SELECT NEXTVALE('$sequence'); $crlf"; - unset($row['last_value']); - } - - $i_seq++; - - } // End while.. - - } // End else... - - return $returnval; - -} // End function... - -// -// The following functions will return the "CREATE TABLE syntax for the -// varying DBMS's -// -// This function returns, will return the table def's for postgres... -// -function get_table_def_postgresql($table, $crlf) -{ - global $db; - - $schema_create = ""; - // - // Get a listing of the fields, with their associated types, etc. - // - - $field_query = "SELECT a.attnum, a.attname AS field, t.typname as type, a.attlen AS length, a.atttypmod as lengthvar, a.attnotnull as notnull - FROM pg_class c, pg_attribute a, pg_type t - WHERE c.relname = '$table' - AND a.attnum > 0 - AND a.attrelid = c.oid - AND a.atttypid = t.oid - ORDER BY a.attnum"; - $result = $db->sql_query($field_query); - - if (!$result) - { - message_die(GENERAL_ERROR, "Failed in get_table_def (show fields)", "", __LINE__, __FILE__, $field_query); - } // end if.. - - $schema_create .= "DROP TABLE $table;$crlf"; - - // - // Ok now we actually start building the SQL statements to restore the tables - // - - $schema_create .= "CREATE TABLE $table($crlf"; - - while ($row = $db->sql_fetchrow($result)) - { - // - // Get the data from the table - // - $sql_get_default = "SELECT d.adsrc AS rowdefault - FROM pg_attrdef d, pg_class c - WHERE (c.relname = '$table') - AND (c.oid = d.adrelid) - AND d.adnum = " . $row['attnum']; - $def_res = $db->sql_query($sql_get_default); - - if (!$def_res) - { - unset($row['rowdefault']); - } - else - { - $row['rowdefault'] = @pg_result($def_res, 0, 'rowdefault'); - } - - if ($row['type'] == 'bpchar') - { - // Internally stored as bpchar, but isn't accepted in a CREATE TABLE statement. - $row['type'] = 'char'; - } - - $schema_create .= ' ' . $row['field'] . ' ' . $row['type']; - - if (eregi('char', $row['type'])) - { - if ($row['lengthvar'] > 0) - { - $schema_create .= '(' . ($row['lengthvar'] -4) . ')'; - } - } - - if (eregi('numeric', $row['type'])) - { - $schema_create .= '('; - $schema_create .= sprintf("%s,%s", (($row['lengthvar'] >> 16) & 0xffff), (($row['lengthvar'] - 4) & 0xffff)); - $schema_create .= ')'; - } - - if (!empty($row['rowdefault'])) - { - $schema_create .= ' DEFAULT ' . $row['rowdefault']; - } - - if ($row['notnull'] == 't') - { - $schema_create .= ' NOT NULL'; - } - - $schema_create .= ",$crlf"; - - } - // - // Get the listing of primary keys. - // - - $sql_pri_keys = "SELECT ic.relname AS index_name, bc.relname AS tab_name, ta.attname AS column_name, i.indisunique AS unique_key, i.indisprimary AS primary_key - FROM pg_class bc, pg_class ic, pg_index i, pg_attribute ta, pg_attribute ia - WHERE (bc.oid = i.indrelid) - AND (ic.oid = i.indexrelid) - AND (ia.attrelid = i.indexrelid) - AND (ta.attrelid = bc.oid) - AND (bc.relname = '$table') - AND (ta.attrelid = i.indrelid) - AND (ta.attnum = i.indkey[ia.attnum-1]) - ORDER BY index_name, tab_name, column_name "; - $result = $db->sql_query($sql_pri_keys); - - if (!$result) - { - message_die(GENERAL_ERROR, "Failed in get_table_def (show fields)", "", __LINE__, __FILE__, $sql_pri_keys); - } - - while ($row = $db->sql_fetchrow($result)) - { - if ($row['primary_key'] == 't') - { - if (!empty($primary_key)) - { - $primary_key .= ', '; - } - - $primary_key .= $row['column_name']; - $primary_key_name = $row['index_name']; - - } - else - { - // - // We have to store this all this info because it is possible to have a multi-column key... - // we can loop through it again and build the statement - // - $index_rows[$row['index_name']]['table'] = $table; - $index_rows[$row['index_name']]['unique'] = ($row['unique_key'] == 't') ? ' UNIQUE ' : ''; - $index_rows[$row['index_name']]['column_names'] .= $row['column_name'] . ', '; - } - } - - if (!empty($index_rows)) - { - while(list($idx_name, $props) = each($index_rows)) - { - $props['column_names'] = ereg_replace(", $", "" , $props['column_names']); - $index_create .= 'CREATE ' . $props['unique'] . " INDEX $idx_name ON $table (" . $props['column_names'] . ");$crlf"; - } - } - - if (!empty($primary_key)) - { - $schema_create .= " CONSTRAINT $primary_key_name PRIMARY KEY ($primary_key),$crlf"; - } - - // - // Generate constraint clauses for CHECK constraints - // - $sql_checks = "SELECT rcname as index_name, rcsrc - FROM pg_relcheck, pg_class bc - WHERE rcrelid = bc.oid - AND bc.relname = '$table' - AND NOT EXISTS ( - SELECT * - FROM pg_relcheck as c, pg_inherits as i - WHERE i.inhrelid = pg_relcheck.rcrelid - AND c.rcname = pg_relcheck.rcname - AND c.rcsrc = pg_relcheck.rcsrc - AND c.rcrelid = i.inhparent - )"; - $result = $db->sql_query($sql_checks); - - if (!$result) - { - message_die(GENERAL_ERROR, "Failed in get_table_def (show fields)", "", __LINE__, __FILE__, $sql_checks); - } - - // - // Add the constraints to the sql file. - // - while ($row = $db->sql_fetchrow($result)) - { - $schema_create .= ' CONSTRAINT ' . $row['index_name'] . ' CHECK ' . $row['rcsrc'] . ",$crlf"; - } - - $schema_create = ereg_replace(',' . $crlf . '$', '', $schema_create); - $index_create = ereg_replace(',' . $crlf . '$', '', $index_create); - - $schema_create .= "$crlf);$crlf"; - - if (!empty($index_create)) - { - $schema_create .= $index_create; - } - - // - // Ok now we've built all the sql return it to the calling function. - // - return (stripslashes($schema_create)); - -} - -// -// This function returns the "CREATE TABLE" syntax for mysql dbms... -// -function get_table_def_mysql($table, $crlf) -{ - global $db; - - $schema_create = ""; - $field_query = "SHOW FIELDS FROM $table"; - $key_query = "SHOW KEYS FROM $table"; - - // If the user has selected to drop existing tables when doing a restore. - // Then we add the statement to drop the tables.... - $schema_create .= "DROP TABLE IF EXISTS $table;$crlf"; - $schema_create .= "CREATE TABLE $table($crlf"; - - // Ok lets grab the fields... - $result = $db->sql_query($field_query); - - while ($row = $db->sql_fetchrow($result)) - { - $schema_create .= ' ' . $row['Field'] . ' ' . $row['Type']; - - if (!empty($row['Default'])) - { - $schema_create .= ' DEFAULT \'' . $row['Default'] . '\''; - } - - if ($row['Null'] != "YES") - { - $schema_create .= ' NOT NULL'; - } - - if ($row['Extra'] != "") - { - $schema_create .= ' ' . $row['Extra']; - } - - $schema_create .= ",$crlf"; - } - // - // Drop the last ',$crlf' off ;) - // - $schema_create = ereg_replace(',' . $crlf . '$', "", $schema_create); - - // - // Get any Indexed fields from the database... - // - $result = $db->sql_query($key_query); - - while($row = $db->sql_fetchrow($result)) - { - $kname = $row['Key_name']; - - if (($kname != 'PRIMARY') && ($row['Non_unique'] == 0)) - { - $kname = "UNIQUE|$kname"; - } - - if (!is_array($index[$kname])) - { - $index[$kname] = array(); - } - - $index[$kname][] = $row['Column_name']; - } - - foreach ($index as $x => $columns) - { - $schema_create .= ", $crlf"; - - if ($x == 'PRIMARY') - { - $schema_create .= ' PRIMARY KEY (' . implode($columns, ', ') . ')'; - } - elseif (substr($x,0,6) == 'UNIQUE') - { - $schema_create .= ' UNIQUE ' . substr($x,7) . ' (' . implode($columns, ', ') . ')'; - } - else - { - $schema_create .= " KEY $x (" . implode($columns, ', ') . ')'; - } - } - - $schema_create .= "$crlf);"; - - if (get_magic_quotes_runtime()) - { - return stripslashes($schema_create); - } - else - { - return $schema_create; - } - -} // End get_table_def_mysql - - -// -// This fuction will return a tables create definition to be used as an sql -// statement. -// -// -// The following functions Get the data from the tables and format it as a -// series of INSERT statements, for each different DBMS... -// After every row a custom callback function $handler gets called. -// $handler must accept one parameter ($sql_insert); -// -// -// Here is the function for postgres... -// -function get_table_content_postgresql($table, $handler) -{ - global $db; - - // Grab all of the data from current table. - $result = $db->sql_query("SELECT * FROM $table"); - - $i_num_fields = $db->sql_numfields($result); - - for ($i = 0; $i < $i_num_fields; $i++) - { - $aryType[] = $db->sql_fieldtype($i, $result); - $aryName[] = $db->sql_fieldname($i, $result); - } - - $iRec = 0; - - while ($row = $db->sql_fetchrow($result)) - { - unset($schema_vals); - unset($schema_fields); - unset($schema_insert); - - // Build the SQL statement to recreate the data. - for($i = 0; $i < $i_num_fields; $i++) - { - $strVal = $row[$aryName[$i]]; - if (preg_match('#char|text|bool#i', $aryType[$i])) - { - $strQuote = "'"; - $strEmpty = ""; - $strVal = addslashes($strVal); - } - elseif (preg_match('#date|timestamp#i', $aryType[$i])) - { - if ($empty($strVal)) - { - $strQuote = ""; - } - else - { - $strQuote = "'"; - } - } - else - { - $strQuote = ""; - $strEmpty = "NULL"; - } - - if (empty($strVal) && $strVal != "0") - { - $strVal = $strEmpty; - } - - $schema_vals .= " $strQuote$strVal$strQuote,"; - $schema_fields .= " $aryName[$i],"; - } - - $schema_vals = preg_replace('#,$#', '', $schema_vals); - $schema_vals = preg_replace('#^ #', '', $schema_vals); - $schema_fields = preg_replace('#,$#', '', $schema_fields); - $schema_fields = preg_replace('#^ #', '', $schema_fields); - - // Take the ordered fields and their associated data and build it - // into a valid sql statement to recreate that field in the data. - $schema_insert = "INSERT INTO $table ($schema_fields) VALUES($schema_vals);"; - - $handler(trim($schema_insert)); - } - - return(true); - -}// end function get_table_content_postgres... - -// -// This function is for getting the data from a mysql table. -// - -function get_table_content_mysql($table, $handler) -{ - global $db; - - // Grab the data from the table. - $result = $db->sql_query("SELECT * FROM $table"); - - // Loop through the resulting rows and build the sql statement. - $schema_insert = ""; - if ($row = $db->sql_fetchrow($result)) - { - $schema_insert = "\n#\n# Table Data for $table\n#\n"; - - $handler($schema_insert); - - do - { - $table_list = '('; - $num_fields = $db->sql_numfields($result); - // - // Grab the list of field names. - // - for ($j = 0; $j < $num_fields; $j++) - { - $table_list .= $db->sql_fieldname($j, $result) . ', '; - } - // - // Get rid of the last comma - // - $table_list = preg_replace('#, $#', '', $table_list); - $table_list .= ')'; - // - // Start building the SQL statement. - // - $schema_insert = "INSERT INTO $table $table_list VALUES("; - // - // Loop through the rows and fill in data for each column - // - for ($j = 0; $j < $num_fields; $j++) - { - if (!isset($row[$j])) - { - // - // If there is no data for the column set it to null. - // There was a problem here with an extra space causing the - // sql file not to reimport if the last column was null in - // any table. Should be fixed now :) JLH - // - $schema_insert .= ' NULL,'; - } - elseif ($row[$j] != '') - { - $schema_insert .= ' \'' . addslashes($row[$j]) . '\','; - } - else - { - $schema_insert .= '\'\','; - } - } - // - // Get rid of the the last comma. - // - $schema_insert = preg_replace('#,$#', '', $schema_insert); - $schema_insert .= ');'; - // - // Go ahead and send the insert statement to the handler function. - // - $handler(trim($schema_insert)); - } - while ($row = $db->sql_fetchrow($result)); - } - - return true; -} - -function output_table_content($content) -{ - global $tempfile; - - //fwrite($tempfile, $content . "\n"); - //$backup_sql .= $content . "\n"; - echo $content ."\n"; - return; -} -// -// End Functions -// ----------------------------------------------- - -?> \ No newline at end of file diff --git a/phpBB/adm/admin_permissions.php b/phpBB/adm/admin_permissions.php deleted file mode 100644 index e64bae1211..0000000000 --- a/phpBB/adm/admin_permissions.php +++ /dev/null @@ -1,1360 +0,0 @@ -acl_get('a_auth')) ? "$filename$SID&mode=forum" : ''; - $module['PERM']['MODERATORS'] = ($auth->acl_get('a_authmods')) ? "$filename$SID&mode=mod" : ''; - $module['PERM']['SUPER_MODERATORS'] = ($auth->acl_get('a_authmods')) ? "$filename$SID&mode=supermod" : ''; - $module['PERM']['ADMINISTRATORS'] = ($auth->acl_get('a_authadmins')) ? "$filename$SID&mode=admin" : ''; - $module['PERM']['USER_PERMS'] = ($auth->acl_get('a_authusers')) ? "$filename$SID&mode=user" : ''; - $module['PERM']['GROUP_PERMS'] = ($auth->acl_get('a_authgroups')) ? "$filename$SID&mode=group" : ''; - - return; -} - -define('IN_PHPBB', 1); -// Include files -$phpbb_root_path = '../'; -$phpEx = substr(strrchr(__FILE__, '.'), 1); -require('pagestart.' . $phpEx); - - -// Grab and set some basic parameters -// -// 'mode' determines what we're altering; administrators, users, deps, etc. -// 'submit' is used to determine what we're doing ... special format -$mode = (isset($_REQUEST['mode'])) ? htmlspecialchars($_REQUEST['mode']) : ''; -$submode = (isset($_REQUEST['submode'])) ? htmlspecialchars($_REQUEST['submode']) : ''; -$which_mode = (!empty($submode) && $submode != $mode) ? $submode : $mode; -$submit = array_values(preg_grep('#^submit_(.*)$#i', array_keys($_REQUEST))); -$submit = (sizeof($submit)) ? substr($submit[0], strpos($submit[0], '_') + 1) : ''; - - -// Submitted setting data -// -// 'auth_settings' contains the submitted option settings assigned to options, should be an -// associative array with integer values -$auth_settings = (isset($_POST['settings'])) ? $_POST['settings'] : ''; - - -// Forum, User or Group information -// -// 'ug_type' is either user or groups used mainly for forum/admin/mod permissions -// 'ug_data' contains the list of usernames, user_id's or group_ids for the 'ug_type' -// 'forum_id' contains the list of forums, 0 is used for "All forums", can be array or scalar -$ug_type = (isset($_REQUEST['ug_type'])) ? htmlspecialchars($_REQUEST['ug_type']) : ''; -$ug_data = (isset($_POST['ug_data'])) ? $_POST['ug_data'] : ''; - -if (isset($_REQUEST['f'])) -{ - $forum_id = (is_array($_REQUEST['f'])) ? $_REQUEST['f'] : intval($_REQUEST['f']); -} - -if (!isset($forum_id[$which_mode])) -{ - $forum_id[$which_mode][] = 0; -} -$sql_forum_id = implode(', ', array_map('intval', $forum_id[$which_mode])); - -// Generate list of forum id's -$s_forum_id = ''; -foreach ($forum_id as $forum_submode => $forum_submode_ids) -{ - foreach ($forum_submode_ids as $submode_forum_id) - { - $s_forum_id .= ''; - } -} -unset($forum_submode_ids); -unset($forum_submode); -unset($submode_forum_id); - - -// Instantiate a new auth admin object in readiness -$auth_admin = new auth_admin(); - - -// What mode are we running? So we can output the correct title, explanation -// and set the sql_option_mode/acl check -switch ($mode) -{ - case 'forum': - $l_title = $user->lang['PERMISSIONS']; - $l_title_explain = $user->lang['PERMISSIONS_EXPLAIN']; - $which_acl = 'a_auth'; - $sql_option_mode = 'f'; - break; - - case 'mod': - $l_title = $user->lang['MODERATORS']; - $l_title_explain = $user->lang['MODERATORS_EXPLAIN']; - $which_acl = 'a_authmods'; - $sql_option_mode = 'm'; - break; - - case 'supermod': - $l_title = $user->lang['SUPER_MODERATORS']; - $l_title_explain = $user->lang['SUPER_MODERATORS_EXPLAIN']; - $which_acl = 'a_authmods'; - $sql_option_mode = 'm'; - break; - - case 'admin': - $l_title = $user->lang['ADMINISTRATORS']; - $l_title_explain = $user->lang['ADMINISTRATORS_EXPLAIN']; - $which_acl = 'a_authadmins'; - $sql_option_mode = 'a'; - break; - - case 'user': - $l_title = $user->lang['USER_PERMISSIONS']; - $l_title_explain = $user->lang['USER_PERMISSIONS_EXPLAIN']; - $which_acl = 'a_authusers'; - $sql_option_mode = 'u'; - break; - - case 'group': - $l_title = $user->lang['GROUP_PERMISSIONS']; - $l_title_explain = $user->lang['GROUP_PERMISSIONS_EXPLAIN']; - $which_acl = 'a_authgroups'; - $sql_option_mode = 'u'; - break; - - case 'deps': - $l_title = $user->lang['DEPENDENCIES']; - $l_title_explain = $user->lang['DEPENDENCIES_EXPLAIN']; - $which_acl = 'a_authdeps'; - break; -} - -// Permission check -if (!$auth->acl_get($which_acl)) -{ - trigger_error($user->lang['NO_ADMIN']); -} - -// Are we setting deps? If we are we need to re-run the mode match above for the -// relevant 'new' mode -if (!empty($submode)) -{ - switch ($submode) - { - case 'forum': - $l_title_explain = $user->lang['PERMISSIONS_EXPLAIN']; - $which_acl = 'a_auth'; - $sql_option_mode = 'f'; - break; - - case 'mod': - $l_title_explain = $user->lang['MODERATORS_EXPLAIN']; - $which_acl = 'a_authmods'; - $sql_option_mode = 'm'; - break; - - case 'supermod': - $l_title_explain = $user->lang['SUPER_MODERATORS_EXPLAIN']; - $which_acl = 'a_authmods'; - $sql_option_mode = 'm'; - break; - } - - // Permission check - if (!$auth->acl_get($which_acl)) - { - trigger_error($user->lang['NO_ADMIN']); - } -} - - -// Does user want to update anything? Check here to find out -// and act appropriately -switch ($submit) -{ - case 'update': - - if (sizeof($auth_settings)) - { - // Admin wants subforums to inherit permissions ... so add these - // forums to the list ... since inheritance is only available for - // forum and moderator primary modes we deal with '$forum_id[$mode]' - if (!empty($_POST['inherit'])) - { - $forum_id[$mode] = array_merge($forum_id[$mode], array_map('intval', $_POST['inherit'])); - } - - // Update the permission set ... we loop through each auth setting array - foreach ($auth_settings as $auth_submode => $auth_setting) - { - // Are any entries * ? If so we need to remove them since they - // are options the user wishes to ignore - if (in_array('*', $auth_setting)) - { - $temp = array(); - foreach ($auth_setting as $option => $setting) - { - if ($setting != '*') - { - $temp[$option] = $setting; - } - } - $auth_setting = $temp; - } - - if (sizeof($auth_setting)) - { - // Loop through all user/group ids - foreach ($ug_data as $id) - { - $auth_admin->acl_set($ug_type, $forum_id[$auth_submode], intval($id), $auth_setting); - } - } - } - - - // Do we need to recache the moderator lists? We do if the mode - // was mod or auth_settings['mod'] is a non-zero size array - if ($mode == 'mod' || (isset($auth_settings['mod']) && sizeof($auth_settings['mod']))) - { - cache_moderators(); - } - - // Remove users who are now moderators or admins from everyones foes - // list - if ($mode == 'mod' || (isset($auth_settings['mod']) && sizeof($auth_settings['mod'])) || $mode == 'admin' || (isset($auth_settings['admin']) && sizeof($auth_settings['admin']))) - { - update_foes(); - } - - // Logging ... first grab user or groupnames ... - $sql = ($ug_type == 'group') ? 'SELECT group_name as name, group_type FROM ' . GROUPS_TABLE . ' WHERE group_id' : 'SELECT username as name FROM ' . USERS_TABLE . ' WHERE user_id'; - $sql .= ' IN (' . implode(', ', array_map('intval', $ug_data)) . ')'; - $result = $db->sql_query($sql); - - $l_ug_list = ''; - while ($row = $db->sql_fetchrow($result)) - { - $l_ug_list .= (($l_ug_list != '') ? ', ' : '') . ((isset($row['group_type']) && $row['group_type'] == GROUP_SPECIAL) ? '' . $user->lang['G_' . $row['name']] . '' : $row['name']); - } - $db->sql_freeresult($result); - - foreach (array_keys($auth_settings) as $submode) - { - if (!in_array(0, $forum_id[$submode])) - { - // Grab the forum details if non-zero forum_id - $sql = 'SELECT forum_name - FROM ' . FORUMS_TABLE . " - WHERE forum_id IN ($sql_forum_id)"; - $result = $db->sql_query($sql); - - $l_forum_list = ''; - while ($row = $db->sql_fetchrow($result)) - { - $l_forum_list .= (($l_forum_list != '') ? ', ' : '') . $row['forum_name']; - } - $db->sql_freeresult($result); - - add_log('admin', 'LOG_ACL_' . strtoupper($submode) . '_ADD', $l_forum_list, $l_ug_list); - } - else - { - add_log('admin', 'LOG_ACL_' . strtoupper($submode) . '_ADD', $l_ug_list); - } - } - unset($l_ug_list); - } - unset($auth_submode); - unset($auth_setting); - - trigger_error($user->lang['AUTH_UPDATED']); - break; - - case 'delete': - - $sql = "SELECT auth_option_id - FROM " . ACL_OPTIONS_TABLE . " - WHERE auth_option LIKE '{$sql_option_mode}_%'"; - $result = $db->sql_query($sql); - - if ($row = $db->sql_fetchrow($result)) - { - $option_id_ary = array(); - do - { - $option_id_ary[] = $row['auth_option_id']; - } - while ($row = $db->sql_fetchrow($result)); - - foreach ($ug_data as $id) - { - $auth_admin->acl_delete($ug_type, $forum_id[$mode], $id, $option_id_ary); - } - unset($option_id_ary); - } - $db->sql_freeresult($result); - - - // Do we need to recache the moderator lists? We do if the mode - // was mod or auth_settings['mod'] is a non-zero size array - if ($mode == 'mod' || (isset($auth_settings['mod']) && sizeof($auth_settings['mod']))) - { - cache_moderators(); - } - - - // Logging ... first grab user or groupnames ... - $sql = ($ug_type == 'group') ? 'SELECT group_name as name, group_type FROM ' . GROUPS_TABLE . ' WHERE group_id' : 'SELECT username as name FROM ' . USERS_TABLE . ' WHERE user_id'; - $sql .= ' IN (' . implode(', ', array_map('intval', $ug_data)) . ')'; - $result = $db->sql_query($sql); - - $l_ug_list = ''; - while ($row = $db->sql_fetchrow($result)) - { - $l_ug_list .= (($l_ug_list != '') ? ', ' : '') . ((isset($row['group_type']) && $row['group_type'] == GROUP_SPECIAL) ? '' . $user->lang['G_' . $row['name']] . '' : $row['name']); - } - $db->sql_freeresult($result); - - - // Grab the forum details if non-zero forum_id - if (!in_array(0, $forum_id[$which_mode])) - { - $sql = 'SELECT forum_name - FROM ' . FORUMS_TABLE . " - WHERE forum_id IN ($sql_forum_id)"; - $result = $db->sql_query($sql); - - $l_forum_list = ''; - while ($row = $db->sql_fetchrow($result)) - { - $l_forum_list .= (($l_forum_list != '') ? ', ' : '') . $row['forum_name']; - } - $db->sql_freeresult($result); - - add_log('admin', 'LOG_ACL_' . strtoupper($which_mode) . '_DEL', $l_forum_list, $l_ug_list); - } - else - { - add_log('admin', 'LOG_ACL_' . strtoupper($which_mode) . '_DEL', $l_ug_list); - } - - trigger_error($user->lang['AUTH_UPDATED']); - break; - - case 'presetsave': - - $holding_ary = array(); - foreach ($auth_settings[$which_mode] as $option => $setting) - { - switch ($setting) - { - case ACL_YES: - $holding_ary['yes'][] = $option; - break; - - case ACL_NO: - $holding_ary['no'][] = $option; - break; - - case ACL_UNSET: - $holding_ary['unset'][] = $option; - break; - } - } - unset($option); - unset($setting); - - $sql = array( - 'preset_user_id'=> intval($user->data['user_id']), - 'preset_type' => $sql_option_mode, - 'preset_data' => $db->sql_escape(serialize($holding_ary)) - ); - - if (!empty($_POST['presetname'])) - { - $sql['preset_name'] = $db->sql_escape($_POST['presetname']); - } - - if (!empty($_POST['presetname']) || $_POST['presetoption'] != -1) - { - $sql = ($_POST['presetoption'] == -1) ? 'INSERT INTO ' . ACL_PRESETS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql) : 'UPDATE ' . ACL_PRESETS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql) . ' WHERE preset_id =' . intval($_POST['presetoption']); - $db->sql_query($sql); - - add_log('admin', 'LOG_ACL_PRESET_ADD', $sql['preset_name']); - } - break; - - case 'presetdel': - if (!empty($_POST['presetoption'])) - { - $sql = "SELECT preset_name - FROM " . ACL_PRESETS_TABLE . " - WHERE preset_id = " . intval($_POST['presetoption']); - $result = $db->sql_query($sql); - - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - $sql = "DELETE FROM " . ACL_PRESETS_TABLE . " - WHERE preset_id = " . intval($_POST['presetoption']); - $db->sql_query($sql); - - add_log('admin', 'LOG_ACL_PRESET_DEL', $row['preset_name']); - unset($row); - } - break; -} -// End update - - -// Output page header -adm_page_header($l_title); - - -// First potential form ... this is for selecting forums, users -// or groups. -if (in_array($mode, array('user', 'group', 'forum', 'mod')) && empty($submit)) -{ - -?> - -

- -

- -
"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lang['LOOK_UP_FORUM']; ?>
  
 
lang['LOOK_UP_USER']; ?>
  
    &mode=searchuser&form=2&field=entries', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;" />
lang['LOOK_UP_GROUP']; ?>
  
 
- - - -

- -

- - - - - - - - - - - - - - - - - - - -

lang['USERS']; ?>

lang['USERGROUPS']; ?>

"> - - - - - - - - - -
lang['MANAGE_USERS']; ?>
 
"> - - - - - - - - - -
lang['MANAGE_GROUPS']; ?>
 
"> - - - - - - - - - -
lang['ADD_USERS']; ?>
    &mode=searchuser&form=2&field=entries', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;" />
"> - - - - - - - - - -
lang['ADD_GROUPS']; ?>
 
- -lang[$l_message]); - } - - - $forum_list = ''; - // Grab the forum details if non-zero forum_id - if (!in_array(0, $forum_id[$which_mode])) - { - $sql = 'SELECT forum_id, forum_name, parent_id - FROM ' . FORUMS_TABLE . " - WHERE forum_id IN ($sql_forum_id)"; - $result = $db->sql_query($sql); - - if (!($row = $db->sql_fetchrow($result))) - { - trigger_error($user->lang['NO_FORUM']); - } - - // If we have more than one forum we want a list of all their names - // so loop through all results. We don't need all the data though - // since cascading/inheritance is only applicable if a single forum - // was selected - $forum_data = $row; - - do - { - $forum_list .= (($forum_list != '') ? ', ' : '') . '' . $row['forum_name'] . ''; - } - while ($row = $db->sql_fetchrow($result)); - $db->sql_freeresult($result); - } - - - // Grab relevant user or group information - $ug_ids = $l_ug_list = $ug_hidden = $l_no_error = ''; - switch ($ug_type) - { - case 'user': - // If we've just come from the usergroup form then user will actually - // be a username rather than a user_id, so act appropriately - $l_no_error = $user->lang['NO_USER']; - $sql = 'SELECT user_id AS id, username AS name - FROM ' . USERS_TABLE . ' - WHERE '; - - if ($submit == 'add_options') - { - $_ug_data = explode("\r\n", $ug_data[0]); - - $_u_sql = ''; - foreach ($_ug_data as $_u_name) - { - $_u_sql .= (($_u_sql) ? ', ' : '') . "'" . $db->sql_escape($_u_name) . "'"; - } - $sql .= ' username IN (' . $_u_sql . ')'; - } - else - { - $sql .= ' user_id ' . ((is_array($ug_data)) ? 'IN (' . implode(', ', $ug_data) . ')' : '= ' . $ug_data); - } - - break; - - case 'group': - $l_no_error = $user->lang['NO_GROUP']; - $sql = 'SELECT group_id AS id, group_name AS name, group_type - FROM ' . GROUPS_TABLE . ' - WHERE group_id'; - $sql .= (is_array($ug_data)) ? ' IN (' . implode(', ', $ug_data) . ')' : ' = ' . $ug_data; - break; - } - $result = $db->sql_query($sql); - - if (!$row = $db->sql_fetchrow($result)) - { - trigger_error($l_no_error); - } - unset($l_no_error); - - // Store the user_ids and names for later use - do - { - $l_ug_list .= (($l_ug_list != '') ? ', ' : '') . ((isset($row['group_type']) && $row['group_type'] == GROUP_SPECIAL) ? '' . $user->lang['G_' . $row['name']] : '' . $row['name']) . ''; - $ug_ids .= (($ug_ids != '') ? ', ' : '') . $row['id']; - $ug_hidden .= ''; - } - while ($row = $db->sql_fetchrow($result)); - $db->sql_freeresult($result); - - - // Grab the list of options ... if we're in deps mode we want all options, - // else we skip the master options - $sql_founder = ($user->data['user_type'] == USER_FOUNDER) ? ' AND founder_only <> 1' : ''; - $sql_limit_option = ($mode == 'deps') ? '' : "AND auth_option <> '" . $sql_option_mode . "_'"; - $sql = "SELECT auth_option_id, auth_option - FROM " . ACL_OPTIONS_TABLE . " - WHERE auth_option LIKE '" . $sql_option_mode . "_%' - $sql_limit_option - $sql_founder"; - $result = $db->sql_query($sql); - - $auth_options = array(); - while ($row = $db->sql_fetchrow($result)) - { - $auth_options[] = $row; - } - $db->sql_freeresult($result); - - unset($sql_limit_option); - - - // Now we'll build a list of preset options ... - $preset_options = $preset_js = $preset_update_options = ''; - $holding = array(); - $holding['allow'] = $holding['deny'] = $holding['inherit'] = ''; - - // Do we have a parent forum? If so offer option to inherit from that - if ($forum_data['parent_id'] != 0) - { - switch ($ug_type) - { - case 'group': - $sql = "SELECT o.auth_option, a.auth_setting FROM " . ACL_GROUPS_TABLE . " a, " . ACL_OPTIONS_TABLE . " o WHERE o.auth_option LIKE '" . $sql_option_mode . "_%' AND a.auth_option_id = o.auth_option_id AND a.forum_id = " . $forum_data['parent_id'] . " AND a.group_id IN ($ug_ids)"; - break; - - case 'user': - $sql = "SELECT o.auth_option, a.auth_setting FROM " . ACL_USERS_TABLE . " a, " . ACL_OPTIONS_TABLE . " o WHERE o.auth_option LIKE '" . $sql_option_mode . "_%' AND a.auth_option_id = o.auth_option_id AND a.forum_id = " . $forum_data['parent_id'] . " AND a.user_id IN ($ug_ids)"; - break; - } - $result = $db->sql_query($sql); - - if ($row = $db->sql_fetchrow($result)) - { - do - { - switch ($row['auth_setting']) - { - case ACL_YES: - $holding['allow'] .= $row['auth_option'] . ', '; - break; - - case ACL_NO: - $holding['deny'] .= $row['auth_option'] . ', '; - break; - - case ACL_UNSET: - $holding['inherit'] .= $row['auth_option'] . ', '; - break; - } - } - while ($row = $db->sql_fetchrow($result)); - - $preset_options .= ''; - $preset_js .= "\tpresets['preset_0'] = new Array();" . "\n"; - $preset_js .= "\tpresets['preset_0'] = new preset_obj('" . $holding['allow'] . "', '" . $holding['deny'] . "', '" . $holding['inherit'] . "');\n"; - } - $db->sql_freeresult($result); - } - - // Look for custom presets - $sql = "SELECT preset_id, preset_name, preset_data - FROM " . ACL_PRESETS_TABLE . " - WHERE preset_type = '" . (($mode == 'deps') ? 'f' : $sql_option_mode) . "' - ORDER BY preset_id ASC"; - $result = $db->sql_query($sql); - - if ($row = $db->sql_fetchrow($result)) - { - do - { - $preset_update_options .= ''; - $preset_options .= ''; - - $preset_data = unserialize(stripslashes($row['preset_data'])); - - foreach ($preset_data as $preset_type => $preset_type_ary) - { - $holding[$preset_type] = ''; - foreach ($preset_type_ary as $preset_option) - { - $holding[$preset_type] .= "$preset_option, "; - } - } - - $preset_js .= "\tpresets['preset_" . $row['preset_id'] . "'] = new Array();" . "\n"; - $preset_js .= "\tpresets['preset_" . $row['preset_id'] . "'] = new preset_obj('" . $holding['yes'] . "', '" . $holding['no'] . "', '" . $holding['inherit'] . "');\n"; - } - while ($row = $db->sql_fetchrow($result)); - } - $db->sql_freeresult($result); - - unset($holding); - - - // If we aren't looking @ deps then we try and grab existing sessions for - // the given forum and user/group - if (!is_array($auth_settings) || empty($auth_settings[$which_mode])) - { - if ($which_mode == $mode) - { - switch ($ug_type) - { - case 'group': - $sql_table = ACL_GROUPS_TABLE . ' a '; - $sql_join = 'a.group_id'; - break; - - case 'user': - $sql_table = ACL_USERS_TABLE . ' a '; - $sql_join = 'a.user_id'; - break; - } - - $sql = "SELECT o.auth_option, MIN(a.auth_setting) AS min_auth_setting - FROM $sql_table, " . ACL_OPTIONS_TABLE . " o - WHERE o.auth_option LIKE '" . $sql_option_mode . "_%' - AND a.auth_option_id = o.auth_option_id - AND a.forum_id IN ($sql_forum_id) - AND $sql_join IN ($ug_ids) - GROUP BY o.auth_option"; - $result = $db->sql_query($sql); - - $auth_settings[$which_mode] = array(); - while ($row = $db->sql_fetchrow($result)) - { - $auth_settings[$which_mode][$row['auth_option']] = $row['min_auth_setting']; - } - $db->sql_freeresult($result); - } - else - { - // We're looking at a view ... so we'll set all options to unset - // We could be a little more clever here but the "safe side" looks - // better right now - $auth_settings[$which_mode] = array(); - foreach ($auth_options as $option) - { - $auth_settings[$which_mode][$option['auth_option']] = '*'; - } - unset($option); - } - } - - $view_options = ''; - // Should we display a dropdown for views? - if (in_array($mode, array('admin', 'supermod', 'mod'))) - { - $view_options .= ''; - $view_ary = array( - 'admin' => array('admin' => 'a_', 'forum' => 'a_auth', 'supermod' => 'a_authmods', 'mod' => 'a_authmods'), - 'supermod' => array('supermod' => 'a_authmods', 'mod' => 'a_authmods', 'forum' => 'a_auth'), - 'mod' => array('mod' => 'a_authmods', 'forum' => 'a_auth') - ); - - foreach ($view_ary[$mode] as $which_submode => $which_acl) - { - if ($auth->acl_get($which_acl)) - { - $view_options .= ''; - } - - } - unset($view_ary); - } - - $settings_hidden = ''; - // Output original settings ... needed when we jump views - foreach ($auth_settings as $auth_submode => $auth_submode_settings) - { - if ($auth_submode != $which_mode) - { - foreach ($auth_submode_settings as $submode_option => $submode_setting) - { - $settings_hidden .= ($submode_setting != '*') ? '' : ''; - } - } - } - unset($auth_submode); - unset($auth_submode_settings); - unset($auth_submode_option); - unset($auth_submode_setting); - -?> - - - -

lang['ACL_EXPLAIN']; ?>

- -

- -' . $user->lang[$l_selected_forums] . ': ' . $forum_list . '

'; - - unset($forum_list); - unset($l_selected_forums); - } - - // Now output the list of users or groups ... these will always exist - $l_selected_users = ($ug_type == 'user') ? ((sizeof($ug_data) == 1) ? 'SELECTED_USER' : 'SELECTED_USERS') : ((sizeof($ug_data) == 1) ? 'SELECTED_GROUP' : 'SELECTED_GROUPS'); - - echo '

' . $user->lang[$l_selected_users] . ': ' . $l_ug_list . '

'; - - unset($l_selected_users); - unset($ug_data); - -?> - -

- - - -

lang['WARNING']; ?>

- -

lang['WARNING_EXPLAIN']; ?>

- - - -
"> - - - - - - - - - - - - -
- - - - - - - -
lang['SELECT_FORUM']; ?>
lang['WILL_SET_OPTIONS']; ?>:

lang['PRESETS']; ?>:
- - - - - - - - - -lang['acl_' . $auth_options[$i]['auth_option']])) ? $user->lang['acl_' . $auth_options[$i]['auth_option']] : ucfirst(preg_replace('#.*?_#', '', $auth_options[$i]['auth_option'])); - $s_auth_option = '[' . $which_mode . '][' . $auth_options[$i]['auth_option'] . ']'; - - - // Which option should we select? - $selected_yes = (isset($auth_settings[$which_mode][$auth_options[$i]['auth_option']]) && $auth_settings[$which_mode][$auth_options[$i]['auth_option']] == ACL_YES) ? ' checked="checked"' : ''; - $selected_no = (isset($auth_settings[$which_mode][$auth_options[$i]['auth_option']]) && $auth_settings[$which_mode][$auth_options[$i]['auth_option']] == ACL_NO) ? ' checked="checked"' : ''; - $selected_unset = (!isset($auth_settings[$which_mode][$auth_options[$i]['auth_option']]) || $auth_settings[$which_mode][$auth_options[$i]['auth_option']] == ACL_UNSET) ? ' checked="checked"' : ''; - -?> - - - - - - - - - - - - - - - - -acl_gets('a_events', 'a_cron') && $mode != 'deps' && $submit != 'update') - { - $row_class = ($row_class == 'row1') ? 'row2' : 'row1'; - -?> - - - - - -
 lang['OPTION']; ?>  lang['YES']; ?>  lang['UNSET']; ?>  lang['NO']; ?>  lang['IGNORE']; ?> 
  /> /> /> />
lang['ACL_SUBFORUMS']; ?>
- - - - - - - - - - - -
lang['ACL_SUBFORUMS_EXPLAIN']; ?>
lang['MARK_ALL']; ?> :: lang['UNMARK_ALL']; ?>
  
- -
- - - - - - - - - - - -
lang['PRESETS']; ?>
- - - - - - - - - - - -
lang['PRESETS_EXPLAIN']; ?>
lang['SELECT_PRESET']; ?>:
lang['PRESET_NAME']; ?>:
 
- -acl_get_list(false, array('a_', 'm_'), false) as $forum_id => $forum_ary) - { - foreach ($forum_ary as $auth_option => $user_ary) - { - $perms += $user_ary; - } - } - - if (sizeof($perms)) - { - $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' - WHERE zebra_id IN (' . implode(', ', $perms) . ')'; - $db->sql_query($sql); - } - unset($perms); -} -// -// FUNCTIONS -// --------- - -?> \ No newline at end of file diff --git a/phpBB/adm/admin_search.php b/phpBB/adm/admin_search.php deleted file mode 100644 index 9826c51d33..0000000000 --- a/phpBB/adm/admin_search.php +++ /dev/null @@ -1,175 +0,0 @@ -acl_get('a_search')) - { - return; - } - - $module['DB']['SEARCH_INDEX'] = basename(__FILE__) . $SID; - - return; -} - -define('IN_PHPBB', 1); -// Include files -$phpbb_root_path = '../'; -$phpEx = substr(strrchr(__FILE__, '.'), 1); -require('pagestart.' . $phpEx); -include($phpbb_root_path . 'includes/message_parser.'.$phpEx); - -// Check permissions -if (!$auth->acl_get('a_search')) -{ - trigger_error($user->lang['NO_ADMIN']); -} - -// Start indexing -if (isset($_POST['start']) || isset($_GET['batchstart'])) -{ - $batchsize = 5000; // Process this many posts per batch - $batchcount = request_var('batchcount', 1); - $batchstart = request_var('batchstart', 0); - $loopcount = 0; - - $fulltext = new fulltext_search(); - - // Search re-indexing is tough on the server ... so we'll check the load - // each loop and if we're on a 1min load of 3 or more we'll re-load the page - // and try again. No idea how well this will work in practice so we'll see ... - if (file_exists('/proc/loadavg')) - { - if ($load = @file('/proc/loadavg')) - { - list($load) = explode(' ', $load[0]); - - if ($load > 3) - { - redirect("adm/admin_search.$phpEx$SID&batchstart=$batchstart&batchcount=$batchcount", 3); - } - } - } - - if (!$batchstart) - { - // Take board offline - set_config('board_disable', 1); - - // Empty existing tables - $db->sql_query("TRUNCATE " . SEARCH_TABLE); - $db->sql_query("TRUNCATE " . SEARCH_WORD_TABLE); - $db->sql_query("TRUNCATE " . SEARCH_MATCH_TABLE); - } - - // Fetch a batch of posts_text entries - $sql = "SELECT COUNT(*) AS total, MAX(post_id) AS max_post_id, MIN(post_id) AS min_post_id - FROM " . POSTS_TABLE; - $result = $db->sql_query($sql); - - $row = $db->sql_fetchrow($result); - $totalposts = $row['total']; - $max_post_id = $row['max_post_id']; - - $batchstart = (!$batchstart) ? $row['min_post_id'] : $batchstart; - $batchend = $batchstart + $batchsize; - - $db->sql_freeresult($result); - - $sql = "SELECT * - FROM " . POSTS_TABLE . " - WHERE post_id - BETWEEN $batchstart - AND $batchend"; - $result = $db->sql_query($sql); - - if ($row = $db->sql_fetchrow($result)) - { - do - { - $fulltext->add('admin', $row['post_id'], $row['post_text'], $row['post_subject']); - } - while ($row = $db->sql_fetchrow($result)); - } - - $db->sql_freeresult($result); - - $batchcount++; - - if (($batchstart + $batchsize) < $max_post_id) - { - redirect("adm/admin_search.$phpEx$SID&batchstart=" . ($batchstart + $batchsize) . "&batchcount=$batchcount", 3); - } - else - { - set_config('board_disable', 0); - - // search tidy - $fulltext->search_tidy(); - - adm_page_header($user->lang['SEARCH_INDEX']); - -?> - -

lang['SEARCH_INDEX']; ?>

- -

lang['SEARCH_INDEX_COMPLETE']; ?>

- -lang['SEARCH_INDEX']); - -?> - -

lang['SEARCH_INDEX']; ?>

- -

lang['SEARCH_INDEX_CANCEL']; ?>

- -lang['SEARCH_INDEX']); - -?> - -

lang['SEARCH_INDEX']; ?>

- -

lang['SEARCH_INDEX_EXPLAIN']; ?>

- -
"> - - - -
     
- - \ No newline at end of file diff --git a/phpBB/adm/admin_styles.php b/phpBB/adm/admin_styles.php deleted file mode 100644 index 71a5058bbe..0000000000 --- a/phpBB/adm/admin_styles.php +++ /dev/null @@ -1,3377 +0,0 @@ - store in DB -> some kind of failure - -if (!empty($setmodules)) -{ - if (!$auth->acl_get('a_styles')) - { - return; - } - - $filename = basename(__FILE__); - $module['STYLE']['MANAGE_STYLE'] = "$filename$SID&mode=style"; - $module['STYLE']['MANAGE_TEMPLATE'] = "$filename$SID&mode=template"; - $module['STYLE']['MANAGE_THEME'] = "$filename$SID&mode=theme"; - $module['STYLE']['MANAGE_IMAGESET'] = "$filename$SID&mode=imageset"; - - return; -} - -define('IN_PHPBB', 1); -// Include files -$phpbb_root_path = '../'; -$phpEx = substr(strrchr(__FILE__, '.'), 1); -require('pagestart.' . $phpEx); - -// Do we have styles admin permissions? -if (!$auth->acl_get('a_styles')) -{ - trigger_error($user->lang['NO_ADMIN']); -} - - -// Get some vars -$update = (isset($_POST['update'])) ? true : false; -$mode = (isset($_REQUEST['mode'])) ? htmlspecialchars($_REQUEST['mode']) : ''; -$id = (isset($_REQUEST['id'])) ? intval($_REQUEST['id']) : ''; - -if (isset($_REQUEST['action'])) -{ - $action = htmlspecialchars($_REQUEST['action']); -} -else -{ - $action = ''; - if (isset($_POST['add'])) - { - $action = 'add'; - } - else if (isset($_POST['preview'])) - { - $action = 'preview'; - } -} - -// Set some basic vars -$error = $cfg = array(); - -$safe_mode = (@ini_get('safe_mode') || @strtolower(ini_get('safe_mode')) == 'on') ? true : false; -$file_uploads = (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false; - -// Generate list of archive types inc. regexp | match -$archive_types = '.tar'; -$archive_preg = '\.tar'; -foreach (array('tar.gz' => 'zlib', 'tar.bz2' => 'bz2', 'zip' => 'zlib') as $type => $module) -{ - if (!@extension_loaded($module)) - { - continue; - } - $archive_types .= ", .$type"; - $archive_preg .= '|\.' . preg_quote($type); -} - -// -------------------- -// Start program proper -// -------------------- - -// Mode indepedent actions -switch ($action) -{ - case 'export': - if ($id) - { - export($mode, $id); - } - break; - - case 'add': - case 'install': - case 'details': - install($mode, $action, $id); - break; - - case 'delete': - if ($id) - { - remove($mode, $id); - } - break; -} - -// Mode based actions -switch ($mode) -{ - // STYLES - case 'style': - switch ($action) - { - case 'activate': - case 'deactivate': - if ($id == $config['default_style']) - { - trigger_error($user->lang['DEACTIVATE_DEFAULT']); - } - - $sql = 'UPDATE ' . STYLES_TABLE . ' - SET style_active = ' . (($action == 'activate') ? 1 : 0) . ' - WHERE style_id = ' . $id; - $db->sql_query($sql); - - // Set style to default for any member using deactivated style - $sql = 'UPDATE ' . USERS_TABLE . ' - SET user_style = ' . $config['default_style'] . " - WHERE user_style = $id"; - $db->sql_query($sql); - break; - } - - frontend('style', array('delete', 'export')); - break; - - - // TEMPLATES - case 'template': - $tpllist = array( - 'misc' => array( - 'confirm_body.html', 'faq_body.html', 'index_body.html', 'message_body.html', 'viewonline_body.html', - ), - 'includes' => array( - 'overall_footer.html', 'overall_header.html', 'simple_footer.html', 'simple_header.html', 'searchbox.html', 'jumpbox.html', - ), - 'forum' => array( - 'viewforum_body.html', 'viewforum_subforum.html', - ), - 'topic' => array( - 'attachment.html', 'viewtopic_body.html', 'viewtopic_print.html', - ), - 'group' => array( - 'gcp_body.html', 'gcp_pending_info.html', 'gcp_user_body.html', - ), - 'user' => array( - 'ucp_agreement.html', 'ucp_footer.html', 'ucp_header.html', 'ucp_main.html', 'ucp_pm_body.html', 'ucp_pm_popup.html', 'ucp_pm_preview.html', 'ucp_pm_read.html', 'ucp_prefs.html', 'ucp_profile.html', 'ucp_register.html', 'ucp_remind.html', - ), - 'profile' => array( - 'memberlist_body.html', 'memberlist_email.html', 'memberlist_im.html', 'memberlist_view.html', - ), - 'mod' => array( - 'mcp_forum.html', 'mcp_foruminfo.html', 'mcp_front.html', 'mcp_header.html', 'mcp_jumpbox.html', 'mcp_move.html', 'mcp_post.html', 'mcp_queue.html', 'mcp_reports.html', 'mcp_topic.html', 'mcp_viewlogs.html', 'report_body.html', - ), - 'search' => array( - 'search_body.html', 'search_results_posts.html', 'search_results_topics.html', - ), - 'posting' => array( - 'posting_attach_body.html', 'posting_body.html', 'posting_poll_body.html', 'posting_preview.html', 'posting_smilies.html', 'posting_topic_review.html', - ), - 'login' => array( - 'login_body.html', 'login_forum.html', - ), - 'custom' => array(), - ); - - // Lights, Camera ... - switch ($action) - { - case 'edit': - $tplcols = (isset($_POST['tplcols'])) ? max(20, intval($_POST['tplcols'])) : 80; - $tplrows = (isset($_POST['tplrows'])) ? max(5, intval($_POST['tplrows'])) : 20; - $tplname = (isset($_POST['tplname'])) ? htmlspecialchars($_POST['tplname']) : ''; - $tpldata = (!empty($_POST['tpldata'])) ? stripslashes($_POST['tpldata']) : ''; // NB : STRIPSLASHED! - - if ($id) - { - $sql = 'SELECT * - FROM ' . STYLES_TPL_TABLE . " - WHERE template_id = $id"; - $result = $db->sql_query($sql); - - if (!(extract($db->sql_fetchrow($result)))) - { - trigger_error($user->lang['NO_TEMPLATE']); - } - $db->sql_freeresult($result); - - // User wants to submit data ... - if ($update) - { - // Where is the template stored? - if (!$template_storedb && is_writeable("{$phpbb_root_path}styles/$template_path/template/$tplname")) - { - if (!($fp = fopen("{$phpbb_root_path}styles/$template_path/template/$tplname", 'wb'))) - { - trigger_error($user->lang['NO_TEMPLATE']); - } - $stylesheet = fwrite($fp, $tpldata); - fclose($fp); - } - else - { - $db->sql_transaction('begin'); - - if (!$template_storedb) - { - // We change the path to one relative to the root rather than the theme folder - $sql = 'UPDATE ' . STYLES_TPL_TABLE . ' - SET template_storedb = 1 - WHERE template_id = ' . $id; - $db->sql_query($sql); - - $filelist = filelist("{$phpbb_root_path}styles/$template_path/template"); - $filelist = array('/template' => $filelist['']); - store_templates('insert', $id, $template_path, $filelist); - } - - $sql = 'UPDATE ' . STYLES_TPLDATA_TABLE . " - SET template_data = '" . $db->sql_escape($tpldata) . "', template_mtime = " . time() . " - WHERE template_id = $id - AND template_filename = '" . $db->sql_escape($tplname) . "'"; - $db->sql_query($sql); - - $db->sql_transaction('commit'); - } - - @unlink("{$phpbb_root_path}cache/tpl_{$template_name}_$tplname.$phpEx"); - - $error[] = $user->lang['TEMPLATE_UPDATED']; - add_log('admin', 'LOG_EDIT_TEMPLATE', $template_name, $tplname); - } - - $test_ary = array(); - foreach ($tpllist as $category => $tpl_ary) - { - $test_ary = array_merge($test_ary, $tpl_ary); - } - - if (!$template_storedb) - { - $dp = @opendir("{$phpbb_root_path}styles/$template_path/template"); - while ($file = readdir($dp)) - { - if (!strstr($file, 'bbcode.') && strstr($file, '.html') && !in_array($file, $test_ary) && is_file("{$phpbb_root_path}styles/$template_path/template/$file")) - { - $tpllist['custom'][] = $file; - } - } - closedir($dp); - unset($matches); - unset($test_ary); - - if ($tplname) - { - if (!($fp = fopen("{$phpbb_root_path}styles/$template_path/template/$tplname", 'r'))) - { - trigger_error($user->lang['NO_TEMPLATE']); - } - $tpldata = fread($fp, filesize("{$phpbb_root_path}styles/$template_path/template/$tplname")); - fclose($fp); - } - - } - else - { - $sql = 'SELECT * - FROM ' . STYLES_TPLDATA_TABLE . " - WHERE template_id = $id"; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - if (!strstr($row['template_filename'], 'bbcode.') && !in_array($row['template_filename'], $test_ary)) - { - $tpllist['custom'][] = $row['template_filename']; - } - - if ($row['template_filename'] == $tplname) - { - $tpldata = $row['template_data']; - } - } - $db->sql_freeresult($result); - } - - // List of included templates - if ($tplname) - { - preg_match_all('##', $tpldata, $included_tpls); - $included_tpls = $included_tpls[1]; - } - } - unset($test_ary); - - // Generate list of template options - $tpl_options = ''; - ksort($tpllist); - foreach ($tpllist as $category => $tpl_ary) - { - sort($tpl_ary); - $tpl_options .= ''; - - foreach ($tpl_ary as $tpl_file) - { - $selected = ($tpl_file == $tplname) ? ' selected="selected"' : ''; - $tpl_options .= ''; - } - } - - // Output page - adm_page_header($user->lang['EDIT_TEMPLATE']); - -?> - -

lang['EDIT_TEMPLATE']; ?>

- -

lang['EDIT_TEMPLATE_EXPLAIN']; ?>

- -

lang['SELECTED_TEMPLATE'] . ": $template_name"; ?>

- -
"> - - - - - - -
lang['SELECT_TEMPLATE']; ?>:  
- - - - - - - - - - - - - - - - - -
lang['TEXT_COLUMNS']; ?>:  lang['TEXT_ROWS']; ?>:  
', $error); ?>
lang['RAW_HTML']; ?>
  
- -sql_query($sql); - - if (!(extract($db->sql_fetchrow($result)))) - { - trigger_error($user->lang['NO_TEMPLATE']); - } - $db->sql_freeresult($result); - - $cache_prefix = "tpl_$template_path"; - - // User wants to delete one or more files ... - if ($_POST['update'] && $file_ary) - { - foreach ($file_ary as $file) - { - $file = "{$phpbb_root_path}cache/{$cache_prefix}_$file.html.$phpEx"; - if (file_exists($file) && is_file($file)) - { - @unlink($file); - } - } - unset($file_ary); - - add_log('admin', 'LOG_CLEAR_TPLCACHE', $template_name); - trigger_error($user->lang['TEMPLATE_CACHE_CLEARED']); - } - - // Someone wants to see the cached source ... so we'll highlight it, - // add line numbers and indent it appropriately. This could be nasty - // on larger source files ... - if ($source && file_exists("{$phpbb_root_path}cache/{$cache_prefix}_$source.html.$phpEx")) - { - - adm_page_header($user->lang['TEMPLATE_CACHE']); - -?> - -

- -', '', '','[', ']', '.'); - $str_to = array('<?php '; - $str_to[] = ''; - $str_from[] = '<?php '; - $str_to[] = ''; - $str_from[] = '?>'; - $str_to[] = ''; - } - - $code = str_replace($str_from, $str_to, $code); - $code = preg_replace('#^()\n?(.*?)\n?()$#is', '\1\2\3', $code); - $code = explode("$marker", $code); - -?> - - - $line) - { - -?> - - - - - -
   $j) - { - $indent = substr($indent, 0, -6); - $j++; - } - unset($code[$key]); - -?>
- -
- -sql_query($sql); - - $filemtime = array(); - while ($row = $db->sql_fetchrow($result)) - { - $filemtime[$row['template_filename']] = $row['template_mtime']; - } - $db->sql_freeresult($result); - } - - // Open the cache directory and grab a list of the relevant cached templates. - // We also grab some other details such as when the compiled template was - // created, when the original template was modified and the cached filesize - if (!($dp = @opendir("{$phpbb_root_path}cache"))) - { - trigger_error($user->lang['ERR_TPLCACHE_READ']); - } - - $tplcache_ary = array(); - while ($file = readdir($dp)) - { - if (is_file($phpbb_root_path . 'cache/' . $file) && strstr($file, $cache_prefix)) - { - $filename = preg_replace('#^' . $cache_prefix . '_(.*?)\.html\.' . $phpEx . '$#i', '\1', $file); - $tplcache_ary[$filename]['cache'] = filemtime("{$phpbb_root_path}cache/$file"); - $tplcache_ary[$filename]['size'] = filesize("{$phpbb_root_path}cache/$file"); - $tplcache_ary[$filename]['src'] = (!$template_storedb) ? filemtime("{$phpbb_root_path}styles/$template_path/template/$filename.html") : $filemtime[$filename . '.html'] ; - } - } - closedir($dp); - - // Output the page - adm_page_header($user->lang['TEMPLATE_CACHE']); - -?> - - - -

lang['TEMPLATE_CACHE']; ?>

- -

lang['TEMPLATE_CACHE_EXPLAIN']; ?>

- -
"> - - - - - - - - $times_ary) - { - $row_class = ($row_class != 'row1') ? 'row1' : 'row2'; - -?> - - - - - - - - - - - - - - - -
lang['CACHE_FILENAME']; ?>lang['CACHE_FILESIZE']; ?>lang['CACHE_CACHED']; ?>lang['CACHE_MODIFIED']; ?>lang['MARK']; ?>
" onclick="viewsource('');return false">format_date($times_ary['cache']); ?>format_date($times_ary['src']); ?>
lang['NO_CACHED_TPL_FILES']; ?>
- - - - - -
lang['MARK_ALL']; ?> :: lang['UNMARK_ALL']; ?>
-sql_query($sql); - - if (!extract($db->sql_fetchrow($result))) - { - trigger_error($user->lang['NO_TEMPLATE']); - } - $db->sql_freeresult($result); - - if ($template_storedb && file_exists("{$phpbb_root_path}styles/$template_path/template/")) - { - $filelist = array('/' => array()); - - $sql = 'SELECT template_filename, template_mtime - FROM ' . STYLES_TPLDATA_TABLE . " - WHERE template_id = $id"; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - if (@filemtime("{$phpbb_root_path}styles/$template_path/template/" . $row['template_filename']) > $row['template_mtime']) - { - $filelist['/'][] = $row['template_filename']; - } - } - $db->sql_freeresult($result); - - store_templates('update', $id, $template_path, $filelist); - unset($filelist); - } - } - break; - } - - // Front page - frontend('template', array('cache', 'details', 'refresh', 'export', 'delete')); - break; - - - // THEMES - case 'theme': - switch ($action) - { - case 'edit': - // General parameters - $class = (isset($_POST['classname'])) ? htmlspecialchars($_POST['classname']) : ''; - $customclass = (!empty($_POST['customclass'])) ? htmlspecialchars($_POST['customclass']) : ''; - - $txtcols = (isset($_POST['txtcols'])) ? max(20, intval($_POST['txtcols'])) : 76; - $txtrows = (isset($_POST['txtrows'])) ? max(5, intval($_POST['txtrows'])) : 10; - $showcss = (!empty($_POST['showcss'])) ? true : ((!empty($_POST['hidecss'])) ? false : ((!empty($_GET['showcss'])) ? true : false)); - - // List of default classes, categorised - $base_classes = array( - 'text' => array( - 'body', 'p', 'h1', 'h2', 'h3', '.tabletitle', '.cattitle', '.topictitle', '.topicauthor', '.topicdetails', '.postdetails', '.postbody', '.posthilit', '.postauthor', '.mainmenu', '.nav', '.genmed', '.gensmall', '.copyright', - ), - 'tables' => array( - 'table', 'th', '.cat', '.catdiv', 'td', '.row1', '.row2', '.row3', '.spacer', 'hr', - ), - 'forms' => array( - 'form', 'input', 'select', 'textarea', '.post', '.btnlite', '.btnmain', '.btnbbcode', - ), - 'bbcode' => array( - '.b', '.u', '.i', '.color', '.size', '.code', '.quote', '.flash', '.syntaxbg', '.syntaxcomment', '.syntaxdefault', '.syntaxhtml', '.syntaxkeyword', '.syntaxstring', - ), - 'custom' => array(), - ); - - // We categorise the elements which comprise the css class so that we set - // any appropriate additional data, e.g. sizes require the scale type to be set, - // images require the relevant image be pulled and selected in the dropdown, etc. - $match_elements = array( - 'colors' => array('background-color', 'color',), - 'sizes' => array('font-size', 'line-height',), - 'images' => array('background-image',), - 'repeat' => array('background-repeat',), - 'other' => array('font-weight', 'font-family', 'font-style', 'text-decoration',), - ); - - // Used in an sprintf statement to generate appropriate output for rawcss mode - $map_elements = array( - 'colors' => '%s', - 'sizes' => '%d%s', - 'images' => 'url(\'./%s\')', - 'repeat' => '%s', - 'other' => '%s', - ); - - $s_hidden_fields = ''; - - // Do we want to edit an existing theme? - if ($id) - { - $sql = 'SELECT * - FROM ' . STYLES_CSS_TABLE . " - WHERE theme_id = $id"; - $result = $db->sql_query($sql); - - if (!(extract($db->sql_fetchrow($result)))) - { - trigger_error($user->lang['NO_THEME']); - } - $db->sql_freeresult($result); - - - // Where is the CSS stored? - if (!$theme_storedb) - { - if (!($fp = fopen("{$phpbb_root_path}styles/$theme_path/theme/stylesheet.css", 'rb'))) - { - trigger_error($user->lang['NO_THEME']); - } - $stylesheet = fread($fp, filesize("{$phpbb_root_path}styles/$theme_path/theme/stylesheet.css")); - fclose($fp); - } - else - { - $stylesheet = &$theme_data; - } - - // Pull out list of "custom" tags - $class_used = $test_ary = array(); - if (preg_match_all('/^([a-z0-9\.:#>]+?)[ \t]*?\{.*?\}/msi', $stylesheet, $matches)) - { - foreach ($base_classes as $category => $class_ary) - { - $test_ary = array_merge($test_ary, $class_ary); - } - - foreach ($matches[1] as $value) - { - if (!in_array($value, $test_ary)) - { - $base_classes['custom'][] = $value; - } - else - { - $class_used[] = $value; - } - } - unset($matches); - unset($test_ary); - } - } - - // Do we have a class set? If so, we need to extract and set the relevant data - if (!empty($class)) - { - // We must generate the relevant data ... what we need depends on whether - // we are looking @ the rawcss or the simplified settings and whether we - // have just selected a class. We must also cope with switching between - // simple and rawcss mode - $css_element = array(); - if (!empty($_POST['rawcss']) && (!empty($_POST['hidecss']) || !empty($_POST['preview']) || $update)) - { - $css_element = trim(stripslashes(htmlspecialchars(preg_replace("#;[\r\n]*#s", "\n", $_POST['rawcss'])))); - $css_element = explode("\n", $css_element); - } - else if (($showcss && !empty($_POST['showcss'])) || !empty($_POST['preview']) || $update) - { - if (!empty($_POST['cssother'])) - { - $css_element = explode(';', stripslashes(htmlspecialchars(trim($_POST['cssother'])))); - } - - foreach ($match_elements as $type => $match_ary) - { - foreach ($match_ary as $match) - { - $var = str_replace('-', '_', $match); - if (!empty($_POST[$var])) - { - $css_element[] = str_replace('_', '-', $var) . ': ' . (($type == 'sizes') ? sprintf($map_elements[$type], stripslashes($_POST[$var]), $_POST[$var . '_units']) : sprintf($map_elements[$type], stripslashes($_POST[$var]))); - } - } - } - } - else if (preg_match('#^' . $class . '[ \t]*?\{(.*?)\}#ms', $stylesheet, $matches)) - { - $css_element = explode(';', substr(trim($matches[1]), 0, -1)); - } - - $css_element = preg_replace('#^\s*(.*?)\s*$#', '\1', $css_element); - - // User wants to submit data ... - if ($update || $customclass) - { - if ($update) - { - $updated_element = trim(implode('; ', $css_element)) . ';'; - if (preg_match('#^' . $class . '[ \t]*?\{(.*?)\}#ms', $stylesheet)) - { - $stylesheet = preg_replace('#^(' . $class . '[ \t]*?\{).*?(\})#m', '\1 ' . $updated_element . ' \2', $stylesheet); - } - $error[] = $user->lang['THEME_UPDATED']; - } - else - { - // Check custom class name is valid - if (!preg_match('/^[a-z0-9#:\.]+$/i', $customclass)) - { - $error[] = $user->lang['THEME_ERR_CLASS_CHARS']; - } - else - { - $stylesheet .= "\n$customclass { }"; - $base_classes['custom'][] = $customclass; - $error[] = $user->lang['THEME_CLASS_ADDED']; - } - } - - // Where is the CSS stored? - if (!$storedb && is_writeable("{$phpbb_root_path}styles/$theme_path/theme/stylesheet.css")) - { - // Grab template data - if (!($fp = fopen("{$phpbb_root_path}styles/$theme_path/theme/stylesheet.css", 'wb'))) - { - trigger_error($user->lang['NO_THEME']); - } - $stylesheet = fwrite($fp, $stylesheet); - fclose($fp); - } - else - { - // We change the path to one relative to the root rather than the theme folder - $sql_ary = array( - 'theme_storedb' => 1, - 'theme_data' => str_replace('./', "styles/$theme_path/theme/", $stylesheet), - ); - $sql = 'UPDATE ' . STYLES_CSS_TABLE . ' - SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' - WHERE theme_id = ' . $id; - $db->sql_query($sql); - } - - $cache->destroy('sql', STYLES_CSS_TABLE); - add_log('admin', 'LOG_EDIT_THEME', $theme_name); - } - - // I guess really this needs some basic examples, pulled from subSilver - // to demonstrate the default classes. Other, custom classes can just use - // the div/span and some text? This is gonna get nasty :( - if (!empty($_POST['preview'])) - { - // Temp, just to get this out of the way - theme_preview($theme_path, $stylesheet, $class, $css_element); - exit; - } - - // Here we pull out the appropriate class entry then proceed to pull it apart, - // setting appropriate variables to their respective values. We only match - // certain css elements, the rest are "hidden" and can be accessed by exposing - // the raw css - if (!$showcss) - { - foreach ($match_elements as $type => $match_ary) - { - foreach ($match_ary as $match) - { - $var = str_replace('-', '_', $match); - $$var = ''; - - if (sizeof($css_element)) - { - foreach ($css_element as $key => $element) - { - if (preg_match('#^' . preg_quote($match, '#') . ':[ \t]*?(.*?)$#', $element, $matches)) - { - switch ($type) - { - case 'sizes': - if (preg_match('#(.*?)(px|%|em|pt)#', $matches[1], $matches)) - { - ${$var . '_units'} = trim($matches[2]); - } - $$var = trim($matches[1]); - break; - - case 'images': - if (preg_match('#url\(\'(.*?)\'\)#', $matches[1], $matches)) - { - $$var = trim($matches[1]); - $$var = str_replace('./', $theme_name . '/', $$var); - } - break; - - default: - $$var = trim($matches[1]); - } - - // Remove this element from array - unset($css_element[$key]); - break; - } - } - } - } - } - - // Any remaining elements must be custom data so we save that - // in a hidden field - if (sizeof($css_element)) - { - $s_hidden_fields .= ''; - } - } - } - // End of class element variable setting - - // Generate list of class options - $class_options = ''; - foreach ($base_classes as $category => $class_ary) - { - $class_options .= ''; - foreach ($class_ary as $class_name) - { - $used = (in_array($class_name, $class_used) || $category == 'custom') ? ' style="color:red"' : ''; - $selected = ($class_name == $class) ? ' selected="selected"' : ''; - $class_options .= '' . (($category == 'custom') ? $class_name : $user->lang['CSS_' . str_replace('.', '', strtoupper($class_name))]) . ''; - } - } - unset($class_used); - - // Grab list of potential images for class backgrounds - $imglist = filelist("{$phpbb_root_path}styles/$theme_path/theme"); - - $bg_imglist = ''; - foreach ($imglist as $path => $img_ary) - { - foreach ($img_ary as $img) - { - $img = ((substr($path, 0, 1) == '/') ? substr($path, 1) : $path) . $img; - - $selected = (preg_match('#' . preg_quote($img) . '$#', $background_image)) ? ' selected="selected"' : ''; - $bg_imglist .= ''; - } - } - $bg_imglist = '' . $bg_imglist; - unset($imglist); - - // Output the page - adm_page_header($user->lang['EDIT_THEME']); - -?> - - - -

lang['EDIT_THEME']; ?>

- -

lang['EDIT_THEME_EXPLAIN']; ?>

- -

lang['SELECTED_THEME'] . ": $theme_name"; ?>

- - -

lang['SHOW_RAW_CSS_NOTE']; ?>

- -

lang['SHOW_RAW_CSS_EXPLAIN']; ?>

- - -
" onsubmit="return csspreview()"> - - - - - - -
lang['SELECT_CLASS']; ?>:  
- - - - -'; - } - -?> - - - - - - - - - -'; - } - -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lang['RAW_CSS']; ?>
' . implode('
', $error) . '
lang['CSS_PARAMETER']; ?>lang['CSS_VALUE']; ?>
' . implode('
', $error) . '
lang['BACKGROUND']; ?>
lang['BACKGROUND_COLOUR']; ?>:
lang['COLOUR_EXPLAIN']; ?>
    [ lang['COLOUR_SWATCH']; ?> ]
lang['BACKGROUND_IMAGE']; ?>:
lang['BACKGROUND_REPEAT']; ?>:
lang['FOREGROUND']; ?>
lang['FONT_COLOUR']; ?>:
lang['COLOUR_EXPLAIN']; ?>
    [ lang['COLOUR_SWATCH']; ?> ]
lang['FONT_FACE']; ?>:
lang['FONT_FACE_EXPLAIN']; ?>
lang['FONT_SIZE']; ?>:
lang['BOLD']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>   /> lang['UNSET']; ?>
lang['ITALIC']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>   /> lang['UNSET']; ?>
lang['UNDERLINE']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>   /> lang['UNSET']; ?>
lang['LINE_SPACING']; ?>:
      lang['HIDE_RAW_CSS'] . '" />' : ''; - echo $s_hidden_fields; - -?>
- -

lang['CUSTOM_CLASS']; ?>

- -

lang['CUSTOM_CLASS_EXPLAIN']; ?>

- - - - - -
- - - - - - - - - -
lang['CUSTOM_CLASS']; ?> -
lang['CSS_CLASS_NAME']; ?>:
  
- -
- array( - 'btn_post', 'btn_reply', 'btn_locked', 'btn_quote', 'btn_edit', 'btn_delete', 'btn_report', 'btn_post_pm', 'btn_reply_pm', 'btn_profile', 'btn_pm', 'btn_ip', 'btn_search', 'btn_email', 'btn_www', 'btn_icq', 'btn_aim', 'btn_yim', 'btn_msnm', 'btn_jabber', 'btn_online', 'btn_offline', - ), - 'icons' => array( - 'icon_unapproved', 'icon_reported', 'icon_attach', 'icon_post', 'icon_post_new', 'icon_post_latest', 'icon_post_newest',), - 'forums' => array( - 'forum', 'forum_new', 'forum_locked', 'forum_link', 'sub_forum', 'sub_forum_new',), - 'folders' => array( - 'folder', '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',), - 'polls' => array( - 'poll_left', 'poll_center', 'poll_right',), - ); - - switch ($action) - { - case 'edit': - $imgname = (!empty($_POST['imgname'])) ? htmlspecialchars($_POST['imgname']) : ''; - $imgpath = (isset($_POST['imgpath'])) ? htmlspecialchars($_POST['imgpath']) : ''; - $imgsize = (!empty($_POST['imgsize'])) ? true : false; - $imgwidth = (isset($_POST['imgwidth'])) ? intval($_POST['imgwidth']) : ''; - - if ($id) - { - $sql_select = ($imgname) ? ", $imgname" : ''; - $sql = "SELECT imageset_path, imageset_name, imageset_copyright$sql_select - FROM " . STYLES_IMAGE_TABLE . " - WHERE imageset_id = $id"; - $result = $db->sql_query($sql); - - if (!extract($db->sql_fetchrow($result))) - { - trigger_error($user->lang['NO_IMAGESET']); - } - $db->sql_freeresult($result); - - // Check to see whether the selected image exists in the table - $valid_name = false; - foreach ($imglist as $category => $img_ary) - { - if (in_array($imgname, $img_ary)) - { - $valid_name = true; - break; - } - } - - if (!$valid_name) - { - $error[] = $user->lang['NO_IMAGE']; - } - - if ($update && $imgpath) - { - if (!sizeof($error)) - { - // If imgwidth and imgheight are non-zero grab the actual size - // from the image itself ... we ignore width settings for the poll center - // image - $imgwidth = $imgheight = ''; - if ($imgsize) - { - list($imgwidth, $imgheight) = getimagesize("{$phpbb_root_path}styles/$imageset_path/imageset/$imgpath"); - $imgwidth = ($imgname != 'poll_center') ? " width=\"$imgwidth\"" : ''; - $imgheight = " height=\"$imgheight\""; - } - - $imgpath = '"styles/' . $imageset_path . '/imageset/' . preg_replace('#^(.*?)/(.*?)$#', '{LANG}/\2', $imgpath) . '" border="0"' . $imgwidth . $imgheight; - - $sql = 'UPDATE ' . STYLES_IMAGE_TABLE . " - SET $imgname = '$imgpath' - WHERE imageset_id = $id"; - $db->sql_query($sql); - - $cache->destroy('sql', STYLES_IMAGE_TABLE); - - add_log('admin', 'LOG_EDIT_IMAGESET', $imageset_name); - $error[] = $user->lang['IMAGESET_UPDATED']; - - $$imgname = $imgpath; - } - } - - $test_ary = array(); - foreach ($imglist as $category => $img_ary) - { - foreach ($img_ary as $img) - { - if (!empty($$img)) - { - $test_ary[] = preg_replace('#^"styles/' . $imageset_path . '/imageset/(\{LANG\}/)?(.*?)".*$#', '\2', $$img); - } - } - } - unset($test_ary); - } - - // Generate list of image options - $img_options = ''; - foreach ($imglist as $category => $img_ary) - { - $img_options .= (sizeof($img_ary)) ? '' : ''; - foreach ($img_ary as $img) - { - $selected = ($img == $imgname) ? ' selected="selected"' : ''; - $img_options .= ''; - } - } - - // TODO - // Check whether localised buttons exist in admins language first - // Clean up this code - $imglang = ''; - $imagesetlist = array('nolang' => array(), 'lang' => array()); - $dp = opendir("{$phpbb_root_path}styles/$imageset_path/imageset"); - while ($file = readdir($dp)) - { - if (!is_file($file) && !is_link($file) && $file{0} != '.' && strtoupper($file) != 'CVS' && !sizeof($imagesetlist['lang'])) - { - $dp2 = opendir("{$phpbb_root_path}styles/$imageset_path/imageset/$file"); - while ($file2 = readdir($dp2)) - { - $imglang = $file; - if (preg_match('#\.(gif|jpg|png)$#', $file2)) - { - $imagesetlist['lang'][] = "$file/$file2"; - } - } - closedir($dp2); - } - else if (preg_match('#\.(gif|jpg|png)$#', $file)) - { - $imagesetlist['nolang'][] = $file; - } - } - closedir($dp); - - $imagesetlist_options = ''; - foreach ($imagesetlist as $type => $img_ary) - { - $imagesetlist_options .= ($type == 'lang') ? '' : ''; - foreach ($img_ary as $img) - { - $imgvalue = preg_replace('#^.*?/(.*?)$#', '\1', $img); - $selected = (strstr($$imgname, $imgvalue)) ? ' selected="selected"' : ''; - - $imagesetlist_options .= ''; - } - } - $imagesetlist_options = '' . $imagesetlist_options; - unset($imagesetlist); - - $imgsize_no = $imgsize_yes = ''; - if ($imgsize || preg_match('# height="[0-9]+?#', $$imgname)) - { - $imgsize_yes = ' checked="checked"'; - } - else - { - $imgsize_no = ' checked="checked"'; - } - - adm_page_header($user->lang['EDIT_IMAGESET']); - -?> - - - -

lang['EDIT_IMAGESET']; ?>

- -

lang['EDIT_IMAGESET_EXPLAIN']; ?>

- -

lang['SELECTED_IMAGESET'] . ": $imageset_name"; ?>

- -
"> - - - - - - -
lang['SELECT_IMAGE']; ?>:  
- - - - - - - - - - - - - - - - - - - - - - - - - - -
lang['EDIT_IMAGESET']; ?>
' . implode('
', $error) . '' : implode('
', $error); ?>
- - - - - - - - -
" />" name="newimg" />
lang['CURRENT_IMAGE']; ?>lang['SELECTED_IMAGE']; ?>
lang['IMAGE_PARAMETER']; ?>lang['IMAGE_VALUE']; ?>
lang['IMAGE']; ?>:
lang['DIMENSIONS']; ?>:
lang['DIMENSIONS_EXPLAIN']; ?>
/> lang['YES']; ?>   /> lang['NO']; ?>
  
- -lang[$l_prefix . 'S']); - -?> -

lang[$l_prefix . 'S']; ?>

- -

lang[$l_prefix . 'S_EXPLAIN']; ?>

- -
"> - - - - - - - - - - -sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $style_count[$row['user_style']] = $row['style_count']; - } - $db->sql_freeresult($result); - } - - $sql = "SELECT * - FROM $sql_from"; - $result = $db->sql_query($sql); - - $installed = array(); - $basis_options = ''; - while ($row = $db->sql_fetchrow($result)) - { - $installed[] = $row[$type . '_name']; - $basis_options .= ''; - - $row_class = ($row_class != 'row1') ? 'row1' : 'row2'; - - $tagstyle = ($type == 'style' && $row['style_id'] == $config['default_style']) ? '*' : ''; - -?> - - - - - - - - - - -sql_freeresult($result); - -?> - - - - $cfg) - { - $row_class = ($row_class != 'row1') ? 'row1' : 'row2'; - -?> - - - - - - - - - - - - -
lang[$l_prefix . '_NAME']; ?>lang['STYLE_USED_BY']; ?>lang['OPTIONS']; ?>
lang['INSTALLED_' . $l_prefix]; ?>
 ">lang['STYLE_' . strtoupper($stylevis)]; ?>  ">lang[strtoupper($option)]; ?>  lang['PREVIEW']; ?> 
lang['UNINSTALLED_' . $l_prefix]; ?>
">lang['INSTALL']; ?>
lang['NO_UNINSTALLED_' . $l_prefix]; ?>
lang['CREATE_' . $l_prefix]; ?>: lang['FROM']; ?>
- -sql_query($sql); - - if (!extract($db->sql_fetchrow($result))) - { - trigger_error($user->lang['NO_' . $l_prefix]); - } - - $path = ($type != 'style') ? ${$type . '_path'} : ''; - $storedb = (isset(${$type . '_storedb'})) ? ${$type . '_storedb'} : false; - - $sql = "SELECT {$type}_id, {$type}_name - FROM $sql_from - WHERE {$type}_id <> $id - ORDER BY {$type}_id"; - $result = $db->sql_query($sql); - - $options = ''; - if (!($row = $db->sql_fetchrow($result))) - { - trigger_error($user->lang['ONLY_' . $l_prefix]); - } - - do - { - $options .= ''; - } - while ($row = $db->sql_fetchrow($result)); - - if ($update) - { - $sql = "DELETE FROM $sql_from - WHERE {$type}_id = $id"; - $db->sql_query($sql); - - $onfs = 0; - if ($type == 'style') - { - $sql = 'UPDATE ' . USERS_TABLE . " - SET user_style = $new_id - WHERE user_style = $id"; - $db->sql_query($sql); - } - else - { - $sql = 'UPDATE ' . STYLES_TABLE . " - SET {$type}_id = $new_id - WHERE {$type}_id = $id"; - $db->sql_query($sql); - - if ($deletefs && is_writeable("{$phpbb_root_path}styles/$path/{$type}")) - { - $filelist = filelist("{$phpbb_root_path}styles/$path/{$type}", '', '*'); - krsort($filelist); - - foreach ($filelist as $subpath => $file_ary) - { - $subpath = "{$phpbb_root_path}styles/$path/{$type}$subpath"; - foreach ($file_ary as $file) - { -/* if (!@unlink("$subpath$file")) - { - $onfs = 1; - } -*/ } - -/* if (!@rmdir($subpath)) - { - $onfs = 1; - } -*/ } - } - else - { - $onfs = (file_exists("{$phpbb_root_path}styles/$path/{$type}")) ? 1 : 0; - } - } - - $cache->destroy('sql', STYLES_TABLE); - - add_log('admin', 'LOG_DELETE_' . $l_prefix, ${$type . '_name'}); - $message = ($onfs) ? $l_prefix . '_DELETED_FS' : $l_prefix . '_DELETED'; - trigger_error($user->lang[$message]); - } - - // Output list of themes - adm_page_header($user->lang['DELETE_' . $l_prefix]); - -?> -

lang['DELETE_' . $l_prefix]; ?>

- -

lang['DELETE_' . $l_prefix . '_EXPLAIN']; ?>

- -
"> - - - - - - - - - - - - - - - - - - - -
lang['DELETE_' . $l_prefix]; ?> -
lang[$l_prefix . '_NAME']; ?>:
lang['DELETE_FROM_FS']; ?>: lang['YES']; ?>   lang['NO']; ?>
lang['REPLACE_' . $l_prefix]; ?>:
lang['REPLACE_' . $l_prefix . '_EXPLAIN']; ?>
  
-lang['STYLE_ERR_MORE_ELEMENTS']; - } - - $style_id = &$id; - $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 = $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': - $template_id = &$id; - $name = 'template_name'; - - $sql_select = '*'; - $sql_from = STYLES_TPL_TABLE; - $sql_where = "template_id = $id"; - - $l_prefix = 'TEMPLATE'; - break; - - case 'theme': - $theme_id = &$id; - $name = 'theme_name'; - - $sql_select = '*'; - $sql_from = STYLES_CSS_TABLE; - $sql_where = "theme_id = $id"; - - $l_prefix = 'THEME'; - break; - - case 'imageset': - $imageset_id = &$id; - $name = 'imageset_name'; - - $sql_select = '*'; - $sql_from = STYLES_IMAGE_TABLE; - $sql_where = "imageset_id = $id"; - - $l_prefix = 'IMAGESET'; - break; - } - - // Lets do a merry dance ... either that or generate the archive - if ($update && !sizeof($error)) - { - $sql = "SELECT $sql_select - FROM $sql_from - WHERE $sql_where"; - $result = $db->sql_query($sql); - - if (!($style_row = ($db->sql_fetchrow($result)))) - { - trigger_error($user->lang['NO_' . $l_prefix]); - } - $db->sql_freeresult($result); - - $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) - { - $$var = (!empty($style_row[$var])) ? $style_row[$var] : ''; - unset($style_row[$var]); - } - - $files = $data = array(); - - if ($mode == 'style') - { - $style_cfg = addslashes($style_name) . "\n"; - $style_cfg .= addslashes($style_copyright) . "\n"; - $style_cfg .= addslashes($config['version']) . "\n"; - $style_cfg .= ((!$inc_template) ? addslashes($template_name) : '') . "\n"; - $style_cfg .= ((!$inc_theme) ? addslashes($theme_name) : '') . "\n"; - $style_cfg .= ((!$inc_imageset) ? addslashes($imageset_name) : ''); - - $data[] = array( - 'src' => $style_cfg, - 'prefix' => 'style.cfg' - ); - unset($style_cfg); - } - - // Export template core code - if ($mode == 'template' || $inc_template) - { - $template_cfg = addslashes($template_name) . "\n"; - $template_cfg .= addslashes($template_copyright) . "\n"; - $template_cfg .= addslashes($config['version']) . "\n"; - $template_cfg .= addslashes($bbcode_bitfield); - - $data[] = array( - 'src' => $template_cfg, - 'prefix' => 'template/template.cfg' - ); - - // This is potentially nasty memory-wise ... - if (!$template_storedb) - { - $files[] = array( - 'src' => "styles/$template_path/template/", - 'prefix-' => "styles/$template_path/", - 'prefix+' => false, - 'exclude' => 'template.cfg' - ); - } - else - { - $sql = 'SELECT template_filename, template_data - FROM ' . STYLES_TPLDATA_TABLE . " - WHERE template_id = $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 = addslashes($theme_name) . "\n"; - $theme_cfg .= addslashes($theme_copyright) . "\n"; - $theme_cfg .= addslashes($config['version']); - - $files[] = array( - 'src' => "styles/$theme_path/theme/", - 'prefix-' => "styles/$theme_path/", - 'prefix+' => false, - 'exclude' => ($theme_storedb) ? 'stylesheet.css,theme.cfg' : 'theme.cfg' - ); - - $data[] = array( - 'src' => $theme_cfg, - 'prefix' => 'theme/theme.cfg' - ); - - if ($theme_storedb) - { - $data[] = array( - 'src' => $theme_data, - 'prefix' => 'theme/stylesheet.css' - ); - } - unset($theme_data); - unset($theme_cfg); - } - - // Export imageset core code - if ($mode == 'imageset' || $inc_imageset) - { - $imageset_cfg = addslashes($imageset_name) . "\n"; - $imageset_cfg .= addslashes($imageset_copyright) . "\n"; - $imageset_cfg .= addslashes($config['version']) . "\n"; - - foreach (array_keys($style_row) as $key) - { - $imageset_cfg .= $key . '||' . str_replace("styles/$imageset_path/imageset/", '{PATH}', $style_row[$key]) . "\n"; - unset($style_row[$key]); - } - $imageset_cfg = rtrim($imageset_cfg); - - $files[] = array( - 'src' => "styles/$imageset_path/imageset/", - 'prefix-' => "styles/$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': - if (!extension_loaded('zlib')) - { - trigger_error($user->lang['NO_SUPPORT_ZIP']); - } - $ext = 'zip'; - $mimetype = 'zip'; - $compress = 'compress_zip'; - break; - - case 'tar.gz': - if (!extension_loaded('zlib')) - { - trigger_error($user->lang['NO_SUPPORT_GZ']); - } - $ext = 'tar.gz'; - $mimetype = 'x-gzip'; - $compress = 'compress_tar'; - break; - - case 'tar.bz2': - if (!extension_loaded('bz2')) - { - trigger_error($user->lang['NO_SUPPORT_BZ2']); - } - $ext = 'tar.bz2'; - $mimetype = 'x-bzip2'; - $compress = 'compress_tar'; - break; - - default: - $error[] = $user->lang[$l_prefix . '_ERR_ARCHIVE']; - } - - if (!sizeof($error)) - { - include($phpbb_root_path . 'includes/functions_compress.'.$phpEx); - - $path = str_replace(' ', '_', $$name); - - if (!($zip = new $compress('w', "{$phpbb_root_path}store/$path.$ext"))) - { - trigger_error($user->lang['STORE_UNWRITEABLE']); - } - - if ($files) - { - foreach ($files as $file_ary) - { - $zip->add_file($file_ary['src'], $file_ary['prefix-'], $file_ary['prefix+'], $file_ary['exclude']); - } - } - - if ($data) - { - foreach ($data as $data_ary) - { - $zip->add_data($data_ary['src'], $data_ary['prefix']); - } - } - - $zip->close(); - - add_log('admin', 'LOG_EXPORT_' . $l_prefix, $$name); - - if (!$store) - { - header('Pragma: no-cache'); - header("Content-Type: application/$mimetype; name=\"$path.$ext\""); - header("Content-disposition: attachment; filename=$path.$ext"); - - $fp = fopen("{$phpbb_root_path}store/$path.$ext", 'rb'); - while ($buffer = fread($fp, 1024)) - { - echo $buffer; - } - fclose($fp); - @unlink("{$phpbb_root_path}store/$path.$ext"); - exit; - } - - trigger_error(sprintf($user->lang[$l_prefix . '_EXPORTED'], "store/$path.$ext")); - } - } - else - { - $sql = "SELECT {$mode}_id, {$mode}_name - FROM " . (($mode == 'style') ? STYLES_TABLE : $sql_from) . " - WHERE {$mode}_id = $id"; - $result = $db->sql_query($sql); - - if (!extract($db->sql_fetchrow($result))) - { - trigger_error($user->lang['NO_' . $l_prefix]); - } - $db->sql_freeresult($result); - } - - // Output list - adm_page_header($user->lang[$l_prefix . '_EXPORT']); - -?> -

lang[$l_prefix . '_EXPORT']; ?>

- -

lang[$l_prefix . '_EXPORT_EXPLAIN']; ?>

- -
"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lang[$l_prefix . '_EXPORT']; ?> -
', $error); ?>
lang[$l_prefix . '_NAME']; ?>:
lang['INCLUDE_TEMPLATE']; ?>: lang['YES']; ?>    lang['NO']; ?>
lang['INCLUDE_THEME']; ?>: lang['YES']; ?>    lang['NO']; ?>
lang['INCLUDE_IMAGESET']; ?>: lang['YES']; ?>    lang['NO']; ?>
lang['DOWNLOAD_STORE']; ?>:
lang['DOWNLOAD_STORE_EXPLAIN']; ?>
lang['EXPORT_STORE']; ?>    lang['EXPORT_DOWNLOAD']; ?>
lang['ARCHIVE_FORMAT']; ?>: .tar   'zlib', 'tar.bz2' => 'bz2', 'zip' => 'zlib'); - - foreach ($compress_types as $type => $module) - { - if (!extension_loaded($module)) - { - continue; - } - echo ' .' . $type . '  '; - } - -?>
  
- $file_ary) - { - foreach ($file_ary as $file) - { - if (!($fp = fopen("{$phpbb_root_path}styles/$path$pathfile/$file", 'r'))) - { - trigger_error("Could not open {$phpbb_root_path}styles/$path/$pathfile/$file"); - } - $template_data = fread($fp, filesize("{$phpbb_root_path}styles/$path$pathfile/$file")); - fclose($fp); - - if (preg_match_all('##is', $template_data, $matches)) - { - foreach ($matches[1] as $match) - { - $includes[trim($match)][] = $file; - } - } - } - } - - foreach ($filelist as $pathfile => $file_ary) - { - foreach ($file_ary as $file) - { - // Skip index. - if (strpos($file, 'index.') === 0) - { - continue; - } - - // We could do this using extended inserts ... but that could be one - // heck of a lot of data ... - $sql_ary = array( - 'template_id' => $id, - 'template_filename' => $file, - 'template_included' => (!empty($includes[$file])) ? implode(':', $includes[$file]) . ':' : '', - 'template_mtime' => filemtime("{$phpbb_root_path}styles/$path$pathfile/$file"), - 'template_data' => implode('', file("{$phpbb_root_path}styles/$path$pathfile/$file")), - ); - - $sql = ($mode == 'insert') ? 'INSERT INTO ' . STYLES_TPLDATA_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary) : 'UPDATE ' . STYLES_TPLDATA_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary) . " WHERE template_id = $id AND template_filename = '" . $db->sql_escape($file) . "'"; - $db->sql_query($sql); - } - } -} - -// Does what it says in the function title ... give it a src location, array of files -// and destination -function copy_files($src, $filelist, $dst) -{ - global $phpbb_root_path; - - if (!(is_writable("{$phpbb_root_path}styles"))) - { - return false; - } - - umask(0); - if (!file_exists("{$phpbb_root_path}styles/$dst")) - { - @mkdir("{$phpbb_root_path}styles/$dst", 0777); - chmod("{$phpbb_root_path}styles/$dst", 0777); - } - - @ksort($filelist); - foreach ($filelist as $filepath => $file_ary) - { - $filepath = (substr($filepath, 0, 1) != '/') ? "/$filepath" : $filepath; - - if ($filepath && !file_exists("{$phpbb_root_path}styles/$dst$filepath")) - { - @mkdir("{$phpbb_root_path}styles/$dst$filepath", 0777); - chmod("{$phpbb_root_path}styles/$dst$filepath", 0777); - } - - foreach ($file_ary as $file) - { - if (!file_exists("{$phpbb_root_path}styles/$dst$filepath$file")) - { - @copy("$src$filepath$file", "{$phpbb_root_path}styles/$dst$filepath$file"); - @chmod("{$phpbb_root_path}styles/$dst$filepath$file", 0777); - } - } - } -} - -// You can guess what this does ... just give it a path -function cleanup_folder($path) -{ - $filelist = filelist($path, '', '*'); - - krsort($filelist); - foreach ($filelist as $filepath => $file_ary) - { - foreach ($file_ary as $file) - { - @unlink("$path$filepath$file"); - } - - if (file_exists("$path$filepath")) - { - @rmdir("$path$filepath"); - } - } - @rmdir("$path"); -} - -// Is this element installed? If not, grab its cfg details -function test_installed($element, &$error, $root_path, $reqd_name, &$id, &$name, &$copyright) -{ - global $db, $user; - - switch ($element) - { - 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_element = strtoupper($element); - - $chk_name = ($reqd_name) ? $reqd_name : $name; - - $sql = "SELECT {$element}_id, {$element}_name - FROM $sql_from - WHERE {$element}_name = '" . $db->sql_escape($chk_name) . "'"; - $result = $db->sql_query($sql); - - if ($row = $db->sql_fetchrow($result)) - { - $name = $row[$element . '_name']; - $id = $row[$element . '_id']; - } - else - { - if (!($cfg = @file("$root_path$element/$element.cfg"))) - { - $error[] = sprintf($user->lang['REQUIRES_' . $l_element], $reqd_name); - return false; - } - - $name = trim($cfg[0]); - $copyright = trim($cfg[1]); - $id = 0; - unset($cfg); - } - $db->sql_freeresult($result); -} - -// Install an element, doing various checks as we go -function install_element($type, &$error, $action, $root_path, &$id, $name, $copyright, $storedb = 0) -{ - global $phpbb_root_path, $db, $user; - - switch ($type) - { - 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_type = strtoupper($type); - $path = str_replace(' ', '_', $name); - - if (empty($name)) - { - $error[] = $user->lang[$l_type . '_ERR_STYLE_NAME']; - } - - if (strlen($name) > 30) - { - $error[] = $user->lang[$l_type . '_ERR_NAME_LONG']; - } - - if (!preg_match('#^[a-z0-9_\-\+\. ]+$#i', $name)) - { - $error[] = $user->lang[$l_type . '_ERR_NAME_CHARS']; - } - - if (strlen($copyright) > 60) - { - $error[] = $user->lang[$l_type . '_ERR_COPY_LONG']; - } - - $sql = "SELECT {$type}_name - FROM $sql_from - WHERE {$type}_name = '" . $db->sql_escape($name) . "'"; - $result = $db->sql_query($sql); - - if (extract($db->sql_fetchrow($result))) - { - $error[] = $user->lang[$l_type . '_ERR_NAME_EXIST']; - } - $db->sql_freeresult($result); - - if (sizeof($error)) - { - return false; - } - - if ($action != 'install') - { - @mkdir("{$phpbb_root_path}styles/$path", 0777); - @chmod("{$phpbb_root_path}styles/$path", 0777); - if ($root_path) - { - copy_files("$root_path$type", filelist("$root_path$type", '', '*'), "$path/$type"); - } - } - - $sql_ary = array( - $type . '_name' => $name, - $type . '_copyright'=> $copyright, - $type . '_path' => $path, - ); - if ($type != 'imageset') - { - switch ($type) - { - case 'template': - $sql_ary += array( - $type . '_storedb' => (!is_writeable("{$phpbb_root_path}styles/$path/$type")) ? 1 : 0 - ); - break; - - case 'theme': - $sql_ary += array( - 'theme_storedb' => (!is_writeable("{$phpbb_root_path}styles/$path/theme/stylesheet.css")) ? 1 : $storedb, - 'theme_data' => ($storedb) ? (($root_path) ? str_replace('./', "styles/$path/theme/", implode('', file("$root_path/$type/stylesheet.css"))) : '') : '', - 'theme_mtime' => ($storedb) ? filemtime("{$phpbb_root_path}styles/$path/theme/stylesheet.css") : 0 - ); - break; - } - } - else - { - $cfg = file("$root_path$type/imageset.cfg"); - - for ($i = 3; $i < sizeof($cfg); $i++) - { - $tmp = explode('||', $cfg[$i]); - $sql_ary[$tmp[0]] = str_replace('{PATH}', "styles/$path/imageset/", trim($tmp[1])); - } - unset($cfg); - } - - $db->sql_transaction('begin'); - - $sql = "INSERT INTO $sql_from - " . $db->sql_build_array('INSERT', $sql_ary); - $db->sql_query($sql); - - $id = $db->sql_nextid(); - - if ($type == 'template' && $storedb) - { - $filelist = filelist("{$root_path}template", '', 'html'); - store_templates('insert', $id, $path, $filelist); - } - - $db->sql_transaction('commit'); - - $log = ($storedb) ? 'LOG_ADD_' . $l_type . '_FS' : 'LOG_ADD_' . $l_type . '_DB'; - add_log('admin', $log, $name); -} - -function install_style($action, &$error, $name, $copyright, $active, $default, $root_path, &$template_id, &$template_name, &$template_copyright, &$theme_id, &$theme_name, &$theme_copyright, &$imageset_id, &$imageset_name, &$imageset_copyright) -{ - global $config, $db, $user; - - $element_ary = array('template', 'theme', 'imageset'); - - if (empty($name)) - { - $error[] = $user->lang['STYLE_ERR_STYLE_NAME']; - } - - if (strlen($name) > 30) - { - $error[] = $user->lang['STYLE_ERR_NAME_LONG']; - } - - if (!preg_match('#^[a-z0-9_\-\+\. ]+$#i', $name)) - { - $error[] = $user->lang['STYLE_ERR_NAME_CHARS']; - } - - if (strlen($copyright) > 60) - { - $error[] = $user->lang['STYLE_ERR_COPY_LONG']; - } - - $sql = 'SELECT style_name - FROM ' . STYLES_TABLE . " - WHERE style_name = '" . $db->sql_escape($name) . "'"; - $result = $db->sql_query($sql); - - if (extract($db->sql_fetchrow($result))) - { - $error[] = $user->lang['STYLE_ERR_NAME_EXIST']; - } - $db->sql_freeresult($result); - - foreach ($element_ary as $element) - { - // Zero id value ... need to install element ... run usual checks - // and do the install if necessary - if (!${$element . '_id'}) - { - $error = install_element($element, $error, $action, $root_path, ${$element . '_id'}, ${$element . '_name'}, ${$element . '_copyright'}); - } - } - - if (!$template_id || !$theme_id || !$imageset_id) - { - $error[] = $user->lang['STYLE_ERR_NO_IDS']; - } - - if (sizeof($error)) - { - return false; - } - - $db->sql_transaction('begin'); - - $sql_ary = array( - 'style_name' => $name, - 'style_copyright' => $copyright, - 'style_active' => $active, - 'template_id' => $template_id, - 'theme_id' => $theme_id, - 'imageset_id' => $imageset_id, - ); - - $sql = 'INSERT INTO ' . STYLES_TABLE . ' - ' . $db->sql_build_array('INSERT', $sql_ary); - $db->sql_query($sql); - - $id = $db->sql_nextid(); - - if ($default) - { - $sql = 'UPDATE ' . USERS_TABLE . " - SET user_style = $id - WHERE user_style = " . $config['default_style']; - $db->sql_query($sql); - - set_config('default_style', $id); - } - - $db->sql_transaction('commit'); - - add_log('admin', 'LOG_ADD_STYLE', $name); -} - -// Commented inline -function install($type, $action, $id) -{ - global $phpbb_root_path, $phpEx, $SID, $config, $db, $cache, $user; - global $safe_mode, $file_uploads, $archive_preg; - - $install_path = (isset($_REQUEST['path'])) ? htmlspecialchars($_REQUEST['path']) : ''; - $update = (isset($_POST['update'])) ? true : false; - - $installcfg = $error = array(); - $template_storedb = $theme_storedb = $basis = false; - $root_path = $tmp_path = $theme_data = $s_hidden_fields = ''; - $template_id = $template_name = $template_copyright =$theme_id = $theme_name = $theme_copyright = $imageset_id = $imageset_name = $imageset_copyright = ''; - - $l_type = strtoupper($type); - $l_prefix = ($action == 'add') ? 'ADD' : (($action == 'details') ? 'EDIT_DETAILS' : 'INSTALL'); - - $element_ary = array('template' => STYLES_TPL_TABLE, 'theme' => STYLES_CSS_TABLE, 'imageset' => STYLES_IMAGE_TABLE); - $phpbbversion = preg_replace('#^2\.([0-9]+?)\.([0-9]+?).*?$#', '\1.\2', $config['version']); - - switch ($type) - { - 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; - } - - // Importing/uploading then check data and extract archive - if (!empty($_FILES['upload_file']['name']) || !empty($_POST['import_file'])) - { - if (!empty($_FILES['upload_file']['name'])) - { - $realname = htmlspecialchars($_FILES['upload_file']['name']); - $filename = htmlspecialchars($_FILES['upload_file']['tmp_name']); - - if (!is_uploaded_file($filename)) - { - trigger_error("$filename was not uploaded"); - } - } - else - { - $realname = htmlspecialchars($_POST['import_file']); - $filename = "{$phpbb_root_path}store/$realname"; - } - - if (!preg_match('#(' . $archive_preg . ')$#i', $realname, $match)) - { - $error[] = sprintf($user->lang['UPLOAD_WRONG_TYPE'], $archive_types); - } - $path = preg_replace('#^(.*?)' . preg_quote($match[0]) . '$#', '\1', $realname); - - // Attempt to extract the files to a temporary directory in store - $tmp_path = $phpbb_root_path . 'store/tmp_' . substr(uniqid(''), 0, 10) . '/'; - if (!@mkdir($tmp_path)) - { - trigger_error("Cannot create $tmp_path", E_USER_ERROR); - } - - include($phpbb_root_path . 'includes/functions_compress.'.$phpEx); - - switch ($match[0]) - { - case '.zip': - $zip = new compress_zip('r', $filename); - break; - default: - $zip = new compress_tar('r', $filename, $match[0]); - } - $zip->extract($tmp_path); - $zip->close(); - - unset($cfg); - } - - // Installing, importing/uploading then obtain the style cfg information - if (($action == 'install' && $install_path) || (!empty($_FILES['upload_file']['name']) || !empty($_POST['import_file']))) - { - $root_path = ($action == 'install') ? "{$phpbb_root_path}styles/$install_path/" : "$tmp_path"; - $cfg_path = ($type == 'style') ? "$root_path$type.cfg" : "$root_path$type/$type.cfg"; - - if (!($fp = @fopen($cfg_path, 'rb'))) - { - $error[] = $user->lang[$l_type . '_ERR_NOT_' . $l_type]; - } - else - { - $installcfg = explode("\n", fread($fp, filesize($cfg_path))); - } - fclose($fp); - } - - // Installing, importing/uploading then grab the element info else grab the - // submitted params ... stylecfg will be set if this is true (see above) - if (sizeof($installcfg)) - { - $name = trim($installcfg[0]); - $copyright = trim($installcfg[1]); - $version = preg_replace('#^2\.([0-9]+?)\.([0-9]+?).*?$#', '\1.\2', trim($installcfg[2])); - - switch ($type) - { - case 'style': - $reqd_template = trim($installcfg[3]); - $reqd_theme = trim($installcfg[4]); - $reqd_imageset = trim($installcfg[5]); - - // Check to see if each element is already installed, if it is grab the id - foreach ($element_ary as $element => $table) - { - ${$element . '_id'} = ${$element . '_name'} = ${$element . '_copyright'} = ''; - - test_installed($element, $error, $root_path, ${'reqd_' . $element}, ${$element . '_id'}, ${$element . '_name'}, ${$element . '_copyright'}); - } - break; - - case 'template': - test_installed('template', $error, $root_path, false, $template_id, $template_name, $template_copyright); - break; - - case 'theme': - test_installed('theme', $error, $root_path, false, $theme_id, $theme_name, $theme_copyright); - break; - - case 'imageset': - test_installed('imageset', $error, $root_path, false, $imageset_id, $imageset_name, $imageset_copyright); - break; - } - - $s_hidden_fields = ''; - } - else - { - // NOTE: Data here is stripslashed! Ensure it's escaped when entering the DB - $name = (!empty($_POST['name'])) ? stripslashes(htmlspecialchars($_POST['name'])) : ''; - $copyright = (!empty($_POST['copyright'])) ? stripslashes(htmlspecialchars($_POST['copyright'])) : ''; - - $template_id = (!empty($_POST['template_id'])) ? intval($_POST['template_id']) : 0; - $theme_id = (!empty($_POST['theme_id'])) ? intval($_POST['theme_id']) : 0; - $imageset_id = (!empty($_POST['imageset_id'])) ? intval($_POST['imageset_id']) : 0; - $basis = (isset($_POST['basis'])) ? intval($_POST['basis']) : 0; - - // If we have a basis or we're editing we want some additional info ... else - // we need nothing - if ($basis || ($update && $action != 'add')) - { - switch ($type) - { - case 'style': - $sql_select = ($action != 'details') ? 'style_name, template_id, theme_id, imageset_id' : 'style_name'; - break; - case 'template': - $sql_select = 'template_id, template_name, template_path, template_storedb'; - break; - case 'theme': - $sql_select = 'theme_id, theme_name, theme_path, theme_data, theme_storedb'; - break; - case 'imageset': - $sql_select = 'imageset_id, imageset_name, imageset_path'; - break; - } - - $sql = "SELECT $sql_select - FROM $sql_from - WHERE {$type}_id = " . (($basis) ? $basis : $id); - $result = $db->sql_query($sql); - - if (!extract($db->sql_fetchrow($result))) - { - $error[] = $user->lang['NO_' . $l_type]; - } - $db->sql_freeresult($result); - - $s_hidden_fields .= ''; - } - } - - $storedb = (!empty($_POST['storedb'])) ? 1 : 0; - $style_active = (isset($_POST['style_active'])) ? ((!empty($_POST['style_active'])) ? 1 : 0) : 1; - $style_default = (isset($_POST['style_default'])) ? ((!empty($_POST['style_default'])) ? 1 : 0) : (($config['default_style'] == $id) ? 1 : 0); - - // User has submitted form and no errors have occured - if ($update && !sizeof($error)) - { - $sql_ary = array(); - - // We're installing/uploading/importing - if ($action == 'install') - { - switch ($type) - { - case 'style': - install_style($action, $error, $name, $copyright, $style_active, $style_default, $root_path, $template_id, $template_name, $template_copyright, $theme_id, $theme_name, $theme_copyright, $imageset_id, $imageset_name, $imageset_copyright); - break; - - case 'template': - install_element('template', $error, $action, $root_path, $id, $name, $copyright); - break; - - case 'theme': - install_element('theme', $error, $action, $root_path, $id, $name, $copyright); - break; - - case 'imageset': - install_element('imageset', $error, $action, $root_path, $id, $name, $copyright); - break; - } - - if ($tmp_path) - { - cleanup_folder($tmp_path); - } - - if (!sizeof($error)) - { - $cache->destroy('sql', STYLES_TABLE); - - $message = ($storedb) ? '_ADDED_DB' : '_ADDED'; - trigger_error($user->lang[$l_type . $message]); - } - } - else if ($action == 'add') - { - if ($type == 'style') - { - install_style($action, $error, $name, $copyright, $style_active, $style_default, $root_path, $template_id, $template_name, $template_copyright, $theme_id, $theme_name, $theme_copyright, $imageset_id, $imageset_name, $imageset_copyright); - } - else - { - // Create path if it doesn't exist - $storedb = 1; - - umask(0); - if (file_exists("{$phpbb_root_path}styles/$path") || @mkdir("{$phpbb_root_path}styles/$path", 0777)) - { - if (@chmod("{$phpbb_root_path}styles/$path", 0777)) - { - $storedb = 0; - } - } - - if ($basis && ($template_storedb || $theme_storedb)) - { - $tmp_path = $phpbb_root_path . 'store/tmp_' . substr(uniqid(''), 0, 10) . '/'; - if (!@mkdir($tmp_path, 0777)) - { - trigger_error("Cannot create $tmp_path", E_USER_ERROR); - } - @chmod($tmp_path, 0777); - - if (!@mkdir("$tmp_path$type", 0777)) - { - trigger_error("Cannot create $tmp_path$type", E_USER_ERROR); - } - @chmod("$tmp_path$type", 0777); - - switch ($type) - { - case 'theme': - copyfiles("{$phpbb_root_path}styles/$path/theme/", filelist("{$phpbb_root_path}styles/$path/theme/", '', '*'), "$tmp_path$type/"); - - $fp = fopen("$tmp_path$type/stylesheet.css", 'wb'); - fwrite($fp, $theme_data); - fclose($theme_data); - break; - - case 'template': - copyfiles("{$phpbb_root_path}styles/$path/$type/", filelist("{$phpbb_root_path}styles/$path/$type/", '', '*'), "$tmp_path$type/"); - - $sql = 'SELECT template_filename, template_mtime, template_data - FROM ' . STYLES_TPLDATA_TABLE . " - WHERE template_id = $basis"; - $result = $db->sql_fetchrow($result); - - while ($row = $db->sql_fetchrow($result)) - { - $fp = fopen("$tmp_path$type/" . $row['template_filename'], 'wb'); - fwrite($fp, $row['template_data']); - fclose($fp); - } - $db->sql_freeresult($result); - break; - } - } - - $root_path = ($tmp_path) ? $tmp_path : (($basis) ? $phpbb_root_path . 'styles/' . ${$type . '_path'} . '/' : ''); - - install_element($type, $error, $action, $root_path, $id, $name, $copyright, $storedb); - } - - if ($tmp_path) - { - cleanup_folder($tmp_path); - } - - if (!sizeof($error)) - { - $cache->destroy('sql', STYLES_TABLE); - - $message = ($storedb) ? '_ADDED_DB' : '_ADDED'; - trigger_error($user->lang["$l_type$message"]); - } - } - else if ($action == 'details') - { - if ($type == 'style') - { - $sql_ary = array( - 'template_id' => $template_id, - 'theme_id' => $theme_id, - 'imageset_id' => $imageset_id, - 'style_active' => $style_active, - ); - } - else if ($type != 'imageset') - { - switch ($type) - { - case 'theme': - if ($theme_storedb != $storedb) - { - $theme_data = implode('', file("{$phpbb_root_path}styles/$theme_path/theme/stylesheet.css")); - if (!$storedb && !$safe_mode && is_writeable("{$phpbb_root_path}styles/$theme_path/theme/stylesheet.css")) - { - $storedb = 1; - if ($fp = @fopen("{$phpbb_root_path}styles/$theme_path/$type/stylesheet.css", 'wb')) - { - $storedb = (@fwrite($fp, str_replace("styles/$theme_path/theme/", './', $theme_data))) ? 0 : 1; - } - fclose($fp); - } - $theme_data = str_replace('./', "styles/$theme_path/theme/", $theme_data); - - $sql_ary = array( - 'theme_mtime' => ($storedb) ? filemtime("{$phpbb_root_path}styles/$theme_path/theme/stylesheet.css") : 0, - 'theme_storedb' => $storedb, - 'theme_data' => ($storedb) ? $theme_data : '', - ); - } - break; - - case 'template': - if ($theme_storedb != $storedb) - { - $filelist = filelist("{$phpbb_root_path}styles/$template_path/template", '', 'html'); - - if (!$storedb && !$safe_mode && is_writeable("{$phpbb_root_path}styles/$template_path/template")) - { - $sql = 'SELECT * - FROM ' . STYLES_TPLDATA_TABLE . " - WHERE template_id = $id"; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - if (!($fp = @fopen("{$phpbb_root_path}styles/$template_path/template/" . $row['template_filename'], 'wb'))) - { - $storedb = 1; - break; - } - - fwrite($fp, $row['template_data']); - fclose($fp); - } - $db->sql_freeresult($result); - - if (!$storedb) - { - $sql = 'DELETE FROM ' . STYLES_TPLDATA_TABLE . " - WHERE template_id = $id"; - $db->sql_query($sql); - } - } - - $sql_ary = array( - 'template_storedb' => $storedb, - ); - } - break; - } - } - - if ($type != 'imageset' && sizeof($sql_ary)) - { - $sql = "UPDATE $sql_from - SET " . $db->sql_build_array('UPDATE', $sql_ary) . " - WHERE {$type}_id = $id"; - $db->sql_query($sql); - - if ($type == 'style' && $style_default) - { - set_config('default_style', $id); - } - } - - $cache->destroy('sql', STYLES_TABLE); - - add_log('admin', 'LOG_EDIT_' . $l_type, $name); - trigger_error($user->lang[$l_type . '_EDITED']); - } - } - - // Something went wrong ... so we'll clean up any decompressed uploaded/imported archives. - if ($tmp_path) - { - cleanup_folder($tmp_path); - } - - // Either an error occured or the user has just entered the form - if (!sizeof($error) && !$update && $id) - { - $sql = "SELECT * - FROM $sql_from - WHERE {$type}_id = $id"; - $result = $db->sql_query($sql); - - if (!extract($db->sql_fetchrow($result))) - { - trigger_error($user->lang['NO_' . $l_type]); - } - $db->sql_freeresult($result); - - $style_default = ($type == 'style' && $config['default_style'] == $id) ? 1 : 0; - $storedb = (!empty(${$type . '_storedb'})) ? true : false; // Fudged because we use $storedb when submitting data - } - - if ($type == 'style' && $action != 'install') - { - $style_options = array(); - foreach ($element_ary as $element => $table) - { - $sql = "SELECT {$element}_id, {$element}_name - FROM $table - ORDER BY {$element}_id ASC"; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $selected = ($row[$element . '_id'] == ${$element . '_id'}) ? ' selected="selected"' : ''; - ${$element . '_options'} .= ''; - } - $db->sql_freeresult($result); - } - } - - // Output the page - adm_page_header($user->lang[$l_prefix . '_' . $l_type]); - -?> - -

lang[$l_prefix . '_' . $l_type]; ?>

- -

lang[$l_prefix . '_' . $l_type . '_EXPLAIN']; ?>

- -
"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -$file"; - } - } - closedir($dp); - - $store_options = '' . $store_options; - - if ($file_uploads) - { - -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lang[$l_prefix . '_' . $l_type]; ?>
', $error); ?>
lang[$l_type . '_NAME']; ?>:' : '' . ${$type . '_name'} . ''; - -?>
lang['COPYRIGHT']; ?>:' : '' . ${$type . '_copyright'} . ''; - -?>
lang['STYLE_TEMPLATE']; ?>:$template_name" : ''; - -?>
lang['STYLE_THEME']; ?>:$theme_name" : ''; - -?>
lang['STYLE_IMAGESET']; ?>:$imageset_name" : ''; - -?>
lang[$l_type . '_LOCATION']; ?>:
lang[$l_type . '_LOCATION_EXPLAIN']; ?>
/> lang['STORE_FILESYSTEM']; ?>   /> lang['STORE_DATABASE']; ?>
lang['OPTIONS']; ?>
lang[$l_type . '_UPLOAD_BASIS']; ?>:
lang['ALLOWED_FILETYPES']; ?>:
lang[$l_type . '_IMPORT_BASIS']; ?>:
lang[$l_type . '_BASIS']; ?>:
 
lang['STYLE_ACTIVE']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['STYLE_DEFAULT']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
  
- - - - - - - - - - - - - - - - - - - - - - -

h1

h2

h3

mainmenu
 
- - - - -
titles -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
th
cattitle / catcatdiv
topictitle / row1topicauthor / row2topicdetails / row1
row3
spacer
postdetails / row2postbody / row1 posthilit
- -

- - - - - - - - - - -
gengenmedgensmall
copyright phpBB
- -

- -
- - - - - - - - - - - - - - -
- -

- - - - - - - - - - - - - - -
postbody / bold italic underline
- - - -
A_N_Other wrote:
quote
- - - - - - -
Code:
10 Print "hello"
20 Goto 10
- - - - - - -
PHP:
// syntaxcomment
?>
<HTML>
<?php
echo $this = "HELLO";
- -
- - - - \ No newline at end of file diff --git a/phpBB/adm/admin_users.php b/phpBB/adm/admin_users.php deleted file mode 100644 index 7a752cce66..0000000000 --- a/phpBB/adm/admin_users.php +++ /dev/null @@ -1,2057 +0,0 @@ -acl_gets('a_user', 'a_useradd', 'a_userdel')) - { - return; - } - - $module['USER']['MANAGE_USERS'] = basename(__FILE__) . $SID; - - return; -} - -define('IN_PHPBB', 1); -// Include files -$phpbb_root_path = '../'; -$phpEx = substr(strrchr(__FILE__, '.'), 1); -require('pagestart.' . $phpEx); -include($phpbb_root_path.'includes/functions_user.'.$phpEx); -include($phpbb_root_path.'includes/functions_profile_fields.'.$phpEx); - -$user->add_lang(array('posting', 'ucp')); - -// -// Get and set basic vars -// -$mode = request_var('mode', 'overview'); -$action = request_var('action', ''); - -$username = request_var('username', ''); -$user_id = request_var('u', 0); -$gid = request_var('g', 0); - -$start = request_var('start', 0); -$ip = request_var('ip', ''); -$start = request_var('start', 0); -$delete = request_var('delete', ''); -$deletetype = request_var('deletetype', ''); -$marked = request_var('mark', 0); -$quicktools = request_var('quicktools', ''); - -$st = request_var('st', 0); -$sk = request_var('sk', 'a'); -$sd = request_var('sd', 'd'); - -$submit = (isset($_POST['update'])) ? true : false; -$confirm = (isset($_POST['confirm'])) ? true : false; -$cancel = (isset($_POST['cancel'])) ? true : false; -$preview = (isset($_POST['preview'])) ? true : false; -$deletemark = (isset($_POST['delmarked'])) ? true : false; -$deleteall = (isset($_POST['delall'])) ? true : false; - -$error = array(); -$colspan = 0; - -// -// Whois output -// -if ($action == 'whois') -{ - // Output relevant page - adm_page_header($user->lang['WHOIS']); - - if ($ip && $domain = gethostbyaddr($ip)) - { -?> - - - - - - - - -
IP whois for
\2\3', $ipwhois); - echo '
' . trim($ipwhois) . '
'; - } - -?>
- -
- -sql_escape($username) . "'"; - if ($action == 'overview') - { - $sql = ' - SELECT - u.*, - s.session_time, s.session_page, s.session_ip - FROM (' . - USERS_TABLE . ' u - LEFT JOIN ' . SESSIONS_TABLE . " s ON s.session_user_id = u.user_id) - WHERE u.$sql_where - ORDER BY s.session_time DESC"; - } - else - { - $sql = 'SELECT * FROM ' . USERS_TABLE . " WHERE $sql_where"; - } - $result = $db->sql_query($sql); - - if (!$userrow = $db->sql_fetchrow($result)) - { - trigger_error($user->lang['NO_USER']); - } - $db->sql_freeresult($result); - - if ($userrow['session_time'] > $userrow['user_lastvisit']) - { - $userrow['user_lastvisit'] = $userrow['session_time']; - $userrow['user_lastpage'] = $userrow['session_page']; - } - - $user_password = ''; -} - -// Output page -adm_page_header($user->lang['MANAGE']); - - -// -// Output forms -// - -// Begin program -if ($username || $user_id) -{ - // Generate overall "header" for user admin - $form_options = ''; - $forms_ary = array('overview' => 'OVERVIEW', 'feedback' => 'FEEDBACK', 'profile' => 'PROFILE', 'prefs' => 'PREFS', 'avatar' => 'AVATAR', 'sig' => 'SIG', 'groups' => 'GROUP', 'perm' => 'PERM', 'attach' => 'ATTACH'); - - foreach ($forms_ary as $value => $lang) - { - $selected = ($mode == $value) ? ' selected="selected"' : ''; - $form_options .= ''; - } - - // Make sure $user_id is available. - $user_id = $userrow['user_id']; - - $pagination = ''; - -?> - - - - -

lang['USER_ADMIN']; ?>

- -

lang['USER_ADMIN_EXPLAIN']; ?>

- -
"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -acl_get('a_clearlogs')) - { - $where_sql = ''; - if ($deletemark && $marked) - { - $sql_in = array(); - foreach ($marked as $mark) - { - $sql_in[] = $mark; - } - $where_sql = ' AND log_id IN (' . implode(', ', $sql_in) . ')'; - unset($sql_in); - } - - $sql = 'DELETE FROM ' . LOG_TABLE . ' - WHERE log_type = ' . LOG_USERS . " - $where_sql"; - $db->sql_query($sql); - - add_log('admin', 'LOG_USERS_CLEAR'); - trigger_error(""); - } - - if ($message = request_var('message', '')) - { - add_log('admin', 'LOG_USER_FEEDBACK', $username); - add_log('user', $user_id, 'LOG_USER_GENERAL', $message); - - trigger_error($user->lang['USER_FEEDBACK_ADDED']); - } - } - - $colspan = 2; - - $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 364 => $user->lang['1_YEAR']); - $sort_by_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_DATE'], 'c' => $user->lang['SORT_IP'], 'd' => $user->lang['SORT_ACTION']); - $sort_by_sql = array('a' => 'l.user_id', 'b' => 'l.log_time', 'c' => 'l.log_ip', 'd' => 'l.log_operation'); - - $s_limit_days = $s_sort_key = $s_sort_dir = ''; - gen_sort_selects($limit_days, $sort_by_text, $st, $sk, $sd, $s_limit_days, $s_sort_key, $s_sort_dir); - - // Define where and sort sql for use in displaying logs - $sql_where = ($st) ? (time() - ($st * 86400)) : 0; - $sql_sort = $sort_by_sql[$sk] . ' ' . (($sd == 'd') ? 'DESC' : 'ASC'); - -?> - - - - - - - - - - - - - - - - - - - -
lang['SELECT_FORM']; ?>:
- - - - -acl_get('a_userdel')) - { - trigger_error($user->lang['NO_ADMIN']); - } - - if (!$cancel && !$confirm) - { - adm_page_confirm($user->lang['CONFIRM'], $user->lang['CONFIRM_OPERATION']); - } - else if (!$cancel) - { - user_delete($deletetype, $user_id); - - add_log('admin', 'LOG_USER_DELETED', $userrow['username']); - trigger_error($user->lang['USER_DELETED']); - } - } - - // Handle quicktool actions - if ($quicktools && $userrow['user_type'] != USER_FOUNDER) - { - switch ($quicktools) - { - case 'banuser': - case 'banemail': - case 'banip': - $ban = array(); - - switch ($quicktools) - { - case 'banuser': - $ban[] = $userrow['username']; - $reason = 'USER_ADMIN_BAN_NAME_REASON'; - $log = 'LOG_BAN_USERNAME_USER'; - break; - - case 'banemail': - $ban[] = $userrow['user_email']; - $reason = 'USER_ADMIN_BAN_EMAIL_REASON'; - $log = 'LOG_BAN_EMAIL_USER'; - break; - - case 'banip': - $ban[] = $userrow['user_ip']; - - $sql = 'SELECT DISTINCT poster_ip - FROM ' . POSTS_TABLE . " - WHERE poster_id = $user_id"; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $ban[] = $row['poster_ip']; - } - $db->sql_freeresult($result); - - $reason = 'USER_ADMIN_BAN_IP_REASON'; - $log = 'LOG_BAN_IP_USER'; - break; - } - - user_ban(substr($quicktools, 3), $ban, 0, 0, 0, $user->lang[$reason]); - - add_log('user', $user_id, $log); - - trigger_error($user->lang['BAN_UPDATE_SUCESSFUL']); - - break; - - case 'reactivate': - - if ($config['email_enable']) - { - include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx); - - $user_actkey = gen_rand_string(10); - $key_len = 54 - (strlen($server_url)); - $key_len = ($key_len > 6) ? $key_len : 6; - $user_actkey = substr($user_actkey, 0, $key_len); - - user_active_flip($user_id, $userrow['user_type'], $user_actkey, $userrow['username']); - - $messenger = new messenger(); - - $messenger->template('user_welcome_inactive', $user_lang); - $messenger->subject(); - - $messenger->replyto($config['board_contact']); - $messenger->to($userrow['user_email'], $userrow['username']); - - $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']); - $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']); - $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']); - $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip); - - $messenger->assign_vars(array( - 'SITENAME' => $config['sitename'], - 'WELCOME_MSG' => sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename']), - 'USERNAME' => $username, - 'PASSWORD' => $password_confirm, - 'EMAIL_SIG' => str_replace('
', "\n", "-- \n" . $config['board_email_sig']), - - 'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u=$user_id&k=$user_actkey") - ); - - $messenger->send(NOTIFY_EMAIL); - $messenger->save_queue(); - - add_log('admin', 'LOG_USER_REACTIVATE', $userrow['username']); - add_log('user', $user_id, 'LOG_USER_REACTIVATE_USER'); - - trigger_error($user->lang['USER_ADMIN_REACTIVATE']); - } - - break; - - case 'active': - - user_active_flip($user_id, $userrow['user_type'], false, $userrow['username']); - - $message = ($user_type == USER_NORMAL) ? 'USER_ADMIN_INACTIVE' : 'USER_ADMIN_ACTIVE'; - $log = ($user_type == USER_NORMAL) ? 'LOG_USER_INACTIVE' : 'LOG_USER_ACTIVE'; - - add_log('admin', $log, $userrow['username']); - add_log('user', $user_id, $log . '_USER'); - - trigger_error($user->lang[$message]); - break; - - case 'moveposts': - - if (!($new_forum_id = request_var('new_f', 0))) - { - -?> - -

lang['USER_ADMIN']; ?>

- -

lang['USER_ADMIN_EXPLAIN']; ?>

- -">
', $error); ?>
- - - - - - - - - -
lang['USER_ADMIN_MOVE_POSTS']; ?>
lang['MOVE_POSTS_EXPLAIN']; ?>

 
- $new_forum_id - GROUP BY topic_id"; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $topic_id_ary[$row['topic_id']] = $row['total_posts']; - } - $db->sql_freeresult($result); - - $sql = 'SELECT topic_id, forum_id, topic_title, topic_replies, topic_replies_real - FROM ' . TOPICS_TABLE . ' - WHERE topic_id IN (' . implode(', ', array_keys($topic_id_ary)) . ')'; - $result = $db->sql_query($sql); - - $move_topic_ary = $move_post_ary = array(); - while ($row = $db->sql_fetchrow($result)) - { - if (max($row['topic_replies'], $row['topic_replies_real']) + 1 == $topic_id_ary[$row['topic_id']]) - { - $move_topic_ary[] = $row['topic_id']; - } - else - { - $move_post_ary[$row['topic_id']]['title'] = $row['topic_title']; - $move_post_ary[$row['topic_id']]['attach'] = ($row['attach']) ? 1 : 0; - } - - $forum_id_ary[] = $row['forum_id']; - } - $db->sql_freeresult($result); - - // Entire topic comprises posts by this user, move these topics - if (sizeof($move_topic_ary)) - { - move_topics($move_topic_ary, $new_forum_id, false); - } - - if (sizeof($move_post_ary)) - { - // Create new topic - // Update post_ids, report_ids, attachment_ids - foreach ($move_post_ary as $topic_id => $post_ary) - { - // Create new topic - $sql = 'INSERT INTO ' . TOPICS_TABLE . ' ' . $db->sql_build_array('INSERT', array( - 'topic_poster' => $user_id, - 'topic_time' => time(), - 'forum_id' => $new_forum_id, - 'icon_id' => 0, - 'topic_approved' => 1, - 'topic_title' => $post_ary['title'], - 'topic_first_poster_name' => $userrow['username'], - 'topic_type' => POST_NORMAL, - 'topic_time_limit' => 0, - 'topic_attachment' => $post_ary['attach'],) - ); - $db->sql_query($sql); - - $new_topic_id = $db->sql_nextid(); - - // Move posts - $sql = 'UPDATE ' . POSTS_TABLE . " - SET forum_id = $new_forum_id, topic_id = $new_topic_id - WHERE topic_id = $topic_id - AND poster_id = $user_id"; - $db->sql_query($sql); - - if ($post_ary['attach']) - { - $sql = 'UPDATE ' . ATTACHMENTS_TABLE . " - SET topic_id = $new_topic_id - WHERE topic_id = $topic_id - AND poster_id = $user_id"; - $db->sql_query($sql); - } - - $new_topic_id_ary[] = $new_topic_id; - } - } - - $forum_id_ary = array_unique($forum_id_ary); - $topic_id_ary = array_unique(array_merge($topic_id_ary, $new_topic_id_ary)); - - sync('reported', 'topic_id', $topic_id_ary); - sync('topic', 'topic_id', $topic_id_ary); - sync('forum', 'forum_id', $forum_id_ary); - } - - break; - } - - $sql = 'SELECT forum_name - FROM ' . TOPICS_TABLE . " - WHERE topic_id = $new_forum_id"; - $result = $db->sql_query($sql); - - $forum_info = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - add_log('admin', 'LOG_USER_MOVE_POSTS', $forum_info['forum_name'], $userrow['username']); - add_log('user', $user_id, 'LOG_USER_MOVE_POSTS_USER', $forum_info['forum_name']); - - trigger_error($user->lang['USER_ADMIN_MOVE']); - } - - // Handle registration info updates - $var_ary = array( - 'username' => (string) $userrow['username'], - 'user_type' => (int) $userrow['user_founder'], - 'user_email' => (string) $userrow['user_email'], - 'email_confirm' => (string) '', - 'user_password' => (string) '', - 'password_confirm' => (string) '', - 'user_warnings' => (int) $userrow['user_warnings'], - ); - - // Get the data from the form. Use data from the database if no info is provided - foreach ($var_ary as $var => $default) - { - $data[$var] = request_var($var, $default); - } - - // Validation data - $var_ary = array( - 'password_confirm' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']), - 'user_password' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']), - 'user_warnings' => array('num', 0, $config['max_warnings']), - ); - - // Check username if altered - if ($data['username'] != $userrow['username']) - { - $var_ary += array( - 'username' => array( - array('string', false, $config['min_name_chars'], $config['max_name_chars']), - array('username', $userrow['username'])), - ); - } - - // Check email if altered - if ($data['user_email'] != $userrow['user_email']) - { - $var_ary += array( - 'user_email' => array( - array('string', false, 6, 60), - array('email', $userrow['user_email'])), - 'email_confirm' => array('string', true, 6, 60) - ); - } - - $error = validate_data($data, $var_ary); - - if ($data['user_password'] && $data['password_confirm'] != $data['user_password']) - { - $error[] = 'NEW_PASSWORD_ERROR'; - } - - if ($data['user_email'] != $userrow['user_email'] && $data['email_confirm'] != $data['user_email']) - { - $error[] = 'NEW_EMAIL_ERROR'; - } - - // Which updates do we need to do? - $update_warning = ($user_warnings != $data['user_warnings']) ? true : false; - $update_username = ($username != $data['username']) ? $data['username'] : false; - $update_password = ($user_password != $data['user_password']) ? true : false; - - if (!sizeof($error)) - { - $sql_ary = array( - 'username' => $data['username'], - // TODO: check if this user is allowed to change user_type - 'user_type' => $data['user_founder'], - 'user_email' => $data['user_email'], - 'user_email_hash' => crc32(strtolower($data['user_email'])) . strlen($data['user_email']), - 'user_warnings' => $data['user_warnings'], - ); - - if ($update_password) - { - $sql_ary += array( - 'user_password' => md5($data['user_password']), - 'user_passchg' => time(), - ); - } - - $sql = 'UPDATE ' . USERS_TABLE . ' - SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' - WHERE user_id = ' . $user_id; - $db->sql_query($sql); - - // TODO - if ($update_warning) - { - } - - if ($update_username) - { - user_update_name($update_username, $userrow['username']); - } - - trigger_error($user->lang['USER_OVERVIEW_UPDATED']); - } - - // Replace "error" strings with their real, localised form - $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); - } - $colspan = 2; - - $user_char_ary = array('.*' => 'USERNAME_CHARS_ANY', '[\w]+' => 'USERNAME_ALPHA_ONLY', '[\w_\+\. \-\[\]]+' => 'USERNAME_ALPHA_SPACERS'); - $quick_tool_ary = array('banuser' => 'BAN_USER', 'banemail' => 'BAN_EMAIL', 'banip' => 'BAN_IP', 'active' => (($user_type == USER_INACTIVE) ? 'ACTIVATE' : 'DEACTIVATE'), 'delsig' => 'DEL_SIG', 'delavatar' => 'DEL_AVATAR', 'moveposts' => 'MOVE_POSTS', 'delposts' => 'DEL_POSTS', 'delattach' => 'DEL_ATTACH'); - if ($config['email_enable']) - { - $quick_tool_ary['reactivate'] = 'FORCE'; - } - - $options = ''; - foreach ($quick_tool_ary as $value => $lang) - { - $options .= ''; - } - - $user_founder_yes = ($userrow['user_type'] == USER_FOUNDER) ? ' checked="checked"' : ''; - $user_founder_no = ($userrow['user_type'] != USER_FOUNDER) ? ' checked="checked"' : (($user->data['user_type'] != USER_FOUNDER) ? ' disabled="disabled"' : ''); - - foreach($error as $error_msg) - { -?> -
lang['USER_ADMIN_OVERVIEW']; ?>
lang['USERNAME']; ?>:
lang[$user_char_ary[str_replace('\\\\', '\\', $config['allow_name_chars'])] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']); ?>
lang['REGISTERED']; ?>: format_date($userrow['user_regdate']); ?>
lang['REGISTERED_IP']; ?>: ' . (($ip == 'hostname') ? gethostbyaddr($user_ip) : $user_ip) . " [ " . $user->lang['WHOIS'] . ' ]'; ?>
lang['LAST_ACTIVE']; ?>: format_date($userrow['user_lastvisit']); ?>
lang['FOUNDER']; ?>:
lang['FOUNDER_EXPLAIN']; ?>
/>lang['YES']; ?>  />lang['NO']; ?>
lang['EMAIL']; ?>:
lang['CONFIRM_EMAIL']; ?>:
lang['CONFIRM_EMAIL_EXPLAIN']; ?>
lang['NEW_PASSWORD']; ?>:
lang['CHANGE_PASSWORD_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']) ?>
lang['CONFIRM_PASSWORD']; ?>:
lang['CONFIRM_PASSWORD_EXPLAIN']; ?>
lang['USER_TOOLS']; ?> -
lang['WARNINGS']; ?>:
lang['WARNINGS_EXPLAIN']; ?>
lang['QUICK_TOOLS']; ?>:
lang['DELETE_USER']; ?>:
lang['DELETE_USER_EXPLAIN']; ?>
  
lang['USER_ADMIN_FEEDBACK']; ?>
lang['DISPLAY_LOG']; ?>:   lang['SORT_BY']; ?>:  
Report by: on format_date($log_data[$i]['time']); ?>
No reports exist for this user
acl_get('a_clearlogs')) - { - -?>   
- - -
- - - - - -

lang['ADD_FEEDBACK']; ?>

- -

lang['ADD_FEEDBACK_EXPLAIN']; ?>

- - - - - - -
- - - - - - - - - - (string) '', - 'aim' => (string) '', - 'msn' => (string) '', - 'yim' => (string) '', - 'jabber' => (string) '', - 'website' => (string) '', - 'location' => (string) '', - 'occupation' => (string) '', - 'interests' => (string) '', - 'bday_day' => 0, - 'bday_month' => 0, - 'bday_year' => 0, - ); - - foreach ($var_ary as $var => $default) - { - $data[$var] = request_var($var, $default); - } - - $var_ary = array( - 'icq' => array( - array('string', true, 3, 15), - array('match', true, '#^[0-9]+$#i')), - 'aim' => array('string', true, 5, 255), - 'msn' => array('string', true, 5, 255), - 'jabber' => array( - array('string', true, 5, 255), - array('match', true, '#^[a-z0-9\.\-_\+]+?@(.*?\.)*?[a-z0-9\-_]+?\.[a-z]{2,4}(/.*)?$#i')), - 'yim' => array('string', true, 5, 255), - 'website' => array( - array('string', true, 12, 255), - array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')), - 'location' => array('string', true, 2, 255), - 'occupation' => array('string', true, 2, 500), - 'interests' => array('string', true, 2, 500), - 'bday_day' => array('num', true, 1, 31), - 'bday_month' => array('num', true, 1, 12), - 'bday_year' => array('num', true, 1901, gmdate('Y', time())), - ); - - $error = validate_data($data, $var_ary); - - // validate custom profile fields - // $cp->submit_cp_field('profile', $cp_data, $cp_error); - - if (!sizeof($error) && !sizeof($cp_error)) - { - $sql_ary = array( - 'user_icq' => $data['icq'], - 'user_aim' => $data['aim'], - 'user_msnm' => $data['msn'], - 'user_yim' => $data['yim'], - 'user_jabber' => $data['jabber'], - 'user_website' => $data['website'], - 'user_from' => $data['location'], - 'user_occ' => $data['occupation'], - 'user_interests'=> $data['interests'], - 'user_birthday' => sprintf('%2d-%2d-%4d', $data['bday_day'], $data['bday_month'], $data['bday_year']), - ); - - $sql = 'UPDATE ' . USERS_TABLE . ' - SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " - WHERE user_id = $user_id"; - $db->sql_query($sql); - - /* - // Update Custom Fields - if (sizeof($cp_data)) - { - $sql = 'UPDATE ' . PROFILE_DATA_TABLE . ' - SET ' . $db->sql_build_array('UPDATE', $cp_data) . " - WHERE user_id = $user_id"; - $db->sql_query($sql); - - if (!$db->sql_affectedrows()) - { - $cp_data['user_id'] = $user_id; - - $db->return_on_error = true; - - $sql = 'INSERT INTO ' . PROFILE_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $cp_data); - $db->sql_query(); - - $db->return_on_error = false; - } - } - */ - trigger_error($user->lang['USER_PROFILE_UPDATED']); - } - } - - $colspan = 2; - - $cp = new custom_profile(); - - $cp_data = $cp_error = array(); - - if (!isset($userrow['bday_day'])) - { - list($userrow['bday_day'], $userrow['bday_month'], $userrow['bday_year']) = explode('-', $userrow['user_birthday']); - } - - $s_birthday_day_options = ''; - for ($i = 1; $i < 32; $i++) - { - $selected = ($i == $userrow['bday_day']) ? ' selected="selected"' : ''; - $s_birthday_day_options .= ""; - } - - $s_birthday_month_options = ''; - for ($i = 1; $i < 13; $i++) - { - $selected = ($i == $userrow['bday_month']) ? ' selected="selected"' : ''; - $s_birthday_month_options .= ""; - } - $s_birthday_year_options = ''; - - $now = getdate(); - $s_birthday_year_options = ''; - for ($i = $now['year'] - 100; $i < $now['year']; $i++) - { - $selected = ($i == $userrow['bday_year']) ? ' selected="selected"' : ''; - $s_birthday_year_options .= ""; - } - unset($now); - - // Get additional profile fields and assign them to the template block var 'profile_fields' -// $user->get_profile_fields($user->data['user_id']); -// $cp->generate_profile_fields('profile', $user->get_iso_lang_id(), $cp_error); - - -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (string) $config['default_dateformat'], - 'user_lang' => (string) $config['default_lang'], - 'user_tz' => (float) $config['board_timezone'], - 'user_style' => (int) $config['default_style'], - 'user_dst' => (bool) $config['board_dst'], - 'user_allow_viewemail' => false, - 'user_allow_massemail' => true, - 'user_allow_viewonline' => true, - 'user_notify_type' => 0, - 'user_notify_pm' => true, - 'user_allow_pm' => true, - 'user_notify' => false, - - 'sk' => (string) 't', - 'sd' => (string) 'd', - 'st' => 0, - - 'popuppm' => false, - 'viewimg' => true, - 'viewflash' => false, - 'viewsmilies' => true, - 'viewsigs' => true, - 'viewavatars' => true, - 'viewcensors' => false, - 'bbcode' => true, - 'html' => false, - 'smilies' => true, - 'attachsig' => true, - ); - - foreach ($var_ary as $var => $default) - { - $data[$var] = request_var($var, $default); - } - - $var_ary = array( - 'user_dateformat' => array('string', false, 3, 15), - 'user_lang' => array('match', false, '#^[a-z_]{2,}$#i'), - 'user_tz' => array('num', false, -13, 13), - - 'sk' => array('string', false, 1, 1), - 'sd' => array('string', false, 1, 1), - ); - - $error = validate_data($data, $var_ary); - - // Set the popuppm option - $option_ary = array('popuppm', 'viewimg', 'viewflash', 'viewsmilies', 'viewsigs', 'viewavatars', 'viewcensors', 'bbcode', 'html', 'smilies', 'attachsig'); - - foreach ($option_ary as $option) - { - $user_options = $user->optionset($option, $$option, $user_options); - } - - if (!sizeof($error)) - { - $sql_ary = array( - 'user_allow_pm' => $data['user_allow_pm'], - 'user_allow_viewemail' => $data['user_allow_viewemail'], - 'user_allow_massemail' => $data['user_allow_massemail'], - 'user_allow_viewonline' => $data['user_allow_viewonline'], - 'user_notify_type' => $data['user_notify_type'], - 'user_notify_pm' => $data['user_notify_pm'], - 'user_options' => $data['user_options'], - 'user_notify' => $data['user_notify'], - 'user_dst' => $data['user_dst'], - 'user_dateformat' => $data['user_dateformat'], - 'user_lang' => $data['user_lang'], - 'user_timezone' => $data['user_tz'], - 'user_style' => $data['user_style'], - 'user_sortby_type' => $data['sk'], - 'user_sortby_dir' => $data['sd'], - 'user_show_days' => $data['st'], - ); - - $sql = 'UPDATE ' . USERS_TABLE . ' - SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " - WHERE user_id = $user_id"; - $db->sql_query($sql); - - trigger_error($user->lang['USER_PREFS_UPDATED']); - } - - $user_sortby_type = $sk; - $user_sortby_dir = $sd; - $user_show_days = $st; - } - - $colspan = 2; - - $option_ary = array('user_allow_viewemail', 'user_allow_massemail', 'user_allow_pm', 'user_allow_viewonline', 'user_notify_pm', 'user_dst', 'user_notify'); - - foreach ($option_ary as $option) - { - ${$option . '_yes'} = ($userrow[$option]) ? ' checked="checked"' : ''; - ${$option . '_no'} = (!$userrow[$option]) ? ' checked="checked"' : ''; - } - unset($option_ary); - - $option_ary = array('popuppm', 'viewimg', 'viewflash', 'viewsmilies', 'viewsigs', 'viewavatars', 'viewcensors', 'bbcode', 'html', 'smilies', 'attachsig'); - - foreach ($option_ary as $option) - { - ${$option . '_yes'} = ($user->optionget($userrow[$option], $user_options)) ? ' checked="checked"' : ''; - ${$option . '_no'} = (!$user->optionget($userrow[$option], $user_options)) ? ' checked="checked"' : ''; - } - - $notify_email = ($userrow['user_notify_type'] == NOTIFY_EMAIL) ? ' checked="checked"' : ''; - $notify_im = ($userrow['user_notify_type'] == NOTIFY_IM) ? ' checked="checked"' : ''; - $notify_both = ($userrow['user_notify_type'] == NOTIFY_BOTH) ? ' checked="checked"' : ''; - - // Topic ordering display - $limit_days = array(0 => $user->lang['ALL_TOPICS'], 0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 364 => $user->lang['1_YEAR']); - - $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']); - $sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views'); - - $s_limit_days = $s_sort_key = $s_sort_dir = ''; - gen_sort_selects($limit_days, $sort_by_text, $userrow['user_show_days'], $userrow['user_sortby_type'], $userrow['user_sortby_dir'], $s_limit_days, $s_sort_key, $s_sort_dir); - -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (string) '', - 'remotelink' => (string) '', - 'width' => (string) '', - 'height' => (string) '', - ); - - foreach ($var_ary as $var => $default) - { - $data[$var] = request_var($var, $default); - } - - $var_ary = array( - 'uploadurl' => array('string', true, 5, 255), - 'remotelink' => array('string', true, 5, 255), - 'width' => array('string', true, 1, 3), - 'height' => array('string', true, 1, 3), - ); - - $error = validate_data($data, $var_ary); - - if (!sizeof($error)) - { - $data['user_id'] = $user_id; - - if ((!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl']) && $can_upload) - { - list($type, $filename, $width, $height) = avatar_upload($data, $error); - } - else if ($data['remotelink']) - { - list($type, $filename, $width, $height) = avatar_remote($data, $error); - } - else if ($delete) - { - $type = $filename = $width = $height = ''; - } - } - - if (!sizeof($error)) - { - // Do we actually have any data to update? - if (sizeof($data)) - { - $sql_ary = array( - 'user_avatar' => $filename, - 'user_avatar_type' => $type, - 'user_avatar_width' => $width, - 'user_avatar_height' => $height, - ); - - $sql = 'UPDATE ' . USERS_TABLE . ' - SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " - WHERE user_id = $user_id"; - $db->sql_query($sql); - - // Delete old avatar if present - if ($user_avatar && $filename != $user_avatar) - { - avatar_delete($user_avatar); - } - } - - trigger_error($message); - } - } - - $colspan = 2; - - $display_gallery = (isset($_POST['displaygallery'])) ? true : false; - $avatar_category = request_var('category', ''); - - // Generate users avatar - $avatar_img = ''; - if ($userrow['user_avatar']) - { - switch ($userrow['user_avatar_type']) - { - case AVATAR_UPLOAD: - $avatar_img = $phpbb_root_path . $config['avatar_path'] . '/'; - break; - case AVATAR_GALLERY: - $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/'; - break; - } - $avatar_img .= $userrow['user_avatar']; - - $avatar_img = ''; - } - else - { - $avatar_img = ''; - } - -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (bool) $config['allow_html'], - 'enable_bbcode' => (bool) $config['allow_bbcode'], - 'enable_smilies' => (bool) $config['allow_smilies'], - 'enable_urls' => true, - 'signature' => (string) $user_sig, - - ); - - foreach ($var_ary as $var => $default) - { - $data[$var] = request_var($var, $default); - } - - // NOTE: allow_img and allow_flash do not exist in config table - $img_status = ($config['allow_img']) ? true : false; - $flash_status = ($config['allow_flash']) ? true : false; - - include($phpbb_root_path . 'includes/message_parser.'.$phpEx); - $message_parser = new parse_message($data['signature']); - - // Allowing Quote BBCode - $message_parser->parse($data['enable_html'], $data['enable_bbcode'], $data['enable_urls'], $data['enable_smilies'], $img_status, $flash_status, true); - - if ($submit) - { - $sql_ary = array( - 'user_sig' => (string) $message_parser->message, - 'user_sig_bbcode_uid' => (string) $message_parser->bbcode_uid, - 'user_sig_bbcode_bitfield' => (int) $message_parser->bbcode_bitfield - ); - - $sql = 'UPDATE ' . USERS_TABLE . ' - SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " - WHERE user_id = $user_id"; - $db->sql_query($sql); - - unset($message_parser); - trigger_error($user->lang['PROFILE_UPDATED']); - } - } - - $colspan = 2; - - include($phpbb_root_path . 'includes/functions_posting.'.$phpEx); - - $signature_preview = ''; - if ($preview) - { - // Now parse it for displaying - $signature_preview = $message_parser->format_display($data['enable_html'], $data['enable_bbcode'], $data['enable_urls'], $data['enable_smilies'], false); - unset($message_parser); - } - - decode_message($userrow['user_sig'], $userrow['user_sig_bbcode_uid']); - -?> - - - - - - - - - - - - - - - - - - - - - - -lang['CONFIRM'], $user->lang['CONFIRM_OPERATION']); - } - else if (!$cancel) - { - if (!$gid) - { - trigger_error($user->lang['NO_GROUP']); - } - - if ($error = group_user_del($gid, $user_id)) - { - trigger_error($user->lang[$error]); - } - } - break; - } - - // Add user to group? - if ($submit) - { - if (!$gid) - { - trigger_error($user->lang['NO_GROUP']); - } - - // Add user/s to group - if ($error = group_user_add($gid, $user_id)) - { - trigger_error($user->lang[$error]); - } - } - - $colspan = 4; - -?> - - - -sql_query($sql); - - $i = 0; - $group_data = $id_ary = array(); - while ($row = $db->sql_fetchrow($result)) - { - $type = ($row['group_type'] == GROUP_SPECIAL) ? 'special' : (($row['user_pending']) ? 'pending' : 'normal'); - - $group_data[$type][$i]['group_id'] = $row['group_id']; - $group_data[$type][$i]['group_name'] = $row['group_name']; - $group_data[$type][$i]['group_leader'] = ($row['group_leader']) ? 1 : 0; - - $id_ary[] = $row['group_id']; - - $i++; - } - $db->sql_freeresult($result); - - // Select box for other groups - $sql = 'SELECT group_id, group_name, group_type - FROM ' . GROUPS_TABLE . ' - WHERE group_id NOT IN (' . implode(', ', $id_ary) . ') - ORDER BY group_type DESC, group_name ASC'; - $result = $db->sql_query($sql); - - $group_options = ''; - while ($row = $db->sql_fetchrow($result)) - { - $group_options .= '' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . ''; - } - $db->sql_freeresult($result); - - $current_type = ''; - foreach ($group_data as $group_type => $data_ary) - { - if ($current_type != $group_type) - { - -?> - - - - - - - - - - - - - - -lang['CONFIRM'], $user->lang['CONFIRM_OPERATION']); - } - else if (!$cancel) - { - $sql = 'SELECT real_filename - FROM ' . ATTACHMENTS_TABLE . ' - WHERE attach_id IN (' . implode(', ', $marked) . ')'; - $result = $db->sql_query($sql); - - $log_attachments = array(); - while ($row = $db->sql_fetchrow($result)) - { - $log_attachments[] = $row['real_filename']; - } - $db->sql_freeresult($result); - - delete_attachments('attach', $marked); - - $log = (sizeof($delete_ids) == 1) ? 'ATTACHMENT_DELETED' : 'ATTACHMENTS_DELETED'; - $meesage = (sizeof($delete_ids) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED']; - - add_log('admin', $log, implode(', ', $log_attachments)); - trigger_error($message); - } - } - - $colspan = 6; - - $uri = "admin_users.$phpEx$SID&mode=$mode&action=$action&u=$user_id"; - - $sk_text = array('a' => $user->lang['SORT_FILENAME'], 'b' => $user->lang['SORT_COMMENT'], 'c' => $user->lang['SORT_EXTENSION'], 'd' => $user->lang['SORT_SIZE'], 'e' => $user->lang['SORT_DOWNLOADS'], 'f' => $user->lang['SORT_POST_TIME'], 'g' => $user->lang['SORT_TOPIC_TITLE']); - $sk_sql = array('a' => 'a.real_filename', 'b' => 'a.comment', 'c' => 'a.extension', 'd' => 'a.filesize', 'e' => 'a.download_count', 'f' => 'a.filetime', 'g' => 't.topic_title'); - - $sd_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']); - - $s_sort_key = ''; - foreach ($sk_text as $key => $value) - { - $selected = ($sk == $key) ? ' selected="selected"' : ''; - $s_sort_key .= ''; - } - - $s_sort_dir = ''; - foreach ($sd_text as $key => $value) - { - $selected = ($sd == $key) ? ' selected="selected"' : ''; - $s_sort_dir .= ''; - } - - $order_by = $sk_sql[$sk] . ' ' . (($sd == 'a') ? 'ASC' : 'DESC'); - - $sql = 'SELECT COUNT(*) as num_attachments - FROM ' . ATTACHMENTS_TABLE . " - WHERE poster_id = $user_id"; - $result = $db->sql_query_limit($sql, 1); - - $num_attachments = $db->sql_fetchfield('num_attachments', 0, $result); - $db->sql_freeresult($result); - - $sql = 'SELECT a.*, t.topic_title - FROM ' . ATTACHMENTS_TABLE . ' a, ' . TOPICS_TABLE . " t - WHERE a.topic_id = t.topic_id - AND a.poster_id = $user_id - ORDER BY $order_by"; - $result = $db->sql_query_limit($sql, $config['posts_per_page'], $start); - - $row_count = 0; - if ($row = $db->sql_fetchrow($result)) - { - $class = 'row2'; - -?> - - - - - - - - - - - - - - - - - -sql_fetchrow($result)); - } - $db->sql_freeresult($result); - - $pagination = generate_pagination("$uri&sk=$sk&sd=$sd", $num_attachments, $config['topics_per_page'], $start); - -?> - - - -
lang['USER_ADMIN_' . strtoupper($action)]; ?>
  
lang['USER_ADMIN_SIG']; ?>
lang['UCP_ICQ']; ?>:
lang['UCP_AIM']; ?>:
lang['UCP_MSNM']; ?>:
lang['UCP_YIM']; ?>:
lang['UCP_JABBER']; ?>:
lang['WEBSITE']; ?>:
lang['LOCATION']; ?>:
lang['OCCUPATION']; ?>:
lang['INTERESTS']; ?>:
lang['BIRTHDAY']; ?>:
lang['BIRTHDAY_EXPLAIN']; ?>
lang['DAY']; ?>: lang['MONTH']; ?>: lang['YEAR']; ?>:
  
lang['USER_ADMIN_PREFS']; ?>
lang['VIEW_IMAGES']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['VIEW_FLASH']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['VIEW_SMILIES']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['VIEW_SIGS']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['VIEW_AVATARS']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['DISABLE_CENSORS']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['VIEW_TOPICS_DAYS']; ?>:
lang['VIEW_TOPICS_KEY']; ?>:
lang['VIEW_TOPICS_DIR']; ?>:
lang['USER_POSTING_PREFS']; ?>
lang['DEFAULT_BBCODE']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['DEFAULT_HTML']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['DEFAULT_SMILIES']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['DEFAULT_ADD_SIG']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['DEFAULT_NOTIFY']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['SHOW_EMAIL']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['ADMIN_EMAIL']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['ALLOW_PM']; ?>:
lang['ALLOW_PM_EXPLAIN']; ?>
/>lang['YES']; ?>   />lang['NO']; ?>
lang['HIDE_ONLINE']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['NOTIFY_METHOD']; ?>:
lang['NOTIFY_METHOD_EXPLAIN']; ?>
/>lang['NOTIFY_METHOD_EMAIL']; ?>   />lang['NOTIFY_METHOD_IM']; ?>   />lang['NOTIFY_METHOD_BOTH']; ?>
lang['NOTIFY_ON_PM']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['POPUP_ON_PM']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['BOARD_LANGUAGE']; ?>:
lang['BOARD_STYLE']; ?>:
lang['BOARD_TIMEZONE']; ?>:
lang['BOARD_DST']; ?>: />lang['YES']; ?>   />lang['NO']; ?>
lang['BOARD_DATE_FORMAT']; ?>:
lang['BOARD_DATE_FORMAT_EXPLAIN']; ?>
  
lang['USER_ADMIN_AVATAR']; ?>
lang['CURRENT_IMAGE']; ?>:
lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)); ?>



 lang['DELETE_AVATAR']; ?>
lang['UPLOAD_AVATAR_FILE']; ?>:
lang['UPLOAD_AVATAR_URL']; ?>:
lang['UPLOAD_AVATAR_URL_EXPLAIN']; ?>
lang['LINK_REMOTE_AVATAR']; ?>:
lang['LINK_REMOTE_AVATAR_EXPLAIN']; ?>
lang['LINK_REMOTE_SIZE']; ?>:
lang['LINK_REMOTE_SIZE_EXPLAIN']; ?>
px X px
lang['AVATAR_GALLERY']; ?>:
lang['AVATAR_GALLERY']; ?>
lang['AVATAR_CATEGORY']; ?>:   lang['AVATAR_PAGE']; ?>:  
- - - - - - - - - - - - - - -
{avatar_row.avatar_column.AVATAR_NAME}
  
lang['USER_ADMIN_SIG']; ?>
lang['SIGNATURE']; ?>: - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
 lang['FONT_SIZE']; ?>: lang['CLOSE_TAGS']; ?>
- - - -
lang['OPTIONS']; ?>
- - - - - - - - - - - - - - - -
lang['HTML_IS_ON'] : $user->lang['HTML_IS_OFF']; ?>
lang['BBCODE_IS_ON'], "", '') : sprintf($user->lang['BBCODE_IS_OFF'], "", ''); ?>
lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF']; ?>
lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF']; ?>
lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF']; ?>
- - - - - - - - - - - - - - - - - - - - -
lang['DISABLE_HTML']; ?>
lang['DISABLE_BBCODE']; ?>
lang['DISABLE_SMILIES']; ?>
lang['DISABLE_MAGIC_URL']; ?>
    
lang['ADMIN_SIGNATURE_PREVIEW']; ?>
lang['USER_ADMIN_GROUPS']; ?>
lang['USER_GROUP_' . strtoupper($group_type)]; ?>
">lang['G_' . $data['group_name']] : $data['group_name']; ?> ">lang['GROUP_DEFAULT']; ?>lang['GROUP_DEFAULT']; - } - -?>  ">lang['GROUP_DEMOTE'] : $user->lang['GROUP_PROMOTE']; ?>  ">lang['GROUP_DELETE']; ?> 
lang['USER_GROUP_ADD']; ?>:  
#">lang['FILENAME']; ?>">lang['POST_TIME']; ?>">lang['FILESIZE']; ?>">lang['DOWNLOADS']; ?>lang['DELETE']; ?>
  
lang['TOPIC']; ?>:
 format_date($row['filetime'], $user->lang['DATE_FORMAT']); ?> = 1048576) ? (round($row['filesize'] / 1048576 * 100) / 100) . ' ' . $user->lang['MB'] : (($row['filesize'] >= 1024) ? (round($row['filesize'] / 1024 * 100) / 100) . ' ' . $user->lang['KB'] : $row['filesize'] . ' ' . $user->lang['BYTES']); ?>
- - - - -
lang['SORT_BY']; ?>:   
- - - - - - - -
- -acl_get('a_user')) -{ - trigger_error($user->lang['No_admin']); -} - -?> - -

lang['USER_ADMIN']; ?>

- -

lang['USER_ADMIN_EXPLAIN']; ?>

- -
"> - - - - - - - - - - -
lang['SELECT_USER']; ?>
lang['FIND_USERNAME']; ?>:
[ " onclick="window.open('', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;">lang['FIND_USERNAME']; ?> ]
- - \ No newline at end of file diff --git a/phpBB/adm/editor.js b/phpBB/adm/editor.js deleted file mode 100644 index 67cb031ed6..0000000000 --- a/phpBB/adm/editor.js +++ /dev/null @@ -1,306 +0,0 @@ -// bbCode control by subBlue design [ www.subBlue.com ] -// Includes unixsafe colour palette selector by SHS` - -// Startup variables -var imageTag = false; -var theSelection = false; - -// Check for Browser & Platform for PC & IE specific bits -// More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html -var clientPC = navigator.userAgent.toLowerCase(); // Get client info -var clientVer = parseInt(navigator.appVersion); // Get browser version - -var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1)); -var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1) - && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1) - && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1)); - -var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1)); -var is_mac = (clientPC.indexOf("mac")!=-1); - -// Shows the help messages in the helpline window -function helpline(help) { - document.forms[form_name].helpbox.value = eval(help + "_help"); -} - -// Replacement for arrayname.length property -function getarraysize(thearray) { - for (i = 0; i < thearray.length; i++) { - if ((thearray[i] == "undefined") || (thearray[i] == "") || (thearray[i] == null)) - return i; - } - return thearray.length; -} - -// Replacement for arrayname.push(value) not implemented in IE until version 5.5 -// Appends element to the array -function arraypush(thearray,value) { - thearray[ getarraysize(thearray) ] = value; -} - -// Replacement for arrayname.pop() not implemented in IE until version 5.5 -// Removes and returns the last element of an array -function arraypop(thearray) { - thearraysize = getarraysize(thearray); - retval = thearray[thearraysize - 1]; - delete thearray[thearraysize - 1]; - return retval; -} - -function smiley(text) { - text = ' ' + text + ' '; - if (document.forms[form_name].elements[text_name].createTextRange && document.forms[form_name].elements[text_name].caretPos) { - var caretPos = document.forms[form_name].elements[text_name].caretPos; - - caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text; - document.forms[form_name].elements[text_name].focus(); - } else { - var selStart = document.forms[form_name].elements[text_name].selectionStart; - var selEnd = document.forms[form_name].elements[text_name].selectionEnd; - - mozWrap(document.forms[form_name].elements[text_name], text, '') - document.forms[form_name].elements[text_name].focus(); - document.forms[form_name].elements[text_name].selectionStart = selStart + text.length; - document.forms[form_name].elements[text_name].selectionEnd = selEnd + text.length; - } -} - -function bbfontstyle(bbopen, bbclose) { - if ((clientVer >= 4) && is_ie && is_win) { - theSelection = document.selection.createRange().text; - if (!theSelection) { - insert_text(bbopen + bbclose); - document.forms[form_name].elements[text_name].focus(); - return; - } - document.selection.createRange().text = bbopen + theSelection + bbclose; - document.forms[form_name].elements[text_name].focus(); - return; - } else { - insert_text(bbopen + bbclose); - document.forms[form_name].elements[text_name].focus(); - return; - } - storeCaret(document.forms[form_name].elements[text_name]); -} - -function insert_text(text) { - if (document.forms[form_name].elements[text_name].createTextRange && document.forms[form_name].elements[text_name].caretPos) { - var caretPos = document.forms[form_name].elements[text_name].caretPos; - caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text; - } else { - var selStart = document.forms[form_name].elements[text_name].selectionStart; - var selEnd = document.forms[form_name].elements[text_name].selectionEnd; - - mozWrap(document.forms[form_name].elements[text_name], text, '') - document.forms[form_name].elements[text_name].selectionStart = selStart + text.length; - document.forms[form_name].elements[text_name].selectionEnd = selEnd + text.length; - } -} - -function attach_inline() { - insert_text('[attachment=' + document.forms[form_name].elements['attachments'].value + ']' + document.forms[form_name].elements['attachments'].options[document.forms[form_name].elements['attachments'].selectedIndex].text + '[/attachment]'); -} - -function bbstyle(bbnumber) { - - donotinsert = false; - theSelection = false; - bblast = 0; - document.forms[form_name].elements[text_name].focus(); - - if (bbnumber == -1) { // Close all open tags & default button names - while (bbcode[0]) { - butnumber = arraypop(bbcode) - 1; - document.forms[form_name].elements[text_name].value += bbtags[butnumber + 1]; - buttext = eval('document.forms[form_name].addbbcode' + butnumber + '.value'); - if (buttext != "[*]") - { - eval('document.forms[form_name].addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); - } - } - document.forms[form_name].addbbcode10.value = "List"; - bbtags[10] = "[list]"; - document.forms[form_name].addbbcode12.value = "List="; - bbtags[12] = "[list=]"; - imageTag = false; // All tags are closed including image tags :D - document.forms[form_name].elements[text_name].focus(); - return; - } - - if ((clientVer >= 4) && is_ie && is_win) - { - theSelection = document.selection.createRange().text; // Get text selection - if (theSelection) { - // Add tags around selection - document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1]; - document.forms[form_name].elements[text_name].focus(); - theSelection = ''; - return; - } - } - else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0)) - { - mozWrap(document.forms[form_name].elements[text_name], bbtags[bbnumber], bbtags[bbnumber+1]); - document.forms[form_name].elements[text_name].focus(); - theSelection = ''; - return; - } - - // Find last occurance of an open tag the same as the one just clicked - for (i = 0; i < bbcode.length; i++) { - if (bbcode[i] == bbnumber+1) { - bblast = i; - donotinsert = true; - } - } - - if ((bbnumber == 10) && (bbtags[10] != "[*]")) - { - if (donotinsert) - { - document.forms[form_name].addbbcode12.value = "List="; - tmp_help = o_help; - o_help = e_help; - e_help = tmp_help; - bbtags[12] = "[list=]"; - } - else - { - document.forms[form_name].addbbcode12.value = "[*]"; - tmp_help = o_help; - o_help = e_help; - e_help = tmp_help; - bbtags[12] = "[*]"; - } - } - - if ((bbnumber == 12) && (bbtags[12] != "[*]")) - { - if (donotinsert) - { - document.forms[form_name].addbbcode10.value = "List"; - tmp_help = l_help; - l_help = e_help; - e_help = tmp_help; - bbtags[10] = "[list]"; - } - else - { - document.forms[form_name].addbbcode10.value = "[*]"; - tmp_help = l_help; - l_help = e_help; - e_help = tmp_help; - bbtags[10] = "[*]"; - } - } - - if (donotinsert) { // Close all open tags up to the one just clicked & default button names - while (bbcode[bblast]) { - butnumber = arraypop(bbcode) - 1; - if (bbtags[butnumber] != "[*]") - { - insert_text(bbtags[butnumber + 1]); - } - else - { - insert_text(bbtags[butnumber]); - } - buttext = eval('document.forms[form_name].addbbcode' + butnumber + '.value'); - if (bbtags[butnumber] != "[*]") - { - eval('document.forms[form_name].addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); - } - imageTag = false; - } - document.forms[form_name].elements[text_name].focus(); - return; - } else { // Open tags - - if (imageTag && (bbnumber != 14)) { // Close image tag before adding another - insert_text(bbtags[15]); - - lastValue = arraypop(bbcode) - 1; // Remove the close image tag from the list - document.forms[form_name].addbbcode14.value = "Img"; // Return button back to normal state - imageTag = false; - } - - // Open tag - insert_text(bbtags[bbnumber]); - - if ((bbnumber == 14) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag - if (bbtags[bbnumber] != "[*]") - { - arraypush(bbcode,bbnumber+1); - eval('document.forms[form_name].addbbcode'+bbnumber+'.value += "*"'); - } - document.forms[form_name].elements[text_name].focus(); - return; - } - - storeCaret(document.forms[form_name].elements[text_name]); -} - -// From http://www.massless.org/mozedit/ -function mozWrap(txtarea, open, close) -{ - var selLength = txtarea.textLength; - var selStart = txtarea.selectionStart; - var selEnd = txtarea.selectionEnd; - if (selEnd == 1 || selEnd == 2) - selEnd = selLength; - - var s1 = (txtarea.value).substring(0,selStart); - var s2 = (txtarea.value).substring(selStart, selEnd) - var s3 = (txtarea.value).substring(selEnd, selLength); - txtarea.value = s1 + open + s2 + close + s3; - return; -} - -// Insert at Claret position. Code from -// http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130 -function storeCaret(textEl) { - if (textEl.createTextRange) { textEl.caretPos = document.selection.createRange().duplicate(); } -} - -function colorPalette(dir, width, height) -{ - var r = 0, g = 0, b = 0; - var numberList = new Array(6); - numberList[0] = "00"; - numberList[1] = "40"; - numberList[2] = "80"; - numberList[3] = "BF"; - numberList[4] = "FF"; - document.writeln(''); - for(r = 0; r < 5; r++) - { - if (dir == 'h') - { - document.writeln(''); - } - for(g = 0; g < 5; g++) - { - if (dir == 'v') - { - document.writeln(''); - } - for(b = 0; b < 5; b++) - { - color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]); - document.write(''); - } - if (dir == 'v') - { - document.writeln(''); - } - } - if (dir == 'h') - { - document.writeln(''); - } - } - document.writeln('
'); - document.write('#' + color + ''); - document.writeln('
'); -} \ No newline at end of file diff --git a/phpBB/adm/images/bg_header.jpg b/phpBB/adm/images/bg_header.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bcad88f588f39c18062d920e594921c1170c3233 GIT binary patch literal 18314 zcmeHPU2q%K6~3!~%ZeSvHVG-i2$95r%GUm9C9UE(wIw+=pa8ZL0xuc;tYrmBt4OQZ zNgp5~l+uUJBtR)lJI!C4wr~8G_5ny}p?xVypanV|n$S|(nKTI@DeZKso_lvCtrU}H zhw!%RxkvY&d(PQ&zx&<0E6?cG-mU!!Exv7RVhm9x3XQ`bs+}_LiqGd}5K1J_tq36p zvQtZt8EO>#A!<3Yk~%^u>MM={ras6{7Bc(*oU9*xbRc57PcEkaRf02OtD8@28ae z)@lgtH#Op$_M01ZVhFZ2%B<#S(~g6>u{jQEm3AC}iJC7pXlleZ-HvYz7odd^Q9f&0 zEU^w_c?P-2n6^X{$W;3W>LM+ac@TTn{($x%m&4)caJV`;T<%V1r@OD)&V^79`CkYtgUzNfoDc| zoht9%7oF-$R|4l(+HeB)Rs7Ktki?;-nfS(_ES_$p@c9|^H&dv+k6dPQPd8eJ&b%0U zb;Y9{{qMg~d+Y4>!$&&$2Og*$|8#s}!;%g6)llukr{7<)g+Bbf7i#a-&NzI{MZgWx zC_Flmu&g9Au$V}VzK-wKd zf}j*HCusxmu@5X>d^yQNz%_DD^F>^REc`Pw(31xVOAand)f{;0>4t_S`ujlEZFr&? zXllq9KZ7fo742k|+bRjJBW@%7PYeBkh+~hdt}tSi??hP*Ao1`(Bovrti_?3JvEmk(= z@2G$~)p8#z=>zo=D0b4Ah-qTmvt_ATYEjvwaxR-Iip6RHd|dG<9Q{tBgZ83iRhHI^ zMX{We#SAFW^p29K8aowZtie4Kg{%iYzU=XvtL6N3eDgHiN(C2#->OMevSN$Imdwl3 z$!v?RD=mVbI4@6B#-|f^q$DYi13K#J7UPatsl0O}pUc*f>Q)9nURQ&sJtNK}t9co! z9oxmSyny+py1Lc8GnI`>d8w=c*R8}KUEk;c7qmetVyru4sdQ&mu84JF;67&_h;*6O zm6Bv2)MffknBv)XbF%(c<6y`Ig<5xx)Rnd7CUr{PnR-c!JhF)wwnwJ=`l_!XSj*IY z(BF=h!Bft7Y#Wd5k1kz{$F{=An+OLtf&^9~)Qv`9tCwJ#7m)|u1)INwWGEF^6E{&3%hW`tSpxzet)qtn8dHpgK4SYpHG(j%pmPYL+j>C z$@KlA>`95RtFHB){lzO@PcF08dk>$W6Q!s)n;YL*7N>S@m`?A!KP_au>xP{}^O5;N zsUXTp&wL?YtVHJ5dP(pI)Un#{^$-*J{4l>`Vnt3C(_$lL`08S6{M493emrgs4g_SJ zeVhI&@VPQN?a)M`Wf2~-F(||M3)lcd53qr0`~{4U@S(5LY=ou>7+T9#C?W|dlbhMm z8iOY>@RvAk42@-b3?N)4DJQQgiq^I*4jB(T)8M%}OumaP{B2V+B-Qv@Pemr(n28d+ zJdg#EN&CgThBxZ;FP3^T#uvGsR-pI3MJvF+? z9@D~`MpuNqCcvbM!`zU6A+=_9n%(2MiY%3P_!}(0R`i#1GtG^tWi+_w@_}G&1YSE~ zLXvp<8D@t3m+3S^Abp!B#fp@#68jLW8JhMpSgNkt?snIEuk5PrZg*{ZZY<{HVOG6c zo4Va=0}N}s7|UhF3i$9rAIpcJgrNvNHpu$ePyh<(!T}%8(NGwugFejpSRv@+XvW7e zVJL!+XQ6N`=pasrh61)B+~%Pl3K!tmH6tTIj%Qgm7>~xek&$qSo+&07%Tg5hAm7ode8O(e`xh+!4U5{)7`(DRI96YycL5RovW zFk7Gj37SBdr-_8wggVS6NSOT)2i(9C>_G}xhQSgfz842f!4ltv0|sFUz95M&@F&0o zpchNX7NnvHk$M9^rcjqJo{3@D?yE$=mOV(%YaK40=kS1b{TN#LO_?X!7c+XT?pth zHrQprr3(RF#s<3#xO5?)%h+I-0hcZWbQv4$GT_pMfG%T$T?Smb5YT08u*-l;7XrGB z4R#rD=|Vu4vB53_E?o%dGB(&{z@-ZTUB(8x47hY5pv%}`mjRb91aui2>@wieg@7(& zgIxw(x)9K1Y_Q9KOBVvVj16`faOpxom$AVv11?<%=rX<{yPVBmI*LX3dE*@Xj!|>y z#@Fy~GRdJE7Bjv;T5NDSgw1ZXSgdx3&1SdR98O0ETn?v`oV20H%MRVJSgj7bquc51 z{=$cDz$q22hi)8%H0|0mH;~0@HrXho9=c(IlREGPX83CT^{$CB<3l%Wb~6Z5g)*7l z7G#A}H%9KZ^(5icjb3)|0ehcv=*21Sy41N9<=y93Mgvp(4nCW%9OYyEj~#k0xO6%r zA3Jf{vFf1?=d$bfJRToA{QRbq8&@y?|*@Ds}68=rIbMtFSl?EE*s`{SRz z`R>P`-6Blfo7?f|Q$Kn6*YEx9U$;hXyKn2xZ$16fpa16lzyDh~q{D2r!oeXHhuK^p z2WH@NLPo52L&mmkyY{jNo;lb1+VN92kM>Qb%ICQif#~k*_D!ukn11%Cy>fy-9eZf$ z^kZ-&$+GKL1>?*6GxEmJCx@Opw)&QnA70q=_~GYUQy$YC7@|Edq$TGoq}+P0$Hne< z4*qwfhD_Y8zy127N7wwI_SVJhkuy(qt*ITq_|g&ldE%12JOAdk4{9ebZE?N)#sjst YFC97ZWcY0Dol74aJNsndmD+p%1CYi*TmS$7 literal 0 HcmV?d00001 diff --git a/phpBB/adm/images/logo.gif b/phpBB/adm/images/logo.gif new file mode 100644 index 0000000000000000000000000000000000000000..f0fe5f1762c4b5ef2dd0aaaf33cf6678d4ae5ac8 GIT binary patch literal 7337 zcmWlc`9Bkm@V_b$40WTu6J~9J;hBK6a^I(mf24^Huu9#gX?ji)j+Sx_v5RwdBINziz|(dc#dJ zhpg&m`C~Kfq75}x{mRzX&wH}n2@)GT-N~6ZPWcb(Gh7{58J}L&thR=(Hv6?t{IGer zvYrPodNkEFSoiS>C#A8ozP9q+;)-$ph<09=WN`lSx4*O-HT%3{o=v`Ss8|Ya?EbjC zWqxP2ZQ|qD%!l6LDQ4}kO=g>DI;=C({cVO$XePZ9nbT9D&b)aWo>^sBj zY0MbDp&i@)>?dD0>ju}sD|z%HLXmxI=mui6Fa7Nst{Wq^=h-JI$5Vg$!i=xJG)(`T z^x%<@JTCC)d~oai){4z zM##mynu`S;;rT;N`HZ)3{TMVK$Tguu>eup9hzH5$rtC-g7p7~^0D|L#Ddiux19sE+{K9D<2_fSowUB^OL` z3XflRa^(cT3^gR0=P3oMp0FR&(WKtHa4G3s8BPaZ-J_1V-2OcA$y+y4h{!drcyaR* z^E1za>|5vC;&b<;;}_Vf4|d8SA>By<18)!6s7UbsuJV`x?q0Eb726=&%rMBRg6E9y zMHj|*OA&pWCLWzFKi&}5VeqkqclZ40-SC79lG z7Kr*Y@x^%f+ty!mQ|^x~{GLZ6wRb%~aOvy3N$-Ju`c%1 z;*n56bFbQ-=h}97n{}ODjHzbRplofF{Zq9|-P4P4r$&1-HI2)> zLpr#+~w*uJhfL=nA^rhlb5$ly5Qvy%U$<}OG-p$Pj>#8yuOgSky+wes2Lb%3}y z$h@sg7>CD#uA!wIH9cGwGmOrX%UPh2PC%yc8Li&-O8j z@}+AmIEEwW(;DV7uiIcZb6cgU7PG)gGCCQ|jbHE|l1b5_8AK!042DXccw7;CF{J|9uYwi+|D|9)<1;OP4#nI17a3r?@6|GOnh z+hc<*2|wkmxNz^mlkLNsqAO!_Y4ax7;NzlH=pmsQ$ms84l84!*0BTsrh6Er6)H=sh zzZ(c3S|R}iXFB(1%DD$weO>R^SSIYn4Y~Tap-F^39=v3{$2^OhtW^2JuaI1b`;d|n zWPybj2gxnA;*w&=`g{z_!J6^aX4*03xSceYKHUB)8{^+u$~yMN_Y6D{$JPea&_WRW zE!FX8x~H^-chOi(8uoOxh>g-pq~ylY+5?n9Nq-iMQmzXwBcm;7u| z3j{EU3I=@xIH0Pj=O!+w6k@G)ebqdtf1*ZO#yZ^zrs8 z3>G?!3YOmkfDo#gY)#X0KX;tAWZtaUDg_=8*~0DWukQRc|W2bjbl| zww?ryJUNea;A(4J=I$gX)FgW0GPspC6pbTGi{5fVJ42mKwBtTjo*h3a{i{R8;fkSS zveurCZ(=+%k8D=x@6T3s$S8ir%kZHyo>><{QSf>VSj+l}^h!ZW$O(}QU6lH;n3ZHU zT<5Oqm;@(?EAz3Fs!W2+%ftD_rDpS>J!IRG*foTepPZ5k0*t*ZxBIt6g>3%Qr!u`7 ziP!pw$as!}CX){Ttuc(*X%6mf^#lj}8+w9AwwX{!SuxZxT>=)H=g zpVijqGGI14cpzxc3S0Rq(;tCntGJQbP;RBNa(G3=TUz1+l_tc&@Og=nMHQI50Q>nj z7<|p8)GC>+sYgXeIS+l4Y9l9m%d)#r%m`iSEleDPhifPSe9@wuqSf$ZvZyn#0GgdS zxyMa-=~!sU-p8MGzYD-N5nFcQI#Yv?cX9M9)6)rN|A`-qCsq5iG&TNCr(wbg=^^0@xJm(p zxN_*d;=UkRSF!_%AppRbY*ZY>zEDvIBtw}_JoT+7Nxk%mk>&U2)-@RAlz2Otx?MYa z6iW}nk`NAi?<=N6j}ihGRP1b`?*pP5oB3FwIi;K6u7jd@bxm~bGwgR=!lX7@KFmylJ+P(+wUM&brV zmN(SPY0D#O1*D{(W_QrZCx*2Sch7~gBLf70q#cI+k-`oq zgM+)SO&g8KyMA*}N;xf8A#yN{Iaw@~&B^sL>R0~MtlnF+%O*HMD&(681WWG$oMBRx z$o(0oV`viE#{08w)by(?Gt!O1q^`6{|CF2LIMK}iWD0{wyQM$CF#I#>F8acx$w?3)I>RWlLR`;g&OkVU)$j%0w`1r3KD6$(_rUB zCN|^hs$}TDTc7}u0Z{<_$imERx<^$+_tKzUILx-Gjt&=IK|{~cC0E64br;B{2r&gf z=CC{*SRO*5WUBy{@1Q5u5Z8vt(#B5`6k-cIO6FYD2B`NeI#Z0M~IjeVehjr3Al7wfJWkv zBubHPsaNuGG4LV}@*(b+w(qg}6}|k28T{UigZ(D&qa;6qfad@PIVnUH9?*Ug!sQx7 zPeUR^B%7yN?`?Nat%FDk5F7w#NMJwO-aSH23#AlK86B5rtou#22 zDG~>6?Y}0J{JTbCuq5v>k$5I#oeT8DVb4<$9RiFM}=6v{xk@ zl4OSfXib2w3b3a-p`I*gyuhOLRmnARfIk-tp@0Sn=o;aE6aM}-9Ku2bx+uPGN|lP- zVa3lV7#fkROc!rD*qcJC%bt5%eZ6JnM7pD_W!4-Bau*nIsQk=30Cz>gy+DzOv&j|vB&@3WY zV5}yHWUJi10ae1GPg6m=C?Guo+^z5~n2AR4ftoY~iy5LMfJSmd9=FgP>_Zvyq5rg$ zx$A|x>4gIIs-AAp^g^w+j}`yzI|8Vx z5O|CyfvNP>nnlr$SSw7`ep;*zQmP9Kvku`}U*_Kl>#C)FfJE>ms%}-U+^zd!Qnw&; zzh2IJE|*ALm)xPD2So5AxcZ*Ya1|Q*?U?HED&MoBkf|1WtKNO#EO@lgF7c;rRP5=C zJ*QuFo$->2j*^dNwke!mvnBW0%^sJ3p%LGm$54)Gv|nmGd&EIJ+jyAG`1#D~M}}Nn zt}S=asgPVBqrKyIq)eW6S@)le$alCQz;scdO zO=@qN2>uP{wa&agF8_Cb^NiAiSNr9DB}vi*YTW?X*ShAAa{SJYxS7V1T+Ma<{#o@O zd4LNOKy7Vy@NacOg}q3HnG4U5HO~zE3{Qvx><|Di2uNAx!(gefZmF|gMj#ac_ze?# z^boLH&{FzA(N_aR-~z7$u~s~ZMdVq>Kdt8vwL51j+$y*AjdF%F;SD_)OR994C%!n} z>0*=O-CR7JhWQ78Uu#nwkZ)%Q6@JM_&QtR}*m%2=`zM$Z?4+^Yx6)?>T?v5Xzn4!cjO+xF>&SUiN^OtHB^Kh>o#hp`wyIisz#_ zrkx*I&?rr`Pm^OopRyej@RE$E4+g-O335Dy(}HYp+&|`a-PtjuQ%jNmO+{w;#F|w& z4IJuz7bW$#p$Oprhx+8=8g&$>UYnRA7N)A zj!L$$E{?HKU1CR%thP8ZT05kQLfMZLwckC!ZYK7D0MzjpyO)owCZF#rFZd}w z{96NEO#to{fYxx54+LTNDM*ww9BquK6Tn8=FOO<#z(X{W`=B4r5;X&fdvDx71CQP7 zr7|C&691RDcvR(F;OM)1#QrF)@m`{m81yAAm&J^8q5|B7kOBazfP#UFp~XxUJ3d6K z9UdqIUf?A_X$L1L=9XMbc^WK;22cRN?{Fnzf*^b$MBN?yU=tL_^~#VPu^5t=q@tRS zqTa- z)_E@rj9Pcs#wR6EfYsD|FRG-E(EYs+N{4(HDd<UF&}8y8&nTi8GsG-D=*TOG}b8gN-mRLIF}86 z{jXmA`30S_g^=D{-wwUFU>L0fzMGqAT&2k%&pA}c?Vr4+c{0mzQB?_$8bnPa(IDlr z@QoKKrIj$dafo7v+(#<11h4H!gFXT0MDS2098f$r@hS_AIYtc3>795s)CE<^75U-ESGzy&ppY^%~DRo6(l|Ot{Ss$=fwi=?*zf zfd?Y;ygeo@`)kG2duWD3}t39u2MO+{c4#UdAgX(YfFL=r_HKc9Bpk_u=&&F_+!THTyc zPh8P!%&6P`*i*5hQ$TD(jAMDZk943aOt>*^_Z{4)Ve+Q~i=_9KK71TpR}S*;UkTEM zV=Z1PBjPO2l+RUS!>|Hh|7A<&HtIU-$Qj2YpE%b&a1xusBWH2`kp%FN0R4mE>%j#! zi>|A^zk3n44oU~;}# zJHYa;S>M0?|91v@^W`oJUp9T>{#iwhjDsF&Kz*2)vRB!?I53fyC+G!6GeL-;96Am8 zP9*-N1GN_FuWdo|xX32jb;d)~zbk9Q0z}LnE~FMq;Tj{z=#8Lb*+00f9qu0WZSy3} zZqHmv9pBJvT607>A{Qy|im9(Mc*)SR-escG4B3;g+a?h$Ka5e8E}FAbL=M46P4!{{ zU`H}!YkQ9(3*{xI*UrQGnb=Hmz%~N&n+Ep*Ko!M#>s&GpTIhwfr4*>@cCB%>R z=$O(6AXRRspHp6ksgW*x#;tt94Pf%fbY`;A*j~5mO(Akca)%1Ti(0}*8m$kRHNI&( zvE2OlKCAvIO+f>{CT2~kHoE-`IoPAkF^5}!-Q><|DDIUCdfn*gf-96TKY*|ket2iJD@ggtjtn!t7|>Tg;jBgfp&a9(hMUb}un zzJA(NYzyUqV4v#BFvB_J2`!WEAu3_3pZDr-MO^RrJXqoU{i@-g_O-P_IgP#n3dybd z?=BK&a+{J0A*l%Hm@AvdNX@~&Q9+ny{8yxgaZM)yEw#=4iZ?6<7;t2-B8VKJh+K}o z639QDqY<8~jimn-RJ7eJt6AklaaNw?kR8hJR*@RX1IX(P`{s6T8*Yhf&jt3$`s7zc zq*Bh~g1`_wT{FkrG@j&!a&Y0N?Hw5Z*ziZ>|J~aBlSyRb_S+0#CavizAt`zPMcdcS&{z3POvmIAvZbC(u+*uKkxJ4mS?qxc0)1Q{w zcCOIgn$6M@pWDCu)^*|asWj`@hCyPQz0I)$KC6>)AB(GBwlX=cwtZb;4WT zTPr7|TG;IU-gs%vXWZED`!mSuhD;CBw9sz>duvNW9erF=*q?c7Wvw^!&`+Z@RN%Jm zP!|F;~< zjrF5H3H{U!Z5=Wz0ZOjUe0xe}l#TRAQJ5btOhk(=3NV#}wjz&I{!unGsL ibZt59R6j4+g#v$;sM9MFG%4BXOIN|SpFZXH^6lO literal 0 HcmV?d00001 diff --git a/phpBB/adm/images/spacer.gif b/phpBB/adm/images/spacer.gif new file mode 100644 index 0000000000000000000000000000000000000000..cd29009a65a4c35c56a9c296731e1ae8650fd789 GIT binary patch literal 807 zcmc(ev9VP_3`6y2UO*edqfQtYvn%VZ`yDQgw4er)UO?E4 zG}?&ude0I+aCWBTh&{G)+1Z^EH2%S&yR*F@2^#-k(M{6WB}?Lfl40@y3ddLk8ZD?9 zg$ociBaL=%^s=MQ51jIZB#U7`y9^j^TNb@FZ#UFVO{XJzi2OxCoPcgy&uO1 reI`&k%nR$;Tn^vIGfg}7`&jsession_begin(); +$auth->acl($user->data); +$user->setup('acp/common'); +// End session management + +// Did user forget to login? Give 'em a chance to here ... +if ($user->data['user_id'] == ANONYMOUS) +{ + login_box('', $user->lang['LOGIN_ADMIN'], $user->lang['LOGIN_ADMIN_SUCCESS'], true); +} + +// Have they authenticated (again) as an admin for this session? +if (!isset($user->data['session_admin']) || !$user->data['session_admin']) +{ + login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false); +} + +// Is user any type of admin? No, then stop here, each script needs to +// check specific permissions but this is a catchall if (!$auth->acl_get('a_')) { trigger_error($user->lang['NO_ADMIN']); } -// Define some vars -$pane = request_var('pane', ''); +// Some oft used variables +$safe_mode = (@ini_get('safe_mode') || @strtolower(ini_get('safe_mode')) == 'on') ? true : false; +$file_uploads = (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false; +$module_id = request_var('i', ''); +$mode = request_var('mode', ''); -// Generate relevant output -if ($pane == 'top') +$user->theme['primary']['pagination_sep'] = ''; + +// Set custom template for admin area +$template->set_custom_template($phpbb_admin_path . 'style', 'admin'); + +// Instantiate new module +$module = new p_master(); + +// Instantiate module system and generate list of available modules +$module->list_modules('acp'); + +// Select the active module +$module->set_active($module_id, $mode); + +// Assign data to the template engine for the list of modules +// We do this before loading the active module for correct menu display in trigger_error +$module->assign_tpl_vars("{$phpbb_admin_path}index.$phpEx$SID"); + +// Load and execute the relevant module +$module->load_active(); + +// Generate the page +adm_page_header($module->get_page_title()); + +$template->set_filenames(array( + 'body' => $module->get_tpl_name()) +); + +adm_page_footer(); + +// --------- +// FUNCTIONS +// +function adm_page_header($page_title) { - adm_page_header('', '', false); + global $config, $db, $user, $template; + global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID; -?> - - - - - - -
" target="_top">phpBB Logolang['ADMIN_TITLE']; ?>      
- -body {background-color: #98AAB1}', false); - - // Grab module information using Bart's "neat-o-module" system (tm) - $dir = @opendir('.'); - - $setmodules = 1; - while ($file = readdir($dir)) + if (defined('HEADER_INC')) { - if (preg_match('#^admin_(.*?)\.' . $phpEx . '$#', $file)) - { - include($file); - } + return; } - @closedir($dir); - - unset($setmodules); - -?> - - - - - -
- - - - - - - - - - $action_ary) - { - $cat = (!empty($user->lang[$cat . '_CAT'])) ? $user->lang[$cat . '_CAT'] : preg_replace('#_#', ' ', $cat); - -?> - - - - $file) - { - if (!empty($file)) - { - $action = (!empty($user->lang[$action])) ? $user->lang[$action] : preg_replace('#_#', ' ', $action); - - $row_class = ($row_class == 'row1') ? 'row2' : 'row1'; -?> - - - - -
» lang['RETURN_TO']; ?>
&pane=right" target="main">lang['ADMIN_INDEX']; ?>
" target="_top">lang['FORUM_INDEX']; ?>
»
- - -acl_get('a_user')) - { - trigger_error($user->lang['NO_ADMIN']); - } - - $sql = 'SELECT username - FROM ' . USERS_TABLE . " - WHERE user_id IN ($mark)"; - $result = $db->sql_query($sql); - - $user_affected = array(); - while ($row = $db->sql_fetchrow($result)) - { - $user_affected[] = $row['username']; - } - $db->sql_freeresult($result); - - if ($action == 'activate') - { - include($phpbb_root_path . 'includes/functions_user.php'); - $mark_ary = explode(', ', $mark); - - foreach ($mark_ary as $user_id) - { - user_active_flip($user_id, USER_INACTIVE); - } - } - else if ($action == 'delete') - { - $sql = 'DELETE FROM ' . USER_GROUP_TABLE . " WHERE user_id IN ($mark)"; - $db->sql_query($sql); - $sql = 'DELETE FROM ' . USERS_TABLE . " WHERE user_id IN ($mark)"; - $db->sql_query($sql); - add_log('admin', 'LOG_INDEX_' . strtoupper($action), implode(', ', $user_affected)); - } + define('HEADER_INC', true); - if ($action != 'delete') - { - set_config('num_users', $config['num_users'] + $db->sql_affectedrows(), true); - } - - break; - - case 'remind': - if (!$auth->acl_get('a_user')) - { - trigger_error($user->lang['NO_ADMIN']); - } - - if (empty($config['email_enable'])) - { - trigger_error($user->lang['EMAIL_DISABLED']); - } - - $sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey - FROM ' . USERS_TABLE . " - WHERE user_id IN ($mark)"; - $result = $db->sql_query($sql); - - if ($row = $db->sql_fetchrow($result)) - { - // Send the messages - include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx); - - $messenger = new messenger(); - - $board_url = generate_board_url() . "/ucp.$phpEx?mode=activate"; - $sig = str_replace('
', "\n", "-- \n" . $config['board_email_sig']); - - $usernames = array(); - do - { - $messenger->template('user_remind_inactive', $row['user_lang']); - - $messenger->replyto($config['board_email']); - $messenger->to($row['user_email'], $row['username']); - $messenger->im($row['user_jabber'], $row['username']); - - $messenger->assign_vars(array( - 'EMAIL_SIG' => $sig, - 'USERNAME' => $row['username'], - 'SITENAME' => $config['sitename'], - 'REGISTER_DATE' => $user->format_date($row['user_regdate']), - - 'U_ACTIVATE' => "$board_url&mode=activate&u=" . $row['user_id'] . '&k=' . $row['user_actkey']) - ); - - $messenger->send($row['user_notify_type']); - - $usernames[] = $row['username']; - } - while ($row = $db->sql_fetchrow($result)); - - $messenger->save_queue(); - - unset($email_list); - - add_log('admin', 'LOG_INDEX_REMIND', implode(', ', $usernames)); - unset($usernames); - } - $db->sql_freeresult($result); - break; - } - } - - switch ($action) + // gzip_compression + if ($config['gzip_compress']) { - case 'online': - if (!$auth->acl_get('a_defaults')) - { - trigger_error($user->lang['NO_ADMIN']); - } - - set_config('record_online_users', 1, true); - set_config('record_online_date', time(), true); - add_log('admin', 'LOG_RESET_ONLINE'); - break; - - case 'stats': - if (!$auth->acl_get('a_defaults')) - { - trigger_error($user->lang['NO_ADMIN']); - } - - $sql = 'SELECT COUNT(post_id) AS stat - FROM ' . POSTS_TABLE . ' - WHERE post_approved = 1'; - $result = $db->sql_query($sql); - - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - set_config('num_posts', (int) $row['stat'], true); - - $sql = 'SELECT COUNT(topic_id) AS stat - FROM ' . TOPICS_TABLE . ' - WHERE topic_approved = 1'; - $result = $db->sql_query($sql); - - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - set_config('num_topics', (int) $row['stat'], true); - - $sql = 'SELECT COUNT(user_id) AS stat - FROM ' . USERS_TABLE . ' - WHERE user_type IN (' . USER_NORMAL . ',' . USER_FOUNDER . ')'; - $result = $db->sql_query($sql); - - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - set_config('num_users', (int) $row['stat'], true); - - $sql = 'SELECT COUNT(attach_id) as stat - FROM ' . ATTACHMENTS_TABLE; - $result = $db->sql_query($sql); - - set_config('num_files', (int) $db->sql_fetchfield('stat', 0, $result), true); - $db->sql_freeresult($result); - - $sql = 'SELECT SUM(filesize) as stat - FROM ' . ATTACHMENTS_TABLE; - $result = $db->sql_query($sql); - - set_config('upload_dir_size', (int) $db->sql_fetchfield('stat', 0, $result), true); - $db->sql_freeresult($result); - - add_log('admin', 'LOG_RESYNC_STATS'); - break; - - case 'user': - if (!$auth->acl_get('a_defaults')) - { - trigger_error($user->lang['NO_ADMIN']); - } - - $post_count_ary = $auth->acl_getf('f_postcount'); - - $forum_ary = array(); - foreach ($post_count_ary as $forum_id => $allowed) - { - if ($allowed['f_postcount']) - { - $forum_ary[] = $forum_id; - } - } - - if (!sizeof($forum_ary)) - { - $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_posts = 0'); - } - else - { - $sql = 'SELECT COUNT(post_id) AS num_posts, poster_id - FROM ' . POSTS_TABLE . ' - WHERE poster_id <> ' . ANONYMOUS . ' - AND forum_id IN (' . implode(', ', $forum_ary) . ') - GROUP BY poster_id'; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $db->sql_query('UPDATE ' . USERS_TABLE . " SET user_posts = {$row['num_posts']} WHERE user_id = {$row['poster_id']}"); - } - $db->sql_freeresult($result); - } - - add_log('admin', 'LOG_RESYNC_POSTCOUNTS'); - break; - - case 'date': - if (!$auth->acl_get('a_defaults')) - { - trigger_error($user->lang['NO_ADMIN']); - } - - set_config('board_startdate', time() - 1); - add_log('admin', 'LOG_RESET_DATE'); - break; - } - - // Get forum statistics - $total_posts = $config['num_posts']; - $total_topics = $config['num_topics']; - $total_users = $config['num_users']; - $total_files = $config['num_files']; - - $start_date = $user->format_date($config['board_startdate']); - - $boarddays = (time() - $config['board_startdate']) / 86400; - - $posts_per_day = sprintf('%.2f', $total_posts / $boarddays); - $topics_per_day = sprintf('%.2f', $total_topics / $boarddays); - $users_per_day = sprintf('%.2f', $total_users / $boarddays); - $files_per_day = sprintf('%.2f', $total_files / $boarddays); - - $upload_dir_size = ($config['upload_dir_size'] >= 1048576) ? sprintf('%.2f ' . $user->lang['MB'], ($config['upload_dir_size'] / 1048576)) : (($config['upload_dir_size'] >= 1024) ? sprintf('%.2f ' . $user->lang['KB'], ($config['upload_dir_size'] / 1024)) : sprintf('%.2f ' . $user->lang['BYTES'], $config['upload_dir_size'])); - - $avatar_dir_size = 0; - - if ($avatar_dir = @opendir($phpbb_root_path . $config['avatar_path'])) - { - while ($file = readdir($avatar_dir)) + if (extension_loaded('zlib') && !headers_sent()) { - if ($file{0} != '.') - { - $avatar_dir_size += filesize($phpbb_root_path . $config['avatar_path'] . '/' . $file); - } - } - @closedir($avatar_dir); - - // This bit of code translates the avatar directory size into human readable format - // Borrowed the code from the PHP.net annoted manual, origanally written by: - // Jesse (jesse@jess.on.ca) - $avatar_dir_size = ($avatar_dir_size >= 1048576) ? sprintf('%.2f ' . $user->lang['MB'], ($avatar_dir_size / 1048576)) : (($avatar_dir_size >= 1024) ? sprintf('%.2f ' . $user->lang['KB'], ($avatar_dir_size / 1024)) : sprintf('%.2f ' . $user->lang['BYTES'], $avatar_dir_size)); - } - else - { - // Couldn't open Avatar dir. - $avatar_dir_size = $user->lang['NOT_AVAILABLE']; - } - - if ($posts_per_day > $total_posts) - { - $posts_per_day = $total_posts; - } - - if ($topics_per_day > $total_topics) - { - $topics_per_day = $total_topics; - } - - if ($users_per_day > $total_users) - { - $users_per_day = $total_users; - } - - if ($files_per_day > $total_files) - { - $files_per_day = $total_files; - } - - // DB size ... MySQL only - // This code is heavily influenced by a similar routine - // in phpMyAdmin 2.2.0 - if (preg_match('#^mysql#', SQL_LAYER)) - { - $result = $db->sql_query('SELECT VERSION() AS mysql_version'); - - if ($row = $db->sql_fetchrow($result)) - { - $version = $row['mysql_version']; - - if (preg_match('#^(3\.23|4\.)#', $version)) - { - $db_name = (preg_match('#^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)#', $version)) ? "`$dbname`" : $dbname; - - $sql = "SHOW TABLE STATUS - FROM " . $db_name; - $result = $db->sql_query($sql); - - $dbsize = 0; - while ($row = $db->sql_fetchrow($result)) - { - if ((isset($row['Type']) && $row['Type'] != 'MRG_MyISAM') || (isset($row['Engine']) && $row['Engine'] == 'MyISAM')) - { - if ($table_prefix != '') - { - if (strstr($row['Name'], $table_prefix)) - { - $dbsize += $row['Data_length'] + $row['Index_length']; - } - } - else - { - $dbsize += $row['Data_length'] + $row['Index_length']; - } - } - } - } - else - { - $dbsize = $user->lang['NOT_AVAILABLE']; - } - } - else - { - $dbsize = $user->lang['NOT_AVAILABLE']; + ob_start('ob_gzhandler'); } } - else if (preg_match('#^mssql#', SQL_LAYER)) + + $template->assign_vars(array( + 'PAGE_TITLE' => $page_title, + 'USERNAME' => $user->data['username'], + 'ROOT_PATH' => $phpbb_admin_path, + + 'U_LOGOUT' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=logout", + 'U_ADM_INDEX' => "{$phpbb_admin_path}index.$phpEx$SID", + 'U_INDEX' => "{$phpbb_root_path}index.$phpEx$SID", + + 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'], + 'S_CONTENT_ENCODING' => $user->lang['ENCODING'], + 'S_CONTENT_DIR_LEFT' => $user->lang['LEFT'], + 'S_CONTENT_DIR_RIGHT' => $user->lang['RIGHT'], + ) + ); + + if (!empty($config['send_encoding'])) { - $sql = 'SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize - FROM sysfiles'; - $result = $db->sql_query($sql); - - $dbsize = ($row = $db->sql_fetchrow($result)) ? intval($row['dbsize']) : $user->lang['NOT_AVAILABLE']; - } - else - { - $dbsize = $user->lang['NOT_AVAILABLE']; + header('Content-type: text/html; charset: ' . $user->lang['ENCODING']); } + header('Cache-Control: private, no-cache="set-cookie", pre-check=0, post-check=0'); + header('Expires: 0'); + header('Pragma: no-cache'); - if (is_int($dbsize)) - { - $dbsize = ($dbsize >= 1048576) ? sprintf('%.2f ' . $user->lang['MB'], ($dbsize / 1048576)) : (($dbsize >= 1024) ? sprintf('%.2f ' . $user->lang['KB'], ($dbsize / 1024)) : sprintf('%.2f ' . $user->lang['BYTES'], $dbsize)); - } - - adm_page_header($user->lang['ADMIN_INDEX']); - -?> - - - -

lang['WELCOME_PHPBB']; ?>

- -

lang['ADMIN_INTRO']; ?>

- -

lang['FORUM_STATS']; ?>

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lang['STATISTIC']; ?>lang['VALUE']; ?>lang['STATISTIC']; ?>lang['VALUE']; ?>
lang['NUMBER_POSTS']; ?>:lang['POSTS_PER_DAY']; ?>:
lang['NUMBER_TOPICS']; ?>:lang['TOPICS_PER_DAY']; ?>:
lang['NUMBER_USERS']; ?>:lang['USERS_PER_DAY']; ?>:
lang['NUMBER_FILES']; ?>:lang['FILES_PER_DAY']; ?>:
lang['BOARD_STARTED']; ?>:lang['AVATAR_DIR_SIZE']; ?>:
lang['DATABASE_SIZE']; ?>:lang['UPLOAD_DIR_SIZE']; ?>:
lang['GZIP_COMPRESSION']; ?>:lang['ON'] : $user->lang['OFF']; ?>  
 
- -

lang['ADMIN_LOG']; ?>

- -

lang['ADMIN_LOG_INDEX_EXPLAIN']; ?>

- - - - - - - - - - - - - - - -acl_get('a_user')) - { - -?> -
lang['USERNAME']; ?>lang['IP']; ?>lang['TIME']; ?>lang['ACTION']; ?>
format_date($log_data[$i]['time']); ?>
- -

lang['INACTIVE_USERS']; ?>

- -

lang['INACTIVE_USERS_EXPLAIN']; ?>

- -
"> - - - - - -sql_query($sql); - - if ($row = $db->sql_fetchrow($result)) - { - do - { - $row_class = ($row_class == 'row1') ? 'row2' : 'row1'; - -?> - - - - - -sql_fetchrow($result)); - -?> - - - - - - - - -
lang['USERNAME']; ?>lang['JOINED']; ?>lang['MARK']; ?>
format_date($row['user_regdate']); ?>  
 
lang['NO_INACTIVE_USERS']; ?>
- - - - - -
lang['MARK_ALL']; ?> :: lang['UNMARK_ALL']; ?>
- -lang['ENCODING']); + global $db, $config, $template, $SID, $user, $auth, $starttime, $phpbb_root_path, $phpEx; - $adm_url = "index.$phpEx$SID&pane=right"; - - /* - // Allows non-admin pages to link to admin pages - // eg: http://forums.foo.com/adm/index.php?sid=&mod=admin_forums&f=1 - if (!empty($_GET['mod']) && preg_match('/admin_([a-z]+)/', $_GET['mod'], $m)) + // Output page creation time + if (defined('DEBUG')) { - if (file_exists($phpbb_root_path . 'adm/admin_' . $m[1] . '.' . $phpEx)) + $mtime = explode(' ', microtime()); + $totaltime = $mtime[0] + $mtime[1] - $starttime; + + if (!empty($_REQUEST['explain']) && $auth->acl_get('a_') && method_exists($db, 'sql_report')) { - $adm_url = 'admin_' . $m[1] . '.' . $phpEx . $SID; - $adm_url .= (!empty($_GET['mode'])) ? '&mode=' . htmlspecialchars($_GET['mode']) : ''; - $adm_url .= (!empty($_GET['f'])) ? '&f=' . intval($_GET['f']) : ''; - $adm_url .= (!empty($_GET['u'])) ? '&u=' . intval($_GET['u']) : ''; - $adm_url .= (!empty($_GET['g'])) ? '&g=' . intval($_GET['g']) : ''; + $db->sql_report('display'); + } + + $debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress']) ? 'On' : 'Off' ) . ' | Load : ' . (($user->load) ? $user->load : 'N/A'), $totaltime); + + if ($auth->acl_get('a_') && defined('DEBUG_EXTRA')) + { + if (function_exists('memory_get_usage')) + { + if ($memory_usage = memory_get_usage()) + { + global $base_memory_usage; + $memory_usage -= $base_memory_usage; + $memory_usage = ($memory_usage >= 1048576) ? round((round($memory_usage / 1048576 * 100) / 100), 2) . ' ' . $user->lang['MB'] : (($memory_usage >= 1024) ? round((round($memory_usage / 1024 * 100) / 100), 2) . ' ' . $user->lang['KB'] : $memory_usage . ' ' . $user->lang['BYTES']); + + $debug_output .= ' | Memory Usage: ' . $memory_usage; + } + } + + $debug_output .= ' | Explain'; } } - */ -?> - - -<?php echo $user->lang['ADMIN_TITLE']; ?> - - - " name="title" noresize marginwidth="0" marginheight="0" scrolling="NO"> - - " name="nav" marginwidth="3" marginheight="3" scrolling="yes"> - - - + $template->assign_vars(array( + 'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '', + 'S_COPYRIGHT_HTML' => $copyright_html, + 'VERSION' => $config['version'] + ) + ); - - <body bgcolor="white" text="#000000"> - <p><?php echo $user->lang['NO_FRAMES']; ?></p> - </body> - - -display('body'); + + // Unload cache, must be done before the DB connection if closed + if (!empty($cache)) + { + $cache->unload(); + } + + // Close our DB connection. + $db->sql_close(); exit; } -?> +function adm_back_link($u_action) +{ + return '

« Back to previous page'; +} + +function build_select($option_ary, $option_default = false) +{ + global $user; + + $html = ''; + foreach ($option_ary as $value => $title) + { + $selected = ($option_default !== false && $value == $option_default) ? ' selected="selected"' : ''; + $html .= ''; + } + + return $html; +} + +function h_radio($name, &$input_ary, $input_default = false, $id = false, $key = false) +{ + global $user; + + $html = ''; + $id_assigned = false; + foreach ($input_ary as $value => $title) + { + $selected = ($input_default !== false && $value == $input_default) ? ' checked="checked"' : ''; + $html .= ($html) ? '   ' : ''; + $html .= ' ' . $user->lang[$title]; + $id_assigned = true; + } + + return $html; +} + +function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars) +{ + global $user, $module; + + $tpl = ''; + $name = 'config[' . $config_key . ']'; + + switch ($tpl_type[0]) + { + case 'text': + case 'password': + $size = (int) $tpl_type[1]; + $maxlength = (int) $tpl_type[2]; + + $tpl = ''; + break; + + case 'dimension': + $size = (int) $tpl_type[1]; + $maxlength = (int) $tpl_type[2]; + + $tpl = ' x '; + break; + + case 'textarea': + $rows = (int) $tpl_type[1]; + $cols = (int) $tpl_type[2]; + + $tpl = ''; + break; + + case 'radio': + $key_yes = ($new[$config_key]) ? ' checked="checked"' : ''; + $key_no = (!$new[$config_key]) ? ' checked="checked"' : ''; + + $tpl_type_cond = explode('_', $tpl_type[1]); + $type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true; + + $tpl_no = ' ' . (($type_no) ? $user->lang['NO'] : $user->lang['DISABLED']); + $tpl_yes = ' ' . (($type_no) ? $user->lang['YES'] : $user->lang['ENABLED']); + + $tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . '  ' . $tpl_no : $tpl_no . '  ' . $tpl_yes; + break; + + case 'select': + case 'custom': + + $return = ''; + + if (isset($vars['method'])) + { + $call = array($module->module, $vars['method']); + } + else if (isset($vars['function'])) + { + $call = $vars['function']; + } + else + { + break; + } + + if (isset($vars['params'])) + { + $args = array(); + foreach ($vars['params'] as $value) + { + switch ($value) + { + case '{CONFIG_VALUE}': + $value = $new[$config_key]; + break; + + case '{KEY}': + $value = $key; + break; + } + + $args[] = $value; + } + } + else + { + $args = array($new[$config_key], $key); + } + + $return = call_user_func_array($call, $args); + + if ($tpl_type[0] == 'select') + { + $tpl = ''; + } + else + { + $tpl = $return; + } + + break; + + default: + break; + } + + if (isset($vars['append'])) + { + $tpl .= $vars['append']; + } + + return $tpl; +} + +?> \ No newline at end of file diff --git a/phpBB/adm/pagestart.php b/phpBB/adm/pagestart.php deleted file mode 100644 index a4eeff712c..0000000000 --- a/phpBB/adm/pagestart.php +++ /dev/null @@ -1,469 +0,0 @@ -session_begin(); -$auth->acl($user->data); -$user->setup('admin'); -// End session management - -// Did user forget to login? Give 'em a chance to here ... -if (!$user->data['is_registered']) -{ - if ($user->data['is_bot']) - { - redirect("../index.$phpEx$SID"); - } - - login_box('', $user->lang['LOGIN_ADMIN'], $user->lang['LOGIN_ADMIN_SUCCESS'], true); -} - -// Have they authenticated (again) as an admin for this session? -if (!$user->data['session_admin']) -{ - login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false); -} - -// Is user any type of admin? No, then stop here, each script needs to -// check specific permissions but this is a catchall -if (!$auth->acl_get('a_')) -{ - trigger_error($user->lang['NO_ADMIN']); -} - -// Some oft used variables -$safe_mode = (@ini_get('safe_mode') || @strtolower(ini_get('safe_mode')) == 'on') ? true : false; -$file_uploads = (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false; - - -// ----------------------------- -// Functions -function adm_page_header($sub_title, $meta = '', $table_html = true) -{ - global $config, $db, $user, $phpEx; - - define('HEADER_INC', true); - - // gzip_compression - if ($config['gzip_compress']) - { - if (extension_loaded('zlib') && !headers_sent()) - { - ob_start('ob_gzhandler'); - } - } - - header("Content-type: text/html; charset=" . $user->lang['ENCODING']); - -?> - - - - - - - - -<?php echo $config['sitename'] . ' - ' . $page_title; ?> - - - - - - - - - - -
»   
- - - - - -

- -unload(); - } - - // Close our DB connection. - $db->sql_close(); - -?> - -
- - - - -
- - - - - - - - - - -
">phpBB Logolang['ADMIN_TITLE']; ?>      
- - - -

- - - - - - - - -
- -
- - $var) - { - if (empty($var)) - { - continue; - } - - if (is_array($var)) - { - foreach ($var as $k => $v) - { - if (is_array($v)) - { - foreach ($v as $_k => $_v) - { - set_var($var[$k][$_k], $_v, 'string'); - $s_hidden_fields .= "'; - } - } - else - { - set_var($var[$k], $v, 'string'); - $s_hidden_fields .= "'; - } - } - } - else - { - set_var($var, $var, 'string'); - $s_hidden_fields .= ''; - } - unset($var_ary[$key]); - } - -?> - -

- -
- - - - - - - -


  
- - -
- -
- -'; - break; - - case 'dimension': - $size = (int) $tpl_type[1]; - $maxlength = (int) $tpl_type[2]; - - $tpl = ' x '; - break; - - case 'textarea': - $rows = (int) $tpl_type[1]; - $cols = (int) $tpl_type[2]; - - $tpl = ''; - break; - - case 'radio': - $key_yes = ($new[$config_key]) ? ' checked="checked"' : ''; - $key_no = (!$new[$config_key]) ? ' checked="checked"' : ''; - - $tpl_type_cond = explode('_', $tpl_type[1]); - $type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true; - - $tpl_no = '' . (($type_no) ? $user->lang['NO'] : $user->lang['DISABLED']); - $tpl_yes = '' . (($type_no) ? $user->lang['YES'] : $user->lang['ENABLED']); - - $tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . '  ' . $tpl_no : $tpl_no . '  ' . $tpl_yes; - break; - - case 'select': - eval('$s_options = ' . str_replace('{VALUE}', $new[$config_key], $options) . ';'); - $tpl = ''; - break; - - case 'custom': - eval('$tpl = ' . str_replace('{VALUE}', $new[$config_key], $options) . ';'); - break; - - default: - break; - } - - return $tpl; -} - - -/** -* @package acp -* General ACP module class -*/ -class module -{ - var $id = 0; - var $type; - var $name; - var $mode; - - // Private methods, should not be overwritten - function create($module_type, $module_url, $selected_mod = false, $selected_submod = false) - { - global $template, $auth, $db, $user, $config; - - $sql = 'SELECT module_id, module_title, module_filename, module_subs, module_acl - FROM ' . MODULES_TABLE . " - WHERE module_type = 'acp' - AND module_enabled = 1 - ORDER BY module_order ASC"; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - // Authorisation is required for the basic module - if ($row['module_acl']) - { - $is_auth = false; - - eval('$is_auth = (' . preg_replace(array('#acl_([a-z_]+)#e', '#cfg_([a-z_]+)#e'), array('$auth->acl_get("\\1")', '$config["\\1"]'), $row['module_acl']) . ');'); - - // The user is not authorised to use this module, skip it - if (!$is_auth) - { - continue; - } - } - - $selected = ($row['module_filename'] == $selected_mod || $row['module_id'] == $selected_mod || (!$selected_mod && !$i)) ? true : false; -/* - // Get the localised lang string if available, or make up our own otherwise - $template->assign_block_vars($module_type . '_section', array( - 'L_TITLE' => (isset($user->lang[strtoupper($module_type) . '_' . $row['module_title']])) ? $user->lang[strtoupper($module_type) . '_' . $row['module_title']] : ucfirst(str_replace('_', ' ', strtolower($row['module_title']))), - 'S_SELECTED' => $selected, - 'U_TITLE' => $module_url . '&i=' . $row['module_id']) - ); -*/ - if ($selected) - { - $module_id = $row['module_id']; - $module_name = $row['module_filename']; - - if ($row['module_subs']) - { - $j = 0; - $submodules_ary = explode("\n", $row['module_subs']); - foreach ($submodules_ary as $submodule) - { - $submodule = explode(',', trim($submodule)); - $submodule_title = array_shift($submodule); - - $is_auth = true; - foreach ($submodule as $auth_option) - { - if (!$auth->acl_get($auth_option)) - { - $is_auth = false; - } - } - - if (!$is_auth) - { - continue; - } - - $selected = ($submodule_title == $selected_submod || (!$selected_submod && !$j)) ? true : false; -/* - // Get the localised lang string if available, or make up our own otherwise - $template->assign_block_vars("{$module_type}_section.{$module_type}_subsection", array( - 'L_TITLE' => (isset($user->lang[strtoupper($module_type) . '_' . strtoupper($submodule_title)])) ? $user->lang[strtoupper($module_type) . '_' . strtoupper($submodule_title)] : ucfirst(str_replace('_', ' ', strtolower($submodule_title))), - 'S_SELECTED' => $selected, - 'U_TITLE' => $module_url . '&i=' . $module_id . '&mode=' . $submodule_title - )); -*/ - if ($selected) - { - $this->mode = $submodule_title; - } - - $j++; - } - } - } - - $i++; - } - $db->sql_freeresult($result); - - if (!$module_id) - { - trigger_error('MODULE_NOT_EXIST'); - } - - $this->type = $module_type; - $this->id = $module_id; - $this->name = $module_name; - } - - // Public methods to be overwritten by modules - function module() - { - // Module name - // Module filename - // Module description - // Module version - // Module compatibility - return false; - } - - function init() - { - return false; - } - - function install() - { - return false; - } - - function uninstall() - { - return false; - } -} -// End Functions -// ----------------------------- - -?> \ No newline at end of file diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html new file mode 100644 index 0000000000..3bf193089e --- /dev/null +++ b/phpBB/adm/style/acp_attachments.html @@ -0,0 +1,421 @@ + + + + +

{L_TITLE}

+ +

{L_TITLE_EXPLAIN}

+ + +
+

{L_WARNING}

+

{WARNING_MSG}

+
+ + + +
+

{L_NOTIFY}

+

{NOTIFY_MSG}

+
+ + + +

{L_UPLOADING_FILES}

+ + + :: {upload.FILE_INFO}
+ {upload.DENIED}{upload.ERROR_MSG}{L_SUCCESSFULLY_UPLOADED} +

+ + + + + + +
+
+ {L_ACP_ATTACHMENT_SETTINGS} +
+

{L_UPLOAD_DIR_EXPLAIN}
+
+
+
+

{L_DISPLAY_ORDER_EXPLAIN}
+
checked="checked" /> {L_DESCENDING}   checked="checked" /> {L_ASCENDING}
+
+
+

{L_ATTACH_QUOTA_EXPLAIN}
+
{S_QUOTA_SELECT}
+
+
+

{L_ATTACH_MAX_FILESIZE_EXPLAIN}
+
{S_MAX_FILESIZE_SELECT}
+
+
+

{L_ATTACH_MAX_PM_FILESIZE_EXPLAIN}
+
{S_MAX_PM_FILESIZE_SELECT}
+
+
+
+
+
+
+
+
+
+
+

{L_SECURE_DOWNLOADS_EXPLAIN}
+
checked="checked" /> {L_YES}   checked="checked" /> {L_NO}
+
+
+

{L_SECURE_ALLOW_DENY_EXPLAIN}
+
checked="checked" /> {L_ORDER_ALLOW_DENY}   checked="checked" /> {L_ORDER_DENY_ALLOW}
+
+
+

{L_SECURE_EMPTY_REFERER_EXPLAIN}
+
checked="checked" /> {L_YES}   checked="checked" /> {L_NO}
+
+
+ +
+ {L_SETTINGS_CAT_IMAGES} [{L_ASSIGNED_GROUP}: {ASSIGNED_GROUPS}] +
+

{L_DISPLAY_INLINED_EXPLAIN}
+
checked="checked" /> {L_YES}   checked="checked" /> {L_NO}
+
+ +
+

{L_CREATE_THUMBNAIL_EXPLAIN}
+
checked="checked" /> {L_YES}   checked="checked" /> {L_NO}
+
+
+

{L_MIN_THUMB_FILESIZE_EXPLAIN}
+
{L_BYTES}
+
+ +
+

{L_IMAGICK_PATH_EXPLAIN}
+
  [ {L_SEARCH_IMAGICK} ]
+
+
+

{L_MAX_IMAGE_SIZE_EXPLAIN}
+
px X px
+
+
+

{L_IMAGE_LINK_SIZE_EXPLAIN}
+
px X px
+
+
+ +
+   + +
+ + +
+

{L_SECURE_DOWNLOAD_NOTICE}

+
+ + +
+ {L_SECURE_TITLE} +

{L_DOWNLOAD_ADD_IPS_EXPLAIN}

+
+
+
+
+
+

{L_EXCLUDE_ENTERED_IP}
+
{L_YES}   {L_NO}
+
+
+ +
+ +
+ +
+ {L_REMOVE_IPS} + +

{L_DOWNLOAD_REMOVE_IPS_EXPLAIN}

+
+
+
+
+
+ +
+ +
+ + +

{L_NO_IPS_DEFINED}

+ + + +
+ + + + + + +
+
+ + + + {L_LEGEND} +
+
+
+
+
+

{L_SPECIAL_CATEGORY_EXPLAIN}
+
{S_CATEGORY_SELECT}
+
+
+
+
cecked="checked" />
+
+
+
+
checked="checked" />
+
+
+

{L_DOWNLOAD_MODE_EXPLAIN}
+
{S_DOWNLOAD_SELECT}
+
+
+
+
+
 src="{PHPBB_ROOT_PATH}images/spacer.gif"src="{UPLOAD_ICON_SRC}" name="image_upload_icon" alt="" title="" /> 
+
+
+
+
{S_EXT_GROUP_SIZE}
+
+
+
+
{ASSIGNED_EXTENSIONS}
[{L_GO_TO_EXTENSIONS} ]
+
+
+
+

{L_ALLOWED_FORUMS_EXPLAIN}
+
checked="checked" /> {L_ALLOW_ALL_FORUMS}   checked="checked" /> {L_ALLOW_SELECTED_FORUMS}
+
+
+
+ +
+   + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
{L_EXTENSION_GROUP}{L_SPECIAL_CATEGORY}{L_OPTIONS}
 
{groups.GROUP_NAME}{groups.CATEGORY} {L_EDIT} | {L_DELETE} | {groups.L_ACT_DEACT} 
+ +
+
+ {L_CREATE_GROUP}: + +
+
+ + + + + +
+
+ {L_ADD_EXTENSION} +
+
+
+
+
+
+
{GROUP_SELECT_OPTIONS}
+
+
+ +
+ +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
{L_EXTENSION}{L_EXTENSION_GROUP}{L_DELETE}
 
{extensions.EXTENSION}{extensions.GROUP_OPTIONS}
+ +
+   + +
+ +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
{L_FILENAME}{L_FILESIZE}{L_ATTACH_POST_ID}{L_ATTACH_TO_POST}{L_DELETE}
{orphan.FILE}{orphan.FILESIZE}ID:
 {L_MARK_ALL} :: {L_UNMARK_ALL}{L_MARK_ALL} :: {L_UNMARK_ALL}
+ +
+   + +
+ +
+ + + + \ No newline at end of file diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html new file mode 100644 index 0000000000..9a8f5fdc38 --- /dev/null +++ b/phpBB/adm/style/acp_ban.html @@ -0,0 +1,111 @@ + + + + +

{L_ACP_BAN_EXPLAIN}

+ +

{L_TITLE}

+ +

{L_EXPLAIN}

+ + + +
+ +
+ {L_TITLE} +
+
+
+
[ {L_FIND_USERNAME} ]
+
+
+
+
+
(YYYY-MM-DD)
+
+
+

{L_BAN_EXCLUDE_EXPLAIN}
+
{L_YES}   {L_NO}
+
+
+
+
+
+
+
+
+
+
+ +
+   + +
+ +

{L_UNBAN_TITLE}

+ +

{L_UNBAN_EXPLAIN}

+ +
+ {L_UNBAN_TITLE} + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+   + +
+ + + +

{L_NO_BAN_CELL}

+ + + +
+ + \ No newline at end of file diff --git a/phpBB/adm/style/acp_bbcodes.html b/phpBB/adm/style/acp_bbcodes.html new file mode 100644 index 0000000000..5caf3391ec --- /dev/null +++ b/phpBB/adm/style/acp_bbcodes.html @@ -0,0 +1,96 @@ + + + + + + + « {L_BACK} + +

{L_ACP_BBCODES}

+ +

{L_ACP_BBCODES_EXPLAIN}

+ +
+ +
+ {L_BBCODE_USAGE} +

{L_BBCODE_USAGE_EXPLAIN}

+
+


{L_BBCODE_USAGE_EXAMPLE}
+
+
+
+ +
+ {L_HTML_REPLACEMENT} +

{L_HTML_REPLACEMENT_EXPLAIN}

+
+


{L_HTML_REPLACEMENT_EXAMPLE}
+
+
+
+ +
+   + +
+ + + + + + + + + + + + + + + + + + + + + + +
{L_TOKENS}
{L_TOKENS_EXPLAIN}
{L_TOKEN}{L_TOKEN_DEFINITION}
{token.TOKEN}{token.EXPLAIN}
+ +
+ + + +

{L_ACP_BBCODES}

+ +

{L_ACP_BBCODES_EXPLAIN}

+ + + + + + + + + + + + + + + + +
{L_BBCODE_TAG}{L_ACTION}
{bbcodes.BBCODE_TAG}{L_EDIT} | {L_DELETE}
+ +
+ +
+ +
+ +
+ + + + \ No newline at end of file diff --git a/phpBB/adm/style/acp_board.html b/phpBB/adm/style/acp_board.html new file mode 100644 index 0000000000..a5cc3363df --- /dev/null +++ b/phpBB/adm/style/acp_board.html @@ -0,0 +1,41 @@ + + + + +

{L_TITLE}

+ +

{L_TITLE_EXPLAIN}

+ +
+ + + + + + +
+ {options.LEGEND} + + +
+

{options.TITLE_EXPLAIN}
+
{options.CONTENT}
+
+ + + + + + {auth_tpl.TPL} + + +
+ +
+   + +
+ +
+ + \ No newline at end of file diff --git a/phpBB/adm/style/acp_bots.html b/phpBB/adm/style/acp_bots.html new file mode 100644 index 0000000000..d6a589838c --- /dev/null +++ b/phpBB/adm/style/acp_bots.html @@ -0,0 +1,101 @@ + + + + + + + « {L_BACK} + +

{L_TITLE}

+ +

{L_BOT_EDIT_EXPLAIN}

+ + +
+

{L_WARNING}

+

{ERROR_MSG}

+
+ + +
+ +
+ {L_TITLE} +
+

{L_BOT_NAME_EXPLAIN}
+
+
+
+

{L_BOT_STYLE_EXPLAIN}
+
+
+
+

{L_BOT_LANG_EXPLAIN}
+
+
+
+
+
+
+
+

{L_BOT_AGENT_EXPLAIN}
+
+
+
+

{L_BOT_IP_EXPLAIN}
+
+
+
+ +
+   + +
+ +
+ + + +

{L_BOTS}

+ +

{L_BOTS_EXPLAIN}

+ +
+ + + + + + + + + + + + + + + + + + + + + + +
{L_BOT_NAME}{L_BOT_LAST_VISIT}{L_OPTIONS}{L_MARK}
{bots.BOT_NAME} {bots.LAST_VISIT}  {bots.L_ACTIVATE_DEACTIVATE}  {L_EDIT}  {L_DELETE} 
+ +
+ +
+ +
+ + +
+ +
+ + + + \ No newline at end of file diff --git a/phpBB/adm/style/acp_disallow.html b/phpBB/adm/style/acp_disallow.html new file mode 100644 index 0000000000..e5e63c6aae --- /dev/null +++ b/phpBB/adm/style/acp_disallow.html @@ -0,0 +1,47 @@ + + + + +

{L_ACP_DISALLOW_USERNAMES}

+ +

{L_ADD_DISALLOW_EXPLAIN}

+ +
+ +
+ {L_ADD_DISALLOW_TITLE} +
+

{L_ADD_DISALLOW_EXPLAIN}
+
+
+
+ +
+ +
+ +

{L_DELETE_DISALLOW_TITLE}

+ +

{L_DELETE_DISALLOW_EXPLAIN}

+ +
+ {L_DELETE_DISALLOW_TITLE} + +
+
+
+
+
+ +
+ +
+ + +

{L_NO_DISALLOWED}

+ + + +
+ + \ No newline at end of file diff --git a/phpBB/adm/style/acp_email.html b/phpBB/adm/style/acp_email.html new file mode 100644 index 0000000000..25acf70a98 --- /dev/null +++ b/phpBB/adm/style/acp_email.html @@ -0,0 +1,54 @@ + + + + +

{L_ACP_MASS_EMAIL}

+ +

{L_ACP_MASS_EMAIL_EXPLAIN}

+ + +
+

{L_WARNING}

+

{WARNING_MSG}

+
+ + +
+ +
+ {L_COMPOSE} +
+
+
+
+
+

{L_SEND_TO_USERS_EXPLAIN}
+
+
[ {L_FIND_USERNAME} ]
+
+
+
+
+
+
+

{L_MASS_MESSAGE_EXPLAIN}
+
+
+
+
+
+
+
+
+
+
+
+ +
+   + +
+ +
+ + \ No newline at end of file diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html new file mode 100644 index 0000000000..ec8fc3b268 --- /dev/null +++ b/phpBB/adm/style/acp_forums.html @@ -0,0 +1,347 @@ + + + + + + + + + « {L_BACK} + +

{L_TITLE} :: {FORUM_NAME}

+ +

{L_FORUM_EDIT_EXPLAIN}

+ + +
+

{L_WARNING}

+

{ERROR_MSG}

+
+ + +
+ +
+ {L_FORUM_SETTINGS} +
+
+
+
+ +
style="display: none;"> +
+
+
{L_DELETE_ALL_POSTS}
+
{L_MOVE_POSTS_TO}
+
+
+ +
+
+
+
+
+
+
+
+
+

{L_FORUM_DESC_EXPLAIN}
+
+
+
+

{L_FORUM_IMAGE_EXPLAIN}
+
+ +
{L_FORUM_IMAGE}
+ +
+
+
+
+
+
+ +
style="display: none;"> +
+ {L_GENERAL_FORUM_SETTINGS} +
+

{L_DISPLAY_ACTIVE_TOPICS_EXPLAIN}
+
id="display_active" checked="checked" /> {L_YES}   id="display_active" checked="checked" /> {L_NO}
+
+
+
+ +
style="display: none;"> +
+ {L_GENERAL_FORUM_SETTINGS} +
+
+
+
+
+

{L_ENABLE_INDEXING_EXPLAIN}
+
id="enable_indexing" checked="checked" /> {L_YES}   id="enable_indexing" checked="checked" /> {L_NO}
+
+
+
+
id="enable_icons" checked="checked" /> {L_YES}   id="enable_icons" checked="checked" /> {L_NO}
+
+ +
+

{L_LIST_INDEX_EXPLAIN}
+
id="display_on_index" checked="checked" /> {L_YES}   id="display_on_index" checked="checked" /> {L_NO}
+
+ +
+

{L_ENABLE_RECENT_EXPLAIN}
+
id="display_recent" checked="checked" /> {L_YES}   id="display_recent" checked="checked" /> {L_NO}
+
+
+

{L_FORUM_AUTO_PRUNE_EXPLAIN}
+
id="enable_prune" checked="checked" /> {L_YES}   id="enable_prune" checked="checked" /> {L_NO}
+
+
+

{L_AUTO_PRUNE_FREQ_EXPLAIN}
+
{L_DAYS}
+
+
+

{L_AUTO_PRUNE_DAYS_EXPLAIN}
+
{L_DAYS}
+
+
+

{L_AUTO_PRUNE_VIEWED_EXPLAIN}
+
{L_DAYS}
+
+
+

{L_PRUNE_OLD_POLLS_EXPLAIN}
+
id="prune_old_polls" checked="checked" /> {L_YES}   id="prune_old_polls" checked="checked" /> {L_NO}
+
+
+
+
id="prune_announce" checked="checked" /> {L_YES}   id="prune_announce" checked="checked" /> {L_NO}
+
+
+
+
id="prune_sticky" checked="checked" /> {L_YES}   id="prune_sticky" checked="checked" /> {L_NO}
+
+
+

{L_FORUM_TOPICS_PAGE_EXPLAIN}
+
+
+
+

{L_FORUM_PASSWORD_EXPLAIN}
+
+
+
+

{L_FORUM_PASSWORD_CONFIRM_EXPLAIN}
+
+
+
+
+ + + +
style="display: none;"> +
+ {L_FORUM_RULES} +
+

{L_FORUM_RULES_LINK_EXPLAIN}
+
+
+ +
+
+
{FORUM_RULES_PREVIEW}
+
+ +
+

{L_FORUM_RULES_EXPLAIN}
+
+
checked="checked" /> {L_PARSE_BBCODE}   checked="checked" /> {L_PARSE_SMILIES}   checked="checked" /> {L_PARSE_URLS}
+
+
+
+ +
+   + +
+ +
+ + + + « {L_BACK} + +

{L_FORUM_DELETE}

+ +

{L_FORUM_DELETE_EXPLAIN}

+ + +
+

{L_WARNING}

+

{ERROR_MSG}

+
+ + +
+ +
+ {L_FORUM_DELETE} +
+
+
{FORUM_NAME}
+
+ +
+
+
{L_DELETE_ALL_POSTS}
+ +
{L_MOVE_POSTS_TO}
+ +
+ + +
+
+
{L_DELETE_SUBFORUMS}
+ +
{L_MOVE_SUBFORUMS_TO}
+ +
+ +
+ +
+ +
+ +
+ + + +

{L_FORUM_ADMIN}

+ +

{L_FORUM_ADMIN_EXPLAIN}

+ + +
+

{L_WARNING}

+

{ERROR_MSG}

+
+ + + +
+

{L_NOTIFY}

+

{L_FORUM_RESYNCED}

+
+ + + + + + + + +
{NAVIGATION} [{L_EDIT} | {L_DELETE} | {L_RESYNC}]
+ + + + + + + + + + + + + + +
{forums.FOLDER_IMAGE} + {forums.FORUM_NAME}{forums.FORUM_NAME} +
{forums.FORUM_DESCRIPTION} +

{L_TOPICS}: {forums.FORUM_TOPICS} / {L_POSTS}: {forums.FORUM_POSTS} +
{L_MOVE_UP}
{L_MOVE_DOWN}
  + {L_EDIT} | {L_DELETE} + | {L_RESYNC} +  
+ + +
+ +
+ + + + +
+ +
+ +
+ +
+ {L_SELECT_FORUM}: + + +
+ +
+ + + + \ No newline at end of file diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html new file mode 100644 index 0000000000..002ff2eca3 --- /dev/null +++ b/phpBB/adm/style/acp_groups.html @@ -0,0 +1,306 @@ + + + + + + + « {L_BACK} + +

{L_ACP_GROUPS_MANAGE}

+ +

{L_GROUP_EDIT_EXPLAIN}

+ + +
+

{L_WARNING}

+

{ERROR_MSG}

+
+ + +
enctype="multipart/form-data"> + +
+ {L_GROUP_DETAILS} +
+
for="group_name">{L_GROUP_NAME}:
+
{GROUP_NAME}
+
+
+
+
+
+ +
+

{L_GROUP_TYPE_EXPLAIN}
+
+ {L_GROUP_OPEN}   + {L_GROUP_REQUEST}   + {L_GROUP_CLOSED}   + {L_GROUP_HIDDEN} +
+
+ +
+ +
+ {L_GROUP_SETTINGS_SAVE} +
+
+
+
+
+

{L_GROUP_MESSAGE_LIMIT_EXPLAIN}
+
+
+
+

{L_GROUP_COLOR_EXPLAIN}
+
  [ {L_COLOUR_SWATCH} ]
+
+
+
+
+
+
+ +
+ {L_GROUP_AVATAR} +
+

{L_AVATAR_EXPLAIN}
+
{AVATAR_IMAGE}
+
 {L_DELETE_AVATAR}
+
+ + +
+
+
+
+
+

{L_UPLOAD_AVATAR_URL_EXPLAIN}
+
+
+ +
+

{L_LINK_REMOTE_AVATAR_EXPLAIN}
+
+
+
+

{L_LINK_REMOTE_SIZE_EXPLAIN}
+
px X px
+
+ +
+
+
+
+ + +
+ +
+ {L_AVATAR_GALLERY} +
+
+
 
+
+
+ + + + + + + + + + + + + +
{avatar_row.avatar_column.AVATAR_NAME}
+
+
+ +
+ +
+ + + + +
+   + +
+ +
+ + + + « {L_BACK} + +

{L_GROUP_MEMBERS}

+ +

{L_GROUP_MEMBERS_EXPLAIN}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{L_USERNAME}{L_GROUP_DEFAULT}{L_JOINED}{L_POSTS}{L_MARK}
{L_GROUP_LEAD}
{leader.USERNAME}{L_YES}{L_NO}{leader.JOINED}{leader.USER_POSTS}
{L_GROUPS_NO_MODS}
{L_GROUP_APPROVED}
{L_GROUP_PENDING}
{member.USERNAME}{L_YES}{L_NO}{member.JOINED}{member.USER_POSTS}
{L_GROUPS_NO_MEMBERS}
+ + + +
+ {L_MARK_ALL} :: {L_UNMARK_ALL}
+ + + +
+ +

{L_ADD_USERS}

+ +

{L_ADD_USERS_EXPLAIN}

+ +
+ {L_ADD_USERS} +
+
+
{L_YES}   {L_NO}
+
+
+

{L_USER_GROUP_DEFAULT_EXPLAIN}
+
{L_YES}   {L_NO}
+
+
+

{L_USERNAMES_EXPLAIN}
+
+
[ {L_FIND_USERNAME} ]
+
+
+ +
+ +
+ +
+ + + +

{L_ACP_GROUPS_MANAGE}

+ +

{L_ACP_GROUPS_MANAGE_EXPLAIN}

+ +

{L_USER_DEF_GROUPS}

+ +

{L_USER_DEF_GROUPS_EXPLAIN}

+ +
+ + + + + + + + + + + + + + +
{L_MANAGE}{L_TOTAL_MEMBERS}{L_OPTIONS}
+ +
+ {L_CREATE_GROUP}: +
+ +

{L_SPECIAL_GROUPS}

+ +

{L_SPECIAL_GROUPS_EXPLAIN}

+ + + + + + + + + + + + + + + + + + + + + + +
{L_MANAGE}{L_TOTAL_MEMBERS}{L_OPTIONS}
{groups.GROUP_NAME}{groups.TOTAL_MEMBERS}{L_GROUP_DEFAULT}{L_EDIT}{L_DELETE}{L_DELETE}
+ +
+ + + + \ No newline at end of file diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html new file mode 100644 index 0000000000..8091ce9d79 --- /dev/null +++ b/phpBB/adm/style/acp_icons.html @@ -0,0 +1,165 @@ + + + + + + + « {L_BACK} + +

{L_TITLE}

+ +

{L_EXPLAIN}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{L_CONFIG}
{L_URL}{L_LOCATION}{L_SMILIES_CODE}{L_SMILIES_EMOTION}{L_WIDTH}{L_HEIGHT}{L_DISPLAY_ON_POSTING}{L_ORDER}{L_ADD}
[{items.IMG}] + + + + +
+ +
+   + +
+ +
+ + + + « {L_BACK} + +

{L_TITLE}

+ +

{L_EXPLAIN}

+ +
+ +
+ {L_IMPORT} + + +

{L_NO_PAK_OPTIONS}

+
+ + +
+
+
+
+

{L_CURRENT_EXPLAIN}
+
{L_KEEP_ALL}    {L_REPLACE_MATCHES}    {L_DELETE_ALL} 
+ + + +
+ +
+ + +
+ + + +

{L_TITLE}

+ +

{L_EXPLAIN}

+ + +
+

{L_NOTIFY}

+

{NOTICE}

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{L_TITLE}{L_CODE}{L_EMOTION}{L_ACTION}{L_REORDER}
{L_NOT_DISPLAYED}
{items.ALT_TEXT}{items.CODE}{items.EMOTION}{L_EDIT} | {L_DELETE}{L_MOVE_UP}
{L_MOVE_DOWN}
+ +
+ +
+     +
+ +
+ + + + \ No newline at end of file diff --git a/phpBB/adm/style/acp_jabber.html b/phpBB/adm/style/acp_jabber.html new file mode 100644 index 0000000000..6352720299 --- /dev/null +++ b/phpBB/adm/style/acp_jabber.html @@ -0,0 +1,53 @@ + + + + +

{L_ACP_JABBER_SETTINGS}

+ +

{L_ACP_JABBER_SETTINGS_EXPLAIN}

+ + +
+

{L_WARNING}

+

{WARNING_MSG}

+
+ + +
+ +
+ {L_ACP_JABBER_SETTINGS} +
+

{L_JAB_ENABLE_EXPLAIN}
+
checked="checked" /> {L_ENABLED}    checked="checked" /> {L_DISABLED}
+
+
+

{L_JAB_SERVER_EXPLAIN}
+
+
+
+

{L_JAB_PORT_EXPLAIN}
+
+
+
+

{L_JAB_USERNAME_EXPLAIN}
+
+
+
+
+
+
+
+

{L_JAB_RESOURCE_EXPLAIN}
+
+
+
+ +
+   + +
+ +
+ + \ No newline at end of file diff --git a/phpBB/adm/style/acp_language.html b/phpBB/adm/style/acp_language.html new file mode 100644 index 0000000000..2897abc2bf --- /dev/null +++ b/phpBB/adm/style/acp_language.html @@ -0,0 +1,201 @@ + + + + + + + « {L_BACK} + +

{L_SELECT_DOWNLOAD_FORMAT}

+ +
+ +
+ {L_DOWNLOAD_AS} +
+
+
{RADIO_BUTTONS}
+
+
+ +
+ +
+ +
+ + + + « {L_BACK} + +

{L_LANGUAGE_PACK_DETAILS}

+ +
+ +
+ {LANG_LOCAL_NAME} +
+
+
+
+
+
+
+
+
+
+
{LANG_ISO}
+
+
+
+
+
+
+ +
+ +
+ +
+ +

+ + +
+

{L_MISSING_FILES}

+

{MISSING_FILES}

+
+

+ + + +

{L_MISSING_LANG_VARIABLES}

+ +

{L_MISSING_VARS_EXPLAIN}

+ +
+ + + + + + + + + + + + + + + {missing.TPL} + + +
{L_LANGUAGE_KEY}{L_LANGUAGE_VARIABLE}
{missing.FILE}
+ +
+ +

+ + + + +

{L_LANGUAGE_ENTRIES}

+ +

{L_LANGUAGE_ENTRIES_EXPLAIN}

+ +
+ + +
+ +
+ + +
+   +
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + {TPL} + + + + + +
{L_FILE_CONTENTS}
{L_LANGUAGE_KEY}{L_LANGUAGE_VARIABLE}
{PRINT_MESSAGE}
{L_FILE_FROM_STORAGE}
  
  
+ +
+ + + +

{L_ACP_LANGUAGE_PACKS}

+ +

{L_ACP_LANGUAGE_PACKS_EXPLAIN}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{L_LANGUAGE_PACK_NAME}{L_LANGUAGE_PACK_LOCALNAME}{L_LANGUAGE_PACK_ISO}{L_LANGUAGE_PACK_USED_BY}{L_OPTIONS}
{L_INSTALLED_LANGUAGE_PACKS}
{lang.ENGLISH_NAME} {lang.TAG}{lang.LOCAL_NAME}{lang.ISO}{lang.USED_BY} {L_DOWNLOAD} | {L_DELETE}
{L_UNINSTALLED_LANGUAGE_PACKS}
{notinst.NAME}{notinst.LOCAL_NAME}{notinst.ISO}{L_INSTALL}
+ + + + \ No newline at end of file diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html new file mode 100644 index 0000000000..f92fdf3646 --- /dev/null +++ b/phpBB/adm/style/acp_logs.html @@ -0,0 +1,75 @@ + + + + +

{L_TITLE}

+ +

{L_EXPLAIN}

+ +
+ +
+ {L_DISPLAY_LOG}:  {S_LIMIT_DAYS} {L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR} + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{L_USERNAME}{L_IP}{L_TIME}{L_ACTION}{L_MARK}
{log.USERNAME}{log.IP}{log.DATE}{log.ACTION}
+ +
+

{L_NO_ENTRIES}

+
+ + + +
+ {L_SELECT_FORUM}: + +
+ + + +
+ {L_MARK_ALL} :: {L_UNMARK_ALL}
+   +   +
+ + +
+ + \ No newline at end of file diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html new file mode 100644 index 0000000000..e36d51bc31 --- /dev/null +++ b/phpBB/adm/style/acp_main.html @@ -0,0 +1,155 @@ + + + + +

{L_WELCOME_PHPBB}

+ +

{L_ADMIN_INTRO}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{L_FORUM_STATS}
{L_STATISTIC}{L_VALUE}{L_STATISTIC}{L_VALUE}
{L_NUMBER_POSTS}: {TOTAL_POSTS}{L_POSTS_PER_DAY}: {POSTS_PER_DAY}
{L_NUMBER_TOPICS}: {TOTAL_TOPICS}{L_TOPICS_PER_DAY}: {TOPICS_PER_DAY}
{L_NUMBER_USERS}: {TOTAL_USERS}{L_USERS_PER_DAY}: {USERS_PER_DAY}
{L_NUMBER_FILES}: {TOTAL_FILES}{L_FILES_PER_DAY}: {FILES_PER_DAY}
{L_BOARD_STARTED}: {START_DATE}{L_AVATAR_DIR_SIZE}: {AVATAR_DIR_SIZE}
{L_DATABASE_SIZE}: {DBSIZE}{L_UPLOAD_DIR_SIZE}: {UPLOAD_DIR_SIZE}
{L_GZIP_COMPRESSION}: {GZIP_COMPRESSION}  
+ +
+
+ + + +
+
+ + +

{L_ADMIN_LOG}

+ +

{L_ADMIN_LOG_INDEX_EXPLAIN}

+ + + + + + + + + + + + + + + + + + + + + +
{L_USERNAME}{L_IP}{L_TIME}{L_ACTION}
{log.USERNAME}{log.IP}{log.DATE}{log.ACTION}
+ + +

{L_INACTIVE_USERS}

+ +

{L_INACTIVE_USERS_EXPLAIN}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
{L_USERNAME}{L_JOINED}{L_MARK}
{inactive.USERNAME}{inactive.DATE}  
{L_NO_INACTIVE_USERS}
+ + +
+

Mark allUnmark all

+ + + +
+ + +
+ + + + \ No newline at end of file diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html new file mode 100644 index 0000000000..4aca37e524 --- /dev/null +++ b/phpBB/adm/style/acp_modules.html @@ -0,0 +1,190 @@ + + + + + + + + + « {L_BACK} + +

{L_TITLE} :: {MODULENAME}

+ +

{L_EDIT_MODULE_EXPLAIN}

+ + +
+

{L_WARNING}

+

{ERROR_MSG}

+
+ + +
+ +
+ {L_GENERAL_OPTIONS} +
+

+ {L_MODULE_LANGNAME_EXPLAIN}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
style="display: none;"> +
+

{L_MODULE_DISPLAYED_EXPLAIN}
+
+
+
+
+

+ {L_CHOOSE_MODULE_EXPLAIN}
+
+
+
+

+ {L_CHOOSE_MODE_EXPLAIN}
+
+
+
+
+ +
+ + + +   + +
+ +
+ + + +

{L_ACP_MODULE_MANAGEMENT}

+ +

{L_ACP_MODULE_MANAGEMENT_EXPLAIN}

+ + +
+

{L_WARNING}

+

{ERROR_MSG}

+
+ + + + + + + + +
{NAVIGATION} [{L_EDIT} | {L_DELETE} | {L_DISABLE}{L_ENABLE}]
+ + + + + + + + + + + + + + +
{modules.MODULE_IMAGE}{modules.MODULE_TITLE} [{L_HIDDEN_MODULE}]{L_MOVE_UP}
{L_MOVE_DOWN}
  + {L_EDIT} | {L_DELETE} | + {L_DISABLE}{L_ENABLE} +  
+ + +
+ +
+ + + + +
+ +
+ +
+ +
+ + + + +
+ +
+ +
+
+ {L_SELECT_MODULE}: + + +
+
+ + + + \ No newline at end of file diff --git a/phpBB/adm/style/acp_php_info.html b/phpBB/adm/style/acp_php_info.html new file mode 100644 index 0000000000..0baa7bd7e8 --- /dev/null +++ b/phpBB/adm/style/acp_php_info.html @@ -0,0 +1,11 @@ + + + + +

{L_ACP_PHP_INFO}

+ +

{L_ACP_PHP_INFO_EXPLAIN}

+ +{PHPINFO} + + \ No newline at end of file diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html new file mode 100644 index 0000000000..1cfa154da1 --- /dev/null +++ b/phpBB/adm/style/acp_profile.html @@ -0,0 +1,189 @@ + + + + + + + « {L_BACK} + +

{L_TITLE}

+ +

{L_EXPLAIN}

+ + +
+

{L_WARNING}

+

{ERROR_MSG}

+
+ + +
+ + + +
+ {L_TITLE} +
+

{L_FIELD_TYPE_EXPLAIN}
+
{FIELD_TYPE}
+
+
+

{L_FIELD_IDENT_EXPLAIN}
+
+
+
+ +
+ {L_LANG_SPECIFIC} +
+
+
+
+
+

{L_FIELD_DESCRIPTION_EXPLAIN}
+
+
+ +
+

{L_DEFAULT_VALUE_EXPLAIN}
+
+
+ + +
+

{L_LANG_OPTIONS_EXPLAIN}
+ +
+ +
{L_FIRST_OPTION}
+
{L_SECOND_OPTION}
+ +
+ +
+ +
+ {S_HIDDEN_FIELDS} + +
+ + + +
+ {L_TITLE} +
+

{L_REQUIRED_FIELD_EXPLAIN}
+
checked="checked" />
+
+
+
+
checked="checked" />
+
+
+

{L_HIDE_PROFILE_FIELD_EXPLAIN}
+
checked="checked" />
+
+
+

{L_EXCLUDE_FROM_VIEW_EXPLAIN}
+
checked="checked" />
+
+ +
+

{option.EXPLAIN}
+
{option.FIELD}
+
+ +
+ +
+ +
+ +
+ {S_HIDDEN_FIELDS} +   + +
+ +

+ +
+ {L_PREVIEW_PROFILE_FIELD} +

{USER_ERROR}

{L_EVERYTHING_OK}

+
+

{PREVIEW_LANG_EXPLAIN}
+
{PREVIEW_FIELD}
+
+
+ +
+ +
+ + + + +
+ {options.LANGUAGE} + +
+

{options.field.L_EXPLAIN}
+ {options.field.FIELD} +
+ +
+ + +
+ +
+ +
+ {S_HIDDEN_FIELDS} + +
+ + + +
+ + + +

{L_ACP_CUSTOM_PROFILE_FIELDS}

+ + + + + + + + + + + + + + + + + + + + + + + +
{L_FIELD_IDENT}{L_FIELD_TYPE}{L_OPTIONS}{L_REORDER}
{fields.FIELD_IDENT}{fields.FIELD_TYPE}{fields.L_ACTIVATE_DEACTIVATE}{L_EDIT}{L_EDIT}{L_DELETE}{L_MOVE_UP} | {L_MOVE_DOWN}
+ +
+ +
+ + +
+ +
+ + + + \ No newline at end of file diff --git a/phpBB/adm/style/acp_prune_forums.html b/phpBB/adm/style/acp_prune_forums.html new file mode 100644 index 0000000000..31be90427d --- /dev/null +++ b/phpBB/adm/style/acp_prune_forums.html @@ -0,0 +1,103 @@ + + + + + + +

{L_FORUM_PRUNE}

+ +

{L_PRUNE_SUCCESS}

+ + + + + + + + + + + + + + + + + + + + + + +
{L_FORUM}{L_TOPICS_PRUNED}{L_POSTS_PRUNED}
{pruned.FORUM_NAME}{pruned.NUM_TOPICS}{pruned.NUM_POSTS}
{L_NO_PRUNE}
+ + + +

{L_ACP_PRUNE_FORUMS}

+ +

{L_ACP_PRUNE_FORUMS_EXPLAIN}

+ +
+ +
+ {L_SELECT_FORUM} +
+
+
+
+ +
+ +
+ +
+ + + + « {L_BACK} + +

{L_ACP_PRUNE_FORUMS}

+ +

{L_ACP_PRUNE_FORUMS_EXPLAIN}

+ +

{L_FORUM}

+ +

{L_SELECTED_FORUMS}: {FORUM_LIST}

+ +
+ +
+ {L_FORUM_PRUNE} +
+
+
+
+
+
+
+
+
+

{L_PRUNE_OLD_POLLS_EXPLAIN}
+
{L_YES}   {L_NO}
+
+
+
+
{L_YES}   {L_NO}
+
+
+
+
{L_YES}   {L_NO}
+
+
+ +
+ {S_HIDDEN_FIELDS} + + +
+ +
+ + + + \ No newline at end of file diff --git a/phpBB/adm/style/acp_prune_users.html b/phpBB/adm/style/acp_prune_users.html new file mode 100644 index 0000000000..beb3d1a59a --- /dev/null +++ b/phpBB/adm/style/acp_prune_users.html @@ -0,0 +1,57 @@ + + + + +

{L_ACP_PRUNE_USERS}

+ +

{L_ACP_PRUNE_USERS_EXPLAIN}

+ +
+ +
+ {L_ACP_PRUNE_USERS} +
+
+
+
+
+
+
+
+
+

{L_JOINED_EXPLAIN}
+
+
+
+

{L_LAST_ACTIVE_EXPLAIN}
+
+
+
+
+
+
+
+

{L_SELECT_USERS_EXPLAIN}
+
+
[ {L_FIND_USERNAME} ]
+
+
+

{L_DELETE_USER_POSTS_EXPLAIN}
+
{L_YES}   {L_NO}
+
+
+

{L_DEACTIVATE_DELETE_EXPLAIN}
+
{L_DELETE_USERS}   {L_DEACTIVATE}
+
+
+ +
+ + +   + +
+ +
+ + \ No newline at end of file diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html new file mode 100644 index 0000000000..4cddd43636 --- /dev/null +++ b/phpBB/adm/style/acp_ranks.html @@ -0,0 +1,95 @@ + + + + + + + « {L_BACK} + + + +

{L_ACP_MANAGE_RANKS}

+ +

{L_ACP_RANKS_EXPLAIN}

+ +
+ +
+ {L_ACP_RANKS} +
+
+
+
+
+
+
+
+
+
+
+
checked="checked" />{L_YES}    checked="checked" /> {L_NO}
+
+
+ +
+ + +   + +
+ +
+ + + +

{L_ACP_MANAGE_RANKS}

+ +

{L_ACP_RANKS_EXPLAIN}

+ + + + + + + + + + + + + + + + + + + + +
{L_RANK_IMAGE}{L_RANK_TITLE}{L_RANK_MINIMUM}{L_ACTION}
{ranks.RANK_TITLE}  -  {ranks.RANK_TITLE}  -  {ranks.MIN_POSTS}{L_EDIT} | {L_DELETE}
+ +
+ +
+ +
+ +
+ + + + \ No newline at end of file diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html new file mode 100644 index 0000000000..4b980112d9 --- /dev/null +++ b/phpBB/adm/style/acp_users.html @@ -0,0 +1,442 @@ + + + + + + +

{L_USER_ADMIN}

+ +

{L_USER_ADMIN_EXPLAIN}

+ +
+ +
+ {L_SELECT_USER} +
+
+
+
[ {L_FIND_USERNAME} ]
+
+
+ +
+ +
+ +
+ + + + « {L_BACK} + +

{L_USER_ADMIN}

+ +

{L_USER_ADMIN_EXPLAIN}

+ +
+ +
+ {L_USER_ADMIN_MOVE_POSTS} +
+

{L_MOVE_POSTS_EXPLAIN}
+
+
+
+ +
+ +
+ +
+ + + + « {L_BACK} + +

{L_USER_ADMIN}

+ +

{L_USER_ADMIN_EXPLAIN}

+ + +
+

{L_WARNING}

+

{ERROR_MSG}

+
+ + +
+ +
+ {L_SELECT_FORM}: +
+ +
+ + + + + +
+ +
+ {L_ACP_USER_OVERVIEW} +
+

{L_NAME_CHARS_EXPLAIN}
+
+
+
+
+
{USER_REGISTERED}
+
+ +
+
+
{REGISTERED_IP}
+
[ {L_WHOIS} ]
+
+ +
+
+
{USER_LASTACTIVE}
+
+
+

{L_FOUNDER_EXPLAIN}
+
id="user_founder" checked="checked" disabled="disabled" /> {L_YES}  id="user_founder" checked="checked" disabled="disabled" /> {L_NO} 
+
+
+
+
+
+
+

{L_CONFIRM_EMAIL_EXPLAIN}
+
+
+
+

{L_CHANGE_PASSWORD_EXPLAIN}
+
+
+
+

{L_CONFIRM_PASSWORD_EXPLAIN}
+
+
+ +
+ +
+ {L_USER_TOOLS} +
+

{L_WARNINGS_EXPLAIN}
+
+
+
+
+
+
+
+

{L_DELETE_USER_EXPLAIN}
+
+
+
+ +
+ +
+ +
+ +
+ + + +
+ +
+ {L_DISPLAY_LOG}:  {S_LIMIT_DAYS} {L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR} + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{L_REPORT_BY}{L_IP}{L_TIME}{L_ACTION}{L_MARK}
{log.USERNAME}{log.IP}{log.DATE} + {log.ACTION} +
» [ {log.DATA} ] +
+ +
+

{L_NO_ENTRIES}

+
+ + + +
+ {L_MARK_ALL} :: {L_UNMARK_ALL}
+   +   +
+ + +

{L_ADD_FEEDBACK}

+ +

{L_ADD_FEEDBACK_EXPLAIN}

+ +
+ {L_ACP_USER_FEEDBACK} +
+
+
+
+ +
+ +
+ +
+ + + +
+ +
+ {L_USER_PROFILE} +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

{L_BIRTHDAY_EXPLAIN}
+
{L_DAY}: {L_MONTH}: {L_YEAR}:
+
+
+ + +
+ {L_USER_CUSTOM_PROFILE_FIELDS} + +
+

{profile_fields.LANG_EXPLAIN}
+
{profile_fields.FIELD}
+ +
{profile_fields.ERROR}
+ +
+ +
+ + +
+ +
+ +
+ + + +
+ +
+ {L_UCP_PREFS_PERSONAL} +
+
+
id="viewemail" checked="checked" />  {L_YES}   id="viewemail" checked="checked" />  {L_NO}
+
+
+
+
id="massemail" checked="checked" />  {L_YES}   id="massemail" checked="checked" />  {L_NO}
+
+
+

{L_ALLOW_PM_EXPLAIN}
+
id="allowpm" checked="checked" />  {L_YES}   id="allowpm" checked="checked" />  {L_NO}
+
+
+
+
id="hideonline" checked="checked" />  {L_YES}   id="hideonline" checked="checked" />  {L_NO}
+
+
+

{L_NOTIFY_METHOD_EXPLAIN}
+
id="notifymethod" checked="checked" />  {L_NOTIFY_METHOD_EMAIL}   id="notifymethod" checked="checked" disabled="disabled" />  {L_NOTIFY_METHOD_IM}   id="notifymethod" checked="checked" />  {L_NOTIFY_METHOD_BOTH}
+
+
+
+
id="notifypm" checked="checked" />  {L_YES}   id="notifypm" checked="checked" />  {L_NO}
+
+
+
+
id="popuppm" checked="checked" />  {L_YES}   id="popuppm" checked="checked" />{L_NO}
+
+
+

{L_REPORT_PM_NOTIFY_EXPLAIN}
+
id="report_pm_notify" checked="checked" />  {L_YES}   id="report_pm_notify" checked="checked" />  {L_NO}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
id="dst" checked="checked" />  {L_YES}   id="dst" checked="checked" />  {L_NO}
+
+
+

{L_BOARD_DATE_FORMAT_EXPLAIN}
+
+
style="display:none;">
+
+
+ +
+ {L_UCP_PREFS_POST} +
+
+
id="bbcode" checked="checked" />  {L_YES}   id="bbcode" checked="checked" />  {L_NO}
+
+
+
+
id="html" checked="checked" />  {L_YES}   id="html" checked="checked" />  {L_NO}
+
+
+
+
id="smilies" checked="checked" />  {L_YES}   id="smilies" checked="checked" />  {L_NO}
+
+
+
+
id="sig" checked="checked" />  {L_YES}   id="sig" checked="checked" />  {L_NO}
+
+
+
+
id="notify" checked="checked" />  {L_YES}   id="notify" checked="checked" />  {L_NO}
+
+
+ +
+ {L_UCP_PREFS_VIEW} +
+
+
id="view_images" checked="checked" />  {L_YES}   id="view_images" checked="checked" />  {L_NO}
+
+
+
+
id="view_flash" checked="checked" />  {L_YES}   id="view_flash" checked="checked" />  {L_NO}
+
+
+
+
id="view_smilies" checked="checked" />  {L_YES}   id="view_smilies" checked="checked" />  {L_NO}
+
+
+
+
id="view_sigs" checked="checked" />  {L_YES}   id="view_sigss" checked="checked" />  {L_NO}
+
+
+
+
id="view_avatars" checked="checked" />  {L_YES}   id="view_avatars" checked="checked" />  {L_NO}
+
+
+
+
id="view_wordcensor" checked="checked" />  {L_YES}   id="view_wordcensor" checked="checked" />  {L_NO}
+
+
+
+
{S_TOPIC_SORT_DAYS}
+
+
+
+
{S_TOPIC_SORT_KEY}
+
+
+
+
{S_TOPIC_SORT_DIR}
+
+
+
+
{S_POST_SORT_DAYS}
+
+
+
+
{S_POST_SORT_KEY}
+
+
+
+
{S_POST_SORT_DIR}
+
+
+ +
+ +
+ +
+ + + + \ No newline at end of file diff --git a/phpBB/adm/style/acp_words.html b/phpBB/adm/style/acp_words.html new file mode 100644 index 0000000000..b17e80a8e8 --- /dev/null +++ b/phpBB/adm/style/acp_words.html @@ -0,0 +1,72 @@ + + + + + + + « {L_BACK} + +

{L_ACP_WORDS}

+ +

{L_ACP_WORDS_EXPLAIN}

+ +
+ +
+ {L_EDIT_WORD} +
+
+
+
+
+
+
+
+ {S_HIDDEN_FIELDS} +
+ +
+   + +
+ +
+ + + +

{L_ACP_WORDS}

+ +

{L_ACP_WORDS_EXPLAIN}

+ + + + + + + + + + + + + + + + + + + +
{L_WORD}{L_REPLACEMENT}{L_ACTION}
{words.WORD}{words.REPLACEMENT} {L_EDIT}  {L_DELETE} 
+ +
+ +
+ {S_HIDDEN_FIELDS} + +
+ +
+ + + + \ No newline at end of file diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css new file mode 100644 index 0000000000..57703c4147 --- /dev/null +++ b/phpBB/adm/style/admin.css @@ -0,0 +1,794 @@ +/* phpBB 3.0 Admin Style Sheet +------------------------------------------------- + Author: subBlue (http://www.subBlue.com/) + (c) 2005 phpBB Group +-------------------------------------------------*/ + + + +/* General markup styles +---------------------------------------- */ +* { + margin: 0; + padding: 0; + font-size: 100%; +} + +body, div, p, th, td, li, dd { + font-size: x-small; + voice-family: "\"}\"" inherit; + font-size: small +} + +html>body, html>div, html>p, html>th, html>td, html>li, html>dd { + font-size: small +} + +body { + font-family: Verdana, Arial, Helvetica, sans-serif;; + color: #000; + background-image: url(../images/bg_header.jpg); + background-repeat: repeat-x; + background-color: #E4EDF0; + margin: 0; +} + +/* Always show a scrollbar for short pages - stops the jump when the scrollbar appears. non-ie browsers */ +html { + height: 100%; + margin-bottom: 1px; +} + +img { + border: 0; +} + +/* Adjust */ +#page-header h1 { + font-family: Verdana, Arial, Helvetica, sans-serif;; + font-size: 170%; + font-weight: normal; + color: #12749B; +} + +#content h1 { + font: bold 18pt 'Trebuchet MS', Verdana, sans-serif; + text-decoration: none; + line-height: 120%; + margin-bottom: 0px; +} + +h2, caption { + font: bold 12pt Arial, Helvetica, sans-serif; + text-decoration: none; + line-height: 120%; + text-align: left; + margin-top: 25px; +} + +p { + margin-bottom: 0.7em; + line-height: 140%; + font-size: 90%; +} + +hr { + border: 0 none; + border-top: 1px solid #999999; + margin-bottom: 5px; + padding-bottom: 5px; + height: 1px; +} + +.small { + font-size: 85%; +} + +/* General links */ +a:link, a:active, a:visited { + color: #006699; + text-decoration: none; +} + +a:hover { + color: #DD6900; + text-decoration: underline; +} + +/* Main blocks +---------------------------------------- */ +#page-header { + clear: both; + text-align: right; + font-size: 85%; + height: 60px; + + padding-right: 20px; +} + +#page-header p { + font-size: 100%; +} + +#page-body { + clear: both; + min-width: 700px; +} + +#page-footer { + clear: both; + font-size: 75%; + text-align: center; +} + +#logo { + float: left; + width: auto; + margin-left: 4px; + margin-bottom: 5px; +} + +#content { + padding: 30px 10px 10px 10px; +} + +#main { + float:left; + width: 76%; + margin-left: 3%; + min-height: 350px; +} + +* html #main { + height: 350px; +} + + +/* Tabbed menu + Based on: http://www.alistapart.com/articles/slidingdoors2/ +----------------------------------------*/ +#tabs { + line-height: normal; + margin-left: 27px; + margin-bottom: -5px; + min-width: 600px; +} + +* html #tabs { + width: 700px; +} + +#tabs ul { + list-style: none; +} + +#tabs li { + display: inline; + font-size: 85%; + font-weight: bold; + text-transform: capitalize; +} + +#tabs a { + float: left; + background-color: #C7D0D7; + margin-right: 2px; + padding-left: 7px; + text-decoration: none; + font-size: 100%; + position: relative; + border: solid 1px #A9B8C2; + background-image: url(../images/cellpic1.gif); +} + +#tabs a span { + float: left; + display: block; + padding: 7px 10px 4px 4px; + color: #006699; + white-space: nowrap; + font-family: Arial, Helvetica, sans-serif; + text-transform: uppercase; + font-weight: bold; + +} + +/* Commented Backslash Hack hides rule from IE5-Mac \*/ +#tabs a span { float:none; } +/* End hack */ + +#tabs a:hover { + background-color: #EFEFEF; +} + +#tabs #activetab a { + border: solid 1px #A9B8C2; + border-bottom: 1px solid #FFF; + background-color: #fff; + background-image: none; +} + +#tabs #activetab a span { + padding-bottom: 4px; + background-color: #fff; + color: #006699; +} + +#tabs #activetab a:hover { + color: #FFA34F; +} + + +/* box +---------------------------------------- */ +.box { + margin: 4px 20px; + padding: 1px; + min-width: 550px; + background-color: #FFFFFF; + border: solid 1px #A9B8C2; +} + +.innerbox { + background-color: #FFFFFF; +} + +/* Sub-navigation Menu +---------------------------------------- */ +#menu { + float: left; + width: 20%; + font-size: 100%; + padding: 0; + +} + +#menu p { + font-size: 85%; +} + +#menu ul { + margin:0; + padding:0; + list-style:none; + background-color: #ECECEC; + border: solid 1px #A9B8C2; +} + +/* Default list state */ +#menu li { + margin: 1px 0; + padding: 0; margin: 0; + font-size: 10px; + font-weight: bold; + display: inline; +} + +/* Link styles for the sub-section links */ +#menu li a, #menu li a:link, #menu li a:active, #menu li a:visited { + display: block; + padding: 2px 2px 2px 10px; + margin: 1px 0; + text-decoration:none; + font-weight: normal; + color: #006699; + font-weight: bold; +} + +#menu li a:active { + color: #000; + +} + + +#menu li a:hover { + text-decoration: underline; + color: #DD6900; +} + +#menu li.header { + display: block; + font-weight: bold; + color: #115098; + padding: 5px 0; + font-size: 11px; + font-family: Verdana; + text-align: center; + color: #FFA34F; + font-weight: bold; background-color: #006699; + background-image: url("../images/cellpic3.gif"); + background-repeat: repeat-x; +} + +#menu li#activemenu a, #menu li#activemenu a:link, #menu li#activemenu a:active, #menu li#activemenu a:visited { + text-decoration: none; + font-weight: bold; + color: #000; +} + +#menu li#activemenu a:hover { + text-decoration: none; + color: #000; +} + + +/* Table styles +---------------------------------------- */ + +table { + width: 100%; + 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; + background-image: url("../images/cellpic3.gif") !important; +} + +td { + text-align: left; + font-size: 85%; + padding: 4px; + line-height: 120%; +} + +.row1 { background-color: #EFEFEF; } +.row2 { background-color: #DEE3E7; } +.row3 { background-color: #D1D7DC; } +.col1 { background-color: #DEE3E7; } +.col2 { background-color: #EFEFEF; } + +.spacer { + background-color: #D1D7DC; + height: 1px; + line-height: 1px; +} + +/* General form styles +----------------------------------------*/ +fieldset { + margin: 15px 0; + padding: 10px; + border-top: 1px solid #D7D7D7; + border-right: 1px solid #CCCCCC; + border-bottom: 1px solid #CCCCCC; + border-left: 1px solid #D7D7D7; + background-color: #ECECEC; + position: relative; +} + +* html fieldset { + padding: 0 10px 5px 10px; +} + +fieldset p { + font-size: 85% !important; +} + +legend { + padding: 1px 0; + font-family: arial,Verdana,Sans-serif; + font-size: 12px; + font-weight: bold; + color: #006699; + position: relative; + text-transform: capitalize; + line-height: 100%; + top: 0em; + vertical-align:middle; +} + +/* Hide from macIE \*/ +legend { top: -1.2em; } +/* end */ + +* html legend { + margin-bottom: -10px; + margin-left: -7px; +} + +input { + font-family: Verdana, Helvetica, Arial, sans-serif; + font-size: 90%; + font-weight: normal; + cursor: pointer; + vertical-align: middle; +} + +optgroup, select { + font-family: Verdana, Helvetica, Arial, sans-serif; + font-size: 85%; + font-weight: normal; + font-style: normal; + cursor: pointer; + vertical-align: middle; + width: auto; +} + +optgroup { + font-size: 100%; + font-weight: bold; +} + +.sep { + color: white; + background-color: #006699; +} + +textarea { + font-family: Verdana, Helvetica, Arial, sans-serif; + font-size: 85%; + width: 60%; + padding: 2px; +} + +label { + cursor:pointer; + font-size: 85%; + padding-right: 5px; +} + +label input { + font-size: 100%; + vertical-align: middle; +} + +label img { + vertical-align: middle; +} + +fieldset.quick { + margin: 0 0 5px 0; + padding: 5px 0 0 0; + border: none; + background-color: transparent; + text-align: right; +} + +fieldset.nobg { + margin: 15px 0 0 0; + padding: 0; + border: none; + background-color: transparent; +} + +fieldset.display-options { + margin: 15px 0 2px 0; + padding: 0 0 4px 0; + border: none; + background-color: transparent; + text-align: center; + font-size: 75%; +} + +fieldset.display-options select, fieldset.display-options input, fieldset.display-options label { + font-size: 100%; + vertical-align: middle; +} + +select option.disabled { + background-color: #bbb; + color: #fff; +} + +/* Definition list layout for forms + Other general def. list properties defined in prosilver_main.css +---------------------------------------- */ +dl { + font-family: Verdana, Helvetica, Arial, sans-serif; + font-size: 100%; +} + +dt { + float: left; + width: auto; +} + +dd { color: #000; } +dd + dd { margin-top: 4px; } +dt span { padding-right: 5px; } + +dt label { + font-size: 100%; + text-align: left; + font-weight: bold; +} + +dd label { + font-size: 100%; + white-space: nowrap; + + margin-right: 10px; +} + +html>body dd label input { vertical-align: text-bottom; } /* Tweak for Moz to align checkboxes/radio buttons nicely */ +dd input, dd textarea { font-size: 90%; } + +dd select { + width: auto; + font-size: 100%; +} + +dd textarea { + width: 90%; +} + +fieldset dl { + font-size: 85%; + margin-bottom: 10px; +} + +fieldset dt { + width: 45%; + text-align: left; + border-right: 1px solid #CCC; + padding-top: 3px; +} + +fieldset dd { + margin-left: 45%; + padding-left: 5px; + font-size: 100% !important; + border-left: 1px solid #CCC; + vertical-align: top; +} + +dd.full { + margin-left: 0; + border: 0; + padding-left: 0; + padding-top: 3px; + text-align: center; + width: 95%; +} + +/* Hover highlights for form rows */ +fieldset dl:hover dt { + border-right-color: #ccc; +} + +fieldset dl:hover dd { + border-left-color: #ccc; +} + +fieldset dl dd label:hover { + color: #ccc; +} + +/* Submit button fieldset +---------------------------------------- */ +fieldset.submit-buttons { + text-align: center; + background-image: url(../images/cellpic1.gif); + margin: 0; + padding: 4px; + border: solid 1px #A9B8C2; + margin-top: -1px; +} + +fieldset.submit-buttons input { + padding: 3px 2px; +} + +/* Input field styles +---------------------------------------- */ +.inputbox { + border-left: 1px solid #AFAEAA; + border-top: 1px solid #AFAEAA; + border-right: 1px solid #D5D5C8; + border-bottom: 1px solid #D5D5C8; + background-color: #E3DFD8; + color: #111111; + font-size: 100%; + padding:2px; + cursor: text; + width: 75%; +} + +select.inputbox { + cursor: pointer; + padding: 0; + width: auto; +} + +.inputbox:hover { + border-left: 1px solid #AFAEAA; + border-top: 1px solid #AFAEAA; + border-right: 1px solid #AFAEAA; + border-bottom: 1px solid #AFAEAA; + background-color: #E9E9E2; +} + +.inputbox:focus { + border: 1px solid #BC2A4D; + background-color: #E9E9E2; + color: #BC2A4D; +} + +input.full, textarea.full { width: 99%; } +* html input.full, * html textarea.full { width: 95%; } +input.medium { width: 50%; } +input.narrow { width: 25%; } +input.tiny { width: 10%; } +input.autowidth { width: auto !important; } +.box2 .inputbox { background-color: #E9E9E9; } + +/* Pagination +---------------------------------------- */ +.pagination { + height: 1%; /* IE tweak (holly hack) */ + width: auto; + text-align: right; + margin-top: 5px; + font-size: 85%; + padding-bottom: 2px; +} + +.pagination strong, .pagination b { + font-weight: normal; +} + +.pagination span strong { + padding: 0 2px; + margin: 0 2px; + font-weight: normal; + color: #FFFFFF; + background: #069; + border: 1px solid #069; +} + +.pagination span a, .pagination span a:link, .pagination span a:visited, .pagination span a:active { + font-weight: normal; + text-decoration: none; + color: #5C758C; + margin: 0 2px; + padding: 0 2px; + background: #ECEDEE; + border: 1px solid #B4BAC0; +} + +.pagination span a:hover { + border-color: #069; + background: #069; + color: #FFF; + text-decoration: none; +} + +.pagination img { + vertical-align: middle; +} + +/* Form button styles +---------------------------------------- */ +a.button1, input.button1, input.button3, +a.button2, input.button2 { + width: auto !important; + padding: 1px 3px; + font-family: Verdana, Helvetica, Arial, sans-serif; + color: #000; + font-size: 85%; + background: #FAFAFA; +} + +a.button1, input.button1 { + font-weight: bold; + border: 1px solid #666666; +} + +/* Alternative button */ +a.button2, input.button2 { + border: 1px solid #666666; +} + +/* button in the style of the form buttons */ +a.button1, a.button1:link, a.button1:visited, a.button1:active, +a.button2, a.button2:link, a.button2:visited, a.button2:active { + text-decoration: none; + color: #000000; + padding: 4px 8px; +} + +/* Success highlighting +---------------------------------------- */ +.success { + color: #282 !important; +} + +.successbox { + padding: 0px; + margin: 37px 0; + font-size: 100%; + background-color: #ECECEC; + color: #282; + text-align: center; + font-weight: bold; +} + +* html .sucessbox { height: 1%; } /* Pixel shift fix for IE */ + +.successbox h3 { + font-size: 11px; + color: #FFA34F; + font-weight: bold; + background-color: #006699; + background-image: url('../images/cellpic3.gif'); + background-repeat: repeat-x; + padding: 5px 0; +} + +.successbox p { + margin: 20px; + font-size: 12px; +} + +.successbox a:link, .errorbox a:active, .errorbox a:visited { + text-decoration: none; +} + +.successbox a:hover { + text-decoration: none; +} + +/* Error highlighting +---------------------------------------- */ +.error { + color: #BC2A4D !important; +} + +.errorbox { + padding: 0px; + margin: 37px 0; + font-size: 100%; + background-color: #ECECEC; + color: #BC2A4D; + text-align: center; + font-weight: bold; +} + +* html .errorbox { height: 1%; } /* Pixel shift fix for IE */ + +.errorbox h3 { + font-size: 11px; + color: #FFA34F; + font-weight: bold; + background-color: #006699; + background-image: url('../images/cellpic3.gif'); + background-repeat: repeat-x; + padding: 5px 0; +} + +.errorbox p { + margin: 20px; + font-size: 12px; +} + +.errorbox a:link, .errorbox a:active, .errorbox a:visited { + text-decoration: none; +} + +.errorbox a:hover { + text-decoration: none; +} + +/* Nice method for clearing floated blocks without having to insert any extra markup + From http://www.positioniseverything.net/easyclearing.html */ +.clearfix:after, #tabs:after, .row:after, #content:after, fieldset dl:after, #page-body:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} +/* Hide from Mac IE, Windows IE uses this as it doesn't support the :after method above \*/ +* html .clearfix, * html #tabs, * html .row, * html #content, * html fieldset dl, #page-body { + height: 1%; +} +/* End hide */ diff --git a/phpBB/adm/style/confirm_body.html b/phpBB/adm/style/confirm_body.html new file mode 100644 index 0000000000..6c1894e748 --- /dev/null +++ b/phpBB/adm/style/confirm_body.html @@ -0,0 +1,20 @@ + + +
+ +
+

{MESSAGE_TITLE}

+

{MESSAGE_TEXT}

+ + {S_HIDDEN_FIELDS} + +
+   + +
+ +
+ +
+ + diff --git a/phpBB/adm/style/custom_profile_fields.html b/phpBB/adm/style/custom_profile_fields.html new file mode 100644 index 0000000000..9f3df63dae --- /dev/null +++ b/phpBB/adm/style/custom_profile_fields.html @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + {bool.options.VALUE}    + + checked="checked" /> + + + + + + + + + {L_DAY}: + {L_MONTH}: + {L_YEAR}: + diff --git a/phpBB/adm/style/message_body.html b/phpBB/adm/style/message_body.html new file mode 100644 index 0000000000..43021c341f --- /dev/null +++ b/phpBB/adm/style/message_body.html @@ -0,0 +1,8 @@ + + +
+

{MESSAGE_TITLE}

+

{MESSAGE_TEXT}

+
+ + \ No newline at end of file diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html new file mode 100644 index 0000000000..71c5d62315 --- /dev/null +++ b/phpBB/adm/style/overall_footer.html @@ -0,0 +1,34 @@ +

+ + + +
+ + + + + +
+ + + diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html new file mode 100644 index 0000000000..9f3ec05ec7 --- /dev/null +++ b/phpBB/adm/style/overall_header.html @@ -0,0 +1,103 @@ + + + + + + + +{META} +{PAGE_TITLE} + + + + + + + + + +
+
+ +
+ +
+
+
+ + +
+ + diff --git a/phpBB/adm/style/simple_body.html b/phpBB/adm/style/simple_body.html new file mode 100644 index 0000000000..0dd2fb7625 --- /dev/null +++ b/phpBB/adm/style/simple_body.html @@ -0,0 +1,8 @@ + + +
+

{MESSAGE_TITLE}

+

{MESSAGE_TEXT}

+
+ + \ No newline at end of file diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html new file mode 100644 index 0000000000..6fca6972c3 --- /dev/null +++ b/phpBB/adm/style/simple_footer.html @@ -0,0 +1,30 @@ + +

+
+ + + + + + + diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html new file mode 100644 index 0000000000..4aab5fe973 --- /dev/null +++ b/phpBB/adm/style/simple_header.html @@ -0,0 +1,63 @@ + + + + + + + +{META} +{PAGE_TITLE} + + + + + + + + +
diff --git a/phpBB/adm/subSilver.css b/phpBB/adm/subSilver.css deleted file mode 100644 index bfe1ccdd48..0000000000 --- a/phpBB/adm/subSilver.css +++ /dev/null @@ -1,217 +0,0 @@ -/* - $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: 0px; - border: 0px; - padding: 0px; - - scrollbar-face-color: #DEE3E7; - scrollbar-highlight-color: white; - scrollbar-shadow-color: #DEE3E7; - scrollbar-3dlight-color: #D1D7DC; - scrollbar-arrow-color: #006699; - scrollbar-track-color: #EFEFEF; - scrollbar-darkshadow-color: #98AAB1; -} - -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 -} - -.subtitle { - font: bold 12pt Arial, Helvetica, sans-serif; -} - -.blue { - color: #006699; -} - -.syntaxbg { color: #FFFFFF; } -.syntaxcomment { color: #FF8000; } -.syntaxdefault { color: #0000BB; } -.syntaxhtml { color: #000000; } -.syntaxkeyword { color: #007700; } -.syntaxstring { color: #DD0000; } - -/* - 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; -} -.forumlink { - font: bold 120% Verdana, Arial, Helvetica, sans-serif; -} -.name { - color: black; - font-size: 11px; -} -.postdetails { - color: black; - font-size: 10px; -} -.copyright { - color: #444444; - font: 8pt Verdana, Arial, Helvetica, sans-serif; - letter-spacing: -1px; -} -.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; -} - -th.menu { - text-align: left; -} - -td.cat { - height: 28px; - background-color: #D1D7DC; -} - -.row1 { - background-color: #EFEFEF; -} -.row2 { - background-color: #DEE3E7; -} -.row3 { - background-color: #D1D7DC; -} - -.sourcenum { - color: gray; - font-family: 'Courier New', monospace; - font-size: 9pt; - font-weight: bold; - line-height: 160%; -} -.source { - font-family: 'Courier New', monospace; - font-size: 9pt; - line-height: 160%; -} - - -/* - Misc -*/ -hr { - height: 0px; - border: solid #D1D7DC 0px; - border-top-width: 1px; -} - -/* - Forms -*/ -input { - text-indent: 2px; -} - -textarea, select, input.post, input.mainoption, input.liteoption { - border: 1px solid; -} - -input, textarea, select { - color: black; - font: normal 8pt Verdana, Arial, Helvetica, sans-serif; - border-color: black; -} - -input.text { - font-family: 'Courier New', courier; -} - -input.checkbox { - height: 16px; - width: 16px; -} - -option.sep { - color: white; - background-color: #006699; -} - -textarea.edit { - font: 9pt 'Courier New', courier; - line-height:125%; -} - -.btnmain { - background-color: #FAFAFA; - font-weight: bold; - border-width: 1px; -} - -.btnlite { - background-color: #FAFAFA; - font-weight: normal; - border-width: 1px; -} - -.helpline { background-color: #DEE3E7; border-style: none; } diff --git a/phpBB/adm/swatch.php b/phpBB/adm/swatch.php index fe43870a3d..8f73a93c06 100644 --- a/phpBB/adm/swatch.php +++ b/phpBB/adm/swatch.php @@ -1,10 +1,19 @@ - - + + + + + phpBB3 Color Swatch + - -