You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(193) |
Nov
(393) |
Dec
(347) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(401) |
Feb
(232) |
Mar
(343) |
Apr
(129) |
May
(129) |
Jun
(116) |
Jul
(189) |
Aug
(129) |
Sep
(68) |
Oct
(172) |
Nov
(298) |
Dec
(148) |
| 2003 |
Jan
(264) |
Feb
(210) |
Mar
(322) |
Apr
(309) |
May
(234) |
Jun
(188) |
Jul
(215) |
Aug
(161) |
Sep
(234) |
Oct
(163) |
Nov
(110) |
Dec
(7) |
| 2004 |
Jan
(95) |
Feb
(107) |
Mar
(55) |
Apr
(3) |
May
(49) |
Jun
(35) |
Jul
(57) |
Aug
(43) |
Sep
(56) |
Oct
(40) |
Nov
(25) |
Dec
(21) |
| 2005 |
Jan
(93) |
Feb
(25) |
Mar
(22) |
Apr
(72) |
May
(45) |
Jun
(24) |
Jul
(29) |
Aug
(20) |
Sep
(50) |
Oct
(93) |
Nov
(69) |
Dec
(183) |
| 2006 |
Jan
(185) |
Feb
(143) |
Mar
(402) |
Apr
(260) |
May
(322) |
Jun
(367) |
Jul
(234) |
Aug
(299) |
Sep
(206) |
Oct
(288) |
Nov
(338) |
Dec
(307) |
| 2007 |
Jan
(296) |
Feb
(250) |
Mar
(261) |
Apr
(434) |
May
(539) |
Jun
(274) |
Jul
(440) |
Aug
(190) |
Sep
(128) |
Oct
(249) |
Nov
(86) |
Dec
(51) |
| 2008 |
Jan
(177) |
Feb
(67) |
Mar
(61) |
Apr
(48) |
May
(56) |
Jun
(97) |
Jul
(60) |
Aug
(64) |
Sep
(151) |
Oct
(79) |
Nov
(109) |
Dec
(123) |
| 2009 |
Jan
(70) |
Feb
(70) |
Mar
(73) |
Apr
(80) |
May
(22) |
Jun
(193) |
Jul
(191) |
Aug
(181) |
Sep
(120) |
Oct
(48) |
Nov
(24) |
Dec
|
|
From: Paul S. O. <ps...@us...> - 2002-07-14 14:39:04
|
Update of /cvsroot/phpbb/phpBB2/db
In directory usw-pr-cvs1:/tmp/cvs-serv13287/db
Modified Files:
mysql.php
Log Message:
Various updates which will break yet more things
Index: mysql.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/db/mysql.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** mysql.php 9 Jun 2002 00:04:44 -0000 1.17
--- mysql.php 14 Jul 2002 14:39:01 -0000 1.18
***************
*** 20,24 ****
***************************************************************************/
! if(!defined('SQL_LAYER'))
{
--- 20,24 ----
***************************************************************************/
! if ( !defined('SQL_LAYER') )
{
***************
*** 29,38 ****
var $db_connect_id;
var $query_result;
! var $return_on_error;
//
// Constructor
//
! function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = false)
{
$this->open_queries = array();
--- 29,39 ----
var $db_connect_id;
var $query_result;
! var $return_on_error = false;
! var $transaction = false;
//
// Constructor
//
! function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $port, $persistency = false)
{
$this->open_queries = array();
***************
*** 42,69 ****
$this->user = $sqluser;
$this->password = $sqlpassword;
! $this->server = $sqlserver;
! $this->port = 3306;
$this->dbname = $database;
$this->db_connect_id = ( $this->persistency ) ? @mysql_pconnect($this->server, $this->user, $this->password) : @mysql_connect($this->server, $this->user, $this->password);
! if ( $this->db_connect_id )
{
! if ( $database != '' )
{
! $this->dbname = $database;
! if ( !($dbselect = @mysql_select_db($this->dbname)) )
! {
! @mysql_close($this->db_connect_id);
! $this->db_connect_id = false;
! }
}
-
- return $this->db_connect_id;
- }
- else
- {
- return false;
}
}
--- 43,60 ----
$this->user = $sqluser;
$this->password = $sqlpassword;
! $this->server = $sqlserver . ( ( $port ) ? ':' . $port : '' );
$this->dbname = $database;
$this->db_connect_id = ( $this->persistency ) ? @mysql_pconnect($this->server, $this->user, $this->password) : @mysql_connect($this->server, $this->user, $this->password);
! if ( $this->db_connect_id && $this->dbname != '')
{
! if ( @mysql_select_db($this->dbname) )
{
! return $this->db_connect_id;
}
}
+
+ $this->sql_error('');
}
***************
*** 73,92 ****
function sql_close()
{
! if ( $this->db_connect_id )
{
! if ( count($this->open_queries) )
! {
! foreach($this->open_queries as $query_id)
! {
! @mysql_free_result($query_id);
! }
! }
!
! return @mysql_close($this->db_connect_id);
}
! else
{
! return false;
}
}
--- 64,81 ----
function sql_close()
{
! if ( !$this->db_connect_id )
{
! return false;
}
!
! if ( count($this->open_queries) )
{
! foreach($this->open_queries as $query_id)
! {
! @mysql_free_result($query_id);
! }
}
+
+ return @mysql_close($this->db_connect_id);
}
***************
*** 101,119 ****
}
! function sql_transaction($status = BEGIN_TRANSACTION)
{
- $result = true;
-
switch ( $status )
{
! case BEGIN_TRANSACTION:
// $result = mysql_query('BEGIN', $this->db_connect_id);
break;
! case END_TRANSACTION:
// $result = mysql_query('COMMIT', $this->db_connect_id);
break;
! case ROLLBACK:
! // mysql_query('ROLLBACK', $this->db_connect_id);
break;
}
--- 90,111 ----
}
! function sql_transaction($status = 'begin')
{
switch ( $status )
{
! case 'begin':
! $this->transaction = true;
// $result = mysql_query('BEGIN', $this->db_connect_id);
break;
! case 'commit':
! $this->transaction = false;
// $result = mysql_query('COMMIT', $this->db_connect_id);
break;
! case 'rollback':
! $this->transaction = false;
! // $result = mysql_query('ROLLBACK', $this->db_connect_id);
break;
+ default:
+ $result = true;
}
***************
*** 131,135 ****
$this->num_queries++;
! $this->query_result = @mysql_query($query, $this->db_connect_id);
$this->open_queries[] = $this->query_result;
--- 123,130 ----
$this->num_queries++;
! if ( !($this->query_result = @mysql_query($query, $this->db_connect_id)) )
! {
! $this->sql_error($query);
! }
$this->open_queries[] = $this->query_result;
***************
*** 150,159 ****
$this->num_queries++;
! if ( isset($total) )
{
! $query .= ' LIMIT ' . ( ( isset($offset) ) ? $offset . ', ' . $total : $total );
}
- $this->query_result = @mysql_query($query, $this->db_connect_id);
$this->open_queries[] = $this->query_result;
}
--- 145,158 ----
$this->num_queries++;
! if ( !empty($total) )
! {
! $query .= ' LIMIT ' . ( ( !empty($offset) ) ? $offset . ', ' . $total : $total );
! }
!
! if ( !($this->query_result = @mysql_query($query, $this->db_connect_id)) )
{
! $this->sql_error($query);
}
$this->open_queries[] = $this->query_result;
}
***************
*** 169,203 ****
function sql_query_array($query = '', $assoc_ary = false, $transaction = false)
{
! if ( is_array($assoc_ary) )
{
! if ( strpos(' ' . $query, 'INSERT') == 1 )
! {
! $fields = '';
! $values = '';
! foreach ( $assoc_ary as $key => $var )
! {
! $fields .= ( ( $fields != '' ) ? ', ' : '' ) . $key;
! $values .= ( ( $values != '' ) ? ', ' : '' ) . ( ( is_string($var) ) ? '\'' . str_replace('\'', '\'\'', $var) . '\'' : $var );
! }
! $query = $query . ' (' . $fields . ') VALUES (' . $values . ')';
! }
! else
{
! $values = '';
! foreach ( $assoc_ary as $key => $var )
! {
! $values .= ( ( $values != '' ) ? ', ' : '' ) . $key . ' = ' . ( ( is_string($var) ) ? '\'' . str_replace('\'', '\'\'', $var) . '\'' : $var );
! }
!
! $query = preg_replace('/^(.*? SET )(.*?)$/is', '\1' . $values . ' \2', $query);
}
! return $this->sql_query($query);
}
else
{
! return false;
}
}
--- 168,200 ----
function sql_query_array($query = '', $assoc_ary = false, $transaction = false)
{
! if ( !is_array($assoc_ary) )
{
! return false;
! }
! if ( strpos(' ' . $query, 'INSERT') == 1 )
! {
! $fields = '';
! $values = '';
! foreach ( $assoc_ary as $key => $var )
{
! $fields .= ( ( $fields != '' ) ? ', ' : '' ) . $key;
! $values .= ( ( $values != '' ) ? ', ' : '' ) . ( ( is_string($var) ) ? '\'' . str_replace('\'', '\'\'', $var) . '\'' : $var );
}
! $query = $query . ' (' . $fields . ') VALUES (' . $values . ')';
}
else
{
! $values = '';
! foreach ( $assoc_ary as $key => $var )
! {
! $values .= ( ( $values != '' ) ? ', ' : '' ) . $key . ' = ' . ( ( is_string($var) ) ? '\'' . str_replace('\'', '\'\'', $var) . '\'' : $var );
! }
!
! $query = preg_replace('/^(.*? SET )(.*?)$/is', '\1' . $values . ' \2', $query);
}
+
+ return $this->sql_query($query);
}
***************
*** 207,210 ****
--- 204,208 ----
// NOTE :: Want to remove _ALL_ reliance on sql_numrows from core code ...
// don't want this here by a middle Milestone
+ //
function sql_numrows($query_id = false)
{
***************
*** 312,316 ****
function sql_nextid()
{
! return ( $this->db_connect_id ) ? @mysql_insert_id($this->db_connect_id) : false;;
}
--- 310,314 ----
function sql_nextid()
{
! return ( $this->db_connect_id ) ? @mysql_insert_id($this->db_connect_id) : false;
}
***************
*** 325,332 ****
}
! function sql_error($query_id = false)
{
! $result['message'] = @mysql_error($this->db_connect_id);
! $result['code'] = @mysql_errno($this->db_connect_id);
return $result;
--- 323,346 ----
}
! function sql_error($sql = '')
{
! global $HTTP_SERVER_VARS, $HTTP_ENV_VARS;
!
! if ( !$this->return_on_error )
! {
! if ( $this->transaction )
! {
! $this->sql_transaction(ROLLBACK);
! }
!
! $this_page = ( !empty($HTTP_SERVER_VARS['PHP_SELF']) ) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_ENV_VARS['PHP_SELF'];
! $this_page .= '&' . ( ( !empty($HTTP_SERVER_VARS['QUERY_STRING']) ) ? $HTTP_SERVER_VARS['QUERY_STRING'] : $HTTP_ENV_VARS['QUERY_STRING'] );
!
! $message = '<u>SQL ERROR</u> [ ' . SQL_LAYER . ' ]<br /><br />' . @mysql_error() . '<br /><br /><u>PAGE</u><br /><br />' . $this_page . ( ( $sql != '' ) ? '<br /><br /><u>SQL</u><br /><br />' . $sql : '' ) . '<br />';
! message_die(ERROR, $message);
! }
!
! $result['message'] = @mysql_error();
! $result['code'] = @mysql_errno();
return $result;
|
|
From: Paul S. O. <ps...@us...> - 2002-07-14 14:37:50
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv12926/includes
Added Files:
functions_posting.php
Log Message:
Combine posting and searching functions ... not entirely convinced about this since searching is done without need of posting routines but hum ho for now
--- NEW FILE ---
<?php
/***************************************************************************
* functions_post.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : su...@ph...
*
* $Id: functions_posting.php,v 1.1 2002/07/14 14:37:47 psotfx 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.
[...1331 lines suppressed...]
'U_MORE_SMILIES' => "posting.$phpEx$SID&mode=smilies")
);
}
$template->assign_vars(array(
'L_EMOTICONS' => $lang['Emoticons'],
'L_CLOSE_WINDOW' => $lang['Close_window'],
'S_SMILIES_COLSPAN' => $s_colspan)
);
}
if ( $mode == 'window' )
{
$template->display('smiliesbody');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
}
?>
|
|
From: Paul S. O. <ps...@us...> - 2002-07-14 14:35:14
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv12094/includes
Modified Files:
functions.php
Log Message:
Combine, update, remove various functions ... by committing this various 'things' will stop working, I did warn you not to use 2.1.x ... :)
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v
retrieving revision 1.135
retrieving revision 1.136
diff -C2 -r1.135 -r1.136
*** functions.php 9 May 2002 14:07:33 -0000 1.135
--- functions.php 14 Jul 2002 14:35:12 -0000 1.136
***************
*** 9,13 ****
* $Id$
*
- *
***************************************************************************/
--- 9,12 ----
***************
*** 19,23 ****
* (at your option) any later version.
*
[...983 lines suppressed...]
! 'body' => 'message_body.html')
! );
!
! $template->assign_vars(array(
! 'MESSAGE_TITLE' => $msg_title,
! 'MESSAGE_TEXT' => $msg_text)
! );
}
! $page = ( !defined('IN_ADMIN') ) ? 'includes/page_tail.' : 'admin/page_footer_admin.';
! include($phpbb_root_path . $page . $phpEx);
break;
! case ERROR:
! echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>phpBB 2 :: General Error</title></html>' . "\n";
! echo '<body><h1 style="font-family:Verdana,serif;font-size:18pt;font-weight:bold">phpBB2 :: General Error</h1><hr style="height:2px;border-style:dashed;color:black" /><p style="font-family:Verdana,serif;font-size:10pt">' . $msg_text . '</p><hr style="height:2px;border-style:dashed;color:black" /><p style="font-family:Verdana,serif;font-size:10pt">Contact the site administrator to report this failure</p></body>';
! $db->sql_close();
! break;
}
|
|
From: Paul S. O. <ps...@us...> - 2002-07-14 14:34:37
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv11917/includes
Modified Files:
functions_admin.php
Log Message:
Combine various admin related functions
Index: functions_admin.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions_admin.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** functions_admin.php 2 Apr 2002 14:53:40 -0000 1.5
--- functions_admin.php 14 Jul 2002 14:34:34 -0000 1.6
***************
*** 9,13 ****
* $Id$
*
- *
***************************************************************************/
--- 9,12 ----
***************
*** 19,23 ****
* (at your option) any later version.
*
- *
***************************************************************************/
--- 18,21 ----
***************
*** 27,46 ****
function make_forum_select($box_name, $ignore_forum = false)
{
! global $db, $userdata;
!
! $is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);
$sql = "SELECT forum_id, forum_name
FROM " . FORUMS_TABLE . "
ORDER BY cat_id, forum_order";
! if ( !($result = $db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, 'Couldn not obtain forums information', '', __LINE__, __FILE__, $sql);
! }
$forum_list = '';
while( $row = $db->sql_fetchrow($result) )
{
! if ( $is_auth_ary[$row['forum_id']]['auth_read'] && $ignore_forum != $row['forum_id'] )
{
$forum_list .= '<option value="' . $row['forum_id'] . '">' . $row['forum_name'] . '</option>';
--- 25,39 ----
function make_forum_select($box_name, $ignore_forum = false)
{
! global $db, $userdata, $acl, $lang;
$sql = "SELECT forum_id, forum_name
FROM " . FORUMS_TABLE . "
ORDER BY cat_id, forum_order";
! $result = $db->sql_query($sql);
$forum_list = '';
while( $row = $db->sql_fetchrow($result) )
{
! if ( $acl->get_acl($row['forum_id'], 'forum', 'read') && $ignore_forum != $row['forum_id'] )
{
$forum_list .= '<option value="' . $row['forum_id'] . '">' . $row['forum_name'] . '</option>';
***************
*** 48,52 ****
}
! $forum_list = ( $forum_list == '' ) ? '<option value="-1">-- ! No Forums ! --</option>' : '<select name="' . $box_name . '">' . $forum_list . '</select>';
return $forum_list;
--- 41,45 ----
}
! $forum_list = ( $forum_list == '' ) ? '<option value="-1">' . $lang['No_forums'] . '</option>' : '<select name="' . $box_name . '">' . $forum_list . '</select>';
return $forum_list;
***************
*** 65,72 ****
$sql = "SELECT forum_id
FROM " . FORUMS_TABLE;
! if ( !$result = $db->sql_query($sql) )
! {
! message_die(GENERAL_ERROR, 'Could not get forum IDs', '', __LINE__, __FILE__, $sql);
! }
while( $row = $db->sql_fetchrow($result) )
--- 58,62 ----
$sql = "SELECT forum_id
FROM " . FORUMS_TABLE;
! $result = $db->sql_query($sql);
while( $row = $db->sql_fetchrow($result) )
***************
*** 79,86 ****
$sql = "SELECT topic_id
FROM " . TOPICS_TABLE;
! if ( !$result = $db->sql_query($sql) )
! {
! message_die(GENERAL_ERROR, 'Could not get topic ID', '', __LINE__, __FILE__, $sql);
! }
while( $row = $db->sql_fetchrow($result) )
--- 69,73 ----
$sql = "SELECT topic_id
FROM " . TOPICS_TABLE;
! $result = $db->sql_query($sql);
while( $row = $db->sql_fetchrow($result) )
***************
*** 96,103 ****
AND t.topic_id = p.topic_id
AND t.topic_status <> " . TOPIC_MOVED;
! if ( !$result = $db->sql_query($sql) )
! {
! message_die(GENERAL_ERROR, 'Could not get post ID', '', __LINE__, __FILE__, $sql);
! }
if ( $row = $db->sql_fetchrow($result) )
--- 83,87 ----
AND t.topic_id = p.topic_id
AND t.topic_status <> " . TOPIC_MOVED;
! $result = $db->sql_query($sql);
if ( $row = $db->sql_fetchrow($result) )
***************
*** 116,123 ****
WHERE forum_id = $id
AND topic_status <> " . TOPIC_MOVED;
! if ( !$result = $db->sql_query($sql) )
! {
! message_die(GENERAL_ERROR, 'Could not get topic count', '', __LINE__, __FILE__, $sql);
! }
$total_topics = ( $row = $db->sql_fetchrow($result) ) ? ( ( $row['total'] ) ? $row['total'] : 0 ) : 0;
--- 100,104 ----
WHERE forum_id = $id
AND topic_status <> " . TOPIC_MOVED;
! $result = $db->sql_query($sql);
$total_topics = ( $row = $db->sql_fetchrow($result) ) ? ( ( $row['total'] ) ? $row['total'] : 0 ) : 0;
***************
*** 126,133 ****
SET forum_last_post_id = $last_post, forum_posts = $total_posts, forum_topics = $total_topics
WHERE forum_id = $id";
! if ( !$db->sql_query($sql) )
! {
! message_die(GENERAL_ERROR, 'Could not update forum', '', __LINE__, __FILE__, $sql);
! }
break;
--- 107,111 ----
SET forum_last_post_id = $last_post, forum_posts = $total_posts, forum_topics = $total_topics
WHERE forum_id = $id";
! $db->sql_query($sql);
break;
***************
*** 136,143 ****
FROM " . POSTS_TABLE . "
WHERE topic_id = $id";
! if ( !$result = $db->sql_query($sql) )
! {
! message_die(GENERAL_ERROR, 'Could not get post ID', '', __LINE__, __FILE__, $sql);
! }
if ( $row = $db->sql_fetchrow($result) )
--- 114,118 ----
FROM " . POSTS_TABLE . "
WHERE topic_id = $id";
! $result = $db->sql_query($sql);
if ( $row = $db->sql_fetchrow($result) )
***************
*** 146,159 ****
SET topic_replies = " . ( $row['total_posts'] - 1 ) . ", topic_first_post_id = " . $row['first_post'] . ", topic_last_post_id = " . $row['last_post'] . "
WHERE topic_id = $id";
! if ( !$db->sql_query($sql) )
! {
! message_die(GENERAL_ERROR, 'Could not update topic', '', __LINE__, __FILE__, $sql);
! }
}
break;
}
return true;
}
--- 121,407 ----
SET topic_replies = " . ( $row['total_posts'] - 1 ) . ", topic_first_post_id = " . $row['first_post'] . ", topic_last_post_id = " . $row['last_post'] . "
WHERE topic_id = $id";
! $db->sql_query($sql);
}
+ case 'post':
+ break;
+
break;
}
return true;
+ }
+
+ function prune($forum_id, $prune_date)
+ {
+ global $db, $lang, $phpEx, $phpbb_root_path;
+
+ require_once($phpbb_root_path . 'includes/functions_posting.'.$phpEx);
+
+ //
+ // Those without polls ...
+ //
+ $sql = "SELECT t.topic_id
+ FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
+ WHERE t.forum_id = $forum_id
+ AND t.topic_vote = 0
+ AND t.topic_type <> " . POST_ANNOUNCE . "
+ AND ( p.post_id = t.topic_last_post_id
+ OR t.topic_last_post_id = 0 )";
+ if ( $prune_date != '' )
+ {
+ $sql .= " AND p.post_time < $prune_date";
+ }
+ $result = $db->sql_query($sql);
+
+ $sql_topics = '';
+ while ( $row = $db->sql_fetchrow($result) )
+ {
+ $sql_topics .= ( ( $sql_topics != '' ) ? ', ' : '' ) . $row['topic_id'];
+ }
+
+ if ( $sql_topics != '' )
+ {
+ $sql = "SELECT post_id
+ FROM " . POSTS_TABLE . "
+ WHERE forum_id = $forum_id
+ AND topic_id IN ($sql_topics)";
+ $result = $db->sql_query($sql);
+
+ $sql_post = '';
+ while ( $row = $db->sql_fetchrow($result) )
+ {
+ $sql_post .= ( ( $sql_post != '' ) ? ', ' : '' ) . $row['post_id'];
+ }
+
+ if ( $sql_post != '' )
+ {
+ $db->sql_transaction();
+
+ $sql = "DELETE FROM " . TOPICS_TABLE . "
+ WHERE topic_id IN ($sql_topics)";
+ $db->sql_query($sql);
+
+ $pruned_topics = $db->sql_affectedrows();
+
+ $sql = "DELETE FROM " . POSTS_TABLE . "
+ WHERE post_id IN ($sql_post)";
+ $db->sql_query($sql);
+
+ $pruned_posts = $db->sql_affectedrows();
+
+ $sql = "DELETE FROM " . POSTS_TEXT_TABLE . "
+ WHERE post_id IN ($sql_post)";
+ $db->sql_query($sql);
+
+ $sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
+ WHERE post_id IN ($sql_post)";
+ $db->sql_query($sql);
+
+ remove_search_post($sql_post);
+
+ $db->sql_transaction('commit');
+
+ return array ('topics' => $pruned_topics, 'posts' => $pruned_posts);
+ }
+ }
+
+ return array('topics' => 0, 'posts' => 0);
+ }
+
+ //
+ // Function auto_prune(), this function will read the configuration data from
+ // the auto_prune table and call the prune function with the necessary info.
+ //
+ function auto_prune($forum_id = 0)
+ {
+ global $db, $lang;
+
+ $sql = "SELECT prune_freq, prune_days
+ FROM " . FORUMS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $result = $db->sql_query($sql);
+
+ if ( $row = $db->sql_fetchrow($result) )
+ {
+ if ( $row['prune_freq'] && $row['prune_days'] )
+ {
+ $prune_date = time() - ( $row['prune_days'] * 86400 );
+ $next_prune = time() + ( $row['prune_freq'] * 86400 );
+
+ prune($forum_id, $prune_date);
+ sync('forum', $forum_id);
+
+ $sql = "UPDATE " . FORUMS_TABLE . "
+ SET prune_next = $next_prune
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
+ }
+ }
+
+ return;
+ }
+
+ /***************************************************************************
+ *
+ * These functions are mainly for use in the db_utilities under the admin
+ * however in order to make these functions available elsewhere, specifically
+ * in the installation phase of phpBB I have seperated out a couple of
+ * functions into this file. JLH
+ *
+ \***************************************************************************/
+
+ //
+ // remove_comments will strip the sql comment lines out of an uploaded sql file
+ // specifically for mssql and postgres type files in the install....
+ //
+ function remove_comments(&$output)
+ {
+ $lines = explode("\n", $output);
+ $output = '';
+
+ // try to keep mem. use down
+ $linecount = count($lines);
+
+ $in_comment = false;
+ for($i = 0; $i < $linecount; $i++)
+ {
+ if ( preg_match('/^\/\*/', preg_quote($lines[$i])) )
+ {
+ $in_comment = true;
+ }
+
+ if ( !$in_comment )
+ {
+ $output .= $lines[$i] . "\n";
+ }
+
+ if ( preg_match('/\*\/$/', preg_quote($lines[$i])) )
+ {
+ $in_comment = false;
+ }
+ }
+
+ unset($lines);
+ return $output;
+ }
+
+ //
+ // remove_remarks will strip the sql comment lines out of an uploaded sql file
+ //
+ function remove_remarks($sql)
+ {
+ $lines = explode("\n", $sql);
+
+ // try to keep mem. use down
+ $sql = '';
+
+ $linecount = count($lines);
+ $output = '';
+
+ for ($i = 0; $i < $linecount; $i++)
+ {
+ if ( $i != $linecount - 1 || strlen($lines[$i]) > 0 )
+ {
+ $output .= ( $lines[$i][0] != '#' ) ? $lines[$i] . "\n" : "\n";
+ // Trading a bit of speed for lower mem. use here.
+ $lines[$i] = '';
+ }
+ }
+
+ return $output;
+
+ }
+
+ //
+ // split_sql_file will split an uploaded sql file into single sql statements.
+ // Note: expects trim() to have already been run on $sql.
+ //
+ function split_sql_file($sql, $delimiter)
+ {
+ // Split up our string into "possible" SQL statements.
+ $tokens = explode($delimiter, $sql);
+
+ // try to save mem.
+ $sql = '';
+ $output = array();
+
+ // we don't actually care about the matches preg gives us.
+ $matches = array();
+
+ // this is faster than calling count($oktens) every time thru the loop.
+ $token_count = count($tokens);
+ for ($i = 0; $i < $token_count; $i++)
+ {
+ // Don't wanna add an empty string as the last thing in the array.
+ if ( $i != $token_count - 1 || strlen($tokens[$i] > 0) )
+ {
+ // This is the total number of single quotes in the token.
+ $total_quotes = preg_match_all("/'/", $tokens[$i], $matches);
+ // Counts single quotes that are preceded by an odd number of backslashes,
+ // which means they're escaped quotes.
+ $escaped_quotes = preg_match_all("/(?<!\\\\)(\\\\\\\\)*\\\\'/", $tokens[$i], $matches);
+
+ $unescaped_quotes = $total_quotes - $escaped_quotes;
+
+ // If the number of unescaped quotes is even, then the delimiter did NOT occur inside a string literal.
+ if ( !($unescaped_quotes % 2) )
+ {
+ // It's a complete sql statement.
+ $output[] = $tokens[$i];
+ // save memory.
+ $tokens[$i] = '';
+ }
+ else
+ {
+ // incomplete sql statement. keep adding tokens until we have a complete one.
+ // $temp will hold what we have so far.
+ $temp = $tokens[$i] . $delimiter;
+ // save memory..
+ $tokens[$i] = '';
+
+ // Do we have a complete statement yet?
+ $complete_stmt = false;
+
+ for ($j = $i + 1; (!$complete_stmt && ($j < $token_count)); $j++)
+ {
+ // This is the total number of single quotes in the token.
+ $total_quotes = preg_match_all("/'/", $tokens[$j], $matches);
+ // Counts single quotes that are preceded by an odd number of backslashes,
+ // which means they're escaped quotes.
+ $escaped_quotes = preg_match_all("/(?<!\\\\)(\\\\\\\\)*\\\\'/", $tokens[$j], $matches);
+
+ $unescaped_quotes = $total_quotes - $escaped_quotes;
+
+ if ( ($unescaped_quotes % 2) == 1 )
+ {
+ // odd number of unescaped quotes. In combination with the previous incomplete
+ // statement(s), we now have a complete statement. (2 odds always make an even)
+ $output[] = $temp . $tokens[$j];
+
+ // save memory.
+ $tokens[$j] = '';
+ $temp = '';
+
+ // exit the loop.
+ $complete_stmt = true;
+ // make sure the outer loop continues at the right point.
+ $i = $j;
+ }
+ else
+ {
+ // even number of unescaped quotes. We still don't have a complete statement.
+ // (1 odd and 1 even always make an odd)
+ $temp .= $tokens[$j] . $delimiter;
+ // save memory.
+ $tokens[$j] = '';
+ }
+
+ } // for..
+ } // else
+ }
+ }
+
+ return $output;
}
|
|
From: Paul S. O. <ps...@us...> - 2002-07-14 14:34:19
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv11841/includes
Modified Files:
emailer.php
Log Message:
Combine emailer and smtp
Index: emailer.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/emailer.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** emailer.php 29 Jun 2002 01:47:26 -0000 1.18
--- emailer.php 14 Jul 2002 14:34:16 -0000 1.19
***************
*** 92,101 ****
if ( !file_exists($this->tpl_file) )
{
! message_die(GENERAL_ERROR, 'Could not find email template file ' . $template_file, '', __LINE__, __FILE__);
}
if ( !$this->load_msg() )
{
! message_die(GENERAL_ERROR, 'Could not load email template file ' . $template_file, '', __LINE__, __FILE__);
}
--- 92,101 ----
if ( !file_exists($this->tpl_file) )
{
! message_die(ERROR, 'Could not find email template file ' . $template_file);
}
if ( !$this->load_msg() )
{
! message_die(ERROR, 'Could not load email template file ' . $template_file);
}
***************
*** 110,119 ****
if ( $this->tpl_file == NULL )
{
! message_die(GENERAL_ERROR, 'No template file set', '', __LINE__, __FILE__);
}
if ( !($fd = fopen($this->tpl_file, 'r')) )
{
! message_die(GENERAL_ERROR, 'Failed opening template file', '', __LINE__, __FILE__);
}
--- 110,119 ----
if ( $this->tpl_file == NULL )
{
! message_die(ERROR, 'No template file set');
}
if ( !($fd = fopen($this->tpl_file, 'r')) )
{
! message_die(ERROR, 'Failed opening template file');
}
***************
*** 166,170 ****
if ( $this->address == NULL )
{
! message_die(GENERAL_ERROR, 'No email address set', '', __LINE__, __FILE__);
}
--- 166,170 ----
if ( $this->address == NULL )
{
! message_die(ERROR, 'No email address set');
}
***************
*** 184,188 ****
if ( !$result )
{
! message_die(GENERAL_ERROR, 'Failed sending email', '', __LINE__, __FILE__);
}
--- 184,188 ----
if ( !$result )
{
! message_die(ERROR, 'Failed sending email');
}
***************
*** 305,309 ****
if( !( $server_response = fgets($socket, 256) ) )
{
! message_die(GENERAL_ERROR, "Couldn't get mail server response codes", "", __LINE__, __FILE__);
}
}
--- 305,309 ----
if( !( $server_response = fgets($socket, 256) ) )
{
! message_die(ERROR, 'Could not get mail server response codes');
}
}
***************
*** 311,315 ****
if( !( substr($server_response, 0, 3) == $response ) )
{
! message_die(GENERAL_ERROR, "Ran into problems sending Mail. Response: $server_response", "", __LINE__, __FILE__);
}
}
--- 311,315 ----
if( !( substr($server_response, 0, 3) == $response ) )
{
! message_die(ERROR, "Ran into problems sending Mail. Response: $server_response");
}
}
***************
*** 379,393 ****
$bcc = explode(",", $bcc);
}
! if(trim($mail_to) == "")
{
! message_die(GENERAL_ERROR, "No email address specified", "", __LINE__, __FILE__);
}
! if(trim($subject) == "")
{
! message_die(GENERAL_ERROR, "No email Subject specified", "", __LINE__, __FILE__);
}
! if(trim($message) == "")
{
! message_die(GENERAL_ERROR, "Email message was blank", "", __LINE__, __FILE__);
}
$mail_to_array = explode(",", $mail_to);
--- 379,393 ----
$bcc = explode(",", $bcc);
}
! if(trim($mail_to) == '')
{
! message_die(ERROR, 'No email address specified');
}
! if(trim($subject) == '')
{
! message_die(ERROR, 'No email Subject specified');
}
! if(trim($message) == '')
{
! message_die(ERROR, 'Email message was blank');
}
$mail_to_array = explode(",", $mail_to);
***************
*** 399,403 ****
if( !$socket = fsockopen($board_config['smtp_host'], 25, $errno, $errstr, 20) )
{
! message_die(GENERAL_ERROR, "Could not connect to smtp host : $errno : $errstr", "", __LINE__, __FILE__);
}
server_parse($socket, "220");
--- 399,403 ----
if( !$socket = fsockopen($board_config['smtp_host'], 25, $errno, $errstr, 20) )
{
! message_die(ERROR, "Could not connect to smtp host : $errno : $errstr");
}
server_parse($socket, "220");
|
|
From: Paul S. O. <ps...@us...> - 2002-07-14 14:33:33
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv11652/includes
Modified Files:
template.php
Log Message:
This should work fine with existing templates ... note that you will need to create a directory called cache/ in your templates directory ... give it a+w access (chmod 700)
Index: template.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/template.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** template.php 22 Jun 2002 11:48:10 -0000 1.11
--- template.php 14 Jul 2002 14:33:30 -0000 1.12
***************
*** 1,5 ****
<?php
/***************************************************************************
! * template.inc
* -------------------
* begin : Saturday, Feb 13, 2001
--- 1,5 ----
<?php
/***************************************************************************
! * template.php
* -------------------
[...1158 lines suppressed...]
+ $_str = preg_replace($match_tags, $replace_tags, $_str);
+ $text_blocks = preg_split('#<!-- PHP -->#s', $_str);
+
+ $_str = '';
+ for ($i = 0; $i < count($text_blocks); $i++)
+ {
+ $_str .= $text_blocks[$i] . ( ( !empty($php_blocks[$i]) ) ? '<!-- PHP -->' . $php_blocks[$i] . '<!-- ENDPHP -->' : '' );
+ }
+
+ $tmpfile = '';
+ if ( $savefile )
+ {
+ $tmpfile = tmpfile();
+ fwrite($tmpfile, $_str);
+ }
+
+ return $tmpfile;
+ }
}
|
|
From: Paul S. O. <ps...@us...> - 2002-07-14 14:32:49
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv11415/includes
Added Files:
session.php
Log Message:
Renamed again
--- NEW FILE ---
<?php
/***************************************************************************
* session.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2002 The phpBB Group
* email : su...@ph...
*
* $Id: session.php,v 1.1 2002/07/14 14:32:45 psotfx 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.
*
***************************************************************************/
class session {
var $userdata;
var $load;
function start($update = true)
{
global $SID, $db, $board_config, $user_ip;
global $HTTP_SERVER_VARS, $HTTP_ENV_VARS, $HTTP_COOKIE_VARS, $HTTP_GET_VARS;
$current_time = time();
$session_browser = ( !empty($HTTP_SERVER_VARS['HTTP_USER_AGENT']) ) ? $HTTP_SERVER_VARS['HTTP_USER_AGENT'] : $HTTP_ENV_VARS['HTTP_USER_AGENT'];
$this_page = ( !empty($HTTP_SERVER_VARS['PHP_SELF']) ) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_ENV_VARS['PHP_SELF'];
$this_page .= '&' . ( ( !empty($HTTP_SERVER_VARS['QUERY_STRING']) ) ? $HTTP_SERVER_VARS['QUERY_STRING'] : $HTTP_ENV_VARS['QUERY_STRING'] );
if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_data']) )
{
$sessiondata = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_data']) ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_data'])) : '';
$session_id = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) ) ? $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid'] : '';
$sessionmethod = SESSION_METHOD_COOKIE;
}
else
{
$sessiondata = '';
$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
$sessionmethod = SESSION_METHOD_GET;
}
//
// Load limit check (if applicable)
//
if ( !empty($board_config['limit_load']) && file_exists('/proc/loadavg') )
{
if ( $load = @file('/proc/loadavg') )
{
list($this->load) = explode(' ', $load[0]);
if ( $this->load > $board_config['limit_load'] )
{
message_die(MESSAGE, 'Board_unavailable');
}
}
}
if ( !empty($session_id) )
{
//
// session_id exists so go ahead and attempt to grab all data in preparation
//
$sql = "SELECT u.*, s.*
FROM " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u
WHERE s.session_id = '$session_id'
AND u.user_id = s.session_user_id";
$result = $db->sql_query($sql);
$this->userdata = $db->sql_fetchrow($result);
//
// Did the session exist in the DB?
//
if ( isset($this->userdata['user_id']) )
{
//
// Do not check IP assuming equivalence, if IPv4 we'll check only first 24
// bits ... I've been told (by vHiker) this should alleviate problems with
// load balanced et al proxies while retaining some reliance on IP security.
//
$ip_check_s = explode('.', $this->userdata['session_ip']);
$ip_check_u = explode('.', $user_ip);
if ( $ip_check_s[0].'.'.$ip_check_s[1].'.'.$ip_check_s[2] == $ip_check_u[0].'.'.$ip_check_u[1].'.'.$ip_check_u[2] )
{
$SID = '?sid=' . ( ( $sessionmethod == SESSION_METHOD_GET ) ? $session_id : '' );
//
// Only update session DB a minute or so after last update or if page changes
//
if ( ( $current_time - $this->userdata['session_time'] > 60 || $this->userdata['session_page'] != $this_page ) && $update )
{
$sql = "UPDATE " . SESSIONS_TABLE . "
SET session_time = $current_time, session_page = '$this_page'
WHERE session_id = '" . $this->userdata['session_id'] . "'";
$db->sql_query($sql);
//
// Garbage collection ... remove old sessions updating user information
// if necessary
//
if ( $current_time - $board_config['session_gc'] > $board_config['session_last_gc'] )
{
$this->gc($current_time);
}
setcookie($board_config['cookie_name'] . '_data', serialize($sessiondata), $current_time + 31536000, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
setcookie($board_config['cookie_name'] . '_sid', $session_id, 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}
return $this->userdata;
}
}
}
//
// If we reach here then no (valid) session exists. So we'll create a new one,
// using the cookie user_id if available to pull basic user prefs.
//
$autologin = ( isset($sessiondata['autologinid']) ) ? $sessiondata['autologinid'] : '';
$user_id = ( isset($sessiondata['userid']) ) ? $sessiondata['userid'] : ANONYMOUS;
$this->userdata = $this->create($session_id, $user_id, $autologin, $this_page, $session_browser);
return $this->userdata;
}
function create(&$session_id, &$user_id, &$autologin, &$this_page, &$session_browser)
{
global $SID, $db, $board_config, $user_ip;
$sessiondata = array();
$current_time = time();
//
// Limit connections (for MySQL) or 5 minute sessions (for other DB's)
//
switch ( SQL_LAYER )
{
case 'mysql':
case 'mysql4':
$sql = "SHOW PROCESSLIST";
break;
default:
$sql = "SELECT COUNT(*) AS sessions
FROM " . SESSIONS_TABLE . "
WHERE session_time >= " . ( $current_time - 3600 );
}
$result = $db->sql_query($sql);
switch ( SQL_LAYER )
{
case 'mysql':
case 'mysql4':
$current_sessions = 0;
while ( $db->sql_fetchrow($result) ) $current_sessions++;
break;
default:
$row = $db->sql_fetchrow[$result];
$current_sessions = ( isset($row['sessions']) ) ? $row['sessions'] : 0;
}
if ( intval($board_config['active_sessions']) && $current_sessions > intval($board_config['active_sessions']) )
{
message_die(GENERAL_MESSAGE, 'Board_unavailable', 'Information');
}
$sql = "SELECT *
FROM " . USERS_TABLE . "
WHERE user_id = $user_id";
$result = $db->sql_query($sql);
$this->userdata = $db->sql_fetchrow($result);
//
// Check autologin request, is it valid?
//
if ( $this->userdata['user_password'] != $autologin || !$this->userdata['user_active'] || $user_id == ANONYMOUS )
{
$autologin = '';
$this->userdata['user_id'] = $user_id = ANONYMOUS;
}
$user_ip_parts = explode('.', $user_ip);
$sql = "SELECT ban_ip, ban_userid, ban_email
FROM " . BANLIST_TABLE . "
WHERE ban_ip IN (
'" . $user_ip_parts[0] . ".',
'" . $user_ip_parts[0] . "." . $user_ip_parts[1] . ".',
'" . $user_ip_parts[0] . "." . $user_ip_parts[1] . "." . $user_ip_parts[2] . ".',
'" . $user_ip_parts[0] . "." . $user_ip_parts[1] . "." . $user_ip_parts[2] . "." . $user_ip_parts[3] . "')
OR ban_userid = " . $this->userdata['user_id'];
if ( $user_id != ANONYMOUS )
{
$sql .= " OR ban_email LIKE '" . str_replace('\\\'', '\\\'\\\'', $this->userdata['user_email']) . "'
OR ban_email LIKE '" . substr(str_replace('\\\'', '\\\'\\\'', $this->userdata['user_email']), strpos(str_replace('\\\'', '\\\'\\\'', $this->userdata['user_email']), '@')) . "'";
}
$result = $db->sql_query($sql);
if ( $ban_info = $db->sql_fetchrow($result) )
{
if ( $ban_info['ban_ip'] || $ban_info['ban_userid'] || $ban_info['ban_email'] )
{
message_die(MESSAGE, 'You_been_banned');
}
}
//
// Create or update the session
//
$db->sql_return_on_error(true);
$sql = "UPDATE " . SESSIONS_TABLE . "
SET session_user_id = $user_id, session_start = $current_time, session_time = $current_time, session_browser = '$session_browser', session_page = '$this_page'
WHERE session_id = '$session_id'";
if ( !$db->sql_query($sql) || !$db->sql_affectedrows() )
{
$db->sql_return_on_error(false);
$session_id = md5(uniqid($user_ip));
$sql = "INSERT INTO " . SESSIONS_TABLE . "
(session_id, session_user_id, session_start, session_time, session_ip, session_browser, session_page)
VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', '$session_browser', '$this_page')";
$db->sql_query($sql);
}
$db->sql_return_on_error(false);
$SID = '?sid=' . $session_id;
$sessiondata['autologinid'] = ( $autologin && $user_id != ANONYMOUS ) ? $autologin : '';
$sessiondata['userid'] = $user_id;
setcookie($board_config['cookie_name'] . '_data', serialize($sessiondata), $current_time + 31536000, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
setcookie($board_config['cookie_name'] . '_sid', $session_id, 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
$this->userdata['session_id'] = $session_id;
return $this->userdata;
}
function destroy(&$userdata)
{
global $SID, $db, $board_config, $user_ip;
global $HTTP_SERVER_VARS, $HTTP_ENV_VARS, $HTTP_COOKIE_VARS, $HTTP_GET_VARS;
if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) )
{
$session_id = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) ) ? $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid'] : '';
}
else
{
$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
}
$sessiondata = array();
$current_time = time();
//
// Delete existing session, update last visit info first!
//
$sql = "UPDATE " . USERS_TABLE . "
SET user_lastvisit = " . $userdata['session_time'] . ", user_session_page = '" . $userdata['session_page'] . "'
WHERE user_id = " . $userdata['user_id'];
$db->sql_query($sql);
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_id = '" . $userdata['session_id'] . "'
AND session_user_id = " . $userdata['user_id'];
$db->sql_query($sql);
$SID = '?sid=';
setcookie($board_config['cookie_name'] . '_data', '', $current_time - 31536000, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
setcookie($board_config['cookie_name'] . '_sid', '', $current_time - 31536000, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
return true;
}
function gc(&$current_time)
{
global $db, $board_config, $user_ip;
$sql = "SELECT *
FROM " . SESSIONS_TABLE . "
WHERE session_time < " . ( $current_time - $board_config['session_length'] );
$result = $db->sql_query($sql);
$del_session_id = '';
while ( $row = $db->sql_fetchrow($result) )
{
if ( $row['user_id'] != ANONYMOUS )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_lastvisit = " . $row['session_time'] . ", user_session_page = '" . $row['session_page'] . "'
WHERE user_id = " . $row['session_user_id'];
$db->sql_query($sql);
}
$del_session_id .= ( ( $del_session_id != '' ) ? ', ' : '' ) . '\'' . $row['session_id'] . '\'';
}
if ( $del_session_id != '' )
{
//
// Delete expired sessions
//
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_id IN ($del_session_id)";
$db->sql_query($sql);
}
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '$current_time'
WHERE config_name = 'session_last_gc'";
$db->sql_query($sql);
return;
}
function get_cookies()
{
}
function set_cookies()
{
}
function configure($userdata, $lang_set = false)
{
global $db, $template, $lang, $board_config, $theme, $images;
global $phpEx, $phpbb_root_path;
if ( $userdata['user_id'] != ANONYMOUS )
{
$board_config['default_lang'] = $userdata['user_lang'];
$board_config['default_dateformat'] = $userdata['user_dateformat'];
$board_config['board_timezone'] = $userdata['user_timezone'];
}
if ( !file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx) )
{
$board_config['default_lang'] = 'english';
}
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);
if ( defined('IN_ADMIN') )
{
if ( !file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.'.$phpEx) )
{
$board_config['default_lang'] = 'english';
}
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx);
}
//
// Set up style
//
$style = ( !$board_config['override_user_style'] && $userdata['user_id'] != ANONYMOUS ) ? $userdata['user_style'] : $board_config['default_style'];
$sql = "SELECT t.template_path, t.poll_length, t.pm_box_length, c.css_data, c.css_external, i.*
FROM " . STYLES_TABLE . " s, " . STYLES_TPL_TABLE . " t, " . STYLES_CSS_TABLE . " c, " . STYLES_IMAGE_TABLE . " i
WHERE s.style_id = $style
AND t.template_id = s.template_id
AND c.theme_id = s.style_id
AND i.imageset_id = s.imageset_id";
$result = $db->sql_query($sql);
if ( !($theme = $db->sql_fetchrow($result)) )
{
message_die(ERROR, 'Could not get style data [ id ' . $style . ' ]');
}
if ( $template = new Template($theme['template_path']) )
{
$img_lang = ( file_exists('imageset/' . $theme['imageset_path'] . '/lang_' . $board_config['default_lang']) ) ? $board_config['default_lang'] : 'english';
$i10n = array('post_new', 'post_locked', 'post_pm', 'reply_new', 'reply_pm', 'reply_locked', 'icon_quote', 'icon_edit', 'icon_search', 'icon_profile', 'icon_pm', 'icon_email', 'icon_www', 'icon_icq', 'icon_aim', 'icon_yim', 'icon_msnm', 'icon_delete', 'icon_ip', 'icon_no_email', 'icon_no_www', 'icon_no_icq', 'icon_no_aim', 'icon_no_yim', 'icon_no_msnm');
for($i = 0; $i < sizeof($i10n); $i++)
{
$theme[$i10n[$i]] = str_replace('{LANG}', 'lang_' . $img_lang, $theme[$i10n[$i]]);
}
}
return;
}
}
//
// Note this doesn't use the prefetch at present and is very
// incomplete ... purely for testing ... will be keeping my
// eye of 'other products' to ensure these things don't
// mysteriously appear elsewhere, think up your own solutions!
//
class auth {
var $acl;
var $where_sql = '';
function auth($mode, $userdata, $forum_id = false)
{
global $db;
switch( $mode )
{
case 'list':
$and_sql = "AND ( ao.auth_option LIKE 'list' OR ao.auth_type LIKE 'admin' )";
break;
case 'forum':
$and_sql = "AND ( ( au.forum_id = $forum_id ) OR ( au.forum_id <> $forum_id AND ( ao.auth_option LIKE 'list' OR ao.auth_type LIKE 'mod' OR ao.auth_type LIKE 'admin' ) ) )";
break;
case 'admin':
$and_sql = "AND ( ao.auth_type LIKE 'admin' )";
break;
case 'listmod':
$and_sql = "AND ( ao.auth_option LIKE 'list' OR ao.auth_type LIKE 'mod' OR ao.auth_type LIKE 'admin' )";
break;
case 'all':
$and_sql = '';
break;
}
$sql = "SELECT au.forum_id, au.auth_allow_deny, ao.auth_type, ao.auth_option
FROM " . ACL_PREFETCH_TABLE . " au, " . ACL_OPTIONS_TABLE . " ao
WHERE au.user_id = " . $userdata['user_id'] . "
AND ao.auth_option_id = au.auth_option_id
$and_sql";
$result = $db->sql_query($sql);
if ( $row = $db->sql_fetchrow($result) )
{
do
{
$this->acl[$row['forum_id']][$row['auth_type']][$row['auth_option']] = $row['auth_allow_deny'];
}
while ( $row = $db->sql_fetchrow($result) );
}
$db->sql_freeresult($result);
return;
}
function get_acl($forum_id = false, $auth_main = false, $auth_type = false)
{
if ( $auth_main && $auth_type )
{
return $this->acl[$forum_id][$auth_main][$auth_type];
}
else if ( !$auth_type && is_array($this->acl[$forum_id][$auth_main]) )
{
return ( array_sum($this->acl[$forum_id][$auth_main]) ) ? true : false;
}
return $this->acl[$forum_id];
}
function get_acl_admin($auth_type = false)
{
if ( $auth_type )
{
return $this->acl[0]['admin'][$auth_type];
}
else if ( !$auth_type && is_array($this->acl[0]['admin']) )
{
return ( array_sum($this->acl[0]['admin']) ) ? true : false;
}
return false;
}
function set_acl($ug_data, $forum_id, $auth_list = false, $dependencies = false)
{
global $db;
$dependencies = array_merge($dependencies, array(
'admin' => 'mod',
'mod' => 'forum')
);
}
}
//
// Centralised login? May stay, may not ... depends if needed
//
function login($username, $password, $autologin = false)
{
global $SID, $db, $board_config, $lang, $user_ip, $userdata;
global $HTTP_SERVER_VARS, $HTTP_ENV_VARS;
$this_page = ( !empty($HTTP_SERVER_VARS['PHP_SELF']) ) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_ENV_VARS['PHP_SELF'];
$this_page .= '&' . ( ( !empty($HTTP_SERVER_VARS['QUERY_STRING']) ) ? $HTTP_SERVER_VARS['QUERY_STRING'] : $HTTP_ENV_VARS['QUERY_STRING'] );
$session_browser = ( !empty($HTTP_SERVER_VARS['HTTP_USER_AGENT']) ) ? $HTTP_SERVER_VARS['HTTP_USER_AGENT'] : $HTTP_ENV_VARS['HTTP_USER_AGENT'];
$sql = "SELECT user_id, username, user_password, user_email, user_active, user_level
FROM " . USERS_TABLE . "
WHERE username = '" . str_replace("\'", "''", $username) . "'";
$result = $db->sql_query($sql);
if ( $row = $db->sql_fetchrow($result) )
{
if ( $board_config['ldap_enable'] && extension_loaded('ldap') )
{
if ( !($ldap_id = @ldap_connect($board_config['ldap_hostname'])) )
{
@ldap_unbind($ldap_id);
}
}
else
{
if ( md5($password) == $row['user_password'] && $row['user_active'] )
{
$autologin = ( isset($autologin) ) ? md5($password) : '';
$userdata = $session->create($session_id, $user_id, $autologin, $this_page, $session_browser);
}
}
}
return $result;
}
?>
|
|
From: James A. <th...@us...> - 2002-07-11 18:33:33
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv3914
Modified Files:
Tag: phpBB-2_0_0
bbcode.php
Log Message:
Added a fix for smillies_pass function by Ashe
See this topic for details:
http://www.phpbb.com/phpBB/viewtopic.php?p=166905
Yeilds a very large performance increase on long topics
Index: bbcode.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/bbcode.php,v
retrieving revision 1.36.2.9
retrieving revision 1.36.2.10
diff -C2 -r1.36.2.9 -r1.36.2.10
*** bbcode.php 23 Jun 2002 02:47:55 -0000 1.36.2.9
--- bbcode.php 11 Jul 2002 18:33:29 -0000 1.36.2.10
***************
*** 737,776 ****
// Probably so and I'll move it before B2
//
! function smilies_pass($message)
! {
! global $db, $board_config;
! static $smilies;
!
! if( empty($smilies) )
! {
! $sql = "SELECT code, smile_url
! FROM " . SMILIES_TABLE;
! if( !$result = $db->sql_query($sql) )
! {
! message_die(GENERAL_ERROR, "Couldn't obtain smilies data", "", __LINE__, __FILE__, $sql);
! }
!
! if( !$db->sql_numrows($result) )
! {
! return $message;
! }
!
! $smilies = $db->sql_fetchrowset($result);
! }
!
! usort($smilies, 'smiley_sort');
! for($i = 0; $i < count($smilies); $i++)
! {
! $orig[] = "/(?<=.\\W|\\W.|^\\W)" . phpbb_preg_quote($smilies[$i]['code'], "/") . "(?=.\\W|\\W.|\\W$)/";
! $repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['smile_url'] . '" border="0" />';
! }
!
! if( $i > 0 )
! {
! $message = preg_replace($orig, $repl, ' ' . $message . ' ');
! $message = substr($message, 1, -1);
! }
!
! return $message;
}
--- 737,770 ----
// Probably so and I'll move it before B2
//
! function smilies_pass($message)
! {
! static $orig, $repl;
!
! if (!isset($orig))
! {
! global $db, $board_config;
! $orig = $repl = array();
!
! $sql = 'SELECT code, smile_url FROM ' . SMILIES_TABLE;
! if( !$result = $db->sql_query($sql) )
! {
! message_die(GENERAL_ERROR, "Couldn't obtain smilies data", "", __LINE__, __FILE__, $sql);
! }
! $smilies = $db->sql_fetchrowset($result);
!
! usort($smilies, 'smiley_sort');
! for($i = 0; $i < count($smilies); $i++)
! {
! $orig[] = "/(?<=.\W|\W.|^\W)" . phpbb_preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
! $repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['smile_url'] . '" border="0" />';
! }
! }
!
! if (count($orig))
! {
! $message = preg_replace($orig, $repl, ' ' . $message . ' ');
! $message = substr($message, 1, -1);
! }
! return $message;
}
|
|
From: Doug K. <dou...@us...> - 2002-07-08 15:22:27
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv18713/includes
Modified Files:
Tag: phpBB-2_0_0
usercp_register.php
Log Message:
One last security bug by Ludovic Arnaud has been fixed... Forgot about
it last night...
--Doug
Index: usercp_register.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/usercp_register.php,v
retrieving revision 1.20.2.15
retrieving revision 1.20.2.16
diff -C2 -r1.20.2.15 -r1.20.2.16
*** usercp_register.php 8 Jul 2002 06:09:11 -0000 1.20.2.15
--- usercp_register.php 8 Jul 2002 15:22:24 -0000 1.20.2.16
***************
*** 175,179 ****
$user_avatar_type = ( empty($user_avatar_loc) && $mode == 'editprofile' ) ? $userdata['user_avatar_type'] : '';
! if ( isset($HTTP_POST_VARS['avatargallery']) || isset($HTTP_POST_VARS['submitavatar']) || isset($HTTP_POST_VARS['cancelavatar']) )
{
$username = stripslashes($username);
--- 175,179 ----
$user_avatar_type = ( empty($user_avatar_loc) && $mode == 'editprofile' ) ? $userdata['user_avatar_type'] : '';
! if ( (isset($HTTP_POST_VARS['avatargallery']) || isset($HTTP_POST_VARS['submitavatar']) || isset($HTTP_POST_VARS['cancelavatar'])) && (!isset($HTTP_POST_VARS['submit'])) )
{
$username = stripslashes($username);
|
|
From: Paul S. O. <ps...@us...> - 2002-07-08 10:30:47
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv32590/includes
Modified Files:
Tag: phpBB-2_0_0
functions.php
Log Message:
We don't run is_auth here because it adds another query ... as per several previous discussions ... please run any query adding changes through the development forum first, ta muchly.
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v
retrieving revision 1.133.2.4
retrieving revision 1.133.2.5
diff -C2 -r1.133.2.4 -r1.133.2.5
*** functions.php 8 Jul 2002 06:09:11 -0000 1.133.2.4
--- functions.php 8 Jul 2002 10:30:41 -0000 1.133.2.5
***************
*** 93,99 ****
function make_jumpbox($action, $match_forum_id = 0)
{
! global $template, $lang, $db, $userdata, $SID, $nav_links, $phpEx;
!
! $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata);
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
--- 93,99 ----
function make_jumpbox($action, $match_forum_id = 0)
{
! global $template, $lang, $db, $SID, $nav_links, $phpEx;
!
! // $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata);
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
***************
*** 138,143 ****
for($j = 0; $j < $total_forums; $j++)
{
! if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$j]['forum_id']]['auth_view'] )
{
$selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? 'selected="selected"' : '';
$boxstring_forums .= '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>';
--- 138,146 ----
for($j = 0; $j < $total_forums; $j++)
{
! if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG )
{
+
+ // if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$j]['forum_id']]['auth_view'] )
+ // {
$selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? 'selected="selected"' : '';
$boxstring_forums .= '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>';
|
|
From: Doug K. <dou...@us...> - 2002-07-08 06:09:14
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv22965/includes
Modified Files:
Tag: phpBB-2_0_0
functions.php usercp_avatar.php usercp_register.php
Log Message:
Ok, not too much here... just a little enhancement to the Jumpbox, along
with some security problems fixed. All of them were found by Ludovic
Arnaud, with the exception of one, which was also found by Paranti.
I guess I'll be doing some more tomorrow, if I can find anything, but
that's it for tonight. (I'm tired...)
--Doug
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v
retrieving revision 1.133.2.3
retrieving revision 1.133.2.4
diff -C2 -r1.133.2.3 -r1.133.2.4
*** functions.php 23 Jun 2002 02:47:55 -0000 1.133.2.3
--- functions.php 8 Jul 2002 06:09:11 -0000 1.133.2.4
***************
*** 93,97 ****
function make_jumpbox($action, $match_forum_id = 0)
{
! global $template, $lang, $db, $SID, $nav_links, $phpEx;
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
--- 93,99 ----
function make_jumpbox($action, $match_forum_id = 0)
{
! global $template, $lang, $db, $userdata, $SID, $nav_links, $phpEx;
!
! $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata);
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
***************
*** 136,140 ****
for($j = 0; $j < $total_forums; $j++)
{
! if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG )
{
$selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? 'selected="selected"' : '';
--- 138,142 ----
for($j = 0; $j < $total_forums; $j++)
{
! if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$j]['forum_id']]['auth_view'] )
{
$selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? 'selected="selected"' : '';
Index: usercp_avatar.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/usercp_avatar.php,v
retrieving revision 1.8.2.5
retrieving revision 1.8.2.6
diff -C2 -r1.8.2.5 -r1.8.2.6
*** usercp_avatar.php 23 Jun 2002 02:47:56 -0000 1.8.2.5
--- usercp_avatar.php 8 Jul 2002 06:09:11 -0000 1.8.2.6
***************
*** 65,69 ****
function user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename)
{
! return ( $mode == 'editprofile' ) ? ", user_avatar = '" . str_replace("\'", "''", $avatar_filename) . "', user_avatar_type = " . USER_AVATAR_GALLERY : '';
}
--- 65,77 ----
function user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename)
{
! if ( file_exists($board_config['avatar_gallery_path'] . '/' . $avatar_filename) && ($mode == 'editprofile') )
! {
! $return = ", user_avatar = '" . str_replace("\'", "''", $avatar_filename) . "', user_avatar_type = " . USER_AVATAR_GALLERY;
! }
! else
! {
! $return = '';
! }
! return $return;
}
Index: usercp_register.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/usercp_register.php,v
retrieving revision 1.20.2.14
retrieving revision 1.20.2.15
diff -C2 -r1.20.2.14 -r1.20.2.15
*** usercp_register.php 27 Jun 2002 20:06:44 -0000 1.20.2.14
--- usercp_register.php 8 Jul 2002 06:09:11 -0000 1.20.2.15
***************
*** 394,397 ****
--- 394,401 ----
$avatar_sql = user_avatar_gallery($mode, $error, $error_msg, $user_avatar_local);
}
+ else
+ {
+ $avatar_sql = '';
+ }
if ( !$error )
|
|
From: Paul S. O. <ps...@us...> - 2002-07-07 14:10:22
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv28506/admin
Modified Files:
subSilver.css
Log Message:
Few minor changes
Index: subSilver.css
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/subSilver.css,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** subSilver.css 7 Jul 2002 00:07:13 -0000 1.1
--- subSilver.css 7 Jul 2002 14:10:18 -0000 1.2
***************
*** 1,4 ****
/*
! $Id $
The original "subSilver" theme for phpBB2
--- 1,4 ----
/*
! $Id$
The original "subSilver" theme for phpBB2
***************
*** 9,15 ****
--- 9,17 ----
body {
background-color: white;
+ font-family: Verdana,Arial,Helvetica,sans-serif;
margin: 0px;
border: 0px;
padding: 0px;
+
scrollbar-face-color: #DEE3E7;
scrollbar-highlight-color: white;
***************
*** 25,37 ****
}
! .maintitle,h1,h2 {
! color: black;
font-family: 'Trebuchet MS',Verdana,Arial,Helvetica,sans-serif;
font-weight: bold;
! font-size: 22px;
text-decoration: none;
line-height: 120%;
}
.subtitle {
font-family: Arial,Helvetica,sans-serif;
--- 27,42 ----
}
! .maintitle, h1, h2 {
font-family: 'Trebuchet MS',Verdana,Arial,Helvetica,sans-serif;
font-weight: bold;
! font-size: 18pt;
text-decoration: none;
line-height: 120%;
}
+ .maintitle {
+ color: #12749B
+ }
+
.subtitle {
font-family: Arial,Helvetica,sans-serif;
***************
*** 41,82 ****
/*
- Tables
- */
- th,td,p {
- font-family: Verdana,Arial,Helvetica,sans-serif;
- font-size: 8pt;
- }
-
- th {
- height: 25px;
- background-color: #006699;
- color: #FFA34F;
- font-size: 11px;
- font-weight: bold;
- }
-
- th.menu {
- text-align: left;
- }
-
- td.cat {
- height: 28px;
- background-color: #D1D7DC;
- }
-
- .row1 {
- background-color: #EFEFEF;
- }
- .row2 {
- background-color: #DEE3E7;
- }
- .row3 {
- background-color: #D1D7DC;
- }
-
- /*
Anchors
*/
! a:link,a:active,a:visited {
color: #006699;
}
--- 46,52 ----
/*
Anchors
*/
! a:link, a:active, a:visited {
color: #006699;
}
***************
*** 106,110 ****
}
a.copyright:hover {
! color: black;
text-decoration: underline;
}
--- 76,80 ----
}
a.copyright:hover {
! color: #DD6900;
text-decoration: underline;
}
***************
*** 113,116 ****
--- 83,89 ----
Non-tag specific
*/
+ .gen, .genmed, .gensmall {
+ color: black;
+ }
.gen {
font-size: 12px;
***************
*** 122,128 ****
font-size: 10px;
}
- .gen, .genmed, .gensmall {
- color: black;
- }
.nav {
color: black;
--- 95,98 ----
***************
*** 140,146 ****
.copyright {
color: #444444;
- font-size: 10px;
font-family: Verdana,Arial,Helvetica,sans-serif;
letter-spacing: -1px;
}
--- 110,152 ----
.copyright {
color: #444444;
font-family: Verdana,Arial,Helvetica,sans-serif;
+ font-size: 8pt;
letter-spacing: -1px;
+ }
+
+ /*
+ Tables
+ */
+ table.bg {
+ background-color: #98AAB1
+ }
+
+ th, td {
+ font-family: Verdana,Arial,Helvetica,sans-serif;
+ font-size: 8pt;
+ }
+
+ th {
+ height: 25px;
+ background-color: #006699;
+ color: #FFA34F;
+ font-size: 11px;
+ font-weight: bold;
+ }
+
+ th.menu {
+ text-align: left;
+ }
+
+ td.cat {
+ height: 28px;
+ background-color: #D1D7DC;
+ }
+
+ .row1 {
+ background-color: #EFEFEF;
+ }
+ .row2 {
+ background-color: #DEE3E7;
}
|
|
From: Paul S. O. <ps...@us...> - 2002-07-07 00:07:17
|
Update of /cvsroot/phpbb/phpBB2/admin In directory usw-pr-cvs1:/tmp/cvs-serv16274/admin Added Files: subSilver.css Log Message: Slightly condensed ... for admin/ only --- NEW FILE --- /* $Id $ The original "subSilver" theme for phpBB2 Created by subBlue design :: http://www.subBlue.com Copyright (c) 2002 phpBB Group */ body { background-color: white; margin: 0px; border: 0px; padding: 0px; scrollbar-face-color: #DEE3E7; scrollbar-highlight-color: white; scrollbar-shadow-color: #DEE3E7; scrollbar-3dlight-color: #D1D7DC; scrollbar-arrow-color: #006699; scrollbar-track-color: #EFEFEF; scrollbar-darkshadow-color: #98AAB1; } p { font-size: 8pt; } .maintitle,h1,h2 { color: black; font-family: 'Trebuchet MS',Verdana,Arial,Helvetica,sans-serif; font-weight: bold; font-size: 22px; text-decoration: none; line-height: 120%; } .subtitle { font-family: Arial,Helvetica,sans-serif; font-size: 12pt; font-weight: bold; } /* Tables */ th,td,p { font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 8pt; } th { height: 25px; background-color: #006699; color: #FFA34F; font-size: 11px; font-weight: bold; } th.menu { text-align: left; } td.cat { height: 28px; background-color: #D1D7DC; } .row1 { background-color: #EFEFEF; } .row2 { background-color: #DEE3E7; } .row3 { background-color: #D1D7DC; } /* Anchors */ a:link,a:active,a:visited { color: #006699; } a.gen, a.genmed, a.gensmall { color: #006699; text-decoration: none; } a.nav { color: #006699; text-decoration: none; } a.copyright { color: #444444; text-decoration: none; } a.gen:hover, a.genmed:hover, a.gensmall:hover { color: #DD6900; text-decoration: underline; } a:hover { color: #DD6900; text-decoration: underline; } a.nav:hover { text-decoration: underline; } a.copyright:hover { color: black; text-decoration: underline; } /* Non-tag specific */ .gen { font-size: 12px; } .genmed { font-size: 11px; } .gensmall { font-size: 10px; } .gen, .genmed, .gensmall { color: black; } .nav { color: black; font-weight: bold; font-size: 11px; } .name { color: black; font-size: 11px; } .postdetails { color: black; font-size: 10px; } .copyright { color: #444444; font-size: 10px; font-family: Verdana,Arial,Helvetica,sans-serif; letter-spacing: -1px; } /* Misc */ hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px; } /* Forms */ input, textarea, select { color: black; font: normal 11px Verdana, Arial, Helvetica, sans-serif; border-color: black; } input.text { font-family: 'Courier New',courier; } input.post, textarea.post, select { background-color: white; } input { text-indent: 2px; } input.button { background-color: #EFEFEF; color: black; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; } input.mainoption { background-color: #FAFAFA; font-weight: bold; } input.liteoption { background-color: #FAFAFA; font-weight: normal; } /* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */ @import url("formIE.css"); |
|
From: Paul S. O. <ps...@us...> - 2002-07-06 20:37:13
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv25293/admin
Added Files:
admin_viewlogs.php
Log Message:
Have log ... will view
--- NEW FILE ---
<?php
/***************************************************************************
* admin_viewlogs.php
* -------------------
* begin : Friday, May 11, 2001
* copyright : (C) 2001 The phpBB Group
* email : su...@ph...
*
* $Id: admin_viewlogs.php,v 1.1 2002/07/06 20:37:09 psotfx Exp $
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
if ( !empty($setmodules) )
{
if ( !$acl->get_acl_admin('general') )
{
return;
}
$filename = basename(__FILE__);
$module['General']['View_admin_log'] = $filename . "$SID&mode=admin";
return;
}
define('IN_PHPBB', 1);
//
// Include files
//
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
//
// Do we have styles admin permissions?
//
if ( !$acl->get_acl_admin('general') )
{
message_die(MESSAGE, $lang['No_admin']);
}
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
}
else
{
$mode = 'admin';
}
if ( ( isset($HTTP_POST_VARS['delmarked']) || isset($HTTP_POST_VARS['delall']) ) && $acl->get_acl_admin('clearlogs'))
{
$where_sql = '';
if ( isset($HTTP_POST_VARS['delmarked']) && isset($HTTP_POST_VARS['mark']) )
{
foreach ( $HTTP_POST_VARS['mark'] as $marked )
{
$where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . intval($marked);
}
$where_sql = "WHERE log_id IN ($where_sql)";
}
$sql = "DELETE FROM " . LOG_ADMIN_TABLE . "
$where_sql";
$db->sql_query($sql);
}
if ( isset($HTTP_POST_VARS['sort']) )
{
if ( !empty($HTTP_POST_VARS['sort_days']) )
{
$sort_days = ( !empty($HTTP_POST_VARS['sort_days']) ) ? intval($HTTP_POST_VARS['sort_days']) : intval($HTTP_GET_VARS['sort_days']);
$where_sql = time() - ( $sort_days * 86400 );
}
else
{
$where_sql = 0;
}
$start = 0;
$sort_key = ( isset($HTTP_POST_VARS['sort_key']) ) ? $HTTP_POST_VARS['sort_key'] : $HTTP_GET_VARS['sort_key'];
$sort_dir = ( isset($HTTP_POST_VARS['sort_dir']) ) ? $HTTP_POST_VARS['sort_dir'] : $HTTP_GET_VARS['sort_dir'];
}
else
{
$where_sql = 0;
$sort_days = 0;
$sort_key = 't';
$sort_dir = 'd';
}
//
// Sorting
//
$previous_days = array(0 => $lang['All_Entries'], 1 => $lang['1_Day'], 7 => $lang['7_Days'], 14 => $lang['2_Weeks'], 30 => $lang['1_Month'], 90 => $lang['3_Months'], 180 => $lang['6_Months'], 364 => $lang['1_Year']);
$sort_by_text = array('u' => $lang['Sort_Username'], 't' => $lang['Sort_date'], 'i' => $lang['Sort_ip'], 'o' => $lang['Sort_action']);
$sort_by = array('u' => 'l.user_id', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation');
$sort_day_options = '';
foreach ( $previous_days as $day => $text )
{
$selected = ( $sort_days == $day ) ? ' selected="selected"' : '';
$sort_day_options .= '<option value="' . $day . '"' . $selected . '>' . $text . '</option>';
}
$sort_key_options = '';
foreach ( $sort_by_text as $key => $text )
{
$selected = ( $sort_key == $key ) ? ' selected="selected"' : '';
$sort_key_options .= '<option value="' . $key . '"' . $selected . '>' . $text . '</option>';
}
$sort_order_options = ( $sort_dir == 'a' ) ? '<option value="a" selected="selected">' . $lang['Sort_Ascending'] . '</option><option value="d">' . $lang['Sort_Descending'] . '</option>' : '<option value="a">' . $lang['Sort_Ascending'] . '</option><option value="d" selected="selected">' . $lang['Sort_Descending'] . '</option>';
$sort_sql = $sort_by[$sort_key] . ' ' . ( ( $sort_dir == 'd' ) ? 'DESC' : 'ASC' );
//
// Grab data
//
$sql = "SELECT COUNT(*) AS total_entries
FROM " . LOG_ADMIN_TABLE . "
WHERE log_time >= $where_sql";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$total_entries = $row['total_entries'];
$pagination = generate_pagination("admin_viewlogs.$phpEx$SID&mode=$mode&order=$sort_order", $total_entries, $board_config['topics_per_page'], $start). ' ';
page_header($lang['General']);
?>
<h1><?php echo $lang['Admin_log']; ?></h1>
<p><?php echo $lang['Admin_log_explain']; ?></p>
<form method="post" name="log" action="<?php echo "admin_viewlogs.$phpEx$SID&mode=$mode"; ?>"><table width="100%" cellpadding="4" cellspacing="1" border="0" bgcolor="#98AAB1">
<tr>
<td class="cat" colspan="5" height="28" align="center"><span class="gensmall"><?php echo $lang['Display_log']; ?>: <select name="sort_days"><?php echo $sort_day_options; ?></select> <?php echo $lang['Sort_by']; ?> <select name="sort_key"><?php echo $sort_key_options; ?></select> <select name="sort_dir"><?php echo $sort_order_options; ?></select> <input class="liteoption" type="submit" value="<?php echo $lang['Go']; ?>" name="sort" /></span></td>
</tr>
<tr>
<th width="15%" height="25" nowrap="nowrap"><?php echo $lang['Username']; ?></th>
<th width="15%" nowrap="nowrap"><?php echo $lang['IP']; ?></th>
<th width="20%" nowrap="nowrap"><?php echo $lang['Time']; ?></th>
<th width="45%" nowrap="nowrap"><?php echo $lang['Action']; ?></th>
<th nowrap="nowrap"><?php echo $lang['Mark']; ?></th>
</tr>
<?php
$log_data = view_admin_log($board_config['topics_per_page'], $start, $where_sql, $sort_sql);
if ( sizeof($log_data) )
{
for($i = 0; $i < sizeof($log_data); $i++)
{
$cell_bg = ( $cell_bg == 'row1' ) ? 'row2' : 'row1';
?>
<tr>
<td class="<?php echo $cell_bg; ?>" nowrap="nowrap"><?php echo $log_data[$i]['username']; ?></td>
<td class="<?php echo $cell_bg; ?>" align="center" nowrap="nowrap"><?php echo $log_data[$i]['ip']; ?></td>
<td class="<?php echo $cell_bg; ?>" align="center" nowrap="nowrap"><?php echo create_date($board_config['default_dateformat'], $log_data[$i]['time'], $board_config['board_timezone']); ?></td>
<td class="<?php echo $cell_bg; ?>"><?php echo $log_data[$i]['action']; ?></td>
<td class="<?php echo $cell_bg; ?>" align="center" nowrap="nowrap"><input type="checkbox" name="mark[]" value="<?php echo $log_data[$i]['id']; ?>" /></td>
</tr>
<?php
}
if ( $acl->get_acl_admin('clearlogs') )
{
?>
<tr>
<td class="cat" colspan="5" height="28" align="right"><input class="liteoption" type="submit" name="delmarked" value="<?php echo $lang['Delete_marked']; ?>" /> <input class="liteoption" type="submit" name="delall" value="<?php echo $lang['Delete_all']; ?>" /> </td>
</tr>
<?php
}
}
else
{
?>
<tr>
<td class="row1" nowrap="nowrap"><?php echo $lang['No_entries']; ?></td>
</tr>
<?php
}
?>
</table>
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" valign="top"> <span class="nav"><?php echo sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $total_entries / $board_config['topics_per_page'] )); ?></span></td>
<td align="right" valign="top" nowrap="nowrap"><?php
if ( $acl->get_acl_admin('clearlogs') )
{
?><b><span class="gensmall"><a href="javascript:marklist(true);" class="gensmall"><?php echo $lang['Mark_all']; ?></a> :: <a href="javascript:marklist(false);" class="gensmall"><?php echo $lang['Unmark_all']; ?></a></span></b> <br /><br /><?php
}
?><span class="nav"><?php echo $pagination; ?></span></td>
</tr>
</table></form>
<script language="Javascript" type="text/javascript">
<!--
//
// Should really check the browser to stop this whining ...
//
function marklist(status)
{
for (i = 0; i < document.log.length; i++)
{
document.log.elements[i].checked = status;
}
}
//-->
</script>
<?php
page_footer();
?>
|
|
From: Paul S. O. <ps...@us...> - 2002-07-06 13:18:44
|
Update of /cvsroot/phpbb/phpBB2/language/lang_english In directory usw-pr-cvs1:/tmp/cvs-serv5724/language/lang_english Modified Files: lang_admin.php lang_main.php Log Message: Time to a commit ... been a while Index: lang_admin.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/language/lang_english/lang_admin.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** lang_admin.php 10 Mar 2002 03:41:33 -0000 1.35 --- lang_admin.php 6 Jul 2002 13:18:18 -0000 1.36 *************** *** 1,6 **** <?php - /*************************************************************************** ! * lang_admin.php [English] * ------------------- * begin : Sat Dec 16 2000 --- 1,5 ---- <?php /*************************************************************************** ! * lang_admin.php [ English ] [...1389 lines suppressed...] ! $lang['Search_indexing'] = 'Search Indexing'; ! $lang['Search_indexing_explain'] = 'phpBB2 uses a fulltext search system. This breaks down each post into seperate words and then, if the word does not already exist it stores those words in a table. In turn the post is linked to each word it contains in this table. This allows quick searching of large databases and helps reduce load on the server compared to most other methods.</p><p>However, if the tables get out of sync for some reason or you change the minimum, maximum or disallowed list of words the tables need updating. This facility allows you to do just that.</p><p>Please be aware this procedure can take a long time, particularly on large databases. During this period your forum will be automatically shut down to prevent people posting. You can cancel the procedure at any time.</p>'; ! $lang['Start'] = 'Start'; ! $lang['Stop'] = 'Stop'; ! $lang['Indexing_stop_explain'] = 'Search re-indexing has been stopped. Please note that because you stopped the procedure before it completed some posts will now not appear when words they contain are searched for.'; ! $lang['Indexing_finished_explain'] = 'Search re-indexing has been completed successfully.'; // *************** *** 718,720 **** // ------------------------------------------------- ! ?> --- 716,718 ---- // ------------------------------------------------- ! ?> \ No newline at end of file Index: lang_main.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/language/lang_english/lang_main.php,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -r1.89 -r1.90 *** lang_main.php 10 Jun 2002 01:49:48 -0000 1.89 --- lang_main.php 6 Jul 2002 13:18:20 -0000 1.90 *************** *** 28,32 **** // ! $lang['ENCODING'] = 'iso-8859-1'; $lang['DIRECTION'] = 'ltr'; // rtl for Arabic, Hebrew, etc. $lang['LEFT'] = 'left'; // right for Arabic, Hebrew, etc. --- 28,32 ---- // ! $lang['ENCODING'] = 'iso-8859-15'; $lang['DIRECTION'] = 'ltr'; // rtl for Arabic, Hebrew, etc. $lang['LEFT'] = 'left'; // right for Arabic, Hebrew, etc. *************** *** 62,65 **** --- 62,68 ---- $lang['6_Months'] = '6 Months'; $lang['1_Year'] = '1 Year'; + $lang['Ascending'] = 'Ascending'; + $lang['Descending'] = 'Descending'; + $lang['Post_time'] = 'Post time'; $lang['Go'] = 'Go'; *************** *** 153,156 **** --- 156,160 ---- $lang['Moderator'] = 'Moderator'; $lang['Moderators'] = 'Moderators'; + $lang['View_moderators'] = 'List forum moderators'; *************** *** 229,232 **** --- 233,240 ---- $lang['Rules_reply_can'] = 'You <b>can</b> reply to topics in this forum'; $lang['Rules_reply_cannot'] = 'You <b>cannot</b> reply to topics in this forum'; + $lang['Rules_attach_can'] = 'You <b>can</b> post attachments in this forum'; + $lang['Rules_attach_cannot'] = 'You <b>cannot</b> post attachments in this forum'; + $lang['Rules_download_can'] = 'You <b>can</b> download attachments in this forum'; + $lang['Rules_download_cannot'] = 'You <b>cannot</b> download attachments in this forum'; $lang['Rules_edit_can'] = 'You <b>can</b> edit your posts in this forum'; $lang['Rules_edit_cannot'] = 'You <b>cannot</b> edit your posts in this forum'; *************** *** 264,269 **** $lang['Display_posts'] = 'Display posts from previous'; $lang['All_Posts'] = 'All Posts'; - $lang['Newest_First'] = 'Newest First'; - $lang['Oldest_First'] = 'Oldest First'; $lang['Back_to_top'] = 'Back to top'; --- 272,275 ---- *************** *** 292,297 **** $lang['Stop_watching_topic'] = 'Stop watching this topic'; $lang['Start_watching_topic'] = 'Watch this topic for replies'; ! $lang['No_longer_watching'] = 'You are no longer watching this topic'; ! $lang['You_are_watching'] = 'You are now watching this topic'; $lang['Total_votes'] = 'Total Votes'; --- 298,310 ---- $lang['Stop_watching_topic'] = 'Stop watching this topic'; $lang['Start_watching_topic'] = 'Watch this topic for replies'; ! $lang['No_longer_watching_topic'] = 'You are no longer watching this topic'; ! $lang['You_are_watching_topic'] = 'You are now watching this topic'; ! ! $lang['Rate_topic'] = 'Rate this topic'; ! $lang['Very_poor'] = 'Very Poor'; ! $lang['Quite_poor'] = 'Quite Poor'; ! $lang['Unrated'] = 'Unrated'; ! $lang['Quite_good'] = 'Quite Good'; ! $lang['Very_good'] = 'Very Good'; $lang['Total_votes'] = 'Total Votes'; *************** *** 821,826 **** $lang['Forum_index'] = 'Forum index'; $lang['Logging_on'] = 'Logging on'; ! $lang['Posting_message'] = 'Posting a message'; $lang['Searching_forums'] = 'Searching forums'; $lang['Viewing_profile'] = 'Viewing profile'; --- 834,840 ---- $lang['Forum_index'] = 'Forum index'; + $lang['Reading_topic'] = 'Reading topic in %s'; $lang['Logging_on'] = 'Logging on'; ! $lang['Posting_message'] = 'Posting message in %s'; $lang['Searching_forums'] = 'Searching forums'; $lang['Viewing_profile'] = 'Viewing profile'; |
|
From: Paul S. O. <ps...@us...> - 2002-07-05 23:52:20
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv22159/admin
Added Files:
admin_permissions.php admin_search.php
Log Message:
Initial commit ... neither do anything, just wanted to add something :D
--- NEW FILE ---
<?php
/***************************************************************************
* admin_permissions.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : su...@ph...
*
* $Id: admin_permissions.php,v 1.1 2002/07/05 23:52:14 psotfx Exp $
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
if ( !empty($setmodules) )
{
if ( !$acl->get_acl_admin('forums') )
{
return;
}
$filename = basename(__FILE__);
$module['Forums']['Permissions'] = $filename . $SID . '&mode=forums';
$module['General']['Set_Administrators'] = $filename . $SID . '&mode=admins';
return;
}
define('IN_PHPBB', 1);
//
// Include files
//
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
//
// Do we have forum admin permissions?
//
if ( !$acl->get_acl_admin('forums') )
{
message_die(MESSAGE, $lang['No_admin']);
}
//
// Define some vars
//
if ( isset($HTTP_GET_VARS['f']) || isset($HTTP_POST_VARS['f']) )
{
$forum_id = ( isset($HTTP_POST_VARS['f']) ) ? intval($HTTP_POST_VARS['f']) : intval($HTTP_GET_VARS['f']);
$forum_sql = " WHERE forum_id = $forum_id";
}
else
{
unset($forum_id);
$forum_sql = '';
}
//
// Start program proper
//
//
// Get required information, either all forums if
// no id was specified or just the requsted if it
// was
//
if ( !empty($forum_id) )
{
//
// Output the selection table if no forum id was
// specified
//
$template->set_filenames(array(
"body" => "admin/auth_select_body.tpl")
);
$select_list = '<select name=f">';
for($i = 0; $i < count($forum_rows); $i++)
{
$select_list .= '<option value="' . $forum_rows[$i]['forum_id'] . '">' . $forum_rows[$i]['forum_name'] . '</option>';
}
$select_list .= '</select>';
}
else
{
$sql = "SELECT forum_id, forum_name
FROM " . FORUMS_TABLE . "
ORDER BY cat_id ASC, forum_order ASC";
$result = $db->sql_query($sql);
$select_list = '';
while ( $row = $db->sql_fetchrow($result) )
{
$select_list .= '<option value="' . $row['forum_id'] . '">' . $row['forum_name'] . '</option>';
}
$db->sql_freeresult($result);
page_header($lang['Forums']);
?>
<h1><?php echo $lang['Permissions']; ?></h1>
<p><?php echo $lang['Permissions_explain']; ?></p>
<form method="post" action="<?php echo "admin_permissions.$phpEx$SID"; ?>"><table cellspacing="1" cellpadding="4" border="0" align="center" bgcolor="#98AAB1">
<tr>
<th align="center"><?php echo $lang['Select_a_Forum']; ?></th>
</tr>
<tr>
<td class="row1" align="center"> <select name="f"><?php echo $select_list; ?></select> <input type="submit" value="<?php echo $lang['Look_up_Forum']; ?>" class="mainoption" /> </td>
</tr>
</table></form>
<?php
}
page_footer();
?>
--- NEW FILE ---
<?php
/***************************************************************************
* admin_search.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : su...@ph...
*
* $Id: admin_search.php,v 1.1 2002/07/05 23:52:14 psotfx Exp $
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
if ( !empty($setmodules) )
{
if ( !$acl->get_acl_admin('general') )
{
return;
}
$filename = basename(__FILE__);
$module['DB']['Search_indexing'] = $filename;
return;
}
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/functions_posting.'.$phpEx);
//
// Do we have forum admin permissions?
//
if ( !$acl->get_acl_admin('general') )
{
message_die(MESSAGE, $lang['No_admin']);
}
//
// Start indexing
//
if ( isset($HTTP_POST_VARS['start']) )
{
//
// Do not change anything below this line.
//
set_time_limit(0);
$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";
}
else if ( isset($HTTP_POST_VARS['cancel']) )
{
}
else
{
page_header($lang['DB']);
?>
<h1><?php echo $lang['Search_indexing']; ?></h1>
<p><?php echo $lang['Search_indexing_explain']; ?></p>
<form method="post" action="<?php echo "admin_search.$phpEx$SID"; ?>"><table cellspacing="1" cellpadding="4" border="0" align="center" bgcolor="#98AAB1">
<tr>
<td class="cat" height="28" align="center"> <input type="submit" name="start" value="<?php echo $lang['Start']; ?>" class="mainoption" /> </td>
</tr>
</table></form>
<?php
page_footer();
}
?>
|
|
From: Paul S. O. <ps...@us...> - 2002-06-29 01:58:57
|
Update of /cvsroot/phpbb/phpBB2/includes In directory usw-pr-cvs1:/tmp/cvs-serv32482/includes Removed Files: smtp.php Log Message: See previous check-in --- smtp.php DELETED --- |
|
From: Paul S. O. <ps...@us...> - 2002-06-29 01:47:29
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv29723/includes
Modified Files:
emailer.php
Log Message:
Combine SMTP and Emailer sources into one
Index: emailer.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/emailer.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** emailer.php 10 Jun 2002 01:51:35 -0000 1.17
--- emailer.php 29 Jun 2002 01:47:26 -0000 1.18
***************
*** 180,196 ****
$this->extra_headers = $universal_extra . $this->extra_headers;
! if ( $this->use_smtp )
! {
! if ( !defined('SMTP_INCLUDED') )
! {
! include($phpbb_root_path . 'includes/smtp.' . $phpEx);
! }
!
! $result = smtpmail($this->address, $this->subject, $this->msg, $this->extra_headers);
! }
! else
! {
! $result = @mail($this->address, $this->subject, $this->msg, $this->extra_headers);
! }
if ( !$result )
--- 180,184 ----
$this->extra_headers = $universal_extra . $this->extra_headers;
! $result = ( $this->use_smtp ) ? smtpmail($this->address, $this->subject, $this->msg, $this->extra_headers) : @mail($this->address, $this->subject, $this->msg, $this->extra_headers);
if ( !$result )
***************
*** 305,308 ****
--- 293,504 ----
} // class emailer
+
+ //
+ // This function has been modified as provided
+ // by SirSir to allow multiline responses when
+ // using SMTP Extensions
+ //
+ function server_parse($socket, $response)
+ {
+ while ( substr($server_response,3,1) != ' ' )
+ {
+ if( !( $server_response = fgets($socket, 256) ) )
+ {
+ message_die(GENERAL_ERROR, "Couldn't get mail server response codes", "", __LINE__, __FILE__);
+ }
+ }
+
+ if( !( substr($server_response, 0, 3) == $response ) )
+ {
+ message_die(GENERAL_ERROR, "Ran into problems sending Mail. Response: $server_response", "", __LINE__, __FILE__);
+ }
+ }
+
+ /****************************************************************************
+ * Function: smtpmail
+ * Description: This is a functional replacement for php's builtin mail
+ * function, that uses smtp.
+ * Usage: The usage for this function is identical to that of php's
+ * built in mail function.
+ ****************************************************************************/
+ function smtpmail($mail_to, $subject, $message, $headers = '')
+ {
+ // For now I'm using an array based $smtp_vars to hold the smtp server
+ // info, but it should probably change to $board_config...
+ // then the relevant info would be $board_config['smtp_host'] and
+ // $board_config['smtp_port'].
+ global $board_config;
+
+ //
+ // Fix any bare linefeeds in the message to make it RFC821 Compliant.
+ //
+ $message = preg_replace("/(?<!\r)\n/si", "\r\n", $message);
+
+ if ($headers != '')
+ {
+ if(is_array($headers))
+ {
+ if(sizeof($headers) > 1)
+ {
+ $headers = join("\r\n", $headers);
+ }
+ else
+ {
+ $headers = $headers[0];
+ }
+ }
+ $headers = chop($headers);
+
+ //
+ // Make sure there are no bare linefeeds in the headers
+ //
+ $headers = preg_replace("/(?<!\r)\n/si", "\r\n", $headers);
+ //
+ // Ok this is rather confusing all things considered,
+ // but we have to grab bcc and cc headers and treat them differently
+ // Something we really didn't take into consideration originally
+ //
+ $header_array = explode("\r\n", $headers);
+ @reset($header_array);
+ $headers = "";
+ while( list(, $header) = each($header_array) )
+ {
+ if( preg_match("/^cc:/si", $header) )
+ {
+ $cc = preg_replace("/^cc:(.*)/si", "\\1", $header);
+ }
+ else if( preg_match("/^bcc:/si", $header ))
+ {
+ $bcc = preg_replace("/^bcc:(.*)/si", "\\1", $header);
+ $header = "";
+ }
+ $headers .= $header . "\r\n";
+ }
+ $headers = chop($headers);
+ $cc = explode(",", $cc);
+ $bcc = explode(",", $bcc);
+ }
+ if(trim($mail_to) == "")
+ {
+ message_die(GENERAL_ERROR, "No email address specified", "", __LINE__, __FILE__);
+ }
+ if(trim($subject) == "")
+ {
+ message_die(GENERAL_ERROR, "No email Subject specified", "", __LINE__, __FILE__);
+ }
+ if(trim($message) == "")
+ {
+ message_die(GENERAL_ERROR, "Email message was blank", "", __LINE__, __FILE__);
+ }
+ $mail_to_array = explode(",", $mail_to);
+
+ //
+ // 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) )
+ {
+ message_die(GENERAL_ERROR, "Could not connect to smtp host : $errno : $errstr", "", __LINE__, __FILE__);
+ }
+ server_parse($socket, "220");
+
+ if( !empty($board_config['smtp_username']) && !empty($board_config['smtp_password']) )
+ {
+ // Send the RFC2554 specified EHLO.
+ // This improved as provided by SirSir to accomodate
+ // both SMTP AND ESMTP capable servers
+ fputs($socket, "EHLO " . $board_config['smtp_host'] . "\r\n");
+ server_parse($socket, "250");
+
+ fputs($socket, "AUTH LOGIN\r\n");
+ server_parse($socket, "334");
+ fputs($socket, base64_encode($board_config['smtp_username']) . "\r\n");
+ server_parse($socket, "334");
+ fputs($socket, base64_encode($board_config['smtp_password']) . "\r\n");
+ server_parse($socket, "235");
+ }
+ else
+ {
+ // Send the RFC821 specified HELO.
+ fputs($socket, "HELO " . $board_config['smtp_host'] . "\r\n");
+ server_parse($socket, "250");
+ }
+
+ // From this point onward most server response codes should be 250
+ // Specify who the mail is from....
+ fputs($socket, "MAIL FROM: <" . $board_config['board_email'] . ">\r\n");
+ server_parse($socket, "250");
+
+ // Specify each user to send to and build to header.
+ $to_header = "To: ";
+ @reset( $mail_to_array );
+ while( list( , $mail_to_address ) = each( $mail_to_array ))
+ {
+ //
+ // Add an additional bit of error checking to the To field.
+ //
+ $mail_to_address = trim($mail_to_address);
+ if ( preg_match('/[^ ]+\@[^ ]+/', $mail_to_address) )
+ {
+ fputs( $socket, "RCPT TO: <$mail_to_address>\r\n" );
+ server_parse( $socket, "250" );
+ }
+ $to_header .= "<$mail_to_address>, ";
+ }
+ // Ok now do the CC and BCC fields...
+ @reset( $bcc );
+ while( list( , $bcc_address ) = each( $bcc ))
+ {
+ //
+ // Add an additional bit of error checking to bcc header...
+ //
+ $bcc_address = trim( $bcc_address );
+ if ( preg_match('/[^ ]+\@[^ ]+/', $bcc_address) )
+ {
+ fputs( $socket, "RCPT TO: <$bcc_address>\r\n" );
+ server_parse( $socket, "250" );
+ }
+ }
+ @reset( $cc );
+ while( list( , $cc_address ) = each( $cc ))
+ {
+ //
+ // Add an additional bit of error checking to cc header
+ //
+ $cc_address = trim( $cc_address );
+ if ( preg_match('/[^ ]+\@[^ ]+/', $cc_address) )
+ {
+ fputs($socket, "RCPT TO: <$cc_address>\r\n");
+ server_parse($socket, "250");
+ }
+ }
+ // Ok now we tell the server we are ready to start sending data
+ fputs($socket, "DATA\r\n");
+
+ // This is the last response code we look for until the end of the message.
+ server_parse($socket, "354");
+
+ // Send the Subject Line...
+ fputs($socket, "Subject: $subject\r\n");
+
+ // Now the To Header.
+ fputs($socket, "$to_header\r\n");
+
+ // Now any custom headers....
+ fputs($socket, "$headers\r\n\r\n");
+
+ // Ok now we are ready for the message...
+ fputs($socket, "$message\r\n");
+
+ // Ok the all the ingredients are mixed in let's cook this puppy...
+ fputs($socket, ".\r\n");
+ server_parse($socket, "250");
+
+ // Now tell the server we are done and close the socket...
+ fputs($socket, "QUIT\r\n");
+ fclose($socket);
+
+ return TRUE;
+ }
?>
|
|
From: Doug K. <dou...@us...> - 2002-06-27 22:54:13
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv25297/admin
Modified Files:
Tag: phpBB-2_0_0
admin_users.php
Log Message:
Ok, by this time, bugs 397, 427, 429, 450, and 472 should be fixed.
--Doug
Index: admin_users.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_users.php,v
retrieving revision 1.57.2.5
retrieving revision 1.57.2.6
diff -C2 -r1.57.2.5 -r1.57.2.6
*** admin_users.php 12 Jun 2002 15:54:39 -0000 1.57.2.5
--- admin_users.php 27 Jun 2002 22:54:09 -0000 1.57.2.6
***************
*** 202,216 ****
}
- if( $user_status == 0 )
- {
- // User is (made) inactive. Delete all their sessions.
- $sql = "DELETE FROM " . SESSIONS_TABLE . "
- WHERE session_user_id = $user_id";
- if( !$db->sql_query($sql) )
- {
- message_die(GENERAL_ERROR, 'Could not delete this users sessions', '', __LINE__, __FILE__, $sql);
- }
- }
-
if( $signature != "" )
{
--- 202,205 ----
***************
*** 220,224 ****
$sig_length_check = preg_replace('/(\<.*?)(=.*?)( .*?=.*?)?([ \/]?\>)/is', '\\1\\3\\4', $sig_length_check);
}
- $sig_length_check = preg_replace('/(\[.*?)(=.*?)\]/is', '\\1]', stripslashes($signature));
// Only create a new bbcode_uid when there was no uid yet.
--- 209,212 ----
***************
*** 239,245 ****
// Avatar stuff
//
- //
- // Avatar stuff
- //
$avatar_sql = "";
if( isset($HTTP_POST_VARS['avatardel']) )
--- 227,230 ----
***************
*** 1124,1128 ****
);
! if( file_exists('./../' . $board_config['avatar_path'] ) )
{
if ( $form_enctype != '' )
--- 1109,1113 ----
);
! if( file_exists('./../' . $board_config['avatar_path'] ) && ($board_config['allow_avatar_upload'] == TRUE) )
{
if ( $form_enctype != '' )
***************
*** 1133,1139 ****
}
! if( file_exists('./../' . $board_config['avatar_gallery_path'] ) )
{
$template->assign_block_vars('avatar_local_gallery', array() );
}
}
--- 1118,1129 ----
}
! if( file_exists('./../' . $board_config['avatar_gallery_path'] ) && ($board_config['allow_avatar_local'] == TRUE) )
{
$template->assign_block_vars('avatar_local_gallery', array() );
+ }
+
+ if( $board_config['allow_avatar_remote'] == TRUE )
+ {
+ $template->assign_block_vars('avatar_remote_link', array() );
}
}
|
|
From: Doug K. <dou...@us...> - 2002-06-27 22:54:13
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver/admin
In directory usw-pr-cvs1:/tmp/cvs-serv25297/templates/subSilver/admin
Modified Files:
Tag: phpBB-2_0_0
user_edit_body.tpl
Log Message:
Ok, by this time, bugs 397, 427, 429, 450, and 472 should be fixed.
--Doug
Index: user_edit_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/admin/user_edit_body.tpl,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -C2 -r1.12 -r1.12.2.1
*** user_edit_body.tpl 23 Mar 2002 15:36:26 -0000 1.12
--- user_edit_body.tpl 27 Jun 2002 22:54:10 -0000 1.12.2.1
***************
*** 241,244 ****
--- 241,245 ----
</tr>
<!-- END avatar_remote_upload -->
+ <!-- BEGIN avatar_remote_link -->
<tr>
<td class="row1"><span class="gen">{L_LINK_REMOTE_AVATAR}</span></td>
***************
*** 247,250 ****
--- 248,252 ----
</td>
</tr>
+ <!-- END avatar_remote_link -->
<!-- BEGIN avatar_local_gallery -->
<tr>
|
|
From: Doug K. <dou...@us...> - 2002-06-27 21:26:49
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv24486
Modified Files:
Tag: phpBB-2_0_0
config.php login.php viewforum.php
Log Message:
Ok, fixing a few bugs here.... I still have more to do, but this fixes a
funny bug in login.php where redirect won't allow more than the file and
mode... Now it should work with posting (or any other page). Also fixes a
typo in admin_db_utilities.php.
P.S. James, don't commit config.php. ;) Fortunately, it didn't seem like
you lost a password.... :D
Index: config.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/config.php,v
retrieving revision 1.51.2.1
retrieving revision 1.51.2.2
diff -C2 -r1.51.2.1 -r1.51.2.2
*** config.php 27 Jun 2002 20:06:42 -0000 1.51.2.1
--- config.php 27 Jun 2002 21:26:46 -0000 1.51.2.2
***************
*** 1,19 ****
- <?php
-
- //
- // phpBB 2.x auto-generated config file
- // Do not change anything in this file!
- //
-
- $dbms = "mysql";
-
- $dbhost = "localhost";
- $dbname = "bb";
- $dbuser = "root";
- $dbpasswd = "";
-
- $table_prefix = "phpbb_";
-
- define('PHPBB_INSTALLED', true);
-
- ?>
\ No newline at end of file
--- 0 ----
Index: login.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/login.php,v
retrieving revision 1.47.2.1
retrieving revision 1.47.2.2
diff -C2 -r1.47.2.1 -r1.47.2.2
*** login.php 13 May 2002 13:18:17 -0000 1.47.2.1
--- login.php 27 Jun 2002 21:26:46 -0000 1.47.2.2
***************
*** 99,103 ****
{
$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : '';
!
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("login.$phpEx?redirect=$redirect") . '">')
--- 99,104 ----
{
$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : '';
! $redirect = str_replace("?", "&", $redirect);
!
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("login.$phpEx?redirect=$redirect") . '">')
***************
*** 113,116 ****
--- 114,118 ----
{
$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : "";
+ $redirect = str_replace("?", "&", $redirect);
$template->assign_vars(array(
***************
*** 177,181 ****
{
$forward_to = ( !empty($forward_matches[3]) ) ? $forward_matches[3] : $forward_matches[1];
-
$forward_match = explode('&', $forward_to);
--- 179,182 ----
***************
*** 195,199 ****
}
}
-
$forward_page = $forward_match[0] . '?' . $forward_page;
}
--- 196,199 ----
Index: viewforum.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewforum.php,v
retrieving revision 1.139.2.5
retrieving revision 1.139.2.6
diff -C2 -r1.139.2.5 -r1.139.2.6
*** viewforum.php 17 May 2002 13:14:05 -0000 1.139.2.5
--- viewforum.php 27 Jun 2002 21:26:46 -0000 1.139.2.6
***************
*** 567,571 ****
{
$folder_image = $folder_new;
! $folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
$newest_post_img = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> ';
--- 567,571 ----
{
$folder_image = $folder_new;
! $folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['New_posts'];
$newest_post_img = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> ';
|
|
From: Doug K. <dou...@us...> - 2002-06-27 21:26:49
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv24486/admin
Modified Files:
Tag: phpBB-2_0_0
admin_db_utilities.php
Log Message:
Ok, fixing a few bugs here.... I still have more to do, but this fixes a
funny bug in login.php where redirect won't allow more than the file and
mode... Now it should work with posting (or any other page). Also fixes a
typo in admin_db_utilities.php.
P.S. James, don't commit config.php. ;) Fortunately, it didn't seem like
you lost a password.... :D
Index: admin_db_utilities.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_db_utilities.php,v
retrieving revision 1.42.2.4
retrieving revision 1.42.2.5
diff -C2 -r1.42.2.4 -r1.42.2.5
*** admin_db_utilities.php 21 May 2002 18:35:26 -0000 1.42.2.4
--- admin_db_utilities.php 27 Jun 2002 21:26:46 -0000 1.42.2.5
***************
*** 377,381 ****
//
$result = $db->sql_query($field_query);
! if(!result)
{
message_die(GENERAL_ERROR, "Failed in get_table_def (show fields)", "", __LINE__, __FILE__, $field_query);
--- 377,381 ----
//
$result = $db->sql_query($field_query);
! if(!$result)
{
message_die(GENERAL_ERROR, "Failed in get_table_def (show fields)", "", __LINE__, __FILE__, $field_query);
|
|
From: James A. <th...@us...> - 2002-06-27 20:06:47
|
Update of /cvsroot/phpbb/phpBB2/language/lang_english
In directory usw-pr-cvs1:/tmp/cvs-serv28883/language/lang_english
Modified Files:
Tag: phpBB-2_0_0
lang_admin.php lang_faq.php
Log Message:
Fixes for bugs: 387, 519, 522, and 456
Index: lang_admin.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/language/lang_english/lang_admin.php,v
retrieving revision 1.35.2.2
retrieving revision 1.35.2.3
diff -C2 -r1.35.2.2 -r1.35.2.3
*** lang_admin.php 12 May 2002 15:33:28 -0000 1.35.2.2
--- lang_admin.php 27 Jun 2002 20:06:44 -0000 1.35.2.3
***************
*** 276,280 ****
$lang['Allow_smilies'] = 'Allow Smilies';
$lang['Smilies_path'] = 'Smilies Storage Path';
! $lang['Smilies_path_explain'] = 'Path under your phpBB root dir, e.g. images/smilies';
$lang['Allow_sig'] = 'Allow Signatures';
$lang['Max_sig_length'] = 'Maximum signature length';
--- 276,280 ----
$lang['Allow_smilies'] = 'Allow Smilies';
$lang['Smilies_path'] = 'Smilies Storage Path';
! $lang['Smilies_path_explain'] = 'Path under your phpBB root dir, e.g. images/smiles';
$lang['Allow_sig'] = 'Allow Signatures';
$lang['Max_sig_length'] = 'Maximum signature length';
***************
*** 352,355 ****
--- 352,357 ----
$lang['Forum_delete_explain'] = 'The form below will allow you to delete a forum (or category) and decide where you want to put all topics (or forums) it contained.';
+ $lang['Status_locked'] = 'Locked';
+ $lang['Status_unlocked'] = 'Unlocked';
$lang['Forum_settings'] = 'General Forum Settings';
$lang['Forum_name'] = 'Forum name';
Index: lang_faq.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/language/lang_english/lang_faq.php,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -r1.4 -r1.4.2.1
*** lang_faq.php 15 Dec 2001 16:42:08 -0000 1.4
--- lang_faq.php 27 Jun 2002 20:06:44 -0000 1.4.2.1
***************
*** 40,44 ****
$faq[] = array("How do I prevent my username appearing in the online user listings?", "In your profile you will find an option <i>Hide your online status</i>, if you switch this <i>on</i> you'll only appear to board administrators or to yourself. You will be counted as a hidden user.");
$faq[] = array("I've lost my password!", "Don't panic! While your password cannot be retrieved it can be reset. To do this go to the login page and click <u>I've forgotten my password</u>, follow the instructions and you should be back online in no time");
! $faq[] = array("I registered but cannot login!", "Firstly check your are entering the correct username and password. If they are okay then one of two things may have happened. If COPPA support is enabled and you clicked the <u>I am under 13 years old</u> link while registering then you will have to follow the instructions you received. If this is not the case then does your account need activating? Some boards will require all new registrations be activated, either by yourself or by the administrator before you can logon. When you registered it would have told you whether activation was required. If you were sent an email then follow the instructions, if you did not receive the email then are you sure your email address is valid? One reason activation is used is to reduce the possibility of <i>rouge</i> users abusing the board anonymously. If you are sure the email address you used is valid then try contacting the board administrator.");
$faq[] = array("I registered in the past but cannot login any more?!", "The most likely reasons for this are; you entered an incorrect username or password (check the email you were sent when you first registered) or the administrator has deleted your account for some reason. If it is the later case then perhaps you did not post anything? It is usual for boards to periodically remove users who have not posted anything so as to reduce the size of the database. Try registering again and get involved in discussions.");
--- 40,44 ----
$faq[] = array("How do I prevent my username appearing in the online user listings?", "In your profile you will find an option <i>Hide your online status</i>, if you switch this <i>on</i> you'll only appear to board administrators or to yourself. You will be counted as a hidden user.");
$faq[] = array("I've lost my password!", "Don't panic! While your password cannot be retrieved it can be reset. To do this go to the login page and click <u>I've forgotten my password</u>, follow the instructions and you should be back online in no time");
! $faq[] = array("I registered but cannot login!", "Firstly check your are entering the correct username and password. If they are okay then one of two things may have happened. If COPPA support is enabled and you clicked the <u>I am under 13 years old</u> link while registering then you will have to follow the instructions you received. If this is not the case then does your account need activating? Some boards will require all new registrations be activated, either by yourself or by the administrator before you can logon. When you registered it would have told you whether activation was required. If you were sent an email then follow the instructions, if you did not receive the email then are you sure your email address is valid? One reason activation is used is to reduce the possibility of <i>rogue</i> users abusing the board anonymously. If you are sure the email address you used is valid then try contacting the board administrator.");
$faq[] = array("I registered in the past but cannot login any more?!", "The most likely reasons for this are; you entered an incorrect username or password (check the email you were sent when you first registered) or the administrator has deleted your account for some reason. If it is the later case then perhaps you did not post anything? It is usual for boards to periodically remove users who have not posted anything so as to reduce the size of the database. Try registering again and get involved in discussions.");
|
|
From: James A. <th...@us...> - 2002-06-27 20:06:47
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv28883
Modified Files:
Tag: phpBB-2_0_0
config.php
Log Message:
Fixes for bugs: 387, 519, 522, and 456
Index: config.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/config.php,v
retrieving revision 1.51
retrieving revision 1.51.2.1
diff -C2 -r1.51 -r1.51.2.1
*** config.php 31 Mar 2002 00:07:48 -0000 1.51
--- config.php 27 Jun 2002 20:06:42 -0000 1.51.2.1
***************
*** 0 ****
--- 1,19 ----
+ <?php
+
+ //
+ // phpBB 2.x auto-generated config file
+ // Do not change anything in this file!
+ //
+
+ $dbms = "mysql";
+
+ $dbhost = "localhost";
+ $dbname = "bb";
+ $dbuser = "root";
+ $dbpasswd = "";
+
+ $table_prefix = "phpbb_";
+
+ define('PHPBB_INSTALLED', true);
+
+ ?>
\ No newline at end of file
|
|
From: James A. <th...@us...> - 2002-06-27 20:06:47
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv28883/admin
Modified Files:
Tag: phpBB-2_0_0
admin_forums.php
Log Message:
Fixes for bugs: 387, 519, 522, and 456
Index: admin_forums.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_forums.php,v
retrieving revision 1.40.2.1
retrieving revision 1.40.2.2
diff -C2 -r1.40.2.1 -r1.40.2.2
*** admin_forums.php 12 May 2002 00:47:40 -0000 1.40.2.1
--- admin_forums.php 27 Jun 2002 20:06:43 -0000 1.40.2.2
***************
*** 303,308 ****
$forumstatus == ( FORUM_LOCKED ) ? $forumlocked = "selected=\"selected\"" : $forumunlocked = "selected=\"selected\"";
! $statuslist = "<option value=\"" . FORUM_UNLOCKED . "\" $forumunlocked>Unlocked</option>\n";
! $statuslist .= "<option value=\"" . FORUM_LOCKED . "\" $forumlocked>Locked</option>\n";
$template->set_filenames(array(
--- 303,309 ----
$forumstatus == ( FORUM_LOCKED ) ? $forumlocked = "selected=\"selected\"" : $forumunlocked = "selected=\"selected\"";
! $statuslist = "<option value=\"" . FORUM_UNLOCKED . "\" $forumunlocked>" . $lang['Status_unlocked'] . "</option>\n";
! $statuslist .= "<option value=\"" . FORUM_LOCKED . "\" $forumlocked>" . $lang['Status_locked'] . "</option>\n";
!
$template->set_filenames(array(
|