phpbbreloaded-checkins Mailing List for phpBB Reloaded
Status: Planning
Brought to you by:
tehphpmaster
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(49) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(16) |
Nov
|
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <teh...@us...> - 2007-04-15 02:51:17
|
Revision: 286 http://svn.sourceforge.net/phpbbreloaded/?rev=286&view=rev Author: tehphpmaster Date: 2007-04-14 19:51:17 -0700 (Sat, 14 Apr 2007) Log Message: ----------- Well, an install directory would be helpful. This is the default phpBB2 install process, no doubt it'll be changing before we hit 1.0 however. Added Paths: ----------- main/trunk/install/ main/trunk/install/index.htm main/trunk/install/install.php main/trunk/install/schemas/ main/trunk/install/schemas/index.htm main/trunk/install/schemas/ms_access_primer.zip main/trunk/install/schemas/mssql_basic.sql main/trunk/install/schemas/mssql_schema.sql main/trunk/install/schemas/mysql_basic.sql main/trunk/install/schemas/mysql_schema.sql main/trunk/install/schemas/postgres_basic.sql main/trunk/install/schemas/postgres_schema.sql Added: main/trunk/install/index.htm =================================================================== --- main/trunk/install/index.htm (rev 0) +++ main/trunk/install/index.htm 2007-04-15 02:51:17 UTC (rev 286) @@ -0,0 +1,10 @@ +<html> +<head> +<title></title> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +</head> + +<body bgcolor="#FFFFFF" text="#000000"> + +</body> +</html> Added: main/trunk/install/install.php =================================================================== --- main/trunk/install/install.php (rev 0) +++ main/trunk/install/install.php 2007-04-15 02:51:17 UTC (rev 286) @@ -0,0 +1,1049 @@ +<?php +/*************************************************************************** + * install.php + * ------------------- + * begin : Tuesday, Sept 11, 2001 + * copyright : (C) 2001 The phpBB Group + * email : su...@ph... + * + * $Id: install.php,v 1.6.2.14 2005/12/29 11:51:11 acydburn Exp $ + * + ***************************************************************************/ + +/*************************************************************************** + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + ***************************************************************************/ + +// --------- +// FUNCTIONS +// +function page_header($text, $form_action = false) +{ + global $phpEx, $lang; + +?> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $lang['ENCODING']; ?>"> +<meta http-equiv="Content-Style-Type" content="text/css"> +<title><?php echo $lang['Welcome_install'];?></title> +<link rel="stylesheet" href="../templates/subSilver/subSilver.css" type="text/css"> +<style type="text/css"> +<!-- +th { background-image: url('../templates/subSilver/images/cellpic3.gif') } +td.cat { background-image: url('../templates/subSilver/images/cellpic1.gif') } +td.rowpic { background-image: url('../templates/subSilver/images/cellpic2.jpg'); background-repeat: repeat-y } +td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom { background-image: url('../templates/subSilver/images/cellpic1.gif') } + +/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */ +@import url("../templates/subSilver/formIE.css"); +//--> +</style> +</head> +<body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#5584AA"> + +<table width="100%" border="0" cellspacing="0" cellpadding="10" align="center"> + <tr> + <td class="bodyline" width="100%"><table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr> + <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr> + <td><img src="../templates/subSilver/images/logo_phpBB.gif" border="0" alt="Forum Home" vspace="1" /></td> + <td align="center" width="100%" valign="middle"><span class="maintitle"><?php echo $lang['Welcome_install'];?></span></td> + </tr> + </table></td> + </tr> + <tr> + <td><br /><br /></td> + </tr> + <tr> + <td colspan="2"><table width="90%" border="0" align="center" cellspacing="0" cellpadding="0"> + <tr> + <td><span class="gen"><?php echo $text; ?></span></td> + </tr> + </table></td> + </tr> + <tr> + <td><br /><br /></td> + </tr> + <tr> + <td width="100%"><table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"><form action="<?php echo ($form_action) ? $form_action : 'install.'.$phpEx; ?>" name="install" method="post"> +<?php + +} + +function page_footer() +{ + +?> + </table></form></td> + </tr> + </table></td> + </tr> +</table> + +</body> +</html> +<?php + +} + +function page_common_form($hidden, $submit) +{ + +?> + <tr> + <td class="catBottom" align="center" colspan="2"><?php echo $hidden; ?><input class="mainoption" type="submit" value="<?php echo $submit; ?>" /></td> + </tr> +<?php + +} + +function page_upgrade_form() +{ + global $lang; + +?> + <tr> + <td class="catBottom" align="center" colspan="2"><?php echo $lang['continue_upgrade']; ?></td> + </tr> + <tr> + <td class="catBottom" align="center" colspan="2"><input type="submit" name="upgrade_now" value="<?php echo $lang['upgrade_submit']; ?>" /></td> + </tr> +<?php + +} + +function page_error($error_title, $error) +{ + +?> + <tr> + <th><?php echo $error_title; ?></th> + </tr> + <tr> + <td class="row1" align="center"><span class="gen"><?php echo $error; ?></span></td> + </tr> +<?php + +} + +// Guess an initial language ... borrowed from phpBB 2.2 it's not perfect, +// really it should do a straight match first pass and then try a "fuzzy" +// match on a second pass instead of a straight "fuzzy" match. +function guess_lang() +{ + global $phpbb_root_path, $HTTP_SERVER_VARS; + + // The order here _is_ important, at least for major_minor + // matches. Don't go moving these around without checking with + // me first - psoTFX + $match_lang = array( + 'arabic' => 'ar([_-][a-z]+)?', + 'bulgarian' => 'bg', + 'catalan' => 'ca', + 'czech' => 'cs', + 'danish' => 'da', + 'german' => 'de([_-][a-z]+)?', + 'english' => 'en([_-][a-z]+)?', + 'estonian' => 'et', + 'finnish' => 'fi', + 'french' => 'fr([_-][a-z]+)?', + 'greek' => 'el', + 'spanish_argentina' => 'es[_-]ar', + 'spanish' => 'es([_-][a-z]+)?', + 'gaelic' => 'gd', + 'galego' => 'gl', + 'gujarati' => 'gu', + 'hebrew' => 'he', + 'hindi' => 'hi', + 'croatian' => 'hr', + 'hungarian' => 'hu', + 'icelandic' => 'is', + 'indonesian' => 'id([_-][a-z]+)?', + 'italian' => 'it([_-][a-z]+)?', + 'japanese' => 'ja([_-][a-z]+)?', + 'korean' => 'ko([_-][a-z]+)?', + 'latvian' => 'lv', + 'lithuanian' => 'lt', + 'macedonian' => 'mk', + 'dutch' => 'nl([_-][a-z]+)?', + 'norwegian' => 'no', + 'punjabi' => 'pa', + 'polish' => 'pl', + 'portuguese_brazil' => 'pt[_-]br', + 'portuguese' => 'pt([_-][a-z]+)?', + 'romanian' => 'ro([_-][a-z]+)?', + 'russian' => 'ru([_-][a-z]+)?', + 'slovenian' => 'sl([_-][a-z]+)?', + 'albanian' => 'sq', + 'serbian' => 'sr([_-][a-z]+)?', + 'slovak' => 'sv([_-][a-z]+)?', + 'swedish' => 'sv([_-][a-z]+)?', + 'thai' => 'th([_-][a-z]+)?', + 'turkish' => 'tr([_-][a-z]+)?', + 'ukranian' => 'uk([_-][a-z]+)?', + 'urdu' => 'ur', + 'viatnamese' => 'vi', + 'chinese_traditional_taiwan'=> 'zh[_-]tw', + 'chinese_simplified' => 'zh', + ); + + if (isset($HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'])) + { + $accept_lang_ary = explode(',', $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE']); + for ($i = 0; $i < sizeof($accept_lang_ary); $i++) + { + @reset($match_lang); + while (list($lang, $match) = each($match_lang)) + { + if (preg_match('#' . $match . '#i', trim($accept_lang_ary[$i]))) + { + if (file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $lang))) + { + return $lang; + } + } + } + } + } + + return 'english'; + +} +// +// FUNCTIONS +// --------- + +// Begin +error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables +set_magic_quotes_runtime(0); // Disable magic_quotes_runtime + +// PHP5 with register_long_arrays off? +if (!isset($HTTP_POST_VARS) && isset($_POST)) +{ + $HTTP_POST_VARS = $_POST; + $HTTP_GET_VARS = $_GET; + $HTTP_SERVER_VARS = $_SERVER; + $HTTP_COOKIE_VARS = $_COOKIE; + $HTTP_ENV_VARS = $_ENV; + $HTTP_POST_FILES = $_FILES; + + // _SESSION is the only superglobal which is conditionally set + if (isset($_SESSION)) + { + $HTTP_SESSION_VARS = $_SESSION; + } +} + +// Slash data if it isn't slashed +if (!get_magic_quotes_gpc()) +{ + if (is_array($HTTP_GET_VARS)) + { + while (list($k, $v) = each($HTTP_GET_VARS)) + { + if (is_array($HTTP_GET_VARS[$k])) + { + while (list($k2, $v2) = each($HTTP_GET_VARS[$k])) + { + $HTTP_GET_VARS[$k][$k2] = addslashes($v2); + } + @reset($HTTP_GET_VARS[$k]); + } + else + { + $HTTP_GET_VARS[$k] = addslashes($v); + } + } + @reset($HTTP_GET_VARS); + } + + if (is_array($HTTP_POST_VARS)) + { + while (list($k, $v) = each($HTTP_POST_VARS)) + { + if (is_array($HTTP_POST_VARS[$k])) + { + while (list($k2, $v2) = each($HTTP_POST_VARS[$k])) + { + $HTTP_POST_VARS[$k][$k2] = addslashes($v2); + } + @reset($HTTP_POST_VARS[$k]); + } + else + { + $HTTP_POST_VARS[$k] = addslashes($v); + } + } + @reset($HTTP_POST_VARS); + } + + if (is_array($HTTP_COOKIE_VARS)) + { + while (list($k, $v) = each($HTTP_COOKIE_VARS)) + { + if (is_array($HTTP_COOKIE_VARS[$k])) + { + while (list($k2, $v2) = each($HTTP_COOKIE_VARS[$k])) + { + $HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2); + } + @reset($HTTP_COOKIE_VARS[$k]); + } + else + { + $HTTP_COOKIE_VARS[$k] = addslashes($v); + } + } + @reset($HTTP_COOKIE_VARS); + } +} + +// Begin main prog +define('IN_PHPBB', true); +// Uncomment the following line to completely disable the ftp option... +// define('NO_FTP', true); +$phpbb_root_path = './../'; +include($phpbb_root_path.'extension.inc'); + +// Initialise some basic arrays +$userdata = array(); +$lang = array(); +$error = false; + +// Include some required functions +include($phpbb_root_path.'includes/constants.'.$phpEx); +include($phpbb_root_path.'includes/functions.'.$phpEx); +include($phpbb_root_path.'includes/sessions.'.$phpEx); + +// Define schema info +$available_dbms = array( + 'mysql'=> array( + 'LABEL' => 'MySQL 3.x', + 'SCHEMA' => 'mysql', + 'DELIM' => ';', + 'DELIM_BASIC' => ';', + 'COMMENTS' => 'remove_remarks' + ), + 'mysql4' => array( + 'LABEL' => 'MySQL 4.x/5.x', + 'SCHEMA' => 'mysql', + 'DELIM' => ';', + 'DELIM_BASIC' => ';', + 'COMMENTS' => 'remove_remarks' + ), + 'postgres' => array( + 'LABEL' => 'PostgreSQL 7.x', + 'SCHEMA' => 'postgres', + 'DELIM' => ';', + 'DELIM_BASIC' => ';', + 'COMMENTS' => 'remove_comments' + ), + 'mssql' => array( + 'LABEL' => 'MS SQL Server 7/2000', + 'SCHEMA' => 'mssql', + 'DELIM' => 'GO', + 'DELIM_BASIC' => ';', + 'COMMENTS' => 'remove_comments' + ), + 'msaccess' => array( + 'LABEL' => 'MS Access [ ODBC ]', + 'SCHEMA' => '', + 'DELIM' => '', + 'DELIM_BASIC' => ';', + 'COMMENTS' => '' + ), + 'mssql-odbc' => array( + 'LABEL' => 'MS SQL Server [ ODBC ]', + 'SCHEMA' => 'mssql', + 'DELIM' => 'GO', + 'DELIM_BASIC' => ';', + 'COMMENTS' => 'remove_comments' + ) +); + +// Obtain various vars +$confirm = (isset($HTTP_POST_VARS['confirm'])) ? true : false; +$cancel = (isset($HTTP_POST_VARS['cancel'])) ? true : false; + +if (isset($HTTP_POST_VARS['install_step']) || isset($HTTP_GET_VARS['install_step'])) +{ + $install_step = (isset($HTTP_POST_VARS['install_step'])) ? $HTTP_POST_VARS['install_step'] : $HTTP_GET_VARS['install_step']; +} +else +{ + $install_step = ''; +} + +$upgrade = (!empty($HTTP_POST_VARS['upgrade'])) ? $HTTP_POST_VARS['upgrade']: ''; +$upgrade_now = (!empty($HTTP_POST_VARS['upgrade_now'])) ? $HTTP_POST_VARS['upgrade_now']:''; + +$dbms = isset($HTTP_POST_VARS['dbms']) ? $HTTP_POST_VARS['dbms'] : ''; + +$dbhost = (!empty($HTTP_POST_VARS['dbhost'])) ? $HTTP_POST_VARS['dbhost'] : 'localhost'; +$dbuser = (!empty($HTTP_POST_VARS['dbuser'])) ? $HTTP_POST_VARS['dbuser'] : ''; +$dbpasswd = (!empty($HTTP_POST_VARS['dbpasswd'])) ? $HTTP_POST_VARS['dbpasswd'] : ''; +$dbname = (!empty($HTTP_POST_VARS['dbname'])) ? $HTTP_POST_VARS['dbname'] : ''; + +$table_prefix = (!empty($HTTP_POST_VARS['prefix'])) ? $HTTP_POST_VARS['prefix'] : ''; + +$admin_name = (!empty($HTTP_POST_VARS['admin_name'])) ? $HTTP_POST_VARS['admin_name'] : ''; +$admin_pass1 = (!empty($HTTP_POST_VARS['admin_pass1'])) ? $HTTP_POST_VARS['admin_pass1'] : ''; +$admin_pass2 = (!empty($HTTP_POST_VARS['admin_pass2'])) ? $HTTP_POST_VARS['admin_pass2'] : ''; + +$ftp_path = (!empty($HTTP_POST_VARS['ftp_path'])) ? $HTTP_POST_VARS['ftp_path'] : ''; +$ftp_user = (!empty($HTTP_POST_VARS['ftp_user'])) ? $HTTP_POST_VARS['ftp_user'] : ''; +$ftp_pass = (!empty($HTTP_POST_VARS['ftp_pass'])) ? $HTTP_POST_VARS['ftp_pass'] : ''; + +if (isset($HTTP_POST_VARS['lang']) && preg_match('#^[a-z_]+$#', $HTTP_POST_VARS['lang'])) +{ + $language = strip_tags($HTTP_POST_VARS['lang']); +} +else +{ + $language = guess_lang(); +} + +$board_email = (!empty($HTTP_POST_VARS['board_email'])) ? $HTTP_POST_VARS['board_email'] : ''; +$script_path = (!empty($HTTP_POST_VARS['script_path'])) ? $HTTP_POST_VARS['script_path'] : str_replace('install', '', dirname($HTTP_SERVER_VARS['PHP_SELF'])); + +if (!empty($HTTP_POST_VARS['server_name'])) +{ + $server_name = $HTTP_POST_VARS['server_name']; +} +else +{ + // Guess at some basic info used for install.. + if (!empty($HTTP_SERVER_VARS['SERVER_NAME']) || !empty($HTTP_ENV_VARS['SERVER_NAME'])) + { + $server_name = (!empty($HTTP_SERVER_VARS['SERVER_NAME'])) ? $HTTP_SERVER_VARS['SERVER_NAME'] : $HTTP_ENV_VARS['SERVER_NAME']; + } + else if (!empty($HTTP_SERVER_VARS['HTTP_HOST']) || !empty($HTTP_ENV_VARS['HTTP_HOST'])) + { + $server_name = (!empty($HTTP_SERVER_VARS['HTTP_HOST'])) ? $HTTP_SERVER_VARS['HTTP_HOST'] : $HTTP_ENV_VARS['HTTP_HOST']; + } + else + { + $server_name = ''; + } +} + +if (!empty($HTTP_POST_VARS['server_port'])) +{ + $server_port = $HTTP_POST_VARS['server_port']; +} +else +{ + if (!empty($HTTP_SERVER_VARS['SERVER_PORT']) || !empty($HTTP_ENV_VARS['SERVER_PORT'])) + { + $server_port = (!empty($HTTP_SERVER_VARS['SERVER_PORT'])) ? $HTTP_SERVER_VARS['SERVER_PORT'] : $HTTP_ENV_VARS['SERVER_PORT']; + } + else + { + $server_port = '80'; + } +} + +// Open config.php ... if it exists +if (@file_exists(@phpbb_realpath('config.'.$phpEx))) +{ + include($phpbb_root_path.'config.'.$phpEx); +} + +// Is phpBB already installed? Yes? Redirect to the index +if (defined("PHPBB_INSTALLED")) +{ + redirect('../index.'.$phpEx); +} + +// Import language file, setup template ... +include($phpbb_root_path.'language/lang_' . $language . '/lang_main.'.$phpEx); +include($phpbb_root_path.'language/lang_' . $language . '/lang_admin.'.$phpEx); + +// Ok for the time being I'm commenting this out whilst I'm working on +// better integration of the install with upgrade as per Bart's request +// JLH +if ($upgrade == 1) +{ + // require('upgrade.'.$phpEx); + $install_step = 1; +} + +// What do we need to do? +if (!empty($HTTP_POST_VARS['send_file']) && $HTTP_POST_VARS['send_file'] == 1 && empty($HTTP_POST_VARS['upgrade_now'])) +{ + header('Content-Type: text/x-delimtext; name="config.' . $phpEx . '"'); + header('Content-disposition: attachment; filename="config.' . $phpEx . '"'); + + // We need to stripslashes no matter what the setting of magic_quotes_gpc is + // because we add slashes at the top if its off, and they are added automaticlly + // if it is on. + echo stripslashes($HTTP_POST_VARS['config_data']); + + exit; +} +else if (!empty($HTTP_POST_VARS['send_file']) && $HTTP_POST_VARS['send_file'] == 2) +{ + $s_hidden_fields = '<input type="hidden" name="config_data" value="' . htmlspecialchars(stripslashes($HTTP_POST_VARS['config_data'])) . '" />'; + $s_hidden_fields .= '<input type="hidden" name="ftp_file" value="1" />'; + + if ($upgrade == 1) + { + $s_hidden_fields .= '<input type="hidden" name="upgrade" value="1" />'; + } + + page_header($lang['ftp_instructs']); + +?> + <tr> + <th colspan="2"><?php echo $lang['ftp_info']; ?></th> + </tr> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['ftp_path']; ?></span></td> + <td class="row2"><input type="text" name="ftp_dir"></td> + </tr> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['ftp_username']; ?></span></td> + <td class="row2"><input type="text" name="ftp_user"></td> + </tr> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['ftp_password']; ?></span></td> + <td class="row2"><input type="password" name="ftp_pass"></td> + </tr> +<?php + + page_common_form($s_hidden_fields, $lang['Transfer_config']); + page_footer(); + exit; + +} +else if (!empty($HTTP_POST_VARS['ftp_file'])) +{ + // Try to connect ... + $conn_id = @ftp_connect('localhost'); + $login_result = @ftp_login($conn_id, "$ftp_user", "$ftp_pass"); + + if (!$conn_id || !$login_result) + { + page_header($lang['NoFTP_config']); + + // Error couldn't get connected... Go back to option to send file... + $s_hidden_fields = '<input type="hidden" name="config_data" value="' . htmlspecialchars(stripslashes($HTTP_POST_VARS['config_data'])) . '" />'; + $s_hidden_fields .= '<input type="hidden" name="send_file" value="1" />'; + + // If we're upgrading ... + if ($upgrade == 1) + { + $s_hidden_fields .= '<input type="hidden" name="upgrade" value="1" />'; + $s_hidden_fields .= '<input type="hidden" name="dbms" value="'.$dmbs.'" />'; + $s_hidden_fields .= '<input type="hidden" name="prefix" value="'.$table_prefix.'" />'; + $s_hidden_fields .= '<input type="hidden" name="dbhost" value="'.$dbhost.'" />'; + $s_hidden_fields .= '<input type="hidden" name="dbname" value="'.$dbname.'" />'; + $s_hidden_fields .= '<input type="hidden" name="dbuser" value="'.$dbuser.'" />'; + $s_hidden_fields .= '<input type="hidden" name="dbpasswd" value="'.$dbpasswd.'" />'; + $s_hidden_fields .= '<input type="hidden" name="install_step" value="1" />'; + $s_hidden_fields .= '<input type="hidden" name="admin_pass1" value="1" />'; + $s_hidden_fields .= '<input type="hidden" name="admin_pass2" value="1" />'; + $s_hidden_fields .= '<input type="hidden" name="server_port" value="'.$server_port.'" />'; + $s_hidden_fields .= '<input type="hidden" name="server_name" value="'.$server_name.'" />'; + $s_hidden_fields .= '<input type="hidden" name="script_path" value="'.$script_path.'" />'; + $s_hidden_fields .= '<input type="hidden" name="board_email" value="'.$board_email.'" />'; + + page_upgrade_form(); + } + else + { + page_common_form($s_hidden_fields, $lang['Download_config']); + + } + + page_footer(); + exit; + } + else + { + // Write out a temp file... + $tmpfname = @tempnam('/tmp', 'cfg'); + + @unlink($tmpfname); // unlink for safety on php4.0.3+ + + $fp = @fopen($tmpfname, 'w'); + + @fwrite($fp, stripslashes($HTTP_POST_VARS['config_data'])); + + @fclose($fp); + + // Now ftp it across. + @ftp_chdir($conn_id, $ftp_dir); + + $res = ftp_put($conn_id, 'config.'.$phpEx, $tmpfname, FTP_ASCII); + + @ftp_quit($conn_id); + + unlink($tmpfname); + + if ($upgrade == 1) + { + require('upgrade.'.$phpEx); + exit; + } + + // Ok we are basically done with the install process let's go on + // and let the user configure their board now. We are going to do + // this by calling the admin_board.php from the normal board admin + // section. + $s_hidden_fields = '<input type="hidden" name="username" value="' . $admin_name . '" />'; + $s_hidden_fields .= '<input type="hidden" name="password" value="' . $admin_pass1 . '" />'; + $s_hidden_fields .= '<input type="hidden" name="redirect" value="../admin/index.'.$phpEx.'" />'; + $s_hidden_fields .= '<input type="hidden" name="submit" value="' . $lang['Login'] . '" />'; + + page_header($lang['Inst_Step_2']); + page_common_form($s_hidden_fields, $lang['Finish_Install']); + page_footer(); + exit(); + } +} +else if ((empty($install_step) || $admin_pass1 != $admin_pass2 || empty($admin_pass1) || empty($dbhost))) +{ + // Ok we haven't installed before so lets work our way through the various + // steps of the install process. This could turn out to be quite a lengty + // process. + + // Step 0 gather the pertinant info for database setup... + // Namely dbms, dbhost, dbname, dbuser, and dbpasswd. + $instruction_text = $lang['Inst_Step_0']; + + if (!empty($install_step)) + { + if ((($HTTP_POST_VARS['admin_pass1'] != $HTTP_POST_VARS['admin_pass2'])) || + (empty($HTTP_POST_VARS['admin_pass1']) || empty($dbhost)) && $HTTP_POST_VARS['cur_lang'] == $language) + { + $error = $lang['Password_mismatch']; + } + } + + $dirname = $phpbb_root_path . 'language'; + $dir = opendir($dirname); + + $lang_options = array(); + while ($file = readdir($dir)) + { + if (preg_match('#^lang_#i', $file) && !is_file(@phpbb_realpath($dirname . '/' . $file)) && !is_link(@phpbb_realpath($dirname . '/' . $file))) + { + $filename = trim(str_replace('lang_', '', $file)); + $displayname = preg_replace('/^(.*?)_(.*)$/', '\1 [ \2 ]', $filename); + $displayname = preg_replace('/\[(.*?)_(.*)\]/', '[ \1 - \2 ]', $displayname); + $lang_options[$displayname] = $filename; + } + } + + closedir($dir); + + @asort($lang_options); + @reset($lang_options); + + $lang_select = '<select name="lang" onchange="this.form.submit()">'; + while (list($displayname, $filename) = @each($lang_options)) + { + $selected = ($language == $filename) ? ' selected="selected"' : ''; + $lang_select .= '<option value="' . $filename . '"' . $selected . '>' . ucwords($displayname) . '</option>'; + } + $lang_select .= '</select>'; + + $dbms_select = '<select name="dbms" onchange="if(this.form.upgrade.options[this.form.upgrade.selectedIndex].value == 1){ this.selectedIndex = 0;}">'; + while (list($dbms_name, $details) = @each($available_dbms)) + { + $selected = ($dbms_name == $dbms) ? 'selected="selected"' : ''; + $dbms_select .= '<option value="' . $dbms_name . '">' . $details['LABEL'] . '</option>'; + } + $dbms_select .= '</select>'; + + $upgrade_option = '<select name="upgrade"'; + $upgrade_option .= 'onchange="if (this.options[this.selectedIndex].value == 1) { this.form.dbms.selectedIndex = 0; }">'; + $upgrade_option .= '<option value="0">' . $lang['Install'] . '</option>'; + $upgrade_option .= '<option value="1">' . $lang['Upgrade'] . '</option></select>'; + + $s_hidden_fields = '<input type="hidden" name="install_step" value="1" /><input type="hidden" name="cur_lang" value="' . $language . '" />'; + + page_header($instruction_text); + +?> + <tr> + <th colspan="2"><?php echo $lang['Initial_config']; ?></th> + </tr> + <tr> + <td class="row1" align="right" width="30%"><span class="gen"><?php echo $lang['Default_lang']; ?>: </span></td> + <td class="row2"><?php echo $lang_select; ?></td> + </tr> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['dbms']; ?>: </span></td> + <td class="row2"><?php echo $dbms_select; ?></td> + </tr> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['Install_Method']; ?>:</span></td> + <td class="row2"><?php echo $upgrade_option; ?></td> + </tr> + <tr> + <th colspan="2"><?php echo $lang['DB_config']; ?></th> + </tr> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['DB_Host']; ?>: </span></td> + <td class="row2"><input type="text" name="dbhost" value="<?php echo ($dbhost != '') ? $dbhost : ''; ?>" /></td> + </tr> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['DB_Name']; ?>: </span></td> + <td class="row2"><input type="text" name="dbname" value="<?php echo ($dbname != '') ? $dbname : ''; ?>" /></td> + </tr> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['DB_Username']; ?>: </span></td> + <td class="row2"><input type="text" name="dbuser" value="<?php echo ($dbuser != '') ? $dbuser : ''; ?>" /></td> + </tr> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['DB_Password']; ?>: </span></td> + <td class="row2"><input type="password" name="dbpasswd" value="<?php echo ($dbpasswd != '') ? $dbpasswd : ''; ?>" /></td> + </tr> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['Table_Prefix']; ?>: </span></td> + <td class="row2"><input type="text" name="prefix" value="<?php echo (!empty($table_prefix)) ? $table_prefix : "phpbb_"; ?>" /></td> + </tr> + <tr> + <th colspan="2"><?php echo $lang['Admin_config']; ?></th> + </tr> +<?php + + if ($error) + { +?> + <tr> + <td class="row1" colspan="2" align="center"><span class="gen" style="color:red"><?php echo $error; ?></span></td> + </tr> +<?php + + } +?> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['Admin_email']; ?>: </span></td> + <td class="row2"><input type="text" name="board_email" value="<?php echo ($board_email != '') ? $board_email : ''; ?>" /></td> + </tr> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['Server_name']; ?>: </span></td> + <td class="row2"><input type="text" name="server_name" value="<?php echo $server_name; ?>" /></td> + </tr> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['Server_port']; ?>: </span></td> + <td class="row2"><input type="text" name="server_port" value="<?php echo $server_port; ?>" /></td> + </tr> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['Script_path']; ?>: </span></td> + <td class="row2"><input type="text" name="script_path" value="<?php echo $script_path; ?>" /></td> + </tr> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['Admin_Username']; ?>: </span></td> + <td class="row2"><input type="text" name="admin_name" value="<?php echo ($admin_name != '') ? $admin_name : ''; ?>" /></td> + </tr> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['Admin_Password']; ?>: </span></td> + <td class="row2"><input type="password" name="admin_pass1" value="<?php echo ($admin_pass1 != '') ? $admin_pass1 : ''; ?>" /></td> + </tr> + <tr> + <td class="row1" align="right"><span class="gen"><?php echo $lang['Admin_Password_confirm']; ?>: </span></td> + <td class="row2"><input type="password" name="admin_pass2" value="<?php echo ($admin_pass2 != '') ? $admin_pass2 : ''; ?>" /></td> + </tr> +<?php + + page_common_form($s_hidden_fields, $lang['Start_Install']); + page_footer(); + exit; +} +else +{ + // Go ahead and create the DB, then populate it + // + // MS Access is slightly different in that a pre-built, pre- + // populated DB is supplied, all we need do here is update + // the relevant entries + if (isset($dbms)) + { + switch($dbms) + { + case 'msaccess': + case 'mssql-odbc': + $check_exts = 'odbc'; + $check_other = 'odbc'; + break; + + case 'mssql': + $check_exts = 'mssql'; + $check_other = 'sybase'; + break; + + case 'mysql': + case 'mysql4': + $check_exts = 'mysql'; + $check_other = 'mysql'; + break; + + case 'postgres': + $check_exts = 'pgsql'; + $check_other = 'pgsql'; + break; + } + + if (!extension_loaded($check_exts) && !extension_loaded($check_other)) + { + page_header($lang['Install'], ''); + page_error($lang['Installer_Error'], $lang['Install_No_Ext']); + page_footer(); + exit; + } + + include($phpbb_root_path.'includes/db.'.$phpEx); + } + + $dbms_schema = 'schemas/' . $available_dbms[$dbms]['SCHEMA'] . '_schema.sql'; + $dbms_basic = 'schemas/' . $available_dbms[$dbms]['SCHEMA'] . '_basic.sql'; + + $remove_remarks = $available_dbms[$dbms]['COMMENTS'];; + $delimiter = $available_dbms[$dbms]['DELIM']; + $delimiter_basic = $available_dbms[$dbms]['DELIM_BASIC']; + + if ($install_step == 1) + { + if ($upgrade != 1) + { + if ($dbms != 'msaccess') + { + // Load in the sql parser + include($phpbb_root_path.'includes/sql_parse.'.$phpEx); + + // Ok we have the db info go ahead and read in the relevant schema + // and work on building the table.. probably ought to provide some + // kind of feedback to the user as we are working here in order + // to let them know we are actually doing something. + $sql_query = @fread(@fopen($dbms_schema, 'r'), @filesize($dbms_schema)); + $sql_query = preg_replace('/phpbb_/', $table_prefix, $sql_query); + + $sql_query = $remove_remarks($sql_query); + $sql_query = split_sql_file($sql_query, $delimiter); + + for ($i = 0; $i < sizeof($sql_query); $i++) + { + if (trim($sql_query[$i]) != '') + { + if (!($result = $db->sql_query($sql_query[$i]))) + { + $error = $db->sql_error(); + + page_header($lang['Install'], ''); + page_error($lang['Installer_Error'], $lang['Install_db_error'] . '<br />' . $error['message']); + page_footer(); + exit; + } + } + } + + // Ok tables have been built, let's fill in the basic information + $sql_query = @fread(@fopen($dbms_basic, 'r'), @filesize($dbms_basic)); + $sql_query = preg_replace('/phpbb_/', $table_prefix, $sql_query); + + $sql_query = $remove_remarks($sql_query); + $sql_query = split_sql_file($sql_query, $delimiter_basic); + + for($i = 0; $i < sizeof($sql_query); $i++) + { + if (trim($sql_query[$i]) != '') + { + if (!($result = $db->sql_query($sql_query[$i]))) + { + $error = $db->sql_error(); + + page_header($lang['Install'], ''); + page_error($lang['Installer_Error'], $lang['Install_db_error'] . '<br />' . $error['message']); + page_footer(); + exit; + } + } + } + } + + // Ok at this point they have entered their admin password, let's go + // ahead and create the admin account with some basic default information + // that they can customize later, and write out the config file. After + // this we are going to pass them over to the admin_forum.php script + // to set up their forum defaults. + $error = ''; + + // Update the default admin user with their information. + $sql = "INSERT INTO " . $table_prefix . "config (config_name, config_value) + VALUES ('board_startdate', " . time() . ")"; + if (!$db->sql_query($sql)) + { + $error .= "Could not insert board_startdate :: " . $sql . " :: " . __LINE__ . " :: " . __FILE__ . "<br /><br />"; + } + + $sql = "INSERT INTO " . $table_prefix . "config (config_name, config_value) + VALUES ('default_lang', '" . str_replace("\'", "''", $language) . "')"; + if (!$db->sql_query($sql)) + { + $error .= "Could not insert default_lang :: " . $sql . " :: " . __LINE__ . " :: " . __FILE__ . "<br /><br />"; + } + + $update_config = array( + 'board_email' => $board_email, + 'script_path' => $script_path, + 'server_port' => $server_port, + 'server_name' => $server_name, + ); + + while (list($config_name, $config_value) = each($update_config)) + { + $sql = "UPDATE " . $table_prefix . "config + SET config_value = '$config_value' + WHERE config_name = '$config_name'"; + if (!$db->sql_query($sql)) + { + $error .= "Could not insert default_lang :: " . $sql . " :: " . __LINE__ . " :: " . __FILE__ . "<br /><br />"; + } + } + + $admin_pass_md5 = ($confirm && $userdata['user_level'] == ADMIN) ? $admin_pass1 : md5($admin_pass1); + + $sql = "UPDATE " . $table_prefix . "users + SET username = '" . str_replace("\'", "''", $admin_name) . "', user_password='" . str_replace("\'", "''", $admin_pass_md5) . "', user_lang = '" . str_replace("\'", "''", $language) . "', user_email='" . str_replace("\'", "''", $board_email) . "' + WHERE username = 'Admin'"; + if (!$db->sql_query($sql)) + { + $error .= "Could not update admin info :: " . $sql . " :: " . __LINE__ . " :: " . __FILE__ . "<br /><br />"; + } + + $sql = "UPDATE " . $table_prefix . "users + SET user_regdate = " . time(); + if (!$db->sql_query($sql)) + { + $error .= "Could not update user_regdate :: " . $sql . " :: " . __LINE__ . " :: " . __FILE__ . "<br /><br />"; + } + + if ($error != '') + { + page_header($lang['Install'], ''); + page_error($lang['Installer_Error'], $lang['Install_db_error'] . '<br /><br />' . $error); + page_footer(); + exit; + } + } + + if (!$upgrade_now) + { + // Write out the config file. + $config_data = '<?php'."\n\n"; + $config_data .= "\n// phpBB 2.x auto-generated config file\n// Do not change anything in this file!\n\n"; + $config_data .= '$dbms = \'' . $dbms . '\';' . "\n\n"; + $config_data .= '$dbhost = \'' . $dbhost . '\';' . "\n"; + $config_data .= '$dbname = \'' . $dbname . '\';' . "\n"; + $config_data .= '$dbuser = \'' . $dbuser . '\';' . "\n"; + $config_data .= '$dbpasswd = \'' . $dbpasswd . '\';' . "\n\n"; + $config_data .= '$table_prefix = \'' . $table_prefix . '\';' . "\n\n"; + $config_data .= 'define(\'PHPBB_INSTALLED\', true);'."\n\n"; + $config_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused! + + @umask(0111); + $no_open = FALSE; + + // Unable to open the file writeable do something here as an attempt + // to get around that... + if (!($fp = @fopen($phpbb_root_path . 'config.'.$phpEx, 'w'))) + { + $s_hidden_fields = '<input type="hidden" name="config_data" value="' . htmlspecialchars($config_data) . '" />'; + + if (@extension_loaded('ftp') && !defined('NO_FTP')) + { + page_header($lang['Unwriteable_config'] . '<p>' . $lang['ftp_option'] . '</p>'); + +?> + <tr> + <th colspan="2"><?php echo $lang['ftp_choose']; ?></th> + </tr> + <tr> + <td class="row1" align="right" width="50%"><span class="gen"><?php echo $lang['Attempt_ftp']; ?></span></td> + <td class="row2"><input type="radio" name="send_file" value="2"></td> + </tr> + <tr> + <td class="row1" align="right" width="50%"><span class="gen"><?php echo $lang['Send_file']; ?></span></td> + <td class="row2"><input type="radio" name="send_file" value="1"></td> + </tr> +<?php + + } + else + { + page_header($lang['Unwriteable_config']); + $s_hidden_fields .= '<input type="hidden" name="send_file" value="1" />'; + } + + if ($upgrade == 1) + { + $s_hidden_fields .= '<input type="hidden" name="upgrade" value="1" />'; + $s_hidden_fields .= '<input type="hidden" name="dbms" value="'.$dbms.'" />'; + $s_hidden_fields .= '<input type="hidden" name="prefix" value="'.$table_prefix.'" />'; + $s_hidden_fields .= '<input type="hidden" name="dbhost" value="'.$dbhost.'" />'; + $s_hidden_fields .= '<input type="hidden" name="dbname" value="'.$dbname.'" />'; + $s_hidden_fields .= '<input type="hidden" name="dbuser" value="'.$dbuser.'" />'; + $s_hidden_fields .= '<input type="hidden" name="dbpasswd" value="'.$dbpasswd.'" />'; + $s_hidden_fields .= '<input type="hidden" name="install_step" value="1" />'; + $s_hidden_fields .= '<input type="hidden" name="admin_pass1" value="1" />'; + $s_hidden_fields .= '<input type="hidden" name="admin_pass2" value="1" />'; + $s_hidden_fields .= '<input type="hidden" name="server_port" value="'.$server_port.'" />'; + $s_hidden_fields .= '<input type="hidden" name="server_name" value="'.$server_name.'" />'; + $s_hidden_fields .= '<input type="hidden" name="script_path" value="'.$script_path.'" />'; + $s_hidden_fields .= '<input type="hidden" name="board_email" value="'.$board_email.'" />'; + + page_upgrade_form(); + + } + else + { + page_common_form($s_hidden_fields, $lang['Download_config']); + } + + page_footer(); + exit; + } + + $result = @fputs($fp, $config_data, strlen($config_data)); + + @fclose($fp); + $upgrade_now = $lang['upgrade_submit']; + } + + // First off let's check and see if we are supposed to be doing an upgrade. + if ($upgrade == 1 && $upgrade_now == $lang['upgrade_submit']) + { + define('INSTALLING', true); + require('upgrade.'.$phpEx); + exit; + } + + // Ok we are basically done with the install process let's go on + // and let the user configure their board now. We are going to do + // this by calling the admin_board.php from the normal board admin + // section. + $s_hidden_fields = '<input type="hidden" name="username" value="' . $admin_name . '" />'; + $s_hidden_fields .= '<input type="hidden" name="password" value="' . $admin_pass1 . '" />'; + $s_hidden_fields .= '<input type="hidden" name="redirect" value="admin/index.'.$phpEx.'" />'; + $s_hidden_fields .= '<input type="hidden" name="login" value="true" />'; + + page_header($lang['Inst_Step_2'], '../login.'.$phpEx); + page_common_form($s_hidden_fields, $lang['Finish_Install']); + page_footer(); + exit; + } +} + +?> Added: main/trunk/install/schemas/index.htm =================================================================== --- main/trunk/install/schemas/index.htm (rev 0) +++ main/trunk/install/schemas/index.htm 2007-04-15 02:51:17 UTC (rev 286) @@ -0,0 +1,10 @@ +<html> +<head> +<title></title> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +</head> + +<body bgcolor="#FFFFFF" text="#000000"> + +</body> +</html> Added: main/trunk/install/schemas/ms_access_primer.zip =================================================================== (Binary files differ) Property changes on: main/trunk/install/schemas/ms_access_primer.zip ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: main/trunk/install/schemas/mssql_basic.sql =================================================================== --- main/trunk/install/schemas/mssql_basic.sql (rev 0) +++ main/trunk/install/schemas/mssql_basic.sql 2007-04-15 02:51:17 UTC (rev 286) @@ -0,0 +1,254 @@ +/* + + Basic DB data for phpBB2 devel (MSSQL) + + $Id: mssql_basic.sql,v 1.1.2.28 2006/12/16 13:11:27 acydburn Exp $ + +*/ + +BEGIN TRANSACTION; + +/* + -- Config +*/ +INSERT INTO phpbb_config (config_name, config_value) VALUES ('config_id','1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('sitename','yourdomain.com'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('site_desc','A _little_ text to describe your forum'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_name','phpbb2mysql'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_path','/'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_domain',''); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_secure','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_length','3600'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_html','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_html_tags','b,i,u,pre'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bbcode','1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_smilies','1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig','1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_namechange','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_theme_create','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_local','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remote','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page','15'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page','50'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold','25'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_poll_options','10'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_chars','255'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_inbox_privmsgs','50'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sentbox_privmsgs','25'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_savebox_privmsgs','50'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_sig','Thanks, The Management'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email','you...@yo...'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_autologin','1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_autologin_time','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_delivery','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host',''); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username',''); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password',''); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('sendmail_fix','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval','15'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_flood_interval','15'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_min_chars','3'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_login_attempts', '5'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('login_reset_time', '30'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_filesize','6144'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width','80'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_height','80'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_path','images/avatars'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_gallery_path','images/avatars/gallery'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('smilies_path','images/smiles'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style','1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_dateformat','D M d, Y g:i a'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('prune_enable','1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('privmsg_disable','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_fax', ''); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_mail', ''); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_users', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.yourdomain.tld'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.22'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('rand_seed', '0'); + +/* + -- Categories +*/ +SET IDENTITY_INSERT phpbb_categories ON; + +INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 1); + +SET IDENTITY_INSERT phpbb_categories OFF; + + +/* + -- Forums +*/ +INSERT INTO phpbb_forums (forum_id, cat_id, forum_name, forum_desc, forum_status, forum_order, forum_posts, forum_topics, forum_last_post_id, prune_next, prune_enable, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 1, 'Test Forum 1', 'This is just a test forum, nothing special here.', '', 1, 1, 1, 1, '', 1, '', '', 1, 1, 1, 1, 3, 3, 1, 1, 3); + +/* + -- Users + Default Admin --> username: admin + password: admin (change this or remove it once everything is working!) +*/ +INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 1, 1, 0, 1, 1, NULL, '', '', 0, '', '', '', 0, 0); +INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_popup_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( 2, 'Admin', 1, 0, '21232f297a57a5a743894a0e4a801fc3', 'ad...@yo...', '', '', '', '', '', '', 1, 1, '', '', '', 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, '', 'english', 0, 'd M Y h:i a', '', '', 0, 1); + + +/* + -- Ranks +*/ +SET IDENTITY_INSERT phpbb_ranks ON; + +INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES (1, 'Site Admin', -1, 1, ''); + +SET IDENTITY_INSERT phpbb_ranks OFF; + + +/* + -- Groups +*/ +SET IDENTITY_INSERT phpbb_groups ON; + +INSERT INTO phpbb_groups (group_id, group_type, group_name, group_description, group_moderator, group_single_user) VALUES (1, 1, 'Anonymous', 'Personal User', '', 1); +INSERT INTO phpbb_groups (group_id, group_type, group_name, group_description, group_moderator, group_single_user) VALUES (2, 1, 'Admin', 'Personal User', '', 1); + +SET IDENTITY_INSERT phpbb_groups OFF; + +/* + -- User -> Group +*/ +INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (1, -1, ''); +INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (2, 2, ''); + + +/* + -- Demo Topic +*/ +SET IDENTITY_INSERT phpbb_topics ON; + +INSERT INTO phpbb_topics (topic_id, topic_title, topic_poster, topic_time, topic_views, topic_replies, forum_id, topic_status, topic_type, topic_vote, topic_first_post_id, topic_last_post_id, topic_moved_id) VALUES (1, 'Welcome to phpBB 2', 2, '972086460', 0, 0, 1, 0, 0, 0, 1, 1, ''); + +SET IDENTITY_INSERT phpbb_topics OFF; + + +/* + -- Demo Post +*/ +SET IDENTITY_INSERT phpbb_posts ON; + +INSERT INTO phpbb_posts (post_id, topic_id, forum_id, poster_id, post_time, post_username, poster_ip) VALUES (1, 1, 1, 2, 972086460, NULL, '7F000001'); +INSERT INTO phpbb_posts_text (post_id, post_subject, post_text) VALUES (1, NULL, 'This is an example post in your phpBB 2 installation. You may delete this post, this topic and even this forum if you like since everything seems to be working!'); + +SET IDENTITY_INSERT phpbb_posts OFF; + + +/* + -- Themes +*/ +SET IDENTITY_INSERT phpbb_themes ON; + +INSERT INTO phpbb_themes (themes_id, template_name, style_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (1, 'subSilver', 'subSilver', 'subSilver.css', '', 'E5E5E5', '000000', '006699', '5493B4', '', 'DD6900', 'EFEFEF', 'DEE3E7', 'D1D7DC', '', '', '', '98AAB1', '006699', 'FFFFFF', 'cellpic1.gif', 'cellpic3.gif', 'cellpic2.jpg', 'FAFAFA', 'FFFFFF', '', 'row1', 'row2', '', 'Verdana, Arial, Helvetica, sans-serif', 'Trebuchet MS', 'Courier, ''Courier New'', sans-serif', 10, 11, 12, '444444', '006600', 'FFA34F', '', '', ''); + +SET IDENTITY_INSERT phpbb_themes OFF; + +INSERT INTO phpbb_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, tr_class1_name, tr_class2_name, tr_class3_name, th_color1_name, th_color2_name, th_color3_name, th_class1_name, th_class2_name, th_class3_name, td_color1_name, td_color2_name, td_color3_name, td_class1_name, td_class2_name, td_class3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, span_class1_name, span_class2_name, span_class3_name) VALUES (1, 'The lightest row colour', 'The medium row color', 'The darkest row colour', '', '', '', 'Border round the whole page', 'Outer table border', 'Inner table border', 'Silver gradient picture', 'Blue gradient picture', 'Fade-out gradient on index', 'Background for quote boxes', 'All white areas', '', 'Background for topic posts', '2nd background for topic posts', '', 'Main fonts', 'Additional topic title font', 'Form fonts', 'Smallest font size', 'Medium font size', 'Normal font size (post body etc)', 'Quote & copyright text', 'Code text colour', 'Main table header text colour', '', '', ''); + + +/* + -- Smilies +*/ +SET IDENTITY_INSERT phpbb_smilies ON; + +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 1, ':D', 'icon_biggrin.gif', 'Very Happy'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 2, ':-D', 'icon_biggrin.gif', 'Very Happy'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 3, ':grin:', 'icon_biggrin.gif', 'Very Happy'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 4, ':)', 'icon_smile.gif', 'Smile'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 5, ':-)', 'icon_smile.gif', 'Smile'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 6, ':smile:', 'icon_smile.gif', 'Smile'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 7, ':(', 'icon_sad.gif', 'Sad'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 8, ':-(', 'icon_sad.gif', 'Sad'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 9, ':sad:', 'icon_sad.gif', 'Sad'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 10, ':o', 'icon_surprised.gif', 'Surprised'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 11, ':-o', 'icon_surprised.gif', 'Surprised'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 12, ':eek:', 'icon_surprised.gif', 'Surprised'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, ':shock:', 'icon_eek.gif', 'Shocked'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, ':?', 'icon_confused.gif', 'Confused'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':-?', 'icon_confused.gif', 'Confused'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':???:', 'icon_confused.gif', 'Confused'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, '8)', 'icon_cool.gif', 'Cool'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, '8-)', 'icon_cool.gif', 'Cool'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, ':cool:', 'icon_cool.gif', 'Cool'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, ':lol:', 'icon_lol.gif', 'Laughing'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':x', 'icon_mad.gif', 'Mad'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':-x', 'icon_mad.gif', 'Mad'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':mad:', 'icon_mad.gif', 'Mad'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':P', 'icon_razz.gif', 'Razz'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':-P', 'icon_razz.gif', 'Razz'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':razz:', 'icon_razz.gif', 'Razz'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':oops:', 'icon_redface.gif', 'Embarassed'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':cry:', 'icon_cry.gif', 'Crying or Very sad'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':evil:', 'icon_evil.gif', 'Evil or Very Mad'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':twisted:', 'icon_twisted.gif', 'Twisted Evil'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':wink:', 'icon_wink.gif', 'Wink'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ';)', 'icon_wink.gif', 'Wink'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ';-)', 'icon_wink.gif', 'Wink'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ':!:', 'icon_exclaim.gif', 'Exclamation'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ':?:', 'icon_question.gif', 'Question'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':idea:', 'icon_idea.gif', 'Idea'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':arrow:', 'icon_arrow.gif', 'Arrow'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':|', 'icon_neutral.gif', 'Neutral'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':-|', 'icon_neutral.gif', 'Neutral'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':neutral:', 'icon_neutral.gif', 'Neutral'); +INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green'); + +SET IDENTITY_INSERT phpbb_smilies OFF; + + +/* + -- Search Words +*/ +SET IDENTITY_INSERT phpbb_search_wordlist ON; + +INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 1, 'example', 0 ); +INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 2, 'post', 0 ); +INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 3, 'phpbb', 0 ); +INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 4, 'installation', 0 ); +INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 5, 'delete', 0 ); +INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 6, 'topic', 0 ); +INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 7, 'forum', 0 ); +INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 8, 'since', 0 ); +INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 9, 'everything', 0 ); +INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 10, 'seems', 0 ); +INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 11, 'working', 0 ); +INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 12, 'welcome', 0 ); + +SET IDENTITY_INSERT phpbb_search_wordlist OFF; + + +/* + -- Search Word Matches +*/ +INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 1, 1, 0 ); +INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 2, 1, 0 ); +INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 0 ); +INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 4, 1, 0 ); +INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 5, 1, 0 ); +INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 6, 1, 0 ); +INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 7, 1, 0 ); +INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 8, 1, 0 ); +INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 9, 1, 0 ); +INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 10, 1, 0 ); +INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 11, 1, 0 ); +INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 12, 1, 1 ); +INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 1 ); + +COMMIT; \ No newline at end of file Added: main/trunk/install/schemas/mssql_schema.sql =================================================================== --- main/trunk/install/schemas/mssql_schema.sql (rev 0) +++ main/trunk/install/schemas/mssql_schema.sql 2007-04-15 02:51:17 UTC (rev 286) @@ -0,0 +1,722 @@ +/* + + mssql_schema.sql for phpBB2 (c) 2001, phpBB Group + + $Id: mssql_schema.sql,v 1.1.2.12 2006/02/06 21:32:42 grahamje Exp $ + +*/ + +BEGIN TRANSACTION +GO + +CREATE TABLE [phpbb_auth_access] ( + [group_id] [int] NULL , + [forum_id] [int] NULL , + [auth_view] [smallint] NOT NULL , + [auth_read] [smallint] NOT NULL , + [auth_post] [smallint] NOT NULL , + [auth_reply] [smallint] NOT NULL , + [auth_edit] [smallint] NOT NULL , + [auth_delete] [smallint] NOT NULL , + [auth_sticky] [smallint] NOT NULL , + [auth_announce] [smallint] NOT NULL , + [auth_vote] [smallint] NOT NULL , + [auth_pollcreate] [smallint] NOT NULL , + [auth_attachments] [smallint] NOT NULL , + [auth_mod] [smallint] NOT NULL +) ON [PRIMARY] +GO + +CREATE TABLE [phpbb_banlist] ( + [ban_id] [int] IDENTITY (1, 1) NOT NULL , + [ban_userid] [int] NULL , + [ban_ip] [char] (8) NULL , + [ban_email] [varchar] (50) NULL +) ON [PRIMARY] +GO + +CREATE TABLE [phpbb_categories] ( + [cat_id] [int] IDENTITY (1, 1) NOT NULL , + [cat_title] [varchar] (50) NOT NULL , + [cat_order] [int] NOT NULL +) ON [PRIMARY] +GO + +CREATE TABLE [phpbb_config] ( + [config_name] [varchar] (255) NULL , + [config_value] [varchar] (255) NULL +) ON [PRIMARY] +GO + + +CREATE TABLE [phpbb_confirm] ( + [confirm_id] [char] (32) NOT NULL , + [session_id] [char] (32) NOT NULL , + [code] [char] (6) NOT NULL +) ON [PRIMARY] +GO + +CREATE TABLE [phpbb_disallow] ( + [disallow_id] [int] IDENTITY (1, 1) NOT NULL , + [disallow_username] [varchar] (100) NULL +) ON [PRIMARY] +GO + +CREATE TABLE [phpbb_forum_prune] ( + [prune_id] [int] IDENTITY (1, 1) NOT NULL , + [forum_id] [int] NOT NULL , + [prune_days] [int] NOT NULL , + [prune_freq] [int] NOT NULL +) ON [PRIMARY] +GO + +CREATE TABLE [phpbb_forums] ( + [forum_id] [int] NOT NULL ,... [truncated message content] |
From: <nox...@us...> - 2007-04-14 02:22:56
|
Revision: 285 http://svn.sourceforge.net/phpbbreloaded/?rev=285&view=rev Author: noxwizard979 Date: 2007-04-13 19:22:57 -0700 (Fri, 13 Apr 2007) Log Message: ----------- Added Paths: ----------- main/trunk/config.php Added: main/trunk/config.php =================================================================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <teh...@us...> - 2007-04-13 22:50:02
|
Revision: 283 http://svn.sourceforge.net/phpbbreloaded/?rev=283&view=rev Author: tehphpmaster Date: 2007-04-13 15:50:02 -0700 (Fri, 13 Apr 2007) Log Message: ----------- Clearing out the trunk... Removed Paths: ------------- main/trunk/admin/ main/trunk/cache/ main/trunk/common.php main/trunk/config.php main/trunk/db/ main/trunk/extension.inc main/trunk/extras/ main/trunk/extras_config.php main/trunk/faq.php main/trunk/groupcp.php main/trunk/images/ main/trunk/includes/ main/trunk/index.php main/trunk/install/ main/trunk/language/ main/trunk/login.php main/trunk/memberlist.php main/trunk/modcp.php main/trunk/posting.php main/trunk/privmsg.php main/trunk/profile.php main/trunk/search.php main/trunk/templates/ main/trunk/viewforum.php main/trunk/viewonline.php main/trunk/viewtopic.php Deleted: main/trunk/common.php =================================================================== --- main/trunk/common.php 2006-12-31 16:08:16 UTC (rev 282) +++ main/trunk/common.php 2007-04-13 22:50:02 UTC (rev 283) @@ -1,253 +0,0 @@ -<?php -/*************************************************************************** - * common.php - * ------------------- - * begin : Saturday, Feb 23, 2001 - * copyright : (C) 2001 The phpBB Group - * email : su...@ph... - * - * $Id: common.php,v 1.74.2.25 2006/05/26 17:46:59 grahamje Exp $ - * - ***************************************************************************/ - -/*************************************************************************** - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - ***************************************************************************/ - -if ( !defined('IN_PHPBB') ) -{ - die("Hacking attempt"); -} - -// -error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables -set_magic_quotes_runtime(0); // Disable magic_quotes_runtime - -// The following code (unsetting globals) -// Thanks to Matt Kavanagh and Stefan Esser for providing feedback as well as patch files - -// PHP5 with register_long_arrays off? -if (@phpversion() >= '5.0.0' && (!@ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off')) -{ - $HTTP_POST_VARS = $_POST; - $HTTP_GET_VARS = $_GET; - $HTTP_SERVER_VARS = $_SERVER; - $HTTP_COOKIE_VARS = $_COOKIE; - $HTTP_ENV_VARS = $_ENV; - $HTTP_POST_FILES = $_FILES; - - // _SESSION is the only superglobal which is conditionally set - if (isset($_SESSION)) - { - $HTTP_SESSION_VARS = $_SESSION; - } -} - -// Protect against GLOBALS tricks -if (isset($HTTP_POST_VARS['GLOBALS']) || isset($HTTP_POST_FILES['GLOBALS']) || isset($HTTP_GET_VARS['GLOBALS']) || isset($HTTP_COOKIE_VARS['GLOBALS'])) -{ - die("Hacking attempt"); -} - -// Protect against HTTP_SESSION_VARS tricks -if (isset($HTTP_SESSION_VARS) && !is_array($HTTP_SESSION_VARS)) -{ - die("Hacking attempt"); -} - -if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') -{ - // PHP4+ path - $not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path'); - - // Not only will array_merge give a warning if a parameter - // is not an array, it will actually fail. So we check if - // HTTP_SESSION_VARS has been initialised. - if (!isset($HTTP_SESSION_VARS) || !is_array($HTTP_SESSION_VARS)) - { - $HTTP_SESSION_VARS = array(); - } - - // Merge all into one extremely huge array; unset - // this later - $input = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES); - - unset($input['input']); - unset($input['not_unset']); - - while (list($var,) = @each($input)) - { - if (in_array($var, $not_unset)) - { - die('Hacking attempt!'); - } - unset($$var); - } - - unset($input); -} - -// -// addslashes to vars if magic_quotes_gpc is off -// this is a security precaution to prevent someone -// trying to break out of a SQL statement. -// -if( !get_magic_quotes_gpc() ) -{ - if( is_array($HTTP_GET_VARS) ) - { - while( list($k, $v) = each($HTTP_GET_VARS) ) - { - if( is_array($HTTP_GET_VARS[$k]) ) - { - while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) ) - { - $HTTP_GET_VARS[$k][$k2] = addslashes($v2); - } - @reset($HTTP_GET_VARS[$k]); - } - else - { - $HTTP_GET_VARS[$k] = addslashes($v); - } - } - @reset($HTTP_GET_VARS); - } - - if( is_array($HTTP_POST_VARS) ) - { - while( list($k, $v) = each($HTTP_POST_VARS) ) - { - if( is_array($HTTP_POST_VARS[$k]) ) - { - while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) ) - { - $HTTP_POST_VARS[$k][$k2] = addslashes($v2); - } - @reset($HTTP_POST_VARS[$k]); - } - else - { - $HTTP_POST_VARS[$k] = addslashes($v); - } - } - @reset($HTTP_POST_VARS); - } - - if( is_array($HTTP_COOKIE_VARS) ) - { - while( list($k, $v) = each($HTTP_COOKIE_VARS) ) - { - if( is_array($HTTP_COOKIE_VARS[$k]) ) - { - while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) ) - { - $HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2); - } - @reset($HTTP_COOKIE_VARS[$k]); - } - else - { - $HTTP_COOKIE_VARS[$k] = addslashes($v); - } - } - @reset($HTTP_COOKIE_VARS); - } -} - -// -// Define some basic configuration arrays this also prevents -// malicious rewriting of language and otherarray values via -// URI params -// -$board_config = array(); -$userdata = array(); -$theme = array(); -$images = array(); -$lang = array(); -$nav_links = array(); -$dss_seeded = false; -$gen_simple_header = FALSE; - -include($phpbb_root_path . 'config.'.$phpEx); - -/******************************************************************************* - * Include support for phpBBreloaded extra packages now. - ******************************************************************************/ -include($phpbb_root_path . 'extras_config.'.$phpEx); - -if( !defined("PHPBB_INSTALLED") ) -{ - header('Location: ' . $phpbb_root_path . 'install/install.' . $phpEx); - exit; -} - -include($phpbb_root_path . 'includes/constants.'.$phpEx); -include($phpbb_root_path . 'includes/template.'.$phpEx); -include($phpbb_root_path . 'includes/sessions.'.$phpEx); -include($phpbb_root_path . 'includes/auth.'.$phpEx); -include($phpbb_root_path . 'includes/functions.'.$phpEx); -include($phpbb_root_path . 'includes/db.'.$phpEx); - -/******************************************************************************* - * If specified, include the 'Bad Behaviour' code now... - * http://homelandstupidity.us/software/bad-behavior/ - * I have placed this here as I may want access to the db functions later in - * order to utilise the Bad Behaviour logging. For now it's a simple spam - * blocker! - ******************************************************************************/ -if(defined('BAD_BEHAVIOUR_ROOT')) -{ - include(BAD_BEHAVIOUR_ROOT . 'bad-behavior-phpBBreloaded.'.$phpEx); -} - -// We do not need this any longer, unset for safety purposes -unset($dbpasswd); - -// -// Obtain and encode users IP -// -// I'm removing HTTP_X_FORWARDED_FOR ... this may well cause other problems such as -// private range IP's appearing instead of the guilty routable IP, tough, don't -// even bother complaining ... go scream and shout at the idiots out there who feel -// "clever" is doing harm rather than good ... karma is a great thing ... :) -// -$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : getenv('REMOTE_ADDR') ); -$user_ip = encode_ip($client_ip); - -// -// Setup forum wide options, if this fails -// then we output a CRITICAL_ERROR since -// basic forum information is not available -// -$sql = "SELECT * - FROM " . CONFIG_TABLE; -if( !($result = $db->sql_query($sql)) ) -{ - message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql); -} - -while ( $row = $db->sql_fetchrow($result) ) -{ - $board_config[$row['config_name']] = $row['config_value']; -} - -if (file_exists('install') || file_exists('contrib')) -{ - message_die(GENERAL_MESSAGE, 'Please_remove_install_contrib'); -} - -// -// Show 'Board is disabled' message if needed. -// -if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") ) -{ - message_die(GENERAL_MESSAGE, 'Board_disable', 'Information'); -} - -?> \ No newline at end of file Deleted: main/trunk/config.php =================================================================== Deleted: main/trunk/extension.inc =================================================================== --- main/trunk/extension.inc 2006-12-31 16:08:16 UTC (rev 282) +++ main/trunk/extension.inc 2007-04-13 22:50:02 UTC (rev 283) @@ -1,26 +0,0 @@ -<?php -/*************************************************************************** - * extension.inc - * ------------------- - * begin : Saturday, Feb 13, 2001 - * copyright : (C) 2001 The phpBB Group - * email : su...@ph... - * - * $Id: extension.inc,v 1.5 2002/04/04 11:52:50 psotfx Exp $ - * - * - ***************************************************************************/ - -if ( !defined('IN_PHPBB') ) -{ - die("Hacking attempt"); -} - -// -// Change this if your extension is not .php! -// -$phpEx = "php"; - -$starttime = 0; - -?> \ No newline at end of file Deleted: main/trunk/extras_config.php =================================================================== --- main/trunk/extras_config.php 2006-12-31 16:08:16 UTC (rev 282) +++ main/trunk/extras_config.php 2007-04-13 22:50:02 UTC (rev 283) @@ -1,68 +0,0 @@ -<?php -/******************************************************************************* - * extras_config.php - * ------------------- - * begin : Sunday, Dec 31, 2006 - * copyright : (C) 2006 The phpBBreloaded Group - * website : www.phpbbreloaded.org - * - * $Id: extras_config.php,v 1.0 2006/12/30 14:46:59 mjnr Exp $ - * - ******************************************************************************/ - -/******************************************************************************* - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - ******************************************************************************/ - -/******************************************************************************* - * Use this file to configure the basics for using any phpBBreloaded 'extras', - * such as location, whether to use, etc.. - * - * My suggestion is to only use the 'extras' section/folder to store addins - * that are developed independantly from the phpBBreloaded core. This will give - * us an easy avenue into package management in the future for easy upgrades - * to our users as these packages are upgraded indendantly of the main - * phpBBreloaded source. - * - * This file is included from ./common.php so you should not have to - * specifically link to it unless you're doiing something funky. In which case - * make sure you have defined 'IN_PHPBB' first! - * - * MJ 20061231 - ******************************************************************************/ - -if ( !defined('IN_PHPBB') ) -{ - die("Hacking attempt"); -} - -/******************************************************************************* - * Comment out this definition to disable the Bad Behaviour anti spam-bot - * module. Otherwise, use this definition to point to the location of the - * Bad Behaviour root folder. - * NOTE: I can only presume behavior is how they spell it in America. In - * terms of the definitions I will use the British way. In all other aspects - * (the directory structure etc.) I will use the American way. This should - * allow easy package upgrades. - ******************************************************************************/ -define('BAD_BEHAVIOUR_ROOT', $phpbb_root_path . 'extras/Bad-Behavior/'); - -/******************************************************************************* - * Comment out this definition to disable the !!HIGHLY ALPHA!! XML module - * being developed by mjnr <mailto:mj...@us...>. Otherwise use - * this definition to point to the location of the XML root folder. - ******************************************************************************/ -//define('MJS_XML_ROOT', $phpbb_root_path . 'extras/mjsXML/'); - -/******************************************************************************* - * Comment out this definition to disable the !!HIGHLY ALPHA!! package - * management modules. - * TODO: Integrate the package manager into the admin console? - ******************************************************************************/ -//define('PPM_LIB', $phpbb_root_path . 'includes/ppm_lib.'.$phpEx); -?> \ No newline at end of file Deleted: main/trunk/faq.php =================================================================== --- main/trunk/faq.php 2006-12-31 16:08:16 UTC (rev 282) +++ main/trunk/faq.php 2007-04-13 22:50:02 UTC (rev 283) @@ -1,150 +0,0 @@ -<?php -/*************************************************************************** - * faq.php - * ------------------- - * begin : Sunday, Jul 8, 2001 - * copyright : (C) 2001 The phpBB Group - * email : su...@ph... - * - * $Id: faq.php,v 1.14.2.2 2004/07/11 16:46:15 acydburn Exp $ - * - * - ***************************************************************************/ - -/*************************************************************************** - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - ***************************************************************************/ - -define('IN_PHPBB', true); -$phpbb_root_path = './'; -include($phpbb_root_path . 'extension.inc'); -include($phpbb_root_path . 'common.'.$phpEx); - -// -// Start session management -// -$userdata = session_pagestart($user_ip, PAGE_FAQ); -init_userprefs($userdata); -// -// End session management -// - -// Set vars to prevent naughtiness -$faq = array(); - -// -// Load the appropriate faq file -// -if( isset($HTTP_GET_VARS['mode']) ) -{ - switch( $HTTP_GET_VARS['mode'] ) - { - case 'bbcode': - $lang_file = 'lang_bbcode'; - $l_title = $lang['BBCode_guide']; - break; - default: - $lang_file = 'lang_faq'; - $l_title = $lang['FAQ']; - break; - } -} -else -{ - $lang_file = 'lang_faq'; - $l_title = $lang['FAQ']; -} -include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx); - -// -// Pull the array data from the lang pack -// -$j = 0; -$counter = 0; -$counter_2 = 0; -$faq_block = array(); -$faq_block_titles = array(); - -for($i = 0; $i < count($faq); $i++) -{ - if( $faq[$i][0] != '--' ) - { - $faq_block[$j][$counter]['id'] = $counter_2; - $faq_block[$j][$counter]['question'] = $faq[$i][0]; - $faq_block[$j][$counter]['answer'] = $faq[$i][1]; - - $counter++; - $counter_2++; - } - else - { - $j = ( $counter != 0 ) ? $j + 1 : 0; - - $faq_block_titles[$j] = $faq[$i][1]; - - $counter = 0; - } -} - -// -// Lets build a page ... -// -$page_title = $l_title; -include($phpbb_root_path . 'includes/page_header.'.$phpEx); - -$template->set_filenames(array( - 'body' => 'faq_body.tpl') -); -make_jumpbox('viewforum.'.$phpEx); - -$template->assign_vars(array( - 'L_FAQ_TITLE' => $l_title, - 'L_BACK_TO_TOP' => $lang['Back_to_top']) -); - -for($i = 0; $i < count($faq_block); $i++) -{ - if( count($faq_block[$i]) ) - { - $template->assign_block_vars('faq_block', array( - 'BLOCK_TITLE' => $faq_block_titles[$i]) - ); - $template->assign_block_vars('faq_block_link', array( - 'BLOCK_TITLE' => $faq_block_titles[$i]) - ); - - for($j = 0; $j < count($faq_block[$i]); $j++) - { - $row_color = ( !($j % 2) ) ? $theme['td_color1'] : $theme['td_color2']; - $row_class = ( !($j % 2) ) ? $theme['td_class1'] : $theme['td_class2']; - - $template->assign_block_vars('faq_block.faq_row', array( - 'ROW_COLOR' => '#' . $row_color, - 'ROW_CLASS' => $row_class, - 'FAQ_QUESTION' => $faq_block[$i][$j]['question'], - 'FAQ_ANSWER' => $faq_block[$i][$j]['answer'], - - 'U_FAQ_ID' => $faq_block[$i][$j]['id']) - ); - - $template->assign_block_vars('faq_block_link.faq_row_link', array( - 'ROW_COLOR' => '#' . $row_color, - 'ROW_CLASS' => $row_class, - 'FAQ_LINK' => $faq_block[$i][$j]['question'], - - 'U_FAQ_LINK' => '#' . $faq_block[$i][$j]['id']) - ); - } - } -} - -$template->pparse('body'); - -include($phpbb_root_path . 'includes/page_tail.'.$phpEx); - -?> \ No newline at end of file Deleted: main/trunk/groupcp.php =================================================================== --- main/trunk/groupcp.php 2006-12-31 16:08:16 UTC (rev 282) +++ main/trunk/groupcp.php 2007-04-13 22:50:02 UTC (rev 283) @@ -1,1284 +0,0 @@ -<?php -/*************************************************************************** - * groupcp.php - * ------------------- - * begin : Saturday, Feb 13, 2001 - * copyright : (C) 2001 The phpBB Group - * email : su...@ph... - * - * $Id: groupcp.php,v 1.58.2.27 2006/12/16 13:11:24 acydburn Exp $ - * - * - ***************************************************************************/ - -/*************************************************************************** - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - ***************************************************************************/ - -define('IN_PHPBB', true); -$phpbb_root_path = './'; -include($phpbb_root_path . 'extension.inc'); -include($phpbb_root_path . 'common.'.$phpEx); - -// ------------------------- -// -function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$joined, &$poster_avatar, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www, &$icq_status_img, &$icq_img, &$icq, &$aim_img, &$aim, &$msn_img, &$msn, &$yim_img, &$yim) -{ - global $lang, $images, $board_config, $phpEx; - - $from = ( !empty($row['user_from']) ) ? $row['user_from'] : ' '; - $joined = create_date($date_format, $row['user_regdate'], $board_config['board_timezone']); - $posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0; - - $poster_avatar = ''; - if ( $row['user_avatar_type'] && $row['user_id'] != ANONYMOUS && $row['user_allowavatar'] ) - { - switch( $row['user_avatar_type'] ) - { - case USER_AVATAR_UPLOAD: - $poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : ''; - break; - case USER_AVATAR_REMOTE: - $poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $row['user_avatar'] . '" alt="" border="0" />' : ''; - break; - case USER_AVATAR_GALLERY: - $poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : ''; - break; - } - } - - if ( !empty($row['user_viewemail']) || $group_mod ) - { - $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $row['user_id']) : 'mailto:' . $row['user_email']; - - $email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>'; - $email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>'; - } - else - { - $email_img = ' '; - $email = ' '; - } - - $temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']); - $profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>'; - $profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>'; - - $temp_url = append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=" . $row['user_id']); - $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>'; - $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>'; - - $www_img = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : ''; - $www = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : ''; - - if ( !empty($row['user_icq']) ) - { - $icq_status_img = '<a href="http://wwp.icq.com/' . $row['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>'; - $icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>'; - $icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $lang['ICQ'] . '</a>'; - } - else - { - $icq_status_img = ''; - $icq_img = ''; - $icq = ''; - } - - $aim_img = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : ''; - $aim = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : ''; - - $temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']); - $msn_img = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '"><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : ''; - $msn = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : ''; - - $yim_img = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : ''; - $yim = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : ''; - - $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($row['username']) . "&showresults=posts"); - $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $row['username']) . '" title="' . sprintf($lang['Search_user_posts'], $row['username']) . '" border="0" /></a>'; - $search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $row['username']) . '</a>'; - - return; -} -// -// -------------------------- - -// -// Start session management -// -$userdata = session_pagestart($user_ip, PAGE_GROUPCP); -init_userprefs($userdata); -// -// End session management -// - -$script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])); -$script_name = ( $script_name != '' ) ? $script_name . '/groupcp.'.$phpEx : 'groupcp.'.$phpEx; -$server_name = trim($board_config['server_name']); -$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://'; -$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/'; - -$server_url = $server_protocol . $server_name . $server_port . $script_name; - -if ( isset($HTTP_GET_VARS[POST_GROUPS_URL]) || isset($HTTP_POST_VARS[POST_GROUPS_URL]) ) -{ - $group_id = ( isset($HTTP_POST_VARS[POST_GROUPS_URL]) ) ? intval($HTTP_POST_VARS[POST_GROUPS_URL]) : intval($HTTP_GET_VARS[POST_GROUPS_URL]); -} -else -{ - $group_id = ''; -} - -if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) ) -{ - $mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; - $mode = htmlspecialchars($mode); -} -else -{ - $mode = ''; -} - -$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : 0; -$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : 0; - -$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0; -$start = ($start < 0) ? 0 : $start; - -// -// Default var values -// -$is_moderator = FALSE; - -if ( isset($HTTP_POST_VARS['groupstatus']) && $group_id ) -{ - if ( !$userdata['session_logged_in'] ) - { - redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); - } - - $sql = "SELECT group_moderator - FROM " . GROUPS_TABLE . " - WHERE group_id = $group_id"; - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, 'Could not obtain user and group information', '', __LINE__, __FILE__, $sql); - } - - $row = $db->sql_fetchrow($result); - - if ( $row['group_moderator'] != $userdata['user_id'] && $userdata['user_level'] != ADMIN ) - { - $template->assign_vars(array( - 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">') - ); - - $message = $lang['Not_group_moderator'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>'); - - message_die(GENERAL_MESSAGE, $message); - } - - $sql = "UPDATE " . GROUPS_TABLE . " - SET group_type = " . intval($HTTP_POST_VARS['group_type']) . " - WHERE group_id = $group_id"; - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, 'Could not obtain user and group information', '', __LINE__, __FILE__, $sql); - } - - $template->assign_vars(array( - 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">') - ); - - $message = $lang['Group_type_updated'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>'); - - message_die(GENERAL_MESSAGE, $message); - -} -else if ( isset($HTTP_POST_VARS['joingroup']) && $group_id ) -{ - // - // First, joining a group - // If the user isn't logged in redirect them to login - // - if ( !$userdata['session_logged_in'] ) - { - redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); - } - - $sql = "SELECT ug.user_id, g.group_type - FROM " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g - WHERE g.group_id = $group_id - AND g.group_type <> " . GROUP_HIDDEN . " - AND ug.group_id = g.group_id"; - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, 'Could not obtain user and group information', '', __LINE__, __FILE__, $sql); - } - - if ( $row = $db->sql_fetchrow($result) ) - { - if ( $row['group_type'] == GROUP_OPEN ) - { - do - { - if ( $userdata['user_id'] == $row['user_id'] ) - { - $template->assign_vars(array( - 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">') - ); - - $message = $lang['Already_member_group'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>'); - - message_die(GENERAL_MESSAGE, $message); - } - } while ( $row = $db->sql_fetchrow($result) ); - } - else - { - $template->assign_vars(array( - 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">') - ); - - $message = $lang['This_closed_group'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>'); - - message_die(GENERAL_MESSAGE, $message); - } - } - else - { - message_die(GENERAL_MESSAGE, $lang['No_groups_exist']); - } - - $sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending) - VALUES ($group_id, " . $userdata['user_id'] . ", 1)"; - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, "Error inserting user group subscription", "", __LINE__, __FILE__, $sql); - } - - $sql = "SELECT u.user_email, u.username, u.user_lang, g.group_name - FROM ".USERS_TABLE . " u, " . GROUPS_TABLE . " g - WHERE u.user_id = g.group_moderator - AND g.group_id = $group_id"; - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, "Error getting group moderator data", "", __LINE__, __FILE__, $sql); - } - - $moderator = $db->sql_fetchrow($result); - - include($phpbb_root_path . 'includes/emailer.'.$phpEx); - $emailer = new emailer($board_config['smtp_delivery']); - - $emailer->from($board_config['board_email']); - $emailer->replyto($board_config['board_email']); - - $emailer->use_template('group_request', $moderator['user_lang']); - $emailer->email_address($moderator['user_email']); - $emailer->set_subject($lang['Group_request']); - - $emailer->assign_vars(array( - 'SITENAME' => $board_config['sitename'], - 'GROUP_MODERATOR' => $moderator['username'], - 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '', - - 'U_GROUPCP' => $server_url . '?' . POST_GROUPS_URL . "=$group_id&validate=true") - ); - $emailer->send(); - $emailer->reset(); - - $template->assign_vars(array( - 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">') - ); - - $message = $lang['Group_joined'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>'); - - message_die(GENERAL_MESSAGE, $message); -} -else if ( isset($HTTP_POST_VARS['unsub']) || isset($HTTP_POST_VARS['unsubpending']) && $group_id ) -{ - // - // Second, unsubscribing from a group - // Check for confirmation of unsub. - // - if ( $cancel ) - { - redirect(append_sid("groupcp.$phpEx", true)); - } - elseif ( !$userdata['session_logged_in'] ) - { - redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); - } - - if ( $confirm ) - { - $sql = "DELETE FROM " . USER_GROUP_TABLE . " - WHERE user_id = " . $userdata['user_id'] . " - AND group_id = $group_id"; - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, 'Could not delete group memebership data', '', __LINE__, __FILE__, $sql); - } - - if ( $userdata['user_level'] != ADMIN && $userdata['user_level'] == MOD ) - { - $sql = "SELECT COUNT(auth_mod) AS is_auth_mod - FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug - WHERE ug.user_id = " . $userdata['user_id'] . " - AND aa.group_id = ug.group_id - AND aa.auth_mod = 1"; - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, 'Could not obtain moderator status', '', __LINE__, __FILE__, $sql); - } - - if ( !($row = $db->sql_fetchrow($result)) || $row['is_auth_mod'] == 0 ) - { - $sql = "UPDATE " . USERS_TABLE . " - SET user_level = " . USER . " - WHERE user_id = " . $userdata['user_id']; - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql); - } - } - } - - $template->assign_vars(array( - 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">') - ); - - $message = $lang['Unsub_success'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>'); - - message_die(GENERAL_MESSAGE, $message); - } - else - { - $unsub_msg = ( isset($HTTP_POST_VARS['unsub']) ) ? $lang['Confirm_unsub'] : $lang['Confirm_unsub_pending']; - - $s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" /><input type="hidden" name="unsub" value="1" />'; - - $page_title = $lang['Group_Control_Panel']; - include($phpbb_root_path . 'includes/page_header.'.$phpEx); - - $template->set_filenames(array( - 'confirm' => 'confirm_body.tpl') - ); - - $template->assign_vars(array( - 'MESSAGE_TITLE' => $lang['Confirm'], - 'MESSAGE_TEXT' => $unsub_msg, - 'L_YES' => $lang['Yes'], - 'L_NO' => $lang['No'], - 'S_CONFIRM_ACTION' => append_sid("groupcp.$phpEx"), - 'S_HIDDEN_FIELDS' => $s_hidden_fields) - ); - - $template->pparse('confirm'); - - include($phpbb_root_path . 'includes/page_tail.'.$phpEx); - } - -} -else if ( $group_id ) -{ - // - // Did the group moderator get here through an email? - // If so, check to see if they are logged in. - // - if ( isset($HTTP_GET_VARS['validate']) ) - { - if ( !$userdata['session_logged_in'] ) - { - redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); - } - } - - // - // For security, get the ID of the group moderator. - // - switch(SQL_LAYER) - { - case 'postgresql': - $sql = "SELECT g.group_moderator, g.group_type, aa.auth_mod - FROM " . GROUPS_TABLE . " g, " . AUTH_ACCESS_TABLE . " aa - WHERE g.group_id = $group_id - AND aa.group_id = g.group_id - UNION ( - SELECT g.group_moderator, g.group_type, NULL - FROM " . GROUPS_TABLE . " g - WHERE g.group_id = $group_id - AND NOT EXISTS ( - SELECT aa.group_id - FROM " . AUTH_ACCESS_TABLE . " aa - WHERE aa.group_id = g.group_id - ) - ) - ORDER BY aa.auth_mod DESC"; - break; - - case 'oracle': - $sql = "SELECT g.group_moderator, g.group_type, aa.auth_mod - FROM " . GROUPS_TABLE . " g, " . AUTH_ACCESS_TABLE . " aa - WHERE g.group_id = $group_id - AND aa.group_id (+) = g.group_id - ORDER BY aa.auth_mod DESC"; - break; - - default: - $sql = "SELECT g.group_moderator, g.group_type, aa.auth_mod - FROM ( " . GROUPS_TABLE . " g - LEFT JOIN " . AUTH_ACCESS_TABLE . " aa ON aa.group_id = g.group_id ) - WHERE g.group_id = $group_id - ORDER BY aa.auth_mod DESC"; - break; - } - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, 'Could not get moderator information', '', __LINE__, __FILE__, $sql); - } - - if ( $group_info = $db->sql_fetchrow($result) ) - { - $group_moderator = $group_info['group_moderator']; - - if ( $group_moderator == $userdata['user_id'] || $userdata['user_level'] == ADMIN ) - { - $is_moderator = TRUE; - } - - // - // Handle Additions, removals, approvals and denials - // - if ( !empty($HTTP_POST_VARS['add']) || !empty($HTTP_POST_VARS['remove']) || isset($HTTP_POST_VARS['approve']) || isset($HTTP_POST_VARS['deny']) ) - { - if ( !$userdata['session_logged_in'] ) - { - redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); - } - - if ( !$is_moderator ) - { - $template->assign_vars(array( - 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">') - ); - - $message = $lang['Not_group_moderator'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>'); - - message_die(GENERAL_MESSAGE, $message); - } - - if ( isset($HTTP_POST_VARS['add']) ) - { - $username = ( isset($HTTP_POST_VARS['username']) ) ? phpbb_clean_username($HTTP_POST_VARS['username']) : ''; - - $sql = "SELECT user_id, user_email, user_lang, user_level - FROM " . USERS_TABLE . " - WHERE username = '" . str_replace("\'", "''", $username) . "'"; - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, "Could not get user information", $lang['Error'], __LINE__, __FILE__, $sql); - } - - if ( !($row = $db->sql_fetchrow($result)) ) - { - $template->assign_vars(array( - 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">') - ); - - $message = $lang['Could_not_add_user'] . "<br /><br />" . sprintf($lang['Click_return_group'], "<a href=\"" . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_index'], "<a href=\"" . append_sid("index.$phpEx") . "\">", "</a>"); - - message_die(GENERAL_MESSAGE, $message); - } - - if ( $row['user_id'] == ANONYMOUS ) - { - $template->assign_vars(array( - 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">') - ); - - $message = $lang['Could_not_anon_user'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>'); - - message_die(GENERAL_MESSAGE, $message); - } - - $sql = "SELECT ug.user_id, u.user_level - FROM " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u - WHERE u.user_id = " . $row['user_id'] . " - AND ug.user_id = u.user_id - AND ug.group_id = $group_id"; - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, 'Could not get user information', '', __LINE__, __FILE__, $sql); - } - - if ( !($db->sql_fetchrow($result)) ) - { - $sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending) - VALUES (" . $row['user_id'] . ", $group_id, 0)"; - if ( !$db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, 'Could not add user to group', '', __LINE__, __FILE__, $sql); - } - - if ( $row['user_level'] != ADMIN && $row['user_level'] != MOD && $group_info['auth_mod'] ) - { - $sql = "UPDATE " . USERS_TABLE . " - SET user_level = " . MOD . " - WHERE user_id = " . $row['user_id']; - if ( !$db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql); - } - } - - // - // Get the group name - // Email the user and tell them they're in the group - // - $group_sql = "SELECT group_name - FROM " . GROUPS_TABLE . " - WHERE group_id = $group_id"; - if ( !($result = $db->sql_query($group_sql)) ) - { - message_die(GENERAL_ERROR, 'Could not get group information', '', __LINE__, __FILE__, $group_sql); - } - - $group_name_row = $db->sql_fetchrow($result); - - $group_name = $group_name_row['group_name']; - - include($phpbb_root_path . 'includes/emailer.'.$phpEx); - $emailer = new emailer($board_config['smtp_delivery']); - - $emailer->from($board_config['board_email']); - $emailer->replyto($board_config['board_email']); - - $emailer->use_template('group_added', $row['user_lang']); - $emailer->email_address($row['user_email']); - $emailer->set_subject($lang['Group_added']); - - $emailer->assign_vars(array( - 'SITENAME' => $board_config['sitename'], - 'GROUP_NAME' => $group_name, - 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '', - - 'U_GROUPCP' => $server_url . '?' . POST_GROUPS_URL . "=$group_id") - ); - $emailer->send(); - $emailer->reset(); - } - else - { - $template->assign_vars(array( - 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">') - ); - - $message = $lang['User_is_member_group'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>'); - - message_die(GENERAL_MESSAGE, $message); - } - } - else - { - if ( ( ( isset($HTTP_POST_VARS['approve']) || isset($HTTP_POST_VARS['deny']) ) && isset($HTTP_POST_VARS['pending_members']) ) || ( isset($HTTP_POST_VARS['remove']) && isset($HTTP_POST_VARS['members']) ) ) - { - - $members = ( isset($HTTP_POST_VARS['approve']) || isset($HTTP_POST_VARS['deny']) ) ? $HTTP_POST_VARS['pending_members'] : $HTTP_POST_VARS['members']; - - $sql_in = ''; - for($i = 0; $i < count($members); $i++) - { - $sql_in .= ( ( $sql_in != '' ) ? ', ' : '' ) . intval($members[$i]); - } - - if ( isset($HTTP_POST_VARS['approve']) ) - { - if ( $group_info['auth_mod'] ) - { - $sql = "UPDATE " . USERS_TABLE . " - SET user_level = " . MOD . " - WHERE user_id IN ($sql_in) - AND user_level NOT IN (" . MOD . ", " . ADMIN . ")"; - if ( !$db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql); - } - } - - $sql = "UPDATE " . USER_GROUP_TABLE . " - SET user_pending = 0 - WHERE user_id IN ($sql_in) - AND group_id = $group_id"; - $sql_select = "SELECT user_email - FROM ". USERS_TABLE . " - WHERE user_id IN ($sql_in)"; - } - else if ( isset($HTTP_POST_VARS['deny']) || isset($HTTP_POST_VARS['remove']) ) - { - if ( $group_info['auth_mod'] ) - { - $sql = "SELECT ug.user_id, ug.group_id - FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug - WHERE ug.user_id IN ($sql_in) - AND aa.group_id = ug.group_id - AND aa.auth_mod = 1 - GROUP BY ug.user_id, ug.group_id - ORDER BY ug.user_id, ug.group_id"; - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, 'Could not obtain moderator status', '', __LINE__, __FILE__, $sql); - } - - if ( $row = $db->sql_fetchrow($result) ) - { - $group_check = array(); - $remove_mod_sql = ''; - - do - { - $group_check[$row['user_id']][] = $row['group_id']; - } - while ( $row = $db->sql_fetchrow($result) ); - - while( list($user_id, $group_list) = @each($group_check) ) - { - if ( count($group_list) == 1 ) - { - $remove_mod_sql .= ( ( $remove_mod_sql != '' ) ? ', ' : '' ) . $user_id; - } - } - - if ( $remove_mod_sql != '' ) - { - $sql = "UPDATE " . USERS_TABLE . " - SET user_level = " . USER . " - WHERE user_id IN ($remove_mod_sql) - AND user_level NOT IN (" . ADMIN . ")"; - if ( !$db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql); - } - } - } - } - - $sql = "DELETE FROM " . USER_GROUP_TABLE . " - WHERE user_id IN ($sql_in) - AND group_id = $group_id"; - } - - if ( !$db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, 'Could not update user group table', '', __LINE__, __FILE__, $sql); - } - - // - // Email users when they are approved - // - if ( isset($HTTP_POST_VARS['approve']) ) - { - if ( !($result = $db->sql_query($sql_select)) ) - { - message_die(GENERAL_ERROR, 'Could not get user email information', '', __LINE__, __FILE__, $sql); - } - - $bcc_list = array(); - while ($row = $db->sql_fetchrow($result)) - { - $bcc_list[] = $row['user_email']; - } - - // - // Get the group name - // - $group_sql = "SELECT group_name - FROM " . GROUPS_TABLE . " - WHERE group_id = $group_id"; - if ( !($result = $db->sql_query($group_sql)) ) - { - message_die(GENERAL_ERROR, 'Could not get group information', '', __LINE__, __FILE__, $group_sql); - } - - $group_name_row = $db->sql_fetchrow($result); - $group_name = $group_name_row['group_name']; - - include($phpbb_root_path . 'includes/emailer.'.$phpEx); - $emailer = new emailer($board_config['smtp_delivery']); - - $emailer->from($board_config['board_email']); - $emailer->replyto($board_config['board_email']); - - for ($i = 0; $i < count($bcc_list); $i++) - { - $emailer->bcc($bcc_list[$i]); - } - - $emailer->use_template('group_approved'); - $emailer->set_subject($lang['Group_approved']); - - $emailer->assign_vars(array( - 'SITENAME' => $board_config['sitename'], - 'GROUP_NAME' => $group_name, - 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '', - - 'U_GROUPCP' => $server_url . '?' . POST_GROUPS_URL . "=$group_id") - ); - $emailer->send(); - $emailer->reset(); - } - } - } - } - // - // END approve or deny - // - } - else - { - message_die(GENERAL_MESSAGE, $lang['No_groups_exist']); - } - - // - // Get group details - // - $sql = "SELECT * - FROM " . GROUPS_TABLE . " - WHERE group_id = $group_id - AND group_single_user = 0"; - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, 'Error getting group information', '', __LINE__, __FILE__, $sql); - } - - if ( !($group_info = $db->sql_fetchrow($result)) ) - { - message_die(GENERAL_MESSAGE, $lang['Group_not_exist']); - } - - // - // Get moderator details for this group - // - $sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm - FROM " . USERS_TABLE . " - WHERE user_id = " . $group_info['group_moderator']; - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, 'Error getting user list for group', '', __LINE__, __FILE__, $sql); - } - - $group_moderator = $db->sql_fetchrow($result); - - // - // Get user information for this group - // - $sql = "SELECT u.username, u.user_id, u.user_viewemail, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_msnm, ug.user_pending - FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug - WHERE ug.group_id = $group_id - AND u.user_id = ug.user_id - AND ug.user_pending = 0 - AND ug.user_id <> " . $group_moderator['user_id'] . " - ORDER BY u.username"; - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, 'Error getting user list for group', '', __LINE__, __FILE__, $sql); - } - - $group_members = $db->sql_fetchrowset($result); - $members_count = count($group_members); - $db->sql_freeresult($result); - - $sql = "SELECT u.username, u.user_id, u.user_viewemail, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_msnm - FROM " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u - WHERE ug.group_id = $group_id - AND g.group_id = ug.group_id - AND ug.user_pending = 1 - AND u.user_id = ug.user_id - ORDER BY u.username"; - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, 'Error getting user pending information', '', __LINE__, __FILE__, $sql); - } - - $modgroup_pending_list = $db->sql_fetchrowset($result); - $modgroup_pending_count = count($modgroup_pending_list); - $db->sql_freeresult($result); - - $is_group_member = 0; - if ( $members_count ) - { - for($i = 0; $i < $members_count; $i++) - { - if ( $group_members[$i]['user_id'] == $userdata['user_id'] && $userdata['session_logged_in'] ) - { - $is_group_member = TRUE; - } - } - } - - $is_group_pending_member = 0; - if ( $modgroup_pending_count ) - { - for($i = 0; $i < $modgroup_pending_count; $i++) - { - if ( $modgroup_pending_list[$i]['user_id'] == $userdata['user_id'] && $userdata['session_logged_in'] ) - { - $is_group_pending_member = TRUE; - } - } - } - - if ( $userdata['user_level'] == ADMIN ) - { - $is_moderator = TRUE; - } - - if ( $userdata['user_id'] == $group_info['group_moderator'] ) - { - $is_moderator = TRUE; - - $group_details = $lang['Are_group_moderator']; - - $s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />'; - } - else if ( $is_group_member || $is_group_pending_member ) - { - $template->assign_block_vars('switch_unsubscribe_group_input', array()); - - $group_details = ( $is_group_pending_member ) ? $lang['Pending_this_group'] : $lang['Member_this_group']; - - $s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />'; - } - else if ( $userdata['user_id'] == ANONYMOUS ) - { - $group_details = $lang['Login_to_join']; - $s_hidden_fields = ''; - } - else - { - if ( $group_info['group_type'] == GROUP_OPEN ) - { - $template->assign_block_vars('switch_subscribe_group_input', array()); - - $group_details = $lang['This_open_group']; - $s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />'; - } - else if ( $group_info['group_type'] == GROUP_CLOSED ) - { - $group_details = $lang['This_closed_group']; - $s_hidden_fields = ''; - } - else if ( $group_info['group_type'] == GROUP_HIDDEN ) - { - $group_details = $lang['This_hidden_group']; - $s_hidden_fields = ''; - } - } - - $page_title = $lang['Group_Control_Panel']; - include($phpbb_root_path . 'includes/page_header.'.$phpEx); - - // - // Load templates - // - $template->set_filenames(array( - 'info' => 'groupcp_info_body.tpl', - 'pendinginfo' => 'groupcp_pending_info.tpl') - ); - make_jumpbox('viewforum.'.$phpEx); - - // - // Add the moderator - // - $username = $group_moderator['username']; - $user_id = $group_moderator['user_id']; - - generate_user_info($group_moderator, $board_config['default_dateformat'], $is_moderator, $from, $posts, $joined, $poster_avatar, $profile_img, $profile, $search_img, $search, $pm_img, $pm, $email_img, $email, $www_img, $www, $icq_status_img, $icq_img, $icq, $aim_img, $aim, $msn_img, $msn, $yim_img, $yim); - - $s_hidden_fields .= ''; - - $template->assign_vars(array( - 'L_GROUP_INFORMATION' => $lang['Group_Information'], - 'L_GROUP_NAME' => $lang['Group_name'], - 'L_GROUP_DESC' => $lang['Group_description'], - 'L_GROUP_TYPE' => $lang['Group_type'], - 'L_GROUP_MEMBERSHIP' => $lang['Group_membership'], - 'L_SUBSCRIBE' => $lang['Subscribe'], - 'L_UNSUBSCRIBE' => $lang['Unsubscribe'], - 'L_JOIN_GROUP' => $lang['Join_group'], - 'L_UNSUBSCRIBE_GROUP' => $lang['Unsubscribe'], - 'L_GROUP_OPEN' => $lang['Group_open'], - 'L_GROUP_CLOSED' => $lang['Group_closed'], - 'L_GROUP_HIDDEN' => $lang['Group_hidden'], - 'L_UPDATE' => $lang['Update'], - 'L_GROUP_MODERATOR' => $lang['Group_Moderator'], - 'L_GROUP_MEMBERS' => $lang['Group_Members'], - 'L_PENDING_MEMBERS' => $lang['Pending_members'], - 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], - 'L_PM' => $lang['Private_Message'], - 'L_EMAIL' => $lang['Email'], - 'L_POSTS' => $lang['Posts'], - 'L_WEBSITE' => $lang['Website'], - 'L_FROM' => $lang['Location'], - 'L_ORDER' => $lang['Order'], - 'L_SORT' => $lang['Sort'], - 'L_SUBMIT' => $lang['Sort'], - 'L_AIM' => $lang['AIM'], - 'L_YIM' => $lang['YIM'], - 'L_MSNM' => $lang['MSNM'], - 'L_ICQ' => $lang['ICQ'], - 'L_SELECT' => $lang['Select'], - 'L_REMOVE_SELECTED' => $lang['Remove_selected'], - 'L_ADD_MEMBER' => $lang['Add_member'], - 'L_FIND_USERNAME' => $lang['Find_username'], - - 'GROUP_NAME' => $group_info['group_name'], - 'GROUP_DESC' => $group_info['group_description'], - 'GROUP_DETAILS' => $group_details, - 'MOD_ROW_COLOR' => '#' . $theme['td_color1'], - 'MOD_ROW_CLASS' => $theme['td_class1'], - 'MOD_USERNAME' => $username, - 'MOD_FROM' => $from, - 'MOD_JOINED' => $joined, - 'MOD_POSTS' => $posts, - 'MOD_AVATAR_IMG' => $poster_avatar, - 'MOD_PROFILE_IMG' => $profile_img, - 'MOD_PROFILE' => $profile, - 'MOD_SEARCH_IMG' => $search_img, - 'MOD_SEARCH' => $search, - 'MOD_PM_IMG' => $pm_img, - 'MOD_PM' => $pm, - 'MOD_EMAIL_IMG' => $email_img, - 'MOD_EMAIL' => $email, - 'MOD_WWW_IMG' => $www_img, - 'MOD_WWW' => $www, - 'MOD_ICQ_STATUS_IMG' => $icq_status_img, - 'MOD_ICQ_IMG' => $icq_img, - 'MOD_ICQ' => $icq, - 'MOD_AIM_IMG' => $aim_img, - 'MOD_AIM' => $aim, - 'MOD_MSN_IMG' => $msn_img, - 'MOD_MSN' => $msn, - 'MOD_YIM_IMG' => $yim_img, - 'MOD_YIM' => $yim, - - 'U_MOD_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id"), - 'U_SEARCH_USER' => append_sid("search.$phpEx?mode=searchuser"), - - 'S_GROUP_OPEN_TYPE' => GROUP_OPEN, - 'S_GROUP_CLOSED_TYPE' => GROUP_CLOSED, - 'S_GROUP_HIDDEN_TYPE' => GROUP_HIDDEN, - 'S_GROUP_OPEN_CHECKED' => ( $group_info['group_type'] == GROUP_OPEN ) ? ' checked="checked"' : '', - 'S_GROUP_CLOSED_CHECKED' => ( $group_info['group_type'] == GROUP_CLOSED ) ? ' checked="checked"' : '', - 'S_GROUP_HIDDEN_CHECKED' => ( $group_info['group_type'] == GROUP_HIDDEN ) ? ' checked="checked"' : '', - 'S_HIDDEN_FIELDS' => $s_hidden_fields, - 'S_MODE_SELECT' => $select_sort_mode, - 'S_ORDER_SELECT' => $select_sort_order, - 'S_GROUPCP_ACTION' => append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id")) - ); - - // - // Dump out the remaining users - // - for($i = $start; $i < min($board_config['topics_per_page'] + $start, $members_count); $i++) - { - $username = $group_members[$i]['username']; - $user_id = $group_members[$i]['user_id']; - - generate_user_info($group_members[$i], $board_config['default_dateformat'], $is_moderator, $from, $posts, $joined, $poster_avatar, $profile_img, $profile, $search_img, $search, $pm_img, $pm, $email_img, $email, $www_img, $www, $icq_status_img, $icq_img, $icq, $aim_img, $aim, $msn_img, $msn, $yim_img, $yim); - - if ( $group_info['group_type'] != GROUP_HIDDEN || $is_group_member || $is_moderator ) - { - $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2']; - $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; - - $template->assign_block_vars('member_row', array( - 'ROW_COLOR' => '#' . $row_color, - 'ROW_CLASS' => $row_class, - 'USERNAME' => $username, - 'FROM' => $from, - 'JOINED' => $joined, - 'POSTS' => $posts, - 'USER_ID' => $user_id, - 'AVATAR_IMG' => $poster_avatar, - 'PROFILE_IMG' => $profile_img, - 'PROFILE' => $profile, - 'SEARCH_IMG' => $search_img, - 'SEARCH' => $search, - 'PM_IMG' => $pm_img, - 'PM' => $pm, - 'EMAIL_IMG' => $email_img, - 'EMAIL' => $email, - 'WWW_IMG' => $www_img, - 'WWW' => $www, - 'ICQ_STATUS_IMG' => $icq_status_img, - 'ICQ_IMG' => $icq_img, - 'ICQ' => $icq, - 'AIM_IMG' => $aim_img, - 'AIM' => $aim, - 'MSN_IMG' => $msn_img, - 'MSN' => $msn, - 'YIM_IMG' => $yim_img, - 'YIM' => $yim, - - 'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id")) - ); - - if ( $is_moderator ) - { - $template->assign_block_vars('member_row.switch_mod_option', array()); - } - } - } - - if ( !$members_count ) - { - // - // No group members - // - $template->assign_block_vars('switch_no_members', array()); - $template->assign_vars(array( - 'L_NO_MEMBERS' => $lang['No_group_members']) - ); - } - - $current_page = ( !$members_count ) ? 1 : ceil( $members_count / $board_config['topics_per_page'] ); - - $template->assign_vars(array( - 'PAGINATION' => generate_pagination("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id", $members_count, $board_config['topics_per_page'], $start), - 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), $current_page ), - - 'L_GOTO_PAGE' => $lang['Goto_page']) - ); - - if ( $group_info['group_type'] == GROUP_HIDDEN && !$is_group_member && !$is_moderator ) - { - // - // No group members - // - $template->assign_block_vars('switch_hidden_group', array()); - $template->assign_vars(array( - 'L_HIDDEN_MEMBERS' => $lang['Group_hidden_members']) - ); - } - - // - // We've displayed the members who belong to the group, now we - // do that pending memebers... - // - if ( $is_moderator ) - { - // - // Users pending in ONLY THIS GROUP (which is moderated by this user) - // - if ( $modgroup_pending_count ) - { - for($i = 0; $i < $modgroup_pending_count; $i++) - { - $username = $modgroup_pending_list[$i]['username']; - $user_id = $modgroup_pending_list[$i]['user_id']; - - generate_user_info($modgroup_pending_list[$i], $board_config['default_dateformat'], $is_moderator, $from, $posts, $joined, $poster_avatar, $profile_img, $profile, $search_img, $search, $pm_img, $pm, $email_img, $email, $www_img, $www, $icq_status_img, $icq_img, $icq, $aim_img, $aim, $msn_img, $msn, $yim_img, $yim); - - $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2']; - $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; - - $user_select = '<input type="checkbox" name="member[]" value="' . $user_id . '">'; - - $template->assign_block_vars('pending_members_row', array( - 'ROW_CLASS' => $row_class, - 'ROW_COLOR' => '#' . $row_color, - 'USERNAME' => $username, - 'FROM' => $from, - 'JOINED' => $joined, - 'POSTS' => $posts, - 'USER_ID' => $user_id, - 'AVATAR_IMG' => $poster_avatar, - 'PROFILE_IMG' => $profile_img, - 'PROFILE' => $profile, - 'SEARCH_IMG' => $search_img, - 'SEARCH' => $search, - 'PM_IMG' => $pm_img, - 'PM' => $pm, - 'EMAIL_IMG' => $email_img, - 'EMAIL' => $email, - 'WWW_IMG' => $www_img, - 'WWW' => $www, - 'ICQ_STATUS_IMG' => $icq_status_img, - 'ICQ_IMG' => $icq_img, - 'ICQ' => $icq, - 'AIM_IMG' => $aim_img, - 'AIM' => $aim, - 'MSN_IMG' => $msn_img, - 'MSN' => $msn, - 'YIM_IMG' => $yim_img, - 'YIM' => $yim, - - 'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id")) - ); - } - - $template->assign_block_vars('switch_pending_members', array() ); - - $template->assign_vars(array( - 'L_SELECT' => $lang['Select'], - 'L_APPROVE_SELECTED' => $lang['Approve_selected'], - ... [truncated message content] |
From: <mj...@us...> - 2006-12-31 16:08:17
|
Revision: 282 http://svn.sourceforge.net/phpbbreloaded/?rev=282&view=rev Author: mjnr Date: 2006-12-31 08:08:16 -0800 (Sun, 31 Dec 2006) Log Message: ----------- Added basic functionality to cope with additional (non phpBBreloaded specific) packages. Also started the ball rolling with the first graft of the anti-spam GPL software Bad Behavio(u)r. (Version 2.0.8) Have included a new directory off the root called 'extras'. This should be used to store any externally developed packages / libraries that we wish to release with phpBBreloaded (such as Bad Behavio(u)r). Modified Paths: -------------- main/trunk/common.php Added Paths: ----------- main/trunk/extras/ main/trunk/extras/Bad-Behavior/ main/trunk/extras/Bad-Behavior/bad-behavior/ main/trunk/extras/Bad-Behavior/bad-behavior/admin.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/banned.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/blackhole.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/blacklist.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/common_tests.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/core.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/functions.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/google.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/housekeeping.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/index.html main/trunk/extras/Bad-Behavior/bad-behavior/konqueror.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/lynx.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/movabletype.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/mozilla.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/msie.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/msnbot.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/opera.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/post.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/responses.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/safari.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/screener.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/trackback.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/version.inc.php main/trunk/extras/Bad-Behavior/bad-behavior/whitelist.inc.php main/trunk/extras/Bad-Behavior/bad-behavior-phpBBreloaded.php main/trunk/extras/Bad-Behavior/index.html main/trunk/extras_config.php Modified: main/trunk/common.php =================================================================== --- main/trunk/common.php 2006-12-30 04:58:08 UTC (rev 281) +++ main/trunk/common.php 2006-12-31 16:08:16 UTC (rev 282) @@ -176,6 +176,11 @@ include($phpbb_root_path . 'config.'.$phpEx); +/******************************************************************************* + * Include support for phpBBreloaded extra packages now. + ******************************************************************************/ +include($phpbb_root_path . 'extras_config.'.$phpEx); + if( !defined("PHPBB_INSTALLED") ) { header('Location: ' . $phpbb_root_path . 'install/install.' . $phpEx); @@ -189,6 +194,18 @@ include($phpbb_root_path . 'includes/functions.'.$phpEx); include($phpbb_root_path . 'includes/db.'.$phpEx); +/******************************************************************************* + * If specified, include the 'Bad Behaviour' code now... + * http://homelandstupidity.us/software/bad-behavior/ + * I have placed this here as I may want access to the db functions later in + * order to utilise the Bad Behaviour logging. For now it's a simple spam + * blocker! + ******************************************************************************/ +if(defined('BAD_BEHAVIOUR_ROOT')) +{ + include(BAD_BEHAVIOUR_ROOT . 'bad-behavior-phpBBreloaded.'.$phpEx); +} + // We do not need this any longer, unset for safety purposes unset($dbpasswd); Added: main/trunk/extras/Bad-Behavior/bad-behavior/admin.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/admin.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/admin.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,75 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +function bb2_admin_pages() { + if (function_exists('current_user_can')) { + // The new 2.x way + if (current_user_can('manage_options')) { + $bb2_is_admin = true; + } + } else { + // The old 1.x way + global $user_ID; + if (user_can_edit_user($user_ID, 0)) { + $bb2_is_admin = true; + } + } + + if ($bb2_is_admin) { + add_options_page(__("Bad Behavior"), __("Bad Behavior"), 8, 'bb2_options', 'bb2_options'); + } +} + +function bb2_options() +{ + $settings = bb2_read_settings(); + + if ($_POST) { + if ($_POST['display_stats']) { + $settings['display_stats'] = true; + } else { + $settings['display_stats'] = false; + } + if ($_POST['strict']) { + $settings['strict'] = true; + } else { + $settings['strict'] = false; + } + if ($_POST['verbose']) { + $settings['verbose'] = true; + } else { + $settings['verbose'] = false; + } + bb2_write_settings($settings); +?> + <div id="message" class="updated fade"><p><strong><?php _e('Options saved.') ?></strong></p></div> +<?php + } +?> + <div class="wrap"> + <h2><?php _e("Bad Behavior"); ?></h2> + <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>"> + <p>For more information please visit the <a href="http://www.homelandstupidity.us/software/bad-behavior/">Bad Behavior</a> homepage.</p> + <p>If you find Bad Behavior valuable, please consider making a <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=error%40ioerror%2eus&item_name=Bad%20Behavior%20<?php echo BB2_VERSION; ?>%20%28From%20Admin%29&no_shipping=1&cn=Comments%20about%20Bad%20Behavior&tax=0¤cy_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8">financial contribution</a> to further development of Bad Behavior.</p> + + <fieldset class="options"> + <legend><?php _e('Statistics'); ?></legend> + <?php bb2_insert_stats(true); ?> + <p><label><input type="checkbox" name="display_stats" value="true" <?php if ($settings['display_stats']) { ?>checked="checked" <?php } ?>/> <?php _e('Display statistics in blog footer'); ?></label></p> + </fieldset> + + <fieldset class="options"> + <legend><?php _e('Logging'); ?></legend> + <p><label><input type="checkbox" name="verbose" value="true" <?php if ($settings['verbose']) { ?>checked="checked" <?php } ?>/> <?php _e('Verbose HTTP request logging'); ?></label></p> + <legend><?php _e('Strict Mode'); ?></legend> + <p><label><input type="checkbox" name="strict" value="true" <?php if ($settings['strict']) { ?>checked="checked" <?php } ?>/> <?php _e('Strict checking (blocks more spam but may block some people)'); ?></label></p> + </fieldset> + + <p class="submit"><input type="submit" name="submit" value="<?php _e('Update »'); ?>" /></p> + </form> + </div> +<?php +} + +add_action('admin_menu', 'bb2_admin_pages'); + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/banned.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/banned.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/banned.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,48 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +// Functions called when a request has been denied +// This part can be gawd-awful slow, doesn't matter :) + +require_once(BB2_CORE . "/responses.inc.php"); + +function bb2_display_denial($settings, $key, $previous_key = false) +{ + if (!$previous_key) $previous_key = $key; + if ($key == "e87553e1") { + // FIXME: lookup the real key + } + // Create support key + $ip = explode(".", $_SERVER['REMOTE_ADDR']); + $ip_hex = ""; + foreach ($ip as $octet) { + $ip_hex .= str_pad(dechex($octet), 2, 0, STR_PAD_LEFT); + } + $support_key = implode("-", str_split("$ip_hex$key", 4)); + + // Get response data + $response = bb2_get_response($previous_key); + header("HTTP/1.1 " . $response['response'] . " Bad Behavior"); + header("Status: " . $response['response'] . " Bad Behavior"); +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>HTTP Error <?php echo $response['response']; ?></title> +</head> +<body> +<h1>Error <?php echo $response['response']; ?></h1> +<p>We're sorry, but we could not fulfill your request for +<?php echo htmlspecialchars($_SERVER['REQUEST_URI']) ?> on this server.</p> +<p><?php echo $response['explanation']; ?></p> +<p>Your technical support key is: <strong><?php echo $support_key; ?></strong></p> +<p>You can use this key to <a href="http://www.ioerror.us/bb2-support-key?key=<?php echo $support_key; ?>">fix this problem yourself</a>.</p> +<p>If you are unable to fix the problem yourself, please contact <a href="mailto:<?php echo htmlspecialchars(str_replace("@", "+nospam@nospam.", bb2_email())); ?>"><?php echo htmlspecialchars(str_replace("@", " at ", bb2_email())); ?></a> and be sure to provide the technical support key shown above.</p> +<?php +} + +function bb2_log_denial($settings, $package, $key, $previous_key=false) +{ + bb2_db_query(bb2_insert($settings, $package, $key)); +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/blackhole.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/blackhole.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/blackhole.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,37 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +// Look up address on various blackhole lists. +// These cannot be used for GET requests under any circumstances! +function bb2_blackhole($package) { + // Only conservative lists + $bb2_blackhole_lists = array( + "sbl-xbl.spamhaus.org", // All around nasties +// "dnsbl.sorbs.net", // Old useless data. +// "list.dsbl.org", // Old useless data. + "dnsbl.ioerror.us", // Bad Behavior Blackhole + ); + + // Things that shouldn't be blocked, from aggregate lists + $bb2_blackhole_exceptions = array( + "sbl-xbl.spamhaus.org" => array("127.0.0.4"), // CBL is problematic + "dnsbl.sorbs.net" => array("127.0.0.10",), // Dynamic IPs only + "list.dsbl.org" => array(), + "dnsbl.ioerror.us" => array(), + ); + + // Check the blackhole lists + $ip = $package['ip']; + $find = implode('.', array_reverse(explode('.', $ip))); + foreach ($bb2_blackhole_lists as $dnsbl) { + $result = gethostbynamel($find . "." . $dnsbl . "."); + if (!empty($result)) { + // Got a match and it isn't on the exception list + $result = @array_diff($result, $bb2_blackhole_exceptions[$dnsbl]); + if (!empty($result)) { + return '136673cd'; + } + } + } + return false; +} +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/blacklist.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/blacklist.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/blacklist.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,106 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +function bb2_blacklist($package) { + + // Blacklisted user agents + // These user agent strings occur at the beginning of the line. + $bb2_spambots_0 = array( + "<sc", // XSS exploit attempts + "8484 Boston Project", // video poker/porn spam + "adwords", // referrer spam + "autoemailspider", // spam harvester + "blogsearchbot-martin", // from honeypot + "Digger", // spam harvester + "ecollector", // spam harvester + "EmailCollector", // spam harvester + "Email Extractor", // spam harvester + "Email Siphon", // spam harvester + "EmailSiphon", // spam harvester + "grub crawler", // misc comment/email spam + "HttpProxy", // misc comment/email spam + "Internet Explorer", // XMLRPC exploits seen + "Jakarta Commons", // custommised spambots + "Java 1.", // definitely a spammer + "Java/1.", // definitely a spammer + "libwww-perl", // spambot scripts + "LWP", // spambot scripts + "Microsoft URL", // spam harvester + "Missigua", // spam harvester + "Movable Type", // customised spambots + "Mozilla ", // malicious software + "Mozilla/4.0(", // from honeypot + "Mozilla/4.0+(", // suspicious harvester + "MSIE", // malicious software + "OmniExplorer", // spam harvester + "PussyCat ", // misc comment spam + "psycheclone", // spam harvester + "Shockwave Flash", // spam harvester + "User Agent: ", // spam harvester + "User-Agent: ", // spam harvester + "Wordpress Hash Grabber",// malicious software + "\"", // malicious software + ); + + // These user agent strings occur anywhere within the line. + $bb2_spambots = array( + "\r", // A really dumb bot + "; Widows ", // misc comment/email spam + "a href=", // referrer spam + "Bad Behavior Test", // Add this to your user-agent to test BB + "compatible ; MSIE", // misc comment/email spam + "compatible-", // misc comment/email spam + "DTS Agent", // misc comment/email spam + "Gecko/25", // revisit this in 500 years + "grub-client", // search engine ignores robots.txt + "hanzoweb", // very badly behaved crawler + "Indy Library", // misc comment/email spam + "larbin@unspecified", // stealth harvesters + "Murzillo compatible", // comment spam bot + ".NET CLR 1)", // free poker, etc. + "POE-Component-Client", // free poker, etc. + "Turing Machine", // www.anonymizer.com abuse + "WISEbot", // spam harvester + "WISEnutbot", // spam harvester + "Windows NT 4.0;)", // wikispam bot + "Windows NT 5.0;)", // wikispam bot + "Windows NT 5.1;)", // wikispam bot + "Windows XP 5", // spam harvester + "\\\\)", // spam harvester + ); + + // These are regular expression matches. + $bb2_spambots_regex = array( + "/^[A-Z]{10}$/", // misc email spam + "/^Mozilla...[05]$/i", // fake user agent/email spam + "/[bcdfghjklmnpqrstvwxz ]{8,}/", +// "/(;\){1,2}$/", // misc spammers/harvesters +// "/MSIE.*Windows XP/", // misc comment spam + ); + + // Do not edit below this line. + + $ua = $package['headers_mixed']['User-Agent']; + + foreach ($bb2_spambots_0 as $spambot) { + $pos = stripos($ua, $spambot); + if ($pos !== FALSE && $pos == 0) { + return "17f4e8c8"; + } + } + + foreach ($bb2_spambots as $spambot) { + if (stripos($ua, $spambot) !== FALSE) { + return "17f4e8c8"; + } + } + + foreach ($bb2_spambots_regex as $spambot) { + if (preg_match($spambot, $ua)) { + return "17f4e8c8"; + } + } + + return FALSE; +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/common_tests.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/common_tests.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/common_tests.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,113 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +// Enforce adherence to protocol version claimed by user-agent. + +function bb2_protocol($settings, $package) +{ + // Is it claiming to be HTTP/1.0? Then it shouldn't do HTTP/1.1 things + // Always run this test; we should never see Expect: + if (array_key_exists('Expect', $package['headers_mixed']) && stripos($package['headers_mixed']['Expect'], "100-continue") !== FALSE) { + return "a0105122"; + } + + // Is it claiming to be HTTP/1.1? Then it shouldn't do HTTP/1.0 things + // Blocks some common corporate proxy servers in strict mode + if ($settings['strict'] && !strcmp($package['server_protocol'], "HTTP/1.1")) { + if (array_key_exists('Pragma', $package['headers_mixed']) && strpos($package['headers_mixed']['Pragma'], "no-cache") !== FALSE && !array_key_exists('Cache-Control', $package['headers_mixed'])) { + return "41feed15"; + } + } + return false; +} + +function bb2_misc_headers($settings, $package) +{ + $ua = $package['headers_mixed']['User-Agent']; + + if (!strcmp($package['request_method'], "POST") && empty($ua)) { + return "f9f2b8b9"; + } + + // Broken spambots send URLs with various invalid characters + if (strpos($package['request_uri'], "#") !== FALSE || strpos($package['headers_mixed']['Referer'], "#") !== FALSE) { + return "dfd9b1ad"; + } + + // Range: field exists and begins with 0 + // Real user-agents do not start ranges at 0 + // NOTE: this blocks the whois.sc bot. No big loss. + if (array_key_exists('Range', $package['headers_mixed']) && strpos($package['headers_mixed']['Range'], "=0-") !== FALSE) { + if (strncmp($ua, "MovableType", 11)) { + return "7ad04a8a"; + } + } + + // Content-Range is a response header, not a request header + if (array_key_exists('Content-Range', $package['headers_mixed'])) { + return '7d12528e'; + } + + // Lowercase via is used by open proxies/referrer spammers + if (array_key_exists('via', $package['headers'])) { + return "9c9e4979"; + } + + // pinappleproxy is used by referrer spammers + if (array_key_exists('Via', $package['headers_mixed'])) { + if (stripos($package['headers_mixed']['Via'], "pinappleproxy") !== FALSE || stripos($package['headers_mixed']['Via'], "PCNETSERVER") !== FALSE || stripos($package['headers_mixed']['Via'], "Invisiware") !== FALSE) { + return "939a6fbb"; + } + } + + // TE: if present must have Connection: TE + // RFC 2616 14.39 + // Blocks Microsoft ISA Server 2004 in strict mode. Contact Microsoft + // to obtain a hotfix. + if ($settings['strict'] && array_key_exists('Te', $package['headers_mixed'])) { + if (!preg_match('/\bTE\b/', $package['headers_mixed']['Connection'])) { + return "582ec5e4"; + } + } + + if (array_key_exists('Connection', $package['headers_mixed'])) { + // Connection: keep-alive and close are mutually exclusive + if (preg_match('/\bKeep-Alive\b/i', $package['headers_mixed']['Connection']) && preg_match('/\bClose\b/i', $package['headers_mixed']['Connection'])) { + return "a52f0448"; + } + // Close shouldn't appear twice + if (preg_match('/\bclose,\s?close\b/i', $package['headers_mixed']['Connection'])) { + return "a52f0448"; + } + // Keey-Alive shouldn't appear twice either + if (preg_match('/\bkeep-alive,\s?keep-alive\b/i', $package['headers_mixed']['Connection'])) { + return "a52f0448"; + } + } + + + // Headers which are not seen from normal user agents; only malicious bots + if (array_key_exists('X-Aaaaaaaaaaaa', $package['headers_mixed']) || array_key_exists('X-Aaaaaaaaaa', $package['headers_mixed'])) { + return "b9cc1d86"; + } + if (array_key_exists('Proxy-Connection', $package['headers_mixed'])) { + return "b7830251"; + } + + if (array_key_exists('Referer', $package['headers_mixed'])) { + // Referer, if it exists, must not be blank + if (empty($package['headers_mixed'])) { + return "69920ee5"; + } + + // Referer, if it exists, must contain a : + // While a relative URL is technically valid in Referer, all known + // legit user-agents send an absolute URL + if (strpos($package['headers_mixed']['Referer'], ":") === FALSE) { + return "45b35e30"; + } + } + + return false; +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/core.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/core.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/core.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,203 @@ +<?php if (!defined('BB2_CWD')) die("I said no cheating!"); + +// Bad Behavior entry point is start_bad_behavior(). +// If you're reading this, you are probably lost. +// Go read the bad-behavior-generic.php file. + +define('BB2_CORE', dirname(__FILE__)); +define('BB2_COOKIE', 'bb2_screener_'); + +require_once(BB2_CORE . "/functions.inc.php"); + +// Our log table structure +function bb2_table_structure($name) +{ + // It's not paranoia if they really are out to get you. + $name_escaped = bb2_db_escape($name); + return "CREATE TABLE IF NOT EXISTS `$name_escaped` ( + `id` INT(11) NOT NULL auto_increment, + `ip` TEXT NOT NULL, + `date` DATETIME NOT NULL default '0000-00-00 00:00:00', + `request_method` TEXT NOT NULL, + `request_uri` TEXT NOT NULL, + `server_protocol` TEXT NOT NULL, + `http_headers` TEXT NOT NULL, + `user_agent` TEXT NOT NULL, + `request_entity` TEXT NOT NULL, + `key` TEXT NOT NULL, + INDEX (`ip`(15)), + INDEX (`user_agent`(10)), + PRIMARY KEY (`id`) );"; // TODO: INDEX might need tuning +} + +// Insert a new record +function bb2_insert($settings, $package, $key) +{ + $ip = bb2_db_escape($package['ip']); + $date = bb2_db_date(); + $request_method = bb2_db_escape($package['request_method']); + $request_uri = bb2_db_escape($package['request_uri']); + $server_protocol = bb2_db_escape($package['server_protocol']); + $user_agent = bb2_db_escape($package['user_agent']); + $headers = "$request_method $request_uri $server_protocol\n"; + foreach ($package['headers'] as $h => $v) { + $headers .= bb2_db_escape("$h: $v\n"); + } + $request_entity = ""; + if (!strcasecmp($request_method, "POST")) { + foreach ($package['request_entity'] as $h => $v) { + $request_entity .= bb2_db_escape("$h: $v\n"); + } + } + return "INSERT INTO `" . bb2_db_escape($settings['log_table']) . "` + (`ip`, `date`, `request_method`, `request_uri`, `server_protocol`, `http_headers`, `user_agent`, `request_entity`, `key`) VALUES + ('$ip', '$date', '$request_method', '$request_uri', '$server_protocol', '$headers', '$user_agent', '$request_entity', '$key')"; +} + +// Kill 'em all! +function bb2_banned($settings, $package, $key, $previous_key=false) +{ + // Some spambots hit too hard. Slow them down a bit. + sleep(2); + + require_once(BB2_CORE . "/banned.inc.php"); + bb2_display_denial($settings, $key, $previous_key); + bb2_log_denial($settings, $package, $key, $previous_key); + if (is_callable('bb2_banned_callback')) { + bb2_banned_callback($settings, $package, $key); + } + // Penalize the spammers some more + require_once(BB2_CORE . "/housekeeping.inc.php"); + bb2_housekeeping($settings, $package); + die(); +} + +function bb2_approved($settings, $package) +{ + // Dirk wanted this + if (is_callable('bb2_approved_callback')) { + bb2_approved_callback($settings, $package); + } + + // Decide what to log on approved requests. + if ($settings['verbose'] || empty($package['user_agent'])) { + bb2_db_query(bb2_insert($settings, $package, "00000000")); + } +} + +// Check the results of a particular test; see below for usage +// Returns FALSE if test passed (yes this is backwards) +function bb2_test($settings, $package, $result) +{ + if ($result !== FALSE) + { + bb2_banned($settings, $package, $result); + return TRUE; + } + return FALSE; +} + + +// Let God sort 'em out! +function bb2_start($settings) +{ + // Gather up all the information we need, first of all. + $headers = bb2_load_headers(); + // Postprocess the headers to mixed-case + // FIXME: get the world to stop using PHP as CGI + $headers_mixed = array(); + foreach ($headers as $h => $v) { + $headers_mixed[uc_all($h)] = $v; + } + + // We use these frequently. Keep a copy close at hand. + $ip = $_SERVER['REMOTE_ADDR']; + $request_method = $_SERVER['REQUEST_METHOD']; + $request_uri = $_SERVER['REQUEST_URI']; + $server_protocol = $_SERVER['SERVER_PROTOCOL']; + $user_agent = $_SERVER['HTTP_USER_AGENT']; + + // Reconstruct the HTTP entity, if present. + $request_entity = array(); + if (!strcasecmp($request_method, "POST") || !strcasecmp($request_method, "PUT")) { + foreach ($_POST as $h => $v) { + $request_entity[$h] = $v; + } + } + + $package = array('ip' => $ip, 'headers' => $headers, 'headers_mixed' => $headers_mixed, 'request_method' => $request_method, 'request_uri' => $request_uri, 'server_protocol' => $server_protocol, 'request_entity' => $request_entity, 'user_agent' => $user_agent, 'is_browser' => false); + + // Please proceed to the security checkpoint and have your + // identification and boarding pass ready. + + // First check the whitelist + require_once(BB2_CORE . "/whitelist.inc.php"); + if (!bb2_whitelist($package)) { + // Now check the blacklist + require_once(BB2_CORE . "/blacklist.inc.php"); + bb2_test($settings, $package, bb2_blacklist($package)); + + // Check for common stuff + require_once(BB2_CORE . "/common_tests.inc.php"); + bb2_test($settings, $package, bb2_protocol($settings, $package)); + bb2_test($settings, $package, bb2_misc_headers($settings, $package)); + + // Specific checks + $ua = $headers_mixed['User-Agent']; + // MSIE checks + if (stripos($ua, "MSIE") !== FALSE) { + $package['is_browser'] = true; + if (stripos($ua, "Opera") !== FALSE) { + require_once(BB2_CORE . "/opera.inc.php"); + bb2_test($settings, $package, bb2_opera($package)); + } else { + require_once(BB2_CORE . "/msie.inc.php"); + bb2_test($settings, $package, bb2_msie($package)); + } + } elseif (stripos($ua, "Konqueror") !== FALSE) { + $package['is_browser'] = true; + require_once(BB2_CORE . "/konqueror.inc.php"); + bb2_test($settings, $package, bb2_konqueror($package)); + } elseif (stripos($ua, "Opera") !== FALSE) { + $package['is_browser'] = true; + require_once(BB2_CORE . "/opera.inc.php"); + bb2_test($settings, $package, bb2_opera($package)); + } elseif (stripos($ua, "Safari") !== FALSE) { + $package['is_browser'] = true; + require_once(BB2_CORE . "/safari.inc.php"); + bb2_test($settings, $package, bb2_safari($package)); + } elseif (stripos($ua, "Lynx") !== FALSE) { + $package['is_browser'] = true; + require_once(BB2_CORE . "/lynx.inc.php"); + bb2_test($settings, $package, bb2_lynx($package)); + } elseif (stripos($ua, "MovableType") !== FALSE) { + require_once(BB2_CORE . "/movabletype.inc.php"); + bb2_test($settings, $package, bb2_movabletype($package)); + } elseif (stripos($ua, "msnbot") !== FALSE || stripos($ua, "MS Search") !== FALSE) { + require_once(BB2_CORE . "/msnbot.inc.php"); + bb2_test($settings, $package, bb2_msnbot($package)); + } elseif (stripos($ua, "Googlebot") !== FALSE || stripos($ua, "Mediapartners-Google") !== FALSE) { + require_once(BB2_CORE . "/google.inc.php"); + bb2_test($settings, $package, bb2_google($package)); + } elseif (stripos($ua, "Mozilla") !== FALSE && stripos($ua, "Mozilla" == 0)) { + $package['is_browser'] = true; + require_once(BB2_CORE . "/mozilla.inc.php"); + bb2_test($settings, $package, bb2_mozilla($package)); + } + + // More intensive screening applies to POST requests + if (!strcasecmp('POST', $package['request_method'])) { + require_once(BB2_CORE . "/post.inc.php"); + bb2_test($settings, $package, bb2_post($settings, $package)); + } + } + + // Last chance screening. + require_once(BB2_CORE . "/screener.inc.php"); + bb2_screener($settings, $package); + + // And that's about it. + bb2_approved($settings, $package); + return true; +} +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/functions.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/functions.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/functions.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,69 @@ +<?php if (!defined('BB2_CORE')) die("I said no cheating!"); + +// Miscellaneous helper functions. + +// stripos() needed because stripos is only present on PHP 5 +if (!function_exists('stripos')) { + function stripos($haystack,$needle,$offset = 0) { + return(strpos(strtolower($haystack),strtolower($needle),$offset)); + } +} + +// str_split() needed because str_split is only present on PHP 5 +if (!function_exists('str_split')) { + function str_split($string, $split_length=1) + { + if ($split_length < 1) { + return false; + } + + for ($pos=0, $chunks = array(); $pos < strlen($string); $pos+=$split_length) { + $chunks[] = substr($string, $pos, $split_length); + } + return $chunks; + } +} + +// Convert a string to mixed-case on word boundaries. +function uc_all($string) { + $temp = preg_split('/(\W)/', str_replace("_", "-", $string), -1, PREG_SPLIT_DELIM_CAPTURE); + foreach ($temp as $key=>$word) { + $temp[$key] = ucfirst(strtolower($word)); + } + return join ('', $temp); +} + +// Determine if an IP address resides in a CIDR netblock or netblocks. +function match_cidr($addr, $cidr) { + $output = false; + + if (is_array($cidr)) { + foreach ($cidr as $cidrlet) { + if (match_cidr($addr, $cidrlet)) { + $output = true; + } + } + } else { + list($ip, $mask) = explode('/', $cidr); + $mask = 0xffffffff << (32 - $mask); + $output = ((ip2long($addr) & $mask) == (ip2long($ip) & $mask)); + } + return $output; +} + +// Obtain all the HTTP headers. +// NB: on PHP-CGI we have to fake it out a bit, since we can't get the REAL +// headers. Run PHP as Apache 2.0 module if possible for best results. +function bb2_load_headers() { + if (!is_callable('getallheaders')) { + $headers = array(); + foreach ($_SERVER as $h => $v) + if (ereg('HTTP_(.+)', $h, $hp)) + $headers[str_replace("_", "-", uc_all($hp[1]))] = $v; + } else { + $headers = getallheaders(); + } + return $headers; +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/google.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/google.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/google.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,13 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +// Analyze user agents claiming to be Googlebot + +function bb2_google($package) +{ + if (match_cidr($package['ip'], "66.249.64.0/19") === FALSE && match_cidr($package['ip'], "64.233.160.0/19") === FALSE) { + return "f1182195"; + } + return false; +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/housekeeping.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/housekeeping.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/housekeeping.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,16 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +function bb2_housekeeping($settings, $package) +{ + // FIXME Yes, the interval's hard coded (again) for now. + $query = "DELETE FROM `" . $settings['log_table'] . "` WHERE `date` < DATE_SUB('" . bb2_db_date() . "', INTERVAL 7 DAY)"; + bb2_db_query($query); + + // Waste a bunch more of the spammer's time, sometimes. + if (rand(1,1000) == 1) { + $query = "OPTIMIZE TABLE `" . $settings['log_table'] . "`"; + bb2_db_query($query); + } +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/index.html =================================================================== Added: main/trunk/extras/Bad-Behavior/bad-behavior/konqueror.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/konqueror.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/konqueror.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,17 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +// Analyze user agents claiming to be Konqueror + +function bb2_konqueror($package) +{ + // CafeKelsa is a dev project at Yahoo which indexes job listings for + // Yahoo! HotJobs. It identifies as Konqueror so we skip these checks. + if (stripos($package['headers_mixed']['User-Agent'], "YahooSeeker/CafeKelsa") === FALSE || match_cidr($package['ip'], "209.73.160.0/19") === FALSE) { + if (!array_key_exists('Accept', $package['headers_mixed'])) { + return "17566707"; + } + } + return false; +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/lynx.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/lynx.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/lynx.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,13 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +// Analyze user agents claiming to be Lynx + +function bb2_lynx($package) +{ + if (!array_key_exists('Accept', $package['headers_mixed'])) { + return "17566707"; + } + return false; +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/movabletype.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/movabletype.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/movabletype.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,14 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +function bb2_movabletype($package) +{ + // Is it a trackback? + if (strcasecmp($package['request_method'], "POST")) { + if (strcmp($package['headers_mixed']['Range'], "bytes=0-99999")) { + return "7d12528e"; + } + } + return false; +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/mozilla.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/mozilla.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/mozilla.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,19 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +// Analyze user agents claiming to be Mozilla + +function bb2_mozilla($package) +{ + // First off, workaround for Google Desktop, until they fix it FIXME + // Google Desktop fixed it, but apparently some old versions are + // still out there. :( + // Always check accept header for Mozilla user agents + if (strpos($package['headers_mixed']['User-Agent'], "Google Desktop") === FALSE) { + if (!array_key_exists('Accept', $package['headers_mixed'])) { + return "17566707"; + } + } + return false; +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/msie.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/msie.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/msie.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,24 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +// Analyze user agents claiming to be MSIE + +function bb2_msie($package) +{ + if (!array_key_exists('Accept', $package['headers_mixed'])) { + return "17566707"; + } + + // MSIE does NOT send "Windows ME" or "Windows XP" in the user agent + if (strpos($package['headers_mixed']['User-Agent'], "Windows ME") !== FALSE || strpos($package['headers_mixed']['User-Agent'], "Windows XP") !== FALSE || strpos($package['headers_mixed']['User-Agent'], "Windows 2000") !== FALSE || strpos($package['headers_mixed']['User-Agent'], "Win32") !== FALSE) { + return "a1084bad"; + } + + // MSIE does NOT send Connection: TE + if (preg_match('/\bTE\b/i', $package['headers_mixed']['Connection'])) { + return "2b90f772"; + } + + return false; +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/msnbot.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/msnbot.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/msnbot.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,13 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +// Analyze user agents claiming to be msnbot + +function bb2_msnbot($package) +{ + if (match_cidr($package['ip'], "207.46.0.0/16") === FALSE && match_cidr($package['ip'], "65.52.0.0/14") === FALSE && match_cidr($package['ip'], "207.68.128.0/18") === FALSE && match_cidr($package['ip'], "207.68.192.0/20") === FALSE && match_cidr($package['ip'], "64.4.0.0/18") === FALSE) { + return "e4de0453"; + } + return false; +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/opera.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/opera.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/opera.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,13 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +// Analyze user agents claiming to be Opera + +function bb2_opera($package) +{ + if (!array_key_exists('Accept', $package['headers_mixed'])) { + return "17566707"; + } + return false; +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/post.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/post.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/post.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,68 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +// All tests which apply specifically to POST requests +function bb2_post($settings, $package) +{ + // Check blackhole lists for known spam/malicious activity + require_once(BB2_CORE . "/blackhole.inc.php"); + bb2_test($settings, $package, bb2_blackhole($package)); + + // MovableType needs specialized screening + if (stripos($package['headers_mixed']['User-Agent'], "MovableType") !== FALSE) { + if (strcmp($package['headers_mixed']['Range'], "bytes=0-99999")) { + return "7d12528e"; + } + } + + // Trackbacks need special screening + $request_entity = $package['request_entity']; + if (isset($request_entity['title']) && isset($request_entity['url']) && isset($request_entity['blog_name'])) { + require_once(BB2_CORE . "/trackback.inc.php"); + return bb2_trackback($package); + } + + // Catch a few completely broken spambots + foreach ($request_entity as $key => $value) { + $pos = strpos($key, " document.write"); + if ($pos !== FAlSE) { + return "dfd9b1ad"; + } + } + + // Screen by cookie/JavaScript form add + if (isset($_COOKIE[BB2_COOKIE])) { + $screener1 = explode(" ", $_COOKIE[BB2_COOKIE]); + } + if (isset($_POST[BB2_COOKIE])) { + $screener2 = explode(" ", $_POST[BB2_COOKIE]); + } + $screener = max($screener1[0], $screener2[0]); + + if ($screener > 0) { + // Posting too fast? 5 sec + // FIXME: even 5 sec is too intrusive + // if ($screener + 5 > time()) + // return "408d7e72"; + // Posting too slow? 48 hr + if ($screener + 172800 < time()) + return "b40c8ddc"; + + // Screen by IP address + $ip = ip2long($package['ip']); + $ip_screener = ip2long($screener[1]); +// FIXME: This is b0rked, but why? +// if ($ip && $ip_screener && abs($ip_screener - $ip) > 256) +// return "c1fa729b"; + + // Screen for user agent changes + // User connected previously with blank user agent + $q = bb2_db_query("SELECT `ip` FROM " . $settings['log_table'] . " WHERE (`ip` = '" . $package['ip'] . "' OR `ip` = '" . $screener[1] . "') AND `user_agent` != '" . $package['user_agent'] . "' AND `date` > DATE_SUB('" . bb2_db_date() . "', INTERVAL 5 MINUTE)"); + // Damnit, too many ways for this to fail :( + if ($q !== FALSE && $q != NULL && bb2_db_num_rows($q) > 0) + return "799165c2"; + } + + return false; +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/responses.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/responses.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/responses.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,44 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +// Defines the responses which Bad Behavior might return. + +function bb2_get_response($key) { + $bb2_responses = array( + '00000000' => array('response' => 200, 'explanation' => '', 'log' => ''), + '136673cd' => array('response' => 403, 'explanation' => 'Your Internet Protocol address is listed on a blacklist of addresses involved in malicious or illegal activity. See the listing below for more details on specific blacklists and removal procedures.', 'log' => 'IP address found on external blacklist'), + '17566707' => array('response' => 403, 'explanation' => 'An invalid request was received from your browser. This may be caused by a malfunctioning proxy server or browser privacy software.', 'log' => 'Required header \'Accept\' missing'), + '17f4e8c8' => array('response' => 403, 'explanation' => 'You do not have permission to access this server.', 'log' => 'User-Agent was found on blacklist'), + '21f11d3f' => array('response' => 403, 'explanation' => 'An invalid request was received. You claimed to be a mobile Web device, but you do not actually appear to be a mobile Web device.', 'log' => 'User-Agent claimed to be AvantGo, claim appears false'), + '2b90f772' => array('response' => 403, 'explanation' => 'You do not have permission to access this server. If you are using the Opera browser, then Opera must appear in your user agent.', 'log' => 'Connection: TE present, not supported by MSIE'), + '408d7e72' => array('response' => 403, 'explanation' => 'You do not have permission to access this server. Before trying again, run anti-virus and anti-spyware software and remove any viruses and spyware from your computer.', 'log' => 'POST comes too quickly after GET'), + '41feed15' => array('response' => 400, 'explanation' => 'An invalid request was received. This may be caused by a malfunctioning proxy server. Bypass the proxy server and connect directly, or contact your proxy server administrator.', 'log' => 'Header \'Pragma\' without \'Cache-Control\' prohibited for HTTP/1.1 requests'), + '45b35e30' => array('response' => 403, 'explanation' => 'An invalid request was received from your browser. This may be caused by a malfunctioning proxy server or browser privacy software.', 'log' => 'Header \'Referer\' is corrupt'), + '57796684' => array('response' => 403, 'explanation' => 'You do not have permission to access this server. Before trying again, run anti-virus and anti-spyware software and remove any viruses and spyware from your computer.', 'log' => 'Prohibited header \'X-Aaaaaaaaaa\' or \'X-Aaaaaaaaaaaa\' present'), + '582ec5e4' => array('response' => 400, 'explanation' => 'An invalid request was received. If you are using a proxy server, bypass the proxy server or contact your proxy server administrator. This may also be caused by a bug in the Opera web browser.', 'log' => '"Header \'TE\' present but TE not specified in \'Connection\' header'), + '69920ee5' => array('response' => 403, 'explanation' => 'An invalid request was received from your browser. This may be caused by a malfunctioning proxy server or browser privacy software.', 'log' => 'Header \'Referer\' present but blank'), + '799165c2' => array('response' => 403, 'explanation' => 'You do not have permission to access this server.', 'log' => 'Rotating user-agents detected'), + '7a06532b' => array('response' => 400, 'explanation' => 'An invalid request was received from your browser. This may be caused by a malfunctioning proxy server or browser privacy software.', 'log' => 'Required header \'Accept-Encoding\' missing'), + '7ad04a8a' => array('response' => 400, 'explanation' => 'The automated program you are using is not permitted to access this server. Please use a different program or a standard Web browser.', 'log' => 'Prohibited header \'Range\' present'), + '7d12528e' => array('response' => 403, 'explanation' => 'You do not have permission to access this server.', 'log' => 'Prohibited header \'Range\' or \'Content-Range\' in POST request'), + '939a6fbb' => array('response' => 403, 'explanation' => 'The proxy server you are using is not permitted to access this server. Please bypass the proxy server, or contact your proxy server administrator.', 'log' => 'Banned proxy server in use'), + '9c9e4979' => array('response' => 403, 'explanation' => 'The proxy server you are using is not permitted to access this server. Please bypass the proxy server, or contact your proxy server administrator.', 'log' => 'Prohibited header \'via\' present'), + 'a0105122' => array('response' => 417, 'explanation' => 'Expectation failed. Please retry your request.', 'log' => 'Header \'Expect\' prohibited; resend without Expect'), + 'a1084bad' => array('response' => 403, 'explanation' => 'You do not have permission to access this server.', 'log' => 'User-Agent claimed to be MSIE, with invalid Windows version'), + 'a52f0448' => array('response' => 400, 'explanation' => 'An invalid request was received. This may be caused by a malfunctioning proxy server or browser privacy software. If you are using a proxy server, bypass the proxy server or contact your proxy server administrator.', 'log' => 'Header \'Connection\' contains invalid values'), + 'b40c8ddc' => array('response' => 403, 'explanation' => 'You do not have permission to access this server. Before trying again, close your browser, run anti-virus and anti-spyware software and remove any viruses and spyware from your computer.', 'log' => 'POST more than two days after GET'), + 'b7830251' => array('response' => 400, 'explanation' => 'Your proxy server sent an invalid request. Please contact the proxy server administrator to have this problem fixed.', 'log' => 'Prohibited header \'Proxy-Connection\' present'), + 'b9cc1d86' => array('response' => 403, 'explanation' => 'The proxy server you are using is not permitted to access this server. Please bypass the proxy server, or contact your proxy server administrator.', 'log' => 'Prohibited header \'X-Aaaaaaaaaa\' or \'X-Aaaaaaaaaaaa\' present'), + 'c1fa729b' => array('response' => 403, 'explanation' => 'You do not have permission to access this server. Before trying again, run anti-virus and anti-spyware software and remove any viruses and spyware from your computer.', 'log' => 'Use of rotating proxy servers detected'), + 'd60b87c7' => array('response' => 403, 'explanation' => 'You do not have permission to access this server. Before trying again, please remove any viruses or spyware from your computer.', 'log' => 'Trackback received via proxy server'), + 'dfd9b1ad' => array('response' => 403, 'explanation' => 'You do not have permission to access this server.', 'log' => 'Request contained a malicious JavaScript or SQL injection attack'), + 'e4de0453' => array('response' => 403, 'explanation' => 'An invalid request was received. You claimed to be a major search engine, but you do not appear to actually be a major search engine.', 'log' => 'User-Agent claimed to be msnbot, claim appears to be false'), + 'e87553e1' => array('response' => 403, 'explanation' => 'You do not have permission to access this server.', 'log' => 'I know you and I don\'t like you, dirty spammer.'), + 'f0dcb3fd' => array('response' => 403, 'explanation' => 'You do not have permission to access this server. Before trying again, run anti-virus and anti-spyware software and remove any viruses and spyware from your computer.', 'log' => 'Web browser attempted to send a trackback'), + 'f1182195' => array('response' => 403, 'explanation' => 'An invalid request was received. You claimed to be a major search engine, but you do not appear to actually be a major search engine.', 'log' => 'User-Agent claimed to be Googlebot, claim appears to be false.'), + 'f9f2b8b9' => array('response' => 403, 'explanation' => 'You do not have permission to access this server. This may be caused by a malfunctioning proxy server or browser privacy software.', 'log' => 'A User-Agent is required but none was provided.'), + ); + + if (array_key_exists($key, $bb2_responses)) return $bb2_responses[$key]; + return array('00000000'); +} +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/safari.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/safari.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/safari.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,13 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +// Analyze user agents claiming to be Safari + +function bb2_safari($package) +{ + if (!array_key_exists('Accept', $package['headers_mixed'])) { + return "17566707"; + } + return false; +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/screener.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/screener.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/screener.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,63 @@ +<?php if (!defined('BB2_CWD')) die("I said no cheating!"); + +// Bad Behavior browser screener + +function bb2_screener_cookie($settings, $package, $cookie_name, $cookie_value) +{ + // FIXME: Set the real cookie + setcookie($cookie_name, $cookie_value, 0, bb2_relative_path()); +} + +function bb2_screener_javascript($settings, $package, $cookie_name, $cookie_value) +{ + global $bb2_javascript; + + // FIXME: do something + $bb2_javascript = "<script type=\"text/javascript\"> +<!-- +function bb2_addLoadEvent(func) { + var oldonload = window.onload; + if (typeof window.onload != 'function') { + window.onload = func; + } else { + window.onload = function() { + oldonload(); + func(); + } + } +} + +bb2_addLoadEvent(function() { + for ( i=0; i < document.forms.length; i++ ) { + if (document.forms[i].method == 'post') { + var myElement = document.createElement('input'); + myElement.setAttribute('type', 'hidden'); + myElement.name = '$cookie_name'; + myElement.value = '$cookie_value'; + document.forms[i].appendChild(myElement); + } + } +}); +// --></script> + "; +} + +function bb2_screener($settings, $package) +{ + $cookie_name = BB2_COOKIE; + + // Set up a simple cookie + $screener = array(time(), $package['ip']); + if (isset($package['headers_mixed']['X-Forwarded-For'])) { + array_push($screener, $package['headers_mixed']['X-Forwarded-For']); + } + if (isset($package['headers_mixed']['Client-Ip'])) { + array_push($screener, $package['headers_mixed']['Client-Ip']); + } + + $cookie_value = implode(" ", $screener); + + bb2_screener_cookie($settings, $package, BB2_COOKIE, $cookie_value); + bb2_screener_javascript($settings, $package, BB2_COOKIE, $cookie_value); +} +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/trackback.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/trackback.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/trackback.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,18 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +// Specialized screening for trackbacks +function bb2_trackback($package) +{ + // Web browsers don't send trackbacks + if ($package['is_browser']) { + return 'f0dcb3fd'; + } + + // Proxy servers don't send trackbacks either + if (array_key_exists('Via', $package['headers_mixed']) || array_key_exists('Max-Forwards', $package['headers_mixed']) || array_key_exists('X-Forwarded-For', $package['headers_mixed']) || array_key_exists('Client-Ip', $package['headers_mixed'])) { + return 'd60b87c7'; + } + return false; +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/version.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/version.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/version.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,3 @@ +<?php if (!defined('BB2_CWD')) die("I said no cheating!"); +define('BB2_VERSION', "2.0.8"); +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior/whitelist.inc.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior/whitelist.inc.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior/whitelist.inc.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,57 @@ +<?php if (!defined('BB2_CORE')) die('I said no cheating!'); + +function bb2_whitelist($package) +{ + // DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! + + // Inappropriate whitelisting WILL expose you to spam, or cause Bad + // Behavior to stop functioning entirely! DO NOT WHITELIST unless you + // are 100% CERTAIN that you should. + + // IP address ranges use the CIDR format. + + // Includes four examples of whitelisting by IP address and netblock. + $bb2_whitelist_ip_ranges = array( + "10.0.0.0/8", + "172.16.0.0/12", + "192.168.0.0/16", +// "127.0.0.1", + "208.54.95.129", + ); + + // DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! + + // Inappropriate whitelisting WILL expose you to spam, or cause Bad + // Behavior to stop functioning entirely! DO NOT WHITELIST unless you + // are 100% CERTAIN that you should. + + // You should not whitelist search engines by user agent. Use the IP + // netblock for the search engine instead. See http://whois.arin.net/ + // to locate the netblocks for an IP. + + // User agents are matched by exact match only. + + // Includes one example of whitelisting by user agent. + // All are commented out. + $bb2_whitelist_user_agents = array( + // "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) It's me, let me in", + ); + + // DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! + + // Do not edit below this line + + if (!empty($bb2_whitelist_ip_ranges)) { + foreach ($bb2_whitelist_ip_ranges as $range) { + if (match_cidr($package['ip'], $range)) return true; + } + } + if (!empty($bb2_whitelist_user_agents)) { + foreach ($bb2_whitelist_user_agents as $user_agent) { + if (!strcmp($package['headers_mixed']['User-Agent'], $user_agent)) return true; + } + } + return false; +} + +?> Added: main/trunk/extras/Bad-Behavior/bad-behavior-phpBBreloaded.php =================================================================== --- main/trunk/extras/Bad-Behavior/bad-behavior-phpBBreloaded.php (rev 0) +++ main/trunk/extras/Bad-Behavior/bad-behavior-phpBBreloaded.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,140 @@ +<?php +/* +Bad Behavior - detects and blocks unwanted Web accesses +Copyright (C) 2005-2006 Michael Hampton + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +As a special exemption, you may link this program with any of the +programs listed below, regardless of the license terms of those +programs, and distribute the resulting program, without including the +source code for such programs: ExpressionEngine + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Please report any problems to badbots AT ioerror DOT us +*/ + +############################################################################### +############################################################################### + +define('BB2_CWD', dirname(__FILE__)); + +// Settings you can adjust for Bad Behavior. +// Most of these are unused in non-database mode. +$bb2_settings_defaults = array( + 'log_table' => 'bad_behavior', + 'display_stats' => true, + 'strict' => false, + 'verbose' => false +); + +// Bad Behavior callback functions. + +// Return current time in the format preferred by your database. +function bb2_db_date() { + return gmdate('Y-m-d H:i:s'); // Example is MySQL format +} + +// Return affected rows from most recent query. +function bb2_db_affected_rows() { + return false; +} + +// Escape a string for database usage +function bb2_db_escape($string) { + // return mysql_real_escape_string($string); + return $string; // No-op when database not in use. +} + +// Return the number of rows in a particular query. +function bb2_db_num_rows($result) { + if ($result !== FALSE) + return count($result); + return 0; +} + +// Run a query and return the results, if any. +// Should return FALSE if an error occurred. +// Bad Behavior will use the return value here in other callbacks. +function bb2_db_query($query) { + return FALSE; +} + +// Return all rows in a particular query. +// Should contain an array of all rows generated by calling mysql_fetch_assoc() +// or equivalent and appending the result of each call to an array. +function bb2_db_rows($result) { + return $result; +} + +// Return emergency contact email address. +function bb2_email() { + // return "ex...@ex..."; // You need to change this. + return "ba...@io..."; // You need to change this. +} + +// retrieve settings from database +// Settings are hard-coded for non-database use +function bb2_read_settings() { + global $bb2_settings_defaults; + return $bb2_settings_defaults; +} + +// write settings to database +function bb2_write_settings($settings) { + return false; +} + +// installation +function bb2_install() { + return false; +} + +// Screener +// Insert this into the <head> section of your HTML through a template call +// or whatever is appropriate. This is optional we'll fall back to cookies +// if you don't use it. +function bb2_insert_head() { + global $bb2_javascript; + echo $bb2_javascript; +} + +// Display stats? This is optional. +function bb2_insert_stats($force = false) { + $settings = bb2_read_settings(); + + if ($force || $settings['display_stats']) { + $blocked = bb2_db_query("SELECT COUNT(*) FROM " . $settings['log_table'] . " WHERE `key` NOT LIKE '00000000'"); + if ($blocked !== FALSE) { + echo sprintf('<p><a href="http://www.homelandstupidity.us/software/bad-behavior/">%1$s</a> %2$s <strong>%3$s</strong> %4$s</p>', __('Bad Behavior'), __('has blocked'), $blocked[0]["COUNT(*)"], __('access attempts in the last 7 days.')); + } + } +} + +// Return the top-level relative path of wherever we are (for cookies) +// You should provide in $url the top-level URL for your site. +function bb2_relative_path() { + //$url = parse_url(get_bloginfo('url')); + //return $url['path'] . '/'; + return '/'; +} + +// Calls inward to Bad Behavor itself. +require_once(BB2_CWD . "/bad-behavior/version.inc.php"); +require_once(BB2_CWD . "/bad-behavior/core.inc.php"); +bb2_install(); // FIXME: see above + +bb2_start(bb2_read_settings()); + +?> Added: main/trunk/extras/Bad-Behavior/index.html =================================================================== Added: main/trunk/extras_config.php =================================================================== --- main/trunk/extras_config.php (rev 0) +++ main/trunk/extras_config.php 2006-12-31 16:08:16 UTC (rev 282) @@ -0,0 +1,68 @@ +<?php +/******************************************************************************* + * extras_config.php + * ------------------- + * begin : Sunday, Dec 31, 2006 + * copyright : (C) 2006 The phpBBreloaded Group + * website : www.phpbbreloaded.org + * + * $Id: extras_config.php,v 1.0 2006/12/30 14:46:59 mjnr Exp $ + * + ******************************************************************************/ + +/******************************************************************************* + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + ******************************************************************************/ + +/******************************************************************************* + * Use this file to configure the basics for using any phpBBreloaded 'extras', + * such as location, whether to use, etc.. + * + * My suggestion is to only use the 'extras' section/folder to store addins + * that are developed independantly from the phpBBreloaded core. This will give + * us an easy avenu... [truncated message content] |
From: <mj...@us...> - 2006-12-30 04:58:08
|
Revision: 281 http://svn.sourceforge.net/phpbbreloaded/?rev=281&view=rev Author: mjnr Date: 2006-12-29 20:58:08 -0800 (Fri, 29 Dec 2006) Log Message: ----------- Fixed correct detection of a proxied servers port. Modified Paths: -------------- main/trunk/install/install.php Modified: main/trunk/install/install.php =================================================================== --- main/trunk/install/install.php 2006-12-30 03:14:20 UTC (rev 280) +++ main/trunk/install/install.php 2006-12-30 04:58:08 UTC (rev 281) @@ -449,13 +449,21 @@ } else { - /* - * TODO: - * Detect a proxied port (e.g. utilise 'HTTP_X_FORWARDED_HOST:8080' perhaps?) - * This sounds like a damn ugly hack so need to set up a test server. MJ - */ - if (!empty($HTTP_SERVER_VARS['SERVER_PORT']) || !empty($HTTP_ENV_VARS['SERVER_PORT'])) + if (!empty($HTTP_SERVER_VARS['HTTP_X_FORWARDED_HOST']) || !empty($HTTP_ENV_VARS['HTTP_X_FORWARDED_HOST'])) { + $server_port = (!empty($HTTP_SERVER_VARS['HTTP_X_FORWARDED_HOST'])) ? $HTTP_SERVER_VARS['HTTP_X_FORWARDED_HOST'] : $HTTP_ENV_VARS['HTTP_X_FORWARDED_HOST']; + $server_port = explode(':',$server_port); + if(empty($server_port[1])) + { + $server_port = '80'; + } + else + { + $server_port = $server_port[1]; + } + } + else if (!empty($HTTP_SERVER_VARS['SERVER_PORT']) || !empty($HTTP_ENV_VARS['SERVER_PORT'])) + { $server_port = (!empty($HTTP_SERVER_VARS['SERVER_PORT'])) ? $HTTP_SERVER_VARS['SERVER_PORT'] : $HTTP_ENV_VARS['SERVER_PORT']; } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mj...@us...> - 2006-12-30 03:14:19
|
Revision: 280 http://svn.sourceforge.net/phpbbreloaded/?rev=280&view=rev Author: mjnr Date: 2006-12-29 19:14:20 -0800 (Fri, 29 Dec 2006) Log Message: ----------- Fixed host name guessing for servers sitting behind proxies. Modified Paths: -------------- main/trunk/install/install.php Modified: main/trunk/install/install.php =================================================================== --- main/trunk/install/install.php 2006-12-26 21:01:11 UTC (rev 279) +++ main/trunk/install/install.php 2006-12-30 03:14:20 UTC (rev 280) @@ -421,8 +421,16 @@ else { // Guess at some basic info used for install.. - if (!empty($HTTP_SERVER_VARS['SERVER_NAME']) || !empty($HTTP_ENV_VARS['SERVER_NAME'])) + if (!empty($HTTP_SERVER_VARS['HTTP_X_FORWARDED_SERVER']) || !empty($HTTP_ENV_VARS['HTTP_X_FORWARDED_SERVER'])) { + $server_name = (!empty($HTTP_SERVER_VARS['HTTP_X_FORWARDED_SERVER'])) ? $HTTP_SERVER_VARS['HTTP_X_FORWARDED_SERVER'] : $HTTP_ENV_VARS['HTTP_X_FORWARDED_SERVER']; + } + else if (!empty($HTTP_SERVER_VARS['HTTP_X_FORWARDED_HOST']) || !empty($HTTP_ENV_VARS['HTTP_X_FORWARDED_HOST'])) + { + $server_name = (!empty($HTTP_SERVER_VARS['HTTP_X_FORWARDED_HOST'])) ? $HTTP_SERVER_VARS['HTTP_X_FORWARDED_HOST'] : $HTTP_ENV_VARS['HTTP_X_FORWARDED_HOST']; + } + else if (!empty($HTTP_SERVER_VARS['SERVER_NAME']) || !empty($HTTP_ENV_VARS['SERVER_NAME'])) + { $server_name = (!empty($HTTP_SERVER_VARS['SERVER_NAME'])) ? $HTTP_SERVER_VARS['SERVER_NAME'] : $HTTP_ENV_VARS['SERVER_NAME']; } else if (!empty($HTTP_SERVER_VARS['HTTP_HOST']) || !empty($HTTP_ENV_VARS['HTTP_HOST'])) @@ -441,6 +449,11 @@ } else { + /* + * TODO: + * Detect a proxied port (e.g. utilise 'HTTP_X_FORWARDED_HOST:8080' perhaps?) + * This sounds like a damn ugly hack so need to set up a test server. MJ + */ if (!empty($HTTP_SERVER_VARS['SERVER_PORT']) || !empty($HTTP_ENV_VARS['SERVER_PORT'])) { $server_port = (!empty($HTTP_SERVER_VARS['SERVER_PORT'])) ? $HTTP_SERVER_VARS['SERVER_PORT'] : $HTTP_ENV_VARS['SERVER_PORT']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <teh...@us...> - 2006-12-26 21:01:16
|
Revision: 279 http://svn.sourceforge.net/phpbbreloaded/?rev=279&view=rev Author: tehphpmaster Date: 2006-12-26 13:01:11 -0800 (Tue, 26 Dec 2006) Log Message: ----------- Big changes on the ACP front. I've started to backport the phpBB3 ACP to phpBB Reloaded. We've done this for a number of reasons, which i will explain more on later. admin/index.php doesn't have a lot of content; it needs rewriting for the new ACP. Things are hardcoded and pretty messy at the moment but that will change as development continues. More details on this later. Modified Paths: -------------- main/trunk/admin/index.php main/trunk/templates/subSilver/admin/index_body.tpl main/trunk/templates/subSilver/admin/index_frameset.tpl main/trunk/templates/subSilver/admin/page_header.tpl Added Paths: ----------- main/trunk/templates/subSilver/images/bg_header.gif main/trunk/templates/subSilver/images/bg_tabs1.gif main/trunk/templates/subSilver/images/bg_tabs2.gif Modified: main/trunk/admin/index.php =================================================================== --- main/trunk/admin/index.php 2006-12-24 06:08:00 UTC (rev 278) +++ main/trunk/admin/index.php 2006-12-26 21:01:11 UTC (rev 279) @@ -30,628 +30,20 @@ require($phpbb_root_path . 'extension.inc'); require('./pagestart.' . $phpEx); -// --------------- -// Begin functions -// -function inarray($needle, $haystack) -{ - for($i = 0; $i < sizeof($haystack); $i++ ) - { - if( $haystack[$i] == $needle ) - { - return true; - } - } - return false; -} -// -// End functions -// ------------- -// -// Generate relevant output -// -if( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'left' ) -{ - $dir = @opendir("."); - - $setmodules = 1; - while( $file = @readdir($dir) ) - { - if( preg_match("/^admin_.*?\." . $phpEx . "$/", $file) ) - { - include('./' . $file); - } - } - - @closedir($dir); - - unset($setmodules); - include('./page_header_admin.'.$phpEx); $template->set_filenames(array( - "body" => "admin/index_navigate.tpl") - ); - - $template->assign_vars(array( - "U_FORUM_INDEX" => append_sid("../index.$phpEx"), - "U_ADMIN_INDEX" => append_sid("index.$phpEx?pane=right"), - - "L_FORUM_INDEX" => $lang['Main_index'], - "L_ADMIN_INDEX" => $lang['Admin_Index'], - "L_PREVIEW_FORUM" => $lang['Preview_forum']) - ); - - ksort($module); - - while( list($cat, $action_array) = each($module) ) - { - $cat = ( !empty($lang[$cat]) ) ? $lang[$cat] : preg_replace("/_/", " ", $cat); - - $template->assign_block_vars("catrow", array( - "ADMIN_CATEGORY" => $cat) - ); - - ksort($action_array); - - $row_count = 0; - while( list($action, $file) = each($action_array) ) - { - $row_color = ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2']; - $row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2']; - - $action = ( !empty($lang[$action]) ) ? $lang[$action] : preg_replace("/_/", " ", $action); - - $template->assign_block_vars("catrow.modulerow", array( - "ROW_COLOR" => "#" . $row_color, - "ROW_CLASS" => $row_class, - - "ADMIN_MODULE" => $action, - "U_ADMIN_MODULE" => append_sid($file)) - ); - $row_count++; - } - } - - $template->pparse("body"); - - include('./page_footer_admin.'.$phpEx); -} -elseif( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' ) -{ - - include('./page_header_admin.'.$phpEx); - - $template->set_filenames(array( "body" => "admin/index_body.tpl") ); $template->assign_vars(array( - "L_WELCOME" => $lang['Welcome_phpBB'], - "L_ADMIN_INTRO" => $lang['Admin_intro'], - "L_FORUM_STATS" => $lang['Forum_stats'], - "L_WHO_IS_ONLINE" => $lang['Who_is_Online'], - "L_USERNAME" => $lang['Username'], - "L_LOCATION" => $lang['Location'], - "L_LAST_UPDATE" => $lang['Last_updated'], - "L_IP_ADDRESS" => $lang['IP_Address'], - "L_STATISTIC" => $lang['Statistic'], - "L_VALUE" => $lang['Value'], - "L_NUMBER_POSTS" => $lang['Number_posts'], - "L_POSTS_PER_DAY" => $lang['Posts_per_day'], - "L_NUMBER_TOPICS" => $lang['Number_topics'], - "L_TOPICS_PER_DAY" => $lang['Topics_per_day'], - "L_NUMBER_USERS" => $lang['Number_users'], - "L_USERS_PER_DAY" => $lang['Users_per_day'], - "L_BOARD_STARTED" => $lang['Board_started'], - "L_AVATAR_DIR_SIZE" => $lang['Avatar_dir_size'], - "L_DB_SIZE" => $lang['Database_size'], - "L_FORUM_LOCATION" => $lang['Forum_Location'], - "L_STARTED" => $lang['Login'], - "L_GZIP_COMPRESSION" => $lang['Gzip_compression']) + ) ); - // - // Get forum statistics - // - $total_posts = get_db_stat('postcount'); - $total_users = get_db_stat('usercount'); - $total_topics = get_db_stat('topiccount'); - $start_date = create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']); - - $boarddays = ( time() - $board_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); - - $avatar_dir_size = 0; - - if ($avatar_dir = @opendir($phpbb_root_path . $board_config['avatar_path'])) - { - while( $file = @readdir($avatar_dir) ) - { - if( $file != "." && $file != ".." ) - { - $avatar_dir_size += @filesize($phpbb_root_path . $board_config['avatar_path'] . "/" . $file); - } - } - @closedir($avatar_dir); - - // - // This bit of code translates the avatar directory size into human readable format - // Borrowed the code from the PHP.net annoted manual, origanally written by: - // Jesse (je...@je...) - // - if($avatar_dir_size >= 1048576) - { - $avatar_dir_size = round($avatar_dir_size / 1048576 * 100) / 100 . " MB"; - } - else if($avatar_dir_size >= 1024) - { - $avatar_dir_size = round($avatar_dir_size / 1024 * 100) / 100 . " KB"; - } - else - { - $avatar_dir_size = $avatar_dir_size . " Bytes"; - } - - } - else - { - // Couldn't open Avatar dir. - $avatar_dir_size = $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; - } - - // - // DB size ... MySQL only - // - // This code is heavily influenced by a similar routine - // in phpMyAdmin 2.2.0 - // - if( preg_match("/^mysql/", SQL_LAYER) ) - { - $sql = "SELECT VERSION() AS mysql_version"; - if($result = $db->sql_query($sql)) - { - $row = $db->sql_fetchrow($result); - $version = $row['mysql_version']; - - if( preg_match("/^(3\.23|4\.|5\.)/", $version) ) - { - $db_name = ( preg_match("/^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)|(5\.)/", $version) ) ? "`$dbname`" : $dbname; - - $sql = "SHOW TABLE STATUS - FROM " . $db_name; - if($result = $db->sql_query($sql)) - { - $tabledata_ary = $db->sql_fetchrowset($result); - - $dbsize = 0; - for($i = 0; $i < count($tabledata_ary); $i++) - { - if( $tabledata_ary[$i]['Type'] != "MRG_MyISAM" ) - { - if( $table_prefix != "" ) - { - if( strstr($tabledata_ary[$i]['Name'], $table_prefix) ) - { - $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; - } - } - else - { - $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; - } - } - } - } // Else we couldn't get the table status. - } - else - { - $dbsize = $lang['Not_available']; - } - } - else - { - $dbsize = $lang['Not_available']; - } - } - else if( preg_match("/^mssql/", SQL_LAYER) ) - { - $sql = "SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize - FROM sysfiles"; - if( $result = $db->sql_query($sql) ) - { - $dbsize = ( $row = $db->sql_fetchrow($result) ) ? intval($row['dbsize']) : $lang['Not_available']; - } - else - { - $dbsize = $lang['Not_available']; - } - } - else - { - $dbsize = $lang['Not_available']; - } - - if ( is_integer($dbsize) ) - { - if( $dbsize >= 1048576 ) - { - $dbsize = sprintf("%.2f MB", ( $dbsize / 1048576 )); - } - else if( $dbsize >= 1024 ) - { - $dbsize = sprintf("%.2f KB", ( $dbsize / 1024 )); - } - else - { - $dbsize = sprintf("%.2f Bytes", $dbsize); - } - } - - $template->assign_vars(array( - "NUMBER_OF_POSTS" => $total_posts, - "NUMBER_OF_TOPICS" => $total_topics, - "NUMBER_OF_USERS" => $total_users, - "START_DATE" => $start_date, - "POSTS_PER_DAY" => $posts_per_day, - "TOPICS_PER_DAY" => $topics_per_day, - "USERS_PER_DAY" => $users_per_day, - "AVATAR_DIR_SIZE" => $avatar_dir_size, - "DB_SIZE" => $dbsize, - "GZIP_COMPRESSION" => ( $board_config['gzip_compress'] ) ? $lang['ON'] : $lang['OFF']) - ); - // - // End forum statistics - // - - // - // Get users online information. - // - $sql = "SELECT u.user_id, u.username, u.user_session_time, u.user_session_page, s.session_logged_in, s.session_ip, s.session_start - FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s - WHERE s.session_logged_in = " . TRUE . " - AND u.user_id = s.session_user_id - AND u.user_id <> " . ANONYMOUS . " - AND s.session_time >= " . ( time() - 300 ) . " - ORDER BY u.user_session_time DESC"; - if(!$result = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Couldn't obtain regd user/online information.", "", __LINE__, __FILE__, $sql); - } - $onlinerow_reg = $db->sql_fetchrowset($result); - - $sql = "SELECT session_page, session_logged_in, session_time, session_ip, session_start - FROM " . SESSIONS_TABLE . " - WHERE session_logged_in = 0 - AND session_time >= " . ( time() - 300 ) . " - ORDER BY session_time DESC"; - if(!$result = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Couldn't obtain guest user/online information.", "", __LINE__, __FILE__, $sql); - } - $onlinerow_guest = $db->sql_fetchrowset($result); - - $sql = "SELECT forum_name, forum_id - FROM " . FORUMS_TABLE; - if($forums_result = $db->sql_query($sql)) - { - while($forumsrow = $db->sql_fetchrow($forums_result)) - { - $forum_data[$forumsrow['forum_id']] = $forumsrow['forum_name']; - } - } - else - { - message_die(GENERAL_ERROR, "Couldn't obtain user/online forums information.", "", __LINE__, __FILE__, $sql); - } - - $reg_userid_ary = array(); - - if( count($onlinerow_reg) ) - { - $registered_users = 0; - - for($i = 0; $i < count($onlinerow_reg); $i++) - { - if( !inarray($onlinerow_reg[$i]['user_id'], $reg_userid_ary) ) - { - $reg_userid_ary[] = $onlinerow_reg[$i]['user_id']; - - $username = $onlinerow_reg[$i]['username']; - - if( $onlinerow_reg[$i]['user_allow_viewonline'] || $userdata['user_level'] == ADMIN ) - { - $registered_users++; - $hidden = FALSE; - } - else - { - $hidden_users++; - $hidden = TRUE; - } - - if( $onlinerow_reg[$i]['user_session_page'] < 1 ) - { - switch($onlinerow_reg[$i]['user_session_page']) - { - case PAGE_INDEX: - $location = $lang['Forum_index']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_POSTING: - $location = $lang['Posting_message']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_LOGIN: - $location = $lang['Logging_on']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_SEARCH: - $location = $lang['Searching_forums']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_PROFILE: - $location = $lang['Viewing_profile']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_VIEWONLINE: - $location = $lang['Viewing_online']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_VIEWMEMBERS: - $location = $lang['Viewing_member_list']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_PRIVMSGS: - $location = $lang['Viewing_priv_msgs']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_FAQ: - $location = $lang['Viewing_FAQ']; - $location_url = "index.$phpEx?pane=right"; - break; - default: - $location = $lang['Forum_index']; - $location_url = "index.$phpEx?pane=right"; - } - } - else - { - $location_url = append_sid("admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=" . $onlinerow_reg[$i]['user_session_page']); - $location = $forum_data[$onlinerow_reg[$i]['user_session_page']]; - } - - $row_color = ( $registered_users % 2 ) ? $theme['td_color1'] : $theme['td_color2']; - $row_class = ( $registered_users % 2 ) ? $theme['td_class1'] : $theme['td_class2']; - - $reg_ip = decode_ip($onlinerow_reg[$i]['session_ip']); - - $template->assign_block_vars("reg_user_row", array( - "ROW_COLOR" => "#" . $row_color, - "ROW_CLASS" => $row_class, - "USERNAME" => $username, - "STARTED" => create_date($board_config['default_dateformat'], $onlinerow_reg[$i]['session_start'], $board_config['board_timezone']), - "LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow_reg[$i]['user_session_time'], $board_config['board_timezone']), - "FORUM_LOCATION" => $location, - "IP_ADDRESS" => $reg_ip, - - "U_WHOIS_IP" => "http://network-tools.com/default.asp?host=$reg_ip", - "U_USER_PROFILE" => append_sid("admin_users.$phpEx?mode=edit&" . POST_USERS_URL . "=" . $onlinerow_reg[$i]['user_id']), - "U_FORUM_LOCATION" => append_sid($location_url)) - ); - } - } - - } - else - { - $template->assign_vars(array( - "L_NO_REGISTERED_USERS_BROWSING" => $lang['No_users_browsing']) - ); - } - - // - // Guest users - // - if( count($onlinerow_guest) ) - { - $guest_users = 0; - - for($i = 0; $i < count($onlinerow_guest); $i++) - { - $guest_userip_ary[] = $onlinerow_guest[$i]['session_ip']; - $guest_users++; - - if( $onlinerow_guest[$i]['session_page'] < 1 ) - { - switch( $onlinerow_guest[$i]['session_page'] ) - { - case PAGE_INDEX: - $location = $lang['Forum_index']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_POSTING: - $location = $lang['Posting_message']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_LOGIN: - $location = $lang['Logging_on']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_SEARCH: - $location = $lang['Searching_forums']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_PROFILE: - $location = $lang['Viewing_profile']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_VIEWONLINE: - $location = $lang['Viewing_online']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_VIEWMEMBERS: - $location = $lang['Viewing_member_list']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_PRIVMSGS: - $location = $lang['Viewing_priv_msgs']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_FAQ: - $location = $lang['Viewing_FAQ']; - $location_url = "index.$phpEx?pane=right"; - break; - default: - $location = $lang['Forum_index']; - $location_url = "index.$phpEx?pane=right"; - } - } - else - { - $location_url = append_sid("admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=" . $onlinerow_guest[$i]['session_page']); - $location = $forum_data[$onlinerow_guest[$i]['session_page']]; - } - - $row_color = ( $guest_users % 2 ) ? $theme['td_color1'] : $theme['td_color2']; - $row_class = ( $guest_users % 2 ) ? $theme['td_class1'] : $theme['td_class2']; - - $guest_ip = decode_ip($onlinerow_guest[$i]['session_ip']); - - $template->assign_block_vars("guest_user_row", array( - "ROW_COLOR" => "#" . $row_color, - "ROW_CLASS" => $row_class, - "USERNAME" => $lang['Guest'], - "STARTED" => create_date($board_config['default_dateformat'], $onlinerow_guest[$i]['session_start'], $board_config['board_timezone']), - "LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow_guest[$i]['session_time'], $board_config['board_timezone']), - "FORUM_LOCATION" => $location, - "IP_ADDRESS" => $guest_ip, - - "U_WHOIS_IP" => "http://network-tools.com/default.asp?host=$guest_ip", - "U_FORUM_LOCATION" => append_sid($location_url)) - ); - } - - } - else - { - $template->assign_vars(array( - "L_NO_GUESTS_BROWSING" => $lang['No_users_browsing']) - ); - } - - // Check for new version - $current_version = explode('.', '2' . $board_config['version']); - $minor_revision = (int) $current_version[2]; - - $errno = 0; - $errstr = $version_info = ''; - - if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr, 10)) - { - @fputs($fsock, "GET /updatecheck/20x.txt HTTP/1.1\r\n"); - @fputs($fsock, "HOST: www.phpbb.com\r\n"); - @fputs($fsock, "Connection: close\r\n\r\n"); - - $get_info = false; - while (!@feof($fsock)) - { - if ($get_info) - { - $version_info .= @fread($fsock, 1024); - } - else - { - if (@fgets($fsock, 1024) == "\r\n") - { - $get_info = true; - } - } - } - @fclose($fsock); - - $version_info = explode("\n", $version_info); - $latest_head_revision = (int) $version_info[0]; - $latest_minor_revision = (int) $version_info[2]; - $latest_version = (int) $version_info[0] . '.' . (int) $version_info[1] . '.' . (int) $version_info[2]; - - if ($latest_head_revision == 2 && $minor_revision == $latest_minor_revision) - { - $version_info = '<p style="color:green">' . $lang['Version_up_to_date'] . '</p>'; - } - else - { - $version_info = '<p style="color:red">' . $lang['Version_not_up_to_date']; - $version_info .= '<br />' . sprintf($lang['Latest_version_info'], $latest_version) . ' ' . sprintf($lang['Current_version_info'], '2' . $board_config['version']) . '</p>'; - } - } - else - { - if ($errstr) - { - $version_info = '<p style="color:red">' . sprintf($lang['Connect_socket_error'], $errstr) . '</p>'; - } - else - { - $version_info = '<p>' . $lang['Socket_functions_disabled'] . '</p>'; - } - } - - $version_info .= '<p>' . $lang['Mailing_list_subscribe_reminder'] . '</p>'; - - - $template->assign_vars(array( - 'VERSION_INFO' => $version_info, - 'L_VERSION_INFORMATION' => $lang['Version_information']) - ); - $template->pparse("body"); include('./page_footer_admin.'.$phpEx); -} -else -{ - // - // Generate frameset - // - $template->set_filenames(array( - "body" => "admin/index_frameset.tpl") - ); - - $template->assign_vars(array( - "S_FRAME_NAV" => append_sid("index.$phpEx?pane=left"), - "S_FRAME_MAIN" => append_sid("index.$phpEx?pane=right")) - ); - - header ("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT"); - header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - - $template->pparse("body"); - - $db->sql_close(); - exit; - -} - ?> \ No newline at end of file Modified: main/trunk/templates/subSilver/admin/index_body.tpl =================================================================== --- main/trunk/templates/subSilver/admin/index_body.tpl 2006-12-24 06:08:00 UTC (rev 278) +++ main/trunk/templates/subSilver/admin/index_body.tpl 2006-12-26 21:01:11 UTC (rev 279) @@ -1,86 +1,70 @@ - -<h1>{L_WELCOME}</h1> - -<p>{L_ADMIN_INTRO}</p> - -<h1>{L_FORUM_STATS}</h1> - -<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> - <tr> - <th width="25%" nowrap="nowrap" height="25" class="thCornerL">{L_STATISTIC}</th> - <th width="25%" height="25" class="thTop">{L_VALUE}</th> - <th width="25%" nowrap="nowrap" height="25" class="thTop">{L_STATISTIC}</th> - <th width="25%" height="25" class="thCornerR">{L_VALUE}</th> - </tr> - <tr> - <td class="row1" nowrap="nowrap">{L_NUMBER_POSTS}:</td> - <td class="row2"><b>{NUMBER_OF_POSTS}</b></td> - <td class="row1" nowrap="nowrap">{L_POSTS_PER_DAY}:</td> - <td class="row2"><b>{POSTS_PER_DAY}</b></td> - </tr> - <tr> - <td class="row1" nowrap="nowrap">{L_NUMBER_TOPICS}:</td> - <td class="row2"><b>{NUMBER_OF_TOPICS}</b></td> - <td class="row1" nowrap="nowrap">{L_TOPICS_PER_DAY}:</td> - <td class="row2"><b>{TOPICS_PER_DAY}</b></td> - </tr> - <tr> - <td class="row1" nowrap="nowrap">{L_NUMBER_USERS}:</td> - <td class="row2"><b>{NUMBER_OF_USERS}</b></td> - <td class="row1" nowrap="nowrap">{L_USERS_PER_DAY}:</td> - <td class="row2"><b>{USERS_PER_DAY}</b></td> - </tr> - <tr> - <td class="row1" nowrap="nowrap">{L_BOARD_STARTED}:</td> - <td class="row2"><b>{START_DATE}</b></td> - <td class="row1" nowrap="nowrap">{L_AVATAR_DIR_SIZE}:</td> - <td class="row2"><b>{AVATAR_DIR_SIZE}</b></td> - </tr> - <tr> - <td class="row1" nowrap="nowrap">{L_DB_SIZE}:</td> - <td class="row2"><b>{DB_SIZE}</b></td> - <td class="row1" nowrap="nowrap">{L_GZIP_COMPRESSION}:</td> - <td class="row2"><b>{GZIP_COMPRESSION}</b></td> - </tr> -</table> - -<h1>{L_VERSION_INFORMATION}</h1> - -{VERSION_INFO} - -<br /> - -<h1>{L_WHO_IS_ONLINE}</h1> - -<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> - <tr> - <th width="20%" class="thCornerL" height="25"> {L_USERNAME} </th> - <th width="20%" height="25" class="thTop"> {L_STARTED} </th> - <th width="20%" class="thTop"> {L_LAST_UPDATE} </th> - <th width="20%" class="thCornerR"> {L_FORUM_LOCATION} </th> - <th width="20%" height="25" class="thCornerR"> {L_IP_ADDRESS} </th> - </tr> - <!-- BEGIN reg_user_row --> - <tr> - <td width="20%" class="{reg_user_row.ROW_CLASS}"> <span class="gen"><a href="{reg_user_row.U_USER_PROFILE}" class="gen">{reg_user_row.USERNAME}</a></span> </td> - <td width="20%" align="center" class="{reg_user_row.ROW_CLASS}"> <span class="gen">{reg_user_row.STARTED}</span> </td> - <td width="20%" align="center" nowrap="nowrap" class="{reg_user_row.ROW_CLASS}"> <span class="gen">{reg_user_row.LASTUPDATE}</span> </td> - <td width="20%" class="{reg_user_row.ROW_CLASS}"> <span class="gen"><a href="{reg_user_row.U_FORUM_LOCATION}" class="gen">{reg_user_row.FORUM_LOCATION}</a></span> </td> - <td width="20%" class="{reg_user_row.ROW_CLASS}"> <span class="gen"><a href="{reg_user_row.U_WHOIS_IP}" class="gen" target="_phpbbwhois">{reg_user_row.IP_ADDRESS}</a></span> </td> - </tr> - <!-- END reg_user_row --> - <tr> - <td colspan="5" height="1" class="row3"><img src="../templates/subSilver/images/spacer.gif" width="1" height="1" alt="."></td> - </tr> - <!-- BEGIN guest_user_row --> - <tr> - <td width="20%" class="{guest_user_row.ROW_CLASS}"> <span class="gen">{guest_user_row.USERNAME}</span> </td> - <td width="20%" align="center" class="{guest_user_row.ROW_CLASS}"> <span class="gen">{guest_user_row.STARTED}</span> </td> - <td width="20%" align="center" nowrap="nowrap" class="{guest_user_row.ROW_CLASS}"> <span class="gen">{guest_user_row.LASTUPDATE}</span> </td> - <td width="20%" class="{guest_user_row.ROW_CLASS}"> <span class="gen"><a href="{guest_user_row.U_FORUM_LOCATION}" class="gen">{guest_user_row.FORUM_LOCATION}</a></span> </td> - <td width="20%" class="{guest_user_row.ROW_CLASS}"> <span class="gen"><a href="{guest_user_row.U_WHOIS_IP}" target="_phpbbwhois">{guest_user_row.IP_ADDRESS}</a></span> </td> - </tr> - <!-- END guest_user_row --> -</table> - -<br /> +<!-- INCLUDE overall_header.html --> + +<a name="maincontent"></a> + + <h1>Welcome to phpBB Reloaded</h1> + + <p>Admin control panel blablahblahblah</p> + + <table cellspacing="1"> + <caption>Forum Statistics</caption> + <col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" /> + <thead> + <tr> + <th>Statistic</th> + <th>Value</th> + <th>Statistic</th> + <th>Value</th> + </tr> + </thead> + <tbody> + <tr> + <td>Number of posts: </td> + <td><b>0</b></td> + <td>Posts per day: </td> + <td><b>0</b></td> + </tr> + <tr> + <td>Number of topics: </td> + <td><b>0</b></td> + <td>Topics per day: </td> + <td><b>0</b></td> + </tr> + <tr> + <td>Number of users: </td> + <td><b>0</b></td> + <td>Users per day: </td> + <td><b>0</b></td> + </tr> + <tr> + <td>Number of files: </td> + <td><b>0</b></td> + <td>Files per day: </td> + <td><b>0</b></td> + </tr> + + + <tr> + <td>Board started: </td> + <td><b>0</b></td> + <td>Avatar directory size: </td> + <td><b>0</b></td> + </tr> + <tr> + <td>Database Size: </td> + <td><b>0</b></td> + <td>Size of posted attachments: </td> + <td><b></b></td> + </tr> + <tr> + <td>Database server: </td> + <td><b>MySQL 4.1.22-community-nt</b></td> + <td>GZip compression: </td> + <td><b>Off/On</b></td> + </tr> + </tbody> + </table> + +<br /> + +<!-- INCLUDE overall_footer.html --> \ No newline at end of file Modified: main/trunk/templates/subSilver/admin/index_frameset.tpl =================================================================== --- main/trunk/templates/subSilver/admin/index_frameset.tpl 2006-12-24 06:08:00 UTC (rev 278) +++ main/trunk/templates/subSilver/admin/index_frameset.tpl 2006-12-26 21:01:11 UTC (rev 279) @@ -1,4 +1,4 @@ -<html dir="{S_CONTENT_DIRECTION}"> +<!--<html dir="{S_CONTENT_DIRECTION}"> <head> <title>phpBB Administration</title> <meta http-equiv="Content-Type" content="text/html;"> @@ -14,4 +14,5 @@ <p>Sorry, your browser doesn't seem to support frames</p> </body> </noframes> -</html> \ No newline at end of file +</html>--> +{S_FRAME_MAIN} \ No newline at end of file Modified: main/trunk/templates/subSilver/admin/page_header.tpl =================================================================== --- main/trunk/templates/subSilver/admin/page_header.tpl 2006-12-24 06:08:00 UTC (rev 278) +++ main/trunk/templates/subSilver/admin/page_header.tpl 2006-12-26 21:01:11 UTC (rev 279) @@ -1,226 +1,147 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html dir="{S_CONTENT_DIRECTION}"> +<!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}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}"> <head> -{META} -<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" /> -<!-- link rel="stylesheet" href="../templates/subSilver/{T_HEAD_STYLESHEET}" type="text/css" --> -<style type="text/css"> -<!-- -/* - The original subSilver Theme for phpBB version 2+ - Created by subBlue design - http://www.subBlue.com +<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" /> +<meta http-equiv="Content-Style-Type" content="text/css" /> +<meta http-equiv="Content-Language" content="{S_USER_LANG}" /> +<meta http-equiv="imagetoolbar" content="no" /> +<!-- IF META -->{META}<!-- ENDIF --> +<title>{PAGE_TITLE}</title> - NOTE: These CSS definitions are stored within the main page body so that you can use the phpBB2 - theme administration centre. When you have finalised your style you could cut the final CSS code - and place it in an external file, deleting this section to save bandwidth. -*/ - - - /* General page style. The scroll bar colours only visible in IE5.5+ */ -body { - background-color: {T_BODY_BGCOLOR}; - scrollbar-face-color: {T_TR_COLOR2}; - scrollbar-highlight-color: {T_TD_COLOR2}; - scrollbar-shadow-color: {T_TR_COLOR2}; - scrollbar-3dlight-color: {T_TR_COLOR3}; - scrollbar-arrow-color: {T_BODY_LINK}; - scrollbar-track-color: {T_TR_COLOR1}; - scrollbar-darkshadow-color: {T_TH_COLOR1}; -} +<link href="./../templates/subSilver/admin/admin.css" rel="stylesheet" type="text/css" media="screen" /> -/* General font families for common tags */ -font,th,td,p { font-family: {T_FONTFACE1} } -p, td { font-size : {T_FONTSIZE2}; color : {T_BODY_TEXT}; } -a:link,a:active,a:visited { color : {T_BODY_LINK}; } -a:hover { text-decoration: underline; color : {T_BODY_HLINK}; } -hr { height: 0px; border: solid {T_TR_COLOR3} 0px; border-top-width: 1px;} -h1,h2 { font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; font-size : 22px; font-weight : bold; text-decoration : none; line-height : 120%; color : #000000;} +<script type="text/javascript"> +<!-- +var jump_page = '{LA_JUMP_PAGE}:'; +var on_page = '{ON_PAGE}'; +var per_page = '{PER_PAGE}'; +var base_url = '{BASE_URL}'; - -/* This is the border line & background colour round the entire page */ -.bodyline { background-color: {T_TD_COLOR2}; border: 1px {T_TH_COLOR1} solid; } - -/* This is the outline round the main forum tables */ -.forumline { background-color: {T_TD_COLOR2}; border: 2px {T_TH_COLOR2} solid; } - - -/* Main table cell colours and backgrounds */ -td.row1 { background-color: {T_TR_COLOR1}; } -td.row2 { background-color: {T_TR_COLOR2}; } -td.row3 { background-color: {T_TR_COLOR3}; } - - -/* - This is for the table cell above the Topics, Post & Last posts on the index.php page - By default this is the fading out gradiated silver background. - However, you could replace this with a bitmap specific for each forum +/** +* Jump to page */ -td.rowpic { - background-color: {T_TD_COLOR2}; - background-image: url(../templates/subSilver/images/{T_TH_CLASS3}); - background-repeat: repeat-y; -} +function jumpto() +{ + var page = prompt(jump_page, on_page); -/* Header cells - the blue and silver gradient backgrounds */ -th { - color: {T_FONTCOLOR3}; font-size: {T_FONTSIZE2}px; font-weight : bold; - background-color: {T_BODY_LINK}; height: 25px; - background-image: url(../templates/subSilver/images/{T_TH_CLASS2}); + if (page !== null && !isNaN(page) && page > 0) + { + document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page); + } } -td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom { - background-image: url(../templates/subSilver/images/{T_TH_CLASS1}); - background-color:{T_TR_COLOR3}; border: {T_TH_COLOR3}; border-style: solid; height: 28px; -} - - -/* - Setting additional nice inner borders for the main table cells. - The names indicate which sides the border will be on. - Don't worry if you don't understand this, just ignore it :-) +/** +* Set display of page element +* s[-1,0,1] = hide,toggle display,show */ -td.cat,td.catHead,td.catBottom { - height: 29px; - border-width: 0px 0px 0px 0px; -} -th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.thCornerR { - font-weight: bold; border: {T_TD_COLOR2}; border-style: solid; height: 28px; } -td.row3Right,td.spaceRow { - background-color: {T_TR_COLOR3}; border: {T_TH_COLOR3}; border-style: solid; } +function dE(n, s, type) +{ + if (!type) + { + type = 'block'; + } -th.thHead,td.catHead { font-size: {T_FONTSIZE3}px; border-width: 1px 1px 0px 1px; } -th.thSides,td.catSides,td.spaceRow { border-width: 0px 1px 0px 1px; } -th.thRight,td.catRight,td.row3Right { border-width: 0px 1px 0px 0px; } -th.thLeft,td.catLeft { border-width: 0px 0px 0px 1px; } -th.thBottom,td.catBottom { border-width: 0px 1px 1px 1px; } -th.thTop { border-width: 1px 0px 0px 0px; } -th.thCornerL { border-width: 1px 0px 0px 1px; } -th.thCornerR { border-width: 1px 1px 0px 0px; } - - -/* The largest text used in the index page title and toptic title etc. */ -.maintitle { - font-weight: bold; font-size: 22px; font-family: "{T_FONTFACE2}",{T_FONTFACE1}; - text-decoration: none; line-height : 120%; color : {T_BODY_TEXT}; + var e = document.getElementById(n); + if (!s) + { + s = (e.style.display == '') ? -1 : 1; + } + e.style.display = (s == 1) ? type : 'none'; } +/** +* Mark/unmark checkboxes +* id = ID of parent container, name = name prefix, state = state [true/false] +*/ +function marklist(id, name, state) +{ + var parent = document.getElementById(id); + if (!parent) + { + eval('parent = document.' + id); + } -/* General text */ -.gen { font-size : {T_FONTSIZE3}px; } -.genmed { font-size : {T_FONTSIZE2}px; } -.gensmall { font-size : {T_FONTSIZE1}px; } -.gen,.genmed,.gensmall { color : {T_BODY_TEXT}; } -a.gen,a.genmed,a.gensmall { color: {T_BODY_LINK}; text-decoration: none; } -a.gen:hover,a.genmed:hover,a.gensmall:hover { color: {T_BODY_HLINK}; text-decoration: underline; } + if (!parent) + { + return; + } - -/* The register, login, search etc links at the top of the page */ -.mainmenu { font-size : {T_FONTSIZE2}px; color : {T_BODY_TEXT} } -a.mainmenu { text-decoration: none; color : {T_BODY_LINK}; } -a.mainmenu:hover{ text-decoration: underline; color : {T_BODY_HLINK}; } - - -/* Forum category titles */ -.cattitle { font-weight: bold; font-size: {T_FONTSIZE3}px ; letter-spacing: 1px; color : {T_BODY_LINK}} -a.cattitle { text-decoration: none; color : {T_BODY_LINK}; } -a.cattitle:hover{ text-decoration: underline; } - - -/* Forum title: Text and link to the forums used in: index.php */ -.forumlink { font-weight: bold; font-size: {T_FONTSIZE3}px; color : {T_BODY_LINK}; } -a.forumlink { text-decoration: none; color : {T_BODY_LINK}; } -a.forumlink:hover{ text-decoration: underline; color : {T_BODY_HLINK}; } - - -/* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */ -.nav { font-weight: bold; font-size: {T_FONTSIZE2}px; color : {T_BODY_TEXT};} -a.nav { text-decoration: none; color : {T_BODY_LINK}; } -a.nav:hover { text-decoration: underline; } - - - -/* Name of poster in viewmsg.php and viewtopic.php and other places */ -.name { font-size : {T_FONTSIZE2}px; color : {T_BODY_TEXT};} - -/* Location, number of posts, post date etc */ -.postdetails { font-size : {T_FONTSIZE1}px; color : {T_BODY_TEXT}; } - - -/* The content of the posts (body of text) */ -.postbody { font-size : {T_FONTSIZE3}px; line-height: 18px} -a.postlink:link { text-decoration: none; color : {T_BODY_LINK} } -a.postlink:visited { text-decoration: none; color : {T_BODY_VLINK}; } -a.postlink:hover { text-decoration: underline; color : {T_BODY_HLINK}} - - -/* Quote & Code blocks */ -.code { - font-family: {T_FONTFACE3}; font-size: {T_FONTSIZE2}px; color: {T_FONTCOLOR2}; - background-color: {T_TD_COLOR1}; border: {T_TR_COLOR3}; border-style: solid; - border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px + var rb = parent.getElementsByTagName('input'); + + for (var r = 0; r < rb.length; r++) + { + if (rb[r].name.substr(0, name.length) == name) + { + rb[r].checked = state; + } + } } -.quote { - font-family: {T_FONTFACE1}; font-size: {T_FONTSIZE2}px; color: {T_FONTCOLOR1}; line-height: 125%; - background-color: {T_TD_COLOR1}; border: {T_TR_COLOR3}; border-style: solid; - border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px +/** +* Open trace popup +*/ +function trace(link) +{ + window.open(link.replace(/&/g, '&'), '_trace', 'height=515, resizable=yes, scrollbars=yes, width=680'); + return false; } - -/* Copyright and bottom info */ -.copyright { font-size: {T_FONTSIZE1}px; font-family: {T_FONTFACE1}; color: {T_FONTCOLOR1}; letter-spacing: -1px;} -a.copyright { color: {T_FONTCOLOR1}; text-decoration: none;} -a.copyright:hover { color: {T_BODY_TEXT}; text-decoration: underline;} - - -/* Form elements */ -input,textarea, select { - color : {T_BODY_TEXT}; - font: normal {T_FONTSIZE2}px {T_FONTFACE1}; - border-color : {T_BODY_TEXT}; +/** +* Find a member +*/ +function find_username() +{ + <!-- IF UA_FIND_USERNAME --> + window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=570, resizable=yes, scrollbars=yes, width=760'); + <!-- ENDIF --> + return false; } -/* The text input fields background colour */ -input.post, textarea.post, select { - background-color : {T_TD_COLOR2}; +/** +* Color swatch +*/ +function swatch(field) +{ + <!-- IF UA_SWATCH --> + window.open('{UA_SWATCH}' + field, '_swatch', 'height=150, resizable=yes, scrollbars=no, width=636'); + <!-- ENDIF --> + return false; } -input { text-indent : 2px; } - -/* The buttons used for bbCode styling in message post */ -input.button { - background-color : {T_TR_COLOR1}; - color : {T_BODY_TEXT}; - font-size: {T_FONTSIZE2}px; font-family: {T_FONTFACE1}; -} - -/* The main submit button option */ -input.mainoption { - background-color : {T_TD_COLOR1}; - font-weight : bold; -} - -/* None-bold submit button */ -input.liteoption { - background-color : {T_TD_COLOR1}; - font-weight : normal; -} - -/* This is the line in the posting page which shows the rollover - help line. This is actually a text box, but if set to be the same - colour as the background no one will know ;) -*/ -.helpline { background-color: {T_TR_COLOR2}; border-style: none; } - - -/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */ -@import url("../templates/subSilver/formIE.css"); ---> -</style> -<title>{SITENAME} - {L_PHPBB_ADMIN}</title> +//--> +</script> </head> -<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}"> -<a name="top"></a> +<body> +<div id="wrap"> + <div id="page-header"> + <h1>Administration Panel</h1> + <p><a href="./">Admin Index</a> • <a href="../">Forum Index</a></p> + </div> + + <div id="page-body"> + <div id="tabs"> + <ul> + <li><a href="./index.php"><span>General</span></a></li> + <li><a href="./index.php?i=forums"><span>Forums</span></a></li> + <li><a href="./index.php?i=posting"><span>Posting</span></a></li> + <li><a href="./index.php?i=users"><span>Users and Groups</span></a></li> + <li><a href="./index.php?i=perms"><span>Permissions</span></a></li> + <li><a href="./index.php?i=styles"><span>Styles</span></a></li> + <li><a href="./index.php?i=maint"><span>Maintenance</span></a></li> + <li><a href="./index.php?i=system"><span>System</span></a></li> + </ul> + </div> + + <div class="panel"> + <span class="corners-top"><span></span></span> + <div id="content"> + <div id="menu"> + <p>You are logged in as<br /><strong>tehphpmaster</strong> [ <a href="{U_LOGOUT}">{L_LOGOUT}</a> ]</p> + <ul> + <li><a href="./index.php"><span>General</span></a></li> + </ul> + </div> + + <div id="main"> Added: main/trunk/templates/subSilver/images/bg_header.gif =================================================================== (Binary files differ) Property changes on: main/trunk/templates/subSilver/images/bg_header.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: main/trunk/templates/subSilver/images/bg_tabs1.gif =================================================================== (Binary files differ) Property changes on: main/trunk/templates/subSilver/images/bg_tabs1.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: main/trunk/templates/subSilver/images/bg_tabs2.gif =================================================================== (Binary files differ) Property changes on: main/trunk/templates/subSilver/images/bg_tabs2.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <teh...@us...> - 2006-12-24 06:08:01
|
Revision: 278 http://svn.sourceforge.net/phpbbreloaded/?rev=278&view=rev Author: tehphpmaster Date: 2006-12-23 22:08:00 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Commiting the first real change to the code. This includes the Pseudo Subforums MOD. We chose this as our subforums MOD for a number of reasons. I'll go into more detail on these later, but suffice to say we are happy with the choice. Modified Paths: -------------- main/trunk/admin/admin_forums.php main/trunk/includes/functions.php main/trunk/index.php main/trunk/language/lang_english/lang_admin.php main/trunk/language/lang_english/lang_main.php main/trunk/posting.php main/trunk/templates/subSilver/admin/forum_admin_body.tpl main/trunk/templates/subSilver/admin/forum_edit_body.tpl main/trunk/templates/subSilver/index_body.tpl main/trunk/templates/subSilver/posting_body.tpl main/trunk/templates/subSilver/viewforum_body.tpl main/trunk/templates/subSilver/viewtopic_body.tpl main/trunk/viewforum.php main/trunk/viewtopic.php Added Paths: ----------- main/etc/features.txt main/etc/sql_changes.sql Added: main/etc/features.txt =================================================================== Added: main/etc/sql_changes.sql =================================================================== --- main/etc/sql_changes.sql (rev 0) +++ main/etc/sql_changes.sql 2006-12-24 06:08:00 UTC (rev 278) @@ -0,0 +1,3 @@ +# Pseudo subforums +ALTER TABLE `phpbb_forums` ADD attached_forum_id MEDIUMINT(8) DEFAULT '-1' NOT NULL; +ALTER TABLE `phpbb_topics` ADD INDEX (topic_last_post_id); \ No newline at end of file Modified: main/trunk/admin/admin_forums.php =================================================================== --- main/trunk/admin/admin_forums.php 2006-12-24 00:31:58 UTC (rev 277) +++ main/trunk/admin/admin_forums.php 2006-12-24 06:08:00 UTC (rev 278) @@ -266,7 +266,53 @@ $forumname = $row['forum_name']; $forumdesc = $row['forum_desc']; $forumstatus = $row['forum_status']; + + $forum_attached_id = $row['attached_forum_id']; + $sql = "SELECT * from ". FORUMS_TABLE. " WHERE attached_forum_id = $forum_id"; + if( !$r = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, "Couldn't get list of children Forums", "", __LINE__, __FILE__, $sql); + } + if( $db->sql_numrows($r) > 0 ) + { + + $not_attachable=1; + $has_subforums=1; + $template->assign_block_vars('switch_attached_no', array()); + if (intval($HTTP_POST_VARS['detach_enabled'])) $detach_enabled = "checked=\"checked\""; + + } + else + { + + // this forum is not a parent of any other forum + $sql = "SELECT * FROM ". FORUMS_TABLE. " WHERE attached_forum_id=-1 and cat_id= $cat_id and forum_id<>$forum_id ORDER BY forum_order"; + + if( !$result1 = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, "Couldn't get list of attachable Forums", "", __LINE__, __FILE__, $sql); + } + if( $db->sql_numrows($result1) > 0 ) + { + $attachable_forums = '<option value = "-1"'.($forum_attached_id==-1?' selected':'').'> NOT ATTACHED TO ANY FORUM </a>'; + while( $row1 = $db->sql_fetchrow($result1) ) + { + $s=''; + if ($forum_attached_id == $row1['forum_id']) + { + $s = " selected=\"selected\""; + } + $attachable_forums .= '<option value="'.$row1[forum_id].$s.'">' . $row1[forum_name] . '</option>\n'; + } + } + else + { + $no_attachable_forums=1; + } + + } + // // start forum prune stuff. // @@ -298,7 +344,35 @@ $forumstatus = FORUM_UNLOCKED; $forum_id = ''; $prune_enabled = ''; + + $sql = "SELECT * FROM ". FORUMS_TABLE. " WHERE attached_forum_id=-1 and cat_id= $cat_id ORDER BY forum_order"; + + if( !$result1 = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, "Couldn't get list of Categories/Forums", "", __LINE__, __FILE__, $sql); + } + if( $db->sql_numrows($result1) > 0 ) + { + $attachable_forums = '<option value = "-1"'.(($forum_attached_id==-1 || !$forum_attached_id)?' selected':'').'> NOT ATTACHED TO ANY FORUM </a>'; + while( $row1 = $db->sql_fetchrow($result1) ) + { + + if ($forum_attached_id == $row1['forum_id']) + { + $s = " selected=\"selected\""; + } + $attachable_forums .= '<option value="'.$row1[forum_id].$s.'">' . $row1[forum_name] . '</option>\n'; + } + + + } + else + { + $no_attachable_forums=1; + } } + + $forum_attached_id = $attachable_forums; $catlist = get_list('category', $cat_id, TRUE); @@ -317,6 +391,22 @@ ); $s_hidden_fields = '<input type="hidden" name="mode" value="' . $newmode .'" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />'; + + if ($not_attachable or $no_attachable_forums) + { + if ($has_subforums) + { + $lang['Attached_Description'] = $lang['Has_attachments'].'<br>'. $lang['Attached_Description']; + $s_hidden_fields .='<input type="hidden" name="has_subforums" value="1" />'; + } + if ($no_attachable_forums) $lang['Attached_Description'] = $lang['No_attach_forums'].'<br>'. $lang['Attached_Description']; + $s_hidden_fields .='<input type="hidden" name="attached_forum_id" value="-1" />'; + } + else + { + $template->assign_block_vars('switch_attached_yes', array()); + } + $s_hidden_fields .='<input type="hidden" name="old_cat_id" value="'.$cat_id.'" />'; $template->assign_vars(array( 'S_FORUM_ACTION' => append_sid("admin_forums.$phpEx"), @@ -325,12 +415,17 @@ 'S_CAT_LIST' => $catlist, 'S_STATUS_LIST' => $statuslist, 'S_PRUNE_ENABLED' => $prune_enabled, + 'S_ATTACHED_FORUM_ID' => $forum_attached_id, + 'S_DETACH_ENABLED'=> $detach_enabled, 'L_FORUM_TITLE' => $l_title, 'L_FORUM_EXPLAIN' => $lang['Forum_edit_delete_explain'], 'L_FORUM_SETTINGS' => $lang['Forum_settings'], 'L_FORUM_NAME' => $lang['Forum_name'], 'L_CATEGORY' => $lang['Category'], + 'L_ATTACHED_FORUM' => $lang['Attached_Field_Title'] , + 'L_ATTACHED_DESC' => $lang['Attached_Description'], + 'L_DETACH_DESC' => $lang['Detach_Description'], 'L_FORUM_DESCRIPTION' => $lang['Forum_desc'], 'L_FORUM_STATUS' => $lang['Forum_status'], 'L_AUTO_PRUNE' => $lang['Forum_pruning'], @@ -392,8 +487,13 @@ } // There is no problem having duplicate forum names so we won't check for it. - $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ") - VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")"; + if (intval($HTTP_POST_VARS['old_cat_id']) != intval($HTTP_POST_VARS[POST_CAT_URL])) + { + $HTTP_POST_VARS['attached_forum_id']=-1; + } + + $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, attached_forum_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ") + VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", " . intval($HTTP_POST_VARS['attached_forum_id']) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Couldn't insert row in forums table", "", __LINE__, __FILE__, $sql); @@ -431,8 +531,32 @@ } } + if (isset($HTTP_POST_VARS['detach_enabled']) && isset($HTTP_POST_VARS['has_subforums'])) + { + $sql = "UPDATE ". FORUMS_TABLE. " SET attached_forum_id=-1 WHERE attached_forum_id=" . intval($HTTP_POST_VARS[POST_FORUM_URL]); + if( !$result = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, "Couldn't detach subforums", "", __LINE__, __FILE__, $sql); + } + + } + + if (intval($HTTP_POST_VARS['old_cat_id']) != intval($HTTP_POST_VARS[POST_CAT_URL])) + { + $HTTP_POST_VARS['attached_forum_id']=-1; + if (isset($HTTP_POST_VARS['has_subforums']) && !isset($HTTP_POST_VARS['detach_enabled'])) + { + $sql = "UPDATE ". FORUMS_TABLE ." SET cat_id=". intval($HTTP_POST_VARS[POST_CAT_URL]) ." WHERE attached_forum_id=" . intval($HTTP_POST_VARS[POST_FORUM_URL]); + if( !$result = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, "Couldn't update subforums to new category", "", __LINE__, __FILE__, $sql); + } + + } + } + $sql = "UPDATE " . FORUMS_TABLE . " - SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . " + SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) .", attached_forum_id = " . intval($HTTP_POST_VARS['attached_forum_id']) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . " WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]); if( !$result = $db->sql_query($sql) ) { @@ -968,6 +1092,8 @@ $forum_rows = $db->sql_fetchrowset($q_forums); } + $subforum_rows = $forum_rows; + // // Okay, let's build the index // @@ -998,21 +1124,79 @@ if ($forum_rows[$j]['cat_id'] == $cat_id) { - $template->assign_block_vars("catrow.forumrow", array( - 'FORUM_NAME' => $forum_rows[$j]['forum_name'], - 'FORUM_DESC' => $forum_rows[$j]['forum_desc'], - 'ROW_COLOR' => $row_color, - 'NUM_TOPICS' => $forum_rows[$j]['forum_topics'], - 'NUM_POSTS' => $forum_rows[$j]['forum_posts'], + $sub_error=false; + $do_template=false; + if ($forum_rows[$j]['attached_forum_id'] !=-1) + { + $ok=''; + for($k = 0; $k < $total_forums; $k++) + { + $subforum_id = $subforum_rows[$k]['forum_id']; - 'U_VIEWFORUM' => append_sid($phpbb_root_path."viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"), - 'U_FORUM_EDIT' => append_sid("admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=$forum_id"), - 'U_FORUM_DELETE' => append_sid("admin_forums.$phpEx?mode=deleteforum&" . POST_FORUM_URL . "=$forum_id"), - 'U_FORUM_MOVE_UP' => append_sid("admin_forums.$phpEx?mode=forum_order&move=-15&" . POST_FORUM_URL . "=$forum_id"), - 'U_FORUM_MOVE_DOWN' => append_sid("admin_forums.$phpEx?mode=forum_order&move=15&" . POST_FORUM_URL . "=$forum_id"), - 'U_FORUM_RESYNC' => append_sid("admin_forums.$phpEx?mode=forum_sync&" . POST_FORUM_URL . "=$forum_id")) - ); + if ($subforum_id == $forum_rows[$j]['attached_forum_id'] && $forum_rows[$k]['attached_forum_id']==-1) + { + $ok=TRUE;//normal parent found + } + } + if ($forum_rows[$j]['attached_forum_id']==$forum_id) $ok=FALSE; //attached to itself + if ($forum_rows[$j]['attached_forum_id']==0) $ok=FALSE; //invalid parent + if (!$ok) + { + $do_template=TRUE; + $sub_error=true; + } + } + else + { + $do_template=true; + }//attached_forum_id'] ==-1 + + if ($do_template) + { + $template->assign_block_vars("catrow.forumrow", array( + 'FORUM_NAME' => $forum_rows[$j]['forum_name'], + 'FORUM_DESC' => $forum_rows[$j]['forum_desc'], + 'ROW_COLOR' => $row_color, + 'NUM_TOPICS' => $forum_rows[$j]['forum_topics'], + 'NUM_POSTS' => $forum_rows[$j]['forum_posts'], + + 'U_VIEWFORUM' => append_sid($phpbb_root_path."viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"), + 'U_FORUM_EDIT' => append_sid("admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=$forum_id"), + 'U_FORUM_DELETE' => append_sid("admin_forums.$phpEx?mode=deleteforum&" . POST_FORUM_URL . "=$forum_id"), + 'U_FORUM_MOVE_UP' => append_sid("admin_forums.$phpEx?mode=forum_order&move=-15&" . POST_FORUM_URL . "=$forum_id"), + 'U_FORUM_MOVE_DOWN' => append_sid("admin_forums.$phpEx?mode=forum_order&move=15&" . POST_FORUM_URL . "=$forum_id"), + 'U_FORUM_RESYNC' => append_sid("admin_forums.$phpEx?mode=forum_sync&" . POST_FORUM_URL . "=$forum_id")) + ); + if ($sub_error) + { + $template->assign_block_vars ('catrow.forumrow.switch_error',array()); + } + + for($k = 0; $k < $total_forums; $k++) + { + $subforum_id = $subforum_rows[$k]['forum_id']; + if ($subforum_rows[$k]['attached_forum_id'] == $forum_id) + { + $template->assign_block_vars("catrow.forumrow", array( + 'FORUM_NAME' => $subforum_rows[$k]['forum_name'], + 'FORUM_DESC' => $subforum_rows[$k]['forum_desc'], + 'ROW_COLOR' => $row_color, + 'NUM_TOPICS' => $subforum_rows[$k]['forum_topics'], + 'NUM_POSTS' => $subforum_rows[$k]['forum_posts'], + + 'U_VIEWFORUM' => append_sid($phpbb_root_path."viewforum.$phpEx?" . POST_FORUM_URL . "=$subforum_id"), + 'U_FORUM_EDIT' => append_sid("admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=$subforum_id"), + 'U_FORUM_DELETE' => append_sid("admin_forums.$phpEx?mode=deleteforum&" . POST_FORUM_URL . "=$subforum_id"), + 'U_FORUM_MOVE_UP' => append_sid("admin_forums.$phpEx?mode=forum_order&move=-15&" . POST_FORUM_URL . "=$subforum_id"), + 'U_FORUM_MOVE_DOWN' => append_sid("admin_forums.$phpEx?mode=forum_order&move=15&" . POST_FORUM_URL . "=$subforum_id"), + 'U_FORUM_RESYNC' => append_sid("admin_forums.$phpEx?mode=forum_sync&" . POST_FORUM_URL . "=$subforum_id")) + ); + $template->assign_block_vars ('catrow.forumrow.switch_attached_forum',array()); + } + } + } + }// if ... forumid == catid } // for ... forums Modified: main/trunk/includes/functions.php =================================================================== --- main/trunk/includes/functions.php 2006-12-24 00:31:58 UTC (rev 277) +++ main/trunk/includes/functions.php 2006-12-24 06:08:00 UTC (rev 278) @@ -21,6 +21,54 @@ * ***************************************************************************/ + +function check_unread($forum_id) +{ +global $new_topic_data, $tracking_topics, $tracking_forums, $HTTP_COOKIE_VARS, $board_config; + if ( !empty($new_topic_data[$forum_id]) ) + { + $forum_last_post_time = 0; + + while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_id]) ) + { + if ( empty($tracking_topics[$check_topic_id]) ) + { + $unread_topics = true; + $forum_last_post_time = max($check_post_time, $forum_last_post_time); + + } + else + { + if ( $tracking_topics[$check_topic_id] < $check_post_time ) + { + $unread_topics = true; + $forum_last_post_time = max($check_post_time, $forum_last_post_time); + } + } + } + + if ( !empty($tracking_forums[$forum_id]) ) + { + if ( $tracking_forums[$forum_id] > $forum_last_post_time ) + { + $unread_topics = false; + } + } + + if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) ) + { + if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time ) + { + $unread_topics = false; + } + } + + } + +return $unread_topics; + +} + function get_db_stat($mode) { global $db; @@ -201,6 +249,8 @@ function make_jumpbox($action, $match_forum_id = 0) { global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID; + + global $parent_lookup; // $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata); @@ -245,6 +295,18 @@ $boxstring_forums = ''; for($j = 0; $j < $total_forums; $j++) { + + if ($parent_lookup==$forum_rows[$j]['forum_id'] && !$assigned) + { + $template->assign_block_vars('switch_parent_link', array() ); + + $template->assign_vars(array( + 'PARENT_NAME' => $forum_rows[$j]['forum_name'], + 'PARENT_URL'=>append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id']) + )); + $assigned = TRUE; + } + if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG ) { Modified: main/trunk/index.php =================================================================== --- main/trunk/index.php 2006-12-24 00:31:58 UTC (rev 277) +++ main/trunk/index.php 2006-12-24 06:08:00 UTC (rev 278) @@ -158,11 +158,12 @@ break; default: - $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id - FROM (( " . FORUMS_TABLE . " f + $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_id, t.topic_title + FROM ((( " . FORUMS_TABLE . " f LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id ) LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id ) - ORDER BY f.cat_id, f.forum_order"; + LEFT JOIN " . TOPICS_TABLE . " t ON t.topic_last_post_id = f.forum_last_post_id) + GROUP BY f.forum_id ORDER BY f.cat_id, f.forum_order"; break; } if ( !($result = $db->sql_query($sql)) ) @@ -175,6 +176,8 @@ { $forum_data[] = $row; } + $attach = $forum_data; + $db->sql_freeresult($result); if ( !($total_forums = count($forum_data)) ) @@ -341,7 +344,62 @@ if ( $forum_data[$j]['cat_id'] == $cat_id ) { $forum_id = $forum_data[$j]['forum_id']; + + $attached_id = $forum_data[$j]['attached_forum_id']; + if ( $is_auth_ary[$forum_id]['auth_view'] && $attached_id == -1 ) + { + $attached_forums = array(); + foreach ($attach as $key => $value) + { + $sub_forum_id = $value['forum_id']; + if ($value['attached_forum_id']==$forum_id && $is_auth_ary[$sub_forum_id]['auth_view']) + { + //combining topic and post count for forum and subforums + $forum_data[$j]['forum_posts']=$forum_data[$j]['forum_posts']+$value['forum_posts']; + $forum_data[$j]['forum_topics']=$forum_data[$j]['forum_topics']+$value['forum_topics']; + //END combining topic and post count + //Last post link - check if any of subforums have newest posts and link to them instead + if ($value['post_time']>$forum_data[$j]['post_time']) + { + $forum_data[$j]['user_id'] = $value['user_id']; + $forum_data[$j]['post_username'] = $value['post_username']; + $forum_data[$j]['forum_last_post_id'] = $value['forum_last_post_id']; + $forum_data[$j]['post_time'] = $value['post_time']; + $forum_data[$j]['username'] = $value['username']; + $forum_data[$j]['topic_title'] = $value['topic_title']; + } + // END last post check + + $unread_topics = false; + if ( $userdata['session_logged_in'] ) + { + if (check_unread($value['forum_id'])) + { + $attach_img = $images['icon_minipost_new']; + $l_attach_img = $lang['New_posts']; + } + else + { + $attach_img = $images['icon_minipost']; + $l_attach_img = $lang['No_new_posts']; + } + } + else + { + $attach_img = $images['icon_minipost']; + $l_attach_img = $lang['No_new_posts']; + } + + $attached_forums[] = array( + 'sub_img'=>$attach_img, + 'sub_alt'=>$l_attach_img, + 'sub_name'=>$value['forum_name'], + 'sub_url'=>append_sid ('viewforum.php?f=' . $value['forum_id'] ) + ); + } + } + if ( $is_auth_ary[$forum_id]['auth_view'] ) { if ( $forum_data[$j]['forum_status'] == FORUM_LOCKED ) @@ -354,45 +412,7 @@ $unread_topics = false; if ( $userdata['session_logged_in'] ) { - if ( !empty($new_topic_data[$forum_id]) ) - { - $forum_last_post_time = 0; - - while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_id]) ) - { - if ( empty($tracking_topics[$check_topic_id]) ) - { - $unread_topics = true; - $forum_last_post_time = max($check_post_time, $forum_last_post_time); - - } - else - { - if ( $tracking_topics[$check_topic_id] < $check_post_time ) - { - $unread_topics = true; - $forum_last_post_time = max($check_post_time, $forum_last_post_time); - } - } - } - - if ( !empty($tracking_forums[$forum_id]) ) - { - if ( $tracking_forums[$forum_id] > $forum_last_post_time ) - { - $unread_topics = false; - } - } - - if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) ) - { - if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time ) - { - $unread_topics = false; - } - } - - } + $unread_topics = check_unread($forum_id); } $folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum']; @@ -404,13 +424,19 @@ if ( $forum_data[$j]['forum_last_post_id'] ) { + if (strlen($forum_data[$j]['topic_title'])>=25) + { + $forum_data[$j]['topic_title']=substr($forum_data[$j]['topic_title'],0,25). "..."; + } + $last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']); + $last_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '">'.$forum_data[$j]['topic_title'].' <img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>'; - $last_post = $last_post_time . '<br />'; - + $last_post .= '<br /> '; + $last_post .= ' '.$last_post_time; + $last_post .= '<br /> '; $last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> '; - - $last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>'; + } else { @@ -424,8 +450,8 @@ } else { - $l_moderators = ' '; - $moderator_list = ' '; + $l_moderators = ''; + $moderator_list = ''; } $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2']; @@ -447,12 +473,36 @@ 'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id")) ); + + $attached_forum_count = count($attached_forums); + if($attached_forum_count) + { + + $template->assign_block_vars('catrow.forumrow.switch_attached_forums', array( + 'L_ATTACHED_FORUMS' => ($attached_forum_count ==1)? $lang['Attached_forum']: $lang['Attached_forums'] + )); + if (count($forum_moderators[$forum_id]) > 0 ) + { + $template->assign_block_vars('catrow.forumrow.switch_attached_forums.br', array()); } + for($k = 0; $k < $attached_forum_count; $k++) + { + $template->assign_block_vars('catrow.forumrow.switch_attached_forums.attached_forums', array( + 'FORUM_IMAGE' => $attached_forums[$k]['sub_img'], + 'FORUM_NAME' => $attached_forums[$k]['sub_name'], + 'L_FORUM_IMAGE' => $attached_forums[$k]['sub_alt'], + 'U_VIEWFORUM' => $attached_forums[$k]['sub_url'] + )); + } + } + + } } } } } } // for ... categories +} }// if ... total_categories else Modified: main/trunk/language/lang_english/lang_admin.php =================================================================== --- main/trunk/language/lang_english/lang_admin.php 2006-12-24 00:31:58 UTC (rev 277) +++ main/trunk/language/lang_english/lang_admin.php 2006-12-24 06:08:00 UTC (rev 278) @@ -759,6 +759,12 @@ $lang['Login_reset_time'] = 'Login lock time'; $lang['Login_reset_time_explain'] = 'Time in minutes the user have to wait until he is allowed to login again after exceeding the number of allowed login attempts.'; +$lang['Attached_Field_Title'] = 'Attached to forum'; +$lang['Attached_Description'] = "This field has been added by sub-forums mod. It will display all attachable forums (if available) in this category"; +$lang['Detach_Description'] = "Detach all forums"; +$lang['Has_attachments'] = 'This forum has other forums attached to it. If you assign new category to this forum it will move all it\'s subforums to new category unless you select detach checkbox'; +$lang['No_attach_forums'] = 'No attachable forums in this category'; + // // That's all Folks! // ------------------------------------------------- Modified: main/trunk/language/lang_english/lang_main.php =================================================================== --- main/trunk/language/lang_english/lang_main.php 2006-12-24 00:31:58 UTC (rev 277) +++ main/trunk/language/lang_english/lang_main.php 2006-12-24 06:08:00 UTC (rev 278) @@ -1020,6 +1020,9 @@ $lang['Session_invalid'] = 'Invalid Session. Please resubmit the form.'; +$lang['Attached_forum'] = 'Subforum'; +$lang['Attached_forums'] = 'Subforum'; + // // That's all, Folks! // ------------------------------------------------- Modified: main/trunk/posting.php =================================================================== --- main/trunk/posting.php 2006-12-24 00:31:58 UTC (rev 277) +++ main/trunk/posting.php 2006-12-24 06:08:00 UTC (rev 278) @@ -974,6 +974,12 @@ 'pollbody' => 'posting_poll_body.tpl', 'reviewbody' => 'posting_topic_review.tpl') ); + +if ($post_info[attached_forum_id] > 0) +{ + $parent_lookup=$post_info[attached_forum_id]; +} + make_jumpbox('viewforum.'.$phpEx); $template->assign_vars(array( Modified: main/trunk/templates/subSilver/admin/forum_admin_body.tpl =================================================================== --- main/trunk/templates/subSilver/admin/forum_admin_body.tpl 2006-12-24 00:31:58 UTC (rev 277) +++ main/trunk/templates/subSilver/admin/forum_admin_body.tpl 2006-12-24 06:08:00 UTC (rev 278) @@ -17,7 +17,19 @@ </tr> <!-- BEGIN forumrow --> <tr> - <td class="row2"><span class="gen"><a href="{catrow.forumrow.U_VIEWFORUM}" target="_new">{catrow.forumrow.FORUM_NAME}</a></span><br /><span class="gensmall">{catrow.forumrow.FORUM_DESC}</span></td> + <td class="row2"><span class="gen"> + <!-- BEGIN switch_attached_forum --> + |__ + <!-- END switch_attached_forum --> + <!-- BEGIN switch_error --> + ERROR + <!-- END switch_error --> +<a href="{catrow.forumrow.U_VIEWFORUM}" target="_new">{catrow.forumrow.FORUM_NAME}</a></span><br /> +<span class="gensmall"> +<!-- BEGIN switch_attached_forum --> + +<!-- END switch_attached_forum --> +{catrow.forumrow.FORUM_DESC}</span></td> <td class="row1" align="center" valign="middle"><span class="gen">{catrow.forumrow.NUM_TOPICS}</span></td> <td class="row2" align="center" valign="middle"><span class="gen">{catrow.forumrow.NUM_POSTS}</span></td> <td class="row1" align="center" valign="middle"><span class="gen"><a href="{catrow.forumrow.U_FORUM_EDIT}">{L_EDIT}</a></span></td> Modified: main/trunk/templates/subSilver/admin/forum_edit_body.tpl =================================================================== --- main/trunk/templates/subSilver/admin/forum_edit_body.tpl 2006-12-24 00:31:58 UTC (rev 277) +++ main/trunk/templates/subSilver/admin/forum_edit_body.tpl 2006-12-24 06:08:00 UTC (rev 278) @@ -20,6 +20,18 @@ <td class="row1">{L_CATEGORY}</td> <td class="row2"><select name="c">{S_CAT_LIST}</select></td> </tr> + <tr> + <td class="row1">{L_ATTACHED_FORUM}</td> + <td class="row2"> + <!-- BEGIN switch_attached_yes --> + <select name="attached_forum_id">{S_ATTACHED_FORUM_ID}</select> + <!-- END switch_attached_yes --> + <!-- BEGIN switch_attached_no --> + {L_DETACH_DESC} <input type="checkbox" name="detach_enabled" value="1" {S_DETACH_ENABLED} /><br /> + <!-- END switch_attached_no --> + {L_ATTACHED_DESC} + </td> + </tr> <tr> <td class="row1">{L_FORUM_STATUS}</td> <td class="row2"><select name="forumstatus">{S_STATUS_LIST}</select></td> Modified: main/trunk/templates/subSilver/index_body.tpl =================================================================== --- main/trunk/templates/subSilver/index_body.tpl 2006-12-24 00:31:58 UTC (rev 277) +++ main/trunk/templates/subSilver/index_body.tpl 2006-12-24 06:08:00 UTC (rev 278) @@ -30,7 +30,18 @@ <td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td> <td class="row1" width="100%" height="50"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br /> </span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br /> - </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td> + </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span> + <!-- BEGIN switch_attached_forums --> + <!-- BEGIN br --> + <br /> + <!-- END br --> + <span class="genmed">{catrow.forumrow.switch_attached_forums.L_ATTACHED_FORUMS}: + <!-- BEGIN attached_forums --> + <a class="nav" href="{catrow.forumrow.switch_attached_forums.attached_forums.U_VIEWFORUM}"><img alt="{catrow.forumrow.switch_attached_forums.attached_forums.L_FORUM_IMAGE}" border="0" src="{catrow.forumrow.switch_attached_forums.attached_forums.FORUM_IMAGE}" title="{catrow.forumrow.switch_attached_forums.attached_forums.L_FORUM_IMAGE}" />{catrow.forumrow.switch_attached_forums.attached_forums.FORUM_NAME}</a> + <!-- END attached_forums --> + <span class="genmed"> + <!-- END switch_attached_forums --> +</td> <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td> <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td> <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td> Modified: main/trunk/templates/subSilver/posting_body.tpl =================================================================== --- main/trunk/templates/subSilver/posting_body.tpl 2006-12-24 00:31:58 UTC (rev 277) +++ main/trunk/templates/subSilver/posting_body.tpl 2006-12-24 06:08:00 UTC (rev 278) @@ -263,6 +263,9 @@ <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> <td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a> + <!-- BEGIN switch_parent_link --> + -> <a class="nav" href="{PARENT_URL}">{PARENT_NAME}</a> + <!-- END switch_parent_link --> <!-- BEGIN switch_not_privmsg --> -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td> <!-- END switch_not_privmsg --> Modified: main/trunk/templates/subSilver/viewforum_body.tpl =================================================================== --- main/trunk/templates/subSilver/viewforum_body.tpl 2006-12-24 00:31:58 UTC (rev 277) +++ main/trunk/templates/subSilver/viewforum_body.tpl 2006-12-24 06:08:00 UTC (rev 278) @@ -7,11 +7,36 @@ </tr> <tr> <td align="left" valign="middle" width="50"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" /></a></td> - <td align="left" valign="middle" class="nav" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a> -> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td> + <td align="left" valign="middle" class="nav" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a> + + <!-- BEGIN switch_parent_link --> + -> <a class="nav" href="{PARENT_URL}">{PARENT_NAME}</a> + <!-- END switch_parent_link --> + -> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td> <td align="right" valign="bottom" class="nav" nowrap="nowrap"><span class="gensmall"><a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a></span></td> </tr> </table> - + <!-- BEGIN switch_attached_list --> + <br /> + <table width="100%" border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline"> + <tr> + <th colspan="2" class="thCornerL" height="15" nowrap="nowrap"> {switch_attached_list.L_ATTACHED_FORUM} </th> + <th width="50" class="thTop" nowrap="nowrap"> {switch_attached_list.L_ATTACHED_TOPICS} </th> + <th width="50" class="thTop" nowrap="nowrap"> {switch_attached_list.L_ATTACHED_POSTS} </th> + <th width="50" class="thTop" nowrap="nowrap"> {switch_attached_list.L_LAST_POST} </th> + </tr> + <!-- BEGIN switch_attached_present --> + <tr> + <td class="row1" align="center" valign="middle" height="38"><img src="{switch_attached_list.switch_attached_present.FORUM_FOLDER_IMG}" width="46" height="25" alt="{switch_attached_list.switch_attached_present.L_FORUM_FOLDER_ALT}" title="{switch_attached_list.switch_attached_present.L_FORUM_FOLDER_ALT}" /></td> + <td class="row1" width="75%"><span class="forumlink"><a class="forumlink" href="{switch_attached_list.switch_attached_present.U_VIEWFORUM}">{switch_attached_list.switch_attached_present.FORUM_NAME}</a></span><br /><span class="genmed">{switch_attached_list.switch_attached_present.FORUM_DESC}</span></td> + <td class="row2" align="center" valign="middle"><span class="gensmall">{switch_attached_list.switch_attached_present.TOPICS}</span></td> + <td class="row2" align="center" valign="middle"><span class="gensmall">{switch_attached_list.switch_attached_present.POSTS}</span></td> + <td class="row2" align="center" nowrap="nowrap" valign="middle"><span class="gensmall">{switch_attached_list.switch_attached_present.LAST_POST_ID}</span></td> + </tr> + <!-- END switch_attached_present --> + </table> + <br /> +<!-- END switch_attached_list --> <table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline"> <tr> <th colspan="2" align="center" height="25" class="thCornerL" nowrap="nowrap"> {L_TOPICS} </th> @@ -46,7 +71,12 @@ <table width="100%" cellspacing="2" border="0" align="center" cellpadding="2"> <tr> <td align="left" valign="middle" width="50"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" /></a></td> - <td align="left" valign="middle" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a> -> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td> + + <td align="left" valign="middle" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a> + <!-- BEGIN switch_parent_link --> + -> <a class="nav" href="{PARENT_URL}">{PARENT_NAME}</a> + <!-- END switch_parent_link --> + -> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td> <td align="right" valign="middle" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span> </td> </tr> Modified: main/trunk/templates/subSilver/viewtopic_body.tpl =================================================================== --- main/trunk/templates/subSilver/viewtopic_body.tpl 2006-12-24 00:31:58 UTC (rev 277) +++ main/trunk/templates/subSilver/viewtopic_body.tpl 2006-12-24 06:08:00 UTC (rev 278) @@ -11,6 +11,11 @@ <tr> <td align="left" valign="bottom" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a> <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td> <td align="left" valign="middle" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a> + + <!-- BEGIN switch_parent_link --> + -> <a class="nav" href="{PARENT_URL}">{PARENT_NAME}</a> + <!-- END switch_parent_link --> + -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td> -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td> </tr> </table> @@ -72,6 +77,10 @@ <tr> <td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a> <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td> <td align="left" valign="middle" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a> + <!-- BEGIN switch_parent_link --> + -> <a class="nav" href="{PARENT_URL}">{PARENT_NAME}</a> + <!-- END switch_parent_link --> + -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td> -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td> <td align="right" valign="top" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span> </td> Modified: main/trunk/viewforum.php =================================================================== --- main/trunk/viewforum.php 2006-12-24 00:31:58 UTC (rev 277) +++ main/trunk/viewforum.php 2006-12-24 06:08:00 UTC (rev 278) @@ -64,7 +64,8 @@ { $sql = "SELECT * FROM " . FORUMS_TABLE . " - WHERE forum_id = $forum_id"; + WHERE forum_id = $forum_id OR attached_forum_id =$forum_id + ORDER BY attached_forum_id ASC"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql); @@ -74,7 +75,12 @@ { message_die(GENERAL_MESSAGE, 'Forum_not_exist'); } +$attachments = ''; +if ($db->sql_numrows ($result) > 1) +{ + $attachments=TRUE; +} // // If the query doesn't return any rows this isn't a valid forum. Inform // the user. @@ -393,6 +399,12 @@ $template->set_filenames(array( 'body' => 'viewforum_body.tpl') ); + +if ($forum_row[attached_forum_id] > 0) +{ + $parent_lookup=$forum_row[attached_forum_id]; +} + make_jumpbox('viewforum.'.$phpEx); $template->assign_vars(array( @@ -445,6 +457,142 @@ // // Okay, lets dump out the page ... // + +if ($attachments) +{ + + // + // Obtain a list of topic ids which contain + // posts made since user last visited + // + if ( $userdata['session_logged_in'] ) + { + $sql = "SELECT t.forum_id, t.topic_id, p.post_time + FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p + WHERE p.post_id = t.topic_last_post_id + AND p.post_time > " . $userdata['user_lastvisit'] . " + AND t.topic_moved_id = 0"; + if ( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_ERROR, 'Could not query new topic information', '', __LINE__, __FILE__, $sql); + } + + $new_topic_data = array(); + while( $topic_data = $db->sql_fetchrow($result) ) + { + $new_topic_data[$topic_data['forum_id']][$topic_data['topic_id']] = $topic_data['post_time']; + } + } + + $sql2 = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_id, t.topic_title + FROM ((( " . FORUMS_TABLE . " f + LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id ) + LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id ) + LEFT JOIN " . TOPICS_TABLE . " t ON t.topic_last_post_id = f.forum_last_post_id) + WHERE attached_forum_id = " . $forum_id . " + GROUP by f.forum_id ORDER BY f.forum_order"; + + $result2 = $db->sql_query ($sql2); + if (!$result2 ) + { + message_die ('Could not gather attached forum info', __LINE__, __FILE__, $sql2); + } + + if ($db->sql_numrows ($result2) != 0) + { + while( $row = $db->sql_fetchrow($result2) ) + { + $forum_data[] = $row; + } + $is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data); + + $x=0; + foreach ($forum_data as $row2 => $value) + { + if ($is_auth_ary[$value['forum_id']]['auth_view']) + { + $x++; + if ($x==1) + { + $template->assign_block_vars ('switch_attached_list', + array( 'L_ATTACHED_FORUM' => $lang['Attached_forums'], + 'L_ATTACHED_TOPICS' => $lang['Topics'], + 'L_ATTACHED_POSTS' => $lang['Posts'], + 'L_LAST_POST'=>$lang['Last_Post'] + ) + ); + + } + $attach_forum_link = append_sid('viewforum.php?f=' . $value['forum_id']); + $attach_forum_name = '<a href="' . append_sid('viewforum.php?f=' . $value['forum_id']) . '">' . $value['forum_name'] . '</a>' ; + $attach_forum_desc = $value['forum_desc']; + $attach_forum_topics = $value['forum_topics']; + $attach_forum_posts = $value['forum_posts']; + $last_post_id = $value['forum_last_post_id']; + + if ( $value['forum_status'] == FORUM_LOCKED ) + { + $folder_image = $images['forum_locked']; + $folder_alt = $lang['Forum_locked']; + } + else + { + $unread_topics = false; + if ( $userdata['session_logged_in'] ) + { + $unread_topics=check_unread($value['forum_id']); + } + + $folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum']; + $folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts']; + } + + if ( $value['forum_last_post_id'] ) + { + + if (strlen($value['topic_title'])>=25) + { + $value['topic_title']=substr($value['topic_title'],0,25). "..."; + } + + $last_post_time = create_date($board_config['default_dateformat'], $value['post_time'], $board_config['board_timezone']); + $last_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $value['forum_last_post_id']) . '#' . $value['forum_last_post_id'] . '">'.$value['topic_title'].' <img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>'; + + $last_post .= '<br /> '; + $last_post .= ' '.$last_post_time; + $last_post .= '<br /> '; + $last_post .= ( $value['user_id'] == ANONYMOUS ) ? ( ($value['post_username'] != '' ) ? $value['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $value['user_id']) . '">' . $value['username'] . '</a> '; + + + + } + else + { + $last_post = $lang['No_Posts']; + } + + + + + $template->assign_block_vars ('switch_attached_list.switch_attached_present', + array + ( + 'FORUM_FOLDER_IMG' => $folder_image, + 'L_FORUM_FOLDER_ALT' => $folder_alt, + 'FORUM_NAME' => $attach_forum_name, + 'U_VIEWFORUM' => $attach_forum_link, + 'FORUM_DESC' => $attach_forum_desc, + 'TOPICS' => $attach_forum_topics, + 'POSTS' => $attach_forum_posts, + 'LAST_POST_ID' => $last_post, + )); + } + } + + } + $db->sql_freeresult ($result2); +} + if( $total_topics ) { for($i = 0; $i < $total_topics; $i++) Modified: main/trunk/viewtopic.php =================================================================== --- main/trunk/viewtopic.php 2006-12-24 00:31:58 UTC (rev 277) +++ main/trunk/viewtopic.php 2006-12-24 06:08:00 UTC (rev 278) @@ -147,7 +147,7 @@ $order_sql = (!$post_id) ? '' : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments ORDER BY p.post_id ASC"; -$sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments" . $count_sql . " +$sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments, f.attached_forum_id" . $count_sql . " FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $join_sql_table . " WHERE $join_sql AND f.forum_id = t.forum_id @@ -569,6 +569,12 @@ $template->set_filenames(array( 'body' => 'viewtopic_body.tpl') ); + +if (intval($forum_topic_data['attached_forum_id'])>0) +{ + $parent_lookup=intval($forum_topic_data['attached_forum_id']); +} + make_jumpbox('viewforum.'.$phpEx, $forum_id); // This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <teh...@us...> - 2006-12-24 00:32:02
|
Revision: 277 http://svn.sourceforge.net/phpbbreloaded/?rev=277&view=rev Author: tehphpmaster Date: 2006-12-23 16:31:58 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Clean phpBB 2.0.22 files being commited here. phpBB is the base code for phpBB Reloaded and so we will be building phpBB Reloaded based on these core files. Added Paths: ----------- main/trunk/admin/ main/trunk/admin/admin_board.php main/trunk/admin/admin_db_utilities.php main/trunk/admin/admin_disallow.php main/trunk/admin/admin_forum_prune.php main/trunk/admin/admin_forumauth.php main/trunk/admin/admin_forums.php main/trunk/admin/admin_groups.php main/trunk/admin/admin_mass_email.php main/trunk/admin/admin_ranks.php main/trunk/admin/admin_smilies.php main/trunk/admin/admin_styles.php main/trunk/admin/admin_ug_auth.php main/trunk/admin/admin_user_ban.php main/trunk/admin/admin_users.php main/trunk/admin/admin_words.php main/trunk/admin/index.php main/trunk/admin/page_footer_admin.php main/trunk/admin/page_header_admin.php main/trunk/admin/pagestart.php main/trunk/cache/ main/trunk/cache/.htaccess main/trunk/cache/index.htm main/trunk/common.php main/trunk/config.php main/trunk/db/ main/trunk/db/db2.php main/trunk/db/index.htm main/trunk/db/msaccess.php main/trunk/db/mssql-odbc.php main/trunk/db/mssql.php main/trunk/db/mysql.php main/trunk/db/mysql4.php main/trunk/db/postgres7.php main/trunk/extension.inc main/trunk/faq.php main/trunk/groupcp.php main/trunk/images/ main/trunk/images/avatars/ main/trunk/images/avatars/gallery/ main/trunk/images/avatars/gallery/index.htm main/trunk/images/avatars/index.htm main/trunk/images/index.htm main/trunk/images/smiles/ main/trunk/images/smiles/icon_arrow.gif main/trunk/images/smiles/icon_biggrin.gif main/trunk/images/smiles/icon_confused.gif main/trunk/images/smiles/icon_cool.gif main/trunk/images/smiles/icon_cry.gif main/trunk/images/smiles/icon_eek.gif main/trunk/images/smiles/icon_evil.gif main/trunk/images/smiles/icon_exclaim.gif main/trunk/images/smiles/icon_frown.gif main/trunk/images/smiles/icon_idea.gif main/trunk/images/smiles/icon_lol.gif main/trunk/images/smiles/icon_mad.gif main/trunk/images/smiles/icon_mrgreen.gif main/trunk/images/smiles/icon_neutral.gif main/trunk/images/smiles/icon_question.gif main/trunk/images/smiles/icon_razz.gif main/trunk/images/smiles/icon_redface.gif main/trunk/images/smiles/icon_rolleyes.gif main/trunk/images/smiles/icon_sad.gif main/trunk/images/smiles/icon_smile.gif main/trunk/images/smiles/icon_surprised.gif main/trunk/images/smiles/icon_twisted.gif main/trunk/images/smiles/icon_wink.gif main/trunk/images/spacer.gif main/trunk/includes/ main/trunk/includes/auth.php main/trunk/includes/bbcode.php main/trunk/includes/constants.php main/trunk/includes/db.php main/trunk/includes/emailer.php main/trunk/includes/functions.php main/trunk/includes/functions_admin.php main/trunk/includes/functions_post.php main/trunk/includes/functions_search.php main/trunk/includes/functions_selects.php main/trunk/includes/functions_validate.php main/trunk/includes/index.htm main/trunk/includes/page_header.php main/trunk/includes/page_tail.php main/trunk/includes/prune.php main/trunk/includes/sessions.php main/trunk/includes/smtp.php main/trunk/includes/sql_parse.php main/trunk/includes/template.php main/trunk/includes/topic_review.php main/trunk/includes/usercp_activate.php main/trunk/includes/usercp_avatar.php main/trunk/includes/usercp_confirm.php main/trunk/includes/usercp_email.php main/trunk/includes/usercp_register.php main/trunk/includes/usercp_sendpasswd.php main/trunk/includes/usercp_viewprofile.php main/trunk/index.php main/trunk/install/ main/trunk/install/index.htm main/trunk/install/install.php main/trunk/install/schemas/ main/trunk/install/schemas/index.htm main/trunk/install/schemas/ms_access_primer.zip main/trunk/install/schemas/mssql_basic.sql main/trunk/install/schemas/mssql_schema.sql main/trunk/install/schemas/mysql_basic.sql main/trunk/install/schemas/mysql_schema.sql main/trunk/install/schemas/postgres_basic.sql main/trunk/install/schemas/postgres_schema.sql main/trunk/install/update_to_latest.php main/trunk/install/upgrade.php main/trunk/language/ main/trunk/language/index.htm main/trunk/language/lang_english/ main/trunk/language/lang_english/email/ main/trunk/language/lang_english/email/admin_activate.tpl main/trunk/language/lang_english/email/admin_send_email.tpl main/trunk/language/lang_english/email/admin_welcome_activated.tpl main/trunk/language/lang_english/email/admin_welcome_inactive.tpl main/trunk/language/lang_english/email/coppa_welcome_inactive.tpl main/trunk/language/lang_english/email/group_added.tpl main/trunk/language/lang_english/email/group_approved.tpl main/trunk/language/lang_english/email/group_request.tpl main/trunk/language/lang_english/email/index.htm main/trunk/language/lang_english/email/privmsg_notify.tpl main/trunk/language/lang_english/email/profile_send_email.tpl main/trunk/language/lang_english/email/topic_notify.tpl main/trunk/language/lang_english/email/user_activate.tpl main/trunk/language/lang_english/email/user_activate_passwd.tpl main/trunk/language/lang_english/email/user_welcome.tpl main/trunk/language/lang_english/email/user_welcome_inactive.tpl main/trunk/language/lang_english/index.htm main/trunk/language/lang_english/lang_admin.php main/trunk/language/lang_english/lang_bbcode.php main/trunk/language/lang_english/lang_faq.php main/trunk/language/lang_english/lang_main.php main/trunk/language/lang_english/search_stopwords.txt main/trunk/language/lang_english/search_synonyms.txt main/trunk/login.php main/trunk/memberlist.php main/trunk/modcp.php main/trunk/posting.php main/trunk/privmsg.php main/trunk/profile.php main/trunk/search.php main/trunk/templates/ main/trunk/templates/index.htm main/trunk/templates/subSilver/ main/trunk/templates/subSilver/admin/ main/trunk/templates/subSilver/admin/admin_message_body.tpl main/trunk/templates/subSilver/admin/auth_forum_body.tpl main/trunk/templates/subSilver/admin/auth_select_body.tpl main/trunk/templates/subSilver/admin/auth_ug_body.tpl main/trunk/templates/subSilver/admin/board_config_body.tpl main/trunk/templates/subSilver/admin/category_edit_body.tpl main/trunk/templates/subSilver/admin/confirm_body.tpl main/trunk/templates/subSilver/admin/db_utils_backup_body.tpl main/trunk/templates/subSilver/admin/db_utils_restore_body.tpl main/trunk/templates/subSilver/admin/disallow_body.tpl main/trunk/templates/subSilver/admin/forum_admin_body.tpl main/trunk/templates/subSilver/admin/forum_delete_body.tpl main/trunk/templates/subSilver/admin/forum_edit_body.tpl main/trunk/templates/subSilver/admin/forum_prune_body.tpl main/trunk/templates/subSilver/admin/forum_prune_result_body.tpl main/trunk/templates/subSilver/admin/forum_prune_select_body.tpl main/trunk/templates/subSilver/admin/group_edit_body.tpl main/trunk/templates/subSilver/admin/group_select_body.tpl main/trunk/templates/subSilver/admin/index.htm main/trunk/templates/subSilver/admin/index_body.tpl main/trunk/templates/subSilver/admin/index_frameset.tpl main/trunk/templates/subSilver/admin/index_navigate.tpl main/trunk/templates/subSilver/admin/page_footer.tpl main/trunk/templates/subSilver/admin/page_header.tpl main/trunk/templates/subSilver/admin/ranks_edit_body.tpl main/trunk/templates/subSilver/admin/ranks_list_body.tpl main/trunk/templates/subSilver/admin/smile_edit_body.tpl main/trunk/templates/subSilver/admin/smile_import_body.tpl main/trunk/templates/subSilver/admin/smile_list_body.tpl main/trunk/templates/subSilver/admin/styles_addnew_body.tpl main/trunk/templates/subSilver/admin/styles_edit_body.tpl main/trunk/templates/subSilver/admin/styles_exporter.tpl main/trunk/templates/subSilver/admin/styles_list_body.tpl main/trunk/templates/subSilver/admin/user_avatar_gallery.tpl main/trunk/templates/subSilver/admin/user_ban_body.tpl main/trunk/templates/subSilver/admin/user_edit_body.tpl main/trunk/templates/subSilver/admin/user_email_body.tpl main/trunk/templates/subSilver/admin/user_select_body.tpl main/trunk/templates/subSilver/admin/words_edit_body.tpl main/trunk/templates/subSilver/admin/words_list_body.tpl main/trunk/templates/subSilver/agreement.tpl main/trunk/templates/subSilver/bbcode.tpl main/trunk/templates/subSilver/confirm_body.tpl main/trunk/templates/subSilver/error_body.tpl main/trunk/templates/subSilver/faq_body.tpl main/trunk/templates/subSilver/formIE.css main/trunk/templates/subSilver/groupcp_info_body.tpl main/trunk/templates/subSilver/groupcp_pending_info.tpl main/trunk/templates/subSilver/groupcp_user_body.tpl main/trunk/templates/subSilver/images/ main/trunk/templates/subSilver/images/cellpic.gif main/trunk/templates/subSilver/images/cellpic1.gif main/trunk/templates/subSilver/images/cellpic2.jpg main/trunk/templates/subSilver/images/cellpic3.gif main/trunk/templates/subSilver/images/created_by.jpg main/trunk/templates/subSilver/images/folder.gif main/trunk/templates/subSilver/images/folder_announce.gif main/trunk/templates/subSilver/images/folder_announce_new.gif main/trunk/templates/subSilver/images/folder_big.gif main/trunk/templates/subSilver/images/folder_hot.gif main/trunk/templates/subSilver/images/folder_lock.gif main/trunk/templates/subSilver/images/folder_lock_new.gif main/trunk/templates/subSilver/images/folder_locked_big.gif main/trunk/templates/subSilver/images/folder_new.gif main/trunk/templates/subSilver/images/folder_new_big.gif main/trunk/templates/subSilver/images/folder_new_hot.gif main/trunk/templates/subSilver/images/folder_sticky.gif main/trunk/templates/subSilver/images/folder_sticky_new.gif main/trunk/templates/subSilver/images/icon_delete.gif main/trunk/templates/subSilver/images/icon_latest_reply.gif main/trunk/templates/subSilver/images/icon_mini_faq.gif main/trunk/templates/subSilver/images/icon_mini_groups.gif main/trunk/templates/subSilver/images/icon_mini_login.gif main/trunk/templates/subSilver/images/icon_mini_members.gif main/trunk/templates/subSilver/images/icon_mini_message.gif main/trunk/templates/subSilver/images/icon_mini_profile.gif main/trunk/templates/subSilver/images/icon_mini_register.gif main/trunk/templates/subSilver/images/icon_mini_search.gif main/trunk/templates/subSilver/images/icon_minipost.gif main/trunk/templates/subSilver/images/icon_minipost_new.gif main/trunk/templates/subSilver/images/icon_newest_reply.gif main/trunk/templates/subSilver/images/index.htm main/trunk/templates/subSilver/images/lang_english/ main/trunk/templates/subSilver/images/lang_english/icon_aim.gif main/trunk/templates/subSilver/images/lang_english/icon_edit.gif main/trunk/templates/subSilver/images/lang_english/icon_email.gif main/trunk/templates/subSilver/images/lang_english/icon_icq_add.gif main/trunk/templates/subSilver/images/lang_english/icon_ip.gif main/trunk/templates/subSilver/images/lang_english/icon_msnm.gif main/trunk/templates/subSilver/images/lang_english/icon_pm.gif main/trunk/templates/subSilver/images/lang_english/icon_profile.gif main/trunk/templates/subSilver/images/lang_english/icon_quote.gif main/trunk/templates/subSilver/images/lang_english/icon_search.gif main/trunk/templates/subSilver/images/lang_english/icon_www.gif main/trunk/templates/subSilver/images/lang_english/icon_yim.gif main/trunk/templates/subSilver/images/lang_english/msg_newpost.gif main/trunk/templates/subSilver/images/lang_english/post.gif main/trunk/templates/subSilver/images/lang_english/reply-locked.gif main/trunk/templates/subSilver/images/lang_english/reply.gif main/trunk/templates/subSilver/images/logo_phpBB.gif main/trunk/templates/subSilver/images/logo_phpBB_med.gif main/trunk/templates/subSilver/images/msg_inbox.gif main/trunk/templates/subSilver/images/msg_outbox.gif main/trunk/templates/subSilver/images/msg_savebox.gif main/trunk/templates/subSilver/images/msg_sentbox.gif main/trunk/templates/subSilver/images/spacer.gif main/trunk/templates/subSilver/images/topic_delete.gif main/trunk/templates/subSilver/images/topic_lock.gif main/trunk/templates/subSilver/images/topic_move.gif main/trunk/templates/subSilver/images/topic_split.gif main/trunk/templates/subSilver/images/topic_unlock.gif main/trunk/templates/subSilver/images/vote_lcap.gif main/trunk/templates/subSilver/images/vote_rcap.gif main/trunk/templates/subSilver/images/voting_bar.gif main/trunk/templates/subSilver/images/whosonline.gif main/trunk/templates/subSilver/index.htm main/trunk/templates/subSilver/index_body.tpl main/trunk/templates/subSilver/jumpbox.tpl main/trunk/templates/subSilver/login_body.tpl main/trunk/templates/subSilver/memberlist_body.tpl main/trunk/templates/subSilver/message_body.tpl main/trunk/templates/subSilver/modcp_body.tpl main/trunk/templates/subSilver/modcp_move.tpl main/trunk/templates/subSilver/modcp_split.tpl main/trunk/templates/subSilver/modcp_viewip.tpl main/trunk/templates/subSilver/overall_footer.tpl main/trunk/templates/subSilver/overall_header.tpl main/trunk/templates/subSilver/posting_body.tpl main/trunk/templates/subSilver/posting_poll_body.tpl main/trunk/templates/subSilver/posting_preview.tpl main/trunk/templates/subSilver/posting_smilies.tpl main/trunk/templates/subSilver/posting_topic_review.tpl main/trunk/templates/subSilver/privmsgs_body.tpl main/trunk/templates/subSilver/privmsgs_popup.tpl main/trunk/templates/subSilver/privmsgs_preview.tpl main/trunk/templates/subSilver/privmsgs_read_body.tpl main/trunk/templates/subSilver/profile_add_body.tpl main/trunk/templates/subSilver/profile_avatar_gallery.tpl main/trunk/templates/subSilver/profile_send_email.tpl main/trunk/templates/subSilver/profile_send_pass.tpl main/trunk/templates/subSilver/profile_view_body.tpl main/trunk/templates/subSilver/search_body.tpl main/trunk/templates/subSilver/search_results_posts.tpl main/trunk/templates/subSilver/search_results_topics.tpl main/trunk/templates/subSilver/search_username.tpl main/trunk/templates/subSilver/simple_footer.tpl main/trunk/templates/subSilver/simple_header.tpl main/trunk/templates/subSilver/subSilver.cfg main/trunk/templates/subSilver/subSilver.css main/trunk/templates/subSilver/theme_info.cfg main/trunk/templates/subSilver/viewforum_body.tpl main/trunk/templates/subSilver/viewonline_body.tpl main/trunk/templates/subSilver/viewtopic_body.tpl main/trunk/templates/subSilver/viewtopic_poll_ballot.tpl main/trunk/templates/subSilver/viewtopic_poll_result.tpl main/trunk/viewforum.php main/trunk/viewonline.php main/trunk/viewtopic.php Added: main/trunk/admin/admin_board.php =================================================================== --- main/trunk/admin/admin_board.php (rev 0) +++ main/trunk/admin/admin_board.php 2006-12-24 00:31:58 UTC (rev 277) @@ -0,0 +1,366 @@ +<?php +/*************************************************************************** + * admin_board.php + * ------------------- + * begin : Thursday, Jul 12, 2001 + * copyright : (C) 2001 The phpBB Group + * email : su...@ph... + * + * $Id: admin_board.php,v 1.51.2.16 2006/12/16 13:11:24 acydburn Exp $ + * + * + ***************************************************************************/ + +define('IN_PHPBB', 1); + +if( !empty($setmodules) ) +{ + $file = basename(__FILE__); + $module['General']['Configuration'] = $file; + return; +} + +// +// Let's set the root dir for phpBB +// +$phpbb_root_path = "./../"; +require($phpbb_root_path . 'extension.inc'); +require('./pagestart.' . $phpEx); +include($phpbb_root_path . 'includes/functions_selects.'.$phpEx); + +// +// Pull all config data +// +$sql = "SELECT * + FROM " . CONFIG_TABLE; +if(!$result = $db->sql_query($sql)) +{ + message_die(CRITICAL_ERROR, "Could not query config information in admin_board", "", __LINE__, __FILE__, $sql); +} +else +{ + while( $row = $db->sql_fetchrow($result) ) + { + $config_name = $row['config_name']; + $config_value = $row['config_value']; + $default_config[$config_name] = isset($HTTP_POST_VARS['submit']) ? str_replace("'", "\'", $config_value) : $config_value; + + $new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; + + if ($config_name == 'cookie_name') + { + $new['cookie_name'] = str_replace('.', '_', $new['cookie_name']); + } + + // Attempt to prevent a common mistake with this value, + // http:// is the protocol and not part of the server name + if ($config_name == 'server_name') + { + $new['server_name'] = str_replace('http://', '', $new['server_name']); + } + + // Attempt to prevent a mistake with this value. + if ($config_name == 'avatar_path') + { + $new['avatar_path'] = trim($new['avatar_path']); + if (strstr($new['avatar_path'], "\0") || !is_dir($phpbb_root_path . $new['avatar_path']) || !is_writable($phpbb_root_path . $new['avatar_path'])) + { + $new['avatar_path'] = $default_config['avatar_path']; + } + } + + if( isset($HTTP_POST_VARS['submit']) ) + { + $sql = "UPDATE " . CONFIG_TABLE . " SET + config_value = '" . str_replace("\'", "''", $new[$config_name]) . "' + WHERE config_name = '$config_name'"; + if( !$db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql); + } + } + } + + if( isset($HTTP_POST_VARS['submit']) ) + { + $message = $lang['Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_config'], "<a href=\"" . append_sid("admin_board.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); + + message_die(GENERAL_MESSAGE, $message); + } +} + +$style_select = style_select($new['default_style'], 'default_style', "../templates"); +$lang_select = language_select($new['default_lang'], 'default_lang', "language"); +$timezone_select = tz_select($new['board_timezone'], 'board_timezone'); + +$disable_board_yes = ( $new['board_disable'] ) ? "checked=\"checked\"" : ""; +$disable_board_no = ( !$new['board_disable'] ) ? "checked=\"checked\"" : ""; + +$cookie_secure_yes = ( $new['cookie_secure'] ) ? "checked=\"checked\"" : ""; +$cookie_secure_no = ( !$new['cookie_secure'] ) ? "checked=\"checked\"" : ""; + +$html_tags = $new['allow_html_tags']; + +$override_user_style_yes = ( $new['override_user_style'] ) ? "checked=\"checked\"" : ""; +$override_user_style_no = ( !$new['override_user_style'] ) ? "checked=\"checked\"" : ""; + +$html_yes = ( $new['allow_html'] ) ? "checked=\"checked\"" : ""; +$html_no = ( !$new['allow_html'] ) ? "checked=\"checked\"" : ""; + +$bbcode_yes = ( $new['allow_bbcode'] ) ? "checked=\"checked\"" : ""; +$bbcode_no = ( !$new['allow_bbcode'] ) ? "checked=\"checked\"" : ""; + +$activation_none = ( $new['require_activation'] == USER_ACTIVATION_NONE ) ? "checked=\"checked\"" : ""; +$activation_user = ( $new['require_activation'] == USER_ACTIVATION_SELF ) ? "checked=\"checked\"" : ""; +$activation_admin = ( $new['require_activation'] == USER_ACTIVATION_ADMIN ) ? "checked=\"checked\"" : ""; + +$confirm_yes = ($new['enable_confirm']) ? 'checked="checked"' : ''; +$confirm_no = (!$new['enable_confirm']) ? 'checked="checked"' : ''; + +$allow_autologin_yes = ($new['allow_autologin']) ? 'checked="checked"' : ''; +$allow_autologin_no = (!$new['allow_autologin']) ? 'checked="checked"' : ''; + +$board_email_form_yes = ( $new['board_email_form'] ) ? "checked=\"checked\"" : ""; +$board_email_form_no = ( !$new['board_email_form'] ) ? "checked=\"checked\"" : ""; + +$gzip_yes = ( $new['gzip_compress'] ) ? "checked=\"checked\"" : ""; +$gzip_no = ( !$new['gzip_compress'] ) ? "checked=\"checked\"" : ""; + +$privmsg_on = ( !$new['privmsg_disable'] ) ? "checked=\"checked\"" : ""; +$privmsg_off = ( $new['privmsg_disable'] ) ? "checked=\"checked\"" : ""; + +$prune_yes = ( $new['prune_enable'] ) ? "checked=\"checked\"" : ""; +$prune_no = ( !$new['prune_enable'] ) ? "checked=\"checked\"" : ""; + +$smile_yes = ( $new['allow_smilies'] ) ? "checked=\"checked\"" : ""; +$smile_no = ( !$new['allow_smilies'] ) ? "checked=\"checked\"" : ""; + +$sig_yes = ( $new['allow_sig'] ) ? "checked=\"checked\"" : ""; +$sig_no = ( !$new['allow_sig'] ) ? "checked=\"checked\"" : ""; + +$namechange_yes = ( $new['allow_namechange'] ) ? "checked=\"checked\"" : ""; +$namechange_no = ( !$new['allow_namechange'] ) ? "checked=\"checked\"" : ""; + +$avatars_local_yes = ( $new['allow_avatar_local'] ) ? "checked=\"checked\"" : ""; +$avatars_local_no = ( !$new['allow_avatar_local'] ) ? "checked=\"checked\"" : ""; +$avatars_remote_yes = ( $new['allow_avatar_remote'] ) ? "checked=\"checked\"" : ""; +$avatars_remote_no = ( !$new['allow_avatar_remote'] ) ? "checked=\"checked\"" : ""; +$avatars_upload_yes = ( $new['allow_avatar_upload'] ) ? "checked=\"checked\"" : ""; +$avatars_upload_no = ( !$new['allow_avatar_upload'] ) ? "checked=\"checked\"" : ""; + +$smtp_yes = ( $new['smtp_delivery'] ) ? "checked=\"checked\"" : ""; +$smtp_no = ( !$new['smtp_delivery'] ) ? "checked=\"checked\"" : ""; + +$template->set_filenames(array( + "body" => "admin/board_config_body.tpl") +); + +// +// Escape any quotes in the site description for proper display in the text +// box on the admin page +// +$new['site_desc'] = str_replace('"', '"', $new['site_desc']); +$new['sitename'] = str_replace('"', '"', strip_tags($new['sitename'])); +$template->assign_vars(array( + "S_CONFIG_ACTION" => append_sid("admin_board.$phpEx"), + + "L_YES" => $lang['Yes'], + "L_NO" => $lang['No'], + "L_CONFIGURATION_TITLE" => $lang['General_Config'], + "L_CONFIGURATION_EXPLAIN" => $lang['Config_explain'], + "L_GENERAL_SETTINGS" => $lang['General_settings'], + "L_SERVER_NAME" => $lang['Server_name'], + "L_SERVER_NAME_EXPLAIN" => $lang['Server_name_explain'], + "L_SERVER_PORT" => $lang['Server_port'], + "L_SERVER_PORT_EXPLAIN" => $lang['Server_port_explain'], + "L_SCRIPT_PATH" => $lang['Script_path'], + "L_SCRIPT_PATH_EXPLAIN" => $lang['Script_path_explain'], + "L_SITE_NAME" => $lang['Site_name'], + "L_SITE_DESCRIPTION" => $lang['Site_desc'], + "L_DISABLE_BOARD" => $lang['Board_disable'], + "L_DISABLE_BOARD_EXPLAIN" => $lang['Board_disable_explain'], + "L_ACCT_ACTIVATION" => $lang['Acct_activation'], + "L_NONE" => $lang['Acc_None'], + "L_USER" => $lang['Acc_User'], + "L_ADMIN" => $lang['Acc_Admin'], + "L_VISUAL_CONFIRM" => $lang['Visual_confirm'], + "L_VISUAL_CONFIRM_EXPLAIN" => $lang['Visual_confirm_explain'], + "L_ALLOW_AUTOLOGIN" => $lang['Allow_autologin'], + "L_ALLOW_AUTOLOGIN_EXPLAIN" => $lang['Allow_autologin_explain'], + "L_AUTOLOGIN_TIME" => $lang['Autologin_time'], + "L_AUTOLOGIN_TIME_EXPLAIN" => $lang['Autologin_time_explain'], + "L_COOKIE_SETTINGS" => $lang['Cookie_settings'], + "L_COOKIE_SETTINGS_EXPLAIN" => $lang['Cookie_settings_explain'], + "L_COOKIE_DOMAIN" => $lang['Cookie_domain'], + "L_COOKIE_NAME" => $lang['Cookie_name'], + "L_COOKIE_PATH" => $lang['Cookie_path'], + "L_COOKIE_SECURE" => $lang['Cookie_secure'], + "L_COOKIE_SECURE_EXPLAIN" => $lang['Cookie_secure_explain'], + "L_SESSION_LENGTH" => $lang['Session_length'], + "L_PRIVATE_MESSAGING" => $lang['Private_Messaging'], + "L_INBOX_LIMIT" => $lang['Inbox_limits'], + "L_SENTBOX_LIMIT" => $lang['Sentbox_limits'], + "L_SAVEBOX_LIMIT" => $lang['Savebox_limits'], + "L_DISABLE_PRIVATE_MESSAGING" => $lang['Disable_privmsg'], + "L_ENABLED" => $lang['Enabled'], + "L_DISABLED" => $lang['Disabled'], + "L_ABILITIES_SETTINGS" => $lang['Abilities_settings'], + "L_MAX_POLL_OPTIONS" => $lang['Max_poll_options'], + "L_FLOOD_INTERVAL" => $lang['Flood_Interval'], + "L_FLOOD_INTERVAL_EXPLAIN" => $lang['Flood_Interval_explain'], + "L_SEARCH_FLOOD_INTERVAL" => $lang['Search_Flood_Interval'], + "L_SEARCH_FLOOD_INTERVAL_EXPLAIN" => $lang['Search_Flood_Interval_explain'], + + 'L_MAX_LOGIN_ATTEMPTS' => $lang['Max_login_attempts'], + 'L_MAX_LOGIN_ATTEMPTS_EXPLAIN' => $lang['Max_login_attempts_explain'], + 'L_LOGIN_RESET_TIME' => $lang['Login_reset_time'], + 'L_LOGIN_RESET_TIME_EXPLAIN' => $lang['Login_reset_time_explain'], + 'MAX_LOGIN_ATTEMPTS' => $new['max_login_attempts'], + 'LOGIN_RESET_TIME' => $new['login_reset_time'], + + "L_BOARD_EMAIL_FORM" => $lang['Board_email_form'], + "L_BOARD_EMAIL_FORM_EXPLAIN" => $lang['Board_email_form_explain'], + "L_TOPICS_PER_PAGE" => $lang['Topics_per_page'], + "L_POSTS_PER_PAGE" => $lang['Posts_per_page'], + "L_HOT_THRESHOLD" => $lang['Hot_threshold'], + "L_DEFAULT_STYLE" => $lang['Default_style'], + "L_OVERRIDE_STYLE" => $lang['Override_style'], + "L_OVERRIDE_STYLE_EXPLAIN" => $lang['Override_style_explain'], + "L_DEFAULT_LANGUAGE" => $lang['Default_language'], + "L_DATE_FORMAT" => $lang['Date_format'], + "L_SYSTEM_TIMEZONE" => $lang['System_timezone'], + "L_ENABLE_GZIP" => $lang['Enable_gzip'], + "L_ENABLE_PRUNE" => $lang['Enable_prune'], + "L_ALLOW_HTML" => $lang['Allow_HTML'], + "L_ALLOW_BBCODE" => $lang['Allow_BBCode'], + "L_ALLOWED_TAGS" => $lang['Allowed_tags'], + "L_ALLOWED_TAGS_EXPLAIN" => $lang['Allowed_tags_explain'], + "L_ALLOW_SMILIES" => $lang['Allow_smilies'], + "L_SMILIES_PATH" => $lang['Smilies_path'], + "L_SMILIES_PATH_EXPLAIN" => $lang['Smilies_path_explain'], + "L_ALLOW_SIG" => $lang['Allow_sig'], + "L_MAX_SIG_LENGTH" => $lang['Max_sig_length'], + "L_MAX_SIG_LENGTH_EXPLAIN" => $lang['Max_sig_length_explain'], + "L_ALLOW_NAME_CHANGE" => $lang['Allow_name_change'], + "L_AVATAR_SETTINGS" => $lang['Avatar_settings'], + "L_ALLOW_LOCAL" => $lang['Allow_local'], + "L_ALLOW_REMOTE" => $lang['Allow_remote'], + "L_ALLOW_REMOTE_EXPLAIN" => $lang['Allow_remote_explain'], + "L_ALLOW_UPLOAD" => $lang['Allow_upload'], + "L_MAX_FILESIZE" => $lang['Max_filesize'], + "L_MAX_FILESIZE_EXPLAIN" => $lang['Max_filesize_explain'], + "L_MAX_AVATAR_SIZE" => $lang['Max_avatar_size'], + "L_MAX_AVATAR_SIZE_EXPLAIN" => $lang['Max_avatar_size_explain'], + "L_AVATAR_STORAGE_PATH" => $lang['Avatar_storage_path'], + "L_AVATAR_STORAGE_PATH_EXPLAIN" => $lang['Avatar_storage_path_explain'], + "L_AVATAR_GALLERY_PATH" => $lang['Avatar_gallery_path'], + "L_AVATAR_GALLERY_PATH_EXPLAIN" => $lang['Avatar_gallery_path_explain'], + "L_COPPA_SETTINGS" => $lang['COPPA_settings'], + "L_COPPA_FAX" => $lang['COPPA_fax'], + "L_COPPA_MAIL" => $lang['COPPA_mail'], + "L_COPPA_MAIL_EXPLAIN" => $lang['COPPA_mail_explain'], + "L_EMAIL_SETTINGS" => $lang['Email_settings'], + "L_ADMIN_EMAIL" => $lang['Admin_email'], + "L_EMAIL_SIG" => $lang['Email_sig'], + "L_EMAIL_SIG_EXPLAIN" => $lang['Email_sig_explain'], + "L_USE_SMTP" => $lang['Use_SMTP'], + "L_USE_SMTP_EXPLAIN" => $lang['Use_SMTP_explain'], + "L_SMTP_SERVER" => $lang['SMTP_server'], + "L_SMTP_USERNAME" => $lang['SMTP_username'], + "L_SMTP_USERNAME_EXPLAIN" => $lang['SMTP_username_explain'], + "L_SMTP_PASSWORD" => $lang['SMTP_password'], + "L_SMTP_PASSWORD_EXPLAIN" => $lang['SMTP_password_explain'], + "L_SUBMIT" => $lang['Submit'], + "L_RESET" => $lang['Reset'], + + "SERVER_NAME" => $new['server_name'], + "SCRIPT_PATH" => $new['script_path'], + "SERVER_PORT" => $new['server_port'], + "SITENAME" => $new['sitename'], + "SITE_DESCRIPTION" => $new['site_desc'], + "S_DISABLE_BOARD_YES" => $disable_board_yes, + "S_DISABLE_BOARD_NO" => $disable_board_no, + "ACTIVATION_NONE" => USER_ACTIVATION_NONE, + "ACTIVATION_NONE_CHECKED" => $activation_none, + "ACTIVATION_USER" => USER_ACTIVATION_SELF, + "ACTIVATION_USER_CHECKED" => $activation_user, + "ACTIVATION_ADMIN" => USER_ACTIVATION_ADMIN, + "ACTIVATION_ADMIN_CHECKED" => $activation_admin, + "CONFIRM_ENABLE" => $confirm_yes, + "CONFIRM_DISABLE" => $confirm_no, + 'ALLOW_AUTOLOGIN_YES' => $allow_autologin_yes, + 'ALLOW_AUTOLOGIN_NO' => $allow_autologin_no, + 'AUTOLOGIN_TIME' => (int) $new['max_autologin_time'], + "BOARD_EMAIL_FORM_ENABLE" => $board_email_form_yes, + "BOARD_EMAIL_FORM_DISABLE" => $board_email_form_no, + "MAX_POLL_OPTIONS" => $new['max_poll_options'], + "FLOOD_INTERVAL" => $new['flood_interval'], + "SEARCH_FLOOD_INTERVAL" => $new['search_flood_interval'], + "TOPICS_PER_PAGE" => $new['topics_per_page'], + "POSTS_PER_PAGE" => $new['posts_per_page'], + "HOT_TOPIC" => $new['hot_threshold'], + "STYLE_SELECT" => $style_select, + "OVERRIDE_STYLE_YES" => $override_user_style_yes, + "OVERRIDE_STYLE_NO" => $override_user_style_no, + "LANG_SELECT" => $lang_select, + "L_DATE_FORMAT_EXPLAIN" => $lang['Date_format_explain'], + "DEFAULT_DATEFORMAT" => $new['default_dateformat'], + "TIMEZONE_SELECT" => $timezone_select, + "S_PRIVMSG_ENABLED" => $privmsg_on, + "S_PRIVMSG_DISABLED" => $privmsg_off, + "INBOX_LIMIT" => $new['max_inbox_privmsgs'], + "SENTBOX_LIMIT" => $new['max_sentbox_privmsgs'], + "SAVEBOX_LIMIT" => $new['max_savebox_privmsgs'], + "COOKIE_DOMAIN" => $new['cookie_domain'], + "COOKIE_NAME" => $new['cookie_name'], + "COOKIE_PATH" => $new['cookie_path'], + "SESSION_LENGTH" => $new['session_length'], + "S_COOKIE_SECURE_ENABLED" => $cookie_secure_yes, + "S_COOKIE_SECURE_DISABLED" => $cookie_secure_no, + "GZIP_YES" => $gzip_yes, + "GZIP_NO" => $gzip_no, + "PRUNE_YES" => $prune_yes, + "PRUNE_NO" => $prune_no, + "HTML_TAGS" => $html_tags, + "HTML_YES" => $html_yes, + "HTML_NO" => $html_no, + "BBCODE_YES" => $bbcode_yes, + "BBCODE_NO" => $bbcode_no, + "SMILE_YES" => $smile_yes, + "SMILE_NO" => $smile_no, + "SIG_YES" => $sig_yes, + "SIG_NO" => $sig_no, + "SIG_SIZE" => $new['max_sig_chars'], + "NAMECHANGE_YES" => $namechange_yes, + "NAMECHANGE_NO" => $namechange_no, + "AVATARS_LOCAL_YES" => $avatars_local_yes, + "AVATARS_LOCAL_NO" => $avatars_local_no, + "AVATARS_REMOTE_YES" => $avatars_remote_yes, + "AVATARS_REMOTE_NO" => $avatars_remote_no, + "AVATARS_UPLOAD_YES" => $avatars_upload_yes, + "AVATARS_UPLOAD_NO" => $avatars_upload_no, + "AVATAR_FILESIZE" => $new['avatar_filesize'], + "AVATAR_MAX_HEIGHT" => $new['avatar_max_height'], + "AVATAR_MAX_WIDTH" => $new['avatar_max_width'], + "AVATAR_PATH" => $new['avatar_path'], + "AVATAR_GALLERY_PATH" => $new['avatar_gallery_path'], + "SMILIES_PATH" => $new['smilies_path'], + "INBOX_PRIVMSGS" => $new['max_inbox_privmsgs'], + "SENTBOX_PRIVMSGS" => $new['max_sentbox_privmsgs'], + "SAVEBOX_PRIVMSGS" => $new['max_savebox_privmsgs'], + "EMAIL_FROM" => $new['board_email'], + "EMAIL_SIG" => $new['board_email_sig'], + "SMTP_YES" => $smtp_yes, + "SMTP_NO" => $smtp_no, + "SMTP_HOST" => $new['smtp_host'], + "SMTP_USERNAME" => $new['smtp_username'], + "SMTP_PASSWORD" => $new['smtp_password'], + "COPPA_MAIL" => $new['coppa_mail'], + "COPPA_FAX" => $new['coppa_fax']) +); + +$template->pparse("body"); + +include('./page_footer_admin.'.$phpEx); + +?> Added: main/trunk/admin/admin_db_utilities.php =================================================================== --- main/trunk/admin/admin_db_utilities.php (rev 0) +++ main/trunk/admin/admin_db_utilities.php 2006-12-24 00:31:58 UTC (rev 277) @@ -0,0 +1,1008 @@ +<?php +/*************************************************************************** +* admin_db_utilities.php +* ------------------- +* begin : Thu May 31, 2001 +* copyright : (C) 2001 The phpBB Group +* email : su...@ph... +* +* $Id: admin_db_utilities.php,v 1.42.2.14 2006/02/10 20:35:40 grahamje Exp $ +* +****************************************************************************/ + +/*************************************************************************** + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + ***************************************************************************/ + +/*************************************************************************** +* We will attempt to create a file based backup of all of the data in the +* users phpBB database. The resulting file should be able to be imported by +* the db_restore.php function, or by using the mysql command_line +* +* Some functions are adapted from the upgrade_20.php script and others +* adapted from the unoficial phpMyAdmin 2.2.0. +***************************************************************************/ + +define('IN_PHPBB', 1); + +if( !empty($setmodules) ) +{ + $filename = basename(__FILE__); + $module['General']['Backup_DB'] = $filename . "?perform=backup"; + + $file_uploads = (@phpversion() >= '4.0.0') ? @ini_get('file_uploads') : @get_cfg_var('file_uploads'); + + if( (empty($file_uploads) || $file_uploads != 0) && (strtolower($file_uploads) != 'off') && (@phpversion() != '4.0.4pl1') ) + { + $module['General']['Restore_DB'] = $filename . "?perform=restore"; + } + + return; +} + +// +// Load default header +// +$no_page_header = TRUE; +$phpbb_root_path = "./../"; +require($phpbb_root_path . 'extension.inc'); +require('./pagestart.' . $phpEx); +include($phpbb_root_path . 'includes/sql_parse.'.$phpEx); + +// +// Set VERBOSE to 1 for debugging info.. +// +define("VERBOSE", 0); + +// +// Increase maximum execution time, but don't complain about it if it isn't +// allowed. +// +@set_time_limit(1200); + +// ----------------------- +// The following functions are adapted from phpMyAdmin and upgrade_20.php +// +function gzip_PrintFourChars($Val) +{ + for ($i = 0; $i < 4; $i ++) + { + $return .= chr($Val % 256); + $Val = floor($Val / 256); + } + return $return; +} + + + +// +// 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 $drop, $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.. + + if ($drop == 1) + { + $schema_create .= "DROP TABLE $table;$crlf"; + } // end if + + // + // 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 $drop, $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.... + // + if ($drop == 1) + { + $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); + if(!$result) + { + message_die(GENERAL_ERROR, "Failed in get_table_def (show fields)", "", __LINE__, __FILE__, $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); + if(!$result) + { + message_die(GENERAL_ERROR, "FAILED IN get_table_def (show keys)", "", __LINE__, __FILE__, $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']; + } + + while(list($x, $columns) = @each($index)) + { + $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"); + + if (!$result) + { + message_die(GENERAL_ERROR, "Failed in get_table_content (select *)", "", __LINE__, __FILE__, "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)) + { + $schema_vals = ''; + $schema_fields = ''; + $schema_insert = ''; + // + // Build the SQL statement to recreate the data. + // + for($i = 0; $i < $i_num_fields; $i++) + { + $strVal = $row[$aryName[$i]]; + if (eregi("char|text|bool", $aryType[$i])) + { + $strQuote = "'"; + $strEmpty = ""; + $strVal = addslashes($strVal); + } + elseif (eregi("date|timestamp", $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 = ereg_replace(",$", "", $schema_vals); + $schema_vals = ereg_replace("^ ", "", $schema_vals); + $schema_fields = ereg_replace(",$", "", $schema_fields); + $schema_fields = ereg_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. + if (!($result = $db->sql_query("SELECT * FROM $table"))) + { + message_die(GENERAL_ERROR, "Failed in get_table_content (select *)", "", __LINE__, __FILE__, "SELECT * FROM $table"); + } + + // Loop through the resulting rows and build the sql statement. + if ($row = $db->sql_fetchrow($result)) + { + $handler("\n#\n# Table Data for $table\n#\n"); + $field_names = array(); + + // Grab the list of field names. + $num_fields = $db->sql_numfields($result); + $table_list = '('; + for ($j = 0; $j < $num_fields; $j++) + { + $field_names[$j] = $db->sql_fieldname($j, $result); + $table_list .= (($j > 0) ? ', ' : '') . $field_names[$j]; + + } + $table_list .= ')'; + + do + { + // 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++) + { + $schema_insert .= ($j > 0) ? ', ' : ''; + + if(!isset($row[$field_names[$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[$field_names[$j]] != '') + { + $schema_insert .= '\'' . addslashes($row[$field_names[$j]]) . '\''; + } + else + { + $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 +// ------------- + + +// +// Begin program proper +// +if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) ) +{ + $perform = (isset($HTTP_POST_VARS['perform'])) ? $HTTP_POST_VARS['perform'] : $HTTP_GET_VARS['perform']; + + switch($perform) + { + case 'backup': + + $error = false; + switch(SQL_LAYER) + { + case 'oracle': + $error = true; + break; + case 'db2': + $error = true; + break; + case 'msaccess': + $error = true; + break; + case 'mssql': + case 'mssql-odbc': + $error = true; + break; + } + + if ($error) + { + include('./page_header_admin.'.$phpEx); + + $template->set_filenames(array( + "body" => "admin/admin_message_body.tpl") + ); + + $template->assign_vars(array( + "MESSAGE_TITLE" => $lang['Information'], + "MESSAGE_TEXT" => $lang['Backups_not_supported']) + ); + + $template->pparse("body"); + + include('./page_footer_admin.'.$phpEx); + } + + $tables = array('auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words', 'confirm', 'sessions_keys'); + + $additional_tables = (isset($HTTP_POST_VARS['additional_tables'])) ? $HTTP_POST_VARS['additional_tables'] : ( (isset($HTTP_GET_VARS['additional_tables'])) ? $HTTP_GET_VARS['additional_tables'] : "" ); + + $backup_type = (isset($HTTP_POST_VARS['backup_type'])) ? $HTTP_POST_VARS['backup_type'] : ( (isset($HTTP_GET_VARS['backup_type'])) ? $HTTP_GET_VARS['backup_type'] : "" ); + + $gzipcompress = (!empty($HTTP_POST_VARS['gzipcompress'])) ? $HTTP_POST_VARS['gzipcompress'] : ( (!empty($HTTP_GET_VARS['gzipcompress'])) ? $HTTP_GET_VARS['gzipcompress'] : 0 ); + + $drop = (!empty($HTTP_POST_VARS['drop'])) ? intval($HTTP_POST_VARS['drop']) : ( (!empty($HTTP_GET_VARS['drop'])) ? intval($HTTP_GET_VARS['drop']) : 0 ); + + if(!empty($additional_tables)) + { + if(ereg(",", $additional_tables)) + { + $additional_tables = split(",", $additional_tables); + + for($i = 0; $i < count($additional_tables); $i++) + { + $tables[] = trim($additional_tables[$i]); + } + + } + else + { + $tables[] = trim($additional_tables); + } + } + + if( !isset($HTTP_POST_VARS['backupstart']) && !isset($HTTP_GET_VARS['backupstart'])) + { + include('./page_header_admin.'.$phpEx); + + $template->set_filenames(array( + "body" => "admin/db_utils_backup_body.tpl") + ); + $s_hidden_fields = "<input type=\"hidden\" name=\"perform\" value=\"backup\" /><input type=\"hidden\" name=\"drop\" value=\"1\" /><input type=\"hidden\" name=\"perform\" value=\"$perform\" />"; + + $template->assign_vars(array( + "L_DATABASE_BACKUP" => $lang['Database_Utilities'] . " : " . $lang['Backup'], + "L_BACKUP_EXPLAIN" => $lang['Backup_explain'], + "L_FULL_BACKUP" => $lang['Full_backup'], + "L_STRUCTURE_BACKUP" => $lang['Structure_backup'], + "L_DATA_BACKUP" => $lang['Data_backup'], + "L_ADDITIONAL_TABLES" => $lang['Additional_tables'], + "L_START_BACKUP" => $lang['Start_backup'], + "L_BACKUP_OPTIONS" => $lang['Backup_options'], + "L_GZIP_COMPRESS" => $lang['Gzip_compress'], + "L_NO" => $lang['No'], + "L_YES" => $lang['Yes'], + + "S_HIDDEN_FIELDS" => $s_hidden_fields, + "S_DBUTILS_ACTION" => append_sid("admin_db_utilities.$phpEx")) + ); + $template->pparse("body"); + + break; + + } + else if( !isset($HTTP_POST_VARS['startdownload']) && !isset($HTTP_GET_VARS['startdownload']) ) + { + if(is_array($additional_tables)) + { + $additional_tables = implode(',', $additional_tables); + } + $template->set_filenames(array( + "body" => "admin/admin_message_body.tpl") + ); + + $template->assign_vars(array( + "META" => '<meta http-equiv="refresh" content="2;url=' . append_sid("admin_db_utilities.$phpEx?perform=backup&additional_tables=" . quotemeta($additional_tables) . "&backup_type=$backup_type&drop=1&backupstart=1&gzipcompress=$gzipcompress&startdownload=1") . '">', + + "MESSAGE_TITLE" => $lang['Database_Utilities'] . " : " . $lang['Backup'], + "MESSAGE_TEXT" => $lang['Backup_download']) + ); + + include('./page_header_admin.'.$phpEx); + + $template->pparse("body"); + + include('./page_footer_admin.'.$phpEx); + + } + header("Pragma: no-cache"); + $do_gzip_compress = FALSE; + if( $gzipcompress ) + { + $phpver = phpversion(); + + if($phpver >= "4.0") + { + if(extension_loaded("zlib")) + { + $do_gzip_compress = TRUE; + } + } + } + if($do_gzip_compress) + { + @ob_start(); + @ob_implicit_flush(0); + header("Content-Type: application/x-gzip; name=\"phpbb_db_backup.sql.gz\""); + header("Content-disposition: attachment; filename=phpbb_db_backup.sql.gz"); + } + else + { + header("Content-Type: text/x-delimtext; name=\"phpbb_db_backup.sql\""); + header("Content-disposition: attachment; filename=phpbb_db_backup.sql"); + } + + // + // 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]; + + switch (SQL_LAYER) + { + case 'postgresql': + $table_def_function = "get_table_def_postgresql"; + $table_content_function = "get_table_content_postgresql"; + break; + + case 'mysql': + case 'mysql4': + $table_def_function = "get_table_def_mysql"; + $table_content_function = "get_table_content_mysql"; + break; + } + + if($backup_type != 'data') + { + echo "#\n# TABLE: " . $table_prefix . $table_name . "\n#\n"; + echo $table_def_function($table_prefix . $table_name, "\n") . "\n"; + } + + if($backup_type != 'structure') + { + $table_content_function($table_prefix . $table_name, "output_table_content"); + } + } + + if($do_gzip_compress) + { + $Size = ob_get_length(); + $Crc = crc32(ob_get_contents()); + $contents = gzcompress(ob_get_contents()); + ob_end_clean(); + echo "\x1f\x8b\x08\x00\x00\x00\x00\x00".substr($contents, 0, strlen($contents) - 4).gzip_PrintFourChars($Crc).gzip_PrintFourChars($Size); + } + exit; + + break; + + case 'restore': + if(!isset($HTTP_POST_VARS['restore_start'])) + { + // + // Define Template files... + // + include('./page_header_admin.'.$phpEx); + + $template->set_filenames(array( + "body" => "admin/db_utils_restore_body.tpl") + ); + + $s_hidden_fields = "<input type=\"hidden\" name=\"perform\" value=\"restore\" /><input type=\"hidden\" name=\"perform\" value=\"$perform\" />"; + + $template->assign_vars(array( + "L_DATABASE_RESTORE" => $lang['Database_Utilities'] . " : " . $lang['Restore'], + "L_RESTORE_EXPLAIN" => $lang['Restore_explain'], + "L_SELECT_FILE" => $lang['Select_file'], + "L_START_RESTORE" => $lang['Start_Restore'], + + "S_DBUTILS_ACTION" => append_sid("admin_db_utilities.$phpEx"), + "S_HIDDEN_FIELDS" => $s_hidden_fields) + ); + $template->pparse("body"); + + break; + + } + else + { + // + // Handle the file upload .... + // If no file was uploaded report an error... + // + $backup_file_name = (!empty($HTTP_POST_FILES['backup_file']['name'])) ? $HTTP_POST_FILES['backup_file']['name'] : ""; + $backup_file_tmpname = ($HTTP_POST_FILES['backup_file']['tmp_name'] != "none") ? $HTTP_POST_FILES['backup_file']['tmp_name'] : ""; + $backup_file_type = (!empty($HTTP_POST_FILES['backup_file']['type'])) ? $HTTP_POST_FILES['backup_file']['type'] : ""; + + if($backup_file_tmpname == "" || $backup_file_name == "") + { + message_die(GENERAL_MESSAGE, $lang['Restore_Error_no_file']); + } + // + // If I file was actually uploaded, check to make sure that we + // are actually passed the name of an uploaded file, and not + // a hackers attempt at getting us to process a local system + // file. + // + if( file_exists(phpbb_realpath($backup_file_tmpname)) ) + { + if( preg_match("/^(text\/[a-zA-Z]+)|(application\/(x\-)?gzip(\-compressed)?)|(application\/octet-stream)$/is", $backup_file_type) ) + { + if( preg_match("/\.gz$/is",$backup_file_name) ) + { + $do_gzip_compress = FALSE; + $phpver = phpversion(); + if($phpver >= "4.0") + { + if(extension_loaded("zlib")) + { + $do_gzip_compress = TRUE; + } + } + + if($do_gzip_compress) + { + $gz_ptr = gzopen($backup_file_tmpname, 'rb'); + $sql_query = ""; + while( !gzeof($gz_ptr) ) + { + $sql_query .= gzgets($gz_ptr, 100000); + } + } + else + { + message_die(GENERAL_ERROR, $lang['Restore_Error_decompress']); + } + } + else + { + $sql_query = fread(fopen($backup_file_tmpname, 'r'), filesize($backup_file_tmpname)); + } + // + // Comment this line out to see if this fixes the stuff... + // + //$sql_query = stripslashes($sql_query); + } + else + { + message_die(GENERAL_ERROR, $lang['Restore_Error_filename'] ." $backup_file_type $backup_file_name"); + } + } + else + { + message_die(GENERAL_ERROR, $lang['Restore_Error_uploading']); + } + + if($sql_query != "") + { + // Strip out sql comments... + $sql_query = 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) and $sql[0] != "#") + { + if(VERBOSE == 1) + { + echo "Executing: $sql\n<br>"; + flush(); + } + + $result = $db->sql_query($sql); + + if(!$result && ( !(SQL_LAYER == 'postgresql' && eregi("drop table", $sql) ) ) ) + { + message_die(GENERAL_ERROR, "Error importing backup file", "", __LINE__, __FILE__, $sql); + } + } + } + } + + include('./page_header_admin.'.$phpEx); + + $template->set_filenames(array( + "body" => "admin/admin_message_body.tpl") + ); + + $message = $lang['Restore_success']; + + $template->assign_vars(array( + "MESSAGE_TITLE" => $lang['Database_Utilities'] . " : " . $lang['Restore'], + "MESSAGE_TEXT" => $message) + ); + + $template->pparse("body"); + break; + } + break; + } +} + +include('./page_footer_admin.'.$phpEx); + +?> Added: main/trunk/admin/admin_disallow.php =================================================================== --- main/trunk/admin/admin_disallow.php (rev 0) +++ main/trunk/admin/admin_disallow.php 2006-12-24 00:31:58 UTC (rev 277) @@ -0,0 +1,146 @@ +<?php +/*************************************************************************** + * admin_disallow.php + * ------------------- + * begin : Tuesday, Oct 05, 2001 + * copyright : (C) 2001 The phpBB Group + * email : su...@ph... + * + * $Id: admin_disallow.php,v 1.9.2.4 2005/12/18 13:57:50 grahamje Exp $ + * + * + ***************************************************************************/ + +/*************************************************************************** + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + ****************************************************... [truncated message content] |
From: <teh...@us...> - 2006-12-24 00:15:12
|
Revision: 276 http://svn.sourceforge.net/phpbbreloaded/?rev=276&view=rev Author: tehphpmaster Date: 2006-12-23 16:15:13 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Commiting the new svn repo layout Added Paths: ----------- converters/ converters/branches/ converters/etc/ converters/tags/ converters/trunk/ main/ main/branches/ main/etc/ main/tags/ main/trunk/ styles/ styles/branches/ styles/etc/ styles/tags/ styles/trunk/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <teh...@us...> - 2006-12-24 00:08:22
|
Revision: 275 http://svn.sourceforge.net/phpbbreloaded/?rev=275&view=rev Author: tehphpmaster Date: 2006-12-23 16:08:22 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Cleaning up the svn repo Removed Paths: ------------- phpBB Reloaded 2/ phpBB Reloaded Styles/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <teh...@us...> - 2006-10-26 02:34:32
|
Revision: 274 http://svn.sourceforge.net/phpbbreloaded/?rev=274&view=rev Author: tehphpmaster Date: 2006-10-25 19:34:22 -0700 (Wed, 25 Oct 2006) Log Message: ----------- Removing files that are no longer needed. Removed Paths: ------------- phpBB Reloaded 2/templates/subC1/_sav_index_body.tpl phpBB Reloaded 2/templates/subC1/_sav_modcp_body.tpl phpBB Reloaded 2/templates/subC1/_sav_posting_body.tpl phpBB Reloaded 2/templates/subC1/_sav_profile_add_body.tpl phpBB Reloaded 2/templates/subC1/_sav_search_results_topics.tpl phpBB Reloaded 2/templates/subC1/_sav_viewforum_body.tpl phpBB Reloaded 2/templates/subC1/_sav_viewtopic_body.tpl phpBB Reloaded 2/templates/subC1/admin/_sav_auth_forum_body.tpl phpBB Reloaded 2/templates/subC1/admin/_sav_auth_select_body.tpl phpBB Reloaded 2/templates/subC1/admin/_sav_auth_ug_body.tpl phpBB Reloaded 2/templates/subC1/admin/_sav_category_edit_body.tpl phpBB Reloaded 2/templates/subC1/admin/_sav_forum_admin_body.tpl phpBB Reloaded 2/templates/subC1/admin/_sav_forum_delete_body.tpl phpBB Reloaded 2/templates/subC1/admin/_sav_forum_edit_body.tpl phpBB Reloaded 2/templates/subC1/admin/_sav_forum_prune_body.tpl phpBB Reloaded 2/templates/subC1/admin/_sav_forum_prune_result_body.tpl phpBB Reloaded 2/templates/subC1/admin/_sav_forum_prune_select_body.tpl Deleted: phpBB Reloaded 2/templates/subC1/_sav_index_body.tpl =================================================================== --- phpBB Reloaded 2/templates/subC1/_sav_index_body.tpl 2006-10-26 02:31:27 UTC (rev 273) +++ phpBB Reloaded 2/templates/subC1/_sav_index_body.tpl 2006-10-26 02:34:22 UTC (rev 274) @@ -1,109 +0,0 @@ -<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center"> - <tr> - <td align="left" valign="bottom"><span class="gensmall"> - <!-- BEGIN switch_user_logged_in --> - {LAST_VISIT_DATE}<br /> - <!-- END switch_user_logged_in --> - {CURRENT_TIME}<br /></span><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td> - <td align="right" valign="bottom" class="gensmall"> - <!-- BEGIN switch_user_logged_in --> - <a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br /> - <!-- END switch_user_logged_in --> - <a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td> - </tr> -</table> - -<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> - <tr> - <th colspan="2" class="thCornerL" height="25" nowrap="nowrap"> {L_FORUM} </th> - <th width="50" class="thTop" nowrap="nowrap"> {L_TOPICS} </th> - <th width="50" class="thTop" nowrap="nowrap"> {L_POSTS} </th> - <th class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th> - </tr> - <!-- BEGIN catrow --> - <tr> - <td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td> - <td class="rowpic" colspan="3" align="right"> </td> - </tr> - <!-- BEGIN forumrow --> - <tr> - <td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td> - <td class="row1" width="100%" height="50"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br /> - </span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br /> - </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td> - <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td> - <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td> - <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td> - </tr> - <!-- END forumrow --> - <!-- END catrow --> -</table> - -<table width="100%" cellspacing="0" border="0" align="center" cellpadding="2"> - <tr> - <td align="left"> - <!-- BEGIN switch_user_logged_in --> - <span class="gensmall"><a href="{U_MARK_READ}" class="gensmall">{L_MARK_FORUMS_READ}</a></span> - <!-- END switch_user_logged_in --> - </td> - <td align="right"><span class="gensmall">{S_TIMEZONE}</span></td> - </tr> -</table> - -<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline"> - <tr> - <td class="catHead" colspan="2" height="28"><span class="cattitle"><a href="{U_VIEWONLINE}" class="cattitle">{L_WHO_IS_ONLINE}</a></span></td> - </tr> - <tr> - <td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subC1/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td> - <td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span> - </td> - </tr> - <tr> - <td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} [ {L_WHOSONLINE_ADMIN} ] [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td> - </tr> -</table> - -<table width="100%" cellpadding="1" cellspacing="1" border="0"> -<tr> - <td align="left" valign="top"><span class="gensmall">{L_ONLINE_EXPLAIN}</span></td> -</tr> -</table> - -<!-- BEGIN switch_user_logged_out --> -<form method="post" action="{S_LOGIN_ACTION}"> - <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline"> - <tr> - <td class="catHead" height="28"><a name="login"></a><span class="cattitle">{L_LOGIN_LOGOUT}</span></td> - </tr> - <tr> - <td class="row1" align="center" valign="middle" height="28"><span class="gensmall">{L_USERNAME}: - <input class="post" type="text" name="username" size="10" /> - {L_PASSWORD}: - <input class="post" type="password" name="password" size="10" maxlength="32" /> - <!-- BEGIN switch_allow_autologin --> - {L_AUTO_LOGIN} - <input class="text" type="checkbox" name="autologin" /> - <!-- END switch_allow_autologin --> - - <input type="submit" class="mainoption" name="login" value="{L_LOGIN}" /> - </span> </td> - </tr> - </table> -</form> -<!-- END switch_user_logged_out --> - -<br clear="all" /> - -<table cellspacing="3" border="0" align="center" cellpadding="0"> - <tr> - <td width="20" align="center"><img src="templates/subC1/images/folder_new_big.gif" alt="{L_NEW_POSTS}"/></td> - <td><span class="gensmall">{L_NEW_POSTS}</span></td> - <td> </td> - <td width="20" align="center"><img src="templates/subC1/images/folder_big.gif" alt="{L_NO_NEW_POSTS}" /></td> - <td><span class="gensmall">{L_NO_NEW_POSTS}</span></td> - <td> </td> - <td width="20" align="center"><img src="templates/subC1/images/folder_locked_big.gif" alt="{L_FORUM_LOCKED}" /></td> - <td><span class="gensmall">{L_FORUM_LOCKED}</span></td> - </tr> -</table> Deleted: phpBB Reloaded 2/templates/subC1/_sav_modcp_body.tpl =================================================================== --- phpBB Reloaded 2/templates/subC1/_sav_modcp_body.tpl 2006-10-26 02:31:27 UTC (rev 273) +++ phpBB Reloaded 2/templates/subC1/_sav_modcp_body.tpl 2006-10-26 02:34:22 UTC (rev 274) @@ -1,58 +0,0 @@ - -<form method="post" action="{S_MODCP_ACTION}"> -<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> - <tr> - <td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a> -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td> - </tr> -</table> - - <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> - <tr> - <td class="catHead" colspan="5" align="center" height="28"><span class="cattitle">{L_MOD_CP}</span> - </td> - </tr> - <tr> - <td class="spaceRow" colspan="5" align="center"><span class="gensmall">{L_MOD_CP_EXPLAIN}</span></td> - </tr> - <tr> - <th width="4%" class="thLeft" nowrap="nowrap"> </th> - <th nowrap="nowrap"> {L_TOPICS} </th> - <th width="8%" nowrap="nowrap"> {L_REPLIES} </th> - <th width="17%" nowrap="nowrap"> {L_LASTPOST} </th> - <th width="5%" class="thRight" nowrap="nowrap"> {L_SELECT} </th> - </tr> - <!-- BEGIN topicrow --> - <tr> - <td class="row1" align="center" valign="middle"><img src="{topicrow.TOPIC_FOLDER_IMG}" width="19" height="18" alt="{topicrow.L_TOPIC_FOLDER_ALT}" title="{topicrow.L_TOPIC_FOLDER_ALT}" /></td> - <td class="row1"> <span class="topictitle">{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span></td> - <td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.REPLIES}</span></td> - <td class="row1" align="center" valign="middle"><span class="postdetails">{topicrow.LAST_POST_TIME}</span></td> - <td class="row2" align="center" valign="middle"> - <input type="checkbox" name="topic_id_list[]" value="{topicrow.TOPIC_ID}" /> - </td> - </tr> - <!-- END topicrow --> - <tr align="right"> - <td class="catBottom" colspan="5" height="29"> {S_HIDDEN_FIELDS} - <input type="submit" name="delete" class="liteoption" value="{L_DELETE}" /> - - <input type="submit" name="move" class="liteoption" value="{L_MOVE}" /> - - <input type="submit" name="lock" class="liteoption" value="{L_LOCK}" /> - - <input type="submit" name="unlock" class="liteoption" value="{L_UNLOCK}" /> - </td> - </tr> - </table> - <table width="100%" cellspacing="2" border="0" align="center" cellpadding="2"> - <tr> - <td align="left" valign="middle"><span class="nav">{PAGE_NUMBER}</b></span></td> - <td align="right" valign="top" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td> - </tr> -</table> -</form> -<table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td align="right">{JUMPBOX}</td> - </tr> -</table> Deleted: phpBB Reloaded 2/templates/subC1/_sav_posting_body.tpl =================================================================== --- phpBB Reloaded 2/templates/subC1/_sav_posting_body.tpl 2006-10-26 02:31:27 UTC (rev 273) +++ phpBB Reloaded 2/templates/subC1/_sav_posting_body.tpl 2006-10-26 02:34:22 UTC (rev 274) @@ -1,481 +0,0 @@ -<script language="JavaScript" type="text/javascript"> -<!-- -// bbCode control by -// subBlue design -// www.subBlue.com - -// 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_moz = 0; - -var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1)); -var is_mac = (clientPC.indexOf("mac")!=-1); - -// Helpline messages -b_help = "{L_BBCODE_B_HELP}"; -i_help = "{L_BBCODE_I_HELP}"; -u_help = "{L_BBCODE_U_HELP}"; -q_help = "{L_BBCODE_Q_HELP}"; -c_help = "{L_BBCODE_C_HELP}"; -l_help = "{L_BBCODE_L_HELP}"; -o_help = "{L_BBCODE_O_HELP}"; -p_help = "{L_BBCODE_P_HELP}"; -w_help = "{L_BBCODE_W_HELP}"; -a_help = "{L_BBCODE_A_HELP}"; -s_help = "{L_BBCODE_S_HELP}"; -f_help = "{L_BBCODE_F_HELP}"; - -// 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; - -// Shows the help messages in the helpline window -function helpline(help) { - document.post.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 checkForm() { - - formErrors = false; - - if (document.post.message.value.length < 2) { - formErrors = "{L_EMPTY_MESSAGE}"; - } - - if (formErrors) { - alert(formErrors); - return false; - } else { - bbstyle(-1); - //formObj.preview.disabled = true; - //formObj.submit.disabled = true; - return true; - } -} - -function emoticon(text) { - var txtarea = document.post.message; - text = ' ' + text + ' '; - if (txtarea.createTextRange && txtarea.caretPos) { - var caretPos = txtarea.caretPos; - caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text; - txtarea.focus(); - } else { - txtarea.value += text; - txtarea.focus(); - } -} - -function bbfontstyle(bbopen, bbclose) { - var txtarea = document.post.message; - - if ((clientVer >= 4) && is_ie && is_win) { - theSelection = document.selection.createRange().text; - if (!theSelection) { - txtarea.value += bbopen + bbclose; - txtarea.focus(); - return; - } - document.selection.createRange().text = bbopen + theSelection + bbclose; - txtarea.focus(); - return; - } - else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0)) - { - mozWrap(txtarea, bbopen, bbclose); - return; - } - else - { - txtarea.value += bbopen + bbclose; - txtarea.focus(); - } - storeCaret(txtarea); -} - - -function bbstyle(bbnumber) { - var txtarea = document.post.message; - - txtarea.focus(); - donotinsert = false; - theSelection = false; - bblast = 0; - - if (bbnumber == -1) { // Close all open tags & default button names - while (bbcode[0]) { - butnumber = arraypop(bbcode) - 1; - txtarea.value += bbtags[butnumber + 1]; - buttext = eval('document.post.addbbcode' + butnumber + '.value'); - eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); - } - imageTag = false; // All tags are closed including image tags :D - txtarea.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]; - txtarea.focus(); - theSelection = ''; - return; - } - } - else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0)) - { - mozWrap(txtarea, bbtags[bbnumber], bbtags[bbnumber+1]); - 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 (donotinsert) { // Close all open tags up to the one just clicked & default button names - while (bbcode[bblast]) { - butnumber = arraypop(bbcode) - 1; - txtarea.value += bbtags[butnumber + 1]; - buttext = eval('document.post.addbbcode' + butnumber + '.value'); - eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); - imageTag = false; - } - txtarea.focus(); - return; - } else { // Open tags - - if (imageTag && (bbnumber != 14)) { // Close image tag before adding another - txtarea.value += bbtags[15]; - lastValue = arraypop(bbcode) - 1; // Remove the close image tag from the list - document.post.addbbcode14.value = "Img"; // Return button back to normal state - imageTag = false; - } - - // Open tag - txtarea.value += bbtags[bbnumber]; - if ((bbnumber == 14) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag - arraypush(bbcode,bbnumber+1); - eval('document.post.addbbcode'+bbnumber+'.value += "*"'); - txtarea.focus(); - return; - } - storeCaret(txtarea); -} - -// 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(); -} - -//--> -</script> - -<!-- BEGIN privmsg_extensions --> -<table border="0" cellspacing="0" cellpadding="0" align="center" width="100%"> - <tr> - <td valign="top" align="center" width="100%"> - <table height="40" cellspacing="2" cellpadding="2" border="0"> - <tr valign="middle"> - <td>{INBOX_IMG}</td> - <td><span class="cattitle">{INBOX_LINK} </span></td> - <td>{SENTBOX_IMG}</td> - <td><span class="cattitle">{SENTBOX_LINK} </span></td> - <td>{OUTBOX_IMG}</td> - <td><span class="cattitle">{OUTBOX_LINK} </span></td> - <td>{SAVEBOX_IMG}</td> - <td><span class="cattitle">{SAVEBOX_LINK} </span></td> - </tr> - </table> - </td> - </tr> -</table> - -<br clear="all" /> -<!-- END privmsg_extensions --> - -<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)"> - -{POST_PREVIEW_BOX} -{ERROR_BOX} - -<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> - <tr> - <td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a> - <!-- BEGIN switch_not_privmsg --> - -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td> - <!-- END switch_not_privmsg --> - </tr> -</table> - -<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline"> - <tr> - <th class="thHead" colspan="2" height="25"><b>{L_POST_A}</b></th> - </tr> - <!-- BEGIN switch_username_select --> - <tr> - <td class="row1"><span class="gen"><b>{L_USERNAME}</b></span></td> - <td class="row2"><span class="genmed"><input type="text" class="post" tabindex="1" name="username" size="25" maxlength="25" value="{USERNAME}" /></span></td> - </tr> - <!-- END switch_username_select --> - <!-- BEGIN switch_privmsg --> - <tr> - <td class="row1"><span class="gen"><b>{L_USERNAME}</b></span></td> - <td class="row2"><span class="genmed"><input type="text" class="post" name="username" maxlength="25" size="25" tabindex="1" value="{USERNAME}" /> <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></span></td> - </tr> - <!-- END switch_privmsg --> - <tr> - <td class="row1" width="22%"><span class="gen"><b>{L_SUBJECT}</b></span></td> - <td class="row2" width="78%"> <span class="gen"> - <input type="text" name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{SUBJECT}" /> - </span> </td> - </tr> - <tr> - <td class="row1" valign="top"> - <table width="100%" border="0" cellspacing="0" cellpadding="1"> - <tr> - <td><span class="gen"><b>{L_MESSAGE_BODY}</b></span> </td> - </tr> - <tr> - <td valign="middle" align="center"> <br /> - <table width="100" border="0" cellspacing="0" cellpadding="5"> - <tr align="center"> - <td colspan="{S_SMILIES_COLSPAN}" class="gensmall"><b>{L_EMOTICONS}</b></td> - </tr> - <!-- BEGIN smilies_row --> - <tr align="center" valign="middle"> - <!-- BEGIN smilies_col --> - <td><a href="javascript:emoticon('{smilies_row.smilies_col.SMILEY_CODE}')"><img src="{smilies_row.smilies_col.SMILEY_IMG}" border="0" alt="{smilies_row.smilies_col.SMILEY_DESC}" title="{smilies_row.smilies_col.SMILEY_DESC}" /></a></td> - <!-- END smilies_col --> - </tr> - <!-- END smilies_row --> - <!-- BEGIN switch_smilies_extra --> - <tr align="center"> - <td colspan="{S_SMILIES_COLSPAN}"><span class="nav"><a href="{U_MORE_SMILIES}" onclick="window.open('{U_MORE_SMILIES}', '_phpbbsmilies', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=250');return false;" target="_phpbbsmilies" class="nav">{L_MORE_SMILIES}</a></span></td> - </tr> - <!-- END switch_smilies_extra --> - </table> - </td> - </tr> - </table> - </td> - <td class="row2" valign="top"><span class="gen"> <span class="genmed"> </span> - <table width="450" border="0" cellspacing="0" cellpadding="2"> - <tr align="center" valign="middle"> - <td><span class="genmed"> - <input type="button" class="button" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onClick="bbstyle(0)" onMouseOver="helpline('b')" /> - </span></td> - <td><span class="genmed"> - <input type="button" class="button" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onClick="bbstyle(2)" onMouseOver="helpline('i')" /> - </span></td> - <td><span class="genmed"> - <input type="button" class="button" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onClick="bbstyle(4)" onMouseOver="helpline('u')" /> - </span></td> - <td><span class="genmed"> - <input type="button" class="button" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onClick="bbstyle(6)" onMouseOver="helpline('q')" /> - </span></td> - <td><span class="genmed"> - <input type="button" class="button" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onClick="bbstyle(8)" onMouseOver="helpline('c')" /> - </span></td> - <td><span class="genmed"> - <input type="button" class="button" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onClick="bbstyle(10)" onMouseOver="helpline('l')" /> - </span></td> - <td><span class="genmed"> - <input type="button" class="button" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onClick="bbstyle(12)" onMouseOver="helpline('o')" /> - </span></td> - <td><span class="genmed"> - <input type="button" class="button" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onClick="bbstyle(14)" onMouseOver="helpline('p')" /> - </span></td> - <td><span class="genmed"> - <input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" /> - </span></td> - </tr> - <tr> - <td colspan="9"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td><span class="genmed"> {L_FONT_COLOR}: - <select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')"> - <option style="color:black; background-color: {T_TD_COLOR1}" value="{T_FONTCOLOR1}" class="genmed">{L_COLOR_DEFAULT}</option> - <option style="color:darkred; background-color: {T_TD_COLOR1}" value="darkred" class="genmed">{L_COLOR_DARK_RED}</option> - <option style="color:red; background-color: {T_TD_COLOR1}" value="red" class="genmed">{L_COLOR_RED}</option> - <option style="color:orange; background-color: {T_TD_COLOR1}" value="orange" class="genmed">{L_COLOR_ORANGE}</option> - <option style="color:brown; background-color: {T_TD_COLOR1}" value="brown" class="genmed">{L_COLOR_BROWN}</option> - <option style="color:yellow; background-color: {T_TD_COLOR1}" value="yellow" class="genmed">{L_COLOR_YELLOW}</option> - <option style="color:green; background-color: {T_TD_COLOR1}" value="green" class="genmed">{L_COLOR_GREEN}</option> - <option style="color:olive; background-color: {T_TD_COLOR1}" value="olive" class="genmed">{L_COLOR_OLIVE}</option> - <option style="color:cyan; background-color: {T_TD_COLOR1}" value="cyan" class="genmed">{L_COLOR_CYAN}</option> - <option style="color:blue; background-color: {T_TD_COLOR1}" value="blue" class="genmed">{L_COLOR_BLUE}</option> - <option style="color:darkblue; background-color: {T_TD_COLOR1}" value="darkblue" class="genmed">{L_COLOR_DARK_BLUE}</option> - <option style="color:indigo; background-color: {T_TD_COLOR1}" value="indigo" class="genmed">{L_COLOR_INDIGO}</option> - <option style="color:violet; background-color: {T_TD_COLOR1}" value="violet" class="genmed">{L_COLOR_VIOLET}</option> - <option style="color:white; background-color: {T_TD_COLOR1}" value="white" class="genmed">{L_COLOR_WHITE}</option> - <option style="color:black; background-color: {T_TD_COLOR1}" value="black" class="genmed">{L_COLOR_BLACK}</option> - </select> {L_FONT_SIZE}:<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')"> - <option value="7" class="genmed">{L_FONT_TINY}</option> - <option value="9" class="genmed">{L_FONT_SMALL}</option> - <option value="12" selected class="genmed">{L_FONT_NORMAL}</option> - <option value="18" class="genmed">{L_FONT_LARGE}</option> - <option value="24" class="genmed">{L_FONT_HUGE}</option> - </select> - </span></td> - <td nowrap="nowrap" align="right"><span class="gensmall"><a href="javascript:bbstyle(-1)" class="genmed" onMouseOver="helpline('a')">{L_BBCODE_CLOSE_TAGS}</a></span></td> - </tr> - </table> - </td> - </tr> - <tr> - <td colspan="9"> <span class="gensmall"> - <input type="text" name="helpbox" size="45" maxlength="100" style="width:450px; font-size:10px" class="helpline" value="{L_STYLES_TIP}" /> - </span></td> - </tr> - <tr> - <td colspan="9"><span class="gen"> - <textarea name="message" rows="15" cols="35" wrap="virtual" style="width:450px" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{MESSAGE}</textarea> - </span></td> - </tr> - </table> - </span></td> - </tr> - <tr> - <td class="row1" valign="top"><span class="gen"><b>{L_OPTIONS}</b></span><br /><span class="gensmall">{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}</span></td> - <td class="row2"><span class="gen"> </span> - <table cellspacing="0" cellpadding="1" border="0"> - <!-- BEGIN switch_html_checkbox --> - <tr> - <td> - <input type="checkbox" name="disable_html" {S_HTML_CHECKED} /> - </td> - <td><span class="gen">{L_DISABLE_HTML}</span></td> - </tr> - <!-- END switch_html_checkbox --> - <!-- BEGIN switch_bbcode_checkbox --> - <tr> - <td> - <input type="checkbox" name="disable_bbcode" {S_BBCODE_CHECKED} /> - </td> - <td><span class="gen">{L_DISABLE_BBCODE}</span></td> - </tr> - <!-- END switch_bbcode_checkbox --> - <!-- BEGIN switch_smilies_checkbox --> - <tr> - <td> - <input type="checkbox" name="disable_smilies" {S_SMILIES_CHECKED} /> - </td> - <td><span class="gen">{L_DISABLE_SMILIES}</span></td> - </tr> - <!-- END switch_smilies_checkbox --> - <!-- BEGIN switch_signature_checkbox --> - <tr> - <td> - <input type="checkbox" name="attach_sig" {S_SIGNATURE_CHECKED} /> - </td> - <td><span class="gen">{L_ATTACH_SIGNATURE}</span></td> - </tr> - <!-- END switch_signature_checkbox --> - <!-- BEGIN switch_notify_checkbox --> - <tr> - <td> - <input type="checkbox" name="notify" {S_NOTIFY_CHECKED} /> - </td> - <td><span class="gen">{L_NOTIFY_ON_REPLY}</span></td> - </tr> - <!-- END switch_notify_checkbox --> - <!-- BEGIN switch_delete_checkbox --> - <tr> - <td> - <input type="checkbox" name="delete" /> - </td> - <td><span class="gen">{L_DELETE_POST}</span></td> - </tr> - <!-- END switch_delete_checkbox --> - <!-- BEGIN switch_type_toggle --> - <tr> - <td></td> - <td><span class="gen">{S_TYPE_TOGGLE}</span></td> - </tr> - <!-- END switch_type_toggle --> - </table> - </td> - </tr> - {POLLBOX} - <tr> - <td class="catBottom" colspan="2" align="center" height="28"> {S_HIDDEN_FORM_FIELDS}<input type="submit" tabindex="5" name="preview" class="mainoption" value="{L_PREVIEW}" /> <input type="submit" accesskey="s" tabindex="6" name="post" class="mainoption" value="{L_SUBMIT}" /></td> - </tr> - </table> - - <table width="100%" cellspacing="2" border="0" align="center" cellpadding="2"> - <tr> - <td align="right" valign="top"><span class="gensmall">{S_TIMEZONE}</span></td> - </tr> - </table> -</form> - -<table width="100%" cellspacing="2" border="0" align="center"> - <tr> - <td valign="top" align="right">{JUMPBOX}</td> - </tr> -</table> - -{TOPIC_REVIEW_BOX} Deleted: phpBB Reloaded 2/templates/subC1/_sav_profile_add_body.tpl =================================================================== --- phpBB Reloaded 2/templates/subC1/_sav_profile_add_body.tpl 2006-10-26 02:31:27 UTC (rev 273) +++ phpBB Reloaded 2/templates/subC1/_sav_profile_add_body.tpl 2006-10-26 02:34:22 UTC (rev 274) @@ -1,274 +0,0 @@ - -<form action="{S_PROFILE_ACTION}" {S_FORM_ENCTYPE} method="post"> - -{ERROR_BOX} - -<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> - <tr> - <td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td> - </tr> -</table> - -<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline"> - <tr> - <th class="thHead" colspan="2" height="25" valign="middle">{L_REGISTRATION_INFO}</th> - </tr> - <tr> - <td class="row2" colspan="2"><span class="gensmall">{L_ITEMS_REQUIRED}</span></td> - </tr> - <!-- BEGIN switch_namechange_disallowed --> - <tr> - <td class="row1" width="38%"><span class="gen">{L_USERNAME}: *</span></td> - <td class="row2"><input type="hidden" name="username" value="{USERNAME}" /><span class="gen"><b>{USERNAME}</b></span></td> - </tr> - <!-- END switch_namechange_disallowed --> - <!-- BEGIN switch_namechange_allowed --> - <tr> - <td class="row1" width="38%"><span class="gen">{L_USERNAME}: *</span></td> - <td class="row2"><input type="text" class="post" style="width:200px" name="username" size="25" maxlength="25" value="{USERNAME}" /></td> - </tr> - <!-- END switch_namechange_allowed --> - <tr> - <td class="row1"><span class="gen">{L_EMAIL_ADDRESS}: *</span></td> - <td class="row2"><input type="text" class="post" style="width:200px" name="email" size="25" maxlength="255" value="{EMAIL}" /></td> - </tr> - <!-- BEGIN switch_edit_profile --> - <tr> - <td class="row1"><span class="gen">{L_CURRENT_PASSWORD}: *</span><br /> - <span class="gensmall">{L_CONFIRM_PASSWORD_EXPLAIN}</span></td> - <td class="row2"> - <input type="password" class="post" style="width: 200px" name="cur_password" size="25" maxlength="32" value="{CUR_PASSWORD}" /> - </td> - </tr> - <!-- END switch_edit_profile --> - <tr> - <td class="row1"><span class="gen">{L_NEW_PASSWORD}: *</span><br /> - <span class="gensmall">{L_PASSWORD_IF_CHANGED}</span></td> - <td class="row2"> - <input type="password" class="post" style="width: 200px" name="new_password" size="25" maxlength="32" value="{NEW_PASSWORD}" /> - </td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_CONFIRM_PASSWORD}: * </span><br /> - <span class="gensmall">{L_PASSWORD_CONFIRM_IF_CHANGED}</span></td> - <td class="row2"> - <input type="password" class="post" style="width: 200px" name="password_confirm" size="25" maxlength="32" value="{PASSWORD_CONFIRM}" /> - </td> - </tr> - <!-- Visual Confirmation --> - <!-- BEGIN switch_confirm --> - <tr> - <td class="row1" colspan="2" align="center"><span class="gensmall">{L_CONFIRM_CODE_IMPAIRED}</span><br /><br />{CONFIRM_IMG}<br /><br /></td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_CONFIRM_CODE}: * </span><br /><span class="gensmall">{L_CONFIRM_CODE_EXPLAIN}</span></td> - <td class="row2"><input type="text" class="post" style="width: 200px" name="confirm_code" size="6" maxlength="6" value="" /></td> - </tr> - <!-- END switch_confirm --> - <tr> - <td class="catSides" colspan="2" height="28"> </td> - </tr> - <tr> - <th class="thSides" colspan="2" height="25" valign="middle">{L_PROFILE_INFO}</th> - </tr> - <tr> - <td class="row2" colspan="2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_ICQ_NUMBER}:</span></td> - <td class="row2"> - <input type="text" name="icq" class="post" style="width: 100px" size="10" maxlength="15" value="{ICQ}" /> - </td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_AIM}:</span></td> - <td class="row2"> - <input type="text" class="post" style="width: 150px" name="aim" size="20" maxlength="255" value="{AIM}" /> - </td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_MESSENGER}:</span></td> - <td class="row2"> - <input type="text" class="post" style="width: 150px" name="msn" size="20" maxlength="255" value="{MSN}" /> - </td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_YAHOO}:</span></td> - <td class="row2"> - <input type="text" class="post" style="width: 150px" name="yim" size="20" maxlength="255" value="{YIM}" /> - </td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_WEBSITE}:</span></td> - <td class="row2"> - <input type="text" class="post" style="width: 200px" name="website" size="25" maxlength="255" value="{WEBSITE}" /> - </td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_LOCATION}:</span></td> - <td class="row2"> - <input type="text" class="post" style="width: 200px" name="location" size="25" maxlength="100" value="{LOCATION}" /> - </td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_OCCUPATION}:</span></td> - <td class="row2"> - <input type="text" class="post" style="width: 200px" name="occupation" size="25" maxlength="100" value="{OCCUPATION}" /> - </td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_INTERESTS}:</span></td> - <td class="row2"> - <input type="text" class="post" style="width: 200px" name="interests" size="35" maxlength="150" value="{INTERESTS}" /> - </td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_SIGNATURE}:</span><br /><span class="gensmall">{L_SIGNATURE_EXPLAIN}<br /><br />{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}</span></td> - <td class="row2"> - <textarea name="signature" style="width: 300px" rows="6" cols="30" class="post">{SIGNATURE}</textarea> - </td> - </tr> - <tr> - <td class="catSides" colspan="2" height="28"> </td> - </tr> - <tr> - <th class="thSides" colspan="2" height="25" valign="middle">{L_PREFERENCES}</th> - </tr> - <tr> - <td class="row1"><span class="gen">{L_PUBLIC_VIEW_EMAIL}:</span></td> - <td class="row2"> - <input type="radio" name="viewemail" value="1" {VIEW_EMAIL_YES} /> - <span class="gen">{L_YES}</span> - <input type="radio" name="viewemail" value="0" {VIEW_EMAIL_NO} /> - <span class="gen">{L_NO}</span></td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_HIDE_USER}:</span></td> - <td class="row2"> - <input type="radio" name="hideonline" value="1" {HIDE_USER_YES} /> - <span class="gen">{L_YES}</span> - <input type="radio" name="hideonline" value="0" {HIDE_USER_NO} /> - <span class="gen">{L_NO}</span></td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_NOTIFY_ON_REPLY}:</span><br /> - <span class="gensmall">{L_NOTIFY_ON_REPLY_EXPLAIN}</span></td> - <td class="row2"> - <input type="radio" name="notifyreply" value="1" {NOTIFY_REPLY_YES} /> - <span class="gen">{L_YES}</span> - <input type="radio" name="notifyreply" value="0" {NOTIFY_REPLY_NO} /> - <span class="gen">{L_NO}</span></td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_NOTIFY_ON_PRIVMSG}:</span></td> - <td class="row2"> - <input type="radio" name="notifypm" value="1" {NOTIFY_PM_YES} /> - <span class="gen">{L_YES}</span> - <input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO} /> - <span class="gen">{L_NO}</span></td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_POPUP_ON_PRIVMSG}:</span><br /><span class="gensmall">{L_POPUP_ON_PRIVMSG_EXPLAIN}</span></td> - <td class="row2"> - <input type="radio" name="popup_pm" value="1" {POPUP_PM_YES} /> - <span class="gen">{L_YES}</span> - <input type="radio" name="popup_pm" value="0" {POPUP_PM_NO} /> - <span class="gen">{L_NO}</span></td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_ALWAYS_ADD_SIGNATURE}:</span></td> - <td class="row2"> - <input type="radio" name="attachsig" value="1" {ALWAYS_ADD_SIGNATURE_YES} /> - <span class="gen">{L_YES}</span> - <input type="radio" name="attachsig" value="0" {ALWAYS_ADD_SIGNATURE_NO} /> - <span class="gen">{L_NO}</span></td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_ALWAYS_ALLOW_BBCODE}:</span></td> - <td class="row2"> - <input type="radio" name="allowbbcode" value="1" {ALWAYS_ALLOW_BBCODE_YES} /> - <span class="gen">{L_YES}</span> - <input type="radio" name="allowbbcode" value="0" {ALWAYS_ALLOW_BBCODE_NO} /> - <span class="gen">{L_NO}</span></td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_ALWAYS_ALLOW_HTML}:</span></td> - <td class="row2"> - <input type="radio" name="allowhtml" value="1" {ALWAYS_ALLOW_HTML_YES} /> - <span class="gen">{L_YES}</span> - <input type="radio" name="allowhtml" value="0" {ALWAYS_ALLOW_HTML_NO} /> - <span class="gen">{L_NO}</span></td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_ALWAYS_ALLOW_SMILIES}:</span></td> - <td class="row2"> - <input type="radio" name="allowsmilies" value="1" {ALWAYS_ALLOW_SMILIES_YES} /> - <span class="gen">{L_YES}</span> - <input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO} /> - <span class="gen">{L_NO}</span></td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_BOARD_LANGUAGE}:</span></td> - <td class="row2"><span class="gensmall">{LANGUAGE_SELECT}</span></td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_BOARD_STYLE}:</span></td> - <td class="row2"><span class="gensmall">{STYLE_SELECT}</span></td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_TIMEZONE}:</span></td> - <td class="row2"><span class="gensmall">{TIMEZONE_SELECT}</span></td> - </tr> - <tr> - <td class="row1"><span class="gen">{L_DATE_FORMAT}:</span><br /> - <span class="gensmall">{L_DATE_FORMAT_EXPLAIN}</span></td> - <td class="row2"> - <input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="14" class="post" /> - </td> - </tr> - <!-- BEGIN switch_avatar_block --> - <tr> - <td class="catSides" colspan="2" height="28"> </td> - </tr> - <tr> - <th class="thSides" colspan="2" height="12" valign="middle">{L_AVATAR_PANEL}</th> - </tr> - <tr> - <td class="row1" colspan="2"><table width="70%" cellspacing="2" cellpadding="0" border="0" align="center"> - <tr> - <td width="65%"><span class="gensmall">{L_AVATAR_EXPLAIN}</span></td> - <td align="center"><span class="gensmall">{L_CURRENT_IMAGE}</span><br />{AVATAR}<br /><input type="checkbox" name="avatardel" /> <span class="gensmall">{L_DELETE_AVATAR}</span></td> - </tr> - </table></td> - </tr> - <!-- BEGIN switch_avatar_local_upload --> - <tr> - <td class="row1"><span class="gen">{L_UPLOAD_AVATAR_FILE}:</span></td> - <td class="row2"><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" /><input type="file" name="avatar" class="post" style="width:200px" /></td> - </tr> - <!-- END switch_avatar_local_upload --> - <!-- BEGIN switch_avatar_remote_upload --> - <tr> - <td class="row1"><span class="gen">{L_UPLOAD_AVATAR_URL}:</span><br /><span class="gensmall">{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></td> - <td class="row2"><input type="text" name="avatarurl" size="40" class="post" style="width:200px" /></td> - </tr> - <!-- END switch_avatar_remote_upload --> - <!-- BEGIN switch_avatar_remote_link --> - <tr> - <td class="row1"><span class="gen">{L_LINK_REMOTE_AVATAR}:</span><br /><span class="gensmall">{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></td> - <td class="row2"><input type="text" name="avatarremoteurl" size="40" class="post" style="width:200px" /></td> - </tr> - <!-- END switch_avatar_remote_link --> - <!-- BEGIN switch_avatar_local_gallery --> - <tr> - <td class="row1"><span class="gen">{L_AVATAR_GALLERY}:</span></td> - <td class="row2"><input type="submit" name="avatargallery" value="{L_SHOW_GALLERY}" class="liteoption" /></td> - </tr> - <!-- END switch_avatar_local_gallery --> - <!-- END switch_avatar_block --> - <tr> - <td class="catBottom" colspan="2" align="center" height="28">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" /> <input type="reset" value="{L_RESET}" name="reset" class="liteoption" /></td> - </tr> -</table> - -</form> Deleted: phpBB Reloaded 2/templates/subC1/_sav_search_results_topics.tpl =================================================================== --- phpBB Reloaded 2/templates/subC1/_sav_search_results_topics.tpl 2006-10-26 02:31:27 UTC (rev 273) +++ phpBB Reloaded 2/templates/subC1/_sav_search_results_topics.tpl 2006-10-26 02:34:22 UTC (rev 274) @@ -1,51 +0,0 @@ - -<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> - <tr> - <td align="left" valign="bottom"><span class="maintitle">{L_SEARCH_MATCHES}</span><br /></td> - </tr> -</table> - -<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> - <tr> - <td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td> - </tr> -</table> - -<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> - <tr> - <th width="4%" height="25" class="thCornerL" nowrap="nowrap"> </th> - <th class="thTop" nowrap="nowrap"> {L_FORUM} </th> - <th class="thTop" nowrap="nowrap"> {L_TOPICS} </th> - <th class="thTop" nowrap="nowrap"> {L_AUTHOR} </th> - <th class="thTop" nowrap="nowrap"> {L_REPLIES} </th> - <th class="thTop" nowrap="nowrap"> {L_VIEWS} </th> - <th class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th> - </tr> - <!-- BEGIN searchresults --> - <tr> - <td class="row1" align="center" valign="middle"><img src="{searchresults.TOPIC_FOLDER_IMG}" width="19" height="18" alt="{searchresults.L_TOPIC_FOLDER_ALT}" title="{searchresults.L_TOPIC_FOLDER_ALT}" /></td> - <td class="row1"><span class="forumlink"><a href="{searchresults.U_VIEW_FORUM}" class="forumlink">{searchresults.FORUM_NAME}</a></span></td> - <td class="row2"><span class="topictitle">{searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span><br /><span class="gensmall">{searchresults.GOTO_PAGE}</span></td> - <td class="row1" align="center" valign="middle"><span class="name">{searchresults.TOPIC_AUTHOR}</span></td> - <td class="row2" align="center" valign="middle"><span class="postdetails">{searchresults.REPLIES}</span></td> - <td class="row1" align="center" valign="middle"><span class="postdetails">{searchresults.VIEWS}</span></td> - <td class="row2" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{searchresults.LAST_POST_TIME}<br />{searchresults.LAST_POST_AUTHOR} {searchresults.LAST_POST_IMG}</span></td> - </tr> - <!-- END searchresults --> - <tr> - <td class="catBottom" colspan="7" height="28" valign="middle"> </td> - </tr> -</table> - -<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2"> - <tr> - <td align="left" valign="top"><span class="nav">{PAGE_NUMBER}</span></td> - <td align="right" valign="top" nowrap="nowrap"><span class="nav">{PAGINATION}</span><br /><span class="gensmall">{S_TIMEZONE}</span></td> - </tr> -</table> - -<table width="100%" cellspacing="2" border="0" align="center"> - <tr> - <td valign="top" align="right">{JUMPBOX}</td> - </tr> -</table> Deleted: phpBB Reloaded 2/templates/subC1/_sav_viewforum_body.tpl =================================================================== --- phpBB Reloaded 2/templates/subC1/_sav_viewforum_body.tpl 2006-10-26 02:31:27 UTC (rev 273) +++ phpBB Reloaded 2/templates/subC1/_sav_viewforum_body.tpl 2006-10-26 02:34:22 UTC (rev 274) @@ -1,98 +0,0 @@ - -<form method="post" action="{S_POST_DAYS_ACTION}"> - <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> - <tr> - <td align="left" valign="bottom" colspan="2"><a class="maintitle" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><br /><span class="gensmall"><b>{L_MODERATOR}: {MODERATORS}<br /><br />{LOGGED_IN_USER_LIST}</b></span></td> - <td align="right" valign="bottom" nowrap="nowrap"><span class="gensmall"><b>{PAGINATION}</b></span></td> - </tr> - <tr> - <td align="left" valign="middle" width="50"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" /></a></td> - <td align="left" valign="middle" class="nav" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a> -> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td> - <td align="right" valign="bottom" class="nav" nowrap="nowrap"><span class="gensmall"><a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a></span></td> - </tr> - </table> - - <table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline"> - <tr> - <th colspan="2" align="center" height="25" class="thCornerL" nowrap="nowrap"> {L_TOPICS} </th> - <th width="50" align="center" class="thTop" nowrap="nowrap"> {L_REPLIES} </th> - <th width="100" align="center" class="thTop" nowrap="nowrap"> {L_AUTHOR} </th> - <th width="50" align="center" class="thTop" nowrap="nowrap"> {L_VIEWS} </th> - <th align="center" class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th> - </tr> - <!-- BEGIN topicrow --> - <tr> - <td class="row1" align="center" valign="middle" width="20"><img src="{topicrow.TOPIC_FOLDER_IMG}" width="19" height="18" alt="{topicrow.L_TOPIC_FOLDER_ALT}" title="{topicrow.L_TOPIC_FOLDER_ALT}" /></td> - <td class="row1" width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br /> - {topicrow.GOTO_PAGE}</span></td> - <td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.REPLIES}</span></td> - <td class="row3" align="center" valign="middle"><span class="name">{topicrow.TOPIC_AUTHOR}</span></td> - <td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.VIEWS}</span></td> - <td class="row3Right" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{topicrow.LAST_POST_TIME}<br />{topicrow.LAST_POST_AUTHOR} {topicrow.LAST_POST_IMG}</span></td> - </tr> - <!-- END topicrow --> - <!-- BEGIN switch_no_topics --> - <tr> - <td class="row1" colspan="6" height="30" align="center" valign="middle"><span class="gen">{L_NO_TOPICS}</span></td> - </tr> - <!-- END switch_no_topics --> - <tr> - <td class="catBottom" align="center" valign="middle" colspan="6" height="28"><span class="genmed">{L_DISPLAY_TOPICS}: {S_SELECT_TOPIC_DAYS} - <input type="submit" class="liteoption" value="{L_GO}" name="submit" /> - </span></td> - </tr> - </table> - - <table width="100%" cellspacing="2" border="0" align="center" cellpadding="2"> - <tr> - <td align="left" valign="middle" width="50"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" /></a></td> - <td align="left" valign="middle" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a> -> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td> - <td align="right" valign="middle" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span> - </td> - </tr> - <tr> - <td align="left" colspan="3"><span class="nav">{PAGE_NUMBER}</span></td> - </tr> - </table> -</form> - -<table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td align="right">{JUMPBOX}</td> - </tr> -</table> - -<table width="100%" cellspacing="0" border="0" align="center" cellpadding="0"> - <tr> - <td align="left" valign="top"><table cellspacing="3" cellpadding="0" border="0"> - <tr> - <td width="20" align="left"><img src="{FOLDER_NEW_IMG}" alt="{L_NEW_POSTS}" width="19" height="18" /></td> - <td class="gensmall">{L_NEW_POSTS}</td> - <td> </td> - <td width="20" align="center"><img src="{FOLDER_IMG}" alt="{L_NO_NEW_POSTS}" width="19" height="18" /></td> - <td class="gensmall">{L_NO_NEW_POSTS}</td> - <td> </td> - <td width="20" align="center"><img src="{FOLDER_ANNOUNCE_IMG}" alt="{L_ANNOUNCEMENT}" width="19" height="18" /></td> - <td class="gensmall">{L_ANNOUNCEMENT}</td> - </tr> - <tr> - <td width="20" align="center"><img src="{FOLDER_HOT_NEW_IMG}" alt="{L_NEW_POSTS_HOT}" width="19" height="18" /></td> - <td class="gensmall">{L_NEW_POSTS_HOT}</td> - <td> </td> - <td width="20" align="center"><img src="{FOLDER_HOT_IMG}" alt="{L_NO_NEW_POSTS_HOT}" width="19" height="18" /></td> - <td class="gensmall">{L_NO_NEW_POSTS_HOT}</td> - <td> </td> - <td width="20" align="center"><img src="{FOLDER_STICKY_IMG}" alt="{L_STICKY}" width="19" height="18" /></td> - <td class="gensmall">{L_STICKY}</td> - </tr> - <tr> - <td class="gensmall"><img src="{FOLDER_LOCKED_NEW_IMG}" alt="{L_NEW_POSTS_LOCKED}" width="19" height="18" /></td> - <td class="gensmall">{L_NEW_POSTS_LOCKED}</td> - <td> </td> - <td class="gensmall"><img src="{FOLDER_LOCKED_IMG}" alt="{L_NO_NEW_POSTS_LOCKED}" width="19" height="18" /></td> - <td class="gensmall">{L_NO_NEW_POSTS_LOCKED}</td> - </tr> - </table></td> - <td align="right"><span class="gensmall">{S_AUTH_LIST}</span></td> - </tr> -</table> Deleted: phpBB Reloaded 2/templates/subC1/_sav_viewtopic_body.tpl =================================================================== --- phpBB Reloaded 2/templates/subC1/_sav_viewtopic_body.tpl 2006-10-26 02:31:27 UTC (rev 273) +++ phpBB Reloaded 2/templates/subC1/_sav_viewtopic_body.tpl 2006-10-26 02:34:22 UTC (rev 274) @@ -1,91 +0,0 @@ - -<table width="100%" cellspacing="2" cellpadding="2" border="0"> - <tr> - <td align="left" valign="bottom" colspan="2"><a class="maintitle" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><br /> - <span class="gensmall"><b>{PAGINATION}</b><br /> - </span></td> - </tr> -</table> - -<table width="100%" cellspacing="2" cellpadding="2" border="0"> - <tr> - <td align="left" valign="bottom" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a> <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td> - <td align="left" valign="middle" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a> - -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td> - </tr> -</table> - -<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0"> - <tr align="right"> - <td class="catHead" colspan="2" height="28"><span class="nav"><a href="{U_VIEW_OLDER_TOPIC}" class="nav">{L_VIEW_PREVIOUS_TOPIC}</a> :: <a href="{U_VIEW_NEWER_TOPIC}" class="nav">{L_VIEW_NEXT_TOPIC}</a> </span></td> - </tr> - {POLL_DISPLAY} - <tr> - <th class="thLeft" width="150" height="26" nowrap="nowrap">{L_AUTHOR}</th> - <th class="thRight" nowrap="nowrap">{L_MESSAGE}</th> - </tr> - <!-- BEGIN postrow --> - <tr> - <td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br /></td> - <td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td width="100%"><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen"> </span> {L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td> - <td valign="top" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td> - </tr> - <tr> - <td colspan="2"><hr /></td> - </tr> - <tr> - <td colspan="2"><span class="postbody">{postrow.MESSAGE}{postrow.SIGNATURE}</span><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td> - </tr> - </table></td> - </tr> - <tr> - <td class="{postrow.ROW_CLASS}" width="150" align="left" valign="middle"><span class="nav"><a href="#top" class="nav">{L_BACK_TO_TOP}</a></span></td> - <td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="bottom" nowrap="nowrap"><table cellspacing="0" cellpadding="0" border="0" height="18" width="18"> - <tr> - <td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}<script language="JavaScript" type="text/javascript"><!-- - - if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 ) - document.write(' {postrow.ICQ_IMG}'); - else - document.write('</td><td> </td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">{postrow.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">{postrow.ICQ_STATUS_IMG}</div></div>'); - - //--></script><noscript>{postrow.ICQ_IMG}</noscript></td> - </tr> - </table></td> - </tr> - <tr> - <td class="spaceRow" colspan="2" height="1"><img src="templates/subC1/images/spacer.gif" alt="" width="1" height="1" /></td> - </tr> - <!-- END postrow --> - <tr align="center"> - <td class="catBottom" colspan="2" height="28"><table cellspacing="0" cellpadding="0" border="0"> - <tr><form method="post" action="{S_POST_DAYS_ACTION}"> - <td align="center"><span class="gensmall">{L_DISPLAY_POSTS}: {S_SELECT_POST_DAYS} {S_SELECT_POST_ORDER} <input type="submit" value="{L_GO}" class="liteoption" name="submit" /></span></td> - </form></tr> - </table></td> - </tr> -</table> - -<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> - <tr> - <td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a> <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td> - <td align="left" valign="middle" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a> - -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td> - <td align="right" valign="top" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span> - </td> - </tr> - <tr> - <td align="left" colspan="3"><span class="nav">{PAGE_NUMBER}</span></td> - </tr> -</table> - -<table width="100%" cellspacing="2" border="0" align="center"> - <tr> - <td width="40%" valign="top" nowrap="nowrap" align="left"><span class="gensmall">{S_WATCH_TOPIC}</span><br /> - <br /> - {S_TOPIC_ADMIN}</td> - <td align="right" valign="top" nowrap="nowrap">{JUMPBOX}<span class="gensmall">{S_AUTH_LIST}</span></td> - </tr> -</table> Deleted: phpBB Reloaded 2/templates/subC1/admin/_sav_auth_forum_body.tpl =================================================================== --- phpBB Reloaded 2/templates/subC1/admin/_sav_auth_forum_body.tpl 2006-10-26 02:31:27 UTC (rev 273) +++ phpBB Reloaded 2/templates/subC1/admin/_sav_auth_forum_body.tpl 2006-10-26 02:34:22 UTC (rev 274) @@ -1,31 +0,0 @@ - -<h1>{L_AUTH_TITLE}</h1> - -<p>{L_AUTH_EXPLAIN}</p> - -<h2>{L_FORUM}: {FORUM_NAME}</h2> - -<form method="post" action="{S_FORUMAUTH_ACTION}"> - <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline"> - <tr> - <!-- BEGIN forum_auth_titles --> - <th class="thTop">{forum_auth_titles.CELL_TITLE}</th> - <!-- END forum_auth_titles --> - </tr> - <tr> - <!-- BEGIN forum_auth_data --> - <td class="row1" align="center">{forum_auth_data.S_AUTH_LEVELS_SELECT}</td> - <!-- END forum_auth_data --> - </tr> - <tr> - <td colspan="{S_COLUMN_SPAN}" align="center" class="row1"> <span class="gensmall">{U_SWITCH_MODE}</span></td> - </tr> - <tr> - <td colspan="{S_COLUMN_SPAN}" class="catBottom" align="center">{S_HIDDEN_FIELDS} - <input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" /> - - <input type="reset" value="{L_RESET}" name="reset" class="liteoption" /> - </td> - </tr> - </table> -</form> Deleted: phpBB Reloaded 2/templates/subC1/admin/_sav_auth_select_body.tpl =================================================================== --- phpBB Reloaded 2/templates/subC1/admin/_sav_auth_select_body.tpl 2006-10-26 02:31:27 UTC (rev 273) +++ phpBB Reloaded 2/templates/subC1/admin/_sav_auth_select_body.tpl 2006-10-26 02:34:22 UTC (rev 274) @@ -1,13 +0,0 @@ - -<h1>{L_AUTH_TITLE}</h1> - -<p>{L_AUTH_EXPLAIN}</p> - -<form method="post" action="{S_AUTH_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline"> - <tr> - <th class="thHead" align="center">{L_AUTH_SELECT}</th> - </tr> - <tr> - <td class="row1" align="center">{S_HIDDEN_FIELDS}{S_AUTH_SELECT} <input type="submit" value="{L_LOOK_UP}" class="mainoption" /> </td> - </tr> -</table></form> Deleted: phpBB Reloaded 2/templates/subC1/admin/_sav_auth_ug_body.tpl =================================================================== --- phpBB Reloaded 2/templates/subC1/admin/_sav_auth_ug_body.tpl 2006-10-26 02:31:27 UTC (rev 273) +++ phpBB Reloaded 2/templates/subC1/admin/_sav_auth_ug_body.tpl 2006-10-26 02:34:22 UTC (rev 274) @@ -1,49 +0,0 @@ - -<h1>{L_AUTH_TITLE}</h1> - -<h2>{L_USER_OR_GROUPNAME}: {USERNAME}</h2> - -<form method="post" action="{S_AUTH_ACTION}"> - -<!-- BEGIN switch_user_auth --> -<p>{USER_LEVEL}</p> -<p>{USER_GROUP_MEMBERSHIPS}</p> -<!-- END switch_user_auth --> - -<!-- BEGIN switch_group_auth --> -<p>{GROUP_MEMBERSHIP}</p> -<!-- END switch_group_auth --> - -<h2>{L_PERMISSIONS}</h2> - -<p>{L_AUTH_EXPLAIN}</p> - - <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline"> - <tr> - <th width="30%" class="thCornerL">{L_FORUM}</th> - <!-- BEGIN acltype --> - <th class="thTop">{acltype.L_UG_ACL_TYPE}</th> - <!-- END acltype --> - <th class="thCornerR">{L_MO... [truncated message content] |
From: <teh...@us...> - 2006-10-26 02:31:35
|
Revision: 273 http://svn.sourceforge.net/phpbbreloaded/?rev=273&view=rev Author: tehphpmaster Date: 2006-10-25 19:31:27 -0700 (Wed, 25 Oct 2006) Log Message: ----------- Bringing parts of this back to coding standards. @New Devs: Can one of you look in the task manager plz, if someoen could bring this up to use the DBAL as well... Modified Paths: -------------- phpBB Reloaded 2/admin/admin_agreement.php Modified: phpBB Reloaded 2/admin/admin_agreement.php =================================================================== --- phpBB Reloaded 2/admin/admin_agreement.php 2006-10-25 04:25:33 UTC (rev 272) +++ phpBB Reloaded 2/admin/admin_agreement.php 2006-10-26 02:31:27 UTC (rev 273) @@ -47,9 +47,9 @@ 'body' => 'admin/admin_agreement.tpl') ); - if(isset($_POST['post'])) + if(isset($HTTP_POST_VARS['post'])) { - $agreement_data = addslashes($_POST['agreement_form']); + $agreement_data = addslashes($HTTP_POST_VARS['agreement_form']); $query = mysql_query("UPDATE " . AGREEMENT_TABLE . " SET agreement_text = '" . addslashes($_POST['agreement_form']) . "' WHERE id = 1"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kla...@us...> - 2006-10-25 04:47:23
|
Revision: 272 http://svn.sourceforge.net/phpbbreloaded/?rev=272&view=rev Author: klarinetking Date: 2006-10-24 21:25:33 -0700 (Tue, 24 Oct 2006) Log Message: ----------- Adding several styles that were not in SubVersion for some reason. Added Paths: ----------- phpBB Reloaded Styles/Solaris/ phpBB Reloaded Styles/Solaris/Solaris.cfg phpBB Reloaded Styles/Solaris/Solaris.css phpBB Reloaded Styles/Solaris/Solaris.ini phpBB Reloaded Styles/Solaris/Solaris_bs_buttons.psd phpBB Reloaded Styles/Solaris/_sav_index_body.tpl phpBB Reloaded Styles/Solaris/_sav_modcp_body.tpl phpBB Reloaded Styles/Solaris/_sav_profile_add_body.tpl phpBB Reloaded Styles/Solaris/_sav_search_results_topics.tpl phpBB Reloaded Styles/Solaris/_sav_viewforum_body.tpl phpBB Reloaded Styles/Solaris/_sav_viewtopic_body.tpl phpBB Reloaded Styles/Solaris/add_attachment_body.tpl phpBB Reloaded Styles/Solaris/admin/ phpBB Reloaded Styles/Solaris/admin/_sav_auth_forum_body.tpl phpBB Reloaded Styles/Solaris/admin/_sav_auth_select_body.tpl phpBB Reloaded Styles/Solaris/admin/_sav_auth_ug_body.tpl phpBB Reloaded Styles/Solaris/admin/_sav_category_edit_body.tpl phpBB Reloaded Styles/Solaris/admin/_sav_forum_admin_body.tpl phpBB Reloaded Styles/Solaris/admin/_sav_forum_delete_body.tpl phpBB Reloaded Styles/Solaris/admin/_sav_forum_edit_body.tpl phpBB Reloaded Styles/Solaris/admin/_sav_forum_prune_body.tpl phpBB Reloaded Styles/Solaris/admin/_sav_forum_prune_result_body.tpl phpBB Reloaded Styles/Solaris/admin/_sav_forum_prune_select_body.tpl phpBB Reloaded Styles/Solaris/admin/admin_message_body.tpl phpBB Reloaded Styles/Solaris/admin/attach_cat_body.tpl phpBB Reloaded Styles/Solaris/admin/attach_cp_attachments.tpl phpBB Reloaded Styles/Solaris/admin/attach_cp_body.tpl phpBB Reloaded Styles/Solaris/admin/attach_cp_search.tpl phpBB Reloaded Styles/Solaris/admin/attach_cp_user.tpl phpBB Reloaded Styles/Solaris/admin/attach_extension_groups.tpl phpBB Reloaded Styles/Solaris/admin/attach_extensions.tpl phpBB Reloaded Styles/Solaris/admin/attach_forbidden_extensions.tpl phpBB Reloaded Styles/Solaris/admin/attach_manage_body.tpl phpBB Reloaded Styles/Solaris/admin/attach_quota_body.tpl phpBB Reloaded Styles/Solaris/admin/attach_shadow.tpl phpBB Reloaded Styles/Solaris/admin/auth_overview_body.tpl phpBB Reloaded Styles/Solaris/admin/auth_overview_group_body.tpl phpBB Reloaded Styles/Solaris/admin/auths_def_body.tpl phpBB Reloaded Styles/Solaris/admin/board_config_body.tpl phpBB Reloaded Styles/Solaris/admin/color_edit_body.tpl phpBB Reloaded Styles/Solaris/admin/color_style_select.tpl phpBB Reloaded Styles/Solaris/admin/db_utils_backup_body.tpl phpBB Reloaded Styles/Solaris/admin/db_utils_restore_body.tpl phpBB Reloaded Styles/Solaris/admin/disallow_body.tpl phpBB Reloaded Styles/Solaris/admin/extension_groups_permissions.tpl phpBB Reloaded Styles/Solaris/admin/faq_block_body.tpl phpBB Reloaded Styles/Solaris/admin/faq_editor_body.tpl phpBB Reloaded Styles/Solaris/admin/faq_quest_body.tpl phpBB Reloaded Styles/Solaris/admin/faq_select_lang_body.tpl phpBB Reloaded Styles/Solaris/admin/forum_flat_body.tpl phpBB Reloaded Styles/Solaris/admin/forum_fprune_body.tpl phpBB Reloaded Styles/Solaris/admin/forum_index_body.tpl phpBB Reloaded Styles/Solaris/admin/forum_prune_draft_result_body.tpl phpBB Reloaded Styles/Solaris/admin/forum_prune_draft_select_body.tpl phpBB Reloaded Styles/Solaris/admin/group_edit_body.tpl phpBB Reloaded Styles/Solaris/admin/group_select_body.tpl phpBB Reloaded Styles/Solaris/admin/icons_list_body.tpl phpBB Reloaded Styles/Solaris/admin/index.htm phpBB Reloaded Styles/Solaris/admin/index_body.tpl phpBB Reloaded Styles/Solaris/admin/index_frameset.tpl phpBB Reloaded Styles/Solaris/admin/index_navigate.tpl phpBB Reloaded Styles/Solaris/admin/meta_tags_body.tpl phpBB Reloaded Styles/Solaris/admin/page_footer.tpl phpBB Reloaded Styles/Solaris/admin/page_header.tpl phpBB Reloaded Styles/Solaris/admin/ranks_edit_body.tpl phpBB Reloaded Styles/Solaris/admin/ranks_list_body.tpl phpBB Reloaded Styles/Solaris/admin/smile_edit_body.tpl phpBB Reloaded Styles/Solaris/admin/smile_import_body.tpl phpBB Reloaded Styles/Solaris/admin/smile_list_body.tpl phpBB Reloaded Styles/Solaris/admin/styles_addnew_body.tpl phpBB Reloaded Styles/Solaris/admin/styles_edit_body.tpl phpBB Reloaded Styles/Solaris/admin/styles_exporter.tpl phpBB Reloaded Styles/Solaris/admin/styles_list_body.tpl phpBB Reloaded Styles/Solaris/admin/topics_attr_list_body.tpl phpBB Reloaded Styles/Solaris/admin/user_avatar_gallery.tpl phpBB Reloaded Styles/Solaris/admin/user_ban_body.tpl phpBB Reloaded Styles/Solaris/admin/user_edit_body.tpl phpBB Reloaded Styles/Solaris/admin/user_email_body.tpl phpBB Reloaded Styles/Solaris/admin/user_select_body.tpl phpBB Reloaded Styles/Solaris/admin/userlist_body.tpl phpBB Reloaded Styles/Solaris/admin/userlist_group.tpl phpBB Reloaded Styles/Solaris/admin/words_edit_body.tpl phpBB Reloaded Styles/Solaris/admin/words_list_body.tpl phpBB Reloaded Styles/Solaris/agreement.tpl phpBB Reloaded Styles/Solaris/bbcode.js phpBB Reloaded Styles/Solaris/bbcode.tpl phpBB Reloaded Styles/Solaris/confirm_body.tpl phpBB Reloaded Styles/Solaris/cp_generic.tpl phpBB Reloaded Styles/Solaris/cp_menus_box.tpl phpBB Reloaded Styles/Solaris/error_body.tpl phpBB Reloaded Styles/Solaris/faq_body.tpl phpBB Reloaded Styles/Solaris/formIE.css phpBB Reloaded Styles/Solaris/form_body.tpl phpBB Reloaded Styles/Solaris/form_fields.tpl phpBB Reloaded Styles/Solaris/groupcp_info_body.tpl phpBB Reloaded Styles/Solaris/groupcp_pending_info.tpl phpBB Reloaded Styles/Solaris/groupcp_user_body.tpl phpBB Reloaded Styles/Solaris/images/ phpBB Reloaded Styles/Solaris/images/arrow_down.gif phpBB Reloaded Styles/Solaris/images/arrow_up.gif phpBB Reloaded Styles/Solaris/images/bg_bottom_border.jpg phpBB Reloaded Styles/Solaris/images/bg_space.jpg phpBB Reloaded Styles/Solaris/images/bg_space_one_layer.jpg phpBB Reloaded Styles/Solaris/images/bg_space_two_layers.jpg phpBB Reloaded Styles/Solaris/images/bg_top_border.jpg phpBB Reloaded Styles/Solaris/images/bg_top_planet.jpg phpBB Reloaded Styles/Solaris/images/bs_arrow_down.gif phpBB Reloaded Styles/Solaris/images/bs_arrow_up.gif phpBB Reloaded Styles/Solaris/images/bs_command_details.gif phpBB Reloaded Styles/Solaris/images/bs_command_mini_copy.gif phpBB Reloaded Styles/Solaris/images/bs_command_mini_create.gif phpBB Reloaded Styles/Solaris/images/bs_command_mini_delete.gif phpBB Reloaded Styles/Solaris/images/bs_command_mini_edit.gif phpBB Reloaded Styles/Solaris/images/bs_command_mini_synchro.gif phpBB Reloaded Styles/Solaris/images/bs_status_group.gif phpBB Reloaded Styles/Solaris/images/bs_status_user.gif phpBB Reloaded Styles/Solaris/images/cat_folder_big.gif phpBB Reloaded Styles/Solaris/images/cat_folder_locked_big.gif phpBB Reloaded Styles/Solaris/images/cat_folder_new_big.gif phpBB Reloaded Styles/Solaris/images/category_icon.gif phpBB Reloaded Styles/Solaris/images/created_by.jpg phpBB Reloaded Styles/Solaris/images/earth.gif phpBB Reloaded Styles/Solaris/images/extra_blankforumlogo.png phpBB Reloaded Styles/Solaris/images/folder.gif phpBB Reloaded Styles/Solaris/images/folder_announce.gif phpBB Reloaded Styles/Solaris/images/folder_announce_new.gif phpBB Reloaded Styles/Solaris/images/folder_announce_new_own.gif phpBB Reloaded Styles/Solaris/images/folder_announce_own.gif phpBB Reloaded Styles/Solaris/images/folder_calendar.gif phpBB Reloaded Styles/Solaris/images/folder_calendar_new.gif phpBB Reloaded Styles/Solaris/images/folder_calendar_new_own.gif phpBB Reloaded Styles/Solaris/images/folder_calendar_own.gif phpBB Reloaded Styles/Solaris/images/folder_hot.gif phpBB Reloaded Styles/Solaris/images/folder_hot_own.gif phpBB Reloaded Styles/Solaris/images/folder_lock.gif phpBB Reloaded Styles/Solaris/images/folder_lock_new.gif phpBB Reloaded Styles/Solaris/images/folder_lock_new_own.gif phpBB Reloaded Styles/Solaris/images/folder_lock_own.gif phpBB Reloaded Styles/Solaris/images/folder_moved.gif phpBB Reloaded Styles/Solaris/images/folder_new.gif phpBB Reloaded Styles/Solaris/images/folder_new_hot.gif phpBB Reloaded Styles/Solaris/images/folder_new_hot_own.gif phpBB Reloaded Styles/Solaris/images/folder_new_own.gif phpBB Reloaded Styles/Solaris/images/folder_own.gif phpBB Reloaded Styles/Solaris/images/folder_sticky.gif phpBB Reloaded Styles/Solaris/images/folder_sticky_new.gif phpBB Reloaded Styles/Solaris/images/folder_sticky_new_own.gif phpBB Reloaded Styles/Solaris/images/folder_sticky_own.gif phpBB Reloaded Styles/Solaris/images/forumlogo.jpg phpBB Reloaded Styles/Solaris/images/icon_calendar.gif phpBB Reloaded Styles/Solaris/images/icon_censor.gif phpBB Reloaded Styles/Solaris/images/icon_delete.gif phpBB Reloaded Styles/Solaris/images/icon_down_arrow.gif phpBB Reloaded Styles/Solaris/images/icon_latest_reply.gif phpBB Reloaded Styles/Solaris/images/icon_mini_calendar.gif phpBB Reloaded Styles/Solaris/images/icon_minicat.gif phpBB Reloaded Styles/Solaris/images/icon_minicat_lock.gif phpBB Reloaded Styles/Solaris/images/icon_minicat_new.gif phpBB Reloaded Styles/Solaris/images/icon_minilink.gif phpBB Reloaded Styles/Solaris/images/icon_minipost.gif phpBB Reloaded Styles/Solaris/images/icon_minipost_lock.gif phpBB Reloaded Styles/Solaris/images/icon_minipost_new.gif phpBB Reloaded Styles/Solaris/images/icon_newest_reply.gif phpBB Reloaded Styles/Solaris/images/icon_tiny_profile.gif phpBB Reloaded Styles/Solaris/images/icon_tiny_topic.gif phpBB Reloaded Styles/Solaris/images/icon_unmark_read.gif phpBB Reloaded Styles/Solaris/images/icon_up_arrow.gif phpBB Reloaded Styles/Solaris/images/index.htm phpBB Reloaded Styles/Solaris/images/lang_english/ phpBB Reloaded Styles/Solaris/images/lang_english/bs_command_add.gif phpBB Reloaded Styles/Solaris/images/lang_english/bs_command_cancel.gif phpBB Reloaded Styles/Solaris/images/lang_english/bs_command_check.gif phpBB Reloaded Styles/Solaris/images/lang_english/bs_command_create.gif phpBB Reloaded Styles/Solaris/images/lang_english/bs_command_delete.gif phpBB Reloaded Styles/Solaris/images/lang_english/bs_command_edit.gif phpBB Reloaded Styles/Solaris/images/lang_english/bs_command_export.gif phpBB Reloaded Styles/Solaris/images/lang_english/bs_command_preview.gif phpBB Reloaded Styles/Solaris/images/lang_english/bs_command_regen.gif phpBB Reloaded Styles/Solaris/images/lang_english/bs_command_search.gif phpBB Reloaded Styles/Solaris/images/lang_english/bs_command_select.gif phpBB Reloaded Styles/Solaris/images/lang_english/bs_command_submit.gif phpBB Reloaded Styles/Solaris/images/lang_english/bs_command_synchro.gif phpBB Reloaded Styles/Solaris/images/lang_english/icon_aim.gif phpBB Reloaded Styles/Solaris/images/lang_english/icon_edit.gif phpBB Reloaded Styles/Solaris/images/lang_english/icon_email.gif phpBB Reloaded Styles/Solaris/images/lang_english/icon_icq.gif phpBB Reloaded Styles/Solaris/images/lang_english/icon_ip.gif phpBB Reloaded Styles/Solaris/images/lang_english/icon_msnm.gif phpBB Reloaded Styles/Solaris/images/lang_english/icon_pm.gif phpBB Reloaded Styles/Solaris/images/lang_english/icon_profile.gif phpBB Reloaded Styles/Solaris/images/lang_english/icon_quote.gif phpBB Reloaded Styles/Solaris/images/lang_english/icon_search.gif phpBB Reloaded Styles/Solaris/images/lang_english/icon_www.gif phpBB Reloaded Styles/Solaris/images/lang_english/icon_yim.gif phpBB Reloaded Styles/Solaris/images/lang_english/locked.gif phpBB Reloaded Styles/Solaris/images/lang_english/msg_new_post.gif phpBB Reloaded Styles/Solaris/images/lang_english/new_topic.gif phpBB Reloaded Styles/Solaris/images/lang_english/post_reply.gif phpBB Reloaded Styles/Solaris/images/lang_english/quick-post.gif phpBB Reloaded Styles/Solaris/images/lang_english/topimg_faq-d.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_faq-e.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_groups-d.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_groups-e.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_home-d.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_home-e.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_login-d.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_login-logout-e.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_logout-d.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_logout-e.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_members-d.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_members-e.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_newpms-e.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_pms-d.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_pms-e.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_preferences-d.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_preferences-e.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_profile-d.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_profile-e.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_register-d.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_register-e.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_search-d.jpg phpBB Reloaded Styles/Solaris/images/lang_english/topimg_search-e.jpg phpBB Reloaded Styles/Solaris/images/link_folder.gif phpBB Reloaded Styles/Solaris/images/minilogo.gif phpBB Reloaded Styles/Solaris/images/msg_inbox.gif phpBB Reloaded Styles/Solaris/images/msg_outbox.gif phpBB Reloaded Styles/Solaris/images/msg_savebox.gif phpBB Reloaded Styles/Solaris/images/msg_sentbox.gif phpBB Reloaded Styles/Solaris/images/qp_quote.gif phpBB Reloaded Styles/Solaris/images/spacer.gif phpBB Reloaded Styles/Solaris/images/table_cell_bg1.jpg phpBB Reloaded Styles/Solaris/images/table_cell_bg1h.jpg phpBB Reloaded Styles/Solaris/images/table_cell_bg2.jpg phpBB Reloaded Styles/Solaris/images/table_cell_bg2h.jpg phpBB Reloaded Styles/Solaris/images/topic_calendar_tiny.gif phpBB Reloaded Styles/Solaris/images/topic_delete.gif phpBB Reloaded Styles/Solaris/images/topic_lock.gif phpBB Reloaded Styles/Solaris/images/topic_move.gif phpBB Reloaded Styles/Solaris/images/topic_poll_tiny.gif phpBB Reloaded Styles/Solaris/images/topic_split.gif phpBB Reloaded Styles/Solaris/images/topic_unlock.gif phpBB Reloaded Styles/Solaris/images/topimg_newpms.jpg phpBB Reloaded Styles/Solaris/images/topimg_pm.jpg phpBB Reloaded Styles/Solaris/images/tree_fcross.gif phpBB Reloaded Styles/Solaris/images/tree_hcross.gif phpBB Reloaded Styles/Solaris/images/tree_hspace.gif phpBB Reloaded Styles/Solaris/images/tree_vspace.gif phpBB Reloaded Styles/Solaris/images/voting_bar.gif phpBB Reloaded Styles/Solaris/images/voting_bar_lcap.gif phpBB Reloaded Styles/Solaris/images/voting_bar_rcap.gif phpBB Reloaded Styles/Solaris/images/whosonline.gif phpBB Reloaded Styles/Solaris/index.htm phpBB Reloaded Styles/Solaris/index_body.tpl phpBB Reloaded Styles/Solaris/index_stats_box.tpl phpBB Reloaded Styles/Solaris/jumpbox.tpl phpBB Reloaded Styles/Solaris/login_body.tpl phpBB Reloaded Styles/Solaris/memberlist_body.tpl phpBB Reloaded Styles/Solaris/message_body.tpl phpBB Reloaded Styles/Solaris/modcp_body.tpl phpBB Reloaded Styles/Solaris/modcp_move.tpl phpBB Reloaded Styles/Solaris/modcp_split.tpl phpBB Reloaded Styles/Solaris/modcp_viewip.tpl phpBB Reloaded Styles/Solaris/navigation_box.tpl phpBB Reloaded Styles/Solaris/navigation_only_box.tpl phpBB Reloaded Styles/Solaris/overall_footer.tpl phpBB Reloaded Styles/Solaris/overall_header.tpl phpBB Reloaded Styles/Solaris/posted_attachments_body.tpl phpBB Reloaded Styles/Solaris/posting_attach_body.tpl phpBB Reloaded Styles/Solaris/posting_attach_rules.tpl phpBB Reloaded Styles/Solaris/posting_bbcode.tpl phpBB Reloaded Styles/Solaris/posting_body.tpl phpBB Reloaded Styles/Solaris/posting_icon_box.tpl phpBB Reloaded Styles/Solaris/posting_poll_body.tpl phpBB Reloaded Styles/Solaris/posting_preview.tpl phpBB Reloaded Styles/Solaris/posting_smilies.tpl phpBB Reloaded Styles/Solaris/posting_topic_review.tpl phpBB Reloaded Styles/Solaris/privmsgs_body.tpl phpBB Reloaded Styles/Solaris/privmsgs_popup.tpl phpBB Reloaded Styles/Solaris/privmsgs_preview.tpl phpBB Reloaded Styles/Solaris/privmsgs_read_body.tpl phpBB Reloaded Styles/Solaris/profile_add_body.tpl phpBB Reloaded Styles/Solaris/profile_avatar_gallery.tpl phpBB Reloaded Styles/Solaris/profile_send_email.tpl phpBB Reloaded Styles/Solaris/profile_send_pass.tpl phpBB Reloaded Styles/Solaris/profile_view_body.tpl phpBB Reloaded Styles/Solaris/ranks_body.tpl phpBB Reloaded Styles/Solaris/readme.html phpBB Reloaded Styles/Solaris/search_body.tpl phpBB Reloaded Styles/Solaris/search_color.tpl phpBB Reloaded Styles/Solaris/search_results_posts.tpl phpBB Reloaded Styles/Solaris/search_results_topics.tpl phpBB Reloaded Styles/Solaris/search_username.tpl phpBB Reloaded Styles/Solaris/shoutbox_body.tpl phpBB Reloaded Styles/Solaris/shoutbox_max_body.tpl phpBB Reloaded Styles/Solaris/shoutbox_max_guest_body.tpl phpBB Reloaded Styles/Solaris/shoutbox_view_body.tpl phpBB Reloaded Styles/Solaris/simple_footer.tpl phpBB Reloaded Styles/Solaris/simple_header.tpl phpBB Reloaded Styles/Solaris/stat_run_body.tpl phpBB Reloaded Styles/Solaris/theme_info.cfg phpBB Reloaded Styles/Solaris/topics_bottom_forum.tpl phpBB Reloaded Styles/Solaris/topics_bottom_modcp.tpl phpBB Reloaded Styles/Solaris/topics_bottom_search.tpl phpBB Reloaded Styles/Solaris/topics_box.tpl phpBB Reloaded Styles/Solaris/topics_row_box.tpl phpBB Reloaded Styles/Solaris/uacp_body.tpl phpBB Reloaded Styles/Solaris/viewonline_body.tpl phpBB Reloaded Styles/Solaris/viewtopic_attach_body.tpl phpBB Reloaded Styles/Solaris/viewtopic_body.tpl phpBB Reloaded Styles/Solaris/viewtopic_poll_ballot.tpl phpBB Reloaded Styles/Solaris/viewtopic_poll_result.tpl phpBB Reloaded Styles/aphrodite_mc/ phpBB Reloaded Styles/aphrodite_mc/add_attachment_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/ phpBB Reloaded Styles/aphrodite_mc/admin/admin_agreement.tpl phpBB Reloaded Styles/aphrodite_mc/admin/admin_message_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/attach_cat_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/attach_cp_attachments.tpl phpBB Reloaded Styles/aphrodite_mc/admin/attach_cp_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/attach_cp_search.tpl phpBB Reloaded Styles/aphrodite_mc/admin/attach_cp_user.tpl phpBB Reloaded Styles/aphrodite_mc/admin/attach_extension_groups.tpl phpBB Reloaded Styles/aphrodite_mc/admin/attach_extensions.tpl phpBB Reloaded Styles/aphrodite_mc/admin/attach_forbidden_extensions.tpl phpBB Reloaded Styles/aphrodite_mc/admin/attach_manage_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/attach_quota_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/attach_shadow.tpl phpBB Reloaded Styles/aphrodite_mc/admin/auth_overview_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/auth_overview_group_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/auths_def_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/blocks_edit_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/blocks_layout_list_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/blocks_list_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/blocks_position_edit_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/blocks_position_list_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/blocks_variables_edit_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/blocks_variables_list_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/board_config_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/color_edit_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/color_style_select.tpl phpBB Reloaded Styles/aphrodite_mc/admin/confirm_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/db_utils_backup_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/db_utils_restore_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/disallow_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/extension_groups_permissions.tpl phpBB Reloaded Styles/aphrodite_mc/admin/faq_block_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/faq_editor_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/faq_quest_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/faq_select_lang_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/forum_flat_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/forum_fprune_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/forum_index_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/forum_prune_draft_result_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/forum_prune_draft_select_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/forum_topic_ban_edit.tpl phpBB Reloaded Styles/aphrodite_mc/admin/forum_topic_ban_list.tpl phpBB Reloaded Styles/aphrodite_mc/admin/group_edit_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/group_select_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/icons_list_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/index.htm phpBB Reloaded Styles/aphrodite_mc/admin/index_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/index_frameset.tpl phpBB Reloaded Styles/aphrodite_mc/admin/index_navigate.tpl phpBB Reloaded Styles/aphrodite_mc/admin/lang_extend_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/lang_extend_def.tpl phpBB Reloaded Styles/aphrodite_mc/admin/lang_extend_key_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/lang_extend_pack_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/lang_extend_search_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/layout_edit_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/layout_list_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/meta_tags_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/page_footer.tpl phpBB Reloaded Styles/aphrodite_mc/admin/page_header.tpl phpBB Reloaded Styles/aphrodite_mc/admin/qpes_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/ranks_edit_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/ranks_list_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/smile_edit_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/smile_import_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/smile_list_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/topics_attr_list_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/user_avatar_gallery.tpl phpBB Reloaded Styles/aphrodite_mc/admin/user_ban_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/user_edit_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/user_email_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/user_select_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/userlist_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/userlist_group.tpl phpBB Reloaded Styles/aphrodite_mc/admin/words_edit_body.tpl phpBB Reloaded Styles/aphrodite_mc/admin/words_list_body.tpl phpBB Reloaded Styles/aphrodite_mc/agreement.tpl phpBB Reloaded Styles/aphrodite_mc/aphrodite_mc.cfg phpBB Reloaded Styles/aphrodite_mc/aphrodite_mc.ini phpBB Reloaded Styles/aphrodite_mc/bbcode.js phpBB Reloaded Styles/aphrodite_mc/bbcode.tpl phpBB Reloaded Styles/aphrodite_mc/calendar_body.tpl phpBB Reloaded Styles/aphrodite_mc/calendar_box.tpl phpBB Reloaded Styles/aphrodite_mc/calendar_month_box.tpl phpBB Reloaded Styles/aphrodite_mc/calendar_overview_topic.tpl phpBB Reloaded Styles/aphrodite_mc/calendar_overview_topic_txt.tpl phpBB Reloaded Styles/aphrodite_mc/calendar_scheduler_body.tpl phpBB Reloaded Styles/aphrodite_mc/calendar_topics_bottom_sched.tpl phpBB Reloaded Styles/aphrodite_mc/confirm_body.tpl phpBB Reloaded Styles/aphrodite_mc/cp_generic.tpl phpBB Reloaded Styles/aphrodite_mc/cp_menus_box.tpl phpBB Reloaded Styles/aphrodite_mc/error_body.tpl phpBB Reloaded Styles/aphrodite_mc/faq_body.tpl phpBB Reloaded Styles/aphrodite_mc/formIE.css phpBB Reloaded Styles/aphrodite_mc/form_body.tpl phpBB Reloaded Styles/aphrodite_mc/form_fields.tpl phpBB Reloaded Styles/aphrodite_mc/groupcp_info_body.tpl phpBB Reloaded Styles/aphrodite_mc/groupcp_pending_info.tpl phpBB Reloaded Styles/aphrodite_mc/groupcp_user_body.tpl phpBB Reloaded Styles/aphrodite_mc/images/ phpBB Reloaded Styles/aphrodite_mc/images/addform.html phpBB Reloaded Styles/aphrodite_mc/images/arrow_down.gif phpBB Reloaded Styles/aphrodite_mc/images/arrow_up.gif phpBB Reloaded Styles/aphrodite_mc/images/bg_body.gif phpBB Reloaded Styles/aphrodite_mc/images/bg_code_header.gif phpBB Reloaded Styles/aphrodite_mc/images/bg_copyright.gif phpBB Reloaded Styles/aphrodite_mc/images/bg_input.gif phpBB Reloaded Styles/aphrodite_mc/images/bg_nav2.gif phpBB Reloaded Styles/aphrodite_mc/images/bg_post.gif phpBB Reloaded Styles/aphrodite_mc/images/bg_quote_content.gif phpBB Reloaded Styles/aphrodite_mc/images/bg_quote_header.gif phpBB Reloaded Styles/aphrodite_mc/images/bg_topnav.gif phpBB Reloaded Styles/aphrodite_mc/images/black/ phpBB Reloaded Styles/aphrodite_mc/images/black/bg_catbottom.gif phpBB Reloaded Styles/aphrodite_mc/images/black/bg_hdr1.gif phpBB Reloaded Styles/aphrodite_mc/images/black/bg_hdr2.gif phpBB Reloaded Styles/aphrodite_mc/images/black/bg_logo.gif phpBB Reloaded Styles/aphrodite_mc/images/black/bg_nav1.gif phpBB Reloaded Styles/aphrodite_mc/images/black/bg_postbottom.gif phpBB Reloaded Styles/aphrodite_mc/images/black/bg_row_hover.gif phpBB Reloaded Styles/aphrodite_mc/images/black/bg_row_hover_new.gif phpBB Reloaded Styles/aphrodite_mc/images/black/bg_spacerow.gif phpBB Reloaded Styles/aphrodite_mc/images/black/bg_th.gif phpBB Reloaded Styles/aphrodite_mc/images/black/folder.gif phpBB Reloaded Styles/aphrodite_mc/images/black/folder_calendar.gif phpBB Reloaded Styles/aphrodite_mc/images/black/folder_calendar_own.gif phpBB Reloaded Styles/aphrodite_mc/images/black/folder_link.gif phpBB Reloaded Styles/aphrodite_mc/images/black/folder_locked.gif phpBB Reloaded Styles/aphrodite_mc/images/black/folder_moved.gif phpBB Reloaded Styles/aphrodite_mc/images/black/folder_new.gif phpBB Reloaded Styles/aphrodite_mc/images/black/folders.gif phpBB Reloaded Styles/aphrodite_mc/images/black/folders_new.gif phpBB Reloaded Styles/aphrodite_mc/images/black/icon_post.gif phpBB Reloaded Styles/aphrodite_mc/images/black/icon_post_new.gif phpBB Reloaded Styles/aphrodite_mc/images/black/icon_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/black/icon_reply_new.gif phpBB Reloaded Styles/aphrodite_mc/images/black/index.htm phpBB Reloaded Styles/aphrodite_mc/images/black/logo.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_important.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_important_new.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_important_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_important_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_locked.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_locked_new.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_locked_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_locked_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_moved.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_new.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_next.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_prev.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_sticky.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_sticky_new.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_sticky_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/black/post_sticky_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/black/vote_lcap.gif phpBB Reloaded Styles/aphrodite_mc/images/black/vote_rcap.gif phpBB Reloaded Styles/aphrodite_mc/images/black/voting_bar.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/ phpBB Reloaded Styles/aphrodite_mc/images/blue/bg_catbottom.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/bg_hdr1.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/bg_hdr2.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/bg_logo.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/bg_nav1.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/bg_postbottom.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/bg_row_hover.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/bg_row_hover_new.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/bg_spacerow.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/bg_th.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/folder.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/folder_link.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/folder_locked.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/folder_new.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/folders.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/folders_new.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/icon_post.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/icon_post_new.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/icon_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/icon_reply_new.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/index.htm phpBB Reloaded Styles/aphrodite_mc/images/blue/logo.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/post.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/post_important.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/post_important_new.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/post_important_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/post_important_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/post_locked.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/post_locked_new.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/post_locked_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/post_locked_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/post_new.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/post_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/post_next.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/post_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/post_prev.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/post_sticky_new.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/post_sticky_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/vote_lcap.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/vote_rcap.gif phpBB Reloaded Styles/aphrodite_mc/images/blue/voting_bar.gif phpBB Reloaded Styles/aphrodite_mc/images/bs_arrow_down.gif phpBB Reloaded Styles/aphrodite_mc/images/bs_arrow_up.gif phpBB Reloaded Styles/aphrodite_mc/images/bs_command_details.gif phpBB Reloaded Styles/aphrodite_mc/images/bs_command_mini_copy.gif phpBB Reloaded Styles/aphrodite_mc/images/bs_command_mini_create.gif phpBB Reloaded Styles/aphrodite_mc/images/bs_command_mini_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/bs_command_mini_edit.gif phpBB Reloaded Styles/aphrodite_mc/images/bs_command_mini_synchro.gif phpBB Reloaded Styles/aphrodite_mc/images/bs_status_group.gif phpBB Reloaded Styles/aphrodite_mc/images/bs_status_user.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/ phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/bg_catbottom.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/bg_hdr1.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/bg_hdr2.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/bg_logo.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/bg_nav1.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/bg_postbottom.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/bg_row_hover.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/bg_row_hover_new.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/bg_spacerow.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/bg_th.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/folder.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/folder_calendar.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/folder_calendar_own.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/folder_link.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/folder_locked.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/folder_moved.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/folder_new.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/folders.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/folders_new.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/icon_post.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/icon_post_new.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/icon_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/icon_reply_new.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/index.htm phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/logo.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_important.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_important_new.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_important_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_important_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_locked.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_locked_new.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_locked_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_locked_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_moved.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_new.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_next.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_prev.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_sticky.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_sticky_new.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_sticky_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/post_sticky_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/vote_lcap.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/vote_rcap.gif phpBB Reloaded Styles/aphrodite_mc/images/darkgreen/voting_bar.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/ phpBB Reloaded Styles/aphrodite_mc/images/gray/bg_catbottom.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/bg_hdr1.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/bg_hdr2.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/bg_logo.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/bg_nav1.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/bg_postbottom.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/bg_row_hover.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/bg_row_hover_new.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/bg_spacerow.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/bg_th.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/folder.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/folder_calendar.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/folder_calendar_own.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/folder_link.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/folder_locked.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/folder_moved.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/folder_new.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/folders.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/folders_new.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/icon_post.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/icon_post_new.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/icon_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/icon_reply_new.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/index.htm phpBB Reloaded Styles/aphrodite_mc/images/gray/logo.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_important.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_important_new.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_important_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_important_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_locked.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_locked_new.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_locked_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_locked_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_moved.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_new.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_next.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_prev.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_sticky.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_sticky_new.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_sticky_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/post_sticky_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/vote_lcap.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/vote_rcap.gif phpBB Reloaded Styles/aphrodite_mc/images/gray/voting_bar.gif phpBB Reloaded Styles/aphrodite_mc/images/green/ phpBB Reloaded Styles/aphrodite_mc/images/green/bg_catbottom.gif phpBB Reloaded Styles/aphrodite_mc/images/green/bg_hdr1.gif phpBB Reloaded Styles/aphrodite_mc/images/green/bg_hdr2.gif phpBB Reloaded Styles/aphrodite_mc/images/green/bg_logo.gif phpBB Reloaded Styles/aphrodite_mc/images/green/bg_nav1.gif phpBB Reloaded Styles/aphrodite_mc/images/green/bg_postbottom.gif phpBB Reloaded Styles/aphrodite_mc/images/green/bg_row_hover.gif phpBB Reloaded Styles/aphrodite_mc/images/green/bg_row_hover_new.gif phpBB Reloaded Styles/aphrodite_mc/images/green/bg_spacerow.gif phpBB Reloaded Styles/aphrodite_mc/images/green/bg_th.gif phpBB Reloaded Styles/aphrodite_mc/images/green/folder.gif phpBB Reloaded Styles/aphrodite_mc/images/green/folder_calendar.gif phpBB Reloaded Styles/aphrodite_mc/images/green/folder_calendar_own.gif phpBB Reloaded Styles/aphrodite_mc/images/green/folder_link.gif phpBB Reloaded Styles/aphrodite_mc/images/green/folder_locked.gif phpBB Reloaded Styles/aphrodite_mc/images/green/folder_moved.gif phpBB Reloaded Styles/aphrodite_mc/images/green/folder_new.gif phpBB Reloaded Styles/aphrodite_mc/images/green/folders.gif phpBB Reloaded Styles/aphrodite_mc/images/green/folders_new.gif phpBB Reloaded Styles/aphrodite_mc/images/green/icon_post.gif phpBB Reloaded Styles/aphrodite_mc/images/green/icon_post_new.gif phpBB Reloaded Styles/aphrodite_mc/images/green/icon_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/green/icon_reply_new.gif phpBB Reloaded Styles/aphrodite_mc/images/green/index.htm phpBB Reloaded Styles/aphrodite_mc/images/green/logo.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_important.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_important_new.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_important_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_important_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_locked.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_locked_new.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_locked_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_locked_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_moved.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_new.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_next.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_prev.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_sticky.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_sticky_new.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_sticky_new_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/green/post_sticky_posted.gif phpBB Reloaded Styles/aphrodite_mc/images/green/vote_lcap.gif phpBB Reloaded Styles/aphrodite_mc/images/green/vote_rcap.gif phpBB Reloaded Styles/aphrodite_mc/images/green/voting_bar.gif phpBB Reloaded Styles/aphrodite_mc/images/icon_calendar.gif phpBB Reloaded Styles/aphrodite_mc/images/icon_down_arrow.gif phpBB Reloaded Styles/aphrodite_mc/images/icon_minicat.gif phpBB Reloaded Styles/aphrodite_mc/images/icon_minicat_lock.gif phpBB Reloaded Styles/aphrodite_mc/images/icon_minicat_new.gif phpBB Reloaded Styles/aphrodite_mc/images/icon_minilink.gif phpBB Reloaded Styles/aphrodite_mc/images/index.htm phpBB Reloaded Styles/aphrodite_mc/images/lang_english/ phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/ phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/bs_command_add.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/bs_command_cancel.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/bs_command_check.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/bs_command_create.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/bs_command_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/bs_command_edit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/bs_command_export.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/bs_command_preview.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/bs_command_regen.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/bs_command_search.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/bs_command_select.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/bs_command_submit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/bs_command_synchro.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/index.htm phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/locked.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/new_post.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/new_topic.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/post_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/quick_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/topic_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/topic_lock.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/topic_move.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/topic_split.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/black/topic_unlock.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/ phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/bs_command_add.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/bs_command_cancel.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/bs_command_check.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/bs_command_create.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/bs_command_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/bs_command_edit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/bs_command_export.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/bs_command_preview.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/bs_command_regen.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/bs_command_search.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/bs_command_select.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/bs_command_submit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/bs_command_synchro.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/index.htm phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/locked.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/new_post.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/new_topic.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/post_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/quick_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/topic_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/topic_lock.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/topic_move.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/topic_split.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/blue/topic_unlock.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/ phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/bs_command_add.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/bs_command_cancel.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/bs_command_check.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/bs_command_create.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/bs_command_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/bs_command_edit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/bs_command_export.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/bs_command_preview.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/bs_command_regen.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/bs_command_search.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/bs_command_select.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/bs_command_submit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/bs_command_synchro.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/index.htm phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/locked.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/new_post.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/new_topic.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/post_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/quick_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/topic_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/topic_lock.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/topic_move.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/topic_split.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/darkgreen/topic_unlock.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/ phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/bs_command_add.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/bs_command_cancel.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/bs_command_check.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/bs_command_create.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/bs_command_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/bs_command_edit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/bs_command_export.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/bs_command_preview.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/bs_command_regen.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/bs_command_search.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/bs_command_select.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/bs_command_submit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/bs_command_synchro.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/index.htm phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/locked.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/new_post.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/new_topic.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/post_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/quick_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/topic_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/topic_lock.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/topic_move.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/topic_split.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/gray/topic_unlock.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/ phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/bs_command_add.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/bs_command_cancel.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/bs_command_check.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/bs_command_create.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/bs_command_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/bs_command_edit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/bs_command_export.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/bs_command_preview.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/bs_command_regen.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/bs_command_search.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/bs_command_select.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/bs_command_submit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/bs_command_synchro.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/index.htm phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/locked.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/new_post.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/new_topic.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/post_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/quick_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/topic_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/topic_lock.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/topic_move.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/topic_split.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/green/topic_unlock.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/icon_aim.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/icon_censor.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/icon_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/icon_edit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/icon_email.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/icon_icq.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/icon_ip.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/icon_msn.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/icon_pm.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/icon_profile.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/icon_quote.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/icon_search.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/icon_www.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/icon_yim.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/index.htm phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/ phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/bs_command_add.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/bs_command_cancel.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/bs_command_check.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/bs_command_create.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/bs_command_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/bs_command_edit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/bs_command_export.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/bs_command_preview.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/bs_command_regen.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/bs_command_search.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/bs_command_select.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/bs_command_submit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/bs_command_synchro.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/index.htm phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/locked.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/new_post.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/new_topic.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/post_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/quick_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/topic_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/topic_lock.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/topic_move.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/topic_split.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/lightblue/topic_unlock.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/ phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/bs_command_add.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/bs_command_cancel.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/bs_command_check.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/bs_command_create.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/bs_command_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/bs_command_edit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/bs_command_export.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/bs_command_preview.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/bs_command_regen.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/bs_command_search.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/bs_command_select.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/bs_command_submit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/bs_command_synchro.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/index.htm phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/locked.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/new_post.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/new_topic.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/post_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/quick_reply.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/topic_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/topic_lock.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/topic_move.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/topic_split.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/pink/topic_unlock.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/purple/ phpBB Reloaded Styles/aphrodite_mc/images/lang_english/purple/bs_command_add.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/purple/bs_command_cancel.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/purple/bs_command_check.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/purple/bs_command_create.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/purple/bs_command_delete.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/purple/bs_command_edit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/purple/bs_command_export.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/purple/bs_command_preview.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/purple/bs_command_regen.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/purple/bs_command_search.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/purple/bs_command_select.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/purple/bs_command_submit.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_english/purple/bs_command_synchro.gif phpBB Reloaded Styles/aphrodite_mc/images/lang_en... [truncated message content] |
From: <teh...@us...> - 2006-10-25 03:57:19
|
Revision: 270 http://svn.sourceforge.net/phpbbreloaded/?rev=270&view=rev Author: tehphpmaster Date: 2006-10-24 20:57:06 -0700 (Tue, 24 Oct 2006) Log Message: ----------- Fixing a small issue that was causing the Registration IP address feature to return 0.0.0.0 all the time (Bug #2). Thanks to Nox for reporting this issue. Modified Paths: -------------- phpBB Reloaded 2/admin/admin_users.php phpBB Reloaded 2/includes/usercp_register.php phpBB Reloaded 2/templates/subC1/admin/user_edit_body.tpl Modified: phpBB Reloaded 2/admin/admin_users.php =================================================================== --- phpBB Reloaded 2/admin/admin_users.php 2006-10-24 05:04:27 UTC (rev 269) +++ phpBB Reloaded 2/admin/admin_users.php 2006-10-25 03:57:06 UTC (rev 270) @@ -321,13 +321,13 @@ $allowbbcode = ( isset( $HTTP_POST_VARS['allowbbcode']) ) ? intval( $HTTP_POST_VARS['allowbbcode'] ) : $board_config['allow_bbcode']; $allowsmilies = ( isset( $HTTP_POST_VARS['allowsmilies']) ) ? intval( $HTTP_POST_VARS['allowsmilies'] ) : $board_config['allow_smilies']; $user_style = ( isset( $HTTP_POST_VARS['style'] ) ) ? intval( $HTTP_POST_VARS['style'] ) : $board_config['default_style']; - $user_lang = ( $HTTP_POST_VARS['language'] ) ? $HTTP_POST_VARS['language'] : $board_config['default_lang']; + $user_lang = ( $HTTP_POST_VARS['language'] ) ? $HTTP_POST_VARS['language'] : $board_config['default_lang']; //-- mod : Advanced Group Color Management ------------------------------------- //-- add $user_group_id = ( $HTTP_POST_VARS['user_group_id'] ) ? intval( $HTTP_POST_VARS['user_group_id'] ) : GROUP_REGISTERED; //-- fin mod : Advanced Group Color Management --------------------------------- - $user_timezone = ( isset( $HTTP_POST_VARS['timezone']) ) ? doubleval( $HTTP_POST_VARS['timezone'] ) : $board_config['board_timezone']; + $user_timezone = ( isset( $HTTP_POST_VARS['timezone']) ) ? doubleval( $HTTP_POST_VARS['timezone'] ) : $board_config['board_timezone']; $user_dateformat = ( $HTTP_POST_VARS['dateformat'] ) ? trim( $HTTP_POST_VARS['dateformat'] ) : $board_config['default_dateformat']; $user_avatar_local = ( isset( $HTTP_POST_VARS['avatarselect'] ) && !empty($HTTP_POST_VARS['submitavatar'] ) && $board_config['allow_avatar_local'] ) ? $HTTP_POST_VARS['avatarselect'] : ( ( isset( $HTTP_POST_VARS['avatarlocal'] ) ) ? $HTTP_POST_VARS['avatarlocal'] : '' ); @@ -826,17 +826,17 @@ } //-- fin mod : Advanced Group Color Management --------------------------------- - // We remove all stored login keys since the password has been updated - // and change the current one (if applicable) - if ( !empty($passwd_sql) ) - { - session_reset_keys($user_id, $user_ip); - } - - $message .= $lang['Admin_user_updated']; - } - else - { + // We remove all stored login keys since the password has been updated + // and change the current one (if applicable) + if ( !empty($passwd_sql) ) + { + session_reset_keys($user_id, $user_ip); + } + + $message .= $lang['Admin_user_updated']; + } + else + { message_die(GENERAL_ERROR, 'Admin_user_fail', '', __LINE__, __FILE__, $sql); } @@ -907,6 +907,7 @@ $user_regip = decode_ip($this_userdata['user_regip']); $icq = $this_userdata['user_icq']; + $user_regip = decode_ip($this_userdata['user_regip']); $aim = htmlspecialchars(str_replace('+', ' ', $this_userdata['user_aim'] )); $msn = htmlspecialchars($this_userdata['user_msnm']); $yim = htmlspecialchars($this_userdata['user_yim']); Modified: phpBB Reloaded 2/includes/usercp_register.php =================================================================== --- phpBB Reloaded 2/includes/usercp_register.php 2006-10-24 05:04:27 UTC (rev 269) +++ phpBB Reloaded 2/includes/usercp_register.php 2006-10-25 03:57:06 UTC (rev 270) @@ -740,8 +740,8 @@ // , user_qp_settings // , '" . $user_qp_settings . "' //-- modify - $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_qp_settings, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_group_id, user_style, user_level, user_allow_pm, user_active, user_actkey) - VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '" . $user_qp_settings . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', '$user_group_id', $user_style, 0, 1, "; + $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_regip, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_qp_settings, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_group_id, user_style, user_level, user_allow_pm, user_active, user_actkey) + VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . $userdata['session_ip'] . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '" . $user_qp_settings . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', '$user_group_id', $user_style, 0, 1, "; //-- fin mod : quick post es --------------------------------------------------- //-- fin mod : Advanced Group Color Management --------------------------------- if ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa ) Modified: phpBB Reloaded 2/templates/subC1/admin/user_edit_body.tpl =================================================================== --- phpBB Reloaded 2/templates/subC1/admin/user_edit_body.tpl 2006-10-24 05:04:27 UTC (rev 269) +++ phpBB Reloaded 2/templates/subC1/admin/user_edit_body.tpl 2006-10-25 03:57:06 UTC (rev 270) @@ -39,6 +39,11 @@ </td> </tr> <tr> + <td class="row1"><span class="gen">{L_REGIP}: </span></td> + <td class="row2"><span class="gen">{USER_REGIP}</span></td> + </td> + </tr> + <tr> <td class="catsides" colspan="2"> </td> </tr> <tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <teh...@us...> - 2006-10-24 05:04:37
|
Revision: 269 http://svn.sourceforge.net/phpbbreloaded/?rev=269&view=rev Author: tehphpmaster Date: 2006-10-23 22:04:27 -0700 (Mon, 23 Oct 2006) Log Message: ----------- Eeep, another URL error. Modified Paths: -------------- phpBB Reloaded 2/admin/index.php Modified: phpBB Reloaded 2/admin/index.php =================================================================== --- phpBB Reloaded 2/admin/index.php 2006-10-24 03:01:57 UTC (rev 268) +++ phpBB Reloaded 2/admin/index.php 2006-10-24 05:04:27 UTC (rev 269) @@ -695,7 +695,7 @@ 'server' => 'www.phpbbreloaded.com', 'root' => '/versionchecker/', 'file' => '20x.txt', - 'page' => 'http://www.phpbbreloaded.com/download.php', + 'page' => 'http://www.phpbbreloaded.com/downloads.php', 'protocol' => 'phpBB Reloaded', 'infos' => 'Mailing_list_subscribe_reminder', 'mods' => array( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <teh...@us...> - 2006-10-24 02:21:02
|
Revision: 264 http://svn.sourceforge.net/phpbbreloaded/?rev=264&view=rev Author: tehphpmaster Date: 2006-10-23 19:20:53 -0700 (Mon, 23 Oct 2006) Log Message: ----------- Making it harder for spammers to phish peoples data (such as MSN addresses etc.) by restricting where guest users can go. With a simple check anybody viewing the memberlist needs to log in, the same applies for viewing profiles. The other thing is a lang change entry; nothing major. Modified Paths: -------------- phpBB Reloaded 2/language/lang_english/lang_main.php phpBB Reloaded 2/memberlist.php phpBB Reloaded 2/privmsg.php phpBB Reloaded 2/profile.php Modified: phpBB Reloaded 2/language/lang_english/lang_main.php =================================================================== --- phpBB Reloaded 2/language/lang_english/lang_main.php 2006-10-23 22:57:16 UTC (rev 263) +++ phpBB Reloaded 2/language/lang_english/lang_main.php 2006-10-24 02:20:53 UTC (rev 264) @@ -203,7 +203,7 @@ $lang['Enter_password'] = 'Please enter your username and password to log in.'; $lang['Login'] = 'Log in'; $lang['Logout'] = 'Log out'; -$lang['Logout_Question'] = 'You are about to log out'; +$lang['Logout_Question'] = 'You are about to log out. Are you sure you want to do this?'; $lang['Forgotten_password'] = 'I forgot my password'; Modified: phpBB Reloaded 2/memberlist.php =================================================================== --- phpBB Reloaded 2/memberlist.php 2006-10-23 22:57:16 UTC (rev 263) +++ phpBB Reloaded 2/memberlist.php 2006-10-24 02:20:53 UTC (rev 264) @@ -26,6 +26,13 @@ // End session management // +//Silly spammers grabbing peoples data of memberlists, this'll stop 'em +if ($userdata['user_id'] == ANONYMOUS) +{ + redirect(append_sid("login.$phpEx?redirect=memberlist.$phpEx", true)); +} + + $navigation = new navigation(); $navigation->add('Memberlist', '', 'memberlist', '', ''); $navigation->display(); Modified: phpBB Reloaded 2/privmsg.php =================================================================== --- phpBB Reloaded 2/privmsg.php 2006-10-23 22:57:16 UTC (rev 263) +++ phpBB Reloaded 2/privmsg.php 2006-10-24 02:20:53 UTC (rev 264) @@ -53,7 +53,7 @@ $delete_all = ( isset($HTTP_POST_VARS['deleteall']) ) ? TRUE : 0; $save = ( isset($HTTP_POST_VARS['save']) ) ? TRUE : 0; -// start mod save posts as drafts...check to see if this is a draft and set parameters accordingly +// Check to see if this is a draft and set parameters accordingly if ( isset($HTTP_POST_VARS['save_as_draft']) ) { @@ -168,7 +168,7 @@ $mode = ( !empty($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; $mode = htmlspecialchars($mode); - // start mod save posts as drafts...check if this is a draft and if so set a flag ($was_a_draft) and set $mode to be 'edit' + // Check if this is a draft and if so set a flag ($was_a_draft) and set $mode to be 'edit' if ( $mode == 'draft' ) { Modified: phpBB Reloaded 2/profile.php =================================================================== --- phpBB Reloaded 2/profile.php 2006-10-23 22:57:16 UTC (rev 263) +++ phpBB Reloaded 2/profile.php 2006-10-24 02:20:53 UTC (rev 264) @@ -86,7 +86,12 @@ if ( $mode == 'viewprofile' ) { - include ($phpbb_root_path . 'includes/usercp_viewprofile.' . $phpEx); + if ($userdata['user_id'] == ANONYMOUS) + { + redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=viewprofile&" . POST_USERS_URL . '=' . intval($HTTP_GET_VARS[POST_USERS_URL]), true)); + } + + include($phpbb_root_path . 'includes/usercp_viewprofile.'.$phpEx); exit; } elseif ( $mode == 'editprofile' || $mode == 'register' ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <teh...@us...> - 2006-10-23 22:57:22
|
Revision: 263 http://svn.sourceforge.net/phpbbreloaded/?rev=263&view=rev Author: tehphpmaster Date: 2006-10-23 15:57:16 -0700 (Mon, 23 Oct 2006) Log Message: ----------- Eeeep, commiting a lang change regarding the mailing list. Modified Paths: -------------- phpBB Reloaded 2/language/lang_english/lang_admin.php Modified: phpBB Reloaded 2/language/lang_english/lang_admin.php =================================================================== --- phpBB Reloaded 2/language/lang_english/lang_admin.php 2006-10-23 04:42:56 UTC (rev 262) +++ phpBB Reloaded 2/language/lang_english/lang_admin.php 2006-10-23 22:57:16 UTC (rev 263) @@ -358,8 +358,8 @@ $lang['Autologin_time'] = 'Automatic login key expiry'; $lang['Autologin_time_explain'] = 'How long a autologin key is valid for in days if the user does not visit the board. Set to zero to disable expiry.'; -// Search Flood Control - added 2.0.20 -$lang['Search_Flood_Interval'] = 'Search Flood Interval'; +// Search Flood Control - added 2.0.20 +$lang['Search_Flood_Interval'] = 'Search Flood Interval'; $lang['Search_Flood_Interval_explain'] = 'Number of seconds a user must wait between search requests'; // @@ -811,7 +811,7 @@ $lang['Current_version_info'] = 'You are running <b>phpBB Reloaded %s</b>.'; $lang['Connect_socket_error'] = 'Unable to open connection to phpBB Reloaded Server, reported error is:<br />%s'; $lang['Socket_functions_disabled'] = 'Unable to use socket functions.'; -$lang['Mailing_list_subscribe_reminder'] = 'For the latest information on updates to phpBB Reloaded, why not <a href="http://www.phpbbreloaded.com/support/list/" target="_new">subscribe to our Mailing List</a>.'; +$lang['Mailing_list_subscribe_reminder'] = 'For the latest information on updates to phpBB Reloaded, why not <a href="http://www.phpbbreloaded.com/forum/groupcp.php?g=159" target="_new">subscribe to our Mailing List</a>.'; $lang['Version_information'] = 'Version Information'; // This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <teh...@us...> - 2006-10-23 04:43:05
|
Revision: 262 http://svn.sourceforge.net/phpbbreloaded/?rev=262&view=rev Author: tehphpmaster Date: 2006-10-22 21:42:56 -0700 (Sun, 22 Oct 2006) Log Message: ----------- Removing a couple of unnessary files, and editing a couple more. Modified Paths: -------------- phpBB Reloaded 2/admin/xs_frameset.php phpBB Reloaded 2/admin/xs_include.php Removed Paths: ------------- phpBB Reloaded 2/admin/admin_styles.php phpBB Reloaded 2/admin/xs_update.php Deleted: phpBB Reloaded 2/admin/admin_styles.php =================================================================== --- phpBB Reloaded 2/admin/admin_styles.php 2006-10-23 04:36:22 UTC (rev 261) +++ phpBB Reloaded 2/admin/admin_styles.php 2006-10-23 04:42:56 UTC (rev 262) @@ -1,1046 +0,0 @@ -<?php -//-- mod : categories hierarchy ------------------------------------------------ -/*************************************************************************** - * admin_styles.php - * ------------------- - * begin : Thursday, Jul 12, 2001 - * copyright : (C) 2001 The phpBB Group - * email : su...@ph... - * - * $Id: admin_styles.php,v 1.1.1.1 2006/02/24 02:28:51 markthedaemon Exp $ - * - * - ***************************************************************************/ - -/*************************************************************************** - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - ***************************************************************************/ - -define('IN_PHPBB', 1); - -if( !empty($setmodules) ) -{ - $file = basename(__FILE__); - $module['Styles']['Add_new'] = "$file?mode=addnew"; - $module['Styles']['Create_new'] = "$file?mode=create"; - $module['Styles']['Manage'] = $file; - $module['Styles']['Export'] = "$file?mode=export"; - return; -} - -// -// Load default header -// -// -// Check if the user has cancled a confirmation message. -// -$phpbb_root_path = "./../"; -require($phpbb_root_path . 'extension.inc'); - -$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE; -$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE; - -$no_page_header = (!empty($HTTP_POST_VARS['send_file']) || $cancel) ? TRUE : FALSE; - -require('./pagestart.' . $phpEx); - -$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE; -$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE; - -if ($cancel) -{ - redirect('admin/' . append_sid("admin_styles.$phpEx", true)); -} - -if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) -{ - $mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode']; - $mode = htmlspecialchars($mode); -} -else -{ - $mode = ""; -} - -switch( $mode ) -{ - case "addnew": - $install_to = ( isset($HTTP_GET_VARS['install_to']) ) ? urldecode($HTTP_GET_VARS['install_to']) : $HTTP_POST_VARS['install_to']; - $style_name = ( isset($HTTP_GET_VARS['style']) ) ? urldecode($HTTP_GET_VARS['style']) : $HTTP_POST_VARS['style']; - - if( isset($install_to) ) - { - - include($phpbb_root_path. "templates/" . basename($install_to) . "/theme_info.cfg"); - - $template_name = $$install_to; - $found = FALSE; - - for($i = 0; $i < count($template_name) && !$found; $i++) - { - if( $template_name[$i]['style_name'] == $style_name ) - { - while(list($key, $val) = each($template_name[$i])) - { - $db_fields[] = $key; - $db_values[] = str_replace("\'", "''" , $val); - } - } - } - - $sql = "INSERT INTO " . THEMES_TABLE . " ("; - - for($i = 0; $i < count($db_fields); $i++) - { - $sql .= $db_fields[$i]; - if($i != (count($db_fields) - 1)) - { - $sql .= ", "; - } - - } - - $sql .= ") VALUES ("; - - for($i = 0; $i < count($db_values); $i++) - { - $sql .= "'" . $db_values[$i] . "'"; - if($i != (count($db_values) - 1)) - { - $sql .= ", "; - } - } - $sql .= ")"; - - if( !$result = $db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, "Could not insert theme data!", "", __LINE__, __FILE__, $sql); - } - - $message = $lang['Theme_installed'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); - -//-- mod : categories hierarchy ------------------------------------------------ -//-- add - $themes = new themes(); - $themes->read(true); -//-- fin mod : categories hierarchy -------------------------------------------- - - message_die(GENERAL_MESSAGE, $message); - } - else - { - - $installable_themes = array(); - - if( $dir = @opendir($phpbb_root_path. "templates/") ) - { - while( $sub_dir = @readdir($dir) ) - { - if( !is_file(phpbb_realpath($phpbb_root_path . 'templates/' .$sub_dir)) && !is_link(phpbb_realpath($phpbb_root_path . 'templates/' .$sub_dir)) && $sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS" ) - { - if( @file_exists(@phpbb_realpath($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg")) ) - { - include($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg"); - - for($i = 0; $i < count($$sub_dir); $i++) - { - $working_data = $$sub_dir; -//-- mod : categories hierarchy ------------------------------------------------ -//-- add - if ( !empty($working_data) && is_array($working_data) ) - { - foreach ( $working_data as $style_id => $style_data ) - { - $working_data[$style_id]['install_to'] = $sub_dir; - } - } -//-- fin mod : categories hierarchy -------------------------------------------- - - $style_name = $working_data[$i]['style_name']; - - $sql = "SELECT themes_id - FROM " . THEMES_TABLE . " - WHERE style_name = '" . str_replace("\'", "''", $style_name) . "'"; - if(!$result = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Could not query themes table!", "", __LINE__, __FILE__, $sql); - } - - if(!$db->sql_numrows($result)) - { - $installable_themes[] = $working_data[$i]; - } - } - } - } - } - - $template->set_filenames(array( - "body" => "admin/styles_addnew_body.tpl") - ); - - $template->assign_vars(array( - "L_STYLES_TITLE" => $lang['Styles_admin'], - "L_STYLES_ADD_TEXT" => $lang['Styles_addnew_explain'], - "L_STYLE" => $lang['Style'], - "L_TEMPLATE" => $lang['Template'], - "L_INSTALL" => $lang['Install'], - "L_ACTION" => $lang['Action']) - ); - - for($i = 0; $i < count($installable_themes); $i++) - { - $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2']; - $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; - - $template->assign_block_vars("styles", array( - "ROW_CLASS" => $row_class, - "ROW_COLOR" => "#" . $row_color, - "STYLE_NAME" => $installable_themes[$i]['style_name'], - "TEMPLATE_NAME" => $installable_themes[$i]['template_name'], - -//-- mod : categories hierarchy ------------------------------------------------ -//-- delete -/* - "U_STYLES_INSTALL" => append_sid("admin_styles.$phpEx?mode=addnew&style=" . urlencode($installable_themes[$i]['style_name']) . "&install_to=" . urlencode($installable_themes[$i]['template_name']))) - ); -*/ -//-- add - 'U_STYLES_INSTALL' => $config->url('admin/admin_styles', array('mode' => 'addnew', 'style' => urlencode($installable_themes[$i]['style_name']), 'install_to' => urlencode($installable_themes[$i]['install_to'])), true), - )); - $template->set_switch('styles.light', !($i % 2)); -//-- fin mod : categories hierarchy -------------------------------------------- - - } - $template->pparse("body"); - - } - closedir($dir); - } - break; - - case "create": - case "edit": - $submit = ( isset($HTTP_POST_VARS['submit']) ) ? TRUE : 0; - - if( $submit ) - { - // - // DAMN! Thats alot of data to validate... - // - $updated['style_name'] = $HTTP_POST_VARS['style_name']; - $updated['template_name'] = $HTTP_POST_VARS['template_name']; - $updated['head_stylesheet'] = $HTTP_POST_VARS['head_stylesheet']; - $updated['body_background'] = $HTTP_POST_VARS['body_background']; - $updated['body_bgcolor'] = $HTTP_POST_VARS['body_bgcolor']; - $updated['body_text'] = $HTTP_POST_VARS['body_text']; - $updated['body_link'] = $HTTP_POST_VARS['body_link']; - $updated['body_vlink'] = $HTTP_POST_VARS['body_vlink']; - $updated['body_alink'] = $HTTP_POST_VARS['body_alink']; - $updated['body_hlink'] = $HTTP_POST_VARS['body_hlink']; - $updated['tr_color1'] = $HTTP_POST_VARS['tr_color1']; - $updated_name['tr_color1_name'] = $HTTP_POST_VARS['tr_color1_name']; - $updated['tr_color2'] = $HTTP_POST_VARS['tr_color2']; - $updated_name['tr_color2_name'] = $HTTP_POST_VARS['tr_color2_name']; - $updated['tr_color3'] = $HTTP_POST_VARS['tr_color3']; - $updated_name['tr_color3_name'] = $HTTP_POST_VARS['tr_color3_name']; - $updated['tr_class1'] = $HTTP_POST_VARS['tr_class1']; - $updated_name['tr_class1_name'] = $HTTP_POST_VARS['tr_class1_name']; - $updated['tr_class2'] = $HTTP_POST_VARS['tr_class2']; - $updated_name['tr_class2_name'] = $HTTP_POST_VARS['tr_class2_name']; - $updated['tr_class3'] = $HTTP_POST_VARS['tr_class3']; - $updated_name['tr_class3_name'] = $HTTP_POST_VARS['tr_class3_name']; - $updated['th_color1'] = $HTTP_POST_VARS['th_color1']; - $updated_name['th_color1_name'] = $HTTP_POST_VARS['th_color1_name']; - $updated['th_color2'] = $HTTP_POST_VARS['th_color2']; - $updated_name['th_color2_name'] = $HTTP_POST_VARS['th_color2_name']; - $updated['th_color3'] = $HTTP_POST_VARS['th_color3']; - $updated_name['th_color3_name'] = $HTTP_POST_VARS['th_color3_name']; - $updated['th_class1'] = $HTTP_POST_VARS['th_class1']; - $updated_name['th_class1_name'] = $HTTP_POST_VARS['th_class1_name']; - $updated['th_class2'] = $HTTP_POST_VARS['th_class2']; - $updated_name['th_class2_name'] = $HTTP_POST_VARS['th_class2_name']; - $updated['th_class3'] = $HTTP_POST_VARS['th_class3']; - $updated_name['th_class3_name'] = $HTTP_POST_VARS['th_class3_name']; - $updated['td_color1'] = $HTTP_POST_VARS['td_color1']; - $updated_name['td_color1_name'] = $HTTP_POST_VARS['td_color1_name']; - $updated['td_color2'] = $HTTP_POST_VARS['td_color2']; - $updated_name['td_color2_name'] = $HTTP_POST_VARS['td_color2_name']; - $updated['td_color3'] = $HTTP_POST_VARS['td_color3']; - $updated_name['td_color3_name'] = $HTTP_POST_VARS['td_color3_name']; - $updated['td_class1'] = $HTTP_POST_VARS['td_class1']; - $updated_name['td_class1_name'] = $HTTP_POST_VARS['td_class1_name']; - $updated['td_class2'] = $HTTP_POST_VARS['td_class2']; - $updated_name['td_class2_name'] = $HTTP_POST_VARS['td_class2_name']; - $updated['td_class3'] = $HTTP_POST_VARS['td_class3']; - $updated_name['td_class3_name'] = $HTTP_POST_VARS['td_class3_name']; - $updated['fontface1'] = $HTTP_POST_VARS['fontface1']; - $updated_name['fontface1_name'] = $HTTP_POST_VARS['fontface1_name']; - $updated['fontface2'] = $HTTP_POST_VARS['fontface2']; - $updated_name['fontface2_name'] = $HTTP_POST_VARS['fontface2_name']; - $updated['fontface3'] = $HTTP_POST_VARS['fontface3']; - $updated_name['fontface3_name'] = $HTTP_POST_VARS['fontface3_name']; - $updated['fontsize1'] = intval($HTTP_POST_VARS['fontsize1']); - $updated_name['fontsize1_name'] = $HTTP_POST_VARS['fontsize1_name']; - $updated['fontsize2'] = intval($HTTP_POST_VARS['fontsize2']); - $updated_name['fontsize2_name'] = $HTTP_POST_VARS['fontsize2_name']; - $updated['fontsize3'] = intval($HTTP_POST_VARS['fontsize3']); - $updated_name['fontsize3_name'] = $HTTP_POST_VARS['fontsize3_name']; - $updated['fontcolor1'] = $HTTP_POST_VARS['fontcolor1']; - $updated_name['fontcolor1_name'] = $HTTP_POST_VARS['fontcolor1_name']; - $updated['fontcolor2'] = $HTTP_POST_VARS['fontcolor2']; - $updated_name['fontcolor2_name'] = $HTTP_POST_VARS['fontcolor2_name']; - $updated['fontcolor3'] = $HTTP_POST_VARS['fontcolor3']; - $updated_name['fontcolor3_name'] = $HTTP_POST_VARS['fontcolor3_name']; - $updated['span_class1'] = $HTTP_POST_VARS['span_class1']; - $updated_name['span_class1_name'] = $HTTP_POST_VARS['span_class1_name']; - $updated['span_class2'] = $HTTP_POST_VARS['span_class2']; - $updated_name['span_class2_name'] = $HTTP_POST_VARS['span_class2_name']; - $updated['span_class3'] = $HTTP_POST_VARS['span_class3']; - $updated_name['span_class3_name'] = $HTTP_POST_VARS['span_class3_name']; - $style_id = intval($HTTP_POST_VARS['style_id']); - // - // Wheeeew! Thank heavens for copy and paste and search and replace :D - // - -//-- mod : categories hierarchy ------------------------------------------------ -//-- add - $updated['images_pack'] = _read('images_pack', TYPE_NO_HTML); - $updated['custom_tpls'] = _read('custom_tpls', TYPE_NO_HTML); - - // let's perform some checks - if ( !empty($updated['images_pack']) ) - { - if ( !file_exists(phpbb_realpath($config->root . 'templates/' . $updated['template_name'] . '/' . $updated['images_pack'])) || is_dir(phpbb_realpath($config->root . 'templates/' . $updated['template_name'] . '/' . $updated['images_pack'])) || is_link(phpbb_realpath($config->root . 'templates/' . $updated['template_name'] . '/' . $updated['images_pack'])) ) - { - _error('Images_pack_not_found'); - } - } - if ( !empty($updated['custom_tpls']) ) - { - if ( !file_exists(phpbb_realpath($config->root . 'templates/' . $updated['template_name'] . '/' . $updated['custom_tpls'])) || !is_dir(phpbb_realpath($config->root . 'templates/' . $updated['template_name'] . '/' . $updated['custom_tpls'])) ) - { - _error('Custom_tpls_not_found'); - } - } - if ( !empty($updated['head_stylesheet']) ) - { - if ( !file_exists(phpbb_realpath($config->root . 'templates/' . $updated['template_name'] . '/' . $updated['head_stylesheet'])) ) - { - _error('Head_stylesheet_not_found'); - } - } - if ( $error ) - { - message_die(GENERAL_MESSAGE, $error_msg); - } -//-- fin mod : categories hierarchy -------------------------------------------- - - if($mode == "edit") - { - $sql = "UPDATE " . THEMES_TABLE . " SET "; - $count = 0; - - while(list($key, $val) = each($updated)) - { - if($count != 0) - { - $sql .= ", "; - } - - // - // I don't like this but it'll keep MSSQL from throwing - // an error and save me alot of typing - // - $sql .= ( stristr($key, "fontsize") ) ? "$key = $val" : "$key = '" . str_replace("\'", "''", $val) . "'"; - - $count++; - } - - $sql .= " WHERE themes_id = $style_id"; - - if(!$result = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Could not update themes table!", "", __LINE__, __FILE__, $sql); - } - - // - // Check if there's a names table entry for this style - // - $sql = "SELECT themes_id - FROM " . THEMES_NAME_TABLE . " - WHERE themes_id = $style_id"; - if(!$result = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Could not get data from themes_name table", "", __LINE__, __FILE__, $sql); - } - - if($db->sql_numrows($result) > 0) - { - $sql = "UPDATE " . THEMES_NAME_TABLE . " - SET "; - $count = 0; - while(list($key, $val) = each($updated_name)) - { - if($count != 0) - { - $sql .= ", "; - } - - $sql .= "$key = '$val'"; - - $count++; - } - - $sql .= " WHERE themes_id = $style_id"; - } - else - { - // - // Nope, no names entry so we create a new one. - // - $sql = "INSERT INTO " . THEMES_NAME_TABLE . " (themes_id, "; - while(list($key, $val) = each($updated_name)) - { - $fields[] = $key; - $vals[] = str_replace("\'", "''", $val); - } - - for($i = 0; $i < count($fields); $i++) - { - if($i > 0) - { - $sql .= ", "; - } - $sql .= $fields[$i]; - } - - $sql .= ") VALUES ($style_id, "; - for($i = 0; $i < count($vals); $i++) - { - if($i > 0) - { - $sql .= ", "; - } - $sql .= "'" . $vals[$i] . "'"; - } - - $sql .= ")"; - } - - if(!$result = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Could not update themes name table!", "", __LINE__, __FILE__, $sql); - } - - $message = $lang['Theme_updated'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); - -//-- mod : categories hierarchy ------------------------------------------------ -//-- add - $themes = new themes(); - $themes->read(true); -//-- fin mod : categories hierarchy -------------------------------------------- - - message_die(GENERAL_MESSAGE, $message); - } - else - { - // - // First, check if we already have a style by this name - // - $sql = "SELECT themes_id - FROM " . THEMES_TABLE . " - WHERE style_name = '" . str_replace("\'", "''", $updated['style_name']) . "'"; - if(!$result = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Could not query themes table", "", __LINE__, __FILE__, $sql); - } - - if($db->sql_numrows($result)) - { - message_die(GENERAL_ERROR, $lang['Style_exists'], $lang['Error']); - } - - while(list($key, $val) = each($updated)) - { - $field_names[] = $key; - - if(stristr($key, "fontsize")) - { - $values[] = "$val"; - } - else - { - $values[] = "'" . str_replace("\'", "''", $val) . "'"; - } - } - - $sql = "INSERT - INTO " . THEMES_TABLE . " ("; - for($i = 0; $i < count($field_names); $i++) - { - if($i != 0) - { - $sql .= ", "; - } - $sql .= $field_names[$i]; - } - - $sql .= ") VALUES ("; - for($i = 0; $i < count($values); $i++) - { - if($i != 0) - { - $sql .= ", "; - } - $sql .= $values[$i]; - } - $sql .= ")"; - - if(!$result = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Could not update themes table!", "", __LINE__, __FILE__, $sql); - } - - $style_id = $db->sql_nextid(); - - // - // Insert names data - // - $sql = "INSERT INTO " . THEMES_NAME_TABLE . " (themes_id, "; - while(list($key, $val) = each($updated_name)) - { - $fields[] = $key; - $vals[] = $val; - } - - for($i = 0; $i < count($fields); $i++) - { - if($i > 0) - { - $sql .= ", "; - } - $sql .= $fields[$i]; - } - - $sql .= ") VALUES ($style_id, "; - for($i = 0; $i < count($vals); $i++) - { - if($i > 0) - { - $sql .= ", "; - } - $sql .= "'" . $vals[$i] . "'"; - } - - $sql .= ")"; - - if(!$result = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Could not insert themes name table!", "", __LINE__, __FILE__, $sql); - } - - $message = $lang['Theme_created'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); - -//-- mod : categories hierarchy ------------------------------------------------ -//-- add - $themes = new themes(); - $themes->read(true); -//-- fin mod : categories hierarchy -------------------------------------------- - - message_die(GENERAL_MESSAGE, $message); - } - } - else - { - if($mode == "edit") - { - $themes_title = $lang['Edit_theme']; - $themes_explain = $lang['Edit_theme_explain']; - - $style_id = intval($HTTP_GET_VARS['style_id']); - - $selected_names = array(); - $selected_values = array(); - // - // Fetch the Theme Info from the db - // - $sql = "SELECT * - FROM " . THEMES_TABLE . " - WHERE themes_id = $style_id"; - if(!$result = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Could not get data from themes table", "", __LINE__, __FILE__, $sql); - } - - if ( $selected_values = $db->sql_fetchrow($result) ) - { - while(list($key, $val) = @each($selected_values)) - { - $selected[$key] = $val; - } - } - - // - // Fetch the Themes Name data - // - $sql = "SELECT * - FROM " . THEMES_NAME_TABLE . " - WHERE themes_id = $style_id"; - if(!$result = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Could not get data from themes name table", "", __LINE__, __FILE__, $sql); - } - - if ( $selected_names = $db->sql_fetchrow($result) ) - { - while(list($key, $val) = @each($selected_names)) - { - $selected[$key] = $val; - } - } - - $s_hidden_fields = '<input type="hidden" name="style_id" value="' . $style_id . '" />'; - } - else - { - $themes_title = $lang['Create_theme']; - $themes_explain = $lang['Create_theme_explain']; - } - - $template->set_filenames(array( - "body" => "admin/styles_edit_body.tpl") - ); - - if( $dir = @opendir($phpbb_root_path . 'templates/') ) - { - $s_template_select = '<select name="template_name">'; - while( $file = @readdir($dir) ) - { - if( !is_file(phpbb_realpath($phpbb_root_path . 'templates/' . $file)) && !is_link(phpbb_realpath($phpbb_root_path . 'templates/' . $file)) && $file != "." && $file != ".." && $file != "CVS" ) - { - if($file == $selected['template_name']) - { - $s_template_select .= '<option value="' . $file . '" selected="selected">' . $file . "</option>\n"; - } - else - { - $s_template_select .= '<option value="' . $file . '">' . $file . "</option>\n"; - } - } - } - $s_template_select .= '</select>'; - } - else - { - message_die(GENERAL_MESSAGE, $lang['No_template_dir']); - } - - $s_hidden_fields .= '<input type="hidden" name="mode" value="' . $mode . '" />'; - - $template->assign_vars(array( -//-- mod : categories hierarchy ------------------------------------------------ -//-- add - 'L_IMAGES_PACK' => $lang['Images_pack'], - 'L_IMAGES_PACK_EXPLAIN' => $lang['Images_pack_explain'], - 'IMAGES_PACK' => $selected['images_pack'], - 'L_CUSTOM_TPLS' => $lang['Custom_tpls'], - 'L_CUSTOM_TPLS_EXPLAIN' => $lang['Custom_tpls_explain'], - 'CUSTOM_TPLS' => $selected['custom_tpls'], -//-- fin mod : categories hierarchy -------------------------------------------- - "L_THEMES_TITLE" => $themes_title, - "L_THEMES_EXPLAIN" => $themes_explain, - "L_THEME_NAME" => $lang['Theme_name'], - "L_TEMPLATE" => $lang['Template'], - "L_THEME_SETTINGS" => $lang['Theme_settings'], - "L_THEME_ELEMENT" => $lang['Theme_element'], - "L_SIMPLE_NAME" => $lang['Simple_name'], - "L_VALUE" => $lang['Value'], - "L_STYLESHEET" => $lang['Stylesheet'], - "L_STYLESHEET_EXPLAIN" => $lang['Stylesheet_explain'], - "L_BACKGROUND_IMAGE" => $lang['Background_image'], - "L_BACKGROUND_COLOR" => $lang['Background_color'], - "L_BODY_TEXT_COLOR" => $lang['Text_color'], - "L_BODY_LINK_COLOR" => $lang['Link_color'], - "L_BODY_VLINK_COLOR" => $lang['VLink_color'], - "L_BODY_ALINK_COLOR" => $lang['ALink_color'], - "L_BODY_HLINK_COLOR" => $lang['HLink_color'], - "L_TR_COLOR1" => $lang['Tr_color1'], - "L_TR_COLOR2" => $lang['Tr_color2'], - "L_TR_COLOR3" => $lang['Tr_color3'], - "L_TR_CLASS1" => $lang['Tr_class1'], - "L_TR_CLASS2" => $lang['Tr_class2'], - "L_TR_CLASS3" => $lang['Tr_class3'], - "L_TH_COLOR1" => $lang['Th_color1'], - "L_TH_COLOR2" => $lang['Th_color2'], - "L_TH_COLOR3" => $lang['Th_color3'], - "L_TH_CLASS1" => $lang['Th_class1'], - "L_TH_CLASS2" => $lang['Th_class2'], - "L_TH_CLASS3" => $lang['Th_class3'], - "L_TD_COLOR1" => $lang['Td_color1'], - "L_TD_COLOR2" => $lang['Td_color2'], - "L_TD_COLOR3" => $lang['Td_color3'], - "L_TD_CLASS1" => $lang['Td_class1'], - "L_TD_CLASS2" => $lang['Td_class2'], - "L_TD_CLASS3" => $lang['Td_class3'], - "L_FONTFACE_1" => $lang['fontface1'], - "L_FONTFACE_2" => $lang['fontface2'], - "L_FONTFACE_3" => $lang['fontface3'], - "L_FONTSIZE_1" => $lang['fontsize1'], - "L_FONTSIZE_2" => $lang['fontsize2'], - "L_FONTSIZE_3" => $lang['fontsize3'], - "L_FONTCOLOR_1" => $lang['fontcolor1'], - "L_FONTCOLOR_2" => $lang['fontcolor2'], - "L_FONTCOLOR_3" => $lang['fontcolor3'], - "L_SPAN_CLASS_1" => $lang['span_class1'], - "L_SPAN_CLASS_2" => $lang['span_class2'], - "L_SPAN_CLASS_3" => $lang['span_class3'], - "L_SAVE_SETTINGS" => $lang['Save_Settings'], - "THEME_NAME" => $selected['style_name'], - "HEAD_STYLESHEET" => $selected['head_stylesheet'], - "BODY_BACKGROUND" => $selected['body_background'], - "BODY_BGCOLOR" => $selected['body_bgcolor'], - "BODY_TEXT_COLOR" => $selected['body_text'], - "BODY_LINK_COLOR" => $selected['body_link'], - "BODY_VLINK_COLOR" => $selected['body_vlink'], - "BODY_ALINK_COLOR" => $selected['body_alink'], - "BODY_HLINK_COLOR" => $selected['body_hlink'], - "TR_COLOR1" => $selected['tr_color1'], - "TR_COLOR2" => $selected['tr_color2'], - "TR_COLOR3" => $selected['tr_color3'], - "TR_CLASS1" => $selected['tr_class1'], - "TR_CLASS2" => $selected['tr_class2'], - "TR_CLASS3" => $selected['tr_class3'], - "TH_COLOR1" => $selected['th_color1'], - "TH_COLOR2" => $selected['th_color2'], - "TH_COLOR3" => $selected['th_color3'], - "TH_CLASS1" => $selected['th_class1'], - "TH_CLASS2" => $selected['th_class2'], - "TH_CLASS3" => $selected['th_class3'], - "TD_COLOR1" => $selected['td_color1'], - "TD_COLOR2" => $selected['td_color2'], - "TD_COLOR3" => $selected['td_color3'], - "TD_CLASS1" => $selected['td_class1'], - "TD_CLASS2" => $selected['td_class2'], - "TD_CLASS3" => $selected['td_class3'], - "FONTFACE1" => $selected['fontface1'], - "FONTFACE2" => $selected['fontface2'], - "FONTFACE3" => $selected['fontface3'], - "FONTSIZE1" => $selected['fontsize1'], - "FONTSIZE2" => $selected['fontsize2'], - "FONTSIZE3" => $selected['fontsize3'], - "FONTCOLOR1" => $selected['fontcolor1'], - "FONTCOLOR2" => $selected['fontcolor2'], - "FONTCOLOR3" => $selected['fontcolor3'], - "SPAN_CLASS1" => $selected['span_class1'], - "SPAN_CLASS2" => $selected['span_class2'], - "SPAN_CLASS3" => $selected['span_class3'], - - "TR_COLOR1_NAME" => $selected['tr_color1_name'], - "TR_COLOR2_NAME" => $selected['tr_color2_name'], - "TR_COLOR3_NAME" => $selected['tr_color3_name'], - "TR_CLASS1_NAME" => $selected['tr_class1_name'], - "TR_CLASS2_NAME" => $selected['tr_class2_name'], - "TR_CLASS3_NAME" => $selected['tr_class3_name'], - "TH_COLOR1_NAME" => $selected['th_color1_name'], - "TH_COLOR2_NAME" => $selected['th_color2_name'], - "TH_COLOR3_NAME" => $selected['th_color3_name'], - "TH_CLASS1_NAME" => $selected['th_class1_name'], - "TH_CLASS2_NAME" => $selected['th_class2_name'], - "TH_CLASS3_NAME" => $selected['th_class3_name'], - "TD_COLOR1_NAME" => $selected['td_color1_name'], - "TD_COLOR2_NAME" => $selected['td_color2_name'], - "TD_COLOR3_NAME" => $selected['td_color3_name'], - "TD_CLASS1_NAME" => $selected['td_class1_name'], - "TD_CLASS2_NAME" => $selected['td_class2_name'], - "TD_CLASS3_NAME" => $selected['td_class3_name'], - "FONTFACE1_NAME" => $selected['fontface1_name'], - "FONTFACE2_NAME" => $selected['fontface2_name'], - "FONTFACE3_NAME" => $selected['fontface3_name'], - "FONTSIZE1_NAME" => $selected['fontsize1_name'], - "FONTSIZE2_NAME" => $selected['fontsize2_name'], - "FONTSIZE3_NAME" => $selected['fontsize3_name'], - "FONTCOLOR1_NAME" => $selected['fontcolor1_name'], - "FONTCOLOR2_NAME" => $selected['fontcolor2_name'], - "FONTCOLOR3_NAME" => $selected['fontcolor3_name'], - "SPAN_CLASS1_NAME" => $selected['span_class1_name'], - "SPAN_CLASS2_NAME" => $selected['span_class2_name'], - "SPAN_CLASS3_NAME" => $selected['span_class3_name'], - - "S_THEME_ACTION" => append_sid("admin_styles.$phpEx"), - "S_TEMPLATE_SELECT" => $s_template_select, - "S_HIDDEN_FIELDS" => $s_hidden_fields) - ); - - $template->pparse("body"); - } - break; - - case "export"; - if($HTTP_POST_VARS['export_template']) - { - $template_name = $HTTP_POST_VARS['export_template']; - - $sql = "SELECT * - FROM " . THEMES_TABLE . " - WHERE template_name = '" . str_replace("\'", "''", $template_name) . "'"; - if(!$result = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Could not get theme data for selected template", "", __LINE__, __FILE__, $sql); - } - - $theme_rowset = $db->sql_fetchrowset($result); - - if( count($theme_rowset) == 0 ) - { - message_die(GENERAL_MESSAGE, $lang['No_themes']); - } - - $theme_data = '<?php'."\n\n"; - $theme_data .= "//\n// phpBB 2.x auto-generated theme config file for $template_name\n// Do not change anything in this file!\n//\n\n"; - - for($i = 0; $i < count($theme_rowset); $i++) - { - while(list($key, $val) = each($theme_rowset[$i])) - { - if(!intval($key) && $key != "0" && $key != "themes_id") - { - $theme_data .= '$' . $template_name . "[$i]['$key'] = \"" . addslashes($val) . "\";\n"; - } - } - $theme_data .= "\n"; - } - - $theme_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused! - - @umask(0111); - - $fp = @fopen($phpbb_root_path . 'templates/' . basename($template_name) . '/theme_info.cfg', 'w'); - - if( !$fp ) - { - // - // Unable to open the file writeable do something here as an attempt - // to get around that... - // - $s_hidden_fields = '<input type="hidden" name="theme_info" value="' . htmlspecialchars($theme_data) . '" />'; - $s_hidden_fields .= '<input type="hidden" name="send_file" value="1" /><input type="hidden" name="mode" value="export" />'; - - $download_form = '<form action="' . append_sid("admin_styles.$phpEx") . '" method="post"><input class="mainoption" type="submit" name="submit" value="' . $lang['Download'] . '" />' . $s_hidden_fields; - - $template->set_filenames(array( - "body" => "message_body.tpl") - ); - - $template->assign_vars(array( - "MESSAGE_TITLE" => $lang['Export_themes'], - "MESSAGE_TEXT" => $lang['Download_theme_cfg'] . "<br /><br />" . $download_form) - ); - - $template->pparse('body'); - exit(); - } - - $result = @fputs($fp, $theme_data, strlen($theme_data)); - fclose($fp); - - $message = $lang['Theme_info_saved'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); - - message_die(GENERAL_MESSAGE, $message); - - } - else if($HTTP_POST_VARS['send_file']) - { - - header("Content-Type: text/x-delimtext; name=\"theme_info.cfg\""); - header("Content-disposition: attachment; filename=theme_info.cfg"); - - echo stripslashes($HTTP_POST_VARS['theme_info']); - } - else - { - $template->set_filenames(array( - "body" => "admin/styles_exporter.tpl") - ); - - if( $dir = @opendir($phpbb_root_path . 'templates/') ) - { - $s_template_select = '<select name="export_template">'; - while( $file = @readdir($dir) ) - { - if( !is_file(phpbb_realpath($phpbb_root_path . 'templates/' . $file)) && !is_link(phpbb_realpath($phpbb_root_path . 'templates/' .$file)) && $file != "." && $file != ".." && $file != "CVS" ) - { - $s_template_select .= '<option value="' . $file . '">' . $file . "</option>\n"; - } - } - $s_template_select .= '</select>'; - } - else - { - message_die(GENERAL_MESSAGE, $lang['No_template_dir']); - } - - $template->assign_vars(array( - "L_STYLE_EXPORTER" => $lang['Export_themes'], - "L_EXPORTER_EXPLAIN" => $lang['Export_explain'], - "L_TEMPLATE_SELECT" => $lang['Select_template'], - "L_SUBMIT" => $lang['Submit'], - - "S_EXPORTER_ACTION" => append_sid("admin_styles.$phpEx?mode=export"), - "S_TEMPLATE_SELECT" => $s_template_select) - ); - - $template->pparse("body"); - - } - break; - - case "delete": - $style_id = ( isset($HTTP_GET_VARS['style_id']) ) ? intval($HTTP_GET_VARS['style_id']) : intval($HTTP_POST_VARS['style_id']); - - if( !$confirm ) - { - if($style_id == $board_config['default_style']) - { - message_die(GENERAL_MESSAGE, $lang['Cannot_remove_style']); - } - - $hidden_fields = '<input type="hidden" name="mode" value="'.$mode.'" /><input type="hidden" name="style_id" value="'.$style_id.'" />'; - - // - // Set template files - // - $template->set_filenames(array( - "confirm" => "admin/confirm_body.tpl") - ); - - - $template->assign_vars(array( - "MESSAGE_TITLE" => $lang['Confirm'], - "MESSAGE_TEXT" => $lang['Confirm_delete_style'], - - "L_YES" => $lang['Yes'], - "L_NO" => $lang['No'], - - "S_CONFIRM_ACTION" => append_sid("admin_styles.$phpEx"), - "S_HIDDEN_FIELDS" => $hidden_fields) - ); - - $template->pparse("confirm"); - - } - else - { - // - // The user has confirmed the delete. Remove the style, the style element - // names and update any users who might be using this style - // - $sql = "DELETE FROM " . THEMES_TABLE . " - WHERE themes_id = $style_id"; - if(!$result = $db->sql_query($sql, BEGIN_TRANSACTION)) - { - message_die(GENERAL_ERROR, "Could not remove style data!", "", __LINE__, __FILE__, $sql); - } - - // - // There may not be any theme name data so don't throw an error - // if the SQL dosan't work - // - $sql = "DELETE FROM " . THEMES_NAME_TABLE . " - WHERE themes_id = $style_id"; - $db->sql_query($sql); - - $sql = "UPDATE " . USERS_TABLE . " - SET user_style = " . $board_config['default_style'] . " - WHERE user_style = $style_id"; - if(!$result = $db->sql_query($sql, END_TRANSACTION)) - { - message_die(GENERAL_ERROR, "Could not update user style information", "", __LINE__, __FILE__, $sql); - } - - $message = $lang['Style_removed'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); - -//-- mod : categories hierarchy ------------------------------------------------ -//-- add - // recache themes - $themes = new themes(); - $themes->read(true); - - // update also forums - $sql = 'UPDATE ' . FORUMS_TABLE . ' - SET forum_style = ' . $config->data['default_style'] . ' - WHERE forum_style = ' . intval($style_id); - $db->sql_query($sql, false, __LINE__, __FILE__); - if ( $db->sql_affectedrows() ) - { - // recache forums - include_once($config->url('includes/class_forums')); - $forums = new forums(); - $forums->read(true); - } -//-- fin mod : categories hierarchy -------------------------------------------- - - message_die(GENERAL_MESSAGE, $message); - } - break; - - default: - - $sql = "SELECT themes_id, template_name, style_name - FROM " . THEMES_TABLE . " - ORDER BY template_name"; - if(!$result = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Could not get style information!", "", __LINE__, __FILE__, $sql); - } - - $style_rowset = $db->sql_fetchrowset($result); - - $template->set_filenames(array( - "body" => "admin/styles_list_body.tpl") - ); - - $template->assign_vars(array( - "L_STYLES_TITLE" => $lang['Styles_admin'], - "L_STYLES_TEXT" => $lang['Styles_explain'], - "L_STYLE" => $lang['Style'], - "L_TEMPLATE" => $lang['Template'], - "L_EDIT" => $lang['Edit'], - "L_DELETE" => $lang['Delete']) - ); - - for($i = 0; $i < count($style_rowset); $i++) - { - $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2']; - $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; - - $template->assign_block_vars("styles", array( - "ROW_CLASS" => $row_class, - "ROW_COLOR" => $row_color, - "STYLE_NAME" => $style_rowset[$i]['style_name'], - "TEMPLATE_NAME" => $style_rowset[$i]['template_name'], - - "U_STYLES_EDIT" => append_sid("admin_styles.$phpEx?mode=edit&style_id=" . $style_rowset[$i]['themes_id']), - "U_STYLES_DELETE" => append_sid("admin_styles.$phpEx?mode=delete&style_id=" . $style_rowset[$i]['themes_id'])) - ); -//-- mod : categories hierarchy ------------------------------------------------ -//-- add - $template->set_switch('styles.light', !($i % 2)); -//-- fin mod : categories hierarchy -------------------------------------------- - } - - $template->pparse("body"); - break; -} - -if (empty($HTTP_POST_VARS['send_file'])) -{ - include('./page_footer_admin.'.$phpEx); -} - -?> \ No newline at end of file Modified: phpBB Reloaded 2/admin/xs_frameset.php =================================================================== --- phpBB Reloaded 2/admin/xs_frameset.php 2006-10-23 04:36:22 UTC (rev 261) +++ phpBB Reloaded 2/admin/xs_frameset.php 2006-10-23 04:42:56 UTC (rev 262) @@ -75,7 +75,6 @@ 'edittpl' => append_sid('xs_edit.'.$get_data), 'editdb' => append_sid('xs_edit_data.'.$get_data), 'exportdb' => append_sid('xs_export_data.'.$get_data), - 'updates' => append_sid('xs_update.'.$get_data), 'portal' => append_sid('xs_portal.'.$get_data), 'style_config' => append_sid('xs_style_config.'.$get_data), ); Modified: phpBB Reloaded 2/admin/xs_include.php =================================================================== --- phpBB Reloaded 2/admin/xs_include.php 2006-10-23 04:36:22 UTC (rev 261) +++ phpBB Reloaded 2/admin/xs_include.php 2006-10-23 04:42:56 UTC (rev 262) @@ -81,7 +81,6 @@ 'edittpl', 'editdb', 'exportdb', - 'updates', ); Deleted: phpBB Reloaded 2/admin/xs_update.php =================================================================== --- phpBB Reloaded 2/admin/xs_update.php 2006-10-23 04:36:22 UTC (rev 261) +++ phpBB Reloaded 2/admin/xs_update.php 2006-10-23 04:42:56 UTC (rev 262) @@ -1,320 +0,0 @@ -<?php - -/*************************************************************************** - * xs_update.php - * ------------- - * copyright : (C) 2003 - 2005 CyberAlien - * support : http://www.phpbbstyles.com - * - * version : 2.3.1 - * - * file revision : 72 - * project revision : 78 - * last modified : 05 Dec 2005 13:54:54 - * - ***************************************************************************/ - -/*************************************************************************** - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - ***************************************************************************/ - -define('IN_PHPBB', 1); -$phpbb_root_path = "./../"; -$no_page_header = true; -require($phpbb_root_path . 'extension.inc'); -require('./pagestart.' . $phpEx); - -// check if mod is installed -if(empty($template->xs_version) || $template->xs_version !== 8) -{ - message_die(GENERAL_ERROR, isset($lang['xs_error_not_installed']) ? $lang['xs_error_not_installed'] : 'eXtreme Styles mod is not installed. You forgot to upload includes/template.php'); -} - -define('IN_XS', true); -include_once('xs_include.' . $phpEx); - -$template->assign_block_vars('nav_left',array('ITEM' => '» <a href="' . append_sid('xs_update.'.$phpEx) . '">' . $lang['xs_check_for_updates'] . '</a>')); - -$updates = array(); - -function include_update($filename) -{ - $update = array(); - @include($filename); - global $updates; - $updates = array_merge($updates, $update); -} - -if($dir = @opendir($phpbb_root_path. 'templates/')) -{ - while($sub_dir = @readdir($dir)) - if(($sub_dir !== '.') && ($sub_dir !== '..') && ($sub_dir !== 'CVS')) - { - $file = $phpbb_root_path . 'templates/' . $sub_dir . '/xs.cfg'; - if(@file_exists($file)) - { - include_update($file); - } - } - closedir($dir); -} - -// check for xs files in acp. mask: xs_*.cfg -if($dir = @opendir('.')) -{ - while($file = @readdir($dir)) - if(strlen($file) > 6 && substr($file, 0, 3) === 'xs_' && substr($file, strlen($file) - 4) === '.cfg') - { - include_update($file); - } - closedir($dir); -} - - -// nothing to update -if(!count($updates)) -{ - xs_error($lang['xs_update_nothing']); -} - -// show list of available updates -if(!isset($HTTP_GET_VARS['doupdate'])) -{ - $template->set_filenames(array('body' => XS_TPL_PATH . 'update.tpl')); - $template->assign_vars(array( - 'UPDATE_URL' => append_sid('xs_update.'.$phpEx.'?doupdate=1'), - 'L_XS_UPDATE_TOTAL1' => str_replace('{NUM}', count($updates), $lang['xs_update_total1']), - ) - ); - $counter = 0; - @reset($updates); - foreach($updates as $var => $item) - { - $counter ++; - $type = isset($lang['xs_update_types'][$item['update_type']]) ? $item['update_type'] : 0; - $row_class = $xs_row_class[$counter % 2]; - $template->assign_block_vars('row', - array( - 'ROW_CLASS' => $row_class, - 'NUM' => $counter, - 'VAR' => 'item_'.$counter.'_', - 'ITEM' => htmlspecialchars($var), - 'NAME' => htmlspecialchars($item['update_name']), - 'TYPE' => $lang['xs_update_types'][$type], - 'URL' => htmlspecialchars($item['update_url']), - 'VERSION' => htmlspecialchars($item['update_version']) - ) - ); - $template->assign_block_vars('row.'.(empty($item['update_url']) ? 'nourl' : 'url'), array()); - } - $template->pparse('body'); - xs_exit(); -} - -// check updates. - -// getting list of items to update -@reset($updates); -$urls = array(); -$items = array(); -$i=0; -foreach($updates as $var1 => $item) -{ - $i++; - $var = 'item_'.$i.'_'; - if(!empty($HTTP_POST_VARS[$var.'item']) && !empty($HTTP_POST_VARS[$var.'checked']) && $HTTP_POST_VARS[$var.'checked']) - { - $item = $HTTP_POST_VARS[$var.'item']; - if(!empty($updates[$item]['update_url'])) - { - $items[] = $var1; - $found = false; - $url = $updates[$item]['update_url']; - for($j=0; $j<count($urls) && !$found; $j++) - { - if($urls[$j] === $url) - { - $found = true; - } - } - if(!$found) - { - $urls[] = $url; - } - } - } - if(isset($updates[$var1]['data'])) - { - unset($updates[$var1]['data']); - } -} - -// showing error message if there is nothing to update -if(!count($urls)) -{ - xs_error($lang['xs_update_nothing']); -} - -@set_time_limit(intval($HTTP_POST_VARS['timeout'])); - -// getting data -for($i=0; $i<count($urls); $i++) -{ - $arr = @file($urls[$i]); - if(empty($arr)) - { - // cannot connect. show it as error message - @reset($items); - for($j=0; $j<count($items); $j++) - { - $item = $updates[$items[$j]]; - if($item['update_url'] === $urls[$i]) - { - $updates[$items[$j]]['data']['error'] = $lang['xs_update_error_noconnect']; - } - } - } - else - { - for($j=0; $j<count($arr); $j++) - { // trim all lines and replace tab with space - $arr[$j] = trim(str_replace("\t", ' ', $arr[$j])); - } - // checking all items to see which ones are for this url - for($j=0; $j<count($items); $j++) - { - $item = $updates[$items[$j]]; - if($item['update_url'] === $urls[$i]) - { - // searching for data for this item - $begin_text = '<!-- BEGIN ' . $item['update_item'] . ' -->'; - $end_text = '<!-- END ' . $item['update_item'] . ' -->'; - $begin_pos = -1; - $end_pos = -1; - // getting begin and end tags for it - for($k=0; ($k<count($arr)-1) && ($begin_pos < 0); $k++) - { - if($arr[$k] === $begin_text) - { - $begin_pos = $k; - for(; ($k<count($arr)) && ($end_pos < 0); $k++) - { - if($arr[$k] === $end_text) - { - $end_pos = $k; - } - } - if($end_pos < 0) - { - $end_pos = count($arr); - } - } - } - $data = array(); - // found item position in text - if($begin_pos >= 0) - { - // getting all data for this item in array - for($k=$begin_pos+1; $k<$end_pos; $k++) - { - $arr2 = explode(' ', $arr[$k], 2); - if(count($arr2) == 2) - { - $data[trim($arr2[0])] = trim($arr2[1]); - } - } - } - else - { - $data['error'] = $lang['xs_update_error_noitem']; - } - $updates[$items[$j]]['data'] = $data; - } - } - } -} - -$template->set_filenames(array('body' => XS_TPL_PATH . 'update2.tpl')); - -@reset($updates); -$count_total = 0; -$count_error = 0; -$count_update = 0; -foreach($updates as $var => $item) -{ - if(isset($item['data']) && is_array($item['data'])) - { - $count_total++; - $type = isset($lang['xs_update_types'][$item['update_type']]) ? $item['update_type'] : 0; - $ver1 = htmlspecialchars($item['update_version']); - $row_class = $xs_row_class[$count_total % 2]; - $template->assign_block_vars('row', - array( - 'ROW_CLASS' => $row_class, - 'ITEM' => htmlspecialchars($item['update_name']), - 'TYPE' => $lang['xs_update_types'][$type], - 'VERSION' => $ver1, - ) - ); - if(!empty($item['data']['version'])) - { - $ver2 = htmlspecialchars($item['data']['version']); - $info = isset($item['data']['info']) ? $item['data']['info'] : ''; - if($ver2 !== $ver1 && (!empty($item['data']['update']) || !empty($item['data']['autoupdate']))) - { - $count_update++; - $u_import = (isset($item['data']['style']) && substr($item['data']['style'], 0, 7) === 'http://') ? append_sid('xs_import.'.$phpEx.'?get_web=' . urlencode($item['data']['style'])) : ''; - $template->assign_block_vars('row.update', - array( - 'NUM' => $count_total, - 'VERSION' => $ver2, - 'UPDATE' => isset($item['data']['update']) ? htmlspecialchars($item['data']['update']) : '', - 'U_IMPORT' => $u_import, - 'INFO' => htmlspecialchars($info), - ) - ); - $template->assign_block_vars('row.update.' . (empty($item['data']['update']) ? 'noupdate' : 'updated'), array()); - $template->assign_block_vars('row.update.' . (empty($item['data']['info']) ? 'noinfo' : 'info'), array()); - $template->assign_block_vars('row.update.' . (empty($u_import) ? 'noimport' : 'import'), array()); - } - else - { - $template->assign_block_vars('row.noupdate', - array( - 'VERSION' => $ver2, - 'MESSAGE' => $lang['xs_update_noupdate'], - 'INFO' => empty($info) ? '' : htmlspecialchars($info), - ) - ); - $template->assign_block_vars('row.noupdate.' . (empty($item['data']['info']) ? 'noinfo' : 'info'), array()); - } - } - else - { - if(empty($item['data']['error'])) - { - $item['data']['error'] = $lang['xs_update_error_noitem']; - } - $template->assign_block_vars('row.error', array('ERROR' => htmlspecialchars($item['data']['error']))); - $count_error++; - } - } -} - -$template->assign_vars( - array( - 'COUNT_TOTAL' => str_replace('{NUM}', $count_total, $lang['xs_update_total1']), - 'COUNT_ERROR' => str_replace('{NUM}', $count_error, $lang['xs_update_total2']), - 'COUNT_UPDATE' => str_replace('{NUM}', $count_update, $lang['xs_update_total3']) - ) -); - -$template->pparse('body'); -xs_exit(); - -?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <teh...@us...> - 2006-10-23 04:36:27
|
Revision: 261 http://svn.sourceforge.net/phpbbreloaded/?rev=261&view=rev Author: tehphpmaster Date: 2006-10-22 21:36:22 -0700 (Sun, 22 Oct 2006) Log Message: ----------- Couple of schema changes, as per Nick, be careful when editing these Modified Paths: -------------- phpBB Reloaded 2/install/schemas/mysql_basic.sql Modified: phpBB Reloaded 2/install/schemas/mysql_basic.sql =================================================================== --- phpBB Reloaded 2/install/schemas/mysql_basic.sql 2006-10-23 04:33:53 UTC (rev 260) +++ phpBB Reloaded 2/install/schemas/mysql_basic.sql 2006-10-23 04:36:22 UTC (rev 261) @@ -275,7 +275,7 @@ INSERT INTO phpbb_config VALUES ('server_name', 'localhost', 1); INSERT INTO phpbb_config VALUES ('server_port', '80', 1); INSERT INTO phpbb_config VALUES ('script_path', '/', 1); -INSERT INTO phpbb_config VALUES ('version', '.2.1', 0); +INSERT INTO phpbb_config VALUES ('version', '.4.0', 0); INSERT INTO phpbb_config VALUES ('stat_total_posts', '7', 0); INSERT INTO phpbb_config VALUES ('stat_total_topics', '5', 0); INSERT INTO phpbb_config VALUES ('stat_total_users', '1', 0); @@ -416,7 +416,7 @@ INSERT INTO phpbb_config VALUES ('board_disable_mode', '2', 0); INSERT INTO phpbb_config VALUES ('search_flood_interval', '15', 0); INSERT INTO phpbb_config VALUES ('rand_seed', '', 0); -INSERT INTO phpbb_config VALUES ('phpbb_version','.0.20', 0); +INSERT INTO phpbb_config VALUES ('phpbb_version','.0.21', 0); INSERT INTO phpbb_config VALUES ('search_min_chars', '3', 0); -- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <teh...@us...> - 2006-10-23 04:34:06
|
Revision: 260 http://svn.sourceforge.net/phpbbreloaded/?rev=260&view=rev Author: tehphpmaster Date: 2006-10-22 21:33:53 -0700 (Sun, 22 Oct 2006) Log Message: ----------- Fixed a language error and also a parse error in search.php Modified Paths: -------------- phpBB Reloaded 2/language/lang_english/lang_main.php phpBB Reloaded 2/search.php Modified: phpBB Reloaded 2/language/lang_english/lang_main.php =================================================================== --- phpBB Reloaded 2/language/lang_english/lang_main.php 2006-10-23 04:11:33 UTC (rev 259) +++ phpBB Reloaded 2/language/lang_english/lang_main.php 2006-10-23 04:33:53 UTC (rev 260) @@ -1041,7 +1041,7 @@ $lang['Admin_reauthenticate'] = 'To administer the board you must re-authenticate yourself.'; $lang['Login_attempts_exceeded'] = 'The maximum number of %s login attempts has been exceeded. You are not allowed to login for the next %s minutes.'; -$lang['Please_remove_install_contrib'] = 'Please ensure both the install/ and contrib/ directories are deleted'; +$lang['Please_remove_install_contrib'] = 'Please ensure that the /install directory has been removed'; //+MOD: Select Expand BBcodes MOD $lang['Select'] = "Select"; Modified: phpBB Reloaded 2/search.php =================================================================== --- phpBB Reloaded 2/search.php 2006-10-23 04:11:33 UTC (rev 259) +++ phpBB Reloaded 2/search.php 2006-10-23 04:33:53 UTC (rev 260) @@ -1,29 +1,38 @@ <?php -/** - * @package core - * @version $ID: Exp$ - * @copyright phpBB Reloaded 2006 - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ +//-- mod : categories hierarchy ------------------------------------------------ +/*************************************************************************** + * search.php + * ------------------- + * begin : Saturday, Feb 13, 2001 + * copyright : (C) 2001 The phpBB Group + * email : su...@ph... + * + * $Id: search.php,v 1.72.2.19 2006/02/05 15:59:48 grahamje Exp $ + * + * + ***************************************************************************/ -/** - * phpBB originally created by phpBB http://www.phpbb.com - */ +/*************************************************************************** + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + ***************************************************************************/ -define ('IN_PHPBB', TRUE); +define('IN_PHPBB', true); $phpbb_root_path = './'; -include ($phpbb_root_path . 'extension.inc'); -include ($phpbb_root_path . 'common.' . $phpEx); -include ($phpbb_root_path . 'includes/bbcode.' . $phpEx); -include ($phpbb_root_path . 'includes/functions_search.' . $phpEx); +include($phpbb_root_path . 'extension.inc'); +include($phpbb_root_path . 'common.'.$phpEx); +include($phpbb_root_path . 'includes/bbcode.'.$phpEx); +include($phpbb_root_path . 'includes/functions_search.'.$phpEx); // read forums if not a searchuser - $searchuser = (_read('mode', TYPE_NO_HTML) == 'searchuser'); - if ( !$searchuser ) { - include ($config->url('includes/class_forums')); + include($config->url('includes/class_forums')); $forums = new forums(); $forums->read(); } @@ -31,14 +40,13 @@ // // Start session management // - $userdata = session_pagestart($user_ip, PAGE_SEARCH); init_userprefs($userdata); - // // End session management // + if ( !$searchuser ) { $user->get_cache(POST_FORUM_URL); @@ -48,9 +56,7 @@ } // topics class - -include ($config->url('includes/class_topics')); - +include($config->url('includes/class_topics')); class topics_search extends topics { function topics_search($parms='', $extra_parms='') @@ -69,33 +75,28 @@ $ppage = $this->parms['ppage']; // read topics - $sql = 'SELECT * - FROM ' . TOPICS_TABLE . ' - WHERE topic_id IN(' . $search_results . ') - AND topic_last_post_id > 0 - ORDER BY topic_last_time DESC + FROM ' . TOPICS_TABLE . ' + WHERE topic_id IN(' . $search_results . ') + AND topic_last_post_id > 0 + ORDER BY topic_last_time DESC LIMIT ' . $start . ', ' . $ppage; // read results - - $result = $db->sql_query($sql, FALSE, __LINE__, __FILE__); + $result = $db->sql_query($sql, false, __LINE__, __FILE__); $this->pre_process(); - while ( $row = $db->sql_fetchrow($result) ) { $this->row_process($row); $this->data_ext[ $row['topic_id'] ] = $row; } - $db->sql_freeresult($result); // get complementary data - $this->post_process(); } - function bottom_line($empty = FALSE) + function bottom_line($empty=false) { global $template, $user; @@ -110,7 +111,6 @@ // // Define initial vars // - if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) ) { $mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; @@ -144,14 +144,13 @@ $show_results = ( isset($HTTP_POST_VARS['show_results']) ) ? $HTTP_POST_VARS['show_results'] : 'posts'; $show_results = ($show_results == 'topics') ? 'topics' : 'posts'; -// start mod save posts as drafts ... if user clicked to see his drafts and posts or topics, set search_id to egosearch and set show_results correctly - -if ( $search_id == 'egosearch_by_topic' || $search_id == 'egosearch_by_post' ) +if( $search_id == 'egosearch_by_topic' || $search_id == 'egosearch_by_post' ) { $show_results = ( $search_id == 'egosearch_by_topic' ) ? 'topics' : 'posts'; $search_id = 'egosearch'; } + if ( isset($HTTP_POST_VARS['search_terms']) ) { $search_terms = ( $HTTP_POST_VARS['search_terms'] == 'all' ) ? 1 : 0; @@ -204,29 +203,27 @@ // // encoding match for workaround // - $multibyte_charset = 'utf-8, big5, shift_jis, euc-kr, gb2312'; // // Begin core code // -if ( $mode == 'searchcolor' ) +if ($mode == 'searchcolor') { // // This handles the simple windowed user color // - color_search(); exit; } -elseif ($mode == 'searchuser') +else if ($mode == 'searchuser') + { // // This handles the simple windowed user search functions called from various other scripts // - if ( isset($HTTP_POST_VARS['search_username']) ) { username_search($HTTP_POST_VARS['search_username']); @@ -238,44 +235,36 @@ exit; } -elseif ( $search_keywords != '' || $search_author != '' || $search_id ) +else if ( $search_keywords != '' || $search_author != '' || $search_id ) { +// start mod save posts as drafts (and end mod too)...added the draft_on variable in the next line so that if the user clicks to after page 1 of list and then goes back to page 1 the draft lists will appear $store_vars = array('search_results', 'total_match_count', 'split_search', 'sort_by', 'sort_dir', 'show_results', 'return_chars', 'draft_on'); $search_results = ''; - // - // note : auth_sql will never be empty, so the forums table will always be joigned to the research - // - $auth_sql = ''; $store_vars[] = 'no_subs'; - // read params - + // read parms $search_forum = _read('search_forum', TYPE_INT); $no_subs = _button('no_subs'); // check forum id - - if ( !isset($forums->data[$search_forum]) || !$user->auth(POST_FORUM_URL, 'auth_read', $search_forum) ) + if (!isset($forums->data[$search_forum]) || !$user->auth(POST_FORUM_URL, 'auth_read', $search_forum) ) { message_die(GENERAL_MESSAGE, $user->lang('No_such_forum')); } // get min and max forum ids for the branch asked - $min_id = intval($search_forum); $max_id = $no_subs ? $search_forum : $forums->data[$search_forum]['last_child_id']; // get excluded forums - $tkeys = array_flip($forums->keys); $min_idx = $tkeys[$min_id]; $max_idx = $tkeys[$max_id]; - unset ($tkeys); + unset($tkeys); $exclude_forums = array(); - $something = FALSE; - + $something = false; for ( $i = $min_idx; $i <= $max_idx; $i++ ) { if ( !$user->auth(POST_FORUM_URL, 'auth_read', $forums->keys[$i]) ) @@ -284,73 +273,64 @@ } else { - $something = TRUE; + $something = true; } } // halt on no forum authed - if ( !$something ) { message_die(GENERAL_MESSAGE, $lang['No_searchable_forums']); } // set branch range - $auth_sql = $no_subs ? 'f.forum_id = ' . $min_id : '(f.forum_order BETWEEN ' . intval($forums->data[$min_id]['forum_order']) . ' AND ' . intval($forums->data[$max_id]['forum_order']) . ')'; // exclude unreadable forums - if ( !empty($exclude_forums) ) { $auth_sql .= count($exclude_forums) > 1 ? ' AND f.forum_id NOT IN(' . implode(', ', $exclude_forums) . ')' : ' AND f.forum_id <> ' . $exclude_forums[0]; - unset ($exclude_forums); + unset($exclude_forums); } // // Search ID Limiter, decrease this value if you experience further timeout problems with searching forums - $limiter = 5000; $current_time = time(); // // Cycle through options ... // - if ( $search_id == 'newposts' || $search_id == 'egosearch' || $search_id == 'unanswered' || $search_keywords != '' || $search_author != '' ) { // // Flood control // - $where_sql = ($userdata['user_id'] == ANONYMOUS) ? "se.session_ip = '$user_ip'" : 'se.session_user_id = ' . $userdata['user_id']; $sql = 'SELECT MAX(sr.search_time) AS last_search_time FROM ' . SEARCH_TABLE . ' sr, ' . SESSIONS_TABLE . " se WHERE sr.session_id = se.session_id AND $where_sql"; - - if ( $result = $db->sql_query($sql) ) + if ($result = $db->sql_query($sql)) { - if ( $row = $db->sql_fetchrow($result) ) + if ($row = $db->sql_fetchrow($result)) { - if ( intval($row['last_search_time']) > 0 && ($current_time - intval($row['last_search_time'])) < intval($board_config['search_flood_interval']) ) + if (intval($row['last_search_time']) > 0 && ($current_time - intval($row['last_search_time'])) < intval($board_config['search_flood_interval'])) { message_die(GENERAL_MESSAGE, $lang['Search_Flood_Error']); } } } - if ( $search_id == 'newposts' || $search_id == 'egosearch' || ( $search_author != '' && $search_keywords == '' ) ) { if ( $search_id == 'newposts' ) { + $user->read_cookies(); - if ( empty($user->cookies['unreads']) ) { message_return('No_search_match'); } - asort($user->cookies['unreads']); $floor = intval($user->cookies['unreads'][ _first_key($user->cookies['unreads']) ]); $sql = 'SELECT post_id, topic_id, post_time @@ -359,10 +339,8 @@ AND post_time > ' . $floor . ' AND post_draft = 0'; // start mod save posts as drafts (and end mod too)...added constraint in the preceding line that post_draft be 0 so that draftws wouldn't get included - - $result = $db->sql_query($sql, FALSE, __LINE__, __FILE__); + $result = $db->sql_query($sql, false, __LINE__, __FILE__); $search_ids = array(); - while ( $row = $db->sql_fetchrow($result) ) { if ( $row['post_time'] >= $user->cookies['unreads'][ $row['topic_id'] ] ) @@ -375,23 +353,25 @@ $sort_by = 0; $sort_dir = 'DESC'; } - elseif ( $search_id == 'egosearch' ) + else if ( $search_id == 'egosearch' ) { - $draft_on = TRUE; + $draft_on = true; - if ( $userdata['session_logged_in'] ) + if ( $userdata['session_logged_in'] ) { $sql = "SELECT post_id FROM " . POSTS_TABLE . " WHERE poster_id = " . $userdata['user_id'] . " AND post_draft = 0"; + } else { - redirect(append_sid("login.$phpEx?redirect=search.$phpEx&search_id=egosearch", TRUE)); + redirect(append_sid("login.$phpEx?redirect=search.$phpEx&search_id=egosearch", true)); } + $sort_by = 0; $sort_dir = 'DESC'; } @@ -399,7 +379,7 @@ { $search_author = str_replace('*', '%', trim($search_author)); - if ( ( strpos($search_author, '%') !== FALSE ) && ( strlen(str_replace('%', '', $search_author)) < $board_config['search_min_chars'] ) ) + if( ( strpos($search_author, '%') !== false ) && ( strlen(str_replace('%', '', $search_author)) < $board_config['search_min_chars'] ) ) { $search_author = ''; } @@ -407,21 +387,19 @@ $sql = "SELECT user_id FROM " . USERS_TABLE . " WHERE username LIKE '" . str_replace("\'", "''", $search_author) . "'"; - if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, "Couldn't obtain list of matching users (searching for: $search_author)", "", __LINE__, __FILE__, $sql); } $matching_userids = ''; - if ( $row = $db->sql_fetchrow($result) ) { do { $matching_userids .= ( ( $matching_userids != '' ) ? ', ' : '' ) . $row['user_id']; } - while ( $row = $db->sql_fetchrow($result) ); + while( $row = $db->sql_fetchrow($result) ); } else { @@ -432,33 +410,35 @@ FROM " . POSTS_TABLE . " WHERE poster_id IN ($matching_userids)"; - if ( $search_time ) + if ($search_time) { $sql .= " AND post_time >= " . $search_time; } } + if ( $search_id != 'newposts' ) { - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, 'Could not obtain matched posts list', '', __LINE__, __FILE__, $sql); - } - $search_ids = array(); - - while ( $row = $db->sql_fetchrow($result) ) - { - $search_ids[] = $row['post_id']; - } - - $db->sql_freeresult($result); + if ( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_ERROR, 'Could not obtain matched posts list', '', __LINE__, __FILE__, $sql); } + $search_ids = array(); + while( $row = $db->sql_fetchrow($result) ) + { + $search_ids[] = $row['post_id']; + } + $db->sql_freeresult($result); + + } + + $total_match_count = count($search_ids); } - elseif ( $search_keywords != '' ) + else if ( $search_keywords != '' ) { $stopword_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/search_stopwords.txt'); $synonym_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/search_synonyms.txt'); @@ -466,7 +446,7 @@ $split_search = array(); $stripped_keywords = stripslashes($search_keywords); $split_search = ( !strstr($multibyte_charset, $lang['ENCODING']) ) ? split_words(clean_words('search', $stripped_keywords, $stopword_array, $synonym_array), 'search') : split(' ', $search_keywords); - unset ($stripped_keywords); + unset($stripped_keywords); $search_msg_only = ( !$search_fields ) ? "AND m.title_match = 0" : ( ( strstr($multibyte_charset, $lang['ENCODING']) ) ? '' : '' ); @@ -476,7 +456,7 @@ $word_match = array(); $result_list = array(); - for ( $i = 0; $i < count($split_search); $i++ ) + for($i = 0; $i < count($split_search); $i++) { if ( strlen(str_replace(array('*', '%'), '', trim($split_search[$i]))) < $board_config['search_min_chars'] ) { @@ -523,15 +503,13 @@ WHERE post_text LIKE '$match_word' $search_msg_only"; } - if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain matched posts list', '', __LINE__, __FILE__, $sql); } $row = array(); - - while ( $temp_row = $db->sql_fetchrow($result) ) + while( $temp_row = $db->sql_fetchrow($result) ) { $row[$temp_row['post_id']] = 1; @@ -539,11 +517,11 @@ { $result_list[$temp_row['post_id']] = 1; } - elseif ( $current_match_type == 'or' ) + else if ( $current_match_type == 'or' ) { $result_list[$temp_row['post_id']] = 1; } - elseif ( $current_match_type == 'not' ) + else if ( $current_match_type == 'not' ) { $result_list[$temp_row['post_id']] = 0; } @@ -552,7 +530,7 @@ if ( $current_match_type == 'and' && $word_count ) { @reset($result_list); - while list($post_id, $match_count) = @each($result_list) ) + while( list($post_id, $match_count) = @each($result_list) ) { if ( !$row[$post_id] ) { @@ -570,8 +548,7 @@ @reset($result_list); $search_ids = array(); - - while ( list($post_id, $matches) = each($result_list) ) + while( list($post_id, $matches) = each($result_list) ) { if ( $matches ) { @@ -579,7 +556,7 @@ } } - unset ($result_list); + unset($result_list); $total_match_count = count($search_ids); } @@ -590,15 +567,15 @@ // If not logged in we explicitly prevent searching of private forums // + // // Author name search // - if ( $search_author != '' ) { $search_author = str_replace('*', '%', trim($search_author)); - if ( ( strpos($search_author, '%') !== false ) && ( strlen(str_replace('%', '', $search_author)) < $board_config['search_min_chars'] ) ) + if( ( strpos($search_author, '%') !== false ) && ( strlen(str_replace('%', '', $search_author)) < $board_config['search_min_chars'] ) ) { $search_author = ''; } @@ -611,16 +588,15 @@ // // This one is a beast, try to seperate it a bit (workaround for connection timeouts) // - $search_id_chunks = array(); $count = 0; $chunk = 0; - if ( count($search_ids) > $limiter ) + if (count($search_ids) > $limiter) { - for ( $i = 0; $i < count($search_ids); $i++ ) + for ($i = 0; $i < count($search_ids); $i++) { - if ( $count == $limiter ) + if ($count == $limiter) { $chunk++; $count = 0; @@ -637,7 +613,7 @@ $search_ids = array(); - for ( $i = 0; $i < count($search_id_chunks); $i++ ) + for ($i = 0; $i < count($search_id_chunks); $i++) { $where_sql = ''; @@ -661,8 +637,8 @@ if ( $search_author != '' ) { $from_sql .= ", " . USERS_TABLE . " u"; - - $where_sql .= " AND u.user_id = p.poster_id AND u.username LIKE '$search_author' AND p.post_draft = 0"; + + $where_sql .= " AND u.user_id = p.poster_id AND u.username LIKE '$search_author' AND p.post_draft = 0"; } if ( $auth_sql != '' ) @@ -683,28 +659,27 @@ message_die(GENERAL_ERROR, 'Could not obtain topic ids', '', __LINE__, __FILE__, $sql); } - while ( $row = $db->sql_fetchrow($result) ) + while ($row = $db->sql_fetchrow($result)) { $search_ids[] = $row['topic_id']; } - $db->sql_freeresult($result); } $total_match_count = sizeof($search_ids); } - elseif ( $search_author != '' || $search_time || $auth_sql != '' ) + else if ( $search_author != '' || $search_time || $auth_sql != '' ) { $search_id_chunks = array(); $count = 0; $chunk = 0; - if ( count($search_ids) > $limiter ) + if (count($search_ids) > $limiter) { - for ( $i = 0; $i < count($search_ids); $i++ ) + for ($i = 0; $i < count($search_ids); $i++) { - if ( $count == $limiter ) + if ($count == $limiter) { $chunk++; $count = 0; @@ -721,7 +696,7 @@ $search_ids = array(); - for ( $i = 0; $i < count($search_id_chunks); $i++ ) + for ($i = 0; $i < count($search_id_chunks); $i++) { $where_sql = ( $search_author == '' && $auth_sql == '' ) ? 'post_id IN (' . implode(', ', $search_id_chunks[$i]) . ')' : 'p.post_id IN (' . implode(', ', $search_id_chunks[$i]) . ')'; $select_sql = ( $search_author == '' && $auth_sql == '' ) ? 'post_id' : 'p.post_id'; @@ -748,24 +723,22 @@ $sql = "SELECT " . $select_sql . " FROM $from_sql WHERE $where_sql"; - if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain post ids', '', __LINE__, __FILE__, $sql); } - while ( $row = $db->sql_fetchrow($result) ) + while( $row = $db->sql_fetchrow($result) ) { $search_ids[] = $row['post_id']; } - $db->sql_freeresult($result); } $total_match_count = count($search_ids); } } - elseif ( $search_id == 'unanswered' ) + else if ( $search_id == 'unanswered' ) { if ( $auth_sql != '' ) { @@ -790,12 +763,10 @@ } $search_ids = array(); - - while ( $row = $db->sql_fetchrow($result) ) + while( $row = $db->sql_fetchrow($result) ) { $search_ids[] = $row['topic_id']; } - $db->sql_freeresult($result); $total_match_count = count($search_ids); @@ -803,16 +774,14 @@ // // Basic requirements // - $show_results = 'topics'; $sort_by = 0; $sort_dir = 'DESC'; } else { - // start mod save posts as drafts (and end mod too)...added the check that skips the no match message if there are drafts to be shown - if ( !$draft_on ) + if(!$draft_on) { message_die(GENERAL_MESSAGE, $lang['No_search_match']); } @@ -821,10 +790,8 @@ // // Delete old data from the search result table // - $sql = 'DELETE FROM ' . SEARCH_TABLE . ' WHERE search_time < ' . ($current_time - (int) $board_config['session_length']); - if ( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete old search id sessions', '', __LINE__, __FILE__, $sql); @@ -833,7 +800,6 @@ // // Store new result data // - $search_results = implode(', ', $search_ids); $per_page = ( $show_results == 'posts' ) ? $board_config['posts_per_page'] : $board_config['topics_per_page']; @@ -841,20 +807,29 @@ // Combine both results and search data (apart from original query) // so we can serialize it and place it in the DB // - $store_search_data = array(); // // Limit the character length (and with this the results displayed at all following pages) to prevent // truncated result arrays. Normally, search results above 12000 are affected. + // - to include or not to include + /* + $max_result_length = 60000; + if (strlen($search_results) > $max_result_length) + { + $search_results = substr($search_results, 0, $max_result_length); + $search_results = substr($search_results, 0, strrpos($search_results, ',')); + $total_match_count = count(explode(', ', $search_results)); + } + */ - for ( $i = 0; $i < count($store_vars); $i++ ) + for($i = 0; $i < count($store_vars); $i++) { $store_search_data[$store_vars[$i]] = $$store_vars[$i]; } $result_array = serialize($store_search_data); - unset ($store_search_data); + unset($store_search_data); mt_srand ((double) microtime() * 1000000); $search_id = mt_rand(); @@ -862,12 +837,10 @@ $sql = "UPDATE " . SEARCH_TABLE . " SET search_id = $search_id, search_time = $current_time, search_array = '" . str_replace("\'", "''", $result_array) . "' WHERE session_id = '" . $userdata['session_id'] . "'"; - if ( !($result = $db->sql_query($sql)) || !$db->sql_affectedrows() ) { $sql = "INSERT INTO " . SEARCH_TABLE . " (search_id, session_id, search_time, search_array) VALUES($search_id, '" . $userdata['session_id'] . "', $current_time, '" . str_replace("\'", "''", $result_array) . "')"; - if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not insert search results', '', __LINE__, __FILE__, $sql); @@ -877,14 +850,12 @@ else { $search_id = intval($search_id); - if ( $search_id ) { $sql = "SELECT search_array FROM " . SEARCH_TABLE . " WHERE search_id = $search_id AND session_id = '". $userdata['session_id'] . "'"; - if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain search results', '', __LINE__, __FILE__, $sql); @@ -893,8 +864,7 @@ if ( $row = $db->sql_fetchrow($result) ) { $search_data = unserialize($row['search_array']); - - for ( $i = 0; $i < count($store_vars); $i++ ) + for($i = 0; $i < count($store_vars); $i++) { $$store_vars[$i] = $search_data[$store_vars[$i]]; } @@ -912,18 +882,15 @@ } // get cookies for unreaded topics - $user->read_cookies(); // display results as topics - if ( $show_results == 'topics' ) { // get highlight parm $highlight_active = ''; $highlight_match = array(); - - for ( $j = 0; $j < count($split_search); $j++ ) + for($j = 0; $j < count($split_search); $j++ ) { $split_word = $split_search[$j]; @@ -944,11 +911,9 @@ } } } - $extra_parms = empty($highlight_active) ? '' : array('highlight' => urlencode(trim($highlight_active))); // filter page and order - $start = max(0, _read('start', TYPE_INT)); $ppage = _read('ppage', TYPE_INT); $ppage = ($ppage > 0) ? $ppage : (intval($user->data['user_topics_ppage']) ? intval($user->data['user_topics_ppage']) : (intval($config->data['topics_per_page']) ? intval($config->data['topics_per_page']) : 50)); @@ -962,26 +927,18 @@ ); $topics = new topics_search($parms, $extra_parms); - - if ( !empty($search_results) ) - { - $topics->read($search_results, $total_match_count); - } + if( !empty($search_results) ) $topics->read($search_results, $total_match_count); // start the page - $page_title = $user->lang('Search'); - include ($config->url('includes/page_header') ); + include($config->url('includes/page_header')); // jumpbox - make_jumpbox('index'); // upper box (so with forum nav sentence for each topic), force display empty, force the title - - $topics->display(TRUE, TRUE); + $topics->display(true, true); - // start mod save posts as drafts...show all drafts at the top of the search results page when a user searches for all of his or her posts (egosearch)... if ( $draft_on && $start == 0 ) { $sql = "SELECT p.post_id, p.post_time, pt.post_subject, t.topic_title, f.forum_name @@ -995,7 +952,7 @@ $result = $db->sql_query($sql); - if ( !$result ) + if( !$result ) { message_die(GENERAL_ERROR, "Couldn't obtain draft posts from database", "", __LINE__, __FILE__, $sql); } @@ -1005,7 +962,6 @@ $total_draft_posts = count($draft_posts); // ok, done collecting all draft posts...now let's find the draft pms - $sql = "SELECT privmsgs_id, privmsgs_subject, privmsgs_date FROM " . PRIVMSGS_TABLE . " WHERE privmsgs_type = " . PRIVMSGS_DRAFT_MAIL . " @@ -1014,7 +970,7 @@ $result = $db->sql_query($sql); - if ( !$result ) + if( !$result ) { message_die(GENERAL_ERROR, "Couldn't obtain draft posts from database", "", __LINE__, __FILE__, $sql); } @@ -1030,25 +986,22 @@ { $drafts = array_merge($draft_posts,$draft_pms); } - $total_drafts = count($drafts); // cut this all off if there are no regular search matches and no drafts - if ( $search_results == '' && $total_drafts == 0 ) + if( $search_results == '' && $total_drafts == 0 ) { message_die(GENERAL_MESSAGE, $lang['No_search_match']); } if ( $total_drafts > 0 ) { - $template->assign_block_vars('switch_show_drafts', array()); - $template->assign_block_vars("draft", array()); - - for ( $i = 0; $i < $total_drafts; $i++ ) + $template->assign_block_vars('switch_show_drafts', array()); + $template->assign_block_vars("draft", array()); + for($i = 0; $i < $total_drafts; $i++) { $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; // now set variables, but variables are different depending on if draft post or draft pm so treat differently... - if ( $i < $total_draft_posts ) { $draft_time = create_date($board_config['default_dateformat'], $drafts[$i]['post_time'], $board_config['board_timezone']); @@ -1077,7 +1030,6 @@ } } } - $total_match_count = $total_match_count + $total_drafts; $l_search_matches = ( $total_match_count == 1 ) ? sprintf($lang['Found_search_match'], $total_match_count) : sprintf($lang['Found_search_matches'], $total_match_count); @@ -1089,12 +1041,11 @@ 'L_DRAFT_POST_SUBJECT' => $lang['Draft_post_subject'], 'L_DRAFT_POST_TOPIC' => $lang['Draft_post_topic'], 'L_DRAFT_POST_FORUM' => $lang['Draft_post_forum'])); - - // display + // display $template->set_filenames(array('body' => 'search_results_topics.tpl')); $template->pparse('body'); - include ($config->url('includes/page_tail')); + include($config->url('includes/page_tail')); exit; } @@ -1111,7 +1062,9 @@ AND p.poster_id = u.user_id"; $sql = str_replace('SELECT ', 'SELECT pt.post_sub_title, ', $sql); + $sql = str_replace('SELECT ', 'SELECT u.user_group_id, u.user_session_time, ', $sql); + } else { @@ -1123,14 +1076,14 @@ AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id"; - - $sql = str_replace('SELECT ', 'SELECT u.user_group_id as user_group_id_1, u2.user_group_id as user_group_id_2, u.user_session_time as user_session_time_1, u2.user_session_time as user_session_time_2, ', $sql); + + $sql = str_replace('SELECT ', 'SELECT u.user_group_id as user_group_id_1, u2.user_group_id as user_group_id_2, u.user_session_time as user_session_time_1, u2.user_session_time as user_session_time_2, ', $sql); + } $per_page = ( $show_results == 'posts' ) ? $board_config['posts_per_page'] : $board_config['topics_per_page']; $sql .= " ORDER BY "; - switch ( $sort_by ) { case 1: @@ -1159,19 +1112,17 @@ } $searchset = array(); - - while ( $row = $db->sql_fetchrow($result) ) + while( $row = $db->sql_fetchrow($result) ) { $searchset[] = $row; } $db->sql_freeresult($result); - } + } // // Define censored word matches // - $orig_word = array(); $replacement_word = array(); obtain_word_list($orig_word, $replacement_word); @@ -1179,9 +1130,8 @@ // // Output header // - $page_title = $lang['Search']; - include ($phpbb_root_path . 'includes/page_header.' . $phpEx); + include($phpbb_root_path . 'includes/page_header.'.$phpEx); if ( $show_results == 'posts' ) { @@ -1195,9 +1145,8 @@ 'body' => 'search_results_topics.tpl') ); } - make_jumpbox('viewforum.' . $phpEx); + make_jumpbox('viewforum.'.$phpEx); - // start mod save posts as drafts...show all drafts at the top of the search results page when a user searches for all of his or her posts (egosearch)... if ( $draft_on && $start == 0 ) { $sql = "SELECT p.post_id, p.post_time, pt.post_subject, t.topic_title, f.forum_name @@ -1211,7 +1160,7 @@ $result = $db->sql_query($sql); - if ( !$result ) + if( !$result ) { message_die(GENERAL_ERROR, "Couldn't obtain draft posts from database", "", __LINE__, __FILE__, $sql); } @@ -1221,7 +1170,6 @@ $total_draft_posts = count($draft_posts); // ok, done collecting all draft posts...now let's find the draft pms - $sql = "SELECT privmsgs_id, privmsgs_subject, privmsgs_date FROM " . PRIVMSGS_TABLE . " WHERE privmsgs_type = " . PRIVMSGS_DRAFT_MAIL . " @@ -1230,7 +1178,7 @@ $result = $db->sql_query($sql); - if ( !$result ) + if( !$result ) { message_die(GENERAL_ERROR, "Couldn't obtain draft posts from database", "", __LINE__, __FILE__, $sql); } @@ -1250,22 +1198,19 @@ $total_drafts = count($drafts); // cut this all off if there are no regular search matches and no drafts - - if ( $search_results == '' && $total_drafts == 0 ) + if( $search_results == '' && $total_drafts == 0 ) { message_die(GENERAL_MESSAGE, $lang['No_search_match']); } if ( $total_drafts > 0 ) { - $template->assign_block_vars('switch_show_drafts', array()); - $template->assign_block_vars("draft", array()); - - for ( $i = 0; $i < $total_drafts; $i++) + $template->assign_block_vars('switch_show_drafts', array()); + $template->assign_block_vars("draft", array()); + for($i = 0; $i < $total_drafts; $i++) { $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; // now set variables, but variables are different depending on if draft post or draft pm so treat differently... - if ( $i < $total_draft_posts ) { $draft_time = create_date($board_config['default_dateformat'], $drafts[$i]['post_time'], $board_config['board_timezone']); @@ -1312,8 +1257,7 @@ $highlight_active = ''; $highlight_match = array(); - - for ( $j = 0; $j < count($split_search); $j++ ) + for($j = 0; $j < count($split_search); $j++ ) { $split_word = $split_search[$j]; @@ -1322,7 +1266,7 @@ $highlight_match[] = '#\b(' . str_replace("*", "([\w]+)?", $split_word) . ')\b#is'; $highlight_active .= " " . $split_word; - for ( $k = 0; $k < count($synonym_array); $k++ ) + for ($k = 0; $k < count($synonym_array); $k++) { list($replace_synonym, $match_synonym) = split(' ', trim(strtolower($synonym_array[$k]))); @@ -1337,13 +1281,15 @@ $highlight_active = urlencode(trim($highlight_active)); + // prepare title enhancement - $front_title = new front_title(); - for ( $i = 0; $i < count($searchset); $i++) + for($i = 0; $i < count($searchset); $i++) { - $forum_url = $config->url('index', array(POST_FORUM_URL => $searchset[$i]['forum_id']), TRUE); + + $forum_url = $config->url('index', array(POST_FORUM_URL => $searchset[$i]['forum_id']), true); + $topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $searchset[$i]['topic_id'] . "&highlight=$highlight_active"); $post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $searchset[$i]['post_id'] . "&highlight=$highlight_active") . '#' . $searchset[$i]['post_id']; @@ -1365,7 +1311,6 @@ // If the board has HTML off but the post has HTML // on then we process it, else leave it alone // - if ( $return_chars != -1 ) { $message = strip_tags($message); @@ -1422,7 +1367,7 @@ { $end_counter--; } - elseif ( substr($message, $end_html, 1) == '<' ) + else if ( substr($message, $end_html, 1) == '<' ) { $end_counter++; } @@ -1435,11 +1380,11 @@ $hold_string = str_replace('<!-- #sh -->', '', $hold_string); $hold_string = str_replace('<!-- #eh -->', '', $hold_string); } - elseif ( $hold_string == '<!-- #sh -->' ) + else if ( $hold_string == '<!-- #sh -->' ) { $hold_string = str_replace('<!-- #sh -->', '<span style="color:#' . $theme['fontcolor3'] . '"><b>', $hold_string); } - elseif ( $hold_string == '<!-- #eh -->' ) + else if ( $hold_string == '<!-- #eh -->' ) { $hold_string = str_replace('<!-- #eh -->', '</b></span>', $hold_string); } @@ -1478,7 +1423,7 @@ $post_subject = ( $searchset[$i]['post_subject'] != '' ) ? $searchset[$i]['post_subject'] : $topic_title; } - if ( $board_config['allow_smilies'] && $searchset[$i]['enable_smilies'] ) + if ($board_config['allow_smilies'] && $searchset[$i]['enable_smilies']) { $message = smilies_pass($message); } @@ -1488,11 +1433,12 @@ } $poster = ( $searchset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $searchset[$i]['user_id']) . '">' : ''; + $poster .= ( $searchset[$i]['user_id'] != ANONYMOUS ) ? $colors->get_user_color($searchset[$i]['user_group_id'], $searchset[$i]['user_session_time'], $searchset[$i]['username']) : ((!empty($searchset[$i]['post_username'])) ? $colors->get_user_color($searchset[$i]['user_group_id'], '0', $searchset[$i]['post_username']) : $colors->get_user_color($searchset[$i]['user_group_id'], '0', $lang['Guest'])); + $poster .= ( $searchset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : ''; $topic_last_read = intval($user->cookies['unreads'][ $search_set[$i]['topic_id'] ]); - if ( !empty($topic_last_read) && ($searchset[$i]['post_time'] > $topic_last_read) ) { $mini_post_img = $images['icon_minipost_new']; @@ -1523,26 +1469,25 @@ ); // enhance the topic title - $front_title->set('searchresults', $searchset[$i], $searchset[$i]['topic_first_post_id'] == $searchset[$i]['post_id'], $highlight_active); // navigation - - $forums->display_nav($searchset[$i]['forum_id'], 'searchresults.nav', TRUE); + $forums->display_nav($searchset[$i]['forum_id'], 'searchresults.nav', true); + } - } + } $base_url = "search.$phpEx?search_id=$search_id"; + // pagination - $parms = array('search_id' => $search_id); $requester = 'search'; $pagination = new pagination($requester, $parms, 'start'); $pagination->display('pagination', $total_match_count, $per_page, $start, true, 'Posts_count'); $template->assign_vars(array( - 'I_TOPIC' => $user->img('folder')) - ); + 'I_TOPIC' => $user->img('folder'), + )); $template->assign_vars(array( 'PAGINATION' => generate_pagination($base_url, $total_match_count, $per_page, $start), @@ -1564,7 +1509,7 @@ $template->pparse('body'); - include ($phpbb_root_path . 'includes/page_tail.' . $phpEx); + include($phpbb_root_path . 'includes/page_tail.'.$phpEx); } else { @@ -1578,7 +1523,6 @@ $front_pic = $forums->get_front_pic(); $s_forums = ''; - if ( !empty($front_pic) ) { foreach ( $front_pic as $cur_id => $front ) @@ -1586,17 +1530,14 @@ $selected = ($search_forum == $cur_id) ? ' selected="selected"' : ''; $s_forums .= '<option value="' . (($cur_id >= 0) ? $cur_id : -1) . '"' . $selected . '>'; $count_front = strlen($front); - for ( $i = 0; $i < $count_front; $i++ ) { $s_forums .= $user->lang('tree_pic_' . $front[$i]); } - if ( $cur_id >= 0 ) { $s_forums .= $user->lang($forums->data[$cur_id]['forum_name']); } - $s_forums .= '</option>'; } } @@ -1604,7 +1545,6 @@ { message_die(GENERAL_MESSAGE, $lang['No_searchable_forums']); } - $template->assign_vars(array( 'L_SEARCH_FORUM' => $user->lang('Search_in_forum'), 'L_NO_SUBS' => $user->lang('Search_no_subs'), @@ -1620,7 +1560,7 @@ $s_characters .= '<option value="25">25</option>'; $s_characters .= '<option value="50">50</option>'; -for ( $i = 100; $i < 1100 ; $i += 100 ) +for($i = 100; $i < 1100 ; $i += 100) { $selected = ( $i == 200 ) ? ' selected="selected"' : ''; $s_characters .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>'; @@ -1629,10 +1569,8 @@ // // Sorting // - $s_sort_by = ""; - -for ( $i = 0; $i < count($sort_by_types); $i++ ) +for($i = 0; $i < count($sort_by_types); $i++) { $s_sort_by .= '<option value="' . $i . '">' . $sort_by_types[$i] . '</option>'; } @@ -1640,13 +1578,11 @@ // // Search time // - $previous_days = array(0, 1, 7, 14, 30, 90, 180, 364); $previous_days_text = array($lang['All_Posts'], $lang['1_Day'], $lang['7_Days'], $lang['2_Weeks'], $lang['1_Month'], $lang['3_Months'], $lang['6_Months'], $lang['1_Year']); $s_time = ''; - -for ( $i = 0; $i < count($previous_days); $i++ ) +for($i = 0; $i < count($previous_days); $i++) { $selected = ( $topic_days == $previous_days[$i] ) ? ' selected="selected"' : ''; $s_time .= '<option value="' . $previous_days[$i] . '"' . $selected . '>' . $previous_days_text[$i] . '</option>'; @@ -1655,9 +1591,8 @@ // // Output the basic page // - $page_title = $lang['Search']; -include ($phpbb_root_path . 'includes/page_header.' . $phpEx); +include($phpbb_root_path . 'includes/page_header.'.$phpEx); $template->set_filenames(array( 'body' => 'search_body.tpl') @@ -1698,6 +1633,6 @@ $template->pparse('body'); -include ($phpbb_root_path . 'includes/page_tail.' . $phpEx); +include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <teh...@us...> - 2006-10-23 04:11:40
|
Revision: 259 http://svn.sourceforge.net/phpbbreloaded/?rev=259&view=rev Author: tehphpmaster Date: 2006-10-22 21:11:33 -0700 (Sun, 22 Oct 2006) Log Message: ----------- Removing the phpBB Reloaded Converters directory Removed Paths: ------------- phpBB Reloaded Converters/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <teh...@us...> - 2006-10-23 04:09:18
|
Revision: 258 http://svn.sourceforge.net/phpbbreloaded/?rev=258&view=rev Author: tehphpmaster Date: 2006-10-22 21:09:14 -0700 (Sun, 22 Oct 2006) Log Message: ----------- Removing the phpBB Reloaded 2 Portal add-on, as it is currently not supported, and is currently not in development. Removed Paths: ------------- phpBB Reloaded 2 Portal/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <teh...@us...> - 2006-10-23 04:06:43
|
Revision: 257 http://svn.sourceforge.net/phpbbreloaded/?rev=257&view=rev Author: tehphpmaster Date: 2006-10-22 21:06:36 -0700 (Sun, 22 Oct 2006) Log Message: ----------- Removing phpBB Reloaded Olympus directory; it currently isn't needed. Removed Paths: ------------- phpBB Reloaded Olympus/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kla...@us...> - 2006-10-22 05:50:10
|
Revision: 255 http://svn.sourceforge.net/phpbbreloaded/?rev=255&view=rev Author: klarinetking Date: 2006-10-21 22:50:05 -0700 (Sat, 21 Oct 2006) Log Message: ----------- Removing image link. Partially #3 Modified Paths: -------------- phpBB Reloaded Styles/smartDark/overall_header.tpl Modified: phpBB Reloaded Styles/smartDark/overall_header.tpl =================================================================== --- phpBB Reloaded Styles/smartDark/overall_header.tpl 2006-10-22 05:33:29 UTC (rev 254) +++ phpBB Reloaded Styles/smartDark/overall_header.tpl 2006-10-22 05:50:05 UTC (rev 255) @@ -1,11 +1,11 @@ <!-- mod : ranks --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html 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_TAGS} +<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_TAGS} <title>{SITENAME} - {PAGE_TITLE}</title>{META_TAGS} -{META} +{META} {NAV_LINKS} <link rel="stylesheet" href="templates/smartDark/{T_HEAD_STYLESHEET}" type="text/css"> <!-- BEGIN switch_enable_pm_popup --> @@ -57,7 +57,7 @@ <td align="center" width="100%" valign="middle"><span class="maintitle">{SITENAME}</span><br /><span class="gen">{SITE_DESCRIPTION}<br /> </span> <table cellspacing="0" cellpadding="2" border="0"> <tr> - <td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"><!-- BEGIN topic_calendar --> <a href="{U_CALENDAR}" class="mainmenu"><img src="{I_CALENDAR}" width="12" height="13" border="0" alt="{L_CALENDAR}" hspace="3" />{L_CALENDAR}</a> <!-- END topic_calendar --><a href="{U_FAQ}" class="mainmenu">{L_FAQ}</a></span><span class="mainmenu"> :: <a href="{U_SEARCH}" class="mainmenu">{L_SEARCH}</a> :: <a href="{U_MEMBERLIST}" class="mainmenu">{L_MEMBERLIST}</a> :: <a href="{U_GROUP_CP}" class="mainmenu">{L_USERGROUPS}</a> :: <a href="{U_RANKS}" class="mainmenu">{L_RANKS}</a> + <td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"><!-- BEGIN topic_calendar --> <a href="{U_CALENDAR}" class="mainmenu">{L_CALENDAR}</a> <!-- END topic_calendar --><a href="{U_FAQ}" class="mainmenu">{L_FAQ}</a></span><span class="mainmenu"> :: <a href="{U_SEARCH}" class="mainmenu">{L_SEARCH}</a> :: <a href="{U_MEMBERLIST}" class="mainmenu">{L_MEMBERLIST}</a> :: <a href="{U_GROUP_CP}" class="mainmenu">{L_USERGROUPS}</a> :: <a href="{U_RANKS}" class="mainmenu">{L_RANKS}</a> <!-- BEGIN switch_user_logged_out --> :: <a href="{U_REGISTER}" class="mainmenu">{L_REGISTER}</a> <!-- END switch_user_logged_out --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |