You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: FlorinCB <ory...@us...> - 2008-12-31 02:03:30
|
Update of /cvsroot/mxbb/phpbb2mxp/contrib In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv14289/contrib Log Message: Directory /cvsroot/mxbb/phpbb2mxp/contrib added to the repository |
Update of /cvsroot/mxbb/phpbb2mxp/contrib In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv14371 Added Files: README.html bbcode_conversion.php benchmark.php convert_avatars.php convert_bbcodeuid.php convert_conf.php convert_privmsgs.php convert_sigs.php convert_user_regdates.php convert_usernames.php dbinformer.php encoding_emails.php fix_files.sh fixfiles.sh insert_server_info.php most_users_update.php nuke-db.php revar_lang_files.php search_fill.php template_db_cache.php template_file_cache.php Log Message: fix --- NEW FILE: fix_files.sh --- #!/bin/bash # # Remove all those annoying ^M characters that Winblows editor's like to add # from all files in the current directory and all subdirectories. # # Written by: Jonathan Haase. # # UPDATE: 7/31/2001: fix so that it doesn't touch things in the images directory # find . > FILELIST.$$ grep -sv FILELIST FILELIST.$$ > FILELIST2.$$ grep -sv $(basename $0) FILELIST2.$$ > FILELIST.$$ grep -sv "^\.$" FILELIST.$$ > FILELIST2.$$ grep -sv "images" FILELIST2.$$ > FILELIST rm FILELIST2.$$ rm FILELIST.$$ for i in $(cat FILELIST); do if [ -f $i ]; then sed -e s/ //g $i > $i.tmp mv $i.tmp $i fi done rm FILELIST --- NEW FILE: dbinformer.php --- <?php /*************************************************************************** * dbinformer.php * ------------------- * begin : Saturday, May 05, 2002 * copyright : (C) 2002 The phpBB Group * email : n/a * * $Id: dbinformer.php,v 1.1 2008/12/31 01:50:51 orynider Exp $ * * Coded by AL, Techie-Micheal, Blade, and Black Fluffy Lion. * http://www.phpbb.com/phpBB/groupcp.php?g=7330 * ***************************************************************************/ /*************************************************************************** * * 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. * ***************************************************************************/ /* magic quotes, borrowed from install.php */ set_magic_quotes_runtime(0); if (!get_magic_quotes_gpc()) { 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); } } $all_connected = false; $error = false; $error_msg = ''; $select = false; $connect = false; function make_config($dbms, $dbhost, $dbname, $dbuser, $dbpasswd, $table_prefix) { $config_file = '<?php<br />' . "\n"; $config_file .= '<br />' . "\n"; $config_file .= '//<br />' . "\n"; $config_file .= '// phpBB 2.x auto-generated config file<br />' . "\n"; $config_file .= '// Do not change anything in this file!<br />' . "\n"; $config_file .= '//<br />' . "\n"; $config_file .= '<br />' . "\n"; $config_file .= '$dbms = \'' . $dbms . '\';<br /><br />' . "\n\n"; $config_file .= '$dbhost = \'' . $dbhost . '\';<br />' . "\n"; $config_file .= '$dbname = \'' . $dbname . '\';<br />' . "\n"; $config_file .= '$dbuser = \'' . $dbuser . '\';<br />' . "\n"; $config_file .= '$dbpasswd = \'' . $dbpasswd . '\';<br /><br />' . "\n\n"; $config_file .= '$table_prefix = \'' . $table_prefix . '\';<br /><br />' . "\n\n"; $config_file .= 'define(\'PHPBB_INSTALLED\', true);<br /><br />' . "\n\n"; $config_file .= '?>'; return $config_file; } function make_download($dbms, $dbhost, $dbname, $dbuser, $dbpasswd, $table_prefix) { $config_file = '<?php' . "\n\n"; $config_file .= '//' . "\n"; $config_file .= '// phpBB 2.x auto-generated config file' . "\n"; $config_file .= '// Do not change anything in this file!' . "\n"; $config_file .= '//' . "\n\n"; $config_file .= '$dbms = \'' . $dbms . '\';' . "\n\n"; $config_file .= '$dbhost = \'' . $dbhost . '\';' . "\n"; $config_file .= '$dbname = \'' . $dbname . '\';' . "\n"; $config_file .= '$dbuser = \'' . $dbuser . '\';' . "\n"; $config_file .= '$dbpasswd = \'' . $dbpasswd . '\';' . "\n\n"; $config_file .= '$table_prefix = \'' . $table_prefix . '\';' . "\n\n"; $config_file .= 'define(\'PHPBB_INSTALLED\', true);' . "\n\n"; $config_file .= '?>'; return $config_file; } /* make all the vars safe to display in form inputs and on the user's screen. Borrowed from usercp_register.php */ $check_var_list = array('dbms' => 'dbms', 'dbhost' => 'dbhost', 'dbname' => 'dbname', 'dbuser' => 'dbuser', 'dbpasswd' => 'dbpasswd', 'table_prefix' => 'table_prefix'); while (list($var, $param) = each($check_var_list)) { if (!empty($HTTP_POST_VARS[$param])) { $$var = stripslashes(htmlspecialchars(strip_tags($HTTP_POST_VARS[$param]))); } } $available_dbms = array( 'mysql' => 'MySQL 3.x', 'mysql4' => 'MySQL 4.x', 'postgres' => 'PostgreSQL 7.x', 'mssql' => 'MS SQL Server 7/2000', 'msaccess' => 'MS Access [ ODBC ]', 'mssql-odbc' => 'MS SQL Server [ OBDC ]', ); if (isset($HTTP_POST_VARS['download_config']) && $HTTP_POST_VARS['download_config'] == true && isset($HTTP_POST_VARS['submit_download_config']) && $HTTP_POST_VARS['submit_download_config'] == 'Download') { /* borrowed from install.php */ header('Content-Type: text/x-delimtext; name="config.php"'); header('Content-disposition: attachment; filename=config.php'); echo make_download($dbms, $dbhost, $dbname, $dbuser, $dbpasswd, $table_prefix); return; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <title>phpBB :: dbinformer.php</title> <link rel="stylesheet" href="../templates/subSilver/subSilver.css" type="text/css" /> <style type="text/css"> <!-- p,ul,td {font-size:10pt;} h3 {font-size:12pt;color:blue} //--> </style> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="10" align="center"> <tr> <td class="bodyline"><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="phpBB2 : Creating Communities" vspace="1" /></a></td> <td align="center" width="100%" valign="middle"><span class="maintitle">dbinformer.php</span> </td> </tr> </table> <br /><b><div align="center"> <a href="#what">What you entered</a> | <a href="#connect">Connection to database</a> | <a href="#tables">Tables in database</a> | <a href="#config">Config file</a> </b></div> <table width="100%" border="0" cellspacing="0" cellpadding="10" align="center"> <tr> <td align="center" width="100%" valign="middle"><span class="maintitle"></span></td> </tr> <tr> <td width="100%"> <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> <tr> <th colspan="2">Database Configuration</th> </tr> <tr> <td class="row1" align="right"><span class="gen">Database type: </span></td> <td class="row2"> <form action="<?php echo htmlspecialchars($HTTP_SERVER_VARS['PHP_SELF']); ?>" method="post"> <select name="dbms"> <?php /* loop through the dbms, with the correct one selected (hopefully!) */ while (list($var, $param) = each($available_dbms)) { $selected = ($dbms == $var) ? ' selected="selected"' : ''; echo '<option value="' . $var . '"' . $selected . '>' . $param . '</option>'; } ?> </select></td> </tr> <tr> <td class="row1" align="right"><span class="gen">Database Server Hostname / DSN: </span></td> <td class="row2"><input type="text" name="dbhost" value="<?php echo @$dbhost; ?>" /></td> </tr> <tr> <td class="row1" align="right"><span class="gen">Your Database Name: </span></td> <td class="row2"><input type="text" name="dbname" value="<?php echo @$dbname; ?>" /></td> </tr> <tr> <td class="row1" align="right"><span class="gen">Database Username: </span></td> <td class="row2"><input type="text" name="dbuser" value="<?php echo @$dbuser; ?>" /></td> </tr> <tr> <td class="row1" align="right"><span class="gen">Database Password: </span></td> <td class="row2"><input type="password" name="dbpasswd" value="<?php echo @$dbpasswd; ?>" /></td> </tr> <tr> <td class="row1" align="right"><span class="gen">Chosen Prefix: </span></td> <td class="row2"><input type="text" name="table_prefix" value="<?php echo @$table_prefix; ?>" /></td> </tr> <tr> <td class="row1" align="right"><span class="gen">Generate a config file: </span></td> </td> <td class="row2"><input type="checkbox" name="generate_config" value="true" <?php $checked = (isset($HTTP_POST_VARS['generate_config']) && $HTTP_POST_VARS['generate_config'] == true) ? 'checked="checked"' : ''; echo $checked; ?> /></td> </tr> <tr> <td class="catbottom" align="center" colspan="2"> <input class="mainoption" type="submit" name="submit" value="Submit" /></td> </tr> </form></td> </tr> </table> <?php if (!isset($HTTP_POST_VARS['submit'])) { echo '<br />Please enter your data.<br />'; } else { /* dbal added by Techie-Micheal [and then obliterated by BFL]. weeeeeee! */ switch ($dbms) { case 'mysql': if (function_exists(@mysql_connect)) { $db = array( 'choice' => 'MySQL 3.x', 'connect' => @mysql_connect($dbhost, $dbuser, $dbpasswd), 'select' => @mysql_select_db($dbname), 'error' => @mysql_error(), 'list' => @mysql_list_tables($dbname), 'fetch' => @mysql_fetch_row, 'close' => @mysql_close() ); } else { $error = true; $error_msg = 'You do not have the needed functions available for ' . $available_dbms[$dbms] . '.'; } break; case 'mysql4': if (function_exists(@mysql_connect)) { $db = array( 'choice' => 'MySQL 4.x', 'connect' => @mysql_connect($dbhost, $dbuser, $dbpasswd), 'select' => @mysql_select_db($dbname), 'error' => @mysql_error(), 'list' => @mysql_list_tables($dbname), 'fetch' => @mysql_fetch_row, 'close' => @mysql_close() ); } else { $error = true; $error_msg = 'You do not have the needed functions available for ' . $available_dbms[$dbms] . '.'; } break; case 'msaccess': if (function_exists(@odbc_connect)) { $db = array( 'choice' => 'MS Access [ ODBC ]', 'connect' => @odbc_connect($dbhost, $dbuser, $dbpasswd), 'select' => 'na', 'error' => @odbc_errormsg(), 'list' => 'na', /* odbc_tables() */ 'fetch' => 'na', /* odbc_fetch_row(), odbc_result_all() */ 'close' => @odbc_close() ); } else { $error = true; $error_msg = 'You do not have the needed functions available for ' . $available_dbms[$dbms] . '.'; } break; case 'postgres': if (function_exists(@pg_connect)) { $db = array( 'choice' => 'PostgreSQL 7.x', 'connect' => @pg_connect('host=' . $dbhost . ' user=' . $dbuser . ' dbname=' . $dbname . ' password=' . $dbpasswd), 'select' => 'na', 'error' => @pg_last_error(), 'list' => @pg_exec("SELECT relname FROM pg_class WHERE relkind = 'r' AND relname NOT LIKE 'pg\_%'"), /* provided by SuGa */ 'fetch' => @pg_fetch_row, 'close' => @pg_close() ); } else { $error = true; $error_msg = 'You do not have the needed functions available for ' . $available_dbms[$dbms] . '.'; } break; case 'mssql': if (function_exists(@mssql_connect)) { $db = array( 'choice' => 'MS SQL Server 7/2000', 'connect' => @mssql_connect($dbhost, $dbuser, $dbpasswd), 'select' => @mssql_select_db($dbname), 'error' => @mssql_get_last_message(), 'list' => 'na', 'fetch' => 'na', /* mssql_fetch_row() */ 'close' => @mssql_close() ); } else { $error = true; $error_msg = 'You do not have the needed functions available for ' . $available_dbms[$dbms] . '.'; } break; case 'mssql-odbc': if (function_exists(@odbc_connect)) { $db = array( 'choice' => 'MS SQL Server [ ODBC ]', 'connect' => @odbc_connect($dbhost, $dbuser, $dbpasswd), 'select' => 'na', 'error' => @odbc_errormsg(), 'list' => 'na', /* odbc_tables() */ 'fetch' => 'na', /* odbc_fetch_row(), odbc_result_all() */ 'close' => @odbc_close() ); } else { $error = true; $error_msg = 'You do not have the needed functions available for ' . $available_dbms[$dbms] . '.'; } break; default: $error = true; $error_msg = 'Unrecognised DBMS.'; break; } if ($error == true && $error_msg != '') { echo '<br /><b>ERROR:</b> ' . $error_msg . '<br />'; } else { echo '<a name="what"><h3><u>What you entered</u></h3></a>'; echo 'Database Type: <b>' . $db['choice'] . '</b><br />'; echo 'Database Server Hostname / DSN: <b>' . $dbhost . '</b><br />'; echo 'Your Database Name: <b>' . $dbname . '</b><br />'; echo 'Database Username: <b>' . $dbuser . '</b><br />'; echo 'Database Password: <b>' . $dbpasswd . '</b><br />'; echo '<a name="connect"><h3><u>Connection to database</u></h3></a>'; if (!$db['connect']) { echo 'You have not established a connection to <b>' . $db['choice'] . '</b>.<br />'; echo '<b>ERROR:</b> <i>' . $db['error'] . '</i><br /><br />'; } else { echo 'You have established a connection to <b>' . $db['choice'] . '</b>.<br /><br />'; $connect = true; } if ($dbms == 'msaccess' || $dbms == 'postgres' || $dbms == 'mssql-odbc') { /* for dbmses which have no db select function */ $select = true; } else { if (!$db['select']) { echo 'Your database was not found.<br />'; echo '<b>ERROR:</b> <i>' . htmlspecialchars($db['error']) . '</i><br />'; } else { echo 'Your database was found.<br />'; $select = true; } } if ($connect == true && $select == true) { echo '<a name="tables"><h3><u>Tables in database</u></h3></a>'; if ($dbms == 'mysql' || $dbms == 'mysql4' || $dbms == 'postgres') { echo '<i>Tables with the table prefix you specified are in bold.</i>'; echo '<ul>'; while ($table = $db['fetch']($db['list'])) { /* Highlight tables with the table_prefix specified */ if (preg_match("/^$HTTP_POST_VARS[table_prefix]/i", $table[0])) { echo '<li><b>' . htmlspecialchars($table[0]) . '</b></li><br />'; } else { echo '<li>' . htmlspecialchars($table[0]) . '</li><br />'; } } echo '</ul>'; } else { echo 'Sorry, this feature isn\'t available with ' . $db['choice'] . '.'; } /* defined a var which is only there if successfully connected to the database and the database is found */ $all_connected = true; } /* Create a config file if checked and if the connection went OK */ if (isset($HTTP_POST_VARS['generate_config']) && $HTTP_POST_VARS['generate_config'] == true) { echo '<a name="config"><h3><u>Config file</u></h3></a>'; if ($all_connected != true) { echo 'The database has not been successfully connected to so no config file has been generated.<br />'; } else { echo 'Either copy the <b>19</b> lines below and save them as <u>config.php</u> or click on the <u>Download</u> button below. Then upload the file to your phpBB2 root directory (phpBB2/ by default). Make sure that there is nothing (this includes blank spaces) after the <u>?></u>.<br /><br />'; /* Create our config file */ echo '<form action="' . htmlspecialchars($HTTP_SERVER_VARS['PHP_SELF']) . '" method="post"><table cellspacing="1" cellpadding="3" border="0"><tr><td class="code">'; echo make_config($dbms, $dbhost, $dbname, $dbuser, $dbpasswd, $table_prefix); echo '</td></tr></table>'; echo '<input type="hidden" name="dbms" value="' . $dbms . '" />'; echo '<input type="hidden" name="dbhost" value="' . $dbhost . '" />'; echo '<input type="hidden" name="dbname" value="' . $dbname . '" />'; echo '<input type="hidden" name="dbuser" value="' . $dbuser . '" />'; echo '<input type="hidden" name="dbpasswd" value="' . $dbpasswd . '" />'; echo '<input type="hidden" name="table_prefix" value="' . $table_prefix . '" />'; echo '<input type="hidden" name="download_config" value="true" />'; echo '<br /><input type="submit" name="submit_download_config" value="Download" class="mainoption" /><br />'; } } /* close the connection */ if ($all_connected == true) { $db['close']; } } } /* And they all lived happily ever after... The End */ ?> <br /><a href="javascript:scrollTo('0','0');"><b>Return to top</b></a> </td> </tr> </table> <div align="center"><span class="copyright">© Copyright 2002 The <a href="http://www.phpbb.com/about.php" target="_phpbb" class="copyright">phpBB Group</a></span></div> </td> </tr> </table> </body> </html> --- NEW FILE: convert_avatars.php --- <?php // // Security message: // // This script is potentially dangerous. // Remove or comment the next line (die(".... ) to enable this script. // Do NOT FORGET to either remove this script or disable it after you have used it. // die("Please read the first lines of this script for instructions on how to enable it"); // // Do not change anything below this line. // $phpbb_root_path = "../"; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'config.'.$phpEx); include($phpbb_root_path . 'includes/constants.'.$phpEx); include($phpbb_root_path . 'includes/db.'.$phpEx); $sql = "ALTER TABLE " . USERS_TABLE . " ADD user_avatar_type TINYINT(4) DEFAULT '0' NOT NULL"; if( !$result = $db->sql_query($sql) ) { die("Couldn't alter users table"); } $sql = "SELECT user_id, user_avatar FROM " . USERS_TABLE; if( $result = $db->sql_query($sql) ) { $rowset = $db->sql_fetchrowset($result); for($i = 0; $i < count($rowset); $i++) { if( ereg("^http", $rowset[$i]['user_avatar'])) { $sql_type = USER_AVATAR_REMOTE; } else if( $rowset[$i]['user_avatar'] != "" ) { $sql_type = USER_AVATAR_UPLOAD; } else { $sql_type = USER_AVATAR_NONE; } $sql = "UPDATE " . USERS_TABLE . " SET user_avatar_type = $sql_type WHERE user_id = " . $rowset[$i]['user_id']; if( !$result = $db->sql_query($sql) ) { die("Couldn't update users table- " . $i); } } } echo "<BR><BR>COMPLETE<BR>"; ?> --- NEW FILE: template_db_cache.php --- <?php /*************************************************************************** * template.inc * ------------------- * begin : Saturday, Feb 13, 2001 * copyright : (C) 2001 The phpBB Group * email : su...@ph... * * $Id: template_db_cache.php,v 1.1 2008/12/31 01:50:51 orynider 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. * ***************************************************************************/ /** * Template class. By Nathan Codding of the phpBB group. * The interface was originally inspired by PHPLib templates, * and the template file formats are quite similar. * */ class Template { var $classname = "Template"; // variable that holds all the data we'll be substituting into // the compiled templates. // ... // This will end up being a multi-dimensional array like this: // $this->_tpldata[block.][iteration#][child.][iteration#][child2.][iteration#][variablename] == value // if it's a root-level variable, it'll be like this: // $this->_tpldata[.][0][varname] == value var $_tpldata = array(); // Hash of filenames for each template handle. var $files = array(); // Root template directory. var $root = ""; // this will hash handle names to the compiled code for that handle. var $compiled_code = array(); // This will hold the uncompiled code for that handle. var $uncompiled_code = array(); /** * Constructor. Simply sets the root dir. * */ function Template($root = '.') { global $db; $this->set_rootdir($root); $this->db = &$db; $this->pparse_order = array(); } /** * Destroys this template object. Should be called when you're done with it, in order * to clear out the template data so you can load/parse a new template set. */ function destroy() { $this->_tpldata = array(); } /** * Sets the template root directory for this Template object. */ function set_rootdir($dir) { if (!is_dir($dir)) { return false; } $this->root = $dir; return true; } /** * Sets the template filenames for handles. $filename_array * should be a hash of handle => filename pairs. */ function set_filenames($filename_array) { global $table_prefix; if ( !is_array($filename_array) ) { return false; } $template_names = ''; @reset($filename_array); while ( list($handle, $filename) = @each($filename_array) ) { $this->files[$handle] = $this->make_filename($filename); $template_names .= ( $template_names != '' ) ? ", '" . addslashes($this->files[$handle]) . "'" : "'" . addslashes($this->files[$handle]) . "'"; } $sql = "SELECT * FROM " . $table_prefix . "template_cache WHERE template_name IN ($template_names)"; if ( $result = $this->db->sql_query($sql) ) { while( $row = $this->db->sql_fetchrow($result) ) { if( $row['template_cached'] == filemtime($row['template_name']) ) { $this->compiled_code[$row['template_handle']] = $row['template_compile']; $this->echo_compiled[$row['template_handle']] = $row['template_echo']; } } } $this->db->sql_freeresult(); return true; } /** * Load the file for the handle, compile the file, * and run the compiled code. This will print out * the results of executing the template. */ function pparse($handle) { global $table_prefix; if( empty($this->compiled_code[$handle]) ) { if ( !$this->loadfile($handle) ) { die("Template->pparse(): Couldn't load template file for handle $handle"); } // // Actually compile the code now. // $this->echo_compiled[$handle] = 1; $this->compiled_code[$handle] = $this->compile($this->uncompiled_code[$handle]); $sql = "REPLACE INTO " . $table_prefix . "template_cache (template_name, template_handle, template_cached, template_compile) VALUES ('" . addslashes($this->files[$handle]) . "', '" . addslashes($handle) . "', " . filemtime($this->files[$handle]) . ", '" . addslashes($this->compiled_code[$handle]) . "')"; if ( !($result = $this->db->sql_query($sql)) ) { die("Couldn't insert template into cache!"); } } $_str = ""; eval($this->compiled_code[$handle]); if( $_str != "" ) { echo $_str; } return true; } /** * Inserts the uncompiled code for $handle as the * value of $varname in the root-level. This can be used * to effectively include a template in the middle of another * template. * Note that all desired assignments to the variables in $handle should be done * BEFORE calling this function. */ function assign_var_from_handle($varname, $handle) { global $table_prefix; if( empty($this->compiled_code[$handle]) ) { if ( !$this->loadfile($handle) ) { die("Template->pparse(): Couldn't load template file for handle $handle"); } $code = $this->compile($this->uncompiled_code[$handle], true, '_str'); $sql = "REPLACE INTO " . $table_prefix . "template_cache (template_name, template_handle, template_echo, template_cached, template_compile) VALUES ('" . addslashes($this->files[$handle]) . "', '" . addslashes($handle) . "', 0, " . filemtime($this->files[$handle]) . ", '" . addslashes($code) . "')"; if ( !($result = $this->db->sql_query($sql)) ) { die("Couldn't insert template into cache!"); } } else { $code = $this->compiled_code[$handle]; } // Compile It, With The "no Echo Statements" Option On. $_str = ""; // evaluate the variable assignment. eval($code); // assign the value of the generated variable to the given varname. $this->assign_var($varname, $_str); return true; } /** * Block-level variable assignment. Adds a new block iteration with the given * variable assignments. Note that this should only be called once per block * iteration. */ function assign_block_vars($blockname, $vararray) { if (strstr($blockname, '.')) { // Nested block. $blocks = explode('.', $blockname); $blockcount = sizeof($blocks) - 1; $str = '$this->_tpldata'; for ($i = 0; $i < $blockcount; $i++) { $str .= '[\'' . $blocks[$i] . '.\']'; eval('$lastiteration = sizeof(' . $str . ') - 1;'); $str .= '[' . $lastiteration . ']'; } // Now we add the block that we're actually assigning to. // We're adding a new iteration to this block with the given // variable assignments. $str .= '[\'' . $blocks[$blockcount] . '.\'][] = $vararray;'; // Now we evaluate this assignment we've built up. eval($str); } else { // Top-level block. // Add a new iteration to this block with the variable assignments // we were given. $this->_tpldata[$blockname . '.'][] = $vararray; } return true; } /** * Root-level variable assignment. Adds to current assignments, overriding * any existing variable assignment with the same name. */ function assign_vars($vararray) { reset ($vararray); while (list($key, $val) = each($vararray)) { $this->_tpldata['.'][0][$key] = $val; } return true; } /** * Root-level variable assignment. Adds to current assignments, overriding * any existing variable assignment with the same name. */ function assign_var($varname, $varval) { $this->_tpldata['.'][0][$varname] = $varval; return true; } /** * Generates a full path+filename for the given filename, which can either * be an absolute name, or a name relative to the rootdir for this Template * object. */ function make_filename($filename) { // Check if it's an absolute or relative path. if (substr($filename, 0, 1) != '/') { $filename = $this->root . '/' . $filename; } if (!file_exists($filename)) { die("Template->make_filename(): Error - file $filename does not exist"); } return $filename; } /** * If not already done, load the file for the given handle and populate * the uncompiled_code[] hash with its code. Do not compile. */ function loadfile($handle) { // If the file for this handle is already loaded and compiled, do nothing. if ( !empty($this->uncompiled_code[$handle]) ) { return true; } // If we don't have a file assigned to this handle, die. if (!isset($this->files[$handle])) { die("Template->loadfile(): No file specified for handle $handle"); } $filename = $this->files[$handle]; $str = implode("", @file($filename)); if (empty($str)) { die("Template->loadfile(): File $filename for handle $handle is empty"); } $this->uncompiled_code[$handle] = $str; return true; } /** * Compiles the given string of code, and returns * the result in a string. * If "do_not_echo" is true, the returned code will not be directly * executable, but can be used as part of a variable assignment * for use in assign_code_from_handle(). */ function compile($code, $do_not_echo = false, $retvar = '') { // replace \ with \\ and then ' with \'. $code = str_replace('\\', '\\\\', $code); $code = str_replace('\'', '\\\'', $code); // change template varrefs into PHP varrefs // This one will handle varrefs WITH namespaces $varrefs = array(); preg_match_all('#\{(([a-z0-9\-_]+?\.)+?)([a-z0-9\-_]+?)\}#is', $code, $varrefs); $varcount = sizeof($varrefs[1]); for ($i = 0; $i < $varcount; $i++) { $namespace = $varrefs[1][$i]; $varname = $varrefs[3][$i]; $new = $this->generate_block_varref($namespace, $varname); $code = str_replace($varrefs[0][$i], $new, $code); } // This will handle the remaining root-level varrefs $code = preg_replace('#\{([a-z0-9\-_]*?)\}#is', '\' . ( ( isset($this->_tpldata[\'.\'][0][\'\1\']) ) ? $this->_tpldata[\'.\'][0][\'\1\'] : \'\' ) . \'', $code); // Break it up into lines. $code_lines = explode("\n", $code); $block_nesting_level = 0; $block_names = array(); $block_names[0] = "."; // Second: prepend echo ', append ' . "\n"; to each line. $line_count = sizeof($code_lines); for ($i = 0; $i < $line_count; $i++) { $code_lines[$i] = chop($code_lines[$i]); if (preg_match('#<!-- BEGIN (.*?) -->#', $code_lines[$i], $m)) { $n[0] = $m[0]; $n[1] = $m[1]; // Added: dougk_ff7-Keeps templates from bombing if begin is on the same line as end.. I think. :) if ( preg_match('#<!-- END (.*?) -->#', $code_lines[$i], $n) ) { $block_nesting_level++; $block_names[$block_nesting_level] = $m[1]; if ($block_nesting_level < 2) { // Block is not nested. $code_lines[$i] = '$_' . $a[1] . '_count = ( isset($this->_tpldata[\'' . $n[1] . '.\']) ) ? sizeof($this->_tpldata[\'' . $n[1] . '.\']) : 0;'; $code_lines[$i] .= "\n" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)'; $code_lines[$i] .= "\n" . '{'; } else { // This block is nested. // Generate a namespace string for this block. $namespace = implode('.', $block_names); // strip leading period from root level.. $namespace = substr($namespace, 2); // Get a reference to the data array for this block that depends on the // current indices of all parent blocks. $varref = $this->generate_block_data_ref($namespace, false); // Create the for loop code to iterate over this block. $code_lines[$i] = '$_' . $a[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;'; $code_lines[$i] .= "\n" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)'; $code_lines[$i] .= "\n" . '{'; } // We have the end of a block. unset($block_names[$block_nesting_level]); $block_nesting_level--; $code_lines[$i] .= '} // END ' . $n[1]; $m[0] = $n[0]; $m[1] = $n[1]; } else { // We have the start of a block. $block_nesting_level++; $block_names[$block_nesting_level] = $m[1]; if ($block_nesting_level < 2) { // Block is not nested. $code_lines[$i] = '$_' . $m[1] . '_count = ( isset($this->_tpldata[\'' . $m[1] . '.\']) ) ? sizeof($this->_tpldata[\'' . $m[1] . '.\']) : 0;'; $code_lines[$i] .= "\n" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1] . '_count; $_' . $m[1] . '_i++)'; $code_lines[$i] .= "\n" . '{'; } else { // This block is nested. // Generate a namespace string for this block. $namespace = implode('.', $block_names); // strip leading period from root level.. $namespace = substr($namespace, 2); // Get a reference to the data array for this block that depends on the // current indices of all parent blocks. $varref = $this->generate_block_data_ref($namespace, false); // Create the for loop code to iterate over this block. $code_lines[$i] = '$_' . $m[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;'; $code_lines[$i] .= "\n" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1] . '_count; $_' . $m[1] . '_i++)'; $code_lines[$i] .= "\n" . '{'; } } } else if (preg_match('#<!-- END (.*?) -->#', $code_lines[$i], $m)) { // We have the end of a block. unset($block_names[$block_nesting_level]); $block_nesting_level--; $code_lines[$i] = '} // END ' . $m[1]; } else { // We have an ordinary line of code. if (!$do_not_echo) { $code_lines[$i] = 'echo \'' . $code_lines[$i] . '\' . "\\n";'; } else { $code_lines[$i] = '$' . $retvar . '.= \'' . $code_lines[$i] . '\' . "\\n";'; } } } // Bring it back into a single string of lines of code. $code = implode("\n", $code_lines); return $code ; } /** * Generates a reference to the given variable inside the given (possibly nested) * block namespace. This is a string of the form: * ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . ' * It's ready to be inserted into an "echo" line in one of the templates. * NOTE: expects a trailing "." on the namespace. */ function generate_block_varref($namespace, $varname) { // Strip the trailing period. $namespace = substr($namespace, 0, strlen($namespace) - 1); // Get a reference to the data block for this namespace. $varref = $this->generate_block_data_ref($namespace, true); // Prepend the necessary code to stick this in an echo line. // Append the variable reference. $varref .= '[\'' . $varname . '\']'; $varref = '\' . ( ( isset(' . $varref . ') ) ? ' . $varref . ' : \'\' ) . \''; return $varref; } /** * Generates a reference to the array of data values for the given * (possibly nested) block namespace. This is a string of the form: * $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN'] * * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. * NOTE: does not expect a trailing "." on the blockname. */ function generate_block_data_ref($blockname, $include_last_iterator) { // Get an array of the blocks involved. $blocks = explode(".", $blockname); $blockcount = sizeof($blocks) - 1; $varref = '$this->_tpldata'; // Build up the string with everything but the last child. for ($i = 0; $i < $blockcount; $i++) { $varref .= '[\'' . $blocks[$i] . '.\'][$_' . $blocks[$i] . '_i]'; } // Add the block reference for the last child. $varref .= '[\'' . $blocks[$blockcount] . '.\']'; // Add the iterator for the last child if requried. if ($include_last_iterator) { $varref .= '[$_' . $blocks[$blockcount] . '_i]'; } return $varref; } } ?> --- NEW FILE: convert_usernames.php --- <html> <body> <?php // // Security message: // // This script is potentially dangerous. // Remove or comment the next line (die(".... ) to enable this script. // Do NOT FORGET to either remove this script or disable it after you have used it. // die("Please read the first lines of this script for instructions on how to enable it"); // // Do not change anything below this line. // // // Convert 2.0.x Usernames to the new 2.0.5 Username format. // chdir("../"); define('IN_PHPBB', true); include('extension.inc'); include('config.'.$phpEx); include('includes/constants.'.$phpEx); include('includes/db.'.$phpEx); $sql = "SELECT user_id, username FROM " . USERS_TABLE; $result = $db->sql_query($sql); if(!$result) { die("Unable to get users"); } while ($row = $db->sql_fetchrow($result)) { if (!preg_match('#(>)|(<)|(")|(&)#', $row['username'])) { if ($row['username'] != htmlspecialchars($row['username'])) { flush(); $sql = "UPDATE " . USERS_TABLE . " SET username = '" . str_replace("'", "''", htmlspecialchars($row['username'])) . "' WHERE user_id = " . $row['user_id']; if (!$db->sql_query($sql)) { echo "ERROR: Unable to rename user " . htmlspecialchars($row['username']) . " with ID " . $row['user_id'] . "<br>"; echo "<pre>" . print_r($db->sql_error()) . "</pre><br />$sql"; } else { echo "Renamed User " . htmlspecialchars($row['username']) . " with ID " . $row['user_id'] . "<br>"; } } } } echo "<br>That's All Folks!"; ?> </body> </html> --- NEW FILE: search_fill.php --- <?php // // Security message: // // This script is potentially dangerous. // Remove or comment the next line (die(".... ) to enable this script. // Do NOT FORGET to either remove this script or disable it after you have used it. // // // Do not change anything below this line. // set_time_limit(0); $phpbb_root_path = "../"; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); include($phpbb_root_path . 'includes/search.'.$phpEx); $common_percent = 0.4; // Percentage of posts in which a word has to appear to be marked as common print "<html>\n<body>\n"; // // Try and load stopword and synonym files // // This needs fixing! Shouldn't be hardcoded to English files! $stopword_array = file($phpbb_root_path . "language/lang_english/search_stopwords.txt"); $synonym_array = file($phpbb_root_path . "language/lang_english/search_synonyms.txt"); // // Fetch a batch of posts_text entries // $sql = "SELECT COUNT(*) as total, MAX(post_id) as max_post_id FROM ". POSTS_TEXT_TABLE; if ( !($result = $db->sql_query($sql)) ) { $error = $db->sql_error(); die("Couldn't get maximum post ID :: " . $sql . " :: " . $error['message']); } $max_post_id = $db->sql_fetchrow($result); $totalposts = $max_post_id['total']; $max_post_id = $max_post_id['max_post_id']; $postcounter = (!isset($HTTP_GET_VARS['batchstart'])) ? 0 : $HTTP_GET_VARS['batchstart']; $batchsize = 200; // Process this many posts per loop $batchcount = 0; for(;$postcounter <= $max_post_id; $postcounter += $batchsize) { $batchstart = $postcounter + 1; $batchend = $postcounter + $batchsize; $batchcount++; $sql = "SELECT * FROM " . POSTS_TEXT_TABLE . " WHERE post_id BETWEEN $batchstart AND $batchend"; if( !($result = $db->sql_query($sql)) ) { $error = $db->sql_error(); die("Couldn't get post_text :: " . $sql . " :: " . $error['message']); } $rowset = $db->sql_fetchrowset($result); $db->sql_freeresult($result); $post_rows = count($rowset); if( $post_rows ) { // $sql = "LOCK TABLES ".POST_TEXT_TABLE." WRITE"; // $result = $db->sql_query($sql); print "\n<p>\n<a href='$PHP_SELF?batchstart=$batchstart'>Restart from posting $batchstart</a><br>\n"; // For every post in the batch: for($post_nr = 0; $post_nr < $post_rows; $post_nr++ ) { print "."; flush(); $post_id = $rowset[$post_nr]['post_id']; $matches = array(); $matches['text'] = split_words(clean_words("post", $rowset[$post_nr]['post_text'], $stopword_array, $synonym_array)); $matches['title'] = split_words(clean_words("post", $rowset[$post_nr]['post_subject'], $stopword_array, $synonym_array)); while( list($match_type, $match_ary) = @each($matches) ) { $title_match = ( $match_type == 'title' ) ? 1 : 0; $num_matches = count($match_ary); if ( $num_matches < 1 ) { // Skip this post if no words where found continue; } // For all words in the posting $sql_in = ""; $sql_insert = ''; $sql_select = ''; $word = array(); $word_count = array(); for($j = 0; $j < $num_matches; $j++) { $this_word = strtolower(trim($match_ary[$j])); if ( $this_word != '' ) { $word_count[$this_word] = ( isset($word_count[$this_word]) ) ? $word_count[$this_word] + 1 : 0; $comma = ($sql_insert != '')? ', ': ''; $sql_insert .= "$comma('" . $this_word . "')"; $sql_select .= "$comma'" . $this_word . "'"; } } if ( $sql_insert == '' ) { die("no words found"); } $sql = 'INSERT IGNORE INTO ' . SEARCH_WORD_TABLE . " (word_text) VALUES $sql_insert"; if ( !$result = $db->sql_query($sql) ) { $error = $db->sql_error(); die("Couldn't INSERT words :: " . $sql . " :: " . $error['message']); } // Get the word_id's out of the DB (to see if they are already there) $sql = "SELECT word_id, word_text FROM " . SEARCH_WORD_TABLE . " WHERE word_text IN ($sql_select) GROUP BY word_text"; $result = $db->sql_query($sql); if ( !$result ) { $error = $db->sql_error(); die("Couldn't select words :: " . $sql . " :: " . $error['message']); } $sql_insert = array(); while( $row = $db->sql_fetchrow($result) ) { $sql_insert[] = "($post_id, " . $row['word_id'] . ", $title_match)"; } $db->sql_freeresult($result); $sql = "INSERT INTO " . SEARCH_MATCH_TABLE . " (post_id, word_id, title_match) VALUES " . implode(", ", $sql_insert); $result = $db->sql_query($sql); if ( !$result ) { $error = $db->sql_error(); die("Couldn't insert new word match :: " . $sql . " :: " . $error['message']); } } // All posts } // $sql = "UNLOCK TABLES"; // $result = $db->sql_query($sql); } // Remove common words after the first 2 batches and after every 4th batch after that. if( $batchcount % 4 == 3 ) { print "<br>Removing common words (words that appear in more than $common_percent of the posts)<br>\n"; flush(); print "Removed ". remove_common("global", $common_percent) ." words that where too common.<br>"; } } echo "<br>Done"; ?> </body> </html> --- NEW FILE: convert_privmsgs.php --- <?php // // Security message: // // This script is potentially dangerous. // Remove or comment the next line (die(".... ) to enable this script. // Do NOT FORGET to either remove this script or disable it after you have used it. // die("Please read the first lines of this script for instructions on how to enable it"); // // Do not change anything below this line. // $phpbb_root_path = "../"; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'config.'.$phpEx); include($phpbb_root_path . 'includes/constants.'.$phpEx); include($phpbb_root_path . 'includes/db.'.$phpEx); // // Alter table ... // echo "Alter tables ... "; echo $sql = "ALTER TABLE " . PRIVMSGS_TABLE . " ADD privmsgs_enable_bbcode TINYINT(1) DEFAULT '1' NOT NULL, ADD privmsgs_enable_html TINYINT(1) DEFAULT '0' NOT NULL, ADD privmsgs_enable_smilies TINYINT(1) DEFAULT '1' NOT NULL, ADD privmsgs_attach_sig TINYINT(1) DEFAULT '1' NOT NULL"; if( !$result = $db->sql_query($sql) ) { die("Couldn't alter privmsgs table"); } echo $sql = "ALTER TABLE " . PRIVMSGS_TEXT_TABLE . " ADD privmsgs_bbcode_uid CHAR(10) AFTER privmsgs_text_id"; if( !$result = $db->sql_query($sql) ) { die("Couldn't alter privmsgs text table"); } echo "COMPLETE<BR>"; // // Move bbcode ... // echo "Move bbcode uid's ... "; $sql = "SELECT privmsgs_id, privmsgs_bbcode_uid FROM " . PRIVMSGS_TABLE; if( $result = $db->sql_query($sql) ) { $rowset = $db->sql_fetchrowset($result); for($i = 0; $i < count($rowset); $i++) { $sql = "UPDATE " . PRIVMSGS_TEXT_TABLE . " SET privmsgs_bbcode_uid = '" . $rowset[$i]['privmsgs_bbcode_uid'] . "' WHERE privmsgs_text_id = " . $rowset[$i]['privmsgs_id']; if( !$result = $db->sql_query($sql) ) { die("Couldn't update privmsgs text bbcode - " . $i); } } $sql = "ALTER TABLE " . PRIVMSGS_TABLE . " DROP privmsgs_bbcode_uid"; if( !$result = $db->sql_query($sql) ) { die("Couldn't alter privmsgs table - drop privmsgs_bbcode_uid"); } } echo "COMPLETE<BR>"; // // Stripslashes from titles // echo "Strip subject slashes ... "; $sql = "SELECT privmsgs_subject , privmsgs_id, privmsgs_to_userid, privmsgs_from_userid FROM " . PRIVMSGS_TABLE; if( $result = $db->sql_query($sql) ) { $rowset = $db->sql_fetchrowset($result); for($i = 0; $i < count($rowset); $i++) { $sql = "UPDATE " . PRIVMSGS_TABLE . " SET privmsgs_subject = '" . addslashes(stripslashes($rowset[$i]['privmsgs_subject'])) . "' WHERE privmsgs_id = " . $rowset[$i]['privmsgs_id']; if( !$result = $db->sql_query($sql) ) { die("Couldn't update subjects - $i"); } } } echo "COMPLETE<BR>"; // // Update sigs // echo "Remove [addsig], stripslashes and update privmsgs table sig enable ..."; $sql = "SELECT privmsgs_text_id , privmsgs_text FROM " . PRIVMSGS_TEXT_TABLE; if( $result = $db->sql_query($sql) ) { $rowset = $db->sql_fetchrowset($result); $attach_sql = ""; $non_attach_sql = ""; for($i = 0; $i < count($rowset); $i++) { if( ereg("\[addsig]$", $rowset[$i]['privmsgs_text'])) { if( $attach_sql != "" ) { $attach_sql .= ", "; } $attach_sql .= $rowset[$i]['privmsgs_text_id']; $sql = "UPDATE " . PRIVMSGS_TEXT_TABLE . " SET privmsgs_text = '" . addslashes(preg_replace("/\[addsig\]/is", "", stripslashes($rowset[$i]['privmsgs_text']))) . "' WHERE privmsgs_text_id = " . $rowset[$i]['privmsgs_text_id']; if( !$result = $db->sql_query($sql) ) { die("Couldn't update privmsgs text - " . $i); } } else { $sql = "UPDATE " . PRIVMSGS_TEXT_TABLE . " SET privmsgs_text = '" . addslashes(stripslashes($rowset[$i]['privmsgs_text'])) . "' WHERE privmsgs_text_id = " . $rowset[$i]['privmsgs_text_id']; if( !$result = $db->sql_query($sql) ) { die("Couldn't update privmsgs text - " . $i); } if( $non_attach_sql != "" ) { $non_attach_sql .= ", "; } $non_attach_sql .= $rowset[$i]['privmsgs_text_id']; } } if( $attach_sql != "" ) { $sql = "UPDATE " . PRIVMSGS_TABLE . " SET privmsgs_attach_sig = 1 WHERE privmsgs_id IN ($attach_sql)"; if( !$result = $db->sql_query($sql) ) { die("Couldn't update privmsgs table attach_sig - "); } } if( $non_attach_sql != "" ) { $sql = "UPDATE " . PRIVMSGS_TABLE . " SET privmsgs_attach_sig = 0 WHERE privmsgs_id IN ($non_attach_sql)"; if( !$result = $db->sql_query($sql) ) { die("Couldn't update privmsgs table non_attach_sig - "); } } } echo "COMPLETE<BR>"; $db->sql_close(); ?> --- NEW FILE: convert_sigs.php --- <?php // // Security message: // // This script is potentially dangerous. // Remove or comment the next line (die(".... ) to enable this script. // Do NOT FORGET to either remove this script or disable it after you have used it. // die("Please read the first lines of this script for instructions on how to enable it"); // // Do not change anything below this line. // $phpbb_root_path = "../"; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'config.'.$phpEx); include($phpbb_root_path . 'includes/constants.'.$phpEx); include($phpbb_root_path . 'includes/db.'.$phpEx); $sql = "SELECT post_id, post_text FROM " . POSTS_TEXT_TABLE; if( $result = $db->sql_query($sql) ) { $rowset = $db->sql_fetchrowset($result); $attach_sql = ""; $non_attach_sql = ""; for($i = 0; $i < count($rowset); $i++) { if( ereg("\[addsig]$", $rowset[$i]['post_text'])) { if( $attach_sql != "" ) { $attach_sql .= ", "; } $attach_sql .= $rowset[$i]['post_id']; $sql = "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '" . addslashes(preg_replace("/\[addsig\]/is", "", $rowset[$i]['post_text'])) . "' WHERE post_id = " . $rowset[$i]['post_id']; if( !$result = $db->sql_query($sql) ) { die("Couldn't update post_text - " . $i); } } else { if( $non_attach_sql != "" ) { $non_attach_sql .= ", "; } $non_attach_sql .= $rowset[$i]['post_id']; } } echo "<BR>"; if( $attach_sql != "" ) { echo $sql = "UPDATE " . POSTS_TABLE . " SET enable_sig = 1 WHERE post_id IN ($attach_sql)"; if( !$result = $db->sql_query($sql) ) { die("Couldn't update post table attach_sig - "); } } echo "<BR>"; if( $non_attach_sql != "" ) { echo $sql = "UPDATE " . POSTS_TABLE . " SET enable_sig = 0 WHERE post_id IN ($non_attach_sql)"; if( !$result = $db->sql_query($sql) ) { die("Couldn't update post table non_attach_sig - "); } } } $db->sql_close(); echo "<BR><BR>COMPLETE<BR>"; ?> --- NEW FILE: template_file_cache.php --- <?php /*************************************************************************** * template.php * ------------------- * begin : Saturday, Feb 13, 2001 * copyright : (C) 2001 The phpBB Group * email : su...@ph... * * $Id: template_file_cache.php,v 1.1 2008/12/31 01:50:51 orynider 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. * ***************************************************************************/ /** * Template class. By Nathan Codding of the phpBB group. * The interface was originally inspired by PHPLib templates, * and the template file formats are quite similar. * * Updated 9th June 2003 - psoTFX * Backported various aspects of 2.2 template class * */ class Template { var $classname = 'Template'; // variable that holds all the data we'll be substituting into // the compiled templates. var $_tpldata = array(); // Hash of filenames for each template handle. var $files = array(); // Root template directories var $cache_root = 'cache/'; var $root = ''; // this will hash handle names to the compiled code for that handle. var $compiled_code = array(); // This will hold the uncompiled code for that handle. var $uncompiled_code = array(); /** * Constructor. Simply sets the root dir. * */ function Template($root = '.') { global $board_config, $db; $this->set_rootdir($root); $this->db = $db; } /** * Destroys this template object. Should be called when you're done with it, in order * to clear out the template data so you can load/parse a new template set. */ function destroy() { $this->_tpldata = array(); } /** * Sets the template root directory for this Template object. */ function set_rootdir($dir) { global $phpbb_root_path; if (is_file($dir) || is_link($dir)) { return false; } $this->root = phpbb_realpath($dir); $this->cachedir = phpbb_realpath($phpbb_root_path . $this->cache_root) . substr($dir, strrpos($dir, '/')) . '/'; if (!file_exists($this->cachedir . 'admin/')) { @umask(0); if (!file_exists($this->cachedir)) { mkdir($this->cachedir, 0777); } mkdir($this->cachedir . 'admin/', 0777); } return true; } /** * Sets the template filenames for handles. $filename_array * should be a hash of handle => filename pairs. */ function set_filenames($filename_array) { if (!is_array($filename_array)) { return false; } $template_names = ''; @reset($filename_array); while (list($handle, $filename) = @each($filename_array)) { $this->filename[$handle] = $filename; $this->files[$handle] = $this->make_filename($filename); } return true; } /** * Load the file for the handle, compile the file, * and run the compiled code. This will print out * the results of executing the template. */ function pparse($handle) { global $phpEx; $cache_file = $this->cachedir . $this->filename[$handle] . '.' . $phpEx; if(@filemtime($cache_file) == @filemtime($this->files[$handle])) { $_str = ''; include($cache_file); if ($_str != '') { echo $_str; } } else { if (!$this->loadfile($handle)) { die("Template->pparse(): Couldn't load template file for handle $handle"); } // Actually compile the code now. $this->compiled_code[$handle] = $this->compile($this->uncompiled_code[$handle]); $fp = fopen($cache_file, 'w+'); fwrite ($fp, '<?php' . "\n" . $this->compiled_code[$handle] . "\n?" . '>'); fclose($fp); touch($cache_file, filemtime($this->files[$handle])); @chmod($cache_file, 0777); eval($this->compiled_code[$handle]); } return true; } /** * Inserts the uncompiled code for $handle as the * value of $varname in the root-level. This can be used * to effectively include a template in the middle of another * template. * Note that all desired assignments to the variables in $handle should be done * BEFORE calling this function. */ function assign_var_from_handle($varname, $handle) { global $phpEx; $cache_file = $this->cachedir . $this->filename[$handle] . '.' . $phpEx; if(@filemtime($cache_file) == @filemtime($this->files[$handle])) { $_str = ''; include($cache_file); } else { if (!$this->loadfile($handle)) { die("Template->pparse(): Couldn't load template file for handle $handle"); } $code = $this->compile($this->uncompiled_code[$handle], true, '_str'); $fp = fopen($cache_file, 'w+'); fwrite ($fp, '<?php' . "\n" . $code . "\n?" . '>'); fclose($fp); touch($cache_file, filemtime($this->files[$handle])); @chmod($cache_file, 0777); // Compile It, With The "no Echo Statements" Option On. $_str = ''; // evaluate the variable assignment. eval($code); } // assign the value of the generated variable to the given varname. $this->assign_var($varname, $_str); return true; } /** * Block-level variable assignment. Adds a new block iteration with the given * variable assignments. Note that this should only be called once per block * iteration. */ function assign_block_vars($blockname, $vararray) { if (strstr($blockname, '.')) { // Nested block. $blocks = explode('.', $blockname); $blockcount = sizeof($blocks) - 1; $str = &$this->_tpldata; for ($i = 0; $i < $blockcount; $i++) { $str = &$str[$blocks[$i]]; $str = &$str[sizeof($str) - 1]; } // Now we add the block that we're actually assigning to. // We're adding a new iteration to this block with the given // variable assignments. $str[$blocks[$blockcount]][] = $vararray; } else { // Top-level block. // Add a new iteration to this block with the variable assignments // we were given. $this->_tpldata[$blockname][] = $vararray; } return true; } /** * Root-level variable assignment. Adds to current assignments, overriding * any existing variable assignment with the same name. */ function assign_vars($vararray) { reset ($vararray); while (list($key, $val) = each($vararray)) { $this->_tpldata['.'][0][$key] = $val; } return true; } /** * Root-level variable assignment. Adds to current assignments, overriding * any existing variable assignment with the same name. */ function assign_var($varname, $varval) { $this->_tpldata['.'][0][$varname] = $varval; return true; } /** * Generates a full path+filename for the given filename, which can either * be an absolute name, or a name relative to the rootdir for this Template * object. */ function make_filename($filename) { // Check if it's an absolute or relative path. if (substr($filename, 0, 1) != '/') { $filename = phpbb_realpath($this->root . '/' . $filename); } if (!file_exists($filename)) { die("Template->make_filename(): Error - file $filename does not exist"); } return $filename; } /** * If not already done, load the file for the given handle and populate * the uncompiled_code[] hash with its code. Do not compile. */ function loadfile($handle) { // If the file for this handle is already loaded and compiled, do nothing. if (!empty($this->uncompiled_code[$handle])) { return true; } // If we don't have a file assigned to this handle, die. if (!isset($this->files[$handle])) { die("Template->loadfile(): No file specified for handle $handle"); } $filename = $this->files[$handle]; $str = implode('', @file($filename)); if (empty($str)) { die("Template->loadfile(): File $filename for handle $handle is empty"); } $this->uncompiled_code[$handle] = $str; return true; } /** * Compiles the given string of code, and returns * the result in a string. * If "do_not_echo" is true, the returned code will not be directly * executable, but can be used as part of a variable assignment * for use in assign_code_from_handle(). */ function compile($code, $do_not_echo = false, $retvar = '') { $concat = (!$do_not_echo) ? ',' : '.'; // replace \ with \\ and then ' with \'. $code = str_replace('\\', '\\\\', $code); $code = str_replace('\'', '\\\'', $code); // change template varrefs into PHP varrefs // This one will handle varrefs WITH namespaces $varrefs = array(); preg_match_all('#\{(([a-z0-9\-_]+?\.)+?)([a-z0-9\-_]+?)\}#is', $code, $varrefs); $varcount = sizeof($varrefs[1]); for ($i = 0; $i < $varcount; $i++) { $namespace = $varrefs[1][$i]; $varname = $varrefs[3][$i]; $new = $this->generate_block_varref($namespace, $varname, $concat); $code = str_replace($varrefs[0][$i], $new, $code); } // This will handle the remaining root-level varrefs $code = preg_replace('#\{([a-z0-9\-_]*?)\}#is', "' $concat ((isset(\$this->_tpldata['.'][0]['\\1'])) ? \$this->_tpldata['.'][0]['\\1'] : '') $concat '", $code); // Break it up into lines. $code_lines = explode("\n", $code); $block_nesting_level = 0; $block_names = array(); $block_names[0] = '.'; // Second: prepend echo ', append ' . "\n"; to each line. $line_count = sizeof($code_lines); for ($i = 0; $i < $line_count; $i++) { $code_lines[$i] = chop($code_lines[$i]); if (preg_match('#<!-- BEG... [truncated message content] |
|
From: FlorinCB <ory...@us...> - 2008-12-31 01:29:52
|
Update of /cvsroot/mxbb/phpbb2mxp/images/avatars/gallery In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10798/gallery Log Message: Directory /cvsroot/mxbb/phpbb2mxp/images/avatars/gallery added to the repository |
|
From: FlorinCB <ory...@us...> - 2008-12-31 01:29:25
|
Update of /cvsroot/mxbb/phpbb2mxp/images/smiles In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10699/smiles Log Message: Directory /cvsroot/mxbb/phpbb2mxp/images/smiles added to the repository |
|
From: FlorinCB <ory...@us...> - 2008-12-31 01:29:23
|
Update of /cvsroot/mxbb/phpbb2mxp/images/avatars In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10699/avatars Log Message: Directory /cvsroot/mxbb/phpbb2mxp/images/avatars added to the repository |
|
From: FlorinCB <ory...@us...> - 2008-12-31 01:28:55
|
Update of /cvsroot/mxbb/phpbb2mxp/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10494/includes Log Message: Directory /cvsroot/mxbb/phpbb2mxp/includes added to the repository |
|
From: FlorinCB <ory...@us...> - 2008-12-31 01:28:52
|
Update of /cvsroot/mxbb/phpbb2mxp/admin In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10494/admin Log Message: Directory /cvsroot/mxbb/phpbb2mxp/admin added to the repository |
|
From: FlorinCB <ory...@us...> - 2008-12-31 01:28:51
|
Update of /cvsroot/mxbb/phpbb2mxp/language In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10494/language Log Message: Directory /cvsroot/mxbb/phpbb2mxp/language added to the repository |
|
From: FlorinCB <ory...@us...> - 2008-12-31 01:28:27
|
Update of /cvsroot/mxbb/phpbb2mxp/images In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10494/images Log Message: Directory /cvsroot/mxbb/phpbb2mxp/images added to the repository |
|
From: FlorinCB <ory...@us...> - 2008-12-31 01:28:22
|
Update of /cvsroot/mxbb/phpbb2mxp/docs In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10494/docs Log Message: Directory /cvsroot/mxbb/phpbb2mxp/docs added to the repository |
|
From: FlorinCB <ory...@us...> - 2008-12-31 01:28:22
|
Update of /cvsroot/mxbb/phpbb2mxp/develop In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10494/develop Log Message: Directory /cvsroot/mxbb/phpbb2mxp/develop added to the repository |
|
From: FlorinCB <ory...@us...> - 2008-12-31 01:28:21
|
Update of /cvsroot/mxbb/phpbb2mxp/install In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10494/install Log Message: Directory /cvsroot/mxbb/phpbb2mxp/install added to the repository |
|
From: FlorinCB <ory...@us...> - 2008-12-31 01:28:21
|
Update of /cvsroot/mxbb/phpbb2mxp/cache In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10494/cache Log Message: Directory /cvsroot/mxbb/phpbb2mxp/cache added to the repository |
|
From: FlorinCB <ory...@us...> - 2008-12-31 01:28:21
|
Update of /cvsroot/mxbb/phpbb2mxp/templates In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10494/templates Log Message: Directory /cvsroot/mxbb/phpbb2mxp/templates added to the repository |
|
From: FlorinCB <ory...@us...> - 2008-12-28 20:43:26
|
Update of /cvsroot/mxbb/mx_contact/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12286/includes Modified Files: contact_constants.php functions_newsletter.php Log Message: fix Index: functions_newsletter.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/includes/functions_newsletter.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** functions_newsletter.php 28 Dec 2008 17:10:01 -0000 1.4 --- functions_newsletter.php 28 Dec 2008 20:43:18 -0000 1.5 *************** *** 62,88 **** } ! function this_contact_mxurl($args = '', $force_standalone_mode = false) { ! global $mx_root_path, $module_root_path, $page_id, $phpEx, $mx_block; ! if($force_standalone_mode) ! { ! $mxurl = $mx_root_path . 'modules/mx_contact/' . 'contact.' . $phpEx . ($args == '' ? '' : '?' . $args); ! //$mxurl = PORTAL_URL . 'index.' . $phpEx . ($args == '' ? '' : '?' . $args); ! } ! else ! { ! $mxurl = PORTAL_URL . 'index.' . $phpEx; ! if( is_numeric($page_id) && !empty($page_id) ) { ! $mxurl .= '?page=' . $page_id . ($args == '' ? '' : '&' . $args); } else { ! $mxurl .= '?page=' . $page_id . ($args == '' ? '' : '&' . $args); } } - return $mxurl; } --- 62,114 ---- } ! // MX add-on ! // Generate paths for page and standalone mode ! // ...function based on original function written by Markus :-) ! // This has mod_rewrite disabled ! if (!function_exists('this_contact_mxurl')) { ! function this_contact_mxurl($args = '', $force_standalone_mode = false, $new_pageid = '') ! { ! global $mx_root_path, $phpbb_root_path, $module_root_path, $mx_request_vars, $page_id; ! global $phpEx, $integration_enabled, $mx_mod_rewrite; + if (!$mx_request_vars->is_empty_request('dynamic_block')) + { + $dynamic_block = $mx_request_vars->request('dynamic_block', MX_TYPE_INT, ''); + } + elseif (!$mx_request_vars->is_empty_get('dynamic_block')) + { + $dynamic_block = $mx_request_vars->get('dynamic_block', MX_TYPE_INT, 0); + } + { + $dynamic_block = ''; + } + + $pageid = ($new_pageid) ? intval($new_pageid) : ($page_id && is_numeric($page_id)) ? intval($page_id) : $mx_request_vars->request('page', MX_TYPE_INT, 25); ! $args .= ($args == '' ? '' : '&' ) . 'modrewrite=no'; ! ! $dynamicId = !empty($dynamic_block) ? ( $non_html_amp ? '&dynamic_block=' : '&dynamic_block=' ) . $dynamic_block : ''; ! ! ! if($force_standalone_mode) { ! $mxurl = ( !MXBB_MODULE ) ? $phpbb_root_path . 'album.' . $phpEx . ($args == '' ? '' : '?' . $args) : $mx_root_path . 'modules/mx_contact/' . 'contact.' . $phpEx . ($args == '' ? '' : '?' . $args); } else { ! $mxurl = $mx_root_path . 'index.' . $phpEx; ! if( is_numeric($pageid) && !empty($pageid) ) ! { ! $mxurl .= '?page=' . $pageid . $dynamicId. ($args == '' ? '' : '&' . $args); ! } ! else ! { ! $mxurl .= '?page=' . '25' . ($args == '' ? '' : '&' . $args); ! } } + + return $mxurl; } } Index: contact_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/includes/contact_constants.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** contact_constants.php 28 Dec 2008 17:10:01 -0000 1.4 --- contact_constants.php 28 Dec 2008 20:43:18 -0000 1.5 *************** *** 81,89 **** } } if ($mx_request_vars->is_post('submit')) { $message = $lang['Contact_updated'] . "<br /><br />" . sprintf($lang['Click_return_contact'], "<a href=\"" . mx_append_sid(this_contact_mxurl()) . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid("index.$phpEx?pane=right") . "\">", "</a>"); ! mx_message_die(GENERAL_MESSAGE, $message); } } --- 81,140 ---- } } + + // MX add-on + // Generate paths for page and standalone mode + // ...function based on original function written by Markus :-) + // This has mod_rewrite disabled + if (!function_exists('this_contact_mxurl')) + { + function this_contact_mxurl($args = '', $force_standalone_mode = false, $new_pageid = '') + { + global $mx_root_path, $phpbb_root_path, $module_root_path, $mx_request_vars, $page_id; + global $phpEx, $integration_enabled, $mx_mod_rewrite; + + if (!$mx_request_vars->is_empty_request('dynamic_block')) + { + $dynamic_block = $mx_request_vars->request('dynamic_block', MX_TYPE_INT, ''); + } + elseif (!$mx_request_vars->is_empty_get('dynamic_block')) + { + $dynamic_block = $mx_request_vars->get('dynamic_block', MX_TYPE_INT, 0); + } + { + $dynamic_block = ''; + } + + $pageid = ($new_pageid) ? intval($new_pageid) : ($page_id && is_numeric($page_id)) ? intval($page_id) : $mx_request_vars->request('page', MX_TYPE_INT, 25); + + $args .= ($args == '' ? '' : '&' ) . 'modrewrite=no'; + + $dynamicId = !empty($dynamic_block) ? ( $non_html_amp ? '&dynamic_block=' : '&dynamic_block=' ) . $dynamic_block : ''; + + + if($force_standalone_mode) + { + $mxurl = ( !MXBB_MODULE ) ? $phpbb_root_path . 'album.' . $phpEx . ($args == '' ? '' : '?' . $args) : $mx_root_path . 'modules/mx_contact/' . 'contact.' . $phpEx . ($args == '' ? '' : '?' . $args); + } + else + { + $mxurl = $mx_root_path . 'index.' . $phpEx; + if( is_numeric($pageid) && !empty($pageid) ) + { + $mxurl .= '?page=' . $pageid . $dynamicId. ($args == '' ? '' : '&' . $args); + } + else + { + $mxurl .= '?page=' . '25' . ($args == '' ? '' : '&' . $args); + } + } + + return $mxurl; + } + } if ($mx_request_vars->is_post('submit')) { $message = $lang['Contact_updated'] . "<br /><br />" . sprintf($lang['Click_return_contact'], "<a href=\"" . mx_append_sid(this_contact_mxurl()) . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid("index.$phpEx?pane=right") . "\">", "</a>"); ! //mx_message_die(GENERAL_MESSAGE, $message); } } |
|
From: FlorinCB <ory...@us...> - 2008-12-28 20:43:26
|
Update of /cvsroot/mxbb/mx_contact In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12286 Modified Files: mx_contact.php mx_newsletter.php Log Message: fix Index: mx_newsletter.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/mx_newsletter.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mx_newsletter.php 22 Oct 2008 23:47:29 -0000 1.3 --- mx_newsletter.php 28 Dec 2008 20:43:18 -0000 1.4 *************** *** 50,62 **** // $user_name = $userdata['username']; ! $real_name = (!isset($HTTP_POST_VARS['real_name'])) ? '' : stripslashes(trim(htmlspecialchars($HTTP_POST_VARS['real_name']))); ! $institution = (!isset($HTTP_POST_VARS['institution'])) ? '' : stripslashes(trim(htmlspecialchars($HTTP_POST_VARS['institution']))); ! $fax = (!isset($HTTP_POST_VARS['fax'])) ? '' : stripslashes(trim(htmlspecialchars($HTTP_POST_VARS['fax']))); ! $phone = (!isset($HTTP_POST_VARS['phone'])) ? '' : stripslashes(trim(htmlspecialchars($HTTP_POST_VARS['phone']))); ! $email = (!isset($HTTP_POST_VARS['email'])) ? '' : stripslashes(trim(htmlspecialchars($HTTP_POST_VARS['email']))); ! $comments = (!isset($HTTP_POST_VARS['feedback'])) ? '' : stripslashes(trim(htmlspecialchars($HTTP_POST_VARS['feedback']))); ! $attachment = (!isset($HTTP_POST_FILES['attachment']['name'])) ? '' : basename($HTTP_POST_FILES['attachment']['name']); ! $code = (!isset($HTTP_POST_VARS['code'])) ? '' : htmlspecialchars(trim($HTTP_POST_VARS['code'])); ! $newsletter = (!isset($HTTP_POST_VARS['newsletter'])) ? 0 : 1; $script_path = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path'])); --- 50,62 ---- // $user_name = $userdata['username']; ! $real_name = (!isset($_POST['real_name'])) ? '' : stripslashes(trim(htmlspecialchars($_POST['real_name']))); ! $institution = (!isset($_POST['institution'])) ? '' : stripslashes(trim(htmlspecialchars($_POST['institution']))); ! $fax = (!isset($_POST['fax'])) ? '' : stripslashes(trim(htmlspecialchars($_POST['fax']))); ! $phone = (!isset($_POST['phone'])) ? '' : stripslashes(trim(htmlspecialchars($_POST['phone']))); ! $email = (!isset($_POST['email'])) ? '' : stripslashes(trim(htmlspecialchars($_POST['email']))); ! $comments = (!isset($_POST['feedback'])) ? '' : stripslashes(trim(htmlspecialchars($_POST['feedback']))); ! $attachment = (!isset($_FILES['attachment']['name'])) ? '' : basename($_FILES['attachment']['name']); ! $code = (!isset($_POST['code'])) ? '' : htmlspecialchars(trim($_POST['code'])); ! $newsletter = (!isset($_POST['newsletter'])) ? 0 : 1; $script_path = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path'])); *************** *** 74,78 **** // "Quick Delete" an Attachment // ! if(isset($HTTP_GET_VARS['delete'])) { if($contact_config['contact_delete'] == 0) --- 74,78 ---- // "Quick Delete" an Attachment // ! if($mx_request_vars->is_get('delete')) { if($contact_config['contact_delete'] == 0) *************** *** 90,98 **** // Start send script // ! if(isset($HTTP_POST_VARS['submit'])) { function error_check() { ! global $HTTP_POST_FILES, $lang, $phpEx, $module_root_path, $mx_root_path; global $CF_general_message, $CF_code_empty, $CF_code_wrong, $CF_ini_max; global $CF_illegal_ext, $CF_unknown_ext, $CF_image_error, $CF_image_zip; --- 90,98 ---- // Start send script // ! if($mx_request_vars->is_request('submit')) { function error_check() { ! global $_FILES, $lang, $phpEx, $module_root_path, $mx_root_path; global $CF_general_message, $CF_code_empty, $CF_code_wrong, $CF_ini_max; global $CF_illegal_ext, $CF_unknown_ext, $CF_image_error, $CF_image_zip; *************** *** 105,109 **** if($CF_general_message == 1) { ! @unlink($HTTP_POST_FILES['attachment']['tmp_name']); mx_message_die(GENERAL_ERROR, $lang['Contact_error'] . $CF_code_empty . $CF_code_wrong . $CF_attach_POST_error . $CF_illegal_ext . $CF_unknown_ext . --- 105,109 ---- if($CF_general_message == 1) { ! @unlink($_FILES['attachment']['tmp_name']); mx_message_die(GENERAL_ERROR, $lang['Contact_error'] . $CF_code_empty . $CF_code_wrong . $CF_attach_POST_error . $CF_illegal_ext . $CF_unknown_ext . *************** *** 114,117 **** --- 114,119 ---- } } + + //die("fljkewlkgjrlkgj"); // *************** *** 353,357 **** $sql = "INSERT INTO " . CONTACT_TABLE . " VALUES ('$user_ip', '$wait_time')"; ! $result = $db->sql_query($sql); if(!$db->sql_query($sql)) --- 355,359 ---- $sql = "INSERT INTO " . CONTACT_TABLE . " VALUES ('$user_ip', '$wait_time')"; ! //$result = $db->sql_query($sql); if(!$db->sql_query($sql)) *************** *** 363,394 **** // No Errors // ! if($CF_general_message == 0) ! { ! $send_time = time(); ! $getfile = (!empty($attachment)) ? $contact_config['contact_file_root'] . "/" . contact_decode_ip($user_ip) . "/" . $attachment : ''; ! $sql_array = array( ! 'sendtime' => $send_time, ! 'username' => $user_name, ! 'realname' => str_replace("\'", "''", $real_name), ! 'institution' => str_replace("\'", "''", $institution), ! 'phone' => str_replace("\'", "''", $phone), ! 'fax' => str_replace("\'", "''", $fax), ! 'email' => str_replace("\'", "''", $email), ! 'ip' => $user_ip, ! 'message' => addslashes(str_replace("\'", "''", $comments)), ! 'newsletter' => (int) $newsletter, ! 'upfile' => str_replace("\'", "''", $getfile), ! ); ! $sql = "INSERT INTO " . CONTACT_MSGS_TABLE . $db->sql_build_array('INSERT', $sql_array); ! if(!$result = $db->sql_query($sql)) ! { ! mx_message_die(GENERAL_ERROR, 'Could not update Message Log', '', __LINE__, __FILE__, $sql); ! } ! ! mx_message_die(GENERAL_MESSAGE, $lang['Contact_success'] . $CF_attach_success . $_br . sprintf($lang['Click_return_index'], "<a href=" . mx_append_sid(this_contact_mxurl()) . ">", "</a>")); } } --- 365,394 ---- // No Errors // ! $send_time = time(); ! $getfile = (!empty($attachment)) ? $contact_config['contact_file_root'] . "/" . contact_decode_ip($user_ip) . "/" . $attachment : ''; ! $sql_array = array( ! 'sendtime' => $send_time, ! 'username' => $user_name, ! 'realname' => str_replace("\'", "''", $real_name), ! 'institution' => str_replace("\'", "''", $institution), ! 'phone' => str_replace("\'", "''", $phone), ! 'fax' => str_replace("\'", "''", $fax), ! 'email' => str_replace("\'", "''", $email), ! 'ip' => $user_ip, ! 'message' => addslashes(str_replace("\'", "''", $comments)), ! 'newsletter' => (int) $newsletter, ! 'upfile' => str_replace("\'", "''", $getfile), ! ); ! $sql = "INSERT INTO " . CONTACT_MSGS_TABLE . $db->sql_build_array('INSERT', $sql_array); ! ! if(!$result = $db->sql_query($sql)) ! { ! mx_message_die(GENERAL_ERROR, 'Could not update Message Log', '', __LINE__, __FILE__, $sql); } + + mx_message_die(GENERAL_MESSAGE, $lang['Contact_success'] . $CF_attach_success . $_br . sprintf($lang['Click_return_index'], "<a href=" . mx_append_sid(this_contact_mxurl()) . ">", "</a>")); } Index: mx_contact.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/mx_contact.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mx_contact.php 4 Oct 2008 07:44:53 -0000 1.4 --- mx_contact.php 28 Dec 2008 20:43:18 -0000 1.5 *************** *** 22,30 **** $is_block = FALSE; - include_once($module_root_path . 'includes/contact_constants.' . $phpEx); include_once($module_root_path . 'includes/functions_newsletter.' . $phpEx); - $contact_config = array(); $_br = '<br /><br />'; --- 22,28 ---- |
|
From: FlorinCB <ory...@us...> - 2008-12-28 17:10:09
|
Update of /cvsroot/mxbb/mx_contact/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv545 Modified Files: contact_constants.php functions_newsletter.php Log Message: fix Index: functions_newsletter.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/includes/functions_newsletter.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions_newsletter.php 25 Dec 2008 16:56:50 -0000 1.3 --- functions_newsletter.php 28 Dec 2008 17:10:01 -0000 1.4 *************** *** 1,49 **** - /** - * Plain authentication method - */ - function plain($username, $password) - { - $this->server_send('AUTH PLAIN'); - if ($err_msg = $this->server_parse('334', __LINE__)) - { - return ($this->numeric_response_code == 503) ? false : $err_msg; - } - - $base64_method_plain = base64_encode("\0" . $username . "\0" . $password); - $this->server_send($base64_method_plain, true); - if ($err_msg = $this->server_parse('235', __LINE__)) - { - return $err_msg; - } - - return false; - } - - /** - * Login authentication method - */ - function login($username, $password) - { - $this->server_send('AUTH LOGIN'); - if ($err_msg = $this->server_parse('334', __LINE__)) - { - return ($this->numeric_response_code == 503) ? false : $err_msg; - } - - $this->server_send(base64_encode($username), true); - if ($err_msg = $this->server_parse('334', __LINE__)) - { - return $err_msg; - } - - $this->server_send(base64_encode($password), true); - if ($err_msg = $this->server_parse('235', __LINE__)) - { - return $err_msg; - } - - return false; - } - <?php /** --- 1,2 ---- Index: contact_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/includes/contact_constants.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** contact_constants.php 25 Dec 2008 18:19:06 -0000 1.3 --- contact_constants.php 28 Dec 2008 17:10:01 -0000 1.4 *************** *** 84,88 **** if ($mx_request_vars->is_post('submit')) { ! $message = $lang['Contact_updated'] . "<br /><br />" . sprintf($lang['Click_return_contact'], "<a href=\"" . mx_append_sid("admin_contact.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid("index.$phpEx?pane=right") . "\">", "</a>"); mx_message_die(GENERAL_MESSAGE, $message); } --- 84,88 ---- if ($mx_request_vars->is_post('submit')) { ! $message = $lang['Contact_updated'] . "<br /><br />" . sprintf($lang['Click_return_contact'], "<a href=\"" . mx_append_sid(this_contact_mxurl()) . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid("index.$phpEx?pane=right") . "\">", "</a>"); mx_message_die(GENERAL_MESSAGE, $message); } |
|
From: FlorinCB <ory...@us...> - 2008-12-25 18:19:11
|
Update of /cvsroot/mxbb/mx_contact/admin In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15597/admin Modified Files: admin_contact.php admin_mass_mail.php admin_mass_newsletter.php Log Message: new version Index: admin_mass_mail.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/admin/admin_mass_mail.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_mass_mail.php 25 Dec 2008 16:56:50 -0000 1.8 --- admin_mass_mail.php 25 Dec 2008 18:19:06 -0000 1.9 *************** *** 226,231 **** } - $domainkey_signature = $contact_config['domainkey_signature']; - $emailer = new emailer($board_config['smtp_delivery']); --- 226,229 ---- *************** *** 243,247 **** $email_antetes .= "Content-Transfer-Encoding: 8bit" . "\n"; // 7bit ! $email_antetes .= "DomainKey-Signature: a=rsa-sha1; c=nofws; d=" . $portal_config['server_name'] . "; s=gamma; h=message-id:date:from:to:subject:cc:bcc:in-reply-to:return-path:mime-version:message-id:date:content-type:content-transfer-encoding:references;b=" . $domainkey_signature . "\n"; $email_antetes .= "X-Priority: 3" . "\n"; --- 241,245 ---- $email_antetes .= "Content-Transfer-Encoding: 8bit" . "\n"; // 7bit ! $email_antetes .= "DomainKey-Signature: a=rsa-sha1; c=nofws; d=" . $portal_config['server_name'] . "; s=gamma; h=message-id:date:from:to:subject:cc:bcc:in-reply-to:return-path:mime-version:message-id:date:content-type:content-transfer-encoding:references; b=" . $contact_config['domainkey_signature'] . "\n"; $email_antetes .= "X-Priority: 3" . "\n"; *************** *** 254,259 **** $email_antetes .= "X-AntiAbuse: User_id - " . $userdata['user_id'] . "\n"; $email_antetes .= "X-AntiAbuse: UserName - " . $userdata['username'] . "\n"; - $email_antetes .= "X-AntiAbuse: User_Level - " . ($userdata['user_level'] == ADMIN) ? "Portal Admin" : "User Level: " . $userdata['user_level'] . "\n"; $email_antetes .= "X-AntiAbuse: User_IP - " . contact_decode_ip($user_ip) . "\n"; $emailer->set_mail_html(true); --- 252,257 ---- $email_antetes .= "X-AntiAbuse: User_id - " . $userdata['user_id'] . "\n"; $email_antetes .= "X-AntiAbuse: UserName - " . $userdata['username'] . "\n"; $email_antetes .= "X-AntiAbuse: User_IP - " . contact_decode_ip($user_ip) . "\n"; + $email_antetes .= "X-AntiAbuse: User_Level - " . ($userdata['user_level'] == ADMIN) ? "Portal Admin" : "User Level: " . $userdata['user_level'] . "\n"; $emailer->set_mail_html(true); Index: admin_mass_newsletter.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/admin/admin_mass_newsletter.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** admin_mass_newsletter.php 25 Dec 2008 16:56:50 -0000 1.9 --- admin_mass_newsletter.php 25 Dec 2008 18:19:06 -0000 1.10 *************** *** 49,53 **** // Read language definition // ********************************************************************** ! if ( !file_exists($module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx) ) { --- 49,53 ---- // Read language definition // ********************************************************************** ! /* if ( !file_exists($module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx) ) { *************** *** 58,61 **** --- 58,62 ---- include($module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx); } + */ // *************** *** 227,232 **** } - $domainkey_signature = $contact_config['domainkey_signature']; - $emailer = new emailer($board_config['smtp_delivery']); --- 228,231 ---- *************** *** 244,248 **** $email_antetes .= "Content-Transfer-Encoding: 8bit" . "\n"; // 7bit ! $email_antetes .= "DomainKey-Signature: a=rsa-sha1; c=nofws; d=" . $portal_config['server_name'] . "; s=gamma; h=message-id:date:from:to:subject:cc:bcc:in-reply-to:return-path:mime-version:message-id:date:content-type:content-transfer-encoding:references;b=" . $domainkey_signature . "\n"; $email_antetes .= "X-Priority: 3" . "\n"; --- 243,247 ---- $email_antetes .= "Content-Transfer-Encoding: 8bit" . "\n"; // 7bit ! $email_antetes .= "DomainKey-Signature: a=rsa-sha1; c=nofws; d=" . $portal_config['server_name'] . "; s=gamma; h=message-id:date:from:to:subject:cc:bcc:in-reply-to:return-path:mime-version:message-id:date:content-type:content-transfer-encoding:references; b=" . $contact_config['domainkey_signature'] . "\n"; $email_antetes .= "X-Priority: 3" . "\n"; *************** *** 255,260 **** $email_antetes .= "X-AntiAbuse: User_id - " . $userdata['user_id'] . "\n"; $email_antetes .= "X-AntiAbuse: UserName - " . $userdata['username'] . "\n"; $email_antetes .= "X-AntiAbuse: User_Level - " . ($userdata['user_level'] == ADMIN) ? "Portal Admin" : "User Level: " . $userdata['user_level'] . "\n"; ! $email_antetes .= "X-AntiAbuse: User_IP - " . contact_decode_ip($user_ip) . "\n"; $emailer->set_mail_html(true); --- 254,260 ---- $email_antetes .= "X-AntiAbuse: User_id - " . $userdata['user_id'] . "\n"; $email_antetes .= "X-AntiAbuse: UserName - " . $userdata['username'] . "\n"; + $email_antetes .= "X-AntiAbuse: User_IP - " . contact_decode_ip($user_ip) . "\n"; $email_antetes .= "X-AntiAbuse: User_Level - " . ($userdata['user_level'] == ADMIN) ? "Portal Admin" : "User Level: " . $userdata['user_level'] . "\n"; ! $emailer->set_mail_html(true); *************** *** 266,270 **** $emailer->email_address($board_config['board_email']); $emailer->set_subject(htmlspecialchars_decode($subject)); ! $emailer->extra_headers($email_headers); $emailer->assign_vars(array( --- 266,270 ---- $emailer->email_address($board_config['board_email']); $emailer->set_subject(htmlspecialchars_decode($subject)); ! $emailer->extra_headers($email_antetes); $emailer->assign_vars(array( Index: admin_contact.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/admin/admin_contact.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin_contact.php 25 Dec 2008 16:56:50 -0000 1.5 --- admin_contact.php 25 Dec 2008 18:19:06 -0000 1.6 *************** *** 27,86 **** include_once( $module_root_path . 'includes/contact_constants.' . $phpEx ); - // ********************************************************************** - // Read language definition - // ********************************************************************** - if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) - { - include_once($module_root_path . 'language/lang_english/lang_main.'.$phpEx); - $link_language = 'lang_english'; - } - else - { - include_once($module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx); - $link_language = 'lang_' . $board_config['default_lang']; - } - - // - // Pull all config data - // - $sql = "SELECT * - FROM " . CONTACT_CONFIG_TABLE; - - if(!$result = $db->sql_query($sql)) - { - mx_message_die(CRITICAL_ERROR, 'Could not query contact config information', '', __LINE__, __FILE__, $sql); - } - else - { - while($row = $db->sql_fetchrow($result)) - { - $contact_config[$row['config_name']] = $row['config_value']; - $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 ($mx_request_vars->is_post('submit')) - { - $sql = "UPDATE " . CONTACT_CONFIG_TABLE . " - SET config_value = '" . str_replace("\'", "''", $new[$config_name]) . "' - WHERE config_name = '$config_name'"; - - if(!$db->sql_query($sql)) - { - mx_message_die(GENERAL_ERROR, 'Failed to update general configuration for $config_name', '', __LINE__, __FILE__, $sql); - } - } - } - - if ($mx_request_vars->is_post('submit')) - { - $message = $lang['Contact_updated'] . "<br /><br />" . sprintf($lang['Click_return_contact'], "<a href=\"" . mx_append_sid("admin_contact.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid("index.$phpEx?pane=right") . "\">", "</a>"); - mx_message_die(GENERAL_MESSAGE, $message); - } - } - // Contact Captcha define('CAPTCHA_TYPE_IMAGE', 0); --- 27,30 ---- |
|
From: FlorinCB <ory...@us...> - 2008-12-25 18:19:11
|
Update of /cvsroot/mxbb/mx_contact/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15597/includes Modified Files: contact_constants.php Log Message: new version Index: contact_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/includes/contact_constants.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** contact_constants.php 4 Oct 2008 07:44:53 -0000 1.2 --- contact_constants.php 25 Dec 2008 18:19:06 -0000 1.3 *************** *** 46,48 **** --- 46,90 ---- @define('MAIL_NORMAL_PRIORITY', 3); @define('MAIL_HIGH_PRIORITY', 2); + + // + // Pull all config data + // + $sql = "SELECT * + FROM " . CONTACT_CONFIG_TABLE; + + if(!$result = $db->sql_query($sql)) + { + mx_message_die(CRITICAL_ERROR, 'Could not query contact config information', '', __LINE__, __FILE__, $sql); + } + else + { + while($row = $db->sql_fetchrow($result)) + { + $contact_config[$row['config_name']] = $row['config_value']; + $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 ($mx_request_vars->is_post('submit')) + { + $sql = "UPDATE " . CONTACT_CONFIG_TABLE . " + SET config_value = '" . str_replace("\'", "''", $new[$config_name]) . "' + WHERE config_name = '$config_name'"; + + if(!$db->sql_query($sql)) + { + mx_message_die(GENERAL_ERROR, 'Failed to update general configuration for $config_name', '', __LINE__, __FILE__, $sql); + } + } + } + + if ($mx_request_vars->is_post('submit')) + { + $message = $lang['Contact_updated'] . "<br /><br />" . sprintf($lang['Click_return_contact'], "<a href=\"" . mx_append_sid("admin_contact.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid("index.$phpEx?pane=right") . "\">", "</a>"); + mx_message_die(GENERAL_MESSAGE, $message); + } + } ?> \ No newline at end of file |
|
From: FlorinCB <ory...@us...> - 2008-12-25 16:56:56
|
Update of /cvsroot/mxbb/mx_contact/admin In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12134/admin Modified Files: admin_contact.php admin_mass_mail.php admin_mass_newsletter.php Log Message: fix Index: admin_mass_mail.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/admin/admin_mass_mail.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_mass_mail.php 25 Dec 2008 13:08:01 -0000 1.7 --- admin_mass_mail.php 25 Dec 2008 16:56:50 -0000 1.8 *************** *** 232,236 **** $email_antetes = "From: " . $userdata['username'] . " <" . $userdata['user_email'] . ">" . "\n"; $email_antetes .= "To: " . ($def_size == 1) ? $bcc_list : $board_config['board_email'] . "\n"; ! $email_antetes .= "Bcc: " . ($def_size == 1) ? $board_config['board_email'] : $bcc_list . "\n"; $email_antetes .= "In-Reply-To: " . $userdata['user_email'] . "\n"; $email_antetes .= "Return-Path: <" . $board_config['board_email'] . ">" . "\n"; --- 232,236 ---- $email_antetes = "From: " . $userdata['username'] . " <" . $userdata['user_email'] . ">" . "\n"; $email_antetes .= "To: " . ($def_size == 1) ? $bcc_list : $board_config['board_email'] . "\n"; ! $email_antetes .= "Bcc: " . ($def_size == 1) ? '' : $bcc_list . "\n"; $email_antetes .= "In-Reply-To: " . $userdata['user_email'] . "\n"; $email_antetes .= "Return-Path: <" . $board_config['board_email'] . ">" . "\n"; Index: admin_mass_newsletter.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/admin/admin_mass_newsletter.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_mass_newsletter.php 25 Dec 2008 13:08:01 -0000 1.8 --- admin_mass_newsletter.php 25 Dec 2008 16:56:50 -0000 1.9 *************** *** 233,237 **** $email_antetes = "From: " . $userdata['username'] . " <" . $userdata['user_email'] . ">" . "\n"; $email_antetes .= "To: " . ($def_size == 1) ? $bcc_list : $board_config['board_email'] . "\n"; ! $email_antetes .= "Bcc: " . ($def_size == 1) ? $board_config['board_email'] : $bcc_list . "\n"; $email_antetes .= "In-Reply-To: " . $userdata['user_email'] . "\n"; $email_antetes .= "Return-Path: <" . $board_config['board_email'] . ">" . "\n"; --- 233,237 ---- $email_antetes = "From: " . $userdata['username'] . " <" . $userdata['user_email'] . ">" . "\n"; $email_antetes .= "To: " . ($def_size == 1) ? $bcc_list : $board_config['board_email'] . "\n"; ! $email_antetes .= "Bcc: " . ($def_size == 1) ? '' : $bcc_list . "\n"; $email_antetes .= "In-Reply-To: " . $userdata['user_email'] . "\n"; $email_antetes .= "Return-Path: <" . $board_config['board_email'] . ">" . "\n"; Index: admin_contact.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/admin/admin_contact.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin_contact.php 25 Dec 2008 09:26:05 -0000 1.4 --- admin_contact.php 25 Dec 2008 16:56:50 -0000 1.5 *************** *** 205,210 **** 'L_MOD' => $lang['auth_mods'], 'L_ADMIN' => $lang['auth_admins'], 'L_DOMAINKEY_SIG' => $lang['domainkey_signature'], ! 'L_DOMAINKEY_SIG_EXPLAIN' => $lang['domainkey_signature'], 'L_FORM_ENABLE' => $lang['Form_Enable'], --- 205,213 ---- 'L_MOD' => $lang['auth_mods'], 'L_ADMIN' => $lang['auth_admins'], + 'L_DOMAINKEY_SIG' => $lang['domainkey_signature'], ! 'L_DOMAINKEY_SIG_EXPLAIN' => $lang['domainkey_signature_exp'], ! 'L_SMTP_PORT' => $lang['smtp_port'], ! 'L_SMTP_PORT_EXPLAIN' => $lang['smtp_port_exp'], 'L_FORM_ENABLE' => $lang['Form_Enable'], *************** *** 246,250 **** --- 249,255 ---- 'FILE_ROOT' => $contact_config['contact_file_root'], 'CHAR_LIMIT' => $contact_config['contact_char_limit'], + 'DOMAINKEY_SIG' => $contact_config['domainkey_signature'], + 'SMTP_PORT' => $contact_config['smtp_port'], 'COPYRIGHT' => $lang['Copyright'], |
|
From: FlorinCB <ory...@us...> - 2008-12-25 16:56:55
|
Update of /cvsroot/mxbb/mx_contact/language/lang_english In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12134/language/lang_english Modified Files: lang_main.php Log Message: fix Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/language/lang_english/lang_main.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lang_main.php 25 Dec 2008 08:49:37 -0000 1.3 --- lang_main.php 25 Dec 2008 16:56:50 -0000 1.4 *************** *** 87,90 **** --- 87,93 ---- $lang['domainkey_signature'] = 'DomainKey Signature'; + $lang['domainkey_signature_exp'] = 'Your Domain Key Signature.'; + $lang['smtp_port'] = 'SMTP PORT'; + $lang['smtp_port_exp'] = 'The SMTP port supported by your e-mail server.'; // |
|
From: FlorinCB <ory...@us...> - 2008-12-25 16:56:55
|
Update of /cvsroot/mxbb/mx_contact/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12134/includes Modified Files: contact_smtp.php functions_newsletter.php Log Message: fix Index: functions_newsletter.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/includes/functions_newsletter.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** functions_newsletter.php 18 Dec 2008 03:41:45 -0000 1.2 --- functions_newsletter.php 25 Dec 2008 16:56:50 -0000 1.3 *************** *** 1,2 **** --- 1,49 ---- + /** + * Plain authentication method + */ + function plain($username, $password) + { + $this->server_send('AUTH PLAIN'); + if ($err_msg = $this->server_parse('334', __LINE__)) + { + return ($this->numeric_response_code == 503) ? false : $err_msg; + } + + $base64_method_plain = base64_encode("\0" . $username . "\0" . $password); + $this->server_send($base64_method_plain, true); + if ($err_msg = $this->server_parse('235', __LINE__)) + { + return $err_msg; + } + + return false; + } + + /** + * Login authentication method + */ + function login($username, $password) + { + $this->server_send('AUTH LOGIN'); + if ($err_msg = $this->server_parse('334', __LINE__)) + { + return ($this->numeric_response_code == 503) ? false : $err_msg; + } + + $this->server_send(base64_encode($username), true); + if ($err_msg = $this->server_parse('334', __LINE__)) + { + return $err_msg; + } + + $this->server_send(base64_encode($password), true); + if ($err_msg = $this->server_parse('235', __LINE__)) + { + return $err_msg; + } + + return false; + } + <?php /** Index: contact_smtp.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/includes/contact_smtp.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** contact_smtp.php 4 Oct 2008 08:03:19 -0000 1.1 --- contact_smtp.php 25 Dec 2008 16:56:50 -0000 1.2 *************** *** 22,25 **** --- 22,35 ---- define('SMTP_INCLUDED', 1); + /** + * Send command to smtp server + */ + function server_send($command, $private_info = false) + { + fputs($socket, $command . "\r\n"); + + // We could put additional code here + } + // // This function has been modified as provided *************** *** 105,112 **** mx_message_die(GENERAL_ERROR, "Email message was blank", "", __LINE__, __FILE__); } // Ok we have error checked as much as we can to this point let's get on // it already. ! if( !$socket = @fsockopen($board_config['smtp_host'], 25, $errno, $errstr, 20) ) { mx_message_die(GENERAL_ERROR, "Could not connect to smtp host : $errno : $errstr", "", __LINE__, __FILE__); --- 115,124 ---- mx_message_die(GENERAL_ERROR, "Email message was blank", "", __LINE__, __FILE__); } + + $board_config['smtp_port'] = ($board_config['smtp_port']) ? $board_config['smtp_port'] : $contact_config['smtp_port']; // Ok we have error checked as much as we can to this point let's get on // it already. ! if( !$socket = @fsockopen($board_config['smtp_host'], $board_config['smtp_port'], $errno, $errstr, 20) ) { mx_message_die(GENERAL_ERROR, "Could not connect to smtp host : $errno : $errstr", "", __LINE__, __FILE__); *************** *** 120,123 **** --- 132,153 ---- if( !empty($board_config['smtp_username']) && !empty($board_config['smtp_password']) ) { + server_send('AUTH PLAIN'); + if ($err_msg = server_parse('334', __LINE__)) + { + return $err_msg; + } + + $base64_method_plain = base64_encode("\0" . $board_config['smtp_username'] . "\0" . $board_config['smtp_password']); + server_send($base64_method_plain, true); + if ($err_msg = server_parse('235', __LINE__)) + { + return $err_msg; + } + + return false; + + } + else if(!empty($board_config['smtp_username']) && !empty($board_config['smtp_login'])) + { fputs($socket, "EHLO " . $board_config['smtp_host'] . "\r\n"); server_parse($socket, "250", __LINE__); *************** *** 131,135 **** fputs($socket, base64_encode($board_config['smtp_password']) . "\r\n"); server_parse($socket, "235", __LINE__); ! } else { --- 161,165 ---- fputs($socket, base64_encode($board_config['smtp_password']) . "\r\n"); server_parse($socket, "235", __LINE__); ! } else { |
|
From: FlorinCB <ory...@us...> - 2008-12-25 16:56:55
|
Update of /cvsroot/mxbb/mx_contact/templates/_core/admin In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12134/templates/_core/admin Modified Files: contact_config_body.tpl Log Message: fix Index: contact_config_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_contact/templates/_core/admin/contact_config_body.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** contact_config_body.tpl 25 Dec 2008 09:17:45 -0000 1.2 --- contact_config_body.tpl 25 Dec 2008 16:56:50 -0000 1.3 *************** *** 18,23 **** <tr> <td width="49%" class="row1"><b>{L_DOMAINKEY_SIG}</b><br /><span class="gensmall">{L_DOMAINKEY_SIG_EXPLAIN}</span></td> ! <td width="49%" class="row2"><input class="post" type="text" size="30" maxlength="100" name="domainkey_signature" value="{DOMAINKEY_SIG}" /></td> ! </tr> <tr> <td class="row1"><b>{L_FLOOD_LIMIT}</b><br /><span class="gensmall">{L_FLOOD_LIMIT_EXPLAIN}</span></td> --- 18,27 ---- <tr> <td width="49%" class="row1"><b>{L_DOMAINKEY_SIG}</b><br /><span class="gensmall">{L_DOMAINKEY_SIG_EXPLAIN}</span></td> ! <td width="49%" class="row2"><input class="post" type="text" size="73" maxlength="200" name="domainkey_signature" value="{DOMAINKEY_SIG}" /></td> ! </tr> ! <tr> ! <td width="49%" class="row1"><b>{L_SMTP_PORT}</b><br /><span class="gensmall">{L_SMTP_PORT_EXPLAIN}</span></td> ! <td width="49%" class="row2"><input class="post" type="text" size="8" maxlength="4" name="smtp_port" value="{SMTP_PORT}" /></td> ! </tr> <tr> <td class="row1"><b>{L_FLOOD_LIMIT}</b><br /><span class="gensmall">{L_FLOOD_LIMIT_EXPLAIN}</span></td> |
|
From: FlorinCB <ory...@us...> - 2008-12-25 16:56:55
|
Update of /cvsroot/mxbb/mx_contact/language/lang_romanian In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12134/language/lang_romanian Modified Files: lang_main.php Log Message: fix Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/language/lang_romanian/lang_main.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lang_main.php 25 Dec 2008 08:49:37 -0000 1.3 --- lang_main.php 25 Dec 2008 16:56:50 -0000 1.4 *************** *** 78,81 **** --- 78,84 ---- $lang['domainkey_signature'] = 'DomainKey Signature'; + $lang['domainkey_signature_exp'] = 'Your Domain Key Signature.'; + $lang['smtp_port'] = 'SMTP PORT'; + $lang['smtp_port_exp'] = 'The SMTP port supported by your e-mail server.'; // |
|
From: FlorinCB <ory...@us...> - 2008-12-25 16:56:54
|
Update of /cvsroot/mxbb/mx_contact/language/lang_romanian_no_diacritics In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12134/language/lang_romanian_no_diacritics Modified Files: lang_main.php Log Message: fix Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/language/lang_romanian_no_diacritics/lang_main.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lang_main.php 25 Dec 2008 08:49:37 -0000 1.2 --- lang_main.php 25 Dec 2008 16:56:50 -0000 1.3 *************** *** 78,81 **** --- 78,84 ---- $lang['domainkey_signature'] = 'DomainKey Signature'; + $lang['domainkey_signature_exp'] = 'Your Domain Key Signature.'; + $lang['smtp_port'] = 'SMTP PORT'; + $lang['smtp_port_exp'] = 'The SMTP port supported by your e-mail server.'; // |