aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/adm')
-rw-r--r--phpBB/adm/admin_database.php994
-rw-r--r--phpBB/adm/admin_permissions.php1360
-rw-r--r--phpBB/adm/admin_search.php175
-rw-r--r--phpBB/adm/admin_styles.php3377
-rw-r--r--phpBB/adm/admin_users.php2057
-rw-r--r--phpBB/adm/editor.js306
-rw-r--r--phpBB/adm/images/bg_header.jpgbin0 -> 18314 bytes
-rw-r--r--phpBB/adm/images/logo.gifbin0 -> 7337 bytes
-rw-r--r--phpBB/adm/images/spacer.gifbin0 -> 807 bytes
-rw-r--r--phpBB/adm/index.php850
-rw-r--r--phpBB/adm/pagestart.php469
-rw-r--r--phpBB/adm/style/acp_attachments.html421
-rw-r--r--phpBB/adm/style/acp_ban.html111
-rw-r--r--phpBB/adm/style/acp_bbcodes.html96
-rw-r--r--phpBB/adm/style/acp_board.html41
-rw-r--r--phpBB/adm/style/acp_bots.html101
-rw-r--r--phpBB/adm/style/acp_disallow.html47
-rw-r--r--phpBB/adm/style/acp_email.html54
-rw-r--r--phpBB/adm/style/acp_forums.html347
-rw-r--r--phpBB/adm/style/acp_groups.html306
-rw-r--r--phpBB/adm/style/acp_icons.html165
-rw-r--r--phpBB/adm/style/acp_jabber.html53
-rw-r--r--phpBB/adm/style/acp_language.html201
-rw-r--r--phpBB/adm/style/acp_logs.html75
-rw-r--r--phpBB/adm/style/acp_main.html155
-rw-r--r--phpBB/adm/style/acp_modules.html190
-rw-r--r--phpBB/adm/style/acp_php_info.html11
-rw-r--r--phpBB/adm/style/acp_profile.html189
-rw-r--r--phpBB/adm/style/acp_prune_forums.html103
-rw-r--r--phpBB/adm/style/acp_prune_users.html57
-rw-r--r--phpBB/adm/style/acp_ranks.html95
-rw-r--r--phpBB/adm/style/acp_users.html442
-rw-r--r--phpBB/adm/style/acp_words.html72
-rw-r--r--phpBB/adm/style/admin.css794
-rw-r--r--phpBB/adm/style/confirm_body.html20
-rw-r--r--phpBB/adm/style/custom_profile_fields.html32
-rw-r--r--phpBB/adm/style/message_body.html8
-rw-r--r--phpBB/adm/style/overall_footer.html34
-rw-r--r--phpBB/adm/style/overall_header.html103
-rw-r--r--phpBB/adm/style/simple_body.html8
-rw-r--r--phpBB/adm/style/simple_footer.html30
-rw-r--r--phpBB/adm/style/simple_header.html63
-rw-r--r--phpBB/adm/subSilver.css217
-rw-r--r--phpBB/adm/swatch.php29
44 files changed, 4677 insertions, 9581 deletions
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 @@
-<?php
-/**
-*
-* @package acp
-* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-*/
-if (!empty($setmodules))
-{
- $filename = basename(__FILE__);
- $module['DB']['DB_BACKUP'] = ($auth->acl_get('a_backup')) ? $filename . "$SID&amp;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&amp;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']);
-
-?>
-
-<h1><?php echo $user->lang['DB_BACKUP']; ?></h1>
-
-<p><?php echo $user->lang['Backup_explain']; ?></p>
-
-<form method="post" action="<?php echo "admin_database.$phpEx$SID&amp;mode=$mode"; ?>"><table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th colspan="2"><?php echo $user->lang['Backup_options']; ?></th>
- </tr>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['Backup_type']; ?>: </b></td>
- <td class="row2"><input type="radio" name="type" value="full" checked="checked" /> <?php echo $user->lang['Full_backup']; ?>&nbsp;&nbsp;<input type="radio" name="type" value="structure" /> <?php echo $user->lang['Structure_only']; ?>&nbsp;&nbsp;<input type="radio" name="type" value="data" /> <?php echo $user->lang['Data_only']; ?></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['Additional_tables']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['Additional_tables_explain']; ?></span></td>
- <td class="row2"><input class="post" type="text" name="tables" maxlength="255" size="40" /></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['INC_SEARCH_INDEX']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['INC_SEARCH_INDEX_EXPLAIN']; ?></span></td>
- <td class="row2"><input type="radio" name="search" value="1" checked="checked" /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="search" value="0" /> <?php echo $user->lang['NO']; ?></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['DOWNLOAD_STORE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['DOWNLOAD_STORE_EXPLAIN']; ?></span></td>
- <td class="row2"><input type="radio" name="store" value="0" checked="checked" /> <?php echo $user->lang['EXPORT_DOWNLOAD']; ?>&nbsp;&nbsp;<input type="radio" name="store" value="1" /> <?php echo $user->lang['EXPORT_STORE']; ?></td>
- </tr>
-<?php
-
- if (@extension_loaded('zlib') || extension_loaded('bz2'))
- {
-
-?>
- <tr>
- <td class="row1"><b><?php echo $user->lang['Compress_file']; ?>: </b></td>
- <td class="row2"><input type="radio" name="compress" value="none" checked="checked" /> <?php echo $user->lang['NONE']; ?><?php
-
- if (extension_loaded('zlib'))
- {
-
-
-?>&nbsp;&nbsp;<input type="radio" name="compress" value="gzip" />.gz&nbsp;&nbsp;<input type="radio" name="compress" value="zip" />.zip<?php
-
- }
-
- if (extension_loaded('bz2'))
- {
-
-?>&nbsp;&nbsp;<input type="radio" name="compress" value="bzip" />.bz2<?php
-
- }
-
-?></td>
- </tr>
-<?php
-
- }
-
-?>
- <tr>
- <td class="cat" colspan="2" align="center"><input type="submit" name="backupstart" value="<?php echo $user->lang['Start_backup']; ?>" class="btnmain" /></td>
- </tr>
-</table></form>
-
-<?php
-
- break;
- }
- else if (!isset($_POST['startdownload']) && !isset($_GET['startdownload']))
- {
- $meta = "<meta http-equiv=\"refresh\" content=\"0;url=admin_database.$phpEx?mode=backup&amp;type=$backup_type&amp;tables=" . quotemeta($additional_tables) . "&amp;search=$search&amp;store=" . quotemeta($store_path) . "&amp;compress=$compress&amp;backupstart=1&amp;startdownload=1\">";
-
- $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']);
-
-?>
-
-<h1><?php echo $user->lang['DB_RESTORE']; ?></h1>
-
-<p><?php echo $user->lang['Restore_explain']; ?></p>
-
-<form enctype="multipart/form-data" method="post" action="<?php echo "admin_database.$phpEx$SID&amp;mode=$mode"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
- <th colspan="2"><?php echo $user->lang['Select_file']; ?></th>
- </tr>
- <tr>
- <td class="row1"><?php echo $user->lang['Upload_file']; ?>: <br /><span class="gensmall"><?php
-
- echo $user->lang['Supported_extensions'];
-
- $types = ': <u>sql</u>';
- if (extension_loaded('zlib'))
- {
- $types .= ', <u>sql.gz</u>';
- }
- if (extension_loaded('bz2'))
- {
- $types .= ', <u>bz2</u>';
- }
-
- echo $types;
-
-?></span></td>
- <td class="row2"><input type="file" name="backup_file" /></td>
- </tr>
- <tr>
- <td class="row1"><?php echo $user->lang['Local_backup_file']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Local_backup_file_explain']; ?></span></td>
- <td class="row2"><input type="text" name="local" size="40" /></td>
- </tr>
- <tr>
- <td class="cat" colspan="2" align="center"><input type="submit" name="restorestart" value="<?php echo $user->lang['Start_Restore']; ?>" class="btnmain" /></td>
- </tr>
-</table></form>
-
-<?php
-
- break;
-
- default:
- trigger_error($user->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 @@
-<?php
-/**
-*
-* @package acp
-* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-*/
-if (!empty($setmodules))
-{
- $filename = basename(__FILE__);
- $module['PERM']['PERMISSIONS'] = ($auth->acl_get('a_auth')) ? "$filename$SID&amp;mode=forum" : '';
- $module['PERM']['MODERATORS'] = ($auth->acl_get('a_authmods')) ? "$filename$SID&amp;mode=mod" : '';
- $module['PERM']['SUPER_MODERATORS'] = ($auth->acl_get('a_authmods')) ? "$filename$SID&amp;mode=supermod" : '';
- $module['PERM']['ADMINISTRATORS'] = ($auth->acl_get('a_authadmins')) ? "$filename$SID&amp;mode=admin" : '';
- $module['PERM']['USER_PERMS'] = ($auth->acl_get('a_authusers')) ? "$filename$SID&amp;mode=user" : '';
- $module['PERM']['GROUP_PERMS'] = ($auth->acl_get('a_authgroups')) ? "$filename$SID&amp;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 .= '<input type="hidden" name="f[' . $forum_submode . '][]" value="' . $submode_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) ? '<span class="blue">' . $user->lang['G_' . $row['name']] . '</span>' : $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) ? '<span class="blue">' . $user->lang['G_' . $row['name']] . '</span>' : $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))
-{
-
-?>
-
-<h1><?php echo $l_title; ?></h1>
-
-<p><?php echo $l_title_explain ?></p>
-
-<form method="post" action="<?php echo "admin_permissions.$phpEx$SID&amp;mode=$mode"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
-<?php
-
- // Mode specific markup
- switch ($mode)
- {
- case 'forum':
- case 'mod':
-
-?>
- <tr>
- <th align="center"><?php echo $user->lang['LOOK_UP_FORUM']; ?></th>
- </tr>
- <tr>
- <td class="row1" align="center" valign="middle">&nbsp;<select name="f[<?php echo $mode; ?>][]" multiple="true" size="5"><?php
-
- echo make_forum_select(false, false, false);
-
-?></select>&nbsp;</td>
- </tr>
- <tr>
- <td class="cat" align="center"><input type="submit" name="submit_usergroups" value="<?php echo $user->lang['LOOK_UP_FORUM']; ?>" class="btnmain" />&nbsp; <input type="reset" value="<?php echo $user->lang['RESET']; ?>" class="btnlite" /><input type="hidden" name="ug_type" value="forum" /><input type="hidden" name="action" value="usergroups" /></td>
- </tr>
-<?php
-
- break;
-
- case 'user':
-
-?>
- <tr>
- <th align="center"><?php echo $user->lang['LOOK_UP_USER']; ?></th>
- </tr>
- <tr>
- <td class="row1" align="center">&nbsp;<textarea cols="40" rows="4" name="ug_data[]"></textarea>&nbsp;</td>
- </tr>
- <tr>
- <td class="cat" align="center"><input type="submit" name="submit_add_options" value="<?php echo $user->lang['SUBMIT']; ?>" class="btnmain" />&nbsp; <input type="reset" value="<?php echo $user->lang['RESET']; ?>" class="btnlite" />&nbsp; <input type="submit" value="<?php echo $user->lang['FIND_USERNAME']; ?>" class="btnlite" onclick="window.open('<?php echo "../memberlist.$phpEx$SID"; ?>&amp;mode=searchuser&amp;form=2&amp;field=entries', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;" /><input type="hidden" name="ug_type" value="user" /></td>
- </tr>
-<?php
-
- break;
-
- case 'group':
- // Generate list of groups
-
-?>
- <tr>
- <th align="center"><?php echo $user->lang['LOOK_UP_GROUP']; ?></th>
- </tr>
- <tr>
- <td class="row1" align="center" valign="middle">&nbsp;<select name="ug_data[]" multiple="true" size="5"><?php
-
- $sql = "SELECT group_id, group_name, group_type
- FROM " . GROUPS_TABLE . "
- ORDER BY group_type DESC";
- $result = $db->sql_query($sql);
-
- $group_options = '';
- if ($row = $db->sql_fetchrow($result))
- {
- do
- {
- echo '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="blue"' : '') . ' value="' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
- }
- while ($row = $db->sql_fetchrow($result));
- }
- $db->sql_freeresult($result);
-
-?></select>&nbsp;</td>
- </tr>
- <tr>
- <td class="cat" align="center"><input type="submit" name="submit_edit_options" value="<?php echo $user->lang['LOOK_UP_GROUP']; ?>" class="btnmain" />&nbsp; <input type="reset" value="<?php echo $user->lang['RESET']; ?>" class="btnlite" /><input type="hidden" name="ug_type" value="group" /></td>
- </tr>
-<?php
-
- break;
-
- }
-
-?>
-</table></form>
-
-<?php
-
-}
-// End user, group or forum selection
-
-
-// Second possible form, this lists the currently enabled
-// users/groups for the given mode
-if ((in_array($submit, array('usergroups', 'delete', 'cancel'))) || (!strstr($submit, 'options') && empty($submode) && in_array($mode, array('admin', 'supermod'))))
-{
-
-?>
-
-<h1><?php echo $l_title; ?></h1>
-
-<p><?php echo $l_title_explain; ?></p>
-
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
- <tr>
- <td align="center"><h1><?php echo $user->lang['USERS']; ?></h1></td>
- <td align="center"><h1><?php echo $user->lang['USERGROUPS']; ?></h1></td>
- </tr>
- <tr>
-
- <td><form method="post" action="<?php echo "admin_permissions.$phpEx$SID&amp;mode=$mode"; ?>"><table width="90%" class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th><?php echo $user->lang['MANAGE_USERS']; ?></th>
- </tr>
- <tr>
- <td class="row1" align="center"><select style="width:280px" name="ug_data[]" multiple="multiple" size="5"><?php
-
- $sql = "SELECT DISTINCT u.user_id, u.username
- FROM " . USERS_TABLE . " u, " . 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 IN ($sql_forum_id)
- AND u.user_id = a.user_id
- ORDER BY u.username, u.user_regdate ASC";
- $result = $db->sql_query($sql);
-
- $users = '';
- while ($row = $db->sql_fetchrow($result))
- {
- echo '<option value="' . $row['user_id'] . '">' . $row['username'] . '</option>';
- }
- $db->sql_freeresult($result);
-
-?></select></td>
- </tr>
- <tr>
- <td class="cat" align="center"><input class="btnlite" type="submit" name="submit_delete" value="<?php echo $user->lang['DELETE']; ?>" /> &nbsp; <input class="btnlite" type="submit" name="submit_edit_options" value="<?php echo $user->lang['SET_OPTIONS']; ?>" /><input type="hidden" name="ug_type" value="user" /><?php echo $s_forum_id; ?></td>
- </tr>
- </table></form></td>
-
- <td align="center"><form method="post" name="admingroups" action="<?php echo "admin_permissions.$phpEx$SID&amp;mode=$mode"; ?>"><table width="90%" class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th><?php echo $user->lang['MANAGE_GROUPS']; ?></th>
- </tr>
- <tr>
- <td class="row1" align="center"><select style="width:280px" name="ug_data[]" multiple="multiple" size="5"><?php
-
- $sql = "SELECT DISTINCT g.group_id, g.group_name, g.group_type
- FROM " . GROUPS_TABLE . " g, " . ACL_GROUPS_TABLE . " a, " . ACL_OPTIONS_TABLE . " o
- WHERE o.auth_option LIKE '" . $sql_option_mode . "_%'
- AND a.forum_id IN ($sql_forum_id)
- AND a.auth_option_id = o.auth_option_id
- AND g.group_id = a.group_id
- ORDER BY g.group_type DESC, g.group_name ASC";
- $result = $db->sql_query($sql);
-
- $groups = '';
- while ($row = $db->sql_fetchrow($result))
- {
- echo '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="blue"' : '') . ' value="' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
- }
- $db->sql_freeresult($result);
-
-?></select></td>
- </tr>
- <tr>
- <td class="cat" align="center"><input class="btnlite" type="submit" name="submit_delete" value="<?php echo $user->lang['DELETE']; ?>" /> &nbsp; <input class="btnlite" type="submit" name="submit_edit_options" value="<?php echo $user->lang['SET_OPTIONS']; ?>" /><input type="hidden" name="ug_type" value="group" /><?php echo $s_forum_id; ?></td>
- </tr>
- </table></form></td>
-
- </tr>
- <tr>
-
- <td><form method="post" action="<?php echo "admin_permissions.$phpEx$SID&amp;mode=$mode"; ?>"><table class="bg" width="90%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th><?php echo $user->lang['ADD_USERS']; ?></th>
- </tr>
- <tr>
- <td class="row1" align="center"><textarea cols="40" rows="4" name="ug_data[]"></textarea></td>
- </tr>
- <tr>
- <td class="cat" align="center"> <input type="submit" name="submit_add_options" value="<?php echo $user->lang['SUBMIT']; ?>" class="btnmain" />&nbsp; <input type="reset" value="<?php echo $user->lang['RESET']; ?>" class="btnlite" />&nbsp; <input type="submit" value="<?php echo $user->lang['FIND_USERNAME']; ?>" class="btnlite" onclick="window.open('<?php echo "../memberlist.$phpEx$SID"; ?>&amp;mode=searchuser&amp;form=2&amp;field=entries', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;" /><input type="hidden" name="ug_type" value="user" /><?php echo $s_forum_id; ?></td>
- </tr>
- </table></form></td>
-
- <td><form method="post" action="<?php echo "admin_permissions.$phpEx$SID&amp;mode=$mode"; ?>"><table width="90%" class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th><?php echo $user->lang['ADD_GROUPS']; ?></th>
- </tr>
- <tr>
- <td class="row1" align="center"><select name="ug_data[]" multiple="multiple" size="4"><?php
-
- $sql = "SELECT group_id, group_name, group_type
- FROM " . GROUPS_TABLE . "
- ORDER BY group_type DESC, group_name";
- $result = $db->sql_query($sql);
-
- $group_list = '';
- while ($row = $db->sql_fetchrow($result))
- {
- echo '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="blue"' : '') . ' value="' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
- }
- $db->sql_freeresult($result);
-
-?></select></td>
- </tr>
- <tr>
- <td class="cat" align="center"> <input type="submit" name="submit_add_options" value="<?php echo $user->lang['SUBMIT']; ?>" class="btnmain" />&nbsp; <input type="reset" value="<?php echo $user->lang['RESET']; ?>" class="btnlite" /><input type="hidden" name="ug_type" value="group" /><?php echo $s_forum_id; ?></td>
- </tr>
- </table></form></td>
- </tr>
-</table>
-
-<?php
-
-}
-// End user and group acl selections
-
-
-
-
-
-
-// Third possible form, this is the major section of this script. It
-// handles the entry of permission options for all situations
-if (in_array($submit, array('add_options', 'edit_options', 'presetsave', 'presetdel', 'update')) || !empty($submode))
-{
-
- // Did the user specify any users or groups?
- if (empty($ug_data))
- {
- $l_message = ($ug_type == 'user') ? 'NO_USER' : 'NO_GROUP';
- trigger_error($user->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 != '') ? ', ' : '') . '<b>' . $row['forum_name'] . '</b>';
- }
- 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) ? '<b class="blue">' . $user->lang['G_' . $row['name']] : '<b>' . $row['name']) . '</b>';
- $ug_ids .= (($ug_ids != '') ? ', ' : '') . $row['id'];
- $ug_hidden .= '<input type="hidden" name="ug_data[]" value="' . $row['id'] . '" />';
- }
- 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 .= '<option value="preset_0">' . $user->lang['INHERIT_PARENT'] . '</option>';
- $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 .= '<option value="' . $row['preset_id'] . '">' . $row['preset_name'] . '</option>';
- $preset_options .= '<option value="preset_' . $row['preset_id'] . '">' . $row['preset_name'] . '</option>';
-
- $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 .= '<option value="">' . $user->lang['SELECT_VIEW'] . '</option>';
- $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 .= '<option value="' . $which_submode . '"' . (($which_submode == $which_mode) ? ' selected="selected"' : '') . '>' . $user->lang['ACL_VIEW_' . strtoupper($which_submode)] . '</option>';
- }
-
- }
- 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 != '*') ? '<input type="hidden" name="settings[' . $auth_submode . '][' . $submode_option . ']" value="' . $submode_setting . '" />' : '';
- }
- }
- }
- unset($auth_submode);
- unset($auth_submode_settings);
- unset($auth_submode_option);
- unset($auth_submode_setting);
-
-?>
-
-<script language="Javascript" type="text/javascript">
-<!--
-
- var presets = new Array();
-<?php
-
- echo $preset_js;
-
-?>
-
- function preset_obj(yes, no, unset)
- {
- this.yes = yes;
- this.no = no;
- this.unset = unset;
- }
-
- function use_preset(option)
- {
- if (option)
- {
- document.acl.set.selectedIndex = 0;
- for (i = 0; i < document.acl.length; i++)
- {
- var elem = document.acl.elements[i];
- if (elem.name.indexOf('settings') == 0)
- {
- switch (option)
- {
- case 'all_yes':
- if (elem.value == <?php echo ACL_YES; ?>)
- elem.checked = true;
- break;
-
- case 'all_no':
- if (elem.value == <?php echo ACL_NO; ?>)
- elem.checked = true;
- break;
-
- case 'all_unset':
- if (elem.value == <?php echo ACL_UNSET; ?>)
- elem.checked = true;
- break;
-
- case 'all_ignore':
- if (elem.value == '*')
- elem.checked = true;
- break;
-
- default:
- option_start = elem.name.search(/\[(\w+?)\]$/);
- option_name = elem.name.substr(option_start + 1, elem.name.length - option_start - 2);
-
- if (presets[option].yes.indexOf(option_name + ',') != -1 && elem.value == <?php echo ACL_YES; ?>)
- elem.checked = true;
- else if (presets[option].no.indexOf(option_name + ',') != -1 && elem.value == <?php echo ACL_NO; ?>)
- elem.checked = true;
- else if (presets[option].unset.indexOf(option_name + ',') != -1 && elem.value == <?php echo ACL_UNSET; ?>)
- elem.checked = true;
- break;
- }
- }
- }
- }
- }
-
- function marklist(match, status)
- {
- for (i = 0; i < document.acl.length; i++)
- {
- if (document.acl.elements[i].name.indexOf(match) == 0)
- document.acl.elements[i].checked = status;
- }
- }
-
- function open_win(url, width, height)
- {
- aclwin = window.open(url, '_phpbbacl', 'HEIGHT=' + height + ',resizable=yes, scrollbars=yes,WIDTH=' + width);
- if (window.focus)
- aclwin.focus();
- }
-//-->
-</script>
-
-<p><?php echo $user->lang['ACL_EXPLAIN']; ?></p>
-
-<h1><?php echo $l_title; ?></h1>
-
-<?php
-
- // Do we have a list of forums? If so, output them ... but only
- // if we're looking at the primary view or mode ... submodes
- // output their own list of forums as and where applicable so this
- // is unnecessary
- if ($forum_list != '' && $which_mode == $mode)
- {
- $l_selected_forums = (sizeof($forum_id[$which_mode]) == 1) ? 'SELECTED_FORUM' : 'SELECTED_FORUMS';
-
- echo '<p>' . $user->lang[$l_selected_forums] . ': ' . $forum_list . '</p>';
-
- 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 '<p>' . $user->lang[$l_selected_users] . ': ' . $l_ug_list . '</p>';
-
- unset($l_selected_users);
- unset($ug_data);
-
-?>
-
-<p><?php echo $l_title_explain; ?></p>
-
-<?php
-
- if ($settings_hidden != '')
- {
-
-?>
-
-<h2 style="color:red"><?php echo $user->lang['WARNING']; ?></h2>
-
-<p><?php echo $user->lang['WARNING_EXPLAIN']; ?></p>
-
-<?php
-
- }
-
-?>
-
-<form method="post" name="acl" action="<?php echo "admin_permissions.$phpEx$SID&amp;mode=$mode&amp;submode=$submode"; ?>"><table cellspacing="2" cellpadding="0" border="0" align="center">
-<?php
-
- // This is the main listing of options
-
- // We output this for both deps and when update is requested where
- // deps exist
- if (($mode == 'admin' || $mode == 'supermod') && in_array($submode, array('forum', 'mod')))
- {
-
-?>
- <tr>
- <td colspan="2" align="right"><table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0">
- <tr>
- <th colspan="2"><?php echo $user->lang['SELECT_FORUM']; ?></th>
- </tr>
- <tr>
- <td class="row1" width="150"><?php echo $user->lang['WILL_SET_OPTIONS']; ?>:</td>
- <td class="row2"><select name="f[<?php echo $which_mode; ?>][]" multiple="4"><?php
-
- echo make_forum_select($forum_id[$which_mode], false, true);
-
-?></select></td>
- </tr>
- </table><br /></td>
- </tr>
-<?php
-
- }
- // End deps output
-
-?>
- <tr>
- <td align="left"><?php
-
- if ($view_options != '')
- {
-
-?><select name="submode" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();"><?php echo $view_options; ?></select><?php
-
- }
-
-?></td>
- <td align="right"><?php echo $user->lang['PRESETS']; ?>: <select name="set" onchange="use_preset(this.options[this.selectedIndex].value);"><option class="sep"><?php echo $user->lang['SELECT'] . ' -&gt;'; ?></option><option value="all_yes"><?php echo $user->lang['ALL_YES']; ?></option><option value="all_no"><?php echo $user->lang['ALL_NO']; ?></option><option value="all_unset"><?php echo $user->lang['ALL_UNSET']; ?></option><?php
-
- $colspan = 4;
- if ($which_mode != $mode)
- {
- $colspan = 5;
- echo '<option value="all_ignore">' . $user->lang['ALL_IGNORE'] . '</option>';
- }
-
- // Output user preset options ... if any
- echo ($preset_options) ? '<option class="sep">' . $user->lang['USER_PRESETS'] . ' -&gt;' . '</option>' . $preset_options : '';
-
-?></select></td>
- </tr>
- <tr>
- <td colspan="2"><table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th>&nbsp;<?php echo $user->lang['OPTION']; ?>&nbsp;</th>
- <th width="50">&nbsp;<?php echo $user->lang['YES']; ?>&nbsp;</th>
- <th width="50">&nbsp;<?php echo $user->lang['UNSET']; ?>&nbsp;</th>
- <th width="50">&nbsp;<?php echo $user->lang['NO']; ?>&nbsp;</th>
-<?php
-
- if ($which_mode != $mode)
- {
-
-?>
- <th width="50">&nbsp;<?php echo $user->lang['IGNORE']; ?>&nbsp;</th>
-<?php
-
- }
-
-?>
- </tr>
-<?php
-
- $row_class = 'row2';
- for ($i = 0; $i < sizeof($auth_options); $i++)
- {
- $row_class = ($row_class == 'row1') ? 'row2' : 'row1';
-
- // Try and output correct language strings, else output prettyfied auth_option
- $l_auth_option = (!empty($user->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"' : '';
-
-?>
- <tr>
- <td class="<?php echo $row_class; ?>" nowrap="nowrap"><?php echo $l_auth_option; ?>&nbsp;</td>
- <td class="<?php echo $row_class; ?>" align="center"><input type="radio" name="settings<?php echo $s_auth_option ;?>" value="<?php echo ACL_YES; ?>"<?php echo $selected_yes; ?> /></td>
- <td class="<?php echo $row_class; ?>" align="center"><input type="radio" name="settings<?php echo $s_auth_option ;?>" value="<?php echo ACL_UNSET; ?>"<?php echo $selected_unset; ?> /></td>
- <td class="<?php echo $row_class; ?>" align="center"><input type="radio" name="settings<?php echo $s_auth_option ;?>" value="<?php echo ACL_NO; ?>"<?php echo $selected_no; ?> /></td>
-<?php
-
- if ($which_mode != $mode)
- {
- $selected_ignore = (isset($auth_settings[$which_mode][$auth_options[$i]['auth_option']]) && $auth_settings[$which_mode][$auth_options[$i]['auth_option']] == '*') ? ' checked="checked"' : '';
-
-?>
- <td class="<?php echo $row_class; ?>" align="center"><input type="radio" name="settings<?php echo $s_auth_option ;?>" value="*"<?php echo $selected_ignore; ?> /></td>
-<?php
-
- }
-
-?>
- </tr>
-<?php
-
- }
-
-
- // If we're setting forum or moderator options and a single forum has
- // been selected then look to see if any subforums exist. If they do
- // give user the option of cascading permissions to them
- if (($mode == 'forum' || $mode == 'mod') && empty($submode) && sizeof($forum_id[$which_mode]) == 1)
- {
- $children = get_forum_branch($forum_id[$which_mode][0], 'children', 'descending', false);
-
- if (!empty($children))
- {
-
-?>
- <tr>
- <th colspan="<?php echo $colspan; ?>"><?php echo $user->lang['ACL_SUBFORUMS']; ?></th>
- </tr>
- <tr>
- <td class="row1" colspan="<?php echo $colspan; ?>"><table width="100%" cellspacing="1" cellpadding="0" border="0">
- <tr>
- <td class="gensmall" colspan="4" height="16" align="center"><?php echo $user->lang['ACL_SUBFORUMS_EXPLAIN']; ?></td>
- </tr>
-<?php
-
- foreach ($children as $row)
- {
-
-?>
- <tr>
- <td><input type="checkbox" name="inherit[]" value="<?php echo $row['forum_id']; ?>" /> <?php echo $row['forum_name']; ?></td>
- </tr>
-<?php
-
- }
-
-?>
- <tr>
- <td height="16" align="center"><a class="gensmall" href="javascript:marklist('inherit', true);"><?php echo $user->lang['MARK_ALL']; ?></a> :: <a href="javascript:marklist('inherit', false);" class="gensmall"><?php echo $user->lang['UNMARK_ALL']; ?></a></td>
- </tr>
- </table></td>
- </tr>
-<?php
-
- }
- }
-
- // Display event/cron radio buttons
- if ($auth->acl_gets('a_events', 'a_cron') && $mode != 'deps' && $submit != 'update')
- {
- $row_class = ($row_class == 'row1') ? 'row2' : 'row1';
-
-?>
- <!-- tr>
- <th colspan="<?php echo $colspan; ?>"><?php echo $user->lang['RUN_HOW']; ?></th>
- </tr>
- <tr>
- <td class="<?php echo $row_class; ?>" colspan="4" align="center"><input type="radio" name="runas" value="now" checked="checked" /> <?php echo $user->lang['RUN_AS_NOW']; ?><?php
-
- if ($auth->acl_get('a_events'))
- {
-
-?> &nbsp;<input type="radio" name="runas" value="evt" /> <?php
-
- echo $user->lang['RUN_AS_EVT'];
- }
-
- if ($auth->acl_get('a_cron'))
- {
-
-?> &nbsp;<input type="radio" name="runas" value="crn" /> <?php
-
- echo $user->lang['RUN_AS_CRN'];
-
- }
-
-?></td>
- </tr -->
-<?php
-
- }
-
-?>
- <tr>
- <td class="cat" colspan="<?php echo $colspan; ?>" align="center"><input class="btnmain" type="submit" name="submit_update" value="<?php echo $user->lang['UPDATE']; ?>" />&nbsp;&nbsp;<input class="btnlite" type="submit" name="submit_cancel" value="<?php echo $user->lang['CANCEL']; ?>" /><input type="hidden" name="ug_type" value="<?php echo $ug_type; ?>" /><?php echo $ug_hidden; ?><?php
-
- // Output forum id data
- echo $s_forum_id;
-
- // Output settings generated from other views
- echo $settings_hidden;
- unset($settings_hidden);
-
-?></td>
- </tr>
- </table>
-
- <br clear="all" />
-
- <table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th colspan="4"><?php echo $user->lang['PRESETS']; ?></th>
- </tr>
- <tr>
- <td class="row1" colspan="4"><table width="100%" cellspacing="1" cellpadding="0" border="0">
- <tr>
- <td colspan="2" height="16"><span class="gensmall"><?php echo $user->lang['PRESETS_EXPLAIN']; ?></span></td>
- </tr>
- <tr>
- <td nowrap="nowrap"><?php echo $user->lang['SELECT_PRESET']; ?>: </td>
- <td><select name="presetoption"><option class="sep" value="-1"><?php echo $user->lang['SELECT'] . ' -&gt;'; ?></option><?php
-
- echo $preset_update_options;
-
- ?></select></td>
- </tr>
- <tr>
- <td nowrap="nowrap"><?php echo $user->lang['PRESET_NAME']; ?>: </td>
- <td><input type="text" name="presetname" maxlength="25" /> </td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td class="cat" colspan="4" align="center"><input class="btnlite" type="submit" name="submit_presetsave" value="<?php echo $user->lang['SAVE']; ?>" /> &nbsp;<input class="btnlite" type="submit" name="submit_presetdel" value="<?php echo $user->lang['DELETE']; ?>" /></td>
- </tr>
- </table></td>
- </tr>
-</table></form>
-
-<?php
-
-}
-
-// Output page footer
-adm_page_footer();
-
-// ---------
-// FUNCTIONS
-//
-function update_foes()
-{
- global $db, $auth;
-
- $perms = array();
- foreach ($auth->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 @@
-<?php
-/**
-*
-* @package acp
-* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-*/
-if (!empty($setmodules))
-{
- if (!$auth->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']);
-
-?>
-
-<h1><?php echo $user->lang['SEARCH_INDEX']; ?></h1>
-
-<p><?php echo $user->lang['SEARCH_INDEX_COMPLETE']; ?></p>
-
-<?php
-
- adm_page_footer();
-
- }
-
- exit;
-
-}
-else if (isset($_POST['cancel']))
-{
- set_config('board_disable', 0);
- adm_page_header($user->lang['SEARCH_INDEX']);
-
-?>
-
-<h1><?php echo $user->lang['SEARCH_INDEX']; ?></h1>
-
-<p><?php echo $user->lang['SEARCH_INDEX_CANCEL']; ?></p>
-
-<?php
-
- adm_page_footer();
-
-}
-else
-{
- adm_page_header($user->lang['SEARCH_INDEX']);
-
-?>
-
-<h1><?php echo $user->lang['SEARCH_INDEX']; ?></h1>
-
-<p><?php echo $user->lang['SEARCH_INDEX_EXPLAIN']; ?></p>
-
-<form method="post" action="<?php echo "admin_search.$phpEx$SID"; ?>"><table cellspacing="1" cellpadding="4" border="0" align="center" bgcolor="#98AAB1">
- <tr>
- <td class="cat" height="28" align="center">&nbsp;<input type="submit" name="start" value="<?php echo $user->lang['START']; ?>" class="btnmain" /> &nbsp; <input type="submit" name="cancel" value="<?php echo $user->lang['CANCEL']; ?>" class="btnmain" />&nbsp;</td>
- </tr>
-</table></form>
-
-<?php
-
- adm_page_footer();
-
-}
-
-?> \ 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 @@
-<?php
-/**
-*
-* @package acp
-* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-*/
-
-// TODO
-// For M-3
-// BBCode support
-// Replace template/s, stylesheet, images, etc.
-// Previews of templates, imagesets, themes ... unified
-// Security review
-
-// BUGS
-// Editing template -> 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&amp;mode=style";
- $module['STYLE']['MANAGE_TEMPLATE'] = "$filename$SID&amp;mode=template";
- $module['STYLE']['MANAGE_THEME'] = "$filename$SID&amp;mode=theme";
- $module['STYLE']['MANAGE_IMAGESET'] = "$filename$SID&amp;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 = '<u>.tar</u>';
-$archive_preg = '\.tar';
-foreach (array('tar.gz' => 'zlib', 'tar.bz2' => 'bz2', 'zip' => 'zlib') as $type => $module)
-{
- if (!@extension_loaded($module))
- {
- continue;
- }
- $archive_types .= ", <u>.$type</u>";
- $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('#<!\-\- INCLUDE (.*?) \-\->#', $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 .= '<option class="sep">' . $category . '</option>';
-
- foreach ($tpl_ary as $tpl_file)
- {
- $selected = ($tpl_file == $tplname) ? ' selected="selected"' : '';
- $tpl_options .= '<option value="' . $tpl_file . '"' . $selected . '>' . (($category == 'custom') ? $tpl_file : $tpl_file) . '</option>';
- }
- }
-
- // Output page
- adm_page_header($user->lang['EDIT_TEMPLATE']);
-
-?>
-
-<h1><?php echo $user->lang['EDIT_TEMPLATE']; ?></h1>
-
-<p><?php echo $user->lang['EDIT_TEMPLATE_EXPLAIN']; ?></p>
-
-<p><?php echo $user->lang['SELECTED_TEMPLATE'] . ": <b>$template_name</b>"; ?></p>
-
-<form name="style" method="post" action="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;id=$template_id&amp;action=$action"; ?>"><table cellspacing="1" cellpadding="1" border="0" align="center">
- <tr>
- <td align="right"><?php echo $user->lang['SELECT_TEMPLATE']; ?>: <select name="tplname" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();"><?php echo $tpl_options; ?></select>&nbsp; <input class="btnlite" type="submit" value="<?php echo $user->lang['SELECT']; ?>" tabindex="100" /></td>
- </tr>
- <tr>
- <td><table class="bg" cellspacing="1" cellpadding="4" border="0">
- <tr>
- <td class="cat"><?php echo $user->lang['TEXT_COLUMNS']; ?>: <input class="post" type="text" name="tplcols" size="3" maxlength="3" value="<?php echo $tplcols; ?>" /> &nbsp;<?php echo $user->lang['TEXT_ROWS']; ?>: <input class="post" type="text" name="tplrows" size="3" maxlength="3" value="<?php echo $tplrows; ?>" />&nbsp; <input class="btnlite" type="submit" value="<?php echo $user->lang['UPDATE']; ?>" /></td>
- </tr>
-<?php
-
- if (sizeof($error))
- {
-
-?>
- <tr>
- <td class="row1" style="color:green" align="center"><?php echo implode('<br />', $error); ?></td>
- </tr>
-<?php
-
- }
-
-?>
- <tr>
- <th><?php echo $user->lang['RAW_HTML']; ?></th>
- </tr>
- <tr>
- <td class="row2" align="center"><textarea class="post" style="font-family:'Courier New', monospace;font-size:9pt;line-height:125%;" cols="<?php echo $tplcols; ?>" rows="<?php echo $tplrows; ?>" name="tpldata"><?php echo htmlspecialchars($tpldata); ?></textarea></td>
- </tr>
- <tr>
- <td class="cat" align="center"><input class="btnlite" type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" /></td>
- </tr>
- </table></td>
- </tr>
-</table></form>
-
-<?php
-
- adm_page_footer();
- break;
-
- case 'cache':
- $source = (!empty($_GET['source'])) ? htmlspecialchars($_GET['source']) : '';
- $file_ary = (!empty($_POST['delete'])) ? array_map('htmlspecialchars', $_POST['delete']) : '';
-
- $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);
-
- $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']);
-
-?>
-
-<h1><?php echo $_GET['source']; ?></h1>
-
-<?php
-
- $marker = time();
- $code = implode("$marker", file("{$phpbb_root_path}cache/{$cache_prefix}_$source.html.$phpEx"));
-
- $conf = array('highlight.bg', 'highlight.comment', 'highlight.default', 'highlight.html', 'highlight.keyword', 'highlight.string');
- foreach ($conf as $ini_var)
- {
- @ini_set($ini_var, str_replace('highlight.', 'syntax', $ini_var));
- }
-
- ob_start();
- highlight_string($code);
- $code = ob_get_contents();
- ob_end_clean();
-
- $str_from = array('<font color="syntax', '</font>', '<code>', '</code>','[', ']', '.');
- $str_to = array('<span class="syntax', '</span>', '', '', '&#91;', '&#93;', '&#46;');
-
- if ($remove_tags)
- {
- $str_from[] = '<span class="syntaxdefault">&lt;?php&nbsp;</span>';
- $str_to[] = '';
- $str_from[] = '<span class="syntaxdefault">&lt;?php&nbsp;';
- $str_to[] = '<span class="syntaxdefault">';
- $str_from[] = '<span class="syntaxdefault">?&gt;</span>';
- $str_to[] = '';
- }
-
- $code = str_replace($str_from, $str_to, $code);
- $code = preg_replace('#^(<span class="[a-z_]+">)\n?(.*?)\n?(</span>)$#is', '\1\2\3', $code);
- $code = explode("$marker", $code);
-
-?>
-
-<table width="95%" cellspacing="0" cellpadding="0" border="0" align="center">
-<?php
-
- $i = $j = 1;
- $length = strlen(sizeof($code));
- $indent = str_repeat('&nbsp;', $length);
- foreach ($code as $key => $line)
- {
-
-?>
- <tr valign="top">
- <td class="sourcenum" align="right"><?php echo $i; ?>&nbsp;&nbsp;</td>
- <td class="source"><?php
-
- echo $indent . $line;
- $i++;
- if (strlen($i) > $j)
- {
- $indent = substr($indent, 0, -6);
- $j++;
- }
- unset($code[$key]);
-
-?></td>
- </tr>
-<?php
-
- }
-
-?>
-</table>
-
-<br clear="all" />
-
-<?php
-
- adm_page_footer();
- }
-
- if ($template_storedb)
- {
- $sql = 'SELECT template_filename, template_mtime
- FROM ' . STYLES_TPLDATA_TABLE . "
- WHERE template_id = $template_id";
- $result = $db->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']);
-
-?>
-
-<script language="Javascript" type="text/javascript">
-<!--
-function marklist(match, status)
-{
- len = eval('document.' + match + '.length');
- for (i = 0; i < len; i++)
- {
- eval('document.' + match + '.elements[i].checked = ' + status);
- }
-}
-
-function viewsource(url)
-{
- window.open(url, '_source', 'HEIGHT=550,resizable=yes,scrollbars=yes,WIDTH=750');
- return false;
-}
-
-//-->
-</script>
-
-<h1><?php echo $user->lang['TEMPLATE_CACHE']; ?></h1>
-
-<p><?php echo $user->lang['TEMPLATE_CACHE_EXPLAIN']; ?></p>
-
-<form name="tplcache" method="post" action="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=$action&amp;id=$template_id"; ?>"><table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th nowrap="nowrap"><?php echo $user->lang['CACHE_FILENAME']; ?></th>
- <th nowrap="nowrap"><?php echo $user->lang['CACHE_FILESIZE']; ?></th>
- <th nowrap="nowrap"><?php echo $user->lang['CACHE_CACHED']; ?></th>
- <th nowrap="nowrap"><?php echo $user->lang['CACHE_MODIFIED']; ?></th>
- <th width="1%"><?php echo $user->lang['MARK']; ?></th>
- </tr>
-<?php
-
- if (sizeof($tplcache_ary))
- {
- foreach ($tplcache_ary as $filename => $times_ary)
- {
- $row_class = ($row_class != 'row1') ? 'row1' : 'row2';
-
-?>
- <tr>
- <td class="<?php echo $row_class; ?>" nowrap="nowrap"><a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=$action&amp;id=$template_id&amp;source=$filename"; ?>" onclick="viewsource('<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=$action&amp;id=$template_id&amp;source=$filename"; ?>');return false"><?php echo $filename; ?></a></td>
- <td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"><?php echo sprintf('%.1f KB', $times_ary['size'] / 1024); ?></td>
- <td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"><?php echo $user->format_date($times_ary['cache']); ?></td>
- <td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"><?php echo $user->format_date($times_ary['src']); ?></td>
- <td class="<?php echo $row_class; ?>" width="1%" align="center"><input type="checkbox" name="delete[]" value="<?php echo $filename; ?>" /></td>
- </tr>
-<?php
-
- }
- }
- else
- {
-
-?>
- <tr>
- <td class="row1" colspan="5" align="center"><?php echo $user->lang['NO_CACHED_TPL_FILES']; ?></td>
- </tr>
-<?php
-
- }
-
-?>
- <tr>
- <td class="cat" colspan="5" align="right"><input class="btnlite" type="submit" name="update" value="<?php echo $user->lang['DELETE_MARKED']; ?>" /></td>
- </tr>
-</table>
-
-<table width="95%" cellspacing="1" cellpadding="1" border="0" align="center">
- <tr>
- <td align="right"><b><span class="gensmall"><a href="javascript:marklist('tplcache', true);" class="gensmall"><?php echo $user->lang['MARK_ALL']; ?></a> :: <a href="javascript:marklist('tplcache', false);" class="gensmall"><?php echo $user->lang['UNMARK_ALL']; ?></a></span></b></td>
- </tr>
-</table></form>
-<?php
-
- adm_page_footer();
- break;
-
- case 'refresh':
- if ($id)
- {
- $sql = 'SELECT template_path, template_storedb
- 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);
-
- 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 .= '<input type="hidden" name="cssother" value="' . addslashes(implode('; ', $css_element)) . '" />';
- }
- }
- }
- // End of class element variable setting
-
- // Generate list of class options
- $class_options = '';
- foreach ($base_classes as $category => $class_ary)
- {
- $class_options .= '<option class="sep">' . $user->lang['CSS_CAT_' . strtoupper($category)] . '</option>';
- 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 .= '<option' . $used . ' value="' . $class_name . '"' . $selected . '>' . (($category == 'custom') ? $class_name : $user->lang['CSS_' . str_replace('.', '', strtoupper($class_name))]) . '</option>';
- }
- }
- 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 .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $img . '</option>';
- }
- }
- $bg_imglist = '<option value=""' . (($edit_img == '') ? ' selected="selected"' : '') . '>' . $user->lang['NONE'] . '</option>' . $bg_imglist;
- unset($imglist);
-
- // Output the page
- adm_page_header($user->lang['EDIT_THEME']);
-
-?>
-
-<script language="javascript" type="text/javascript">
-<!--
-
-function swatch(field)
-{
- window.open('./swatch.<?php echo "$phpEx?form=style&name="; ?>' + field, '_swatch', 'HEIGHT=115,resizable=yes,scrollbars=no,WIDTH=636');
- return false;
-}
-
-function csspreview()
-{
- if (document.myvar == 'preview')
- {
- window.open('', '_preview', 'HEIGHT=400,resizable=yes,scrollbars=yes,WIDTH=500');
- document.forms['style'].target = '_preview';
- }
- else
- {
- document.forms['style'].target = '_self';
- }
- document.myvar='';
-
- return true;
-}
-
-//-->
-</script>
-
-<h1><?php echo $user->lang['EDIT_THEME']; ?></h1>
-
-<p><?php echo $user->lang['EDIT_THEME_EXPLAIN']; ?></p>
-
-<p><?php echo $user->lang['SELECTED_THEME'] . ": <b>$theme_name</b>"; ?></p>
-<?php
-
- if ($showcss)
- {
-
-?>
-
-<h3><?php echo $user->lang['SHOW_RAW_CSS_NOTE']; ?></h3>
-
-<p><?php echo $user->lang['SHOW_RAW_CSS_EXPLAIN']; ?></p>
-<?php
-
- }
-
-?>
-
-<form name="style" method="post" action="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=$action&amp;id=$id&amp;showcss=$showcss"; ?>" onsubmit="return csspreview()"><table width="95%" cellspacing="1" cellpadding="1" border="0" align="center">
- <tr>
- <td align="right"><?php echo $user->lang['SELECT_CLASS']; ?>: <select name="classname" onchange="if (this.options[this.selectedIndex].value != ''){ csspreview(); this.form.submit(); }"><?php echo $class_options; ?></select>&nbsp; <input class="btnlite" type="submit" value="<?php echo $user->lang['SELECT']; ?>" tabindex="100" /></td>
- </tr>
- <tr>
- <td><table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
-<?php
-
- if ($showcss)
- {
-
-?>
- <tr>
- <th colspan="2"><?php echo $user->lang['RAW_CSS']; ?></th>
- </tr>
-<?php
-
- if (sizeof($error) && ($update || $customclass))
- {
- echo '<tr><td class="row1" colspan="2" align="center"><span class="gen" style="color:green" align="center">' . implode('<br />', $error) . '</span></td></tr>';
- }
-
-?>
- <tr>
- <td class="row2" colspan="2" align="center"><textarea class="post" style="font-family:'Courier New', monospace;font-size:10pt;line-height:125%;" name="rawcss" rows="<?php echo $txtrows; ?>" cols="<?php echo $txtcols; ?>"><?php echo (sizeof($css_element)) ? implode(";\n", $css_element) . ';' : ''; ?></textarea></td>
- </tr>
-
-<?php
-
- }
- else
- {
-
-?>
- <tr>
- <th><?php echo $user->lang['CSS_PARAMETER']; ?></th>
- <th><?php echo $user->lang['CSS_VALUE']; ?></th>
- </tr>
-<?php
-
- if (sizeof($error) && ($update || $customclass))
- {
- echo '<tr><td class="row1" colspan="2" align="center"><span class="gen" style="color:green" align="center">' . implode('<br />', $error) . '</span></td></tr>';
- }
-
-?>
- <tr>
- <td class="row3" colspan="2"><b><?php echo $user->lang['BACKGROUND']; ?></b></td>
- </tr>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['BACKGROUND_COLOUR']; ?>:</b> <br /><span class="gensmall"><?php echo $user->lang['COLOUR_EXPLAIN']; ?></span></td>
- <td class="row2"><table cellspacing="0" cellpadding="0" border="0"><tr><td><input class="post" type="text" name="background_color" value="<?php echo $background_color; ?>" size="8" maxlength="14" onchange="document.all.stylebgcolor.bgColor=this.form.background_color.value" /></td><td>&nbsp;</td><td bgcolor="<?php echo $background_color; ?>" id="stylebgcolor" style="border:solid 1px black;"><img src="../images/spacer.gif" width="45" height="15" alt="" /></td><td class="gensmall"> &nbsp; [ <a href="swatch.<?php echo $phpEx; ?>" onclick="swatch('background_color');return false" target="_swatch"><?php echo $user->lang['COLOUR_SWATCH']; ?></a> ]</td></tr></table></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['BACKGROUND_IMAGE']; ?>:</b></td>
- <td class="row2"><select name="background_image"><?php echo $bg_imglist ?></select></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['BACKGROUND_REPEAT']; ?>:</b></td>
- <td class="row2"><select name="background_repeat"><?php
-
- foreach (array('' => '------', 'none' => $user->lang['REPEAT_NO'], 'repeat-x' => $user->lang['REPEAT_X'], 'repeat-y' => $user->lang['REPEAT_Y'], 'both' => $user->lang['REPEAT_ALL']) as $cssvalue => $cssrepeat)
- {
- echo '<option value="' . $cssvalue . '"' . (($background_repeat == $cssvalue) ? ' selected="selected"' : '') . '>' . $cssrepeat . '</option>';
- }
-
-?></select></td>
- </tr>
-
-
- <tr>
- <td class="row3" colspan="2"><b><?php echo $user->lang['FOREGROUND']; ?></b></td>
- </tr>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['FONT_COLOUR']; ?>:</b> <br /><span class="gensmall"><?php echo $user->lang['COLOUR_EXPLAIN']; ?></span></td>
- <td class="row2"><table cellspacing="0" cellpadding="0" border="0"><tr><td><input class="post" type="text" name="color" value="<?php echo $color; ?>" size="8" maxlength="14" onchange="document.all.stylecolor.bgColor=this.form.color.value" /></td><td>&nbsp;</td><td bgcolor="<?php echo $color; ?>" id="stylecolor" style="border:solid 1px black;"><img src="../images/spacer.gif" width="45" height="15" alt="" /></td><td class="gensmall"> &nbsp; [ <a href="swatch.<?php echo $phpEx; ?>" onclick="swatch('color');return false" target="_swatch"><?php echo $user->lang['COLOUR_SWATCH']; ?></a> ]</td></tr></table></td>
- </tr>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['FONT_FACE']; ?>:</b> <br /><span class="gensmall"><?php echo $user->lang['FONT_FACE_EXPLAIN']; ?></span></td>
- <td class="row2"><input class="post" type="text" name="font_family" value="<?php echo $font_family; ?>" size="40" maxlength="255" /></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['FONT_SIZE']; ?>:</b></td>
- <td class="row2"><input class="post" type="text" name="font_size" value="<?php echo $font_size; ?>" size="3" maxlength="3" /> <select name="font_size_units"><?php
-
- foreach (array('pt', 'px', 'em', '%') as $units)
- {
- echo '<option value="' . $units . '"' . (($font_size_units == $units) ? ' selected="selected"' : '') . '>' . $units . '</option>';
- }
-
-?></select></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['BOLD']; ?>:</b></td>
- <td class="row2"><input type="radio" name="font_weight" value="bold"<?php echo (!empty($font_weight) && $font_weight == 'bold') ? ' checked="checked"' : ''; ?> /> <?php echo $user->lang['YES']; ?> &nbsp; <input type="radio" name="font_weight" value="normal"<?php echo (!empty($font_weight) && $font_weight == 'normal') ? ' checked="checked"' : ''; ?> /> <?php echo $user->lang['NO']; ?> &nbsp; <input type="radio" name="font_weight" value=""<?php echo (empty($font_weight)) ? ' checked="checked"' : ''; ?> /> <?php echo $user->lang['UNSET']; ?></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['ITALIC']; ?>:</b></td>
- <td class="row2"><input type="radio" name="font_style" value="italic"<?php echo (!empty($font_style) && $font_style == 'italic') ? ' checked="checked"' : ''; ?> /> <?php echo $user->lang['YES']; ?> &nbsp; <input type="radio" name="font_style" value="normal"<?php echo (!empty($font_style) && $font_style == 'normal') ? ' checked="checked"' : ''; ?> /> <?php echo $user->lang['NO']; ?> &nbsp; <input type="radio" name="font_style" value=""<?php echo (empty($font_style)) ? ' checked="checked"' : ''; ?> /> <?php echo $user->lang['UNSET']; ?></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['UNDERLINE']; ?>:</b></td>
- <td class="row2"><input type="radio" name="text_decoration" value="underline"<?php echo (!empty($text_decoration) && $text_decoration == 'underline') ? ' checked="checked"' : ''; ?> /> <?php echo $user->lang['YES']; ?> &nbsp; <input type="radio" name="text_decoration" value="none"<?php echo (!empty($text_decoration) && $text_decoration == 'none') ? ' checked="checked"' : ''; ?>/> <?php echo $user->lang['NO']; ?> &nbsp; <input type="radio" name="text_decoration" value=""<?php echo (empty($text_decoration)) ? ' checked="checked"' : ''; ?>/> <?php echo $user->lang['UNSET']; ?></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['LINE_SPACING']; ?>:</b></td>
- <td class="row2"><input class="post" type="text" name="line_height" value="<?php echo $line_height; ?>" size="3" maxlength="3" /> <select name="line_height_units"><?php
-
- foreach (array('pt', 'px', 'em', '%') as $units)
- {
- echo '<option value="' . $units . '"' . (($line_height_units == $units) ? ' selected="selected"' : '') . '>' . $units . '</option>';
- }
-
-?></select></td>
- </tr>
-<?php
-
- }
-
-?>
- <tr>
- <td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>"; />&nbsp;&nbsp;<input class="btnlite" type="submit" name="preview" value="<?php echo $user->lang['PREVIEW']; ?>" onclick="document.myvar='preview';" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" />&nbsp;&nbsp;<?php
-
- echo ($showcss) ? '<input class="btnlite" type="submit" name="hidecss" value="' . $user->lang['HIDE_RAW_CSS'] . '" />' : '<input class="btnlite" type="submit" name="showcss" value="' . $user->lang['SHOW_RAW_CSS'] . '" />';
- echo $s_hidden_fields;
-
-?></td>
- </tr>
- </table></td>
- </tr>
-</table>
-
-<h1><?php echo $user->lang['CUSTOM_CLASS']; ?></h1>
-
-<p><?php echo $user->lang['CUSTOM_CLASS_EXPLAIN']; ?></p>
-
-<table width="95%" cellspacing="1" cellpadding="1" border="0" align="center">
- <tr>
- <td><table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th colspan="2"><?php echo $user->lang['CUSTOM_CLASS']; ?></td>
- </tr>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['CSS_CLASS_NAME']; ?>:</b></td>
- <td class="row2"><input class="post" type="text" name="customclass" value="" maxlength="15" size="15" /></td>
- </tr>
- <tr>
- <td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="addclass" value="<?php echo $user->lang['SUBMIT']; ?>" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" /></td>
- </tr>
- </table>
-
- </td>
- </tr>
-</table></form>
-<?php
-
- adm_page_footer();
- break;
- }
-
- // Front page
- frontend('theme', array('details', 'refresh', 'export', 'delete'));
- break;
-
-
- // IMAGESETS
- case 'imageset':
- $imglist = array(
- 'buttons' => 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)) ? '<option class="sep" value="">' . $user->lang['IMG_CAT_' . strtoupper($category)] . '</option>' : '';
- foreach ($img_ary as $img)
- {
- $selected = ($img == $imgname) ? ' selected="selected"' : '';
- $img_options .= '<option value="' . $img . '"' . $selected . '>' . (($category == 'custom') ? $img : $user->lang['IMG_' . strtoupper($img)]) . '</option>';
- }
- }
-
- // 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') ? '<option class="sep" value="">' . $user->lang['LOCALISED_IMAGES'] . '</option>' : '<option class="sep" value="">' . $user->lang['GLOBAL_IMAGES'] . '</option>';
- foreach ($img_ary as $img)
- {
- $imgvalue = preg_replace('#^.*?/(.*?)$#', '\1', $img);
- $selected = (strstr($$imgname, $imgvalue)) ? ' selected="selected"' : '';
-
- $imagesetlist_options .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $imgvalue . '</option>';
- }
- }
- $imagesetlist_options = '<option value=""' . (($edit_img == '') ? ' selected="selected"' : '') . '>' . $user->lang['NONE'] . '</option>' . $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']);
-
-?>
-
-<script language="javascript" type="text/javascript" defer="defer">
-<!--
-
-function update_image(newimage)
-{
- document.newimg.src = (newimage) ? "<?php echo "{$phpbb_root_path}styles/$imageset_path/imageset/"; ?>" + newimage : "images/no_image.png";
-}
-//-->
-</script>
-
-<h1><?php echo $user->lang['EDIT_IMAGESET']; ?></h1>
-
-<p><?php echo $user->lang['EDIT_IMAGESET_EXPLAIN']; ?></p>
-
-<p><?php echo $user->lang['SELECTED_IMAGESET'] . ": <b>$imageset_name</b>"; ?></p>
-
-<form method="post" action="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;id=$id&amp;action=$action"; ?>"><table width="95%" cellspacing="1" cellpadding="1" border="0" align="center">
- <tr>
- <td align="right"><?php echo $user->lang['SELECT_IMAGE']; ?>: <select name="imgname" onchange="this.form.submit(); "><?php echo $img_options; ?></select>&nbsp; <input class="btnlite" type="submit" value="<?php echo $user->lang['SELECT']; ?>" tabindex="100" /></td>
- </tr>
- <tr>
- <td><table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th colspan="2"><?php echo $user->lang['EDIT_IMAGESET']; ?></th>
- </tr>
-<?php
-
- if (sizeof($error))
- {
-
-?>
- <tr>
- <td class="row1" colspan="2" align="center"><?php echo ($update) ? '<span style="color:green">' . implode('<br />', $error) . '</span>' : implode('<br />', $error); ?></td>
- </tr>
-<?php
-
- }
-
-?>
- <tr>
- <td class="row1" colspan="2" align="center"><table width="100%" cellspacing="2" cellpadding="2" border="0">
- <tr>
- <td width="50%" align="center"><img src="<?php
-
- echo (!empty($$imgname)) ? str_replace('"styles/', '../styles/', str_replace('{LANG}', $imglang, $$imgname)) : 'images/no_image.png';
-
-?>" /></td>
- <td width="50%" align="center"><img src="<?php
-
- echo (!empty($$imgname)) ? preg_replace('#(width|height)="[0-9]+?"#', '', str_replace('"styles/', '../styles/', str_replace('{LANG}', $imglang, $$imgname))) : 'images/no_image.png';
-
-?>" name="newimg" /></td>
- </tr>
- <tr>
- <td class="gensmall" align="center"><?php echo $user->lang['CURRENT_IMAGE']; ?></td>
- <td class="gensmall" align="center"><?php echo $user->lang['SELECTED_IMAGE']; ?></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <th width="40%"><?php echo $user->lang['IMAGE_PARAMETER']; ?></th>
- <th><?php echo $user->lang['IMAGE_VALUE']; ?></th>
- </tr>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['IMAGE']; ?>: </b></td>
- <td class="row2"><select name="imgpath" onchange="update_image(this.options[selectedIndex].value);"><?php echo $imagesetlist_options; ?></select></td>
- </tr>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['DIMENSIONS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['DIMENSIONS_EXPLAIN']; ?></span></td>
- <td class="row2"><input type="radio" name="imgsize" value="1"<?php echo $imgsize_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="imgsize" value="0"<?php echo $imgsize_no; ?> /> <?php echo $user->lang['NO']; ?></td>
- </tr>
- <tr>
- <td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>" />&nbsp;&nbsp;<input class="btnmain" type="reset" value="<?php echo $user->lang['RESET']; ?>" /></td>
- </tr>
- </table></td>
- </tr>
-</table></form>
-
-<?php
-
- adm_page_footer();
- break;
- }
-
- // Front page
- frontend('imageset', array('details', 'delete', 'export'));
- break;
-}
-
-exit;
-
-
-// ---------
-// FUNCTIONS
-//
-function frontend($type, $options)
-{
- global $phpbb_root_path, $phpEx, $SID, $config, $db, $user, $mode;
-
- 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;
- }
-
- $l_prefix = strtoupper($type);
- $thspan = ($type != 'style') ? sizeof($options) + 1: sizeof($options) + 2;
- $tdspan = ($type != 'style') ? $thspan + 2 : $thspan + 3;
-
- // Output list of themes
- adm_page_header($user->lang[$l_prefix . 'S']);
-
-?>
-<h1><?php echo $user->lang[$l_prefix . 'S']; ?></h1>
-
-<p><?php echo $user->lang[$l_prefix . 'S_EXPLAIN']; ?></p>
-
-<form name="style" method="post" action="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode"; ?>"><table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th nowrap="nowrap"><?php echo $user->lang[$l_prefix . '_NAME']; ?></th>
-<?php
-
- if ($type == 'style')
- {
-?>
- <th nowrap="nowrap"><?php echo $user->lang['STYLE_USED_BY']; ?></th>
-<?php
-
- }
-
-?>
- <th colspan="<?php echo $thspan; ?>" nowrap="nowrap"><?php echo $user->lang['OPTIONS']; ?></th>
- </tr>
- <tr>
- <td class="row3" colspan="<?php echo $tdspan; ?>"><b><?php echo $user->lang['INSTALLED_' . $l_prefix]; ?></b></td>
- </tr>
-<?php
-
- if ($type == 'style')
- {
- $sql = 'SELECT user_style, COUNT(user_style) AS style_count
- FROM ' . USERS_TABLE . '
- GROUP BY user_style';
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $style_count[$row['user_style']] = $row['style_count'];
- }
- $db->sql_freeresult($result);
- }
-
- $sql = "SELECT *
- FROM $sql_from";
- $result = $db->sql_query($sql);
-
- $installed = array();
- $basis_options = '<option class="sep" value="">' . $user->lang['OPTIONAL_BASIS'] . '</option>';
- while ($row = $db->sql_fetchrow($result))
- {
- $installed[] = $row[$type . '_name'];
- $basis_options .= '<option value="' . $row[$type . '_id'] . '">' . $row[$type . '_name'] . '</option>';
-
- $row_class = ($row_class != 'row1') ? 'row1' : 'row2';
-
- $tagstyle = ($type == 'style' && $row['style_id'] == $config['default_style']) ? '*' : '';
-
-?>
- <tr>
- <td class="<?php echo $row_class; ?>" width="100%"><a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=" . (($type == 'style') ? 'details' : 'edit') . "&amp;id=" . $row[$type . '_id']; ?>"><?php echo $row[$type . '_name']; ?></a> <?php echo $tagstyle; ?></td>
-<?php
-
- if ($type == 'style')
- {
- $stylevis = (!$row['style_active']) ? 'activate' : 'deactivate';
-
-?>
- <td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"><?php echo (!empty($style_count[$row['style_id']])) ? $style_count[$row['style_id']] : '0'; ?></td>
- <td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap">&nbsp;<a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=$stylevis&amp;id=" . $row['style_id']; ?>"><?php echo $user->lang['STYLE_' . strtoupper($stylevis)]; ?></a>&nbsp;</td>
-<?php
-
- }
-
- foreach ($options as $option)
- {
-
-?>
- <td class="<?php echo $row_class; ?>" nowrap="nowrap">&nbsp;<a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=$option&amp;id=" . $row[$type . '_id']; ?>"><?php echo $user->lang[strtoupper($option)]; ?></a>&nbsp;</td>
-<?php
-
- }
-
-?>
- <td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap">&nbsp;<a href="<?php echo "{$phpbb_root_path}index.$phpEx$SID&amp;$type=" . $row[$type . '_id']; ?>" target="_preview"><?php echo $user->lang['PREVIEW']; ?></a>&nbsp;</td>
- </tr>
-<?php
-
- }
- $db->sql_freeresult($result);
-
-?>
- <tr>
- <td class="row3" colspan="<?php echo $tdspan; ?>"><b><?php echo $user->lang['UNINSTALLED_' . $l_prefix]; ?></b></td>
- </tr>
-<?php
-
- $new_ary = $cfg = array();
- $dp = opendir("{$phpbb_root_path}styles");
- while ($file = readdir($dp))
- {
- $subpath = ($type != 'style') ? "$type/" : '';
- if ($file{0} != '.' && file_exists("{$phpbb_root_path}styles/$file/$subpath$type.cfg"))
- {
- if ($cfg = file("{$phpbb_root_path}styles/$file/$subpath$type.cfg"))
- {
- $name = trim($cfg[0]);
- if (!in_array($name, $installed))
- {
- $new_ary[$i]['path'] = $file;
- $new_ary[$i]['name'] = $name;
- $i++;
- }
- }
- }
- }
- unset($installed);
- @closedir($dp);
-
- if (sizeof($new_ary))
- {
- foreach ($new_ary as $key => $cfg)
- {
- $row_class = ($row_class != 'row1') ? 'row1' : 'row2';
-
-?>
- <tr>
- <td class="<?php echo $row_class; ?>"><?php echo $cfg['name']; ?></td>
- <td class="<?php echo $row_class; ?>" colspan="<?php echo ($type != 'style') ? $thspan : $thspan + 1 ?>" align="center"><a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=install&amp;path=" . urlencode($cfg['path']); ?>"><?php echo $user->lang['INSTALL']; ?></a></td>
- </tr>
-<?php
-
- }
- }
- else
- {
-
-?>
- <tr>
- <td class="row1" colspan="<?php echo $tdspan; ?>" align="center"><?php echo $user->lang['NO_UNINSTALLED_' . $l_prefix]; ?></td>
- </tr>
-<?php
-
- }
- unset($new_ary);
-
-?>
- <tr>
- <td class="cat" colspan="<?php echo $tdspan; ?>" align="right"><?php echo $user->lang['CREATE_' . $l_prefix]; ?>: <input class="post" type="text" name="name" value="" maxlength="30" size="25" /> <?php echo $user->lang['FROM']; ?> <select name="basis"><?php echo $basis_options; ?></select> <input class="btnmain" type="submit" name="add" value="<?php echo $user->lang['SUBMIT']; ?>" /></td>
- </tr>
-</table></form>
-
-<?php
-
- adm_page_footer();
-
-}
-
-function remove($type, $id)
-{
- global $phpbb_root_path, $phpEx, $SID, $config, $db, $cache, $user, $mode, $action;
-
- $new_id = (!empty($_POST['newid'])) ? intval($_POST['newid']) : false;
- $deletefs = (!empty($_POST['deletefs'])) ? true : false;
- $update = (isset($_POST['update'])) ? true : false;
-
- switch ($type)
- {
- case 'style':
- $sql_from = STYLES_TABLE;
- $sql_select = 'style_name';
- break;
- case 'template':
- $sql_from = STYLES_TPL_TABLE;
- $sql_select = 'template_name, template_path, template_storedb';
- break;
- case 'theme':
- $sql_from = STYLES_CSS_TABLE;
- $sql_select = 'theme_name, theme_path, theme_storedb';
- break;
- case 'imageset':
- $sql_from = STYLES_IMAGE_TABLE;
- $sql_select = 'imageset_name, imageset_path';
- break;
- }
-
- $l_prefix = strtoupper($type);
-
- $sql = "SELECT $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_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 .= '<option value="' . $row[$type . '_id'] . '">' . $row[$type . '_name'] . '</option>';
- }
- 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]);
-
-?>
-<h1><?php echo $user->lang['DELETE_' . $l_prefix]; ?></h1>
-
-<p><?php echo $user->lang['DELETE_' . $l_prefix . '_EXPLAIN']; ?></p>
-
-<form name="style" method="post" action="<?php echo "admin_styles.$phpEx$SID&amp;mode=$type&amp;action=delete&amp;id=$id"; ?>"><table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th colspan="2"><?php echo $user->lang['DELETE_' . $l_prefix]; ?></td>
- </tr>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang[$l_prefix . '_NAME']; ?>:</b></td>
- <td class="row2"><b><?php echo ${$type . '_name'}; ?></b></td>
- </tr>
-<?php
-
- if ($type != 'style' && !$storedb && is_writeable("{$phpbb_root_path}styles/$path/$type"))
- {
-
-?>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['DELETE_FROM_FS']; ?>: </b></td>
- <td class="row2"><input type="radio" name="deletefs" value="1" /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="deletefs" value="0" checked="checked" /> <?php echo $user->lang['NO']; ?></td>
- </tr>
-<?php
-
- }
-
-?>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['REPLACE_' . $l_prefix]; ?>:</b><br /><span class="gensmall"><?php echo $user->lang['REPLACE_' . $l_prefix . '_EXPLAIN']; ?></span></td>
- <td class="row2"><select name="newid"><?php echo $options; ?></select></td>
- </tr>
- <tr>
- <td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['DELETE']; ?>"; />&nbsp;&nbsp;<input class="btnlite" type="submit" name="cancel" value="<?php echo $user->lang['CANCEL']; ?>"; /></td>
- </tr>
-</table></form>
-<?php
-
- adm_page_footer();
-
-}
-
-// Export style or style elements
-function export($mode, $id)
-{
- global $phpbb_root_path, $phpEx, $SID, $config, $db, $user;
-
- $update = (isset($_POST['update'])) ? true : false;
-
- $inc_template = (!empty($_POST['inc_template'])) ? true : false;
- $inc_theme = (!empty($_POST['inc_theme'])) ? true : false;
- $inc_imageset = (!empty($_POST['inc_imageset'])) ? true : false;
- $format = (isset($_POST['format'])) ? htmlspecialchars($_POST['format']) : '';
- $store = (!empty($_POST['store'])) ? true : false;
-
- switch ($mode)
- {
- case 'style':
- if ($update && $inc_template + $inc_theme + $inc_imageset < 1)
- {
- $error[] = $user->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']);
-
-?>
-<h1><?php echo $user->lang[$l_prefix . '_EXPORT']; ?></h1>
-
-<p><?php echo $user->lang[$l_prefix . '_EXPORT_EXPLAIN']; ?></p>
-
-<form name="style" method="post" action="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=export&amp;id=$id"; ?>"><table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
-<tr>
- <th colspan="2"><?php echo $user->lang[$l_prefix . '_EXPORT']; ?></td>
-</tr>
-<?php
-
- if (sizeof($error))
- {
-
-?>
-<tr>
- <td colspan="2" class="row3" align="center"><span style="color:red"><?php echo implode('<br />', $error); ?></span></td>
-</tr>
-<?php
-
- }
-
-?>
-<tr>
- <td class="row1" width="40%"><b><?php echo $user->lang[$l_prefix . '_NAME']; ?>:</b></td>
- <td class="row2"><b><?php echo ${$mode . '_name'}; ?></b></td>
-</tr>
-<?php
-
- if ($mode == 'style')
- {
-
-?>
-<tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['INCLUDE_TEMPLATE']; ?>:</b></td>
- <td class="row2"><input type="radio" name="inc_template" value="1" checked="checked" /> <?php echo $user->lang['YES']; ?> &nbsp;&nbsp;<input type="radio" name="inc_template" value="0" /> <?php echo $user->lang['NO']; ?> </td>
-</tr>
-<tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['INCLUDE_THEME']; ?>:</b></td>
- <td class="row2"><input type="radio" name="inc_theme" value="1" checked="checked" /> <?php echo $user->lang['YES']; ?> &nbsp;&nbsp;<input type="radio" name="inc_theme" value="0" /> <?php echo $user->lang['NO']; ?> </td>
-</tr>
-<tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['INCLUDE_IMAGESET']; ?>:</b></td>
- <td class="row2"><input type="radio" name="inc_imageset" value="1" checked="checked" /> <?php echo $user->lang['YES']; ?> &nbsp;&nbsp;<input type="radio" name="inc_imageset" value="0" /> <?php echo $user->lang['NO']; ?> </td>
-</tr>
-<?php
-
- }
-
-?>
-<tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['DOWNLOAD_STORE']; ?>:</b><br /><span class="gensmall"><?php echo $user->lang['DOWNLOAD_STORE_EXPLAIN']; ?></span></td>
- <td class="row2"><input type="radio" name="store" value="1" checked="checked" /> <?php echo $user->lang['EXPORT_STORE']; ?> &nbsp;&nbsp;<input type="radio" name="store" value="0" /> <?php echo $user->lang['EXPORT_DOWNLOAD']; ?> </td>
-</tr>
-<tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['ARCHIVE_FORMAT']; ?>:</b></td>
- <td class="row2"><input type="radio" name="format" value="tar" /> .tar&nbsp;&nbsp;<?php
-
- $compress_types = array('tar.gz' => 'zlib', 'tar.bz2' => 'bz2', 'zip' => 'zlib');
-
- foreach ($compress_types as $type => $module)
- {
- if (!extension_loaded($module))
- {
- continue;
- }
- echo '<input type="radio" name="format" value="' . $type . '" /> .' . $type . '&nbsp;&nbsp;';
- }
-
-?></td>
-</tr>
-<tr>
- <td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>"; />&nbsp;&nbsp;<input class="btnlite" type="submit" name="cancel" value="<?php echo $user->lang['CANCEL']; ?>"; /></td>
-</tr>
-</table></form>
-<?php
-
- adm_page_footer();
-
-}
-
-function store_templates($mode, $id, $path, $filelist)
-{
- global $phpbb_root_path, $phpEx, $db;
-
- $includes = array();
- foreach ($filelist as $pathfile => $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('#<!-- INCLUDE (.*?\.html) -->#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 = '<input type="hidden" name="path" value="' . $install_path . '" />';
- }
- 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 .= '<input type="hidden" name="basis" value="' . $basis . '" />';
- }
- }
-
- $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'} .= '<option value="' . $row[$element . '_id'] . '"' . $selected . '>' . $row[$element . '_name'] . '</option>';
- }
- $db->sql_freeresult($result);
- }
- }
-
- // Output the page
- adm_page_header($user->lang[$l_prefix . '_' . $l_type]);
-
-?>
-
-<h1><?php echo $user->lang[$l_prefix . '_' . $l_type]; ?></h1>
-
-<p><?php echo $user->lang[$l_prefix . '_' . $l_type . '_EXPLAIN']; ?></p>
-
-<form name="style" method="post" action="<?php echo "admin_styles.$phpEx$SID&amp;mode=$type&amp;action=$action&amp;id=$id"; ?>"<?php echo (!$safe_mode && $file_uploads && is_writeable("{$phpbb_root_path}styles")) ? ' enctype="multipart/form-data"' : ''; ?>><table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th colspan="2"><?php echo $user->lang[$l_prefix . '_' . $l_type]; ?></th>
- </tr>
-<?php
-
- if (sizeof($error))
- {
-
-?>
- <tr>
- <td colspan="2" class="row3" align="center"><span style="color:red"><?php echo implode('<br />', $error); ?></span></td>
- </tr>
-<?php
-
- }
-
-?>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang[$l_type . '_NAME']; ?>:</b></td>
- <td class="row2"><?php
- $style_name = 'subSilver2';
- $style_copyright = '(c) 2004 Tom Beddard';
- echo ($action == 'add') ? '<input class="post" type="text" name="name" maxlength="30" size="30" value="' . $name . '" />' : '<b>' . ${$type . '_name'} . '</b>';
-
-?></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['COPYRIGHT']; ?>:</b></td>
- <td class="row2"><?php
-
- echo ($action == 'add') ? '<input class="post" type="text" name="copyright" maxlength="60" size="30" value="' . $copyright . '" />' : '<b>' . ${$type . '_copyright'} . '</b>';
-
-?></td>
- </tr>
-<?php
-
- if ($type == 'style' && !$basis)
- {
-
-?>
- <tr>
- <td class="row1"><b><?php echo $user->lang['STYLE_TEMPLATE']; ?>:</b></td>
- <td class="row2"><?php
-
- echo ($action == 'install') ? "<b>$template_name</b>" : '<select name="template_id">' . $template_options . '</select>';
-
-?></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['STYLE_THEME']; ?>:</b></td>
- <td class="row2"><?php
-
- echo ($action == 'install') ? "<b>$theme_name</b>" : '<select name="theme_id">' . $theme_options . '</select>';
-
-?></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['STYLE_IMAGESET']; ?>:</b></td>
- <td class="row2"><?php
-
- echo ($action == 'install') ? "<b>$imageset_name</b>" : '<select name="imageset_id">' . $imageset_options . '</select>';
-
-?></td>
- </tr>
-<?php
-
- }
-
- if ($type == 'template' || $type == 'theme')
- {
- $storedb_no = (!$storedb) ? ' checked="checked"' : '';
- $storedb_yes = ($storedb) ? ' checked="checked"' : '';
-
-?>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang[$l_type . '_LOCATION']; ?>:</b><br /><span class="gensmall"><?php echo $user->lang[$l_type . '_LOCATION_EXPLAIN']; ?></span></td>
- <td class="row2"><input type="radio" name="storedb" value="0"<?php echo $storedb_no; ?> /> <?php echo $user->lang['STORE_FILESYSTEM']; ?>&nbsp;&nbsp;<input type="radio" name="storedb" value="1"<?php echo $storedb_yes; ?> /> <?php echo $user->lang['STORE_DATABASE']; ?></td>
- </tr>
-<?php
-
- }
-
- // Import, upload and basis options
- if ($action == 'add' && !$safe_mode && is_writeable("{$phpbb_root_path}styles"))
- {
-
-?>
- <tr>
- <th colspan="2"><?php echo $user->lang['OPTIONS']; ?></th>
- </tr>
-<?php
-
- if (!$basis)
- {
- $store_options = '';
- $dp = @opendir("{$phpbb_root_path}store");
- while ($file = readdir($dp))
- {
- if ($file{0} != '.' && preg_match('#(' . $archive_preg . ')$#i', $file))
- {
- $store_options .= "<option value=\"$file\">$file</option>";
- }
- }
- closedir($dp);
-
- $store_options = '<option value="">' . $user->lang['NO_IMPORT'] . '</option>' . $store_options;
-
- if ($file_uploads)
- {
-
-?>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang[$l_type . '_UPLOAD_BASIS']; ?>:</b><br /><span class="gensmall"><?php echo $user->lang['ALLOWED_FILETYPES']; ?>: <?php echo $archive_types; ?></span></td>
- <td class="row2"><input class="post" type="file" name="upload_file" /><input type="hidden" name="MAX_FILE_SIZE" value="1048576" /></td>
- </tr>
-<?php
-
- }
-
-?>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang[$l_type . '_IMPORT_BASIS']; ?>:</b></td>
- <td class="row2"><select name="import_file"><?php echo $store_options; ?></select></td>
- </tr>
-<?php
-
- }
- else if ($basis)
- {
-
-?>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang[$l_type . '_BASIS']; ?>: </b></td>
- <td class="row2"><b><?php echo ${$type . '_name'}; ?></b></td>
- </tr>
-<?php
-
- }
- }
-
- if ($type == 'style')
- {
- $active_yes = ($style_active) ? ' checked="checked"' : '';
- $active_no = (!$style_active) ? ' checked="checked"' : '';
- $style_default_yes = ($style_default) ? ' checked="checked"' : '';
- $style_default_no = (!$style_default) ? ' checked="checked"' : '';
-
-?>
- <tr>
- <th colspan="2">&nbsp;</th>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['STYLE_ACTIVE']; ?>:</b></td>
- <td class="row2"><input type="radio" name="style_active" value="1"<?php echo $active_yes; ?> /> <?php echo $user->lang['YES']; ?> &nbsp; <input type="radio" name="style_active" value="0"<?php echo $active_no; ?> /> <?php echo $user->lang['NO']; ?></td>
- </tr>
-<?php
-
- if ($id != $config['default_style'])
- {
-
-?>
- <tr>
- <td class="row1"><b><?php echo $user->lang['STYLE_DEFAULT']; ?>:</b></td>
- <td class="row2"><input type="radio" name="style_default" value="1"<?php echo $style_default_yes; ?> /> <?php echo $user->lang['YES']; ?> &nbsp; <input type="radio" name="style_default" value="0"<?php echo $style_default_no; ?> /> <?php echo $user->lang['NO']; ?></td>
- </tr>
-<?php
-
- }
- }
-
-?>
- <tr>
- <td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" /><?php echo $s_hidden_fields; ?></td>
- </tr>
-</table></form>
-<?php
-
- adm_page_footer();
-
-}
-
-
-// Hopefully temporary
-function theme_preview(&$path, &$stylesheet, &$class, &$css_element)
-{
- global $config, $user;
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html dir="<?php echo $user->lang['LTR']; ?>">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $user->lang['ENCODING']; ?>">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<style type="text/css">
-<!--
-<?php
-
-
- $updated_element = implode('; ', $css_element) . ';';
-
- if (preg_match('#^' . $class . ' {(.*?)}#m', $stylesheet))
- {
- $stylesheet = preg_replace('#^(' . $class . ' {).*?(})#m', '\1 ' . $updated_element . ' \2', $stylesheet);
- }
-
- echo str_replace('styles/', '../styles/', str_replace('./', "styles/$path/theme/", $stylesheet));
-
-?>
-//-->
-</style>
-</head>
-<body>
-
-<table width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr align="center" valign="middle">
- <td height="100" width="33%"><h1>h1</h1></td>
- <td height="100" width="33%"><h2>h2</h2></td>
- <td height="100" width="33%"><h3>h3</h3></td>
- </tr>
- <tr align="center">
- <td colspan="3" height="30"><a class="mainmenu" href="">mainmenu</a></td>
- </tr>
- <tr>
- <td colspan="3" height="50">&nbsp;</td>
- </tr>
-</table>
-
-<table width="95%" cellspacing="2" cellpadding="2" border="0" align="center">
- <tr>
- <td align="left" valign="bottom"><a class="titles" href="">titles</a>
- </tr>
-</table>
-
-<table width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <td class="nav" width="10" align="left" valign="middle"><a href="">navlink</a></td>
- </tr>
-</table>
-
-<table class="tablebg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th colspan="3">th</th>
- </tr>
- <tr>
- <td class="cat" width="40%"><span class="cattitle">cattitle / cat</span></td>
- <td class="catdiv" colspan="2">catdiv</td>
- </tr>
- <tr>
- <td class="row1" width="40%"><a class="topictitle" href="">topictitle / row1</a></td>
- <td class="row2"><span class="topicauthor">topicauthor / row2</span></td>
- <td class="row1"><span class="topicdetails">topicdetails / row1</span></td>
- </tr>
- <tr>
- <td class="row3" colspan="3">row3</td>
- </tr>
- <tr>
- <td class="spacer" colspan="3">spacer</td>
- </tr>
- <tr>
- <td class="row1"><span class="postauthor">postauthor / row1</span></td>
- <td class="row2"><span class="postdetails">postdetails / row2</span></td>
- <td class="row1"><span class="postbody">postbody / row1 <span class="posthilit">posthilit</span></span></td>
- </tr>
-</table>
-
-<br /><hr width="95%" />
-
-<table width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr align="center">
- <td><span class="gen">gen</span></td>
- <td><span class="genmed">genmed</span></td>
- <td><span class="gensmall">gensmall</span></td>
- </tr>
- <tr align="center">
- <td colspan="3"><span class="copyright">copyright <a href="">phpBB</a></span></td>
- </tr>
-</table>
-
-<hr width="95%" /><br />
-
-<form><table width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr align="center">
- <td><input class="btnmain" type="submit" value="input / btnmain" /></td>
- <td><input class="btnlite" type="submit" value="input / btnlite" /></td>
- <td><input class="btnbbcode" type="submit" value="input / btnbbcode" /></td>
- </tr>
- <tr align="center">
- <td colspan="3"><input class="post" type="text" value="input / post" /></td>
- </tr>
- <tr align="center">
- <td colspan="3"><select class="post"><option>select</option></select></td>
- </tr>
- <tr align="center">
- <td colspan="3"><textarea class="post">textarea / post</textarea></td>
- </tr>
-</table></form>
-
-<hr width="95%" /><br />
-
-<table class="tablebg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <td class="row2" align="center"><span class="postbody">postbody / <b>bold</b> <i>italic</i> <u>underline</u></span></td>
- </tr>
- <tr>
- <td class="row2"><table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
- <tr>
- <td class="quote"><b>A_N_Other wrote:</b><hr />quote</td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td class="row2"><table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
- <tr>
- <td><b class="genmed">Code:</b></td>
- </tr>
- <tr>
- <td class="code">10 Print "hello"<br />20 Goto 10</td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td class="row2"><table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
- <tr>
- <td><b class="genmed">PHP:</b></td>
- </tr>
- <tr>
- <td class="code"><span class="syntaxbg"><span class="syntaxcomment">// syntaxcomment</span><br /><span class="syntaxdefault">?&gt;</span><br />&lt;<span class="syntaxhtml">HTML</span>&gt;<br /><span class="syntaxdefault">&lt;?php</span><br /><span class="syntaxkeyword">echo </span> <span class="syntaxdefault">$this = </span><span class="syntaxstring">"HELLO"</span><span class="syntaxdefault">;</span></span></td>
- </tr>
- </table></td>
- </tr>
-</table>
-
-<br clear="all" />
-
-</body>
-</html>
-<?php
-
-}
-//
-// FUNCTIONS
-// ---------
-
-?> \ 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 @@
-<?php
-/**
-*
-* @package acp
-* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-*/
-if (!empty($setmodules))
-{
- if (!$auth->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))
- {
-?>
-
-<table class="bg" width="90%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th>IP whois for <?php echo $domain; ?></th>
- </tr>
- <tr>
- <td class="row1"><?php
-
- if ($ipwhois = user_ipwhois($ip))
- {
- $ipwhois = preg_replace('#(\s+?)([\w\-\._\+]+?@[\w\-\.]+?)(\s+?)#s', '\1<a href="mailto:\2">\2</a>\3', $ipwhois);
- echo '<br /><pre align="left">' . trim($ipwhois) . '</pre>';
- }
-
-?></td>
- </tr>
-</table>
-
-<br clear="all" />
-
-<?php
-
- }
-
- adm_page_footer();
-}
-
-//
-// Obtain user information if appropriate
-//
-if ($username || $user_id)
-{
- $session_time = 0;
- $sql_where = ($user_id) ? "user_id = $user_id" : "username = '" . $db->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 .= '<option value="' . $value . '"' . $selected . '>' . $user->lang['USER_ADMIN_' . $lang] . '</option>';
- }
-
- // Make sure $user_id is available.
- $user_id = $userrow['user_id'];
-
- $pagination = '';
-
-?>
-
-<script language="javascript" type="text/javascript">
-<!--
-
-var form_name = 'admin';
-var text_name = 'signature';
-
-// Define the bbCode tags
-bbcode = new Array();
-bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]');
-imageTag = false;
-
-// Helpline messages
-b_help = "<?php echo $user->lang['BBCODE_B_HELP']; ?>";
-i_help = "<?php echo $user->lang['BBCODE_I_HELP']; ?>";
-u_help = "<?php echo $user->lang['BBCODE_U_HELP']; ?>";
-q_help = "<?php echo $user->lang['BBCODE_Q_HELP']; ?>";
-c_help = "<?php echo $user->lang['BBCODE_C_HELP']; ?>";
-l_help = "<?php echo $user->lang['BBCODE_L_HELP']; ?>";
-o_help = "<?php echo $user->lang['BBCODE_O_HELP']; ?>";
-p_help = "<?php echo $user->lang['BBCODE_P_HELP']; ?>";
-w_help = "<?php echo $user->lang['BBCODE_W_HELP']; ?>";
-a_help = "<?php echo $user->lang['BBCODE_A_HELP']; ?>";
-s_help = "<?php echo $user->lang['BBCODE_S_HELP']; ?>";
-f_help = "<?php echo $user->lang['BBCODE_F_HELP']; ?>";
-e_help = "<?php echo $user->lang['BBCODE_E_HELP']; ?>";
-
-//-->
-</script>
-<script language="javascript" type="text/javascript" src="editor.js"></script>
-
-<h1><?php echo $user->lang['USER_ADMIN']; ?></h1>
-
-<p><?php echo $user->lang['USER_ADMIN_EXPLAIN']; ?></p>
-
-<form method="post" name="admin" action="<?php echo "admin_users.$phpEx$SID&amp;mode=$mode&amp;u=$user_id"; ?>"<?php echo ($file_uploads) ? ' enctype="multipart/form-data"' : ''; ?>><table width="100%" cellspacing="2" cellpadding="0" border="0" align="center">
- <tr>
- <td align="right"><?php echo $user->lang['SELECT_FORM']; ?>: <select name="mode" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();"><?php echo $form_options; ?></select></td>
- </tr>
- <tr>
- <td><table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0">
-<?php
-
- if (sizeof($error))
- {
-
-?>
- <tr>
- <td class="row3" colspan="" align="center"><span class="error"><?php echo implode('<br />', $error); ?></span></td>
- </tr>
-<?php
-
- }
-
-
- switch ($mode)
- {
- case 'overview':
-
- if ($submit)
- {
- // You can't delete the founder
- if ($delete && $userrow['user_type'] != USER_FOUNDER)
- {
- if (!$auth->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('<br />', "\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)))
- {
-
-?>
-
-<h1><?php echo $user->lang['USER_ADMIN']; ?></h1>
-
-<p><?php echo $user->lang['USER_ADMIN_EXPLAIN']; ?></p>
-
-<form method="post" action="<?php echo "admin_users.$phpEx$SID&amp;action=$action&amp;quicktools=moveposts&amp;u=$user_id"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th align="center"><?php echo $user->lang['USER_ADMIN_MOVE_POSTS']; ?></th>
- </tr>
- <tr>
- <td class="row2" align="center" valign="middle"><?php echo $user->lang['MOVE_POSTS_EXPLAIN']; ?><br /><br /><select name="new_f"><?php
-
- echo make_forum_select(false, false, false, true);
-
-?></select>&nbsp;</td>
- </tr>
- <tr>
- <td class="cat" align="center"><input type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>" class="btnmain" /></td>
- </tr>
-</table>
-<?php
-
- adm_page_footer();
- }
- else
- {
- // Two stage?
- // Move topics comprising only posts from this user
- $topic_id_ary = array();
- $forum_id_ary = array($new_forum_id);
-
- $sql = 'SELECT topic_id, COUNT(post_id) AS total_posts
- FROM ' . POSTS_TABLE . "
- WHERE poster_id = $user_id
- AND forum_id <> $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 = '<option class="sep" value="">' . $user->lang['SELECT_OPTION'] . '</option>';
- foreach ($quick_tool_ary as $value => $lang)
- {
- $options .= '<option value="' . $value . '">' . $user->lang['USER_ADMIN_' . $lang] . '</option>';
- }
-
- $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)
- {
-?>
- <tr>
- <td colspan="2"><?php echo $error_msg;?></td>
- </tr>
-<?php
- }
-
-?>
- <tr>
- <th colspan="2"><?php echo $user->lang['USER_ADMIN_OVERVIEW']; ?></th>
- </tr>
- <tr>
- <td class="row1" width="40%"><?php echo $user->lang['USERNAME']; ?>: <br /><span class="gensmall"><?php echo sprintf($user->lang[$user_char_ary[str_replace('\\\\', '\\', $config['allow_name_chars'])] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']); ?></span></td>
- <td class="row2"><input class="post" type="text" name="username" value="<?php echo $userrow['username']; ?>" maxlength="60" /></td>
- </tr>
- <tr>
- <td class="row1"><?php echo $user->lang['REGISTERED']; ?>: </td>
- <td class="row2"><strong><?php echo $user->format_date($userrow['user_regdate']); ?></strong></td>
- </tr>
-<?php
-
- if ($userrow['user_ip'])
- {
-
-?>
- <tr>
- <td class="row1"><?php echo $user->lang['REGISTERED_IP']; ?>: </td>
- <td class="row2"><strong><?php echo "<a href=\"admin_users.$phpEx$SID&amp;action=$action&amp;u=$user_id&amp;ip=" . ((!$ip || $ip == 'ip') ? 'hostname' : 'ip') . '">' . (($ip == 'hostname') ? gethostbyaddr($user_ip) : $user_ip) . "</a> [ <a href=\"admin_users.$phpEx$SID&amp;action=whois&amp;ip=" . $userrow['user_ip'] . "\" onclick=\"window.open('admin_users.$phpEx$SID&amp;action=whois&amp;ip=" . $userrow['user_ip'] . "', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=600');return false;\">" . $user->lang['WHOIS'] . '</a> ]'; ?></strong></td>
- </tr>
-<?php
-
- }
-?>
- <tr>
- <td class="row1" width="40%"><?php echo $user->lang['LAST_ACTIVE']; ?>: </td>
- <td class="row2"><strong><?php echo $user->format_date($userrow['user_lastvisit']); ?></strong></td>
- </tr>
- <tr>
- <td class="row1"><?php echo $user->lang['FOUNDER']; ?>: <br /><span class="gensmall"><?php echo $user->lang['FOUNDER_EXPLAIN']; ?></span></td>
- <td class="row2"><input type="radio" name="user_founder" value="1"<?php echo $user_founder_yes; ?> /><?php echo $user->lang['YES']; ?>&nbsp;<input type="radio" name="user_founder" value="0"<?php echo $user_founder_no; ?> /><?php echo $user->lang['NO']; ?></td>
- </tr>
- <tr>
- <td class="row1"><?php echo $user->lang['EMAIL']; ?>: </td>
- <td class="row2"><input class="post" type="text" name="user_email" value="<?php echo $userrow['user_email']; ?>" maxlength="60" /></td>
- </tr>
- <tr>
- <td class="row1"><?php echo $user->lang['CONFIRM_EMAIL']; ?>: <br /><span class="gensmall"><?php echo $user->lang['CONFIRM_EMAIL_EXPLAIN']; ?></span></td>
- <td class="row2"><input class="post" type="text" name="email_confirm" value="<?php echo $email_confirm; ?>" maxlength="60" /></td>
- </tr>
- <tr>
- <td class="row1"><?php echo $user->lang['NEW_PASSWORD']; ?>: <br /><span class="gensmall"><?php echo sprintf($user->lang['CHANGE_PASSWORD_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']) ?></span></td>
- <td class="row2"><input class="post" type="password" name="user_password" value="<?php echo ($submit) ? $user_password : ''; ?>" maxlength="60" /></td>
- </tr>
- <tr>
- <td class="row1"><?php echo $user->lang['CONFIRM_PASSWORD']; ?>: <br /><span class="gensmall"><?php echo $user->lang['CONFIRM_PASSWORD_EXPLAIN']; ?></span></td>
- <td class="row2"><input class="post" type="password" name="password_confirm" value="<?php echo ($submit) ? $user_password_confirm : ''; ?>" maxlength="60" /></td>
- </tr>
-<?php
-
- if ($userrow['user_type'] != USER_FOUNDER)
- {
-
-?>
- <tr>
- <th colspan="2"><?php echo $user->lang['USER_TOOLS']; ?></td>
- </tr>
- <tr>
- <td class="row1"><?php echo $user->lang['WARNINGS']; ?>: <br /><span class="gensmall"><?php echo $user->lang['WARNINGS_EXPLAIN']; ?></span></td>
- <td class="row2"><input class="post" type="text" name="warnings" size="2" maxlength="2" value="<?php echo $userrow['user_warnings']; ?>" /></td>
- </tr>
- <tr>
- <td class="row1"><?php echo $user->lang['QUICK_TOOLS']; ?>: </td>
- <td class="row2"><select name="quicktools"><?php echo $options; ?></select></td>
- </tr>
- <tr>
- <td class="row1"><?php echo $user->lang['DELETE_USER']; ?>: <br /><span class="gensmall"><?php echo $user->lang['DELETE_USER_EXPLAIN']; ?></span></td>
- <td class="row2"><select name="deletetype"><option value="retain"><?php echo $user->lang['RETAIN_POSTS']; ?></option><option value="remove"><?php echo $user->lang['DELETE_POSTS']; ?></option></select> <input type="checkbox" name="delete" value="1" /> </td>
- </tr>
-<?php
-
- }
-
-?>
- <tr>
- <td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" /></td>
- </tr>
-<?php
-
- break;
-
- case 'feedback':
-
- if ($submit)
- {
- if (($deletemark || $deleteall) && $auth->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');
-
-?>
- <tr>
- <th colspan="2"><?php echo $user->lang['USER_ADMIN_FEEDBACK']; ?></th>
- </tr>
- <tr>
- <td class="cat" colspan="2" align="center"><?php echo $user->lang['DISPLAY_LOG']; ?>: &nbsp;<?php echo $s_limit_days; ?>&nbsp;<?php echo $user->lang['SORT_BY']; ?>: <?php echo $s_sort_key; ?> <?php echo $s_sort_dir; ?>&nbsp;<input class="btnlite" type="submit" value="<?php echo $user->lang['GO']; ?>" name="sort" /></td>
- </tr>
-<?php
-
- $log_data = array();
- $log_count = 0;
- view_log('user', $log_data, $log_count, $config['posts_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort);
-
- if ($log_count)
- {
- for($i = 0; $i < sizeof($log_data); $i++)
- {
- $row_class = ($row_class == 'row1') ? 'row2' : 'row1';
-
-?>
- <tr>
- <td class="<?php echo $row_class; ?>"><span class="gensmall">Report by: <b><?php echo $log_data[$i]['username']; ?></b> on <?php echo $user->format_date($log_data[$i]['time']); ?></span><hr /><?php echo $log_data[$i]['action']; ?></td>
- <td class="<?php echo $row_class; ?>" width="5%" align="center"><input type="checkbox" name="mark[]" value="<?php echo $log_data[$i]['id']; ?>" /></td>
- </tr>
-<?php
-
- }
- }
- else
- {
-
-?>
- <tr>
- <td class="row1" colspan="2" align="center">No reports exist for this user</td>
- </tr>
-<?php
-
- }
-
-
-?>
- <tr>
- <td class="cat" colspan="2" align="right"><?php
-
- if ($auth->acl_get('a_clearlogs'))
- {
-
-?><input class="btnlite" type="submit" name="delmarked" value="<?php echo $user->lang['DELETE_MARKED']; ?>" />&nbsp; <input class="btnlite" type="submit" name="delall" value="<?php echo $user->lang['DELETE_ALL']; ?>" /><?php
-
- }
-
-?>&nbsp;</td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td class="nav"><div style="float:left;"><?php echo on_page($log_count, $config['topics_per_page'], $start); ?></div><div style="float:right;"><b><a href="javascript:marklist('admin', true);"><?php echo $user->lang['MARK_ALL']; ?></a> :: <a href="javascript:marklist('admin', false);"><?php echo $user->lang['UNMARK_ALL']; ?></a></b>&nbsp;<br /><br /><?php
-
- echo generate_pagination("admin_users.$phpEx$SID&amp;action=$action&amp;u=$user_id&amp;st=$st&amp;sk=$sk&amp;sd=$sd", $log_count, $config['posts_per_page'], $start);
-
-?></div></td>
- </tr>
-</table>
-
-<script language="Javascript" type="text/javascript">
-<!--
-function marklist(match, status)
-{
- len = eval('document.' + match + '.length');
- for (i = 0; i < len; i++)
- {
- eval('document.' + match + '.elements[i].checked = ' + status);
- }
-}
-//-->
-</script>
-
-<h1><?php echo $user->lang['ADD_FEEDBACK']; ?></h1>
-
-<p><?php echo $user->lang['ADD_FEEDBACK_EXPLAIN']; ?></p>
-
-<table width="100%" cellspacing="2" cellpadding="0" border="0" align="center">
- <tr>
- <td><table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0">
- <tr>
- <th colspan="2"><?php echo $user->lang['USER_ADMIN_' . strtoupper($action)]; ?></th>
- </tr>
- <tr>
- <td class="row1" colspan="2" align="center"><textarea name="message" rows="10" cols="76"></textarea></td>
- </tr>
- <tr>
- <td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" /></td>
- </tr>
-<?php
-
-
- break;
-
-
- case 'profile':
-
- if ($submit)
- {
- $var_ary = array(
- 'icq' => (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 = '<option value="0"' . ((!$bday_day) ? ' selected="selected"' : '') . '>--</option>';
- for ($i = 1; $i < 32; $i++)
- {
- $selected = ($i == $userrow['bday_day']) ? ' selected="selected"' : '';
- $s_birthday_day_options .= "<option value=\"$i\"$selected>$i</option>";
- }
-
- $s_birthday_month_options = '<option value="0"' . ((!$userrow['bday_month']) ? ' selected="selected"' : '') . '>--</option>';
- for ($i = 1; $i < 13; $i++)
- {
- $selected = ($i == $userrow['bday_month']) ? ' selected="selected"' : '';
- $s_birthday_month_options .= "<option value=\"$i\"$selected>$i</option>";
- }
- $s_birthday_year_options = '';
-
- $now = getdate();
- $s_birthday_year_options = '<option value="0"' . ((!$userrow['bday_year']) ? ' selected="selected"' : '') . '>--</option>';
- for ($i = $now['year'] - 100; $i < $now['year']; $i++)
- {
- $selected = ($i == $userrow['bday_year']) ? ' selected="selected"' : '';
- $s_birthday_year_options .= "<option value=\"$i\"$selected>$i</option>";
- }
- 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);
-
-
-?>
- <tr>
- <th colspan="2"><?php echo $user->lang['USER_ADMIN_SIG']; ?></th>
- </tr>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['UCP_ICQ']; ?>: </b></td>
- <td class="row2"><input class="post" type="text" name="icq" size="30" maxlength="15" value="<?php echo $userrow['user_icq']; ?>" /></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['UCP_AIM']; ?>: </b></td>
- <td class="row2"><input class="post" type="text" name="aim" size="30" maxlength="255" value="<?php echo $userrow['user_aim']; ?>" /></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['UCP_MSNM']; ?>: </b></td>
- <td class="row2"><input class="post" type="text" name="msn" size="30" maxlength="255" value="<?php echo $userrow['user_msnm']; ?>" /></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['UCP_YIM']; ?>: </b></td>
- <td class="row2"><input class="post" type="text" name="yim" size="30" maxlength="255" value="<?php echo $userrow['user_yim']; ?>" /></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['UCP_JABBER']; ?>: </b></td>
- <td class="row2"><input class="post" type="text" name="jabber" size="30" maxlength="255" value="<?php echo $userrow['user_jabber']; ?>" /></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['WEBSITE']; ?>: </b></td>
- <td class="row2"><input class="post" type="text" name="website" size="30" maxlength="255" value="<?php echo $userrow['user_website']; ?>" /></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['LOCATION']; ?>: </b></td>
- <td class="row2"><input class="post" type="text" name="location" size="30" maxlength="100" value="<?php echo $userrow['user_from']; ?>" /></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['OCCUPATION']; ?>: </b></td>
- <td class="row2"><textarea class="post" name="occupation" rows="3" cols="30"><?php echo $userrow['user_occ']; ?></textarea></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['INTERESTS']; ?>: </b></td>
- <td class="row2"><textarea class="post" name="interests" rows="3" cols="30"><?php echo $userrow['user_interests']; ?></textarea></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['BIRTHDAY']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['BIRTHDAY_EXPLAIN']; ?></span></td>
- <td class="row2"><span class="genmed"><?php echo $user->lang['DAY']; ?>:</span> <select name="bday_day"><?php echo $s_birthday_day_options; ?></select> <span class="genmed"><?php echo $user->lang['MONTH']; ?>:</span> <select name="bday_month"><?php echo $s_birthday_month_options; ?></select> <span class="genmed"><?php echo $user->lang['YEAR']; ?>:</span> <select name="bday_year"><?php echo $s_birthday_year_options; ?></select></td>
- </tr>
- <tr>
- <td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" /></td>
- </tr>
-<?php
-
- break;
-
-
- case 'prefs':
-
- if ($submit)
- {
- $var_ary = array(
- 'user_dateformat' => (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);
-
-?>
- <tr>
- <th colspan="2"><?php echo $user->lang['USER_ADMIN_PREFS']; ?></th>
- </tr>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['VIEW_IMAGES']; ?>:</b></td>
- <td class="row2"><input type="radio" name="viewimg" value="1"<?php echo $viewimg_yes; ?> /><span class="gen"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="viewimg" value="0"<?php echo $viewimg_no; ?> /><span class="gen"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['VIEW_FLASH']; ?>:</b></td>
- <td class="row2"><input type="radio" name="viewflash" value="1"<?php echo $viewflash_yes; ?> /><span class="gen"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="viewflash" value="0"<?php echo $viewflash_no; ?> /><span class="gen"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['VIEW_SMILIES']; ?>:</b></td>
- <td class="row2"><input type="radio" name="viewsmilies" value="1"<?php echo $viewsmilies_yes; ?> /><span class="gen"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="viewsmilies" value="0"<?php echo $viewsmilies_no; ?> /><span class="gen"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['VIEW_SIGS']; ?>:</b></td>
- <td class="row2"><input type="radio" name="viewsigs" value="1"<?php echo $viewsigs_yes; ?> /><span class="gen"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="viewsigs" value="0"<?php echo $viewsigs_no; ?> /><span class="gen"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['VIEW_AVATARS']; ?>:</b></td>
- <td class="row2"><input type="radio" name="viewavatars" value="1"<?php echo $viewavatars_yes; ?> /><span class="gen"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="viewavatars" value="0"<?php echo $viewavatars_no; ?> /><span class="gen"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['DISABLE_CENSORS']; ?>:</b></td>
- <td class="row2"><input type="radio" name="viewcensors" value="1"<?php echo $viewcensors_yes; ?> /><span class="gen"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="viewcensors" value="0"<?php echo $viewcensors_no; ?> /><span class="gen"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <!-- tr>
- <td class="row1"><b><?php echo $user->lang['MINIMUM_KARMA']; ?>:</b><br /><span class="gensmall"><?php echo $user->lang['MINIMUM_KARMA_EXPLAIN']; ?></span></td>
- <td class="row2"><select name="user_min_karma">{S_MIN_KARMA_OPTIONS}</select></td>
- </tr-->
- <tr>
- <td class="row1"><b><?php echo $user->lang['VIEW_TOPICS_DAYS']; ?>:</b></td>
- <td class="row2"><?php echo $s_limit_days; ?></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['VIEW_TOPICS_KEY']; ?>:</b></td>
- <td class="row2"><?php echo $s_sort_key; ?></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['VIEW_TOPICS_DIR']; ?>:</b></td>
- <td class="row2"><?php echo $s_sort_dir; ?></td>
- </tr>
- <tr>
- <th colspan="2"><?php echo $user->lang['USER_POSTING_PREFS']; ?></th>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['DEFAULT_BBCODE']; ?>:</b></td>
- <td class="row2"><input type="radio" name="bbcode" value="1"<?php echo $bbcode_yes; ?> /><span class="gen"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="bbcode" value="0"<?php echo $bbcode_no; ?> /><span class="gen"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['DEFAULT_HTML']; ?>:</b></td>
- <td class="row2"><input type="radio" name="html" value="1"<?php echo $html_yes; ?> /><span class="gen"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="html" value="0"<?php echo $html_no; ?> /><span class="gen"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['DEFAULT_SMILIES']; ?>:</b></td>
- <td class="row2"><input type="radio" name="smilies" value="1"<?php echo $smilies_yes; ?> /><span class="gen"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="smilies" value="0"<?php echo $smilies_no; ?> /><span class="gen"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['DEFAULT_ADD_SIG']; ?>:</b></td>
- <td class="row2"><input type="radio" name="attachsig" value="1"<?php echo $attachsig_yes; ?> /><span class="gen"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="attachsig" value="0"<?php echo $attachsig_no; ?> /><span class="gen"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['DEFAULT_NOTIFY']; ?>:</b></td>
- <td class="row2"><input type="radio" name="user_notify" value="1"<?php echo $user_notify_yes; ?> /><span class="gen"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="user_notify" value="0"<?php echo $user_notify_no; ?> /><span class="gen"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <th colspan="2"></th>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['SHOW_EMAIL']; ?>:</b></td>
- <td class="row2"><input type="radio" name="user_allow_viewemail" value="1"<?php echo $user_allow_viewemail_yes; ?> /><span class="genmed"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="user_allow_viewemail" value="0"<?php echo $user_allow_viewemail_no; ?> /><span class="genmed"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['ADMIN_EMAIL']; ?>:</b></td>
- <td class="row2"><input type="radio" name="user_allow_massemail" value="1"<?php echo $user_allow_massemail_yes; ?> /><span class="genmed"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="user_allow_massemail" value="0"<?php echo $user_allow_massemail_no; ?> /><span class="genmed"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['ALLOW_PM']; ?>:</b><br /><span class="gensmall"><?php echo $user->lang['ALLOW_PM_EXPLAIN']; ?></span></td>
- <td class="row2"><input type="radio" name="user_allow_pm" value="1"<?php echo $user_allow_pm_yes; ?> /><span class="genmed"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="user_allow_pm" value="0"<?php echo $user_allow_pm_no; ?> /><span class="genmed"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['HIDE_ONLINE']; ?>:</b></td>
- <td class="row2"><input type="radio" name="user_allow_viewonline" value="0"<?php echo $user_allow_viewonline_no; ?> /><span class="genmed"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="user_allow_viewonline" value="1"<?php echo $user_allow_viewonline_yes; ?> /><span class="genmed"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['NOTIFY_METHOD']; ?>:</b><br /><span class="gensmall"><?php echo $user->lang['NOTIFY_METHOD_EXPLAIN']; ?></span></td>
- <td class="row2"><input type="radio" name="user_notify_type" value="0"<?php echo $notify_email; ?> /><span class="genmed"><?php echo $user->lang['NOTIFY_METHOD_EMAIL']; ?></span>&nbsp;&nbsp;<input type="radio" name="user_notify_type" value="1"<?php echo $notify_im; ?> /><span class="genmed"><?php echo $user->lang['NOTIFY_METHOD_IM']; ?></span>&nbsp;&nbsp;<input type="radio" name="user_notify_type" value="2"<?php echo $notify_both; ?> /><span class="genmed"><?php echo $user->lang['NOTIFY_METHOD_BOTH']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['NOTIFY_ON_PM']; ?>:</b></td>
- <td class="row2"><input type="radio" name="user_notify_pm" value="1"<?php echo $user_notify_pm_yes; ?> /><span class="genmed"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="user_notify_pm" value="0"<?php echo $user_notify_pm_no; ?> /><span class="genmed"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['POPUP_ON_PM']; ?>:</b></td>
- <td class="row2"><input type="radio" name="popuppm" value="1"<?php echo $popuppm_yes; ?> /><span class="genmed"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="popuppm" value="0"<?php echo $popuppm_no; ?> /><span class="genmed"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['BOARD_LANGUAGE']; ?>:</b></td>
- <td class="row2"><select name="user_lang"><?php echo language_select($userrow['user_lang']); ?></select></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['BOARD_STYLE']; ?>:</b></td>
- <td class="row2"><select name="user_style"><?php echo style_select($userrow['user_style']); ?></select></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['BOARD_TIMEZONE']; ?>:</b></td>
- <td class="row2"><select name="user_tz"><?php echo tz_select($userrow['user_timezone']); ?></select></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['BOARD_DST']; ?>:</b></td>
- <td class="row2"><input type="radio" name="user_dst" value="1"<?php echo $user_dst_yes; ?> /><span class="genmed"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="user_dst" value="0"<?php echo $user_dst_no; ?> /><span class="genmed"><?php echo $user->lang['NO']; ?></span></td>
- </tr>
- <tr>
- <td class="row1"><b><?php echo $user->lang['BOARD_DATE_FORMAT']; ?>:</b><br /><span class="gensmall"><?php echo $user->lang['BOARD_DATE_FORMAT_EXPLAIN']; ?></span></td>
- <td class="row2"><input type="text" name="user_dateformat" value="<?php echo $userrow['user_dateformat']; ?>" maxlength="14" class="post" /></td>
- </tr>
- <tr>
- <td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" /></td>
- </tr>
-<?php
-
- break;
-
- case 'avatar':
-
- $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false;
-
- if ($submit)
- {
- $var_ary = array(
- 'uploadurl' => (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 = '<img src="' . $avatar_img . '" width="' . $userrow['user_avatar_width'] . '" height="' . $userrow['user_avatar_height'] . '" border="0" alt="" />';
- }
- else
- {
- $avatar_img = '<img src="images/no_avatar.gif" alt="" />';
- }
-
-?>
- <tr>
- <th colspan="<?php echo $colspan; ?>"><?php echo $user->lang['USER_ADMIN_AVATAR']; ?></th>
- </tr>
- <tr>
- <td class="row2" width="35%"><b><?php echo $user->lang['CURRENT_IMAGE']; ?>: </b><br /><span class="gensmall"><?php echo sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)); ?></span></td>
- <td class="row1" align="center"><br /><?php echo $avatar_img; ?><br /><br /><input type="checkbox" name="delete" />&nbsp;<span class="gensmall"><?php echo $user->lang['DELETE_AVATAR']; ?></span></td>
- </tr>
-<?php
-
- // Can we upload?
- if ($can_upload)
- {
-
-?>
- <tr>
- <td class="row2" width="35%"><b><?php echo $user->lang['UPLOAD_AVATAR_FILE']; ?>: </b></td>
- <td class="row1"><input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $config['avatar_max_filesize']; ?>" /><input class="post" type="file" name="uploadfile" /></td>
- </tr>
- <tr>
- <td class="row2" width="35%"><b><?php echo $user->lang['UPLOAD_AVATAR_URL']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['UPLOAD_AVATAR_URL_EXPLAIN']; ?></span></td>
- <td class="row1"><input class="post" type="text" name="uploadurl" size="40" value="<?php echo $userrow['user_avatar']; ?>" /></td>
- </tr>
-<?php
-
- }
-
-?>
- <tr>
- <td class="row2" width="35%"><b><?php echo $user->lang['LINK_REMOTE_AVATAR']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['LINK_REMOTE_AVATAR_EXPLAIN']; ?></span></td>
- <td class="row1"><input class="post" type="text" name="remotelink" size="40" value="<?php echo $userrow['user_avatar']; ?>" /></td>
- </tr>
- <tr>
- <td class="row2" width="35%"><b><?php echo $user->lang['LINK_REMOTE_SIZE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['LINK_REMOTE_SIZE_EXPLAIN']; ?></span></td>
- <td class="row1"><input class="post" type="text" name="width" size="3" value="<?php echo $userrow['user_avatar_width']; ?>" /> <span class="gen">px X </span> <input class="post" type="text" name="height" size="3" value="<?php echo $userrow['user_avatar_height']; ?>" /> <span class="gen">px</span></td>
- </tr>
-<?php
-
- // Do we have a gallery?
- if ($config['null'] && !$display_gallery)
- {
-
-?>
- <tr>
- <td class="row2" width="35%"><b><?php echo $user->lang['AVATAR_GALLERY']; ?>: </b></td>
- <td class="row1"><input class="btnlite" type="submit" name="displaygallery" value="<?php echo $user->lang['DISPLAY_GALLERY']; ?>" /></td>
- </tr>
-<?php
- }
-
- // Do we want to display it?
- if ($config['null'] && $display_gallery)
- {
-
-?>
- <tr>
- <th colspan="2"><?php echo $user->lang['AVATAR_GALLERY']; ?></th>
- </tr>
- <tr>
- <td class="cat" colspan="2" align="center" valign="middle"><span class="genmed"><?php echo $user->lang['AVATAR_CATEGORY']; ?>: </span><select name="avatarcat">{S_CAT_OPTIONS}</select>&nbsp; <span class="genmed"><?php echo $user->lang['AVATAR_PAGE']; ?>: </span><select name="avatarpage">{S_PAGE_OPTIONS}</select>&nbsp;<input class="btnlite" type="submit" value="<?php echo $user->lang['GO']; ?>" name="avatargallery" /></td>
- </tr>
- <tr>
- <td class="row1" colspan="2" align="center"><table cellspacing="1" cellpadding="4" border="0">
-
- <!-- BEGIN avatar_row -->
- <tr>
- <!-- BEGIN avatar_column -->
- <td class="row1" align="center"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" alt="{avatar_row.avatar_column.AVATAR_NAME}" title="{avatar_row.avatar_column.AVATAR_NAME}" /></td>
- <!-- END avatar_column -->
- </tr>
- <tr>
- <!-- BEGIN avatar_option_column -->
- <td class="row2" align="center"><input type="radio" name="avatarselect" value="{avatar_row.avatar_option_column.S_OPTIONS_AVATAR}" /></td>
- <!-- END avatar_option_column -->
- </tr>
- <!-- END avatar_row -->
-
- </table></td>
- </tr>
-<?php
-
- }
-
-?>
- <tr>
- <td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" /></td>
- </tr>
-<?php
-
- break;
-
-
- case 'sig':
-
- if ($submit || $preview)
- {
- $var_ary = array(
- 'enable_html' => (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']);
-
-?>
- <tr>
- <th colspan="<?php echo $colspan; ?>"><?php echo $user->lang['USER_ADMIN_SIG']; ?></th>
- </tr>
- <tr>
- <td class="row1" width="40%"><b class="genmed"><?php echo $user->lang['SIGNATURE']; ?>: </b></td>
- <td class="row2"><table cellspacing="0" cellpadding="2" border="0">
- <tr align="center" valign="middle">
- <td><input class="btnlite" type="button" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" onmouseover="helpline('b')" /></td>
- <td><input class="btnlite" type="button" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" onmouseover="helpline('i')" /></td>
- <td><input class="btnlite" type="button" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" onmouseover="helpline('u')" /></td>
- <td><input class="btnlite" type="button" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" /></td>
- <td><input class="btnlite" type="button" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" /></td>
- <td><input class="btnlite" type="button" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" /></td>
- <td><input class="btnlite" type="button" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" /></td>
- <td><input class="btnlite" type="button" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" /></td>
- <td><input class="btnlite" type="button" accesskey="w" name="addbbcode18" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(18)" onmouseover="helpline('w')" /></td>
- </tr>
- <tr>
- <td colspan="9"><table width="100%" cellspacing="0" cellpadding="0" border="0">
- <tr>
- <td><span class="genmed"> &nbsp;<?php echo $user->lang['FONT_SIZE']; ?>:</span> <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')">
- <option value="7"><?php echo $user->lang['FONT_TINY']; ?></option>
- <option value="9"><?php echo $user->lang['FONT_SMALL']; ?></option>
- <option value="12" selected="selected"><?php echo $user->lang['FONT_NORMAL']; ?></option>
- <option value="18"><?php echo $user->lang['FONT_LARGE']; ?></option>
- <option value="24"><?php echo $user->lang['FONT_HUGE']; ?></option>
- </select></td>
- <td class="gensmall" nowrap="nowrap" align="right"><a href="javascript:bbstyle(-1)" onmouseover="helpline('a')"><?php echo $user->lang['CLOSE_TAGS']; ?></a></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td colspan="9"><input class="helpline" type="text" name="helpbox" size="45" maxlength="100" value="<?php echo $user->lang['STYLES_TIP']; ?>" /></td>
- </tr>
- <tr>
- <td colspan="9"><textarea name="signature" rows="6" cols="60" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);"><?php echo $userrow['user_sig']; ?></textarea></td>
- </tr>
- <tr>
- <td colspan="9"><table cellspacing="0" cellpadding="0" border="0">
- <tr>
- <td bgcolor="black"><script language="javascript" type="text/javascript"><!--
-
- colorPalette('h', 14, 5)
-
- //--></script></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td class="row1" valign="top"><b class="genmed"><?php echo $user->lang['OPTIONS']; ?></b><br /><table cellspacing="2" cellpadding="0" border="0">
- <tr>
- <td class="gensmall"><?php echo ($config['allow_html']) ? $user->lang['HTML_IS_ON'] : $user->lang['HTML_IS_OFF']; ?></td>
- </tr>
- <tr>
- <td class="gensmall"><?php echo ($config['allow_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], "<a href=\"../faq.$phpEx$SID&amp;mode=bbcode\" target=\"_blank\">", '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], "<a href=\"../faq.$phpEx$SID&amp;mode=bbcode\" target=\"_blank\">", '</a>'); ?></td>
- </tr>
- <tr>
- <td class="gensmall"><?php echo ($config['allow_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF']; ?></td>
- </tr>
- <tr>
- <td class="gensmall"><?php echo ($config['allow_flash']) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF']; ?></td>
- </tr>
- <tr>
- <td class="gensmall"><?php echo ($config['allow_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF']; ?></td>
- </tr>
- </table></td>
- <td class="row2" valign="top"><table cellspacing="0" cellpadding="1" border="0">
-<?php
-
- if ($config['allow_html'])
- {
-
-?>
- <tr>
- <td><input type="checkbox" name="disable_html" /></td>
- <td class="gen"><?php echo $user->lang['DISABLE_HTML']; ?></td>
- </tr>
-<?php
-
- }
-
- if ($config['allow_bbcode'])
- {
-
-?>
- <tr>
- <td><input type="checkbox" name="disable_bbcode" /></td>
- <td class="gen"><?php echo $user->lang['DISABLE_BBCODE']; ?></td>
- </tr>
-<?php
-
- }
-
- if ($config['allow_smilies'])
- {
-
-?>
- <tr>
- <td><input type="checkbox" name="disable_smilies" /></td>
- <td class="gen"><?php echo $user->lang['DISABLE_SMILIES']; ?></td>
- </tr>
-<?php
-
- }
-
-?>
- <tr>
- <td><input type="checkbox" name="disable_magic_url" /></td>
- <td class="gen"><?php echo $user->lang['DISABLE_MAGIC_URL']; ?></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td class="cat" colspan="2" align="center"><input class="btnlite" type="submit" name="preview" value="<?php echo $user->lang['PREVIEW']; ?>" />&nbsp;&nbsp;<input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" /></td>
- </tr>
-<?php
-
- if ($signature_preview)
- {
-
-?>
- <tr>
- <th colspan="2" valign="middle"><?php echo $user->lang['ADMIN_SIGNATURE_PREVIEW']; ?></th>
- </tr>
- <tr>
- <td class="row1" colspan="2"><div class="postdetails" style="padding: 6px;"><?php echo $signature_preview; ?></div></td>
- </tr>
-<?php
-
- }
-
-?>
-<?php
-
- break;
-
- case 'groups':
-
- switch ($action)
- {
- case 'demote':
- case 'promote':
- case 'default':
- group_user_attributes($action, $gid, $user_id);
-
- if ($action == 'default')
- {
- $group_id = $gid;
- }
- break;
-
- case 'delete':
- if (!$cancel && !$confirm)
- {
- adm_page_confirm($user->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;
-
-?>
- <tr>
- <th colspan="4"><?php echo $user->lang['USER_ADMIN_GROUPS']; ?></th>
- </tr>
-<?php
-
- $sql = 'SELECT ug.group_leader, g.*
- FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . " ug
- WHERE ug.user_id = $user_id
- AND g.group_id = ug.group_id
- ORDER BY g.group_type DESC, ug.user_pending ASC, g.group_name";
- $result = $db->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 .= '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="blue"' : '') . ' value="' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
- }
- $db->sql_freeresult($result);
-
- $current_type = '';
- foreach ($group_data as $group_type => $data_ary)
- {
- if ($current_type != $group_type)
- {
-
-?>
- <tr>
- <td class="row3" colspan="4"><strong><?php echo $user->lang['USER_GROUP_' . strtoupper($group_type)]; ?></strong></td>
- </tr>
-<?php
-
- }
-
- foreach ($data_ary as $data)
- {
- $row_class = ($row_class == 'row1') ? 'row2' : 'row1';
-
-?>
- <tr>
- <td class="<?php echo $row_class; ?>"><a href="<?php echo "admin_groups.$phpEx$SID&amp;mode=manage&amp;action=edit&amp;g=" . $data['group_id']; ?>"><?php echo ($group_type == 'special') ? $user->lang['G_' . $data['group_name']] : $data['group_name']; ?></a></td>
- <td class="<?php echo $row_class; ?>" width="10%" nowrap="nowrap">&nbsp;<?php
-
- if ($group_id != $data['group_id'])
- {
-
-?><a href="<?php echo "admin_users.$phpEx$SID&amp;mode=$mode&amp;action=default&amp;u=$user_id&amp;g=" . $data['group_id']; ?>"><?php echo $user->lang['GROUP_DEFAULT']; ?></a><?php
-
- }
- else
- {
- echo $user->lang['GROUP_DEFAULT'];
- }
-
-?>&nbsp;</td>
- <td class="<?php echo $row_class; ?>" width="10%" nowrap="nowrap">&nbsp;<?php
-
- if ($group_type != 'special')
- {
-
-?><a href="<?php echo "admin_users.$phpEx$SID&amp;mode=$mode&amp;action=" . (($data['group_leader']) ? 'demote' : 'promote') . "&amp;u=$user_id&amp;g=" . $data['group_id']; ?>"><?php echo ($data['group_leader']) ? $user->lang['GROUP_DEMOTE'] : $user->lang['GROUP_PROMOTE']; ?></a>&nbsp;<?php
-
- }
-
-?></td>
- <td class="<?php echo $row_class; ?>" width="10%" nowrap="nowrap">&nbsp;<a href="<?php echo "admin_users.$phpEx$SID&amp;mode=$mode&amp;action=delete&amp;u=$user_id&amp;g=" . $data['group_id']; ?>"><?php echo $user->lang['GROUP_DELETE']; ?></a>&nbsp;</td>
- </tr>
-<?php
-
- }
- }
-
-?>
- <tr>
- <td class="cat" colspan="4" align="right"><?php echo $user->lang['USER_GROUP_ADD']; ?>: <select name="g"><?php echo $group_options; ?></select> <input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>" />&nbsp;</td>
- </tr>
-<?php
-
- break;
-
-
- case 'perm':
- break;
-
-
- case 'attach':
-
- if ($deletemark && $marked)
- {
- if (!$cancel && !$confirm)
- {
- adm_page_confirm($user->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&amp;mode=$mode&amp;action=$action&amp;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 .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
- }
-
- $s_sort_dir = '';
- foreach ($sd_text as $key => $value)
- {
- $selected = ($sd == $key) ? ' selected="selected"' : '';
- $s_sort_dir .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
- }
-
- $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';
-
-?>
- <tr>
- <th nowrap="nowrap">#</th>
- <th nowrap="nowrap" width="15%"><a class="th" href="<?php echo "$uri&amp;sk=a&amp;sd=" . (($sk == 'a' && $sd == 'a') ? 'd' : 'a'); ?>"><?php echo $user->lang['FILENAME']; ?></a></th>
- <th nowrap="nowrap" width="5%"><a class="th" href="<?php echo "$uri&amp;sk=f&amp;sd=" . (($sk == 'f' && $sd == 'a') ? 'd' : 'a'); ?>"><?php echo $user->lang['POST_TIME']; ?></a></th>
- <th nowrap="nowrap" width="5%"><a class="th" href="<?php echo "$uri&amp;sk=d&amp;sd=" . (($sk == 'd' && $sd == 'a') ? 'd' : 'a'); ?>"><?php echo $user->lang['FILESIZE']; ?></a></th>
- <th nowrap="nowrap" width="5%"><a class="th" href="<?php echo "$uri&amp;sk=e&amp;sd=" . (($sk == 'e' && $sd == 'a') ? 'd' : 'a'); ?>"><?php echo $user->lang['DOWNLOADS']; ?></a></th>
- <th width="2%" nowrap="nowrap"><?php echo $user->lang['DELETE']; ?></th>
- </tr>
-<?php
-
- do
- {
- $view_topic = "{$phpbb_root_path}viewtopic.$phpEx$SID&amp;t=" . $row['topic_id'] . '&amp;p=' . $row['post_id'] . '#' . $row['post_id'];
-
- $row_class = ($row_class == 'row1') ? 'row2' : 'row1';
-
-?>
- <tr>
- <td class="<?php echo $row_class; ?>" style="padding: 4px;" width="2%" align="center"><span class="gen">&nbsp;<?php echo $row_count + ($start + 1); ?>&nbsp;</span></td>
- <td class="<?php echo $row_class; ?>" style="padding: 4px;"><a class="gen" href="<?php echo "{$phpbb_root_path}download.$phpEx$SID&amp;id=" . $row['attach_id']; ?>" target="_blank"><?php echo $row['real_filename']; ?></a><br /><span class="gensmall"><?php echo $user->lang['TOPIC']; ?>: <a href="<?php echo $view_topic; ?>" target="_blank"><?php echo $row['topic_title']; ?></a></span></td>
- <td class="<?php echo $row_class; ?>" class="gensmall" style="padding: 4px;" align="center" nowrap="nowrap">&nbsp;<?php echo $user->format_date($row['filetime'], $user->lang['DATE_FORMAT']); ?>&nbsp;</td>
- <td class="<?php echo $row_class; ?>" style="padding: 4px;" align="center" nowrap="nowrap"><span class="gen"><?php echo ($row['filesize'] >= 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']); ?></span></td>
- <td class="<?php echo $row_class; ?>" style="padding: 4px;" align="center"><span class="gen"><?php echo $row['download_count']; ?></span></td>
- <td class="<?php echo $row_class; ?>" style="padding: 4px;" align="center"><input type="checkbox" name="mark[]" value="<?php echo $row['attach_id']; ?>" /></td>
- </tr>
-<?php
-
- $row_count++;
- }
- while ($row = $db->sql_fetchrow($result));
- }
- $db->sql_freeresult($result);
-
- $pagination = generate_pagination("$uri&amp;sk=$sk&amp;sd=$sd", $num_attachments, $config['topics_per_page'], $start);
-
-?>
- <tr>
- <td class="cat" colspan="<?php echo $colspan; ?>"><table width="100%" cellspacing="0" cellpadding="0" border="0">
- <tr>
- <td width="100%" align="center"><span class="gensmall"><?php echo $user->lang['SORT_BY']; ?>: </span><select name="sk"><?php echo $s_sort_key; ?></select> <select name="sd"><?php echo $s_sort_dir; ?></select>&nbsp;<input class="btnlite" type="submit" name="sort" value="<?php echo $user->lang['SORT']; ?>" /></td>
- <td align="right"><input class="btnlite" type="submit" name="delmarked" value="<?php echo $user->lang['DELETE_MARKED']; ?>" />&nbsp;</td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
-<?php
-
- break;
- }
-
-
-?>
- </table></td>
- </tr>
-
-<?php
-
-
- if ($pagination)
- {
-
-?>
- <tr>
- <td align="right"><?php echo $pagination; ?></td>
- </tr>
-<?php
-
- }
-
-?>
-</table></form>
-
-<?php
-
- adm_page_footer();
-
-}
-
-// Do we have permission?
-if (!$auth->acl_get('a_user'))
-{
- trigger_error($user->lang['No_admin']);
-}
-
-?>
-
-<h1><?php echo $user->lang['USER_ADMIN']; ?></h1>
-
-<p><?php echo $user->lang['USER_ADMIN_EXPLAIN']; ?></p>
-
-<form method="post" name="post" action="<?php echo "admin_users.$phpEx$SID"; ?>"><table class="bg" width="75%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th colspan="2"align="center"><?php echo $user->lang['SELECT_USER']; ?></th>
- </tr>
- <tr>
- <td class="row1" width="40%"><b><?php echo $user->lang['FIND_USERNAME']; ?>: </b><br /><span class="gensmall">[ <a href="<?php echo "../memberlist.$phpEx$SID&amp;mode=searchuser&amp;field=username"; ?>" onclick="window.open('<?php echo "../memberlist.$phpEx$SID&amp;mode=searchuser&amp;field=username"?>', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;"><?php echo $user->lang['FIND_USERNAME']; ?></a> ]</span></td>
- <td class="row2"><input type="text" class="post" name="username" maxlength="50" size="20" /></td>
- </tr>
- <tr>
- <td class="cat" colspan="2" align="center"><input type="submit" name="submituser" value="<?php echo $user->lang['SUBMIT']; ?>" class="btnmain" /></td>
- </tr>
-</table></form>
-
-<?php
-
-adm_page_footer();
-
-
-/* Module class
-class acp_admin_users extends module
-{
-
-
-
-
-}
-*/
-
-?> \ 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('<table cellspacing="1" cellpadding="0" border="0">');
- for(r = 0; r < 5; r++)
- {
- if (dir == 'h')
- {
- document.writeln('<tr>');
- }
- for(g = 0; g < 5; g++)
- {
- if (dir == 'v')
- {
- document.writeln('<tr>');
- }
- for(b = 0; b < 5; b++)
- {
- color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
- document.write('<td bgcolor="#' + color + '">');
- document.write('<a href="javascript:bbfontstyle(\'[color=#' + color + ']\', \'[/color]\');" onmouseover="helpline(\'s\');"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" border="0" alt="#' + color + '" title="#' + color + '" /></a>');
- document.writeln('</td>');
- }
- if (dir == 'v')
- {
- document.writeln('</tr>');
- }
- }
- if (dir == 'h')
- {
- document.writeln('</tr>');
- }
- }
- document.writeln('</table>');
-} \ 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 0000000000..bcad88f588
--- /dev/null
+++ b/phpBB/adm/images/bg_header.jpg
Binary files differ
diff --git a/phpBB/adm/images/logo.gif b/phpBB/adm/images/logo.gif
new file mode 100644
index 0000000000..f0fe5f1762
--- /dev/null
+++ b/phpBB/adm/images/logo.gif
Binary files differ
diff --git a/phpBB/adm/images/spacer.gif b/phpBB/adm/images/spacer.gif
new file mode 100644
index 0000000000..cd29009a65
--- /dev/null
+++ b/phpBB/adm/images/spacer.gif
Binary files differ
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php
index 050a698256..a2499451c0 100644
--- a/phpBB/adm/index.php
+++ b/phpBB/adm/index.php
@@ -11,720 +11,330 @@
/**
*/
define('IN_PHPBB', 1);
+define('IN_ADMIN', true);
+define('NEED_SID', true);
+
// Include files
$phpbb_root_path = './../';
+$phpbb_admin_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
-require('pagestart.' . $phpEx);
+require($phpbb_root_path . 'common.'.$phpEx);
+require($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
+require($phpbb_root_path . 'includes/functions_module.'.$phpEx);
+
+// Start session management
+$user->session_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);
+}
-// Do we have any admin permissions at all?
+// 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')
-{
- adm_page_header('', '', false);
+$user->theme['primary']['pagination_sep'] = '';
-?>
+// Set custom template for admin area
+$template->set_custom_template($phpbb_admin_path . 'style', 'admin');
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
- <tr>
- <td><a href="<?php echo "{$phpbb_root_path}index.$phpEx$SID"; ?>" target="_top"><img src="images/header_left.jpg" width="200" height="60" alt="phpBB Logo" title="phpBB Logo" border="0"/></a></td>
- <td width="100%" background="images/header_bg.jpg" height="60" align="right" nowrap="nowrap"><span class="maintitle"><?php echo $user->lang['ADMIN_TITLE']; ?></span> &nbsp; &nbsp; &nbsp;</td>
- </tr>
-</table>
+// Instantiate new module
+$module = new p_master();
-<?php
+// Instantiate module system and generate list of available modules
+$module->list_modules('acp');
- adm_page_footer(false);
+// Select the active module
+$module->set_active($module_id, $mode);
-}
-else if ($pane == 'left')
-{
- // Cheat and use the meta tag to change some stylesheet info
- adm_page_header('', '<style type="text/css">body {background-color: #98AAB1}</style>', false);
+// 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();
- // Grab module information using Bart's "neat-o-module" system (tm)
- $dir = @opendir('.');
+// Generate the page
+adm_page_header($module->get_page_title());
- $setmodules = 1;
- while ($file = readdir($dir))
+$template->set_filenames(array(
+ 'body' => $module->get_tpl_name())
+);
+
+adm_page_footer();
+
+// ---------
+// FUNCTIONS
+//
+function adm_page_header($page_title)
+{
+ global $config, $db, $user, $template;
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID;
+
+ if (defined('HEADER_INC'))
{
- if (preg_match('#^admin_(.*?)\.' . $phpEx . '$#', $file))
- {
- include($file);
- }
+ return;
}
- @closedir($dir);
-
- unset($setmodules);
-
-?>
-
-<table width="100%" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td width="100%"><table width="100%" cellpadding="4" cellspacing="1" border="0">
- <tr>
- <th class="menu" height="25">&#0187; <?php echo $user->lang['RETURN_TO']; ?></th>
- </tr>
- <tr>
- <td class="row1"><a class="genmed" href="<?php echo "index.$phpEx$SID"; ?>&amp;pane=right" target="main"><?php echo $user->lang['ADMIN_INDEX']; ?></a></td>
- </tr>
- <tr>
- <td class="row2"><a class="genmed" href="<?php echo "../index.$phpEx$SID"; ?>" target="_top"><?php echo $user->lang['FORUM_INDEX']; ?></a></td>
- </tr>
-<?php
+
+ define('HEADER_INC', true);
- if (is_array($module))
+ // gzip_compression
+ if ($config['gzip_compress'])
{
- @ksort($module);
- foreach ($module as $cat => $action_ary)
+ if (extension_loaded('zlib') && !headers_sent())
{
- $cat = (!empty($user->lang[$cat . '_CAT'])) ? $user->lang[$cat . '_CAT'] : preg_replace('#_#', ' ', $cat);
-
-?>
- <tr>
- <th class="menu" height="25">&#0187; <?php echo $cat; ?></th>
- </tr>
-<?php
+ ob_start('ob_gzhandler');
+ }
+ }
- @ksort($action_ary);
+ $template->assign_vars(array(
+ 'PAGE_TITLE' => $page_title,
+ 'USERNAME' => $user->data['username'],
+ 'ROOT_PATH' => $phpbb_admin_path,
- $row_class = '';
- foreach ($action_ary as $action => $file)
- {
- if (!empty($file))
- {
- $action = (!empty($user->lang[$action])) ? $user->lang[$action] : preg_replace('#_#', ' ', $action);
+ 'U_LOGOUT' => "{$phpbb_root_path}ucp.$phpEx$SID&amp;mode=logout",
+ 'U_ADM_INDEX' => "{$phpbb_admin_path}index.$phpEx$SID",
+ 'U_INDEX' => "{$phpbb_root_path}index.$phpEx$SID",
- $row_class = ($row_class == 'row1') ? 'row2' : 'row1';
-?>
- <tr>
- <td class="<?php echo $row_class; ?>"><a class="genmed" href="<?php echo $file; ?>" target="main"><?php echo $action; ?></a></td>
- </tr>
-<?php
+ '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']))
+ {
+ 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');
-?>
- </table></td>
- </tr>
-</table>
-</body>
-</html>
-<?php
-
- // Output footer but don't include copyright info
- adm_page_footer(false);
-
+ return;
}
-elseif ($pane == 'right')
+
+function adm_page_footer($copyright_html = true)
{
- $action = request_var('action', '');
- $mark = (isset($_REQUEST['mark'])) ? implode(', ', request_var('mark', array(0))) : '';
+ global $db, $config, $template, $SID, $user, $auth, $starttime, $phpbb_root_path, $phpEx;
- if ($mark)
+ // Output page creation time
+ if (defined('DEBUG'))
{
- switch ($action)
- {
- case 'activate':
- case 'delete':
- if (!$auth->acl_get('a_user'))
- {
- trigger_error($user->lang['NO_ADMIN']);
- }
+ $mtime = explode(' ', microtime());
+ $totaltime = $mtime[0] + $mtime[1] - $starttime;
- $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 (!empty($_REQUEST['explain']) && $auth->acl_get('a_') && method_exists($db, 'sql_report'))
+ {
+ $db->sql_report('display');
+ }
- if ($action == 'activate')
- {
- include($phpbb_root_path . 'includes/functions_user.php');
- $mark_ary = explode(', ', $mark);
+ $debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress']) ? 'On' : 'Off' ) . ' | Load : ' . (($user->load) ? $user->load : 'N/A'), $totaltime);
- foreach ($mark_ary as $user_id)
- {
- user_active_flip($user_id, USER_INACTIVE);
- }
- }
- else if ($action == 'delete')
+ if ($auth->acl_get('a_') && defined('DEBUG_EXTRA'))
+ {
+ if (function_exists('memory_get_usage'))
+ {
+ if ($memory_usage = memory_get_usage())
{
- $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));
- }
+ 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']);
- if ($action != 'delete')
- {
- set_config('num_users', $config['num_users'] + $db->sql_affectedrows(), true);
+ $debug_output .= ' | Memory Usage: ' . $memory_usage;
}
+ }
- break;
+ $debug_output .= ' | <a href="' . (($_SERVER['REQUEST_URI']) ? htmlspecialchars($_SERVER['REQUEST_URI']) : "index.$phpEx$SID") . ((strpos($_SERVER['REQUEST_URI'], '?') !== false) ? '&amp;' : '?') . 'explain=1">Explain</a>';
+ }
+ }
- case 'remind':
- if (!$auth->acl_get('a_user'))
- {
- trigger_error($user->lang['NO_ADMIN']);
- }
+ $template->assign_vars(array(
+ 'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '',
+ 'S_COPYRIGHT_HTML' => $copyright_html,
+ 'VERSION' => $config['version']
+ )
+ );
- if (empty($config['email_enable']))
- {
- trigger_error($user->lang['EMAIL_DISABLED']);
- }
+ $template->display('body');
- $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);
+ // Unload cache, must be done before the DB connection if closed
+ if (!empty($cache))
+ {
+ $cache->unload();
+ }
- if ($row = $db->sql_fetchrow($result))
- {
- // Send the messages
- include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx);
+ // Close our DB connection.
+ $db->sql_close();
- $messenger = new messenger();
+ exit;
+}
- $board_url = generate_board_url() . "/ucp.$phpEx?mode=activate";
- $sig = str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']);
+function adm_back_link($u_action)
+{
+ return '<br /><br /><a href="' . $u_action . '">&laquo; Back to previous page</a>';
+}
- $usernames = array();
- do
- {
- $messenger->template('user_remind_inactive', $row['user_lang']);
+function build_select($option_ary, $option_default = false)
+{
+ global $user;
- $messenger->replyto($config['board_email']);
- $messenger->to($row['user_email'], $row['username']);
- $messenger->im($row['user_jabber'], $row['username']);
+ $html = '';
+ foreach ($option_ary as $value => $title)
+ {
+ $selected = ($option_default !== false && $value == $option_default) ? ' selected="selected"' : '';
+ $html .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$title] . '</option>';
+ }
- $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'])
- );
+ return $html;
+}
- $messenger->send($row['user_notify_type']);
+function h_radio($name, &$input_ary, $input_default = false, $id = false, $key = false)
+{
+ global $user;
- $usernames[] = $row['username'];
- }
- while ($row = $db->sql_fetchrow($result));
+ $html = '';
+ $id_assigned = false;
+ foreach ($input_ary as $value => $title)
+ {
+ $selected = ($input_default !== false && $value == $input_default) ? ' checked="checked"' : '';
+ $html .= ($html) ? ' &nbsp; ' : '';
+ $html .= '<input type="radio" name="' . $name . '"' . (($id && !$id_assigned) ? ' id="' . $id . '"' : '') . ' value="' . $value . '"' . $selected . (($key) ? ' accesskey="' . $key . '"' : '') . ' /> ' . $user->lang[$title];
+ $id_assigned = true;
+ }
- $messenger->save_queue();
+ return $html;
+}
- unset($email_list);
+function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
+{
+ global $user, $module;
- add_log('admin', 'LOG_INDEX_REMIND', implode(', ', $usernames));
- unset($usernames);
- }
- $db->sql_freeresult($result);
- break;
- }
- }
+ $tpl = '';
+ $name = 'config[' . $config_key . ']';
- switch ($action)
+ switch ($tpl_type[0])
{
- case 'online':
- if (!$auth->acl_get('a_defaults'))
- {
- trigger_error($user->lang['NO_ADMIN']);
- }
+ case 'text':
+ case 'password':
+ $size = (int) $tpl_type[1];
+ $maxlength = (int) $tpl_type[2];
- set_config('record_online_users', 1, true);
- set_config('record_online_date', time(), true);
- add_log('admin', 'LOG_RESET_ONLINE');
+ $tpl = '<input id="' . $key . '" type="' . $tpl_type[0] . '"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="' . $name . '" value="' . $new[$config_key] . '" />';
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);
+ case 'dimension':
+ $size = (int) $tpl_type[1];
+ $maxlength = (int) $tpl_type[2];
- $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);
+ $tpl = '<input id="' . $key . '" type="text"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="config[' . $config_key . '_height]" value="' . $new[$config_key . '_height'] . '" /> x <input type="text"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="config[' . $config_key . '_width]" value="' . $new[$config_key . '_width'] . '" />';
+ break;
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
- set_config('num_users', (int) $row['stat'], true);
+ case 'textarea':
+ $rows = (int) $tpl_type[1];
+ $cols = (int) $tpl_type[2];
- $sql = 'SELECT COUNT(attach_id) as stat
- FROM ' . ATTACHMENTS_TABLE;
- $result = $db->sql_query($sql);
+ $tpl = '<textarea id="' . $key . '" name="' . $name . '" rows="' . $rows . '" cols="' . $cols . '">' . $new[$config_key] . '</textarea>';
+ break;
- set_config('num_files', (int) $db->sql_fetchfield('stat', 0, $result), true);
- $db->sql_freeresult($result);
+ case 'radio':
+ $key_yes = ($new[$config_key]) ? ' checked="checked"' : '';
+ $key_no = (!$new[$config_key]) ? ' checked="checked"' : '';
- $sql = 'SELECT SUM(filesize) as stat
- FROM ' . ATTACHMENTS_TABLE;
- $result = $db->sql_query($sql);
+ $tpl_type_cond = explode('_', $tpl_type[1]);
+ $type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true;
- set_config('upload_dir_size', (int) $db->sql_fetchfield('stat', 0, $result), true);
- $db->sql_freeresult($result);
+ $tpl_no = '<input type="radio" name="' . $name . '" value="0"' . $key_no . ' />&nbsp;' . (($type_no) ? $user->lang['NO'] : $user->lang['DISABLED']);
+ $tpl_yes = '<input type="radio" id="' . $key . '" name="' . $name . '" value="1"' . $key_yes . ' />&nbsp;' . (($type_no) ? $user->lang['YES'] : $user->lang['ENABLED']);
- add_log('admin', 'LOG_RESYNC_STATS');
+ $tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . '&nbsp;&nbsp;' . $tpl_no : $tpl_no . '&nbsp;&nbsp;' . $tpl_yes;
break;
- case 'user':
- if (!$auth->acl_get('a_defaults'))
- {
- trigger_error($user->lang['NO_ADMIN']);
- }
-
- $post_count_ary = $auth->acl_getf('f_postcount');
+ case 'select':
+ case 'custom':
+
+ $return = '';
- $forum_ary = array();
- foreach ($post_count_ary as $forum_id => $allowed)
+ if (isset($vars['method']))
{
- if ($allowed['f_postcount'])
- {
- $forum_ary[] = $forum_id;
- }
+ $call = array($module->module, $vars['method']);
}
-
- if (!sizeof($forum_ary))
+ else if (isset($vars['function']))
{
- $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_posts = 0');
+ $call = $vars['function'];
}
else
{
- $sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
- FROM ' . POSTS_TABLE . '
- WHERE poster_id <> ' . ANONYMOUS . '
- AND forum_id IN (' . implode(', ', $forum_ary) . ')
- GROUP BY poster_id';
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $db->sql_query('UPDATE ' . USERS_TABLE . " SET user_posts = {$row['num_posts']} WHERE user_id = {$row['poster_id']}");
- }
- $db->sql_freeresult($result);
- }
-
- add_log('admin', 'LOG_RESYNC_POSTCOUNTS');
- break;
-
- case 'date':
- if (!$auth->acl_get('a_defaults'))
- {
- trigger_error($user->lang['NO_ADMIN']);
- }
-
- set_config('board_startdate', time() - 1);
- add_log('admin', 'LOG_RESET_DATE');
- break;
- }
-
- // Get forum statistics
- $total_posts = $config['num_posts'];
- $total_topics = $config['num_topics'];
- $total_users = $config['num_users'];
- $total_files = $config['num_files'];
-
- $start_date = $user->format_date($config['board_startdate']);
-
- $boarddays = (time() - $config['board_startdate']) / 86400;
-
- $posts_per_day = sprintf('%.2f', $total_posts / $boarddays);
- $topics_per_day = sprintf('%.2f', $total_topics / $boarddays);
- $users_per_day = sprintf('%.2f', $total_users / $boarddays);
- $files_per_day = sprintf('%.2f', $total_files / $boarddays);
-
- $upload_dir_size = ($config['upload_dir_size'] >= 1048576) ? sprintf('%.2f ' . $user->lang['MB'], ($config['upload_dir_size'] / 1048576)) : (($config['upload_dir_size'] >= 1024) ? sprintf('%.2f ' . $user->lang['KB'], ($config['upload_dir_size'] / 1024)) : sprintf('%.2f ' . $user->lang['BYTES'], $config['upload_dir_size']));
-
- $avatar_dir_size = 0;
-
- if ($avatar_dir = @opendir($phpbb_root_path . $config['avatar_path']))
- {
- while ($file = readdir($avatar_dir))
- {
- if ($file{0} != '.')
- {
- $avatar_dir_size += filesize($phpbb_root_path . $config['avatar_path'] . '/' . $file);
+ break;
}
- }
- @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))
+
+ if (isset($vars['params']))
{
- $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))
+ $args = array();
+ foreach ($vars['params'] as $value)
{
- if ((isset($row['Type']) && $row['Type'] != 'MRG_MyISAM') || (isset($row['Engine']) && $row['Engine'] == 'MyISAM'))
+ switch ($value)
{
- if ($table_prefix != '')
- {
- if (strstr($row['Name'], $table_prefix))
- {
- $dbsize += $row['Data_length'] + $row['Index_length'];
- }
- }
- else
- {
- $dbsize += $row['Data_length'] + $row['Index_length'];
- }
+ case '{CONFIG_VALUE}':
+ $value = $new[$config_key];
+ break;
+
+ case '{KEY}':
+ $value = $key;
+ break;
}
+
+ $args[] = $value;
}
}
else
{
- $dbsize = $user->lang['NOT_AVAILABLE'];
+ $args = array($new[$config_key], $key);
}
- }
- else
- {
- $dbsize = $user->lang['NOT_AVAILABLE'];
- }
- }
- else if (preg_match('#^mssql#', SQL_LAYER))
- {
- $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'];
- }
-
- 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']);
-
-?>
-
-<script language="Javascript" type="text/javascript">
-<!--
- function marklist(status)
- {
- for (i = 0; i < document.inactive.length; i++)
- {
- document.inactive.elements[i].checked = status;
- }
- }
-//-->
-</script>
-
-<h1><?php echo $user->lang['WELCOME_PHPBB']; ?></h1>
-
-<p><?php echo $user->lang['ADMIN_INTRO']; ?></p>
-
-<h1><?php echo $user->lang['FORUM_STATS']; ?></h1>
-
-<form name="statistics" method="post" action="index.<?php echo $phpEx . $SID; ?>&amp;pane=right"><table class="bg" width="100%" cellpadding="4" cellspacing="1" border="0">
- <tr>
- <th width="25%" nowrap="nowrap" height="25"><?php echo $user->lang['STATISTIC']; ?></th>
- <th width="25%"><?php echo $user->lang['VALUE']; ?></th>
- <th width="25%" nowrap="nowrap"><?php echo $user->lang['STATISTIC']; ?></th>
- <th width="25%"><?php echo $user->lang['VALUE']; ?></th>
- </tr>
- <tr>
- <td class="row1" nowrap="nowrap"><?php echo $user->lang['NUMBER_POSTS']; ?>:</td>
- <td class="row2"><b><?php echo $total_posts; ?></b></td>
- <td class="row1" nowrap="nowrap"><?php echo $user->lang['POSTS_PER_DAY']; ?>:</td>
- <td class="row2"><b><?php echo $posts_per_day; ?></b></td>
- </tr>
- <tr>
- <td class="row1" nowrap="nowrap"><?php echo $user->lang['NUMBER_TOPICS']; ?>:</td>
- <td class="row2"><b><?php echo $total_topics; ?></b></td>
- <td class="row1" nowrap="nowrap"><?php echo $user->lang['TOPICS_PER_DAY']; ?>:</td>
- <td class="row2"><b><?php echo $topics_per_day; ?></b></td>
- </tr>
- <tr>
- <td class="row1" nowrap="nowrap"><?php echo $user->lang['NUMBER_USERS']; ?>:</td>
- <td class="row2"><b><?php echo $total_users; ?></b></td>
- <td class="row1" nowrap="nowrap"><?php echo $user->lang['USERS_PER_DAY']; ?>:</td>
- <td class="row2"><b><?php echo $users_per_day; ?></b></td>
- </tr>
- <tr>
- <td class="row1" nowrap="nowrap"><?php echo $user->lang['NUMBER_FILES']; ?>:</td>
- <td class="row2"><b><?php echo $total_files; ?></b></td>
- <td class="row1" nowrap="nowrap"><?php echo $user->lang['FILES_PER_DAY']; ?>:</td>
- <td class="row2"><b><?php echo $files_per_day; ?></b></td>
- </tr>
- <tr>
- <td class="row1" nowrap="nowrap"><?php echo $user->lang['BOARD_STARTED']; ?>:</td>
- <td class="row2"><b><?php echo $start_date; ?></b></td>
- <td class="row1" nowrap="nowrap"><?php echo $user->lang['AVATAR_DIR_SIZE']; ?>:</td>
- <td class="row2"><b><?php echo $avatar_dir_size; ?></b></td>
- </tr>
- <tr>
- <td class="row1" nowrap="nowrap"><?php echo $user->lang['DATABASE_SIZE']; ?>:</td>
- <td class="row2"><b><?php echo $dbsize; ?></b></td>
- <td class="row1" nowrap="nowrap"><?php echo $user->lang['UPLOAD_DIR_SIZE']; ?>:</td>
- <td class="row2"><b><?php echo $upload_dir_size; ?></b></td>
- </tr>
- <tr>
- <td class="row1" nowrap="nowrap"><?php echo $user->lang['GZIP_COMPRESSION']; ?>:</td>
- <td class="row2"><b><?php echo ($config['gzip_compress']) ? $user->lang['ON'] : $user->lang['OFF']; ?></b></td>
- <td class="row1" nowrap="nowrap">&nbsp;</td>
- <td class="row2">&nbsp;</td>
- </tr>
- <tr>
- <td class="cat" colspan="4" align="right"><select name="action"><option value="online"><?php echo $user->lang['RESET_ONLINE']; ?></option><option value="date"><?php echo $user->lang['RESET_DATE']; ?></option><option value="stats"><?php echo $user->lang['RESYNC_STATS']; ?></option><option value="user"><?php echo $user->lang['RESYNC_POSTCOUNTS']; ?></option>
- </select> <input class="btnlite" type="submit" name="submit" value="<?php echo $user->lang['SUBMIT']; ?>" />&nbsp;</td>
- </tr>
-</table></form>
-
-<h1><?php echo $user->lang['ADMIN_LOG']; ?></h1>
-
-<p><?php echo $user->lang['ADMIN_LOG_INDEX_EXPLAIN']; ?></p>
-
-<table class="bg" width="100%" cellpadding="4" cellspacing="1" border="0">
- <tr>
- <th width="15%" height="25" nowrap="nowrap"><?php echo $user->lang['USERNAME']; ?></th>
- <th width="15%"><?php echo $user->lang['IP']; ?></th>
- <th width="20%"><?php echo $user->lang['TIME']; ?></th>
- <th width="45%" nowrap="nowrap"><?php echo $user->lang['ACTION']; ?></th>
- </tr>
-<?php
-
- view_log('admin', $log_data, $log_count, 5);
-
- $row_class = 'row2';
- for($i = 0; $i < sizeof($log_data); $i++)
- {
- $row_class = ($row_class == 'row1') ? 'row2' : 'row1';
-
-?>
- <tr>
- <td class="<?php echo $row_class; ?>"><?php echo $log_data[$i]['username']; ?></td>
- <td class="<?php echo $row_class; ?>" align="center"><?php echo $log_data[$i]['ip']; ?></td>
- <td class="<?php echo $row_class; ?>" align="center"><?php echo $user->format_date($log_data[$i]['time']); ?></td>
- <td class="<?php echo $row_class; ?>"><?php echo $log_data[$i]['action']; ?></td>
- </tr>
-<?php
-
- }
-
- if ($auth->acl_get('a_user'))
- {
-
-?>
-</table>
-
-<h1><?php echo $user->lang['INACTIVE_USERS']; ?></h1>
-
-<p><?php echo $user->lang['INACTIVE_USERS_EXPLAIN']; ?></p>
-
-<form method="post" name="inactive" action="<?php echo "index.$phpEx$SID&amp;pane=right"; ?>"><table class="bg" width="100%" cellpadding="4" cellspacing="1" border="0">
- <tr>
- <th width="45%" height="25" nowrap="nowrap"><?php echo $user->lang['USERNAME']; ?></th>
- <th width="45%"><?php echo $user->lang['JOINED']; ?></th>
- <th width="5%" nowrap="nowrap"><?php echo $user->lang['MARK']; ?></th>
- </tr>
-<?php
-
- $sql = 'SELECT user_id, username, user_regdate
- FROM ' . USERS_TABLE . '
- WHERE user_type = ' . USER_INACTIVE . '
- ORDER BY user_regdate ASC';
- $result = $db->sql_query($sql);
+
+ $return = call_user_func_array($call, $args);
- if ($row = $db->sql_fetchrow($result))
- {
- do
+ if ($tpl_type[0] == 'select')
{
- $row_class = ($row_class == 'row1') ? 'row2' : 'row1';
-
-?>
- <tr>
- <td class="<?php echo $row_class; ?>"><a href="<?php echo "admin_users.$phpEx$SID&amp;u=" . $row['user_id']; ?>"><?php echo $row['username']; ?></a></td>
- <td class="<?php echo $row_class; ?>"><?php echo $user->format_date($row['user_regdate']); ?></td>
- <td class="<?php echo $row_class; ?>">&nbsp;<input type="checkbox" name="mark[]" value="<?php echo $row['user_id']; ?>" />&nbsp;</td>
- </tr>
-<?php
-
+ $tpl = '<select id="' . $key . '" name="' . $name . '">' . $return . '</select>';
}
- while ($row = $db->sql_fetchrow($result));
-
-?>
- <tr>
- <td class="cat" colspan="3" height="28" align="right"><select name="action"><option value="activate"><?php echo $user->lang['ACTIVATE']; ?></option><?php
-
- if (!empty($config['email_enable']))
+ else
{
-
-?><option value="remind"><?php echo $user->lang['REMIND']; ?></option><?php
-
+ $tpl = $return;
}
-?><option value="delete"><?php echo $user->lang['DELETE']; ?></option></select> <input class="btnlite" type="submit" name="submit" value="<?php echo $user->lang['SUBMIT']; ?>" />&nbsp;</td>
- </tr>
-<?php
-
- }
- else
- {
-
-?>
- <tr>
- <td class="row1" colspan="3" align="center"><?php echo $user->lang['NO_INACTIVE_USERS']; ?></td>
- </tr>
-<?php
-
- }
-
-?>
-</table>
-
-<table width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <td align="right" valign="top" nowrap="nowrap"><b><span class="gensmall"><a href="javascript:marklist(true);" class="gensmall"><?php echo $user->lang['MARK_ALL']; ?></a> :: <a href="javascript:marklist(false);" class="gensmall"><?php echo $user->lang['UNMARK_ALL']; ?></a></span></b></td>
- </tr>
-</table></form>
-
-<?php
+ break;
+ default:
+ break;
}
- adm_page_footer();
-
-}
-else
-{
- //
- // Output the frameset ...
- //
- header("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
- header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
- header("Content-type: text/html; charset=" . $user->lang['ENCODING']);
-
- $adm_url = "index.$phpEx$SID&amp;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))
+ if (isset($vars['append']))
{
- if (file_exists($phpbb_root_path . 'adm/admin_' . $m[1] . '.' . $phpEx))
- {
- $adm_url = 'admin_' . $m[1] . '.' . $phpEx . $SID;
- $adm_url .= (!empty($_GET['mode'])) ? '&amp;mode=' . htmlspecialchars($_GET['mode']) : '';
- $adm_url .= (!empty($_GET['f'])) ? '&amp;f=' . intval($_GET['f']) : '';
- $adm_url .= (!empty($_GET['u'])) ? '&amp;u=' . intval($_GET['u']) : '';
- $adm_url .= (!empty($_GET['g'])) ? '&amp;g=' . intval($_GET['g']) : '';
- }
+ $tpl .= $vars['append'];
}
- */
-?>
-<html>
-<head>
-<title><?php echo $user->lang['ADMIN_TITLE']; ?></title>
-</head>
-
-<frameset rows="60, *" border="0" framespacing="0" frameborder="NO">
- <frame src="<?php echo "index.$phpEx$SID&amp;pane=top"; ?>" name="title" noresize marginwidth="0" marginheight="0" scrolling="NO">
- <frameset cols="155,*" rows="*" border="2" framespacing="0" frameborder="yes">
- <frame src="<?php echo "index.$phpEx$SID&amp;pane=left"; ?>" name="nav" marginwidth="3" marginheight="3" scrolling="yes">
- <frame src="<?php echo $adm_url ?>" name="main" marginwidth="0" marginheight="0" scrolling="auto">
- </frameset>
-</frameset>
-
-<noframes>
- <body bgcolor="white" text="#000000">
- <p><?php echo $user->lang['NO_FRAMES']; ?></p>
- </body>
-</noframes>
-</html>
-<?php
-
- exit;
+
+ 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 @@
-<?php
-/**
-*
-* @package acp
-* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
-*/
-define('NEED_SID', true);
-define('IN_ADMIN', true);
-require($phpbb_root_path . 'common.'.$phpEx);
-require($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
-
-// Start session management
-$user->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']);
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $user->lang['ENCODING']; ?>">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="stylesheet" href="subSilver.css" type="text/css">
-<?php
-
- echo $meta;
-
-?>
-<style type="text/css">
-<!--
-th { background-image: url('images/cellpic3.gif') }
-td.cat { background-image: url('images/cellpic1.gif') }
-//-->
-</style>
-<title><?php echo $config['sitename'] . ' - ' . $page_title; ?></title>
-</head>
-<body>
-
-<?php
-
- if ($table_html)
- {
-
-?>
-<a name="top"></a>
-
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
- <tr>
- <td colspan="2" height="25" align="right" nowrap="nowrap"><span class="subtitle">&#0187; <i><?php echo $sub_title; ?></i></span> &nbsp;&nbsp;</td>
- </tr>
-</table>
-
-<table width="95%" cellspacing="0" cellpadding="0" border="0" align="center">
- <tr>
- <td><br clear="all" />
-
-<?php
-
- }
-
-}
-
-function adm_page_footer($copyright_html = true)
-{
- global $cache, $config, $db, $phpEx;
-
- if (!empty($cache))
- {
- $cache->unload();
- }
-
- // Close our DB connection.
- $db->sql_close();
-
-?>
-
- </td>
- </tr>
-</table>
-<?php
-
- if ($copyright_html)
- {
-
-?>
-
-<div class="copyright" align="center">Powered by phpBB <?php echo $config['version']; ?> &copy; 2002 <a href="http://www.phpbb.com/" target="_phpbb">phpBB Group</a></div>
-
-<br clear="all" />
-
-</body>
-</html>
-<?php
-
- }
-
- exit;
-}
-
-function adm_page_message($title, $message, $show_header = false)
-{
- global $phpEx, $SID, $user;
-
- if ($show_header)
- {
-
-?>
-
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
- <tr>
- <td><a href="<?php echo "../index.$phpEx$SID"; ?>"><img src="images/header_left.jpg" width="200" height="60" alt="phpBB Logo" title="phpBB Logo" border="0"/></a></td>
- <td width="100%" background="images/header_bg.jpg" height="60" align="right" nowrap="nowrap"><span class="maintitle"><?php echo $user->lang['ADMIN_TITLE']; ?></span> &nbsp; &nbsp; &nbsp;</td>
- </tr>
-</table>
-
-<?php
-
- }
-
-?>
-
-<br /><br />
-
-<table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th><?php echo $title; ?></th>
- </tr>
- <tr>
- <td class="row1" align="center"><?php echo $message; ?></td>
- </tr>
-</table>
-
-<br />
-
-<?php
-
-}
-
-function adm_page_confirm($title, $message)
-{
- global $phpEx, $SID, $user;
-
- // Grab data from GET and POST arrays ... note this is _not_
- // validated! Everything is typed as string to ensure no
- // funny business on displayed hidden field data. Validation
- // will be carried out by whatever processes this form.
- $var_ary = array_merge($_GET, $_POST);
-
- $s_hidden_fields = '';
- foreach ($var_ary as $key => $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 .= "<input type=\"hidden\" name=\"${key}[$k][$_k]\" value=\"" . addslashes($_v) . '" />';
- }
- }
- else
- {
- set_var($var[$k], $v, 'string');
- $s_hidden_fields .= "<input type=\"hidden\" name=\"${key}[$k]\" value=\"" . addslashes($v) . '" />';
- }
- }
- }
- else
- {
- set_var($var, $var, 'string');
- $s_hidden_fields .= '<input type="hidden" name="' . $key . '" value="' . addslashes($var) . '" />';
- }
- unset($var_ary[$key]);
- }
-
-?>
-
-<br /><br />
-
-<form name="confirm" method="post" action="<?php echo $_SERVER['SCRIPT_NAME'] . $SID; ?>">
-<table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
- <tr>
- <th><?php echo $title; ?></th>
- </tr>
- <tr>
- <td class="row1" align="center"><?php echo $message; ?><br /><br /><input class="btnlite" type="submit" name="confirm" value="<?php echo $user->lang['YES']; ?>" />&nbsp;&nbsp;<input class="btnmain" type="submit" name="cancel" value="<?php echo $user->lang['NO']; ?>" /></td>
- </tr>
-</table>
-
-<?php echo $s_hidden_fields; ?>
-</form>
-
-<br />
-
-<?php
-
- adm_page_footer();
-
-}
-
-
-function build_cfg_template($tpl_type, $config_key, $options = '')
-{
- global $new, $user;
-
- $tpl = '';
- $name = 'config[' . $config_key . ']';
-
- switch ($tpl_type[0])
- {
- case 'text':
- case 'password':
- $size = (int) $tpl_type[1];
- $maxlength = (int) $tpl_type[2];
-
- $tpl = '<input class="post" type="' . $tpl_type[0] . '"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="' . $name . '" value="' . $new[$config_key] . '" />';
- break;
-
- case 'dimension':
- $size = (int) $tpl_type[1];
- $maxlength = (int) $tpl_type[2];
-
- $tpl = '<input class="post" type="text"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="config[' . $config_key . '_height]" value="' . $new[$config_key . '_height'] . '" /> x <input class="post" type="text"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="config[' . $config_key . '_width]" value="' . $new[$config_key . '_width'] . '" />';
- break;
-
- case 'textarea':
- $rows = (int) $tpl_type[1];
- $cols = (int) $tpl_type[2];
-
- $tpl = '<textarea name="' . $name . '" rows="' . $rows . '" cols="' . $cols . '">' . $new[$config_key] . '</textarea>';
- 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 = '<input type="radio" name="' . $name . '" value="0"' . $key_no . ' />' . (($type_no) ? $user->lang['NO'] : $user->lang['DISABLED']);
- $tpl_yes = '<input type="radio" name="' . $name . '" value="1"' . $key_yes . ' />' . (($type_no) ? $user->lang['YES'] : $user->lang['ENABLED']);
-
- $tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . '&nbsp;&nbsp;' . $tpl_no : $tpl_no . '&nbsp;&nbsp;' . $tpl_yes;
- break;
-
- case 'select':
- eval('$s_options = ' . str_replace('{VALUE}', $new[$config_key], $options) . ';');
- $tpl = '<select name="' . $name . '">' . $s_options . '</select>';
- 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 . '&amp;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 . '&amp;i=' . $module_id . '&amp;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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_TITLE}</h1>
+
+<p>{L_TITLE_EXPLAIN}</p>
+
+<!-- IF S_WARNING -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{WARNING_MSG}</p>
+ </div>
+<!-- ENDIF -->
+
+<!-- IF S_NOTIFY -->
+ <div class="successbox">
+ <h3>{L_NOTIFY}</h3>
+ <p>{NOTIFY_MSG}</p>
+ </div>
+<!-- ENDIF -->
+
+<!-- IF S_UPLOADING_FILES -->
+ <h2>{L_UPLOADING_FILES}</h2>
+
+ <!-- BEGIN upload -->
+ :: {upload.FILE_INFO}<br />
+ <!-- IF upload.S_DENIED --><span class="error">{upload.DENIED}</span><!-- ELSEIF upload.ERROR_MSG --><span class="error">{upload.ERROR_MSG}</span><!-- ELSE --><span class="success">{L_SUCCESSFULLY_UPLOADED}</span><!-- ENDIF -->
+ <br /><br />
+ <!-- END upload -->
+
+<!-- ENDIF -->
+
+<!-- IF S_ATTACHMENT_SETTINGS -->
+
+ <form id="attachsettings" method="post" action="{U_ACTION}">
+ <fieldset>
+ <legend>{L_ACP_ATTACHMENT_SETTINGS}</legend>
+ <dl>
+ <dt><label for="upload_dir">{L_UPLOAD_DIR}:</label><br /><span>{L_UPLOAD_DIR_EXPLAIN}</span></dt>
+ <dd><input type="text" id="upload_dir" size="25" maxlength="100" name="upload_path" value="{UPLOAD_PATH}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="display_order">{L_DISPLAY_ORDER}:</label><br /><span>{L_DISPLAY_ORDER_EXPLAIN}</span></dt>
+ <dd><input type="radio" id="display_order" name="display_order" value="0"<!-- IF not DISPLAY_ORDER --> checked="checked"<!-- ENDIF --> /> {L_DESCENDING} &nbsp; <input type="radio" name="display_order" value="1"<!-- IF DISPLAY_ORDER --> checked="checked"<!-- ENDIF --> /> {L_ASCENDING}</dd>
+ </dl>
+ <dl>
+ <dt><label for="attach_quota">{L_ATTACH_QUOTA}:</label><br /><span>{L_ATTACH_QUOTA_EXPLAIN}</span></dt>
+ <dd><input type="text" id="attach_quota" size="8" maxlength="15" name="attachment_quota" value="{ATTACHMENT_QUOTA}" /> {S_QUOTA_SELECT}</dd>
+ </dl>
+ <dl>
+ <dt><label for="max_filesize">{L_ATTACH_MAX_FILESIZE}:</label><br /><span>{L_ATTACH_MAX_FILESIZE_EXPLAIN}</span></dt>
+ <dd><input type="text" id="max_filesize" size="8" maxlength="15" name="max_filesize" value="{MAX_FILESIZE}" /> {S_MAX_FILESIZE_SELECT}</dd>
+ </dl>
+ <dl>
+ <dt><label for="max_pm_filesize">{L_ATTACH_MAX_PM_FILESIZE}:</label><br /><span>{L_ATTACH_MAX_PM_FILESIZE_EXPLAIN}</span></dt>
+ <dd><input type="text" id="max_pm_filesize" size="8" maxlength="15" name="max_filesize_pm" value="{MAX_PM_FILESIZE}" /> {S_MAX_PM_FILESIZE_SELECT}</dd>
+ </dl>
+ <dl>
+ <dt><label for="max_attachments">{L_MAX_ATTACHMENTS}:</label></dt>
+ <dd><input type="text" id="max_attachments" size="3" maxlength="3" name="max_attachments" value="{MAX_ATTACHMENTS}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="max_attachments_pm">{L_MAX_ATTACHMENTS_PM}:</label></dt>
+ <dd><input type="text" id="max_attachments_pm" size="3" maxlength="3" name="max_attachments_pm" value="{MAX_ATTACHMENTS_PM}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="secure_downloads">{L_SECURE_DOWNLOADS}:</label><br /><span>{L_SECURE_DOWNLOADS_EXPLAIN}</span></dt>
+ <dd><input type="radio" id="secure_downloads" name="secure_downloads" value="1"<!-- IF SECURE_DOWNLOADS --> checked="checked"<!-- ENDIF --> /> {L_YES}&nbsp;&nbsp;<input type="radio" name="secure_downloads" value="0"<!-- IF not SECURE_DOWNLOADS --> checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="allow_deny">{L_SECURE_ALLOW_DENY}:</label><br /><span>{L_SECURE_ALLOW_DENY_EXPLAIN}</span></dt>
+ <dd><input type="radio" id="allow_deny" name="secure_allow_deny" value="1"<!-- IF SECURE_ALLOW_DENY --> checked="checked"<!-- ENDIF --> /> {L_ORDER_ALLOW_DENY}&nbsp;&nbsp;<input type="radio" name="secure_allow_deny" value="0"<!-- IF not SECURE_ALLOW_DENY --> checked="checked"<!-- ENDIF --> /> {L_ORDER_DENY_ALLOW}</dd>
+ </dl>
+ <dl>
+ <dt><label for="referer">{L_SECURE_EMPTY_REFERER}:</label><br /><span>{L_SECURE_EMPTY_REFERER_EXPLAIN}</span></dt>
+ <dd><input type="radio" id="referer" name="secure_allow_empty_referer" value="1"<!-- IF ALLOW_EMPTY_REFERER --> checked="checked"<!-- ENDIF --> /> {L_YES}&nbsp;&nbsp;<input type="radio" name="secure_allow_empty_referer" value="0"<!-- IF not ALLOW_EMPTY_REFERER --> checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_SETTINGS_CAT_IMAGES} [{L_ASSIGNED_GROUP}: {ASSIGNED_GROUPS}]</legend>
+ <dl>
+ <dt><label for="display_inlined">{L_DISPLAY_INLINED}:</label><br /><span>{L_DISPLAY_INLINED_EXPLAIN}</span></dt>
+ <dd><input type="radio" id="display_inlined" name="img_display_inlined" value="1"<!-- IF DISPLAY_INLINED --> checked="checked"<!-- ENDIF --> /> {L_YES}&nbsp;&nbsp;<input type="radio" name="img_display_inlined" value="0"<!-- IF not DISPLAY_INLINED --> checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
+ </dl>
+ <!-- IF S_THUMBNAIL_SUPPORT -->
+ <dl>
+ <dt><label for="create_thumbnail">{L_CREATE_THUMBNAIL}:</label><br /><span>{L_CREATE_THUMBNAIL_EXPLAIN}</span></dt>
+ <dd><input type="radio" id="create_thumbnail" name="img_create_thumbnail" value="1"<!-- IF CREATE_THUMBNAIL --> checked="checked"<!-- ENDIF --> /> {L_YES}&nbsp;&nbsp;<input type="radio" name="img_create_thumbnail" value="0"<!-- IF not CREATE_THUMBNAIL --> checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="thumb_filesize">{L_MIN_THUMB_FILESIZE}:</label><br /><span>{L_MIN_THUMB_FILESIZE_EXPLAIN}</span></dt>
+ <dd><input type="text" id="thumb_filesize" size="7" maxlength="15" name="img_min_thumb_filesize" value="{MIN_THUMB_FILESIZE}" /> {L_BYTES}</dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="imagick_path">{L_IMAGICK_PATH}:</label><br /><span>{L_IMAGICK_PATH_EXPLAIN}</span></dt>
+ <dd><input type="text" id="imagick_path" size="20" maxlength="200" name="img_imagick" value="{IMG_IMAGICK}" />&nbsp;&nbsp;<span>[ <a href="{U_SEARCH_IMAGICK}">{L_SEARCH_IMAGICK}</a> ]</span></dd>
+ </dl>
+ <dl>
+ <dt><label for="image_size">{L_MAX_IMAGE_SIZE}:</label><br /><span>{L_MAX_IMAGE_SIZE_EXPLAIN}</span></dt>
+ <dd><input type="text" id="image_size" size="3" maxlength="4" name="img_max_width" value="{MAX_WIDTH}" /> px X <input type="text" size="3" maxlength="4" name="img_max_height" value="{MAX_HEIGHT}" /> px</dd>
+ </dl>
+ <dl>
+ <dt><label for="link_size">{L_IMAGE_LINK_SIZE}:</label><br /><span>{L_IMAGE_LINK_SIZE_EXPLAIN}</span></dt>
+ <dd><input type="text" id="link_size" size="3" maxlength="4" name="img_link_width" value="{LINK_WIDTH}" /> px X <input type="text" size="3" maxlength="4" name="img_link_height" value="{LINK_HEIGHT}" /> px</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </fieldset>
+
+ <!-- IF not S_SECURE_DOWNLOADS -->
+ <div class="errorbox">
+ <p>{L_SECURE_DOWNLOAD_NOTICE}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <fieldset>
+ <legend>{L_SECURE_TITLE}</legend>
+ <p>{L_DOWNLOAD_ADD_IPS_EXPLAIN}</p>
+ <dl>
+ <dt><label for="ip_hostname">{L_IP_HOSTNAME}:</label></dt>
+ <dd><textarea id="ip_hostname" cols="40" rows="3" name="ips"></textarea></dd>
+ </dl>
+ <dl>
+ <dt><label for="exclude">{L_IP_EXCLUDE}:</label><br /><span>{L_EXCLUDE_ENTERED_IP}</span></dt>
+ <dd><input type="radio" id="exclude" name="ipexclude" value="1" /> {L_YES} &nbsp; <input type="radio" name="ipexclude" value="0" checked="checked" /> {L_NO}</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" id="securesubmit" name="securesubmit" value="{L_SUBMIT}" />
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_REMOVE_IPS}</legend>
+ <!-- IF S_DEFINED_IPS -->
+ <p>{L_DOWNLOAD_REMOVE_IPS_EXPLAIN}</p>
+ <dl>
+ <dt><label for="remove_ip_hostname">{L_IP_HOSTNAME}:</label></dt>
+ <dd><select name="unip[]" id="remove_ip_hostname" multiple="multiple" size="10">{DEFINED_IPS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" id="unsecuresubmit" name="unsecuresubmit" value="{L_SUBMIT}" />
+ </fieldset>
+
+ <!-- ELSE -->
+ <p>{L_NO_IPS_DEFINED}</p>
+ <!-- ENDIF -->
+ </fieldset>
+
+ </form>
+
+<!-- ELSEIF S_EXTENSION_GROUPS -->
+
+ <!-- IF S_EDIT_GROUP -->
+ <script type="text/javascript" defer="defer">
+ <!--
+
+ function update_image(newimage)
+ {
+ if (newimage == 'no_image')
+ {
+ document.image_upload_icon.src = "{PHPBB_ROOT_PATH}images/spacer.gif";
+ }
+ else
+ {
+ document.image_upload_icon.src = "{PHPBB_ROOT_PATH}{IMG_PATH}/" + newimage;
+ }
+ }
+
+ function show_extensions(elem)
+ {
+ var str = '';
+
+ for (i = 0; i < elem.length; i++)
+ {
+ var element = elem.options[i];
+ if (element.selected)
+ {
+ if (str)
+ {
+ str = str + ', ';
+ }
+
+ str = str + element.innerHTML;
+ }
+ }
+
+ if (document.all)
+ {
+ document.all.ext.innerText = str;
+ }
+ else if (document.getElementById('ext').textContent)
+ {
+ document.getElementById('ext').textContent = str;
+ }
+ else if (document.getElementById('ext').firstChild.nodeValue)
+ {
+ document.getElementById('ext').firstChild.nodeValue = str;
+ }
+ }
+
+ //-->
+ </script>
+
+ <form id="extgroups" method="post" action="{U_ACTION}">
+ <fieldset>
+ <input type="hidden" name="action" value="{ACTION}" />
+ <input type="hidden" name="g" value="{GROUP_ID}" />
+
+ <legend>{L_LEGEND}</legend>
+ <dl>
+ <dt><label for="group_name">{L_GROUP_NAME}:</label></dt>
+ <dd><input type="text" id="group_name" size="20" maxlength="100" name="group_name" value="{GROUP_NAME}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="category">{L_SPECIAL_CATEGORY}:</label><br /><span>{L_SPECIAL_CATEGORY_EXPLAIN}</span></dt>
+ <dd>{S_CATEGORY_SELECT}</dd>
+ </dl>
+ <dl>
+ <dt><label for="allowed">{L_ALLOWED}:</label></dt>
+ <dd><input type="checkbox" id="allowed" name="allow_group" value="{GROUP_ID}"<!-- IF ALLOW_GROUP --> cecked="checked"<!-- ENDIF --> /></dd>
+ </dl>
+ <dl>
+ <dt><label for="allow_in_pm">{L_ALLOW_IN_PM}:</label></dt>
+ <dd><input type="checkbox" id="allow_in_pm" name="allow_in_pm" value="1"<!-- IF ALLOW_IN_PM --> checked="checked"<!-- ENDIF --> /></dd>
+ </dl>
+ <dl>
+ <dt><label for="download_mode">{L_DOWNLOAD_MODE}:</label><br /><span>{L_DOWNLOAD_MODE_EXPLAIN}</span></dt>
+ <dd>{S_DOWNLOAD_SELECT}</dd>
+ </dl>
+ <dl>
+ <dt><label for="upload_icon">{L_UPLOAD_ICON}:</label></dt>
+ <dd><select name="upload_icon" id="upload_icon" onchange="update_image(this.options[selectedIndex].value);">
+ <option value="no_image"<!-- IF S_NO_IMAGE --> selected="selected"<!-- ENDIF -->>{L_NO_IMAGE}</option>{S_FILENAME_LIST}
+ </select></dd>
+ <dd>&nbsp;<img <!-- IF S_NO_IMAGE -->src="{PHPBB_ROOT_PATH}images/spacer.gif"<!-- ELSE -->src="{UPLOAD_ICON_SRC}"<!-- ENDIF --> name="image_upload_icon" alt="" title="" />&nbsp;</dd>
+ </dl>
+ <dl>
+ <dt><label for="extgroup_filesize">{L_MAX_EXTGROUP_FILESIZE}:</label></dt>
+ <dd><input type="text" id="extgroup_filesize" size="3" maxlength="15" name="max_filesize" value="{EXTGROUP_FILESIZE}" /> {S_EXT_GROUP_SIZE}</dd>
+ </dl>
+ <dl>
+ <dt><label for="assigned_extensions">{L_ASSIGNED_EXTENSIONS}:</label></dt>
+ <dd><div id="ext">{ASSIGNED_EXTENSIONS}</div> <span>[<a href="{U_EXTENSIONS}">{L_GO_TO_EXTENSIONS}</a> ]</span></dd>
+ <dd><select name="extensions[]" id="assigned_extensions" class="narrow" onchange="show_extensions(this);" multiple="multiple" size="8">{S_EXTENSION_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="allowed_forums">{L_ALLOWED_FORUMS}:</label><br /><span>{L_ALLOWED_FORUMS_EXPLAIN}</span></dt>
+ <dd><input type="radio" id="allowed_forums" class="radio" name="forum_select" value="0"<!-- IF not S_FORUM_IDS --> checked="checked"<!-- ENDIF --> />&nbsp;{L_ALLOW_ALL_FORUMS}&nbsp;&nbsp;<input type="radio" class="radio" name="forum_select" value="1"<!-- IF S_FORUM_IDS --> checked="checked"<!-- ENDIF --> />&nbsp;{L_ALLOW_SELECTED_FORUMS}</dd>
+ <dd><select name="allowed_forums[]" multiple="multiple" size="8">{S_FORUM_ID_OPTIONS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </fieldset>
+
+ </form>
+ <!-- ELSE -->
+
+ <table cellspacing="1">
+ <col class="row1" /><col class="row1" /><col class="row2" />
+ <thead>
+ <tr>
+ <th>{L_EXTENSION_GROUP}</th>
+ <th>{L_SPECIAL_CATEGORY}</th>
+ <th>{L_OPTIONS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN groups -->
+ <!-- IF groups.S_ADD_SPACER -->
+ <tr>
+ <td class="spacer" colspan="3">&nbsp;</td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td><a href="{groups.U_EDIT}">{groups.GROUP_NAME}</a></td>
+ <td>{groups.CATEGORY}</td>
+ <td align="center" valign="middle" style="white-space: nowrap;">&nbsp;<a href="{groups.U_EDIT}">{L_EDIT}</a> | <a href="{groups.U_DELETE}">{L_DELETE}</a> | <a href="{groups.U_ACT_DEACT}">{groups.L_ACT_DEACT}</a>&nbsp;</td>
+ </tr>
+ <!-- END groups -->
+ </tbody>
+ </table>
+
+ <form id="extgroups" method="post" action="{U_ACTION}">
+ <fieldset class="quick">
+ {L_CREATE_GROUP}: <input type="text" name="group_name" maxlength="30" />
+ <input class="button2" name="add" type="submit" value="{L_SUBMIT}" />
+ </fieldset>
+ </form>
+
+ <!-- ENDIF -->
+
+<!-- ELSEIF S_EXTENSIONS -->
+
+ <form id="add_ext" method="post" action="{U_ACTION}">
+ <fieldset>
+ <legend>{L_ADD_EXTENSION}</legend>
+ <dl>
+ <dt><label for="add_extension">{L_EXTENSION}</label></dt>
+ <dd><input type="text" id="add_extension" size="20" maxlength="100" name="add_extension" value="{ADD_EXTENSION}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="extension_group">{L_EXTENSION_GROUP}</label></dt>
+ <dd>{GROUP_SELECT_OPTIONS}</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ <input type="submit" id="add_extension_check" name="add_extension_check" class="button2" value="{L_SUBMIT}" />
+ </fieldset>
+
+ </form>
+
+ <br />
+
+ <form id="change_ext" method="post" action="{U_ACTION}">
+
+ <table cellspacing="1">
+ <col class="row1" /><col class="row1" /><col class="row2" />
+ <thead>
+ <tr>
+ <th>{L_EXTENSION}</th>
+ <th>{L_EXTENSION_GROUP}</th>
+ <th>{L_DELETE}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN extensions -->
+ <!-- IF extensions.S_SPACER -->
+ <tr>
+ <td class="spacer" colspan="3">&nbsp;</td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <input type="hidden" name="extension_change_list[]" value="{extensions.EXTENSION_ID}" />
+ <td><b>{extensions.EXTENSION}</b></td>
+ <td>{extensions.GROUP_OPTIONS}</td>
+ <td><input type="checkbox" name="extension_id_list[]" value="{extensions.EXTENSION_ID}" /></td>
+ </tr>
+ <!-- END extensions -->
+ </tbody>
+ </table>
+
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSEIF S_ORPHAN -->
+
+ <script type="text/javascript">
+ <!--
+ function marklist(match, name, status)
+ {
+ var object = document.getElementById(match);
+
+ var len = object.length;
+
+ for (i = 0; i < len; i++)
+ {
+ result = eval('object.elements[' + i + '].name.search(/' + name + '.+/)');
+ if (result != -1)
+ object.elements[i].checked = status;
+ }
+ }
+ //-->
+ </script>
+
+ <form id="orphan" method="post" action="{U_ACTION}">
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_FILENAME}</th>
+ <th>{L_FILESIZE}</th>
+ <th>{L_ATTACH_POST_ID}</th>
+ <th>{L_ATTACH_TO_POST}</th>
+ <th>{L_DELETE}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN orphan -->
+ <!-- IF orphan.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td><a href="{orphan.U_FILE}" rel="file">{orphan.FILE}</a></td>
+ <td>{orphan.FILESIZE}</td>
+ <td><b>ID: </b><input type="text" name="post_id[{orphan.FILE}]" size="7" maxlength="10" value="{orphan.POST_IDS}" /></td>
+ <td><input type="checkbox" name="add[{orphan.FILE}]" /></td>
+ <td><input type="checkbox" name="delete[{orphan.FILE}]" /></td>
+ </tr>
+ <!-- END orphan -->
+ <tr>
+ <td colspan="3">&nbsp;</td>
+ <td class="small"><a href="javascript:marklist('attachments', 'add', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('attachments', 'add', false);">{L_UNMARK_ALL}</a></td>
+ <td class="small"><a href="javascript:marklist('attachments', 'delete', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('attachments', 'delete', false);">{L_UNMARK_ALL}</a></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<p>{L_ACP_BAN_EXPLAIN}</p>
+
+<h1>{L_TITLE}</h1>
+
+<p>{L_EXPLAIN}</p>
+
+<script type="text/javascript">
+<!--
+
+ var ban_length = new Array();
+ <!-- BEGIN ban_length -->
+ ban_length['{ban_length.BAN_ID}'] = "{ban_length.LENGTH}";
+ <!-- END ban_length -->
+
+ var ban_reason = new Array();
+ <!-- BEGIN ban_reason -->
+ ban_reason['{ban_reason.BAN_ID}'] = "{ban_reason.REASON}";
+ <!-- END ban_reason -->
+
+ var ban_give_reason = new Array();
+ <!-- BEGIN ban_give_reason -->
+ ban_give_reason['{ban_give_reason.BAN_ID}'] = "{ban_give_reason.REASON}";
+ <!-- END ban_give_reason -->
+
+ function display_details(option)
+ {
+ document.getElementById('acp_ban').unbangivereason.value = ban_give_reason[option];
+ document.getElementById('acp_ban').unbanreason.value = ban_reason[option];
+ document.getElementById('acp_ban').unbanlength.value = ban_length[option];
+ }
+
+//-->
+</script>
+
+<form id="acp_ban" method="post" action="{U_ACTION}">
+
+<fieldset>
+ <legend>{L_TITLE}</legend>
+ <dl>
+ <dt><label for="ban">{L_BAN_CELL}:</label></dt>
+ <dd><textarea name="ban" cols="40" rows="3" id="ban"></textarea></dd>
+ <!-- IF S_USERNAME_BAN --><dd>[ <a href="#" onclick="window.open('{U_FIND_USER}', '_phpbbsearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</dd><!-- ENDIF -->
+ </dl>
+ <dl>
+ <dt><label for="banlength">{L_BAN_LENGTH}:</label></dt>
+ <dd><select name="banlength" id="banlength">{S_BAN_END_OPTIONS}</select></dd>
+ <dd><input type="text" name="banlengthother" /> (YYYY-MM-DD)</dd>
+ </dl>
+ <dl>
+ <dt><label for="banexclude">{L_BAN_EXCLUDE}:</label><br /><span>{L_BAN_EXCLUDE_EXPLAIN}</span></dt>
+ <dd><input type="radio" name="banexclude" value="1" /> {L_YES} &nbsp; <input type="radio" name="banexclude" id="banexclude" value="0" checked="checked" /> {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="banreason">{L_BAN_REASON}:</label></dt>
+ <dd><input name="banreason" type="text" id="banreason" class="medium" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="bangivereason">{L_BAN_GIVE_REASON}:</label></dt>
+ <dd><input name="bangivereason" type="text" id="bangivereason" class="medium" /></dd>
+ </dl>
+</fieldset>
+
+<fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="bansubmit" name="bansubmit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="banreset" name="banreset" value="{L_RESET}" />
+</fieldset>
+
+<h1>{L_UNBAN_TITLE}</h1>
+
+<p>{L_UNBAN_EXPLAIN}</p>
+
+<fieldset>
+ <legend>{L_UNBAN_TITLE}</legend>
+
+<!-- IF S_BANNED_OPTIONS -->
+ <dl>
+ <dt><label for="unban">{L_BAN_CELL}:</label></dt>
+ <dd><select id="unban" name="unban[]" multiple="multiple" size="10" style="width: 50%" onchange="display_details(this.options[this.selectedIndex].value)">{BANNED_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="unbanlength">{L_BAN_LENGTH}:</label></dt>
+ <dd><input style="border: 0px;" type="text" name="unbanlength" id="unbanlength" class="full" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="unbanreason">{L_BAN_REASON}:</label></dt>
+ <dd><input style="border: 0px;" type="text" name="unbanreason" id="unbanreason" class="full" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="unbangivereason">{L_BAN_GIVE_REASON}:</label></dt>
+ <dd><input style="border: 0px;" type="text" name="unbangivereason" id="unbangivereason" class="full" /></dd>
+ </dl>
+</fieldset>
+
+<fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="unbansubmit" name="unbansubmit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="unbanreset" name="unbanreset" value="{L_RESET}" />
+</fieldset>
+
+<!-- ELSE -->
+
+ <p>{L_NO_BAN_CELL}</p>
+</fieldset>
+<!-- ENDIF -->
+
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT_BBCODE -->
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <h1>{L_ACP_BBCODES}</h1>
+
+ <p>{L_ACP_BBCODES_EXPLAIN}</p>
+
+ <form id="acp_bbcodes" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_BBCODE_USAGE}</legend>
+ <p>{L_BBCODE_USAGE_EXPLAIN}</p>
+ <dl>
+ <dt><label for="bbcode_match">{L_EXAMPLES}</label><br /><br /><span>{L_BBCODE_USAGE_EXAMPLE}</span></dt>
+ <dd><textarea id="bbcode_match" name="bbcode_match" cols="60" rows="5">{BBCODE_MATCH}</textarea></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_HTML_REPLACEMENT}</legend>
+ <p>{L_HTML_REPLACEMENT_EXPLAIN}</p>
+ <dl>
+ <dt><label for="bbcode_tpl">{L_EXAMPLES}</label><br /><br /><span>{L_HTML_REPLACEMENT_EXAMPLE}</span></dt>
+ <dd><textarea id="bbcode_tpl" name="bbcode_tpl" cols="60" rows="8">{BBCODE_TPL}</textarea></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </fieldset>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th colspan="2">{L_TOKENS}</th>
+ </tr>
+ <tr>
+ <td class="row3" colspan="2">{L_TOKENS_EXPLAIN}</td>
+ </tr>
+ <tr>
+ <th>{L_TOKEN}</th>
+ <th>{L_TOKEN_DEFINITION}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN token -->
+ <tr valign="top">
+ <td class="row1">{token.TOKEN}</td>
+ <td class="row2">{token.EXPLAIN}</td>
+ </tr>
+ <!-- END token -->
+ </tbody>
+ </table>
+
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_ACP_BBCODES}</h1>
+
+ <p>{L_ACP_BBCODES_EXPLAIN}</p>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_BBCODE_TAG}</th>
+ <th>{L_ACTION}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN bbcodes -->
+ <!-- IF bbcodes.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="text-align: center;">{bbcodes.BBCODE_TAG}</td>
+ <td style="text-align: center;"><a href="{bbcodes.U_EDIT}">{L_EDIT}</a> | <a href="{bbcodes.U_DELETE}">{L_DELETE}</a></td>
+ </tr>
+ <!-- END bbcodes -->
+ </tbody>
+ </table>
+
+ <form id="acp_bbcodes" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick">
+ <input class="button2" name="submit" type="submit" value="{L_ADD_BBCODE}" />
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_TITLE}</h1>
+
+<p>{L_TITLE_EXPLAIN}</p>
+
+<form id="acp_board" method="post" action="{U_ACTION}">
+
+<!-- BEGIN options -->
+ <!-- IF options.S_LEGEND -->
+ <!-- IF not options.S_FIRST_ROW -->
+ </fieldset>
+ <!-- ENDIF -->
+ <fieldset>
+ <legend>{options.LEGEND}</legend>
+ <!-- ELSE -->
+
+ <dl>
+ <dt><label for="{options.KEY}">{options.TITLE}:</label><!-- IF options.S_EXPLAIN --><br /><span>{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dd>{options.CONTENT}</dd>
+ </dl>
+
+ <!-- ENDIF -->
+<!-- END options -->
+<!-- IF S_AUTH -->
+ <!-- BEGIN auth_tpl -->
+ {auth_tpl.TPL}
+ <!-- END auth_tpl -->
+<!-- ENDIF -->
+</fieldset>
+
+<fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+</fieldset>
+
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT_BOT -->
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_BOT_EDIT_EXPLAIN}</p>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="acp_bots" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_TITLE}</legend>
+ <dl>
+ <dt><label for="bot_name">{L_BOT_NAME}:</label><br /><span>{L_BOT_NAME_EXPLAIN}</span></dt>
+ <dd><input name="bot_name" type="text" id="bot_name" value="{BOT_NAME}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="bot_style">{L_BOT_STYLE}:</label><br /><span>{L_BOT_STYLE_EXPLAIN}</span></dt>
+ <dd><select id="bot_style" name="bot_style">{S_STYLE_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="bot_lang">{L_BOT_LANG}:</label><br /><span>{L_BOT_LANG_EXPLAIN}</span></dt>
+ <dd><select id="bot_lang" name="bot_lang">{S_LANG_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="bot_active">{L_BOT_ACTIVE}:</label></dt>
+ <dd><select id="bot_active" name="bot_active">{S_ACTIVE_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="bot_agent">{L_BOT_AGENT}:</label><br /><span>{L_BOT_AGENT_EXPLAIN}</span></dt>
+ <dd><input name="bot_agent" type="text" id="bot_agent" value="{BOT_AGENT}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="bot_ip">{L_BOT_IP}:</label><br /><span>{L_BOT_IP_EXPLAIN}</span></dt>
+ <dd><input name="bot_ip" type="text" id="bot_ip" value="{BOT_IP}" /></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_BOTS}</h1>
+
+ <p>{L_BOTS_EXPLAIN}</p>
+
+ <form id="acp_bots" method="post" action="{U_ACTION}">
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_BOT_NAME}</th>
+ <th>{L_BOT_LAST_VISIT}</th>
+ <th colspan="3">{L_OPTIONS}</th>
+ <th>{L_MARK}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN bots -->
+ <!-- IF bots.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="width: 50%;">{bots.BOT_NAME}</td>
+ <td style="width: 15%; white-space: nowrap;" align="center">&nbsp;{bots.LAST_VISIT}&nbsp;</td>
+ <td style="text-align: center;">&nbsp;<a href="{bots.U_ACTIVATE_DEACTIVATE}">{bots.L_ACTIVATE_DEACTIVATE}</a>&nbsp;</td>
+ <td style="text-align: center;">&nbsp;<a href="{bots.U_EDIT}">{L_EDIT}</a>&nbsp;</td>
+ <td style="text-align: center;">&nbsp;<a href="{bots.U_DELETE}">{L_DELETE}</a>&nbsp;</td>
+ <td style="text-align: center;"><input type="checkbox" name="mark[]" value="{bots.BOT_ID}" /></td>
+ </tr>
+ <!-- END bots -->
+ </tbody>
+ </table>
+
+ <fieldset class="quick" style="float: left;">
+ <input class="button2" name="add" type="submit" value="{L_BOT_ADD}" />
+ </fieldset>
+
+ <fieldset class="quick">
+ <select name="action">{S_BOT_OPTIONS}</select>
+ <input class="button2" name="submit" type="submit" value="{L_SUBMIT}" />
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_ACP_DISALLOW_USERNAMES}</h1>
+
+<p>{L_ADD_DISALLOW_EXPLAIN}</p>
+
+<form id="acp_disallow" method="post" action="{U_ACTION}">
+
+<fieldset>
+ <legend>{L_ADD_DISALLOW_TITLE}</legend>
+ <dl>
+ <dt><label for="user">{L_USERNAME}:</label><br /><span>{L_ADD_DISALLOW_EXPLAIN}</span></dt>
+ <dd><input id="user" type="text" name="disallowed_user" class="medium" /></dd>
+ </dl>
+</fieldset>
+
+<fieldset class="quick">
+ <input class="button1" type="submit" name="disallow" value="{L_SUBMIT}" />
+</fieldset>
+
+<h1>{L_DELETE_DISALLOW_TITLE}</h1>
+
+<p>{L_DELETE_DISALLOW_EXPLAIN}</p>
+
+<fieldset>
+ <legend>{L_DELETE_DISALLOW_TITLE}</legend>
+<!-- IF S_DISALLOWED_NAMES -->
+ <dl>
+ <dt><label for="disallowed">{L_USERNAME}:</label></dt>
+ <dd><select name="disallowed_id" id="disallowed">{S_DISALLOWED_NAMES}</select></dd>
+ </dl>
+</fieldset>
+
+<fieldset class="quick">
+ <input class="button1" type="submit" name="allow" value="{L_SUBMIT}" />
+</fieldset>
+
+<!-- ELSE -->
+ <p>{L_NO_DISALLOWED}</p>
+</fieldset>
+<!-- ENDIF -->
+
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_ACP_MASS_EMAIL}</h1>
+
+<p>{L_ACP_MASS_EMAIL_EXPLAIN}</p>
+
+<!-- IF S_WARNING -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{WARNING_MSG}</p>
+ </div>
+<!-- ENDIF -->
+
+<form id="acp_email" method="post" action="{U_ACTION}">
+
+<fieldset>
+ <legend>{L_COMPOSE}</legend>
+<dl>
+ <dt><label for="group">{L_SEND_TO_GROUP}:</label></dt>
+ <dd><select id="group" name="g">{S_GROUP_OPTIONS}</select></dd>
+</dl>
+<dl>
+ <dt><label for="usernames">{L_SEND_TO_USERS}:</label><br /><span>{L_SEND_TO_USERS_EXPLAIN}</span></dt>
+ <dd><textarea name="usernames" id="usernames" rows="5" cols="40">{USERNAMES}</textarea></dd>
+ <dd>[ <a href="#" onclick="window.open('{U_FIND_USERNAME}', '_phpbbsearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</dd>
+</dl>
+<dl>
+ <dt><label for="subject">{L_SUBJECT}:</label></dt>
+ <dd><input name="subject" type="text" id="subject" value="{SUBJECT}" /></dd>
+</dl>
+<dl>
+ <dt><label for="message">{L_MASS_MESSAGE}:</label><br /><span>{L_MASS_MESSAGE_EXPLAIN}</span></dt>
+ <dd><textarea id="message" name="message" rows="10" cols="60">{MESSAGE}</textarea></dd>
+</dl>
+<dl>
+ <dt><label for="priority">{L_MAIL_PRIORITY}:</label></dt>
+ <dd><select id="priority" name="mail_priority_flag">{S_PRIORITY_OPTIONS}</select></dd>
+</dl>
+<dl>
+ <dt><label for="send">{L_SEND_IMMEDIATLY}:</label></dt>
+ <dd><input id="send" type="checkbox" name="send_immediatly" checked="checked" /></dd>
+</dl>
+</fieldset>
+
+<fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_EMAIL}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+</fieldset>
+
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT_FORUM -->
+
+ <script type="text/javascript">
+ <!--
+
+ function display_options(value)
+ {
+ <!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
+ if (value == {FORUM_POST})
+ {
+ dE('type_actions', -1);
+ }
+ else
+ {
+ dE('type_actions', 1);
+ }
+ <!-- ENDIF -->
+
+ if (value == {FORUM_POST})
+ {
+ dE('forum_post_options', 1);
+ dE('forum_link_options', -1);
+ dE('forum_rules_options', 1);
+ dE('forum_cat_options', -1);
+ }
+ else if (value == {FORUM_LINK})
+ {
+ dE('forum_post_options', -1);
+ dE('forum_link_options', 1);
+ dE('forum_rules_options', -1);
+ dE('forum_cat_options', -1);
+ }
+ else if (value == {FORUM_CAT})
+ {
+ dE('forum_post_options', -1);
+ dE('forum_link_options', -1);
+ dE('forum_rules_options', 1);
+ dE('forum_cat_options', 1);
+ }
+ }
+
+ //-->
+ </script>
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE} :: {FORUM_NAME}</h1>
+
+ <p>{L_FORUM_EDIT_EXPLAIN}</p>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="forumedit" method="post" action="{U_EDIT_ACTION}">
+
+ <fieldset>
+ <legend>{L_FORUM_SETTINGS}</legend>
+ <dl>
+ <dt><label for="forum_type">{L_FORUM_TYPE}:</label></dt>
+ <dd><select id="forum_type" name="forum_type" onchange="display_options(this.options[this.selectedIndex].value);">{S_FORUM_TYPE_OPTIONS}</select></dd>
+ </dl>
+ <!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
+ <div id="type_actions"<!-- IF S_FORUM_POST --> style="display: none;"<!-- ENDIF -->>
+ <dl>
+ <dt><label for="type_action">{L_DECIDE_MOVE_DELETE_CONTENT}:</label></dt>
+ <dd><input type="radio" id="type_action" name="type_action" value="delete" checked="checked" /> {L_DELETE_ALL_POSTS}</dd>
+ <!-- IF S_MOVE_FORUM_OPTIONS --><dd><input type="radio" name="type_action" value="move" /> {L_MOVE_POSTS_TO} <select name="to_forum_id">{S_MOVE_FORUM_OPTIONS}</select></dd><!-- ENDIF -->
+ </dl>
+ </div>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="parent">{L_FORUM_PARENT}:</label></dt>
+ <dd><select id="parent" name="parent_id"><option value="0"<!-- IF not S_PARENT_ID --> selected="selected"<!-- ENDIF -->>{L_NO_PARENT}</option>{S_PARENT_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="forum_name">{L_FORUM_NAME}:</label></dt>
+ <dd><input class="medium" type="text" id="forum_name" name="forum_name" value="{FORUM_NAME}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="forum_desc">{L_FORUM_DESC}:</label><br /><span>{L_FORUM_DESC_EXPLAIN}</span></dt>
+ <dd><textarea id="forum_desc" name="forum_desc" rows="5" cols="45">{FORUM_DESC}</textarea></dd>
+ </dl>
+ <dl>
+ <dt><label for="forum_image">{L_FORUM_IMAGE}:</label><br /><span>{L_FORUM_IMAGE_EXPLAIN}</span></dt>
+ <dd><input class="medium" type="text" id="forum_image" name="forum_image" value="{FORUM_IMAGE}" /></dd>
+ <!-- IF FORUM_IMAGE_SRC -->
+ <dd><img src="{FORUM_IMAGE_SRC}" alt="{L_FORUM_IMAGE}" /></dd>
+ <!-- ENDIF -->
+ </dl>
+ <dl>
+ <dt><label for="forum_style">{L_FORUM_STYLE}:</label></dt>
+ <dd><select id="forum_style" name="forum_style"><option value="0">{L_DEFAULT_STYLE}</option>{S_STYLES_OPTIONS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <div id="forum_cat_options"<!-- IF not S_FORUM_CAT --> style="display: none;"<!-- ENDIF -->>
+ <fieldset>
+ <legend>{L_GENERAL_FORUM_SETTINGS}</legend>
+ <dl>
+ <dt><label for="display_active">{L_DISPLAY_ACTIVE_TOPICS}:</label><br /><span>{L_DISPLAY_ACTIVE_TOPICS_EXPLAIN}</span></dt>
+ <dd><input type="radio" name="display_active" value="1"<!-- IF S_DISPLAY_ACTIVE_TOPICS --> id="display_active" checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" name="display_active" value="0"<!-- IF not S_DISPLAY_ACTIVE_TOPICS --> id="display_active" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
+ </dl>
+ </fieldset>
+ </div>
+
+ <div id="forum_post_options"<!-- IF not S_FORUM_POST --> style="display: none;"<!-- ENDIF -->>
+ <fieldset>
+ <legend>{L_GENERAL_FORUM_SETTINGS}</legend>
+ <dl>
+ <dt><label for="forum_status">{L_FORUM_STATUS}:</label></dt>
+ <dd><select id="forum_status" name="forum_status">{S_STATUS_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="enable_indexing">{L_ENABLE_INDEXING}:</label><br /><span>{L_ENABLE_INDEXING_EXPLAIN}</span></dt>
+ <dd><input type="radio" name="enable_indexing" value="1"<!-- IF S_ENABLE_INDEXING --> id="enable_indexing" checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" name="enable_indexing" value="0"<!-- IF not S_ENABLE_INDEXING --> id="enable_indexing" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="enable_icons">{L_ENABLE_TOPIC_ICONS}:</label></dt>
+ <dd><input type="radio" name="enable_icons" value="1"<!-- IF S_TOPIC_ICONS --> id="enable_icons" checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" name="enable_icons" value="0"<!-- IF not S_TOPIC_ICONS --> id="enable_icons" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
+ </dl>
+ <!-- IF S_SHOW_DISPLAY_ON_INDEX -->
+ <dl>
+ <dt><label for="display_on_index">{L_LIST_INDEX}:</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
+ <dd><input type="radio" name="display_on_index" value="1"<!-- IF S_DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" name="display_on_index" value="0"<!-- IF not S_DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="display_recent">{L_ENABLE_RECENT}:</label><br /><span>{L_ENABLE_RECENT_EXPLAIN}</span></dt>
+ <dd><input type="radio" name="display_recent" value="1"<!-- IF S_DISPLAY_ACTIVE_TOPICS --> id="display_recent" checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" name="display_recent" value="0"<!-- IF not S_DISPLAY_ACTIVE_TOPICS --> id="display_recent" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="enable_prune">{L_FORUM_AUTO_PRUNE}:</label><br /><span>{L_FORUM_AUTO_PRUNE_EXPLAIN}</span></dt>
+ <dd><input type="radio" name="enable_prune" value="1"<!-- IF S_PRUNE_ENABLE --> id="enable_prune" checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" name="enable_prune" value="0"<!-- IF not S_PRUNE_ENABLE --> id="enable_prune" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="prune_freq">{L_AUTO_PRUNE_FREQ}:</label><br /><span>{L_AUTO_PRUNE_FREQ_EXPLAIN}</span></dt>
+ <dd><input type="text" id="prune_freq" name="prune_freq" value="{PRUNE_FREQ}" /> {L_DAYS}</dd>
+ </dl>
+ <dl>
+ <dt><label for="prune_days">{L_AUTO_PRUNE_DAYS}:</label><br /><span>{L_AUTO_PRUNE_DAYS_EXPLAIN}</span></dt>
+ <dd><input type="text" id="prune_days" name="prune_days" value="{PRUNE_DAYS}" /> {L_DAYS}</dd>
+ </dl>
+ <dl>
+ <dt><label for="prune_viewed">{L_AUTO_PRUNE_VIEWED}:</label><br /><span>{L_AUTO_PRUNE_VIEWED_EXPLAIN}</span></dt>
+ <dd><input type="text" id="prune_viewed" name="prune_viewed" value="{PRUNE_VIEWED}" /> {L_DAYS}</dd>
+ </dl>
+ <dl>
+ <dt><label for="prune_old_polls">{L_PRUNE_OLD_POLLS}:</label><br /><span>{L_PRUNE_OLD_POLLS_EXPLAIN}</span></dt>
+ <dd><input type="radio" name="prune_old_polls" value="1"<!-- IF S_PRUNE_OLD_POLLS --> id="prune_old_polls" checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" name="prune_old_polls" value="0"<!-- IF not S_PRUNE_OLD_POLLS --> id="prune_old_polls" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="prune_announce">{L_PRUNE_ANNOUNCEMENTS}:</label></dt>
+ <dd><input type="radio" name="prune_announce" value="1"<!-- IF S_PRUNE_ANNOUNCE --> id="prune_announce" checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" name="prune_announce" value="0"<!-- IF not S_PRUNE_ANNOUNCE --> id="prune_announce" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="prune_sticky">{L_PRUNE_STICKY}:</label></dt>
+ <dd><input type="radio" name="prune_sticky" value="1"<!-- IF S_PRUNE_STICKY --> id="prune_sticky" checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" name="prune_sticky" value="0"<!-- IF not S_PRUNE_STICKY --> id="prune_sticky" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="topics_per_page">{L_FORUM_TOPICS_PAGE}:</label><br /><span>{L_FORUM_TOPICS_PAGE_EXPLAIN}</span></dt>
+ <dd><input type="text" id="topics_per_page" name="topics_per_page" value="{TOPICS_PER_PAGE}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="forum_password">{L_FORUM_PASSWORD}:</label><br /><span>{L_FORUM_PASSWORD_EXPLAIN}</span></dt>
+ <dd><input type="password" id="forum_password" name="forum_password" value="{FORUM_PASSWORD}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="forum_password_confirm">{L_FORUM_PASSWORD_CONFIRM}:</label><br /><span>{L_FORUM_PASSWORD_CONFIRM_EXPLAIN}</span></dt>
+ <dd><input type="password" id="forum_password_confirm" name="forum_password_confirm" value="{FORUM_PASSWORD_CONFIRM}" /></dd>
+ </dl>
+ </fieldset>
+ </div>
+
+ <div id="forum_link_options"<!-- IF not S_FORUM_LINK --> style="display: none;"<!-- ENDIF -->>
+ <fieldset>
+ <legend>{L_GENERAL_FORUM_SETTINGS}</legend>
+ <dl>
+ <dt><label for="forum_link">{L_FORUM_LINK}:</label><br /><span>{L_FORUM_LINK_EXPLAIN}</span></dt>
+ <dd><input class="medium" type="text" id="forum_link" name="forum_link" value="{FORUM_DATA_LINK}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="forum_link_track">{L_FORUM_LINK_TRACK}:</label><br /><span>{L_FORUM_LINK_TRACK_EXPLAIN}</span></dt>
+ <dd><input type="radio" name="forum_link_track" value="1"<!-- IF S_FORUM_LINK_TRACK --> id="forum_link_track" checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" name="forum_link_track" value="0"<!-- IF not S_FORUM_LINK_TRACK --> id="forum_link_track" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
+ </dl>
+ </fieldset>
+ </div>
+
+ <div id="forum_rules_options"<!-- IF S_FORUM_LINK --> style="display: none;"<!-- ENDIF -->>
+ <fieldset>
+ <legend>{L_FORUM_RULES}</legend>
+ <dl>
+ <dt><label for="forum_rules_link">{L_FORUM_RULES_LINK}:</label><br /><span>{L_FORUM_RULES_LINK_EXPLAIN}</span></dt>
+ <dd><input class="medium" type="text" id="forum_rules_link" name="forum_rules_link" value="{FORUM_RULES_LINK}" /></dd>
+ </dl>
+ <!-- IF FORUM_RULES_PREVIEW -->
+ <dl>
+ <dt><label>{L_FORUM_RULES_PREVIEW}:</label></dt>
+ <dd>{FORUM_RULES_PREVIEW}</dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="forum_rules">{L_FORUM_RULES}:</label><br /><span>{L_FORUM_RULES_EXPLAIN}</span></dt>
+ <dd><textarea id="forum_rules" name="forum_rules" rows="4" cols="70">{FORUM_RULES_PLAIN}</textarea></dd>
+ <dd><input type="checkbox" name="parse_bbcode"<!-- IF S_BBCODE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_BBCODE} &nbsp; <input type="checkbox" name="parse_smilies"<!-- IF S_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES} &nbsp; <input type="checkbox" name="parse_urls"<!-- IF S_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS}</dd>
+ </dl>
+ </fieldset>
+ </div>
+
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="update" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSEIF S_DELETE_FORUM -->
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <h1>{L_FORUM_DELETE}</h1>
+
+ <p>{L_FORUM_DELETE_EXPLAIN}</p>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="acp_forum" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_FORUM_DELETE}</legend>
+ <dl>
+ <dt><label>{L_FORUM_NAME}:</label></dt>
+ <dd><b>{FORUM_NAME}</b></dd>
+ </dl>
+ <!-- IF S_FORUM_POST -->
+ <dl>
+ <dt><label for="delete_action">{L_ACTION}:</label></dt>
+ <dd><input type="radio" id="delete_action" name="action_posts" value="delete" checked="checked" /> {L_DELETE_ALL_POSTS}</dd>
+ <!-- IF S_MOVE_FORUM_OPTIONS -->
+ <dd><input type="radio" name="action_posts" value="move" /> {L_MOVE_POSTS_TO} <select name="posts_to_id">{S_MOVE_FORUM_OPTIONS}</select></dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF S_HAS_SUBFORUMS -->
+ <dl>
+ <dt><label for="sub_delete_action">{L_ACTION}:</label></dt>
+ <dd><input type="radio" id="sub_delete_action" name="action_subforums" value="delete" checked="checked" /> {L_DELETE_SUBFORUMS}</dd>
+ <!-- IF S_FORUMS_LIST -->
+ <dd><input type="radio" name="action_subforums" value="move" /> {L_MOVE_SUBFORUMS_TO} <select name="subforums_to_id">{S_FORUMS_LIST}</select></dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_FORUM_ADMIN}</h1>
+
+ <p>{L_FORUM_ADMIN_EXPLAIN}</p>
+
+ <!-- IF ERROR_MSG -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF S_RESYNCED -->
+ <div class="successbox">
+ <h3>{L_NOTIFY}</h3>
+ <p>{L_FORUM_RESYNCED}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <table cellspacing="1">
+ <tbody>
+ <tr>
+ <td class="row3">{NAVIGATION}<!-- IF S_NO_FORUMS --> [<a href="{U_EDIT}">{L_EDIT}</a> | <a href="{U_DELETE}">{L_DELETE}</a><!-- IF not S_LINK --> | <a href="{U_SYNC}">{L_RESYNC}</a><!-- ENDIF --->]<!-- ENDIF --></td>
+ </tr>
+ </tbody>
+ </table>
+
+<!-- IF .forums -->
+ <table cellspacing="1">
+ <col class="row1" /><col class="row1" /><col class="row2" /><col class="row2" />
+ <tbody>
+ <!-- BEGIN forums -->
+ <tr>
+ <td style="width: 5%;">{forums.FOLDER_IMAGE}</td>
+ <td style="width: 50%; vertical-align: top;">
+ <!-- IF forums.S_LINK -->{forums.FORUM_NAME}<!-- ELSE --><a href="{forums.U_FORUM}">{forums.FORUM_NAME}</a><!-- ENDIF -->
+ <!-- IF forums.FORUM_DESCRIPTION --><br /><span>{forums.FORUM_DESCRIPTION}</span><!-- ENDIF -->
+ <!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}: <b>{forums.FORUM_TOPICS}</b> / {L_POSTS}: <b>{forums.FORUM_POSTS}</b></span><!-- ENDIF -->
+ </td>
+ <td style="width: 15%; white-space: nowrap; text-align: center; vertical-align: middle;"><a href="{forums.U_MOVE_UP}">{L_MOVE_UP}</a><br /><a href="{forums.U_MOVE_DOWN}">{L_MOVE_DOWN}</a></td>
+ <td style="width: 20%; white-space: nowrap; text-align: center; vertical-align: middle;">&nbsp;
+ <a href="{forums.U_EDIT}">{L_EDIT}</a> | <a href="{forums.U_DELETE}">{L_DELETE}</a>
+ <!-- IF not forums.S_LINK --> | <a href="{forums.U_SYNC}">{L_RESYNC}</a><!-- ENDIF -->
+ &nbsp;</td>
+ </tr>
+ <!-- END forums -->
+ </tbody>
+ </table>
+<!-- ENDIF -->
+
+ <form id="forums" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick" style="float: left;">
+ <input type="hidden" name="action" value="add" />
+
+ <input type="text" name="forum_name" />
+ <input class="button2" name="addforum" type="submit" value="{L_CREATE_FORUM}" />
+ </fieldset>
+
+ </form>
+
+ <form id="fselect" method="post" action="{U_SEL_ACTION}">
+
+ <fieldset class="quick">
+ {L_SELECT_FORUM}: <select name="parent_id" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{FORUM_BOX}</select>
+
+ <input class="button2" type="submit" value="{L_GO}" />
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT -->
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <h1>{L_ACP_GROUPS_MANAGE}</h1>
+
+ <p>{L_GROUP_EDIT_EXPLAIN}</p>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="settings" method="post" action="{U_ACTION}"<!-- IF S_CAN_UPLOAD --> enctype="multipart/form-data"<!-- ENDIF -->>
+
+ <fieldset>
+ <legend>{L_GROUP_DETAILS}</legend>
+ <dl>
+ <dt><label<!-- IF not S_SPECIAL_GROUP --> for="group_name"<!-- ENDIF -->>{L_GROUP_NAME}:</label></dt>
+ <dd><!-- IF S_SPECIAL_GROUP --><b>{GROUP_NAME}</b><!-- ELSE --><input name="group_name" type="text" id="group_name" value="{GROUP_NAME}" /><!-- ENDIF --></dd>
+ </dl>
+ <dl>
+ <dt><label for="group_description">{L_GROUP_DESC}:</label></dt>
+ <dd><input name="group_description" type="text" id="group_description" value="{GROUP_DESCRIPTION}" /></dd>
+ </dl>
+ <!-- IF not S_SPECIAL_GROUP -->
+ <dl>
+ <dt><label for="group_type">{L_GROUP_TYPE}:</label><br /><span>{L_GROUP_TYPE_EXPLAIN}</span></dt>
+ <dd>
+ <input name="group_type" type="radio" id="group_type" value="{GROUP_TYPE_FREE}"{GROUP_FREE} /> {L_GROUP_OPEN} &nbsp;
+ <input name="group_type" type="radio" value="{GROUP_TYPE_OPEN}"{GROUP_OPEN} /> {L_GROUP_REQUEST} &nbsp;
+ <input name="group_type" type="radio" value="{GROUP_TYPE_CLOSE}"{GROUP_CLOSED} /> {L_GROUP_CLOSED} &nbsp;
+ <input name="group_type" type="radio" value="{GROUP_TYPE_HIDDEN}"{GROUP_HIDDEN} /> {L_GROUP_HIDDEN}
+ </dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_GROUP_SETTINGS_SAVE}</legend>
+ <dl>
+ <dt><label for="group_receive_pm">{L_GROUP_RECEIVE_PM}:</label></dt>
+ <dd><input name="group_receive_pm" type="checkbox" id="group_receive_pm"{GROUP_RECEIVE_PM} /></dd>
+ </dl>
+ <dl>
+ <dt><label for="group_message_limit">{L_GROUP_MESSAGE_LIMIT}:</label><br /><span>{L_GROUP_MESSAGE_LIMIT_EXPLAIN}</span></dt>
+ <dd><input name="group_message_limit" type="text" id="group_message_limit" maxlength="4" size="4" value="{GROUP_MESSAGE_LIMIT}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="group_colour">{L_GROUP_COLOR}:</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></dt>
+ <dd><input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" />&nbsp;&nbsp;<span>[ <a href="#" onclick="swatch(); return false">{L_COLOUR_SWATCH}</a> ]</span></dd>
+ </dl>
+ <dl>
+ <dt><label for="group_rank">{L_GROUP_RANK}:</label></dt>
+ <dd><select name="group_rank" id="group_rank">{S_RANK_OPTIONS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_GROUP_AVATAR}</legend>
+ <dl>
+ <dt><label>{L_CURRENT_IMAGE}:</label><br /><span>{L_AVATAR_EXPLAIN}</span></dt>
+ <dd>{AVATAR_IMAGE}</dd>
+ <dd><input type="checkbox" name="delete" />&nbsp;<span>{L_DELETE_AVATAR}</span></dd>
+ </dl>
+ <!-- IF not S_IN_AVATAR_GALLERY -->
+ <!-- IF S_CAN_UPLOAD -->
+ <dl>
+ <dt><label for="uploadfile">{L_UPLOAD_AVATAR_FILE}:</label></dt>
+ <dd><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_MAX_FILESIZE}" /><input type="file" id="uploadfile" name="uploadfile" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="uploadurl">{L_UPLOAD_AVATAR_URL}:</label><br /><span>{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></dt>
+ <dd><input name="uploadurl" type="text" id="uploadurl" value="" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="remotelink">{L_LINK_REMOTE_AVATAR}:</label><br /><span>{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></dt>
+ <dd><input name="remotelink" type="text" id="remotelink" value="" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="width">{L_LINK_REMOTE_SIZE}:</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></dt>
+ <dd><input name="width" type="text" id="width" size="3" value="{GROUP_AVATAR_WIDTH}" /> <span>px X </span> <input type="text" name="height" size="3" value="{GROUP_AVATAR_HEIGHT}" /> <span>px</span></dd>
+ </dl>
+ <!-- IF S_DISPLAY_GALLERY -->
+ <dl>
+ <dt><label>{L_AVATAR_GALLERY}:</label></dt>
+ <dd><input class="button2" type="submit" name="display_gallery" value="{L_DISPLAY_GALLERY}" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- ELSE -->
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_AVATAR_GALLERY}</legend>
+ <dl>
+ <dt><label for="category">{L_AVATAR_CATEGORY}:</label></dt>
+ <dd><select name="category" id="category">{S_CAT_OPTIONS}</select>&nbsp;<input class="button2" type="submit" value="{L_GO}" name="display_gallery" /></dd>
+ </dl>
+ <dl>
+ <table cellspacing="1">
+ <!-- BEGIN avatar_row -->
+ <tr>
+ <!-- BEGIN avatar_column -->
+ <td class="row1" style="text-align: center;"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" alt="{avatar_row.avatar_column.AVATAR_NAME}" title="{avatar_row.avatar_column.AVATAR_NAME}" /></td>
+ <!-- END avatar_column -->
+ </tr>
+ <tr>
+ <!-- BEGIN avatar_option_column -->
+ <td class="row2" style="text-align: center;"><input type="radio" name="avatar_select" value="{avatar_row.avatar_option_column.S_OPTIONS_AVATAR}" /></td>
+ <!-- END avatar_option_column -->
+ </tr>
+ <!-- END avatar_row -->
+ </table>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick" style="margin-top: -15px;">
+ <input class="button2" type="submit" name="cancel" value="{L_CANCEL}" />
+ </fieldset>
+
+ <!-- ENDIF -->
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="update" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSEIF S_LIST -->
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <h1>{L_GROUP_MEMBERS}</h1>
+
+ <p>{L_GROUP_MEMBERS_EXPLAIN}</p>
+
+ <form id="list" method="post" action="{U_ACTION}">
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_USERNAME}</th>
+ <th>{L_GROUP_DEFAULT}</th>
+ <th>{L_JOINED}</th>
+ <th>{L_POSTS}</th>
+ <th>{L_MARK}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- IF not S_GROUP_SPECIAL -->
+ <tr>
+ <td class="row3" colspan="5"><b>{L_GROUP_LEAD}</b></td>
+ </tr>
+ <!-- BEGIN leader -->
+ <!-- IF leader.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td><a href="{leader.U_USER_EDIT}">{leader.USERNAME}</a></td>
+ <td style="text-align: center;"><!-- IF leader.S_GROUP_DEFAULT -->{L_YES}<!-- ELSE -->{L_NO}<!-- ENDIF --></td>
+ <td style="text-align: center;">{leader.JOINED}</td>
+ <td style="text-align: center;">{leader.USER_POSTS}</td>
+ <td style="text-align: center;"><input type="checkbox" name="mark[]" value="{leader.USER_ID}" /></td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="5" style="text-align: center;">{L_GROUPS_NO_MODS}</td>
+ </tr>
+ <!-- END leader -->
+ <!-- ENDIF -->
+ <tr>
+ <td class="row3" colspan="5"><b>{L_GROUP_APPROVED}</b></td>
+ </tr>
+ <!-- BEGIN member -->
+ <!-- IF member.S_PENDING -->
+ <tr>
+ <td class="row3" colspan="5"><b>{L_GROUP_PENDING}</b></td>
+ </tr>
+ <!-- ELSE -->
+ <!-- IF member.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td><a href="{member.U_USER_EDIT}">{member.USERNAME}</a></td>
+ <td style="text-align: center;"><!-- IF member.S_GROUP_DEFAULT -->{L_YES}<!-- ELSE -->{L_NO}<!-- ENDIF --></td>
+ <td style="text-align: center;">{member.JOINED}</td>
+ <td style="text-align: center;">{member.USER_POSTS}</td>
+ <td style="text-align: center;"><input type="checkbox" name="mark[]" value="{member.USER_ID}" /></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="5" style="text-align: center;">{L_GROUPS_NO_MEMBERS}</td>
+ </tr>
+ <!-- END member -->
+ </tbody>
+ </table>
+
+ <div class="pagination" style="float: left;">
+ <!-- IF PAGINATION -->
+ <a href="javascript:jumpto();" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
+ <!-- ELSE -->
+ {S_ON_PAGE}
+ <!-- ENDIF -->
+ </div>
+
+ <fieldset class="quick">
+ <span class="small"><a href="javascript:marklist('list', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('list', false);">{L_UNMARK_ALL}</a></span><br />
+
+ <select name="action"><option class="sep" value="">{L_SELECT_OPTION}</option>{S_ACTION_OPTIONS}</select>
+ <input class="button2" type="submit" name="update" value="{L_SUBMIT}" />
+ </fieldset>
+
+ <h1>{L_ADD_USERS}</h1>
+
+ <p>{L_ADD_USERS_EXPLAIN}</p>
+
+ <fieldset>
+ <legend>{L_ADD_USERS}</legend>
+ <dl>
+ <dt><label for="leader">{L_USER_GROUP_LEADER}:</label></dt>
+ <dd><input name="leader" type="radio" value="1" /> {L_YES} &nbsp; <input name="leader" type="radio" id="leader" value="0" checked="checked" /> {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="default">{L_USER_GROUP_DEFAULT}:</label><br /><span>{L_USER_GROUP_DEFAULT_EXPLAIN}</span></dt>
+ <dd><input name="default" type="radio" value="1" /> {L_YES} &nbsp; <input name="default" type="radio" id="default" value="0" checked="checked" /> {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="usernames">{L_USERNAME}:</label><br /><span>{L_USERNAMES_EXPLAIN}</span></dt>
+ <dd><textarea id="usernames" name="usernames" cols="40" rows="5"></textarea></dd>
+ <dd>[ <a href="{U_FIND_USERNAME}" target="usersearch">{L_FIND_USERNAME}</a> ]</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ <input class="button2" type="submit" name="addusers" value="{L_SUBMIT}" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_ACP_GROUPS_MANAGE}</h1>
+
+ <p>{L_ACP_GROUPS_MANAGE_EXPLAIN}</p>
+
+ <h1>{L_USER_DEF_GROUPS}</h1>
+
+ <p>{L_USER_DEF_GROUPS_EXPLAIN}</p>
+
+ <form id="acp_groups" method="post" action="{U_ACTION}">
+
+ <table cellspacing="1">
+ <col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
+ <thead>
+ <tr>
+ <th style="width: 50%">{L_MANAGE}</th>
+ <th>{L_TOTAL_MEMBERS}</th>
+ <th colspan="3">{L_OPTIONS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN groups -->
+ <!-- IF groups.S_SPECIAL -->
+ </tbody>
+ </table>
+
+ <fieldset class="quick">
+ {L_CREATE_GROUP}: <input type="text" name="group_name" value="" /> <input class="button2" type="submit" name="add" value="{L_SUBMIT}" />
+ </fieldset>
+
+ <h1>{L_SPECIAL_GROUPS}</h1>
+
+ <p>{L_SPECIAL_GROUPS_EXPLAIN}</p>
+
+ <table cellspacing="1">
+ <col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
+ <thead>
+ <tr>
+ <th style="width: 50%">{L_MANAGE}</th>
+ <th>{L_TOTAL_MEMBERS}</th>
+ <th colspan="3">{L_OPTIONS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- ELSE -->
+ <tr>
+ <td><a href="{groups.U_LIST}">{groups.GROUP_NAME}</a></td>
+ <td style="text-align: center;">{groups.TOTAL_MEMBERS}</td>
+ <td style="text-align: center;"><a href="{groups.U_DEFAULT}">{L_GROUP_DEFAULT}</a></td>
+ <td style="text-align: center;"><a href="{groups.U_EDIT}">{L_EDIT}</a></td>
+ <td style="text-align: center;"><!-- IF not groups.S_GROUP_SPECIAL --><a href="{groups.U_DELETE}">{L_DELETE}</a><!-- ELSE -->{L_DELETE}<!-- ENDIF --></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- END groups -->
+ </tbody>
+ </table>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT -->
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_EXPLAIN}</p>
+
+ <form id="acp_icons" method="post" action="{U_ACTION}">
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th colspan="{COLSPAN}">{L_CONFIG}</th>
+ </tr>
+ <tr class="row3">
+ <td>{L_URL}</td>
+ <td>{L_LOCATION}</td>
+ <!-- IF S_SMILIES -->
+ <td>{L_SMILIES_CODE}</td>
+ <td>{L_SMILIES_EMOTION}</td>
+ <!-- ENDIF -->
+ <td>{L_WIDTH}</td>
+ <td>{L_HEIGHT}</td>
+ <td>{L_DISPLAY_ON_POSTING}</td>
+ <!-- IF ID or S_ADD -->
+ <td>{L_ORDER}</td>
+ <!-- ENDIF -->
+ <!-- IF S_ADD -->
+ <td>{L_ADD}</td>
+ <!-- ENDIF -->
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN items -->
+ <!-- IF items.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td style="text-align: center;"><img src="{items.IMG_SRC}" alt="" title="" /><input type="hidden" name="image[{items.IMG}]" value="1" /></td>
+ <td style="vertical-align: top;">[{items.IMG}]</td>
+ <!-- IF S_SMILIES -->
+ <td><input class="post" type="text" name="code[{items.IMG}]" value="{items.CODE}" size="10" /></td>
+ <td><input class="post" type="text" name="emotion[{items.IMG}]" value="{items.EMOTION}" size="10" /></td>
+ <!-- ENDIF -->
+ <td><input class="post" type="text" size="3" name="width[{items.IMG}]" value="{items.WIDTH}" /></td>
+ <td><input class="post" type="text" size="3" name="height[{items.IMG}]" value="{items.HEIGHT}" /></td>
+ <td>
+ <input type="checkbox" name="display_on_posting[{items.IMG}]"{items.POSTING_CHECKED} />
+ <!-- IF items.S_ID -->
+ <input type="hidden" name="id[{items.IMG}]" value="{items.ID}" />
+ <!-- ENDIF -->
+ </td>
+ <!-- IF ID or S_ADD -->
+ <td><select name="order[{items.IMG}]">{S_ORDER_LIST}</select></td>
+ <!-- ENDIF -->
+ <!-- IF S_ADD -->
+ <td><input type="checkbox" name="add_img[{items.IMG}]" value="1" /></td>
+ <!-- ENDIF -->
+ </tr>
+ <!-- END items -->
+ </tbody>
+ </table>
+
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSEIF S_CHOOSE_PAK -->
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_EXPLAIN}</p>
+
+ <form id="acp_icons" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_IMPORT}</legend>
+
+ <!-- IF not S_PAK_OPTIONS -->
+ <p>{L_NO_PAK_OPTIONS}</p>
+ </fieldset>
+
+ <!-- ELSE -->
+ <dl>
+ <dt><label for="pak">{L_SELECT_PACKAGE}</label></dt>
+ <dd><select id="pak" name="pak">{S_PAK_OPTIONS}</select></dd>
+ </dl>
+ <dt><label for="current">{L_CURRENT}</label><br /><span>{L_CURRENT_EXPLAIN}</span></dt>
+ <dd><input type="radio" id="current" name="current" value="keep" checked="checked" /> {L_KEEP_ALL}&nbsp; &nbsp;<input type="radio" name="current" value="replace" /> {L_REPLACE_MATCHES}&nbsp; &nbsp;<input type="radio" name="current" value="delete" /> {L_DELETE_ALL}&nbsp;</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" id="import" name="import" value="{L_IMPORT_SUBMIT}" />
+ </fieldset>
+ <!-- ENDIF -->
+
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_EXPLAIN}</p>
+
+ <!-- IF NOTICE -->
+ <div class="successbox">
+ <h3>{L_NOTIFY}</h3>
+ <p>{NOTICE}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <div style="text-align: right;"><a href="{U_IMPORT}">{L_IMPORT}</a> | <a href="{U_EXPORT}">{L_EXPORT}</a></div>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_TITLE}</th>
+ <!-- IF S_SMILIES -->
+ <th>{L_CODE}</th>
+ <th>{L_EMOTION}</th>
+ <!-- ENDIF -->
+ <th>{L_ACTION}</th>
+ <th>{L_REORDER}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN items -->
+ <!-- IF items.S_SPACER -->
+ <tr>
+ <td class="row3" colspan="{COLSPAN}" style="text-align: center;">{L_NOT_DISPLAYED}</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF items.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="text-align: center;"><img src="{items.IMG_SRC}" width="{items.WIDTH}" height="{items.HEIGHT}" alt="{items.ALT_TEXT}" title="{items.ALT_TEXT}" /></td>
+ <!-- IF S_SMILIES -->
+ <td style="text-align: center;">{items.CODE}</td>
+ <td style="text-align: center;">{items.EMOTION}</td>
+ <!-- ENDIF -->
+ <td style="text-align: center;"><a href="{items.U_EDIT}">{L_EDIT}</a> | <a href="{items.U_DELETE}">{L_DELETE}</a></td>
+ <td style="text-align: center;"><a href="{items.U_MOVE_UP}">{L_MOVE_UP}</a> <br /> <a href="{items.MOVE_DOWN}">{L_MOVE_DOWN}</a></td>
+ </tr>
+ <!-- END items -->
+ </tbody>
+ </table>
+
+ <form id="acp_icons" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick">
+ <input class="button2" name="add" type="submit" value="{L_ICON_ADD}" />&nbsp; &nbsp;<input class="button2" type="submit" name="edit" value="{L_ICON_EDIT}" />
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_ACP_JABBER_SETTINGS}</h1>
+
+<p>{L_ACP_JABBER_SETTINGS_EXPLAIN}</p>
+
+<!-- IF S_WARNING -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{WARNING_MSG}</p>
+ </div>
+<!-- ENDIF -->
+
+<form id="acp_jabber" method="post" action="{U_ACTION}">
+
+<fieldset>
+ <legend>{L_ACP_JABBER_SETTINGS}</legend>
+ <dl>
+ <dt><label for="jab_enable">{L_JAB_ENABLE}:</label><br /><span>{L_JAB_ENABLE_EXPLAIN}</span></dt>
+ <dd><input type="radio" id="jab_enable" name="jab_enable" value="1"<!-- IF JAB_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_ENABLED}&nbsp; &nbsp;<input type="radio" name="jab_enable" value="0"<!-- IF not JAB_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_DISABLED}</dd>
+ </dl>
+ <dl>
+ <dt><label for="jab_host">{L_JAB_SERVER}:</label><br /><span>{L_JAB_SERVER_EXPLAIN}</span></dt>
+ <dd><input type="text" id="jab_host" name="jab_host" value="{JAB_HOST}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="jab_port">{L_JAB_PORT}:</label><br /><span>{L_JAB_PORT_EXPLAIN}</span></dt>
+ <dd><input type="text" id="jab_port" name="jab_port" value="{JAB_PORT}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="jab_username">{L_JAB_USERNAME}:</label><br /><span>{L_JAB_USERNAME_EXPLAIN}</span></dt>
+ <dd><input type="text" id="jab_username" name="jab_username" value="{JAB_USERNAME}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="jab_password">{L_JAB_PASSWORD}:</label></dt>
+ <dd><input type="text" id="jab_password" name="jab_password" value="{JAB_PASSWORD}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="jab_resource">{L_JAB_RESOURCE}:</label><br /><span>{L_JAB_RESOURCE_EXPLAIN}</span></dt>
+ <dd><input type="text" id="jab_resource" name="jab_resource" value="{JAB_RESOURCE}" /></dd>
+ </dl>
+</fieldset>
+
+<fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+</fieldset>
+
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_SELECT_METHOD -->
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <h1>{L_SELECT_DOWNLOAD_FORMAT}</h1>
+
+ <form id="selectmethod" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_DOWNLOAD_AS}</legend>
+ <dl>
+ <dt><label for="use_method">{L_DOWNLOAD_AS}:</label></dt>
+ <dd>{RADIO_BUTTONS}</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ <input type="submit" class="button2" value="{L_DOWNLOAD}" name="download" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSEIF S_DETAILS -->
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <h1>{L_LANGUAGE_PACK_DETAILS}</h1>
+
+ <form id="details" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{LANG_LOCAL_NAME}</legend>
+ <dl>
+ <dt><label for="lang_english_name">{L_LANG_ENGLISH_NAME}:</label></dt>
+ <dd><input type="text" id="lang_english_name" name="lang_english_name" value="{LANG_ENGLISH_NAME}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="lang_local_name">{L_LANG_LOCAL_NAME}:</label></dt>
+ <dd><input type="text" id="lang_local_name" name="lang_local_name" value="{LANG_LOCAL_NAME}" /></dd>
+ </dl>
+ <dl>
+ <dt><label>{L_LANG_ISO_CODE}:</label></dt>
+ <dd><b>{LANG_ISO}</b></dd>
+ </dl>
+ <dl>
+ <dt><label for="lang_author">{L_LANG_AUTHOR}:</label></dt>
+ <dd><input type="text" id="lang_author" name="lang_author" value="{LANG_AUTHOR}" /></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick" style="margin-top: -15px;">
+ <input type="submit" name="update_details" class="button2" value="{L_SUBMIT}" />
+ </fieldset>
+
+ </form>
+
+ <br /><br />
+
+ <!-- IF S_MISSING_FILES -->
+ <div class="errorbox">
+ <h3>{L_MISSING_FILES}</h3>
+ <p>{MISSING_FILES}</p>
+ </div>
+ <br /><br />
+ <!-- ENDIF -->
+
+ <!-- IF S_MISSING_VARS -->
+ <h1>{L_MISSING_LANG_VARIABLES}</h1>
+
+ <p>{L_MISSING_VARS_EXPLAIN}</p>
+
+ <form id="missing" method="post" action="{U_MISSING_ACTION}">
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_LANGUAGE_KEY}</th>
+ <th>{L_LANGUAGE_VARIABLE}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN missing -->
+ <tr class="row4">
+ <td><b>{missing.FILE}</b></td>
+ <td style="text-align: right;"><input type="submit" name="missing_file[{missing.KEY}]" value="{L_SELECT}" class="button2" /></td>
+ </tr>
+ {missing.TPL}
+ <!-- END missing -->
+ </tbody>
+ </table>
+
+ </form>
+
+ <br /><br />
+ <!-- ENDIF -->
+
+ <a name="entries"></a>
+
+ <h1>{L_LANGUAGE_ENTRIES}</h1>
+
+ <p>{L_LANGUAGE_ENTRIES_EXPLAIN}</p>
+
+ <form id="entries" method="post" action="{U_ENTRY_ACTION}">
+
+ <!-- IF S_FROM_STORE -->
+ <fieldset class="quick" style="float: left;">
+ <input type="submit" name="remove_store" value="{L_REMOVE_FROM_STORAGE_FOLDER}" class="button2" />
+ </fieldset>
+ <!-- ENDIF -->
+
+ <fieldset class="quick" style="float: right;">
+ <select name="language_file">{S_LANG_OPTIONS}</select>&nbsp;<input type="submit" class="button2" name="change" value="{L_SELECT}" />
+ </fieldset>
+
+ <br /><br />
+
+ <table cellspacing="1">
+ <thead>
+ <!-- IF S_EMAIL_FILE -->
+ <tr>
+ <th colspan="2">{L_FILE_CONTENTS}</th>
+ </tr>
+ <!-- ELSE -->
+ <tr>
+ <th>{L_LANGUAGE_KEY}</th>
+ <th>{L_LANGUAGE_VARIABLE}</th>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td class="row3"><b>{PRINT_MESSAGE}<!-- IF S_FROM_STORE --><br /><span style="color: red;">{L_FILE_FROM_STORAGE}</span><!-- ENDIF --></b></td>
+ <td class="row3" style="text-align: right;"><input type="submit" name="download_file" class="button2" value="{L_SUBMIT_AND_DOWNLOAD}" />&nbsp;&nbsp;<input type="submit" name="submit_file" class="button2" value="{L_SUBMIT}" /></td>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- IF S_EMAIL_FILE -->
+ <tr>
+ <td class="row2" colspan="2" style="text-align: center;"><textarea name="entry" id="entry" cols="80" rows="20" style="width: 90%">{LANG}</textarea></td>
+ </tr>
+ <!-- ELSE -->
+ {TPL}
+ <!-- ENDIF -->
+ <tr>
+ <td class="row3" colspan="3" style="text-align: right;"><input type="submit" name="download_file" class="button2" value="{L_SUBMIT_AND_DOWNLOAD}" />&nbsp;&nbsp;<input type="submit" name="submit_file" class="button2" value="{L_SUBMIT}" /></td>
+ </tr>
+ </tbody>
+ </table>
+
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_ACP_LANGUAGE_PACKS}</h1>
+
+ <p>{L_ACP_LANGUAGE_PACKS_EXPLAIN}</p>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_LANGUAGE_PACK_NAME}</th>
+ <th>{L_LANGUAGE_PACK_LOCALNAME}</th>
+ <th>{L_LANGUAGE_PACK_ISO}</th>
+ <th>{L_LANGUAGE_PACK_USED_BY}</th>
+ <th>{L_OPTIONS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="row3" colspan="5"><b>{L_INSTALLED_LANGUAGE_PACKS}</b></td>
+ </tr>
+ <!-- BEGIN lang -->
+ <!-- IF lang.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td><a href="{lang.U_DETAILS}">{lang.ENGLISH_NAME}</a> {lang.TAG}</td>
+ <td>{lang.LOCAL_NAME}</td>
+ <td style="text-align: center;"><b>{lang.ISO}</b></td>
+ <td style="text-align: center;">{lang.USED_BY}</td>
+ <td style="text-align: center;">&nbsp;<a href="{lang.U_DOWNLOAD}">{L_DOWNLOAD}</a>&nbsp;|&nbsp;<a href="{lang.U_DELETE}">{L_DELETE}</a></td>
+ </tr>
+ <!-- END lang -->
+ <!-- IF .notinst -->
+ <tr>
+ <td class="row3" colspan="5"><b>{L_UNINSTALLED_LANGUAGE_PACKS}</b></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- BEGIN notinst -->
+ <!-- IF notinst.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td>{notinst.NAME}</td>
+ <td>{notinst.LOCAL_NAME}</td>
+ <td style="text-align: center;"><b>{notinst.ISO}</b></td>
+ <td colspan="2" style="text-align: center;"><a href="{notinst.U_INSTALL}">{L_INSTALL}</a></td>
+ </tr>
+ <!-- END notinst -->
+ </tbody>
+ </table>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_TITLE}</h1>
+
+<p>{L_EXPLAIN}</p>
+
+<form id="list" method="post" action="{U_ACTION}">
+
+<fieldset class="quick" style="float: left;">
+ {L_DISPLAY_LOG}: &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}
+ <input class="button2" type="submit" value="{L_GO}" name="sort" />
+</fieldset>
+
+<div class="clearfix"></div>
+
+<!-- IF PAGINATION -->
+<div class="pagination">
+ <!-- IF PAGINATION -->
+ <a href="javascript:jumpto();" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
+ <!-- ELSE -->
+ {S_ON_PAGE}
+ <!-- ENDIF -->
+</div>
+<!-- ENDIF -->
+
+<!-- IF .log -->
+<table cellspacing="1">
+<thead>
+<tr>
+ <th>{L_USERNAME}</th>
+ <th>{L_IP}</th>
+ <th>{L_TIME}</th>
+ <th>{L_ACTION}</th>
+ <th>{L_MARK}</th>
+</tr>
+</thead>
+<tbody>
+<!-- BEGIN log -->
+ <!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td>{log.USERNAME}</td>
+ <td style="text-align: center;">{log.IP}</td>
+ <td style="text-align: center;">{log.DATE}</td>
+ <td>{log.ACTION}</td>
+ <td style="text-align: center;"><input type="checkbox" name="mark[]" value="{log.ID}" /></td>
+ </tr>
+<!-- END log -->
+</tbody>
+</table>
+<!-- ELSE -->
+ <div class="errorbox">
+ <p>{L_NO_ENTRIES}</p>
+ </div>
+<!-- ENDIF -->
+
+<!-- IF S_SHOW_FORUMS -->
+<fieldset class="quick" style="float: left;">
+ {L_SELECT_FORUM}: <select name="f" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{S_FORUM_BOX}</select>
+ <input class="button2" type="submit" value="{L_GO}" />
+</fieldset>
+<!-- ENDIF -->
+
+<!-- IF S_CLEARLOGS -->
+ <fieldset class="quick">
+ <b class="small"><a href="#" onclick="marklist('list', true);">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('list', false);">{L_UNMARK_ALL}</a></b><br />
+ <input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />&nbsp;
+ <input class="button2" type="submit" name="delall" value="{L_DELETE_ALL}" />&nbsp;
+ </fieldset>
+<!-- ENDIF -->
+
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<script type="text/javascript">
+<!--
+ function marklist(status)
+ {
+ for (i = 0; i < document.inactive.length; i++)
+ {
+ document.inactive.elements[i].checked = status;
+ }
+ }
+//-->
+</script>
+
+<a name="maincontent"></a><h1>{L_WELCOME_PHPBB}</h1>
+
+<p>{L_ADMIN_INTRO}</p>
+
+<table cellspacing="1">
+ <caption>{L_FORUM_STATS}</caption>
+ <col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
+ <thead>
+ <tr>
+ <th>{L_STATISTIC}</th>
+ <th>{L_VALUE}</th>
+ <th>{L_STATISTIC}</th>
+ <th>{L_VALUE}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{L_NUMBER_POSTS}: </td>
+ <td><b>{TOTAL_POSTS}</b></td>
+ <td>{L_POSTS_PER_DAY}: </td>
+ <td><b>{POSTS_PER_DAY}</b></td>
+ </tr>
+ <tr>
+ <td>{L_NUMBER_TOPICS}: </td>
+ <td><b>{TOTAL_TOPICS}</b></td>
+ <td>{L_TOPICS_PER_DAY}: </td>
+ <td><b>{TOPICS_PER_DAY}</b></td>
+ </tr>
+ <tr>
+ <td>{L_NUMBER_USERS}: </td>
+ <td><b>{TOTAL_USERS}</b></td>
+ <td>{L_USERS_PER_DAY}: </td>
+ <td><b>{USERS_PER_DAY}</b></td>
+ </tr>
+ <tr>
+ <td>{L_NUMBER_FILES}: </td>
+ <td><b>{TOTAL_FILES}</b></td>
+ <td>{L_FILES_PER_DAY}: </td>
+ <td><b>{FILES_PER_DAY}</b></td>
+ </tr>
+ <tr>
+ <td>{L_BOARD_STARTED}: </td>
+ <td><b>{START_DATE}</b></td>
+ <td>{L_AVATAR_DIR_SIZE}: </td>
+ <td><b>{AVATAR_DIR_SIZE}</b></td>
+ </tr>
+ <tr>
+ <td>{L_DATABASE_SIZE}: </td>
+ <td><b>{DBSIZE}</b></td>
+ <td>{L_UPLOAD_DIR_SIZE}: </td>
+ <td><b>{UPLOAD_DIR_SIZE}</b></td>
+ </tr>
+ <tr>
+ <td>{L_GZIP_COMPRESSION}: </td>
+ <td><b>{GZIP_COMPRESSION}</b></td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ </tbody>
+</table>
+
+<form id="stats" method="post" action="{U_ACTION}">
+<fieldset class="quick">
+ <select name="action">{S_ACTION_OPTIONS}</select>
+
+ <input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
+</fieldset>
+</form>
+
+
+<h2>{L_ADMIN_LOG}</h2>
+
+<p>{L_ADMIN_LOG_INDEX_EXPLAIN}</p>
+
+<table cellspacing="1">
+<thead>
+<tr>
+ <th>{L_USERNAME}</th>
+ <th>{L_IP}</th>
+ <th>{L_TIME}</th>
+ <th>{L_ACTION}</th>
+</tr>
+</thead>
+<tbody>
+<!-- BEGIN log -->
+ <!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td>{log.USERNAME}</td>
+ <td style="text-align: center;">{log.IP}</td>
+ <td style="text-align: center;">{log.DATE}</td>
+ <td>{log.ACTION}</td>
+ </tr>
+<!-- END log -->
+</tbody>
+</table>
+
+<!-- IF S_INACTIVE_USERS -->
+ <h2>{L_INACTIVE_USERS}</h2>
+
+ <p>{L_INACTIVE_USERS_EXPLAIN}</p>
+
+ <form id="inactive" method="post" action="{U_ACTION}">
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_USERNAME}</th>
+ <th>{L_JOINED}</th>
+ <th>{L_MARK}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN inactive -->
+ <!-- IF inactive.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td><a href="{inactive.U_USER_ADMIN}">{inactive.USERNAME}</a></td>
+ <td>{inactive.DATE}</td>
+ <td>&nbsp;<input type="checkbox" name="mark[]" value="{inactive.USER_ID}" />&nbsp;</td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td colspan="3" style="text-align: center;">{L_NO_INACTIVE_USERS}</td>
+ </tr>
+ <!-- END inactive -->
+ </tbody>
+ </table>
+
+ <!-- IF .inactive -->
+ <fieldset class="quick">
+ <p><a href="javascript:marklist(true);">Mark all</a> &bull; <a href="javascript:marklist(false);">Unmark all</a></p>
+ <select name="action">{S_INACTIVE_OPTIONS}</select>
+
+ <input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
+ </fieldset>
+ <!-- ENDIF -->
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT_MODULE -->
+
+ <script type="text/javascript">
+ <!--
+
+ function display_options(value)
+ {
+ if (value == 'category')
+ {
+ dE('modoptions', -1);
+ }
+ else
+ {
+ dE('modoptions', 1);
+ }
+ }
+
+ function display_modes(value)
+ {
+ // Remove select fields
+ var item = document.getElementById('module_mode');
+ var j = 0;
+
+ // empty existing items
+ for (var i = 0; i <= item.options.length; i++)
+ {
+ item.options[i] = null;
+ }
+
+<!-- BEGIN m_names -->
+
+ if (value == '{m_names.NAME}')
+ {
+ <!-- BEGIN modes -->
+ item.options[j] = new Option('{m_names.modes.VALUE}');
+ item.options[j].value = '{m_names.modes.OPTION}';
+ j++;
+ <!-- END modes -->
+ }
+<!-- END m_names -->
+
+ // select first item
+ item.options[0].selected = true;
+ }
+
+ //-->
+ </script>
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE} :: {MODULENAME}</h1>
+
+ <p>{L_EDIT_MODULE_EXPLAIN}</p>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="moduleedit" method="post" action="{U_EDIT_ACTION}">
+
+ <fieldset>
+ <legend>{L_GENERAL_OPTIONS}</legend>
+ <dl>
+ <dt><label for="module_langname">{L_MODULE_LANGNAME}:</label><br />
+ <span>{L_MODULE_LANGNAME_EXPLAIN}</span></dt>
+ <dd><input name="module_langname" type="text" id="module_langname" value="{MODULE_LANGNAME}" class="medium" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="module_type">{L_MODULE_TYPE}:</label></dt>
+ <dd><select name="module_type" id="module_type" onchange="display_options(this.value);"><option value="category"<!-- IF S_IS_CAT --> selected="selected"<!-- ENDIF -->>{L_CATEGORY}</option><option value="module"<!-- IF not S_IS_CAT --> selected="selected"<!-- ENDIF -->>{L_MODULE}</option></select></dd>
+ </dl>
+ <dl>
+ <dt><label for="parent_id">{L_PARENT}:</label></dt>
+ <dd><select name="parent_id" id="parent_id">{S_CAT_OPTIONS}</select></dd>
+ </dl>
+ <hr />
+ <dl>
+ <dt><label for="module_enabled">{L_MODULE_ENABLED}:</label></dt>
+ <dd><label><input class="radio" type="radio" name="module_enabled" id="module_enabled" value="1"<!-- IF MODULE_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input class="radio" type="radio" name="module_enabled" value="0"<!-- IF not MODULE_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <div id="modoptions"<!-- IF S_IS_CAT --> style="display: none;"<!-- ENDIF -->>
+ <dl>
+ <dt><label for="module_display">{L_MODULE_DISPLAYED}:</label><br /><span>{L_MODULE_DISPLAYED_EXPLAIN}</span></dt>
+ <dd><label><input class="radio" type="radio" name="module_display" id="module_display" value="1"<!-- IF MODULE_DISPLAY --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input class="radio" type="radio" name="module_display" value="0"<!-- IF not MODULE_DISPLAY --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="module_name">{L_CHOOSE_MODULE}:</label><br />
+ <span>{L_CHOOSE_MODULE_EXPLAIN}</span></dt>
+ <dd><select name="module_name" id="module_name" onchange="display_modes(this.value);">{S_MODULE_NAMES}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="module_mode">{L_CHOOSE_MODE}:</label><br />
+ <span>{L_CHOOSE_MODE_EXPLAIN}</span></dt>
+ <dd><select name="module_mode" id="module_mode">{S_MODULE_MODES}</select></dd>
+ </dl>
+ </div>
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <input type="hidden" name="action" value="{ACTION}" />
+ <input type="hidden" name="m" value="{MODULE_ID}" />
+
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_ACP_MODULE_MANAGEMENT}</h1>
+
+ <p>{L_ACP_MODULE_MANAGEMENT_EXPLAIN}</p>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <table cellspacing="1">
+ <tbody>
+ <tr>
+ <td class="row3">{NAVIGATION}<!-- IF S_NO_MODULES --> [<a href="{U_EDIT}">{L_EDIT}</a> | <a href="{U_DELETE}">{L_DELETE}</a> | <!-- IF MODULE_ENABLED --><a href="{U_DISABLE}">{L_DISABLE}</a><!-- ELSE --><a href="{U_ENABLE}">{L_ENABLE}</a><!-- ENDIF -->]<!-- ENDIF --></td>
+ </tr>
+ </tbody>
+ </table>
+
+<!-- IF .modules -->
+ <table cellspacing="1">
+ <col class="row1" /><col class="row1" /><col class="row2" /><col class="row2" />
+ <tbody>
+ <!-- BEGIN modules -->
+ <tr>
+ <td style="width: 5%;">{modules.MODULE_IMAGE}</td>
+ <td style="width: 50%;"><a href="{modules.U_MODULE}">{modules.MODULE_TITLE}</a><!-- IF not modules.MODULE_DISPLAYED --> <span class="small">[{L_HIDDEN_MODULE}]</span><!-- ENDIF --></td>
+ <td style="width: 15%; white-space: nowrap; text-align: center; vertical-align: middle;"><a href="{modules.U_MOVE_UP}">{L_MOVE_UP}</a><br /><a href="{modules.U_MOVE_DOWN}">{L_MOVE_DOWN}</a></td>
+ <td style="width: 20%; white-space: nowrap; text-align: center; vertical-align: middle;">&nbsp;
+ <a href="{modules.U_EDIT}">{L_EDIT}</a> | <a href="{modules.U_DELETE}">{L_DELETE}</a> |
+ <!-- IF modules.MODULE_ENABLED --><a href="{modules.U_DISABLE}">{L_DISABLE}</a><!-- ELSE --><a href="{modules.U_ENABLE}">{L_ENABLE}</a><!-- ENDIF -->
+ &nbsp;</td>
+ </tr>
+ <!-- END modules -->
+ </tbody>
+ </table>
+<!-- ENDIF -->
+
+ <form id="module" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick" style="float: left;">
+ <input type="hidden" name="action" value="add" />
+
+ <input type="text" name="module_langname" />
+ <input class="button2" name="addmodule" type="submit" value="{L_CREATE_MODULE}" />
+ </fieldset>
+
+ </form>
+
+ <form id="quick" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick">
+ <input type="hidden" name="action" value="quickadd" />
+
+ <select name="quick_install">{S_INSTALL_OPTIONS}</select>
+ <input class="button2" name="quickadd" type="submit" value="{L_ADD_MODULE}" />
+ </fieldset>
+
+ </form>
+
+ <form id="mselect" method="post" action="{U_SEL_ACTION}">
+ <fieldset class="quick">
+ {L_SELECT_MODULE}: <select name="parent_id" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{MODULE_BOX}</select>
+
+ <input class="button2" type="submit" value="{L_GO}" />
+ </fieldset>
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_ACP_PHP_INFO}</h1>
+
+<p>{L_ACP_PHP_INFO_EXPLAIN}</p>
+
+{PHPINFO}
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT -->
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_EXPLAIN}</p>
+
+ <!-- IF ERROR_MSG -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="add_profile_field" method="post" action="{U_ACTION}">
+
+ <!-- IF S_STEP_ONE -->
+
+ <fieldset>
+ <legend>{L_TITLE}</legend>
+ <dl>
+ <dt><label>{L_FIELD_TYPE}:</label><br /><span>{L_FIELD_TYPE_EXPLAIN}</span></dt>
+ <dd><b>{FIELD_TYPE}</b></dd>
+ </dl>
+ <dl>
+ <dt><label for="field_ident">{L_FIELD_IDENT}:</label><br /><span>{L_FIELD_IDENT_EXPLAIN}</span></dt>
+ <dd><input class="medium" type="text" id="field_ident" name="field_ident" value="{FIELD_IDENT}" /></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_LANG_SPECIFIC}</legend>
+ <dl>
+ <dt><label for="lang_name">{L_USER_FIELD_NAME}:</label></dt>
+ <dd><input class="medium" type="text" id="lang_name" name="lang_name" value="{LANG_NAME}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="lang_explain">{L_FIELD_DESCRIPTION}:</label><br /><span>{L_FIELD_DESCRIPTION_EXPLAIN}</span></dt>
+ <dd><textarea id="lang_explain" name="lang_explain" rows="3" cols="80">{LANG_EXPLAIN}</textarea></dd>
+ </dl>
+ <!-- IF S_TEXT or S_STRING -->
+ <dl>
+ <dt><label for="lang_default_value">{L_DEFAULT_VALUE}:</label><br /><span>{L_DEFAULT_VALUE_EXPLAIN}</span></dt>
+ <dd><!-- IF S_STRING --><input class="medium" type="text" id="lang_default_value" name="lang_default_value" value="{LANG_DEFAULT_VALUE}" /><!-- ELSE --><textarea id="lang_default_value" name="lang_default_value" rows="5" cols="80">{LANG_DEFAULT_VALUE}</textarea><!-- ENDIF --></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF S_BOOL or S_DROPDOWN -->
+ <dl>
+ <dt><label for="lang_options">{L_ENTRIES}:</label><br /><span>{L_LANG_OPTIONS_EXPLAIN}</span></dt>
+ <!-- IF S_DROPDOWN -->
+ <dd><textarea id="lang_options" name="lang_options" rows="5" cols="80">{LANG_OPTIONS}</textarea></dd>
+ <!-- ELSE -->
+ <dd><input class="medium" id="lang_options" name="lang_options[0]" value="{FIRST_LANG_OPTION}" /> {L_FIRST_OPTION}</dd>
+ <dd><input class="medium" name="lang_options[1]" value="{SECOND_LANG_OPTION}" /> {L_SECOND_OPTION}</dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+
+ <fieldset class="quick">
+ {S_HIDDEN_FIELDS}
+ <input class="button1" type="submit" name="next" value="{L_PROFILE_TYPE_OPTIONS}" />
+ </fieldset>
+
+ <!-- ELSEIF S_STEP_TWO -->
+
+ <fieldset>
+ <legend>{L_TITLE}</legend>
+ <dl>
+ <dt><label for="field_required">{L_REQUIRED_FIELD}:</label><br /><span>{L_REQUIRED_FIELD_EXPLAIN}</span></dt>
+ <dd><input type="checkbox" id="field_required" name="field_required" value="1"<!-- IF S_FIELD_REQUIRED --> checked="checked"<!-- ENDIF --> /></dd>
+ </dl>
+ <dl>
+ <dt><label for="field_show_on_reg">{L_DISPLAY_AT_REGISTRATION}:</label></dt>
+ <dd><input type="checkbox" id="field_show_on_reg" name="field_show_on_reg" value="1"<!-- IF S_SHOW_ON_REG --> checked="checked"<!-- ENDIF --> /></dd>
+ </dl>
+ <dl>
+ <dt><label for="field_hide">{L_HIDE_PROFILE_FIELD}:</label><br /><span>{L_HIDE_PROFILE_FIELD_EXPLAIN}</span></dt>
+ <dd><input type="checkbox" id="field_hide" name="field_hide" value="1"<!-- IF S_FIELD_HIDE --> checked="checked"<!-- ENDIF --> /></dd>
+ </dl>
+ <dl>
+ <dt><label for="field_no_view">{L_EXCLUDE_FROM_VIEW}:</label><br /><span>{L_EXCLUDE_FROM_VIEW_EXPLAIN}</span></dt>
+ <dd><input type="checkbox" id="field_no_view" name="field_no_view" value="1"<!-- IF S_FIELD_NO_VIEW --> checked="checked"<!-- ENDIF --> /></dd>
+ </dl>
+ <!-- BEGIN option -->
+ <dl>
+ <dt><label>{option.TITLE}:</label><!-- IF option.EXPLAIN --><br /><span>{option.EXPLAIN}</span><!-- ENDIF --></dt>
+ <dd>{option.FIELD}</dd>
+ </dl>
+ <!-- END option -->
+ </fieldset>
+
+ <fieldset class="quick" style="float: left;">
+ <input class="button1" type="submit" name="prev" value="{L_PROFILE_BASIC_OPTIONS}" />
+ </fieldset>
+
+ <fieldset class="quick" style="float: right">
+ {S_HIDDEN_FIELDS}
+ <input class="button1" type="submit" name="update" value="{L_UPDATE_PREVIEW}" />&nbsp;
+ <input class="button1" type="submit" name="next" value="{L_NEXT}" />
+ </fieldset>
+
+ <br /><br />
+
+ <fieldset>
+ <legend>{L_PREVIEW_PROFILE_FIELD}</legend>
+ <!-- IF USER_ERROR --><p style="color: red;">{USER_ERROR}</p><!-- ELSE --><p style="color: green;">{L_EVERYTHING_OK}</p><!-- ENDIF -->
+ <dl>
+ <dt><label>{PREVIEW_LANG_NAME}:</label><!-- IF PREVIEW_LANG_EXPLAIN --><br /><span>{PREVIEW_LANG_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dd>{PREVIEW_FIELD}</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ </fieldset>
+
+ <!-- ELSEIF S_STEP_THREE -->
+
+ <!-- BEGIN options -->
+ <fieldset>
+ <legend>{options.LANGUAGE}</legend>
+ <!-- BEGIN field -->
+ <dl>
+ <dt><label>{options.field.L_TITLE}:</label><!-- IF options.field.L_EXPLAIN --><br /><span>{options.field.L_EXPLAIN}</span><!-- ENDIF --></dt>
+ {options.field.FIELD}
+ </dl>
+ <!-- END field -->
+ </fieldset>
+ <!-- END options -->
+
+ <fieldset class="quick" style="float: left;">
+ <input class="button1" type="submit" name="prev" value="{L_PROFILE_TYPE_OPTIONS}" />
+ </fieldset>
+
+ <fieldset class="quick" style="float: right;">
+ {S_HIDDEN_FIELDS}
+ <input class="button1" type="submit" name="save" value="{L_SAVE}" />
+ </fieldset>
+
+ <!-- ENDIF -->
+
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_ACP_CUSTOM_PROFILE_FIELDS}</h1>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_FIELD_IDENT}</th>
+ <th>{L_FIELD_TYPE}</th>
+ <th colspan="3">{L_OPTIONS}</th>
+ <th>{L_REORDER}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN fields -->
+ <!-- IF fields.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td>{fields.FIELD_IDENT}</td>
+ <td>{fields.FIELD_TYPE}</td>
+ <td><a href="{fields.U_ACTIVATE_DEACTIVATE}">{fields.L_ACTIVATE_DEACTIVATE}</a></td>
+ <td><a href="{fields.U_EDIT}"><!-- IF fields.S_NEED_EDIT --><span style="color:red">{L_EDIT}</span><!-- ELSE -->{L_EDIT}<!-- ENDIF --></a></td>
+ <td><a href="{fields.U_DELETE}">{L_DELETE}</a></td>
+ <td style="text-align: center;"><a href="{fields.U_MOVE_UP}">{L_MOVE_UP}</a> | <a href="{fields.U_MOVE_DOWN}">{L_MOVE_DOWN}</a></td>
+ </tr>
+ <!-- END fields -->
+ </tbody>
+ </table>
+
+ <form id="profile_fields" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick">
+ <input class="small" type="text" name="field_ident" /> <select name="field_type">{S_TYPE_OPTIONS}</select>
+ <input class="button1" type="submit" name="create" value="{L_CREATE_NEW_FIELD}" />
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_PRUNED -->
+
+ <h1>{L_FORUM_PRUNE}</h1>
+
+ <p>{L_PRUNE_SUCCESS}</p>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_FORUM}</th>
+ <th>{L_TOPICS_PRUNED}</th>
+ <th>{L_POSTS_PRUNED}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN pruned -->
+ <!-- IF pruned.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="text-align: center;">{pruned.FORUM_NAME}</td>
+ <td style="text-align: center;">{pruned.NUM_TOPICS}</td>
+ <td style="text-align: center;">{pruned.NUM_POSTS}</td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td class="row3" style="text-align: center;">{L_NO_PRUNE}</td>
+ </tr>
+ <!-- END pruned -->
+ </tbody>
+ </table>
+
+<!-- ELSEIF S_SELECT_FORUM -->
+
+ <h1>{L_ACP_PRUNE_FORUMS}</h1>
+
+ <p>{L_ACP_PRUNE_FORUMS_EXPLAIN}</p>
+
+ <form id="acp_prune" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_SELECT_FORUM}</legend>
+ <dl>
+ <dd class="full"><select name="f[]" multiple="multiple" size="5">{S_FORUM_OPTIONS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" value="{L_LOOK_UP_FORUM}" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSE -->
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <h1>{L_ACP_PRUNE_FORUMS}</h1>
+
+ <p>{L_ACP_PRUNE_FORUMS_EXPLAIN}</p>
+
+ <h2>{L_FORUM}</h2>
+
+ <p>{L_SELECTED_FORUMS}: {FORUM_LIST}</p>
+
+ <form id="acp_prune" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_FORUM_PRUNE}</legend>
+ <dl>
+ <dt><label for="prune_days">{L_PRUNE_NOT_POSTED}:</label></dt>
+ <dd><input type="text" id="prune_days" name="prune_days" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="prune_vieweddays">{L_PRUNE_NOT_VIEWED}:</label></dt>
+ <dd><input type="text" id="prune_vieweddays" name="prune_vieweddays" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="polls">{L_PRUNE_OLD_POLLS}:</label><br /><span>{L_PRUNE_OLD_POLLS_EXPLAIN}</span></dt>
+ <dd><input type="radio" name="prune_old_polls" value="1" /> {L_YES} &nbsp; <input type="radio" id="polls" name="prune_old_polls" value="0" checked="checked" /> {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="announce">{L_PRUNE_ANNOUNCEMENTS}:</label></dt>
+ <dd><input type="radio" name="prune_announce" value="1" /> {L_YES} &nbsp; <input type="radio" id="announce" name="prune_announce" value="0" checked="checked" /> {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="sticky">{L_PRUNE_STICKY}:</label></dt>
+ <dd><input type="radio" name="prune_sticky" value="1" /> {L_YES} &nbsp; <input type="radio" id="sticky" name="prune_sticky" value="0" checked="checked" /> {L_NO}</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ {S_HIDDEN_FIELDS}
+
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_ACP_PRUNE_USERS}</h1>
+
+<p>{L_ACP_PRUNE_USERS_EXPLAIN}</p>
+
+<form id="acp_prune" method="post" action="{U_ACTION}">
+
+<fieldset>
+ <legend>{L_ACP_PRUNE_USERS}</legend>
+<dl>
+ <dt><label for="username">{L_USERNAME}:</label></dt>
+ <dd><input type="text" id="username" name="username" /></dd>
+</dl>
+<dl>
+ <dt><label for="email">{L_EMAIL}:</label></dt>
+ <dd><input type="text" id="email" name="email" /></dd>
+</dl>
+<dl>
+ <dt><label for="joined">{L_JOINED}:</label><br /><span>{L_JOINED_EXPLAIN}</span></dt>
+ <dd><select name="joined_select">{S_JOINED_OPTIONS}</select> <input type="text" id="joined" name="joined" /></dd>
+</dl>
+<dl>
+ <dt><label for="active">{L_LAST_ACTIVE}:</label><br /><span>{L_LAST_ACTIVE_EXPLAIN}</span></dt>
+ <dd><select name="active_select">{S_ACTIVE_OPTIONS}</select> <input type="text" id="active" name="active" /></dd>
+</dl>
+<dl>
+ <dt><label for="count">{L_POSTS}:</label></dt>
+ <dd><select name="count_select">{S_COUNT_OPTIONS}</select> <input type="text" id="count" name="count" /></dd>
+</dl>
+<dl>
+ <dt><label for="users">{L_ACP_PRUNE_USERS}:</label><br /><span>{L_SELECT_USERS_EXPLAIN}</span></dt>
+ <dd><textarea id="users" name="users" cols="40" rows="5"></textarea></dd>
+ <dd>[ <a href="#" onclick="window.open('{U_FIND_USER}', '_phpbbsearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</dd>
+</dl>
+<dl>
+ <dt><label for="deleteposts">{L_DELETE_USER_POSTS}:</label><br /><span>{L_DELETE_USER_POSTS_EXPLAIN}</span></dt>
+ <dd><input type="radio" name="deleteposts" value="1" /> {L_YES}&nbsp;&nbsp;<input type="radio" id="deleteposts" name="deleteposts" value="0" checked="checked" /> {L_NO}</dd>
+</dl>
+<dl>
+ <dt><label for="deactivate">{L_DEACTIVATE_DELETE}:</label><br /><span>{L_DEACTIVATE_DELETE_EXPLAIN}</span></dt>
+ <dd><input type="radio" name="action" value="delete" /> {L_DELETE_USERS}&nbsp;&nbsp;<input type="radio" id="deactivate" name="action" value="deactivate" checked="checked" /> {L_DEACTIVATE}</dd>
+</dl>
+</fieldset>
+
+<fieldset class="submit-buttons">
+ <input type="hidden" name="prune" value="1" />
+
+ <input class="button1" type="submit" id="update" name="update" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+</fieldset>
+
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT -->
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <script type="text/javascript">
+ <!--
+
+ function update_image(newimage)
+ {
+ document.getElementById('image').src = (newimage) ? "{RANKS_PATH}/" + newimage : "./images/spacer.gif";
+ }
+
+ //-->
+ </script>
+
+ <h1>{L_ACP_MANAGE_RANKS}</h1>
+
+ <p>{L_ACP_RANKS_EXPLAIN}</p>
+
+ <form id="acp_ranks" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_ACP_RANKS}</legend>
+ <dl>
+ <dt><label for="title">{L_RANK_TITLE}:</label></dt>
+ <dd><input name="title" type="text" id="title" value="{RANK_TITLE}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="rank_image">{L_RANK_IMAGE}:</label></dt>
+ <dd><select name="rank_image" id="rank_image" onchange="update_image(this.options[selectedIndex].value);">{S_FILENAME_LIST}</select></dd>
+ <dd><img src="{RANK_IMAGE}" id="image" alt="" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="special_rank">{L_RANK_SPECIAL}:</label></dt>
+ <dd><input onchange="dE('posts', -1)" type="radio" name="special_rank" value="1" id="special_rank"<!-- IF S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> />{L_YES} &nbsp;&nbsp;<input onchange="dE('posts', 1)" type="radio" name="special_rank" value="0"<!-- IF not S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
+ </dl>
+ <!-- IF S_SPECIAL_RANK --><div id="posts" style="display: none;"><!-- ELSE --><div id="posts"><!-- ENDIF -->
+ <dl>
+ <dt><label for="min_posts">{L_RANK_MINIMUM}:</label></dt>
+ <dd><input name="min_posts" type="text" id="min_posts" maxlength="10" value="{MIN_POSTS}" /></dd>
+ </dl>
+ </div>
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <input type="hidden" name="action" value="save" />
+
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_ACP_MANAGE_RANKS}</h1>
+
+ <p>{L_ACP_RANKS_EXPLAIN}</p>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_RANK_IMAGE}</th>
+ <th>{L_RANK_TITLE}</th>
+ <th>{L_RANK_MINIMUM}</th>
+ <th>{L_ACTION}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN ranks -->
+ <!-- IF ranks.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="text-align: center;"><!-- IF ranks.S_RANK_IMAGE --><img src="{ranks.RANK_IMAGE}" alt="{ranks.RANK_TITLE}" title="{ranks.RANK_TITLE}" /><!-- ELSE -->&nbsp; - &nbsp;<!-- ENDIF --></td>
+ <td style="text-align: center;">{ranks.RANK_TITLE}</td>
+ <td style="text-align: center;"><!-- IF ranks.S_SPECIAL_RANK -->&nbsp; - &nbsp;<!-- ELSE -->{ranks.MIN_POSTS}<!-- ENDIF --></td>
+ <td style="text-align: center;"><a href="{ranks.U_EDIT}">{L_EDIT}</a> | <a href="{ranks.U_DELETE}">{L_DELETE}</a></td>
+ </tr>
+ <!-- END ranks -->
+ </tbody>
+ </table>
+
+ <form id="acp_ranks" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick">
+ <input class="button2" name="add" type="submit" value="{L_ADD_RANK}" />
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_SELECT_USER -->
+
+ <h1>{L_USER_ADMIN}</h1>
+
+ <p>{L_USER_ADMIN_EXPLAIN}</p>
+
+ <form id="select_user" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_SELECT_USER}</legend>
+ <dl>
+ <dt><label for="username">{L_FIND_USERNAME}:</label></dt>
+ <dd><input class="medium" type="text" id="username" name="username" /></dd>
+ <dd>[ <a href="#" onclick="window.open('{U_FIND_USERNAME}', '_phpbbsearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ <input type="submit" name="submituser" value="{L_SUBMIT}" class="button1" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSEIF S_SELECT_FORUM -->
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <h1>{L_USER_ADMIN}</h1>
+
+ <p>{L_USER_ADMIN_EXPLAIN}</p>
+
+ <form id="select_forum" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_USER_ADMIN_MOVE_POSTS}</legend>
+ <dl>
+ <dt><label for="new_forum">{L_USER_ADMIN_MOVE_POSTS}</label><br /><span>{L_MOVE_POSTS_EXPLAIN}</span></dt>
+ <dd><select id="new_forum" name="new_f">{S_FORUM_OPTIONS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ <input type="submit" name="update" value="{L_SUBMIT}" class="button1" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSE -->
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <h1>{L_USER_ADMIN}</h1>
+
+ <p>{L_USER_ADMIN_EXPLAIN}</p>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="mode_select" method="post" action="{U_MODE_SELECT}">
+
+ <fieldset class="quick">
+ {L_SELECT_FORM}: <select name="mode" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_FORM_OPTIONS}</select>
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- IF S_OVERVIEW -->
+
+ <form id="user_overview" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_ACP_USER_OVERVIEW}</legend>
+ <dl>
+ <dt><label for="user">{L_USERNAME}:</label><br /><span>{L_NAME_CHARS_EXPLAIN}</span></dt>
+ <dd><input type="text" id="user" name="user" value="{USER}" /></dd>
+ </dl>
+ <dl>
+ <dt><label>{L_REGISTERED}:</label></dt>
+ <dd><strong>{USER_REGISTERED}</strong></dd>
+ </dl>
+ <!-- IF S_USER_IP -->
+ <dl>
+ <dt><label>{L_REGISTERED_IP}:</label></dt>
+ <dd><a href="{U_SHOW_IP}">{REGISTERED_IP}</a></dd>
+ <dd>[ <a href="#" onclick="window.open('{U_WHOIS}', '_whois', 'height=500, resizable=yes, scrollbars=yes, width=700'); return false;">{L_WHOIS}</a> ]</strong></dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label>{L_LAST_ACTIVE}:</label></dt>
+ <dd><strong>{USER_LASTACTIVE}</strong></dd>
+ </dl>
+ <dl>
+ <dt><label for="user_founder">{L_FOUNDER}:</label><br /><span>{L_FOUNDER_EXPLAIN}</span></dt>
+ <dd><input type="radio" name="user_founder" value="1"<!-- IF S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp; <input type="radio" name="user_founder" value="0"<!-- IF not S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> />&nbsp;{L_NO}&nbsp;</dd>
+ </dl>
+ <dl>
+ <dt><label for="user_email">{L_EMAIL}:</label></dt>
+ <dd><input class="medium" type="text" id="user_email" name="user_email" value="{USER_EMAIL}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="email_confirm">{L_CONFIRM_EMAIL}:</label><br /><span>{L_CONFIRM_EMAIL_EXPLAIN}</span></dt>
+ <dd><input class="medium" type="text" id="email_confirm" name="email_confirm" value="" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="user_password">{L_NEW_PASSWORD}:</label><br /><span>{L_CHANGE_PASSWORD_EXPLAIN}</span></dt>
+ <dd><input type="password" id="user_password" name="user_password" value="" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="password_confirm">{L_CONFIRM_PASSWORD}:</label><br /><span>{L_CONFIRM_PASSWORD_EXPLAIN}</span></dt>
+ <dd><input type="password" id="password_confirm" name="password_confirm" value="" /></dd>
+ </dl>
+ <!-- IF not S_USER_FOUNDER or S_FOUNDER -->
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_USER_TOOLS}</legend>
+ <dl>
+ <dt><label for="warnings">{L_WARNINGS}:</label><br /><span>{L_WARNINGS_EXPLAIN}</span></dt>
+ <dd><input type="text" id="warnings" name="warnings" value="{USER_WARNINGS}" size="2" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="quicktools">{L_QUICK_TOOLS}:</label></dt>
+ <dd><select id="quicktools" name="action">{S_ACTION_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="delete_user">{L_DELETE_USER}:</label><br /><span>{L_DELETE_USER_EXPLAIN}</span></dt>
+ <dd><input type="checkbox" name="delete" value="1" /></dd>
+ <dd><select id="delete_user" name="delete_type"><option value="retain">{L_RETAIN_POSTS}</option><option value="remove">{L_DELETE_POSTS}</option></select></dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSEIF S_FEEDBACK -->
+
+ <form id="list" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick" style="float: left;">
+ {L_DISPLAY_LOG}: &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}
+ <input class="button2" type="submit" value="{L_GO}" name="sort" />
+ </fieldset>
+
+ <div class="clearfix"></div>
+
+ <!-- IF PAGINATION -->
+ <div class="pagination">
+ <!-- IF PAGINATION -->
+ <a href="javascript:jumpto();" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
+ <!-- ELSE -->
+ {S_ON_PAGE}
+ <!-- ENDIF -->
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF .log -->
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_REPORT_BY}</th>
+ <th>{L_IP}</th>
+ <th>{L_TIME}</th>
+ <th>{L_ACTION}</th>
+ <th>{L_MARK}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN log -->
+ <!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td>{log.USERNAME}</td>
+ <td style="text-align: center;">{log.IP}</td>
+ <td style="text-align: center;">{log.DATE}</td>
+ <td>
+ {log.ACTION}
+ <!-- IF log.DATA --><br />&#187; <span class="gensmall">[ {log.DATA} ]</span><!-- ENDIF -->
+ </td>
+ <td style="text-align: center;"><input type="checkbox" name="mark[]" value="{log.ID}" /></td>
+ </tr>
+ <!-- END log -->
+ </tbody>
+ </table>
+ <!-- ELSE -->
+ <div class="errorbox">
+ <p>{L_NO_ENTRIES}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF S_CLEARLOGS -->
+ <fieldset class="quick">
+ <b class="small"><a href="#" onclick="marklist('list', true);">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('list', false);">{L_UNMARK_ALL}</a></b><br />
+ <input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />&nbsp;
+ <input class="button2" type="submit" name="delall" value="{L_DELETE_ALL}" />&nbsp;
+ </fieldset>
+ <!-- ENDIF -->
+
+ <h1>{L_ADD_FEEDBACK}</h1>
+
+ <p>{L_ADD_FEEDBACK_EXPLAIN}</p>
+
+ <fieldset>
+ <legend>{L_ACP_USER_FEEDBACK}</legend>
+ <dl>
+ <dd class="full"><textarea name="message" id="message" rows="10" cols="76"></textarea></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSEIF S_PROFILE -->
+
+ <form id="user_profile" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_USER_PROFILE}</legend>
+ <dl>
+ <dt><label for="icq">{L_UCP_ICQ}:</label></dt>
+ <dd><input type="text" id="icq" name="icq" value="{ICQ}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="aim">{L_UCP_AIM}:</label></dt>
+ <dd><input type="text" id="aim" name="aim" value="{AIM}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="msn">{L_UCP_MSNM}:</label></dt>
+ <dd><input type="text" id="msn" name="msn" value="{MSN}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="yim">{L_UCP_YIM}:</label></dt>
+ <dd><input type="text" id="yim" name="yim" value="{YIM}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="jabber">{L_UCP_JABBER}:</label></dt>
+ <dd><input type="text" id="jabber" name="jabber" value="{JABBER}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="website">{L_WEBSITE}:</label></dt>
+ <dd><input type="text" id="website" name="website" value="{WEBSITE}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="location">{L_LOCATION}:</label></dt>
+ <dd><input type="text" id="location" name="location" value="{LOCATION}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="occupation">{L_OCCUPATION}:</label></dt>
+ <dd><textarea id="occupation" name="occupation" rows="3" cols="30">{OCCUPATION}</textarea></dd>
+ </dl>
+ <dl>
+ <dt><label for="interests">{L_INTERESTS}:</label></dt>
+ <dd><textarea id="interests" name="interests" rows="3" cols="30">{INTERESTS}</textarea></dd>
+ </dl>
+ <dl>
+ <dt><label for="birthday">{L_BIRTHDAY}:</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
+ <dd>{L_DAY}: <select id="birthday" name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> {L_MONTH}: <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> {L_YEAR}: <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <!-- IF .profile_fields -->
+ <fieldset>
+ <legend>{L_USER_CUSTOM_PROFILE_FIELDS}</legend>
+ <!-- BEGIN profile_fields -->
+ <dl>
+ <dt><label>{profile_fields.LANG_NAME}:</label><!-- IF profile_fields.LANG_EXPLAIN --><br /><span>{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dd>{profile_fields.FIELD}</dd>
+ <!-- IF profile_fields.ERROR -->
+ <dd><span class="small" style="color: red;">{profile_fields.ERROR}</span></dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- END profile_fields -->
+ </fieldset>
+ <!-- ENDIF -->
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSEIF S_PREFS -->
+
+ <form id="user_prefs" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_UCP_PREFS_PERSONAL}</legend>
+ <dl>
+ <dt><label for="viewemail">{L_SHOW_EMAIL}:</label></dt>
+ <dd><input type="radio" name="viewemail" value="1"<!-- IF VIEW_EMAIL --> id="viewemail" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="viewemail" value="0"<!-- IF not VIEW_EMAIL --> id="viewemail" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="massemail">{L_ADMIN_EMAIL}:</label></dt>
+ <dd><input type="radio" name="massemail" value="1"<!-- IF MASS_EMAIL --> id="massemail" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="massemail" value="0"<!-- IF not MASS_EMAIL --> id="massemail" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="allowpm">{L_ALLOW_PM}:</label><br /><span>{L_ALLOW_PM_EXPLAIN}</span></dt>
+ <dd><input type="radio" name="allowpm" value="1"<!-- IF ALLOW_PM --> id="allowpm" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="allowpm" value="0"<!-- IF not ALLOW_PM --> id="allowpm" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="hideonline">{L_HIDE_ONLINE}:</label></dt>
+ <dd><input type="radio" name="hideonline" value="1"<!-- IF HIDE_ONLINE --> id="hideonline" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="hideonline" value="0"<!-- IF not HIDE_ONLINE --> id="hideonline" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="notifymethod">{L_NOTIFY_METHOD}:</label><br /><span>{L_NOTIFY_METHOD_EXPLAIN}</span></dt>
+ <dd><input type="radio" name="notifymethod" value="0"<!-- IF NOTIFY_EMAIL --> id="notifymethod" checked="checked"<!-- ENDIF --> />&nbsp; {L_NOTIFY_METHOD_EMAIL} &nbsp;<input type="radio" name="notifymethod" value="1"<!-- IF NOTIFY_IM --> id="notifymethod" checked="checked"<!-- ENDIF --><!-- IF S_JABBER_DISABLED --> disabled="disabled"<!-- ENDIF --> />&nbsp; {L_NOTIFY_METHOD_IM} &nbsp;<input type="radio" name="notifymethod" value="2"<!-- IF NOTIFY_BOTH --> id="notifymethod" checked="checked"<!-- ENDIF --> />&nbsp; {L_NOTIFY_METHOD_BOTH}</dd>
+ </dl>
+ <dl>
+ <dt><label for="notifypm">{L_NOTIFY_ON_PM}:</label></dt>
+ <dd><input type="radio" name="notifypm" value="1"<!-- IF NOTIFY_PM --> id="notifypm" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="notifypm" value="0"<!-- IF not NOTIFY_PM --> id="notifypm" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="popuppm">{L_POPUP_ON_PM}:</label></dt>
+ <dd><input type="radio" name="popuppm" value="1"<!-- IF POPUP_PM --> id="popuppm" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="popuppm" value="0"<!-- IF not POPUP_PM --> id="popuppm" checked="checked"<!-- ENDIF --> />{L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="report_pm_notify">{L_REPORT_PM_NOTIFY}:</label><br /><span>{L_REPORT_PM_NOTIFY_EXPLAIN}</span></dt>
+ <dd><input type="radio" name="report_pm_notify" value="1"<!-- IF REPORT_PM_NOTIFY --> id="report_pm_notify" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="report_pm_notify" value="0"<!-- IF not REPORT_PM_NOTIFY --> id="report_pm_notify" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="lang">{L_BOARD_LANGUAGE}:</label></dt>
+ <dd><select id="lang" name="lang">{S_LANG_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="style">{L_BOARD_STYLE}:</label></dt>
+ <dd><select id="style" name="style">{S_STYLE_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="tz">{L_BOARD_TIMEZONE}:</label></dt>
+ <dd><select id="tz" name="tz">{S_TZ_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="dst">{L_BOARD_DST}:</label></dt>
+ <dd><input type="radio" name="dst" value="1"<!-- IF DST --> id="dst" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="dst" value="0"<!-- IF not DST --> id="dst" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="dateoptions">{L_BOARD_DATE_FORMAT}:</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt>
+ <dd><select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = '{DEFAULT_DATEFORMAT}'; } else { document.getElementById('dateformat').value = this.value; }">{S_DATEFORMAT_OPTIONS}</select></dd>
+ <dd><div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" /></div></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_UCP_PREFS_POST}</legend>
+ <dl>
+ <dt><label for="bbcode">{L_DEFAULT_BBCODE}:</label></dt>
+ <dd><input type="radio" name="bbcode" value="1"<!-- IF BBCODE --> id="bbcode" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="bbcode" value="0"<!-- IF not BBCODE --> id="bbcode" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="html">{L_DEFAULT_HTML}:</label></dt>
+ <dd><input type="radio" name="html" value="1"<!-- IF HTML --> id="html" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="html" value="0"<!-- IF HTML --> id="html" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="smilies">{L_DEFAULT_SMILIES}:</label></dt>
+ <dd><input type="radio" name="smilies" value="1"<!-- IF SMILIES --> id="smilies" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="smilies" value="0"<!-- IF not SMILIES --> id="smilies" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="sig">{L_DEFAULT_ADD_SIG}:</label></dt>
+ <dd><input type="radio" name="sig" value="1"<!-- IF ATTACH_SIG --> id="sig" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="sig" value="0"<!-- IF not ATTACH_SIG --> id="sig" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="notify">{L_DEFAULT_NOTIFY}:</label></dt>
+ <dd><input type="radio" name="notify" value="1"<!-- IF NOTIFY --> id="notify" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="notify" value="0"<!-- IF not NOTIFY --> id="notify" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_UCP_PREFS_VIEW}</legend>
+ <dl>
+ <dt><label for="view_images">{L_VIEW_IMAGES}:</label></dt>
+ <dd><input type="radio" name="view_images" value="1"<!-- IF VIEW_IMAGES --> id="view_images" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="view_images" value="0"<!-- IF not VIEW_IMAGES --> id="view_images" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="view_flash">{L_VIEW_FLASH}:</label></dt>
+ <dd><input type="radio" name="view_flash" value="1"<!-- IF VIEW_FLASH --> id="view_flash" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="view_flash" value="0"<!-- IF not VIEW_FLASH --> id="view_flash" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="view_smilies">{L_VIEW_SMILIES}:</label></dt>
+ <dd><input type="radio" name="view_smilies" value="1"<!-- IF VIEW_SMILIES --> id="view_smilies" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="view_smilies" value="0"<!-- IF not VIEW_SMILIES --> id="view_smilies" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="view_sigs">{L_VIEW_SIGS}:</label></dt>
+ <dd><input type="radio" name="view_sigs" value="1"<!-- IF VIEW_SIGS --> id="view_sigs" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="view_sigs" value="0"<!-- IF not VIEW_SIGS --> id="view_sigss" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="view_avatars">{L_VIEW_AVATARS}:</label></dt>
+ <dd><input type="radio" name="view_avatars" value="1"<!-- IF VIEW_AVATARS --> id="view_avatars" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="view_avatars" value="0"<!-- IF not VIEW_AVATARS --> id="view_avatars" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label for="view_wordcensor">{L_DISABLE_CENSORS}:</label></dt>
+ <dd><input type="radio" name="view_wordcensor" value="1"<!-- IF VIEW_WORDCENSOR --> id="view_wordcensor" checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" name="view_wordcensor" value="0"<!-- IF not VIEW_WORDCENSOR --> id="view_wordcensor" checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</dd>
+ </dl>
+ <dl>
+ <dt><label>{L_VIEW_TOPICS_DAYS}:</label></dt>
+ <dd>{S_TOPIC_SORT_DAYS}</dd>
+ </dl>
+ <dl>
+ <dt><label>{L_VIEW_TOPICS_KEY}:</label></dt>
+ <dd>{S_TOPIC_SORT_KEY}</dd>
+ </dl>
+ <dl>
+ <dt><label>{L_VIEW_TOPICS_DIR}:</label></dt>
+ <dd>{S_TOPIC_SORT_DIR}</dd>
+ </dl>
+ <dl>
+ <dt><label>{L_VIEW_POSTS_DAYS}:</label></dt>
+ <dd>{S_POST_SORT_DAYS}</dd>
+ </dl>
+ <dl>
+ <dt><label>{L_VIEW_POSTS_KEY}:</label></dt>
+ <dd>{S_POST_SORT_KEY}</dd>
+ </dl>
+ <dl>
+ <dt><label>{L_VIEW_POSTS_DIR}:</label></dt>
+ <dd>{S_POST_SORT_DIR}</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/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 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT_WORD -->
+
+ <a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
+
+ <h1>{L_ACP_WORDS}</h1>
+
+ <p>{L_ACP_WORDS_EXPLAIN}</p>
+
+ <form id="acp_words" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_EDIT_WORD}</legend>
+ <dl>
+ <dt><label for="word">{L_WORD}</label></dt>
+ <dd><input id="word" type="text" name="word" value="{WORD}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="replacement">{L_REPLACEMENT}</label></dt>
+ <dd><input id="replacement" type="text" name="replacement" value="{REPLACEMENT}" /></dd>
+ </dl>
+ {S_HIDDEN_FIELDS}
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="save" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_ACP_WORDS}</h1>
+
+ <p>{L_ACP_WORDS_EXPLAIN}</p>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_WORD}</th>
+ <th>{L_REPLACEMENT}</th>
+ <th colspan="2">{L_ACTION}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN words -->
+ <!-- IF words.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="text-align: center;">{words.WORD}</td>
+ <td style="text-align: center;">{words.REPLACEMENT}</td>
+ <td>&nbsp;<a href="{words.U_EDIT}">{L_EDIT}</a>&nbsp;</td>
+ <td>&nbsp;<a href="{words.U_DELETE}">{L_DELETE}</a>&nbsp;</td>
+ </tr>
+ <!-- END words -->
+ </tbody>
+ </table>
+
+ <form id="acp_words" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick">
+ {S_HIDDEN_FIELDS}
+ <input class="button2" name="add" type="submit" value="{L_ADD_WORD}" />
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ 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;
+}
+
+/* <a> 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 @@
+<!-- INCLUDE overall_header.html -->
+
+<form id="confirm" method="post" action="{S_CONFIRM_ACTION}">
+
+<fieldset>
+ <h2>{MESSAGE_TITLE}</h2>
+ <p>{MESSAGE_TEXT}</p>
+
+ {S_HIDDEN_FIELDS}
+
+ <div style="text-align: center;">
+ <input type="submit" name="confirm" value="{L_YES}" class="button2" />&nbsp;
+ <input type="submit" name="cancel" value="{L_NO}" class="button2" />
+ </div>
+
+</fieldset>
+
+</form>
+
+<!-- INCLUDE overall_footer.html -->
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 @@
+
+<!-- BEGIN dropdown -->
+ <select name="{dropdown.FIELD_IDENT}">
+ <!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options -->
+ </select>
+<!-- END dropdown -->
+
+<!-- BEGIN text -->
+ <textarea name="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}">{text.FIELD_VALUE}</textarea>
+<!-- END text -->
+
+<!-- BEGIN string -->
+ <input type="text" name="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
+<!-- END string -->
+
+<!-- BEGIN bool -->
+ <!-- IF bool.FIELD_LENGTH eq 1 -->
+ <!-- BEGIN options --><input type="radio" name="{bool.FIELD_IDENT}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /> {bool.options.VALUE}&nbsp; &nbsp;<!-- END options -->
+ <!-- ELSE -->
+ <input type="checkbox" name="{bool.FIELD_IDENT}"<!-- IF bool.FIELD_VALUE --> checked="checked"<!-- ENDIF --> />
+ <!-- ENDIF -->
+<!-- END bool -->
+
+<!-- BEGIN int -->
+ <input type="text" name="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" />
+<!-- END int -->
+
+<!-- BEGIN date -->
+ <span>{L_DAY}:</span> <select name="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select>
+ <span>{L_MONTH}:</span> <select name="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select>
+ <span>{L_YEAR}:</span> <select name="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select>
+<!-- END date -->
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 @@
+<!-- INCLUDE overall_header.html -->
+
+<div class="errorbox">
+ <h3>{MESSAGE_TITLE}</h3>
+ <p>{MESSAGE_TEXT}</p>
+</div>
+
+<!-- INCLUDE overall_footer.html --> \ 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 @@
+ <br /><br />
+ <!-- End page content -->
+ </div>
+ </div>
+ <div class="corner3"></div><div class="corner4"></div>
+ </div></div>
+</div>
+
+<!--
+ We request you retain the full copyright notice below including the link to www.phpbb.com.
+ This not only gives respect to the large amount of time given freely by the developers
+ but also helps build interest, traffic and use of phpBB2. If you (honestly) cannot retain
+ the full copyright we ask you at least leave in place the "Powered by phpBB" line, with
+ "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our
+ forums may be affected.
+
+ The phpBB Group : 2004
+// -->
+
+<div id="page-footer">
+
+ <!-- IF S_COPYRIGHT_HTML -->
+ Powered by phpBB {VERSION} &copy; 2005 <a href="http://www.phpbb.com/">phpBB Group</a>
+ <!-- ENDIF -->
+
+ <!-- IF DEBUG_OUTPUT -->
+ <!-- IF S_COPYRIGHT_HTML --><br /><br /><!-- ENDIF -->
+ {DEBUG_OUTPUT}
+ <!-- ENDIF -->
+
+</div>
+
+</body>
+</html>
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 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}">
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<meta http-equiv="imagetoolbar" content="no" />
+<!-- IF META -->{META}<!-- ENDIF -->
+<title>{PAGE_TITLE}</title>
+
+<link href="style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+
+<script type="text/javascript">
+<!--
+var jump_page = '{L_JUMP_PAGE}:';
+var on_page = '{ON_PAGE}';
+var per_page = '{PER_PAGE}';
+var base_url = '{BASE_URL}';
+
+// Jump to page
+function jumpto()
+{
+ var page = prompt(jump_page, on_page);
+
+ if (page !== null && !isNaN(page) && page > 0)
+ {
+ document.location.href = base_url.replace('&amp;', '&') + '&start=' + ((page - 1) * per_page);
+ }
+}
+
+// Set display of page element
+// s[-1,0,1] = hide,toggle display,show
+function dE(n,s)
+{
+ var e = document.getElementById(n);
+ if(!s) s = (e.style.display=='') ? -1:1;
+ e.style.display = (s==1) ? 'block':'none';
+}
+
+function marklist(match, status)
+{
+ doc = document.getElementById(match);
+ for (i = 0; i < doc.length; i++)
+ {
+ doc.elements[i].checked = status;
+ }
+}
+
+<!-- IF S_INCLUDE_SWATCH -->
+ function swatch()
+ {
+ window.open('{U_SWATCH}', '_swatch', 'height=115, resizable=yes, scrollbars=no, width=636');
+ return false;
+ }
+<!-- ENDIF -->
+
+//-->
+</script>
+</head>
+
+<body>
+<div id="page-header">
+ <a href="{U_INDEX}" title="{L_FORUM_INDEX}"><img src="{ROOT_PATH}images/logo.gif" id="logo" alt="phpBB Creating Communities" /></a>
+ <h1>{L_ADMIN_PANEL}</h1>
+ <p><a href="{U_ADM_INDEX}">{L_ADMIN_INDEX}</a> &bull; <a href="{U_INDEX}">{L_FORUM_INDEX}</a></p>
+</div>
+
+<div id="page-body">
+ <div id="tabs">
+ <ul>
+ <!-- BEGIN t_block1 -->
+ <li<!-- IF t_block1.S_SELECTED --> id="activetab"<!-- ENDIF -->><a href="{t_block1.U_TITLE}"><span>{t_block1.L_TITLE}</span></a></li>
+ <!-- END t_block1 -->
+ </ul>
+ </div>
+
+ <div class="box"><div class="innerbox">
+ <div class="corner1"></div><div class="corner2"></div>
+ <div id="content">
+ <div id="menu">
+ <p>{L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [&nbsp;<a href="{U_LOGOUT}">{L_LOGOUT}</a>&nbsp;]</p>
+ <ul>
+ <!-- BEGIN l_block1 -->
+ <!-- IF l_block1.S_SELECTED -->
+
+ <!-- BEGIN l_block2 -->
+ <!-- IF .l_block1.l_block2.l_block3 -->
+ <li class="header">{l_block1.l_block2.L_TITLE}</li>
+ <!-- ENDIF -->
+
+ <!-- BEGIN l_block3 -->
+ <li<!-- IF l_block1.l_block2.l_block3.S_SELECTED --> id="activemenu"<!-- ENDIF -->><a href="{l_block1.l_block2.l_block3.U_TITLE}"><span>{l_block1.l_block2.l_block3.L_TITLE}</span></a></li>
+ <!-- END l_block3 -->
+ <!-- END l_block2 -->
+
+ <!-- ENDIF -->
+ <!-- END l_block1 -->
+ </ul>
+ </div>
+
+ <div id="main">
+
+ <!-- Start page content -->
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 @@
+<!-- INCLUDE simple_header.html -->
+
+<div class="errorbox">
+ <h3>{MESSAGE_TITLE}</h3>
+ <p>{MESSAGE_TEXT}</p>
+</div>
+
+<!-- INCLUDE simple_footer.html --> \ 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 @@
+ <div style="text-align: right;"><a href="#" onclick="javascript: self.close();">{L_CLOSE_WINDOW}</a></div>
+ <br /><br />
+</div>
+
+<!--
+ We request you retain the full copyright notice below including the link to www.phpbb.com.
+ This not only gives respect to the large amount of time given freely by the developers
+ but also helps build interest, traffic and use of phpBB2. If you (honestly) cannot retain
+ the full copyright we ask you at least leave in place the "Powered by phpBB" line, with
+ "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our
+ forums may be affected.
+
+ The phpBB Group : 2004
+// -->
+
+<div id="page-footer">
+
+ <!-- IF S_COPYRIGHT_HTML -->
+ <br />Powered by phpBB {VERSION} &copy; 2005 <a href="http://www.phpbb.com/">phpBB Group</a>
+ <!-- ENDIF -->
+
+ <!-- IF DEBUG_OUTPUT -->
+ <!-- IF S_COPYRIGHT_HTML --><br /><br /><!-- ENDIF -->
+ {DEBUG_OUTPUT}
+ <!-- ENDIF -->
+
+</div>
+
+</body>
+</html>
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 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}">
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<meta http-equiv="imagetoolbar" content="no" />
+<!-- IF META -->{META}<!-- ENDIF -->
+<title>{PAGE_TITLE}</title>
+
+<link href="style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+
+<script type="text/javascript">
+<!--
+var jump_page = '{L_JUMP_PAGE}:';
+var on_page = '{ON_PAGE}';
+var per_page = '{PER_PAGE}';
+var base_url = '{BASE_URL}';
+
+// Jump to page
+function jumpto()
+{
+ var page = prompt(jump_page, on_page);
+
+ if (page !== null && !isNaN(page) && page > 0)
+ {
+ document.location.href = base_url.replace('&amp;', '&') + '&start=' + ((page - 1) * per_page);
+ }
+}
+
+// Set display of page element
+// s[-1,0,1] = hide,toggle display,show
+function dE(n,s)
+{
+ var e = document.getElementById(n);
+ if(!s) s = (e.style.display=='') ? -1:1;
+ e.style.display = (s==1) ? 'block':'none';
+}
+
+function marklist(match, status)
+{
+ doc = document.getElementById(match);
+ for (i = 0; i < doc.length; i++)
+ {
+ doc.elements[i].checked = status;
+ }
+}
+
+<!-- IF S_INCLUDE_SWATCH -->
+ function swatch()
+ {
+ window.open('{U_SWATCH}', '_swatch', 'height=115, resizable=yes, scrollbars=no, width=636');
+ return false;
+ }
+<!-- ENDIF -->
+
+//-->
+</script>
+</head>
+
+<body>
+
+<div id="page-body" style="padding: 0 10px;">
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 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
+<head>
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<meta http-equiv="imagetoolbar" content="no" />
<title>phpBB3 Color Swatch</title>
+
<style type="text/css">
+<!--
+body {
+ background-color: #404040;
+ color: #fff;
+}
td {
- border: solid 1px #333333;
+ border: solid 1px #333;
}
.over {
@@ -15,9 +24,17 @@ td {
border-color: #333333;
}
+img {
+ border: 0;
+}
+
+//-->
</style>
-<body bgcolor="#404040" text="#FFFFFF">
-<script language="javascript" type="text/javascript">
+</head>
+
+<body>
+
+<script type="text/javascript">
<!--
var r = 0, g = 0, b = 0;
var numberList = new Array(6);
@@ -37,7 +54,7 @@ td {
{
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
document.write('<td bgcolor="#' + color + '" onmouseover="this.className=\'over\'" onmouseout="this.className=\'out\'">');
- document.write('<a href="javascript:cell(\'' + color + '\');"><img src="../images/spacer.gif" width="15" height="12" border="0" alt="#' + color + '" title="#' + color + '" \/><\/a>');
+ document.write('<a href="javascript:cell(\'' + color + '\');"><img src="./images/spacer.gif" width="15" height="12" alt="#' + color + '" title="#' + color + '" \/><\/a>');
document.writeln('<\/td>');
}
}